@elevateab/sdk 1.2.7 → 1.3.0

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