!function(){"use strict";class t{t;o=0;i=[];u(t){if(t.hadRecentInput)return;const e=this.i[0],n=this.i.at(-1);this.o&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(this.o+=t.value,this.i.push(t)):(this.o=t.value,this.i=[t]),this.t?.(t)}}const e=()=>{const t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart{if("loading"===document.readyState)return"loading";{const n=e();if(n){if(t{const e=t.nodeName;return 1===t.nodeType?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},i=t=>{let e="";try{for(;9!==t?.nodeType;){const n=t,i=n.id?"#"+n.id:[r(n),...Array.from(n.classList).sort()].join(".");if(e.length+i.length>99)return e||i;if(e=e?i+">"+e:i,n.id)break;t=n.parentNode}}catch{}return e},o=new WeakMap;function a(t,e){return o.get(t)||o.set(t,new e),o.get(t)}let s=-1;const c=()=>s,u=t=>{addEventListener("pageshow",e=>{e.persisted&&(s=e.timeStamp,t(e))},!0)},l=(t,e,n,r)=>{let i,o;return a=>{e.value>=0&&(a||r)&&(o=e.value-(i??0),(o||void 0===i)&&(i=e.value,e.delta=o,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e)))}},d=t=>{requestAnimationFrame(()=>requestAnimationFrame(()=>t()))},h=()=>{const t=e();return t?.activationStart??0},f=(t,n=-1)=>{const r=e();let i="navigate";return c()>=0?i="back-forward-cache":r&&(document.prerendering||h()>0?i="prerender":document.wasDiscarded?i="restore":r.type&&(i=r.type.replace(/_/g,"-"))),{name:t,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},m=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{Promise.resolve().then(()=>{e(t.getEntries())})});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},p=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let g=-1;const v=new Set,y=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,w=t=>{if("hidden"===document.visibilityState){if("visibilitychange"===t.type)for(const t of v)t();isFinite(g)||(g="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",w,!0))}},C=()=>{if(g<0){const t=h(),e=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0]?.startTime;g=e??y(),addEventListener("visibilitychange",w,!0),addEventListener("prerenderingchange",w,!0),u(()=>{setTimeout(()=>{g=y()})})}return{get firstHiddenTime(){return g},onHidden(t){v.add(t)}}},S=t=>{document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},L=[1800,3e3],b=(t,e={})=>{S(()=>{const n=C();let r,i=f("FCP");const o=m("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime{i=f("FCP"),r=l(t,i,L,e.reportAllChanges),d(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},x=[.1,.25],z=t=>t.find(t=>1===t.node?.nodeType)||t[0];let B=0,M=1/0,D=0;const T=t=>{for(const e of t)e.interactionId&&(M=Math.min(M,e.interactionId),D=Math.max(D,e.interactionId),B=D?(D-M)/7+1:0)};let _;const A=()=>_?B:performance.interactionCount??0;let P=0;class I{l=[];h=new Map;m;p;v(){P=A(),this.l.length=0,this.h.clear()}M(){const t=Math.min(this.l.length-1,Math.floor((A()-P)/50));return this.l[t]}u(t){if(this.m?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const e=this.l.at(-1);let n=this.h.get(t.interactionId);if(n||this.l.length<10||t.duration>e.T){if(n?t.duration>n.T?(n.entries=[t],n.T=t.duration):t.duration===n.T&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],T:t.duration},this.h.set(n.id,n),this.l.push(n)),this.l.sort((t,e)=>e.T-t.T),this.l.length>10){const t=this.l.splice(10);for(const e of t)this.h.delete(e.id)}this.p?.(n)}}}const N=t=>{const e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=p(t),addEventListener("visibilitychange",t,{once:!0,capture:!0}),e(()=>{t(),removeEventListener("visibilitychange",t,{capture:!0})}))},q=[200,500];class U{m;u(t){this.m?.(t)}}const k=[2500,4e3],j=[800,1800],E=t=>{document.prerendering?S(()=>E(t)):"complete"!==document.readyState?addEventListener("load",()=>E(t),!0):setTimeout(t)},H="",K="1",O="0",W="p",R="a",Z="m",F="t",J="m",X="a",V="p",Y="s",G=()=>"undefined"==typeof window;function $(t,...e){if(0===e.length)return t;const n=e[0];return t[n]||(t[n]={}),$(t[n],...e.slice(1))}function Q(t){try{return decodeURIComponent(t)}catch(t){return""}}function tt(){if(!G())return window}const et=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/;function nt(t,e){if("string"!=typeof t)return;if(!function(t){return!!t&&et.test(t.trim().toLowerCase())}(t))return;const n=t.trim();if("00000000-0000-0000-0000-000000000000"===n)return;if("00000000-0000-0000-5000-000000000000"===n)return;return Number.isFinite(NaN)&&Date.now()>NaN?void 0:n}const rt="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";function it(t){return rt.replace(/[xy]/g,e=>{const n=t();return("x"===e?n:3&n|8).toString(16)})}function ot(){const t="undefined"!=typeof crypto?crypto:void 0;if("function"==typeof(null==t?void 0:t.randomUUID))return t.randomUUID();if("function"==typeof(null==t?void 0:t.getRandomValues)){const e=t.getRandomValues(new Uint8Array(36));let n=0;return it(()=>e[n++]%16)}return it(()=>16*Math.random()|0)}function at(t){const e=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let n=0;nfunction(t=ct){var e,n;const r=null===(e=performance)||void 0===e||null===(n=e.getEntriesByType)||void 0===n?void 0:n.call(e,"navigation");if(!r)return;const i=r.map(e=>function(t,e=ct){var n,r;if(!t)return;return null===(n=t.serverTiming)||void 0===n||null===(r=n.find(t=>t.name==e))||void 0===r?void 0:r.description}(e,t)),o=i.find(t=>t);o&&t===ct&&function(t){if(!G()){try{t=decodeURIComponent(t)}catch{}try{sessionStorage.setItem(ut,t)}catch{}}}(o);return o}(t)),!e){if(t!==ct)return;let e;try{e=sessionStorage.getItem(ut)}catch{}return e||void 0}try{e=decodeURIComponent(e)}catch{}return e}function dt(){if(!G()){var t,e;const n=(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.injectedConsent)||st().injectedConsent;return n?Q(n):void 0}}function ht(){var t;return null===(t=function(){var t;if(!G())return null===(t=window.Shopify)||void 0===t?void 0:t.customerPrivacy}())||void 0===t?void 0:t.consentStatus}function ft(){let t;if(t=G()?dt():function(){var t,e;const n=null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.cachedConsent;return n?Q(n):void 0}()||dt()||new URLSearchParams(window.location.search).get("_cs")||void 0||at("_tracking_consent")||lt(),void 0!==t)return function(t){if("%"==t.slice(0,1))try{t=decodeURIComponent(t)}catch{}const e=t.slice(0,1);if("{"==e)return function(t){var e;let n;try{n=JSON.parse(t)}catch{return}if("2.1"!==n.v)return;if(null===(e=n.con)||void 0===e||!e.CMP)return;return n}(t);if("3"==e)return function(t){const{base:e}=function(t){const e=t.replace(/#+$/,""),n=e.lastIndexOf("#");if(n<0)return{base:e};const r=e.slice(0,n),i=e.slice(n+1);return i.includes("}")?{base:e}:{base:r,comment:i}}(t);t=e;const n=t.slice(1).split("_"),[r,i,o,a,s]=n;let c,u;try{c=n[5]?JSON.parse(n.slice(5).join("_")):void 0}catch{}if(s){const t=s.replace(/\*/g,"/").replace(/-/g,"+"),e=atob(t);let n="";for(let t=0;tt.slice(0,e)+"-"+t.slice(e),n)}function l(t){const e=r.split(".")[0];return e.includes(t.toLowerCase())?O:e.includes(t.toUpperCase())?K:H}function d(t){return r.includes(t.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[X]:l(X),[V]:l(V),[J]:l(J),[Y]:l(Y)}},region:i||"",cus:c,purposes:{[R]:d(R),[W]:d(W),[Z]:d(Z),[F]:d(F)},sale_of_data_region:"t"==a,display_banner:"t"==o,consent_id:u}}(t);return}(t)}function mt(t){const e=function(){try{let t=ft();if(!t)return;return t}catch{return}}();if(!e||!e.purposes)return!0;const n=e.purposes[t];return"boolean"!=typeof n||n}function pt(){return mt(R)}function gt(){return mt(Z)}function vt(t,e){const n=tt();if(!n)return;const r=$(n,"Shopify","customerPrivacy","cachedToken");if(e){const n="_shopify_s"===t?18e5:31536e6;r[t]=e,r[t+"_expires_at"]=Date.now()+n}else delete r[t],delete r[t+"_expires_at"]}class yt{constructor(){if(this.endpoint="https://otlp-http-production.shopifysvc.com/v1/metrics",this.serviceName="consent-tracking-api",this.scopeName="consent-tracking-api-opentelemetry",yt.instance)return yt.instance;yt.instance=this}increment(t,e={},n=.01){if(!G()&&t)try{if(!Number.isFinite(n)||n<=0||n>1)return;if(!pt())return;if(Math.random()>=n)return;const r=this.buildMetricBody(t,e);if(window.location.host.endsWith("spin.dev"))return void console.log("OpenTelemetry metric from consent API:",r);if("function"!=typeof fetch)return;return fetch(this.endpoint,{headers:{accept:"*/*","content-type":"application/json; charset=utf-8"},body:JSON.stringify(r),method:"POST",mode:"cors",credentials:"omit"}).catch(()=>{})}catch(t){}}buildMetricBody(t,e){const n=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:t,unit:"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[{asDouble:1,startTimeUnixNano:n,timeUnixNano:n,attributes:wt(e)}]}}]}]}]}}}function wt(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return null==r||e.push({key:n,value:Ct(r)}),e},[])}function Ct(t){return"string"==typeof t?{stringValue:t}:"boolean"==typeof t?{boolValue:t}:isFinite(t)?Math.floor(t)===t?{intValue:t}:{doubleValue:t}:{stringValue:String(t)}}let St;function Lt(){var t;return null!==(t=St)&&void 0!==t?t:St=new yt}yt.instance=void 0;function bt(t){if(!G())try{var e,n;return null===(e=document.querySelector(`meta[name="${t}"]`))||void 0===e||null===(n=e.getAttribute("content"))||void 0===n?void 0:n.trim()}catch{return}}function xt(t){const e=bt(t);if(e)try{const t=JSON.parse(e);return"string"==typeof t?t.trim():void 0}catch{return}}function zt(t){return void 0!==t&&Date.now()>t}function Bt(t,e){const n=nt(xt(e));if(n&&!zt(function(t){const e=xt(`${t}Expiration`);if(!e)return;const n=Number(e);return Number.isFinite(n)?n:void 0}(e)))return n;const r=nt(bt(t));return r&&!zt(function(t){if(!G())try{var e,n;const r=null===(e=document.querySelector(`meta[name="${t}"]`))||void 0===e||null===(n=e.getAttribute("data-expiration"))||void 0===n?void 0:n.trim();if(!r)return;const i=Number(r);return Number.isFinite(i)?i:void 0}catch{return}}(t))?r:void 0}function Mt(t){return"_shopify_y"===t?Bt("shopify-y","serialized-shopifyY"):"_shopify_s"===t?Bt("shopify-s","serialized-shopifyS"):void 0}function Dt(t,e){try{Lt().increment("consent_tracking_api_tracking_token_read",{token:t,source:e})}catch{}}function Tt(t){try{var e,n,r,i;return null===(e=performance)||void 0===e||null===(n=e.getEntriesByType("navigation")[0])||void 0===n||null===(r=n.serverTiming)||void 0===r||null===(i=r.find(e=>e.name==t))||void 0===i?void 0:i.description}catch{return}}function _t(){const t=document.querySelector('[data-serialized-id="app-base-path"]');if(!G()&&Boolean(null===(n=tt())||void 0===n?void 0:n.__CUSTOMER_ACCOUNT__)||t){var e;const n=document.querySelector('[data-serialized-id="preview-mode-data"]');if("/"!==JSON.parse((null==t?void 0:t.textContent)||"null")||!1!==(null===(e=JSON.parse((null==n?void 0:n.textContent)||"null"))||void 0===e?void 0:e.inPreviewMode))return;return new URL("/customer/api/unstable/graphql",window.location.origin).href}var n;const{protocol:r,host:i}=function(){const t=st().consentDomain||window.location.host;return{protocol:/^(localhost|127\.0\.0\.1)(:|$)/.test(t)?"http:":"https:",host:t}}();return`${r}//${i}/api/unstable/graphql.json`}async function At(t){try{var e;if(Math.random()>.01)return;let n=null;if(t)try{const e=await t.json();n=Array.isArray(null==e?void 0:e.errors)&&e.errors.length>0}catch{}Lt().increment("consent_tracking_api_persist",{ok:String(!(null==t||!t.ok)),status:String(null!==(e=null==t?void 0:t.status)&&void 0!==e?e:"none"),graphql_errors:String(n)},1)}catch{}}function Pt(t,e,n){if(!0===st().asyncConsent&&"loaded"!==ht())return;Lt().increment("consent_tracking_api_tracking_token_missing");const r=e?void 0:ot(),i=n?void 0:ot();return r&&vt("_shopify_y",r),i&&vt("_shopify_s",i),function(t,e){if(!G())try{const n=nt(t),r=nt(e);if(!n&&!r)return;const i=_t();if(!i)return;const o=new URLSearchParams,a={"content-type":"application/json"};n&&(o.set("_y",n),a["X-Shopify-UniqueToken"]=n),r&&(o.set("_s",r),a["X-Shopify-VisitToken"]=r);const s=`${i}?${o.toString()}`;let c;try{c=fetch(s,{headers:a,body:JSON.stringify({query:"query { consentManagement { cookies(visitorConsent:{}) { cookieDomain } } }",variables:{}}),method:"POST",mode:"cors",credentials:"include"})}catch(t){c=Promise.reject(t)}c.then(t=>At(t),()=>At(void 0))}catch{}}(r,i),"_shopify_y"===t?r:i}function It(t){if(!pt()&&!gt())return;const e=function(t){var e,n,r,i,o,a;const s=tt();if(!s)return;const c=null===(e=s.Shopify)||void 0===e||null===(n=e.customerPrivacy)||void 0===n||null===(r=n.cachedToken)||void 0===r?void 0:r[t],u=null===(i=s.Shopify)||void 0===i||null===(o=i.customerPrivacy)||void 0===o||null===(a=o.cachedToken)||void 0===a?void 0:a[t+"_expires_at"];return!c||!u||u<(new Date).getTime()?void 0:nt(c)}(t);if(e)return Dt(t,"window_cache"),e;if(function(){const t=tt();if(null==t||!t.ShopPay)return!1;try{const e=Object(t.ShopPay);return Reflect.has(e,"trackingUnique")||Reflect.has(e,"trackingVisit")}catch{return!1}}()){const e=function(t){const e=tt();if(!e||!e.ShopPay)return;const n={_shopify_y:"trackingUnique",_shopify_s:"trackingVisit"}[t];if(!n)return;return nt(e.ShopPay[n])}(t);return Dt(t,"shop_pay"),e}const n=Mt(t);if(n)return Dt(t,"meta"),n;const r=function(t){const e=t.replace("_shopify",""),n=Tt(e),r=Number(Tt(`${e}e`));if(!r||Date.now()/1e3e.trim().startsWith(`${t}=`)))||void 0===r||null===(i=r.split("=")[1])||void 0===i?void 0:i.trim();return nt(o)}catch{return}}(t);if(i)return Dt(t,"cookie"),i;Dt(t,"missing")}function Nt(){return It("_shopify_y")}function qt(){return It("_shopify_s")}function Ut(t){if(G())throw new Error("Token generateFallback is not supported in Node.js environments, just browsers.");const e=It(t);if(e)return e;if((pt()||gt())&&!function(){const t=tt();return!(!t||!Reflect.has(t,"ShopPay"))}())try{return Pt(t,Nt(),qt())}catch{return}}function kt(){return pt()}function jt(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var Et=0;function Ht(t){return"__private_"+Et+++"_"+t}function Kt(t){return Object.entries(t).map(([t,e])=>({key:t,value:{stringValue:String(e)}}))}function Ot(t){if(Array.isArray(t))return{arrayValue:{values:t.map(t=>Ot(t))}};switch(typeof t){case"boolean":return{boolValue:Boolean(t)};case"number":return{doubleValue:Number(t)};default:return{stringValue:String(t)}}}const Wt=function(t,e,n){const r=[0];for(let i=0;i{t.attributes={...jt(this,Zt)[Zt],...t.attributes}});const t=jt(this,Ft)[Ft];jt(this,Ft)[Ft]=[],await this.exportByKeepalive(t,(t,e)=>jt(this,Rt)[Rt].exportMetrics(this.aggregateMetrics(t),e))}async exportLogs(){const t=jt(this,Jt)[Jt];jt(this,Jt)[Jt]=[],await this.exportByKeepalive(t,(t,e)=>jt(this,Rt)[Rt].exportLogs(this.formatLogs(t),e))}aggregateMetrics(t){const e={};return t.forEach(t=>{switch(t.type){case"histogram":!function(t,e){var n;const{name:r,value:i,unit:o,timeUnixNano:a,attributes:s}=e,c=null!==(n=e.bounds)&&void 0!==n?n:Wt,u=new Array(c.length+1).fill(0);t[r]||={name:r,unit:o||"1",histogram:{aggregationTemporality:1,dataPoints:[]}};for(let t=0;t0?d:0,bucketCounts:r>0?[1]:[]};t[n].exponentialHistogram.dataPoints.push({attributes:Kt(null!=a?a:{}),startTimeUnixNano:o,timeUnixNano:o,count:1,sum:c,scale:u,zeroCount:h,positive:m,negative:f,min:c,max:c,zeroThreshold:0})}(e,t);break;case"counter":!function(t,e){const{name:n,value:r,unit:i,timeUnixNano:o,attributes:a}=e;t[n]||={name:n,unit:i||"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}},t[n].sum.dataPoints.push({startTimeUnixNano:o,timeUnixNano:o,asDouble:r,attributes:Kt(null!=a?a:{})})}(e,t);break;case"gauge":!function(t,e){const{name:n,value:r,unit:i,timeUnixNano:o,attributes:a}=e;t[n]||={name:n,unit:i||"1",gauge:{dataPoints:[]}},t[n].gauge.dataPoints.push({startTimeUnixNano:o,timeUnixNano:o,asDouble:r,attributes:Kt(null!=a?a:{})})}(e,t)}}),Object.values(e)}async exportByKeepalive(t,e){if(0===t.length)return;const n=[],r=[];t.forEach(t=>{var e;null===(e=t.requiresKeepalive)||void 0===e||e?n.push(t):r.push(t)});const i=[n.length>0?e(n,{keepalive:!0}):void 0,r.length>0?e(r,{keepalive:!1}):void 0].filter(t=>void 0!==t);await Promise.all(i)}formatLogs(t){return t.map(t=>{const e={timeUnixNano:t.timeUnixNano,observedTimeUnixNano:t.timeUnixNano,attributes:(n={...jt(this,Zt)[Zt],...t.attributes},Object.entries(n).map(([t,e])=>({key:t,value:Ot(e)})))};var n;return t.body&&(e.body={stringValue:t.body}),e})}}var Vt=Ht("url"),Yt=Ht("serviceName"),Gt=Ht("logger"),$t=Ht("fetchFn"),Qt=Ht("maxPayloadSizeBytes");class te{constructor(t,e,n){var r;Object.defineProperty(this,Vt,{writable:!0,value:void 0}),Object.defineProperty(this,Yt,{writable:!0,value:void 0}),Object.defineProperty(this,Gt,{writable:!0,value:void 0}),Object.defineProperty(this,$t,{writable:!0,value:void 0}),Object.defineProperty(this,Qt,{writable:!0,value:void 0}),jt(this,Vt)[Vt]=t.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),jt(this,Yt)[Yt]=e,jt(this,Gt)[Gt]=null==n?void 0:n.logger,jt(this,$t)[$t]=null==n?void 0:n.fetchFn,jt(this,Qt)[Qt]=null!==(r=null==n?void 0:n.maxPayloadSizeBytes)&&void 0!==r?r:51200}async exportMetrics(t,e){var n;const r=null===(n=null==e?void 0:e.keepalive)||void 0===n||n;await this.exportBatches("/v1/metrics",[...t],t=>({resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:jt(this,Yt)[Yt]}}]},scopeMetrics:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},metrics:t}]}]}),r)}async exportLogs(t,e){var n;const r=null===(n=null==e?void 0:e.keepalive)||void 0===n||n;await this.exportBatches("/v1/logs",[...t],t=>({resourceLogs:[{resource:{attributes:[{key:"service.name",value:{stringValue:jt(this,Yt)[Yt]}}]},scopeLogs:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},logRecords:t}]}]}),r)}async exportTo(t,e,n){var r;const i=JSON.stringify(t),o=(new TextEncoder).encode(i).length;if(o>jt(this,Qt)[Qt])throw new ne(`Payload size ${o} exceeds ${jt(this,Qt)[Qt]} bytes`);const a=await this.exporterFetch()(`${jt(this,Vt)[Vt]}${e}`,{method:"POST",keepalive:n,headers:{"Content-Type":"application/json"},body:i});if(null===(r=jt(this,Gt)[Gt])||void 0===r||r.log({status:a.status}),!a.ok){if(400===a.status){const t=await a.text();throw new ee(`Invalid OpenTelemetry Data: ${t}`)}if(429===a.status||503===a.status){const e=await a.text(),n=a.headers.get("Retry-After"),r=n?{seconds:Number(n)}:void 0;throw new ee("Server did not accept data",{errorData:e,retryAfter:r,body:t})}if(401===a.status||403===a.status){const e=await a.text();throw new re(`Authentication failed: ${a.status} ${401===a.status?"Unauthorized":"Forbidden"}`,{errorData:e,body:t})}throw new ee(`Server responded with ${a.status}`)}}exporterFetch(){return jt(this,$t)[$t]||fetch}async exportBatches(t,e,n,r){let i=e.length;for(;e.length>0;)try{const o=e.slice(0,i);await this.exportTo(n(o),t,r),e.splice(0,i)}catch(t){if(!(t instanceof ne&&i>1))throw t;i=Math.ceil(i/2)}}}class ee extends Error{constructor(t,e){super(t),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=e}}class ne extends Error{constructor(...t){super(...t),this.name="PayloadTooLargeError"}}class re extends Error{constructor(t,e){super(t),this.name="AuthenticationFailedError",this.metadata=void 0,this.name="AuthenticationFailedError",this.metadata=e}}var ie="2.7.0";function oe(t,e){const n=ae();return oe=function(e,r){let i=n[e-=219];if(void 0===oe.bzjTYr){oe.QJEYhd=function(t){let e="",n="";for(let n,r,i=0,o=0;r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?e+=String.fromCharCode(255&n>>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;t>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;t0&&n++,(t[se(326)][se(306)]&&t[se(326)][se(306)][se(341)]>0||typeof e===se(299)&&e[se(339)](se(344)))&&n++,function(t){const e=t[se(317)][se(323)]||t[se(324)][se(338)][se(318)],n=t[se(317)][se(298)]||t[se(324)][se(338)][se(333)];if(!e||!n||e<=2||n<=2)return!1;const r=e/n;return r>=.2&&r<=5}(t)&&n++,typeof t[se(317)][se(345)]!==se(342)&&n++;try{const t=(new Date)[se(327)]();t>-840&&t<840&&n++}catch{return n>=3?1:0}return n>=3?1:0}catch{return 0}}function le(t){const e=function(t){try{return t[se(326)][se(331)]?1:0}catch{return 0}}(t),[n,r]=function(t){try{const e=t[se(326)][se(310)];try{return[e,String(e)]}catch{return[e,void 0]}}catch{return[void 0,void 0]}}(t),i=function(t){return void 0!==t&&/bot|crawler|spider|scraper/i[se(315)](t)?0:1}(r),o=function(t){try{const e=t[se(324)][se(334)](se(300));e[se(301)]=200,e[se(314)]=50;const n=e[se(336)]("2d");if(null===n)return 0;const r=n[se(321)](0,0,200,0);r[se(322)](0,se(302)),r[se(322)](1,se(340)),n[se(312)]=r,n[se(303)](0,0,200,50),n[se(312)]=se(311),n[se(313)]=se(335),n[se(337)](se(320),33,30);const i=e[se(332)]();return i&&i[se(341)]>50?1:0}catch{return 0}}(t);return{wd:e,ua:i,cv:o,br:ue(t,n)}}function de(t,e){var n=he();return de=function(e,r){var i=n[e-=363];if(void 0===de.qwBtGG){de.ChSNVG=function(t){for(var e,n,r="",i="",o=0,a=0;n=t.charAt(a++);~n&&(e=o%4?64*e+n:n,o++%4)?r+=String.fromCharCode(255&e>>(-2*o&6)):0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(var s=0,c=r.length;s>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;t=this[fe(246)]))try{await this[fe(266)][fe(260)]()}catch(t){this[fe(262)]&&console[fe(249)](fe(259)+t)}}[fe(248)](){this[fe(264)]&&clearTimeout(this[fe(264)]),this[fe(264)]=window[fe(257)](()=>{this[fe(261)]()[fe(253)](()=>{})},this[fe(243)])}}function ge(t,e){const n=ve();return ge=function(e,r){let i=n[e-=228];if(void 0===ge.uEwBDk){ge.xJMmUh=function(t){let e="",n="";for(let n,r,i=0,o=0;r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?e+=String.fromCharCode(255&n>>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;t>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=e.length;tt+e.s,0)/t[ze(380)],n=t[ze(484)]((t,n)=>t+(n.s-e)**2,0)/(t[ze(380)]-1),r=Math[ze(429)](n);return{speed:e,jitter:r}}function Me(t,e,n,r,i,o,a,s,c,u,l,d,h){const f=Math[ze(313)](1e3,t),m=Math[ze(313)](1e3,n),p=Math[ze(313)](1e3,o),g=Math[ze(313)](1e3,s),v=Math[ze(313)](1e3,a),y=Math[ze(313)](1e3,c),w=[];if(e[ze(380)]>=3)for(let t=1;t5e-4){e=!0;break}n=r.s}else n=r.s;return e}(w),S=function(t){if(t[ze(380)]<3)return 0;let e=0,n=0;for(let r=1;r2*Math.PI-Math.PI/12)&&e++,n++}return n>0?e/n:0}(e),{speed:L,jitter:b}=Be(w);let x=0,z=0;if(r[ze(380)]>1){const t=new Set(r[ze(383)](t=>Math[ze(427)](t.x/20)+","+Math[ze(427)](t.y/20)))[ze(454)];x=t>1?1:0,z=r[ze(484)]((t,e)=>t+e[ze(474)],0)/r[ze(380)]}const B=i[ze(484)]((t,e)=>(null===e[ze(475)]||t[ze(341)](e[ze(475)]),t),[]),{rhythmConsistency:M,jitter:D}=function(t){if(t[ze(380)]<2)return{rhythmConsistency:0,jitter:0};const e=t[ze(484)]((t,e)=>t+e,0)/t[ze(380)],n=t[ze(484)]((t,n)=>(t??0)+((n??0)-e)**2,0)/t[ze(380)],r=Math[ze(429)](n);return{rhythmConsistency:0===r?1:Math[ze(266)](0,1-r/e),jitter:r/e}}(B),T=B[ze(380)]>0?B[ze(484)]((t,e)=>t+e,0)/B[ze(380)]:0,_=[];if(u[ze(380)]>=3)for(let t=1;tu[t-1].p?ze(277):"up";_[ze(341)]({s:r,dir:i,t:u[t].t})}const{speed:A,jitter:P}=Be(_),I=function(t){if(t[ze(380)]<2)return 0;let e=0;for(let n=1;n=500&&t[r].t-n>=500&&(e++,n=t[r].t);return e}(_)),{speed:q,jitter:U}=Be(l),k=function(t){if(t[ze(380)]<2)return 0;let e=0;for(let n=1;n=500&&e++;return e}(l)),E=Math[ze(427)]((h-d)/1e3);return{ma:f,ca:m,ka:p,sa:g,ta:y,kba:v,t:Math[ze(313)](3600,E),nm:C?1:0,ms:Te(S),mj:Te(b),msp:Te(L),vc:x,cp:Te(z),rc:Te(M),kj:Te(D),ki:Te(T),ss:Te(A),sj:Te(P),ssm:Te(I),sp:N,ts:Te(q),tj:Te(U),tp:j,tsm:Te(k)}}function De(t,e){let n=0;return(...r)=>{const i=typeof performance!==ze(417)?performance[ze(467)]():Date[ze(467)]();i-n>=e&&(n=i,t(...r))}}function Te(t){return Math[ze(412)](100*t)/100}function _e(){const t=["Bg9NtwvZC2fNzq","mteXmZCZmMDIBgXjCa","mtbcCefZDgy","Bg9NrxjYB3i","CgvYAw9KAwm","CMvZB2X2zq","zg93BG","B25dyw5KAwrHDgvtAwDUywXvCgrHDgu","y2fUzgLKyxrLqwn0AxzLugfNzuzSDxnOrw5HyMXLza","Bwf4u2LSzw5Jzu1Z","C2LNBMLMAwnHBNrFCgfNzv90Aw1L","Bw91C2vTB3zL","AxngAw5PDgu","ChjVDg9JB2W","y2fUzgLKyxrLq29SBgvJDg9Y","CMvXDwvZDeLKBgvdywXSyMfJA0LK","q2fUzgLKyxrLigvUDMvSB3bLoIbUBYb1C2fIBguGDg9Rzw4GB24GDgHLihbHz2u","B3bHCxvL","B3jPz2LU","zgLY","Bg9HzfnLC3nPB25tAwDUywXZ","C3rYAw5NAwz5","B25tAwDUywXvCgrHDgu","z2v0ugfJA2vKq2fUzgLKyxrLu2LNBMfSCW","D2vIzhjPDMvY","y2HLy2S","BgfZDfbYB2nLC3nuAw1L","Dg91y2HZDgfYDa","zhvYyxrPB24","q2fUzgLKyxrLigXPzMvJEwnSzsbIzwfJB24","CMvXDwvZDenHBMrPzgf0zufJDgL2zvbHz2vgBhvZAa","ywXSB3DszxrYEq","CgvYzI1RAxqTAhvTyw4TC2LNBMfSCW","z2v0qM91BMrPBMDdBgLLBNrszwn0","Ahr0CdOVlW","C2nOzwr1BgvczwfJB25szxrYEq","qMvHy29UigzHAwXLzdOG","DgHLBG","mJiZmdu2BMLpsgz3","CgfYC2u","C2vUzejLywnVBG","z2v0sxrLBq","BwLU","rxzLBNqGAgfUzgXLCIbLCNjVCIbPBIa","CYbZAw5JzsbSyxn0ihn1y2nLC3nMDwWGC2vUza","DxbKyxrLsw50zxj2ywW","yMvHy29Urw5KCg9PBNq","D2vIzhjPDMvYx2rLDgvJDgvK","CMvJB3jKugfNzvzPzxC","BgfZDfn1y2nLC3nMDwXtzw5KvgLTzq","Bg9N","BMf0DxjHBf9JBgLJA19Wyxr0zxjUCW","z2v0rgLZDgfUy2u","q2fUzgLKyxrLigvUDMvSB3bLihjLywq","BNvTyMvY","CMvHzenHBMrPzgf0zuvUDMvSB3bL","Dg91y2HfDMvUDhm","mtfMthbpD3K","CMvWBgfJzq","BMf0AxzLlxbYzwzLCNjLza","C3rHDhvZ","D2LKDgG","C3rYAw5N","A2v5CW","DhjHBNnWB3j0","DgfYz2v0","C2v0vgLTzw91Da","CMvXDwvZDenHBMrPzgf0zuXPzMvJEwnSzuzSDxnO","q2fUzgLKyxrLihnPz25HBcbPBML0AwfSAxPHDgLVBG","BgfUz3vHz2vZ","ChvZAa","C2fMzuv2zw50sgfUzgXLCG","yNjVD3nLCKfqsq","y2fUzgLKyxrLlwfJDgL2zq","Aw5JBhvKzunHBMrPzgf0zvnPz25HBhm","y2fUzgLKyxrLu2LNBMfSC0vUywjSzwq","mJeWmZjKB2XsBha","CgvYzM9YBwfUy2u","Dg91y2HLCW","CgfNzuDLBMvYyxrPB24","C2HPzNq","z2v0ugfJA2vKu2LNBMfSCW","y2fUzgLKyxrLuxvLDwvuCMfJA2LUzW","Bg9HzgLUzW","C2nYB2XS","A2v5rxzLBNrZ","C2vZC2LVBL9KDxjHDgLVBL9YzwfZB25HyMXL","qwX0","y29UzMLN","DxbKyxrLu2vZC2LVBKrHDge","C2f2zvnLC3nPB25tAwDUywXZ","C2vZC2LVBKrHDge","C3rHCNruAw1L","z2v0qwjZB2X1DgvvCMW","yxbPuhjVEhLqCMvMAxG","CMvWB3j0rw52zwXVCgvnAxnZAw5N","Bw92zq","DhLWzq","icaOsw5PDgLHBcbZAwDUywWGC2v0kq","y2XLyxjqywnRzwrtAwDUywXZuxvLDwvK","yM90x3vZzxjFywDLBNq","Aw5JBhvKzq","qMvHy29UihnLBMqGzgvIB3vUy2vKicH0B28GC29VBIbZAw5JzsbSyxn0ihnLBMqP","y2XPy2Tby3rPDML0Eq","y3jLyxrLrw1WDhLqywDLu3rHDgu","l2fWAs9JB2XSzwn0","CMvHzhLtDgf0zq","y2fSy3vSyxrLq2XPy2TqCMvJAxnPB24","CgX1z2LUCW","BgvUz3rO","mZyXmdDVyLLqEeu","yxnZAwDU","BwfW","C3rHCNrdyw5KAwrHDgvdB2XSzwn0B3i","B250B3vJAhn0yxj0","q2fUzgLKyxrLihnPz25HBcb0CMfUC21PC3nPB24","Aw5PDa","q2fUzgLKyxrLihnPz25HBcbJBgvHBNvW","C2v0sxrLBq","D2LUzg93","Ag9ZDg5HBwu","y2XPy2TqB3nPDgLVBNm","u2vUzgLUzYbWzxjPB2rPyYbIzwfJB24Glsa","ue9tva","zMX1C2HpDgvStg9NCW","BMf0DxjHBf9TB3vZzv9Hy3rPDML0Eq","ywjZ","DgLTzvn0yw1W","yNjVD3nLCL9LBNzPCM9UBwvUDf9UB3jTywW","Dg91y2HFywn0AxzPDhK","y2HLy2TbBMrtzw5Ku2LNBMfSCW","zgvIDwC","BgfZDfnPz25HBhm","CgfNzunVDw50","zw5HyMXLqwn0AxzLugfNzuzSDxnO","Bg9JyxrPB24","y2fUzgLKyxrLu2LNBMfSCW","BMf2AwDHDg9Y","Bw9UAxrVCLrPBwvVDxrjza","BgvMDa","y2XPzw50wa","CM91BMq","C2vZC2LVBLn0B3jHz2u","CMvMzxjYzxi","y2XPy2S","yMvMB3jLlxnLBMq","Dw5KzwzPBMvK","Bw91C2vby3rPDML0Eq","Bg9NC1nHBxbSzvjHDgu","Dgv4Dc9WBgfPBJTJAgfYC2v0pvvurI04","AhjLzG","CMv0CNLdB3vUDa","A2v5yM9HCMrFywn0AxzPDhK","B25tAwDUywXvCgrHDguGy2fSBgjHy2S","CMfUzg9T","BgLMzwn5y2XLq2fUzgLKyxrLu2LNBMfSCW","zMXVB3i","ChjVy2vZC0fUzfnLBMrtAwDUywXZ","C3fYDa","Ag9ZDa","C3rHCNq","yMLUza","Dg91y2Hby3rPDML0Eq","u2HVCgLMEq","ntKYt3fltKrX","Ahr0Chm6lY9VDgXWlwH0DhaTChjVzhvJDgLVBI5ZAg9WAwz5C3zJlMnVBq","DxbKyxrLvgLTzw91DeLK","C3rHCNrZv2L0Aa","y2HHBMDL","C3rHCNrozxH0ugfNzq","zxHWB3j0v2L0AezLDgnO","BM8Ty29YCW","Axnezxn0CM95zwq","AgvPz2H0","y2fUzgLKyxrL","Bg9Nz2vY","CMvWB3j0rw52zwXVCgvfCNjVCG","y2XLyxjuAw1LB3v0","CM91DgvZ","mtmYodqWnMDHs1f0AW","zgvMyxvSDa","A2v5yM9HCMrcDxjZDhm","C2nYB2XSrxzLBNrZ","C2L6zq","w1niu10G","q2fUzgLKyxrLihnPz25HBcbLCNjVCIbPBIa","re9nq29UDgvUDeXVywrLza","twv0yq","C2nYB2XSwq","u2HPzNq","Dg9W","DgvZDa","x3nOC19ZDgf0zq","z2v0vhjHBNnTAxr0ywjSzunHBMrPzgf0zvnPz25HBhm","zMv0y2G","zw52AxjVBM1LBNrdAgvJA2vK","BM93","Ahr0Chm6lY8","y2f0y2G","ywrKrxzLBNrmAxn0zw5LCG","CMvTB3zLrxzLBNrmAxn0zw5LCG","CgfJAW","zgvZDhjVEq","ChjL","Aw50","BgfZDfvWzgf0zvrPBwu","A2v5","A2v5yM9HCMrcDxjZDefJDgL2Axr5","Dg91y2HTB3zL","mZblrwHXvM4","CMv0CNLuAw1LB3v0swq","x3nOC19Jyw5KAwrHDgvFC2fTCgXLx2j1y2TLDf92mq","q2fUzgLKyxrLigfJDgL2zs1WywDLigjLywnVBG","CMvKDwnL","yMvHy29Uu3rHDgu","y2fUy2vSswrSzunHBgXIywnR","Bw91C2vqB3nPDgLVBNm","zxzLBNriyw5KBgvYCW","y2fUzgLKyxrLu2fTCgXLuMf0zq","mtjoCgn2zvK","A2v5qwn0AxzPDhK","C3rHDgu","Dg91y2HLBMq","zw52AxjVBM1LBNq","q29UDhjVBa","z2v0u2LNBMfSCW","yxrHBJi","z2v0q2fUzgLKyxrLu2LNBMfSCW","nxzbyuHsBq","yMvHy29Uvgv4DfbSywLU","A2v5zg93BG","y2fUzgLKyxrLtwfZAW","C2nYB2XSqwn0AxzPDhK","C2nYB2XSx2fJDgL2Axr5","mZq1mtDSzurjq0S","CMvXDwvZDeLKBgvdywXSyMfJAW","BwfYA1bHy2TLzfnPz25HBhnrDwv1zwq","yMfZzvvssq","zw52zwXVCgvnAxnZAw5NuMvWB3j0zwq","ywz0zxiTzMv0y2GTC3vJy2vZCW","DxnLCKfNzw50","BgfZDfrVDwnOrxzLBNq","DxbKyxrLu2LSzw5JzunSB2nR","y2XPzw50wq","BxvSDgLWBgvFCgfNzxnFDMLZAxrLza","Aw5JBhvKzxm","nda5mZq2nKTXvNf4AG","C2HVCeLK","yMvHy29UuMv0CNLmAw1PDa","zg9JDw1LBNq","y2fUzgLKyxrLvxbKyxrLsw50zxj2ywW","zM9YrwfJAa","Bwf4","Bw9UAxrVCKjLAgf2Aw9Y","yxbWBgLJyxrPB24VANnVBG","y2HLy2TfBNzPCM9UBwvUDa","y2fUDMfZx2zPBMDLCNbYAw50x25VCM1HBa"];return(_e=function(){return t})()}function Ae(t){return{wd:t[ze(318)],ua:t[ze(371)],cf:t[ze(270)],be:t[ze(399)],nm:t[ze(396)],nc:t[ze(322)],ka:t[ze(423)],sa:t[ze(504)],ta:t[ze(400)],pt:t[ze(281)],mp:t[ze(515)],sd:t[ze(357)]}}class Pe{[ze(350)]=0;[ze(359)];[ze(492)];[ze(343)];[ze(446)];[ze(285)];[ze(509)]=!1;constructor(t,e,n=xe()){const r={shopId:0,updateInterval:5e3,debug:!1,beaconEndpoint:be(n),beaconRetryLimit:3,maxSilenceMs:18e5,exportWithFetch:!1,beaconTextPlain:!1,logsSampleRate:1,candidateSignalsEnabled:!1,candidateActivePageFlushEnabled:!0,candidateUpdateInterval:5e3,candidateSampleRate:100};this[ze(359)]={...r,...e},this[ze(343)]=n,this[ze(446)]=t,this[ze(492)]={...this[ze(375)](),lastUpdateTime:null,environmentChecked:!1,sessionData:null};const i=this[ze(291)]();this[ze(492)][ze(485)]={lastSignals:i,lastProcessTime:0,lastSuccessfulSendTime:0,retryCount:0},this[ze(285)]=(this[ze(359)][ze(346)],this[ze(359)][ze(502)],this[ze(343)][ze(263)],this[ze(343)][ze(390)],this[ze(359)][ze(264)],this[ze(359)][ze(278)],null)}[ze(387)](){this[ze(443)]||(async()=>{const t=this[ze(269)]();if(this[ze(384)](t),await Promise[ze(276)](),await this[ze(428)](0===this[ze(350)],!0),this[ze(443)])return;this[ze(359)][ze(279)]&&this[ze(285)]?.[ze(405)](),this[ze(492)][ze(409)]=this[ze(343)][ze(390)][ze(337)](()=>{this[ze(443)]||this[ze(267)]()},100);const e=()=>{if(this[ze(443)])return;const t=Date[ze(467)](),n=t-(this[ze(492)][ze(476)]||t),r=Math[ze(266)](0,this[ze(359)][ze(316)]-n),i=()=>{this[ze(443)]||(this[ze(343)][ze(390)][ze(506)]?this[ze(492)][ze(286)]=this[ze(343)][ze(390)][ze(506)](()=>{this[ze(443)]||this[ze(428)]()[ze(308)](()=>this[ze(446)][ze(395)]())[ze(308)](()=>{e()})},{timeout:2e3}):this[ze(428)]()[ze(308)](()=>this[ze(446)][ze(395)]())[ze(308)](()=>{e()}))};r>0?this[ze(492)][ze(437)]=this[ze(343)][ze(390)][ze(337)](i,r):i()};e()})()[ze(469)](t=>{this[ze(446)][ze(274)](t,ze(387))})}get[ze(443)](){return void 0===this[ze(492)][ze(485)]}[ze(473)](){const t=this[ze(492)][ze(485)];if(t){this[ze(492)][ze(485)]=void 0;try{this[ze(285)]?.[ze(473)]()}catch(t){this[ze(446)][ze(274)](t,ze(388))}void 0!==this[ze(492)][ze(409)]&&this[ze(343)][ze(390)][ze(448)](this[ze(492)][ze(409)]),void 0!==this[ze(492)][ze(437)]&&this[ze(343)][ze(390)][ze(448)](this[ze(492)][ze(437)]),void 0!==this[ze(492)][ze(286)]&&this[ze(343)][ze(390)][ze(486)]&&this[ze(343)][ze(390)][ze(486)](this[ze(492)][ze(286)]),this[ze(492)][ze(488)]&&(this[ze(343)][ze(263)][ze(471)](ze(282),this[ze(492)][ze(488)][ze(282)]),this[ze(343)][ze(263)][ze(471)](ze(415),this[ze(492)][ze(488)][ze(415)]),this[ze(343)][ze(263)][ze(471)](ze(501),this[ze(492)][ze(488)][ze(501)]),this[ze(343)][ze(263)][ze(471)](ze(355),this[ze(492)][ze(488)][ze(355)]),ze(385)in window&&this[ze(492)][ze(488)][ze(298)]&&this[ze(492)][ze(488)][ze(479)]&&this[ze(492)][ze(488)][ze(493)]&&(this[ze(343)][ze(263)][ze(471)](ze(298),this[ze(492)][ze(488)][ze(298)]),this[ze(343)][ze(263)][ze(471)](ze(479),this[ze(492)][ze(488)][ze(479)]),this[ze(343)][ze(263)][ze(471)](ze(493),this[ze(492)][ze(488)][ze(493)]))),void 0!==t[ze(481)]&&this[ze(343)][ze(390)][ze(448)](t[ze(481)])}}[ze(496)](){return this[ze(492)][ze(485)]?.[ze(403)]?Ae(this[ze(492)][ze(485)][ze(403)]):null}[ze(319)](){if(this[ze(443)])return;const t=this[ze(428)]();this[ze(440)](),t[ze(308)](()=>this[ze(446)][ze(395)]())[ze(469)](t=>this[ze(446)][ze(274)](t,ze(319)))}[ze(498)](){return this[ze(285)]?.[ze(496)]()??null}[ze(294)](){return this[ze(285)]?.[ze(352)]()??null}[ze(269)](){const t={v1:le(this[ze(343)])};return this[ze(492)][ze(494)]=t.v1,this[ze(492)][ze(466)]=!0,t[ze(445)]}[ze(342)](t,e){return n=>{try{t(n)}catch(t){this[ze(446)][ze(274)](t,ze(314)+e)}}}[ze(267)](){const t=De(this[ze(342)](t=>{this[ze(492)][ze(418)]++,this[ze(492)][ze(487)][ze(380)]>=10&&this[ze(492)][ze(487)][ze(351)](),this[ze(492)][ze(487)][ze(341)]({x:t[ze(411)],y:t[ze(514)],t:t[ze(398)]})},ze(282)),100),e=this[ze(342)](t=>{this[ze(492)][ze(374)]++,requestAnimationFrame(()=>setTimeout(()=>{this[ze(492)][ze(392)][ze(380)]>=5&&this[ze(492)][ze(392)][ze(351)](),this[ze(492)][ze(392)][ze(341)]({x:t[ze(411)],y:t[ze(514)],t:t[ze(398)],pre:this[ze(378)](t)})},0))},ze(415)),n=this[ze(342)](t=>{this[ze(492)][ze(491)]++;const e=t[ze(477)];if([ze(460),ze(495),ze(358),ze(458)][ze(259)](e))return;const n=this[ze(492)][ze(356)][this[ze(492)][ze(356)][ze(380)]-1],r=t[ze(398)],i=n?r-n.t:null;this[ze(492)][ze(356)][ze(380)]>=10&&this[ze(492)][ze(356)][ze(351)](),this[ze(492)][ze(356)][ze(341)]({_0x799ef4:e,t:r,int:i}),null!==i&&i<100?(this[ze(492)][ze(452)][ze(341)](i),this[ze(492)][ze(452)][ze(380)]>=5&&(this[ze(492)][ze(478)]++,this[ze(492)][ze(452)]=[])):this[ze(492)][ze(452)]=[]},ze(501)),r=De(this[ze(342)](t=>{this[ze(492)][ze(503)]++;const e=t[ze(398)],n=window[ze(459)];this[ze(492)][ze(453)][ze(380)]>=10&&this[ze(492)][ze(453)][ze(351)](),this[ze(492)][ze(453)][ze(341)]({p:n,t:e})},ze(355)),200),i=this[ze(342)](t=>{t[ze(349)]&&0!==t[ze(349)][ze(380)]&&(this[ze(492)][ze(433)]++,this[ze(492)][ze(327)][ze(380)]>=10&&this[ze(492)][ze(327)][ze(351)](),this[ze(492)][ze(512)]={x:t[ze(349)][0][ze(411)],y:t[ze(349)][0][ze(514)],t:t[ze(398)],typ:ze(431),s:0,d:0})},ze(298)),o=De(this[ze(342)](t=>{if(!t[ze(349)]||0===t[ze(349)][ze(380)])return;const e={x:t[ze(349)][0][ze(411)],y:t[ze(349)][0][ze(514)]};if(this[ze(492)][ze(512)]){const n=this[ze(323)](this[ze(492)][ze(512)],e);this[ze(492)][ze(327)][ze(380)]>=10&&this[ze(492)][ze(327)][ze(351)]();const r={x:t[ze(349)][0][ze(411)],y:t[ze(349)][0][ze(514)],t:t[ze(398)],typ:ze(367),d:n,s:n/(t[ze(398)]-this[ze(492)][ze(512)].t)};this[ze(492)][ze(327)][ze(341)](r),this[ze(492)][ze(512)]=r}else{const e={x:t[ze(349)][0][ze(411)],y:t[ze(349)][0][ze(514)],t:t[ze(398)],typ:ze(367),s:0,d:0};this[ze(492)][ze(512)]=e}},ze(479)),200),a=this[ze(342)](t=>{this[ze(492)][ze(512)]=null},ze(493));this[ze(343)][ze(263)][ze(470)](ze(282),t,{passive:!0}),this[ze(343)][ze(263)][ze(470)](ze(415),e,{passive:!0}),this[ze(343)][ze(263)][ze(470)](ze(501),n,{passive:!0}),this[ze(343)][ze(263)][ze(470)](ze(355),r,{passive:!0}),ze(385)in window&&(this[ze(343)][ze(263)][ze(470)](ze(298),i,{passive:!0}),this[ze(343)][ze(263)][ze(470)](ze(479),o,{passive:!0}),this[ze(343)][ze(263)][ze(470)](ze(493),a,{passive:!0})),this[ze(492)][ze(488)]={mousemove:t,click:e,keydown:n,scroll:r,touchstart:i,touchmove:o,touchend:a}}async[ze(428)](t=!1,e=t){if(this[ze(443)])return;const n=this[ze(350)],r={...this[ze(492)]},i=Date[ze(467)]();this[ze(360)](t),await this[ze(401)]({includeCandidateSignals:!e},r,i),this[ze(350)]===n&&(this[ze(492)][ze(476)]=Date[ze(467)]())}[ze(360)](t=!1){const e=Date[ze(467)]();let n=Math[ze(427)]((e-this[ze(492)][ze(363)])/1e3);null!==this[ze(492)][ze(476)]&&(n=Math[ze(427)]((e-this[ze(492)][ze(476)])/1e3)),this[ze(492)][ze(362)]?(this[ze(492)][ze(362)][ze(404)]+=t?1:0,this[ze(492)][ze(362)][ze(299)]+=n):this[ze(492)][ze(362)]={pageCount:1,sessionStart:this[ze(492)][ze(363)],duration:0}}[ze(440)](){this[ze(350)]++;const t=this[ze(375)]();Object[ze(382)](this[ze(492)],t),this[ze(492)][ze(362)]={pageCount:1,sessionStart:t[ze(363)],duration:0},this[ze(492)][ze(476)]=t[ze(363)]}[ze(375)](t=Date[ze(467)]()){return{startTime:t,mouseActivity:0,clickActivity:0,keyActivity:0,scrollActivity:0,touchActivity:0,keyboardBurstActivity:0,mousePositions:[],clickPositions:[],keyEvents:[],scrollEvents:[],keyboardBursts:[],touchEvents:[],lastTouchEvent:null}}[ze(271)](t,e=!1){this[ze(446)][ze(321)](ze(455)+t,e)}[ze(291)](){try{if(this[ze(343)][ze(390)][ze(413)]){const e=this[ze(343)][ze(390)][ze(413)][ze(312)](Se);if(e){const n=JSON[ze(310)](e);let r;return ze(318)in n?r=n:r={webdriver_detected:(t=n).wd,bot_user_agent:t.ua,canvas_fingerprint_normal:t.cf,browser_environment_normal:t.be,natural_mouse_activity:t.nm,natural_click_patterns:t.nc,keyboard_activity:t.ka,scroll_activity:t.sa,touch_activity:t.ta,significant_page_time:t.pt,multiple_pages_visited:t.mp,session_duration_reasonable:t.sd},r}}}catch(t){}var t;return null}[ze(361)](t){try{this[ze(343)][ze(390)][ze(413)]&&this[ze(343)][ze(390)][ze(413)][ze(389)](Se,JSON[ze(292)](Ae(t)))}catch(t){}}[ze(378)](t){const e=t[ze(336)];if(!(e&&e instanceof Element&&e[ze(304)]))return 0;const n=e[ze(304)]();if(!n[ze(332)]||!n[ze(444)])return 0;const r=n[ze(410)]+n[ze(332)]/2,i=n[ze(461)]+n[ze(444)]/2,o=this[ze(323)]({x:t[ze(411)],y:t[ze(514)]},{x:r,y:i}),a=Math[ze(429)](n[ze(332)]**2+n[ze(444)]**2)/2;return a>0?Math[ze(266)](0,1-o/a):0}[ze(323)](t,e){return Math[ze(429)]((e.x-t.x)**2+(e.y-t.y)**2)}[ze(364)](t){if(t[ze(438)](ze(305))||t[ze(438)](ze(468)))return t;return""+(this[ze(343)][ze(390)][ze(406)][ze(289)]||this[ze(343)][ze(390)][ze(406)][ze(284)]+"//"+this[ze(343)][ze(390)][ze(406)][ze(430)])+t}[ze(384)](t){try{this[ze(285)]?.[ze(431)](t)}catch(t){this[ze(446)][ze(274)](t,ze(339))}}[ze(326)](t){if(void 0!==t)return this[ze(343)][ze(263)],this[ze(343)][ze(348)],this[ze(366)][ze(432)](this),void this[ze(447)][ze(432)](this)}[ze(366)](){this[ze(509)]||(this[ze(509)]=!0,this[ze(446)][ze(321)](ze(287),!0))}[ze(447)](t){this[ze(446)][ze(274)](t,ze(324))}[ze(464)](){try{return this[ze(294)]()??void 0}catch(t){return void this[ze(446)][ze(274)](t,ze(386))}}[ze(301)](t){const e=this[ze(492)][ze(485)]?.[ze(403)];return!!e&&(null!==this[ze(359)][ze(317)]&&(this[ze(311)](e,ze(344),{candidateSignals:t,updateSilenceClock:!1,allowRetry:!1,transport:ze(465),candidateQueueTracking:ze(510)})[ze(469)](t=>{this[ze(446)][ze(274)](t,ze(483))}),!0))}[ze(338)](t){return!(!this[ze(492)][ze(485)]||null===this[ze(359)][ze(317)])&&(this[ze(401)]({lifecycleCandidateSignals:t})[ze(469)](t=>{this[ze(446)][ze(274)](t,ze(300))}),!0)}async[ze(311)](t,e,n={}){if(!this[ze(492)][ze(485)])return;const r=n[ze(513)]??!0,i=n[ze(302)]??!0,o=n[ze(353)]??ze(416);if(null===this[ze(359)][ze(317)])return void(r&&(this[ze(492)][ze(485)][ze(320)]=Date[ze(467)]()));let a;!1!==n[ze(345)]&&(void 0===n[ze(407)]?a=this[ze(464)]():this[ze(285)]&&(a=n[ze(407)]));const s=this[ze(326)](a),c=void 0===a?void 0:(f=a,this[ze(446)],{pack:f}),u=c?.[ze(472)],l=function(t,e,n,r,i,o){const a=void 0!==r,s=a&&void 0!==i;let c=1;return s?c=3:a&&(c=2),{v:c,s:{wd:e.wd,ua:e.ua,cf:e.cf,be:e.be,nm:e.nm,nc:e.nc,ka:e.ka,sa:e.sa,ta:e.ta,pt:e.pt,mp:e.mp,sd:e.sd},r:n,...void 0!==r&&{c:r},...s&&{t:i.t,...void 0!==i.e&&{e:i.e},w:i.w,...void 0!==o&&{_0x10a697:o}},l:ie}}(0,Ae(t),e,u,void 0===u?void 0:s,void 0===u?void 0:c?.[ze(296)]),d=JSON[ze(292)](l),h=this[ze(364)](this[ze(359)][ze(317)]);var f;void 0!==a&&o===ze(416)&&this[ze(285)]?.[ze(507)](a);const m=n[ze(335)]??ze(451);if(m!==ze(465)&&this[ze(343)][ze(408)][ze(311)]&&(m===ze(330)||!this[ze(359)][ze(441)]))try{const t=this[ze(359)][ze(500)]?d:new Blob([d],{type:ze(268)});if(this[ze(343)][ze(408)][ze(311)](h,t))return i&&(this[ze(492)][ze(485)][ze(422)]=0),void(r&&(this[ze(492)][ze(485)][ze(320)]=Date[ze(467)]()))}catch(t){}try{const t=await fetch(h,{method:ze(394),headers:{"Content-Type":this[ze(359)][ze(500)]?ze(420):ze(268)},...this[ze(359)][ze(500)]&&{mode:ze(442)},body:d,credentials:ze(372),keepalive:!0});if(!this[ze(492)][ze(485)])return;const e=this[ze(359)][ze(500)]&&t[ze(368)]===ze(288);if(!t.ok&&!e)throw new Error(ze(307)+t[ze(331)]);void 0!==a&&o===ze(510)&&t.ok&&this[ze(285)]?.[ze(507)](a),i&&(this[ze(492)][ze(485)][ze(422)]=0),r&&(this[ze(492)][ze(485)][ze(320)]=Date[ze(467)]())}catch(n){if(!this[ze(492)][ze(485)])return;i?this[ze(306)](t,e,a):void 0!==a&&o===ze(416)&&this[ze(285)]?.[ze(370)](a)}}[ze(306)](t,e,n){if(!this[ze(492)][ze(485)]||this[ze(492)][ze(485)][ze(422)]>=this[ze(359)][ze(262)])return void(void 0!==n&&this[ze(285)]?.[ze(370)](n));const r=Math[ze(313)](1e3*2**this[ze(492)][ze(485)][ze(422)],3e4);this[ze(492)][ze(485)][ze(422)]++,this[ze(492)][ze(485)][ze(481)]=this[ze(343)][ze(390)][ze(337)](()=>{this[ze(492)][ze(485)]&&this[ze(311)](t,e)},r)}async[ze(401)](t={},e=this[ze(492)],n=Date[ze(467)]()){if(!this[ze(492)][ze(485)])return;const r=Me(e[ze(418)],e[ze(487)],e[ze(374)],e[ze(392)],e[ze(356)],e[ze(491)],e[ze(478)],e[ze(503)],e[ze(433)],e[ze(453)],e[ze(327)],e[ze(363)],n),i=function(t,e,n,r){const i={webdriver_detected:1===t?.wd||!1,bot_user_agent:0===t?.ua||!1,browser_environment_normal:1===t?.br||!1,canvas_fingerprint_normal:1===t?.cv||!1,natural_mouse_activity:!1,natural_click_patterns:!1,keyboard_activity:!1,scroll_activity:!1,touch_activity:!1,significant_page_time:!1,multiple_pages_visited:!1,session_duration_reasonable:!1};if(e.ma>0&&1===e.nm&&(i[ze(396)]=!0),e.ca>0&&1===e.vc&&(i[ze(322)]=!0),e.ka>0&&(i[ze(423)]=!0),e.sa>0&&(i[ze(504)]=!0),e.ta>0&&(i[ze(400)]=!0),e.t>30&&(i[ze(281)]=!0),n&&(n[ze(404)]>1&&(i[ze(515)]=!0),n[ze(299)]>60&&(i[ze(357)]=!0)),r){const t=Object[ze(334)](i);for(const e of t)i[e]=i[e]||r[e]}return i}(this[ze(492)][ze(494)],r,this[ze(492)][ze(362)],this[ze(492)][ze(485)][ze(403)]),o=function(t,e){if(!e)return!0;const n=Object[ze(334)](t);for(const r of n)if(t[r]!==e[r])return!0;return!1}(i,this[ze(492)][ze(485)][ze(403)]),a=Date[ze(467)]()-this[ze(492)][ze(485)][ze(320)],s=a>=this[ze(359)][ze(280)],c=void 0!==t[ze(426)];if(o||s||c){const e=Date[ze(467)]()-this[ze(492)][ze(485)][ze(297)];if(!c&&e<100)return void this[ze(271)](ze(373),!0);if(s&&!o&&this[ze(271)](ze(393)+Math[ze(412)](a/1e3)+ze(315),!0),o&&this[ze(359)][ze(402)]){if(this[ze(492)][ze(485)][ze(403)]){Object[ze(334)](i)[ze(265)](t=>{this[ze(492)][ze(485)][ze(403)][t],i[t]})}else this[ze(271)](ze(369));this[ze(492)][ze(362)]}if(this[ze(492)][ze(485)][ze(403)]=(u=i,{...u}),this[ze(492)][ze(485)][ze(297)]=Date[ze(467)](),this[ze(361)](i),this[ze(359)][ze(293)]&&o)try{this[ze(359)][ze(293)](Ae(i))}catch(t){this[ze(446)][ze(274)](t,ze(424))}let n=ze(445);o?n=ze(439):s&&(n=ze(275));const r=!o&&!s;await this[ze(311)](i,n,{candidateSignals:t[ze(426)],includeCandidateSignals:t[ze(345)],updateSilenceClock:!r,allowRetry:!r,transport:ze(r?330:451)})}else this[ze(359)][ze(402)];var u}}const Ie=(t,e,n)=>({libVersion:ie,shopId:e||"",hostname:t[ze(390)]?.[ze(406)]?.[ze(391)]||"",url:t[ze(390)]?.[ze(406)]?.[ze(421)]||"",referrer:t[ze(263)]?.[ze(414)]||"",baseURI:t[ze(263)]?.[ze(508)]||"",sessionToken:n||"",uniqueToken:Nt()||""});function Ne(t,e){return e>=100||!(e<=0)&&function(t){try{const e=t[ze(390)][ze(413)]?.[ze(312)](Le);if(null!==e&&/^\d{1,2}$/[ze(462)](e)){const t=Number(e);if(t<100)return t}}catch{}const e=Math[ze(427)](100*Math[ze(425)]());try{t[ze(390)][ze(413)]?.[ze(389)](Le,String(e))}catch{}return e}(t){const r=(s=t?.[ze(419)],typeof s===ze(325)&&Number[ze(283)](s)?s:1),i=r>0,o=i?qt():void 0,a=(t?.[ze(346)]??!1)&&Ne(e,t?.[ze(489)]??100);var s;let c;o?c=function(t){let e=0;for(let n=0,r=t[ge(239)];nh[ze(387)]()):h[ze(387)](),h};class Ue{quietWindowStartCandidates=[];longAnimationFrameObserver=null;longAnimationFrames=[];constructor(){this.initializeLongAnimationFrameObserver()}getQuietWindowStartCandidates(){return[...this.quietWindowStartCandidates].sort((t,e)=>t.startTime-e.startTime)}getLongAnimationFrames(){if(!He()){const t=function(){const{getLongAnimationFrames:t}=window.ShopifyAnalytics?.performance||{};if(!t)return[];return t(!0)}();this.longAnimationFrames=[];for(const e of t)this.handleAnimationFrame(e.startTime,e.endTime)}return[...this.longAnimationFrames].sort((t,e)=>t.startTime-e.startTime)}destroy(){this.cleanup(),this.quietWindowStartCandidates=[],this.longAnimationFrames=[]}initializeLongAnimationFrameObserver(){if(He())try{this.longAnimationFrameObserver=new PerformanceObserver(t=>{const e=t.getEntries();for(const t of e)this.handleAnimationFrame(t.startTime,t.startTime+t.duration)}),this.longAnimationFrameObserver.observe({type:"long-animation-frame",buffered:!0})}catch(t){}}handleAnimationFrame(t,e){if(this.longAnimationFrames.push({startTime:t,endTime:e}),this.quietWindowStartCandidates.length>0){t-this.quietWindowStartCandidates[this.quietWindowStartCandidates.length-1].startTime<250&&this.quietWindowStartCandidates.pop()}this.quietWindowStartCandidates.push({startTime:e})}cleanup(){this.longAnimationFrameObserver&&(this.longAnimationFrameObserver.disconnect(),this.longAnimationFrameObserver=null)}}let ke=null;function je(){ke||(ke=new Ue)}function Ee(t,e=0){if(null===t||!He()&&!Boolean(window.ShopifyAnalytics?.performance?.getLongAnimationFrames))return Ke(),null;const n=(ke?ke.getLongAnimationFrames():[]).map(t=>({startTime:t.startTime-e,endTime:t.endTime-e}));let r=null;for(const e of n){if(e.startTime<=t&&e.endTime>t){r=e;break}if(e.startTime>=t){r=e;break}}if(!r||r.startTime-t>=250)return Ke(),t;const i=(ke?ke.getQuietWindowStartCandidates():[]).map(t=>({startTime:t.startTime-e}));let o=t;if(i.length>0)for(const e of i)if(e.startTime>=t){o=e.startTime;break}return Ke(),o}function He(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function Ke(){ke&&(ke.destroy(),ke=null)}function Oe(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function We(t){return performance.getEntriesByType("long-animation-frame").filter(e=>e.startTime+e.duration>t)}let Re=null,Ze=!1;function Fe(){Re=null,Ze=!1}const Je=Object.freeze({shop_domain:`${window.location.origin}/.well-known/shopify/monorail`,global:"https://monorail-edge.shopifysvc.com",canada:"https://monorail-edge-ca.shopifycloud.com",staging:"https://monorail-edge-staging.shopifycloud.com"}),Xe=new RegExp(`^${window.location.origin}/((?:(?:[a-z]{2,3}|zh-hans|zh-hant)(?:-[a-zA-Z0-9]+)/)?cart/(add|change|update|clear))`),Ve=new RegExp("cart-performance:|add:|change:|clear:|note_update:");var Ye;function Ge({monorailRegion:t,schema:e,rawData:n}){const r=Date.now(),i={schema_id:e,payload:e===Ye.OnUnload?Qe(n):tn(n),metadata:{event_created_at_ms:r,event_sent_at_ms:r}},o=Je[t||""],a=JSON.stringify(i);if(!o)return void console.debug("📡 Monorail: ",JSON.stringify(i,null,2));const s=e===Ye.OnUnload;s&&Ze||function(t,e,n){const r=Re?.result.activated?null:Re,i=r?.interactions??[];return r?.controller.abort(),Re=$e(t,e?i:[...i,n],e?n:r?.onUnload??null),null!==Re||(Re=r&&$e(t,r.interactions,r.onUnload),!1)}(o,s,a)||s&&Re?.onUnload||(!function(t,e){try{const n=new window.Blob([e],{type:"text/plain"});if("function"==typeof window.navigator.sendBeacon&&"function"==typeof window.Blob&&!function(){const{userAgent:t}=window.navigator;return-1!==t.lastIndexOf("iPhone; CPU iPhone OS 12_")||-1!==t.lastIndexOf("iPad; CPU OS 12_")}()&&window.navigator.sendBeacon(t,n))return}catch(t){}const n=new XMLHttpRequest;n.open("POST",t),n.setRequestHeader("Content-type","text/plain"),n.send(e)}(`${o}/v1/produce`,a),s&&(Ze=!0))}function $e(t,e,n){if("function"!=typeof window.fetchLater)return null;const r=null===n?e:[...e,n];try{const i=new AbortController;return{controller:i,result:window.fetchLater(`${t}/unstable/produce_batch`,{method:"POST",body:`{"events":[${r.join(",")}]}`,headers:{"Content-Type":"text/plain"},credentials:"include",signal:i.signal}),interactions:e,onUnload:n}}catch(t){return null}}function Qe(t){const e=en(t,["domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","activationStart","firstPaint","visuallyReady","initiatorType","redirectCount","cartAjaxResourceTimings","cartPerformanceMetrics","totalStylingDuration","totalStyleDuration","totalForcedStyleDuration","totalLayoutDuration","totalForcedLayoutDuration","speculations","originalMicroSessionId","rolloutsTagRead","rolloutsTagMismatch","rolloutsTagUnusable"]);return{perf_kit_init:t.perfKitInit,perf_kit_version:t.perfKitVersion,url:t.url,page_type:t.pageType,shop_id:t.shopId,application:t.application,storefront_id:t.storefrontId,theme_instance_id:t.themeInstanceId,theme_name:t.themeName,theme_version:t.themeVersion,session_token:t.sessionToken,unique_token:t.uniqueToken,micro_session_id:t.microSessionId,micro_session_count:t.microSessionCount,cumulative_layout_shift:t.cumulativeLayoutShift,cumulative_layout_shift_target:t.cumulativeLayoutShiftTarget,first_contentful_paint:t.firstContentfulPaint,largest_contentful_paint:t.largestContentfulPaint,largest_contentful_paint_target:t.largestContentfulPaintTarget,time_to_first_byte:t.timeToFirstByte,quiet_window_start:t.quietWindowStart,seo_bot:t.seoBot,humanness_score:t.humannessScore,ja3_fingerprint:t.ja3Fingerprint,navigation_start:t.navigationStart,navigation_type:t.navigationType,navigation_bad:t.navigationBad,encoded_body_size:t.encodedBodySize,decoded_body_size:t.decodedBodySize,transfer_size:t.transferSize,first_interim_response_start:t.firstInterimResponseStart,final_response_headers_start:t.finalResponseHeadersStart,response_start:t.responseStart,response_end:t.responseEnd,worker_start:t.workerStart,connect_start:t.connectStart,connect_end:t.connectEnd,domain_lookup_start:t.domainLookupStart,domain_lookup_end:t.domainLookupEnd,fetch_start:t.fetchStart,redirect_start:t.redirectStart,redirect_end:t.redirectEnd,request_start:t.requestStart,secure_connection_start:t.secureConnectionStart,next_hop_protocol:t.nextHopProtocol,server_timing:t.serverTiming,paint_timing_hidden:t.paintTimingHidden,referrer:t.referrer,render_region:t.renderRegion,resource_timing:t.resourceTiming,treatment_ids:t.treatmentIds,other_metrics:JSON.stringify(e)}}function tn(t){const e=en(t,["longAnimationFrame"]);return{url:t.url,page_type:t.pageType,shop_id:t.shopId,application:t.application,storefront_id:t.storefrontId,theme_instance_id:t.themeInstanceId,session_token:t.sessionToken,unique_token:t.uniqueToken,micro_session_id:t.microSessionId,micro_session_count:t.microSessionCount,interaction_to_next_paint:t.interactionToNextPaint,interaction_to_next_paint_target:t.interactionToNextPaintTarget,seo_bot:t.seoBot,humanness_score:t.humannessScore,ja3_fingerprint:t.ja3Fingerprint,referrer:t.referrer,worker_start:t.workerStart,next_hop_protocol:t.nextHopProtocol,navigation_bad:t.navigationBad,treatment_ids:t.treatmentIds,other_interaction_metrics:JSON.stringify(e)}}function en(t,e){return e.reduce((e,n)=>{var r;return null!=t[n]&&(e[(r=n,r.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`))]=t[n]),e},{})}function nn(t,e){return t?Math.max(0,Math.round(t-e)):0}!function(t){t.OnInteraction="perf_kit_on_interaction/3.2",t.OnUnload="perf_kit_on_unload/3.5"}(Ye||(Ye={}));function rn(t){if(!t.application)throw new Error("Application is missing");if(!["storefront-renderer","hydrogen","shop-web"].includes(t.application.toLowerCase()))throw new Error("Invalid application type");if("shop-web"!==t.application.toLowerCase()){if(!t.shopId)throw new Error("shopId is missing");if(!t.themeInstanceId&&!t.storefrontId)throw new Error("Either `themeInstanceId` or `storefrontId` must be defined");for(const e of["shopId","themeInstanceId","storefrontId"])if(t[e]&&isNaN(Number(t[e])))throw new Error(`Invalid ${e}`)}if(t.humannessScore&&isNaN(Number(t.humannessScore)))throw new Error("Invalid humannessScore");if(t.monorailRegion&&!["shop_domain","global","staging","canada"].includes(t.monorailRegion.toLowerCase()))throw new Error("Invalid monorail region");if(t.resourceTimingSamplingRate&&(isNaN(Number(t.resourceTimingSamplingRate))||Number(t.resourceTimingSamplingRate)<10||Number(t.resourceTimingSamplingRate)>100))throw new Error("Invalid resource timing sampling rate");let e,n,r,i=function(t){if(!t)return;const e=[];for(const n of t.split(",")){const t=Number(n);isNaN(t)||e.push(t)}return e.length>0?e:void 0}(t.treatmentIds);if("storefront-renderer"===t.application.toLowerCase()&&"true"===t.rolloutsExposureIdsEnabled){const o=function(){const t=document.querySelector('script#shopify-rollouts[type="application/json"]');if(!t)return;try{const e=JSON.parse(t.textContent||"");return e&&Array.isArray(e.rolloutIds)&&e.rolloutIds.every(Number.isFinite)&&Array.isArray(e.rolloutTreatmentIds)&&e.rolloutTreatmentIds.every(Number.isFinite)?e:void 0}catch{return}}();if(o){if(e=1,void 0!==t.treatmentIds){const t=new Set(o.rolloutTreatmentIds);(new Set(i).size!==t.size||i?.some(e=>!t.has(e)))&&(n=1)}i=o.rolloutTreatmentIds.length?o.rolloutTreatmentIds:void 0}else r=1}return{storefrontData:{application:t.application.toLowerCase(),shopId:Number(t.shopId)||0,renderRegion:t.renderRegion,pageType:t.pageType,seoBot:"true"===t.seoBot,humannessScore:Number(t.humannessScore)||void 0,ja3Fingerprint:t.ja3Fingerprint,themeInstanceId:Number(t.themeInstanceId)||void 0,storefrontId:Number(t.storefrontId)||void 0,themeName:t.themeName||void 0,themeVersion:t.themeVersion||void 0,treatmentIds:i,rolloutsTagRead:e,rolloutsTagMismatch:n,rolloutsTagUnusable:r},monorailRegion:t.monorailRegion,resourceTimingSamplingRate:Number(t.resourceTimingSamplingRate)||void 0,spaMode:"true"===t.spaMode,shs:"true"===t.shs,shsBeaconEndpoint:t.shsBeaconEndpoint||void 0,shsExportWithFetch:void 0===t.shsExportWithFetch?void 0:"true"===t.shsExportWithFetch,shsTextPlain:"true"===t.shsTextPlain,shsLogsSampleRate:on(t.shsLogsSampleRate),shsCandidateSampleRate:an(Number(t.shsCandidateSampleRate)),shsCandidateMask:t.shsCandidateMask,shsCandidateActivePageFlush:void 0===t.shsCandidateActivePageFlush?void 0:"false"!==t.shsCandidateActivePageFlush}}function on(t){if(void 0===t||""===t.trim())return;const e=Number(t);return Number.isFinite(e)?e:void 0}function an(t){return!Number.isFinite(t)||t<=0?0:Math.min(100,Math.floor(t))}const sn="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function cn(){let t="";try{const e=window.crypto,n=new Uint16Array(31);e.getRandomValues(n);let r=0;t=sn.replace(/[x]/g,t=>{const e=n[r]%16;return r++,("x"===t?e:3&e|8).toString(16)}).toUpperCase()}catch(e){t=sn.replace(/[x]/g,t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}).toUpperCase()}return`${function(){let t=0,e=0;t=(new Date).getTime()>>>0;try{e=performance.now()>>>0}catch(t){e=0}return Math.abs(t+e).toString(16).toLowerCase().padStart(8,"0")}()}-${t}`}let un=null,ln=!1,dn=null,hn=null,fn=null,mn=null;let pn=!1;class gn{info;config;sampled;onUnloadCounted;cachedQuietWindowStart;isBackForwardCacheRestore;lifecycleStart;originalMicroSessionId;constructor(t,e={}){this.config=t,this.isBackForwardCacheRestore=e.isBackForwardCacheRestore??!1,this.lifecycleStart=e.startTime??0,this.originalMicroSessionId=e.originalMicroSessionId;const n="storefront-renderer"===(r=t.storefrontData.application)||"hydrogen"===r;var r;this.info={perfKitInit:Date.now(),perfKitVersion:"3.13.1",url:window.location.href,referrer:document.referrer||void 0,microSessionId:cn(),microSessionCount:0,get sessionToken(){return n?Ut("_shopify_s"):qt()},get uniqueToken(){return n?Ut("_shopify_y"):Nt()}},this.sampled=100*Math.random()<=(t.resourceTimingSamplingRate??10),this.onUnloadCounted=!1,this.cachedQuietWindowStart=void 0,performance.setResourceTimingBufferSize(1e3)}get performanceMetrics(){return this.isBackForwardCacheRestore?{}:function(t){const e=performance.getEntriesByType("navigation");if(0===e.length)return{};const n=e[0],r=n.activationStart||0,i=function(t,e){return!e&&(t.requestStart>0&&t.startTime>0&&t.requestStart0&&t.startTime>0&&t.responseStart0&&t.fetchStart>0&&t.responseStart0&&t.fetchStart0&&t.responseEnd>e+864e5}(n,t);return{encodedBodySize:n.encodedBodySize,decodedBodySize:n.decodedBodySize,navigationStart:Math.round(n.startTime),navigationType:n.type,navigationBad:i,firstInterimResponseStart:Math.round(n.firstInterimResponseStart),finalResponseHeadersStart:Math.round(n.finalResponseHeadersStart),responseStart:Math.round(n.responseStart),responseEnd:Math.round(n.responseEnd),workerStart:Math.round(n.workerStart),connectStart:Math.round(n.connectStart),connectEnd:Math.round(n.connectEnd),domainLookupStart:Math.round(n.domainLookupStart),domainLookupEnd:Math.round(n.domainLookupEnd),fetchStart:Math.round(n.fetchStart),redirectStart:Math.round(n.redirectStart),redirectEnd:Math.round(n.redirectEnd),requestStart:Math.round(n.requestStart),secureConnectionStart:Math.round(n.secureConnectionStart),nextHopProtocol:n.nextHopProtocol,serverTiming:JSON.stringify(n.serverTiming),domInteractive:nn(n.domInteractive,r),domComplete:nn(n.domComplete,r),domContentLoadedEventStart:nn(n.domContentLoadedEventStart,r),domContentLoadedEventEnd:nn(n.domContentLoadedEventEnd,r),activationStart:Math.round(r),redirectCount:n.redirectCount,initiatorType:n.initiatorType,transferSize:n.transferSize}}(this.info.perfKitInit)}get bfCacheMetadata(){if(!this.isBackForwardCacheRestore)return{};const t=performance.getEntriesByType("navigation");return{navigationType:"back_forward_cache",originalMicroSessionId:this.originalMicroSessionId,nextHopProtocol:t.length>0?t[0].nextHopProtocol:void 0}}}const vn=new Set;function yn(){if(null!==hn){if(!Sn()&&wn()&&vn.size>0){let t={};for(const e of vn)t={...t,...e};const e=t.firstContentfulPaint??null;if(null!==e&&void 0===hn.cachedQuietWindowStart){const t=performance.getEntriesByType("navigation")[0]?.activationStart||0,n=hn.isBackForwardCacheRestore?hn.lifecycleStart:t;hn.cachedQuietWindowStart=Ee(e,n)}void 0!==hn.cachedQuietWindowStart&&null!==hn.cachedQuietWindowStart&&(t.quietWindowStart=Math.round(hn.cachedQuietWindowStart));const n=function(t=0){if(!Oe())return null;const e=We(t);let n=0;for(const t of e){n+=t.styleAndLayoutStart?t.startTime+t.duration-t.styleAndLayoutStart:0;for(const e of t.scripts)n+=e.forcedStyleAndLayoutDuration}return n}(hn.lifecycleStart);null!==n&&(t.totalStylingDuration=Math.round(n));const r=function(t=0){if(!Oe())return null;const e=We(t);if(0===e.length)return null;if("number"!=typeof e[0].styleDuration)return null;let n=0,r=0,i=0,o=0;for(const t of e){const e=t;n+=e.styleDuration??0,i+=e.layoutDuration??0;for(const e of t.scripts){const t=e;r+=t.forcedStyleDuration??0,o+=t.forcedLayoutDuration??0}}return{totalStyleDuration:n,totalForcedStyleDuration:r,totalLayoutDuration:i,totalForcedLayoutDuration:o}}(hn.lifecycleStart);null!==r&&(t.totalStyleDuration=Math.round(r.totalStyleDuration),t.totalForcedStyleDuration=Math.round(r.totalForcedStyleDuration),t.totalLayoutDuration=Math.round(r.totalLayoutDuration),t.totalForcedLayoutDuration=Math.round(r.totalForcedLayoutDuration)),hn.onUnloadCounted||(hn.info.microSessionCount+=1,hn.onUnloadCounted=!0);const i=hn.isBackForwardCacheRestore?void 0:function(t){if(t)return performance.getEntriesByType("resource").map(t=>{const e=Object.entries(t.toJSON()).map(([t,e])=>"number"==typeof e?[t,Math.round(e)]:[t,e]);return JSON.stringify(Object.fromEntries(e))})}(hn.sampled),o=hn.isBackForwardCacheRestore?void 0:function(t){if("function"!=typeof performance.getSpeculations)return;const e=performance.getSpeculations(),n=e.preloads??[];let r=0,i=0,o=0;const a=[];for(const e of n){const n=Boolean(e.earlyhint??e.earlyHints);n&&(o+=1),null==e.used?(i+=1,t&&a.push({url:e.url.slice(-20),as:e.as,crossorigin:e.crossorigin??null,early_hint:n})):r+=1}const s=e.navigations??[],c=e.navigationDestinationURL??null;let u=0;const l=new Map;for(const t of s){const e=t.url===c;e&&(u+=1);const n=t.eagerness??null,r=(t.tags??[]).map(t=>t.slice(0,64)).sort(),i=JSON.stringify([t.type,n,r]);let o=l.get(i);!o&&l.size<10&&(o={type:t.type,eagerness:n,tags:r,used:0,unused:0},l.set(i,o)),o&&(o[e?"used":"unused"]+=1)}return{used_preloads:r,unused_preloads:i,unused_preload_details:a,early_hint_preloads:o,used_navigations:u,unused_navigations:s.length-u,navigation_breakdown:Array.from(l.values()),same_origin_navigation:null!==c}}(hn.sampled),a=function(t=0){return performance.getEntriesByType("resource").filter(e=>(e.startTime||0)>=t&&Xe.test(e.name))}(hn.lifecycleStart),s=function(t=0){return performance.getEntriesByType("measure").filter(e=>(e.startTime||0)>=t&&Ve.test(e.name)).map(t=>{const e=t.toJSON();return e.name.startsWith("cart-performance:")||(e.name=`cart-performance:${e.name}`),e})}(hn.lifecycleStart);Ge({monorailRegion:hn.config.monorailRegion,schema:Ye.OnUnload,rawData:{...hn.info,...hn.config.storefrontData,...hn.performanceMetrics,...hn.bfCacheMetadata,...t,resourceTiming:i,cartAjaxResourceTimings:a,cartPerformanceMetrics:s,paintTimingHidden:pn,speculations:o}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function wn(){return null!==fn?fn:kt()}addEventListener("pageshow",t=>{if(!t.persisted||null===un||null===hn)return;vn.clear(),Fe(),Ke();const e=new gn(un,{isBackForwardCacheRestore:!0,startTime:t.timeStamp,originalMicroSessionId:hn.originalMicroSessionId??hn.info.microSessionId});hn=e,ln=!1,dn=window.location.pathname,pn=!1,setTimeout(()=>{hn===e&&(pn="hidden"===document.visibilityState)}),je()},{capture:!0}),((e,r={})=>{const o=a(r=Object.assign({},r),t),s=new WeakMap;o.t=t=>{if(t?.sources?.length){const e=z(t.sources),n=e?.node;if(n){const t=r.generateTarget?.(n)??i(n);s.set(e,t)}}},((e,n={})=>{const r=C();b(p(()=>{let i,o=f("CLS",0);const s=a(n,t),c=t=>{for(const e of t)s.u(e);s.o>o.value&&(o.value=s.o,o.entries=s.i,i())},h=m("layout-shift",c);h&&(i=l(e,o,x,n.reportAllChanges),r.onHidden(()=>{c(h.takeRecords()),i(!0)}),u(()=>{s.o=0,o=f("CLS",0),i=l(e,o,x,n.reportAllChanges),d(()=>i())}),setTimeout(i))}))})(t=>{const r=(t=>{let e={};if(t.entries.length){const r=t.entries.reduce((t,e)=>t.value>e.value?t:e);if(r?.sources?.length){const t=z(r.sources);t&&(e={largestShiftTarget:s.get(t),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:t,largestShiftEntry:r,loadState:n(r.startTime)})}}return Object.assign(t,{attribution:e})})(t);e(r)},r)})(function(t){const{attribution:e,value:n}=t;vn.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})},{reportAllChanges:!0}),((t,n={})=>{const r=a(n=Object.assign({},n),U),o=new WeakMap;r.m=t=>{const e=t.element;if(e){const r=n.generateTarget?.(e)??i(e);o.set(t,r)}},((t,e={})=>{S(()=>{const n=C();let r,i=f("LCP");const o=a(e,U),s=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)o.u(e),e.startTime{s(c.takeRecords()),c.disconnect(),r(!0)}),o=t=>{t.isTrusted&&(N(n),removeEventListener(t.type,o,{capture:!0}))};for(const t of["keydown","click","visibilitychange"])addEventListener(t,o,{capture:!0});u(n=>{i=f("LCP"),r=l(t,i,k,e.reportAllChanges),d(()=>{i.value=performance.now()-n.timeStamp,r(!0)})})}})})(n=>{const r=(t=>{let n={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:t.value};if(t.entries.length){const r=e();if(r){const e=r.activationStart||0,i=t.entries.at(-1),a=i.url&&performance.getEntriesByType("resource").filter(t=>t.name===i.url)[0],s=Math.max(0,r.responseStart-e),c=Math.max(s,a?(a.requestStart||a.startTime)-e:0),u=Math.min(t.value,Math.max(c,a?a.responseEnd-e:0));n={target:o.get(i),timeToFirstByte:s,resourceLoadDelay:c-s,resourceLoadDuration:u-c,elementRenderDelay:t.value-u,navigationEntry:r,lcpEntry:i},i.url&&(n.url=i.url),a&&(n.lcpResourceEntry=a)}}return Object.assign(t,{attribution:n})})(n);t(r)},n)})(function(t){const{attribution:e,value:n}=t;vn.add({largestContentfulPaint:Math.round(n),largestContentfulPaintTarget:e.target})},{reportAllChanges:!0}),((t,r={})=>{b(r=>{const i=(t=>{let r={timeToFirstByte:0,firstByteToFCP:t.value,loadState:n(c())};if(t.entries.length){const i=e(),o=t.entries.at(-1);if(i){const e=i.activationStart||0,a=Math.max(0,i.responseStart-e);r={timeToFirstByte:a,firstByteToFCP:t.value-a,loadState:n(t.entries[0].startTime),navigationEntry:i,fcpEntry:o}}}return Object.assign(t,{attribution:r})})(r);t(i)},r)})(function(t){const{value:e}=t;vn.add({firstContentfulPaint:Math.round(e)})}),((t,e={})=>{const r=a(e=Object.assign({},e),I);let o=[],s=[],c=0;const d=new WeakMap,h=new WeakMap;let p=!1;const g=()=>{p||(N(v),p=!0)},v=()=>{const t=r.l.map(t=>d.get(t.entries[0])),e=s.length-50;s=s.filter((n,r)=>r>=e||t.includes(n));const n=new Set;for(const t of s){const e=y(t.startTime,t.processingEnd);for(const t of e)n.add(t)}const i=o.length-1-50;o=o.filter((t,e)=>t.startTime>c&&e>i||n.has(t)),p=!1};r.m=t=>{const e=t.startTime+t.duration;let n;c=Math.max(c,t.processingEnd);for(let r=s.length-1;r>=0;r--){const i=s[r];if(Math.abs(e-i.renderTime)<=8){n=i,n.startTime=Math.min(t.startTime,n.startTime),n.processingStart=Math.min(t.processingStart,n.processingStart),n.processingEnd=Math.max(t.processingEnd,n.processingEnd),n.entries.push(t);break}}n||(n={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:e,entries:[t]},s.push(n)),(t.interactionId||"first-input"===t.entryType)&&d.set(t,n),g()},r.p=t=>{if(!h.get(t)){const n=t.entries[0].target;if(n){const r=e.generateTarget?.(n)??i(n);h.set(t,r)}}};const y=(t,e)=>{const n=[];for(const r of o)if(!(r.startTime+r.duratione)break;n.push(r)}return n},w=t=>{const e=t.entries[0],i=d.get(e),o=e.processingStart,a=Math.max(e.startTime+e.duration,o),s=Math.min(i.processingEnd,a),c=i.entries.sort((t,e)=>t.processingStart-e.processingStart),u=y(e.startTime,s),l=r.h.get(e.interactionId),f={interactionTarget:h.get(l),interactionType:e.name.startsWith("key")?"keyboard":"pointer",interactionTime:e.startTime,nextPaintTime:a,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:o-e.startTime,processingDuration:s-o,presentationDelay:a-s,loadState:n(e.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(t=>{if(!t.longAnimationFrameEntries?.length)return;const e=t.interactionTime,n=t.inputDelay,r=t.processingDuration;let i,o,a=0,s=0,c=0,u=0;for(const c of t.longAnimationFrameEntries){s=s+c.startTime+c.duration-c.styleAndLayoutStart;for(const t of c.scripts){const c=t.startTime+t.duration;if(cu&&(o=t.startTime=e+n+r?"presentation-delay":"processing-duration",i=t,u=l)}}const l=t.longAnimationFrameEntries.at(-1),d=l?l.startTime+l.duration:0;d>=e+n+r&&(c=t.nextPaintTime-d),i&&o&&(t.longestScript={entry:i,subpart:o,intersectingDuration:u}),t.totalScriptDuration=a,t.totalStyleAndLayoutDuration=s,t.totalPaintDuration=c,t.totalUnattributedDuration=t.nextPaintTime-e-a-s-c})(f),Object.assign(t,{attribution:f})};m("long-animation-frame",t=>{o=o.concat(t),g()}),((t,e={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=C();S(()=>{"interactionCount"in performance||_||(_=m("event",T,{type:"event",buffered:!0,durationThreshold:0}));let r,i=f("INP");const o=a(e,I),s=t=>{N(()=>{for(const e of t)o.u(e);const e=o.M();e&&e.T!==i.value&&(i.value=e.T,i.entries=e.entries,r())})},c=m("event",s,{durationThreshold:e.durationThreshold??40});r=l(t,i,q,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(c.takeRecords()),r(!0)}),u(()=>{o.v(),i=f("INP"),r=l(t,i,q,e.reportAllChanges)}))})})(e=>{const n=w(e);t(n)},e)})(function(t){const{attribution:e,value:n}=t;if(null===hn)return void console.debug("⛔️ Shopify/perf-kit is not initialized");if(function(){const t=navigator.userAgent;if(!t.includes("Safari")||t.includes("Chrome"))return!1;const e=/Version\/(\d+)(?:\.(\d+))?/.exec(t);if(null===e)return!0;const n=Number(e[1]),r=Number(e[2]||0);return n<26||26===n&&r<4}())return;if(Sn())return;if(!wn())return;hn.info.microSessionCount+=1;const{inputDelay:r,processingDuration:i,presentationDelay:o,longestScript:a,interactionTarget:s}=e,c=a?.entry?{slowest_script:a.entry.sourceURL,slowest_script_duration:Math.round(a.entry.duration)}:{};Ge({monorailRegion:hn.config.monorailRegion,schema:Ye.OnInteraction,rawData:{...hn.info,...hn.config.storefrontData,...hn.performanceMetrics,...hn.bfCacheMetadata,interactionToNextPaint:Math.round(n),interactionToNextPaintTarget:s,longAnimationFrame:{input_delay:Math.round(r),processing_duration:Math.round(i),presentation_delay:Math.round(o),...c}}})},{reportAllChanges:!0}),((t,n={})=>{((t,n={})=>{let r=f("TTFB"),i=l(t,r,j,n.reportAllChanges);E(()=>{const o=e();o&&(r.value=Math.max(o.responseStart-h(),0),r.entries=[o],i(!0),u(()=>{r=f("TTFB",0),i=l(t,r,j,n.reportAllChanges),i(!0)}))})})(e=>{const n=(t=>{let e={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(t.entries.length){const n=t.entries[0],r=n.activationStart||0,i=Math.max((n.workerStart||n.fetchStart)-r,0),o=Math.max(n.domainLookupStart-r,0),a=Math.max(n.connectStart-r,0),s=Math.max(n.connectEnd-r,0);e={waitingDuration:i,cacheDuration:o-i,dnsDuration:a-o,connectionDuration:s-a,requestDuration:t.value-s,navigationEntry:n}}return Object.assign(t,{attribution:e})})(e);t(n)},n)})(function(t){if(hn?.isBackForwardCacheRestore)return;const{value:e}=t;vn.add({timeToFirstByte:Math.round(e)})}),addEventListener("DOMContentLoaded",()=>{pn="hidden"===document.visibilityState}),addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&yn()}),addEventListener("pagehide",()=>{yn()});const Cn=/bot|crawl|headless|curl|wget|python|spider|libwww-pearl|newrelic|datadog|sitebulb|site24x7/i;function Sn(){return!!Cn.test(navigator.userAgent)||!!(navigator.webdriver||document.__webdriver_evaluate||document.__selenium_evaluate||document.__webdriver_script_fn||document.__webdriver_script_func||document.__webdriver_script_function||document.$cdc_asdjflasutopfhvcZLmcfl_||document.$wdc_||window._Selenium_IDE_Recorder||window._phantom||window.__nightmare||window.callPhantom||window._phantom||window.__playwright__binding__||window.__pwInitScripts)}!function(){const{dataset:t}=document.currentScript;try{!function(t){if(mn?.destroy(),mn=null,un=t,hn=new gn(t),fn=null,ln=!1,dn=window.location.pathname,vn.clear(),Fe(),je(),t.spaMode&&void 0===window.PerfKit&&(window.PerfKit={navigate:()=>{if(!un?.spaMode||!hn)return;const t=window.location.href,e=window.location.pathname;dn!==e?(dn=e,mn?.recordPageView(),ln?hn.info.url=t:(yn(),hn=new gn(un),vn.clear(),Fe(),ln=!0)):hn.info.url=t},setPageType:t=>{un?.spaMode&&(un.storefrontData.pageType=t)},setConsent:t=>{fn=t}},document.addEventListener("shopify:page:view",t=>{window.PerfKit.navigate(),t.page?.url&&hn&&(hn.info.url=t.page.url),t.page?.template&&window.PerfKit.setPageType(t.page.template)},!0)),t.shs){const e=t.shsCandidateSampleRate??0;mn=qe({debug:!1,shopId:t.storefrontData.shopId,exportWithFetch:t.shsExportWithFetch??!0,beaconTextPlain:t.shsTextPlain??!1,logsSampleRate:t.shsLogsSampleRate,candidateSignalsEnabled:e>0,candidateSampleRate:e,...!1===t.shsCandidateActivePageFlush&&{candidateActivePageFlushEnabled:!1},...e>0&&void 0!==t.shsCandidateMask&&{candidateMask:t.shsCandidateMask},...t.shsBeaconEndpoint&&{beaconEndpoint:t.shsBeaconEndpoint}})}}(rn(t))}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}}()}();
not sure where to start?

take 30 seconds to find your personalised meal plan.

search