@elevateab/sdk 1.4.3 → 1.4.4

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.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Tn=Object.create;var it=Object.defineProperty;var Pn=Object.getOwnPropertyDescriptor;var En=Object.getOwnPropertyNames;var An=Object.getPrototypeOf,Sn=Object.prototype.hasOwnProperty;var Se=(e,t)=>()=>(e&&(t=e(e=0)),t);var In=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tr=(e,t)=>{for(var r in t)it(e,r,{get:t[r],enumerable:!0})},Pr=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of En(t))!Sn.call(e,n)&&n!==r&&it(e,n,{get:()=>t[n],enumerable:!(o=Pn(t,n))||o.enumerable});return e};var at=(e,t,r)=>(r=e!=null?Tn(An(e)):{},Pr(t||!e||!e.__esModule?it(r,"default",{value:e,enumerable:!0}):r,e)),Un=e=>Pr(it({},"__esModule",{value:!0}),e);function st(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 Er(e){let t=[];for(let[r,o]of Object.entries(e.allTests)){if(!o.data.isLive)continue;let n=[],c=0;for(let[s,f]of Object.entries(o)){if(s==="data")continue;let d=f;if(typeof d=="object"&&d!==null&&"variationName"in d){let g=!!d.isControl,i=d.content,l;i&&typeof i=="object"&&(l={changes:i.changes||[],elements:i.elements||[],blocks:i.blocks||[],customCodes:i.customCodes||[]});let a=d.customCode,u;a&&typeof a=="object"&&a.id&&(u={id:a.id,js:a.js,css:a.css,pathnames:a.pathnames||[],excludePathnames:a.excludePathnames}),n.push({id:s,name:d.variationName,weight:d.trafficPercentage,isControl:g,productId:d.id,handle:d.handle,price:d.price,prices:d.prices,splitUrlTestLinks:d.splitUrlTestLinks,content:l,customCode:u,isA:!g&&c===0,isB:!g&&c===1,isC:!g&&c===2,isD:!g&&c===3}),g||c++}}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 ct=Se(()=>{"use strict"});function le(){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 Ar(e){typeof document>"u"||(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}function se(e,t){typeof sessionStorage>"u"||sessionStorage.setItem(e,JSON.stringify(t))}function ee(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}function $e(e){let t=ee(e);return t?JSON.parse(t):null}function Lt(){let e=V("eabUserId");return e||(e=le(),M("eabUserId",e)),e}function ce(){return Lt()}function Bt(){let e=ee("eabSessionId");return e||(e=le(),se("eabSessionId",e)),e}function Te(){return Bt()}function ut(e,t){if(typeof sessionStorage>"u")return;let r=ee("eabReferrer"),o=ee("eabEntry");r||se("eabReferrer",e),o||se("eabEntry",t)}function Ie(){return{referrer:ee("eabReferrer")||"",entryPage:ee("eabEntry")||""}}var Y=Se(()=>{"use strict"});function Rn(e){let t={},r={};if(!e)return{assignments:t,views:r};let o=e.split("~");for(let n of o){let c=n.split("_");if(c.length>=2){let s=c[0],f=c[1],d=c[2]==="1";t[s]=f,r[s]=d}}return{assignments:t,views:r}}function pe(){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=ee("eabPreviewTestId"));let n=e.get("eab_tests")||"",{assignments:c,views:s}=Rn(n);return e.has("eabUserPreview")&&M("eabUserPreview","true"),e.has("abtid")&&o&&se("eabPreviewTestId",o),{isPreview:r,previewTestId:o,forcedAssignments:c,previewedViews:s}}function Sr(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 dt(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 Dt(e,t){return Object.entries(e).map(([r,o])=>{let n=r.slice(-5),c=t[r]?"1":"0";return`${n}_${o}_${c}`}).join("~")}function Ir(e,t,r){if(typeof window>"u")return;let o=new URL(window.location.href),n=Dt(e,t);n&&o.searchParams.set("eab_tests",n),r&&o.searchParams.set("eabUserId",r),window.history.replaceState({},"",o.toString())}function Ur(){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 Rr(){return pe().isPreview}var We=Se(()=>{"use strict";Y()});function ue(){return N("ABTL")||{}}function Nt(e){M("ABTL",JSON.stringify(e))}function J(e){return ue()[e]||null}function Vr(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 On(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 l=0;l<e.length;l++)n+=i,o.push(n)}let s=st(t)%1e4/100,f=0;for(let i=0;i<o.length;i++)if(s<o[i]){f=i;break}let d=e[f]||e[0],g=Vr(e,f);return{...d,isA:g===0,isB:g===1,isC:g===2,isD:g===3}}function Or(e,t){let r=t.findIndex(n=>n.id===e.id),o=Vr(t,r);return{...e,isA:o===0,isB:o===1,isC:o===2,isD:o===3}}function Mt(e,t,r,o){if(o?.isPreview){let g=dt(e,o);if(g){let i=t.variations.find(l=>l.id===g);if(i)return Or(i,t.variations)}}let n=J(e);if(n){let g=t.variations.find(i=>i.id===n);if(g)return Or(g,t.variations)}let c=t.variations.filter(g=>!g.isDone);if(c.length===0)return null;let s=t.isPersonalization,f;s?f=c.find(i=>!i.isControl)||c[0]:f=On(c,r);let d=ue();return d[e]=f.id,Nt(d),f}function lt(e){return typeof e.testTrafficPercentage=="number"}function Ht(e,t){try{let r=ue(),o=Object.keys(r);if(r[e]||o.length===0)return!0;if(o.some(s=>{let f=t.find(d=>d.testId===s);return f&&lt(f)}))return!1;let c=t.find(s=>s.testId===e);return c?!lt(c):!0}catch(r){return console.error("[ElevateAB] Error in canAssignToTest:",r),!0}}function Lr(e,t){let r=e.testTrafficPercentage;return typeof r!="number"||J(e.testId)?!0:t&&!Ht(e.testId,t)?!1:Math.random()*100<r}function pt(e,t){let r=ce(),o=e.tests,n=ue();for(let c of o){if(!c.enabled||n[c.testId]||!Vn(c.testId,o,n))continue;let s=c.testTrafficPercentage;!t?.isPreview&&typeof s=="number"&&Math.random()*100>=s||(Mt(c.testId,c,r,t??void 0),n=ue())}}function Vn(e,t,r){let o=Object.keys(r);if(o.length===0)return!0;if(o.some(s=>{let f=t.find(d=>d.testId===s);return f&&lt(f)}))return!1;let c=t.find(s=>s.testId===e);return c?!lt(c):!0}var fe=Se(()=>{"use strict";Y();ct();We()});var Yr=In((Ye,bt)=>{"use strict";(function(e,t){"use strict";var r="1.0.41",o="",n="?",c="function",s="undefined",f="object",d="string",g="major",i="model",l="name",a="type",u="vendor",p="version",_="architecture",x="console",w="mobile",b="tablet",C="smarttv",L="wearable",F="embedded",Q=500,ne="Amazon",X="Apple",$="ASUS",m="BlackBerry",h="Browser",S="Chrome",R="Edge",O="Firefox",z="Google",W="Honor",I="Huawei",B="Lenovo",G="LG",ke="Microsoft",oe="Motorola",ie="Nvidia",de="OnePlus",xe="Opera",It="OPPO",He="Samsung",wr="Sharp",ze="Sony",Ut="Xiaomi",Rt="Zebra",br="Facebook",hr="Chromium OS",yr="Mac OS",vr=" Browser",Cn=function(T,E){var k={};for(var U in T)E[U]&&E[U].length%2===0?k[U]=E[U].concat(T[U]):k[U]=T[U];return k},nt=function(T){for(var E={},k=0;k<T.length;k++)E[T[k].toUpperCase()]=T[k];return E},_r=function(T,E){return typeof T===d?qe(E).indexOf(qe(T))!==-1:!1},qe=function(T){return T.toLowerCase()},kn=function(T){return typeof T===d?T.replace(/[^\d\.]/g,o).split(".")[0]:t},Ot=function(T,E){if(typeof T===d)return T=T.replace(/^\s\s*/,o),typeof E===s?T:T.substring(0,Q)},je=function(T,E){for(var k=0,U,ae,K,A,y,Z;k<E.length&&!y;){var Vt=E[k],xr=E[k+1];for(U=ae=0;U<Vt.length&&!y&&Vt[U];)if(y=Vt[U++].exec(T),y)for(K=0;K<xr.length;K++)Z=y[++ae],A=xr[K],typeof A===f&&A.length>0?A.length===2?typeof A[1]==c?this[A[0]]=A[1].call(this,Z):this[A[0]]=A[1]:A.length===3?typeof A[1]===c&&!(A[1].exec&&A[1].test)?this[A[0]]=Z?A[1].call(this,Z,A[2]):t:this[A[0]]=Z?Z.replace(A[1],A[2]):t:A.length===4&&(this[A[0]]=Z?A[3].call(this,Z.replace(A[1],A[2])):t):this[A]=Z||t;k+=2}},Fe=function(T,E){for(var k in E)if(typeof E[k]===f&&E[k].length>0){for(var U=0;U<E[k].length;U++)if(_r(E[k][U],T))return k===n?t:k}else if(_r(E[k],T))return k===n?t:k;return E.hasOwnProperty("*")?E["*"]:T},xn={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Cr={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"},kr={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,p],[/opios[\/ ]+([\w\.]+)/i],[p,[l,xe+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[p,[l,xe+" GX"]],[/\bopr\/([\w\.]+)/i],[p,[l,xe]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[p,[l,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[p,[l,"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],[l,p],[/quark(?:pc)?\/([-\w\.]+)/i],[p,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[p,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[l,"UC"+h]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[p,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[p,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[p,[l,"Smart Lenovo "+h]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+h],p],[/\bfocus\/([\w\.]+)/i],[p,[l,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[l,xe+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[l,xe+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[l,"MIUI"+vr]],[/fxios\/([\w\.-]+)/i],[p,[l,O]],[/\bqihoobrowser\/?([\w\.]*)/i],[p,[l,"360"]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],p],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+vr],p],[/samsungbrowser\/([\w\.]+)/i],[p,[l,He+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[p,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[l,p],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[p,l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,br],p],[/(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],[l,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[p,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[l,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,S+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[l,"Android "+h]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[p,Fe,xn]],[/(webkit|khtml)\/([\w\.]+)/i],[l,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],p],[/(wolvic|librewolf)\/([\w\.]+)/i],[l,p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[l,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],[l,[p,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[p,/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,qe]],[/ 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],[[_,qe]]],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,[u,He],[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,[u,He],[a,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[i,[u,X],[a,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[i,[u,X],[a,b]],[/(macintosh);/i],[i,[u,X]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[i,[u,wr],[a,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[i,[u,W],[a,b]],[/honor([-\w ]+)[;\)]/i],[i,[u,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,[u,I],[a,b]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[i,[u,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," "],[u,Ut],[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," "],[u,Ut],[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,[u,It],[a,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[i,[u,Fe,{OnePlus:["304","403","203"],"*":It}],[a,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[i,[u,"Vivo"],[a,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[i,[u,"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,[u,oe],[a,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[i,[u,oe],[a,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[i,[u,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,[u,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,[u,B],[a,b]],[/(nokia) (t[12][01])/i],[u,i,[a,b]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[i,/_/g," "],[a,w],[u,"Nokia"]],[/(pixel (c|tablet))\b/i],[i,[u,z],[a,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[i,[u,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,[u,ze],[a,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[i,"Xperia Tablet"],[u,ze],[a,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[i,[u,de],[a,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[i,[u,ne],[a,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[i,/(.+)/g,"Fire Phone $1"],[u,ne],[a,w]],[/(playbook);[-\w\),; ]+(rim)/i],[i,u,[a,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[i,[u,m],[a,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[i,[u,$],[a,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[i,[u,$],[a,w]],[/(nexus 9)/i],[i,[u,"HTC"],[a,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[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,[u,"TCL"],[a,b]],[/(itel) ((\w+))/i],[[u,qe],i,[a,Fe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[i,[u,"Acer"],[a,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[i,[u,"Meizu"],[a,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[i,[u,"Ulefone"],[a,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[i,[u,"Energizer"],[a,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[i,[u,"Cat"],[a,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[i,[u,"Smartfren"],[a,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[i,[u,"Nothing"],[a,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[i,[u,"Archos"],[a,b]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[i,[u,"Archos"],[a,w]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[u,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],[u,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],[u,i,[a,b]],[/(surface duo)/i],[i,[u,ke],[a,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[i,[u,"Fairphone"],[a,w]],[/(u304aa)/i],[i,[u,"AT&T"],[a,w]],[/\bsie-(\w*)/i],[i,[u,"Siemens"],[a,w]],[/\b(rct\w+) b/i],[i,[u,"RCA"],[a,b]],[/\b(venue[\d ]{2,7}) b/i],[i,[u,"Dell"],[a,b]],[/\b(q(?:mv|ta)\w+) b/i],[i,[u,"Verizon"],[a,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[i,[u,"Barnes & Noble"],[a,b]],[/\b(tm\d{3}\w+) b/i],[i,[u,"NuVision"],[a,b]],[/\b(k88) b/i],[i,[u,"ZTE"],[a,b]],[/\b(nx\d{3}j) b/i],[i,[u,"ZTE"],[a,w]],[/\b(gen\d{3}) b.+49h/i],[i,[u,"Swiss"],[a,w]],[/\b(zur\d{3}) b/i],[i,[u,"Swiss"],[a,b]],[/\b((zeki)?tb.*\b) b/i],[i,[u,"Zeki"],[a,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],i,[a,b]],[/\b(ns-?\w{0,9}) b/i],[i,[u,"Insignia"],[a,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[i,[u,"NextBook"],[a,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],i,[a,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],i,[a,w]],[/\b(ph-1) /i],[i,[u,"Essential"],[a,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[i,[u,"Envizen"],[a,b]],[/\b(trio[-\w\. ]+) b/i],[i,[u,"MachSpeed"],[a,b]],[/\btu_(1491) b/i],[i,[u,"Rotor"],[a,b]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[i,[u,ie],[a,b]],[/(sprint) (\w+)/i],[u,i,[a,w]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[u,ke],[a,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[i,[u,Rt],[a,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[i,[u,Rt],[a,w]],[/smart-tv.+(samsung)/i],[u,[a,C]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[u,He],[a,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,G],[a,C]],[/(apple) ?tv/i],[u,[i,X+" TV"],[a,C]],[/crkey/i],[[i,S+"cast"],[u,z],[a,C]],[/droid.+aft(\w+)( bui|\))/i],[i,[u,ne],[a,C]],[/(shield \w+ tv)/i],[i,[u,ie],[a,C]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[i,[u,wr],[a,C]],[/(bravia[\w ]+)( bui|\))/i],[i,[u,ze],[a,C]],[/(mi(tv|box)-?\w+) bui/i],[i,[u,Ut],[a,C]],[/Hbbtv.*(technisat) (.*);/i],[u,i,[a,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[u,Ot],[i,Ot],[a,C]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[i,[a,C]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[a,C]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,i,[a,x]],[/droid.+; (shield)( bui|\))/i],[i,[u,ie],[a,x]],[/(playstation \w+)/i],[i,[u,ze],[a,x]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[i,[u,ke],[a,x]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[i,[u,He],[a,L]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[u,i,[a,L]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[i,[u,It],[a,L]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[i,[u,X],[a,L]],[/(opwwe\d{3})/i],[i,[u,de],[a,L]],[/(moto 360)/i],[i,[u,oe],[a,L]],[/(smartwatch 3)/i],[i,[u,ze],[a,L]],[/(g watch r)/i],[i,[u,G],[a,L]],[/droid.+; (wt63?0{2,3})\)/i],[i,[u,Rt],[a,L]],[/droid.+; (glass) \d/i],[i,[u,z],[a,L]],[/(pico) (4|neo3(?: link|pro)?)/i],[u,i,[a,L]],[/; (quest( \d| pro)?)/i],[i,[u,br],[a,L]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[a,F]],[/(aeobc)\b/i],[i,[u,ne],[a,F]],[/(homepod).+mac os/i],[i,[u,X],[a,F]],[/windows iot/i],[[a,F]],[/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,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[l,R+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[l,p],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[l,"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],[l,p],[/ladybird\//i],[[l,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,p],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[l,[p,Fe,Cr]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,Fe,Cr],[l,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,yr],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,l],[/(ubuntu) ([\w\.]+) like android/i],[[l,/(.+)/,"$1 Touch"],p],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[l,p],[/\(bb(10);/i],[p,[l,m]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[p,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[l,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[p,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[p,[l,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,hr],p],[/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],[l,p],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,p]]},j=function(T,E){if(typeof T===f&&(E=T,T=t),!(this instanceof j))return new j(T,E).getResult();var k=typeof e!==s&&e.navigator?e.navigator:t,U=T||(k&&k.userAgent?k.userAgent:o),ae=k&&k.userAgentData?k.userAgentData:t,K=E?Cn(kr,E):kr,A=k&&k.userAgent==U;return this.getBrowser=function(){var y={};return y[l]=t,y[p]=t,je.call(y,U,K.browser),y[g]=kn(y[p]),A&&k&&k.brave&&typeof k.brave.isBrave==c&&(y[l]="Brave"),y},this.getCPU=function(){var y={};return y[_]=t,je.call(y,U,K.cpu),y},this.getDevice=function(){var y={};return y[u]=t,y[i]=t,y[a]=t,je.call(y,U,K.device),A&&!y[a]&&ae&&ae.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[l]=t,y[p]=t,je.call(y,U,K.engine),y},this.getOS=function(){var y={};return y[l]=t,y[p]=t,je.call(y,U,K.os),A&&!y[l]&&ae&&ae.platform&&ae.platform!="Unknown"&&(y[l]=ae.platform.replace(/chrome os/i,hr).replace(/macos/i,yr)),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===d&&y.length>Q?Ot(y,Q):y,this},this.setUA(U),this};j.VERSION=r,j.BROWSER=nt([l,p,g]),j.CPU=nt([_]),j.DEVICE=nt([i,u,a,x,w,C,b,L,F]),j.ENGINE=j.OS=nt([l,p]),typeof Ye!==s?(typeof bt!==s&&bt.exports&&(Ye=bt.exports=j),Ye.UAParser=j):typeof define===c&&define.amd?define(function(){return j}):typeof e!==s&&(e.UAParser=j);var Ae=typeof e!==s&&(e.jQuery||e.Zepto);if(Ae&&!Ae.ua){var ot=new j;Ae.ua=ot.getResult(),Ae.ua.get=function(){return ot.getUA()},Ae.ua.set=function(T){ot.setUA(T);var E=ot.getResult();for(var k in E)Ae.ua[k]=E[k]}}})(typeof window=="object"?window:Ye)});var Ke,sr=Se(()=>{"use strict";Ke=`#graphql
1
+ "use strict";var Tn=Object.create;var it=Object.defineProperty;var Pn=Object.getOwnPropertyDescriptor;var En=Object.getOwnPropertyNames;var An=Object.getPrototypeOf,Sn=Object.prototype.hasOwnProperty;var Se=(e,t)=>()=>(e&&(t=e(e=0)),t);var In=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tr=(e,t)=>{for(var r in t)it(e,r,{get:t[r],enumerable:!0})},Pr=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of En(t))!Sn.call(e,n)&&n!==r&&it(e,n,{get:()=>t[n],enumerable:!(o=Pn(t,n))||o.enumerable});return e};var at=(e,t,r)=>(r=e!=null?Tn(An(e)):{},Pr(t||!e||!e.__esModule?it(r,"default",{value:e,enumerable:!0}):r,e)),Un=e=>Pr(it({},"__esModule",{value:!0}),e);function st(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 Er(e){let t=[];for(let[r,o]of Object.entries(e.allTests)){if(!o.data.isLive)continue;let n=[],c=0;for(let[s,p]of Object.entries(o)){if(s==="data")continue;let d=p;if(typeof d=="object"&&d!==null&&"variationName"in d){let g=!!d.isControl,i=d.content,l;i&&typeof i=="object"&&(l={changes:i.changes||[],elements:i.elements||[],blocks:i.blocks||[],customCodes:i.customCodes||[]});let a=d.customCode,u;a&&typeof a=="object"&&a.id&&(u={id:a.id,js:a.js,css:a.css,pathnames:a.pathnames||[],excludePathnames:a.excludePathnames}),n.push({id:s,name:d.variationName,weight:d.trafficPercentage,isControl:g,productId:d.id,handle:d.handle,price:d.price,prices:d.prices,splitUrlTestLinks:d.splitUrlTestLinks,content:l,customCode:u,isA:!g&&c===0,isB:!g&&c===1,isC:!g&&c===2,isD:!g&&c===3}),g||c++}}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 ct=Se(()=>{"use strict"});function le(){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 H(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 Ar(e){typeof document>"u"||(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}function se(e,t){typeof sessionStorage>"u"||sessionStorage.setItem(e,JSON.stringify(t))}function ee(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}function $e(e){let t=ee(e);return t?JSON.parse(t):null}function Lt(){let e=V("eabUserId");return e||(e=le(),H("eabUserId",e)),e}function ce(){return Lt()}function Bt(){let e=ee("eabSessionId");return e||(e=le(),se("eabSessionId",e)),e}function Te(){return Bt()}function ut(e,t){if(typeof sessionStorage>"u")return;let r=ee("eabReferrer"),o=ee("eabEntry");r||se("eabReferrer",e),o||se("eabEntry",t)}function Ie(){return{referrer:ee("eabReferrer")||"",entryPage:ee("eabEntry")||""}}var Y=Se(()=>{"use strict"});function Rn(e){let t={},r={};if(!e)return{assignments:t,views:r};let o=e.split("~");for(let n of o){let c=n.split("_");if(c.length>=2){let s=c[0],p=c[1],d=c[2]==="1";t[s]=p,r[s]=d}}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")||V("eabUserPreview"))==="true",o=e.get("abtid");o||(o=ee("eabPreviewTestId"));let n=e.get("eab_tests")||"",{assignments:c,views:s}=Rn(n);return e.has("eabUserPreview")&&H("eabUserPreview","true"),e.has("abtid")&&o&&se("eabPreviewTestId",o),{isPreview:r,previewTestId:o,forcedAssignments:c,previewedViews:s}}function Sr(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 dt(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 Dt(e,t){return Object.entries(e).map(([r,o])=>{let n=r.slice(-5),c=t[r]?"1":"0";return`${n}_${o}_${c}`}).join("~")}function Ir(e,t,r){if(typeof window>"u")return;let o=new URL(window.location.href),n=Dt(e,t);n&&o.searchParams.set("eab_tests",n),r&&o.searchParams.set("eabUserId",r),window.history.replaceState({},"",o.toString())}function Ur(){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 Rr(){return fe().isPreview}var We=Se(()=>{"use strict";Y()});function ue(){return N("ABTL")||{}}function Nt(e){H("ABTL",JSON.stringify(e))}function J(e){return ue()[e]||null}function Vr(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 On(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 l=0;l<e.length;l++)n+=i,o.push(n)}let s=st(t)%1e4/100,p=0;for(let i=0;i<o.length;i++)if(s<o[i]){p=i;break}let d=e[p]||e[0],g=Vr(e,p);return{...d,isA:g===0,isB:g===1,isC:g===2,isD:g===3}}function Or(e,t){let r=t.findIndex(n=>n.id===e.id),o=Vr(t,r);return{...e,isA:o===0,isB:o===1,isC:o===2,isD:o===3}}function Mt(e,t,r,o){if(o?.isPreview){let g=dt(e,o);if(g){let i=t.variations.find(l=>l.id===g);if(i)return Or(i,t.variations)}}let n=J(e);if(n){let g=t.variations.find(i=>i.id===n);if(g)return Or(g,t.variations)}let c=t.variations.filter(g=>!g.isDone);if(c.length===0)return null;let s=t.isPersonalization,p;s?p=c.find(i=>!i.isControl)||c[0]:p=On(c,r);let d=ue();return d[e]=p.id,Nt(d),p}function lt(e){return typeof e.testTrafficPercentage=="number"}function Ht(e,t){try{let r=ue(),o=Object.keys(r);if(r[e]||o.length===0)return!0;if(o.some(s=>{let p=t.find(d=>d.testId===s);return p&&lt(p)}))return!1;let c=t.find(s=>s.testId===e);return c?!lt(c):!0}catch(r){return console.error("[ElevateAB] Error in canAssignToTest:",r),!0}}function Lr(e,t){let r=e.testTrafficPercentage;return typeof r!="number"||J(e.testId)?!0:t&&!Ht(e.testId,t)?!1:Math.random()*100<r}function ft(e,t){let r=ce(),o=e.tests,n=ue();for(let c of o){if(!c.enabled||n[c.testId]||!Vn(c.testId,o,n))continue;let s=c.testTrafficPercentage;!t?.isPreview&&typeof s=="number"&&Math.random()*100>=s||(Mt(c.testId,c,r,t??void 0),n=ue())}}function Vn(e,t,r){let o=Object.keys(r);if(o.length===0)return!0;if(o.some(s=>{let p=t.find(d=>d.testId===s);return p&&lt(p)}))return!1;let c=t.find(s=>s.testId===e);return c?!lt(c):!0}var pe=Se(()=>{"use strict";Y();ct();We()});var Yr=In((Ye,bt)=>{"use strict";(function(e,t){"use strict";var r="1.0.41",o="",n="?",c="function",s="undefined",p="object",d="string",g="major",i="model",l="name",a="type",u="vendor",f="version",_="architecture",x="console",w="mobile",b="tablet",C="smarttv",L="wearable",F="embedded",Q=500,ne="Amazon",X="Apple",$="ASUS",m="BlackBerry",h="Browser",S="Chrome",R="Edge",O="Firefox",z="Google",W="Honor",I="Huawei",B="Lenovo",G="LG",ke="Microsoft",oe="Motorola",ie="Nvidia",de="OnePlus",xe="Opera",It="OPPO",He="Samsung",wr="Sharp",ze="Sony",Ut="Xiaomi",Rt="Zebra",br="Facebook",hr="Chromium OS",yr="Mac OS",vr=" Browser",Cn=function(T,E){var k={};for(var U in T)E[U]&&E[U].length%2===0?k[U]=E[U].concat(T[U]):k[U]=T[U];return k},nt=function(T){for(var E={},k=0;k<T.length;k++)E[T[k].toUpperCase()]=T[k];return E},_r=function(T,E){return typeof T===d?qe(E).indexOf(qe(T))!==-1:!1},qe=function(T){return T.toLowerCase()},kn=function(T){return typeof T===d?T.replace(/[^\d\.]/g,o).split(".")[0]:t},Ot=function(T,E){if(typeof T===d)return T=T.replace(/^\s\s*/,o),typeof E===s?T:T.substring(0,Q)},je=function(T,E){for(var k=0,U,ae,K,A,y,Z;k<E.length&&!y;){var Vt=E[k],xr=E[k+1];for(U=ae=0;U<Vt.length&&!y&&Vt[U];)if(y=Vt[U++].exec(T),y)for(K=0;K<xr.length;K++)Z=y[++ae],A=xr[K],typeof A===p&&A.length>0?A.length===2?typeof A[1]==c?this[A[0]]=A[1].call(this,Z):this[A[0]]=A[1]:A.length===3?typeof A[1]===c&&!(A[1].exec&&A[1].test)?this[A[0]]=Z?A[1].call(this,Z,A[2]):t:this[A[0]]=Z?Z.replace(A[1],A[2]):t:A.length===4&&(this[A[0]]=Z?A[3].call(this,Z.replace(A[1],A[2])):t):this[A]=Z||t;k+=2}},Fe=function(T,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(_r(E[k][U],T))return k===n?t:k}else if(_r(E[k],T))return k===n?t:k;return E.hasOwnProperty("*")?E["*"]:T},xn={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Cr={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"},kr={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,f],[/opios[\/ ]+([\w\.]+)/i],[f,[l,xe+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[l,xe+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[l,xe]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[l,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[l,"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],[l,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[l,"UC"+h]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[l,"Smart Lenovo "+h]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+h],f],[/\bfocus\/([\w\.]+)/i],[f,[l,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[l,xe+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[l,xe+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI"+vr]],[/fxios\/([\w\.-]+)/i],[f,[l,O]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[l,"360"]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+vr],f],[/samsungbrowser\/([\w\.]+)/i],[f,[l,He+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[l,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,br],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],[l,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[l,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,S+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[l,"Android "+h]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[f,Fe,xn]],[/(webkit|khtml)\/([\w\.]+)/i],[l,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[l,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[l,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],[l,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[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,qe]],[/ 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],[[_,qe]]],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,[u,He],[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,[u,He],[a,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[i,[u,X],[a,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[i,[u,X],[a,b]],[/(macintosh);/i],[i,[u,X]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[i,[u,wr],[a,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[i,[u,W],[a,b]],[/honor([-\w ]+)[;\)]/i],[i,[u,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,[u,I],[a,b]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[i,[u,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," "],[u,Ut],[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," "],[u,Ut],[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,[u,It],[a,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[i,[u,Fe,{OnePlus:["304","403","203"],"*":It}],[a,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[i,[u,"Vivo"],[a,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[i,[u,"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,[u,oe],[a,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[i,[u,oe],[a,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[i,[u,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,[u,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,[u,B],[a,b]],[/(nokia) (t[12][01])/i],[u,i,[a,b]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[i,/_/g," "],[a,w],[u,"Nokia"]],[/(pixel (c|tablet))\b/i],[i,[u,z],[a,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[i,[u,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,[u,ze],[a,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[i,"Xperia Tablet"],[u,ze],[a,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[i,[u,de],[a,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[i,[u,ne],[a,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[i,/(.+)/g,"Fire Phone $1"],[u,ne],[a,w]],[/(playbook);[-\w\),; ]+(rim)/i],[i,u,[a,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[i,[u,m],[a,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[i,[u,$],[a,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[i,[u,$],[a,w]],[/(nexus 9)/i],[i,[u,"HTC"],[a,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[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,[u,"TCL"],[a,b]],[/(itel) ((\w+))/i],[[u,qe],i,[a,Fe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[i,[u,"Acer"],[a,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[i,[u,"Meizu"],[a,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[i,[u,"Ulefone"],[a,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[i,[u,"Energizer"],[a,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[i,[u,"Cat"],[a,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[i,[u,"Smartfren"],[a,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[i,[u,"Nothing"],[a,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[i,[u,"Archos"],[a,b]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[i,[u,"Archos"],[a,w]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[u,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],[u,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],[u,i,[a,b]],[/(surface duo)/i],[i,[u,ke],[a,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[i,[u,"Fairphone"],[a,w]],[/(u304aa)/i],[i,[u,"AT&T"],[a,w]],[/\bsie-(\w*)/i],[i,[u,"Siemens"],[a,w]],[/\b(rct\w+) b/i],[i,[u,"RCA"],[a,b]],[/\b(venue[\d ]{2,7}) b/i],[i,[u,"Dell"],[a,b]],[/\b(q(?:mv|ta)\w+) b/i],[i,[u,"Verizon"],[a,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[i,[u,"Barnes & Noble"],[a,b]],[/\b(tm\d{3}\w+) b/i],[i,[u,"NuVision"],[a,b]],[/\b(k88) b/i],[i,[u,"ZTE"],[a,b]],[/\b(nx\d{3}j) b/i],[i,[u,"ZTE"],[a,w]],[/\b(gen\d{3}) b.+49h/i],[i,[u,"Swiss"],[a,w]],[/\b(zur\d{3}) b/i],[i,[u,"Swiss"],[a,b]],[/\b((zeki)?tb.*\b) b/i],[i,[u,"Zeki"],[a,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],i,[a,b]],[/\b(ns-?\w{0,9}) b/i],[i,[u,"Insignia"],[a,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[i,[u,"NextBook"],[a,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],i,[a,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],i,[a,w]],[/\b(ph-1) /i],[i,[u,"Essential"],[a,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[i,[u,"Envizen"],[a,b]],[/\b(trio[-\w\. ]+) b/i],[i,[u,"MachSpeed"],[a,b]],[/\btu_(1491) b/i],[i,[u,"Rotor"],[a,b]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[i,[u,ie],[a,b]],[/(sprint) (\w+)/i],[u,i,[a,w]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[u,ke],[a,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[i,[u,Rt],[a,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[i,[u,Rt],[a,w]],[/smart-tv.+(samsung)/i],[u,[a,C]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[u,He],[a,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,G],[a,C]],[/(apple) ?tv/i],[u,[i,X+" TV"],[a,C]],[/crkey/i],[[i,S+"cast"],[u,z],[a,C]],[/droid.+aft(\w+)( bui|\))/i],[i,[u,ne],[a,C]],[/(shield \w+ tv)/i],[i,[u,ie],[a,C]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[i,[u,wr],[a,C]],[/(bravia[\w ]+)( bui|\))/i],[i,[u,ze],[a,C]],[/(mi(tv|box)-?\w+) bui/i],[i,[u,Ut],[a,C]],[/Hbbtv.*(technisat) (.*);/i],[u,i,[a,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[u,Ot],[i,Ot],[a,C]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[i,[a,C]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[a,C]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,i,[a,x]],[/droid.+; (shield)( bui|\))/i],[i,[u,ie],[a,x]],[/(playstation \w+)/i],[i,[u,ze],[a,x]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[i,[u,ke],[a,x]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[i,[u,He],[a,L]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[u,i,[a,L]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[i,[u,It],[a,L]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[i,[u,X],[a,L]],[/(opwwe\d{3})/i],[i,[u,de],[a,L]],[/(moto 360)/i],[i,[u,oe],[a,L]],[/(smartwatch 3)/i],[i,[u,ze],[a,L]],[/(g watch r)/i],[i,[u,G],[a,L]],[/droid.+; (wt63?0{2,3})\)/i],[i,[u,Rt],[a,L]],[/droid.+; (glass) \d/i],[i,[u,z],[a,L]],[/(pico) (4|neo3(?: link|pro)?)/i],[u,i,[a,L]],[/; (quest( \d| pro)?)/i],[i,[u,br],[a,L]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[a,F]],[/(aeobc)\b/i],[i,[u,ne],[a,F]],[/(homepod).+mac os/i],[i,[u,X],[a,F]],[/windows iot/i],[[a,F]],[/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,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[l,R+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[l,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"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],[l,f],[/ladybird\//i],[[l,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,f],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[l,[f,Fe,Cr]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,Fe,Cr],[l,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,yr],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,l],[/(ubuntu) ([\w\.]+) like android/i],[[l,/(.+)/,"$1 Touch"],f],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[l,f],[/\(bb(10);/i],[f,[l,m]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[f,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[l,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[l,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,hr],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],[l,f],[/(sunos) ?([\w\.\d]*)/i],[[l,"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],[l,f]]},j=function(T,E){if(typeof T===p&&(E=T,T=t),!(this instanceof j))return new j(T,E).getResult();var k=typeof e!==s&&e.navigator?e.navigator:t,U=T||(k&&k.userAgent?k.userAgent:o),ae=k&&k.userAgentData?k.userAgentData:t,K=E?Cn(kr,E):kr,A=k&&k.userAgent==U;return this.getBrowser=function(){var y={};return y[l]=t,y[f]=t,je.call(y,U,K.browser),y[g]=kn(y[f]),A&&k&&k.brave&&typeof k.brave.isBrave==c&&(y[l]="Brave"),y},this.getCPU=function(){var y={};return y[_]=t,je.call(y,U,K.cpu),y},this.getDevice=function(){var y={};return y[u]=t,y[i]=t,y[a]=t,je.call(y,U,K.device),A&&!y[a]&&ae&&ae.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[l]=t,y[f]=t,je.call(y,U,K.engine),y},this.getOS=function(){var y={};return y[l]=t,y[f]=t,je.call(y,U,K.os),A&&!y[l]&&ae&&ae.platform&&ae.platform!="Unknown"&&(y[l]=ae.platform.replace(/chrome os/i,hr).replace(/macos/i,yr)),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===d&&y.length>Q?Ot(y,Q):y,this},this.setUA(U),this};j.VERSION=r,j.BROWSER=nt([l,f,g]),j.CPU=nt([_]),j.DEVICE=nt([i,u,a,x,w,C,b,L,F]),j.ENGINE=j.OS=nt([l,f]),typeof Ye!==s?(typeof bt!==s&&bt.exports&&(Ye=bt.exports=j),Ye.UAParser=j):typeof define===c&&define.amd?define(function(){return j}):typeof e!==s&&(e.UAParser=j);var Ae=typeof e!==s&&(e.jQuery||e.Zepto);if(Ae&&!Ae.ua){var ot=new j;Ae.ua=ot.getResult(),Ae.ua.get=function(){return ot.getUA()},Ae.ua.set=function(T){ot.setUA(T);var E=ot.getResult();for(var k in E)Ae.ua[k]=E[k]}}})(typeof window=="object"?window:Ye)});var Ke,sr=Se(()=>{"use strict";Ke=`#graphql
2
2
  mutation cartAttributesUpdate($cartId: ID!, $attributes: [AttributeInput!]!) {
3
3
  cartAttributesUpdate(cartId: $cartId, attributes: $attributes) {
4
4
  cart {
@@ -14,7 +14,7 @@
14
14
  }
15
15
  }
16
16
  }
17
- `});var cn={};Tr(cn,{cleanupCartAttributes:()=>cr,getCartAttributesPayload:()=>xt,updateCartAttributes:()=>Ze});function xt(){let e=ue(),t=N("ABAU")||{},r=V("eabUserId"),o=V("eabUserPreview")==="true",n=V("abtid"),c={};for(let f in e)t[f]&&(c[f]=e[f]);let s=[{key:"_eabTestsList",value:JSON.stringify(c)},{key:"_eabUserId",value:r||""},{key:"_eabList",value:JSON.stringify(e)}];return o&&n&&s.push({key:"_eabPreviewTest",value:n}),s}async function Ze(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=xt(),o=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,n=t.storefrontApiUrl||`https://${sn()}/api/2025-01/graphql.json`,c=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:Ke,variables:{cartId:o,attributes:r}})});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let s=await c.json();if(s.errors||s.data?.cartAttributesUpdate?.userErrors?.length>0){let f=s.errors?.[0]?.message||s.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes update failed:",f),{success:!1,error:f}}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 cr(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://${sn()}/api/2025-01/graphql.json`,c=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:Ke,variables:{cartId:r,attributes:o}})});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let s=await c.json();if(s.errors||s.data?.cartAttributesUpdate?.userErrors?.length>0){let f=s.errors?.[0]?.message||s.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes cleanup failed:",f),{success:!1,error:f}}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 sn(){return typeof window>"u"?"":window.location.hostname}var Tt=Se(()=>{"use strict";fe();Y();sr()});var wo={};Tr(wo,{CART_ATTRIBUTES_UPDATE_MUTATION:()=>Ke,COUNTRIES:()=>jr,ElevateAnalytics:()=>_n,ElevateProvider:()=>vn,REGIONS:()=>Fr,VERSION:()=>go,applyContentChanges:()=>nr,applyContentElements:()=>or,applyCustomCode:()=>Qe,assignAllTests:()=>pt,assignAndPersistVariant:()=>Mt,buildEabTestsParam:()=>Dt,canAssignToTest:()=>Ht,checkFacebookBrowser:()=>jt,checkFacebookInstagramBrowser:()=>Xr,checkInstagramBrowser:()=>Ft,checkPinterestBrowser:()=>Wt,checkTikTokBrowser:()=>$t,checkVisitorIdParams:()=>Kr,cleanCartToken:()=>Ve,cleanupCartAttributes:()=>cr,cleanupContentTests:()=>ar,clearPreviewMode:()=>Ur,contentHandler:()=>rt,deleteCookie:()=>Ar,detectShopifyCurrency:()=>tn,extractCartToken:()=>Oe,extractProductId:()=>te,extractProductVariantId:()=>we,extractShopifyId:()=>q,extractShopifyType:()=>Zr,getAllHandlers:()=>lr,getAssignedVariant:()=>J,getCartAttributesPayload:()=>xt,getCookie:()=>V,getCountryCode:()=>ge,getDeviceType:()=>Nr,getGeoLocation:()=>Hr,getHandler:()=>tt,getJsonCookie:()=>N,getJsonSessionItem:()=>$e,getPageTypeFromPathname:()=>Be,getPreviewState:()=>pe,getPreviewVariation:()=>dt,getReferrerData:()=>Ie,getSessionId:()=>Te,getSessionItem:()=>ee,getSplitUrlBlockingScript:()=>wt,getTestList:()=>ue,getTrafficSource:()=>Mr,getUserAgentNoBrowser:()=>De,getVisitorId:()=>ce,hasContentTests:()=>Me,hasHandler:()=>pr,hasSessionView:()=>Br,hasUniqueView:()=>Dr,hashString:()=>st,initAnalytics:()=>Pt,initializeSessionId:()=>Bt,initializeVisitorId:()=>Lt,isCountryExcluded:()=>Yt,isCountryIncluded:()=>Jt,isInPreviewMode:()=>Rr,isPreviewTest:()=>Sr,isShopifyGid:()=>en,matchesGeoTargeting:()=>qr,matchesWildcardPattern:()=>re,parseAddViewData:()=>Le,processContentTests:()=>Xe,processSplitUrlTests:()=>Re,registerHandler:()=>ve,reprocessContentTests:()=>Ct,restoreOriginalElements:()=>ir,roundToTwo:()=>v,sanitizeString:()=>P,saveTestList:()=>Nt,setCookie:()=>M,setCountryCode:()=>Gt,setGeoLocation:()=>zr,setReferrerData:()=>ut,setSessionItem:()=>se,setupContentTestListeners:()=>kt,shouldShowTest:()=>Lr,trackAddToCart:()=>dn,trackCartView:()=>pn,trackCheckoutCompleted:()=>gn,trackCheckoutStarted:()=>mn,trackPageView:()=>ur,trackProductView:()=>un,trackRemoveFromCart:()=>ln,trackSearchSubmitted:()=>fn,trackSessionView:()=>qt,trackUniqueView:()=>zt,trackViews:()=>ft,updateCartAttributes:()=>Ze,updateUrlWithTestParams:()=>Ir,useElevateConfig:()=>Et,useExperiment:()=>bn,usePageViewTracking:()=>wn,uuidv4:()=>le});module.exports=Un(wo);ct();Y();fe();Y();function zt(e){let t=N("ABAU")||{};t[e]||(t[e]=!0,M("ABAU",JSON.stringify(t)))}function qt(e){let t=$e("ABAV")||{};t[e]||(t[e]=!0,se("ABAV",t))}function ft(e){zt(e),qt(e)}function Br(e){return!!($e("ABAV")||{})[e]}function Dr(e){return!!(N("ABAU")||{})[e]}function Nr(){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 jt(){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 Ft(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function $t(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/musical_ly/i.test(e)}function Wt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(pinterest)[\/ ]([-\w\.]+)/i.test(e)}function Mr(){if(typeof window>"u")return"direct";let e=(document.referrer||"").toLowerCase(),t=e?new URL(e).hostname.replace("www.",""):"",r=window.location.hostname,o=jt(),n=Ft(),c=$t(),s=Wt();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":c||["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"}We();Y();var me={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function ge(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return M(me.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let r=V(me.SHOPIFY_LOCALIZATION);if(r)return r.toUpperCase();let o=V(me.EAB_COUNTRY);if(o)return o.toUpperCase();if(typeof localStorage<"u"){let n=localStorage.getItem(me.EAB_COUNTRY);if(n)return n.toUpperCase()}return null}function Hr(){let e=ge(),t=V(me.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 Gt(e){let t=e.toUpperCase();M(me.EAB_COUNTRY,t),typeof localStorage<"u"&&localStorage.setItem(me.EAB_COUNTRY,t)}function zr(e){e.country&&Gt(e.country),M(me.EAB_GEO,JSON.stringify(e))}function Jt(e,t){let r=t??ge();return r?e.map(n=>n.toUpperCase()).includes(r.toUpperCase()):!1}function Yt(e,t){let r=t??ge();return r?e.map(n=>n.toUpperCase()).includes(r.toUpperCase()):!1}function qr(e){let t=ge();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&Yt(e.excludeCountries,t)?!1:e.includeCountries?.length?Jt(e.includeCountries,t):!0}var jr={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"]};fe();Y();var mt="eab:navigate",gt=!1,Qt=0,Ge=null,Je=null;function Ln(){typeof window>"u"||(Qt++,!gt&&(gt=!0,Ge=history.pushState.bind(history),Je=history.replaceState.bind(history),history.pushState=function(...e){Ge(...e),window.dispatchEvent(new Event(mt))},history.replaceState=function(...e){Je(...e),window.dispatchEvent(new Event(mt))}))}function Bn(){typeof window>"u"||(Qt--,!(Qt>0||!gt)&&(Ge&&(history.pushState=Ge,Ge=null),Je&&(history.replaceState=Je,Je=null),gt=!1))}function Ue(e){if(typeof window>"u")return()=>{};let t=window.location.href,r=()=>{let o=window.location.href;o!==t&&(t=o,e())};return Ln(),window.addEventListener(mt,r),window.addEventListener("popstate",r),()=>{window.removeEventListener(mt,r),window.removeEventListener("popstate",r),Bn()}}function wt(e){let{configUrl:t,timeout:r=2e3}=e;return`(function(){
17
+ `});var cn={};Tr(cn,{cleanupCartAttributes:()=>cr,getCartAttributesPayload:()=>xt,updateCartAttributes:()=>Ze});function xt(){let e=ue(),t=N("ABAU")||{},r=V("eabUserId"),o=V("eabUserPreview")==="true",n=V("abtid"),c={};for(let p in e)t[p]&&(c[p]=e[p]);let s=[{key:"_eabTestsList",value:JSON.stringify(c)},{key:"_eabUserId",value:r||""},{key:"_eabList",value:JSON.stringify(e)}];return o&&n&&s.push({key:"_eabPreviewTest",value:n}),s}async function Ze(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=xt(),o=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,n=t.storefrontApiUrl||`https://${sn()}/api/2025-01/graphql.json`,c=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:Ke,variables:{cartId:o,attributes:r}})});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let s=await c.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 cr(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://${sn()}/api/2025-01/graphql.json`,c=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:Ke,variables:{cartId:r,attributes:o}})});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let s=await c.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 sn(){return typeof window>"u"?"":window.location.hostname}var Tt=Se(()=>{"use strict";pe();Y();sr()});var bo={};Tr(bo,{CART_ATTRIBUTES_UPDATE_MUTATION:()=>Ke,COUNTRIES:()=>jr,ElevateAnalytics:()=>_n,ElevateProvider:()=>vn,REGIONS:()=>Fr,VERSION:()=>wo,applyContentChanges:()=>nr,applyContentElements:()=>or,applyCustomCode:()=>Qe,assignAllTests:()=>ft,assignAndPersistVariant:()=>Mt,buildEabTestsParam:()=>Dt,canAssignToTest:()=>Ht,checkFacebookBrowser:()=>jt,checkFacebookInstagramBrowser:()=>Xr,checkInstagramBrowser:()=>Ft,checkPinterestBrowser:()=>Wt,checkTikTokBrowser:()=>$t,checkVisitorIdParams:()=>Kr,cleanCartToken:()=>Ve,cleanupCartAttributes:()=>cr,cleanupContentTests:()=>ar,clearPreviewMode:()=>Ur,contentHandler:()=>rt,deleteCookie:()=>Ar,detectShopifyCurrency:()=>tn,extractCartToken:()=>Oe,extractProductId:()=>te,extractProductVariantId:()=>we,extractShopifyId:()=>q,extractShopifyType:()=>Zr,getAllHandlers:()=>lr,getAssignedVariant:()=>J,getCartAttributesPayload:()=>xt,getCookie:()=>V,getCountryCode:()=>ge,getDeviceType:()=>Nr,getGeoLocation:()=>Hr,getHandler:()=>tt,getJsonCookie:()=>N,getJsonSessionItem:()=>$e,getPageTypeFromPathname:()=>Be,getPreviewState:()=>fe,getPreviewVariation:()=>dt,getReferrerData:()=>Ie,getSessionId:()=>Te,getSessionItem:()=>ee,getSplitUrlBlockingScript:()=>wt,getTestList:()=>ue,getTrafficSource:()=>Mr,getUserAgentNoBrowser:()=>De,getVisitorId:()=>ce,hasContentTests:()=>Me,hasHandler:()=>fr,hasSessionView:()=>Br,hasUniqueView:()=>Dr,hashString:()=>st,initAnalytics:()=>Pt,initializeSessionId:()=>Bt,initializeVisitorId:()=>Lt,isCountryExcluded:()=>Yt,isCountryIncluded:()=>Jt,isInPreviewMode:()=>Rr,isPreviewTest:()=>Sr,isShopifyGid:()=>en,matchesGeoTargeting:()=>qr,matchesWildcardPattern:()=>re,parseAddViewData:()=>Le,processContentTests:()=>Xe,processSplitUrlTests:()=>Re,registerHandler:()=>ve,reprocessContentTests:()=>Ct,restoreOriginalElements:()=>ir,roundToTwo:()=>v,sanitizeString:()=>P,saveTestList:()=>Nt,setCookie:()=>H,setCountryCode:()=>Gt,setGeoLocation:()=>zr,setReferrerData:()=>ut,setSessionItem:()=>se,setupContentTestListeners:()=>kt,shouldShowTest:()=>Lr,trackAddToCart:()=>dn,trackCartView:()=>fn,trackCheckoutCompleted:()=>gn,trackCheckoutStarted:()=>mn,trackPageView:()=>ur,trackProductView:()=>un,trackRemoveFromCart:()=>ln,trackSearchSubmitted:()=>pn,trackSessionView:()=>qt,trackUniqueView:()=>zt,trackViews:()=>pt,updateCartAttributes:()=>Ze,updateUrlWithTestParams:()=>Ir,useElevateConfig:()=>Et,useExperiment:()=>bn,usePageViewTracking:()=>wn,uuidv4:()=>le});module.exports=Un(bo);ct();Y();pe();Y();function zt(e){let t=N("ABAU")||{};t[e]||(t[e]=!0,H("ABAU",JSON.stringify(t)))}function qt(e){let t=$e("ABAV")||{};t[e]||(t[e]=!0,se("ABAV",t))}function pt(e){zt(e),qt(e)}function Br(e){return!!($e("ABAV")||{})[e]}function Dr(e){return!!(N("ABAU")||{})[e]}function Nr(){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 jt(){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 Ft(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function $t(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/musical_ly/i.test(e)}function Wt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(pinterest)[\/ ]([-\w\.]+)/i.test(e)}function Mr(){if(typeof window>"u")return"direct";let e=(document.referrer||"").toLowerCase(),t=e?new URL(e).hostname.replace("www.",""):"",r=window.location.hostname,o=jt(),n=Ft(),c=$t(),s=Wt();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":c||["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"}We();Y();var me={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function ge(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return H(me.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let r=V(me.SHOPIFY_LOCALIZATION);if(r)return r.toUpperCase();let o=V(me.EAB_COUNTRY);if(o)return o.toUpperCase();if(typeof localStorage<"u"){let n=localStorage.getItem(me.EAB_COUNTRY);if(n)return n.toUpperCase()}return null}function Hr(){let e=ge(),t=V(me.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 Gt(e){let t=e.toUpperCase();H(me.EAB_COUNTRY,t),typeof localStorage<"u"&&localStorage.setItem(me.EAB_COUNTRY,t)}function zr(e){e.country&&Gt(e.country),H(me.EAB_GEO,JSON.stringify(e))}function Jt(e,t){let r=t??ge();return r?e.map(n=>n.toUpperCase()).includes(r.toUpperCase()):!1}function Yt(e,t){let r=t??ge();return r?e.map(n=>n.toUpperCase()).includes(r.toUpperCase()):!1}function qr(e){let t=ge();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&Yt(e.excludeCountries,t)?!1:e.includeCountries?.length?Jt(e.includeCountries,t):!0}var jr={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"]};pe();Y();var mt="eab:navigate",gt=!1,Qt=0,Ge=null,Je=null;function Ln(){typeof window>"u"||(Qt++,!gt&&(gt=!0,Ge=history.pushState.bind(history),Je=history.replaceState.bind(history),history.pushState=function(...e){Ge(...e),window.dispatchEvent(new Event(mt))},history.replaceState=function(...e){Je(...e),window.dispatchEvent(new Event(mt))}))}function Bn(){typeof window>"u"||(Qt--,!(Qt>0||!gt)&&(Ge&&(history.pushState=Ge,Ge=null),Je&&(history.replaceState=Je,Je=null),gt=!1))}function Ue(e){if(typeof window>"u")return()=>{};let t=window.location.href,r=()=>{let o=window.location.href;o!==t&&(t=o,e())};return Ln(),window.addEventListener(mt,r),window.addEventListener("popstate",r),()=>{window.removeEventListener(mt,r),window.removeEventListener("popstate",r),Bn()}}function wt(e){let{configUrl:t,timeout:r=2e3}=e;return`(function(){
18
18
  if(new URLSearchParams(location.search).get('abtr')==='true')return;
19
19
 
20
20
  var style=document.createElement('style');
@@ -42,5 +42,5 @@
42
42
  if(window.__eab_reveal)window.__eab_reveal();
43
43
  };
44
44
  document.head.appendChild(script);
45
- })();`}function $r(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 Xt(e,t){let r=$r(e.split("?")[0]);for(let o of t){let n=$r(o.split("?")[0]);if(r===n)return!0;try{let c=new URL(e).pathname,s=new URL(o,e).pathname;if(c===s)return!0}catch{}}return!1}function Dn(e){return e.data?.redirectBehavior||"redirectAll"}function Wr(e){return!!(N("eabRedirectedTests")||{})[e]}function Gr(e){let t=N("eabRedirectedTests")||{};t[e]=!0,M("eabRedirectedTests",JSON.stringify(t))}function Nn(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&&Xt(t,n))return{test:r,matchedVariation:o,isControlUrl:!!o.isControl}}return null}function Mn(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 Re(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=Nn(e,r);if(!n)return!1;let{test:c,matchedVariation:s,isControlUrl:f}=n,d=c.testId,g=Dn(c),i=J(d);if(!i)return!1;let l=c.variations.find(p=>p.id===i);if(!l)return!1;let a=l.splitUrlTestLinks||[];if(a.length===0||Xt(r,a))return!1;switch(g){case"redirectOnlyControlUrl":if(!f||l.isControl)return!1;break;case"redirectOnce":if(Wr(d))return!1;Gr(d);break;case"redirectOnceControlUrlOnly":if(!f||Wr(d)||l.isControl)return!1;Gr(d);break;default:break}let u=a[0];return Mn(u),!0}function Jr(e){return e.tests.some(t=>t.type==="SPLIT_URL"&&t.enabled)}var Kt={type:"SPLIT_URL",shouldActivate(e,t){for(let r of e.variations){let o=r.splitUrlTestLinks||[];if(Xt(t.currentUrl,o))return!0}return!1},getVariantData(){return{handlerActivated:!0}}};var Zt=at(Yr(),1),Qr={"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 P(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 we(e){if(!e)return null;let t=/gid:\/\/shopify\/ProductVariant\/(\d+)/,r=e.match(t);return r?r[1]:null}function Oe(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,r=e.match(t);return r?r[1]:null}function Ve(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function Hn(e){return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function zn(e){return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function Xr(e){return Hn(e)||zn(e)}function qn(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 jn(e){let t={};return e.searchParams.forEach((r,o)=>{t[o]||(t[o]=r)}),t}function Fn(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function $n(e){return e.replace(/^www\./,"")}function Wn(e,t,r){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let n,c;try{if(e&&e.trim()!=="")n=new URL(e);else return"Direct";if(n?.hostname&&Fn(n)){if(c=n.hostname,r&&r===c)return"Direct"}else return""}catch{}if(!c)return"";let s=$n(c);return s?Qr[s]?Qr[s]:s?.includes("google")?"Google":s:""}function Le(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 c;if(r&&r.trim()!==""&&r.startsWith("http"))try{let s=new URL(r),f=s?.pathname;c=s?.hostname,f&&(n.page_entry_path=f??"");let d=jn(s);n.utm_medium=d.utm_medium??"",n.utm_source=d.utm_source??"",n.utm_campaign=d.utm_campaign??"",n.utm_content=d.utm_content??"",n.utm_term=d.utm_term??"",n.gclid=d.gclid??"",n.fbclid=d.fbclid??"",n.pins_campaign_id=d.pins_campaign_id??"",n.epik=d.epik??""}catch{}if(o){let s=(0,Zt.UAParser)(o),f=s?.browser?.name,d=qn(f);n.browser_info=d??"",n.os_info=s?.os?.name??"",o&&(n.device_type=(s?.device?.type||"desktop")?.toUpperCase()??"")}return n.referrer_source=Wn(t,n?.browser_info,c)??"",n}catch{return n}}function Be(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 Kr(e){try{return e&&new URLSearchParams(e).get("eabUserId")||!1}catch{return!1}}function De(e){if(!e)return"";try{let t=(0,Zt.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 Zr(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function en(e){return!!e&&e.startsWith("gid://shopify/")}function tn(){if(typeof window>"u")return;let e=window.Shopify;if(e?.currency?.active)return e.currency.active}fe();var rn="elv-el-",nn={ELEMENT_NODE:1,TEXT_NODE:3},ht=new Map,yt=new Map,vt=new Map,_t=new Map,Ne=!1;function re(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 rr(){return typeof window>"u"?!1:window.innerWidth<768}function Gn(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 Jn(e){return e.nodeType===nn.TEXT_NODE}function er(e){return e.nodeType===nn.ELEMENT_NODE}function tr(e,t){ht.has(e)||ht.set(e,t.cloneNode(!0))}function on(e){let t=e;t=t.replace(/&#96;/g,"`").replace(/&#36;/g,"$");try{t=JSON.parse('"'+t+'"')}catch{}return t}function nr(e){if(typeof window>"u"||e.length===0)return;let t=window.location.pathname,r=e.filter(n=>n.pathnames?.length?n.pathnames.some(c=>re(t,c)):!0);Ne=rr();let o=r.map(n=>({...n,style:n.style?{...n.style.lg,...Ne&&n.style.sm}:void 0,content:n.content&&Ne&&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,f)=>{if(!s)return;let d=n.applyAll?`${n.selector}-${f}-${s.id||Math.random().toString(36).substr(2,9)}`:n.selector;tr(d,s),Jn(s)?s.nodeValue=n.content:er(s)&&(s.innerHTML=n.content)})}),o.filter(n=>n.style!==void 0).forEach(n=>{let c=document.querySelector(n.selector);!c||!er(c)||(tr(n.selector,c),Object.entries(n.style).forEach(([s,f])=>{let d=Gn(s),g=f.toString().includes("!important"),i=f.toString().replace(/\s*!important\s*$/,"");c.style.setProperty(d,i,g?"important":void 0)}))}),o.filter(n=>n.attributes!==void 0).forEach(n=>{let c=document.querySelector(n.selector);!c||!er(c)||(tr(n.selector,c),Object.entries(n.attributes).forEach(([s,f])=>{c.setAttribute(s,f)}))})}function or(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=>re(t,n)):!0).forEach(o=>{let n=`${rn}${o.id}`;if(_t.has(n))return;let c=document.querySelector(o.selector.target);if(!c||c.parentElement?.querySelector(`#${n}`))return;let s=an(o);o.selector.placement==="after"?c.after(s):o.selector.placement==="before"&&c.before(s),_t.set(n,s)})}function an(e){let t=document.createElement(e.tagName);return t.id=`${rn}${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=an(r);t.appendChild(o)}),t}function Qe(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=>re(r,s))?!1:n.pathnames.some(c=>re(r,c)):!0).forEach(n=>{n.id&&(n.css&&Yn(n.id,n.css),n.js&&Qn(n.id,n.js,t))})}function Yn(e,t){let r=`css-${e}`;if(yt.has(r)||document.getElementById(r))return;let o=document.createElement("style");o.id=r,o.textContent=on(t),document.head.appendChild(o),yt.set(r,o)}function Qn(e,t,r){let o=`js-${e}`;if(vt.has(o)||document.getElementById(o))return;let n=document.createElement("script");n.id=o,r&&n.setAttribute("nonce",r);let c=on(t);n.textContent="(function(){try{"+c+"}catch(e){console.error('[ElevateAB] Custom script error:', e)}})();",document.head.appendChild(n),vt.set(o,n)}function ir(){ht.forEach((e,t)=>{let r=document.querySelector(t);r&&r.replaceWith(e.cloneNode(!0))})}function ar(){yt.forEach(e=>e.remove()),yt.clear(),vt.forEach(e=>e.remove()),vt.clear(),_t.forEach(e=>e.remove()),_t.clear(),ht.clear()}function Xn(e,t){let r=[],o=[],n=[];return e.tests.filter(s=>s.type==="CONTENT"&&s.enabled).forEach(s=>{let f=J(s.testId);if(!f)return;let d=s.variations.find(g=>g.id===f);d?.content&&(d.content.changes?.length&&r.push(...d.content.changes),d.content.elements?.length&&o.push(...d.content.elements),d.content.customCodes?.length&&n.push(...d.content.customCodes))}),{changes:r,elements:o,blocks:[],customCodes:n}}function Me(e){return e.tests.some(t=>t.type==="CONTENT"&&t.enabled)}function Xe(e,t,r){if(typeof window>"u"||!Me(e))return;let o=Xn(e,t);(o.changes.length>0||o.elements.length>0||o.customCodes.length>0)&&(nr(o.changes),or(o.elements),Qe(o.customCodes,r))}function Ct(e,t,r){if(typeof window>"u")return;let o=rr();o!==Ne&&(ir(),Ne=o),Xe(e,t,r)}function kt(e,t,r,o=!0){if(typeof window>"u")return()=>{};let n=()=>{rr()!==Ne&&Ct(e,t,r)};window.addEventListener("resize",n);let c=()=>{};return o&&(c=Ue(()=>{Ct(e,t,r)})),()=>{window.removeEventListener("resize",n),c(),ar()}}Tt();sr();Y();var Pe=require("react"),Kn="https://bitter-river-9c62.support-67d.workers.dev",Zn="https://d339co84ntxcme.cloudfront.net/Prod/orders",D=null;function Pt(e){D=e}function be(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 eo(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function to(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function ro(){return typeof window>"u"?!1:V("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function he(e,t,r){if(typeof window>"u"||ro())return null;let o=navigator.userAgent,n=window.location.pathname,c=Be(n,r),{referrer:s,entryPage:f}=Ie(),d=Le({referrer:s,entryPage:f,userAgent:o}),g=N("ABTL")||{},i=N("ABAU")||{},l=eo(g),a=to(i,g),u=Oe(localStorage.getItem("shopifyCartId")),p=new Date().toISOString(),_=sessionStorage.getItem("eabIsFirstVisit")==="true",x=V("localization")||"";return{pixel_event_id:`sh-${le()}`,shop_name:e,timestamp:p,event_type:t,client_id:V("_shopify_y")||void 0,visitor_id:ce(),session_id:Te(),cart_token:Ve(u||V("cart")),page_url:window.location.href,page_pathname:n,page_search:window.location.search,referrer_url:s,referrer_source:d?.referrer_source,previous_page:document.referrer,page_entry:f,page_entry_path:d?.page_entry_path,page_type:c,utm_medium:d?.utm_medium,utm_source:d?.utm_source,utm_campaign:d?.utm_campaign,utm_content:d?.utm_content,utm_term:d?.utm_term,gclid:d?.gclid,fbclid:d?.fbclid,pins_campaign_id:d?.pins_campaign_id,epik:d?.epik,browser_info:d?.browser_info,os_info:d?.os_info,device_type:d?.device_type,language:navigator.language,root_route:localStorage.getItem("eabRootRoute")||"",user_agent:o,user_agent_no_browser:De(o),is_first_visit:_,shopify_country:x,ab_test_assignments:l,ab_test_views:a,is_first_order:null}}async function ye(e,t=Kn){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 ur(e={}){let t=be(e);if(!t)return;let r=e.hasLocalizedPaths??D?.hasLocalizedPaths,o=e.workerUrl??D?.workerUrl,n=he(t,"page_viewed",r);if(!n)return;let c={...n,cart_currency:e.currency};await ye(c,o)}async function un(e){let t=be(e);if(!t)return;let{productId:r,productVendor:o,productPrice:n,productSku:c,currency:s}=e,f=e.hasLocalizedPaths??D?.hasLocalizedPaths,d=e.workerUrl??D?.workerUrl,g=he(t,"product_viewed",f);if(!g)return;let i={...g,cart_currency:s,product_id:q(r),product_vendor:P(o),product_price:v(n),product_sku:P(c)};await ye(i,d)}async function dn(e){let t=be(e);if(!t)return;let{productId:r,variantId:o,productVendor:n,productPrice:c,productQuantity:s,productSku:f,currency:d,cartId:g}=e,i=e.hasLocalizedPaths??D?.hasLocalizedPaths,l=e.workerUrl??D?.workerUrl,a=e.storefrontAccessToken??D?.storefrontAccessToken,u=he(t,"product_added_to_cart",i);if(!u)return;let p={...u,cart_currency:d,product_id:q(r),variant_id:q(o),product_vendor:P(n),product_price:v(c),product_quantity:s,product_sku:P(f)};if(await ye(p,l),g&&a)try{let{updateCartAttributes:_}=await Promise.resolve().then(()=>(Tt(),cn));await _(g,{storefrontAccessToken:a})}catch(_){console.error("[ElevateAB] Failed to update cart attributes:",_)}}async function ln(e){let t=be(e);if(!t)return;let{productId:r,variantId:o,productVendor:n,productPrice:c,productQuantity:s,productSku:f,currency:d}=e,g=e.hasLocalizedPaths??D?.hasLocalizedPaths,i=e.workerUrl??D?.workerUrl,l=he(t,"product_removed_from_cart",g);if(!l)return;let a={...l,cart_currency:d,product_id:q(r),variant_id:q(o),product_vendor:P(n),product_price:v(c),product_quantity:s,product_sku:P(f)};await ye(a,i)}async function pn(e){let t=be(e);if(!t)return;let{cartTotalPrice:r,cartTotalQuantity:o,cartItems:n,currency:c}=e,s=e.hasLocalizedPaths??D?.hasLocalizedPaths,f=e.workerUrl??D?.workerUrl,d=he(t,"cart_viewed",s);if(!d)return;let g={...d,cart_currency:c,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:P(i.productVendor)||"",product_price:v(i.productPrice),product_quantity:i.productQuantity??null,product_sku:P(i.productSku)||""}))};await ye(g,f)}async function fn(e){let t=be(e);if(!t)return;let{searchQuery:r,currency:o}=e,n=e.hasLocalizedPaths??D?.hasLocalizedPaths,c=e.workerUrl??D?.workerUrl,s=he(t,"search_submitted",n);if(!s)return;let f={...s,cart_currency:o,search_query:P(r)};await ye(f,c)}async function mn(e){let t=be(e);if(!t)return;let{cartTotalPrice:r,cartSubtotalPrice:o,cartShippingPrice:n,cartTaxAmount:c,cartDiscountAmount:s,customerId:f,cartItems:d,currency:g}=e,i=e.hasLocalizedPaths??D?.hasLocalizedPaths,l=e.workerUrl??D?.workerUrl,a=he(t,"checkout_started",i);if(!a)return;let u=0,p=d?.map(x=>{let w=x.productQuantity??0;return u+=w,{product_id:q(x.productId),variant_id:q(x.variantId),product_vendor:P(x.productVendor)||"",vendor:P(x.productVendor)||"",product_price:v(x.productPrice),total_price:v(x.productPrice),product_quantity:w,quantity:w,product_sku:P(x.productSku)||"",sku:P(x.productSku)||"",total_discount:v(x.totalDiscount)}})||[],_={...a,cart_currency:g,cart_total_price:v(r),cart_subtotal_price:v(o),cart_total_quantity:u,cart_shipping_price:v(n),cart_tax_amount:v(c),cart_discount_amount:v(s),cart_items:p,customer_id:f};await ye(_,l)}async function gn(e){let t=be(e);if(!t)return;let{orderId:r,cartTotalPrice:o,cartSubtotalPrice:n,cartShippingPrice:c,cartTaxAmount:s,cartDiscountAmount:f,customerId:d,isFirstOrder:g,noteAttributes:i,cartItems:l,currency:a}=e,u=e.hasLocalizedPaths??D?.hasLocalizedPaths,p=e.ordersWorkerUrl??D?.ordersWorkerUrl??Zn,_=he(t,"checkout_completed",u);if(!_)return;let x=0,w=l?.map(C=>{let L=C.productQuantity??0;return x+=L,{product_id:q(C.productId),variant_id:q(C.variantId),product_vendor:P(C.productVendor)||"",vendor:P(C.productVendor)||"",product_price:v(C.productPrice),total_price:v(C.productPrice),product_quantity:L,quantity:L,product_sku:P(C.productSku)||"",sku:P(C.productSku)||"",total_discount:v(C.totalDiscount)}})||[],b={..._,cart_currency:a,cart_total_price:v(o),cart_subtotal_price:v(n),cart_total_quantity:x,cart_shipping_price:v(c),cart_tax_amount:v(s),cart_discount_amount:v(f),cart_items:w,order_id:r,customer_id:d,is_first_order:g??null,note_attributes:i};await ye(b,p)}function wn(e){let{storeId:t,hasLocalizedPaths:r,currency:o,workerUrl:n,enabled:c=!0,pathname:s}=e,f=(0,Pe.useRef)(null),[d,g]=(0,Pe.useState)(()=>s||(typeof window<"u"?window.location.pathname:""));(0,Pe.useEffect)(()=>{s&&g(s)},[s]),(0,Pe.useEffect)(()=>{typeof window>"u"||!c||f.current!==d&&(f.current=d,ur({storeId:t,hasLocalizedPaths:r,currency:o,workerUrl:n}))},[d,t,r,o,n,c])}var _e=at(require("react"),1);var dr=at(require("react"),1),et=dr.default.createContext(null);function Et(){let e=dr.default.useContext(et);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}fe();We();var At=new Map;function ve(e){At.set(e.type,e)}function tt(e){return At.get(e)}function lr(){return Array.from(At.values())}function pr(e){return At.has(e)}function no(e){try{let o=new URL(e,"https://example.com").pathname.match(/\/products\/([^\/\?]+)/);return o?o[1]:null}catch{return null}}function oo(e,t,r,o){if(typeof window>"u"||!e.prices||!t)return;let n=e.prices[t];if(!n)return;let c=n.price?.[r],s=n.compare?.[r],f=o;if(f?.selectorsV2?.length)for(let d of f.selectorsV2){if(d.price&&c){let g=d.price.replace("{{variant}}",t);document.querySelectorAll(g).forEach(l=>{let a=new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(parseFloat(c));l.textContent=a})}if(d.compareAt&&s){let g=d.compareAt.replace("{{variant}}",t);document.querySelectorAll(g).forEach(l=>{let a=new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(parseFloat(s));l.textContent=a})}if(d.saving&&c&&s)for(let g of d.saving){let i=g.selector.replace("{{variant}}",t);document.querySelectorAll(i).forEach(a=>{let u=parseFloat(c),p=parseFloat(s),_=p-u;if(g.isPercentage){let x=Math.round(_/p*100);a.textContent=`${x}%`}else{let x=new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(_);a.textContent=x}})}}}var fr={type:"PRICE_PLUS",shouldActivate(e,t){let r=e.data;if(!r)return!1;let{productId:o,productHandle:n}=t,c=n||no(t.currentUrl),s=o&&r.productIds?.includes(o),f=c&&r.handles?.includes(c);return s||f},applyEffect(e,t,r){oo(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 io(e,t){let o=e.data?.pathnames||[];if(!o.length)return!0;try{let c=new URL(t,"https://example.com").pathname;return o.some(s=>re(c,s))}catch{return!1}}var rt={type:"CONTENT",shouldActivate(e,t){return io(e,t.currentUrl)},getVariantData(e,t,r){let o=e.data;return{content:t.content,pathnames:o?.pathnames,handlerActivated:!0}}};function ao(e,t){let o=e.data?.pathnames||[];if(!o.length)return!0;try{let c=new URL(t,"https://example.com").pathname;return o.some(s=>re(c,s))}catch{return!1}}var mr={type:"CUSTOM_CODE",shouldActivate(e,t){return ao(e,t.currentUrl)},getVariantData(e,t,r){let o=e.data;return{customCode:t.customCode,pathnames:o?.pathnames,excludePathnames:o?.excludePathnames,handlerActivated:!0}}};ve(fr);ve(Kt);ve(rt);ve(mr);function so(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 c,f=new URLSearchParams(window.location.search).get("variant");return f&&(c=f),{currentUrl:t,productHandle:o,variantId:c,selectors:e,currencyCode:"USD"}}function bn(e){let{config:t,previewState:r,selectors:o}=Et(),[n,c]=_e.default.useState(null),[s,f]=_e.default.useState(!0),d=_e.default.useMemo(()=>t&&t.tests.find(a=>a.testId===e)||null,[t,e]),g=_e.default.useMemo(()=>r||pe(),[r]),i=_e.default.useRef(null),l=_e.default.useRef(null);return _e.default.useEffect(()=>{let a=!0;if(t===null)return;if(!d){i.current!==e&&(i.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),a&&f(!1);return}if(!d.enabled&&!g?.isPreview){i.current!==`${e}-disabled`&&(i.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),a&&f(!1);return}let u=J(e);if(!u){a&&f(!1);return}let p=d.variations.find(b=>b.id===u);if(!p){a&&f(!1);return}let _=tt(d.type),x=so(o),w={...p};if(_?.shouldActivate(d,x)){let b=`${e}-${p.id}`;_.applyEffect&&l.current!==b&&(l.current=b,_.applyEffect(d,p,x));let C=_.getVariantData(d,p,x);w={...w,...C}}return a&&c(w),g?.isPreview||ft(e),a&&f(!1),()=>{a=!1}},[t,d,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=at(require("react"),1);ct();We();fe();function gr(e){return e.tests.some(t=>t.type==="CUSTOM_CODE"&&t.enabled)}function hn(e,t,r){if(typeof window>"u")return;if(console.log("[ElevateAB Custom Code] All tests:",e.tests.map(c=>({id:c.testId,type:c.type,enabled:c.enabled}))),!gr(e)){console.log("[ElevateAB Custom Code] No CUSTOM_CODE tests found");return}let o=e.tests.filter(c=>c.type==="CUSTOM_CODE"&&c.enabled);console.log("[ElevateAB Custom Code] Found",o.length,"CUSTOM_CODE tests");let n=[];o.forEach(c=>{let s=J(c.testId);if(console.log("[ElevateAB Custom Code] Test",c.testId,"assigned variant:",s),!s)return;let f=c.variations.find(d=>d.id===s);if(console.log("[ElevateAB Custom Code] Variation data:",f),!f?.customCode){console.log("[ElevateAB Custom Code] No customCode on variation");return}(f.customCode.js||f.customCode.css)&&(console.log("[ElevateAB Custom Code] Adding custom code:",f.customCode),n.push(f.customCode))}),n.length>0?(console.log("[ElevateAB Custom Code] Applying",n.length,"custom code blocks"),Qe(n,r)):console.log("[ElevateAB Custom Code] No custom code to apply")}fe();var St=require("react/jsx-runtime"),co="https://ds0wlyksfn0sb.cloudfront.net/headless";function uo(e){return e.replace(/^https?:\/\//,"").replace(".myshopify.com","")}function yn(e){return`${co}/${uo(e)}.js`}function vn({storeId:e,storefrontAccessToken:t,preventFlickering:r=!1,flickerTimeout:o=3e3,nonce:n,children:c}){let[s,f]=H.default.useState(null),[d,g]=H.default.useState(null),[i,l]=H.default.useState(null);H.default.useEffect(()=>{if(typeof window>"u")return;Pt({storeId:e,storefrontAccessToken:t});let w=pe();g(w);let b=ge();l(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"?pe():null,C=null;if(typeof window<"u"&&window.eab_data)C=window.eab_data;else{let Q=yn(e);C=await new Promise((ne,X)=>{let $=document.createElement("script");$.src=Q,$.async=!0,$.onload=()=>{let m=window.eab_data;$.remove(),m?ne(m):X(new Error("Failed to load config: window.eab_data is undefined"))},$.onerror=()=>{$.remove(),ne({allTests:{},selectors:{selectorsV2:[]}})},document.head.appendChild($)})}if(!C||!C.allTests||Object.keys(C.allTests).length===0){f({tests:[],selectors:void 0}),a();return}if(C.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(C.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),f({tests:[],selectors:void 0}),a();return}if(!(Object.keys(C.allTests||{}).length>0)){f({tests:[],selectors:void 0}),a();return}let F=Er(C);if(pt(F,b),F.tests.some(Q=>Q.type==="SPLIT_URL")&&Re(F,b))return;f(F),a()}catch(b){console.error("[ElevateAB] Failed to load config:",b),f({tests:[],selectors:void 0}),a()}}w()},[e,a]),H.default.useEffect(()=>{if(!s||typeof window>"u")return;let w=()=>{Jr(s)&&Re(s,d)||(Me(s)&&Xe(s,d,n),gr(s)&&hn(s,d,n))};w();let b=Ue(()=>{w()}),C=Me(s)?kt(s,d,n,!1):()=>{};return()=>{b(),C()}},[s,d,n]);let u=H.default.useMemo(()=>({config:s,storeId:e,storefrontAccessToken:t,isPreviewMode:d?.isPreview??!1,previewTestId:d?.previewTestId??null,previewState:d,selectors:s?.selectors,countryCode:i}),[s,e,t,d,i]),p=(0,H.useRef)(!1);H.default.useEffect(()=>{!t&&!p.current&&(p.current=!0,console.warn("[ElevateAB] No storefrontAccessToken provided. Orders won't be attributed to test variants."))},[t]);let _=H.default.useMemo(()=>yn(e),[e]),x=H.default.useMemo(()=>wt({configUrl:_,timeout:r?o:2e3}),[_,r,o]);return(0,St.jsxs)(et.Provider,{value:u,children:[(0,St.jsx)("script",{nonce:n,dangerouslySetInnerHTML:{__html:x}}),c]})}var Ee=require("react");Y();Y();Tt();var lo="https://bitter-river-9c62.support-67d.workers.dev",po="https://d339co84ntxcme.cloudfront.net/Prod/orders";function Ce(){return`sh-${le()}`}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 _n({storeId:e,storefrontAccessToken:t,hasLocalizedPaths:r,workerUrl:o=lo,ordersWorkerUrl:n=po,useAnalytics:c}){let s=(0,Ee.useContext)(et),f=e||s?.storeId||"",d=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:l}=c(),{ready:a}=l("Elevate Analytics");return(0,Ee.useEffect)(()=>{if(typeof window>"u")return;if(ce(),Te(),typeof document<"u"){let p=document.referrer||"",_=window.location.href;ut(p,_)}(()=>{let p=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=Oe(typeof localStorage<"u"?localStorage.getItem("shopifyCartId"):null),{referrer:R,entryPage:O}=Ie();return{visitorId:ce(),sessionId:Te(),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=Be(z,r),I=Le({referrer:R.referrer,entryPage:R.entryPage,userAgent:O}),B=N("ABTL")||{},G=N("ABAU")||{},ke=fo(B),oe=mo(G,B),ie=new Date().toISOString(),de=typeof sessionStorage<"u"?sessionStorage.getItem("eabIsFirstVisit")==="true":!1,xe=V("localization")||"";return{pixel_event_id:h,shop_name:f,timestamp:ie,event_type:m,client_id:R.clientId,visitor_id:R.visitorId,session_id:R.sessionId,cart_token:Ve(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:De(O),is_first_visit:de,shopify_country:xe,cart_currency:S.shop?.currency,ab_test_assignments:ke,ab_test_views:oe,is_first_order:null}},x=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=p(m),S=Ce(),R=_("page_viewed",S,m,h);await x(R)}catch(h){console.error("[ElevateAB] Error handling page_viewed:",h)}},b=async m=>{try{let h=p(m),S=Ce(),O={..._("product_viewed",S,m,h),product_id:te(m?.products?.[0]?.id)||"",product_vendor:P(m?.products?.[0]?.vendor)??"",product_price:v(m?.products?.[0]?.price)??null,product_sku:P(m?.products?.[0]?.sku)??""};await x(O)}catch(h){console.error("[ElevateAB] Error handling product_viewed:",h)}},C=async m=>{try{let h=p(m),S=Ce(),O={..._("product_added_to_cart",S,m,h),product_id:te(m?.currentLine?.merchandise?.product?.id)??"",variant_id:we(m?.currentLine?.merchandise?.id)??"",product_vendor:P(m?.currentLine?.merchandise?.product?.vendor)??"",product_price:v(m?.currentLine?.cost?.totalAmount?.amount)??null,product_quantity:m?.currentLine?.quantity??null,product_sku:P(m?.currentLine?.merchandise?.sku)??""};await x(O);let z=m?.cart?.id;z&&d&&f&&Ze(z,{storefrontAccessToken:d,storefrontApiUrl:`https://${f}/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=p(m),S=Ce(),O={..._("product_removed_from_cart",S,m,h),product_id:te(m?.prevLine?.merchandise?.product?.id)??"",variant_id:we(m?.prevLine?.merchandise?.id)??"",product_vendor:P(m?.prevLine?.merchandise?.product?.vendor)??"",product_price:v(m?.prevLine?.cost?.totalAmount?.amount)??null,product_quantity:m?.prevLine?.quantity??null,product_sku:P(m?.prevLine?.merchandise?.sku)??""};await x(O)}catch(h){console.error("[ElevateAB] Error handling product_removed_from_cart:",h)}},F=async m=>{try{let h=p(m),S=Ce(),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:we(I?.merchandise?.id)??"",vendor:P(I?.merchandise?.product?.vendor)??"",total_price:v(I?.cost?.totalAmount?.amount)??null,quantity:I?.quantity??null,sku:P(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 x(W)}catch(h){console.error("[ElevateAB] Error handling cart_viewed:",h)}},Q=async m=>{try{let h=p(m),S=Ce(),O={..._("search_submitted",S,m,h),search_query:P(m?.data?.searchResult?.query)??""};await x(O)}catch(h){console.error("[ElevateAB] Error handling search_submitted:",h)}},ne=async m=>{try{let h=p(m),S=Ce(),R=_("checkout_started",S,m,h),O=0,W=(m?.data?.checkout?.lineItems??[]).map(B=>{let G=B?.quantity??0;O+=G;let oe=(B?.discountAllocations??[])?.reduce((ie,de)=>ie+(de?.amount?.amount||0),0);return{product_id:te(B?.variant?.product?.id)??"",variant_id:we(B?.variant?.id)??"",vendor:P(B?.variant?.product?.vendor)??"",total_price:v(B?.finalLinePrice?.amount)??null,quantity:G,sku:P(B?.variant?.sku)??"",total_discount:v(oe)??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 x(I)}catch(h){console.error("[ElevateAB] Error handling checkout_started:",h)}},X=async m=>{try{let h=p(m),S=Ce(),R=_("checkout_completed",S,m,h),O=0,W=(m?.data?.checkout?.lineItems??[]).map(B=>{let G=B?.quantity??0;O+=G;let oe=(B?.discountAllocations??[])?.reduce((ie,de)=>ie+(de?.amount?.amount||0),0);return{product_id:te(B?.variant?.product?.id)??"",variant_id:we(B?.variant?.id)??"",vendor:P(B?.variant?.product?.vendor)??"",total_price:v(B?.finalLinePrice?.amount)??null,quantity:G,sku:P(B?.variant?.sku)??"",total_discount:v(oe)??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",C),i("product_removed_from_cart",L),i("cart_viewed",F),i("search_submitted",Q),i("checkout_started",ne),i("checkout_completed",X)})(),a()},[i,a,f,r,d,o,n]),null}var go="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});
45
+ })();`}function $r(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 Xt(e,t){let r=$r(e.split("?")[0]);for(let o of t){let n=$r(o.split("?")[0]);if(r===n)return!0;try{let c=new URL(e).pathname,s=new URL(o,e).pathname;if(c===s)return!0}catch{}}return!1}function Dn(e){return e.data?.redirectBehavior||"redirectAll"}function Wr(e){return!!(N("eabRedirectedTests")||{})[e]}function Gr(e){let t=N("eabRedirectedTests")||{};t[e]=!0,H("eabRedirectedTests",JSON.stringify(t))}function Nn(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&&Xt(t,n))return{test:r,matchedVariation:o,isControlUrl:!!o.isControl}}return null}function Mn(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 Re(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=Nn(e,r);if(!n)return!1;let{test:c,matchedVariation:s,isControlUrl:p}=n,d=c.testId,g=Dn(c),i=J(d);if(!i)return!1;let l=c.variations.find(f=>f.id===i);if(!l)return!1;let a=l.splitUrlTestLinks||[];if(a.length===0||Xt(r,a))return!1;switch(g){case"redirectOnlyControlUrl":if(!p||l.isControl)return!1;break;case"redirectOnce":if(Wr(d))return!1;Gr(d);break;case"redirectOnceControlUrlOnly":if(!p||Wr(d)||l.isControl)return!1;Gr(d);break;default:break}let u=a[0];return Mn(u),!0}function Jr(e){return e.tests.some(t=>t.type==="SPLIT_URL"&&t.enabled)}var Kt={type:"SPLIT_URL",shouldActivate(e,t){for(let r of e.variations){let o=r.splitUrlTestLinks||[];if(Xt(t.currentUrl,o))return!0}return!1},getVariantData(){return{handlerActivated:!0}}};var Zt=at(Yr(),1),Qr={"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 P(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 we(e){if(!e)return null;let t=/gid:\/\/shopify\/ProductVariant\/(\d+)/,r=e.match(t);return r?r[1]:null}function Oe(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,r=e.match(t);return r?r[1]:null}function Ve(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function Hn(e){return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function zn(e){return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function Xr(e){return Hn(e)||zn(e)}function qn(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 jn(e){let t={};return e.searchParams.forEach((r,o)=>{t[o]||(t[o]=r)}),t}function Fn(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function $n(e){return e.replace(/^www\./,"")}function Wn(e,t,r){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let n,c;try{if(e&&e.trim()!=="")n=new URL(e);else return"Direct";if(n?.hostname&&Fn(n)){if(c=n.hostname,r&&r===c)return"Direct"}else return""}catch{}if(!c)return"";let s=$n(c);return s?Qr[s]?Qr[s]:s?.includes("google")?"Google":s:""}function Le(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 c;if(r&&r.trim()!==""&&r.startsWith("http"))try{let s=new URL(r),p=s?.pathname;c=s?.hostname,p&&(n.page_entry_path=p??"");let d=jn(s);n.utm_medium=d.utm_medium??"",n.utm_source=d.utm_source??"",n.utm_campaign=d.utm_campaign??"",n.utm_content=d.utm_content??"",n.utm_term=d.utm_term??"",n.gclid=d.gclid??"",n.fbclid=d.fbclid??"",n.pins_campaign_id=d.pins_campaign_id??"",n.epik=d.epik??""}catch{}if(o){let s=(0,Zt.UAParser)(o),p=s?.browser?.name,d=qn(p);n.browser_info=d??"",n.os_info=s?.os?.name??"",o&&(n.device_type=(s?.device?.type||"desktop")?.toUpperCase()??"")}return n.referrer_source=Wn(t,n?.browser_info,c)??"",n}catch{return n}}function Be(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 Kr(e){try{return e&&new URLSearchParams(e).get("eabUserId")||!1}catch{return!1}}function De(e){if(!e)return"";try{let t=(0,Zt.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 Zr(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function en(e){return!!e&&e.startsWith("gid://shopify/")}function tn(){if(typeof window>"u")return;let e=window.Shopify;if(e?.currency?.active)return e.currency.active}pe();var rn="elv-el-",nn={ELEMENT_NODE:1,TEXT_NODE:3},ht=new Map,yt=new Map,vt=new Map,_t=new Map,Ne=!1;function re(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 rr(){return typeof window>"u"?!1:window.innerWidth<768}function Gn(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 Jn(e){return e.nodeType===nn.TEXT_NODE}function er(e){return e.nodeType===nn.ELEMENT_NODE}function tr(e,t){ht.has(e)||ht.set(e,t.cloneNode(!0))}function on(e){let t=e;t=t.replace(/&#96;/g,"`").replace(/&#36;/g,"$");try{t=JSON.parse('"'+t+'"')}catch{}return t}function nr(e){if(typeof window>"u"||e.length===0)return;let t=window.location.pathname,r=e.filter(n=>n.pathnames?.length?n.pathnames.some(c=>re(t,c)):!0);Ne=rr();let o=r.map(n=>({...n,style:n.style?{...n.style.lg,...Ne&&n.style.sm}:void 0,content:n.content&&Ne&&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 d=n.applyAll?`${n.selector}-${p}-${s.id||Math.random().toString(36).substr(2,9)}`:n.selector;tr(d,s),Jn(s)?s.nodeValue=n.content:er(s)&&(s.innerHTML=n.content)})}),o.filter(n=>n.style!==void 0).forEach(n=>{let c=document.querySelector(n.selector);!c||!er(c)||(tr(n.selector,c),Object.entries(n.style).forEach(([s,p])=>{let d=Gn(s),g=p.toString().includes("!important"),i=p.toString().replace(/\s*!important\s*$/,"");c.style.setProperty(d,i,g?"important":void 0)}))}),o.filter(n=>n.attributes!==void 0).forEach(n=>{let c=document.querySelector(n.selector);!c||!er(c)||(tr(n.selector,c),Object.entries(n.attributes).forEach(([s,p])=>{c.setAttribute(s,p)}))})}function or(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=>re(t,n)):!0).forEach(o=>{let n=`${rn}${o.id}`;if(_t.has(n))return;let c=document.querySelector(o.selector.target);if(!c||c.parentElement?.querySelector(`#${n}`))return;let s=an(o);o.selector.placement==="after"?c.after(s):o.selector.placement==="before"&&c.before(s),_t.set(n,s)})}function an(e){let t=document.createElement(e.tagName);return t.id=`${rn}${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=an(r);t.appendChild(o)}),t}function Qe(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=>re(r,s))?!1:n.pathnames.some(c=>re(r,c)):!0).forEach(n=>{n.id&&(n.css&&Yn(n.id,n.css),n.js&&Qn(n.id,n.js,t))})}function Yn(e,t){let r=`css-${e}`;if(yt.has(r)||document.getElementById(r))return;let o=document.createElement("style");o.id=r,o.textContent=on(t),document.head.appendChild(o),yt.set(r,o)}function Qn(e,t,r){let o=`js-${e}`;if(vt.has(o)||document.getElementById(o))return;let n=document.createElement("script");n.id=o,r&&n.setAttribute("nonce",r);let c=on(t);n.textContent="(function(){try{"+c+"}catch(e){console.error('[ElevateAB] Custom script error:', e)}})();",document.head.appendChild(n),vt.set(o,n)}function ir(){ht.forEach((e,t)=>{let r=document.querySelector(t);r&&r.replaceWith(e.cloneNode(!0))})}function ar(){yt.forEach(e=>e.remove()),yt.clear(),vt.forEach(e=>e.remove()),vt.clear(),_t.forEach(e=>e.remove()),_t.clear(),ht.clear()}function Xn(e,t){let r=[],o=[],n=[];return e.tests.filter(s=>s.type==="CONTENT"&&s.enabled).forEach(s=>{let p=J(s.testId);if(!p)return;let d=s.variations.find(g=>g.id===p);d?.content&&(d.content.changes?.length&&r.push(...d.content.changes),d.content.elements?.length&&o.push(...d.content.elements),d.content.customCodes?.length&&n.push(...d.content.customCodes))}),{changes:r,elements:o,blocks:[],customCodes:n}}function Me(e){return e.tests.some(t=>t.type==="CONTENT"&&t.enabled)}function Xe(e,t,r){if(typeof window>"u"||!Me(e))return;let o=Xn(e,t);(o.changes.length>0||o.elements.length>0||o.customCodes.length>0)&&(nr(o.changes),or(o.elements),Qe(o.customCodes,r))}function Ct(e,t,r){if(typeof window>"u")return;let o=rr();o!==Ne&&(ir(),Ne=o),Xe(e,t,r)}function kt(e,t,r,o=!0){if(typeof window>"u")return()=>{};let n=()=>{rr()!==Ne&&Ct(e,t,r)};window.addEventListener("resize",n);let c=()=>{};return o&&(c=Ue(()=>{Ct(e,t,r)})),()=>{window.removeEventListener("resize",n),c(),ar()}}Tt();sr();Y();var Pe=require("react"),Kn="https://bitter-river-9c62.support-67d.workers.dev",Zn="https://d339co84ntxcme.cloudfront.net/Prod/orders",D=null;function Pt(e){D=e}function be(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 eo(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function to(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function ro(){return typeof window>"u"?!1:V("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function he(e,t,r){if(typeof window>"u"||ro())return null;let o=navigator.userAgent,n=window.location.pathname,c=Be(n,r),{referrer:s,entryPage:p}=Ie(),d=Le({referrer:s,entryPage:p,userAgent:o}),g=N("ABTL")||{},i=N("ABAU")||{},l=eo(g),a=to(i,g),u=Oe(localStorage.getItem("shopifyCartId")),f=new Date().toISOString(),_=sessionStorage.getItem("eabIsFirstVisit")==="true",x=V("localization")||"";return{pixel_event_id:`sh-${le()}`,shop_name:e,timestamp:f,event_type:t,client_id:V("_shopify_y")||void 0,visitor_id:ce(),session_id:Te(),cart_token:Ve(u||V("cart")),page_url:window.location.href,page_pathname:n,page_search:window.location.search,referrer_url:s,referrer_source:d?.referrer_source,previous_page:document.referrer,page_entry:p,page_entry_path:d?.page_entry_path,page_type:c,utm_medium:d?.utm_medium,utm_source:d?.utm_source,utm_campaign:d?.utm_campaign,utm_content:d?.utm_content,utm_term:d?.utm_term,gclid:d?.gclid,fbclid:d?.fbclid,pins_campaign_id:d?.pins_campaign_id,epik:d?.epik,browser_info:d?.browser_info,os_info:d?.os_info,device_type:d?.device_type,language:navigator.language,root_route:localStorage.getItem("eabRootRoute")||"",user_agent:o,user_agent_no_browser:De(o),is_first_visit:_,shopify_country:x,ab_test_assignments:l,ab_test_views:a,is_first_order:null}}async function ye(e,t=Kn){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 ur(e={}){let t=be(e);if(!t)return;let r=e.hasLocalizedPaths??D?.hasLocalizedPaths,o=e.workerUrl??D?.workerUrl,n=he(t,"page_viewed",r);if(!n)return;let c={...n,cart_currency:e.currency};await ye(c,o)}async function un(e){let t=be(e);if(!t)return;let{productId:r,productVendor:o,productPrice:n,productSku:c,currency:s}=e,p=e.hasLocalizedPaths??D?.hasLocalizedPaths,d=e.workerUrl??D?.workerUrl,g=he(t,"product_viewed",p);if(!g)return;let i={...g,cart_currency:s,product_id:q(r),product_vendor:P(o),product_price:v(n),product_sku:P(c)};await ye(i,d)}async function dn(e){let t=be(e);if(!t)return;let{productId:r,variantId:o,productVendor:n,productPrice:c,productQuantity:s,productSku:p,currency:d,cartId:g}=e,i=e.hasLocalizedPaths??D?.hasLocalizedPaths,l=e.workerUrl??D?.workerUrl,a=e.storefrontAccessToken??D?.storefrontAccessToken,u=he(t,"product_added_to_cart",i);if(!u)return;let f={...u,cart_currency:d,product_id:q(r),variant_id:q(o),product_vendor:P(n),product_price:v(c),product_quantity:s,product_sku:P(p)};if(await ye(f,l),g&&a)try{let{updateCartAttributes:_}=await Promise.resolve().then(()=>(Tt(),cn));await _(g,{storefrontAccessToken:a})}catch(_){console.error("[ElevateAB] Failed to update cart attributes:",_)}}async function ln(e){let t=be(e);if(!t)return;let{productId:r,variantId:o,productVendor:n,productPrice:c,productQuantity:s,productSku:p,currency:d}=e,g=e.hasLocalizedPaths??D?.hasLocalizedPaths,i=e.workerUrl??D?.workerUrl,l=he(t,"product_removed_from_cart",g);if(!l)return;let a={...l,cart_currency:d,product_id:q(r),variant_id:q(o),product_vendor:P(n),product_price:v(c),product_quantity:s,product_sku:P(p)};await ye(a,i)}async function fn(e){let t=be(e);if(!t)return;let{cartTotalPrice:r,cartTotalQuantity:o,cartItems:n,currency:c}=e,s=e.hasLocalizedPaths??D?.hasLocalizedPaths,p=e.workerUrl??D?.workerUrl,d=he(t,"cart_viewed",s);if(!d)return;let g={...d,cart_currency:c,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:P(i.productVendor)||"",product_price:v(i.productPrice),product_quantity:i.productQuantity??null,product_sku:P(i.productSku)||""}))};await ye(g,p)}async function pn(e){let t=be(e);if(!t)return;let{searchQuery:r,currency:o}=e,n=e.hasLocalizedPaths??D?.hasLocalizedPaths,c=e.workerUrl??D?.workerUrl,s=he(t,"search_submitted",n);if(!s)return;let p={...s,cart_currency:o,search_query:P(r)};await ye(p,c)}async function mn(e){let t=be(e);if(!t)return;let{cartTotalPrice:r,cartSubtotalPrice:o,cartShippingPrice:n,cartTaxAmount:c,cartDiscountAmount:s,customerId:p,cartItems:d,currency:g}=e,i=e.hasLocalizedPaths??D?.hasLocalizedPaths,l=e.workerUrl??D?.workerUrl,a=he(t,"checkout_started",i);if(!a)return;let u=0,f=d?.map(x=>{let w=x.productQuantity??0;return u+=w,{product_id:q(x.productId),variant_id:q(x.variantId),product_vendor:P(x.productVendor)||"",vendor:P(x.productVendor)||"",product_price:v(x.productPrice),total_price:v(x.productPrice),product_quantity:w,quantity:w,product_sku:P(x.productSku)||"",sku:P(x.productSku)||"",total_discount:v(x.totalDiscount)}})||[],_={...a,cart_currency:g,cart_total_price:v(r),cart_subtotal_price:v(o),cart_total_quantity:u,cart_shipping_price:v(n),cart_tax_amount:v(c),cart_discount_amount:v(s),cart_items:f,customer_id:p};await ye(_,l)}async function gn(e){let t=be(e);if(!t)return;let{orderId:r,cartTotalPrice:o,cartSubtotalPrice:n,cartShippingPrice:c,cartTaxAmount:s,cartDiscountAmount:p,customerId:d,isFirstOrder:g,noteAttributes:i,cartItems:l,currency:a}=e,u=e.hasLocalizedPaths??D?.hasLocalizedPaths,f=e.ordersWorkerUrl??D?.ordersWorkerUrl??Zn,_=he(t,"checkout_completed",u);if(!_)return;let x=0,w=l?.map(C=>{let L=C.productQuantity??0;return x+=L,{product_id:q(C.productId),variant_id:q(C.variantId),product_vendor:P(C.productVendor)||"",vendor:P(C.productVendor)||"",product_price:v(C.productPrice),total_price:v(C.productPrice),product_quantity:L,quantity:L,product_sku:P(C.productSku)||"",sku:P(C.productSku)||"",total_discount:v(C.totalDiscount)}})||[],b={..._,cart_currency:a,cart_total_price:v(o),cart_subtotal_price:v(n),cart_total_quantity:x,cart_shipping_price:v(c),cart_tax_amount:v(s),cart_discount_amount:v(p),cart_items:w,order_id:r,customer_id:d,is_first_order:g??null,note_attributes:i};await ye(b,f)}function wn(e){let{storeId:t,hasLocalizedPaths:r,currency:o,workerUrl:n,enabled:c=!0,pathname:s}=e,p=(0,Pe.useRef)(null),[d,g]=(0,Pe.useState)(()=>s||(typeof window<"u"?window.location.pathname:""));(0,Pe.useEffect)(()=>{s&&g(s)},[s]),(0,Pe.useEffect)(()=>{typeof window>"u"||!c||p.current!==d&&(p.current=d,ur({storeId:t,hasLocalizedPaths:r,currency:o,workerUrl:n}))},[d,t,r,o,n,c])}var _e=at(require("react"),1);var dr=at(require("react"),1),et=dr.default.createContext(null);function Et(){let e=dr.default.useContext(et);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}pe();We();var At=new Map;function ve(e){At.set(e.type,e)}function tt(e){return At.get(e)}function lr(){return Array.from(At.values())}function fr(e){return At.has(e)}function no(e){try{let o=new URL(e,"https://example.com").pathname.match(/\/products\/([^\/\?]+)/);return o?o[1]:null}catch{return null}}function oo(e,t,r,o){if(typeof window>"u"||!e.prices||!t)return;let n=e.prices[t];if(!n)return;let c=n.price?.[r],s=n.compare?.[r],p=o;if(p?.selectorsV2?.length)for(let d of p.selectorsV2){if(d.price&&c){let g=d.price.replace("{{variant}}",t);document.querySelectorAll(g).forEach(l=>{let a=new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(parseFloat(c));l.textContent=a})}if(d.compareAt&&s){let g=d.compareAt.replace("{{variant}}",t);document.querySelectorAll(g).forEach(l=>{let a=new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(parseFloat(s));l.textContent=a})}if(d.saving&&c&&s)for(let g of d.saving){let i=g.selector.replace("{{variant}}",t);document.querySelectorAll(i).forEach(a=>{let u=parseFloat(c),f=parseFloat(s),_=f-u;if(g.isPercentage){let x=Math.round(_/f*100);a.textContent=`${x}%`}else{let x=new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(_);a.textContent=x}})}}}var pr={type:"PRICE_PLUS",shouldActivate(e,t){let r=e.data;if(!r)return!1;let{productId:o,productHandle:n}=t,c=n||no(t.currentUrl),s=o&&r.productIds?.includes(o),p=c&&r.handles?.includes(c);return s||p},applyEffect(e,t,r){oo(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 io(e,t){let o=e.data?.pathnames||[];if(!o.length)return!0;try{let c=new URL(t,"https://example.com").pathname;return o.some(s=>re(c,s))}catch{return!1}}var rt={type:"CONTENT",shouldActivate(e,t){return io(e,t.currentUrl)},getVariantData(e,t,r){let o=e.data;return{content:t.content,pathnames:o?.pathnames,handlerActivated:!0}}};function ao(e,t){let o=e.data?.pathnames||[];if(!o.length)return!0;try{let c=new URL(t,"https://example.com").pathname;return o.some(s=>re(c,s))}catch{return!1}}var mr={type:"CUSTOM_CODE",shouldActivate(e,t){return ao(e,t.currentUrl)},getVariantData(e,t,r){let o=e.data;return{customCode:t.customCode,pathnames:o?.pathnames,excludePathnames:o?.excludePathnames,handlerActivated:!0}}};ve(pr);ve(Kt);ve(rt);ve(mr);function so(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 c,p=new URLSearchParams(window.location.search).get("variant");return p&&(c=p),{currentUrl:t,productHandle:o,variantId:c,selectors:e,currencyCode:"USD"}}function bn(e){let{config:t,previewState:r,selectors:o}=Et(),[n,c]=_e.default.useState(null),[s,p]=_e.default.useState(!0),d=_e.default.useMemo(()=>t&&t.tests.find(a=>a.testId===e)||null,[t,e]),g=_e.default.useMemo(()=>r||fe(),[r]),i=_e.default.useRef(null),l=_e.default.useRef(null);return _e.default.useEffect(()=>{let a=!0;if(t===null)return;if(!d){i.current!==e&&(i.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),a&&p(!1);return}if(!d.enabled&&!g?.isPreview){i.current!==`${e}-disabled`&&(i.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),a&&p(!1);return}let u=J(e);if(!u){a&&p(!1);return}let f=d.variations.find(b=>b.id===u);if(!f){a&&p(!1);return}let _=tt(d.type),x=so(o),w={...f};if(_?.shouldActivate(d,x)){let b=`${e}-${f.id}`;_.applyEffect&&l.current!==b&&(l.current=b,_.applyEffect(d,f,x));let C=_.getVariantData(d,f,x);w={...w,...C}}return a&&c(w),g?.isPreview||pt(e),a&&p(!1),()=>{a=!1}},[t,d,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 M=at(require("react"),1);ct();We();pe();function gr(e){return e.tests.some(t=>t.type==="CUSTOM_CODE"&&t.enabled)}function hn(e,t,r){if(typeof window>"u")return;if(console.log("[ElevateAB Custom Code] All tests:",e.tests.map(c=>({id:c.testId,type:c.type,enabled:c.enabled}))),!gr(e)){console.log("[ElevateAB Custom Code] No CUSTOM_CODE tests found");return}let o=e.tests.filter(c=>c.type==="CUSTOM_CODE"&&c.enabled);console.log("[ElevateAB Custom Code] Found",o.length,"CUSTOM_CODE tests");let n=[];o.forEach(c=>{let s=J(c.testId);if(console.log("[ElevateAB Custom Code] Test",c.testId,"assigned variant:",s),!s)return;let p=c.variations.find(d=>d.id===s);if(console.log("[ElevateAB Custom Code] Variation data:",p),!p?.customCode){console.log("[ElevateAB Custom Code] No customCode on variation");return}(p.customCode.js||p.customCode.css)&&(console.log("[ElevateAB Custom Code] Adding custom code:",p.customCode),n.push(p.customCode))}),n.length>0?(console.log("[ElevateAB Custom Code] Applying",n.length,"custom code blocks"),Qe(n,r)):console.log("[ElevateAB Custom Code] No custom code to apply")}pe();var St=require("react/jsx-runtime"),co="https://ds0wlyksfn0sb.cloudfront.net/headless";function uo(e){return e.replace(/^https?:\/\//,"").replace(".myshopify.com","")}function yn(e){return`${co}/${uo(e)}.js`}var lo=typeof window<"u"?M.default.useLayoutEffect:M.default.useEffect;function vn({storeId:e,storefrontAccessToken:t,preventFlickering:r=!1,flickerTimeout:o=3e3,nonce:n,children:c}){let[s,p]=M.default.useState(null),[d,g]=M.default.useState(null),[i,l]=M.default.useState(null);M.default.useEffect(()=>{if(typeof window>"u")return;Pt({storeId:e,storefrontAccessToken:t});let w=fe();g(w);let b=ge();l(b)},[e,t]);let a=(0,M.useCallback)(()=>{typeof window<"u"&&window.__eab_reveal&&window.__eab_reveal()},[]);M.default.useEffect(()=>{async function w(){try{let b=typeof window<"u"?fe():null,C=null;if(typeof window<"u"&&window.eab_data)C=window.eab_data;else{let Q=yn(e);C=await new Promise((ne,X)=>{let $=document.createElement("script");$.src=Q,$.async=!0,$.onload=()=>{let m=window.eab_data;$.remove(),m?ne(m):X(new Error("Failed to load config: window.eab_data is undefined"))},$.onerror=()=>{$.remove(),ne({allTests:{},selectors:{selectorsV2:[]}})},document.head.appendChild($)})}if(!C||!C.allTests||Object.keys(C.allTests).length===0){p({tests:[],selectors:void 0}),a();return}if(C.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(C.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),p({tests:[],selectors:void 0}),a();return}if(!(Object.keys(C.allTests||{}).length>0)){p({tests:[],selectors:void 0}),a();return}let F=Er(C);if(ft(F,b),F.tests.some(Q=>Q.type==="SPLIT_URL")&&Re(F,b))return;p(F),a()}catch(b){console.error("[ElevateAB] Failed to load config:",b),p({tests:[],selectors:void 0}),a()}}w()},[e,a]),lo(()=>{if(!s||typeof window>"u")return;let w=()=>{Jr(s)&&Re(s,d)||(Me(s)&&Xe(s,d,n),gr(s)&&hn(s,d,n))};w();let b=Ue(()=>{w()}),C=Me(s)?kt(s,d,n,!1):()=>{};return()=>{b(),C()}},[s,d,n]);let u=M.default.useMemo(()=>({config:s,storeId:e,storefrontAccessToken:t,isPreviewMode:d?.isPreview??!1,previewTestId:d?.previewTestId??null,previewState:d,selectors:s?.selectors,countryCode:i}),[s,e,t,d,i]),f=(0,M.useRef)(!1);M.default.useEffect(()=>{!t&&!f.current&&(f.current=!0,console.warn("[ElevateAB] No storefrontAccessToken provided. Orders won't be attributed to test variants."))},[t]);let _=M.default.useMemo(()=>yn(e),[e]),x=M.default.useMemo(()=>wt({configUrl:_,timeout:r?o:2e3}),[_,r,o]);return(0,St.jsxs)(et.Provider,{value:u,children:[(0,St.jsx)("script",{nonce:n,dangerouslySetInnerHTML:{__html:x}}),c]})}var Ee=require("react");Y();Y();Tt();var fo="https://bitter-river-9c62.support-67d.workers.dev",po="https://d339co84ntxcme.cloudfront.net/Prod/orders";function Ce(){return`sh-${le()}`}function mo(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function go(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function _n({storeId:e,storefrontAccessToken:t,hasLocalizedPaths:r,workerUrl:o=fo,ordersWorkerUrl:n=po,useAnalytics:c}){let s=(0,Ee.useContext)(et),p=e||s?.storeId||"",d=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:l}=c(),{ready:a}=l("Elevate Analytics");return(0,Ee.useEffect)(()=>{if(typeof window>"u")return;if(ce(),Te(),typeof document<"u"){let f=document.referrer||"",_=window.location.href;ut(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=Oe(typeof localStorage<"u"?localStorage.getItem("shopifyCartId"):null),{referrer:R,entryPage:O}=Ie();return{visitorId:ce(),sessionId:Te(),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=Be(z,r),I=Le({referrer:R.referrer,entryPage:R.entryPage,userAgent:O}),B=N("ABTL")||{},G=N("ABAU")||{},ke=mo(B),oe=go(G,B),ie=new Date().toISOString(),de=typeof sessionStorage<"u"?sessionStorage.getItem("eabIsFirstVisit")==="true":!1,xe=V("localization")||"";return{pixel_event_id:h,shop_name:p,timestamp:ie,event_type:m,client_id:R.clientId,visitor_id:R.visitorId,session_id:R.sessionId,cart_token:Ve(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:De(O),is_first_visit:de,shopify_country:xe,cart_currency:S.shop?.currency,ab_test_assignments:ke,ab_test_views:oe,is_first_order:null}},x=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=Ce(),R=_("page_viewed",S,m,h);await x(R)}catch(h){console.error("[ElevateAB] Error handling page_viewed:",h)}},b=async m=>{try{let h=f(m),S=Ce(),O={..._("product_viewed",S,m,h),product_id:te(m?.products?.[0]?.id)||"",product_vendor:P(m?.products?.[0]?.vendor)??"",product_price:v(m?.products?.[0]?.price)??null,product_sku:P(m?.products?.[0]?.sku)??""};await x(O)}catch(h){console.error("[ElevateAB] Error handling product_viewed:",h)}},C=async m=>{try{let h=f(m),S=Ce(),O={..._("product_added_to_cart",S,m,h),product_id:te(m?.currentLine?.merchandise?.product?.id)??"",variant_id:we(m?.currentLine?.merchandise?.id)??"",product_vendor:P(m?.currentLine?.merchandise?.product?.vendor)??"",product_price:v(m?.currentLine?.cost?.totalAmount?.amount)??null,product_quantity:m?.currentLine?.quantity??null,product_sku:P(m?.currentLine?.merchandise?.sku)??""};await x(O);let z=m?.cart?.id;z&&d&&p&&Ze(z,{storefrontAccessToken:d,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=Ce(),O={..._("product_removed_from_cart",S,m,h),product_id:te(m?.prevLine?.merchandise?.product?.id)??"",variant_id:we(m?.prevLine?.merchandise?.id)??"",product_vendor:P(m?.prevLine?.merchandise?.product?.vendor)??"",product_price:v(m?.prevLine?.cost?.totalAmount?.amount)??null,product_quantity:m?.prevLine?.quantity??null,product_sku:P(m?.prevLine?.merchandise?.sku)??""};await x(O)}catch(h){console.error("[ElevateAB] Error handling product_removed_from_cart:",h)}},F=async m=>{try{let h=f(m),S=Ce(),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:we(I?.merchandise?.id)??"",vendor:P(I?.merchandise?.product?.vendor)??"",total_price:v(I?.cost?.totalAmount?.amount)??null,quantity:I?.quantity??null,sku:P(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 x(W)}catch(h){console.error("[ElevateAB] Error handling cart_viewed:",h)}},Q=async m=>{try{let h=f(m),S=Ce(),O={..._("search_submitted",S,m,h),search_query:P(m?.data?.searchResult?.query)??""};await x(O)}catch(h){console.error("[ElevateAB] Error handling search_submitted:",h)}},ne=async m=>{try{let h=f(m),S=Ce(),R=_("checkout_started",S,m,h),O=0,W=(m?.data?.checkout?.lineItems??[]).map(B=>{let G=B?.quantity??0;O+=G;let oe=(B?.discountAllocations??[])?.reduce((ie,de)=>ie+(de?.amount?.amount||0),0);return{product_id:te(B?.variant?.product?.id)??"",variant_id:we(B?.variant?.id)??"",vendor:P(B?.variant?.product?.vendor)??"",total_price:v(B?.finalLinePrice?.amount)??null,quantity:G,sku:P(B?.variant?.sku)??"",total_discount:v(oe)??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 x(I)}catch(h){console.error("[ElevateAB] Error handling checkout_started:",h)}},X=async m=>{try{let h=f(m),S=Ce(),R=_("checkout_completed",S,m,h),O=0,W=(m?.data?.checkout?.lineItems??[]).map(B=>{let G=B?.quantity??0;O+=G;let oe=(B?.discountAllocations??[])?.reduce((ie,de)=>ie+(de?.amount?.amount||0),0);return{product_id:te(B?.variant?.product?.id)??"",variant_id:we(B?.variant?.id)??"",vendor:P(B?.variant?.product?.vendor)??"",total_price:v(B?.finalLinePrice?.amount)??null,quantity:G,sku:P(B?.variant?.sku)??"",total_discount:v(oe)??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",C),i("product_removed_from_cart",L),i("cart_viewed",F),i("search_submitted",Q),i("checkout_started",ne),i("checkout_completed",X)})(),a()},[i,a,p,r,d,o,n]),null}var wo="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});
46
46
  //# sourceMappingURL=index.cjs.map