@elevateab/sdk 1.2.7 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +97 -30
  2. package/dist/cartAttributes-APUF5Y5N.js +3 -0
  3. package/dist/cartAttributes-OFPJ33X2.js +2 -0
  4. package/dist/chunk-5JX7O5JL.js +18 -0
  5. package/dist/chunk-5JX7O5JL.js.map +1 -0
  6. package/dist/{chunk-XXNIBCJ6.js → chunk-NDGAU23Z.js} +2 -2
  7. package/dist/chunk-U2FG4EEA.js +19 -0
  8. package/dist/chunk-U2FG4EEA.js.map +1 -0
  9. package/dist/hydrogen.cjs +2 -2
  10. package/dist/hydrogen.cjs.map +1 -1
  11. package/dist/hydrogen.js +1 -1
  12. package/dist/index.cjs +30 -25
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +315 -311
  15. package/dist/index.d.ts +315 -311
  16. package/dist/index.js +29 -24
  17. package/dist/index.js.map +1 -1
  18. package/dist/next.cjs +30 -25
  19. package/dist/next.cjs.map +1 -1
  20. package/dist/next.d.cts +129 -71
  21. package/dist/next.d.ts +129 -71
  22. package/dist/next.js +29 -24
  23. package/dist/next.js.map +1 -1
  24. package/dist/vite.cjs +2 -0
  25. package/dist/vite.cjs.map +1 -0
  26. package/dist/vite.d.cts +28 -0
  27. package/dist/vite.d.ts +28 -0
  28. package/dist/vite.js +2 -0
  29. package/dist/vite.js.map +1 -0
  30. package/package.json +8 -2
  31. package/dist/cartAttributes-4XA3JSEP.js +0 -2
  32. package/dist/cartAttributes-NW2TWOYC.js +0 -3
  33. package/dist/chunk-4D5I75NE.js +0 -19
  34. package/dist/chunk-4D5I75NE.js.map +0 -1
  35. package/dist/chunk-VUGOZ5MR.js +0 -18
  36. package/dist/chunk-VUGOZ5MR.js.map +0 -1
  37. /package/dist/{cartAttributes-4XA3JSEP.js.map → cartAttributes-APUF5Y5N.js.map} +0 -0
  38. /package/dist/{cartAttributes-NW2TWOYC.js.map → cartAttributes-OFPJ33X2.js.map} +0 -0
  39. /package/dist/{chunk-XXNIBCJ6.js.map → chunk-NDGAU23Z.js.map} +0 -0
package/dist/hydrogen.js CHANGED
@@ -1,2 +1,2 @@
1
- import{n as e}from"./chunk-XXNIBCJ6.js";import"./chunk-VUGOZ5MR.js";import{useAnalytics as o}from"@shopify/hydrogen";import{jsx as n}from"react/jsx-runtime";function r(t={}){return n(e,{...t,useAnalytics:o})}export{r as ElevateHydrogenAnalytics};
1
+ import{n as e}from"./chunk-NDGAU23Z.js";import"./chunk-5JX7O5JL.js";import{useAnalytics as o}from"@shopify/hydrogen";import{jsx as n}from"react/jsx-runtime";function r(t={}){return n(e,{...t,useAnalytics:o})}export{r as ElevateHydrogenAnalytics};
2
2
  //# sourceMappingURL=hydrogen.js.map
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var zr=Object.create;var Je=Object.defineProperty;var qr=Object.getOwnPropertyDescriptor;var jr=Object.getOwnPropertyNames;var $r=Object.getPrototypeOf,Gr=Object.prototype.hasOwnProperty;var Ve=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wt=(e,t)=>{for(var r in t)Je(e,r,{get:t[r],enumerable:!0})},Ht=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jr(t))!Gr.call(e,i)&&i!==r&&Je(e,i,{get:()=>t[i],enumerable:!(s=qr(t,i))||s.enumerable});return e};var Ye=(e,t,r)=>(r=e!=null?zr($r(e)):{},Ht(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e)),Hr=e=>Ht(Je({},"__esModule",{value:!0}),e);function Jt(e,t){let r=e.reduce((d,m)=>d+m.weight,0),i=De(t)%r,p=0;for(let d of e)if(p+=d.weight,i<p)return d;return e[0]}function De(e){let t=0;for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);t=(t<<5)-t+s,t=t&t}return Math.abs(t)}function Yt(e){return!e.testId||!e.name||!e.variations||e.variations.length===0?!1:e.variations.reduce((r,s)=>r+s.weight,0)===100}function Qt(e){let t=Date.now(),r=Math.random().toString(36).substring(2,9);return`exp-${e.toLowerCase().replace(/[^a-z0-9]/g,"-")}-${t}-${r}`}function Kt(e,t,r,s){let i=e/r,p=t/s,d=(p-i)/i*100,l=Math.sqrt((e+t)/(r+s))*Math.sqrt(1/r+1/s),w=Math.abs(p-i)/l,o=Math.min(99.9,w*34);return{lift:d,confidence:o}}function bt(e){let t=[];for(let[r,s]of Object.entries(e.allTests)){if(!s.data.isLive)continue;let i=[],p=0;for(let[d,m]of Object.entries(s)){if(d==="data")continue;let l=m;if(typeof l=="object"&&l!==null&&"variationName"in l){let w=!!l.isControl;i.push({id:d,name:l.variationName,weight:l.trafficPercentage,isControl:w,productId:l.id,handle:l.handle,price:l.price,isA:!w&&p===0,isB:!w&&p===1,isC:!w&&p===2,isD:!w&&p===3}),w||p++}}i.length>0&&t.push({testId:r,name:s.data.name,enabled:s.data.isLive,type:s.data.type,variations:i})}return{tests:t,selectors:e.selectors}}var Qe=Ve(()=>{"use strict"});function ae(){try{if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){let e=new Uint8Array(16);window.crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(r=>r.toString(16).padStart(2,"0"));return[t.slice(0,4).join(""),t.slice(4,6).join(""),t.slice(6,8).join(""),t.slice(8,10).join(""),t.slice(10,16).join("")].join("-")}}catch(e){console.warn("[ElevateAB] Crypto UUID generation failed, falling back to Math.random()",e)}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function j(e,t){if(typeof document>"u")return;let r=new Date;r.setTime(r.getTime()+365*24*60*60*1e3);let s="; expires="+r.toUTCString();document.cookie=e+"="+(t||"")+s+"; path=/"}function O(e){if(typeof document>"u")return null;let t=e+"=",r=document.cookie.split(";");for(let s=0;s<r.length;s++){let i=r[s];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null}function F(e){let t=O(e);if(t)try{return JSON.parse(t)}catch(r){return console.error("[ElevateAB] Error parsing JSON from cookie",r),null}return null}function Xt(e){typeof document>"u"||(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}function re(e,t){typeof sessionStorage>"u"||sessionStorage.setItem(e,JSON.stringify(t))}function Y(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}function Ne(e){let t=Y(e);return t?JSON.parse(t):null}function wt(){let e=O("eabUserId");return e||(e=ae(),j("eabUserId",e)),e}function oe(){return wt()}function ht(){let e=Y("eabSessionId");return e||(e=ae(),re("eabSessionId",e)),e}function be(){return ht()}function Ke(e,t){if(typeof sessionStorage>"u")return;let r=Y("eabReferrer"),s=Y("eabEntry");r||re("eabReferrer",e),s||re("eabEntry",t)}function _e(){return{referrer:Y("eabReferrer")||"",entryPage:Y("eabEntry")||""}}var W=Ve(()=>{"use strict"});function ke(){return F("ABTL")||{}}function yt(e){j("ABTL",JSON.stringify(e))}function Xe(e){return ke()[e]||null}function Zt(e,t){if(e[t]?.isControl)return-1;let s=0;for(let i=0;i<t;i++)e[i]?.isControl||s++;return s}function Jr(e,t){let r=e.every(o=>typeof o.weight=="number"),s=[],i=0;if(r)for(let o of e)i+=o.weight,s.push(i);else{let o=100/e.length;for(let c=0;c<e.length;c++)i+=o,s.push(i)}let d=De(t)%1e4/100,m=0;for(let o=0;o<s.length;o++)if(d<s[o]){m=o;break}let l=e[m]||e[0],w=Zt(e,m);return{...l,isA:w===0,isB:w===1,isC:w===2,isD:w===3}}function Ze(e,t,r){let s=Xe(e);if(s){let l=t.variations.findIndex(w=>w.id===s);if(l!==-1){let w=t.variations[l],o=Zt(t.variations,l);return{...w,isA:o===0,isB:o===1,isC:o===2,isD:o===3}}}let i=t.variations.filter(l=>!l.isDone);if(i.length===0)return null;let p=t.isPersonalization,d;p?d=i.find(w=>!w.isControl)||i[0]:d=Jr(i,r);let m=ke();return m[e]=d.id,yt(m),d}function et(e){let t=e.testTrafficPercentage;return typeof t!="number"||Xe(e.testId)?!0:Math.random()*100<t}var tt=Ve(()=>{"use strict";W();Qe()});var br=Wr((Me,at)=>{"use strict";(function(e,t){"use strict";var r="1.0.41",s="",i="?",p="function",d="undefined",m="object",l="string",w="major",o="model",c="name",n="type",a="vendor",u="version",k="architecture",x="console",g="mobile",h="tablet",E="smarttv",B="wearable",X="embedded",Ie=500,ye="Amazon",ne="Apple",Ge="ASUS",f="BlackBerry",b="Browser",S="Chrome",R="Edge",L="Firefox",M="Google",$="Honor",I="Huawei",V="Lenovo",G="LG",me="Microsoft",Z="Motorola",ee="Nvidia",ie="OnePlus",ge="Opera",lt="OPPO",Ue="Samsung",Dt="Sharp",Re="Sony",pt="Xiaomi",ft="Zebra",Nt="Facebook",Ft="Chromium OS",Mt="Mac OS",zt=" Browser",Nr=function(P,A){var _={};for(var U in P)A[U]&&A[U].length%2===0?_[U]=A[U].concat(P[U]):_[U]=P[U];return _},We=function(P){for(var A={},_=0;_<P.length;_++)A[P[_].toUpperCase()]=P[_];return A},qt=function(P,A){return typeof P===l?Le(A).indexOf(Le(P))!==-1:!1},Le=function(P){return P.toLowerCase()},Fr=function(P){return typeof P===l?P.replace(/[^\d\.]/g,s).split(".")[0]:t},mt=function(P,A){if(typeof P===l)return P=P.replace(/^\s\s*/,s),typeof A===d?P:P.substring(0,Ie)},Oe=function(P,A){for(var _=0,U,te,H,C,y,J;_<A.length&&!y;){var gt=A[_],Gt=A[_+1];for(U=te=0;U<gt.length&&!y&&gt[U];)if(y=gt[U++].exec(P),y)for(H=0;H<Gt.length;H++)J=y[++te],C=Gt[H],typeof C===m&&C.length>0?C.length===2?typeof C[1]==p?this[C[0]]=C[1].call(this,J):this[C[0]]=C[1]:C.length===3?typeof C[1]===p&&!(C[1].exec&&C[1].test)?this[C[0]]=J?C[1].call(this,J,C[2]):t:this[C[0]]=J?J.replace(C[1],C[2]):t:C.length===4&&(this[C[0]]=J?C[3].call(this,J.replace(C[1],C[2])):t):this[C]=J||t;_+=2}},Be=function(P,A){for(var _ in A)if(typeof A[_]===m&&A[_].length>0){for(var U=0;U<A[_].length;U++)if(qt(A[_][U],P))return _===i?t:_}else if(qt(A[_],P))return _===i?t:_;return A.hasOwnProperty("*")?A["*"]:P},Mr={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},jt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},$t={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,u],[/opios[\/ ]+([\w\.]+)/i],[u,[c,ge+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[c,ge+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[c,ge]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[u,[c,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[u,[c,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,u],[/quark(?:pc)?\/([-\w\.]+)/i],[u,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[u,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[u,[c,"UC"+b]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[u,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[u,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[u,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[u,[c,"Smart Lenovo "+b]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+b],u],[/\bfocus\/([\w\.]+)/i],[u,[c,L+" Focus"]],[/\bopt\/([\w\.]+)/i],[u,[c,ge+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[c,ge+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI"+zt]],[/fxios\/([\w\.-]+)/i],[u,[c,L]],[/\bqihoobrowser\/?([\w\.]*)/i],[u,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],u],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+zt],u],[/samsungbrowser\/([\w\.]+)/i],[u,[c,Ue+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[u,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],u],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[c,u],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[u,c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,Nt],u],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,u],[/\bgsa\/([\w\.]+) .*safari\//i],[u,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[u,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[u,[c,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,S+" WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[c,"Android "+b]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,u],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[u,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[u,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[u,Be,Mr]],[/(webkit|khtml)\/([\w\.]+)/i],[c,u],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],u],[/(wolvic|librewolf)\/([\w\.]+)/i],[c,u],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[u,[c,L+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[c,[u,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[u,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[k,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[k,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[k,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[k,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[k,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[k,/ower/,s,Le]],[/ sun4\w[;\)]/i],[[k,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[k,Le]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[o,[a,Ue],[n,h]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[o,[a,Ue],[n,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[o,[a,ne],[n,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[a,ne],[n,h]],[/(macintosh);/i],[o,[a,ne]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[a,Dt],[n,g]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[o,[a,$],[n,h]],[/honor([-\w ]+)[;\)]/i],[o,[a,$],[n,g]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[o,[a,I],[n,h]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[o,[a,I],[n,g]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[o,/_/g," "],[a,pt],[n,h]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[o,/_/g," "],[a,pt],[n,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[a,lt],[n,g]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[o,[a,Be,{OnePlus:["304","403","203"],"*":lt}],[n,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[a,"Vivo"],[n,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[o,[a,"Realme"],[n,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[o,[a,Z],[n,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[a,Z],[n,h]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[a,G],[n,h]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[a,G],[n,g]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[o,[a,V],[n,h]],[/(nokia) (t[12][01])/i],[a,o,[n,h]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[o,/_/g," "],[n,g],[a,"Nokia"]],[/(pixel (c|tablet))\b/i],[o,[a,M],[n,h]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[a,M],[n,g]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[a,Re],[n,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[a,Re],[n,h]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[a,ie],[n,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[a,ye],[n,h]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[a,ye],[n,g]],[/(playbook);[-\w\),; ]+(rim)/i],[o,a,[n,h]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[a,f],[n,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[a,Ge],[n,h]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[a,Ge],[n,g]],[/(nexus 9)/i],[o,[a,"HTC"],[n,h]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[a,[o,/_/g," "],[n,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[o,[a,"TCL"],[n,h]],[/(itel) ((\w+))/i],[[a,Le],o,[n,Be,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[a,"Acer"],[n,h]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[a,"Meizu"],[n,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[o,[a,"Ulefone"],[n,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[o,[a,"Energizer"],[n,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[o,[a,"Cat"],[n,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[o,[a,"Smartfren"],[n,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[o,[a,"Nothing"],[n,g]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[o,[a,"Archos"],[n,h]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[o,[a,"Archos"],[n,g]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[a,o,[n,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[a,o,[n,g]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[a,o,[n,h]],[/(surface duo)/i],[o,[a,me],[n,h]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[a,"Fairphone"],[n,g]],[/(u304aa)/i],[o,[a,"AT&T"],[n,g]],[/\bsie-(\w*)/i],[o,[a,"Siemens"],[n,g]],[/\b(rct\w+) b/i],[o,[a,"RCA"],[n,h]],[/\b(venue[\d ]{2,7}) b/i],[o,[a,"Dell"],[n,h]],[/\b(q(?:mv|ta)\w+) b/i],[o,[a,"Verizon"],[n,h]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[a,"Barnes & Noble"],[n,h]],[/\b(tm\d{3}\w+) b/i],[o,[a,"NuVision"],[n,h]],[/\b(k88) b/i],[o,[a,"ZTE"],[n,h]],[/\b(nx\d{3}j) b/i],[o,[a,"ZTE"],[n,g]],[/\b(gen\d{3}) b.+49h/i],[o,[a,"Swiss"],[n,g]],[/\b(zur\d{3}) b/i],[o,[a,"Swiss"],[n,h]],[/\b((zeki)?tb.*\b) b/i],[o,[a,"Zeki"],[n,h]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[a,"Dragon Touch"],o,[n,h]],[/\b(ns-?\w{0,9}) b/i],[o,[a,"Insignia"],[n,h]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[a,"NextBook"],[n,h]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[a,"Voice"],o,[n,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[a,"LvTel"],o,[n,g]],[/\b(ph-1) /i],[o,[a,"Essential"],[n,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[a,"Envizen"],[n,h]],[/\b(trio[-\w\. ]+) b/i],[o,[a,"MachSpeed"],[n,h]],[/\btu_(1491) b/i],[o,[a,"Rotor"],[n,h]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[o,[a,ee],[n,h]],[/(sprint) (\w+)/i],[a,o,[n,g]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[a,me],[n,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[a,ft],[n,h]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[a,ft],[n,g]],[/smart-tv.+(samsung)/i],[a,[n,E]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[a,Ue],[n,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[a,G],[n,E]],[/(apple) ?tv/i],[a,[o,ne+" TV"],[n,E]],[/crkey/i],[[o,S+"cast"],[a,M],[n,E]],[/droid.+aft(\w+)( bui|\))/i],[o,[a,ye],[n,E]],[/(shield \w+ tv)/i],[o,[a,ee],[n,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[o,[a,Dt],[n,E]],[/(bravia[\w ]+)( bui|\))/i],[o,[a,Re],[n,E]],[/(mi(tv|box)-?\w+) bui/i],[o,[a,pt],[n,E]],[/Hbbtv.*(technisat) (.*);/i],[a,o,[n,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[a,mt],[o,mt],[n,E]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[o,[n,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[n,E]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[a,o,[n,x]],[/droid.+; (shield)( bui|\))/i],[o,[a,ee],[n,x]],[/(playstation \w+)/i],[o,[a,Re],[n,x]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[a,me],[n,x]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[o,[a,Ue],[n,B]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[a,o,[n,B]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[o,[a,lt],[n,B]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[o,[a,ne],[n,B]],[/(opwwe\d{3})/i],[o,[a,ie],[n,B]],[/(moto 360)/i],[o,[a,Z],[n,B]],[/(smartwatch 3)/i],[o,[a,Re],[n,B]],[/(g watch r)/i],[o,[a,G],[n,B]],[/droid.+; (wt63?0{2,3})\)/i],[o,[a,ft],[n,B]],[/droid.+; (glass) \d/i],[o,[a,M],[n,B]],[/(pico) (4|neo3(?: link|pro)?)/i],[a,o,[n,B]],[/; (quest( \d| pro)?)/i],[o,[a,Nt],[n,B]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[a,[n,X]],[/(aeobc)\b/i],[o,[a,ye],[n,X]],[/(homepod).+mac os/i],[o,[a,ne],[n,X]],[/windows iot/i],[[n,X]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[o,[n,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[n,h]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[n,h]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[n,g]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[o,[a,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[c,R+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[c,u],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,u],[/ladybird\//i],[[c,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,u],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[c,[u,Be,jt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[u,Be,jt],[c,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,Mt],[u,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[u,c],[/(ubuntu) ([\w\.]+) like android/i],[[c,/(.+)/,"$1 Touch"],u],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[c,u],[/\(bb(10);/i],[u,[c,f]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[u,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[c,L+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[u,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[u,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[u,[c,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,Ft],u],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,u],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],u],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,u]]},q=function(P,A){if(typeof P===m&&(A=P,P=t),!(this instanceof q))return new q(P,A).getResult();var _=typeof e!==d&&e.navigator?e.navigator:t,U=P||(_&&_.userAgent?_.userAgent:s),te=_&&_.userAgentData?_.userAgentData:t,H=A?Nr($t,A):$t,C=_&&_.userAgent==U;return this.getBrowser=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.browser),y[w]=Fr(y[u]),C&&_&&_.brave&&typeof _.brave.isBrave==p&&(y[c]="Brave"),y},this.getCPU=function(){var y={};return y[k]=t,Oe.call(y,U,H.cpu),y},this.getDevice=function(){var y={};return y[a]=t,y[o]=t,y[n]=t,Oe.call(y,U,H.device),C&&!y[n]&&te&&te.mobile&&(y[n]=g),C&&y[o]=="Macintosh"&&_&&typeof _.standalone!==d&&_.maxTouchPoints&&_.maxTouchPoints>2&&(y[o]="iPad",y[n]=h),y},this.getEngine=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.engine),y},this.getOS=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.os),C&&!y[c]&&te&&te.platform&&te.platform!="Unknown"&&(y[c]=te.platform.replace(/chrome os/i,Ft).replace(/macos/i,Mt)),y},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return U},this.setUA=function(y){return U=typeof y===l&&y.length>Ie?mt(y,Ie):y,this},this.setUA(U),this};q.VERSION=r,q.BROWSER=We([c,u,w]),q.CPU=We([k]),q.DEVICE=We([o,a,n,x,g,E,h,B,X]),q.ENGINE=q.OS=We([c,u]),typeof Me!==d?(typeof at!==d&&at.exports&&(Me=at.exports=q),Me.UAParser=q):typeof define===p&&define.amd?define(function(){return q}):typeof e!==d&&(e.UAParser=q);var ve=typeof e!==d&&(e.jQuery||e.Zepto);if(ve&&!ve.ua){var He=new q;ve.ua=He.getResult(),ve.ua.get=function(){return He.getUA()},ve.ua.set=function(P){He.setUA(P);var A=He.getResult();for(var _ in A)ve.ua[_]=A[_]}}})(typeof window=="object"?window:Me)});var ze,Lt=Ve(()=>{"use strict";ze=`#graphql
1
+ "use strict";var gn=Object.create;var tt=Object.defineProperty;var wn=Object.getOwnPropertyDescriptor;var bn=Object.getOwnPropertyNames;var hn=Object.getPrototypeOf,yn=Object.prototype.hasOwnProperty;var Se=(e,t)=>()=>(e&&(t=e(e=0)),t);var vn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),br=(e,t)=>{for(var r in t)tt(e,r,{get:t[r],enumerable:!0})},hr=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of bn(t))!yn.call(e,n)&&n!==r&&tt(e,n,{get:()=>t[n],enumerable:!(o=wn(t,n))||o.enumerable});return e};var rt=(e,t,r)=>(r=e!=null?gn(hn(e)):{},hr(t||!e||!e.__esModule?tt(r,"default",{value:e,enumerable:!0}):r,e)),_n=e=>hr(tt({},"__esModule",{value:!0}),e);function nt(e){let t=0;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);t=(t<<5)-t+o,t=t&t}return Math.abs(t)}function yr(e){let t=[];for(let[r,o]of Object.entries(e.allTests)){if(!o.data.isLive)continue;let n=[],u=0;for(let[s,p]of Object.entries(o)){if(s==="data")continue;let l=p;if(typeof l=="object"&&l!==null&&"variationName"in l){let g=!!l.isControl,i=l.content,d;i&&typeof i=="object"&&(d={changes:i.changes||[],elements:i.elements||[],blocks:i.blocks||[],customCodes:i.customCodes||[]}),n.push({id:s,name:l.variationName,weight:l.trafficPercentage,isControl:g,productId:l.id,handle:l.handle,price:l.price,prices:l.prices,splitUrlTestLinks:l.splitUrlTestLinks,content:d,isA:!g&&u===0,isB:!g&&u===1,isC:!g&&u===2,isD:!g&&u===3}),g||u++}}n.length>0&&t.push({testId:r,name:o.data.name,enabled:o.data.isLive,type:o.data.type,variations:n,data:o.data})}return{tests:t,selectors:e.selectors}}var ot=Se(()=>{"use strict"});function de(){try{if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){let e=new Uint8Array(16);window.crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(r=>r.toString(16).padStart(2,"0"));return[t.slice(0,4).join(""),t.slice(4,6).join(""),t.slice(6,8).join(""),t.slice(8,10).join(""),t.slice(10,16).join("")].join("-")}}catch(e){console.warn("[ElevateAB] Crypto UUID generation failed, falling back to Math.random()",e)}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function M(e,t){if(typeof document>"u")return;let r=new Date;r.setTime(r.getTime()+365*24*60*60*1e3);let o="; expires="+r.toUTCString();document.cookie=e+"="+(t||"")+o+"; path=/"}function V(e){if(typeof document>"u")return null;let t=e+"=",r=document.cookie.split(";");for(let o=0;o<r.length;o++){let n=r[o];for(;n.charAt(0)===" ";)n=n.substring(1,n.length);if(n.indexOf(t)===0)return n.substring(t.length,n.length)}return null}function N(e){let t=V(e);if(t)try{return JSON.parse(t)}catch(r){return console.error("[ElevateAB] Error parsing JSON from cookie",r),null}return null}function vr(e){typeof document>"u"||(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}function ae(e,t){typeof sessionStorage>"u"||sessionStorage.setItem(e,JSON.stringify(t))}function Z(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}function qe(e){let t=Z(e);return t?JSON.parse(t):null}function St(){let e=V("eabUserId");return e||(e=de(),M("eabUserId",e)),e}function se(){return St()}function It(){let e=Z("eabSessionId");return e||(e=de(),ae("eabSessionId",e)),e}function xe(){return It()}function it(e,t){if(typeof sessionStorage>"u")return;let r=Z("eabReferrer"),o=Z("eabEntry");r||ae("eabReferrer",e),o||ae("eabEntry",t)}function Ie(){return{referrer:Z("eabReferrer")||"",entryPage:Z("eabEntry")||""}}var J=Se(()=>{"use strict"});function kn(e){let t={},r={};if(!e)return{assignments:t,views:r};let o=e.split("~");for(let n of o){let u=n.split("_");if(u.length>=2){let s=u[0],p=u[1],l=u[2]==="1";t[s]=p,r[s]=l}}return{assignments:t,views:r}}function le(){if(typeof window>"u")return{isPreview:!1,previewTestId:null,forcedAssignments:{},previewedViews:{}};let e=new URLSearchParams(window.location.search),r=(e.get("eabUserPreview")||V("eabUserPreview"))==="true",o=e.get("abtid");o||(o=Z("eabPreviewTestId"));let n=e.get("eab_tests")||"",{assignments:u,views:s}=kn(n);return e.has("eabUserPreview")&&M("eabUserPreview","true"),e.has("abtid")&&o&&ae("eabPreviewTestId",o),{isPreview:r,previewTestId:o,forcedAssignments:u,previewedViews:s}}function _r(e,t){if(!t)return!1;if(e===t)return!0;let r=e.slice(-5);return!!(r===t||t.endsWith(r)||e.endsWith(t))}function at(e,t){if(!t.isPreview)return null;if(t.forcedAssignments[e])return t.forcedAssignments[e];let r=e.slice(-5);return t.forcedAssignments[r]?t.forcedAssignments[r]:null}function Ut(e,t){return Object.entries(e).map(([r,o])=>{let n=r.slice(-5),u=t[r]?"1":"0";return`${n}_${o}_${u}`}).join("~")}function kr(e,t,r){if(typeof window>"u")return;let o=new URL(window.location.href),n=Ut(e,t);n&&o.searchParams.set("eab_tests",n),r&&o.searchParams.set("eabUserId",r),window.history.replaceState({},"",o.toString())}function xr(){if(!(typeof document>"u")&&(document.cookie="eabUserPreview=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",typeof sessionStorage<"u"&&sessionStorage.removeItem("eabPreviewTestId"),typeof window<"u")){let e=new URL(window.location.href);e.searchParams.delete("eabUserPreview"),e.searchParams.delete("abtid"),e.searchParams.delete("eab_tests"),window.history.replaceState({},"",e.toString())}}function Tr(){return le().isPreview}var Fe=Se(()=>{"use strict";J()});function ce(){return N("ABTL")||{}}function Rt(e){M("ABTL",JSON.stringify(e))}function ee(e){return ce()[e]||null}function Cr(e,t){if(e[t]?.isControl)return-1;let o=0;for(let n=0;n<t;n++)e[n]?.isControl||o++;return o}function xn(e,t){let r=e.every(i=>typeof i.weight=="number"),o=[],n=0;if(r)for(let i of e)n+=i.weight,o.push(n);else{let i=100/e.length;for(let d=0;d<e.length;d++)n+=i,o.push(n)}let s=nt(t)%1e4/100,p=0;for(let i=0;i<o.length;i++)if(s<o[i]){p=i;break}let l=e[p]||e[0],g=Cr(e,p);return{...l,isA:g===0,isB:g===1,isC:g===2,isD:g===3}}function Pr(e,t){let r=t.findIndex(n=>n.id===e.id),o=Cr(t,r);return{...e,isA:o===0,isB:o===1,isC:o===2,isD:o===3}}function Ot(e,t,r,o){if(o?.isPreview){let g=at(e,o);if(g){let i=t.variations.find(d=>d.id===g);if(i)return Pr(i,t.variations)}}let n=ee(e);if(n){let g=t.variations.find(i=>i.id===n);if(g)return Pr(g,t.variations)}let u=t.variations.filter(g=>!g.isDone);if(u.length===0)return null;let s=t.isPersonalization,p;s?p=u.find(i=>!i.isControl)||u[0]:p=xn(u,r);let l=ce();return l[e]=p.id,Rt(l),p}function st(e){return typeof e.testTrafficPercentage=="number"}function Vt(e,t){try{let r=ce(),o=Object.keys(r);if(r[e]||o.length===0)return!0;if(o.some(s=>{let p=t.find(l=>l.testId===s);return p&&st(p)}))return!1;let u=t.find(s=>s.testId===e);return u?!st(u):!0}catch(r){return console.error("[ElevateAB] Error in canAssignToTest:",r),!0}}function Er(e,t){let r=e.testTrafficPercentage;return typeof r!="number"||ee(e.testId)?!0:t&&!Vt(e.testId,t)?!1:Math.random()*100<r}function ct(e,t){let r=se(),o=e.tests,n=ce();for(let u of o){if(!u.enabled||n[u.testId]||!Tn(u.testId,o,n))continue;let s=u.testTrafficPercentage;!t?.isPreview&&typeof s=="number"&&Math.random()*100>=s||(Ot(u.testId,u,r,t??void 0),n=ce())}}function Tn(e,t,r){let o=Object.keys(r);if(o.length===0)return!0;if(o.some(s=>{let p=t.find(l=>l.testId===s);return p&&st(p)}))return!1;let u=t.find(s=>s.testId===e);return u?!st(u):!0}var Te=Se(()=>{"use strict";J();ot();Fe()});var Hr=vn(($e,lt)=>{"use strict";(function(e,t){"use strict";var r="1.0.41",o="",n="?",u="function",s="undefined",p="object",l="string",g="major",i="model",d="name",a="type",c="vendor",f="version",_="architecture",T="console",w="mobile",b="tablet",x="smarttv",L="wearable",j="embedded",Y=500,re="Amazon",Q="Apple",$="ASUS",m="BlackBerry",h="Browser",S="Chrome",R="Edge",O="Firefox",z="Google",W="Honor",I="Huawei",B="Lenovo",G="LG",_e="Microsoft",ne="Motorola",oe="Nvidia",ue="OnePlus",ke="Opera",Tt="OPPO",De="Samsung",cr="Sharp",Ne="Sony",Pt="Xiaomi",Ct="Zebra",ur="Facebook",dr="Chromium OS",lr="Mac OS",fr=" Browser",fn=function(P,E){var k={};for(var U in P)E[U]&&E[U].length%2===0?k[U]=E[U].concat(P[U]):k[U]=P[U];return k},Ze=function(P){for(var E={},k=0;k<P.length;k++)E[P[k].toUpperCase()]=P[k];return E},pr=function(P,E){return typeof P===l?Me(E).indexOf(Me(P))!==-1:!1},Me=function(P){return P.toLowerCase()},pn=function(P){return typeof P===l?P.replace(/[^\d\.]/g,o).split(".")[0]:t},Et=function(P,E){if(typeof P===l)return P=P.replace(/^\s\s*/,o),typeof E===s?P:P.substring(0,Y)},He=function(P,E){for(var k=0,U,ie,X,A,y,K;k<E.length&&!y;){var At=E[k],wr=E[k+1];for(U=ie=0;U<At.length&&!y&&At[U];)if(y=At[U++].exec(P),y)for(X=0;X<wr.length;X++)K=y[++ie],A=wr[X],typeof A===p&&A.length>0?A.length===2?typeof A[1]==u?this[A[0]]=A[1].call(this,K):this[A[0]]=A[1]:A.length===3?typeof A[1]===u&&!(A[1].exec&&A[1].test)?this[A[0]]=K?A[1].call(this,K,A[2]):t:this[A[0]]=K?K.replace(A[1],A[2]):t:A.length===4&&(this[A[0]]=K?A[3].call(this,K.replace(A[1],A[2])):t):this[A]=K||t;k+=2}},ze=function(P,E){for(var k in E)if(typeof E[k]===p&&E[k].length>0){for(var U=0;U<E[k].length;U++)if(pr(E[k][U],P))return k===n?t:k}else if(pr(E[k],P))return k===n?t:k;return E.hasOwnProperty("*")?E["*"]:P},mn={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},mr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},gr={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,f],[/opios[\/ ]+([\w\.]+)/i],[f,[d,ke+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[d,ke+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[d,ke]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[d,"UC"+h]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[d,"Smart Lenovo "+h]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+h],f],[/\bfocus\/([\w\.]+)/i],[f,[d,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[d,ke+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[d,ke+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[d,"MIUI"+fr]],[/fxios\/([\w\.-]+)/i],[f,[d,O]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+fr],f],[/samsungbrowser\/([\w\.]+)/i],[f,[d,De+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,ur],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[d,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,S+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[d,"Android "+h]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[f,ze,mn]],[/(webkit|khtml)\/([\w\.]+)/i],[d,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[d,O+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[d,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[f,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[_,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[_,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[_,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[_,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[_,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[_,/ower/,o,Me]],[/ sun4\w[;\)]/i],[[_,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[_,Me]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[i,[c,De],[a,b]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[i,[c,De],[a,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[i,[c,Q],[a,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[i,[c,Q],[a,b]],[/(macintosh);/i],[i,[c,Q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[i,[c,cr],[a,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[i,[c,W],[a,b]],[/honor([-\w ]+)[;\)]/i],[i,[c,W],[a,w]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[i,[c,I],[a,b]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[i,[c,I],[a,w]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[i,/_/g," "],[c,Pt],[a,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[i,/_/g," "],[c,Pt],[a,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[i,[c,Tt],[a,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[i,[c,ze,{OnePlus:["304","403","203"],"*":Tt}],[a,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[i,[c,"Vivo"],[a,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[i,[c,"Realme"],[a,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[i,[c,ne],[a,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[i,[c,ne],[a,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[i,[c,G],[a,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[i,[c,G],[a,w]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[i,[c,B],[a,b]],[/(nokia) (t[12][01])/i],[c,i,[a,b]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[i,/_/g," "],[a,w],[c,"Nokia"]],[/(pixel (c|tablet))\b/i],[i,[c,z],[a,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[i,[c,z],[a,w]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[i,[c,Ne],[a,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[i,"Xperia Tablet"],[c,Ne],[a,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[i,[c,ue],[a,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[i,[c,re],[a,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[i,/(.+)/g,"Fire Phone $1"],[c,re],[a,w]],[/(playbook);[-\w\),; ]+(rim)/i],[i,c,[a,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[i,[c,m],[a,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[i,[c,$],[a,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[i,[c,$],[a,w]],[/(nexus 9)/i],[i,[c,"HTC"],[a,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[c,[i,/_/g," "],[a,w]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[i,[c,"TCL"],[a,b]],[/(itel) ((\w+))/i],[[c,Me],i,[a,ze,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[i,[c,"Acer"],[a,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[i,[c,"Meizu"],[a,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[i,[c,"Ulefone"],[a,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[i,[c,"Energizer"],[a,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[i,[c,"Cat"],[a,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[i,[c,"Smartfren"],[a,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[i,[c,"Nothing"],[a,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[i,[c,"Archos"],[a,b]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[i,[c,"Archos"],[a,w]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[c,i,[a,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[c,i,[a,w]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[c,i,[a,b]],[/(surface duo)/i],[i,[c,_e],[a,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[i,[c,"Fairphone"],[a,w]],[/(u304aa)/i],[i,[c,"AT&T"],[a,w]],[/\bsie-(\w*)/i],[i,[c,"Siemens"],[a,w]],[/\b(rct\w+) b/i],[i,[c,"RCA"],[a,b]],[/\b(venue[\d ]{2,7}) b/i],[i,[c,"Dell"],[a,b]],[/\b(q(?:mv|ta)\w+) b/i],[i,[c,"Verizon"],[a,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[i,[c,"Barnes & Noble"],[a,b]],[/\b(tm\d{3}\w+) b/i],[i,[c,"NuVision"],[a,b]],[/\b(k88) b/i],[i,[c,"ZTE"],[a,b]],[/\b(nx\d{3}j) b/i],[i,[c,"ZTE"],[a,w]],[/\b(gen\d{3}) b.+49h/i],[i,[c,"Swiss"],[a,w]],[/\b(zur\d{3}) b/i],[i,[c,"Swiss"],[a,b]],[/\b((zeki)?tb.*\b) b/i],[i,[c,"Zeki"],[a,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],i,[a,b]],[/\b(ns-?\w{0,9}) b/i],[i,[c,"Insignia"],[a,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[i,[c,"NextBook"],[a,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],i,[a,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],i,[a,w]],[/\b(ph-1) /i],[i,[c,"Essential"],[a,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[i,[c,"Envizen"],[a,b]],[/\b(trio[-\w\. ]+) b/i],[i,[c,"MachSpeed"],[a,b]],[/\btu_(1491) b/i],[i,[c,"Rotor"],[a,b]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[i,[c,oe],[a,b]],[/(sprint) (\w+)/i],[c,i,[a,w]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[c,_e],[a,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[i,[c,Ct],[a,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[i,[c,Ct],[a,w]],[/smart-tv.+(samsung)/i],[c,[a,x]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[c,De],[a,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,G],[a,x]],[/(apple) ?tv/i],[c,[i,Q+" TV"],[a,x]],[/crkey/i],[[i,S+"cast"],[c,z],[a,x]],[/droid.+aft(\w+)( bui|\))/i],[i,[c,re],[a,x]],[/(shield \w+ tv)/i],[i,[c,oe],[a,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[i,[c,cr],[a,x]],[/(bravia[\w ]+)( bui|\))/i],[i,[c,Ne],[a,x]],[/(mi(tv|box)-?\w+) bui/i],[i,[c,Pt],[a,x]],[/Hbbtv.*(technisat) (.*);/i],[c,i,[a,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[c,Et],[i,Et],[a,x]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[i,[a,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[a,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,i,[a,T]],[/droid.+; (shield)( bui|\))/i],[i,[c,oe],[a,T]],[/(playstation \w+)/i],[i,[c,Ne],[a,T]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[i,[c,_e],[a,T]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[i,[c,De],[a,L]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[c,i,[a,L]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[i,[c,Tt],[a,L]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[i,[c,Q],[a,L]],[/(opwwe\d{3})/i],[i,[c,ue],[a,L]],[/(moto 360)/i],[i,[c,ne],[a,L]],[/(smartwatch 3)/i],[i,[c,Ne],[a,L]],[/(g watch r)/i],[i,[c,G],[a,L]],[/droid.+; (wt63?0{2,3})\)/i],[i,[c,Ct],[a,L]],[/droid.+; (glass) \d/i],[i,[c,z],[a,L]],[/(pico) (4|neo3(?: link|pro)?)/i],[c,i,[a,L]],[/; (quest( \d| pro)?)/i],[i,[c,ur],[a,L]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[a,j]],[/(aeobc)\b/i],[i,[c,re],[a,j]],[/(homepod).+mac os/i],[i,[c,Q],[a,j]],[/windows iot/i],[[a,j]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[i,[a,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[i,[a,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[a,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[a,w]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[i,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[d,R+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[d,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,f],[/ladybird\//i],[[d,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,f],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[d,[f,ze,mr]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,ze,mr],[d,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,lr],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,d],[/(ubuntu) ([\w\.]+) like android/i],[[d,/(.+)/,"$1 Touch"],f],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[d,f],[/\(bb(10);/i],[f,[d,m]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[f,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[d,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[d,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,dr],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,f],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,f]]},F=function(P,E){if(typeof P===p&&(E=P,P=t),!(this instanceof F))return new F(P,E).getResult();var k=typeof e!==s&&e.navigator?e.navigator:t,U=P||(k&&k.userAgent?k.userAgent:o),ie=k&&k.userAgentData?k.userAgentData:t,X=E?fn(gr,E):gr,A=k&&k.userAgent==U;return this.getBrowser=function(){var y={};return y[d]=t,y[f]=t,He.call(y,U,X.browser),y[g]=pn(y[f]),A&&k&&k.brave&&typeof k.brave.isBrave==u&&(y[d]="Brave"),y},this.getCPU=function(){var y={};return y[_]=t,He.call(y,U,X.cpu),y},this.getDevice=function(){var y={};return y[c]=t,y[i]=t,y[a]=t,He.call(y,U,X.device),A&&!y[a]&&ie&&ie.mobile&&(y[a]=w),A&&y[i]=="Macintosh"&&k&&typeof k.standalone!==s&&k.maxTouchPoints&&k.maxTouchPoints>2&&(y[i]="iPad",y[a]=b),y},this.getEngine=function(){var y={};return y[d]=t,y[f]=t,He.call(y,U,X.engine),y},this.getOS=function(){var y={};return y[d]=t,y[f]=t,He.call(y,U,X.os),A&&!y[d]&&ie&&ie.platform&&ie.platform!="Unknown"&&(y[d]=ie.platform.replace(/chrome os/i,dr).replace(/macos/i,lr)),y},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return U},this.setUA=function(y){return U=typeof y===l&&y.length>Y?Et(y,Y):y,this},this.setUA(U),this};F.VERSION=r,F.BROWSER=Ze([d,f,g]),F.CPU=Ze([_]),F.DEVICE=Ze([i,c,a,T,w,x,b,L,j]),F.ENGINE=F.OS=Ze([d,f]),typeof $e!==s?(typeof lt!==s&&lt.exports&&($e=lt.exports=F),$e.UAParser=F):typeof define===u&&define.amd?define(function(){return F}):typeof e!==s&&(e.UAParser=F);var Ae=typeof e!==s&&(e.jQuery||e.Zepto);if(Ae&&!Ae.ua){var et=new F;Ae.ua=et.getResult(),Ae.ua.get=function(){return et.getUA()},Ae.ua.set=function(P){et.setUA(P);var E=et.getResult();for(var k in E)Ae.ua[k]=E[k]}}})(typeof window=="object"?window:$e)});var Je,tr=Se(()=>{"use strict";Je=`#graphql
2
2
  mutation cartAttributesUpdate($cartId: ID!, $attributes: [AttributeInput!]!) {
3
3
  cartAttributesUpdate(cartId: $cartId, attributes: $attributes) {
4
4
  cart {
@@ -14,28 +14,33 @@
14
14
  }
15
15
  }
16
16
  }
17
- `});var Pr={};Wt(Pr,{cleanupCartAttributes:()=>Ot,getCartAttributesPayload:()=>st,updateCartAttributes:()=>qe});function st(){let e=ke(),t=F("ABAU")||{},r=O("eabUserId"),s=O("eabUserPreview")==="true",i=O("abtid"),p={};for(let m in e)t[m]&&(p[m]=e[m]);let d=[{key:"_eabTestsList",value:JSON.stringify(p)},{key:"_eabUserId",value:r||""},{key:"_eabList",value:JSON.stringify(e)}];return s&&i&&d.push({key:"_eabPreviewTest",value:i}),d}async function qe(e,t={}){if(typeof window>"u")return{success:!1,error:"Not in browser environment"};if(!t.storefrontAccessToken&&!t.storefrontApiUrl)return console.warn("[ElevateAB] Missing storefrontAccessToken. For Next.js/non-Hydrogen stores, you must provide a Storefront Access Token. This token is SAFE to use client-side - it's a public token with limited permissions. Get it from: Shopify Admin \u2192 Settings \u2192 Apps \u2192 Develop apps"),{success:!1,error:"Missing storefrontAccessToken. Required for direct Storefront API calls."};try{let r=st(),s=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,i=t.storefrontApiUrl||`https://${xr()}/api/2025-01/graphql.json`,p=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:ze,variables:{cartId:s,attributes:r}})});if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);let d=await p.json();if(d.errors||d.data?.cartAttributesUpdate?.userErrors?.length>0){let m=d.errors?.[0]?.message||d.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes update failed:",m),{success:!1,error:m}}return{success:!0}}catch(r){return console.error("[ElevateAB] Error updating cart attributes:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}async function Ot(e,t={}){if(typeof window>"u")return{success:!1,error:"Not in browser environment"};if(!t.storefrontAccessToken&&!t.storefrontApiUrl)return{success:!1,error:"Missing storefrontAccessToken. Required for direct Storefront API calls."};try{let r=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,s=[{key:"_eabTestsList",value:""},{key:"_eabUserId",value:""},{key:"_eabList",value:""},{key:"_eabPreviewTest",value:""}],i=t.storefrontApiUrl||`https://${xr()}/api/2025-01/graphql.json`,p=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:ze,variables:{cartId:r,attributes:s}})});if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);let d=await p.json();if(d.errors||d.data?.cartAttributesUpdate?.userErrors?.length>0){let m=d.errors?.[0]?.message||d.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes cleanup failed:",m),{success:!1,error:m}}return{success:!0}}catch(r){return console.error("[ElevateAB] Error cleaning up cart attributes:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}function xr(){return typeof window>"u"?"":window.location.hostname}var ct=Ve(()=>{"use strict";tt();W();Lt()});var wo={};Wt(wo,{AntiFlickerScript:()=>Br,CART_ATTRIBUTES_UPDATE_MUTATION:()=>ze,COUNTRIES:()=>pr,DEFAULT_CONFIG:()=>bo,ElevateAnalytics:()=>Dr,ElevateProvider:()=>Or,REGIONS:()=>fr,VERSION:()=>go,assignAndPersistVariant:()=>Ze,assignVariant:()=>Jt,buildEabTestsParam:()=>At,calculateRevenueLift:()=>Kt,checkFacebookBrowser:()=>kt,checkFacebookInstagramBrowser:()=>hr,checkInstagramBrowser:()=>xt,checkPinterestBrowser:()=>Tt,checkTikTokBrowser:()=>Pt,checkVisitorIdParams:()=>yr,cleanCartToken:()=>Te,cleanupCartAttributes:()=>Ot,cleanupFlickerPrevention:()=>mr,clearPreviewMode:()=>sr,deleteCookie:()=>Xt,detectShopifyCurrency:()=>kr,extractCartToken:()=>Pe,extractProductId:()=>K,extractProductVariantId:()=>ue,extractShopifyId:()=>z,extractShopifyType:()=>vr,generateExperimentId:()=>Qt,getAssignedVariant:()=>Xe,getCartAttributesPayload:()=>st,getCookie:()=>O,getCountryCode:()=>ce,getDeviceType:()=>rr,getFlickerPreventionScript:()=>xe,getGeoLocation:()=>ur,getJsonCookie:()=>F,getJsonSessionItem:()=>Ne,getPageTypeFromPathname:()=>Ce,getPreviewState:()=>Fe,getPreviewVariation:()=>ir,getReferrerData:()=>_e,getSessionId:()=>be,getSessionItem:()=>Y,getTestList:()=>ke,getTrafficSource:()=>or,getUserAgentNoBrowser:()=>Ee,getVisitorId:()=>oe,hasSessionView:()=>er,hasUniqueView:()=>tr,hashString:()=>De,hideForFlicker:()=>Ut,initAnalytics:()=>je,initializeSessionId:()=>ht,initializeVisitorId:()=>wt,injectFlickerStyles:()=>It,isCountryExcluded:()=>St,isCountryIncluded:()=>Et,isFlickerPreventionActive:()=>gr,isInPreviewMode:()=>cr,isPreviewTest:()=>nr,isShopifyGid:()=>_r,matchesGeoTargeting:()=>lr,parseAddViewData:()=>Ae,revealAfterFlicker:()=>nt,roundToTwo:()=>v,sanitizeString:()=>T,saveTestList:()=>yt,setCookie:()=>j,setCountryCode:()=>Ct,setGeoLocation:()=>dr,setReferrerData:()=>Ke,setSessionItem:()=>re,setupFlickerPrevention:()=>it,shouldShowTest:()=>et,trackAddToCart:()=>Ar,trackCartView:()=>Er,trackCheckoutCompleted:()=>Ur,trackCheckoutStarted:()=>Ir,trackPageView:()=>Bt,trackProductView:()=>Tr,trackRemoveFromCart:()=>Cr,trackSearchSubmitted:()=>Sr,trackSessionView:()=>_t,trackUniqueView:()=>vt,trackViews:()=>rt,updateCartAttributes:()=>qe,updateUrlWithTestParams:()=>ar,useElevateConfig:()=>ut,useExperiment:()=>Lr,usePageViewTracking:()=>Rr,uuidv4:()=>ae,validateConfig:()=>Yt});module.exports=Hr(wo);Qe();W();tt();W();function vt(e){let t=F("ABAU")||{};t[e]||(t[e]=!0,j("ABAU",JSON.stringify(t)))}function _t(e){let t=Ne("ABAV")||{};t[e]||(t[e]=!0,re("ABAV",t))}function rt(e){vt(e),_t(e)}function er(e){return!!(Ne("ABAV")||{})[e]}function tr(e){return!!(F("ABAU")||{})[e]}function rr(){if(typeof navigator>"u")return"desktop";let e=navigator.userAgent||navigator.vendor||window.opera||"",t=e.toLowerCase();return/windows nt.*tablet pc|pixelbook/i.test(e)||/(?:macintosh|windows nt|win(?:95|98)|linux x86_64)/i.test(e)&&!/android|mobile|tablet|ipad|iphone|ipod/i.test(t)?"desktop":/ipad|playbook|tablet|kindle|nexus (7|10)|xoom|sm-t\d+|galaxy tab|tb-\d+|tb\d+[a-z]+|lenovo.*tb|dtab|ideatab|mediapad|matepad|honor.*pad|pad\s+\d+|mi\s+pad|redmi.*pad|xiaomi.*pad|oppo.*pad|oneplus.*pad|opd\d+|tcl.*tab|9\d{3}[a-z]|kobo|archos.*5(?!\d)|ereader|droipad/i.test(e)||/android(?!.*mobile)/i.test(t)&&!/dalvik.*miui|pocophone|mi\s+mix|edge\s+\d+|sm-g9\d+|pixel\s+\d|pixel\s+fold|advan\s+\d{4}/i.test(e)?"tablet":/android.+mobile|iphone|ipod|windows phone|blackberry|mobile|phone|kaios/i.test(t)||/^mobile;/i.test(e)||/dalvik.*miui|pocophone|mi\s+mix|pixel\s+\d|pixel\s+fold/i.test(e)?"mobile":"desktop"}function kt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function xt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function Pt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/musical_ly/i.test(e)}function Tt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(pinterest)[\/ ]([-\w\.]+)/i.test(e)}function or(){if(typeof window>"u")return"direct";let e=(document.referrer||"").toLowerCase(),t=e?new URL(e).hostname.replace("www.",""):"",r=window.location.hostname,s=kt(),i=xt(),p=Pt(),d=Tt();return s||["facebook.com","fb.com","fb.me","m.facebook.com","l.facebook.com","lm.facebook.com"].includes(t)?"facebook":i||t.includes("instagram")?"instagram":p||["tiktok.com","pangleglobal.com","ads.tiktok.com"].includes(t)?"tiktok":d||t.includes("pinterest")||t==="pin.it"?"pinterest":t.includes("google")?"google":!e||r===t?"direct":"other"}W();function Yr(e){let t={},r={};if(!e)return{assignments:t,views:r};let s=e.split("~");for(let i of s){let p=i.split("_");if(p.length>=2){let d=p[0],m=p[1],l=p[2]==="1";t[d]=m,r[d]=l}}return{assignments:t,views:r}}function Fe(){if(typeof window>"u")return{isPreview:!1,previewTestId:null,forcedAssignments:{},previewedViews:{}};let e=new URLSearchParams(window.location.search),r=(e.get("eabUserPreview")||O("eabUserPreview"))==="true",s=e.get("abtid");s||(s=Y("eabPreviewTestId"));let i=e.get("eab_tests")||"",{assignments:p,views:d}=Yr(i);return e.has("eabUserPreview")&&j("eabUserPreview","true"),e.has("abtid")&&s&&re("eabPreviewTestId",s),{isPreview:r,previewTestId:s,forcedAssignments:p,previewedViews:d}}function nr(e,t){if(!t)return!1;if(e===t)return!0;let r=e.slice(-5);return!!(r===t||t.endsWith(r)||e.endsWith(t))}function ir(e,t){if(!t.isPreview)return null;if(t.forcedAssignments[e])return t.forcedAssignments[e];let r=e.slice(-5);return t.forcedAssignments[r]?t.forcedAssignments[r]:null}function At(e,t){return Object.entries(e).map(([r,s])=>{let i=r.slice(-5),p=t[r]?"1":"0";return`${i}_${s}_${p}`}).join("~")}function ar(e,t,r){if(typeof window>"u")return;let s=new URL(window.location.href),i=At(e,t);i&&s.searchParams.set("eab_tests",i),r&&s.searchParams.set("eabUserId",r),window.history.replaceState({},"",s.toString())}function sr(){if(!(typeof document>"u")&&(document.cookie="eabUserPreview=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",typeof sessionStorage<"u"&&sessionStorage.removeItem("eabPreviewTestId"),typeof window<"u")){let e=new URL(window.location.href);e.searchParams.delete("eabUserPreview"),e.searchParams.delete("abtid"),e.searchParams.delete("eab_tests"),window.history.replaceState({},"",e.toString())}}function cr(){return Fe().isPreview}W();var se={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function ce(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return j(se.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let r=O(se.SHOPIFY_LOCALIZATION);if(r)return r.toUpperCase();let s=O(se.EAB_COUNTRY);if(s)return s.toUpperCase();if(typeof localStorage<"u"){let i=localStorage.getItem(se.EAB_COUNTRY);if(i)return i.toUpperCase()}return null}function ur(){let e=ce(),t=O(se.EAB_GEO);if(t)try{let r=JSON.parse(t);return{country:r.country||e,region:r.region,city:r.city}}catch{}return{country:e}}function Ct(e){let t=e.toUpperCase();j(se.EAB_COUNTRY,t),typeof localStorage<"u"&&localStorage.setItem(se.EAB_COUNTRY,t)}function dr(e){e.country&&Ct(e.country),j(se.EAB_GEO,JSON.stringify(e))}function Et(e,t){let r=t??ce();return r?e.map(i=>i.toUpperCase()).includes(r.toUpperCase()):!1}function St(e,t){let r=t??ce();return r?e.map(i=>i.toUpperCase()).includes(r.toUpperCase()):!1}function lr(e){let t=ce();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&St(e.excludeCountries,t)?!1:e.includeCountries?.length?Et(e.includeCountries,t):!0}var pr={US:"US",CA:"CA",GB:"GB",AU:"AU",DE:"DE",FR:"FR",JP:"JP",MX:"MX",BR:"BR",IN:"IN"},fr={NORTH_AMERICA:["US","CA","MX"],EUROPE:["GB","DE","FR","IT","ES","NL","BE","AT","CH","PL","SE","NO","DK","FI","IE","PT"],APAC:["AU","NZ","JP","KR","SG","HK","TW","TH","MY","PH","ID","VN","IN"],LATAM:["MX","BR","AR","CL","CO","PE"]};var Q="eab-prevent-flicker",ot="eab-flicker-styles";function It(e=3e3){if(typeof document>"u"||document.getElementById(ot))return;let t=document.createElement("style");t.id=ot,t.textContent=`
18
- /* Elevate AB - Flicker Prevention */
19
- .${Q} {
20
- opacity: 0 !important;
21
- pointer-events: none !important;
22
- }
23
-
24
- /* Failsafe: ensure content shows after timeout via animation */
25
- @keyframes eab-reveal {
26
- to { opacity: 1; pointer-events: auto; }
27
- }
28
-
29
- .${Q} {
30
- animation: eab-reveal 0s ${e}ms forwards;
31
- }
32
- `;let r=document.head||document.getElementsByTagName("head")[0];r.insertBefore(t,r.firstChild)}function Ut(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.add(Q)}function nt(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.remove(Q)}function it(e="body",t=3e3){if(typeof document>"u")return()=>{};It(t),Ut(e);let r=!1,s=setTimeout(()=>{r||(console.warn(`[ElevateAB] Flicker prevention timeout (${t}ms) reached. Revealing content. Check if test assignment is completing.`),nt(e),r=!0)},t);return()=>{r||(clearTimeout(s),nt(e),r=!0)}}function mr(){if(typeof document>"u")return;let e=document.getElementById(ot);e&&e.remove(),document.querySelectorAll(`.${Q}`).forEach(r=>r.classList.remove(Q))}function gr(){return typeof document>"u"?!1:document.querySelector(`.${Q}`)!==null}function xe(e=3e3){return`
33
- (function() {
34
- var style = document.createElement('style');
35
- style.id = '${ot}';
36
- style.textContent = '.${Q}{opacity:0!important;pointer-events:none!important}@keyframes eab-reveal{to{opacity:1;pointer-events:auto}}.${Q}{animation:eab-reveal 0s ${e}ms forwards}';
37
- document.head.insertBefore(style, document.head.firstChild);
38
- document.body && document.body.classList.add('${Q}');
39
- })();
40
- `.trim()}var Rt=Ye(br(),1),wr={"facebook.com":"Facebook","fb.me":"Facebook","m.facebook.com":"Facebook","l.facebook.com":"Facebook","lm.facebook.com":"Facebook","instagram.com":"Instagram","l.instagram.com":"Instagram","youtube.com":"Youtube","youtu.be":"Youtube","m.youtube.com":"Youtube","bing.com":"Bing","www.bing.com":"Bing","msnbc.msn.com":"Bing","dizionario.it.msn.com":"Bing","cc.bingj.com":"Bing","m.bing.com":"Bing","twitter.com":"Twitter","t.co":"Twitter"};function T(e){return typeof e!="string"?String(e):e.replace(/[\\"'`\x00-\x1F\x7F]/g,"")}function v(e){if(e==null)return null;let t=typeof e=="string"?parseFloat(e):Number(e);return isNaN(t)?null:+(Math.round(+(t+"e2"))+"e-2")}function K(e){if(!e)return null;let t=/gid:\/\/shopify\/Product\/(\d+)/,r=e.match(t);return r?r[1]:null}function ue(e){if(!e)return null;let t=/gid:\/\/shopify\/ProductVariant\/(\d+)/,r=e.match(t);return r?r[1]:null}function Pe(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,r=e.match(t);return r?r[1]:null}function Te(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function Qr(e){return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function Kr(e){return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function hr(e){return Qr(e)||Kr(e)}function Xr(e){if(!e)return"";switch(e){case"Mobile Safari":return"Safari";case"Chrome Mobile":case"Chrome Mobile iOS":return"Chrome";case"Firefox Mobile":case"Firefox Mobile iOS":return"Firefox";case"Opera Mobile":case"Opera Mini":case"Opera Mini iOS":return"Opera";case"Yandex Browser Lite":return"Yandex Browser";case"Chrome Webview":case"Mobile App":return"Mobile App";default:return e}}function Zr(e){let t={};return e.searchParams.forEach((r,s)=>{t[s]||(t[s]=r)}),t}function eo(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function to(e){return e.replace(/^www\./,"")}function ro(e,t,r){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let i,p;try{if(e&&e.trim()!=="")i=new URL(e);else return"Direct";if(i?.hostname&&eo(i)){if(p=i.hostname,r&&r===p)return"Direct"}else return""}catch{}if(!p)return"";let d=to(p);return d?wr[d]?wr[d]:d?.includes("google")?"Google":d:""}function Ae(e){let{referrer:t,entryPage:r,userAgent:s}=e,i={referrer_source:"",browser_info:"",os_info:"",device_type:"",page_entry_path:"",utm_medium:"",utm_source:"",utm_campaign:"",utm_content:"",utm_term:"",referrer_url:t||"",gclid:"",fbclid:"",pins_campaign_id:"",epik:""};try{let p;if(r&&r.trim()!==""&&r.startsWith("http"))try{let d=new URL(r),m=d?.pathname;p=d?.hostname,m&&(i.page_entry_path=m??"");let l=Zr(d);i.utm_medium=l.utm_medium??"",i.utm_source=l.utm_source??"",i.utm_campaign=l.utm_campaign??"",i.utm_content=l.utm_content??"",i.utm_term=l.utm_term??"",i.gclid=l.gclid??"",i.fbclid=l.fbclid??"",i.pins_campaign_id=l.pins_campaign_id??"",i.epik=l.epik??""}catch{}if(s){let d=(0,Rt.UAParser)(s),m=d?.browser?.name,l=Xr(m);i.browser_info=l??"",i.os_info=d?.os?.name??"",s&&(i.device_type=(d?.device?.type||"desktop")?.toUpperCase()??"")}return i.referrer_source=ro(t,i?.browser_info,p)??"",i}catch{return i}}function Ce(e,t){let r=e==="/"||e==="",i=t&&/^\/[a-z]{2}(-[a-z]{2})?\/?$/i.test(e);return r||i?"index":/\/products\//.test(e)?"product":/\/collections\//.test(e)?"collection":/\/pages\//.test(e)?"page":/\/search/.test(e)?"search":/\/cart/.test(e)?"cart":/\/checkouts\//.test(e)?"checkout":"unknown"}function yr(e){try{return e&&new URLSearchParams(e).get("eabUserId")||!1}catch{return!1}}function Ee(e){if(!e)return"";try{let t=(0,Rt.UAParser)(e),r=t?.os,s=t?.device,i="";return r?.name&&(i+=r.name,r.version&&(i+=` ${r.version}`)),s?.type&&(i+=i?` (${s.type})`:s.type),s?.vendor&&(i+=i?` ${s.vendor}`:s.vendor),s?.model&&(i+=i?` ${s.model}`:s.model),i||e}catch{return e}}function z(e){return e?e.includes("gid://")&&e.split("/").pop()||e:""}function vr(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function _r(e){return!!e&&e.startsWith("gid://shopify/")}function kr(){if(typeof window>"u")return;let e=window.Shopify;if(e?.currency?.active)return e.currency.active}ct();Lt();W();var we=require("react"),oo="https://bitter-river-9c62.support-67d.workers.dev",no="https://d339co84ntxcme.cloudfront.net/Prod/orders",D=null;function je(e){D=e}function de(e){let t=e?.storeId||D?.storeId;return t||(console.warn("[ElevateAB] No storeId provided. Call initAnalytics() first or pass storeId to tracking function."),"")}function io(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function ao(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function so(){return typeof window>"u"?!1:O("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function le(e,t,r){if(typeof window>"u"||so())return null;let s=navigator.userAgent,i=window.location.pathname,p=Ce(i,r),{referrer:d,entryPage:m}=_e(),l=Ae({referrer:d,entryPage:m,userAgent:s}),w=F("ABTL")||{},o=F("ABAU")||{},c=io(w),n=ao(o,w),a=Pe(localStorage.getItem("shopifyCartId")),u=new Date().toISOString(),k=sessionStorage.getItem("eabIsFirstVisit")==="true",x=O("localization")||"";return{pixel_event_id:`sh-${ae()}`,shop_name:e,timestamp:u,event_type:t,client_id:O("_shopify_y")||void 0,visitor_id:oe(),session_id:be(),cart_token:Te(a||O("cart")),page_url:window.location.href,page_pathname:i,page_search:window.location.search,referrer_url:d,referrer_source:l?.referrer_source,previous_page:document.referrer,page_entry:m,page_entry_path:l?.page_entry_path,page_type:p,utm_medium:l?.utm_medium,utm_source:l?.utm_source,utm_campaign:l?.utm_campaign,utm_content:l?.utm_content,utm_term:l?.utm_term,gclid:l?.gclid,fbclid:l?.fbclid,pins_campaign_id:l?.pins_campaign_id,epik:l?.epik,browser_info:l?.browser_info,os_info:l?.os_info,device_type:l?.device_type,language:navigator.language,root_route:localStorage.getItem("eabRootRoute")||"",user_agent:s,user_agent_no_browser:Ee(s),is_first_visit:k,shopify_country:x,ab_test_assignments:c,ab_test_views:n,is_first_order:null}}async function pe(e,t=oo){try{let r=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0});if(!r.ok)throw new Error(`Worker error: ${r.status}`)}catch(r){console.error("[ElevateAB] Error sending analytics:",r)}}async function Bt(e={}){let t=de(e);if(!t)return;let r=e.hasLocalizedPaths??D?.hasLocalizedPaths,s=e.workerUrl??D?.workerUrl,i=le(t,"page_viewed",r);if(!i)return;let p={...i,cart_currency:e.currency};await pe(p,s)}async function Tr(e){let t=de(e);if(!t)return;let{productId:r,productVendor:s,productPrice:i,productSku:p,currency:d}=e,m=e.hasLocalizedPaths??D?.hasLocalizedPaths,l=e.workerUrl??D?.workerUrl,w=le(t,"product_viewed",m);if(!w)return;let o={...w,cart_currency:d,product_id:z(r),product_vendor:T(s),product_price:v(i),product_sku:T(p)};await pe(o,l)}async function Ar(e){let t=de(e);if(!t)return;let{productId:r,variantId:s,productVendor:i,productPrice:p,productQuantity:d,productSku:m,currency:l,cartId:w}=e,o=e.hasLocalizedPaths??D?.hasLocalizedPaths,c=e.workerUrl??D?.workerUrl,n=e.storefrontAccessToken??D?.storefrontAccessToken,a=le(t,"product_added_to_cart",o);if(!a)return;let u={...a,cart_currency:l,product_id:z(r),variant_id:z(s),product_vendor:T(i),product_price:v(p),product_quantity:d,product_sku:T(m)};if(await pe(u,c),w&&n)try{let{updateCartAttributes:k}=await Promise.resolve().then(()=>(ct(),Pr));await k(w,{storefrontAccessToken:n})}catch(k){console.error("[ElevateAB] Failed to update cart attributes:",k)}}async function Cr(e){let t=de(e);if(!t)return;let{productId:r,variantId:s,productVendor:i,productPrice:p,productQuantity:d,productSku:m,currency:l}=e,w=e.hasLocalizedPaths??D?.hasLocalizedPaths,o=e.workerUrl??D?.workerUrl,c=le(t,"product_removed_from_cart",w);if(!c)return;let n={...c,cart_currency:l,product_id:z(r),variant_id:z(s),product_vendor:T(i),product_price:v(p),product_quantity:d,product_sku:T(m)};await pe(n,o)}async function Er(e){let t=de(e);if(!t)return;let{cartTotalPrice:r,cartTotalQuantity:s,cartItems:i,currency:p}=e,d=e.hasLocalizedPaths??D?.hasLocalizedPaths,m=e.workerUrl??D?.workerUrl,l=le(t,"cart_viewed",d);if(!l)return;let w={...l,cart_currency:p,cart_total_price:v(r),cart_total_quantity:s,cart_items:i?.map(o=>({product_id:z(o.productId),variant_id:z(o.variantId),product_vendor:T(o.productVendor)||"",product_price:v(o.productPrice),product_quantity:o.productQuantity??null,product_sku:T(o.productSku)||""}))};await pe(w,m)}async function Sr(e){let t=de(e);if(!t)return;let{searchQuery:r,currency:s}=e,i=e.hasLocalizedPaths??D?.hasLocalizedPaths,p=e.workerUrl??D?.workerUrl,d=le(t,"search_submitted",i);if(!d)return;let m={...d,cart_currency:s,search_query:T(r)};await pe(m,p)}async function Ir(e){let t=de(e);if(!t)return;let{cartTotalPrice:r,cartSubtotalPrice:s,cartShippingPrice:i,cartTaxAmount:p,cartDiscountAmount:d,customerId:m,cartItems:l,currency:w}=e,o=e.hasLocalizedPaths??D?.hasLocalizedPaths,c=e.workerUrl??D?.workerUrl,n=le(t,"checkout_started",o);if(!n)return;let a=0,u=l?.map(x=>{let g=x.productQuantity??0;return a+=g,{product_id:z(x.productId),variant_id:z(x.variantId),product_vendor:T(x.productVendor)||"",vendor:T(x.productVendor)||"",product_price:v(x.productPrice),total_price:v(x.productPrice),product_quantity:g,quantity:g,product_sku:T(x.productSku)||"",sku:T(x.productSku)||"",total_discount:v(x.totalDiscount)}})||[],k={...n,cart_currency:w,cart_total_price:v(r),cart_subtotal_price:v(s),cart_total_quantity:a,cart_shipping_price:v(i),cart_tax_amount:v(p),cart_discount_amount:v(d),cart_items:u,customer_id:m};await pe(k,c)}async function Ur(e){let t=de(e);if(!t)return;let{orderId:r,cartTotalPrice:s,cartSubtotalPrice:i,cartShippingPrice:p,cartTaxAmount:d,cartDiscountAmount:m,customerId:l,isFirstOrder:w,noteAttributes:o,cartItems:c,currency:n}=e,a=e.hasLocalizedPaths??D?.hasLocalizedPaths,u=e.ordersWorkerUrl??D?.ordersWorkerUrl??no,k=le(t,"checkout_completed",a);if(!k)return;let x=0,g=c?.map(E=>{let B=E.productQuantity??0;return x+=B,{product_id:z(E.productId),variant_id:z(E.variantId),product_vendor:T(E.productVendor)||"",vendor:T(E.productVendor)||"",product_price:v(E.productPrice),total_price:v(E.productPrice),product_quantity:B,quantity:B,product_sku:T(E.productSku)||"",sku:T(E.productSku)||"",total_discount:v(E.totalDiscount)}})||[],h={...k,cart_currency:n,cart_total_price:v(s),cart_subtotal_price:v(i),cart_total_quantity:x,cart_shipping_price:v(p),cart_tax_amount:v(d),cart_discount_amount:v(m),cart_items:g,order_id:r,customer_id:l,is_first_order:w??null,note_attributes:o};await pe(h,u)}function Rr(e){let{storeId:t,hasLocalizedPaths:r,currency:s,workerUrl:i,enabled:p=!0,pathname:d}=e,m=(0,we.useRef)(null),[l,w]=(0,we.useState)(()=>d||(typeof window<"u"?window.location.pathname:""));(0,we.useEffect)(()=>{d&&w(d)},[d]),(0,we.useEffect)(()=>{typeof window>"u"||!p||m.current!==l&&(m.current=l,Bt({storeId:t,hasLocalizedPaths:r,currency:s,workerUrl:i}))},[l,t,r,s,i,p])}var Se=Ye(require("react"),1);var Vt=Ye(require("react"),1),$e=Vt.default.createContext(null);function ut(){let e=Vt.default.useContext($e);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}W();tt();function Lr(e){let{config:t}=ut(),[r,s]=Se.default.useState(null),[i,p]=Se.default.useState(!0),d=Se.default.useMemo(()=>t&&t.tests.find(l=>l.testId===e)||null,[t,e]),m=Se.default.useRef(null);return Se.default.useEffect(()=>{if(t===null)return;if(!d){m.current!==e&&(m.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),p(!1);return}if(!d.enabled){m.current!==`${e}-disabled`&&(m.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),p(!1);return}if(!et(d)){p(!1);return}let l=oe(),w=Ze(e,d,l);w&&(s(w),rt(e)),p(!1)},[t,d,e]),{variant:r,isLoading:i,isControl:r?.isControl??!1,isA:r?.isA??!1,isB:r?.isB??!1,isC:r?.isC??!1,isD:r?.isD??!1}}var N=Ye(require("react"),1);Qe();var dt=require("react/jsx-runtime"),co=!1,uo={allTests:{"price-test-001":{8606:{variationName:"Control",trafficPercentage:50,isDone:!1,isControl:!0},8607:{variationName:"Sale Price",trafficPercentage:50,isDone:!1,prices:{"41883969519701":{main:"USD",price:{USD:"599.95"},compare:{USD:"699.95"}}}},data:{name:"Snowboard Price Test",isLive:!0,settings:{afterDiscounts:!0},type:"PRICE_PLUS",filters:[],isPersonalization:!1,currencies:["USD"],handles:["the-complete-snowboard"],productIds:["7240161067093"]}},"content-test-001":{"ctrl-001":{variationName:"Control",trafficPercentage:34,isDone:!1,isControl:!0,content:{headline:"Welcome to our store",subheadline:"Shop the best products"}},"var-a-001":{variationName:"Urgency Copy",trafficPercentage:33,isDone:!1,content:{headline:"Limited Time Offer!",subheadline:"Don't miss out - sale ends soon"}},"var-b-001":{variationName:"Value Copy",trafficPercentage:33,isDone:!1,content:{headline:"Premium Quality, Great Value",subheadline:"Free shipping on orders over $50"}},data:{name:"Homepage Headline Test",isLive:!0,settings:{afterDiscounts:!0},type:"CONTENT",filters:[],isPersonalization:!1,pathnames:["/"]}},"custom-code-test-001":{10150:{variationName:"Control",trafficPercentage:50,isDone:!1,customCode:{id:"c11a582c-6b27-4263-941c-8ed123437c6b",js:"console.log('[Elevate] Control variant active');",css:"",pathnames:["*"],excludePathnames:[]},isControl:!0},10151:{variationName:"Enhanced UI",trafficPercentage:50,isDone:!1,customCode:{id:"df71546a-0a5f-4ad0-8d0f-a1bdeab05e84",js:"console.log('[Elevate] Enhanced UI variant'); document.body.style.borderTop = '3px solid #10b981';",css:".hero-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }",pathnames:["*"],excludePathnames:[]}},data:{name:"Custom Code Enhancement",isLive:!0,settings:{afterDiscounts:!0},type:"CUSTOM_CODE",filters:[],isPersonalization:!1,pathnames:["*"],excludePathnames:[]}},"split-url-test-001":{"split-ctrl":{variationName:"Control",trafficPercentage:50,isDone:!1,isControl:!0,splitUrlTestLinks:{default:"/collections/all"}},"split-var-a":{variationName:"New Landing Page",trafficPercentage:50,isDone:!1,splitUrlTestLinks:{default:"/collections/featured"}},data:{name:"Landing Page Split Test",isLive:!0,settings:{afterDiscounts:!0},type:"SPLIT_URL",filters:[],isPersonalization:!1,pathnames:["/promo"]}}},selectors:{selectorsV2:[]}};function Or({storeId:e,storefrontAccessToken:t,preventFlickering:r=!1,flickerTimeout:s=3e3,children:i}){let[p,d]=N.default.useState(null),[m,l]=N.default.useState(null),[w,o]=N.default.useState(null),c=(0,N.useRef)(null);N.default.useEffect(()=>(r&&typeof window<"u"&&(c.current=it("body",s)),()=>{c.current&&c.current()}),[r,s]),N.default.useEffect(()=>{typeof window>"u"||je({storeId:e,storefrontAccessToken:t})},[e,t]),N.default.useEffect(()=>{if(typeof window>"u")return;let k=Fe();l(k);let x=ce();o(x)},[]);let n=(0,N.useCallback)(()=>{c.current&&(c.current(),c.current=null)},[]);N.default.useEffect(()=>{async function k(){try{if(!co){let X=bt(uo);d(X),n();return}let x=`https://configs.elevateab.com/config/${e}.json`,g=await fetch(x);if(g.status===404){d({tests:[],selectors:void 0}),n();return}if(!g.ok)throw new Error(`Failed to fetch config: ${g.status} ${g.statusText}`);let h=await g.json();if(h.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(h.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),d({tests:[],selectors:void 0}),n();return}if(!(Object.keys(h.allTests||{}).length>0)){d({tests:[],selectors:void 0}),n();return}let B=bt(h);d(B),n()}catch(x){console.error("[ElevateAB] Failed to load config:",x),d({tests:[],selectors:void 0}),n()}}k()},[e,n]);let a=N.default.useMemo(()=>({config:p,storeId:e,storefrontAccessToken:t,isPreviewMode:m?.isPreview??!1,previewTestId:m?.previewTestId??null,countryCode:w}),[p,e,t,m,w]);N.default.useEffect(()=>{je({storeId:e,storefrontAccessToken:t})},[e,t]);let u=(0,N.useRef)(!1);return N.default.useEffect(()=>{!t&&!u.current&&(u.current=!0,console.warn("[ElevateAB] No storefrontAccessToken provided. A/B tests will work, but orders won't be attributed to test variants. Add storefrontAccessToken prop to enable order tracking."))},[t]),(0,dt.jsxs)($e.Provider,{value:a,children:[r&&(0,dt.jsx)("script",{dangerouslySetInnerHTML:{__html:xe(s)}}),i]})}var Vr=require("react/jsx-runtime");function Br({timeout:e=3e3}){return(0,Vr.jsx)("script",{dangerouslySetInnerHTML:{__html:xe(e)}})}var he=require("react");W();W();ct();var lo="https://bitter-river-9c62.support-67d.workers.dev",po="https://d339co84ntxcme.cloudfront.net/Prod/orders";function fe(){return`sh-${ae()}`}function fo(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function mo(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function Dr({storeId:e,storefrontAccessToken:t,hasLocalizedPaths:r,workerUrl:s=lo,ordersWorkerUrl:i=po,useAnalytics:p}){let d=(0,he.useContext)($e),m=e||d?.storeId||"",l=t||d?.storefrontAccessToken,w=(0,he.useRef)(!1);(0,he.useEffect)(()=>{!d&&!e&&!w.current&&(w.current=!0,console.error("[ElevateAB] ElevateAnalytics must be used inside ElevateProvider, or you must pass storeId as a prop."))},[d,e]);let{subscribe:o,register:c}=p(),{ready:n}=c("Elevate Analytics");return(0,he.useEffect)(()=>{if(typeof window>"u")return;if(oe(),be(),typeof document<"u"){let u=document.referrer||"",k=window.location.href;Ke(u,k)}(()=>{let u=f=>{let b=K(f.products?.[0]?.id);b&&typeof localStorage<"u"?localStorage.setItem("eabProductPageId",b):typeof window<"u"&&!window.location.pathname.includes("/products/")&&localStorage?.removeItem("eabProductPageId");let S=Pe(typeof localStorage<"u"?localStorage.getItem("shopifyCartId"):null),{referrer:R,entryPage:L}=_e();return{visitorId:oe(),sessionId:be(),cartToken:S||O("cart")||"",referrer:R,entryPage:L,clientId:O("_shopify_y"),rootRoute:typeof localStorage<"u"&&localStorage.getItem("eabRootRoute")||"",productPageId:typeof localStorage<"u"&&localStorage.getItem("eabProductPageId")||""}},k=(f,b,S,R)=>{let L=typeof navigator<"u"?navigator.userAgent:"",M=S?.url?new URL(S.url).pathname:typeof window<"u"?window.location.pathname:"",$=Ce(M,r),I=Ae({referrer:R.referrer,entryPage:R.entryPage,userAgent:L}),V=F("ABTL")||{},G=F("ABAU")||{},me=fo(V),Z=mo(G,V),ee=new Date().toISOString(),ie=typeof sessionStorage<"u"?sessionStorage.getItem("eabIsFirstVisit")==="true":!1,ge=O("localization")||"";return{pixel_event_id:b,shop_name:m,timestamp:ee,event_type:f,client_id:R.clientId,visitor_id:R.visitorId,session_id:R.sessionId,cart_token:Te(R.cartToken),page_url:S.context?.document?.location?.href||(typeof window<"u"?window.location.href:""),page_pathname:M,page_search:S.context?.document?.location?.search||(typeof window<"u"?window.location.search:""),referrer_url:R.referrer,referrer_source:I?.referrer_source,previous_page:typeof document<"u"?document.referrer:"",page_entry:R.entryPage,page_entry_path:I?.page_entry_path,page_type:$,utm_medium:I?.utm_medium,utm_source:I?.utm_source,utm_campaign:I?.utm_campaign,utm_content:I?.utm_content,utm_term:I?.utm_term,gclid:I?.gclid,fbclid:I?.fbclid,pins_campaign_id:I?.pins_campaign_id,epik:I?.epik,browser_info:I?.browser_info,os_info:I?.os_info,device_type:I?.device_type,language:S.context?.navigator?.language||(typeof navigator<"u"?navigator.language:""),root_route:R.rootRoute,user_agent:L,user_agent_no_browser:Ee(L),is_first_visit:ie,shopify_country:ge,cart_currency:S.shop?.currency,ab_test_assignments:me,ab_test_views:Z,is_first_order:null}},x=async f=>{if(!f.exclude)try{let b=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f),keepalive:!0});if(!b.ok)throw new Error(`Worker error: ${b.status}`);return b}catch(b){console.error("[ElevateAB] Error sending analytics:",b)}},g=async f=>{try{let b=u(f),S=fe(),R=k("page_viewed",S,f,b);await x(R)}catch(b){console.error("[ElevateAB] Error handling page_viewed:",b)}},h=async f=>{try{let b=u(f),S=fe(),L={...k("product_viewed",S,f,b),product_id:K(f?.products?.[0]?.id)||"",product_vendor:T(f?.products?.[0]?.vendor)??"",product_price:v(f?.products?.[0]?.price)??null,product_sku:T(f?.products?.[0]?.sku)??""};await x(L)}catch(b){console.error("[ElevateAB] Error handling product_viewed:",b)}},E=async f=>{try{let b=u(f),S=fe(),L={...k("product_added_to_cart",S,f,b),product_id:K(f?.currentLine?.merchandise?.product?.id)??"",variant_id:ue(f?.currentLine?.merchandise?.id)??"",product_vendor:T(f?.currentLine?.merchandise?.product?.vendor)??"",product_price:v(f?.currentLine?.cost?.totalAmount?.amount)??null,product_quantity:f?.currentLine?.quantity??null,product_sku:T(f?.currentLine?.merchandise?.sku)??""};await x(L);let M=f?.cart?.id;M&&l&&m&&qe(M,{storefrontAccessToken:l,storefrontApiUrl:`https://${m}/api/2025-01/graphql.json`}).catch($=>{console.error("[ElevateAB] Failed to update cart attributes:",$)})}catch(b){console.error("[ElevateAB] Error handling product_added_to_cart:",b)}},B=async f=>{try{let b=u(f),S=fe(),L={...k("product_removed_from_cart",S,f,b),product_id:K(f?.prevLine?.merchandise?.product?.id)??"",variant_id:ue(f?.prevLine?.merchandise?.id)??"",product_vendor:T(f?.prevLine?.merchandise?.product?.vendor)??"",product_price:v(f?.prevLine?.cost?.totalAmount?.amount)??null,product_quantity:f?.prevLine?.quantity??null,product_sku:T(f?.prevLine?.merchandise?.sku)??""};await x(L)}catch(b){console.error("[ElevateAB] Error handling product_removed_from_cart:",b)}},X=async f=>{try{let b=u(f),S=fe(),R=k("cart_viewed",S,f,b),M=(f?.data?.cart?.lines?.nodes||f?.data?.cart?.lines||[]).map(I=>({product_id:K(I?.merchandise?.product?.id)??"",variant_id:ue(I?.merchandise?.id)??"",vendor:T(I?.merchandise?.product?.vendor)??"",total_price:v(I?.cost?.totalAmount?.amount)??null,quantity:I?.quantity??null,sku:T(I?.merchandise?.sku)??""})),$={...R,cart_total_price:v(f?.cart?.cost?.totalAmount?.amount)??null,cart_total_quantity:f?.cart?.totalQuantity??null,cart_items:M};await x($)}catch(b){console.error("[ElevateAB] Error handling cart_viewed:",b)}},Ie=async f=>{try{let b=u(f),S=fe(),L={...k("search_submitted",S,f,b),search_query:T(f?.data?.searchResult?.query)??""};await x(L)}catch(b){console.error("[ElevateAB] Error handling search_submitted:",b)}},ye=async f=>{try{let b=u(f),S=fe(),R=k("checkout_started",S,f,b),L=0,$=(f?.data?.checkout?.lineItems??[]).map(V=>{let G=V?.quantity??0;L+=G;let Z=(V?.discountAllocations??[])?.reduce((ee,ie)=>ee+(ie?.amount?.amount||0),0);return{product_id:K(V?.variant?.product?.id)??"",variant_id:ue(V?.variant?.id)??"",vendor:T(V?.variant?.product?.vendor)??"",total_price:v(V?.finalLinePrice?.amount)??null,quantity:G,sku:T(V?.variant?.sku)??"",total_discount:v(Z)??null}}),I={...R,cart_total_price:v(f?.data?.checkout?.totalPrice?.amount)??null,cart_subtotal_price:v(f?.data?.checkout?.subtotalPrice?.amount)??null,cart_total_quantity:L,cart_shipping_price:v(f?.data?.checkout?.shippingLine?.price?.amount)??null,cart_tax_amount:v(f?.data?.checkout?.totalTax?.amount)??null,cart_discount_amount:v(f?.data?.checkout?.discountsAmount?.amount)??null,cart_items:$,customer_id:f?.data?.checkout?.order?.customer?.id??""};await x(I)}catch(b){console.error("[ElevateAB] Error handling checkout_started:",b)}},ne=async f=>{try{let b=u(f),S=fe(),R=k("checkout_completed",S,f,b),L=0,$=(f?.data?.checkout?.lineItems??[]).map(V=>{let G=V?.quantity??0;L+=G;let Z=(V?.discountAllocations??[])?.reduce((ee,ie)=>ee+(ie?.amount?.amount||0),0);return{product_id:K(V?.variant?.product?.id)??"",variant_id:ue(V?.variant?.id)??"",vendor:T(V?.variant?.product?.vendor)??"",total_price:v(V?.finalLinePrice?.amount)??null,quantity:G,sku:T(V?.variant?.sku)??"",total_discount:v(Z)??null}}),I={...R,cart_total_price:v(f?.data?.checkout?.totalPrice?.amount)??null,cart_subtotal_price:v(f?.data?.checkout?.subtotalPrice?.amount)??null,cart_total_quantity:L,cart_shipping_price:v(f?.data?.checkout?.shippingLine?.price?.amount)??null,cart_tax_amount:v(f?.data?.checkout?.totalTax?.amount)??null,cart_discount_amount:v(f?.data?.checkout?.discountsAmount?.amount)??null,cart_items:$,order_id:f?.data?.checkout?.order?.id??"",customer_id:f?.data?.checkout?.order?.customer?.id??"",is_first_order:f?.data?.checkout?.order?.customer?.isFirstOrder??null,note_attributes:f?.data?.checkout?.attributes??[]};await Ge(I)}catch(b){console.error("[ElevateAB] Error handling checkout_completed:",b)}},Ge=async f=>{if(!f.exclude)try{let b=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f),keepalive:!0});if(!b.ok)throw new Error(`Orders worker error: ${b.status}`);return b}catch(b){console.error("[ElevateAB] Error sending order analytics:",b)}};o("page_viewed",g),o("product_viewed",h),o("product_added_to_cart",E),o("product_removed_from_cart",B),o("cart_viewed",X),o("search_submitted",Ie),o("checkout_started",ye),o("checkout_completed",ne)})(),n()},[o,n,m,r,l,s,i]),null}var go="1.1.2",bo={enabled:!0,trackingEndpoint:"https://analytics.elevateab.com/track",cacheDuration:3600};0&&(module.exports={AntiFlickerScript,CART_ATTRIBUTES_UPDATE_MUTATION,COUNTRIES,DEFAULT_CONFIG,ElevateAnalytics,ElevateProvider,REGIONS,VERSION,assignAndPersistVariant,assignVariant,buildEabTestsParam,calculateRevenueLift,checkFacebookBrowser,checkFacebookInstagramBrowser,checkInstagramBrowser,checkPinterestBrowser,checkTikTokBrowser,checkVisitorIdParams,cleanCartToken,cleanupCartAttributes,cleanupFlickerPrevention,clearPreviewMode,deleteCookie,detectShopifyCurrency,extractCartToken,extractProductId,extractProductVariantId,extractShopifyId,extractShopifyType,generateExperimentId,getAssignedVariant,getCartAttributesPayload,getCookie,getCountryCode,getDeviceType,getFlickerPreventionScript,getGeoLocation,getJsonCookie,getJsonSessionItem,getPageTypeFromPathname,getPreviewState,getPreviewVariation,getReferrerData,getSessionId,getSessionItem,getTestList,getTrafficSource,getUserAgentNoBrowser,getVisitorId,hasSessionView,hasUniqueView,hashString,hideForFlicker,initAnalytics,initializeSessionId,initializeVisitorId,injectFlickerStyles,isCountryExcluded,isCountryIncluded,isFlickerPreventionActive,isInPreviewMode,isPreviewTest,isShopifyGid,matchesGeoTargeting,parseAddViewData,revealAfterFlicker,roundToTwo,sanitizeString,saveTestList,setCookie,setCountryCode,setGeoLocation,setReferrerData,setSessionItem,setupFlickerPrevention,shouldShowTest,trackAddToCart,trackCartView,trackCheckoutCompleted,trackCheckoutStarted,trackPageView,trackProductView,trackRemoveFromCart,trackSearchSubmitted,trackSessionView,trackUniqueView,trackViews,updateCartAttributes,updateUrlWithTestParams,useElevateConfig,useExperiment,usePageViewTracking,uuidv4,validateConfig});
17
+ `});var Kr={};br(Kr,{cleanupCartAttributes:()=>rr,getCartAttributesPayload:()=>ht,updateCartAttributes:()=>Ye});function ht(){let e=ce(),t=N("ABAU")||{},r=V("eabUserId"),o=V("eabUserPreview")==="true",n=V("abtid"),u={};for(let p in e)t[p]&&(u[p]=e[p]);let s=[{key:"_eabTestsList",value:JSON.stringify(u)},{key:"_eabUserId",value:r||""},{key:"_eabList",value:JSON.stringify(e)}];return o&&n&&s.push({key:"_eabPreviewTest",value:n}),s}async function Ye(e,t={}){if(typeof window>"u")return{success:!1,error:"Not in browser environment"};if(!t.storefrontAccessToken&&!t.storefrontApiUrl)return console.warn("[ElevateAB] Missing storefrontAccessToken. For Next.js/non-Hydrogen stores, you must provide a Storefront Access Token. This token is SAFE to use client-side - it's a public token with limited permissions. Get it from: Shopify Admin \u2192 Settings \u2192 Apps \u2192 Develop apps"),{success:!1,error:"Missing storefrontAccessToken. Required for direct Storefront API calls."};try{let r=ht(),o=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,n=t.storefrontApiUrl||`https://${Xr()}/api/2025-01/graphql.json`,u=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:Je,variables:{cartId:o,attributes:r}})});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);let s=await u.json();if(s.errors||s.data?.cartAttributesUpdate?.userErrors?.length>0){let p=s.errors?.[0]?.message||s.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes update failed:",p),{success:!1,error:p}}return{success:!0}}catch(r){return console.error("[ElevateAB] Error updating cart attributes:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}async function rr(e,t={}){if(typeof window>"u")return{success:!1,error:"Not in browser environment"};if(!t.storefrontAccessToken&&!t.storefrontApiUrl)return{success:!1,error:"Missing storefrontAccessToken. Required for direct Storefront API calls."};try{let r=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,o=[{key:"_eabTestsList",value:""},{key:"_eabUserId",value:""},{key:"_eabList",value:""},{key:"_eabPreviewTest",value:""}],n=t.storefrontApiUrl||`https://${Xr()}/api/2025-01/graphql.json`,u=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:Je,variables:{cartId:r,attributes:o}})});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);let s=await u.json();if(s.errors||s.data?.cartAttributesUpdate?.userErrors?.length>0){let p=s.errors?.[0]?.message||s.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes cleanup failed:",p),{success:!1,error:p}}return{success:!0}}catch(r){return console.error("[ElevateAB] Error cleaning up cart attributes:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}function Xr(){return typeof window>"u"?"":window.location.hostname}var yt=Se(()=>{"use strict";Te();J();tr()});var ro={};br(ro,{CART_ATTRIBUTES_UPDATE_MUTATION:()=>Je,COUNTRIES:()=>Lr,ElevateAnalytics:()=>ln,ElevateProvider:()=>dn,REGIONS:()=>Br,VERSION:()=>to,applyContentChanges:()=>Qt,applyContentElements:()=>Xt,applyCustomCode:()=>Kt,assignAllTests:()=>ct,assignAndPersistVariant:()=>Ot,buildEabTestsParam:()=>Ut,canAssignToTest:()=>Vt,checkFacebookBrowser:()=>Dt,checkFacebookInstagramBrowser:()=>qr,checkInstagramBrowser:()=>Nt,checkPinterestBrowser:()=>Ht,checkTikTokBrowser:()=>Mt,checkVisitorIdParams:()=>Fr,cleanCartToken:()=>Re,cleanupCartAttributes:()=>rr,cleanupContentTests:()=>er,clearPreviewMode:()=>xr,contentHandler:()=>Ke,deleteCookie:()=>vr,detectShopifyCurrency:()=>Wr,extractCartToken:()=>Ue,extractProductId:()=>te,extractProductVariantId:()=>me,extractShopifyId:()=>q,extractShopifyType:()=>jr,getAllHandlers:()=>ir,getAssignedVariant:()=>ee,getCartAttributesPayload:()=>ht,getCookie:()=>V,getCountryCode:()=>pe,getDeviceType:()=>Ir,getGeoLocation:()=>Rr,getHandler:()=>Xe,getJsonCookie:()=>N,getJsonSessionItem:()=>qe,getPageTypeFromPathname:()=>Ve,getPreviewState:()=>le,getPreviewVariation:()=>at,getReferrerData:()=>Ie,getSessionId:()=>xe,getSessionItem:()=>Z,getSplitUrlBlockingScript:()=>dt,getTestList:()=>ce,getTrafficSource:()=>Ur,getUserAgentNoBrowser:()=>Le,getVisitorId:()=>se,hasContentTests:()=>We,hasHandler:()=>ar,hasSessionView:()=>Ar,hasUniqueView:()=>Sr,hashString:()=>nt,initAnalytics:()=>vt,initializeSessionId:()=>It,initializeVisitorId:()=>St,isCountryExcluded:()=>Ft,isCountryIncluded:()=>qt,isInPreviewMode:()=>Tr,isPreviewTest:()=>_r,isShopifyGid:()=>$r,matchesGeoTargeting:()=>Vr,matchesWildcardPattern:()=>ge,parseAddViewData:()=>Oe,processContentTests:()=>Ge,processSplitUrlTests:()=>je,registerHandler:()=>Ce,reprocessContentTests:()=>wt,restoreOriginalElements:()=>Zt,roundToTwo:()=>v,sanitizeString:()=>C,saveTestList:()=>Rt,setCookie:()=>M,setCountryCode:()=>zt,setGeoLocation:()=>Or,setReferrerData:()=>it,setSessionItem:()=>ae,setupContentTestListeners:()=>bt,shouldShowTest:()=>Er,trackAddToCart:()=>en,trackCartView:()=>rn,trackCheckoutCompleted:()=>an,trackCheckoutStarted:()=>on,trackPageView:()=>nr,trackProductView:()=>Zr,trackRemoveFromCart:()=>tn,trackSearchSubmitted:()=>nn,trackSessionView:()=>Bt,trackUniqueView:()=>Lt,trackViews:()=>ut,updateCartAttributes:()=>Ye,updateUrlWithTestParams:()=>kr,useElevateConfig:()=>_t,useExperiment:()=>cn,usePageViewTracking:()=>sn,uuidv4:()=>de});module.exports=_n(ro);ot();J();Te();J();function Lt(e){let t=N("ABAU")||{};t[e]||(t[e]=!0,M("ABAU",JSON.stringify(t)))}function Bt(e){let t=qe("ABAV")||{};t[e]||(t[e]=!0,ae("ABAV",t))}function ut(e){Lt(e),Bt(e)}function Ar(e){return!!(qe("ABAV")||{})[e]}function Sr(e){return!!(N("ABAU")||{})[e]}function Ir(){if(typeof navigator>"u")return"desktop";let e=navigator.userAgent||navigator.vendor||window.opera||"",t=e.toLowerCase();return/windows nt.*tablet pc|pixelbook/i.test(e)||/(?:macintosh|windows nt|win(?:95|98)|linux x86_64)/i.test(e)&&!/android|mobile|tablet|ipad|iphone|ipod/i.test(t)?"desktop":/ipad|playbook|tablet|kindle|nexus (7|10)|xoom|sm-t\d+|galaxy tab|tb-\d+|tb\d+[a-z]+|lenovo.*tb|dtab|ideatab|mediapad|matepad|honor.*pad|pad\s+\d+|mi\s+pad|redmi.*pad|xiaomi.*pad|oppo.*pad|oneplus.*pad|opd\d+|tcl.*tab|9\d{3}[a-z]|kobo|archos.*5(?!\d)|ereader|droipad/i.test(e)||/android(?!.*mobile)/i.test(t)&&!/dalvik.*miui|pocophone|mi\s+mix|edge\s+\d+|sm-g9\d+|pixel\s+\d|pixel\s+fold|advan\s+\d{4}/i.test(e)?"tablet":/android.+mobile|iphone|ipod|windows phone|blackberry|mobile|phone|kaios/i.test(t)||/^mobile;/i.test(e)||/dalvik.*miui|pocophone|mi\s+mix|pixel\s+\d|pixel\s+fold/i.test(e)?"mobile":"desktop"}function Dt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function Nt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function Mt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/musical_ly/i.test(e)}function Ht(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(pinterest)[\/ ]([-\w\.]+)/i.test(e)}function Ur(){if(typeof window>"u")return"direct";let e=(document.referrer||"").toLowerCase(),t=e?new URL(e).hostname.replace("www.",""):"",r=window.location.hostname,o=Dt(),n=Nt(),u=Mt(),s=Ht();return o||["facebook.com","fb.com","fb.me","m.facebook.com","l.facebook.com","lm.facebook.com"].includes(t)?"facebook":n||t.includes("instagram")?"instagram":u||["tiktok.com","pangleglobal.com","ads.tiktok.com"].includes(t)?"tiktok":s||t.includes("pinterest")||t==="pin.it"?"pinterest":t.includes("google")?"google":!e||r===t?"direct":"other"}Fe();J();var fe={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function pe(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return M(fe.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let r=V(fe.SHOPIFY_LOCALIZATION);if(r)return r.toUpperCase();let o=V(fe.EAB_COUNTRY);if(o)return o.toUpperCase();if(typeof localStorage<"u"){let n=localStorage.getItem(fe.EAB_COUNTRY);if(n)return n.toUpperCase()}return null}function Rr(){let e=pe(),t=V(fe.EAB_GEO);if(t)try{let r=JSON.parse(t);return{country:r.country||e,region:r.region,city:r.city}}catch{}return{country:e}}function zt(e){let t=e.toUpperCase();M(fe.EAB_COUNTRY,t),typeof localStorage<"u"&&localStorage.setItem(fe.EAB_COUNTRY,t)}function Or(e){e.country&&zt(e.country),M(fe.EAB_GEO,JSON.stringify(e))}function qt(e,t){let r=t??pe();return r?e.map(n=>n.toUpperCase()).includes(r.toUpperCase()):!1}function Ft(e,t){let r=t??pe();return r?e.map(n=>n.toUpperCase()).includes(r.toUpperCase()):!1}function Vr(e){let t=pe();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&Ft(e.excludeCountries,t)?!1:e.includeCountries?.length?qt(e.includeCountries,t):!0}var Lr={US:"US",CA:"CA",GB:"GB",AU:"AU",DE:"DE",FR:"FR",JP:"JP",MX:"MX",BR:"BR",IN:"IN"},Br={NORTH_AMERICA:["US","CA","MX"],EUROPE:["GB","DE","FR","IT","ES","NL","BE","AT","CH","PL","SE","NO","DK","FI","IE","PT"],APAC:["AU","NZ","JP","KR","SG","HK","TW","TH","MY","PH","ID","VN","IN"],LATAM:["MX","BR","AR","CL","CO","PE"]};Te();J();function dt(e){let{configUrl:t,timeout:r=2e3}=e;return`(function(){
18
+ if(new URLSearchParams(location.search).get('abtr')==='true')return;
19
+
20
+ var style=document.createElement('style');
21
+ style.id='eab-split-hide';
22
+ style.textContent='body{opacity:0!important;visibility:hidden!important}';
23
+ document.head.appendChild(style);
24
+
25
+ window.__eab_reveal=function(){
26
+ var s=document.getElementById('eab-split-hide');
27
+ if(s)s.remove();
28
+ window.__eab_reveal=null;
29
+ };
30
+
31
+ setTimeout(function(){
32
+ if(window.__eab_reveal)window.__eab_reveal();
33
+ },${r});
34
+
35
+ if(window.eab_data){
36
+ return;
37
+ }
38
+
39
+ var script=document.createElement('script');
40
+ script.src='${t}';
41
+ script.onerror=function(){
42
+ if(window.__eab_reveal)window.__eab_reveal();
43
+ };
44
+ document.head.appendChild(script);
45
+ })();`}function Dr(e){if(!e?.trim())return"";try{let r=`https://${e.trim().replace(/^https?:\/\//,"")}`,o=new URL(r.replace(/\/+$/,""));return o.hostname.startsWith("www.")&&(o.hostname=o.hostname.substring(4)),o.toString().replace(/\/+$/,"")}catch{return e.trim().replace(/\/+$/,"")}}function jt(e,t){let r=Dr(e.split("?")[0]);for(let o of t){let n=Dr(o.split("?")[0]);if(r===n)return!0;try{let u=new URL(e).pathname,s=new URL(o,e).pathname;if(u===s)return!0}catch{}}return!1}function Pn(e){return e.data?.redirectBehavior||"redirectAll"}function Nr(e){return!!(N("eabRedirectedTests")||{})[e]}function Mr(e){let t=N("eabRedirectedTests")||{};t[e]=!0,M("eabRedirectedTests",JSON.stringify(t))}function Cn(e,t){for(let r of e.tests)if(!(r.type!=="SPLIT_URL"||!r.enabled))for(let o of r.variations){let n=o.splitUrlTestLinks||[];if(n.length!==0&&jt(t,n))return{test:r,matchedVariation:o,isControlUrl:!!o.isControl}}return null}function En(e){if(typeof window>"u")return;let t=new URL(e,window.location.origin);t.searchParams.set("abtr","true");let r=t.toString(),o=window.__remixRouter?.navigate??window.next?.router?.push??window.$nuxt?.$router?.push??window.__navigate;if(o&&typeof o=="function")try{let n=t.pathname+t.search;o(n);return}catch{}window.location.href=r}function je(e,t){if(typeof window>"u")return!1;let r=window.location.href;if(new URLSearchParams(window.location.search).get("abtr")==="true")return!1;let n=Cn(e,r);if(!n)return!1;let{test:u,matchedVariation:s,isControlUrl:p}=n,l=u.testId,g=Pn(u),i=ee(l);if(!i)return!1;let d=u.variations.find(f=>f.id===i);if(!d)return!1;let a=d.splitUrlTestLinks||[];if(a.length===0||jt(r,a))return!1;switch(g){case"redirectOnlyControlUrl":if(!p||d.isControl)return!1;break;case"redirectOnce":if(Nr(l))return!1;Mr(l);break;case"redirectOnceControlUrlOnly":if(!p||Nr(l)||d.isControl)return!1;Mr(l);break;default:break}let c=a[0];return En(c),!0}var $t={type:"SPLIT_URL",shouldActivate(e,t){for(let r of e.variations){let o=r.splitUrlTestLinks||[];if(jt(t.currentUrl,o))return!0}return!1},getVariantData(){return{handlerActivated:!0}}};var Wt=rt(Hr(),1),zr={"facebook.com":"Facebook","fb.me":"Facebook","m.facebook.com":"Facebook","l.facebook.com":"Facebook","lm.facebook.com":"Facebook","instagram.com":"Instagram","l.instagram.com":"Instagram","youtube.com":"Youtube","youtu.be":"Youtube","m.youtube.com":"Youtube","bing.com":"Bing","www.bing.com":"Bing","msnbc.msn.com":"Bing","dizionario.it.msn.com":"Bing","cc.bingj.com":"Bing","m.bing.com":"Bing","twitter.com":"Twitter","t.co":"Twitter"};function C(e){return typeof e!="string"?String(e):e.replace(/[\\"'`\x00-\x1F\x7F]/g,"")}function v(e){if(e==null)return null;let t=typeof e=="string"?parseFloat(e):Number(e);return isNaN(t)?null:+(Math.round(+(t+"e2"))+"e-2")}function te(e){if(!e)return null;let t=/gid:\/\/shopify\/Product\/(\d+)/,r=e.match(t);return r?r[1]:null}function me(e){if(!e)return null;let t=/gid:\/\/shopify\/ProductVariant\/(\d+)/,r=e.match(t);return r?r[1]:null}function Ue(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,r=e.match(t);return r?r[1]:null}function Re(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function An(e){return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function Sn(e){return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function qr(e){return An(e)||Sn(e)}function In(e){if(!e)return"";switch(e){case"Mobile Safari":return"Safari";case"Chrome Mobile":case"Chrome Mobile iOS":return"Chrome";case"Firefox Mobile":case"Firefox Mobile iOS":return"Firefox";case"Opera Mobile":case"Opera Mini":case"Opera Mini iOS":return"Opera";case"Yandex Browser Lite":return"Yandex Browser";case"Chrome Webview":case"Mobile App":return"Mobile App";default:return e}}function Un(e){let t={};return e.searchParams.forEach((r,o)=>{t[o]||(t[o]=r)}),t}function Rn(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function On(e){return e.replace(/^www\./,"")}function Vn(e,t,r){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let n,u;try{if(e&&e.trim()!=="")n=new URL(e);else return"Direct";if(n?.hostname&&Rn(n)){if(u=n.hostname,r&&r===u)return"Direct"}else return""}catch{}if(!u)return"";let s=On(u);return s?zr[s]?zr[s]:s?.includes("google")?"Google":s:""}function Oe(e){let{referrer:t,entryPage:r,userAgent:o}=e,n={referrer_source:"",browser_info:"",os_info:"",device_type:"",page_entry_path:"",utm_medium:"",utm_source:"",utm_campaign:"",utm_content:"",utm_term:"",referrer_url:t||"",gclid:"",fbclid:"",pins_campaign_id:"",epik:""};try{let u;if(r&&r.trim()!==""&&r.startsWith("http"))try{let s=new URL(r),p=s?.pathname;u=s?.hostname,p&&(n.page_entry_path=p??"");let l=Un(s);n.utm_medium=l.utm_medium??"",n.utm_source=l.utm_source??"",n.utm_campaign=l.utm_campaign??"",n.utm_content=l.utm_content??"",n.utm_term=l.utm_term??"",n.gclid=l.gclid??"",n.fbclid=l.fbclid??"",n.pins_campaign_id=l.pins_campaign_id??"",n.epik=l.epik??""}catch{}if(o){let s=(0,Wt.UAParser)(o),p=s?.browser?.name,l=In(p);n.browser_info=l??"",n.os_info=s?.os?.name??"",o&&(n.device_type=(s?.device?.type||"desktop")?.toUpperCase()??"")}return n.referrer_source=Vn(t,n?.browser_info,u)??"",n}catch{return n}}function Ve(e,t){let r=e==="/"||e==="",n=t&&/^\/[a-z]{2}(-[a-z]{2})?\/?$/i.test(e);return r||n?"index":/\/products\//.test(e)?"product":/\/collections\//.test(e)?"collection":/\/pages\//.test(e)?"page":/\/search/.test(e)?"search":/\/cart/.test(e)?"cart":/\/checkouts\//.test(e)?"checkout":"unknown"}function Fr(e){try{return e&&new URLSearchParams(e).get("eabUserId")||!1}catch{return!1}}function Le(e){if(!e)return"";try{let t=(0,Wt.UAParser)(e),r=t?.os,o=t?.device,n="";return r?.name&&(n+=r.name,r.version&&(n+=` ${r.version}`)),o?.type&&(n+=n?` (${o.type})`:o.type),o?.vendor&&(n+=n?` ${o.vendor}`:o.vendor),o?.model&&(n+=n?` ${o.model}`:o.model),n||e}catch{return e}}function q(e){return e?e.includes("gid://")&&e.split("/").pop()||e:""}function jr(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function $r(e){return!!e&&e.startsWith("gid://shopify/")}function Wr(){if(typeof window>"u")return;let e=window.Shopify;if(e?.currency?.active)return e.currency.active}Te();var Gr="elv-el-",Jr={ELEMENT_NODE:1,TEXT_NODE:3},ft=new Map,pt=new Map,mt=new Map,gt=new Map,Be=!1;function ge(e,t){if(t==="*")return!0;if(t.startsWith("*")&&t.endsWith("*")){let r=t.slice(1,-1);return e.includes(r)}if(t.startsWith("*")){let r=t.slice(1);return e.endsWith(r)}return t===e}function Yt(){return typeof window>"u"?!1:window.innerWidth<768}function Ln(e){let t="";for(let r=0;r<e.length;r++){let o=e[r];o>="A"&&o<="Z"?(r!==0&&(t+="-"),t+=o.toLowerCase()):t+=o}return t}function Bn(e){return e.nodeType===Jr.TEXT_NODE}function Gt(e){return e.nodeType===Jr.ELEMENT_NODE}function Jt(e,t){ft.has(e)||ft.set(e,t.cloneNode(!0))}function Yr(e){let t=e;t=t.replace(/&#96;/g,"`").replace(/&#36;/g,"$");try{t=JSON.parse('"'+t+'"')}catch{}return t}function Qt(e){if(typeof window>"u"||e.length===0)return;let t=window.location.pathname,r=e.filter(n=>n.pathnames?.length?n.pathnames.some(u=>ge(t,u)):!0);Be=Yt();let o=r.map(n=>({...n,style:n.style?{...n.style.lg,...Be&&n.style.sm}:void 0,content:n.content&&Be&&n.content.sm?n.content.sm:n.content?.lg}));o.filter(n=>n.content!==void 0).forEach(n=>{(n.applyAll?Array.from(document.querySelectorAll(n.selector)):[document.querySelector(n.selector)].filter(Boolean)).forEach((s,p)=>{if(!s)return;let l=n.applyAll?`${n.selector}-${p}-${s.id||Math.random().toString(36).substr(2,9)}`:n.selector;Jt(l,s),Bn(s)?s.nodeValue=n.content:Gt(s)&&(s.innerHTML=n.content)})}),o.filter(n=>n.style!==void 0).forEach(n=>{let u=document.querySelector(n.selector);!u||!Gt(u)||(Jt(n.selector,u),Object.entries(n.style).forEach(([s,p])=>{let l=Ln(s),g=p.toString().includes("!important"),i=p.toString().replace(/\s*!important\s*$/,"");u.style.setProperty(l,i,g?"important":void 0)}))}),o.filter(n=>n.attributes!==void 0).forEach(n=>{let u=document.querySelector(n.selector);!u||!Gt(u)||(Jt(n.selector,u),Object.entries(n.attributes).forEach(([s,p])=>{u.setAttribute(s,p)}))})}function Xt(e){if(typeof window>"u"||e.length===0)return;let t=window.location.pathname;e.filter(o=>o.selector?.pathnames?.length?o.selector.pathnames.some(n=>ge(t,n)):!0).forEach(o=>{let n=`${Gr}${o.id}`;if(gt.has(n))return;let u=document.querySelector(o.selector.target);if(!u||u.parentElement?.querySelector(`#${n}`))return;let s=Qr(o);o.selector.placement==="after"?u.after(s):o.selector.placement==="before"&&u.before(s),gt.set(n,s)})}function Qr(e){let t=document.createElement(e.tagName);return t.id=`${Gr}${e.id}`,e.style&&Object.assign(t.style,e.style),e.attributes&&Object.entries(e.attributes).forEach(([r,o])=>{t.setAttribute(r,o)}),e.kind==="text"&&e.content&&(t.innerText=e.content),e.kind==="container"&&e.childrens&&e.childrens.forEach(r=>{let o=Qr(r);t.appendChild(o)}),t}function Kt(e,t){if(typeof window>"u"||e.length===0)return;let r=window.location.pathname;e.filter(n=>n.pathnames?.length?n.excludePathnames?.length&&n.excludePathnames.some(s=>ge(r,s))?!1:n.pathnames.some(u=>ge(r,u)):!0).forEach(n=>{n.id&&(n.css&&Dn(n.id,n.css),n.js&&Nn(n.id,n.js,t))})}function Dn(e,t){let r=`css-${e}`;if(pt.has(r)||document.getElementById(r))return;let o=document.createElement("style");o.id=r,o.textContent=Yr(t),document.head.appendChild(o),pt.set(r,o)}function Nn(e,t,r){let o=`js-${e}`;if(mt.has(o)||document.getElementById(o))return;let n=document.createElement("script");n.id=o,r&&n.setAttribute("nonce",r);let u=Yr(t);n.textContent="(function(){try{"+u+"}catch(e){console.error('[ElevateAB] Custom script error:', e)}})();",document.head.appendChild(n),mt.set(o,n)}function Zt(){ft.forEach((e,t)=>{let r=document.querySelector(t);r&&r.replaceWith(e.cloneNode(!0))})}function er(){pt.forEach(e=>e.remove()),pt.clear(),mt.forEach(e=>e.remove()),mt.clear(),gt.forEach(e=>e.remove()),gt.clear(),ft.clear()}function Mn(e,t){let r=[],o=[],n=[];return e.tests.filter(s=>s.type==="CONTENT"&&s.enabled).forEach(s=>{let p=ee(s.testId);if(!p)return;let l=s.variations.find(g=>g.id===p);l?.content&&(l.content.changes?.length&&r.push(...l.content.changes),l.content.elements?.length&&o.push(...l.content.elements),l.content.customCodes?.length&&n.push(...l.content.customCodes))}),{changes:r,elements:o,blocks:[],customCodes:n}}function We(e){return e.tests.some(t=>t.type==="CONTENT"&&t.enabled)}function Ge(e,t,r){if(typeof window>"u"||!We(e))return;let o=Mn(e,t);(o.changes.length>0||o.elements.length>0||o.customCodes.length>0)&&(Qt(o.changes),Xt(o.elements),Kt(o.customCodes,r))}function wt(e,t,r){if(typeof window>"u")return;let o=Yt();o!==Be&&(Zt(),Be=o),Ge(e,t,r)}function bt(e,t,r){if(typeof window>"u")return()=>{};let o=()=>{Yt()!==Be&&wt(e,t,r)},n=()=>{wt(e,t,r)};return window.addEventListener("resize",o),window.addEventListener("popstate",n),()=>{window.removeEventListener("resize",o),window.removeEventListener("popstate",n),er()}}yt();tr();J();var Pe=require("react"),Hn="https://bitter-river-9c62.support-67d.workers.dev",zn="https://d339co84ntxcme.cloudfront.net/Prod/orders",D=null;function vt(e){D=e}function we(e){let t=e?.storeId||D?.storeId;return t||(console.warn("[ElevateAB] No storeId provided. Call initAnalytics() first or pass storeId to tracking function."),"")}function qn(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function Fn(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function jn(){return typeof window>"u"?!1:V("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function be(e,t,r){if(typeof window>"u"||jn())return null;let o=navigator.userAgent,n=window.location.pathname,u=Ve(n,r),{referrer:s,entryPage:p}=Ie(),l=Oe({referrer:s,entryPage:p,userAgent:o}),g=N("ABTL")||{},i=N("ABAU")||{},d=qn(g),a=Fn(i,g),c=Ue(localStorage.getItem("shopifyCartId")),f=new Date().toISOString(),_=sessionStorage.getItem("eabIsFirstVisit")==="true",T=V("localization")||"";return{pixel_event_id:`sh-${de()}`,shop_name:e,timestamp:f,event_type:t,client_id:V("_shopify_y")||void 0,visitor_id:se(),session_id:xe(),cart_token:Re(c||V("cart")),page_url:window.location.href,page_pathname:n,page_search:window.location.search,referrer_url:s,referrer_source:l?.referrer_source,previous_page:document.referrer,page_entry:p,page_entry_path:l?.page_entry_path,page_type:u,utm_medium:l?.utm_medium,utm_source:l?.utm_source,utm_campaign:l?.utm_campaign,utm_content:l?.utm_content,utm_term:l?.utm_term,gclid:l?.gclid,fbclid:l?.fbclid,pins_campaign_id:l?.pins_campaign_id,epik:l?.epik,browser_info:l?.browser_info,os_info:l?.os_info,device_type:l?.device_type,language:navigator.language,root_route:localStorage.getItem("eabRootRoute")||"",user_agent:o,user_agent_no_browser:Le(o),is_first_visit:_,shopify_country:T,ab_test_assignments:d,ab_test_views:a,is_first_order:null}}async function he(e,t=Hn){try{let r=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0});if(!r.ok)throw new Error(`Worker error: ${r.status}`)}catch(r){console.error("[ElevateAB] Error sending analytics:",r)}}async function nr(e={}){let t=we(e);if(!t)return;let r=e.hasLocalizedPaths??D?.hasLocalizedPaths,o=e.workerUrl??D?.workerUrl,n=be(t,"page_viewed",r);if(!n)return;let u={...n,cart_currency:e.currency};await he(u,o)}async function Zr(e){let t=we(e);if(!t)return;let{productId:r,productVendor:o,productPrice:n,productSku:u,currency:s}=e,p=e.hasLocalizedPaths??D?.hasLocalizedPaths,l=e.workerUrl??D?.workerUrl,g=be(t,"product_viewed",p);if(!g)return;let i={...g,cart_currency:s,product_id:q(r),product_vendor:C(o),product_price:v(n),product_sku:C(u)};await he(i,l)}async function en(e){let t=we(e);if(!t)return;let{productId:r,variantId:o,productVendor:n,productPrice:u,productQuantity:s,productSku:p,currency:l,cartId:g}=e,i=e.hasLocalizedPaths??D?.hasLocalizedPaths,d=e.workerUrl??D?.workerUrl,a=e.storefrontAccessToken??D?.storefrontAccessToken,c=be(t,"product_added_to_cart",i);if(!c)return;let f={...c,cart_currency:l,product_id:q(r),variant_id:q(o),product_vendor:C(n),product_price:v(u),product_quantity:s,product_sku:C(p)};if(await he(f,d),g&&a)try{let{updateCartAttributes:_}=await Promise.resolve().then(()=>(yt(),Kr));await _(g,{storefrontAccessToken:a})}catch(_){console.error("[ElevateAB] Failed to update cart attributes:",_)}}async function tn(e){let t=we(e);if(!t)return;let{productId:r,variantId:o,productVendor:n,productPrice:u,productQuantity:s,productSku:p,currency:l}=e,g=e.hasLocalizedPaths??D?.hasLocalizedPaths,i=e.workerUrl??D?.workerUrl,d=be(t,"product_removed_from_cart",g);if(!d)return;let a={...d,cart_currency:l,product_id:q(r),variant_id:q(o),product_vendor:C(n),product_price:v(u),product_quantity:s,product_sku:C(p)};await he(a,i)}async function rn(e){let t=we(e);if(!t)return;let{cartTotalPrice:r,cartTotalQuantity:o,cartItems:n,currency:u}=e,s=e.hasLocalizedPaths??D?.hasLocalizedPaths,p=e.workerUrl??D?.workerUrl,l=be(t,"cart_viewed",s);if(!l)return;let g={...l,cart_currency:u,cart_total_price:v(r),cart_total_quantity:o,cart_items:n?.map(i=>({product_id:q(i.productId),variant_id:q(i.variantId),product_vendor:C(i.productVendor)||"",product_price:v(i.productPrice),product_quantity:i.productQuantity??null,product_sku:C(i.productSku)||""}))};await he(g,p)}async function nn(e){let t=we(e);if(!t)return;let{searchQuery:r,currency:o}=e,n=e.hasLocalizedPaths??D?.hasLocalizedPaths,u=e.workerUrl??D?.workerUrl,s=be(t,"search_submitted",n);if(!s)return;let p={...s,cart_currency:o,search_query:C(r)};await he(p,u)}async function on(e){let t=we(e);if(!t)return;let{cartTotalPrice:r,cartSubtotalPrice:o,cartShippingPrice:n,cartTaxAmount:u,cartDiscountAmount:s,customerId:p,cartItems:l,currency:g}=e,i=e.hasLocalizedPaths??D?.hasLocalizedPaths,d=e.workerUrl??D?.workerUrl,a=be(t,"checkout_started",i);if(!a)return;let c=0,f=l?.map(T=>{let w=T.productQuantity??0;return c+=w,{product_id:q(T.productId),variant_id:q(T.variantId),product_vendor:C(T.productVendor)||"",vendor:C(T.productVendor)||"",product_price:v(T.productPrice),total_price:v(T.productPrice),product_quantity:w,quantity:w,product_sku:C(T.productSku)||"",sku:C(T.productSku)||"",total_discount:v(T.totalDiscount)}})||[],_={...a,cart_currency:g,cart_total_price:v(r),cart_subtotal_price:v(o),cart_total_quantity:c,cart_shipping_price:v(n),cart_tax_amount:v(u),cart_discount_amount:v(s),cart_items:f,customer_id:p};await he(_,d)}async function an(e){let t=we(e);if(!t)return;let{orderId:r,cartTotalPrice:o,cartSubtotalPrice:n,cartShippingPrice:u,cartTaxAmount:s,cartDiscountAmount:p,customerId:l,isFirstOrder:g,noteAttributes:i,cartItems:d,currency:a}=e,c=e.hasLocalizedPaths??D?.hasLocalizedPaths,f=e.ordersWorkerUrl??D?.ordersWorkerUrl??zn,_=be(t,"checkout_completed",c);if(!_)return;let T=0,w=d?.map(x=>{let L=x.productQuantity??0;return T+=L,{product_id:q(x.productId),variant_id:q(x.variantId),product_vendor:C(x.productVendor)||"",vendor:C(x.productVendor)||"",product_price:v(x.productPrice),total_price:v(x.productPrice),product_quantity:L,quantity:L,product_sku:C(x.productSku)||"",sku:C(x.productSku)||"",total_discount:v(x.totalDiscount)}})||[],b={..._,cart_currency:a,cart_total_price:v(o),cart_subtotal_price:v(n),cart_total_quantity:T,cart_shipping_price:v(u),cart_tax_amount:v(s),cart_discount_amount:v(p),cart_items:w,order_id:r,customer_id:l,is_first_order:g??null,note_attributes:i};await he(b,f)}function sn(e){let{storeId:t,hasLocalizedPaths:r,currency:o,workerUrl:n,enabled:u=!0,pathname:s}=e,p=(0,Pe.useRef)(null),[l,g]=(0,Pe.useState)(()=>s||(typeof window<"u"?window.location.pathname:""));(0,Pe.useEffect)(()=>{s&&g(s)},[s]),(0,Pe.useEffect)(()=>{typeof window>"u"||!u||p.current!==l&&(p.current=l,nr({storeId:t,hasLocalizedPaths:r,currency:o,workerUrl:n}))},[l,t,r,o,n,u])}var ye=rt(require("react"),1);var or=rt(require("react"),1),Qe=or.default.createContext(null);function _t(){let e=or.default.useContext(Qe);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}Te();Fe();var kt=new Map;function Ce(e){kt.set(e.type,e)}function Xe(e){return kt.get(e)}function ir(){return Array.from(kt.values())}function ar(e){return kt.has(e)}function $n(e){try{let o=new URL(e,"https://example.com").pathname.match(/\/products\/([^\/\?]+)/);return o?o[1]:null}catch{return null}}function Wn(e,t,r,o){if(typeof window>"u"||!e.prices||!t)return;let n=e.prices[t];if(!n)return;let u=n.price?.[r],s=n.compare?.[r],p=o;if(p?.selectorsV2?.length)for(let l of p.selectorsV2){if(l.price&&u){let g=l.price.replace("{{variant}}",t);document.querySelectorAll(g).forEach(d=>{let a=new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(parseFloat(u));d.textContent=a})}if(l.compareAt&&s){let g=l.compareAt.replace("{{variant}}",t);document.querySelectorAll(g).forEach(d=>{let a=new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(parseFloat(s));d.textContent=a})}if(l.saving&&u&&s)for(let g of l.saving){let i=g.selector.replace("{{variant}}",t);document.querySelectorAll(i).forEach(a=>{let c=parseFloat(u),f=parseFloat(s),_=f-c;if(g.isPercentage){let T=Math.round(_/f*100);a.textContent=`${T}%`}else{let T=new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(_);a.textContent=T}})}}}var sr={type:"PRICE_PLUS",shouldActivate(e,t){let r=e.data;if(!r)return!1;let{productId:o,productHandle:n}=t,u=n||$n(t.currentUrl),s=o&&r.productIds?.includes(o),p=u&&r.handles?.includes(u);return s||p},applyEffect(e,t,r){Wn(t,r.variantId,r.currencyCode||"USD",r.selectors)},getVariantData(e,t,r){let o=e.data;return{prices:t.prices,matchedProductId:r.productId,productIds:o?.productIds,handles:o?.handles,handlerActivated:!0}}};function Gn(e,t){let o=e.data?.pathnames||[];if(!o.length)return!0;try{let u=new URL(t,"https://example.com").pathname;return o.some(s=>ge(u,s))}catch{return!1}}var Ke={type:"CONTENT",shouldActivate(e,t){return Gn(e,t.currentUrl)},getVariantData(e,t,r){let o=e.data;return{content:t.content,pathnames:o?.pathnames,handlerActivated:!0}}};Ce(sr);Ce($t);Ce(Ke);function Jn(e){if(typeof window>"u")return{currentUrl:"",selectors:e};let t=window.location.href,r=window.location.pathname,o,n=r.match(/\/products\/([^\/\?]+)/);n&&(o=n[1]);let u,p=new URLSearchParams(window.location.search).get("variant");return p&&(u=p),{currentUrl:t,productHandle:o,variantId:u,selectors:e,currencyCode:"USD"}}function cn(e){let{config:t,previewState:r,selectors:o}=_t(),[n,u]=ye.default.useState(null),[s,p]=ye.default.useState(!0),l=ye.default.useMemo(()=>t&&t.tests.find(a=>a.testId===e)||null,[t,e]),g=ye.default.useMemo(()=>r||le(),[r]),i=ye.default.useRef(null),d=ye.default.useRef(null);return ye.default.useEffect(()=>{let a=!0;if(t===null)return;if(!l){i.current!==e&&(i.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),a&&p(!1);return}if(!l.enabled&&!g?.isPreview){i.current!==`${e}-disabled`&&(i.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),a&&p(!1);return}let c=ee(e);if(!c){a&&p(!1);return}let f=l.variations.find(b=>b.id===c);if(!f){a&&p(!1);return}let _=Xe(l.type),T=Jn(o),w={...f};if(_?.shouldActivate(l,T)){let b=`${e}-${f.id}`;_.applyEffect&&d.current!==b&&(d.current=b,_.applyEffect(l,f,T));let x=_.getVariantData(l,f,T);w={...w,...x}}return a&&u(w),g?.isPreview||ut(e),a&&p(!1),()=>{a=!1}},[t,l,e,g,o]),{variant:n,isLoading:s,isControl:n?.isControl??!1,isA:n?.isA??!1,isB:n?.isB??!1,isC:n?.isC??!1,isD:n?.isD??!1}}var H=rt(require("react"),1);ot();Fe();Te();var xt=require("react/jsx-runtime"),Yn="https://d19dz5bxptjmv5.cloudfront.net/headless";function Qn(e){return e.replace(/^https?:\/\//,"").replace(".myshopify.com","")}function un(e){return`${Yn}/${Qn(e)}.js`}function dn({storeId:e,storefrontAccessToken:t,preventFlickering:r=!1,flickerTimeout:o=3e3,nonce:n,children:u}){let[s,p]=H.default.useState(null),[l,g]=H.default.useState(null),[i,d]=H.default.useState(null);H.default.useEffect(()=>{if(typeof window>"u")return;vt({storeId:e,storefrontAccessToken:t});let w=le();g(w);let b=pe();d(b)},[e,t]);let a=(0,H.useCallback)(()=>{typeof window<"u"&&window.__eab_reveal&&window.__eab_reveal()},[]);H.default.useEffect(()=>{async function w(){try{let b=typeof window<"u"?le():null,x=null;if(typeof window<"u"&&window.eab_data)x=window.eab_data;else{let Y=un(e);x=await new Promise((re,Q)=>{let $=document.createElement("script");$.src=Y,$.async=!0,$.onload=()=>{let m=window.eab_data;$.remove(),m?re(m):Q(new Error("Failed to load config: window.eab_data is undefined"))},$.onerror=()=>{$.remove(),re({allTests:{},selectors:{selectorsV2:[]}})},document.head.appendChild($)})}if(!x||!x.allTests||Object.keys(x.allTests).length===0){p({tests:[],selectors:void 0}),a();return}if(x.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(x.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),p({tests:[],selectors:void 0}),a();return}if(!(Object.keys(x.allTests||{}).length>0)){p({tests:[],selectors:void 0}),a();return}let j=yr(x);if(ct(j,b),j.tests.some(Y=>Y.type==="SPLIT_URL")&&je(j,b))return;p(j),a()}catch(b){console.error("[ElevateAB] Failed to load config:",b),p({tests:[],selectors:void 0}),a()}}w()},[e,a]),H.default.useEffect(()=>!s||typeof window>"u"||!We(s)?void 0:(Ge(s,l,n),bt(s,l,n)),[s,l,n]);let c=H.default.useMemo(()=>({config:s,storeId:e,storefrontAccessToken:t,isPreviewMode:l?.isPreview??!1,previewTestId:l?.previewTestId??null,previewState:l,selectors:s?.selectors,countryCode:i}),[s,e,t,l,i]),f=(0,H.useRef)(!1);H.default.useEffect(()=>{!t&&!f.current&&(f.current=!0,console.warn("[ElevateAB] No storefrontAccessToken provided. Orders won't be attributed to test variants."))},[t]);let _=H.default.useMemo(()=>un(e),[e]),T=H.default.useMemo(()=>dt({configUrl:_,timeout:r?o:2e3}),[_,r,o]);return(0,xt.jsxs)(Qe.Provider,{value:c,children:[(0,xt.jsx)("script",{nonce:n,dangerouslySetInnerHTML:{__html:T}}),u]})}var Ee=require("react");J();J();yt();var Xn="https://bitter-river-9c62.support-67d.workers.dev",Kn="https://d339co84ntxcme.cloudfront.net/Prod/orders";function ve(){return`sh-${de()}`}function Zn(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function eo(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function ln({storeId:e,storefrontAccessToken:t,hasLocalizedPaths:r,workerUrl:o=Xn,ordersWorkerUrl:n=Kn,useAnalytics:u}){let s=(0,Ee.useContext)(Qe),p=e||s?.storeId||"",l=t||s?.storefrontAccessToken,g=(0,Ee.useRef)(!1);(0,Ee.useEffect)(()=>{!s&&!e&&!g.current&&(g.current=!0,console.error("[ElevateAB] ElevateAnalytics must be used inside ElevateProvider, or you must pass storeId as a prop."))},[s,e]);let{subscribe:i,register:d}=u(),{ready:a}=d("Elevate Analytics");return(0,Ee.useEffect)(()=>{if(typeof window>"u")return;if(se(),xe(),typeof document<"u"){let f=document.referrer||"",_=window.location.href;it(f,_)}(()=>{let f=m=>{let h=te(m.products?.[0]?.id);h&&typeof localStorage<"u"?localStorage.setItem("eabProductPageId",h):typeof window<"u"&&!window.location.pathname.includes("/products/")&&localStorage?.removeItem("eabProductPageId");let S=Ue(typeof localStorage<"u"?localStorage.getItem("shopifyCartId"):null),{referrer:R,entryPage:O}=Ie();return{visitorId:se(),sessionId:xe(),cartToken:S||V("cart")||"",referrer:R,entryPage:O,clientId:V("_shopify_y"),rootRoute:typeof localStorage<"u"&&localStorage.getItem("eabRootRoute")||"",productPageId:typeof localStorage<"u"&&localStorage.getItem("eabProductPageId")||""}},_=(m,h,S,R)=>{let O=typeof navigator<"u"?navigator.userAgent:"",z=S?.url?new URL(S.url).pathname:typeof window<"u"?window.location.pathname:"",W=Ve(z,r),I=Oe({referrer:R.referrer,entryPage:R.entryPage,userAgent:O}),B=N("ABTL")||{},G=N("ABAU")||{},_e=Zn(B),ne=eo(G,B),oe=new Date().toISOString(),ue=typeof sessionStorage<"u"?sessionStorage.getItem("eabIsFirstVisit")==="true":!1,ke=V("localization")||"";return{pixel_event_id:h,shop_name:p,timestamp:oe,event_type:m,client_id:R.clientId,visitor_id:R.visitorId,session_id:R.sessionId,cart_token:Re(R.cartToken),page_url:S.context?.document?.location?.href||(typeof window<"u"?window.location.href:""),page_pathname:z,page_search:S.context?.document?.location?.search||(typeof window<"u"?window.location.search:""),referrer_url:R.referrer,referrer_source:I?.referrer_source,previous_page:typeof document<"u"?document.referrer:"",page_entry:R.entryPage,page_entry_path:I?.page_entry_path,page_type:W,utm_medium:I?.utm_medium,utm_source:I?.utm_source,utm_campaign:I?.utm_campaign,utm_content:I?.utm_content,utm_term:I?.utm_term,gclid:I?.gclid,fbclid:I?.fbclid,pins_campaign_id:I?.pins_campaign_id,epik:I?.epik,browser_info:I?.browser_info,os_info:I?.os_info,device_type:I?.device_type,language:S.context?.navigator?.language||(typeof navigator<"u"?navigator.language:""),root_route:R.rootRoute,user_agent:O,user_agent_no_browser:Le(O),is_first_visit:ue,shopify_country:ke,cart_currency:S.shop?.currency,ab_test_assignments:_e,ab_test_views:ne,is_first_order:null}},T=async m=>{if(!m.exclude)try{let h=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m),keepalive:!0});if(!h.ok)throw new Error(`Worker error: ${h.status}`);return h}catch(h){console.error("[ElevateAB] Error sending analytics:",h)}},w=async m=>{try{let h=f(m),S=ve(),R=_("page_viewed",S,m,h);await T(R)}catch(h){console.error("[ElevateAB] Error handling page_viewed:",h)}},b=async m=>{try{let h=f(m),S=ve(),O={..._("product_viewed",S,m,h),product_id:te(m?.products?.[0]?.id)||"",product_vendor:C(m?.products?.[0]?.vendor)??"",product_price:v(m?.products?.[0]?.price)??null,product_sku:C(m?.products?.[0]?.sku)??""};await T(O)}catch(h){console.error("[ElevateAB] Error handling product_viewed:",h)}},x=async m=>{try{let h=f(m),S=ve(),O={..._("product_added_to_cart",S,m,h),product_id:te(m?.currentLine?.merchandise?.product?.id)??"",variant_id:me(m?.currentLine?.merchandise?.id)??"",product_vendor:C(m?.currentLine?.merchandise?.product?.vendor)??"",product_price:v(m?.currentLine?.cost?.totalAmount?.amount)??null,product_quantity:m?.currentLine?.quantity??null,product_sku:C(m?.currentLine?.merchandise?.sku)??""};await T(O);let z=m?.cart?.id;z&&l&&p&&Ye(z,{storefrontAccessToken:l,storefrontApiUrl:`https://${p}/api/2025-01/graphql.json`}).catch(W=>{console.error("[ElevateAB] Failed to update cart attributes:",W)})}catch(h){console.error("[ElevateAB] Error handling product_added_to_cart:",h)}},L=async m=>{try{let h=f(m),S=ve(),O={..._("product_removed_from_cart",S,m,h),product_id:te(m?.prevLine?.merchandise?.product?.id)??"",variant_id:me(m?.prevLine?.merchandise?.id)??"",product_vendor:C(m?.prevLine?.merchandise?.product?.vendor)??"",product_price:v(m?.prevLine?.cost?.totalAmount?.amount)??null,product_quantity:m?.prevLine?.quantity??null,product_sku:C(m?.prevLine?.merchandise?.sku)??""};await T(O)}catch(h){console.error("[ElevateAB] Error handling product_removed_from_cart:",h)}},j=async m=>{try{let h=f(m),S=ve(),R=_("cart_viewed",S,m,h),z=(m?.data?.cart?.lines?.nodes||m?.data?.cart?.lines||[]).map(I=>({product_id:te(I?.merchandise?.product?.id)??"",variant_id:me(I?.merchandise?.id)??"",vendor:C(I?.merchandise?.product?.vendor)??"",total_price:v(I?.cost?.totalAmount?.amount)??null,quantity:I?.quantity??null,sku:C(I?.merchandise?.sku)??""})),W={...R,cart_total_price:v(m?.cart?.cost?.totalAmount?.amount)??null,cart_total_quantity:m?.cart?.totalQuantity??null,cart_items:z};await T(W)}catch(h){console.error("[ElevateAB] Error handling cart_viewed:",h)}},Y=async m=>{try{let h=f(m),S=ve(),O={..._("search_submitted",S,m,h),search_query:C(m?.data?.searchResult?.query)??""};await T(O)}catch(h){console.error("[ElevateAB] Error handling search_submitted:",h)}},re=async m=>{try{let h=f(m),S=ve(),R=_("checkout_started",S,m,h),O=0,W=(m?.data?.checkout?.lineItems??[]).map(B=>{let G=B?.quantity??0;O+=G;let ne=(B?.discountAllocations??[])?.reduce((oe,ue)=>oe+(ue?.amount?.amount||0),0);return{product_id:te(B?.variant?.product?.id)??"",variant_id:me(B?.variant?.id)??"",vendor:C(B?.variant?.product?.vendor)??"",total_price:v(B?.finalLinePrice?.amount)??null,quantity:G,sku:C(B?.variant?.sku)??"",total_discount:v(ne)??null}}),I={...R,cart_total_price:v(m?.data?.checkout?.totalPrice?.amount)??null,cart_subtotal_price:v(m?.data?.checkout?.subtotalPrice?.amount)??null,cart_total_quantity:O,cart_shipping_price:v(m?.data?.checkout?.shippingLine?.price?.amount)??null,cart_tax_amount:v(m?.data?.checkout?.totalTax?.amount)??null,cart_discount_amount:v(m?.data?.checkout?.discountsAmount?.amount)??null,cart_items:W,customer_id:m?.data?.checkout?.order?.customer?.id??""};await T(I)}catch(h){console.error("[ElevateAB] Error handling checkout_started:",h)}},Q=async m=>{try{let h=f(m),S=ve(),R=_("checkout_completed",S,m,h),O=0,W=(m?.data?.checkout?.lineItems??[]).map(B=>{let G=B?.quantity??0;O+=G;let ne=(B?.discountAllocations??[])?.reduce((oe,ue)=>oe+(ue?.amount?.amount||0),0);return{product_id:te(B?.variant?.product?.id)??"",variant_id:me(B?.variant?.id)??"",vendor:C(B?.variant?.product?.vendor)??"",total_price:v(B?.finalLinePrice?.amount)??null,quantity:G,sku:C(B?.variant?.sku)??"",total_discount:v(ne)??null}}),I={...R,cart_total_price:v(m?.data?.checkout?.totalPrice?.amount)??null,cart_subtotal_price:v(m?.data?.checkout?.subtotalPrice?.amount)??null,cart_total_quantity:O,cart_shipping_price:v(m?.data?.checkout?.shippingLine?.price?.amount)??null,cart_tax_amount:v(m?.data?.checkout?.totalTax?.amount)??null,cart_discount_amount:v(m?.data?.checkout?.discountsAmount?.amount)??null,cart_items:W,order_id:m?.data?.checkout?.order?.id??"",customer_id:m?.data?.checkout?.order?.customer?.id??"",is_first_order:m?.data?.checkout?.order?.customer?.isFirstOrder??null,note_attributes:m?.data?.checkout?.attributes??[]};await $(I)}catch(h){console.error("[ElevateAB] Error handling checkout_completed:",h)}},$=async m=>{if(!m.exclude)try{let h=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m),keepalive:!0});if(!h.ok)throw new Error(`Orders worker error: ${h.status}`);return h}catch(h){console.error("[ElevateAB] Error sending order analytics:",h)}};i("page_viewed",w),i("product_viewed",b),i("product_added_to_cart",x),i("product_removed_from_cart",L),i("cart_viewed",j),i("search_submitted",Y),i("checkout_started",re),i("checkout_completed",Q)})(),a()},[i,a,p,r,l,o,n]),null}var to="1.1.2";0&&(module.exports={CART_ATTRIBUTES_UPDATE_MUTATION,COUNTRIES,ElevateAnalytics,ElevateProvider,REGIONS,VERSION,applyContentChanges,applyContentElements,applyCustomCode,assignAllTests,assignAndPersistVariant,buildEabTestsParam,canAssignToTest,checkFacebookBrowser,checkFacebookInstagramBrowser,checkInstagramBrowser,checkPinterestBrowser,checkTikTokBrowser,checkVisitorIdParams,cleanCartToken,cleanupCartAttributes,cleanupContentTests,clearPreviewMode,contentHandler,deleteCookie,detectShopifyCurrency,extractCartToken,extractProductId,extractProductVariantId,extractShopifyId,extractShopifyType,getAllHandlers,getAssignedVariant,getCartAttributesPayload,getCookie,getCountryCode,getDeviceType,getGeoLocation,getHandler,getJsonCookie,getJsonSessionItem,getPageTypeFromPathname,getPreviewState,getPreviewVariation,getReferrerData,getSessionId,getSessionItem,getSplitUrlBlockingScript,getTestList,getTrafficSource,getUserAgentNoBrowser,getVisitorId,hasContentTests,hasHandler,hasSessionView,hasUniqueView,hashString,initAnalytics,initializeSessionId,initializeVisitorId,isCountryExcluded,isCountryIncluded,isInPreviewMode,isPreviewTest,isShopifyGid,matchesGeoTargeting,matchesWildcardPattern,parseAddViewData,processContentTests,processSplitUrlTests,registerHandler,reprocessContentTests,restoreOriginalElements,roundToTwo,sanitizeString,saveTestList,setCookie,setCountryCode,setGeoLocation,setReferrerData,setSessionItem,setupContentTestListeners,shouldShowTest,trackAddToCart,trackCartView,trackCheckoutCompleted,trackCheckoutStarted,trackPageView,trackProductView,trackRemoveFromCart,trackSearchSubmitted,trackSessionView,trackUniqueView,trackViews,updateCartAttributes,updateUrlWithTestParams,useElevateConfig,useExperiment,usePageViewTracking,uuidv4});
41
46
  //# sourceMappingURL=index.cjs.map