var privacyBanner=function(n){"use strict";var t=function(){return t=Object.assign||function(n){for(var t,e=1,o=arguments.length;e0&&r[r.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]"undefined"==typeof window;function z(n,t){if(null===n)return"null";if(Array.isArray(n)){return`[${n.map(n=>z(n,!0)).join(",")}]`}if("object"==typeof n){let e=[];for(const t in n)n.hasOwnProperty(t)&&void 0!==n[t]&&e.push(`${t}:${z(n[t],!0)}`);const o=e.join(",");return t?`{${o}}`:o}return"string"==typeof n?JSON.stringify(n):`${n}`}function J(n,...t){if(0===t.length)return n;const e=t[0];return n[e]||(n[e]={}),J(n[e],...t.slice(1))}function G(n){try{return decodeURIComponent(n)}catch(n){return""}}function Y(){if(!V())return window}const K=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/;function X(n,t){if("string"!=typeof n)return;if(!function(n){return!!n&&K.test(n.trim().toLowerCase())}(n))return;const e=n.trim();if("00000000-0000-0000-0000-000000000000"===e)return;if("00000000-0000-0000-5000-000000000000"===e)return;return Number.isFinite(NaN)&&Date.now()>NaN?void 0:e}const Q="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";function Z(n){return Q.replace(/[xy]/g,t=>{const e=n();return("x"===t?e:3&e|8).toString(16)})}function nn(){const n="undefined"!=typeof crypto?crypto:void 0;if("function"==typeof(null==n?void 0:n.randomUUID))return n.randomUUID();if("function"==typeof(null==n?void 0:n.getRandomValues)){const t=n.getRandomValues(new Uint8Array(36));let e=0;return Z(()=>t[e++]%16)}return Z(()=>16*Math.random()|0)}const tn="_shopify_cmp";function en(){try{return document.cookie}catch{return!1}}function on(){return function(n){const t=en()?document.cookie.split("; "):[];for(let e=0;ecn.includes(n.split("=")[0].trim()))}())return;const n=window.location.hostname.split("."),t=["",...n.map((t,e)=>n.slice(e).join("."))];for(const n of cn)for(const e of t)try{an(n,e,-1,"")}catch{}}function ln(){var n,t;return V()?{}:(null===(n=window.Shopify)||void 0===n||null===(t=n.customerPrivacy)||void 0===t?void 0:t.config)||{}}const dn="_cmp",un="consentHeader";function pn(n){if(!V()){try{n=decodeURIComponent(n)}catch{}try{sessionStorage.setItem(un,n)}catch{}}}function fn(n=dn){let t;if(t=function(n){try{return n()}catch{return}}(()=>function(n=dn){var t,e;const o=null===(t=performance)||void 0===t||null===(e=t.getEntriesByType)||void 0===e?void 0:e.call(t,"navigation");if(!o)return;const r=o.map(t=>function(n,t=dn){var e,o;if(!n)return;return null===(e=n.serverTiming)||void 0===e||null===(o=e.find(n=>n.name==t))||void 0===o?void 0:o.description}(t,n)),i=r.find(n=>n);i&&n===dn&&pn(i);return i}(n)),!t){if(n!==dn)return;let t;try{t=sessionStorage.getItem(un)}catch{}return t||void 0}try{t=decodeURIComponent(t)}catch{}return t}function hn(){var n,t;const e=Y();return!0===(null==e||null===(n=e.Shopify)||void 0===n||null===(t=n.customerPrivacy)||void 0===t?void 0:t.backendConsentEnabled)||!0===ln().asyncVisitorState}function mn(){if(!V()){var n,t;const e=(null===(n=window.Shopify)||void 0===n||null===(t=n.customerPrivacy)||void 0===t?void 0:t.injectedConsent)||ln().injectedConsent;return e?G(e):void 0}}function gn(){var n;if(!V())return null===(n=window.Shopify)||void 0===n?void 0:n.customerPrivacy}function yn(){var n;return null===(n=gn())||void 0===n?void 0:n.consentStatus}function vn(n){const t=gn();t&&(t.consentStatus=n)}function bn(){xn(g)}function Cn(n,t){void 0!==n.granular_consent&&function(n){vn("loaded");const t=n[D],e=n[T],o=n[I],r=n[k];!0===t?xn(c):!1===t&&xn(u);!0===e?xn(s):!1===e&&xn(p);!0===o?xn(l):!1===o&&xn(f);!0===r?xn(d):!1===r&&xn(h);const g=function(n){const t={marketingAllowed:n[D],saleOfDataAllowed:n[T],analyticsAllowed:n[I],preferencesAllowed:n[k],firstPartyMarketingAllowed:n[D],thirdPartyMarketingAllowed:n[T]};return t}(n);xn(m,g);const y=[o,r,t,e];y.every(n=>!0===n)&&xn(i);y.every(n=>!1===n)&&xn(a)}(t)}function xn(n,t){if(!V())try{document.dispatchEvent(new CustomEvent(n,{detail:t||{}}))}catch(t){console.error(`[Shopify Customer Privacy] Error in event listener for "${n}":`,t)}}function wn(){let n;if(n=V()?mn():function(){var n,t;const e=null===(n=window.Shopify)||void 0===n||null===(t=n.customerPrivacy)||void 0===t?void 0:t.cachedConsent;return e?G(e):void 0}()||mn()||new URLSearchParams(window.location.search).get("_cs")||void 0||on()||fn(),void 0!==n)return Tn(n)}function _n(){try{let n=wn();if(!n)return;return n}catch{return}}function kn(){return{m:Bn(E),a:Bn(A),p:Bn(B),s:Bn(S)}}function In(){return kn()[S]}function Dn(n=null){return null===n&&(n=_n()),void 0===n}function Tn(n){if("%"==n.slice(0,1))try{n=decodeURIComponent(n)}catch{}const t=n.slice(0,1);return"{"==t?function(n){var t;let e;try{e=JSON.parse(n)}catch{return}if("2.1"!==e.v)return;if(null===(t=e.con)||void 0===t||!t.CMP)return;return e}(n):"3"==t?function(n){const{base:t}=function(n){const t=n.replace(/#+$/,""),e=t.lastIndexOf("#");if(e<0)return{base:t};const o=t.slice(0,e),r=t.slice(e+1);return r.includes("}")?{base:t}:{base:o,comment:r}}(n);n=t;const e=n.slice(1).split("_"),[o,r,i,a,c]=e;let s,l;try{s=e[5]?JSON.parse(e.slice(5).join("_")):void 0}catch{}if(c){const n=c.replace(/\*/g,"/").replace(/-/g,"+"),t=atob(n);let e="";for(let n=0;nn.slice(0,t)+"-"+n.slice(t),e)}function d(n){const t=o.split(".")[0];return t.includes(n.toLowerCase())?_:t.includes(n.toUpperCase())?w:x}function u(n){return o.includes(n.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[A]:d(A),[B]:d(B),[E]:d(E),[S]:d(S)}},region:r||"",cus:s,purposes:{[I]:u(I),[k]:u(k),[D]:u(D),[T]:u(T)},sale_of_data_region:"t"==a,display_banner:"t"==i,consent_id:l}}(n):void 0}function En(n){switch(n){case w:return y;case _:return v;default:return C}}function An(n){switch(n){case A:return P;case E:return O;case B:return R;case S:return H}}function Bn(n){const t=_n();if(!t)return x;const e=t.con.CMP;return e?e[n]:x}function Sn(n){const t=_n();if(!t||!t.purposes)return!0;const e=t.purposes[n];return"boolean"!=typeof e||e}function On(){return Sn(k)}function Pn(){return Sn(I)}function Rn(){return Sn(D)}function Hn(){return Sn(T)}function Nn(){const n=_n();return!!n&&("boolean"==typeof n.display_banner&&n.display_banner)}function Mn(){const n=_n();return n&&n.sale_of_data_region||!1}const Ln="v1.11";function jn(n,t){const e=Y();if(!e)return;const o=J(e,"Shopify","customerPrivacy","cachedToken");if(t){const e="_shopify_s"===n?18e5:31536e6;o[n]=t,o[n+"_expires_at"]=Date.now()+e}else delete o[n],delete o[n+"_expires_at"]}const Fn="Shopify-Storefront-Consent-Management";function Un(n){return""===n?void 0:n}const $n=["SHOPIFY_PRIVACY_BANNER","SHOPIFY_CHECKOUT_BANNER","CHECKOUT_UI_EXTENSION"],qn=["SHOPIFY_CUSTOMER_ACCOUNTS_BANNER"];function Wn(n){const t=n.granular_consent;var e,o;return{query:`query { consentManagement { cookies(${z({visitorConsent:{marketing:Un(t.marketing),analytics:Un(t.analytics),preferences:Un(t.preferences),saleOfData:Un(t.sale_of_data),...t.metafields&&{metafields:t.metafields}},...t.email&&{visitorEmail:t.email},origReferrer:Un(n.referrer),landingPage:Un(n.landing_page)})}${e=n.source,o=Boolean(t.customerAccountRequestInfo),e&&(o?qn:$n).includes(e)?`,source:${e}`:""}) { trackingConsentCookie cookieDomain landingPageCookie origReferrerCookie shopifyUnique shopifyVisit } customerAccountUrl } }`,variables:{}}}let Vn;function zn(n,t,e,o={}){const r=ln().consentDomain||t.granular_consent.checkoutRootDomain||window.location.host;const i=()=>function(n,t,e,o){const r=t.granular_consent;let i="",a={};if(r.customerAccountRequestInfo)i=r.customerAccountRequestInfo.url,a=r.customerAccountRequestInfo.headers;else{const t=ln(),o=r.storefrontAccessToken||t.storefrontAccessToken;i=`${/^(localhost|127\.0\.0\.1)(:|$)/.test(n)?"http:":"https:"}//${n}/api/unstable/graphql.json`;const c=r.isExtensionToken?"Shopify-Storefront-Extension-Token":"x-shopify-storefront-access-token";a=o?{[c]:o}:{},e&&(a={...a,...e()})}const c={headers:{"content-type":"application/json",...!0===ln().asyncConsent&&new URL(i).origin===window.location.origin&&{[Fn]:"1"},...a,..."undefined"!=typeof __CtaTestEnv__&&"true"===__CtaTestEnv__?{"x-test-payload":JSON.stringify(t)}:{}},body:JSON.stringify(Wn(t)),method:"POST"};let s;try{s=fetch(i,c)}catch(n){s=Promise.reject(n)}return s.then(n=>{try{null==o||o(n)}catch{}if(n.ok)return n.json();{const t=new Error("Server error");throw t.cause={status:n.status},t}})}(r,t,o.getVisitorTokenHeaders,o.onResponse).then(n=>{var r;const i=null==n||null===(r=n.data)||void 0===r?void 0:r.consentManagement;if(!i){var a;const t=(null!==(a=null==n?void 0:n.errors)&&void 0!==a?a:[]).map(n=>null==n?void 0:n.message).filter(Boolean).join("; ");throw new Error(t?`GraphQL error: ${t}`:"GraphQL response missing consentManagement")}const c=i.cookies.cookieDomain,s=i.cookies.trackingConsentCookie,l=i.cookies.shopifyUnique,d=i.cookies.shopifyVisit;if(!0===ln().asyncConsent&&s&&!function(n){try{return void 0!==Tn(G(n))}catch{return!1}}(s))throw new Error("Consent response contains unreadable consent");var u,p;if(s&&(u=s,J(window,"Shopify","customerPrivacy").cachedConsent=u,!0!==ln().asyncConsent&&pn(s)),jn("_shopify_y",l),jn("_shopify_s",d),!0===ln().asyncConsent)null!==(p=n.errors)&&void 0!==p&&p.length||!s||Dn()||sn();else if(function(n){return n.granular_consent.headlessStorefront}(t)&&!hn()){const n=31536e6,e=t.granular_consent,o=c||e.checkoutRootDomain||window.location.hostname,r=e.storefrontRootDomain||c||window.location.hostname;an(tn,o,n,s),r!==o&&an(tn,r,n,s)}return!1!==o.emitEvents&&Cn(t,{[k]:On(),[I]:Pn(),[D]:Rn(),[T]:Hn()}),void 0!==e&&e(null,n),n}).catch(n=>{var t;const o="Error while setting storefront API consent: "+n.message,r=null===(t=n.cause)||void 0===t?void 0:t.status,i={error:o};if(void 0!==r&&(i.statusCode=r),void 0===e)throw i;e(i)});if(!0!==ln().asyncConsent)return i();const a=Vn=Vn?Vn.then(i,i):i(),c=()=>{Vn===a&&(Vn=void 0)};return a.then(c,c),a}let Jn,Gn=class n{constructor(){if(this.endpoint="https://otlp-http-production.shopifysvc.com/v1/metrics",this.serviceName="consent-tracking-api",this.scopeName="consent-tracking-api-opentelemetry",n.instance)return n.instance;n.instance=this}increment(n,t={},e=.01){if(!V()&&n)try{if(!Number.isFinite(e)||e<=0||e>1)return;if(!Pn())return;if(Math.random()>=e)return;const o=this.buildMetricBody(n,t);if(window.location.host.endsWith("spin.dev"))return void console.log("OpenTelemetry metric from consent API:",o);if("function"!=typeof fetch)return;return fetch(this.endpoint,{headers:{accept:"*/*","content-type":"application/json; charset=utf-8"},body:JSON.stringify(o),method:"POST",mode:"cors",credentials:"omit"}).catch(()=>{})}catch(n){}}buildMetricBody(n,t){const e=1e6*Date.now();return{resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeMetrics:[{scope:{name:this.scopeName,version:"1.1.1",attributes:[]},metrics:[{name:n,unit:"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[{asDouble:1,startTimeUnixNano:e,timeUnixNano:e,attributes:Yn(t)}]}}]}]}]}}};function Yn(n){return Object.keys(n).reduce((t,e)=>{const o=n[e];return null==o||t.push({key:e,value:Kn(o)}),t},[])}function Kn(n){return"string"==typeof n?{stringValue:n}:"boolean"==typeof n?{boolValue:n}:isFinite(n)?Math.floor(n)===n?{intValue:n}:{doubleValue:n}:{stringValue:String(n)}}function Xn(){var n;return null!==(n=Jn)&&void 0!==n?n:Jn=new Gn}Gn.instance=void 0;const Qn=[O,P,R,H],Zn=[...Qn,N,L,j,F,U,M,$,q,W],nt=Qn.map(n=>`"${n}"`).join(", "),tt="https://shopify.dev/docs/api/customer-privacy";function et(n,t){return ot(n,t,{})}function ot(n,t,e){if(V())throw new Error("setTrackingConsent is not supported in Node.js environments. This function requires browser APIs (XHR, cookies, window) and can only be called client-side.");if(Xn().increment("consent_tracking_api_calls_total",{method_name:"setTrackingConsent",api_version:Ln}),function(n){if("boolean"!=typeof n&&"object"!=typeof n)throw new r(`setTrackingConsent received an invalid argument of type "${typeof n}". Expected an object with consent keys. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${tt} for documentation.`);if("object"==typeof n){const t=Object.keys(n);if(0===t.length)throw new r(`The submitted consent object is empty. Expected at least one consent key: ${nt}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${tt} for documentation.`);for(const n of t)if(!Zn.includes(n))throw new r(`The submitted consent object contains an invalid key: "${n}". Valid keys are: ${nt}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${tt} for documentation.`)}}(n),void 0!==t&&"function"!=typeof t)throw new r(`setTrackingConsent received an invalid callback of type "${typeof t}". The second argument must be a function if provided. Example: setTrackingConsent({ analytics: true }, (error, result) => { ... }). See ${tt} for documentation.`);const o=function(n){if(!n)return null;try{return at()?document.referrer:""}catch{return""}}(n.analytics),i=function(n){if(!n)return null;if(!at())return"/";try{return window.location.pathname+window.location.search}catch{return"/"}}(n.analytics);return zn(0,{granular_consent:n,...null!==o&&{referrer:o},...null!==i&&{landing_page:i},...e.source&&{source:e.source}},t)}function rt(){if(Xn().increment("consent_tracking_api_calls_total",{method_name:"getTrackingConsent",api_version:Ln}),Dn())return C;const n=kn();return n[E]===w&&n[A]===w?y:n[E]===_||n[A]===_?v:b}function it(){return function(){const n=_n();return Dn(n)?"":n.region||""}()}function at(){try{if(""===document.referrer)return!0;const n=document.createElement("a");return n.href=document.referrer,window.location.hostname!=n.hostname}catch{return!0}}function ct(){return!!Dn()||Rn()&&Pn()}function st(){return Mn()?"string"==typeof navigator.globalPrivacyControl?"1"!==navigator.globalPrivacyControl:"boolean"==typeof navigator.globalPrivacyControl?!navigator.globalPrivacyControl:null:null}function lt(){return Nn()&&rt()===b}function dt(){return!1===st()?v:(n=In(),Dn()?C:n===x?b:En(n));var n}function ut(){return!0}function pt(n){return function(n){const t=_n();if(Dn(t)||!t.cus)return;const e=t.cus[encodeURIComponent(n)];return e?decodeURIComponent(e):e}(n)}function ft(){const n={},t=kn();for(const e of Object.keys(t))n[An(e)]=En(t[e]);return n}function ht(){return function(){const n=_n();return n&&n.consent_id||""}()}function mt(n){if(!V())try{var t,e;return null===(t=document.querySelector(`meta[name="${n}"]`))||void 0===t||null===(e=t.getAttribute("content"))||void 0===e?void 0:e.trim()}catch{return}}function gt(n){const t=mt(n);if(t)try{const n=JSON.parse(t);return"string"==typeof n?n.trim():void 0}catch{return}}function yt(n){return void 0!==n&&Date.now()>n}function vt(n,t){const e=X(gt(t));if(e&&!yt(function(n){const t=gt(`${n}Expiration`);if(!t)return;const e=Number(t);return Number.isFinite(e)?e:void 0}(t)))return e;const o=X(mt(n));return o&&!yt(function(n){if(!V())try{var t,e;const o=null===(t=document.querySelector(`meta[name="${n}"]`))||void 0===t||null===(e=t.getAttribute("data-expiration"))||void 0===e?void 0:e.trim();if(!o)return;const r=Number(o);return Number.isFinite(r)?r:void 0}catch{return}}(n))?o:void 0}function bt(n){return"_shopify_y"===n?vt("shopify-y","serialized-shopifyY"):"_shopify_s"===n?vt("shopify-s","serialized-shopifyS"):void 0}function Ct(n,t){try{Xn().increment("consent_tracking_api_tracking_token_read",{token:n,source:t})}catch{}}function xt(n){try{var t,e,o,r;return null===(t=performance)||void 0===t||null===(e=t.getEntriesByType("navigation")[0])||void 0===e||null===(o=e.serverTiming)||void 0===o||null===(r=o.find(t=>t.name==n))||void 0===r?void 0:r.description}catch{return}}function wt(){const n=document.querySelector('[data-serialized-id="app-base-path"]');if(!V()&&Boolean(null===(e=Y())||void 0===e?void 0:e.__CUSTOMER_ACCOUNT__)||n){var t;const e=document.querySelector('[data-serialized-id="preview-mode-data"]');if("/"!==JSON.parse((null==n?void 0:n.textContent)||"null")||!1!==(null===(t=JSON.parse((null==e?void 0:e.textContent)||"null"))||void 0===t?void 0:t.inPreviewMode))return;return new URL("/customer/api/unstable/graphql",window.location.origin).href}var e;const{protocol:o,host:r}=function(){const n=ln().consentDomain||window.location.host;return{protocol:/^(localhost|127\.0\.0\.1)(:|$)/.test(n)?"http:":"https:",host:n}}();return`${o}//${r}/api/unstable/graphql.json`}async function _t(n){try{var t;if(Math.random()>.01)return;let e=null;if(n)try{const t=await n.json();e=Array.isArray(null==t?void 0:t.errors)&&t.errors.length>0}catch{}Xn().increment("consent_tracking_api_persist",{ok:String(!(null==n||!n.ok)),status:String(null!==(t=null==n?void 0:n.status)&&void 0!==t?t:"none"),graphql_errors:String(e)},1)}catch{}}function kt(n,t,e){if(!0===ln().asyncConsent&&"loaded"!==yn())return;Xn().increment("consent_tracking_api_tracking_token_missing");const o=t?void 0:nn(),r=e?void 0:nn();return o&&jn("_shopify_y",o),r&&jn("_shopify_s",r),function(n,t){if(!V())try{const e=X(n),o=X(t);if(!e&&!o)return;const r=wt();if(!r)return;const i=new URLSearchParams,a={"content-type":"application/json"};e&&(i.set("_y",e),a["X-Shopify-UniqueToken"]=e),o&&(i.set("_s",o),a["X-Shopify-VisitToken"]=o);const c=`${r}?${i.toString()}`;let s;try{s=fetch(c,{headers:a,body:JSON.stringify({query:"query { consentManagement { cookies(visitorConsent:{}) { cookieDomain } } }",variables:{}}),method:"POST",mode:"cors",credentials:"include"})}catch(n){s=Promise.reject(n)}s.then(n=>_t(n),()=>_t(void 0))}catch{}}(o,r),"_shopify_y"===n?o:r}function It(n){if(!Pn()&&!Rn())return;const t=function(n){var t,e,o,r,i,a;const c=Y();if(!c)return;const s=null===(t=c.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e||null===(o=e.cachedToken)||void 0===o?void 0:o[n],l=null===(r=c.Shopify)||void 0===r||null===(i=r.customerPrivacy)||void 0===i||null===(a=i.cachedToken)||void 0===a?void 0:a[n+"_expires_at"];return!s||!l||l<(new Date).getTime()?void 0:X(s)}(n);if(t)return Ct(n,"window_cache"),t;if(function(){const n=Y();if(null==n||!n.ShopPay)return!1;try{const t=Object(n.ShopPay);return Reflect.has(t,"trackingUnique")||Reflect.has(t,"trackingVisit")}catch{return!1}}()){const t=function(n){const t=Y();if(!t||!t.ShopPay)return;const e={_shopify_y:"trackingUnique",_shopify_s:"trackingVisit"}[n];if(!e)return;return X(t.ShopPay[e])}(n);return Ct(n,"shop_pay"),t}const e=bt(n);if(e)return Ct(n,"meta"),e;const o=function(n){const t=n.replace("_shopify",""),e=xt(t),o=Number(xt(`${t}e`));if(!o||Date.now()/1e3t.trim().startsWith(`${n}=`)))||void 0===o||null===(r=o.split("=")[1])||void 0===r?void 0:r.trim())}catch{return}}(n);if(r)return Ct(n,"cookie"),r;Ct(n,"missing")}function Dt(){return It("_shopify_y")}function Tt(){return It("_shopify_s")}function Et(){return Bt("_shopify_y")}function At(){return Bt("_shopify_s")}function Bt(n){if(V())throw new Error("Token generateFallback is not supported in Node.js environments, just browsers.");const t=It(n);if(t)return t;if((Pn()||Rn())&&!function(){const n=Y();return!(!n||!Reflect.has(n,"ShopPay"))}())try{return kt(n,Dt(),Tt())}catch{return}}const St="95ba910bcec4542ef2a0b64cd7ca666c";function Ot(n,t,e){try{var o;!function(n){const t=new XMLHttpRequest;t.open("POST","https://error-analytics-production.shopifysvc.com",!0),t.setRequestHeader("Content-Type","application/json"),t.setRequestHeader("Bugsnag-Api-Key",St),t.setRequestHeader("Bugsnag-Payload-Version","5");const e=function(n){var t;const e=function(n){return n?n.stackTrace||n.stack||n.description||n.name:void 0}(n.error);let o,r;if(null!==(t=n.error)&&void 0!==t&&t.name){var i,a;o=n.error.name,r=null!==(i=null===(a=n.error)||void 0===a?void 0:a.message)&&void 0!==i?i:""}else{const t=(e||"unknown error").split("\n")[0],i=t.indexOf(":");var c,s,l;if(i>0)o=t.substring(0,i).trim(),r=t.substring(i+1).trim();else o=t.trim()||"unknown error",r=(null===(c=n.error)||void 0===c?void 0:c.message)||(null===(s=n.error)||void 0===s?void 0:s.error)||(null===(l=n.error)||void 0===l?void 0:l.toString())||"No error message available"}return JSON.stringify({payloadVersion:5,notifier:{name:"ConsentTrackingAPI",version:"latest",url:"-"},events:[{exceptions:[{errorClass:o,message:r,stacktrace:[{file:"consent-tracking-api.js",lineNumber:"1",method:e}],type:"browserjs"}],context:"general",app:{id:"ConsentTrackingAPI",version:"latest"},metaData:{request:{shopId:n.shopId,shopUrl:window.location.href},device:{userAgent:window.navigator.userAgent},"Additional Notes":n.notes},unhandled:!1}]})}(n);t.send(e)}({error:n,context:null!=t?t:"",shopId:Rt()||(null===(o=window.Shopify)||void 0===o?void 0:o.shop),notes:null!=e?e:""})}catch(n){}}function Pt(n){return(...t)=>{try{return n(...t)}catch(n){throw n instanceof r||Ot(n),n}}}function Rt(){try{var n;const t=null===(n=document.getElementById("shopify-features"))||void 0===n?void 0:n.textContent;return t?JSON.parse(t).shopId:null}catch(n){return null}}function Ht(){return Rn()}function Nt(){return Pn()}function Mt(){return On()}function Lt(){return Hn()}function jt(n={useBugsnagReporting:!1}){return(({useBugsnagReporting:n})=>{In()!=_&&!1===st()&&et({sale_of_data:!1},()=>!1);const t={analyticsProcessingAllowed:Pn,currentVisitorConsent:ft,doesMerchantSupportGranularConsent:ut,firstPartyMarketingAllowed:Ht,getCCPAConsent:dt,getRegion:it,getTrackingConsent:rt,getTrackingConsentMetafield:pt,marketingAllowed:Ht,preferencesProcessingAllowed:On,saleOfDataAllowed:Lt,saleOfDataRegion:Mn,setTrackingConsent:et,shouldShowBanner:Nn,shouldShowGDPRBanner:lt,thirdPartyMarketingAllowed:Lt,userCanBeTracked:ct,consentId:ht,unstable:{},__internal:{uniqueToken:Dt,visitToken:Tt,uniqueTokenWithFallback:Et,visitTokenWithFallback:At},__metadata__:{name:"@shopify/consent-tracking-api",version:Ln,description:"Shopify Consent Tracking API"},config:ln()};if(!n)return t;const e=t;for(const n in e)if(e.hasOwnProperty(n)){const t=e[n];"function"==typeof t&&(e[n]=Pt(t))}return t})(n)}let Ft;function Ut(){const n=Dt(),t=Tt();return{...n?{"X-Shopify-UniqueToken":n}:{},...t?{"X-Shopify-VisitToken":t}:{}}}function $t(){if(V())return;if(Ft)return Ft;const n=yn();if("loading"===n)return;if("loaded"===n)return;const t=!0===ln().asyncConsent;if(!Dn()&&(!t||!on()))return void vn("loaded");if(!t)return;vn("loading");const e=zn(0,{granular_consent:{}},void 0,{emitEvents:!1,getVisitorTokenHeaders:hn()?Ut:void 0}).then(()=>{vn("loaded")});return Ft=e,e.then(()=>{Ft===e&&(Ft=void 0)},()=>{"loading"===yn()&&vn(void 0),Ft===e&&(Ft=void 0)}),e}function qt(n,t){if(V())return;if(!n)return;const e=function(n){const t=new URL(n,window.location.origin),e=Vt(n)?Wt(t):Wt(t).replace(window.location.origin,""),o=document.querySelectorAll(`a[href^="${e}"]`),r=document.querySelectorAll(`a[href*="${window.location.hostname}/customer_authentication"]`),i=new Set,a=[];for(let n=0;n=.01)&&Nt()){var n,t,e,o,r,i=(n=document.cookie.split("; ").map(function(n){return n.split("=")}).find(function(n){return"_shopify_cmp"===n[0]}),n&&void 0!==n[1]?decodeURIComponent(n[1]).replace(/#[^}#]*$/,""):null),a=(e=performance.getEntriesByType("navigation")[0],(null==(o=null===(t=null==e?void 0:e.serverTiming)||void 0===t?void 0:t.find(function(n){return"_cmp"===n.name}))?void 0:o.description)?decodeURIComponent(o.description):null);r=i||a?i?a?i===a?"true":"false":"missing_timing":"missing_cookie":"both_missing",he().increment("privacy_banner_cookie_attest",{parity:r}),function(n,t){try{fetch("https://monorail-edge.shopifysvc.com/v1/produce",{method:"POST",mode:"cors",credentials:"omit",headers:{"content-type":"application/json; charset=utf-8","x-monorail-edge-event-created-at-ms":String(Date.now()),"x-monorail-edge-event-sent-at-ms":String(Date.now())},body:JSON.stringify({schema_id:"customer_privacy_api_events/2.0",payload:{shop_domain:window.location.host,method_name:n,call_details:t}})}).catch(function(){})}catch(n){}}("consentParity",JSON.stringify({parity:r,cookie:i,serverTiming:a}))}}var be,Ce,xe=function(){var n=ft();return n.marketing===C&&n.analytics===C&&n.preferences===C},we=["127.0.0.1"],_e=function(){var n,t=Nn()&&xe();return!window.location.pathname.match(/\/password$/)&&(n=window.location.hostname||window.location.host||"",!we.some(function(t){return n.startsWith(t)}))&&t},ke=function(){return"1"===me("preview_privacy_banner")},Ie=function(){var n;return Boolean(!0===(null===(n=null===window||void 0===window?void 0:window.Shopify)||void 0===n?void 0:n.previewMode))&&xe()},De=function(){return ke()||Ie()},Te=function(){function n(){}return n.getServerData=function(n,t,r,i,a){return e(this,void 0,void 0,function(){return o(this,function(e){return this.domain=n,this.accessToken=null!=t?t:a?void 0:this.liquidAccessToken(),this.locale=r,this.country=i,this.isOptionalToken=a,[2,this.getDataFromStorefrontApi()]})})},n.getEmbeddedData=function(){var n=document.getElementById("scb4127");if(n)return JSON.parse(n.textContent||"")},n.fetchParams=function(n){var t=n.accessToken,e=n.unlocalized,o=n.includeCloseButtonText,r=void 0===o||o,i=this.currentLanguage(),a=this.currentCountry(),c=!i||!a||e?"":"@inContext(language: ".concat(i,", country: ").concat(a,")"),s=De(),l={"content-type":"application/json"};return t&&(l["x-shopify-storefront-access-token"]=t),{headers:l,body:JSON.stringify({query:"\n query bannerQuery ($isPreviewMode: Boolean = ".concat(s,") ").concat(c," {\n consentManagement {\n banner {\n enabled\n position\n policyLinkText\n policyLinkUrl\n title\n text\n buttonPrefsOpenText\n buttonAcceptText\n buttonDeclineText\n regionVisibility @include(if: $isPreviewMode)\n theme {\n theme\n fontColor\n backgroundColor\n buttonFontColor\n buttonBackgroundColor\n }\n preferences {\n title\n introTitle\n introText\n buttonAcceptText\n buttonDeclineText\n buttonSaveText\n ").concat(r?"buttonCloseText":"","\n bulletPoints {\n enabled\n title\n firstText\n secondText\n thirdText\n }\n purposes {\n essentialName\n essentialDesc\n performanceName\n performanceDesc\n preferencesName\n preferencesDesc\n marketingName\n marketingDesc\n }\n }\n }\n }\n }"),variables:{isPreviewMode:De()}}),method:"POST"}},n.getDataFromStorefrontApi=function(n){return e(this,arguments,void 0,function(n,e){var r,i,a,c,s,l,d,u,p;return void 0===e&&(e=!0),o(this,function(o){switch(o.label){case 0:if(!this.accessToken&&!this.isOptionalToken)throw new Error("Missing access token");return r=/^(localhost|127\.0\.0\.1)(:|$)/.test(this.domain||"")?"http":"https",i=this.domain?"".concat(r,"://").concat(this.domain):"",a="".concat(i,"/api/unstable/graphql.json"),[4,fetch(a,this.fetchParams({accessToken:this.accessToken,unlocalized:n,includeCloseButtonText:e}))];case 1:return 200!==(c=o.sent()).status?[3,3]:[4,c.json()];case 2:if((s=o.sent()).errors){if(l=s.errors.some(function(n){var t;return"undefinedField"===(null===(t=n.extensions)||void 0===t?void 0:t.code)&&"ConsentManagementBannerPreferences"===n.extensions.typeName&&"buttonCloseText"===n.extensions.fieldName}),l&&e)return[2,this.getDataFromStorefrontApi(n,!1)];if((d=s.errors.find(function(n){return"argumentLiteralsIncompatible"===n.extensions.code||"variableLiteralsIncompatible"===n.extensions.code}))&&!n)return u=d.message||"",p=u.includes("Directive 'inContext'")&&u.includes("invalid value"),window.Weglot||p?console.log("Banner localization error",d.message):ce(new Error(d.message),"DataFetching"),[2,this.getDataFromStorefrontApi(!0,e)];throw new Error(s.errors[0].message)}return[2,t({},s.data.consentManagement.banner)];case 3:throw new Error("Could not reach the server")}})})},n.liquidAccessToken=function(){var n=document.documentElement.querySelector("#shopify-features");if(n){var t=JSON.parse(n.textContent||"").accessToken;if(t)return t;console.warn("Could not find liquid access token")}else console.warn("Could not find liquid access token")},n.currentLanguage=function(){var n=this.locale;if(n){n=n.replace("-","_").toUpperCase();return["PT_BR","PT_PT","ZH_CN","ZH_TW"].includes(n)||(n=n.split("_")[0]),n}},n.currentCountry=function(){var n;return null===(n=this.country)||void 0===n?void 0:n.toUpperCase()},n}();function Ee(n,t){return(null==t?void 0:t.id)&&n.setAttribute("id",t.id),(null==t?void 0:t.class)&&n.setAttribute("class",t.class),(null==t?void 0:t.onClick)&&n.addEventListener("click",t.onClick),(null==t?void 0:t.appendTo)&&t.appendTo.appendChild(n),(null==t?void 0:t.role)&&n.setAttribute("role",t.role),(null==t?void 0:t.autofocus)&&n.setAttribute("autofocus",""),(null==t?void 0:t.ariaHidden)&&n.setAttribute("aria-hidden","".concat(null==t?void 0:t.ariaHidden)),(null==t?void 0:t.dir)&&n.setAttribute("dir",t.dir),n}function Ae(n){var t=Ee(document.createElement("div"),n);return(null==n?void 0:n.text)&&(t.textContent=n.text),(null==n?void 0:n.ariaModal)&&t.setAttribute("aria-modal",n.ariaModal),(null==n?void 0:n.ariaLabelledby)&&t.setAttribute("aria-labelledby",n.ariaLabelledby),t}function Be(n){var t=Ee(document.createElement("span"),n);return(null==n?void 0:n.text)&&(t.textContent=n.text),t}function Se(n){var t,e=Ee(document.createElement("button"),n);return e.textContent=null!==(t=null==n?void 0:n.text)&&void 0!==t?t:null,n.disabled&&e.setAttribute("disabled",""),n.ariaHaspopup&&e.setAttribute("aria-haspopup",n.ariaHaspopup),n.type&&e.setAttribute("type",n.type),n.ariaLabel&&e.setAttribute("aria-label",n.ariaLabel),e}function Oe(n){var t=Ee(document.createElement("p"),n);return t.textContent=n.text,t}function Pe(n,t){var e=Ee(document.createElement(n),t);return e.textContent=t.text,e}function Re(n){return Pe(be.H2,n)}function He(n){return Pe(be.H3,n)}function Ne(n){var t=Ee(document.createElement("style"),n);return t.textContent=n.content,t}function Me(n){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttributeNS(null,"width",n.width),t.setAttributeNS(null,"height",n.height),t.setAttributeNS(null,"viewBox","0 0 ".concat(n.width," ").concat(n.height)),(null==n?void 0:n.fillRule)&&t.setAttributeNS(null,"fill-rule",n.fillRule),(null==n?void 0:n.clipRule)&&t.setAttributeNS(null,"clip-rule",n.clipRule);var e=document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttributeNS(null,"fill",(null==n?void 0:n.colour)||"#000"),e.setAttributeNS(null,"d",n.path),t.appendChild(e),(null==n?void 0:n.id)&&t.setAttribute("id",n.id),(null==n?void 0:n.class)&&t.setAttribute("class",n.class),(null==n?void 0:n.dataIconType)&&t.setAttribute("data-icon-type",n.dataIconType),(null==n?void 0:n.ariaHidden)&&t.setAttribute("aria-hidden","".concat(null==n?void 0:n.ariaHidden)),(null==n?void 0:n.focusable)&&t.setAttribute("focusable","".concat(null==n?void 0:n.focusable)),(null==n?void 0:n.appendTo)&&n.appendTo.appendChild(t),t}function Le(n){var t=Ee(document.createElement("section"),n);return(null==n?void 0:n.text)&&(t.textContent=n.text),(null==n?void 0:n.ariaModal)&&t.setAttribute("aria-modal",n.ariaModal),(null==n?void 0:n.ariaLabelledby)&&t.setAttribute("aria-labelledby",n.ariaLabelledby),t}function je(n){var t=n.bannerData,e=n.locale,o=Le({id:Yt.DialogId,class:Yt.DialogClass,role:"alertdialog",ariaModal:"false",ariaLabelledby:t.title?Yt.BodyTitleId:void 0,dir:Zt(e)?"rtl":void 0});t.title||o.setAttribute("aria-label",t.buttonPrefsOpenText);var r=Ae({class:Yt.WrapperClass});o.appendChild(r);var i=Ae({class:Yt.BodyClass});r.appendChild(i);var a=Ae({class:Yt.ButtonsClass});return a.classList.add(Yt.ButtonsGranularClass),r.appendChild(a),function(n,t){if(n.title){var e=Re({id:Yt.BodyTitleId,text:n.title});t.appendChild(e)}}(t,i),function(n,t){var e=Oe({text:"".concat(n.text," ")}),o=function(n){var t=Ee(document.createElement("a"),n);return t.setAttribute("href",n.href),t.textContent=n.text,t.setAttribute("target",void 0===n.target?"_blank":n.target),n.target&&"_blank"!==n.target||t.setAttribute("rel","noopener noreferrer"),t}({id:Yt.BodyCopyPolicyLinkId,href:n.policyLinkUrl,target:"_blank",text:n.policyLinkText?n.policyLinkText:"Privacy Policy"});e.appendChild(o),t.appendChild(e)}(t,i),function(n,t){var e=Be({text:n.buttonPrefsOpenText}),o=Se({id:Yt.ButtonManagePrefsId,class:Yt.ButtonManagePrefsClass,ariaHaspopup:"dialog",type:"button"});o.appendChild(e),t.appendChild(o)}(t,a),function(n,t){t.appendChild(Se({id:Yt.ButtonAcceptId,class:Yt.ButtonAcceptClass,type:"button",text:n.buttonAcceptText}))}(t,a),function(n,t){t.appendChild(Se({id:Yt.ButtonDeclineId,class:Yt.ButtonDeclineClass,type:"button",text:n.buttonDeclineText}))}(t,a),o}function Fe(n,t){var e,o,r,i,a,c=(o={appendTo:n},Ee(document.createElement("header"),o));r=c,i=null!==(e=t.preferences.buttonCloseText)&&void 0!==e?e:"Close dialog",Me({appendTo:a=Se({id:Kt.HeaderCloseId,class:Kt.HeaderCloseClass,ariaLabel:i,type:"button",text:""}),ariaHidden:!0,width:"12",height:"12",path:"M7.41401 6.00012L11.707 1.70721C12.098 1.31622 12.098 0.684236 11.707 0.293244C11.316 -0.097748 10.684 -0.097748 10.293 0.293244L6.00001 4.58615L1.70701 0.293244C1.31601 -0.097748 0.684006 -0.097748 0.293006 0.293244C-0.0979941 0.684236 -0.0979941 1.31622 0.293006 1.70721L4.58601 6.00012L0.293006 10.293C-0.0979941 10.684 -0.0979941 11.316 0.293006 11.707C0.488006 11.902 0.744006 12 1.00001 12C1.25601 12 1.51201 11.902 1.70701 11.707L6.00001 7.4141L10.293 11.707C10.488 11.902 10.744 12 11 12C11.256 12 11.512 11.902 11.707 11.707C12.098 11.316 12.098 10.684 11.707 10.293L7.41401 6.00012Z"}),r.appendChild(a),Re({id:Kt.HeaderTitleId,text:t.preferences.title,appendTo:c});var s=Ae({class:Kt.HeaderActionsClass,appendTo:c});return function(n,t){n.appendChild(Se({id:Kt.HeaderAcceptId,type:"button",text:t}))}(s,t.preferences.buttonAcceptText),function(n,t){n.appendChild(Se({id:Kt.HeaderDeclineId,type:"button",text:t}))}(s,t.preferences.buttonDeclineText),function(n,t){n.appendChild(Se({id:Kt.HeaderSaveId,type:"button",text:t}))}(s,t.preferences.buttonSaveText),c}function Ue(n,t){var e=Ae({class:Kt.IntroClass,appendTo:n});return function(n,t){var e=Ae({class:Kt.IntroMainClass,appendTo:n});He({text:t.preferences.introTitle,appendTo:e}),Oe({text:t.preferences.introText,appendTo:e})}(e,t),t.preferences.bulletPoints.enabled&&function(n,t){var e=Ae({class:Kt.IntroExplainWrapperClass,appendTo:n}),o=Ae({class:Kt.IntroExplainAcceptClass,appendTo:e});He({text:t.preferences.bulletPoints.title||"",appendTo:o});var r=[];t.preferences.bulletPoints.firstText&&r.push(t.preferences.bulletPoints.firstText);t.preferences.bulletPoints.secondText&&r.push(t.preferences.bulletPoints.secondText);t.preferences.bulletPoints.thirdText&&r.push(t.preferences.bulletPoints.thirdText);(function(n){var t=Ee(document.createElement("ul"),n);n.lis&&n.lis.forEach(function(n){var e=document.createElement("li");e.textContent=n,t.appendChild(e)})})({lis:r,appendTo:o})}(e,t),e}function $e(n){var e=n.themeColours,o=n.purpose,r=n.ids,i=n.parent,a=r.input===Kt.OptionEssentialInputId,c=Me({dataIconType:"unchecked",width:"24",height:"24",path:"M5 2c-1.654 0-3 1.346-3 3v14c0 1.654 1.346 3 3 3h14c1.654 0 3-1.346 3-3v-14c0-1.654-1.346-3-3-3h-14zm19 3v14c0 2.761-2.238 5-5 5h-14c-2.762 0-5-2.239-5-5v-14c0-2.761 2.238-5 5-5h14c2.762 0 5 2.239 5 5z",colour:e.iconColor,focusable:!0}),s=function(n){return Me({dataIconType:"checked",width:"24",height:"24",path:"M19 0h-14c-2.762 0-5 2.239-5 5v14c0 2.761 2.238 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-8.959 17l-4.5-4.319 1.395-1.435 3.08 2.937 7.021-7.183 1.422 1.409-8.418 8.591z",colour:n,focusable:!0})}(e.iconColor),l=Ae({class:Kt.OptionClass,id:r.section}),d=function(n){var t=Ee(document.createElement("label"),n);return t.setAttribute("for",n.for),(null==n?void 0:n.text)&&(t.textContent=n.text),t}({appendTo:l,for:r.input,text:o.description});!function(n){var t=Ee(document.createElement("input"),n);t.setAttribute("type",n.type),n.checked&&t.setAttribute("checked","true"),n.disabled&&t.setAttribute("disabled","".concat(n.disabled)),(null==n?void 0:n.onChange)&&t.addEventListener("change",n.onChange),n.tabindex&&t.setAttribute("tabindex","".concat(n.tabindex)),!0===n.ariaReadonly&&t.setAttribute("aria-readonly","".concat(n.ariaReadonly))}(t({appendTo:d,id:r.input,type:"checkbox",checked:a,ariaReadonly:a},n.tabindex&&{tabindex:n.tabindex}));var u=Be({appendTo:d,ariaHidden:!0});u.appendChild(s),u.appendChild(c),Oe({appendTo:l,text:o.longDescription}),a?(s.style.display="block",c.style.display="none"):(s.style.display="none",c.style.display="block"),i.appendChild(l)}function qe(n){var t=n.bannerData,e=Zt(n.locale)?"rtl":void 0,o=Ae({id:Kt.WrapperId,class:Kt.WrapperClass,dir:e}),r=Ae({id:Kt.OverlayId,class:Kt.OverlayClass,text:" "});o.appendChild(r);var i=Le({id:Kt.DialogId,class:Kt.DialogClass,role:"dialog",ariaModal:"true",ariaLabelledby:t.preferences.title?Kt.HeaderTitleId:void 0});t.preferences.title||i.setAttribute("aria-label",t.buttonPrefsOpenText),o.appendChild(i),Fe(i,t);var a=Ae({class:Kt.DialogScrollableClass});return i.appendChild(a),Ue(a,t),function(n,t){var e=oe(t.theme.theme,t.theme.fontColor,t.theme.backgroundColor,t.theme.buttonFontColor,t.theme.buttonBackgroundColor),o=Ae({class:Kt.OptionWrapperClass});n.appendChild(o),$e({themeColours:e,ids:{section:Kt.OptionEssentialId,input:Kt.OptionEssentialInputId},purpose:{description:t.preferences.purposes.essentialName,longDescription:t.preferences.purposes.essentialDesc},parent:o,tabindex:"-1"}),$e({themeColours:e,ids:{section:Kt.OptionPreferencesId,input:Kt.OptionPreferencesInputId},purpose:{description:t.preferences.purposes.preferencesName,longDescription:t.preferences.purposes.preferencesDesc},parent:o}),$e({themeColours:e,ids:{section:Kt.OptionMarketingId,input:Kt.OptionMarketingInputId},purpose:{description:t.preferences.purposes.marketingName,longDescription:t.preferences.purposes.marketingDesc},parent:o}),$e({themeColours:e,ids:{section:Kt.OptionAnalyticsId,input:Kt.OptionAnalyticsInputId},purpose:{description:t.preferences.purposes.performanceName,longDescription:t.preferences.purposes.performanceDesc},parent:o})}(a,t),o}function We(){var n,t=document.getElementById(Yt.DialogId);if(t&&function(n){var t=document.activeElement;if(!t||t===document.body)return!0;var e=document.getElementById(Kt.WrapperId);return n.contains(t)||Boolean(null==e?void 0:e.contains(t))}(t)){null===(n=document.getElementById(Yt.FocusTargetId))||void 0===n||n.remove();var e=document.createElement("div");e.id=Yt.FocusTargetId,e.tabIndex=-1,e.style.cssText="position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;outline:none;box-shadow:none;",e.addEventListener("blur",function n(){document.hasFocus()&&(e.removeEventListener("blur",n),Promise.resolve().then(function(){return e.remove()}))}),ge(t,e),e.focus({preventScroll:!0})}}!function(n){n.H1="h1",n.H2="h2",n.H3="h3"}(be||(be={})),function(n){n.Escape="Escape",n.Tab="Tab"}(Ce||(Ce={}));var Ve=function(){function n(n){var t=n.bannerData,e=n.storefrontAccessToken,o=n.checkoutRootDomain,r=n.storefrontRootDomain,i=n.isHeadless,a=n.locale;this.bannerData=t,this.locale=a,i&&(this.storefrontAccessToken=e,this.checkoutRootDomain=o,this.storefrontRootDomain=r)}return n.show=function(){var n=document.getElementById(Kt.WrapperId);null!==n&&(n.style.display="block",document.body.style.setProperty("overflow","hidden"))},n.hide=function(n){var t=document.getElementById(Kt.WrapperId);null!==t&&(t.style.display="none",document.body.style.removeProperty("overflow")),n&&n.focus()},n.hideModalAndBanner=function(t){n.hide();var e=document.getElementById(Yt.DialogId),o=null!==e&&"none"!==e.style.display,r=!t||t===document.body||Boolean(null==e?void 0:e.contains(t));o&&r?We():t&&t.focus(),null!==e&&(e.style.display="none")},n.selectedConsent=function(){var n=document.getElementById(Kt.OptionMarketingInputId),t=document.getElementById(Kt.OptionAnalyticsInputId),e=document.getElementById(Kt.OptionPreferencesInputId),o=n.checked?"1":"0",r=t.checked?"1":"0",i=e.checked?"1":"0";return"".concat(o).concat(r).concat(i)},n.prototype.init=function(){return e(this,void 0,void 0,function(){return o(this,function(n){return this.render(),[2]})})},n.prototype.setCheckboxesToCurrentConsent=function(){var n=document.getElementById(Kt.OptionAnalyticsInputId),t=document.getElementById(Kt.OptionPreferencesInputId),e=document.getElementById(Kt.OptionMarketingInputId);this.handleOptionChange({target:n,isReadOnly:!1,sectionId:Kt.OptionAnalyticsId,checked:Nt()}),this.handleOptionChange({target:t,isReadOnly:!1,sectionId:Kt.OptionPreferencesId,checked:Mt()}),this.handleOptionChange({target:e,isReadOnly:!1,sectionId:Kt.OptionMarketingId,checked:Ht()})},n.prototype.render=function(){this.addCSS(this.bannerData),this.addHTML(this.bannerData),this.previouslyFocusedElement=document.activeElement,n.show(),this.setupCheckboxEventHandlers(),this.setupButtonEventHandlers(),this.setupKeyboardEventHandlers()},n.prototype.addCSS=function(n){var t=re({bannerData:n,locale:this.locale}),e=Ne({id:Kt.StylesContainerId,content:t});document.head.appendChild(e)},n.prototype.addHTML=function(t){var e=qe({bannerData:t,locale:this.locale});ge(document.getElementById(Yt.DialogId),e);var o=document.getElementById(Kt.DialogId);o&&(this.setCheckboxesToCurrentConsent(),o.dataset.consent=n.selectedConsent()),n.hide()},n.prototype.handleOptionChange=function(t){var e=t.target,o=t.isReadOnly,r=t.sectionId,i=t.checked;(void 0!==i&&i||o)&&(e.checked=!0);var a,c,s,l=e.checked,d=document.getElementById(r),u=d.querySelector('svg[data-icon-type="checked"]'),p=d.querySelector('svg[data-icon-type="unchecked"]');l?(u.style.display="block",p.style.display="none"):(u.style.display="none",p.style.display="block"),a=n.selectedConsent(),c=document.getElementById(Kt.DialogId),s=document.getElementById(Kt.HeaderSaveId),(null==c?void 0:c.dataset.consent)&&(null==c?void 0:c.dataset.consent)!==a?s.className="primary":s.className=""},n.prototype.setupCheckboxEventHandlers=function(){var n=this,t=document.getElementById(Kt.OptionEssentialInputId);null==t||t.addEventListener("change",function(t){n.handleOptionChange({target:t.target,isReadOnly:!0,sectionId:Kt.OptionEssentialId})});var e=document.getElementById(Kt.OptionAnalyticsInputId);null==e||e.addEventListener("change",function(t){n.handleOptionChange({target:t.target,isReadOnly:!1,sectionId:Kt.OptionAnalyticsId})});var o=document.getElementById(Kt.OptionPreferencesInputId);null==o||o.addEventListener("change",function(t){n.handleOptionChange({target:t.target,isReadOnly:!1,sectionId:Kt.OptionPreferencesId})});var r=document.getElementById(Kt.OptionMarketingInputId);null==r||r.addEventListener("change",function(t){n.handleOptionChange({target:t.target,isReadOnly:!1,sectionId:Kt.OptionMarketingId})})},n.prototype.setupButtonEventHandlers=function(){var t=this,e=document.getElementById(Kt.HeaderCloseId);null==e||e.addEventListener("click",function(){n.hide(t.previouslyFocusedElement)});var o=document.getElementById(Kt.HeaderSaveId);null==o||o.addEventListener("click",function(){if(ke())n.hideModalAndBanner(t.previouslyFocusedElement);else{var e=document.getElementById(Kt.OptionMarketingInputId),o=document.getElementById(Kt.OptionAnalyticsInputId),r=document.getElementById(Kt.OptionPreferencesInputId);ye({marketing:e.checked,analytics:o.checked,preferences:r.checked,checkoutRootDomain:t.checkoutRootDomain,storefrontRootDomain:t.storefrontRootDomain,storefrontAccessToken:t.storefrontAccessToken,callback:function(){n.hideModalAndBanner(t.previouslyFocusedElement)}})}});var r=document.getElementById(Kt.HeaderAcceptId);null==r||r.addEventListener("click",function(){ke()?n.hideModalAndBanner(t.previouslyFocusedElement):ye({marketing:!0,analytics:!0,preferences:!0,checkoutRootDomain:t.checkoutRootDomain,storefrontRootDomain:t.storefrontRootDomain,storefrontAccessToken:t.storefrontAccessToken,callback:function(){n.hideModalAndBanner(t.previouslyFocusedElement)}})});var i=document.getElementById(Kt.HeaderDeclineId);null==i||i.addEventListener("click",function(){ke()?n.hideModalAndBanner(t.previouslyFocusedElement):ye({marketing:!1,analytics:!1,preferences:!1,checkoutRootDomain:t.checkoutRootDomain,storefrontRootDomain:t.storefrontRootDomain,storefrontAccessToken:t.storefrontAccessToken,callback:function(){n.hideModalAndBanner(t.previouslyFocusedElement)}})})},n.prototype.setupKeyboardEventHandlers=function(){var n=this,t=document.getElementById(Kt.DialogId);if(t){var e=this.getFocusableElements(t);t.addEventListener("keydown",function(t){n.escToClose(t),n.tabTrap(t,e)}),this.focusFirstEle(e)}},n.prototype.getFocusableElements=function(n){return Array.from(n.querySelectorAll('button, [href], input:not([tabindex="-1"]), select, textarea, [tabindex="0"]'))},n.prototype.focusFirstEle=function(n){(null==n?void 0:n.length)&&n[0].focus()},n.prototype.escToClose=function(t){t.key===Ce.Escape&&n.hide(this.previouslyFocusedElement)},n.prototype.tabTrap=function(n,t){if((null==t?void 0:t.length)&&n.key===Ce.Tab){var e=t[0],o=t[t.length-1];e&&o&&(n.shiftKey&&document.activeElement===e?(n.preventDefault(),o.focus()):n.shiftKey||document.activeElement!==o||(n.preventDefault(),e.focus()))}},n}(),ze=function(){function n(n){var t=n.isHeadless,e=n.storefrontAccessToken,o=n.checkoutRootDomain,r=n.storefrontRootDomain,i=n.locale,a=n.country;this.locale=i,this.country=a,this.storefrontAccessToken=e,this.isHeadless=null!=t?t:Boolean(e),this.isHeadless&&(this.checkoutRootDomain=o,this.storefrontRootDomain=r),this.preferencesModal=void 0}return n.show=function(){var n=document.getElementById(Yt.DialogId);if(null!==n){n.style.display="block";var t=function(n){if("Tab"===n.code){n.preventDefault();var e=document.getElementById(Yt.ButtonManagePrefsId);null==e||e.focus()}window.removeEventListener("keydown",t)};window.addEventListener("keydown",t)}},n.hide=function(){var n=document.getElementById(Yt.DialogId);null!==n&&(n.style.display="none")},n.dismiss=function(){We(),n.hide()},n.prototype.init=function(){return e(this,arguments,void 0,function(e){var r,i,a;return void 0===e&&(e=!1),o(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),r=Boolean(this.isHeadless),[4,Te.getServerData(this.checkoutRootDomain,this.storefrontAccessToken,this.locale,this.country,r)];case 1:return(i=o.sent())&&Object.keys(i).length?[4,"loading"!==document.readyState?Promise.resolve():new Promise(function(n){document.addEventListener("DOMContentLoaded",n)})]:(console.warn("banner not rendered due to lack of saved data"),[2,Promise.resolve(!1)]);case 2:return o.sent(),this.removeExistingElements(),this.render(t({},i)),e&&(this.preferencesModal=new Ve({bannerData:i,storefrontAccessToken:this.storefrontAccessToken,checkoutRootDomain:this.checkoutRootDomain,storefrontRootDomain:this.storefrontRootDomain,isHeadless:this.isHeadless,locale:this.locale}),this.preferencesModal.init(),n.hide()),[2,Promise.resolve(!0)];case 3:return a=o.sent(),this.removeExistingElements(),[2,Promise.reject(a)];case 4:return[2]}})})},n.prototype.render=function(t){var e,o,r=t.enabled,i=window.Shopify.country,a=Ie()&&this.isCountryInRegionVisibility(i,t),c=ke()||a||r;c&&!document.getElementById(Yt.DialogId)&&(this.addCSS(t),this.addBannerHTML(t)),c&&_e()&&(n.show(),Ie()||ke()||(e={isHeadless:this.isHeadless},void 0!==(o=(void 0===e?{}:e).isHeadless)&&o||he().increment("privacy_banner_render_total")))},n.prototype.isCountryInRegionVisibility=function(n,t){var e;return null===(e=t.regionVisibility)||void 0===e?void 0:e.includes(n)},n.prototype.addCSS=function(n){var t=Ne({id:Yt.StylesContainerId,content:ie({bannerData:n,locale:this.locale})});document.head.appendChild(t)},n.prototype.addBannerHTML=function(n){var t=je({bannerData:n,locale:this.locale}),e=document.getElementsByTagName("body")[0];e.insertBefore(t,e.firstChild),this.addEventListeners(n)},n.prototype.removeExistingElements=function(){var n,t,e,o,r,i=document.getElementById(Yt.DialogId),a=document.getElementById(Yt.StylesContainerId),c=document.getElementById(Kt.WrapperId),s=document.getElementById(Kt.StylesContainerId);null===(n=null==i?void 0:i.parentNode)||void 0===n||n.removeChild(i),null===(t=null==a?void 0:a.parentNode)||void 0===t||t.removeChild(a),null===(e=null==c?void 0:c.parentNode)||void 0===e||e.removeChild(c),null===(o=null==s?void 0:s.parentNode)||void 0===o||o.removeChild(s),null===(r=document.getElementById(Yt.FocusTargetId))||void 0===r||r.remove()},n.prototype.addEventListeners=function(n){var t=this;this.addEssentialEventListeners();var e=document.getElementById(Yt.ButtonManagePrefsId);null==e||e.addEventListener("click",function(e){e.preventDefault(),t.preferencesModal=new Ve({bannerData:n,storefrontAccessToken:t.storefrontAccessToken,checkoutRootDomain:t.checkoutRootDomain,storefrontRootDomain:t.storefrontRootDomain,isHeadless:t.isHeadless,locale:t.locale}),t.preferencesModal.init()})},n.prototype.addEssentialEventListeners=function(){var t=this,e=document.getElementById(Yt.ButtonAcceptId);null==e||e.addEventListener("click",function(){ke()?n.dismiss():ye({marketing:!0,analytics:!0,preferences:!0,checkoutRootDomain:t.checkoutRootDomain,storefrontRootDomain:t.storefrontRootDomain,storefrontAccessToken:t.storefrontAccessToken,callback:n.dismiss})});var o=document.getElementById(Yt.ButtonDeclineId);null==o||o.addEventListener("click",function(){ke()?n.dismiss():ye({marketing:!1,analytics:!1,preferences:!1,checkoutRootDomain:t.checkoutRootDomain,storefrontRootDomain:t.storefrontRootDomain,storefrontAccessToken:t.storefrontAccessToken,callback:n.dismiss})})},n}(),Je="#shopifyReshowConsentBanner";function Ge(n,t){var e,o=n.target;(null==(e=o)?void 0:e.closest('a[href$="'.concat(Je,'"]')))&&t(n)}var Ye=!1;function Ke(){return e(this,arguments,void 0,function(n){var t,r,i,a,c,s,l,d,u,p,f,h,m,g,y=this,v=void 0===n?{}:n,b=v.storefrontAccessToken,C=v.checkoutRootDomain,x=v.storefrontRootDomain,w=v.showPreferences,_=void 0!==w&&w,k=v.locale,I=v.country,D=v.forceShow,T=void 0!==D&&D;return o(this,function(n){try{ve()}catch(n){}return t=ln(),r=Boolean(b),i=null!==(p=t.isHeadless)&&void 0!==p?p:r,a=r&&void 0===t.isHeadless&&!0!==t.asyncConsent,b||(b=t.storefrontAccessToken),C||(C=null!==(f=t.consentDomain)&&void 0!==f?f:window.location.hostname),x||(x=null!==(h=t.consentDomain)&&void 0!==h?h:window.location.hostname),k||(k=null===(m=null===window||void 0===window?void 0:window.Shopify)||void 0===m?void 0:m.locale),I||(I=null===(g=null===window||void 0===window?void 0:window.Shopify)||void 0===g?void 0:g.country),c=function(){return e(y,void 0,void 0,function(){var n;return o(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),!(De()||_e()||_||T)||function(){var n;return(null===(n=null===window||void 0===window?void 0:window.Shopify)||void 0===n?void 0:n.designMode)||!1}()?[3,2]:[4,new ze({isHeadless:i,storefrontAccessToken:b,checkoutRootDomain:C,storefrontRootDomain:x,locale:k,country:I}).init(_)];case 1:t.sent()&&(T&&ze.show(),a&&bn()),t.label=2;case 2:return[3,4];case 3:return n=t.sent(),console.error("Error initializing banner",n),[3,4];case 4:return[2]}})})},a?(t.injectedConsent?c():(s=ft(),ye({marketing:(l={yes:!0,no:!1})[s.marketing],analytics:l[s.analytics],preferences:l[s.preferences],sale_of_data:l[s.sale_of_data],storefrontAccessToken:b,checkoutRootDomain:C,storefrontRootDomain:x,callback:c})),[2]):(d=$t(),u=function(){return i&&(Ye||(Ye=!0,bn())),c()},d?d.then(u,function(n){return console.error("Unable to collect initial consent",n),c()}):u(),[2])})})}var Xe=function(n){return"function"==typeof(null==n?void 0:n.setTrackingConsent)&&"function"==typeof(null==n?void 0:n.currentVisitorConsent)&&"function"==typeof(null==n?void 0:n.shouldShowBanner)};function Qe(){window.Shopify||(window.Shopify={});var n=window.Shopify,t=n.customerPrivacy,e=n.trackingConsent;Xe(t)&&Xe(e)||(window.Shopify.customerPrivacy=window.Shopify.trackingConsent=jt())}function Ze(){return e(this,arguments,void 0,function(n){var e,r;return void 0===n&&(n={}),o(this,function(o){switch(o.label){case 0:return e=ln(),r=Boolean(n.storefrontAccessToken),(e.isHeadless||r)&&Qe(),[4,Ke(t(t({},n),{showPreferences:!0}))];case 1:return o.sent(),[2]}})})}function no(){var n,t;if("0"!==me("pb")){var e=ln(),o=Boolean(window.Shopify),r=null!==(n=e.isHeadless)&&void 0!==n?n:!o,i=null!==(t=e.isHeadless)&&void 0!==t?t:o;r&&Qe(),i&&Ke();var a=function(n){n.preventDefault(),Ze()};document.addEventListener("click",function(n){Ge(n,a)})}}return no(),n.boot=no,n.loadBanner=Ke,n.showBanner=function(){return e(this,arguments,void 0,function(n){var e,r;return void 0===n&&(n={}),o(this,function(o){switch(o.label){case 0:return e=ln(),r=Boolean(n.storefrontAccessToken),(e.isHeadless||r)&&Qe(),[4,Ke(t(t({},n),{showPreferences:!1,forceShow:!0}))];case 1:return o.sent(),[2]}})})},n.showPreferences=Ze,n}({});