@elevateab/sdk 1.2.5 → 1.2.6
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 +4 -12
- package/dist/next.cjs.map +1 -1
- package/dist/next.d.cts +56 -36
- package/dist/next.d.ts +56 -36
- package/dist/next.js +8 -16
- package/dist/next.js.map +1 -1
- package/package.json +1 -1
package/dist/next.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var br=Object.create;var Pe=Object.defineProperty;var wr=Object.getOwnPropertyDescriptor;var hr=Object.getOwnPropertyNames;var yr=Object.getPrototypeOf,vr=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(e&&(t=e(e=0)),t);var kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zt=(e,t)=>{for(var o in t)Pe(e,o,{get:t[o],enumerable:!0})},qt=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of hr(t))!vr.call(e,a)&&a!==o&&Pe(e,a,{get:()=>t[a],enumerable:!(s=wr(t,a))||s.enumerable});return e};var ce=(e,t,o)=>(o=e!=null?br(yr(e)):{},qt(t||!e||!e.__esModule?Pe(o,"default",{value:e,enumerable:!0}):o,e)),_r=e=>qt(Pe({},"__esModule",{value:!0}),e);function Ke(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 Xe(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 Ae=se(()=>{"use strict"});var $t=kr((de,Ce)=>{"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",j="embedded",ze=500,be="Amazon",H="Apple",Ct="ASUS",Et="BlackBerry",we="Browser",he="Chrome",lr="Edge",ye="Firefox",ve="Google",St="Honor",It="Huawei",pr="Lenovo",ke="LG",qe="Microsoft",$e="Motorola",je="Nvidia",Ut="OnePlus",te="Opera",Ge="OPPO",re="Samsung",Rt="Sharp",oe="Sony",We="Xiaomi",He="Zebra",Lt="Facebook",Ot="Chromium OS",Vt="Mac OS",Bt=" Browser",fr=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},Dt=function(y,v){return typeof y===l?ne(v).indexOf(ne(y))!==-1:!1},ne=function(y){return y.toLowerCase()},mr=function(y){return typeof y===l?y.replace(/[^\d\.]/g,s).split(".")[0]:t},Je=function(y,v){if(typeof y===l)return y=y.replace(/^\s\s*/,s),typeof v===d?y:y.substring(0,ze)},ie=function(y,v){for(var h=0,P,F,B,k,b,D;h<v.length&&!b;){var Ye=v[h],Mt=v[h+1];for(P=F=0;P<Ye.length&&!b&&Ye[P];)if(b=Ye[P++].exec(y),b)for(B=0;B<Mt.length;B++)D=b[++F],k=Mt[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}},ae=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(Dt(v[h][P],y))return h===a?t:h}else if(Dt(v[h],y))return h===a?t:h;return v.hasOwnProperty("*")?v["*"]:y},gr={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Nt={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"},Ft={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,te+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[c,te+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[c,te]],[/\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,te+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[c,te+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI"+Bt]],[/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"+Bt],u],[/samsungbrowser\/([\w\.]+)/i],[u,[c,re+" 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,Lt],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,ae,gr]],[/(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,ne]],[/ 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,ne]]],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,re],[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,re],[n,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[r,[i,H],[n,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[r,[i,H],[n,g]],[/(macintosh);/i],[r,[i,H]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[r,[i,Rt],[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,St],[n,g]],[/honor([-\w ]+)[;\)]/i],[r,[i,St],[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,It],[n,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[r,[i,It],[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,We],[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,We],[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,Ge],[n,m]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[r,[i,ae,{OnePlus:["304","403","203"],"*":Ge}],[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,pr],[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,oe],[n,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[r,"Xperia Tablet"],[i,oe],[n,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[r,[i,Ut],[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,Et],[n,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[r,[i,Ct],[n,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[r,[i,Ct],[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,ne],r,[n,ae,{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,qe],[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,je],[n,g]],[/(sprint) (\w+)/i],[i,r,[n,m]],[/(kin\.[onetw]{3})/i],[[r,/\./g," "],[i,qe],[n,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[r,[i,He],[n,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[r,[i,He],[n,m]],[/smart-tv.+(samsung)/i],[i,[n,x]],[/hbbtv.+maple;(\d+)/i],[[r,/^/,"SmartTV"],[i,re],[n,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[i,ke],[n,x]],[/(apple) ?tv/i],[i,[r,H+" 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,je],[n,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[r,[i,Rt],[n,x]],[/(bravia[\w ]+)( bui|\))/i],[r,[i,oe],[n,x]],[/(mi(tv|box)-?\w+) bui/i],[r,[i,We],[n,x]],[/Hbbtv.*(technisat) (.*);/i],[i,r,[n,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[i,Je],[r,Je],[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,je],[n,_]],[/(playstation \w+)/i],[r,[i,oe],[n,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[r,[i,qe],[n,_]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[r,[i,re],[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,Ge],[n,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[r,[i,H],[n,E]],[/(opwwe\d{3})/i],[r,[i,Ut],[n,E]],[/(moto 360)/i],[r,[i,$e],[n,E]],[/(smartwatch 3)/i],[r,[i,oe],[n,E]],[/(g watch r)/i],[r,[i,ke],[n,E]],[/droid.+; (wt63?0{2,3})\)/i],[r,[i,He],[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,Lt],[n,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[i,[n,j]],[/(aeobc)\b/i],[r,[i,be],[n,j]],[/(homepod).+mac os/i],[r,[i,H],[n,j]],[/windows iot/i],[[n,j]],[/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,lr+"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,ae,Nt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[u,ae,Nt],[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,Vt],[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,Et]],[/(?: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,Ot],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?fr(Ft,v):Ft,k=h&&h.userAgent==P;return this.getBrowser=function(){var b={};return b[c]=t,b[u]=t,ie.call(b,P,B.browser),b[w]=mr(b[u]),k&&h&&h.brave&&typeof h.brave.isBrave==p&&(b[c]="Brave"),b},this.getCPU=function(){var b={};return b[T]=t,ie.call(b,P,B.cpu),b},this.getDevice=function(){var b={};return b[i]=t,b[r]=t,b[n]=t,ie.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,ie.call(b,P,B.engine),b},this.getOS=function(){var b={};return b[c]=t,b[u]=t,ie.call(b,P,B.os),k&&!b[c]&&F&&F.platform&&F.platform!="Unknown"&&(b[c]=F.platform.replace(/chrome os/i,Ot).replace(/macos/i,Vt)),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>ze?Je(b,ze):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,j]),L.ENGINE=L.OS=_e([c,u]),typeof de!==d?(typeof Ce!==d&&Ce.exports&&(de=Ce.exports=L),de.UAParser=L):typeof define===p&&define.amd?define(function(){return L}):typeof e!==d&&(e.UAParser=L);var J=typeof e!==d&&(e.jQuery||e.Zepto);if(J&&!J.ua){var xe=new L;J.ua=xe.getResult(),J.ua.get=function(){return xe.getUA()},J.ua.set=function(y){xe.setUA(y);var v=xe.getResult();for(var h in v)J.ua[h]=v[h]}}})(typeof window=="object"?window:de)});function Y(){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 Q(e,t){typeof sessionStorage>"u"||sessionStorage.setItem(e,JSON.stringify(t))}function G(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}function rt(e){let t=G(e);return t?JSON.parse(t):null}function Gt(){let e=I("eabUserId");return e||(e=Y(),N("eabUserId",e)),e}function K(){return Gt()}function Wt(){let e=G("eabSessionId");return e||(e=Y(),Q("eabSessionId",e)),e}function Le(){return Wt()}function Oe(){return{referrer:G("eabReferrer")||"",entryPage:G("eabEntry")||""}}var V=se(()=>{"use strict"});function le(){return O("ABTL")||{}}function Ht(e){N("ABTL",JSON.stringify(e))}function ot(e){return le()[e]||null}function Jt(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 Er(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=Ke(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=Jt(e,f);return{...l,isA:w===0,isB:w===1,isC:w===2,isD:w===3}}function nt(e,t,o){let s=ot(e);if(s){let l=t.variations.findIndex(w=>w.id===s);if(l!==-1){let w=t.variations[l],r=Jt(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=Er(a,o);let f=le();return f[e]=d.id,Ht(f),d}function it(e){let t=e.testTrafficPercentage;return typeof t!="number"||ot(e.testId)?!0:Math.random()*100<t}var Ve=se(()=>{"use strict";V();Ae()});var Be,at=se(()=>{"use strict";Be=`#graphql
|
|
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 se=(e,t)=>()=>(e&&(t=e(e=0)),t);var yr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),zt=(e,t)=>{for(var o in t)Pe(e,o,{get:t[o],enumerable:!0})},qt=(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)):{},qt(t||!e||!e.__esModule?Pe(o,"default",{value:e,enumerable:!0}):o,e)),vr=e=>qt(Pe({},"__esModule",{value:!0}),e);function Ke(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 Xe(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=se(()=>{"use strict"});var jt=yr((ue,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",ze=500,be="Amazon",H="Apple",Ct="ASUS",Et="BlackBerry",we="Browser",he="Chrome",ur="Edge",ye="Firefox",ve="Google",St="Honor",It="Huawei",dr="Lenovo",ke="LG",qe="Microsoft",je="Motorola",$e="Nvidia",Ut="OnePlus",te="Opera",Ge="OPPO",re="Samsung",Rt="Sharp",oe="Sony",We="Xiaomi",He="Zebra",Ot="Facebook",Lt="Chromium OS",Vt="Mac OS",Bt=" 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},Dt=function(y,v){return typeof y===l?ne(v).indexOf(ne(y))!==-1:!1},ne=function(y){return y.toLowerCase()},pr=function(y){return typeof y===l?y.replace(/[^\d\.]/g,s).split(".")[0]:t},Je=function(y,v){if(typeof y===l)return y=y.replace(/^\s\s*/,s),typeof v===d?y:y.substring(0,ze)},ie=function(y,v){for(var h=0,P,F,B,k,b,D;h<v.length&&!b;){var Ye=v[h],Mt=v[h+1];for(P=F=0;P<Ye.length&&!b&&Ye[P];)if(b=Ye[P++].exec(y),b)for(B=0;B<Mt.length;B++)D=b[++F],k=Mt[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}},ae=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(Dt(v[h][P],y))return h===a?t:h}else if(Dt(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","?":"/"},Nt={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"},Ft={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,te+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[c,te+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[c,te]],[/\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,te+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[c,te+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI"+Bt]],[/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"+Bt],u],[/samsungbrowser\/([\w\.]+)/i],[u,[c,re+" 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,ae,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,ne]],[/ 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,ne]]],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,re],[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,re],[n,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[r,[i,H],[n,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[r,[i,H],[n,g]],[/(macintosh);/i],[r,[i,H]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[r,[i,Rt],[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,St],[n,g]],[/honor([-\w ]+)[;\)]/i],[r,[i,St],[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,It],[n,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[r,[i,It],[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,We],[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,We],[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,Ge],[n,m]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[r,[i,ae,{OnePlus:["304","403","203"],"*":Ge}],[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,je],[n,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[r,[i,je],[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,oe],[n,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[r,"Xperia Tablet"],[i,oe],[n,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[r,[i,Ut],[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,Et],[n,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[r,[i,Ct],[n,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[r,[i,Ct],[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,ne],r,[n,ae,{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,qe],[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,$e],[n,g]],[/(sprint) (\w+)/i],[i,r,[n,m]],[/(kin\.[onetw]{3})/i],[[r,/\./g," "],[i,qe],[n,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[r,[i,He],[n,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[r,[i,He],[n,m]],[/smart-tv.+(samsung)/i],[i,[n,x]],[/hbbtv.+maple;(\d+)/i],[[r,/^/,"SmartTV"],[i,re],[n,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[i,ke],[n,x]],[/(apple) ?tv/i],[i,[r,H+" 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,$e],[n,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[r,[i,Rt],[n,x]],[/(bravia[\w ]+)( bui|\))/i],[r,[i,oe],[n,x]],[/(mi(tv|box)-?\w+) bui/i],[r,[i,We],[n,x]],[/Hbbtv.*(technisat) (.*);/i],[i,r,[n,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[i,Je],[r,Je],[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,$e],[n,_]],[/(playstation \w+)/i],[r,[i,oe],[n,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[r,[i,qe],[n,_]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[r,[i,re],[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,Ge],[n,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[r,[i,H],[n,E]],[/(opwwe\d{3})/i],[r,[i,Ut],[n,E]],[/(moto 360)/i],[r,[i,je],[n,E]],[/(smartwatch 3)/i],[r,[i,oe],[n,E]],[/(g watch r)/i],[r,[i,ke],[n,E]],[/droid.+; (wt63?0{2,3})\)/i],[r,[i,He],[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,H],[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,ae,Nt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[u,ae,Nt],[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,Vt],[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,Et]],[/(?: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,Lt],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]]},O=function(y,v){if(typeof y===f&&(v=y,y=t),!(this instanceof O))return new O(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(Ft,v):Ft,k=h&&h.userAgent==P;return this.getBrowser=function(){var b={};return b[c]=t,b[u]=t,ie.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,ie.call(b,P,B.cpu),b},this.getDevice=function(){var b={};return b[i]=t,b[r]=t,b[n]=t,ie.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,ie.call(b,P,B.engine),b},this.getOS=function(){var b={};return b[c]=t,b[u]=t,ie.call(b,P,B.os),k&&!b[c]&&F&&F.platform&&F.platform!="Unknown"&&(b[c]=F.platform.replace(/chrome os/i,Lt).replace(/macos/i,Vt)),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>ze?Je(b,ze):b,this},this.setUA(P),this};O.VERSION=o,O.BROWSER=_e([c,u,w]),O.CPU=_e([T]),O.DEVICE=_e([r,i,n,_,m,x,g,E,$]),O.ENGINE=O.OS=_e([c,u]),typeof ue!==d?(typeof Ee!==d&&Ee.exports&&(ue=Ee.exports=O),ue.UAParser=O):typeof define===p&&define.amd?define(function(){return O}):typeof e!==d&&(e.UAParser=O);var J=typeof e!==d&&(e.jQuery||e.Zepto);if(J&&!J.ua){var xe=new O;J.ua=xe.getResult(),J.ua.get=function(){return xe.getUA()},J.ua.set=function(y){xe.setUA(y);var v=xe.getResult();for(var h in v)J.ua[h]=v[h]}}})(typeof window=="object"?window:ue)});function Y(){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 L(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 Q(e,t){typeof sessionStorage>"u"||sessionStorage.setItem(e,JSON.stringify(t))}function G(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}function rt(e){let t=G(e);return t?JSON.parse(t):null}function Gt(){let e=I("eabUserId");return e||(e=Y(),N("eabUserId",e)),e}function K(){return Gt()}function Wt(){let e=G("eabSessionId");return e||(e=Y(),Q("eabSessionId",e)),e}function Le(){return Wt()}function Ve(){return{referrer:G("eabReferrer")||"",entryPage:G("eabEntry")||""}}var V=se(()=>{"use strict"});function de(){return L("ABTL")||{}}function Ht(e){N("ABTL",JSON.stringify(e))}function ot(e){return de()[e]||null}function Jt(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=Ke(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=Jt(e,f);return{...l,isA:w===0,isB:w===1,isC:w===2,isD:w===3}}function nt(e,t,o){let s=ot(e);if(s){let l=t.variations.findIndex(w=>w.id===s);if(l!==-1){let w=t.variations[l],r=Jt(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=de();return f[e]=d.id,Ht(f),d}function it(e){let t=e.testTrafficPercentage;return typeof t!="number"||ot(e.testId)?!0:Math.random()*100<t}var Be=se(()=>{"use strict";V();Ce()});var De,at=se(()=>{"use strict";De=`#graphql
|
|
3
3
|
mutation cartAttributesUpdate($cartId: ID!, $attributes: [AttributeInput!]!) {
|
|
4
4
|
cartAttributesUpdate(cartId: $cartId, attributes: $attributes) {
|
|
5
5
|
cart {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
`});var Kt={};zt(Kt,{cleanupCartAttributes:()=>Yt,getCartAttributesPayload:()=>st,updateCartAttributes:()=>ct});function st(){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 ct(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=st(),s=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,a=t.storefrontApiUrl||`https://${Qt()}/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:Be,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 Yt(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://${Qt()}/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:Be,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 Qt(){return typeof window>"u"?"":window.location.hostname}var De=se(()=>{"use strict";Ve();V();at()});var $r={};zt($r,{AntiFlickerScript:()=>sr,ElevateNextProvider:()=>or,ProductViewTracker:()=>ir,clearPreviewMode:()=>bt,extractShopifyId:()=>R,extractShopifyType:()=>Ze,getCountryCode:()=>$,getFlickerPreventionScript:()=>Fe,getPreviewState:()=>Z,isInPreviewMode:()=>wt,isShopifyGid:()=>et,matchesGeoTargeting:()=>ht,trackAddToCart:()=>ut,trackCartView:()=>lt,trackCheckoutCompleted:()=>mt,trackCheckoutStarted:()=>ft,trackPageView:()=>pe,trackProductView:()=>fe,trackRemoveFromCart:()=>dt,trackSearchSubmitted:()=>pt,useElevateConfig:()=>ue,useExperiment:()=>Tt});module.exports=_r($r);var ge=require("react");var U=ce(require("react"),1);var Qe=ce(require("react"),1),Te=Qe.default.createContext(null);function ue(){let e=Qe.default.useContext(Te);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}Ae();function R(e){return e?e.includes("gid://")&&e.split("/").pop()||e:""}function Ze(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function et(e){return!!e&&e.startsWith("gid://shopify/")}var tt=ce($t(),1),jt={"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 Ee(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,o=e.match(t);return o?o[1]:null}function Se(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 Pr(e){let t={};return e.searchParams.forEach((o,s)=>{t[s]||(t[s]=o)}),t}function Tr(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function Ar(e){return e.replace(/^www\./,"")}function Cr(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&&Tr(a)){if(p=a.hostname,o&&o===p)return"Direct"}else return""}catch{}if(!p)return"";let d=Ar(p);return d?jt[d]?jt[d]:d?.includes("google")?"Google":d:""}function Ie(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=Pr(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,tt.UAParser)(s),f=d?.browser?.name,l=xr(f);a.browser_info=l??"",a.os_info=d?.os?.name??"",s&&(a.device_type=(d?.device?.type||"desktop")?.toUpperCase()??"")}return a.referrer_source=Cr(t,a?.browser_info,p)??"",a}catch{return a}}function Ue(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 Re(e){if(!e)return"";try{let t=(0,tt.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 gt=require("react"),Sr="https://bitter-river-9c62.support-67d.workers.dev",Ir="https://d339co84ntxcme.cloudfront.net/Prod/orders",S=null;function X(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 Ur(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,o])=>({test_id:t,variant_id:o}))}function Rr(e,t){return Object.entries(e).filter(([o])=>typeof t[o]=="string").map(([o])=>({test_id:o,variant_id:t[o]}))}function Lr(){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"||Lr())return null;let s=navigator.userAgent,a=window.location.pathname,p=Ue(a,o),{referrer:d,entryPage:f}=Oe(),l=Ie({referrer:d,entryPage:f,userAgent:s}),w=O("ABTL")||{},r=O("ABAU")||{},c=Ur(w),n=Rr(r,w),i=Ee(localStorage.getItem("shopifyCartId")),u=new Date().toISOString(),T=sessionStorage.getItem("eabIsFirstVisit")==="true",_=I("localization")||"";return{pixel_event_id:`sh-${Y()}`,shop_name:e,timestamp:u,event_type:t,client_id:I("_shopify_y")||void 0,visitor_id:K(),session_id:Le(),cart_token:Se(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:Re(s),is_first_visit:T,shopify_country:_,ab_test_assignments:c,ab_test_views:n,is_first_order:null}}async function q(e,t=Sr){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 ut(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(()=>(De(),Kt));await T(w,{storefrontAccessToken:n})}catch(T){console.error("[ElevateAB] Failed to update cart attributes:",T)}}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}=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 lt(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 pt(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 ft(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 mt(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??Ir,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 Or(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 Z(){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}=Or(a);return e.has("eabUserPreview")&&N("eabUserPreview","true"),e.has("abtid")&&s&&Q("eabPreviewTestId",s),{isPreview:o,previewTestId:s,forcedAssignments:p,previewedViews:d}}function bt(){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 wt(){return Z().isPreview}V();var Ne={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function $(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return N(Ne.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let o=I(Ne.SHOPIFY_LOCALIZATION);if(o)return o.toUpperCase();let s=I(Ne.EAB_COUNTRY);if(s)return s.toUpperCase();if(typeof localStorage<"u"){let a=localStorage.getItem(Ne.EAB_COUNTRY);if(a)return a.toUpperCase()}return null}function Xt(e,t){let o=t??$();return o?e.map(a=>a.toUpperCase()).includes(o.toUpperCase()):!1}function Zt(e,t){let o=t??$();return o?e.map(a=>a.toUpperCase()).includes(o.toUpperCase()):!1}function ht(e){let t=$();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&Zt(e.excludeCountries,t)?!1:e.includeCountries?.length?Xt(e.includeCountries,t):!0}var W="eab-prevent-flicker",yt="eab-flicker-styles";function er(e=3e3){if(typeof document>"u"||document.getElementById(yt))return;let t=document.createElement("style");t.id=yt,t.textContent=`
|
|
18
|
+
`});var Kt={};zt(Kt,{cleanupCartAttributes:()=>Yt,getCartAttributesPayload:()=>st,updateCartAttributes:()=>ct});function st(){let e=de(),t=L("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 ct(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=st(),s=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,a=t.storefrontApiUrl||`https://${Qt()}/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 Yt(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://${Qt()}/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 Qt(){return typeof window>"u"?"":window.location.hostname}var Ne=se(()=>{"use strict";Be();V();at()});var Fr={};zt(Fr,{AntiFlickerScript:()=>Tt,ElevateNextProvider:()=>or,ProductViewTracker:()=>ir,clearPreviewMode:()=>bt,extractShopifyId:()=>R,extractShopifyType:()=>Ze,getCountryCode:()=>j,getFlickerPreventionScript:()=>fe,getPreviewState:()=>Z,isInPreviewMode:()=>wt,isShopifyGid:()=>et,matchesGeoTargeting:()=>ht,trackAddToCart:()=>ut,trackCartView:()=>lt,trackCheckoutCompleted:()=>mt,trackCheckoutStarted:()=>ft,trackPageView:()=>le,trackProductView:()=>pe,trackRemoveFromCart:()=>dt,trackSearchSubmitted:()=>pt,useElevateConfig:()=>ce,useExperiment:()=>Pt});module.exports=vr(Fr);var ge=require("react");var U=Te(require("react"),1);var Qe=Te(require("react"),1),Ae=Qe.default.createContext(null);function ce(){let e=Qe.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 Ze(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function et(e){return!!e&&e.startsWith("gid://shopify/")}var tt=Te(jt(),1),$t={"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?$t[d]?$t[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,tt.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 Oe(e){if(!e)return"";try{let t=(0,tt.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 gt=require("react"),Cr="https://bitter-river-9c62.support-67d.workers.dev",Er="https://d339co84ntxcme.cloudfront.net/Prod/orders",S=null;function X(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=L("ABTL")||{},r=L("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-${Y()}`,shop_name:e,timestamp:u,event_type:t,client_id:I("_shopify_y")||void 0,visitor_id:K(),session_id:Le(),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:Oe(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 le(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 pe(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 ut(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(),Kt));await T(w,{storefrontAccessToken:n})}catch(T){console.error("[ElevateAB] Failed to update cart attributes:",T)}}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}=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 lt(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 pt(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 ft(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 mt(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 Z(){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&&Q("eabPreviewTestId",s),{isPreview:o,previewTestId:s,forcedAssignments:p,previewedViews:d}}function bt(){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 wt(){return Z().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 Xt(e,t){let o=t??j();return o?e.map(a=>a.toUpperCase()).includes(o.toUpperCase()):!1}function Zt(e,t){let o=t??j();return o?e.map(a=>a.toUpperCase()).includes(o.toUpperCase()):!1}function ht(e){let t=j();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&Zt(e.excludeCountries,t)?!1:e.includeCountries?.length?Xt(e.includeCountries,t):!0}var W="eab-prevent-flicker",yt="eab-flicker-styles";function er(e=3e3){if(typeof document>"u"||document.getElementById(yt))return;let t=document.createElement("style");t.id=yt,t.textContent=`
|
|
19
19
|
/* Elevate AB - Flicker Prevention */
|
|
20
20
|
.${W} {
|
|
21
21
|
opacity: 0 !important;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
.${W} {
|
|
31
31
|
animation: eab-reveal 0s ${e}ms forwards;
|
|
32
32
|
}
|
|
33
|
-
`;let o=document.head||document.getElementsByTagName("head")[0];o.insertBefore(t,o.firstChild)}function tr(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.add(W)}function vt(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.remove(W)}function kt(e="body",t=3e3){if(typeof document>"u")return()=>{};er(t),tr(e);let o=!1,s=setTimeout(()=>{o||(console.warn(`[ElevateAB] Flicker prevention timeout (${t}ms) reached. Revealing content. Check if test assignment is completing.`),vt(e),o=!0)},t);return()=>{o||(clearTimeout(s),vt(e),o=!0)}}function
|
|
33
|
+
`;let o=document.head||document.getElementsByTagName("head")[0];o.insertBefore(t,o.firstChild)}function tr(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.add(W)}function vt(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.remove(W)}function kt(e="body",t=3e3){if(typeof document>"u")return()=>{};er(t),tr(e);let o=!1,s=setTimeout(()=>{o||(console.warn(`[ElevateAB] Flicker prevention timeout (${t}ms) reached. Revealing content. Check if test assignment is completing.`),vt(e),o=!0)},t);return()=>{o||(clearTimeout(s),vt(e),o=!0)}}function fe(e=3e3){return`
|
|
34
34
|
(function() {
|
|
35
35
|
var style = document.createElement('style');
|
|
36
36
|
style.id = '${yt}';
|
|
@@ -38,13 +38,5 @@
|
|
|
38
38
|
document.head.insertBefore(style, document.head.firstChild);
|
|
39
39
|
document.body && document.body.classList.add('${W}');
|
|
40
40
|
})();
|
|
41
|
-
`.trim()}var rr=require("react/jsx-runtime"),
|
|
42
|
-
(function() {
|
|
43
|
-
var style = document.createElement('style');
|
|
44
|
-
style.id = '${Nr}';
|
|
45
|
-
style.textContent = '.${xt}{opacity:0!important;pointer-events:none!important}@keyframes eab-reveal{to{opacity:1;pointer-events:auto}}.${xt}{animation:eab-reveal 0s ${e}ms forwards}';
|
|
46
|
-
document.head.insertBefore(style, document.head.firstChild);
|
|
47
|
-
document.body && document.body.classList.add('${xt}');
|
|
48
|
-
})();
|
|
49
|
-
`.trim();return(0,cr.jsx)(ar.default,{id:"elevate-anti-flicker",strategy:"beforeInteractive",children:t})}Ae();V();Ve();V();function ur(e){let t=O("ABAU")||{};t[e]||(t[e]=!0,N("ABAU",JSON.stringify(t)))}function dr(e){let t=rt("ABAV")||{};t[e]||(t[e]=!0,Q("ABAV",t))}function Pt(e){ur(e),dr(e)}De();at();var ee=ce(require("react"),1);V();Ve();function Tt(e){let{config:t}=ue(),[o,s]=ee.default.useState(null),[a,p]=ee.default.useState(!0),d=ee.default.useMemo(()=>t&&t.tests.find(l=>l.testId===e)||null,[t,e]),f=ee.default.useRef(null);return ee.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(!it(d)){p(!1);return}let l=K(),w=nt(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 Fr=require("react/jsx-runtime");var At=require("react");V();V();De();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});
|
|
41
|
+
`.trim()}var rr=require("react/jsx-runtime"),Or=!1,Lr={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 _t({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=kt("body",s)),()=>{c.current&&c.current()}),[o,s]),U.default.useEffect(()=>{typeof window>"u"||X({storeId:e,storefrontAccessToken:t})},[e,t]),U.default.useEffect(()=>{if(typeof window>"u")return;let T=Z();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(!Or){let $=Xe(Lr);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=Xe(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(()=>{X({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,rr.jsx)(Ae.Provider,{value:i,children:a})}var Me=require("next/navigation");var me=require("react/jsx-runtime");function Vr({currency:e}){let t=(0,Me.usePathname)(),o=(0,Me.useSearchParams)();return(0,ge.useEffect)(()=>{o.get("eabUserPreview")!=="true"&&le({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)(()=>{X({storeId:e,storefrontAccessToken:t})},[e,t]),(0,me.jsxs)(_t,{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&&pe({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=L("ABAU")||{};t[e]||(t[e]=!0,N("ABAU",JSON.stringify(t)))}function sr(e){let t=rt("ABAV")||{};t[e]||(t[e]=!0,Q("ABAV",t))}function xt(e){ar(e),sr(e)}Ne();at();var ee=Te(require("react"),1);V();Be();function Pt(e){let{config:t}=ce(),[o,s]=ee.default.useState(null),[a,p]=ee.default.useState(!0),d=ee.default.useMemo(()=>t&&t.tests.find(l=>l.testId===e)||null,[t,e]),f=ee.default.useRef(null);return ee.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(!it(d)){p(!1);return}let l=K(),w=nt(e,d,l);w&&(s(w),xt(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 Tt({timeout:e=3e3}){return(0,cr.jsx)("script",{dangerouslySetInnerHTML:{__html:fe(e)}})}var At=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});
|
|
50
42
|
//# sourceMappingURL=next.cjs.map
|