@elevateab/sdk 1.4.3 → 1.4.5

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