!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(/^#/,"")},r=t=>{let e="";try{for(;9!==t?.nodeType;){const n=t,r=n.id?"#"+n.id:[i(n),...Array.from(n.classList).sort()].join(".");if(e.length+r.length>99)return e||r;if(e=e?r+">"+e:r,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,i)=>{let r,o;return a=>{e.value>=0&&(a||i)&&(o=e.value-(r??0),(o||void 0===r)&&(r=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 i=e();let r="navigate";return c()>=0?r="back-forward-cache":i&&(document.prerendering||h()>0?r="prerender":document.wasDiscarded?r="restore":i.type&&(r=i.type.replace(/_/g,"-"))),{name:t,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},m=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const i=new PerformanceObserver(t=>{Promise.resolve().then(()=>{e(t.getEntries())})});return i.observe({type:t,buffered:!0,...n}),i}}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],D=(t,e={})=>{S(()=>{const n=C();let i,r=f("FCP");const o=m("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime{r=f("FCP"),i=l(t,r,L,e.reportAllChanges),d(()=>{r.value=performance.now()-n.timeStamp,i(!0)})}))})},b=[.1,.25],T=t=>t.find(t=>1===t.node?.nodeType)||t[0];let B=0,x=1/0,M=0;const _=t=>{for(const e of t)e.interactionId&&(x=Math.min(x,e.interactionId),M=Math.max(M,e.interactionId),B=M?(M-x)/7+1:0)};let z;const A=()=>z?B:performance.interactionCount??0;let E=0;class P{l=[];h=new Map;m;p;v(){E=A(),this.l.length=0,this.h.clear()}M(){const t=Math.min(this.l.length-1,Math.floor((A()-E)/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})}))},I=[200,500];class q{m;u(t){this.m?.(t)}}const U=[2500,4e3],j=[800,1800],H=t=>{document.prerendering?S(()=>H(t)):"complete"!==document.readyState?addEventListener("load",()=>H(t),!0):setTimeout(t)},k={TRACKING_ACCEPTED:"trackingConsentAccepted",TRACKING_DECLINED:"trackingConsentDeclined",MARKETING_ACCEPTED:"firstPartyMarketingConsentAccepted",SALE_OF_DATA_ACCEPTED:"thirdPartyMarketingConsentAccepted",ANALYTICS_ACCEPTED:"analyticsConsentAccepted",PREFERENCES_ACCEPTED:"preferencesConsentAccepted",MARKETING_DECLINED:"firstPartyMarketingConsentDeclined",SALE_OF_DATA_DECLINED:"thirdPartyMarketingConsentDeclined",ANALYTICS_DECLINED:"analyticsConsentDeclined",PREFERENCES_DECLINED:"preferencesConsentDeclined",CONSENT_COLLECTED:"visitorConsentCollected",CONSENT_TRACKING_API_LOADED:"consentTrackingApiLoaded"},K="",O="1",Z="0",W="p",R="a",F="m",X="t",J="m",V="a",Y="p",G="s",$=()=>"undefined"==typeof window;function Q(t){try{return decodeURIComponent(t)}catch(t){return""}}function tt(t,e=!1){const n=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let e=0;e{});console.log("Monorail event from consent API:",i,n)}catch(t){}}}function nt(){var t,e;return $()?{}:(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.config)||{}}et.instance=void 0;function it(t){try{return t()}catch{return}}function rt(){var t,e;if(!lt()&&!function(){try{const t=performance.getEntriesByType("navigation")[0].serverTiming;return!!t&&0!=t.length}catch{return!1}}()){const t=new et;let e="failed_to_fetch";try{e=navigator.userAgent}catch{}t.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:e})),function(){if(lt())return;const t=ct();t.Shopify||(t.Shopify={});t.Shopify.customerPrivacy||(t.Shopify.customerPrivacy={});t.Shopify.customerPrivacy.serverTimingSupportVerified=!0}()}const n=null===(t=performance)||void 0===t||null===(e=t.getEntriesByType)||void 0===e?void 0:e.call(t,"navigation");if(!n)return;const i=n.map(st).find(t=>t);if(i)try{sessionStorage.setItem("consentHeader",i)}catch{}return i}let ot;function at(){var t,e;const n=null===(t=performance)||void 0===t||null===(e=t.getEntriesByType)||void 0===e?void 0:e.call(t,"resource");let i=ot;for(let t=n.length-1;t>=0;t--){let e=st(n[t]);if(e){i=e;break}}return ot=i,i}function st(t){var e,n;if(t)return null===(e=t.serverTiming)||void 0===e||null===(n=e.find(t=>"_cmp"==t.name))||void 0===n?void 0:n.description}function ct(){return window}function ut(){var t,e;const n=ct();return!0===(null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.backendConsentEnabled)||!0===nt().isHeadless}function lt(){var t,e;const n=ct();return null==n||null===(t=n.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.serverTimingSupportVerified}function dt(){if(!$()){var t,e;const n=(null===(t=window.Shopify)||void 0===t||null===(e=t.customerPrivacy)||void 0===e?void 0:e.injectedConsent)||nt().injectedConsent;return n?Q(n):void 0}}function ht(){let t;if(t=$()?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||tt("_tracking_consent")||function(){let t;if(t=ut()&&it(at)||it(rt),!t){let t;try{t=sessionStorage.getItem("consentHeader")}catch{}return t||void 0}try{t=decodeURIComponent(t)}catch{}return t}(),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 e=t.slice(1).split("_"),[n,i,r,o,a]=e;let s,c;try{s=e[5]?JSON.parse(e.slice(5).join("_")):void 0}catch{}if(a){const t=a.replace(/\*/g,"/").replace(/-/g,"+"),e=atob(t);let n="";for(let t=0;tt.slice(0,e)+"-"+t.slice(e),n)}function u(t){const e=n.split(".")[0];return e.includes(t.toLowerCase())?Z:e.includes(t.toUpperCase())?O:K}function l(t){return n.includes(t.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[V]:u(V),[Y]:u(Y),[J]:u(J),[G]:u(G)}},region:i||"",cus:s,purposes:{[R]:l(R),[W]:l(W),[F]:l(F),[X]:l(X)},sale_of_data_region:"t"==o,display_banner:"t"==r,consent_id:c}}(t);return}(t)}function ft(t){const e=function(){try{let t=ht();if(!t)return;return t}catch{return}}();if(!e||!e.purposes)return!0;const n=e.purposes[t];return"boolean"!=typeof n||n}function mt(){return ft(R)}const pt={},gt=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/;function vt(t,e){if(ut()){const t=function(t){try{var e,n;const o=null===(e=performance)||void 0===e||null===(n=e.getEntriesByType)||void 0===n?void 0:n.call(e,"resource");if(o){const e=window.location.host;for(let n=o.length-1;n>=0;n--){var i,r;const a=o[n];if("fetch"!==a.initiatorType)continue;const s=a.name.match(gt);if(!s)continue;const[,c,u]=s;if(!(c===e||u&&(null==c?void 0:c.endsWith(`.${e}`))))continue;const l=null===(i=a.serverTiming)||void 0===i||null===(r=i.find(e=>e.name===t))||void 0===r?void 0:r.description;if(l)return pt[t]=l,l}}return pt[t]}catch{return pt[t]}}(e);if(t)return t}const n=function(t){try{var e,n,i,r;return null===(e=performance)||void 0===e||null===(n=e.getEntriesByType("navigation")[0])||void 0===n||null===(i=n.serverTiming)||void 0===i||null===(r=i.find(e=>e.name==t))||void 0===r?void 0:r.description}catch{return}}(e);return n||function(t){try{var e,n,i,r;return null===(e=document.cookie)||void 0===e||null===(n=e.split(";"))||void 0===n||null===(i=n.find(e=>e.includes(t)))||void 0===i||null===(r=i.split("=")[1])||void 0===r?void 0:r.trim()}catch{return}}(t)}function yt(){return vt("_shopify_y","_y")}function wt(){return vt("_shopify_s","_s")}function Ct(){return mt()}function St(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var Lt=0;function Dt(t){return"__private_"+Lt+++"_"+t}function bt(t){return Object.entries(t).map(([t,e])=>({key:t,value:{stringValue:String(e)}}))}function Tt(t){if(Array.isArray(t))return{arrayValue:{values:t.map(t=>Tt(t))}};switch(typeof t){case"boolean":return{boolValue:Boolean(t)};case"number":return{doubleValue:Number(t)};default:return{stringValue:String(t)}}}const Bt=function(t,e,n){const i=[0];for(let r=0;r{t.attributes={...St(this,Mt)[Mt],...t.attributes}});const t=St(this,_t)[_t];St(this,_t)[_t]=[],await this.exportByKeepalive(t,(t,e)=>St(this,xt)[xt].exportMetrics(this.aggregateMetrics(t),e))}async exportLogs(){const t=St(this,zt)[zt];St(this,zt)[zt]=[],await this.exportByKeepalive(t,(t,e)=>St(this,xt)[xt].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:i,value:r,unit:o,timeUnixNano:a,attributes:s}=e,c=null!==(n=e.bounds)&&void 0!==n?n:Bt,u=new Array(c.length+1).fill(0);t[i]||={name:i,unit:o||"1",histogram:{aggregationTemporality:1,dataPoints:[]}};for(let t=0;t0?d:0,bucketCounts:i>0?[1]:[]};t[n].exponentialHistogram.dataPoints.push({attributes:bt(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:i,unit:r,timeUnixNano:o,attributes:a}=e;t[n]||={name:n,unit:r||"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}},t[n].sum.dataPoints.push({startTimeUnixNano:o,timeUnixNano:o,asDouble:i,attributes:bt(null!=a?a:{})})}(e,t);break;case"gauge":!function(t,e){const{name:n,value:i,unit:r,timeUnixNano:o,attributes:a}=e;t[n]||={name:n,unit:r||"1",gauge:{dataPoints:[]}},t[n].gauge.dataPoints.push({startTimeUnixNano:o,timeUnixNano:o,asDouble:i,attributes:bt(null!=a?a:{})})}(e,t)}}),Object.values(e)}async exportByKeepalive(t,e){if(0===t.length)return;const n=[],i=[];t.forEach(t=>{var e;null===(e=t.requiresKeepalive)||void 0===e||e?n.push(t):i.push(t)});const r=[n.length>0?e(n,{keepalive:!0}):void 0,i.length>0?e(i,{keepalive:!1}):void 0].filter(t=>void 0!==t);await Promise.all(r)}formatLogs(t){return t.map(t=>{const e={timeUnixNano:t.timeUnixNano,observedTimeUnixNano:t.timeUnixNano,attributes:(n={...St(this,Mt)[Mt],...t.attributes},Object.entries(n).map(([t,e])=>({key:t,value:Tt(e)})))};var n;return t.body&&(e.body={stringValue:t.body}),e})}}var Et=Dt("url"),Pt=Dt("serviceName"),Nt=Dt("logger"),It=Dt("fetchFn"),qt=Dt("maxPayloadSizeBytes");class Ut{constructor(t,e,n){var i;Object.defineProperty(this,Et,{writable:!0,value:void 0}),Object.defineProperty(this,Pt,{writable:!0,value:void 0}),Object.defineProperty(this,Nt,{writable:!0,value:void 0}),Object.defineProperty(this,It,{writable:!0,value:void 0}),Object.defineProperty(this,qt,{writable:!0,value:void 0}),St(this,Et)[Et]=t.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),St(this,Pt)[Pt]=e,St(this,Nt)[Nt]=null==n?void 0:n.logger,St(this,It)[It]=null==n?void 0:n.fetchFn,St(this,qt)[qt]=null!==(i=null==n?void 0:n.maxPayloadSizeBytes)&&void 0!==i?i:51200}async exportMetrics(t,e){var n;const i=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:St(this,Pt)[Pt]}}]},scopeMetrics:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},metrics:t}]}]}),i)}async exportLogs(t,e){var n;const i=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:St(this,Pt)[Pt]}}]},scopeLogs:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},logRecords:t}]}]}),i)}async exportTo(t,e,n){var i;const r=JSON.stringify(t),o=(new TextEncoder).encode(r).length;if(o>St(this,qt)[qt])throw new Ht(`Payload size ${o} exceeds ${St(this,qt)[qt]} bytes`);const a=await this.exporterFetch()(`${St(this,Et)[Et]}${e}`,{method:"POST",keepalive:n,headers:{"Content-Type":"application/json"},body:r});if(null===(i=St(this,Nt)[Nt])||void 0===i||i.log({status:a.status}),!a.ok){if(400===a.status){const t=await a.text();throw new jt(`Invalid OpenTelemetry Data: ${t}`)}if(429===a.status||503===a.status){const e=await a.text(),n=a.headers.get("Retry-After"),i=n?{seconds:Number(n)}:void 0;throw new jt("Server did not accept data",{errorData:e,retryAfter:i,body:t})}if(401===a.status||403===a.status){const e=await a.text();throw new kt(`Authentication failed: ${a.status} ${401===a.status?"Unauthorized":"Forbidden"}`,{errorData:e,body:t})}throw new jt(`Server responded with ${a.status}`)}}exporterFetch(){return St(this,It)[It]||fetch}async exportBatches(t,e,n,i){let r=e.length;for(;e.length>0;)try{const o=e.slice(0,r);await this.exportTo(n(o),t,i),e.splice(0,r)}catch(t){if(!(t instanceof Ht&&r>1))throw t;r=Math.ceil(r/2)}}}class jt extends Error{constructor(t,e){super(t),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=e}}class Ht extends Error{constructor(...t){super(...t),this.name="PayloadTooLargeError"}}class kt extends Error{constructor(t,e){super(t),this.name="AuthenticationFailedError",this.metadata=void 0,this.name="AuthenticationFailedError",this.metadata=e}}function Kt(){var t=["ndvpwwPrrKC","mte2nJa0nfDgEK9ZEG","odi4nJu5m3nWAeflAa","m1j0yu1qyq","nK5gBLbnEG","mJK5mtu0tNL4DvjQ","mti4nti5nLr3yu90qq","mtm1ndiZogDiCLjxtq","mtvQuhLgu3i","mtKYv255y0LV","mtK3oduXnKLzufPMvq","mZaWndK5mgTmzwn4Aa"];return(Kt=function(){return t})()}function Ot(t,e){var n=Kt();return Ot=function(e,i){var r=n[e-=384];if(void 0===Ot.CDQxWv){Ot.gMhZsO=function(t){for(var e,n,i="",r="",o=0,a=0;n=t.charAt(a++);~n&&(e=o%4?64*e+n:n,o++%4)?i+=String.fromCharCode(255&e>>(-2*o&6)):0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(var s=0,c=i.length;s=this[Wt(471)]))try{await this[Wt(485)][Wt(479)]()}catch(t){this[Wt(484)]&&console[Wt(477)](Wt(493)+t)}}[Wt(487)](){this[Wt(490)]&&clearTimeout(this[Wt(490)]),this[Wt(490)]=window[Wt(486)](()=>{this[Wt(470)]()[Wt(478)](()=>{})},this[Wt(491)])}}function Wt(t,e){const n=Rt();return Wt=function(e,i){let r=n[e-=469];if(void 0===Wt.EZoQXk){Wt.TBbvPD=function(t){let e="",n="";for(let n,i,r=0,o=0;i=t.charAt(o++);~i&&(n=r%4?64*n+i:i,r++%4)?e+=String.fromCharCode(255&n>>(-2*r&6)):0)i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);for(let t=0,i=e.length;t>(-2*r&6)):0)i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);for(let t=0,i=e.length;tt+e.s,0)/t[ue(440)],n=t[ue(285)]((t,n)=>t+(n.s-e)**2,0)/(t[ue(440)]-1),i=Math[ue(310)](n);return{speed:e,jitter:i}}function ee(t,e,n,i,r,o,a,s,c,u,l,d,h){const f=Math[ue(427)](1e3,t),m=Math[ue(427)](1e3,n),p=Math[ue(427)](1e3,o),g=Math[ue(427)](1e3,s),v=Math[ue(427)](1e3,a),y=Math[ue(427)](1e3,c),w=[];if(e[ue(440)]>=3)for(let t=1;t5e-4){e=!0;break}n=i.s}else n=i.s;return e}(w),S=function(t){if(t[ue(440)]<3)return 0;let e=0,n=0;for(let i=1;i2*Math.PI-Math.PI/12)&&e++,n++}return n>0?e/n:0}(e),{speed:L,jitter:D}=te(w);let b=0,T=0;if(i[ue(440)]>1){const t=new Set(i[ue(505)](t=>Math[ue(306)](t.x/20)+","+Math[ue(306)](t.y/20)))[ue(322)];b=t>1?1:0,T=i[ue(285)]((t,e)=>t+e[ue(319)],0)/i[ue(440)]}const B=r[ue(285)]((t,e)=>(null===e[ue(350)]||t[ue(283)](e[ue(350)]),t),[]),{rhythmConsistency:x,jitter:M}=function(t){if(t[ue(440)]<2)return{rhythmConsistency:0,jitter:0};const e=t[ue(285)]((t,e)=>t+e,0)/t[ue(440)],n=t[ue(285)]((t,n)=>(t??0)+((n??0)-e)**2,0)/t[ue(440)],i=Math[ue(310)](n);return{rhythmConsistency:0===i?1:Math[ue(501)](0,1-i/e),jitter:i/e}}(B),_=B[ue(440)]>0?B[ue(285)]((t,e)=>t+e,0)/B[ue(440)]:0,z=[];if(u[ue(440)]>=3)for(let t=1;tu[t-1].p?ue(444):"up";z[ue(283)]({s:i,dir:r,t:u[t].t})}const{speed:A,jitter:E}=te(z),P=function(t){if(t[ue(440)]<2)return 0;let e=0;for(let n=1;n=500&&t[i].t-n>=500&&(e++,n=t[i].t);return e}(z)),{speed:I,jitter:q}=te(l),U=function(t){if(t[ue(440)]<2)return 0;let e=0;for(let n=1;n=500&&e++;return e}(l)),H=Math[ue(306)]((h-d)/1e3);return{ma:f,ca:m,ka:p,sa:g,ta:y,kba:v,t:Math[ue(427)](3600,H),nm:C?1:0,ms:ie(S),mj:ie(D),msp:ie(L),vc:b,cp:ie(T),rc:ie(x),kj:ie(M),ki:ie(_),ss:ie(A),sj:ie(E),ssm:ie(P),sp:N,ts:ie(I),tj:ie(q),tp:j,tsm:ie(U)}}function ne(t,e){let n=0;return(...i)=>{const r=typeof performance!==ue(395)?performance[ue(398)]():Date[ue(398)]();r-n>=e&&(n=r,t(...i))}}function ie(t){return Math[ue(360)](100*t)/100}function re(t){return{wd:t[ue(380)],ua:t[ue(498)],cf:t[ue(403)],be:t[ue(486)],nm:t[ue(278)],nc:t[ue(327)],ka:t[ue(428)],sa:t[ue(451)],ta:t[ue(429)],pt:t[ue(349)],mp:t[ue(361)],sd:t[ue(323)]}}class oe{[ue(503)];[ue(469)];[ue(389)];[ue(436)];[ue(388)];[ue(443)]=null;constructor(t,e,n=Qt()){const i={shopId:0,updateInterval:5e3,debug:!1,beaconEndpoint:Gt,beaconRetryLimit:3,maxSilenceMs:18e5,exportWithFetch:!1,logsSampleRate:1,candidateSignalsEnabled:!1,candidateUpdateInterval:5e3,candidateSampleRate:100};this[ue(503)]={...i,...e},this[ue(389)]=n,this[ue(436)]=t,this[ue(469)]={startTime:Date[ue(398)](),lastUpdateTime:null,environmentChecked:!1,sessionData:null,mouseActivity:0,clickActivity:0,keyActivity:0,keyboardBurstActivity:0,scrollActivity:0,touchActivity:0,mousePositions:[],clickPositions:[],keyEvents:[],scrollEvents:[],keyboardBursts:[],touchEvents:[],lastTouchEvent:null};const r=this[ue(450)]();this[ue(469)][ue(272)]={lastSignals:r,lastProcessTime:0,lastSuccessfulSendTime:0,retryCount:0},this[ue(388)]=(this[ue(503)][ue(375)],this[ue(503)][ue(261)],this[ue(389)][ue(468)],this[ue(389)][ue(464)],this[ue(503)][ue(466)],this[ue(503)][ue(434)],null)}[ue(482)](){this[ue(379)](),(async()=>{await this[ue(404)](),await this[ue(500)](!0),this[ue(389)][ue(464)][ue(470)](()=>{this[ue(340)]()},100);const t=()=>{const e=Date[ue(398)](),n=e-(this[ue(469)][ue(321)]||e),i=Math[ue(501)](0,this[ue(503)][ue(431)]-n),r=()=>{this[ue(389)][ue(464)][ue(367)]?this[ue(469)][ue(406)]=this[ue(389)][ue(464)][ue(367)](()=>{this[ue(500)]()[ue(263)](()=>this[ue(436)][ue(260)]())[ue(263)](()=>{t()})},{timeout:2e3}):this[ue(500)]()[ue(263)](()=>this[ue(436)][ue(260)]())[ue(263)](()=>{t()})};i>0?this[ue(389)][ue(464)][ue(470)](r,i):r()};t()})()[ue(267)](t=>{this[ue(436)][ue(312)](t,ue(482))})}[ue(284)](){this[ue(368)]();try{this[ue(388)]?.[ue(284)]()}catch(t){this[ue(436)][ue(312)](t,ue(269))}this[ue(469)][ue(483)]&&this[ue(389)][ue(464)][ue(410)](this[ue(469)][ue(483)]),this[ue(469)][ue(406)]&&this[ue(389)][ue(464)][ue(264)]&&this[ue(389)][ue(464)][ue(264)](this[ue(469)][ue(406)]),this[ue(469)][ue(326)]&&(this[ue(389)][ue(468)][ue(399)](ue(365),this[ue(469)][ue(326)][ue(365)]),this[ue(389)][ue(468)][ue(399)](ue(291),this[ue(469)][ue(326)][ue(291)]),this[ue(389)][ue(468)][ue(399)](ue(420),this[ue(469)][ue(326)][ue(420)]),this[ue(389)][ue(468)][ue(399)](ue(316),this[ue(469)][ue(326)][ue(316)]),ue(415)in window&&this[ue(469)][ue(326)][ue(331)]&&this[ue(469)][ue(326)][ue(362)]&&this[ue(469)][ue(326)][ue(432)]&&(this[ue(389)][ue(468)][ue(399)](ue(331),this[ue(469)][ue(326)][ue(331)]),this[ue(389)][ue(468)][ue(399)](ue(362),this[ue(469)][ue(326)][ue(362)]),this[ue(389)][ue(468)][ue(399)](ue(432),this[ue(469)][ue(326)][ue(432)]))),this[ue(469)][ue(272)]?.[ue(394)]&&this[ue(389)][ue(464)][ue(410)](this[ue(469)][ue(272)][ue(394)]),this[ue(469)][ue(272)]=void 0}[ue(363)](){return this[ue(469)][ue(272)]?.[ue(348)]?re(this[ue(469)][ue(272)][ue(348)]):null}[ue(459)](){return this[ue(388)]?.[ue(363)]()??null}[ue(298)](){return this[ue(388)]?.[ue(390)]()??null}[ue(404)](){const t={wd:this[ue(389)][ue(491)][ue(288)]?1:0,ua:/bot|crawler|spider|scraper/i[ue(330)](this[ue(389)][ue(491)][ue(472)])?0:1,cv:this[ue(371)]()?1:0,br:this[ue(418)]()?1:0};return this[ue(469)][ue(393)]=t,this[ue(469)][ue(357)]=!0,t}[ue(371)](){try{const t=this[ue(389)][ue(468)][ue(271)](ue(419));t[ue(351)]=200,t[ue(282)]=50;const e=t[ue(453)]("2d");if(null===e)return!1;const n=e[ue(416)](0,0,200,0);n[ue(438)](0,ue(397)),n[ue(438)](1,ue(417)),e[ue(467)]=n,e[ue(268)](0,0,200,50),e[ue(467)]=ue(313),e[ue(281)]=ue(352),e[ue(381)](ue(480),33,30);const i=t[ue(454)]();return Boolean(i&&i[ue(440)]>50)}catch(t){return!1}}[ue(418)](){let t=0;this[ue(389)][ue(491)][ue(293)]&&this[ue(389)][ue(491)][ue(293)][ue(440)]>0&&t++,(this[ue(389)][ue(491)][ue(439)]&&this[ue(389)][ue(491)][ue(439)][ue(440)]>0||this[ue(389)][ue(491)][ue(472)][ue(455)](ue(421)))&&t++,this[ue(356)]()&&t++,typeof this[ue(389)][ue(464)][ue(461)]!==ue(395)&&t++;try{const e=(new Date)[ue(290)]();e>-840&&e<840&&t++}catch(t){}return t>=3}[ue(356)](){const t=this[ue(389)][ue(464)][ue(478)]||this[ue(389)][ue(468)][ue(485)][ue(495)],e=this[ue(389)][ue(464)][ue(346)]||this[ue(389)][ue(468)][ue(485)][ue(307)];if(!t||!e)return!1;if(t<=2||e<=2)return!1;const n=t/e;return n>=.2&&n<=5}[ue(301)](t,e){return n=>{try{t(n)}catch(t){this[ue(436)][ue(312)](t,ue(332)+e)}}}[ue(340)](){const t=ne(this[ue(301)](t=>{this[ue(469)][ue(309)]++,this[ue(469)][ue(384)][ue(440)]>=10&&this[ue(469)][ue(384)][ue(336)](),this[ue(469)][ue(384)][ue(283)]({x:t[ue(354)],y:t[ue(462)],t:t[ue(490)]})},ue(365)),100),e=this[ue(301)](t=>{this[ue(469)][ue(494)]++,requestAnimationFrame(()=>setTimeout(()=>{this[ue(469)][ue(409)][ue(440)]>=5&&this[ue(469)][ue(409)][ue(336)](),this[ue(469)][ue(409)][ue(283)]({x:t[ue(354)],y:t[ue(462)],t:t[ue(490)],pre:this[ue(407)](t)})},0))},ue(291)),n=this[ue(301)](t=>{this[ue(469)][ue(481)]++;const e=t[ue(297)];if([ue(287),ue(274),ue(471),ue(386)][ue(455)](e))return;const n=this[ue(469)][ue(337)][this[ue(469)][ue(337)][ue(440)]-1],i=t[ue(490)],r=n?i-n.t:null;this[ue(469)][ue(337)][ue(440)]>=10&&this[ue(469)][ue(337)][ue(336)](),this[ue(469)][ue(337)][ue(283)]({_0x17927a:e,t:i,int:r}),null!==r&&r<100?(this[ue(469)][ue(383)][ue(283)](r),this[ue(469)][ue(383)][ue(440)]>=5&&(this[ue(469)][ue(304)]++,this[ue(469)][ue(383)]=[])):this[ue(469)][ue(383)]=[]},ue(420)),i=ne(this[ue(301)](t=>{this[ue(469)][ue(315)]++;const e=t[ue(490)],n=window[ue(299)];this[ue(469)][ue(392)][ue(440)]>=10&&this[ue(469)][ue(392)][ue(336)](),this[ue(469)][ue(392)][ue(283)]({p:n,t:e})},ue(316)),200),r=this[ue(301)](t=>{t[ue(435)]&&0!==t[ue(435)][ue(440)]&&(this[ue(469)][ue(497)]++,this[ue(469)][ue(488)][ue(440)]>=10&&this[ue(469)][ue(488)][ue(336)](),this[ue(469)][ue(296)]={x:t[ue(435)][0][ue(354)],y:t[ue(435)][0][ue(462)],t:t[ue(490)],typ:ue(484),s:0,d:0})},ue(331)),o=ne(this[ue(301)](t=>{if(!t[ue(435)]||0===t[ue(435)][ue(440)])return;const e={x:t[ue(435)][0][ue(354)],y:t[ue(435)][0][ue(462)]};if(this[ue(469)][ue(296)]){const n=this[ue(422)](this[ue(469)][ue(296)],e);this[ue(469)][ue(488)][ue(440)]>=10&&this[ue(469)][ue(488)][ue(336)]();const i={x:t[ue(435)][0][ue(354)],y:t[ue(435)][0][ue(462)],t:t[ue(490)],typ:ue(423),d:n,s:n/(t[ue(490)]-this[ue(469)][ue(296)].t)};this[ue(469)][ue(488)][ue(283)](i),this[ue(469)][ue(296)]=i}else{const e={x:t[ue(435)][0][ue(354)],y:t[ue(435)][0][ue(462)],t:t[ue(490)],typ:ue(423),s:0,d:0};this[ue(469)][ue(296)]=e}},ue(362)),200),a=this[ue(301)](t=>{this[ue(469)][ue(296)]=null},ue(432));this[ue(389)][ue(468)][ue(475)](ue(365),t,{passive:!0}),this[ue(389)][ue(468)][ue(475)](ue(291),e,{passive:!0}),this[ue(389)][ue(468)][ue(475)](ue(420),n,{passive:!0}),this[ue(389)][ue(468)][ue(475)](ue(316),i,{passive:!0}),ue(415)in window&&(this[ue(389)][ue(468)][ue(475)](ue(331),r,{passive:!0}),this[ue(389)][ue(468)][ue(475)](ue(362),o,{passive:!0}),this[ue(389)][ue(468)][ue(475)](ue(432),a,{passive:!0})),this[ue(469)][ue(326)]={mousemove:t,click:e,keydown:n,scroll:i,touchstart:r,touchmove:o,touchend:a}}async[ue(500)](t=!1){this[ue(493)](t),await this[ue(463)]({includeCandidateSignals:!t}),this[ue(469)][ue(321)]=Date[ue(398)]()}[ue(493)](t=!1){const e=Date[ue(398)]();let n=Math[ue(306)]((e-this[ue(469)][ue(334)])/1e3);null!==this[ue(469)][ue(321)]&&(n=Math[ue(306)]((e-this[ue(469)][ue(321)])/1e3)),this[ue(469)][ue(378)]?(this[ue(469)][ue(378)][ue(442)]+=t?1:0,this[ue(469)][ue(378)][ue(333)]+=n):this[ue(469)][ue(378)]={pageCount:1,sessionStart:this[ue(469)][ue(334)],duration:0}}[ue(477)](t,e=!1){this[ue(436)][ue(387)](ue(270)+t,e)}[ue(450)](){try{if(this[ue(389)][ue(464)][ue(308)]){const e=this[ue(389)][ue(464)][ue(308)][ue(424)]($t);if(e){const n=JSON[ue(473)](e);let i;return ue(380)in n?i=n:i={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},i}}}catch(t){}var t;return null}[ue(300)](t){try{this[ue(389)][ue(464)][ue(308)]&&this[ue(389)][ue(464)][ue(308)][ue(408)]($t,JSON[ue(328)](re(t)))}catch(t){}}[ue(407)](t){const e=t[ue(448)];if(!(e&&e instanceof Element&&e[ue(376)]))return 0;const n=e[ue(376)]();if(!n[ue(351)]||!n[ue(282)])return 0;const i=n[ue(502)]+n[ue(351)]/2,r=n[ue(294)]+n[ue(282)]/2,o=this[ue(422)]({x:t[ue(354)],y:t[ue(462)]},{x:i,y:r}),a=Math[ue(310)](n[ue(351)]**2+n[ue(282)]**2)/2;return a>0?Math[ue(501)](0,1-o/a):0}[ue(422)](t,e){return Math[ue(310)]((e.x-t.x)**2+(e.y-t.y)**2)}[ue(266)](t){if(t[ue(366)](ue(265))||t[ue(366)](ue(355)))return t;return""+(this[ue(389)][ue(464)][ue(338)][ue(289)]||this[ue(389)][ue(464)][ue(338)][ue(276)]+"//"+this[ue(389)][ue(464)][ue(338)][ue(465)])+t}[ue(379)](){if(this[ue(388)])try{if(null!==this[ue(503)][ue(492)]&&!this[ue(405)]())return this[ue(443)]=()=>{if(this[ue(405)]()){this[ue(368)]();try{this[ue(388)]?.[ue(484)]()}catch(t){this[ue(436)][ue(312)](t,ue(318))}}},void this[ue(389)][ue(468)][ue(475)](k[ue(445)],this[ue(443)]);this[ue(388)][ue(484)]()}catch(t){this[ue(436)][ue(312)](t,ue(318))}}[ue(405)](){try{return Ct()}catch{return!1}}[ue(368)](){this[ue(443)]&&(this[ue(389)][ue(468)][ue(399)](k[ue(445)],this[ue(443)]),this[ue(443)]=null)}[ue(374)](){if(!this[ue(388)])return!1;try{return Ct()&&Boolean(wt())}catch(t){return this[ue(436)][ue(312)](t,ue(262)),!1}}[ue(275)](){if(this[ue(374)]())try{return this[ue(298)]()??void 0}catch(t){return void this[ue(436)][ue(312)](t,ue(314))}}[ue(413)](t){return!(!this[ue(469)][ue(272)]||null===this[ue(503)][ue(492)]||!this[ue(374)]())&&(this[ue(463)]({lifecycleCandidateSignals:t})[ue(267)](t=>{this[ue(436)][ue(312)](t,ue(457))}),!0)}async[ue(329)](t,e,n={}){if(!this[ue(469)][ue(272)])return;const i=n[ue(447)]??!0,r=n[ue(411)]??!0;if(null===this[ue(503)][ue(492)])return void(i&&(this[ue(469)][ue(272)][ue(458)]=Date[ue(398)]()));let o;!1!==n[ue(425)]&&(void 0===n[ue(474)]?o=this[ue(275)]():this[ue(374)]()&&(o=n[ue(474)]));const a=function(t,e,n,i){return{v:void 0===i?1:2,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!==i&&{c:i}}}(0,re(t),e,o),s=JSON[ue(328)](a),c=this[ue(266)](this[ue(503)][ue(492)]);if(void 0!==o&&this[ue(388)]?.[ue(370)](o),this[ue(389)][ue(491)][ue(329)]&&(!this[ue(503)][ue(430)]||n[ue(499)]))try{const t=new Blob([s],{type:ue(305)});if(this[ue(389)][ue(491)][ue(329)](c,t))return r&&(this[ue(469)][ue(272)][ue(345)]=0),void(i&&(this[ue(469)][ue(272)][ue(458)]=Date[ue(398)]()))}catch(t){}try{const t=await fetch(c,{method:ue(347),headers:{"Content-Type":ue(305)},body:s,credentials:ue(391),keepalive:!0});if(!t.ok)throw new Error(ue(456)+t[ue(258)]);r&&(this[ue(469)][ue(272)][ue(345)]=0),i&&(this[ue(469)][ue(272)][ue(458)]=Date[ue(398)]())}catch(n){r?this[ue(400)](t,e,o):void 0!==o&&this[ue(388)]?.[ue(311)](o)}}[ue(400)](t,e,n){if(!this[ue(469)][ue(272)]||this[ue(469)][ue(272)][ue(345)]>=this[ue(503)][ue(286)])return void(void 0!==n&&this[ue(388)]?.[ue(311)](n));const i=Math[ue(427)](1e3*2**this[ue(469)][ue(272)][ue(345)],3e4);this[ue(469)][ue(272)][ue(345)]++,this[ue(469)][ue(272)][ue(394)]=this[ue(389)][ue(464)][ue(470)](()=>{this[ue(469)][ue(272)]&&this[ue(329)](t,e)},i)}async[ue(463)](t={}){if(!this[ue(469)][ue(272)])return;const e=ee(this[ue(469)][ue(309)],this[ue(469)][ue(384)],this[ue(469)][ue(494)],this[ue(469)][ue(409)],this[ue(469)][ue(337)],this[ue(469)][ue(481)],this[ue(469)][ue(304)],this[ue(469)][ue(315)],this[ue(469)][ue(497)],this[ue(469)][ue(392)],this[ue(469)][ue(488)],this[ue(469)][ue(334)],Date[ue(398)]()),n=function(t,e,n,i){const r={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&&(r[ue(278)]=!0),e.ca>0&&1===e.vc&&(r[ue(327)]=!0),e.ka>0&&(r[ue(428)]=!0),e.sa>0&&(r[ue(451)]=!0),e.ta>0&&(r[ue(429)]=!0),e.t>30&&(r[ue(349)]=!0),n&&(n[ue(442)]>1&&(r[ue(361)]=!0),n[ue(333)]>60&&(r[ue(323)]=!0)),i){const t=Object[ue(279)](r);for(const e of t)r[e]=r[e]||i[e]}return r}(this[ue(469)][ue(393)],e,this[ue(469)][ue(378)],this[ue(469)][ue(272)][ue(348)]),i=function(t,e){if(!e)return!0;const n=Object[ue(279)](t);for(const i of n)if(t[i]!==e[i])return!0;return!1}(n,this[ue(469)][ue(272)][ue(348)]),r=Date[ue(398)]()-this[ue(469)][ue(272)][ue(458)],o=r>=this[ue(503)][ue(487)],a=void 0!==t[ue(364)];if(i||o||a){const e=Date[ue(398)]()-this[ue(469)][ue(272)][ue(369)];if(!a&&e<100)return void this[ue(477)](ue(452),!0);if(o&&!i&&this[ue(477)](ue(372)+Math[ue(360)](r/1e3)+ue(479),!0),i&&this[ue(503)][ue(476)]){if(this[ue(469)][ue(272)][ue(348)]){Object[ue(279)](n)[ue(344)](t=>{this[ue(469)][ue(272)][ue(348)][t],n[t]})}else this[ue(477)](ue(449));this[ue(469)][ue(378)]}if(this[ue(469)][ue(272)][ue(348)]=(s=n,{...s}),this[ue(469)][ue(272)][ue(369)]=Date[ue(398)](),this[ue(300)](n),this[ue(503)][ue(433)]&&i)try{this[ue(503)][ue(433)](re(n))}catch(t){this[ue(436)][ue(312)](t,ue(426))}let c=ue(441);i?c=ue(342):o&&(c=ue(358));const u=!i&&!o;await this[ue(329)](n,c,{candidateSignals:t[ue(364)],includeCandidateSignals:t[ue(425)],updateSilenceClock:!u,allowRetry:!u,preferNativeBeacon:u})}else this[ue(503)][ue(476)];var s}}const ae=(t,e)=>({libVersion:"2.4.0",shopId:e||"",hostname:t[ue(464)]?.[ue(338)]?.[ue(277)]||"",url:t[ue(464)]?.[ue(338)]?.[ue(273)]||"",referrer:t[ue(468)]?.[ue(373)]||"",baseURI:t[ue(468)]?.[ue(437)]||"",sessionToken:wt()||"",uniqueToken:yt()||""});function se(t,e){return e>=100||!(e<=0||!t)&&Xt(ue(303)+t)%100>(-2*r&6)):0)i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);for(let t=0,i=e.length;tt.startTime-e.startTime)}getLongAnimationFrames(){if(!fe()){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(fe())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 de=null;function he(t,e=0){if(null===t||!fe()&&!Boolean(window.ShopifyAnalytics?.performance?.getLongAnimationFrames))return me(),null;const n=(de?de.getLongAnimationFrames():[]).map(t=>({startTime:t.startTime-e,endTime:t.endTime-e}));let i=null;for(const e of n){if(e.startTime<=t&&e.endTime>t){i=e;break}if(e.startTime>=t){i=e;break}}if(!i||i.startTime-t>=250)return me(),t;const r=(de?de.getQuietWindowStartCandidates():[]).map(t=>({startTime:t.startTime-e}));let o=t;if(r.length>0)for(const e of r)if(e.startTime>=t){o=e.startTime;break}return me(),o}function fe(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function me(){de&&(de.destroy(),de=null)}function pe(){return PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")}function ge(){return performance.getEntriesByType("long-animation-frame")}let ve=null,ye=!1;function we(){ve=null,ye=!1}const Ce=Object.freeze({shop_domain:`${window.location.origin}/.well-known/shopify/monorail/v1/produce`,global:"https://monorail-edge.shopifysvc.com/v1/produce",canada:"https://monorail-edge-ca.shopifycloud.com/v1/produce",staging:"https://monorail-edge-staging.shopifycloud.com/v1/produce"}),Se=new RegExp(`^${window.location.origin}/((?:(?:[a-z]{2,3}|zh-hans|zh-hant)(?:-[a-zA-Z0-9]+)/)?cart/(add|change|update|clear))`),Le=new RegExp("cart-performance:|add:|change:|clear:|note_update:");var De;function be({monorailRegion:t,schema:e,rawData:n}){const i=Date.now(),r={schema_id:e,payload:e===De.OnUnload?Be(n):xe(n),metadata:{event_created_at_ms:i,event_sent_at_ms:i}},o=Ce[t||""],a=JSON.stringify(r);if(o)if(e!==De.OnUnload){if("function"==typeof window.fetchLater)try{return void window.fetchLater(o,{method:"POST",body:a,headers:{"Content-Type":"text/plain"},credentials:"include"})}catch(t){}Te(o,a)}else!function(t,e){if("function"==typeof window.fetchLater){const n=ve;try{const i=new AbortController;return window.fetchLater(t,{method:"POST",body:e,headers:{"Content-Type":"text/plain"},credentials:"include",signal:i.signal}),ve=i,void n?.abort()}catch(t){if(null!==n)return}}if(ye)return;Te(t,e),ye=!0}(o,a);else console.debug("📡 Monorail: ",JSON.stringify(r,null,2))}function Te(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)}function Be(t){const e=Me(t,["domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","activationStart","firstPaint","visuallyReady","initiatorType","redirectCount","cartAjaxResourceTimings","cartPerformanceMetrics","totalStylingDuration","totalStyleDuration","totalForcedStyleDuration","totalLayoutDuration","totalForcedLayoutDuration","speculations"]);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 xe(t){const e=Me(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 Me(t,e){return e.reduce((e,n)=>{var i;return null!=t[n]&&(e[(i=n,i.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`))]=t[n]),e},{})}function _e(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"}(De||(De={}));function ze(t){return!Number.isFinite(t)||t<=0?0:Math.min(100,Math.floor(t))}function Ae(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}const Ee="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function Pe(){let t="";try{const e=window.crypto,n=new Uint16Array(31);e.getRandomValues(n);let i=0;t=Ee.replace(/[x]/g,t=>{const e=n[i]%16;return i++,("x"===t?e:3&e|8).toString(16)}).toUpperCase()}catch(e){t=Ee.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 Ne=null,Ie=!1,qe=null,Ue=null,je=null,He=!1;class ke{info;config;sampled;onUnloadCounted;cachedQuietWindowStart;constructor(t){this.config=t,this.info={perfKitInit:Date.now(),perfKitVersion:"3.8.3",url:window.location.href,referrer:document.referrer||void 0,microSessionId:Pe(),microSessionCount:0,get sessionToken(){return wt()},get uniqueToken(){return yt()}},this.sampled=100*Math.random()<=(t.resourceTimingSamplingRate??10),this.onUnloadCounted=!1,this.cachedQuietWindowStart=void 0,performance.setResourceTimingBufferSize(1e3)}get performanceMetrics(){return function(t){const e=performance.getEntriesByType("navigation");if(0===e.length)return{};const n=e[0],i=n.activationStart||0,r=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:r,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:_e(n.domInteractive,i),domComplete:_e(n.domComplete,i),domContentLoadedEventStart:_e(n.domContentLoadedEventStart,i),domContentLoadedEventEnd:_e(n.domContentLoadedEventEnd,i),activationStart:Math.round(i),redirectCount:n.redirectCount,initiatorType:n.initiatorType,transferSize:n.transferSize}}(this.info.perfKitInit)}}function Ke(t){if(Ne=t,Ue=new ke(t),je=null,Ie=!1,qe=window.location.pathname,Oe.clear(),we(),de||(de=new le),t.spaMode&&void 0===window.PerfKit&&(window.PerfKit={navigate:()=>{if(!Ne?.spaMode||!Ue)return;const t=window.location.href,e=window.location.pathname;qe!==e?(qe=e,Ie?Ue.info.url=t:(Ze(),Ue=new ke(Ne),Oe.clear(),we(),Ie=!0)):Ue.info.url=t},setPageType:t=>{Ne?.spaMode&&(Ne.storefrontData.pageType=t)},setConsent:t=>{je=t}},document.addEventListener("shopify:page:view",t=>{window.PerfKit.navigate(),t.page?.url&&Ue&&(Ue.info.url=t.page.url),t.page?.template&&window.PerfKit.setPageType(t.page.template)},!0)),t.shs&&!t.spaMode){const e=t.shsCandidateSampleRate??0;((t,e=Qt(),n=new Ut(Vt,Yt))=>{const i=new At({exporter:n,attributes:ae(e,t?.[ue(339)])}),r=wt(),o=r?Xt(r):void 0,a=new Zt(t?.[ue(476)]||!1,i,t?.[ue(325)]||1,o),s={...t,candidateSignalsEnabled:(t?.[ue(375)]??!1)&&se(r,t?.[ue(446)]??100)},c=new oe(a,s,e);e[ue(468)][ue(489)]===ue(412)?e[ue(468)][ue(475)](ue(402),()=>c[ue(482)]()):c[ue(482)]()})({debug:!1,shopId:t.storefrontData.shopId,exportWithFetch:t.shsExportWithFetch||!0,logsSampleRate:t.shsLogsSampleRate,candidateSignalsEnabled:e>0,candidateSampleRate:e,...e>0&&void 0!==t.shsCandidateMask&&{candidateMask:t.shsCandidateMask},...t.shsBeaconEndpoint&&{beaconEndpoint:t.shsBeaconEndpoint}})}}const Oe=new Set;function Ze(){if(null!==Ue){if(!Fe()&&We()&&Oe.size>0){let t={};for(const e of Oe)t={...t,...e};const e=t.firstContentfulPaint??null;if(null!==e&&void 0===Ue.cachedQuietWindowStart){const t=performance.getEntriesByType("navigation")[0]?.activationStart||0;Ue.cachedQuietWindowStart=he(e,t)}void 0!==Ue.cachedQuietWindowStart&&null!==Ue.cachedQuietWindowStart&&(t.quietWindowStart=Math.round(Ue.cachedQuietWindowStart));const n=function(){if(!pe())return null;const t=ge();let e=0;for(const n of t){e+=n.styleAndLayoutStart?n.startTime+n.duration-n.styleAndLayoutStart:0;for(const t of n.scripts)e+=t.forcedStyleAndLayoutDuration}return e}();null!==n&&(t.totalStylingDuration=Math.round(n));const i=function(){if(!pe())return null;const t=ge();if(0===t.length)return null;if("number"!=typeof t[0].styleDuration)return null;let e=0,n=0,i=0,r=0;for(const o of t){const t=o;e+=t.styleDuration??0,i+=t.layoutDuration??0;for(const t of o.scripts){const e=t;n+=e.forcedStyleDuration??0,r+=e.forcedLayoutDuration??0}}return{totalStyleDuration:e,totalForcedStyleDuration:n,totalLayoutDuration:i,totalForcedLayoutDuration:r}}();null!==i&&(t.totalStyleDuration=Math.round(i.totalStyleDuration),t.totalForcedStyleDuration=Math.round(i.totalForcedStyleDuration),t.totalLayoutDuration=Math.round(i.totalLayoutDuration),t.totalForcedLayoutDuration=Math.round(i.totalForcedLayoutDuration)),Ue.onUnloadCounted||(Ue.info.microSessionCount+=1,Ue.onUnloadCounted=!0);const r=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))})}(Ue.sampled),o=function(t){if("function"!=typeof performance.getSpeculations)return;const e=performance.getSpeculations().preloads??[];let n=0,i=0,r=0;const o=[];for(const a of e){const e=Boolean(a.earlyhint??a.earlyHints);e&&(r+=1),null==a.used?(i+=1,t&&o.push({url:a.url.slice(-20),as:a.as,crossorigin:a.crossorigin??null,early_hint:e})):n+=1}return{used_preloads:n,unused_preloads:i,unused_preload_details:o,early_hint_preloads:r}}(Ue.sampled),a=performance.getEntriesByType("resource").filter(t=>Se.test(t.name)),s=performance.getEntriesByType("measure").filter(t=>Le.test(t.name)).map(t=>{const e=t.toJSON();return e.name.startsWith("cart-performance:")||(e.name=`cart-performance:${e.name}`),e});be({monorailRegion:Ue.config.monorailRegion,schema:De.OnUnload,rawData:{...Ue.info,...Ue.config.storefrontData,...Ue.performanceMetrics,...t,resourceTiming:r,cartAjaxResourceTimings:a,cartPerformanceMetrics:s,paintTimingHidden:He,speculations:o}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function We(){return null!==je?je:Ct()}((e,i={})=>{const o=a(i=Object.assign({},i),t),s=new WeakMap;o.t=t=>{if(t?.sources?.length){const e=T(t.sources),n=e?.node;if(n){const t=i.generateTarget?.(n)??r(n);s.set(e,t)}}},((e,n={})=>{const i=C();D(p(()=>{let r,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,r())},h=m("layout-shift",c);h&&(r=l(e,o,b,n.reportAllChanges),i.onHidden(()=>{c(h.takeRecords()),r(!0)}),u(()=>{s.o=0,o=f("CLS",0),r=l(e,o,b,n.reportAllChanges),d(()=>r())}),setTimeout(r))}))})(t=>{const i=(t=>{let e={};if(t.entries.length){const i=t.entries.reduce((t,e)=>t.value>e.value?t:e);if(i?.sources?.length){const t=T(i.sources);t&&(e={largestShiftTarget:s.get(t),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:t,largestShiftEntry:i,loadState:n(i.startTime)})}}return Object.assign(t,{attribution:e})})(t);e(i)},i)})(function(t){const{attribution:e,value:n}=t;Oe.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})},{reportAllChanges:!0}),((t,n={})=>{const i=a(n=Object.assign({},n),q),o=new WeakMap;i.m=t=>{const e=t.element;if(e){const i=n.generateTarget?.(e)??r(e);o.set(t,i)}},((t,e={})=>{S(()=>{const n=C();let i,r=f("LCP");const o=a(e,q),s=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)o.u(e),e.startTime{s(c.takeRecords()),c.disconnect(),i(!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=>{r=f("LCP"),i=l(t,r,U,e.reportAllChanges),d(()=>{r.value=performance.now()-n.timeStamp,i(!0)})})}})})(n=>{const i=(t=>{let n={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:t.value};if(t.entries.length){const i=e();if(i){const e=i.activationStart||0,r=t.entries.at(-1),a=r.url&&performance.getEntriesByType("resource").filter(t=>t.name===r.url)[0],s=Math.max(0,i.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(r),timeToFirstByte:s,resourceLoadDelay:c-s,resourceLoadDuration:u-c,elementRenderDelay:t.value-u,navigationEntry:i,lcpEntry:r},r.url&&(n.url=r.url),a&&(n.lcpResourceEntry=a)}}return Object.assign(t,{attribution:n})})(n);t(i)},n)})(function(t){const{attribution:e,value:n}=t;Oe.add({largestContentfulPaint:Math.round(n),largestContentfulPaintTarget:e.target})},{reportAllChanges:!0}),((t,i={})=>{D(i=>{const r=(t=>{let i={timeToFirstByte:0,firstByteToFCP:t.value,loadState:n(c())};if(t.entries.length){const r=e(),o=t.entries.at(-1);if(r){const e=r.activationStart||0,a=Math.max(0,r.responseStart-e);i={timeToFirstByte:a,firstByteToFCP:t.value-a,loadState:n(t.entries[0].startTime),navigationEntry:r,fcpEntry:o}}}return Object.assign(t,{attribution:i})})(i);t(r)},i)})(function(t){const{value:e}=t;Oe.add({firstContentfulPaint:Math.round(e)})}),((t,e={})=>{const i=a(e=Object.assign({},e),P);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=i.l.map(t=>d.get(t.entries[0])),e=s.length-50;s=s.filter((n,i)=>i>=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 r=o.length-1-50;o=o.filter((t,e)=>t.startTime>c&&e>r||n.has(t)),p=!1};i.m=t=>{const e=t.startTime+t.duration;let n;c=Math.max(c,t.processingEnd);for(let i=s.length-1;i>=0;i--){const r=s[i];if(Math.abs(e-r.renderTime)<=8){n=r,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()},i.p=t=>{if(!h.get(t)){const n=t.entries[0].target;if(n){const i=e.generateTarget?.(n)??r(n);h.set(t,i)}}};const y=(t,e)=>{const n=[];for(const i of o)if(!(i.startTime+i.duratione)break;n.push(i)}return n},w=t=>{const e=t.entries[0],r=d.get(e),o=e.processingStart,a=Math.max(e.startTime+e.duration,o),s=Math.min(r.processingEnd,a),c=r.entries.sort((t,e)=>t.processingStart-e.processingStart),u=y(e.startTime,s),l=i.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,i=t.processingDuration;let r,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+i?"presentation-delay":"processing-duration",r=t,u=l)}}const l=t.longAnimationFrameEntries.at(-1),d=l?l.startTime+l.duration:0;d>=e+n+i&&(c=t.nextPaintTime-d),r&&o&&(t.longestScript={entry:r,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||z||(z=m("event",_,{type:"event",buffered:!0,durationThreshold:0}));let i,r=f("INP");const o=a(e,P),s=t=>{N(()=>{for(const e of t)o.u(e);const e=o.M();e&&e.T!==r.value&&(r.value=e.T,r.entries=e.entries,i())})},c=m("event",s,{durationThreshold:e.durationThreshold??40});i=l(t,r,I,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(c.takeRecords()),i(!0)}),u(()=>{o.v(),r=f("INP"),i=l(t,r,I,e.reportAllChanges)}))})})(e=>{const n=w(e);t(n)},e)})(function(t){const{attribution:e,value:n}=t;if(null===Ue)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]),i=Number(e[2]||0);return n<26||26===n&&i<4}())return;if(Fe())return;if(!We())return;Ue.info.microSessionCount+=1;const{inputDelay:i,processingDuration:r,presentationDelay:o,longestScript:a,interactionTarget:s}=e,c=a?.entry?{slowest_script:a.entry.sourceURL,slowest_script_duration:Math.round(a.entry.duration)}:{};be({monorailRegion:Ue.config.monorailRegion,schema:De.OnInteraction,rawData:{...Ue.info,...Ue.config.storefrontData,...Ue.performanceMetrics,interactionToNextPaint:Math.round(n),interactionToNextPaintTarget:s,longAnimationFrame:{input_delay:Math.round(i),processing_duration:Math.round(r),presentation_delay:Math.round(o),...c}}})},{reportAllChanges:!0}),((t,n={})=>{((t,n={})=>{let i=f("TTFB"),r=l(t,i,j,n.reportAllChanges);H(()=>{const o=e();o&&(i.value=Math.max(o.responseStart-h(),0),i.entries=[o],r(!0),u(()=>{i=f("TTFB",0),r=l(t,i,j,n.reportAllChanges),r(!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],i=n.activationStart||0,r=Math.max((n.workerStart||n.fetchStart)-i,0),o=Math.max(n.domainLookupStart-i,0),a=Math.max(n.connectStart-i,0),s=Math.max(n.connectEnd-i,0);e={waitingDuration:r,cacheDuration:o-r,dnsDuration:a-o,connectionDuration:s-a,requestDuration:t.value-s,navigationEntry:n}}return Object.assign(t,{attribution:e})})(e);t(n)},n)})(function(t){const{value:e}=t;Oe.add({timeToFirstByte:Math.round(e)})}),addEventListener("DOMContentLoaded",()=>{He="hidden"===document.visibilityState}),addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&Ze()}),addEventListener("pagehide",()=>{Ze()});const Re=/bot|crawl|headless|curl|wget|python|spider|libwww-pearl|newrelic|datadog|sitebulb|site24x7/i;function Fe(){return!!Re.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{Ke(function(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");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:Ae(t.treatmentIds)},monorailRegion:t.monorailRegion,resourceTimingSamplingRate:Number(t.resourceTimingSamplingRate)||void 0,spaMode:"true"===t.spaMode,shs:"true"===t.shs,shsBeaconEndpoint:t.shsBeaconEndpoint||void 0,shsExportWithFetch:"true"===t.shsExportWithFetch,shsLogsSampleRate:Number(t.shsLogsSampleRate)||1,shsCandidateSampleRate:ze(Number(t.shsCandidateSampleRate)),shsCandidateMask:t.shsCandidateMask}}(t))}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}}()}();