@elevateab/sdk 1.4.1 → 1.4.3

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