!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 s(t,e){return o.get(t)||o.set(t,new e),o.get(t)}let a=-1;const c=()=>a,u=t=>{addEventListener("pageshow",e=>{e.persisted&&(a=e.timeStamp,t(e))},!0)},h=(t,e,n,i)=>{let r,o;return s=>{e.value>=0&&(s||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)))}},l=t=>{requestAnimationFrame(()=>requestAnimationFrame(()=>t()))},d=()=>{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||d()>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}},p=(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{}},g=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let m=-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(m)||(m="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("prerenderingchange",w,!0))}},L=()=>{if(m<0){const t=d(),e=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0]?.startTime;m=e??y(),addEventListener("visibilitychange",w,!0),addEventListener("prerenderingchange",w,!0),u(()=>{setTimeout(()=>{m=y()})})}return{get firstHiddenTime(){return m},onHidden(t){v.add(t)}}},b=t=>{document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},C=[1800,3e3],M=(t,e={})=>{b(()=>{const n=L();let i,r=f("FCP");const o=p("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime{r=f("FCP"),i=h(t,r,C,e.reportAllChanges),l(()=>{r.value=performance.now()-n.timeStamp,i(!0)})}))})},B=[.1,.25],D=t=>t.find(t=>1===t.node?.nodeType)||t[0];let z=0,x=1/0,S=0;const T=t=>{for(const e of t)e.interactionId&&(x=Math.min(x,e.interactionId),S=Math.max(S,e.interactionId),z=S?(S-x)/7+1:0)};let _;const A=()=>_?z:performance.interactionCount??0;let P=0;class H{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 I=t=>{const e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=g(t),addEventListener("visibilitychange",t,{once:!0,capture:!0}),e(()=>{t(),removeEventListener("visibilitychange",t,{capture:!0})}))},k=[200,500];class N{m;u(t){this.m?.(t)}}const q=[2500,4e3],E=[800,1800],j=t=>{document.prerendering?b(()=>j(t)):"complete"!==document.readyState?addEventListener("load",()=>j(t),!0):setTimeout(t)},U="",V="1",Z="0",O="p",K="a",G="m",R="t",Y="m",W="a",J="p",X="s";function F(t){try{return decodeURIComponent(t)}catch(t){return""}}function $(t,e=!1){const n=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let e=0;e"_cmp"===t.name);let i=null==n?void 0:n.description;if(!i)return;try{i=decodeURIComponent(i)}catch{}return i}catch{return}}();if(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,s]=e;let a,c;try{a=e[5]?JSON.parse(e.slice(5).join("_")):void 0}catch{}if(s){const t=s.replace(/\*/g,"/").replace(/-/g,"+"),e=Array.from(atob(t)).map(t=>t.charCodeAt(0).toString(16).padStart(2,"0")).join("");c=[8,13,18,23].reduce((t,e)=>t.slice(0,e)+"-"+t.slice(e),e)}function u(t){const e=n.split(".")[0];return e.includes(t.toLowerCase())?Z:e.includes(t.toUpperCase())?V:U}function h(t){return n.includes(t.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[W]:u(W),[J]:u(J),[Y]:u(Y),[X]:u(X)}},region:i||"",cus:a,purposes:{[K]:h(K),[O]:h(O),[G]:h(G),[R]:h(R)},sale_of_data_region:"t"==o,display_banner:"t"==r,consent_id:c}}(t);return}(t)}function tt(){return function(t){const e=Q();if(!e||!e.purposes)return!0;const n=e.purposes[t];return"boolean"!=typeof n||n}(K)}function et(){return tt()}function nt(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var it=0;function rt(t){return"__private_"+it+++"_"+t}function ot(t){return Object.entries(t).map(([t,e])=>({key:t,value:{stringValue:String(e)}}))}function st(t){if(Array.isArray(t))return{arrayValue:{values:t.map(t=>st(t))}};switch(typeof t){case"boolean":return{boolValue:Boolean(t)};case"number":return{doubleValue:Number(t)};default:return{stringValue:String(t)}}}const at=function(t,e,n){const i=[0];for(let r=0;r{switch(e.attributes={...nt(this,ut)[ut],...e.attributes},e.type){case"histogram":!function(t,e){var n;const{name:i,value:r,unit:o,timeUnixNano:s,attributes:a}=e,c=null!==(n=e.bounds)&&void 0!==n?n:at,u=new Array(c.length+1).fill(0);t[i]||={name:i,unit:o||"1",histogram:{aggregationTemporality:1,dataPoints:[]}};for(let t=0;t0?l:0,bucketCounts:i>0?[1]:[]};t[n].exponentialHistogram.dataPoints.push({attributes:ot(null!=s?s:{}),startTimeUnixNano:o,timeUnixNano:o,count:1,sum:c,scale:u,zeroCount:d,positive:p,negative:f,min:c,max:c,zeroThreshold:0})}(t,e);break;case"counter":!function(t,e){const{name:n,value:i,unit:r,timeUnixNano:o,attributes:s}=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:ot(null!=s?s:{})})}(t,e);break;case"gauge":!function(t,e){const{name:n,value:i,unit:r,timeUnixNano:o,attributes:s}=e;t[n]||={name:n,unit:r||"1",gauge:{dataPoints:[]}},t[n].gauge.dataPoints.push({startTimeUnixNano:o,timeUnixNano:o,asDouble:i,attributes:ot(null!=s?s:{})})}(t,e)}});const e=Object.values(t);0!==e.length&&(nt(this,ht)[ht]=[],await nt(this,ct)[ct].exportMetrics(e))}async exportLogs(){const t=nt(this,lt)[lt].map(t=>{const e={timeUnixNano:t.timeUnixNano,observedTimeUnixNano:t.timeUnixNano,attributes:(n={...nt(this,ut)[ut],...t.attributes},Object.entries(n).map(([t,e])=>({key:t,value:st(e)})))};var n;return t.body&&(e.body={stringValue:t.body}),e});0!==t.length&&(nt(this,lt)[lt]=[],await nt(this,ct)[ct].exportLogs(t))}}var ft=rt("url"),pt=rt("serviceName"),gt=rt("logger"),mt=rt("fetchFn");class vt{constructor(t,e,n){Object.defineProperty(this,ft,{writable:!0,value:void 0}),Object.defineProperty(this,pt,{writable:!0,value:void 0}),Object.defineProperty(this,gt,{writable:!0,value:void 0}),Object.defineProperty(this,mt,{writable:!0,value:void 0}),nt(this,ft)[ft]=t.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),nt(this,pt)[pt]=e,nt(this,gt)[gt]=null==n?void 0:n.logger,nt(this,mt)[mt]=null==n?void 0:n.fetchFn}async exportMetrics(t){await this.exportBatches("/v1/metrics",[...t],t=>({resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:nt(this,pt)[pt]}}]},scopeMetrics:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},metrics:t}]}]}))}async exportLogs(t){await this.exportBatches("/v1/logs",[...t],t=>({resourceLogs:[{resource:{attributes:[{key:"service.name",value:{stringValue:nt(this,pt)[pt]}}]},scopeLogs:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},logRecords:t}]}]}))}async exportTo(t,e){var n;const i=JSON.stringify(t),r=(new TextEncoder).encode(i).length;if(r>65536)throw new wt(`Payload size ${r} exceeds 65536 bytes`);const o=await this.exporterFetch()(`${nt(this,ft)[ft]}${e}`,{method:"POST",keepalive:!0,headers:{"Content-Type":"application/json"},body:i});if(null===(n=nt(this,gt)[gt])||void 0===n||n.log({status:o.status}),!o.ok){if(400===o.status){const t=await o.text();throw new yt(`Invalid OpenTelemetry Data: ${t}`)}if(429===o.status||503===o.status){const e=await o.text(),n=o.headers.get("Retry-After"),i=n?{seconds:Number(n)}:void 0;throw new yt("Server did not accept data",{errorData:e,retryAfter:i,body:t})}throw new yt(`Server responded with ${o.status}`)}}exporterFetch(){return nt(this,mt)[mt]||fetch}async exportBatches(t,e,n){let i=e.length;for(;e.length>0;)try{const r=e.slice(0,i);await this.exportTo(n(r),t),e.splice(0,i)}catch(t){if(!(t instanceof wt&&i>1))throw t;i=Math.ceil(i/2)}}}class yt extends Error{constructor(t,e){super(t),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=e}}class wt extends Error{constructor(...t){super(...t),this.name="PayloadTooLargeError"}}var Lt={name:"@shopify/human-signals",version:"1.4.0",description:"Human signal detection for bot vs human traffic analysis",type:"module",main:"dist/index.js",types:"dist/index.d.ts",source:"src/index.ts",files:["dist"],scripts:{build:"npx tsc",bundle:"pnpm build && rollup -c",test:"vitest run","test:watch":"vitest",lint:"eslint ./src",format:"prettier ./src --write","format:check":"prettier --check ./src"},author:"Shopify Inc.",license:"MIT",devDependencies:{"@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^16.0.1","@rollup/plugin-replace":"^6.0.2","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^12.1.4","@shopify/eslint-plugin":"^50.0.0","@shopify/prettier-config":"^1.1.4","@types/node":"^24.1.0",eslint:"^9.31.0","javascript-obfuscator":"^4.1.1",jsdom:"^26.1.0",prettier:"^3.6.2",rollup:"^4.45.1","rollup-plugin-obfuscator":"^1.1.0",typescript:"^5.8.3",vitest:"^3.2.4"},dependencies:{"@shopify/opentelemetry-mini-client-private":"^1.6.0"},prettier:"@shopify/prettier-config"};!function(t){var e=476,n=473,i=482,r=478,o=474,s=479,a=285;function c(t,e){return Dt(e-a,t)}for(var u=t();;)try{if(340493===-parseInt(c(474,480))/1+-parseInt(c(477,485))/2*(-parseInt(c(465,469))/3)+-parseInt(c(467,e))/4*(parseInt(c(466,n))/5)+-parseInt(c(i,r))/6+-parseInt(c(o,481))/7+parseInt(c(481,474))/8+parseInt(c(s,470))/9)break;u.push(u.shift())}catch(t){u.push(u.shift())}}(Bt);var bt,Ct=(bt=!0,function(t,e){var n=51,i=48,r=bt?function(){if(e){var r=e[(o=n,s=i,Dt(s- -139,o))](t,arguments);return e=null,r}var o,s}:function(){};return bt=!1,r}),Mt=Ct(this,function(){var t=133,e=126,n=118,i=131,r=122;function o(t,e){return Dt(e- -68,t)}return Mt[o(119,118)]()[o(t,129)](o(135,e))[o(110,n)]()[o(i,r)](Mt)[o(134,129)](o(e,126))});function Bt(){var t=["kcGOlISPkYKRksSK","ndG4mtyYvwLLEwPV","ndq0nZm5ngrmsxDxsG","C2vHCMnO","A2jH","C3nT","mtG4nNDdAunUwq","BxnW","mty2ofHtsLbNAW","otm1mZC5meHPD3bJyq","Dg9tDhjPBMC","yxbWBhK","mtGXmJKWEuX0uwDs","ndiYmZKYogXRz2rQqq","y29UC3rYDwn0B3i","mJbetgf0tvu","DhnT","mJy3nZKZmNLsvKDHyW"];return(Bt=function(){return t})()}function Dt(t,e){var n=Bt();return Dt=function(e,i){var r=n[e-=184];if(void 0===Dt.MDkEqA){var o=function(t){for(var e,n,i="",r="",s=i+o,a=0,c=0;n=t.charAt(c++);~n&&(e=a%4?64*e+n:n,a++%4)?i+=s.charCodeAt(c+10)-10!=0?String.fromCharCode(255&e>>(-2*a&6)):a:0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(var u=0,h=i.length;u=this.sampleRate))try{await this.otelClient.exportLogs()}catch(t){this.stdout&&console.log(`[SHS] Otel export logs failure: ${t}`)}}}!function(t){const e=555,n=518,i=433,r=539,o=441,s=681,a=650,c=528,u=623,h=615,l=578,d=632;function f(t,e){return qt(e-98,t)}const p=t();for(;;)try{if(732794===-parseInt(f(e,n))/1+parseInt(f(i,r))/2+-parseInt(f(386,447))/3+-parseInt(f(575,o))/4+parseInt(f(525,629))/5*(-parseInt(f(s,a))/6)+-parseInt(f(c,469))/7*(parseInt(f(u,h))/8)+parseInt(f(605,l))/9*(parseInt(f(551,d))/10))break;p.push(p.shift())}catch(t){p.push(p.shift())}}(Et);const xt=function(){let t=!0;return function(e,n){const i=563,r=t?function(){if(n){const o=n[(t=i,r=465,qt(t-3,r))](e,arguments);return n=null,o}var t,r}:function(){};return t=!1,r}}(),St=xt(this,function(){const t=766,e=856,n=1042,i=995,r=901,o=519;function s(t,e){return qt(e-o,t)}return St[s(912,986)]()[s(959,995)](s(t,e))[s(860,986)]()[s(n,1069)](St)[s(913,i)](s(r,856))});St();const Tt=Rt(-330,-217),_t=Rt(-132,-150),At=Rt(-262,-314),Pt=Rt(-31,-123);class Ht{[Rt(-165,-280)];[Rt(-217,-155)];[Rt(-162,-86)];constructor(t,e,n){function i(t,e){return Rt(t,e- -93)}this[i(-400,-373)]=t,this[i(-142,-248)]={path:"/",sameSite:i(-238,-226),...e},this[i(-79,-179)]=n}async[Rt(-335,-232)](){const t=1408,e=1106,n=1394,i=1208,r=1217,o=1394,s=1256,a=1311,c=1402,u=1200,h=1369,l=1233,d=1260,f=1488,p=this[g(1333,1466)][g(t,1341)];if(this[g(1208,e)][g(n,1366)])try{const t=await this[g(i,r)][g(o,1449)][g(s,a)]({name:p});return t?t[g(1287,c)]:null}catch(t){return this[g(1302,1172)](g(u,1129)+t),this[g(h,l)]()}function g(t,e){return Rt(e,t-f)}return this[g(h,d)]()}async[Rt(-44,-157)](t){const e=1283,n=1367,i=1181,r=1344,o=1304,s=1399,a=1381,c=1311,u=1306,h=1382,l=1306,d=1140,f=1188,p=1187,g=1210,m=1296,v=1105,y=1182,w=1250,L=1358,b=1275,C=1504,M=1106,B=1184,D=344,z=274,x=258,S=931,T=1461;function _(t,e){return Rt(t,e-T)}if(this[_(1157,1181)][_(e,n)])try{await this[_(1067,i)][_(r,1367)][_(1182,o)]({name:this[_(s,1306)][_(1494,a)],value:t,path:this[_(c,u)][_(1183,1200)],maxAge:this[_(h,l)][_(d,f)],sameSite:this[_(p,1306)][_(g,m)]?.[_(v,y)]()})[_(w,L)](e=>{function n(t,e){return _(e,t- -S)}this[n(D,358)](n(z,x)+e),this[n(253,156)](t)}),this[_(1271,b)](_(1426,1395))}catch(e){this[_(1233,1275)](_(C,1371)+e),this[_(M,1184)](t)}else this[_(1307,B)](t)}[Rt(-147,-119)](){const t=782,e=675,n=801,i=828,r=715,o=721,s=622,a=this[u(820,823)][u(895,1008)],c=new RegExp(u(t,e)+a+u(724,n))[u(i,787)](this[u(695,798)][u(r,o)][u(697,s)]);function u(t,e){return Rt(e,t-975)}return c?c[2]:null}[Rt(-174,-277)](t){function e(t,e){return Rt(e,t- -256)}this[e(-536,-595)][e(-516,-596)][e(-534,-578)]=this[e(-411,-490)][e(-336,-466)]+"="+t+e(-416,-327)+this[e(-411,-500)][e(-517,-480)]+e(-576,-449)+this[e(-411,-300)][e(-529,-498)]+e(-352,-378)+this[e(-411,-462)][e(-421,-483)],this[e(-442,-381)](e(-363,-469))}[Rt(-103,-186)](t){const e=278;function n(t,n){return Rt(n,t-e)}this[n(192,308)][n(-32,50)](n(205,177)+t)}}const It={document:document,navigator:typeof navigator!==Rt(-412,-319)?{get webdriver(){return navigator[(t=121,e=251,Rt(t,e-538))];var t,e},get userAgent(){return navigator[(t=1011,e=911,Rt(e,t-1242))];var t,e},get languages(){return navigator[(t=-161,e=-197,Rt(t,e-45))];var t,e},get plugins(){return navigator[(t=-280,e=-211,Rt(e,t- -150))];var t,e},sendBeacon:navigator[Rt(-332,-309)]?.[Rt(69,-65)](navigator)}:{webdriver:void 0,userAgent:"",languages:[],plugins:[],sendBeacon:void 0},window:window,screen:screen,cookieStore:typeof window!==Rt(-386,-319)&&Rt(8,-94)in window?window[Rt(-41,-94)]:void 0,performance:typeof performance!==Rt(-302,-319)?performance:void 0};function kt(t){const e=453,n=534,i=351,r=412,o=384,s=651;function a(t,e){return Rt(t,e-s)}if(t[a(590,534)]<2)return{speed:0,jitter:0};const c=t[a(349,e)]((t,e)=>t+e.s,0)/t[a(632,n)],u=t[a(i,453)]((t,e)=>t+(e.s-c)**2,0)/(t[a(507,534)]-1),h=Math[a(r,o)](u);return{speed:c,jitter:h}}function Nt(t,e,n,i,r,o,s,a,c,u,h,l,d){const f=740,p=779,g=832,m=701,v=832,y=963,w=714,L=895,b=751,C=862,M=832,B=792,D=724,z=858,x=740,S=654,T=740,_=843,A=792,P=740,H=949,I=61,k=268,N=Math[at(740,769)](1e3,t),q=Math[at(f,727)](1e3,n),E=Math[at(f,835)](1e3,o),j=Math[at(f,787)](1e3,a),U=Math[at(740,713)](1e3,s),V=Math[at(740,p)](1e3,c),Z=[];if(e[at(g,m)]>=3)for(let t=1;t5e-4){i=!0;break}r=o.s}else r=o.s;return i}(Z),K=function(t){const e=1297,n=1384,i=1437,r=1609;if(t[s(1492,1439)]<3)return 0;let o=0;function s(t,e){return Rt(e,t-r)}let a=0;for(let r=1;r2*Math.PI-Math.PI/12)&&o++,a++}return a>0?o/a:0}(e),{speed:G,jitter:R}=kt(Z);let Y=0,W=0;if(i[at(832,w)]>1){const t=new Set(i[at(813,750)](t=>Math[at(843,859)](t.x/20)+","+Math[at(843,717)](t.y/20)))[at(849,L)];Y=t>1?1:0,W=i[at(b,C)]((t,e)=>t+e[at(874,807)],0)/i[at(g,758)]}const J=r[at(751,622)]((t,e)=>{function n(t,e){return at(e- -624,t)}return null===e[n(98,I)]||t[n(255,k)](e[n(-4,61)]),t},[]),{rhythmConsistency:X,jitter:F}=function(t){const e=136,n=217,i=341,r=157,o=67,s=38;function a(t,e){return Rt(e,t-334)}if(t[a(217,223)]<2)return{rhythmConsistency:0,jitter:0};const c=t[a(e,186)]((t,e)=>t+e,0)/t[a(n,i)],u=t[a(136,252)]((t,e)=>(t??0)+((e??0)-c)**2,0)/t[a(217,r)],h=Math[a(o,41)](u);return{rhythmConsistency:0===h?1:Math[a(99,s)](0,1-h/c),jitter:h/c}}(J),$=J[at(M,933)]>0?J[at(751,794)]((t,e)=>t+e,0)/J[at(832,810)]:0,Q=[];if(u[at(v,823)]>=3)for(let t=1;tu[t-1].p?at(653,768):"up";Q[at(892,918)]({s:i,dir:r,t:u[t].t})}const{speed:tt,jitter:et}=kt(Q),nt=function(t){const e=699,n=782,i=591,r=748,o=702,s=699,a=816;if(t[u(699,e)]<2)return 0;let c=0;function u(t,e){return Rt(t,e-a)}for(let s=1;s=500&&t[e].t-i>=500&&(n++,i=t[e].t);function r(t,n){return Rt(n,t-e)}return n}(Q)),{speed:rt,jitter:ot}=kt(h),st=function(t){if(t[n(-335,-223)]<2)return 0;let e=0;for(let i=1;i=500&&n++;return n}(h)),ut=Math[at(_,A)]((d-l)/1e3);return{ma:N,ca:q,ka:E,sa:j,ta:V,kba:U,t:Math[at(P,631)](3600,ut),nm:O?1:0,ms:Ut(K),mj:Ut(R),msp:Ut(G),vc:Y,cp:Ut(W),rc:Ut(X),kj:Ut(F),ki:Ut($),ss:Ut(tt),sj:Ut(et),ssm:Ut(nt),sp:it,ts:Ut(rt),tj:Ut(ot),tp:ct,tsm:Ut(st)}}function qt(t,e){const n=Et();return qt=function(e,i){let r=n[e-=297];if(void 0===qt.ZJRWZE){var o=function(t){let e="",n="",i=e+o;for(let n,r,o=0,s=0;r=t.charAt(s++);~r&&(n=o%4?64*n+r:r,o++%4)?e+=i.charCodeAt(s+10)-10!=0?String.fromCharCode(255&n>>(-2*o&6)):o:0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,i=e.length;t{const s=typeof performance!==a(n,603)?performance[a(i,734)]():Date[a(851,734)]();function a(t,e){return qt(e-303,t)}s-r>=e&&(r=s,t(...o))}}function Ut(t){return Math[(e=272,n=358,Rt(n,e-516))](100*t)/100;var e,n}function Vt(t){const e=92;function n(t,n){return Rt(n,t-e)}return{wd:t[n(32,-77)],ua:t[n(-85,-152)],cf:t[n(-104,-194)],be:t[n(-165,-104)],nm:t[n(-23,-122)],nc:t[n(-67,-68)],ka:t[n(-193,-63)],sa:t[n(-121,9)],ta:t[n(-100,-126)],pt:t[n(-108,9)],mp:t[n(-161,-37)],sd:t[n(-72,-162)]}}class Zt{[Rt(36,-72)];[Rt(-63,-92)];[Rt(-347,-280)];[Rt(-300,-289)];[Rt(-180,-86)];constructor(t,e,n=It){const i=926,r=1046,o=718,s=725,a=912,c=830,u=944,h=926,l=637,d=774,f=666,p=793,g=718,m=600,v=957,y=1039,w=926,L=853,b=818,C=726,M=926,B=943,D=935,z=850,x=998,S={shopId:0,cookieName:T(897,1021),cookieExpiry:1800,updateInterval:5e3,debug:!1,enableBeacon:!1,beaconEndpoint:At,beaconRetryLimit:3,enableCookie:!0,maxSilenceMs:18e5,exportWithFetch:!1,logsSampleRate:1};function T(t,e){return Rt(e,t-x)}if(this[T(i,r)]={...S,...e},this[T(o,s)]=n,this[T(a,857)]=t,!this[T(926,856)][T(c,u)]&&!this[T(h,1005)][T(723,l)])throw new Error(T(d,f));if(this[T(709,p)]=new Ht(this[T(g,m)],{cookieName:this[T(926,v)][T(918,y)],cookieExpiry:this[T(w,890)][T(725,860)]},this[T(912,L)]),this[T(906,b)]={startTime:Date[T(810,C)](),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},this[T(M,B)][T(723,742)]){const t=this[T(825,695)]();this[T(906,D)][T(z,818)]={lastSignals:t,lastProcessTime:0,lastSuccessfulSendTime:0,retryCount:0}}}[Rt(-312,-208)](){const t=1506,e=1526,n=1343,i=1309,r=1234;function o(t,e){return Rt(e,t- -162)}this[o(-348,-311)](o(-218,-207),!0),(async()=>{const s=1751;function a(t,e){return o(e-s,t)}await this[a(1470,t)](),await this[a(1441,e)](),await this[a(1481,1406)](!0),this[a(n,i)][a(r,1370)][a(1469,1419)](()=>{var t,e;this[(t=-591,e=-498,a(e,t- -1941))]()},100);const c=()=>{const t=1390,e=1418,n=1568,i=1492,r=1404,o=1537,s=1401,u=1367,h=1475,l=1636,d=Date[m(-240,-326)](),f=d-(this[m(-144,-8)][m(-223,-164)]||d),p=Math[m(-287,-302)](0,this[m(-124,-106)][m(-356,-440)]-f),g=()=>{const a=720,d=758,f=639;function p(t,e){return m(e-l,t)}this[p(t,1304)][p(e,1365)][p(1275,1382)]?this[p(n,i)][p(r,1450)]=this[p(1377,1304)][p(1359,1365)][p(1371,1382)](()=>{function t(t,e){return p(e,t- -755)}this[t(646,694)]()[t(a,d)](()=>this[t(743,811)][t(615,667)]())[t(a,f)](()=>{c()})},{timeout:2e3}):this[p(o,s)]()[p(u,h)](()=>this[p(1612,1498)][p(1336,1370)]())[p(1577,1475)](()=>{c()})};function m(t,e){return a(e,t- -1641)}p>0?this[m(-332,-214)][m(-271,-222)][m(-222,-213)](g,p):g()};c()})()}[Rt(-247,-205)](){function t(t,e){return Rt(t,e- -326)}this[t(-286,-418)][t(-545,-430)]&&this[t(-598,-606)][t(-491,-545)][t(-675,-553)](this[t(-508,-418)][t(-403,-430)]),this[t(-405,-418)][t(-419,-460)]&&this[t(-520,-606)][t(-492,-545)][t(-498,-453)]&&this[t(-473,-606)][t(-410,-545)][t(-457,-453)](this[t(-466,-418)][t(-436,-460)]),this[t(-539,-418)][t(-668,-624)]&&(this[t(-526,-606)][t(-585,-586)][t(-627,-517)](t(-726,-621),this[t(-423,-418)][t(-716,-624)][t(-520,-621)]),this[t(-710,-606)][t(-451,-586)][t(-614,-517)](t(-517,-417),this[t(-417,-418)][t(-662,-624)][t(-522,-417)]),this[t(-550,-606)][t(-711,-586)][t(-602,-517)](t(-594,-520),this[t(-341,-418)][t(-662,-624)][t(-422,-520)]),this[t(-592,-606)][t(-632,-586)][t(-383,-517)](t(-686,-595),this[t(-453,-418)][t(-664,-624)][t(-682,-595)]),t(-450,-547)in window&&this[t(-535,-418)][t(-541,-624)][t(-451,-461)]&&this[t(-487,-418)][t(-647,-624)][t(-532,-468)]&&this[t(-533,-418)][t(-664,-624)][t(-335,-407)]&&(this[t(-477,-606)][t(-661,-586)][t(-540,-517)](t(-414,-461),this[t(-352,-418)][t(-707,-624)][t(-421,-461)]),this[t(-578,-606)][t(-574,-586)][t(-646,-517)](t(-527,-468),this[t(-500,-418)][t(-736,-624)][t(-359,-468)]),this[t(-573,-606)][t(-714,-586)][t(-515,-517)](t(-290,-407),this[t(-428,-418)][t(-653,-624)][t(-315,-407)]))),this[t(-369,-418)][t(-551,-474)]?.[t(-537,-530)]&&this[t(-618,-606)][t(-611,-545)][t(-441,-553)](this[t(-477,-418)][t(-431,-474)][t(-509,-530)]),this[t(-466,-418)][t(-587,-474)]=void 0}async[Rt(-205,-83)](){const t=7;function e(e,n){return Rt(e,n-t)}if(!this[e(-173,-65)][e(-238,-161)])return void this[e(-163,-179)](e(-255,-287));const n=await this[e(-156,-282)][e(-268,-225)](),i=function(t){const e=298,n=395;if(!t)return null;try{const o=JSON[(i=e,r=344,Rt(r,i-n))](atob(decodeURIComponent(t)));return o.v&&o.ts?o:null}catch(t){return null}var i,r}(n);i?(this[e(-65,-85)][e(-177,-164)]=i.ts,i[e(-279,-178)]&&(this[e(-77,-85)][e(31,-47)]={pageCount:i[e(-75,-178)].p||1,sessionStart:i[e(-176,-178)].s||Date[e(-259,-181)](),duration:i[e(-161,-178)].d||0},this[e(-150,-179)](e(-362,-279)+this[e(-48,-85)][e(-42,-47)][e(-108,-111)]+e(-232,-103)))):this[e(-70,-179)](e(-29,-160)+n)}[Rt(-97,-63)](){const t=476,e=748,n=469,i=597,r=624,o=589,s=389,a=566,c=433,u=780,h=567,l=664,d=528,f={wd:this[p(t,610)][p(624,e)][p(n,i)]?1:0,ua:/bot|crawler|spider|scraper/i[p(502,424)](this[p(t,494)][p(r,o)][p(525,s)])?0:1,cv:this[p(491,361)]()?1:0,br:this[p(a,c)]()?1:0};function p(t,e){return Rt(e,t-756)}return this[p(664,u)][p(434,h)]=f,this[p(l,d)][p(567,498)]=!0,f}[Rt(-388,-265)](){const t=1175,e=1124,n=1178,i=1157,r=930,o=1051,s=932,a=1052,c=1088,u=1061,h=1340,l=1181,d=1242,f=1117,p=1229,g=1009,m=1095,v=1236,y=1235,w=1353;function L(t,e){return Rt(t,e-w)}try{const w=this[L(t,1073)][L(1130,1093)][L(1325,1197)](L(1212,1087));w[L(1196,e)]=200,w[L(1076,n)]=50;const b=w[L(1192,1269)]("2d");if(null===b)return!1;const C=b[L(i,1150)](0,0,200,0);C[L(r,1052)](0,L(o,1036)),C[L(s,a)](1,L(c,u)),b[L(h,1242)]=C,b[L(1079,l)](0,0,200,50),b[L(1145,d)]=L(1379,1271),b[L(f,p)]=L(g,m),b[L(v,1300)](L(y,1191),33,30);const M=w[L(1256,1215)]();return Boolean(M&&M[L(1238,v)]>50)}catch(t){return!1}}[Rt(-265,-190)](){const t=995,e=1143,n=1074,i=1033,r=1020,o=1243,s=995,a=1178,c=1172,u=1024,h=995,l=1112,d=1145,f=863,p=984,g=1182,m=1129,v=941,y=1158,w=1179,L=1130,b=956,C=1174,M=1201,B=1275;let D=0;function z(t,e){return Rt(t,e-B)}this[z(1123,t)][z(1113,e)][z(n,i)]&&this[z(r,t)][z(1239,1143)][z(1113,1033)][z(o,1158)]>0&&D++,(this[z(1097,s)][z(a,1143)][z(c,1145)]&&this[z(u,h)][z(l,1143)][z(1209,d)][z(1192,1158)]>0||this[z(f,t)][z(1221,1143)][z(952,1044)][z(878,p)](z(g,m)))&&D++,this[z(1115,1138)]()&&D++,typeof this[z(v,h)][z(y,1056)][z(w,L)]!==z(889,b)&&D++;try{const t=(new Date)[z(C,M)]();t>-840&&t<840&&D++}catch(t){}return D>=3}[Rt(-76,-137)](){const t=903,e=978,n=729,i=774,r=1052,o=1149,s=842,a=822,c=1018,u=878,h=842,l=1014,d=this[g(842,895)][g(t,994)][g(e,877)]||this[g(842,n)][g(862,i)][g(814,723)][g(r,o)],f=this[g(s,a)][g(903,c)][g(870,u)]||this[g(h,s)][g(862,813)][g(814,873)][g(l,1110)];if(!d||!f)return!1;if(d<=2||f<=2)return!1;const p=d/f;function g(t,e){return Rt(e,t-1122)}return p>=.2&&p<=5}[Rt(-109,-239)](){const t=1288,e=1160,n=1233,i=1174,r=1253,o=1268,s=1357,a=1233,c=1313,u=1258,h=1231,l=1354,d=1237,f=1288,p=1277,g=1137,m=1382,v=1327,y=1269,w=1290,L=1233,b=1285,C=1413,M=1460,B=1268,D=1193,z=1406,x=1491,S=1304,T=1233,_=1467,A=1364,P=133,H=901,I=643,k=649,N=891,q=713,E=759,j=726,U=832,V=582,Z=878,O=892,K=978,G=836,R=864,Y=973,W=920,J=1007,X=901,F=946,$=719,Q=752,tt=782,et=861,nt=782,it=828,rt=673,ot=960,st=864,at=872,ct=643,ut=709,ht=842,lt=760,dt=864,ft=866,pt=713,gt=376,mt=373,vt=247,yt=275,wt=300,Lt=311,bt=190,Ct=241,Mt=161,Bt=96,Dt=186,zt=37,xt=165,St=42,Tt=1034,_t=1031,At=909,Pt=1034,Ht=871,It=1091,kt=1116,Nt=1149,Et=917,Ut=929,Vt=1116,Zt=1162,Ot=972,Kt=912,Gt=1151,Yt=1205,Wt=589,Jt=321,Xt=206,Ft=477,$t=345,Qt=298,te=90,ee=258,ne=342,ie=266,re=322,oe=239,se=296,ae=391,ce=321,ue=466,he=342,le=157,de=362,fe=321,pe=342,ge=480,me=356,ve=207,ye=321,we=155,Le=250,be=460,Ce=356,Me=394,Be=218,De=221,ze=321,xe=256,Se=321,Te=660,_e=536,Ae=729,Pe=595,He=536,Ie=598,ke=660,Ne=712,qe=540,Ee=534,je=560,Ue=578,Ve=547,Ze=184,Oe=82,Ke=225,Ge=214,Re=122,Ye=107,We=299,Je=219,Xe=39,Fe=jt(t=>{function e(t,e){return qt(t- -343,e)}this[e(Ze,144)][e(-7,Oe)]++,this[e(184,Ke)][e(Ge,307)][e(159,278)]>=10&&this[e(Ze,137)][e(Ge,203)][e(Re,Ye)](),this[e(184,We)][e(214,244)][e(Je,246)]({x:t[e(-37,-86)],y:t[e(Xe,-21)],t:t[e(102,115)]})},100),$e=t=>{function e(t,e){return qt(e- -360,t)}this[e(228,167)][e(-16,-57)]++,requestAnimationFrame(()=>setTimeout(()=>{function n(t,n){return e(t,n-493)}this[n(555,Te)][n(412,_e)][n(704,635)]>=5&&this[n(Ae,660)][n(Pe,He)][n(551,Ie)](),this[n(534,ke)][n(566,536)][n(Ne,695)]({x:t[n(qe,439)],y:t[n(Ee,515)],t:t[n(je,Ue)],pre:this[n(Ve,545)](t)})},0))},Qe=t=>{this[o(251,Jt)][o(Xt,244)]++;const e=t[o(Ft,$t)];if([o(273,234),o(Qt,264),o(182,123),o(229,300)][o(te,122)](e))return;const n=this[o(268,Jt)][o(ee,ne)][this[o(349,Jt)][o(ie,ne)][o(re,296)]-1],i=t[o(112,oe)],r=n?i-n.t:null;function o(t,e){return qt(e- -206,t)}this[o(285,321)][o(257,342)][o(354,se)]>=10&&this[o(ae,ce)][o(ue,he)][o(le,259)](),this[o(de,fe)][o(210,pe)][o(ge,me)]({_0x47a668:e,t:i,int:r}),null!==r&&r<100?(this[o(ve,ye)][o(we,Le)][o(be,Ce)](r),this[o(Me,ce)][o(Be,250)][o(310,se)]>=5&&(this[o(De,ze)][o(413,292)]++,this[o(xe,Jt)][o(161,250)]=[])):this[o(400,321)][o(Se,250)]=[]},tn=jt(t=>{function e(t,e){return qt(t-Wt,e)}this[e(1116,1029)][e(936,1065)]++;const n=t[e(Tt,_t)],i=window[e(At,1034)];this[e(1116,Pt)][e(972,Ht)][e(It,1136)]>=10&&this[e(kt,Nt)][e(972,Et)][e(1054,Ut)](),this[e(Vt,Zt)][e(Ot,Kt)][e(Gt,Yt)]({p:i,t:n})},200),en=t=>{function e(t,e){return qt(e- -280,t)}this[e(gt,247)][e(48,101)]++,this[e(mt,vt)][e(261,yt)][e(wt,222)]>=10&&this[e(342,vt)][e(Lt,275)][e(bt,185)](),this[e(Ct,247)][e(Mt,Bt)]={x:t[e(287,284)][0][e(32,26)],y:t[e(Dt,284)][0][e(195,102)],t:t[e(zt,xt)],typ:e(-47,St),s:0,d:0}},nn=jt(t=>{const e={x:t[n(H,878)][0][n(I,656)],y:t[n(901,935)][0][n(719,k)]};function n(t,e){return qt(t-337,e)}if(this[n(864,N)][n(q,739)]){const i=this[n(E,j)](this[n(864,U)][n(713,V)],e);this[n(864,Z)][n(O,K)][n(839,G)]>=10&&this[n(R,Y)][n(892,U)][n(802,W)]();const r={x:t[n(901,J)][0][n(643,621)],y:t[n(X,F)][0][n($,Q)],t:t[n(tt,863)],typ:n(et,779),d:i,s:i/(t[n(nt,741)]-this[n(864,it)][n(713,rt)].t)};this[n(864,860)][n(892,ot)][n(899,1034)](r),this[n(st,at)][n(713,646)]=r}else{const e={x:t[n(901,788)][0][n(ct,ut)],y:t[n(H,1008)][0][n(719,ht)],t:t[n(782,907)],typ:n(861,lt),s:0,d:0};this[n(dt,ft)][n(pt,603)]=e}},200),rn=t=>{function e(t,e){return qt(t- -394,e)}this[e(P,130)][e(-18,98)]=null};function on(t,e){return Rt(e,t-1548)}this[on(1268,1210)][on(t,e)][on(n,i)](on(r,1382),Fe,{passive:!0}),this[on(o,s)][on(1288,1285)][on(a,c)](on(1457,1333),$e,{passive:!0}),this[on(1268,1289)][on(1288,u)][on(n,h)](on(l,d),Qe,{passive:!0}),this[on(o,1261)][on(f,p)][on(1233,g)](on(1279,m),tn,{passive:!0}),on(v,y)in window&&(this[on(1268,1202)][on(t,w)][on(L,b)](on(C,M),en,{passive:!0}),this[on(B,1386)][on(1288,D)][on(1233,1209)](on(z,x),nn,{passive:!0}),this[on(1268,S)][on(1288,1251)][on(T,1215)](on(_,A),rn,{passive:!0})),this[on(1456,1496)][on(1250,1292)]={mousemove:Fe,click:$e,keydown:Qe,scroll:tn,touchstart:en,touchmove:nn,touchend:rn}}async[Rt(-203,-183)](t=!1){const e=635,n=326,i=336,r=606,o=665,s=539,a=533,c=443,u=322,h=423,l=454,d=576,f=440,p=508,g=611;function m(t,e){return Rt(t,e-g)}if(this[m(513,378)](t),this[m(e,539)][m(n,i)]&&await this[m(r,524)](),!this[m(o,s)][m(a,c)])return;const v=this[m(481,550)]();v&&(await this[m(357,u)][m(h,l)](v),this[m(d,519)][m(352,f)]=Date[m(p,423)]())}[Rt(-273,-233)](t=!1){const e=Date[i(-542,-442)]();let n=Math[i(-404,-360)]((e-this[i(-225,-346)][i(-456,-376)])/1e3);function i(t,e){return Rt(t,e- -254)}null!==this[i(-469,-346)][i(-480,-425)]&&(n=Math[i(-372,-360)]((e-this[i(-375,-346)][i(-443,-425)])/1e3)),this[i(-399,-346)][i(-234,-308)]?(this[i(-224,-346)][i(-305,-308)][i(-306,-372)]+=t?1:0,this[i(-311,-346)][i(-406,-308)][i(-609,-556)]+=n):this[i(-369,-346)][i(-260,-308)]={pageCount:1,sessionStart:this[i(-327,-346)][i(-478,-376)],duration:0}}[Rt(-137,-61)](){const t=477,e=160,n=57,i=351,r=121,o=31,s=259,a=381,c=274,u=400,h=127,l=189,d=227,f=273,p=351,g=260,m=356,v=242,y=171,w=325,L=256,b=381,C=108,M=379,B=317,D=321,z=354,x=255,S=389,T=389,_=465,A=351,P=366,H=321,I=488,k=141,N=86,q=309,E=257,j=262,U=263,V=170,Z=443;if(!this[O(351,t)][O(254,216)]&&0===this[O(351,422)][O(e,n)]&&0===this[O(351,t)][O(127,190)])return null;function O(t,e){return Rt(e,t-Z)}const K=this[O(i,381)][O(r,93)]??{wd:0,ua:1,cv:0,br:0},G=Nt(this[O(351,389)][O(e,o)],this[O(351,s)][O(a,c)],this[O(351,u)][O(h,l)],this[O(351,379)][O(d,150)],this[O(351,290)][O(372,f)],this[O(p,g)][O(274,366)],this[O(p,m)][O(322,437)],this[O(351,v)][O(y,245)],this[O(p,w)][O(205,L)],this[O(i,b)][O(207,C)],this[O(351,446)][O(M,454)],this[O(351,B)][O(D,z)],Date[O(x,132)]()),R={p:this[O(i,416)][O(S,380)]?.[O(325,438)]??1,s:this[O(351,478)][O(T,L)]?.[O(366,_)]??this[O(A,P)][O(H,311)],d:this[O(351,267)][O(389,I)]?.[O(k,N)]??0},Y=function(t,e,n,i,r){function o(t,e){return Dt(t- -616,e)}return{v:t,ts:e,env:{wd:n.wd,ua:n.ua,cv:n.cv,br:n.br},bhv:{ma:i.ma,ca:i.ca,ka:i.ka,sa:i.sa,kba:i[o(-418,-412)],ta:i.ta,t:i.t,nm:i.nm,ms:i.ms,mj:i.mj,msp:i[o(-415,-415)],vc:i.vc,cp:i.cp,rc:i.rc,kj:i.kj,ki:i.ki,ss:i.ss,sj:i.sj,ssm:i[o(-417,-426)],sp:i.sp,ts:i.ts,tj:i.tj,tp:i.tp,tsm:i[o(-424,-425)]},ses:{p:r.p,s:r.s,d:r.d}}}(2,Date[O(255,q)](),K,G,R);return this[O(E,j)](O(U,V)+JSON[O(350,443)](Y)),encodeURIComponent(btoa(JSON[O(350,481)](Y)))}[Rt(-180,-186)](t,e=!1){const n=155,i=63,r=48;function o(t,e){return Rt(t,e-373)}this[o(275,287)][o(n,i)](o(r,132)+t,e)}[Rt(-96,-173)](){const t=177,e=302,n=116,i=6,r=63,o=83,s=193,a=22,c=75,u=103;function h(t,e){return Rt(e,t-u)}try{if(this[h(-t,-e)][h(-n,i)][h(-63,-115)]){const t=this[h(-177,-206)][h(-116,8)][h(-r,46)][h(-204,-136)](Pt);if(t){const e=JSON[h(6,106)](t);let n;return h(43,81)in e?(n=e,this[h(-o,53)](h(-168,-s),!0)):(n={webdriver_detected:(l=e).wd,bot_user_agent:l.ua,canvas_fingerprint_normal:l.cf,browser_environment_normal:l.be,natural_mouse_activity:l.nm,natural_click_patterns:l.nc,keyboard_activity:l.ka,scroll_activity:l.sa,touch_activity:l.ta,significant_page_time:l.pt,multiple_pages_visited:l.mp,session_duration_reasonable:l.sd},this[h(-83,-115)](h(-a,c),!0)),n}}}catch(t){this[h(-83,-88)](h(-50,-15)+t,!0)}var l;return null}[Rt(-194,-131)](t){const e=1331,n=1451,i=1445,r=1232,o=1331,s=1415,a=1569,c=1579,u=1518,h=1547,l=1425,d=1402,f=1611;function p(t,e){return Rt(t,e-f)}try{this[p(1410,e)][p(1416,1392)][p(n,i)]&&(this[p(r,o)][p(s,1392)][p(a,1445)][p(c,1460)](Pt,JSON[p(i,u)](Vt(t))),this[p(1475,1425)](p(1386,1300),!0))}catch(t){this[p(h,l)](p(d,1311)+t,!0)}}[Rt(-85,-207)](t){const e=661,n=768,i=659,r=713,o=671,s=830,a=934,c=550,u=595,h=713,l=691,d=670,f=651,p=643,g=621,m=655,v=659,y=563,w=713,L=653,b=t[C(638,737)];if(!(b&&b instanceof Element&&b[C(678,e)]))return 0;function C(t,e){return Rt(e,t-888)}const M=b[C(678,n)]();if(!M[C(i,760)]||!M[C(r,o)])return 0;const B=M[C(s,a)]+M[C(659,c)]/2,D=M[C(u,728)]+M[C(h,724)]/2,z=this[C(l,d)]({x:t[C(575,e)],y:t[C(f,p)]},{x:B,y:D}),x=Math[C(g,m)](M[C(v,y)]**2+M[C(w,843)]**2)/2;return x>0?Math[C(L,682)](0,1-z/x):0}[Rt(-302,-197)](t,e){return Math[(n=1304,i=1329,Rt(i,n-1571))]((e.x-t.x)**2+(e.y-t.y)**2);var n,i}async[Rt(-314,-309)](t,e){const n=477,i=625,r=395,o=654,s=579,a=365,c=526,u=569,h=531,l=631,d=531,f=563,p=656,g=514,m=470,v=493,y=464,w=437,L=551,b=525,C=526,M=468,B=533,D=531,z=613;function x(t,e){return Rt(e,t- -345)}if(!this[x(-417,-298)][x(-620,-622)]||!this[x(-437,-476)][x(-493,-455)])return;const S=function(t,e,n){return{v:t,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}}(1,Vt(t),e),T=JSON[x(-438,-498)](S),_=this[x(-417,-518)][x(-461,-352)];if(this[x(-625,-741)][x(-477,-572)][x(-654,-741)]&&!this[x(-417,-353)][x(-604,-611)])try{const t=new Blob([T],{type:x(-573,-619)});if(this[x(-i,-638)][x(-477,-r)][x(-o,-782)](_,t))return this[x(-437,-323)][x(-493,-424)][x(-s,-656)]=0,this[x(-437,-r)][x(-493,-a)][x(-c,-630)]=Date[x(-533,-u)](),void this[x(-h,-l)](x(-629,-757),!0);this[x(-d,-607)](x(-591,-608),!0)}catch(t){this[x(-531,-634)](x(-590,-610)+t+x(-568,-465),!0)}try{const t=await fetch(_,{method:x(-f,-538),headers:{"Content-Type":x(-573,-p)},body:T,credentials:x(-421,-g),keepalive:!0});if(!t.ok)throw new Error(x(-585,-667)+t[x(-540,-577)]);this[x(-437,-m)][x(-v,-y)][x(-579,-608)]=0,this[x(-w,-L)][x(-493,-b)][x(-C,-M)]=Date[x(-B,-518)](),this[x(-D,-419)](x(-z,-n),!0)}catch(n){this[x(-531,-575)](x(-651,-707)+n,!0),this[x(-663,-638)](t,e)}}[Rt(-402,-318)](t,e){const n=203;if(!this[i(-473,-346)][i(-529,-658)]||this[i(-473,-489)][i(-529,-478)][i(-615,-654)]>=this[i(-453,-514)][i(-636,-678)])return void this[i(-567,-572)](i(-607,-554),!0);function i(t,e){return Rt(e,t- -381)}const r=Math[i(-590,-494)](1e3*2**this[i(-473,-337)][i(-529,-449)][i(-615,-620)],3e4);this[i(-473,-587)][i(-529,-495)][i(-615,-545)]++,this[i(-473,-549)][i(-529,-658)][i(-585,-678)]=this[i(-661,-686)][i(-600,-687)][i(-551,-439)](()=>{function r(t,e){return i(e-n,t)}this[r(-152,-270)][r(-232,-326)]&&this[r(-364,-250)][r(-461,-453)]&&this[r(-474,-487)](t,e)},r),this[i(-567,-436)](i(-684,-770)+r+"ms",!0)}async[Rt(-198,-87)](){const t=1161,e=1257,n=1169,i=1223;if(!this[o(-143,-252)][o(-574,-455)]||!this[o(-386,-272)][o(-217,-328)])return;const r=Nt(this[o(-246,-272)][o(-451,-463)],this[o(-261,-272)][o(-183,-242)],this[o(-354,-272)][o(-610,-496)],this[o(-295,-272)][o(-328,-396)],this[o(-249,-272)][o(-320,-251)],this[o(-277,-272)][o(-484,-349)],this[o(-334,-272)][o(-201,-301)],this[o(-297,-272)][o(-426,-452)],this[o(-210,-272)][o(-533,-418)],this[o(-228,-272)][o(-370,-416)],this[o(-297,-272)][o(-348,-244)],this[o(-228,-272)][o(-425,-302)],Date[o(-235,-368)]());function o(t,e){return Rt(t,e- -180)}const s=function(t,e,n,i){const r=122,o=170,s=44,a=152,c=110,u=39,h=27,l=338,d=224,f=329,p={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};function g(t,e){return Rt(t,e-f)}if(e.ma>5&&1===e.nm&&(p[g(r,214)]=!0),e.ca>0&&1===e.vc&&(p[g(78,o)]=!0),e.ka>5&&(p[g(99,s)]=!0),e.sa>0&&(p[g(a,116)]=!0),e.ta>0&&(p[g(213,137)]=!0),e.t>30&&(p[g(c,129)]=!0),n&&(n[g(251,211)]>1&&(p[g(82,76)]=!0),n[g(u,h)]>60&&(p[g(196,165)]=!0)),i){const t=Object[g(l,d)](p);for(const e of t)p[e]=p[e]||i[e]}return p}(this[o(-185,-272)][o(-391,-502)],r,this[o(-364,-272)][o(-285,-234)],this[o(-190,-272)][o(-446,-328)][o(-389,-341)]),a=function(t,e){const n=613;if(!e)return!0;const i=Object[(r=619,o=508,Rt(r,o-n))](t);var r,o;for(const n of i)if(t[n]!==e[n])return!0;return!1}(s,this[o(-400,-272)][o(-400,-328)][o(-355,-341)]),c=Date[o(-353,-368)]()-this[o(-170,-272)][o(-342,-328)][o(-413,-361)],u=c>=this[o(-247,-252)][o(-486,-400)];if(a||u){if(Date[o(-470,-368)]()-this[o(-260,-272)][o(-244,-328)][o(-388,-427)]<100)return void this[o(-269,-366)](o(-183,-278),!0);if(u&&!a&&this[o(-324,-366)](o(-304,-364)+Math[o(-387,-424)](c/1e3)+o(-365,-402),!0),a){if(this[o(-151,-252)][o(-304,-279)]){if(this[o(-383,-366)](o(-488,-367)),this[o(-152,-272)][o(-360,-328)][o(-357,-341)]){Object[o(-325,-285)](s)[o(-513,-461)](r=>{function a(t,e){return o(t,e-1529)}const c=this[a(t,e)][a(n,1201)][a(1110,1188)][r],u=s[r];c!==u&&this[a(1117,1163)](" "+r+": "+c+a(1149,i)+u)})}else this[o(-301,-366)](o(-180,-309));this[o(-231,-366)](o(-259,-320)),this[o(-408,-366)](o(-382,-269)+r.ma),this[o(-464,-366)](o(-237,-292)+r.ca),this[o(-250,-366)](o(-264,-300)+r.ka),this[o(-397,-366)](o(-267,-391)+r.sa),this[o(-463,-366)](o(-298,-395)+r.t+"s"),this[o(-291,-366)](o(-202,-258)+r.nm),this[o(-441,-366)](o(-339,-410)+r.vc),this[o(-237,-272)][o(-216,-234)]&&(this[o(-501,-366)](o(-415,-442)+this[o(-189,-272)][o(-357,-234)][o(-343,-298)]),this[o(-285,-366)](o(-353,-454)+this[o(-182,-272)][o(-329,-234)][o(-406,-482)]+"s"))}this[o(-366,-366)](o(-315,-308),!0)}this[o(-217,-272)][o(-374,-328)][o(-432,-341)]=(h=s,{...h}),this[o(-373,-272)][o(-342,-328)][o(-393,-427)]=Date[o(-417,-368)](),this[o(-429,-311)](s);const l=a?o(-289,-259):o(-148,-232);await this[o(-403,-489)](s,l)}else this[o(-186,-252)][o(-203,-279)]&&this[o(-442,-366)](o(-340,-429),!0);var h}}const Ot=t=>{const e=1088,n=1150,i=1070;function r(t,e){return Rt(t,e-1348)}const o=/_shopify_s=([^;]*)/[r(1262,1201)](t[r(984,e)][r(n,i)]);return o?o[1]:void 0},Kt=(t,e)=>{const n=378,i=513,r=437,o=444,s=362,a=335,c=454,u=463,h=396,l=605,d=575,f=Ot(t),p=/_shopify_y=([^;]*)/[g(509,566)](t[g(396,452)][g(n,324)]);function g(t,e){return Rt(e,t-656)}const m=p?p[1]:void 0;return{libVersion:Lt[g(450,i)],shopId:e||"",hostname:t[g(r,515)]?.[g(o,s)]?.[g(a,437)]||"",url:t[g(r,431)]?.[g(444,c)]?.[g(474,u)]||"",referrer:t[g(h,432)]?.[g(l,d)]||"",sessionToken:f||"",_0x1385e8:m||""}},Gt=(t,e=It,n=new vt(Tt,_t))=>{const i=657,r=734,o=598,s=528,a=518,c=675,u=570,h=632,l=463,d=518,f=748,p=new dt({exporter:n,attributes:Kt(e,t?.[y(i,644)])}),g=Ot(e),m=g?function(t){let e=0;for(let n=0,i=t.length;nw[y(625,628)]()):w[y(625,f)](),w};function Rt(t,e){return qt(e- -619,t)}var Yt="2.0.13";const Wt=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"}),Jt=new RegExp(`^${window.location.origin}/((?:(?:[a-z]{2,3}|zh-hans|zh-hant)(?:-[a-zA-Z0-9]+)/)?cart/(add|change|update|clear))`),Xt=new RegExp("cart-performance:|add:|change:|clear:|note_update:");var Ft;function $t({monorailRegion:t,schema:e,rawData:n}){const i=Date.now(),r={schema_id:e,payload:e===Ft.OnUnload?Qt(n):te(n),metadata:{event_created_at_ms:i,event_sent_at_ms:i}},o=Wt[t||""],s=JSON.stringify(r);if(!o)return void console.debug("📡 Monorail: ",JSON.stringify(r,null,2));try{const t=new window.Blob([s],{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(o,t))return}catch(t){}const a=new XMLHttpRequest;a.open("POST",o),a.setRequestHeader("Content-type","text/plain"),a.send(s)}function Qt(t){const e=ee(t,["domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","firstPaint","visuallyReady","initiatorType","redirectCount","cartAjaxResourceTimings","cartPerformanceMetrics"]);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,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,other_metrics:JSON.stringify(e)}}function te(t){const e=ee(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,other_interaction_metrics:JSON.stringify(e)}}function ee(t,e){return e.reduce((e,n)=>{var i;return t[n]&&(e[(i=n,i.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`))]=t[n]||null),e},{})}!function(t){t.OnInteraction="perf_kit_on_interaction/3.1",t.OnUnload="perf_kit_on_unload/3.3"}(Ft||(Ft={}));const ne="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function ie(){let t="";try{const e=window.crypto,n=new Uint16Array(31);e.getRandomValues(n);let i=0;t=ne.replace(/[x]/g,t=>{const e=n[i]%16;return i++,("x"===t?e:3&e|8).toString(16)}).toUpperCase()}catch(e){t=ne.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 re=!0,oe=!1,se=null,ae=null,ce=!1;class ue{info;config;performanceMetrics;constructor(t){const e=/_shopify_s=([^;]*)/.exec(document.cookie),n=e?e[1]:void 0,i=/_shopify_y=([^;]*)/.exec(document.cookie),r=i?i[1]:void 0;this.config=t,this.info={perfKitInit:Date.now(),perfKitVersion:Yt,url:window.location.href,referrer:document.referrer||void 0,microSessionId:ie(),microSessionCount:0,sessionToken:n,uniqueToken:r},performance.setResourceTimingBufferSize(1e3),this.performanceMetrics=function(t){const e=performance.getEntriesByType("navigation");if(0===e.length)return{};const n=e[0];let i=!1;return(n.requestStart&&n.startTime&&n.requestStartt+864e5)&&(i=!0),{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:Math.round(n.domInteractive),domComplete:Math.round(n.domComplete),domContentLoadedEventStart:Math.round(n.domContentLoadedEventStart),domContentLoadedEventEnd:Math.round(n.domContentLoadedEventEnd),redirectCount:n.redirectCount,initiatorType:n.initiatorType,transferSize:n.transferSize}}(this.info.perfKitInit)}}const he=new Set;function le(){if(null!==se){if(de()&&he.size>0){let t={};for(const e of he)t={...t,...e};he.clear(),se.info.microSessionCount+=1;const e=function(t){if(!(100*Math.random()>(t||10)))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))})}(se.config.resourceTimingSamplingRate),n=performance.getEntriesByType("resource").filter(t=>Jt.test(t.name)),i=performance.getEntriesByType("measure").filter(t=>Xt.test(t.name)).map(t=>{const e=t.toJSON();return e.name.startsWith("cart-performance:")||(e.name=`cart-performance:${e.name}`),e});$t({monorailRegion:se.config.monorailRegion,schema:Ft.OnUnload,rawData:{...se.info,...se.config.storefrontData,...se.performanceMetrics,...t,resourceTiming:e,cartAjaxResourceTimings:n,cartPerformanceMetrics:i,paintTimingHidden:ce}})}}else console.debug("⛔️ Shopify/perf-kit is not initialized")}function de(){return null!==ae?ae:et()}((e,i={})=>{const o=s(i=Object.assign({},i),t),a=new WeakMap;o.t=t=>{if(t?.sources?.length){const e=D(t.sources),n=e?.node;if(n){const t=i.generateTarget?.(n)??r(n);a.set(e,t)}}},((e,n={})=>{const i=L();M(g(()=>{let r,o=f("CLS",0);const a=s(n,t),c=t=>{for(const e of t)a.u(e);a.o>o.value&&(o.value=a.o,o.entries=a.i,r())},d=p("layout-shift",c);d&&(r=h(e,o,B,n.reportAllChanges),i.onHidden(()=>{c(d.takeRecords()),r(!0)}),u(()=>{a.o=0,o=f("CLS",0),r=h(e,o,B,n.reportAllChanges),l(()=>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=D(i.sources);t&&(e={largestShiftTarget:a.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;he.add({cumulativeLayoutShift:n,cumulativeLayoutShiftTarget:e.largestShiftTarget})}),((t,n={})=>{const i=s(n=Object.assign({},n),N),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={})=>{b(()=>{const n=L();let i,r=f("LCP");const o=s(e,N),a=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)o.u(e),e.startTime{a(c.takeRecords()),c.disconnect(),i(!0)}),o=t=>{t.isTrusted&&(I(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=h(t,r,q,e.reportAllChanges),l(()=>{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),s=r.url&&performance.getEntriesByType("resource").filter(t=>t.name===r.url)[0],a=Math.max(0,i.responseStart-e),c=Math.max(a,s?(s.requestStart||s.startTime)-e:0),u=Math.min(t.value,Math.max(c,s?s.responseEnd-e:0));n={target:o.get(r),timeToFirstByte:a,resourceLoadDelay:c-a,resourceLoadDuration:u-c,elementRenderDelay:t.value-u,navigationEntry:i,lcpEntry:r},r.url&&(n.url=r.url),s&&(n.lcpResourceEntry=s)}}return Object.assign(t,{attribution:n})})(n);t(i)},n)})(function(t){const{attribution:e,value:n}=t;he.add({largestContentfulPaint:Math.round(n),largestContentfulPaintTarget:e.target})}),((t,i={})=>{M(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,s=Math.max(0,r.responseStart-e);i={timeToFirstByte:s,firstByteToFCP:t.value-s,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;he.add({firstContentfulPaint:Math.round(e)})}),((t,e={})=>{const i=s(e=Object.assign({},e),H);let o=[],a=[],c=0;const l=new WeakMap,d=new WeakMap;let g=!1;const m=()=>{g||(I(v),g=!0)},v=()=>{const t=i.l.map(t=>l.get(t.entries[0])),e=a.length-50;a=a.filter((n,i)=>i>=e||t.includes(n));const n=new Set;for(const t of a){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)),g=!1};i.m=t=>{const e=t.startTime+t.duration;let n;c=Math.max(c,t.processingEnd);for(let i=a.length-1;i>=0;i--){const r=a[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]},a.push(n)),(t.interactionId||"first-input"===t.entryType)&&l.set(t,n),m()},i.p=t=>{if(!d.get(t)){const n=t.entries[0].target;if(n){const i=e.generateTarget?.(n)??r(n);d.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=l.get(e),o=e.processingStart,s=Math.max(e.startTime+e.duration,o),a=Math.min(r.processingEnd,s),c=r.entries.sort((t,e)=>t.processingStart-e.processingStart),u=y(e.startTime,a),h=i.h.get(e.interactionId),f={interactionTarget:d.get(h),interactionType:e.name.startsWith("key")?"keyboard":"pointer",interactionTime:e.startTime,nextPaintTime:s,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:o-e.startTime,processingDuration:a-o,presentationDelay:s-a,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,s=0,a=0,c=0,u=0;for(const c of t.longAnimationFrameEntries){a=a+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=h)}}const h=t.longAnimationFrameEntries.at(-1),l=h?h.startTime+h.duration:0;l>=e+n+i&&(c=t.nextPaintTime-l),r&&o&&(t.longestScript={entry:r,subpart:o,intersectingDuration:u}),t.totalScriptDuration=s,t.totalStyleAndLayoutDuration=a,t.totalPaintDuration=c,t.totalUnattributedDuration=t.nextPaintTime-e-s-a-c})(f),Object.assign(t,{attribution:f})};p("long-animation-frame",t=>{o=o.concat(t),m()}),((t,e={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=L();b(()=>{"interactionCount"in performance||_||(_=p("event",T,{type:"event",buffered:!0,durationThreshold:0}));let i,r=f("INP");const o=s(e,H),a=t=>{I(()=>{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=p("event",a,{durationThreshold:e.durationThreshold??40});i=h(t,r,k,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{a(c.takeRecords()),i(!0)}),u(()=>{o.v(),r=f("INP"),i=h(t,r,k,e.reportAllChanges)}))})})(e=>{const n=w(e);t(n)},e)})(function(t){const{attribution:e,value:n}=t;if(null===se)return void console.debug("⛔️ Shopify/perf-kit is not initialized");if(!de())return;se.info.microSessionCount+=1;const{inputDelay:i,processingDuration:r,presentationDelay:o,longestScript:s,interactionTarget:a}=e,c=s?.entry?{slowest_script:s.entry.sourceURL,slowest_script_duration:Math.round(s.entry.duration)}:{};$t({monorailRegion:se.config.monorailRegion,schema:Ft.OnInteraction,rawData:{...se.info,...se.config.storefrontData,...se.performanceMetrics,interactionToNextPaint:Math.round(n),interactionToNextPaintTarget:a,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=h(t,i,E,n.reportAllChanges);j(()=>{const o=e();o&&(i.value=Math.max(o.responseStart-d(),0),i.entries=[o],r(!0),u(()=>{i=f("TTFB",0),r=h(t,i,E,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),s=Math.max(n.connectStart-i,0),a=Math.max(n.connectEnd-i,0);e={waitingDuration:r,cacheDuration:o-r,dnsDuration:s-o,connectionDuration:a-s,requestDuration:t.value-a,navigationEntry:n}}return Object.assign(t,{attribution:e})})(e);t(n)},n)})(function(t){const{value:e}=t;he.add({timeToFirstByte:Math.round(e)})}),addEventListener("DOMContentLoaded",()=>{ce="hidden"===document.visibilityState}),addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&le()}),function(){const{dataset:t}=document.currentScript;try{e=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},monorailRegion:t.monorailRegion,resourceTimingSamplingRate:Number(t.resourceTimingSamplingRate)||void 0,spaMode:"true"===t.spaMode,shs:"true"===t.shs,shsBeacon:"true"===t.shsBeacon,shsCookie:"true"===t.shsCookie,shsExportWithFetch:"true"===t.shsExportWithFetch,shsLogsSampleRate:Number(t.shsLogsSampleRate)||1}}(t),se=new ue(e),e.spaMode&&(window.PerfKit={navigate:()=>{re?re=!1:oe||(le(),se=new ue(e),oe=!0)},setPageType:t=>{e.storefrontData.pageType=t},setConsent:t=>{ae=t}}),e.shs&&Gt({debug:!1,shopId:e.storefrontData.shopId,enableBeacon:e.shsBeacon||!1,enableCookie:e.shsCookie||!0,exportWithFetch:e.shsExportWithFetch||!0,logsSampleRate:e.shsLogsSampleRate})}catch(t){console.error("🚫 Error initializing PerfKit:",t.message)}var e}()}();