PageSourceSearch

https://www.worldofbooks.com/cdn/shop/t/183/assets/faro.js?v=118806548626866429071777034859

js worldofbooks.com collected 2026-09-24 08:49:41 UTC 89,530 bytes, 31 lines download raw bytes

1(()=>{var Vo=Object.create,zi=Object.defineProperty,zo=Object.getOwnPropertyDescriptor,Go=Object.getOwnPropertyNames,qo=Object.getPrototypeOf,Ho=Object.prototype.hasOwnProperty,Yo=(t,e,i)=>e in t?zi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ko=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$o=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Go(e))!Ho.call(t,r)&&r!==i&&zi(t,r,{get:()=>e[r],enumerable:!(n=zo(e,r))||n.enumerable});return t},Wo=(t,e,i)=>(i=t!=null?Vo(qo(t)):{},$o(e||!t||!t.__esModule?zi(i,"default",{value:t,enumerable:!0}):i,t)),he=(t,e,i)=>Yo(t,typeof e!="symbol"?e+"":e,i),gr=Ko((wt,ai)=>{(function(t,e){"use strict";var i="1.0.41",n="",r="?",o="function",a="undefined",u="object",p="string",m="major",s="model",d="name",c="type",l="vendor",f="version",h="architecture",v="console",g="mobile",b="tablet",N="smarttv",y="wearable",_="embedded",E=500,S="Amazon",R="Apple",K="ASUS",ft="BlackBerry",ve="Browser",Ee="Chrome",mt="Edge",oe="Firefox",Se="Google",je="Honor",Fe="Huawei",Ct="Lenovo",me="LG",$="Microsoft",Be="Motorola",Te="Nvidia",gt="OnePlus",ht="Opera",Li="OPPO",bt="Samsung",Xn="Sharp",vt="Sony",ji="Xiaomi",Fi="Zebra",Jn="Facebook",Qn="Chromium OS",Zn="Mac OS",er=" Browser",jo=function(w,O){var x={};for(var U in w)O[U]&&O[U].length%2===0?x[U]=O[U].concat(w[U]):x[U]=w[U];return x},Dt=function(w){for(var O={},x=0;x<w.length;x++)O[w[x].toUpperCase()]=w[x];return O},tr=function(w,O){return typeof w===p?Et(O).indexOf(Et(w))!==-1:!1},Et=function(w){return w.toLowerCase()},Fo=function(w){return typeof w===p?w.replace(/[^\d\.]/g,n).split(".")[0]:e},Bi=function(w,O){if(typeof w===p)return w=w.replace(/^\s\s*/,n),typeof O===a?w:w.substring(0,E)},St=function(w,O){for(var x=0,U,ge,se,k,T,ae;x<O.length&&!T;){var Vi=O[x],rr=O[x+1];for(U=ge=0;U<Vi.length&&!T&&Vi[U];)if(T=Vi[U++].exec(w),T)for(se=0;se<rr.length;se++)ae=T[++ge],k=rr[se],typeof k===u&&k.length>
vendor: 13,338 bytes, line 1
10?k.length===2?typeof k[1]==o?this[k[0]]=k[1].call(this,ae):this[k[0]]=k[1]:k.length===3?typeof k[1]===o&&!(k[1].exec&&k[1].test)?this[k[0]]=ae?k[1].call(this,ae,k[2]):e:this[k[0]]=ae?ae.replace(k[1],k[2]):e:k.length===4&&(this[k[0]]=ae?k[3].call(this,ae.replace(k[1],k[2])):e):this[k]=ae||e;x+=2}},Tt=function(w,O){for(var x in O)if(typeof O[x]===u&&O[x].length>0){for(var U=0;U<O[x].length;U++)if(tr(O[x][U],w))return x===r?e:x}else if(tr(O[x],w))return x===r?e:x;return O.hasOwnProperty("*")?O["*"]:w},Bo={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},ir={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"},nr={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,f],[/opios[\/ ]+([\w\.]+)/i],[f,[d,ht+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[d,ht+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[d,ht]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[d,"UC"+ve]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[d,"Smart Lenovo "+ve]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+ve],f],[/\bfocus\/([\w\.]+)/i],[f,[d,oe+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[d,ht+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[d,ht+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[d,"MIUI"+er]],[/fxios\/([\w\.-]+)/i],[f,[d,oe]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+er],f],[/samsungbrowser\/([\w\.]+)/i],[f,[d,bt+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,Jn],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[d,Ee+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,Ee+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[d,"Android "+ve]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[f,Tt,Bo]],[/(webkit|khtml)\/([\w\.]+)/i],[d,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[d,oe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[d,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[f,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[h,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[h,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[h,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[h,/ower/,n,Et]],[/ sun4\w[;\)]/i],[[h,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[h,Et]]],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],[s,[l,bt],[c,b]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[s,[l,bt],[c,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[s,[l,R],[c,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[l,R],[c,b]],[/(macintosh);/i],[s,[l,R]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[l,Xn],[c,g]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[s,[l,je],[c,b]],[/honor([-\w ]+)[;\)]/i],[s,[l,je],[c,g]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[s,[l,Fe],[c,b]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[s,[l,Fe],[c,g]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[s,/_/g," "],[l,ji],[c,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[s,/_/g," "],[l,ji],[c,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[l,Li],[c,g]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[s,[l,Tt,{OnePlus:["304","403","203"],"*":Li}],[c,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[l,"Vivo"],[c,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[s,[l,"Realme"],[c,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[l,Be],[c,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[l,Be],[c,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[l,me],[c,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[l,me],[c,g]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[s,[l,Ct],[c,b]],[/(nokia) (t[12][01])/i],[l,s,[c,b]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[s,/_/g," "],[c,g],[l,"Nokia"]],[/(pixel (c|tablet))\b/i],[s,[l,Se],[c,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[l,Se],[c,g]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[l,vt],[c,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[l,vt],[c,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[l,gt],[c,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[l,S],[c,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[l,S],[c,g]],[/(playbook);[-\w\),; ]+(rim)/i],[s,l,[c,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[l,ft],[c,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[l,K],[c,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[l,K],[c,g]],[/(nexus 9)/i],[s,[l,"HTC"],[c,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[l,[s,/_/g," "],[c,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[s,[l,"TCL"],[c,b]],[/(itel) ((\w+))/i],[[l,Et],s,[c,Tt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[l,"Acer"],[c,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[l,"Meizu"],[c,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[s,[l,"Ulefone"],[c,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[s,[l,"Energizer"],[c,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[s,[l,"Cat"],[c,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[s,[l,"Smartfren"],[c,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[s,[l,"Nothing"],[c,g]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[s,[l,"Archos"],[c,b]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[s,[l,"Archos"],[c,g]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[l,s,[c,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[l,s,[c,g]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[l,s,[c,b]],[/(surface duo)/i],[s,[l,$],[c,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[l,"Fairphone"],[c,g]],[/(u304aa)/i],[s,[l,"AT&T"],[c,g]],[/\bsie-(\w*)/i],[s,[l,"Siemens"],[c,g]],[/\b(rct\w+) b/i],[s,[l,"RCA"],[c,b]],[/\b(venue[\d ]{2,7}) b/i],[s,[l,"Dell"],[c,b]],[/\b(q(?:mv|ta)\w+) b/i],[s,[l,"Verizon"],[c,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[l,"Barnes & Noble"],[c,b]],[/\b(tm\d{3}\w+) b/i],[s,[l,"NuVision"],[c,b]],[/\b(k88) b/i],[s,[l,"ZTE"],[c,b]],[/\b(nx\d{3}j) b/i],[s,[l,"ZTE"],[c,g]],[/\b(gen\d{3}) b.+49h/i],[s,[l,"Swiss"],[c,g]],[/\b(zur\d{3}) b/i],[s,[l,"Swiss"],[c,b]],[/\b((zeki)?tb.*\b) b/i],[s,[l,"Zeki"],[c,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[l,"Dragon Touch"],s,[c,b]],[/\b(ns-?\w{0,9}) b/i],[s,[l,"Insignia"],[c,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[l,"NextBook"],[c,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[l,"Voice"],s,[c,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[l,"LvTel"],s,[c,g]],[/\b(ph-1) /i],[s,[l,"Essential"],[c,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[l,"Envizen"],[c,b]],[/\b(trio[-\w\. ]+) b/i],[s,[l,"MachSpeed"],[c,b]],[/\btu_(1491) b/i],[s,[l,"Rotor"],[c,b]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[s,[l,Te],[c,b]],[/(sprint) (\w+)/i],[l,s,[c,g]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[l,$],[c,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[l,Fi],[c,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[l,Fi],[c,g]],[/smart-tv.+(samsung)/i],[l,[c,N]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[l,bt],[c,N]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[l,me],[c,N]],[/(apple) ?tv/i],[l,[s,R+" TV"],[c,N]],[/crkey/i],[[s,Ee+"cast"],[l,Se],[c,N]],[/droid.+aft(\w+)( bui|\))/i],[s,[l,S],[c,N]],[/(shield \w+ tv)/i],[s,[l,Te],[c,N]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[s,[l,Xn],[c,N]],[/(bravia[\w ]+)( bui|\))/i],[s,[l,vt],[c,N]],[/(mi(tv|box)-?\w+) bui/i],[s,[l,ji],[c,N]],[/Hbbtv.*(technisat) (.*);/i],[l,s,[c,N]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[l,Bi],[s,Bi],[c,N]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[s,[c,N]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,N]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[l,s,[c,v]],[/droid.+; (shield)( bui|\))/i],[s,[l,Te],[c,v]],[/(playstation \w+)/i],[s,[l,vt],[c,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[l,$],[c,v]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[s,[l,bt],[c,y]],[/((pebble))app/i,/(asu
1s|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[l,s,[c,y]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[s,[l,Li],[c,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[s,[l,R],[c,y]],[/(opwwe\d{3})/i],[s,[l,gt],[c,y]],[/(moto 360)/i],[s,[l,Be],[c,y]],[/(smartwatch 3)/i],[s,[l,vt],[c,y]],[/(g watch r)/i],[s,[l,me],[c,y]],[/droid.+; (wt63?0{2,3})\)/i],[s,[l,Fi],[c,y]],[/droid.+; (glass) \d/i],[s,[l,Se],[c,y]],[/(pico) (4|neo3(?: link|pro)?)/i],[l,s,[c,y]],[/; (quest( \d| pro)?)/i],[s,[l,Jn],[c,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[l,[c,_]],[/(aeobc)\b/i],[s,[l,S],[c,_]],[/(homepod).+mac os/i],[s,[l,R],[c,_]],[/windows iot/i],[[c,_]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[s,[c,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[c,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[c,g]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[s,[l,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[d,mt+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[d,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,f],[/ladybird\//i],[[d,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,f],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[d,[f,Tt,ir]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,Tt,ir],[d,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,Zn],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,d],[/(ubuntu) ([\w\.]+) like android/i],[[d,/(.+)/,"$1 Touch"],f],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[d,f],[/\(bb(10);/i],[f,[d,ft]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[f,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[d,oe+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[d,Ee+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,Qn],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,f],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,f]]},W=function(w,O){if(typeof w===u&&(O=w,w=e),!(this instanceof W))return new W(w,O).getResult();var x=typeof t!==a&&t.navigator?t.navigator:e,U=w||(x&&x.userAgent?x.userAgent:n),ge=x&&x.userAgentData?x.userAgentData:e,se=O?jo(nr,O):nr,k=x&&x.userAgent==U;return this.getBrowser=function(){var T={};return T[d]=e,T[f]=e,St.call(T,U,se.browser),T[m]=Fo(T[f]),k&&x&&x.brave&&typeof x.brave.isBrave==o&&(T[d]="Brave"),T},this.getCPU=function(){var T={};return T[h]=e,St.call(T,U,se.cpu),T},this.getDevice=function(){var T={};return T[l]=e,T[s]=e,T[c]=e,St.call(T,U,se.device),k&&!T[c]&&ge&&ge.mobile&&(T[c]=g),k&&T[s]=="Macintosh"&&x&&typeof x.standalone!==a&&x.maxTouchPoints&&x.maxTouchPoints>2&&(T[s]="iPad",T[c]=b),T},this.getEngine=function(){var T={};return T[d]=e,T[f]=e,St.call(T,U,se.engine),T},this.getOS=function(){var T={};return T[d]=e,T[f]=e,St.call(T,U,se.os),k&&!T[d]&&ge&&ge.platform&&ge.platform!="Unknown"&&(T[d]=ge.platform.replace(/chrome os/i,Qn).replace(/macos/i,Zn)),T},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return U},this.setUA=function(T){return U=typeof T===p&&T.length>E?Bi(T,E):T,this},this.setUA(U),this};W.VERSION=i,W.BROWSER=Dt([d,f,m]),W.CPU=Dt([h]),W.DEVICE=Dt([s,l,c,v,g,N,b,y,_]),W.ENGINE=W.OS=Dt([d,f]),typeof wt!==a?(typeof ai!==a&&ai.exports&&(wt=ai.exports=W),wt.UAParser=W):typeof define===o&&define.amd?define(function(){return W}):typeof t!==a&&(t.UAParser=W);var Ve=typeof t!==a&&(t.jQuery||t.Zepto);if(Ve&&!Ve.ua){var Lt=new W;Ve.ua=Lt.getResult(),Ve.ua.get=function(){return Lt.getUA()},Ve.ua.set=function(w){Lt.setUA(w);var O=Lt.getResult();for(var x in O)Ve.ua[x]=O[x]}}})(typeof window=="object"?window:wt)}),jt=class{constructor(e,i){var n,r;this.signalBuffer=[],this.itemLimit=(n=i?.itemLimit)!==null&&n!==void 0?n:50,this.sendTimeout=(r=i?.sendTimeout)!==null&&r!==void 0?r:250,this.paused=i?.paused||!1,this.sendFn=e,this.flushInterval=-1,this.paused||this.start(),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&this.flush()})}addItem(e){this.paused||(this.signalBuffer.push(e),this.signalBuffer.length>=this.itemLimit&&this.flush())}start(){this.paused=!1,this.sendTimeout>0&&(this.flushInterval=window.setInterval(()=>this.flush(),this.sendTimeout))}pause(){this.paused=!0,clearInterval(this.flushInterval)}groupItems(e){let i=new Map;return e.forEach(n=>{let r=JSON.stringify(n.meta),o=i.get(r);o===void 0?o=[n]:o=[...o,n],i.set(r,o)}),Array.from(i.values())}flush(){this.paused||this.signalBuffer.length===0||(this.groupItems(this.signalBuffer).forEach(this.sendFn),this.signalBuffer=[])}},M;(function(t){t.EXCEPTION="exception",t.LOG="log",t.MEASUREMENT="measurement",t.TRACE="trace",t.EVENT="event"})(M||(M={}));var Ft={[M.EXCEPTION]:"exceptions",[M.LOG]:"logs",[M.MEASUREMENT]:"measurements",[M.TRACE]:"traces",[M.EVENT]:"events"};function Gi(t,e,i,n){var r;e.debug("Initializing transports");let o=[],a=i.paused,u=[],p=(..._)=>{e.debug("Adding transports"),_.forEach(E=>{if(e.debug(`Adding "${E.name}" transport`),o.some(R=>R===E)){e.warn(`Transport ${E.name} is already added`);return}E.unpatchedConsole=t,E.internalLogger=e,E.config=i,E.metas=n,o.push(E)})},m=(..._)=>{e.debug(`Adding beforeSendHooks
2`,u),_.forEach(E=>{E&&u.push(E)})},s=_=>{let E=_;
2for(let S of u){let R=E.map(S).filter(Boolean);if(R.length===0)return[];E=Xo(R,i)}return E},d=_=>{let E=s(_);if(E.length!==0)for(let S of o)e.debug(`Transporting item using ${S.name}
3`,E),S.isBatched()&&S.send(E)},c=_=>{var E,S;if(!((E=i.batching)===null||E===void 0)&&E.enabled&&o.every(K=>K.isBatched()))return;let[R]=s([_]);if(R!==void 0)for(let K of o)e.debug(`Transporting item using ${K.name}
4`,R),K.isBatched()?!((S=i.batching)===null||S===void 0)&&S.enabled||K.send([R]):K.send(R)},l;return!((r=i.batching)===null||r===void 0)&&r.enabled&&(l=new jt(d,{sendTimeout:i.batching.sendTimeout,itemLimit:i.batching.itemLimit,paused:a})),{add:p,addBeforeSendHooks:m,getBeforeSendHooks:()=>[...u],execute:_=>{var E;a||(!((E=i.batching)===null||E===void 0)&&E.enabled&&l?.addItem(_),c(_))},isPaused:()=>a,pause:()=>{e.debug("Pausing transports"),l?.pause(),a=!0},remove:(..._)=>{e.debug("Removing transports"),_.forEach(E=>{e.debug(`Removing "${E.name}" transport`);let S=o.indexOf(E);if(S===-1){e.warn(`Transport "${E.name}" is not added`);return}o.splice(S,1)})},removeBeforeSendHooks:(..._)=>{u.filter(E=>!_.includes(E))},get transports(){return[...o]},unpause:()=>{e.debug("Unpausing transports"),l?.start(),a=!1}}}function Xo(t,e){if(e.preserveOriginalError)for(let i of t)i.type===M.EXCEPTION&&delete i.payload.originalError;return t}function Bt(t){return Math.min(1,Math.max(0,t))}function X(t,e){return typeof t===e}function ze(t,e){return Object.prototype.toString.call(t)===`[object ${e}]`}function Vt(t,e){try{return t instanceof e}catch{return!1}}var Q=t=>X(t,"null"),Z=t=>X(t,"string"),zt=t=>X(t,"number")&&!isNaN(t)||X(t,"bigint"),Gt=t=>X(t,"boolean"),j=t=>!Q(t)&&X(t,"object"),ee=t=>X(t,"function"),le=t=>ze(t,"Array"),qt=t=>!j(t)&&!ee(t),qi=typeof Event<"u",Ht=t=>qi&&Vt(t,Event),Hi=typeof Error<"u",Ae=t=>Hi&&Vt(t,Error),Yt=t=>ze(t,"ErrorEvent"),Kt=t=>ze(t,"DOMError"),$t=t=>ze(t,"DOMException");function F(t){return t==null?!0:le(t)||Z(t)?t.length===0:j(t)?Object.keys(t).length===0:!1}function z(t,e){if(t===e)return!0;if(X(t,"number")&&isNaN(t))return X(e,"number")&&isNaN(e);let i=le(t),n=le(e);if(i!==n)return!1;if(i&&n){let a=t.length;if(a!==e.length)return!1;for(let u=a;u--!==0;)if(!z(t[u],e[u]))return!1;return!0}let r=j(t),o=j(e);if(r!==o)return!1;if(t&&e&&r&&o){let a=Object.keys(t),u=Object.keys(e),p=a.length,m=u.length;if(p!==m)return!1;for(let s of a)if(!u.includes(s))return!1;for(let s of a)if(!z(t[s],e[s]))return!1;return!0}return!1}function te(){return Date.now()}function ce(){return new Date().toISOString()}function xe(t){return new Date(t).toISOString()}var V;(function(t){t.TRACE="trace",t.DEBUG="debug",t.INFO="info",t.LOG="log",t.WARN="warn",t.ERROR="error"})(V||(V={}));var Wt=V.LOG,Xt=[V.TRACE,V.DEBUG,V.INFO,V.LOG,V.WARN,V.ERROR];function q(){}function Jt(t){let{size:e,concurrency:i}=t,n=[],r=0,o=()=>{if(r<i&&n.length){let{producer:u,resolve:p,reject:m}=n.shift();r++,u().then(s=>{r--,o(),p(s)},s=>{r--,o(),m(s)})}};return{add:u=>{if(n.length+r>=e)throw new Error("Task buffer full");return new Promise((p,m)=>{n.push({producer:u,resolve:p,reject:m}),o()})}}}var or="abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789";function G(t=10){return Array.from(Array(t)).map(()=>or[Math.floor(Math.random()*or.length)]).join("")}var ie=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:void 0;function sr(t){return ie?.[`__faroBundleId_${t}`]}function Yi(){let t=new WeakSet;return function(e,i){if(j(i)&&i!==null){if(t.has(i))return null;t.add(i)}return i}}function ne(t={}){return JSON.stringify(t??{},Yi())}function H(t={}){let e={};for(let[i,n]of Object.entries(t))e[i]=j(n)&&n!==null?ne(n):String(n);return e}var P=class t{constructor(){this.subscribers=[]}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>this.unsubscribe(e)}}unsubscribe(e){this.subscribers=this.subscribers.filter(i=>i!==e)}notify(e){this.subscribers.forEach(i=>i(e))}first(){let e=new t,i=o=>
4{e.notify(o),n.unsubscribe()},n=this.subscribe(i),r=e.unsubscribe.bind(e);return this.withUnsubscribeOverride(e,r,i)}takeWhile(e){let i=new t,n=o=>{e(o)?i.notify(o):i.unsubscribe(n)};this.subscribe(n);let r=i.unsubscribe.bind(i);return this.withUnsubscribeOverride(i,r,n)}filter(e){let i=new t,n=o=>{e(o)&&i.notify(o)};this.subscribe(n);let r=i.unsubscribe.bind(i);return this.withUnsubscribeOverride(i,r,n)}merge(...e){let i=new t,n=[];e.forEach(o=>{let a=o.subscribe(u=>{i.notify(u)});n.push(a)});let r=i.unsubscribeAll.bind(i);return i.unsubscribe=()=>{n.forEach(o=>o.unsubscribe()),r()},i}withUnsubscribeOverride(e,i,n){return e.unsubscribe=r=>{i(r),this.unsubscribe(n)},e}unsubscribeAll(){this.subscribers=[]}},re;(function(t){t[t.OFF=0]="OFF",t[t.ERROR=1]="ERROR",t[t.WARN=2]="WARN",t[t.INFO=3]="INFO",t[t.VERBOSE=4]="VERBOSE"})(re||(re={}));var as="Faro",ke={debug:q,error:q,info:q,prefix:as,warn:q},Ge=re.ERROR,J=Object.assign({},console),Qt=J;function Ki(t){var e;return Qt=(e=t.unpatchedConsole)!==null&&e!==void 0?e:Qt,Qt}function qe(t=J,e=Ge){let i=ke;return e>re.OFF&&(i.error=e>=re.ERROR?function(...n){t.error(`${i.prefix}
5`,...n)}:q,i.warn=e>=re.WARN?function(...n){t.warn(`${i.prefix}
6`,...n)}:q,i.info=e>=re.INFO?function(...n){t.info(`${i.prefix}
7`,...n)}:q,i.debug=e>=re.VERBOSE?function(...n){t.debug(`${i.prefix}
8`,...n)}:q),i}var $i=ke;function Wi(t,e){return $i=qe(t,e.internalLoggerLevel),$i}var Ne=class{constructor(){this.unpatchedConsole=J,this.internalLogger=ke,this.config={},this.metas={}}logDebug(...e){this.internalLogger.debug(`${this.name}
9`,...e)}logInfo(...e){this.internalLogger.info(`${this.name}
10`,...e)}logWarn(...e){this.internalLogger.warn(`${this.name}
11`,...e)}logError(...e){this.internalLogger.error(`${this.name}
12`,...e)}},He=class extends Ne{isBatched(){return!1}getIgnoreUrls(){return[]}};function Xi(t){t.transports.add(...t.config.transports),t.transports.addBeforeSendHooks(t.config.beforeSend)}function ls(t,e){var i,n;if(e===void 0)return t;if(t===void 0)return{resourceSpans:e};let r=(i=t.resourceSpans)===null||i===void 0?void 0:i[0];if(r===void 0)return t;let o=r?.scopeSpans||[],a=((n=e?.[0])===null||n===void 0?void 0:n.scopeSpans)||[];return Object.assign(Object.assign({},t),{resourceSpans:[Object.assign(Object.assign({},r),{scopeSpans:[...o,...a]})]})}function Zt(t){let e={meta:{}};return t[0]!==void 0&&(e.meta=t[0].meta),t.forEach(i=>{switch(i.type){case M.LOG:case M.EVENT:case M.EXCEPTION:case M.MEASUREMENT:{let n=Ft[i.type],r=e[n];e=Object.assign(Object.assign({},e),{[n]:r===void 0?[i.payload]:[...r,i.payload]});break}case M.TRACE:{e=Object.assign(Object.assign({},e),{traces:ls(e.traces,i.payload.resourceSpans)});break}}}),e}var ar="faroApiCall",lr="user_action_start",Ye={Normal:"normal",Critical:"critical"},cr="faro.user.action",A;(function(t){t[t.Started=0]="Started",t[t.Halted=1]="Halted",t[t.Cancelled=2]="Cancelled",t[t.Ended=3]="Ended"})(A||(A={}));var ei=class{constructor(){this.buffer=[]}addItem(e){this.buffer.push(e)}flushBuffer(e){if(ee(e))for(let i of this.buffer)e(i);this.buffer.length=0}size(){return this.buffer.length}},xt=class extends P{constructor({name:e,parentId:i,trigger:n,transports:r,attributes:o,trackUserActionsExcludeItem:a,importance:u=Ye.Normal,pushEvent:p}){super(),this.name=e,this.attributes=o,this.id=G(),this.trigger=n,this.parentId=i??this.id,this.trackUserActionsExcludeItem=a,this.importance=u,this._pushEvent=p,this._itemBuffer=new ei,this._transports=r,this._state=A.Started,this._start()}addItem(e){return this._state===A.Started?(this._itemBuffer.addItem(e),!0):!1}_start(){this._state=A.Started,this._state===A.Started&&(this.startTime=te())}halt(){this._state===A.Started&&(this._state=A.Halted,this.notify(this._state))}cancel(){this._state===A.Started&&this._itemBuffer.flushBuffer(e=>{this._transports.execute(e)}),this._state=A.Cancelled,this.notify(this._state)}end(){if(this._state===A.Cancelled)return;let e=te(),i=e-this.startTime;this._state=A.Ended,this._itemBuffer.flushBuffer(n=>{if(cs(n,this.trackUserActionsExcludeItem)){this._transports.execute(n);return}let r=Object.assign(Object.assign({},n),{payload:Object.assign(Object.assign({},n.payload),{action:{parentId:this.id,name:this.name}})});this._transports.execute(r)}),this._state=A.Ended,this.notify(this._state),this._pushEvent(cr,Object.assign({userActionName:this.name,userActionStartTime:this.startTime.toString(),userActionEndTime:e.toString(),userActionDuration:i.toString(),userActionTrigger:this.trigger,userActionImportance:this.importance},H(this.attributes)),void 0,{timestampOverwriteMs:this.startTime,customPayloadTransformer:n=>(n.action={id:this.id,name:this.name},n)})}getState(){return this._state}};function cs(t,e){return e?.(t)||t.type===M.MEASUREMENT&&t.payload.type==="web-vitals"}var Ke=new P;function Ji({transports:t,internalLogger:e,config:i,pushEvent:n}){var r;let o=(r=i.userActionsInstrumentation)===null||r===void 0?void 0:r.excludeItem,a,u=(s,d,c)=>{if(p()===void 0){let f=new xt({name:s,transports:t,attributes:d,trigger:c?.triggerName||ar,importance:c?.importance||Ye.Normal,trackUserActionsExcludeItem:o,pushEvent:n});return f.filter(h=>[A.Ended,A.Cancelled].includes(h)).first().subscribe(()=>{a=void 0}),Ke.notify({type:lr,userAction:f}),a=f,a}else{e.error("Attempted to create a new user action while one is already running. This is not possible.");return}},p=()=>a;return{startUserAction:u,getActiveUserAction:p}}function ye(t,e){return!t||t?.getState()!==A.Started?!1:(t.addItem(e),!0)}function Qi({internalLogger:t,config:e,metas:i,transports:n,tracesApi:r,userActionsApi:o}){let a=null;return{pushEvent:(p,m,s,{skipDedupe:d,spanContext:c,timestampOverwriteMs:l,customPayloadTransformer:f=h=>h}={})=>{try{let h=H(m),v={meta:i.value,payload:f({name:p,domain:s??e.eventDomain,attributes:F(h)?void 0:h,timestamp:l?xe(l):ce(),trace:c?{trace_id:c.traceId,span_id:c.spanId}:r.getTraceContext()}),type:M.EVENT},g={name:v.payload.name,attributes:v.payload.attributes,domain:v.payload.domain};if(!d&&e.dedupe&&!Q(a)&&z(g,a)){t.debug(`Skipping event push because it is the same as the last one
13`,v.payload);return}a=g,t.debug(`Pushing event
14`,v),ye(o.getActiveUserAction(),v)||n.execute(v)}catch(h){t.error("Error pushing event",h)}}}}var Me="Error",$e=t=>t.map(e=>j(e)?ne(e):String(e)).join(" ");function ur(t,e){return t.some(i=>Z(i)?e.includes(i):!!e.match(i))}var we;function Zi({internalLogger:t,config:e,metas:i,transports:n,tracesApi:r,userActionsApi:o}){var a;t.debug("Initializing exceptions API");let u=null;we=(a=e.parseStacktrace)!==null&&a!==void 0?a:we;let p=l=>{t.debug("Changing stacktrace parser"),we=l??we},m=()=>we,{ignoreErrors:s=[],preserveOriginalError:d}=e,c=(l,{skipDedupe:f,stackFrames:h,type:v,context:g,spanContext:b,timestampOverwriteMs:N,originalError:y,fingerprint:_}={})=>
14{if(!ds(s,y??l))try{let E=H(Object.assign(Object.assign({},us(y??l)),g??{})),S={meta:i.value,payload:Object.assign(Object.assign(Object.assign({type:v||l.name||Me,value:l.message,timestamp:N?xe(N):ce(),trace:b?{trace_id:b.traceId,span_id:b.spanId}:r.getTraceContext()},F(E)?{}:{context:E}),d?{originalError:y}:{}),_?{fingerprint:_}:{}),type:M.EXCEPTION};h=h??(l.stack?we?.(l).frames:void 0),h?.length&&(S.payload.stacktrace={frames:h});let R={type:S.payload.type,value:S.payload.value,stackTrace:S.payload.stacktrace,context:S.payload.context,fingerprint:S.payload.fingerprint};if(!f&&e.dedupe&&!Q(u)&&z(R,u)){t.debug(`Skipping error push because it is the same as the last one
15`,S.payload);return}u=R,t.debug(`Pushing exception
16`,S),ye(o.getActiveUserAction(),S)||n.execute(S)}catch(E){t.error("Error pushing event",E)}};return p(e.parseStacktrace),{changeStacktraceParser:p,getStacktraceParser:m,pushError:c}}function us(t){let e=t.cause;return Ae(e)?e=t.cause.toString():e!==null&&(j(t.cause)||le(t.cause))?e=ne(t.cause):e!=null&&(e=t.cause.toString()),e==null?{}:{cause:e}}function ds(t,e){let{message:i,name:n,stack:r}=e;return ur(t,i+" "+n+" "+r)}var ue=t=>t.map(e=>{try{return String(e)}catch{return""}}).join(" ");function en({internalLogger:t,config:e,metas:i,transports:n,tracesApi:r,userActionsApi:o}){var a;t.debug("Initializing logs API");let u=null,p=(a=e.logArgsSerializer)!==null&&a!==void 0?a:ue;return{pushLog:(s,{context:d,level:c,skipDedupe:l,spanContext:f,timestampOverwriteMs:h}={})=>{try{let v=H(d),g={type:M.LOG,payload:{message:p(s),level:c??Wt,context:F(v)?void 0:v,timestamp:h?xe(h):ce(),trace:f?{trace_id:f.traceId,span_id:f.spanId}:r.getTraceContext()},meta:i.value},b={message:g.payload.message,level:g.payload.level,context:g.payload.context};if(!l&&e.dedupe&&!Q(u)&&z(b,u)){t.debug(`Skipping log push because it is the same as the last one
17`,g.payload);return}u=b,t.debug(`Pushing log
18`,g),ye(o.getActiveUserAction(),g)||n.execute(g)}catch(v){t.error(`Error pushing log
19`,v)}}}}function tn({internalLogger:t,config:e,metas:i,transports:n,tracesApi:r,userActionsApi:o}){t.debug("Initializing measurements API");let a=null;return{pushMeasurement:(p,{skipDedupe:m,context:s,spanContext:d,timestampOverwriteMs:c}={})=>{try{let l=H(s),f={type:M.MEASUREMENT,payload:Object.assign(Object.assign({},p),{trace:d?{trace_id:d.traceId,span_id:d.spanId}:r.getTraceContext(),timestamp:c?xe(c):ce(),context:F(l)?void 0:l}),meta:i.value},h={type:f.payload.type,values:f.payload.values,context:f.payload.context};if(!m&&e.dedupe&&!Q(a)&&z(h,a)){t.debug(`Skipping measurement push because it is the same as the last one
20`,f.payload);return}a=h,t.debug(`Pushing measurement
21`,f),ye(o.getActiveUserAction(),f)||n.execute(f)}catch(l){t.error(`Error pushing measurement
22`,l)}}}}function nn({internalLogger:t,metas:e}){t.debug("Initializing meta API");let i,n,r,o,a=l=>{n&&e.remove(n),n={user:l},e.add(n)},u=(l,f)=>{var h;let v=f?.overrides,g=v?{overrides:Object.assign(Object.assign({},(h=i?.session)===null||h===void 0?void 0:h.overrides),v)}:{};i&&e.remove(i),i={session:Object.assign(Object.assign({},F(l)?void 0:l),g)},e.add(i)},p=()=>e.value.session,m=(l,f)=>{var h;if(f?.overrides&&u(p(),{overrides:f.overrides}),((h=r?.view)===null||h===void 0?void 0:h.name)===l?.name)return;let v=r;r={view:l},e.add(r),v&&e.remove(v)},s=()=>e.value.view,d=l=>{var f;let h=Z(l)?Object.assign(Object.assign({},(f=o?.page)!==null&&f!==void 0?f:c()),{id:l}):l;o&&e.remove(o),o={page:h},e.add(o)},c=()=>e.value.page;return{setUser:a,resetUser:a,setSession:u,resetSession:u,getSession:p,setView:m,getView:s,setPage:d,getPage:c}}function rn(t,e,i,n,r){e.debug("Initializing traces API");let o;return{getOTEL:()=>o,getTraceContext:()=>{let d=o?.trace.getSpanContext(o.context.active());return d?{trace_id:d.traceId,span_id:d.spanId}:void 0},initOTEL:(d,c)=>{e.debug("Initializing OpenTelemetry"),o={trace:d,context:c}},isOTELInitialized:()=>!!o,pushTraces:d=>{try{let c={type:M.TRACE,payload:d,meta:n.value};e.debug(`Pushing trace
23`,c),r.execute(c)}catch(c){e.error(`Error pushing trace
24`,c)}}}}function on(t,e,i,n,r){e.debug("Initializing API");let o=null,u=Ji({transports:r,config:i,internalLogger:e,pushEvent:(d,c,l,f)=>{o?o(d,c,l,f):e.warn("pushEventImpl is not initialized. Event dropped:",{name:d,attributes:c,domain:l,options:f})}}),p=rn(t,e,i,n,r),m={unpatchedConsole:t,internalLogger:e,userActionsApi:u,config:i,metas:n,transports:r,tracesApi:p},s=Qi(m);return o=s.pushEvent,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p),Zi(m)),nn(m)),en(m)),tn(m)),s),u)}var D=class extends Ne{constructor(){super(...arguments),this.api={},this.transports={}}};
24function sn(t,e,i,n,r,o){e.debug("Initializing instrumentations");let a=[];return{add:(...m)=>{e.debug("Adding instrumentations"),m.forEach(s=>{if(e.debug(`Adding "${s.name}" instrumentation`),a.some(c=>c.name===s.name)){e.warn(`Instrumentation ${s.name} is already added`);return}s.unpatchedConsole=t,s.internalLogger=e,s.config=i,s.metas=n,s.transports=r,s.api=o,a.push(s),s.initialize()})},get instrumentations(){return[...a]},remove:(...m)=>{e.debug("Removing instrumentations"),m.forEach(s=>{var d,c;e.debug(`Removing "${s.name}" instrumentation`);let l=a.reduce((f,h,v)=>f===null&&h.name===s.name?v:null,null);if(l===null){e.warn(`Instrumentation "${s.name}" is not added`);return}(c=(d=a[l]).destroy)===null||c===void 0||c.call(d),a.splice(l,1)})}}}function an(t){t.instrumentations.add(...t.config.instrumentations)}function ln(t,e,i){let n=[],r=[],o=()=>n.reduce((d,c)=>Object.assign(d,ee(c)?c():c),{}),a=()=>{if(r.length){let d=o();r.forEach(c=>c(d))}};return{add:(...d)=>{e.debug(`Adding metas
25`,d),n.push(...d),a()},remove:(...d)=>{e.debug(`Removing metas
26`,d),n=n.filter(c=>!d.includes(c)),a()},addListener:d=>{e.debug(`Adding metas listener
27`,d),r.push(d)},removeListener:d=>{e.debug(`Removing metas listener
28`,d),r=r.filter(c=>c!==d)},get value(){return o()}}}var C="2.3.1";function cn(t){var e,i;let n={sdk:{version:C,name:"faro"},app:{bundleId:t.config.app.name&&sr(t.config.app.name)}},r=(e=t.config.sessionTracking)===null||e===void 0?void 0:e.session;r&&t.api.setSession(r),t.config.app&&(n.app=Object.assign(Object.assign({},t.config.app),n.app)),t.config.user&&(n.user=t.config.user),t.config.view&&(n.view=t.config.view),t.metas.add(n,...(i=t.config.metas)!==null&&i!==void 0?i:[])}var ti="_faroInternal";function dr(t){if(t.config.preventGlobalExposure)t.internalLogger.debug("Skipping registering public Faro instance in the global scope");else{if(t.internalLogger.debug(`Registering public faro reference in the global scope using "${t.config.globalObjectKey}" key`),t.config.globalObjectKey in ie){t.internalLogger.warn(`Skipping global registration due to key "${t.config.globalObjectKey}" being used already. Please set "globalObjectKey" to something else or set "preventGlobalExposure" to "true"`);return}Object.defineProperty(ie,t.config.globalObjectKey,{configurable:!1,writable:!1,value:t})}}function ii(t){t.config.isolate?t.internalLogger.debug("Skipping registering internal Faro instance on global object"):(t.internalLogger.debug("Registering internal Faro instance on global object"),Object.defineProperty(ie,ti,{configurable:!1,enumerable:!1,writable:!1,value:t}))}function ni(){return ti in ie}var I={};function un(t,e,i,n,r,o,a){return e.debug("Initializing Faro"),I={api:o,config:i,instrumentations:a,internalLogger:e,metas:n,pause:r.pause,transports:r,unpatchedConsole:t,unpause:r.unpause},ii(I),dr(I),I}function dn(t){let e=Ki(t),i=Wi(e,t);if(ni()&&!t.isolate){i.error('Faro is already registered. Either add instrumentations, transports etc. to the global faro instance or use the "isolate" property');return}i.debug("Initializing");let n=ln(e,i,t),r=Gi(e,i,t,n),o=on(e,i,t,n,r),a=sn(e,i,t,n,r,o),u=un(e,i,t,n,r,o,a);return cn(u),Xi(u),an(u),u}var ri="faro",oi={enabled:!0,sendTimeout:250,itemLimit:50},pr="view_changed",yt="session_start",si="session_resume",fr="session_extend",mr="service_name_override",B="unknown",hr=Wo(gr()),li=()=>{let t=new hr.UAParser,{name:e,version:i}=t.getBrowser(),{name:n,version:r}=t.getOS(),o=t.getUA(),a=navigator.language,u=navigator.userAgent.includes("Mobi"),p=m();return{browser:{name:e??B,version:i??B,os:`${n??B} ${r??B}`,userAgent:o??B,language:a??B,mobile:u,brands:p??B,viewportWidth:`${window.innerWidth}`,viewportHeight:`${window.innerHeight}`}};function m(){if(!(!e||!i)&&"userAgentData"in navigator&&navigator.userAgentData)return navigator.userAgentData.brands}};function ci(t){var e,i,n,r;return{id:(r=(n=(i=(e=I.config)===null||e===void 0?void 0:e.sessionTracking)===null||i===void 0?void 0:i.generateSessionId)===null||n===void 0?void 0:n.call(i))!==null&&r!==void 0?r:G(),attributes:t}}var ui=()=>({sdk:{name:"faro-web",version:C}}),Y={session:"sessionStorage",local:"localStorage"};function pn(t){var e;try{let i;i=window[t];let n="__faro_storage_test__";return i.setItem(n,n),i.removeItem(n),!0}catch(i){return(e=I.internalLogger)===null||e===void 0||e.info(`Web storage of type ${t} is not available. Reason: ${i}`),!1}}function be(t,e){return fn(e)?window[e].getItem(t):null}function Re(t,e,i){if(fn(i))try{window[i].setItem(t,e)}catch{}}function It(t,e){fn(e)&&window[e].removeItem(t)}var di=pn(Y.local),pi=pn(Y.session);function fn(t){return t===Y.local?di:t===Y.session?pi:!1}function _t(t,e){let i=!1,n,r=()=>{if(n==null){i=!1;return}t(...n),n=null,setTimeout(r,e)};return(...o)=>{if(i){n=o;return}t(...o),i=!0,setTimeout(r,e)}}function fs(){return I.transports.transports.flatMap(t=>t.getIgnoreUrls())}function Pe(t=""){return fs().some(e=>t&&t.match(e)!=null)}function br(t){if(Z(t))return t;if(t instanceof URL)return t.href;if(!F(t)&&ee(t?.toString))return t.toString()}var de="com.grafana.faro.session",fi={enabled:!0,persistent:!1,maxSessionPersistenceTime:9e5};function Ue(){var t,e,i;let r=I.config.sessionTracking,o=(i=(e=(t=r?.sampler)===null||t===void 0?void 0:t.call(r,{metas:I.metas.value}))!==null&&e!==void 0?e:r?.samplingRate)!==null&&i!==void 0?i:1,a=typeof o=="number"?Bt(
28o):0;return Math.random()<a}function Ot({sessionId:t,started:e,lastActivity:i,isSampled:n=!0}={}){var r,o;let a=te(),u=(o=(r=I.config)===null||r===void 0?void 0:r.sessionTracking)===null||o===void 0?void 0:o.generateSessionId;return t==null&&(t=typeof u=="function"?u():G()),{sessionId:t,lastActivity:i??a,started:e??a,isSampled:n}}function mn(t){if(t==null)return!1;let e=te();return e-t.started<144e5?e-t.lastActivity<9e5:!1}function We({fetchUserSession:t,storeUserSession:e}){return function({forceSessionExtend:n}={forceSessionExtend:!1}){var r,o,a;if(!t||!e)return;let u=I.config.sessionTracking,p=u?.persistent;if(p&&!di||!p&&!pi)return;let m=t();if(n===!1&&mn(m))e(Object.assign(Object.assign({},m),{lastActivity:te()}));else{let s=Sr(Ot({isSampled:Ue()}),m);e(s),(r=I.api)===null||r===void 0||r.setSession(s.sessionMeta),(o=u?.onSessionChange)===null||o===void 0||o.call(u,(a=m?.sessionMeta)!==null&&a!==void 0?a:null,s.sessionMeta)}}}function Sr(t,e){var i,n,r,o,a,u,p;let m=Object.assign(Object.assign({},t),{sessionMeta:{id:t.sessionId,attributes:ms(Object.assign(Object.assign(Object.assign({},(n=(i=I.config.sessionTracking)===null||i===void 0?void 0:i.session)===null||n===void 0?void 0:n.attributes),(o=(r=I.metas.value.session)===null||r===void 0?void 0:r.attributes)!==null&&o!==void 0?o:{}),{isSampled:t.isSampled.toString()}))}}),s=(u=(a=I.metas.value.session)===null||a===void 0?void 0:a.overrides)!==null&&u!==void 0?u:(p=e?.sessionMeta)===null||p===void 0?void 0:p.overrides;F(s)||(m.sessionMeta.overrides=s);let d=e?.sessionId;return d!=null&&(m.sessionMeta.attributes.previousSession=d),m}function mi({fetchUserSession:t,storeUserSession:e}){let i=!1;return function(r){if(i)return;let o=r.session,a=t(),u=o?.id,p=o?.attributes,m=o?.overrides,s=a?.sessionMeta,d=s?.overrides,c=!!m&&!z(m,d),l=!!p&&!z(p,s?.attributes);if(o&&u!==a?.sessionId||l||c){let h=Sr(Ot({sessionId:u,isSampled:Ue()}),a);e(h),gs(c,m,d),i=!0;try{I.api.setSession(h.sessionMeta)}finally{i=!1}}}}function ms(t){let e={};for(let i of Object.keys(t)){let n=t[i];n!==void 0&&(e[i]=n)}return e}function gs(t,e={},i={}){var n,r,o;if(!t)return;let a=e.serviceName,u=(o=(n=i.serviceName)!==null&&n!==void 0?n:(r=I.metas.value.app)===null||r===void 0?void 0:r.name)!==null&&o!==void 0?o:"";a&&a!==u&&I.api.pushEvent(mr,{serviceName:a,previousServiceName:u})}var Ie=class t{constructor(){this.updateSession=_t(()=>this.updateUserSession(),1e3),this.updateUserSession=We({fetchUserSession:t.fetchUserSession,storeUserSession:t.storeUserSession}),this.init()}static removeUserSession(){It(de,t.storageTypeLocal)}static storeUserSession(e){Re(de,ne(e),t.storageTypeLocal)}static fetchUserSession(){let e=be(de,t.storageTypeLocal);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&this.updateSession()}),I.metas.addListener(mi({fetchUserSession:t.fetchUserSession,storeUserSession:t.storeUserSession}))}};Ie.storageTypeLocal=Y.local;var Xe=class t{constructor(){this.updateSession=_t(()=>this.updateUserSession(),1e3),this.updateUserSession=We({fetchUserSession:t.fetchUserSession,storeUserSession:t.storeUserSession}),this.init()}static removeUserSession(){It(de,t.storageTypeSession)}static storeUserSession(e){Re(de,ne(e),t.storageTypeSession)}static fetchUserSession(){let e=be(de,t.storageTypeSession);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&this.updateSession()}),I.metas.addListener(mi({fetchUserSession:t.fetchUserSession,storeUserSession:t.storeUserSession}))}};Xe.storageTypeSession=Y.session;function kt(t){return t?.persistent?Ie:Xe}var Je=class extends D{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-session",this.version=C}sendSessionStartEvent(e){var i,n;let r=e.session;if(r&&r.id!==((i=this.notifiedSession)===null||i===void 0?void 0:i.id)){if(this.notifiedSession&&this.notifiedSession.id===((n=r.attributes)===null||n===void 0?void 0:n.previousSession)){this.api.pushEvent(fr,{},void 0,{skipDedupe:!0}),this.notifiedSession=r;return}this.notifiedSession=r,this.api.pushEvent(yt,{},void 0,{skipDedupe:!0})}}createInitialSession(e,i){var n,r,o,a,u,p;let m=e.fetchUserSession();if(i.persistent&&i.maxSessionPersistenceTime&&m){let c=te();m.lastActivity<c-i.maxSessionPersistenceTime&&(Ie.removeUserSession(),m=null)}let s,d;if(mn(m)){let c=m?.sessionId;d=Ot({sessionId:c,isSampled:m.isSampled||!1,started:m?.started});let l=m?.sessionMeta,f=Object.assign(Object.assign({},(n=i.session)===null||n===void 0?void 0:n.overrides),l?.overrides);d.sessionMeta=Object.assign(Object.assign({},i.session),{id:c,attributes:Object.assign(Object.assign(Object.assign({},(r=i.session)===null||r===void 0?void 0:r.attributes),l?.attributes),{isSampled:d.isSampled.toString()}),overrides:f}),s=si}else{let c=(a=(o=i.session)===null||o===void 0?void 0:o.id)!==null&&a!==void 0?a:ci().id;d=Ot({sessionId:c,isSampled:Ue()});let l=(u=i.session)===null||u===void 0?void 0:u.overrides;d.sessionMeta=Object.assign({id:c,attributes:Object.assign({isSampled:d.isSampled.toString()},(p=i.session)===null||p===void 0?void 0:p.attributes)},l?{overrides:l}:{}),s=yt}return{initialSession:d,lifecycleType:s}}registerBeforeSendHook(e){var i;let{updateSession:n}=new e;(i=this.transports)===null||i===void 0||i.addBeforeSendHooks(r=>{var o,a,u;n();let p=(o=r.meta.session)===null||o===void 0?void 0:o.attributes;if(p&&p?.isSampled==="true"){let m=JSON.parse(JSON.stringify(r)),s=(a=m.meta.session)===null||a===void 0?void 0:a.attributes;return s==null||delete s.isSampled,Object.keys(s??{}).length===0&&((u=m.meta.session)===null||u===void 0||delete u.attributes),m}return null})}initialize(){this.logDebug("init session instrumentation");let e=this.config.sessionTracking;if(e?.enabled){let i=kt(e);this.registerBeforeSendHook(i);let{initialSession:n,lifecycleType:r}=this.createInitialSession(i,e);i.storeUserSession(n);let o=n.sessionMeta;this.notifiedSession=o,this.api.setSession(o),r===yt&&this.api.pushEvent(yt,{},void 0,{skipDedupe:!0}),r===si&&this.api.pushEvent(si,{},void 0,{skipDedupe:!0})}this.metas.addListener(this.sendSessionStartEvent.bind(this))}},Tr="resource-entry",Ce="http-request-start",De="http-request-end",gn="dom-mutation",xr="console",gi,yr=!1;
28function wr(t){if(gi||(gi=new P),!yr){let e=t??J;Xt.forEach(i=>{console[i]=(...n)=>{var r;gi.notify({type:xr,level:i,args:n}),(r=e[i])===null||r===void 0||r.apply(console,n)}}),yr=!0}return gi}var Ir="Non-Error promise rejection captured with value:",_r="UnhandledRejection",Or="DOMError",Ar="DOMException",kr="Non-Error exception captured with keys:",Nr="?",Mr=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Rr(t){var e,i;let n=t.match(Mr),r=(e=n?.[1])!==null&&e!==void 0?e:Me;return[(i=n?.[2])!==null&&i!==void 0?i:t,r]}var hn=`
29`,Pr="eval",Ur="?",bn="@",Cr=/^\s*at (?:(?![a-z]+:\/\/)([^(]+?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Dr=/\((\S*)(?::(\d+))(?::(\d+))\)/,Lr="eval",vn="address at ",jr=vn.length,Fr=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Br=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Vr=" > eval",En="safari-extension",Sn="safari-web-extension",zr=/Minified React error #\d+;/i;function Le(t,e,i,n){let r={filename:t||document.location.href,function:e||Ur};return i!==void 0&&(r.lineno=i),n!==void 0&&(r.colno=n),r}function Nt(t,e){let i=t?.includes(En),n=!i&&t?.includes(Sn);return!i&&!n?[t,e]:[t?.includes(bn)?t.split(bn)[0]:t,i?`${En}:${e}`:`${Sn}:${e}`]}function _e(t){let e=[];t.stacktrace?e=t.stacktrace.split(hn).filter((n,r)=>r%2===0):t.stack&&(e=t.stack.split(hn));let i=e.reduce((n,r,o)=>{let a,u,p,m,s;if(a=Cr.exec(r)){if(u=a[1],p=a[2],m=a[3],s=a[4],p?.startsWith(Lr)){let d=Dr.exec(p);d&&(p=d[1],m=d[2],s=d[3])}p=p?.startsWith(vn)?p.substring(jr):p,[u,p]=Nt(u,p)}else if(a=Fr.exec(r)){if(u=a[1],p=a[3],m=a[4],s=a[5],p&&p.includes(Vr)){let d=Br.exec(p);d&&(u=u||Pr,p=d[1],m=d[2])}else o===0&&!s&&zt(t.columnNumber)&&(s=String(t.columnNumber+1));[u,p]=Nt(u,p)}return(p||u)&&n.push(Le(p,u,m?Number(m):void 0,s?Number(s):void 0)),n},[]);return zr.test(t.message)?i.slice(1):i}function Mt(t){return{frames:_e(t)}}function Tn(t){let e,i,n=[],r,o;if(Yt(t)&&t.error)e=t.error.message,i=t.error.name,n=_e(t.error);else if((r=Kt(t))||$t(t)){let{name:a,message:u}=t;i=a??(r?Or:Ar),e=u?`${i}: ${u}`:i}else Ae(t)?(e=t.message,n=_e(t)):(j(t)||(o=Ht(t)))&&(i=o?t.constructor.name:void 0,e=`${kr} ${Object.keys(t)}`);return[e,i,n]}function xn(t){let[e,i,n,r,o]=t,a,u,p=[],m=Z(e),s=Le(i,Nr,n,r);return o||!m?([a,u,p]=Tn(o??e),p.length===0&&(p=[s])):m&&([a,u]=Rr(e),p=[s]),{value:a,type:u,stackFrames:p}}function yn(t,e){return Ae(t[0])?xn(t):{value:e(t)}}var Oe=class t extends D{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-console",this.version=C,this.errorSerializer=ue}initialize(){var e,i;let n=this.config.consoleInstrumentation,r=n?.serializeErrors||!!n?.errorSerializer;this.errorSerializer=r?(e=n?.errorSerializer)!==null&&e!==void 0?e:$e:ue;let o=(i=n?.disabledLevels)!==null&&i!==void 0?i:t.defaultDisabledLevels,a=wr(this.unpatchedConsole);this.subscription=a.subscribe(({level:u,args:p})=>{if(!o.includes(u))try{if(u===V.ERROR&&!n?.consoleErrorAsLog){let{value:m,type:s,stackFrames:d}=yn(p,this.errorSerializer);if(m&&!s&&!d){this.api.pushError(new Error(t.consoleErrorPrefix+m));return}this.api.pushError(new Error(t.consoleErrorPrefix+m),{type:s,stackFrames:d})}else if(u===V.ERROR&&n?.consoleErrorAsLog){let{value:m,type:s,stackFrames:d}=yn(p,this.errorSerializer);this.api.pushLog(m?[t.consoleErrorPrefix+m]:p,{level:u,context:{value:m??"",type:s??"",stackFrames:d?.length?$e(d):""}})}else this.api.pushLog(p,{level:u})}catch(m){this.logError(m)}})}destroy(){var e;(e=this.subscription)===null||e===void 0||e.unsubscribe(),this.subscription=void 0}};Oe.defaultDisabledLevels=[V.DEBUG,V.TRACE,V.LOG],Oe.consoleErrorPrefix="console.error: ";function Gr(t){let e=window.onerror;window.onerror=(...i)=>{try{let{value:n,type:r,stackFrames:o}=xn(i),a=i[4];if(n){let u={type:r,stackFrames:o};a!=null&&(u.originalError=a),t.pushError(new Error(n),u)}}finally{e?.apply(window,i)}}}var bs=[];function qr(t){let e=i=>{var n,r;let o=i;o.reason?o=i.reason:!((n=i.detail)===null||n===void 0)&&n.reason&&(o=(r=i.detail)===null||r===void 0?void 0:r.reason);let a,u,p=[];qt(o)?(a=`${Ir} ${String(o)}`,u=_r):[a,u,p]=Tn(o),a&&t.pushError(new Error(a),{type:u,stackFrames:p})};window.addEventListener("unhandledrejection",e),bs.push(e)}var Qe=class extends D{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-errors",this.version=C}initialize(){this.logDebug("Initializing"),Gr(this.api),qr(this.api)}},Ze=class extends D{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-view",this.version=C}sendViewChangedEvent(e){var i,n,r,o;let a=e.view;a&&a.name!==((i=this.notifiedView)===null||i===void 0?void 0:i.name)&&(this.api.pushEvent(pr,{fromView:(r=(n=this.notifiedView)===null||n===void 0?void 0:n.name)!==null&&r!==void 0?r:B,toView:(o=a.name)!==null&&o!==void 0?o:B},void 0,{skipDedupe:!0}),this.notifiedView=a)}initialize(){this.metas.addListener(this.sendViewChangedEvent.bind(this))}},bi=class{constructor(){he(this,"t"),he(this,"o",0),he(this,"i",[])}u(e){if(e.hadRecentInput)return;let i=this.i[0],n=this.i.at(-1);this.o&&i&&n&&e.startTime-n.startTime<1e3&&e.startTime-i.startTime<5e3?(this.o+=e.value,this.i.push(e)):(this.o=e.value,this.i=[e]),this.t?.(e)}},nt=()=>{let t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},vi=t=>{if(document.readyState==="loading")return"loading";let e=nt();if(e){if(t<e.domInteractive)return"loading";if(e.domContentLoadedEventStart===0||t<e.domContentLoadedEventStart)return"dom-interactive";if(e.domComplete===0||t<e.domComplete)return"dom-content-loaded"}return"complete"},vs=t=>{let e=t.nodeName;return t.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},Nn=t=>{let e="";try{for(;t?.nodeType!==9;){let i=t,n=i.id?"#"+i.id:[vs(i),...Array.from(i.classList).sort()].join(".");if(e.length+n.length>99)return e||n;if(e=e?n+">"+e:n,i.id)break;t=i.parentNode}}catch{}return e},wn=new WeakMap;function tt(t,e){return wn.get(t)||wn.set(t,new e),wn.get(t)}var eo=-1,to=()=>eo,rt=t=>{addEventListener("pageshow",e=>{e.persisted&&(eo=e.timeStamp,t(e))},!0)},pe=(t,e,i,n)=>{let r,o;return a=>{e.value>
29=0&&(a||n)&&(o=e.value-(r??0),(o||r===void 0)&&(r=e.value,e.delta=o,e.rating=((u,p)=>u>p[1]?"poor":u>p[0]?"needs-improvement":"good")(e.value,i),t(e)))}},Mn=t=>{requestAnimationFrame(()=>requestAnimationFrame(t))},Rt=()=>nt()?.activationStart??0,fe=(t,e=-1)=>{let i=nt(),n="navigate";return to()>=0?n="back-forward-cache":i&&(document.prerendering||Rt()>0?n="prerender":document.wasDiscarded?n="restore":i.type&&(n=i.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:n}},it=(t,e,i={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){let n=new PerformanceObserver(r=>{queueMicrotask(()=>{e(r.getEntries())})});return n.observe({type:t,buffered:!0,...i}),n}}catch{}},Rn=t=>{let e=!1;return()=>{e||(t(),e=!0)}},et=-1,io=new Set,Hr=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,_n=t=>{if(document.visibilityState==="hidden"){if(t.type==="visibilitychange")for(let e of io)e();isFinite(et)||(et=t.type==="visibilitychange"?t.timeStamp:0,removeEventListener("prerenderingchange",_n,!0))}},Ti=()=>
29{if(et<0){let t=Rt();et=(document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(i=>i.name==="hidden"&&i.startTime>=t)?.startTime)??Hr(),addEventListener("visibilitychange",_n,!0),addEventListener("prerenderingchange",_n,!0),rt(()=>{setTimeout(()=>{et=Hr()})})}return{get firstHiddenTime(){return et},onHidden(t){io.add(t)}}},xi=t=>{document.prerendering?addEventListener("prerenderingchange",t,!0):t()},Yr=[1800,3e3],no=(t,e={})=>{xi(()=>{let i=Ti(),n,r=fe("FCP"),o=it("paint",a=>{for(let u of a)u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<i.firstHiddenTime&&(r.value=Math.max(u.startTime-Rt(),0),r.entries.push(u),n(!0)))});o&&(n=pe(t,r,Yr,e.reportAllChanges),rt(a=>{r=fe("FCP"),n=pe(t,r,Yr,e.reportAllChanges),Mn(()=>{r.value=performance.now()-a.timeStamp,n(!0)})}))})},Kr=[.1,.25],$r=t=>t.find(e=>e.node?.nodeType===1)||t[0],ro=(t,e={})=>{let i=tt(e=Object.assign({},e),bi),n=new WeakMap;i.t=r=>{if(r?.sources?.length){let o=$r(r.sources),a=o?.node;if(a){let u=e.generateTarget?.(a)??Nn(a);n.set(o,u)}}},((r,o={})=>{let a=Ti();no(Rn(()=>{let u,p=fe("CLS",0),m=tt(o,bi),s=c=>{for(let l of c)m.u(l);m.o>
29p.value&&(p.value=m.o,p.entries=m.i,u())},d=it("layout-shift",s);d&&(u=pe(r,p,Kr,o.reportAllChanges),a.onHidden(()=>{s(d.takeRecords()),u(!0)}),rt(()=>{m.o=0,p=fe("CLS",0),u=pe(r,p,Kr,o.reportAllChanges),Mn(u)}),setTimeout(u))}))})(r=>{t((o=>{let a={};if(o.entries.length){let u=o.entries.reduce((p,m)=>p.value>m.value?p:m);if(u?.sources?.length){let p=$r(u.sources);p&&(a={largestShiftTarget:n.get(p),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:p,largestShiftEntry:u,loadState:vi(u.startTime)})}}return Object.assign(o,{attribution:a})})(r))},e)},oo=(t,e={})=>{no(i=>{t((n=>{let r={timeToFirstByte:0,firstByteToFCP:n.value,loadState:vi(to())};if(n.entries.length){let o=nt(),a=n.entries.at(-1);if(o){let u=o.activationStart||0,p=Math.max(0,o.responseStart-u);r={timeToFirstByte:p,firstByteToFCP:n.value-p,loadState:vi(n.entries[0].startTime),navigationEntry:o,fcpEntry:a}}}return Object.assign(n,{attribution:r})})(i))},e)},so=0,In=1/0,hi=0,Es=t=>{for(let e of t)e.interactionId&&(In=Math.min(In,e.interactionId),hi=Math.max(hi,e.interactionId),so=hi?(hi-In)/7+1:0)},On,Wr=()=>On?so:performance.interactionCount??0,Ss=()=>{"interactionCount"in performance||On||(On=it("event",Es,{durationThreshold:0}))},Xr=0,Ei=class{constructor(){he(this,"l",[]),he(this,"h",new Map),he(this,"m"),he(this,"p")}v(){Xr=Wr(),this.l.length=0,this.h.clear()}M(){let e=Math.min(this.l.length-1,Math.floor((Wr()-Xr)/50));return this.l[e]}u(e){if(this.m?.(e),!e.interactionId&&e.entryType!=="first-input")return;let i=this.l.at(-1),n=this.h.get(e.interactionId);if(n||this.l.length<10||e.duration>i.T){if(n?e.duration>n.T?(n.entries=[e],n.T=e.duration):e.duration===n.T&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],T:e.duration},this.h.set(n.id,n),this.l.push(n)),this.l.sort((r,o)=>o.T-r.T),this.l.length>10){let r=this.l.splice(10);for(let o of r)this.h.delete(o.id)}this.p?.(n)}}},An=t=>{let e=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState==="hidden")t();else{let n=Rn(t),r=-1,o=()=>{i(r),n()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=e(()=>{removeEventListener("visibilitychange",o,{capture:!0}),n()})}},Jr=[200,500],ao=(t,e={})=>{let i=tt(e=Object.assign({},e),Ei),n=[],r=[],o=0,a=new WeakMap,u=new WeakMap,p=!1,m=()=>{p||(An(s),p=!0)},s=()=>{let l=new Set(i.l.map(v=>a.get(v.entries[0]))),f=r.length-10;r=r.filter((v,g)=>g>=f||l.has(v));let h=new Set;for(let v of r){let g=d(v.startTime,v.processingEnd);for(let b of g)h.add(b)}n=n.filter(v=>v.startTime>o||h.has(v)),p=!1};i.m=l=>{let f=l.startTime+l.duration,h;o=Math.max(o,l.processingEnd);for(let v=r.length-1;v>=0;v--){let g=r[v];if(Math.abs(f-g.renderTime)<=8){h=g,h.startTime=Math.min(l.startTime,h.startTime),h.processingStart=Math.min(l.processingStart,h.processingStart),h.processingEnd=Math.max(l.processingEnd,h.processingEnd),e.includeProcessedEventEntries!==!1&&h.entries.push(l);break}}h||(h={startTime:l.startTime,processingStart:l.processingStart,processingEnd:l.processingEnd,renderTime:f,entries:e.includeProcessedEventEntries!==!1?[l]:[]},r.push(h)),(l.interactionId||l.entryType==="first-input")&&a.set(l,h),m()},i.p=l=>{if(!u.get(l)){let f=l.entries[0].target;if(f){let h=e.generateTarget?.(f)??Nn(f);u.set(l,h)}}};let d=(l,f)=>{let h=[];for(let v of n)if(!(v.startTime+v.duration<l)){if(v.startTime>f)break;h.push(v)}return h},c=l=>{let f=l.entries[0],h=a.get(f),v=f.processingStart,g=Math.max(f.startTime+f.duration,v),b=Math.min(h.processingEnd,g),N=h.entries.sort((S,R)=>S.processingStart-R.processingStart),y=d(f.startTime,b),_=i.h.get(f.interactionId),E={interactionTarget:u.get(_),interactionType:f.name.startsWith("key")?"keyboard":"pointer",interactionTime:f.startTime,nextPaintTime:g,processedEventEntries:N,longAnimationFrameEntries:y,inputDelay:v-f.startTime,processingDuration:b-v,presentationDelay:g-b,loadState:vi(f.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(S=>{if(!S.longAnimationFrameEntries?.length)return;let R=S.interactionTime,K=S.inputDelay,ft=S.processingDuration,ve,Ee,mt=0,oe=0,Se=0,je=0;for(let me of S.longAnimationFrameEntries){oe=oe+me.startTime+me.duration-me.styleAndLayoutStart;for(let $ of me.scripts){let Be=$.startTime+$.duration;if(Be<R)continue;
29let Te=Be-Math.max(R,$.startTime),gt=$.duration?Te/$.duration*$.forcedStyleAndLayoutDuration:0;mt+=Te-gt,oe+=gt,Te>je&&(Ee=$.startTime<R+K?"input-delay":$.startTime>=R+K+ft?"presentation-delay":"processing-duration",ve=$,je=Te)}}let Fe=S.longAnimationFrameEntries.at(-1),Ct=Fe?Fe.startTime+Fe.duration:0;Ct>=R+K+ft&&(Se=S.nextPaintTime-Ct),ve&&Ee&&(S.longestScript={entry:ve,subpart:Ee,intersectingDuration:je}),S.totalScriptDuration=mt,S.totalStyleAndLayoutDuration=oe,S.totalPaintDuration=Se,S.totalUnattributedDuration=S.nextPaintTime-R-mt-oe-Se})(E),Object.assign(l,{attribution:E})};it("long-animation-frame",l=>{n=n.concat(l),m()}),((l,f={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;let h=Ti();xi(()=>{Ss();let v,g=fe("INP"),b=tt(f,Ei),N=_=>{An(()=>{for(let S of _)b.u(S);let E=b.M();E&&E.T!==g.value&&(g.value=E.T,g.entries=E.entries,v())})},y=it("event",N,{durationThreshold:f.durationThreshold??40});v=pe(l,g,Jr,f.reportAllChanges),y&&(y.observe({type:"first-input",buffered:!0}),h.onHidden(()=>{N(y.takeRecords()),v(!0)}),rt(()=>{b.v(),g=fe("INP"),v=pe(l,g,Jr,f.reportAllChanges)}))})})(l=>{t(c(l))},e)},Si=class{constructor(){he(this,"m")}u(e){this.m?.(e)}},Qr=[2500,4e3],lo=(t,e={})=>{let i=tt(e=Object.assign({},e),Si),n=new WeakMap;i.m=r=>{let o=r.element;if(o){let a=e.generateTarget?.(o)??Nn(o);n.set(r,a)}else r.id&&n.set(r,`#${r.id}`)},((r,o={})=>{xi(()=>{let a=Ti(),u,p=fe("LCP"),m=tt(o,Si),s=c=>{o.reportAllChanges||(c=c.slice(-1));for(let l of c)m.u(l),l.startTime<a.firstHiddenTime&&(p.value=Math.max(l.startTime-Rt(),0),p.entries=[l],u())},d=it("largest-contentful-paint",s);if(d){u=pe(r,p,Qr,o.reportAllChanges);let c=Rn(()=>{s(d.takeRecords()),d.disconnect(),u(!0)}),l=f=>{f.isTrusted&&(An(c),removeEventListener(f.type,l,{capture:!0}))};for(let f of["keydown","click","visibilitychange"])addEventListener(f,l,{capture:!0});rt(f=>{p=fe("LCP"),u=pe(r,p,Qr,o.reportAllChanges),Mn(()=>{p.value=performance.now()-f.timeStamp,u(!0)})})}})})(r=>{t((o=>{let a={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:o.value};
29if(o.entries.length){let u=o.entries.at(-1),p=u.url&&performance.getEntriesByType("resource").find(s=>s.name===u.url);a.target=n.get(u),a.lcpEntry=u,u.url&&(a.url=u.url),p&&(a.lcpResourceEntry=p);let m=nt();if(m){let s=m.activationStart||0,d=Math.max(0,m.responseStart-s),c=Math.max(d,p?(p.requestStart||p.startTime)-s:0),l=Math.min(o.value,Math.max(c,p?p.responseEnd-s:0));a={...a,timeToFirstByte:d,resourceLoadDelay:c-d,resourceLoadDuration:l-c,elementRenderDelay:o.value-l,navigationEntry:m}}}return Object.assign(o,{attribution:a})})(r))},e)},Zr=[800,1800],kn=t=>{document.prerendering?xi(()=>kn(t)):document.readyState!=="complete"?addEventListener("load",()=>kn(t),!0):setTimeout(t)},co=(t,e={})=>{((i,n={})=>{let r=fe("TTFB"),o=pe(i,r,Zr,n.reportAllChanges);kn(()=>{let a=nt();a&&(r.value=Math.max(a.responseStart-Rt(),0),r.entries=[a],o(!0),rt(()=>{r=fe("TTFB",0),o=pe(i,r,Zr,n.reportAllChanges),o(!0)}))})})(i=>{t((n=>{let r={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(n.entries.length){let o=n.entries[0],a=o.activationStart||0,u=Math.max((o.workerStart||o.fetchStart)-a,0),p=Math.max(o.domainLookupStart-a,0),m=Math.max(o.connectStart-a,0),s=Math.max(o.connectEnd-a,0);r={waitingDuration:u,cacheDuration:p-u,dnsDuration:m-p,connectionDuration:s-m,requestDuration:n.value-s,navigationEntry:o}}return Object.assign(n,{attribution:r})})(i))},e)},Pt="com.grafana.faro.lastNavigationId",Pn="load_state",uo="time_to_first_byte",yi=class{constructor(e,i){this.corePushMeasurement=e,this.webVitalConfig=i}initialize(){this.measureCLS(),this.measureFCP(),this.measureINP(),this.measureLCP(),this.measureTTFB()}measureCLS(){var e;ro(i=>{let{loadState:n,largestShiftValue:r,largestShiftTime:o,largestShiftTarget:a}=i.attribution,u=this.buildInitialValues(i);this.addIfPresent(u,"largest_shift_value",r),this.addIfPresent(u,"largest_shift_time",o);let p=this.buildInitialContext(i);this.addIfPresent(p,Pn,n),this.addIfPresent(p,"largest_shift_target",a),this.pushMeasurement(u,p)},{reportAllChanges:(e=this.webVitalConfig)===null||e===void 0?void 0:e.reportAllChanges})}measureFCP(){var e;oo(i=>{let{firstByteToFCP:n,timeToFirstByte:r,loadState:o}=i.attribution,a=this.buildInitialValues(i);this.addIfPresent(a,"first_byte_to_fcp",n),this.addIfPresent(a,uo,r);let u=this.buildInitialContext(i);this.addIfPresent(u,Pn,o),this.pushMeasurement(a,u)},{reportAllChanges:(e=this.webVitalConfig)===null||e===void 0?void 0:e.reportAllChanges})}measureINP(){var e;ao(i=>{let{interactionTime:n,presentationDelay:r,inputDelay:o,processingDuration:a,nextPaintTime:u,loadState:p,interactionTarget:m,interactionType:s}=i.attribution,d=this.buildInitialValues(i);this.addIfPresent(d,"interaction_time",n),this.addIfPresent(d,"presentation_delay",r),this.addIfPresent(d,"input_delay",o),this.addIfPresent(d,"processing_duration",a),this.addIfPresent(d,"next_paint_time",u);let c=this.buildInitialContext(i);this.addIfPresent(c,Pn,p),this.addIfPresent(c,"interaction_target",m),this.addIfPresent(c,"interaction_type",s),this.pushMeasurement(d,c)},{reportAllChanges:(e=this.webVitalConfig)===null||e===void 0?void 0:e.reportAllChanges})}measureLCP(){var e;lo(i=>{let{elementRenderDelay:n,resourceLoadDelay:r,resourceLoadDuration:o,timeToFirstByte:a,target:u}=i.attribution,p=this.buildInitialValues(i);this.addIfPresent(p,"element_render_delay",n),this.addIfPresent(p,"resource_load_delay",r),this.addIfPresent(p,"resource_load_duration",o),this.addIfPresent(p,uo,a);let m=this.buildInitialContext(i);this.addIfPresent(m,"element",u),this.pushMeasurement(p,m)},{reportAllChanges:(e=this.webVitalConfig)===null||e===void 0?void 0:e.reportAllChanges})}measureTTFB(){var e;co(i=>{let{dnsDuration:n,connectionDuration:r,requestDuration:o,waitingDuration:a,cacheDuration:u}=i.attribution,p=this.buildInitialValues(i);this.addIfPresent(p,"dns_duration",n),this.addIfPresent(p,"connection_duration",r),this.addIfPresent(p,"request_duration",o),this.addIfPresent(p,"waiting_duration",a),this.addIfPresent(p,"cache_duration",u);let m=this.buildInitialContext(i);this.pushMeasurement(p,m)},{reportAllChanges:(e=this.webVitalConfig)===null||e===void 0?void 0:e.reportAllChanges})}buildInitialValues(e){return{[e.name.toLowerCase()]:e.value,delta:e.delta}}buildInitialContext(e){var i;let n=(i=be(Pt,Y.session))!==null&&i!==void 0?i:B;return{id:e.id,rating:e.rating,navigation_type:e.navigationType,navigation_entry_id:n}}pushMeasurement(e,i){this.corePushMeasurement({type:"web-vitals",values:e},{context:i})}addIfPresent(e,i,n){n&&(e[i]=n)}},ot=class extends D{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-web-vitals",this.version=C}initialize(){this.logDebug("Initializing"),new yi(this.api.pushMeasurement,this.config.webVitalsInstrumentation).initialize()}},po="navigation",Ut="resource",Ts=/^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;function wi(t=[]){for(let e of t)if(e.name==="traceparent"){if(!Ts.test(e.description))continue;let[,i,n]=e.description.split("-");if(i!=null&&n!=null)return{traceId:i,spanId:n};break}}function fo(){return"PerformanceObserver"in window}
29function mo(t){if(document.readyState==="complete")t();else{let e=()=>{document.readyState==="complete"&&(t(),document.removeEventListener("readystatechange",e))};document.addEventListener("readystatechange",e)}}function go(t,e={}){for(let[i,n]of Object.entries(e)){let r=t[i];return r==null?!1:le(n)?n.includes(r):r===n}return!0}function Un(t){let{connectEnd:e,connectStart:i,decodedBodySize:n,domainLookupEnd:r,domainLookupStart:o,duration:a,encodedBodySize:u,fetchStart:p,initiatorType:m,name:s,nextHopProtocol:d,redirectEnd:c,redirectStart:l,renderBlockingStatus:f,requestStart:h,responseEnd:v,responseStart:g,responseStatus:b,secureConnectionStart:N,transferSize:y,workerStart:_}=t;return{name:s,duration:L(a),tcpHandshakeTime:L(e-i),dnsLookupTime:L(r-o),tlsNegotiationTime:L(e-N),responseStatus:L(b),redirectTime:L(c-l),requestTime:L(g-h),responseTime:L(v-g),fetchTime:L(v-p),serviceWorkerTime:L(p-_),decodedBodySize:L(n),encodedBodySize:L(u),cacheHitStatus:E(),renderBlockingStatus:L(f),protocol:d,initiatorType:m,visibilityState:document.visibilityState,ttfb:L(g-h),transferSize:L(y)};function E(){let S="fullLoad";return y===0?n>0&&(S="cache"):b!=null?b===304&&(S="conditionalFetch"):u>0&&y<u&&(S="conditionalFetch"),S}}function ho(t){let{activationStart:e,domComplete:i,domContentLoadedEventEnd:n,domContentLoadedEventStart:r,domInteractive:o,fetchStart:a,loadEventEnd:u,loadEventStart:p,responseStart:m,type:s}=t,d=xs();return Object.assign(Object.assign({},Un(t)),{pageLoadTime:L(i-a),documentParsingTime:L(d?o-d:null),domProcessingTime:L(i-o),domContentLoadHandlerTime:L(n-r),onLoadTime:L(u-p),ttfb:L(Math.max(m-(e??0),0)),type:s})}function xs(){var t;return((t=performance.timing)===null||t===void 0?void 0:t.domLoading)!=null?performance.timing.domLoading-performance.timeOrigin:null}function L(t){return t==null?B:typeof t=="number"?Math.round(t>0?t:0).toString():t.toString()}function bo(t){let e,i=new Promise(r=>{e=r});return new PerformanceObserver(r=>{var o;let[a]=r.getEntries();if(a==null||Pe(a.name))return;let u=a.toJSON(),p=wi(u?.serverTiming),m=(o=be(Pt,Y.session))!==null&&o!==void 0?o:B,s=Object.assign(Object.assign({},ho(u)),{faroNavigationId:G(),faroPreviousNavigationId:m});Re(Pt,s.faroNavigationId,Y.session),t("faro.performance.navigation",s,void 0,{spanContext:p,timestampOverwriteMs:performance.timeOrigin+u.startTime}),e(s)}).observe({type:po,buffered:!0}),i}var ys={initiatorType:["xmlhttprequest","fetch"]};function vo(t,e,i){let n=I.config.trackResources;new PerformanceObserver(o=>{let a=o.getEntries();for(let u of a){if(Pe(u.name))continue;i?.notify({type:Ut});let p=u.toJSON(),m=wi(p?.serverTiming);if(n==null&&go(p,ys)||n){let s=Object.assign(Object.assign({},Un(p)),{faroNavigationId:t,faroResourceId:G()});e("faro.performance.resource",s,void 0,{spanContext:m,timestampOverwriteMs:performance.timeOrigin+p.startTime})}}}).observe({type:Ut,buffered:!0})}var ws=function(t,e,i,n){function r(o){return o instanceof i?o:new i(function(a){a(o)})}return new(i||(i=Promise))(function(o,a){function u(s){try{m(n.next(s))}catch(d){a(d)}}function p(s){try{m(n.throw(s))}catch(d){a(d)}}function m(s){s.done?o(s.value):r(s.value).then(u,p)}m((n=n.apply(t,e||[])).next())})},Cn=new P,st=class extends D{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-performance",this.version=C}initialize(){if(!fo()){this.logDebug("performance observer not supported. Disable performance instrumentation.");return}mo(()=>ws(this,void 0,void 0,function*(){let e=this.api.pushEvent,{faroNavigationId:i}=yield bo(e);i!=null&&vo(i,e,Cn)}))}},Eo="faroUserActionName",Dn="data-faro-user-action-name",Ii,Ln;function _i(){return Ii||(Ii=new P),Ln||(Ln=new MutationObserver((t,e)=>{Ii.notify({type:gn})}),Ln.observe(document,{attributes:!0,childList:!0,subtree:!0,characterData:!0})),Ii}var jn="fetch",Oi="xhr",at,So=!1,Fn,Bn;function Ai(){if(at)return at;at=new P;function t(i){at.notify({type:Ce,request:i})}function e(i){at.notify({type:De,request:i})}return So||(_s({onRequestStart:t,onRequestEnd:e}),Is({onRequestStart:t,onRequestEnd:e}),So=!0),at}function Is({onRequestStart:t,onRequestEnd:e}){Fn||(Fn=XMLHttpRequest.prototype.open),XMLHttpRequest.prototype.open=function(){let i=arguments[1],n=Pe(i),r=arguments[0],o=G();this.addEventListener("loadstart",function(){n||t({url:i,method:r,requestId:o,apiType:Oi})}),this.addEventListener("load",function(){n||e({url:i,method:r,requestId:o,apiType:Oi})}),this.addEventListener("error",function(){n||e({url:i,method:r,requestId:o,apiType:Oi})}),this.addEventListener("abort",function(){n||e({url:i,method:r,requestId:o,apiType:Oi})}),Fn.apply(this,arguments)}}function _s({onRequestEnd:t,onRequestStart:e}){Bn||(Bn=window.fetch),window.fetch=function(){var i,n;let r=(i=br(arguments[0]))!==null&&i!==void 0?i:"",o=Pe(r),a=((n=arguments[1])!==null&&n!==void 0?n:{}).method,u=G();return o||e({url:r,method:a,requestId:u,apiType:jn}),Bn.apply(this,arguments).then(p=>(o||t({url:r,method:a,requestId:u,apiType:jn}),p)).catch(p=>{throw o||t({url:r,method:a,requestId:u,apiType:jn}),p})}}var ki,To=!1,Os;function xo(){return ki||(ki=new P),To||(Os=Cn.subscribe(t=>{t.type===Ut&&ki.notify({type:Tr})}),To=!0),ki}function yo(t){return t.split("data-")[1]?.replace(/-(.)/g,(n,r)=>r.toUpperCase())?.replace(/-/g,"")}function wo(t,e,i){return t&&clearTimeout(t),t=setTimeout(()=>{e()},i),t}function Io(t){return t.type===Ce}function Ni(t){return t.type===De}var As=100,ks=10*1e3,Mi=class{constructor(e){this.userAction=e,this.http=Ai(),this.dom=_i(),this.perf=xo(),this.isValid=!1,this.runningRequests=new Map}attach(){this.allMonitorsSub=new P().merge(this.http,this.dom,this.perf).takeWhile(()=>[A.Started,A.Halted].includes(this.userAction.getState())).filter(e=>!(this.userAction.getState()===A.Halted&&!(Ni(e)&&this.runningRequests.has(e.request.requestId)))).subscribe(e=>{Io(e)&&this.runningRequests.set(e.request.requestId,e.request),Ni(e)&&this.runningRequests.delete(e.request.requestId),Ni(e)?this.userAction.getState()===A.Halted&&this.runningRequests.size===0&&this.endAction():(this.isValid||(this.isValid=!0),this.scheduleFollowUp())}),this.stateSub=this.userAction.filter(e=>[A.Ended,A.Cancelled].includes(e)).first().subscribe(()=>this.cleanup()),this.scheduleFollowUp()}scheduleFollowUp(){this.clearTimer(this.followUpTid),this.followUpTid=setTimeout(()=>{if(this.userAction.getState()===A.Started&&this.runningRequests.size>0){this.haltAction();return}if(this.isValid){this.endAction();return}this.cancelAction()},As)}haltAction(){this.userAction.getState()===A.Started&&(this.userAction.halt(),this.startHaltTimeout())}startHaltTimeout(){this.clearTimer(this.haltTid),this.haltTid=wo(this.haltTid,()=>{this.userAction.getState()===A.Halted&&this.endAction()},ks)}endAction(){this.userAction.end(),this.cleanup()}cancelAction(){this.userAction.cancel(),this.cleanup()}cleanup(){var e,i;this.clearTimer(this.followUpTid),this.clearTimer(this.haltTid),(e=this.allMonitorsSub)===null||e===void 0||e.unsubscribe(),(i=this.stateSub)===null||i===void 0||i.unsubscribe(),this.allMonitorsSub=void 0,this.stateSub=void 0,this.runningRequests.clear()}clearTimer(e){e&&clearTimeout(e)}};function _o(t){let{api:e,config:i}=t;function n(o){var a,u;let p=Ns(o.target,(u=(a=i.userActionsInstrumentation)===null||a===void 0?void 0:a.dataAttributeName)!==null&&u!==void 0?u:Eo);if(!p)return;let m=e.startUserAction(p,{},{triggerName:o.type});m&&r(m)}function r(o){let a=o;new Mi(a).attach()}return{processUserEvent:n,processUserActionStarted:r}}function Ns(t,e){let i=yo(e),n=t.dataset;for(let r in n)if(r===i)return n[r]}var lt=class extends D{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-user-action",this.version=C}initialize(){let{processUserEvent:e,processUserActionStarted:i}=_o(I);window.addEventListener("pointerdown",e),window.addEventListener("keydown",n=>{[" ","Enter"].includes(n.key)&&e(n)}),this._userActionSub=Ke.subscribe(({type:n,userAction:r})=>{n==="user_action_start"&&i(r)})}destroy(){var e;(e=this._userActionSub)===null||e===void 0||e.unsubscribe()}},ct=class extends D{constructor(){super(),this.name="@grafana/faro-web-sdk:instrumentation-csp",this.version=C}initialize(){document.addEventListener("securitypolicyviolation",this.securitypolicyviolationHandler.bind(this))}destroy(){document.removeEventListener("securitypolicyviolation",this.securitypolicyviolationHandler)}securitypolicyviolationHandler(e){let i={blockedURI:e.blockedURI,columnNumber:e.columnNumber,dis
29position:e.disposition,documentURI:e.documentURI,effectiveDirective:e.effectiveDirective,lineNumber:e.lineNumber,originalPolicy:e.originalPolicy,referrer:e.referrer,sample:e.sample,sourceFile:e.sourceFile,statusCode:e.statusCode,violatedDirective:e.violatedDirective};this.api.pushEvent("securitypolicyviolation",H(i))}};function Ao(t){return t.type===Ce}function ko(t){return t.type===De}var Ri=class extends P{constructor(e,i){var n,r,o,a;super(),this._tracking=!1,this.eventsObservable=e,this._options={inactivityMs:(n=i?.inactivityMs)!==null&&n!==void 0?n:100,drainTimeoutMs:(r=i?.drainTimeoutMs)!==null&&r!==void 0?r:10*1e3,isOperationStart:(o=i?.isOperationStart)!==null&&o!==void 0?o:()=>{},isOperationEnd:(a=i?.isOperationEnd)!==null&&a!==void 0?a:()=>{}},this._initialize()}_initialize(){this.eventsObservable.filter(()=>this._tracking).subscribe(e=>{var i,n,r;this._lastEventTime=Date.now(),(i=this._currentEvents)===null||i===void 0||i.push(e);let o=this._options.isOperationStart(e);o&&((n=this._activeOperations)===null||n===void 0||n.set(o,!0));let a=this._options.isOperationEnd(e);a&&((r=this._activeOperations)===null||r===void 0||r.delete(a)),this._scheduleInactivityCheck()})}startTracking(){this._tracking||(this._tracking=!0,this._startTime=Date.now(),this._lastEventTime=Date.now(),this.notify({message:"tracking-started"}),this._currentEvents=[],this._activeOperations=new Map,this._scheduleInactivityCheck())}stopTracking(){this._tracking=!1,this._clearTimer(this._inactivityTid),this._clearTimer(this._drainTid);let e;this.hasActiveOperations()?e=Date.now()-this._startTime:e=this._lastEventTime?this._lastEventTime-this._startTime:0,this.notify({message:"tracking-ended",events:this._currentEvents,duration:e})}
29_scheduleInactivityCheck(){this._inactivityTid=Oo(this._inactivityTid,()=>{this.hasActiveOperations()?this._startDrainTimeout():this.stopTracking()},this._options.inactivityMs)}_startDrainTimeout(){this._drainTid=Oo(this._drainTid,()=>{this.stopTracking()},this._options.drainTimeoutMs)}hasActiveOperations(){return!!this._activeOperations&&this._activeOperations.size>0}_clearTimer(e){e&&clearTimeout(e)}};function Oo(t,e,i){return t&&clearTimeout(t),t=setTimeout(()=>{e()},i),t}var Ms="interaction",Pi,No=new Set,Rs=new Map;function Mo(t){return Pi||(Pi=new P),t.forEach(e=>{if(!No.has(e)){let i=()=>{Pi.notify({type:Ms,name:e})};window.addEventListener(e,i),No.add(e),Rs.set(e,i)}}),Pi}var Ps="url-change",Ui,Vn=!1,Ci,zn,Gn,Ro,Po,Uo,qn;function Co(){Ui||(Ui=new P,Ci=location.href);function t(e,i){let n=i??location.href;n!==Ci&&(Ui.notify({type:Ps,from:Ci,to:n,trigger:e}),Ci=n)}if(!Vn)if("navigation"in window&&"NavigateEvent"in window){Uo=n=>{try{let r=n?.destination;r?.sameDocument&&typeof r.url=="string"&&t("navigate",r.url)}catch{}},window.navigation.addEventListener("navigate",Uo);let i=window.NavigateEvent;i&&i.prototype&&typeof i.prototype.intercept=="function"&&(qn||(qn=i.prototype.intercept),i.prototype.intercept=function(n){try{let r=!!(!(this===null||this===void 0)&&this.canIntercept),o=this===null||this===void 0?void 0:this.destination;r&&o&&o.sameDocument===!1&&typeof o.url=="string"&&t("navigate-intercept",o.url)}catch{}return qn.call(this,n)}),Vn=!0}else zn||(zn=window.history.pushState),window.history.pushState=function(...i){let n=zn.apply(window.history,i);return t("pushState"),n},Gn||(Gn=window.history.replaceState),window.history.replaceState=function(...i){let n=Gn.apply(window.history,i);return t("replaceState"),n},Ro=()=>t("popstate"),Po=()=>t("hashchange"),window.addEventListener("popstate",Ro),window.addEventListener("hashchange",Po),Vn=!0;return Ui}var ut=class extends D{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-navigation",this.version=C}initialize(){let e=Ai(),i=_i(),n=Co(),r=Mo(["pointerdown","keydown"]),o=new Ri(new P().merge(e,i,n),{inactivityMs:100,drainTimeoutMs:10*1e3,isOperationStart:a=>Ao(a)?a.request.requestId:void 0,isOperationEnd:a=>ko(a)?a.request.requestId:void 0});o.filter(a=>a.message==="tracking-ended").subscribe(a=>{var u,p,m;if(!((u=a.events)===null||u===void 0)&&u.some(s=>s.type==="url-change")&&!((p=a.events)===null||p===void 0)&&p.some(s=>s.type==="dom-mutation")){let s=(m=a.events)===null||m===void 0?void 0:m.find(d=>d.type==="url-change");I.api.pushEvent("faro.navigation",{fromUrl:s?.from,toUrl:s?.to,sameDocument:String(!0),duration:a.duration})}}),r.subscribe(()=>{o.startTracking()})}};function dt(t={}){let e=[new lt,new Qe,new ot,new Je,new Ze,new ut];return t.enablePerformanceInstrumentation!==!1&&e.unshift(new st),t.enableContentSecurityPolicyInstrumentation!==!1&&e.push(new ct),t.captureConsole!==!1&&e.push(new Oe),e}var Do="browser",Hn=()=>{let t=window.k6;return{k6:Object.assign({isK6Browser:!0},t?.testRunId&&{testRunId:t?.testRunId})}},Lo,Yn;function Kn({generatePageId:t,initialPageMeta:e}={}){return()=>{let n=location.href;return ee(t)&&Lo!==n&&(Lo=n,Yn=t(location)),{page:Object.assign(Object.assign({url:n},Yn?{id:Yn}:{}),e)}}}var $n=function(t,e,i,n){function r(o){return o instanceof i?o:new i(function(a){a(o)})}return new(i||(i=Promise))(function(o,a){function u(s){try{m(n.next(s))}catch(d){a(d)}}function p(s){try{m(n.throw(s))}catch(d){a(d)}}function m(s){s.done?o(s.value):r(s.value).then(u,p)}m((n=n.apply(t,e||[])).next())})},Us=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]]);return i},Cs=30,Ds=5,Ls=5e3,js=6e4,Fs=429,Bs=202,pt=class extends He{constructor(e){var i,n,r,o;super(),this.options=e,this.name="@grafana/faro-web-sdk:transport-fetch",this.version=C,this.disabledUntil=new Date,this.rateLimitBackoffMs=(i=e.defaultRateLimitBackoffMs)!==null&&i!==void 0?i:Ls,this.getNow=(n=e.getNow)!==null&&n!==void 0?n:()=>Date.now(),this.promiseBuffer=Jt({size:(r=e.bufferSize)!==null&&r!==void 0?r:Cs,concurrency:(o=e.concurrency)!==null&&o!==void 0?o:Ds})}send(e){return $n(this,void 0,void 0,function*(){try{if(this.disabledUntil>new Date(this.getNow()))return this.logWarn(`Dropping transport item due to too many requests. Backoff until ${this.disabledUntil}`),Promise.resolve();yield this.promiseBuffer.add(()=>$n(this,void 0,void 0,function*(){let i=JSON.stringify(Zt(e)),{url:n,requestOptions:r,apiKey:o}=this.options,a=r??{},{headers:u={}}=a,p=Us(a,["headers"]),m,s=this.metas.value.session;s!=null&&(m=s.id);let d={};for(let[c,l]of Object.entries(u))d[c]=typeof l=="function"?yield Promise.resolve(l()):l;return fetch(n,Object.assign({method:"POST",headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},d),o?{"x-api-key":o}:{}),m?{"x-faro-session-id":m}:{}),body:i,keepalive:i.length<=js},p??{})).then(c=>
29$n(this,void 0,void 0,function*(){return c.status===Bs&&c.headers.get("X-Faro-Session-Status")==="invalid"&&this.extendFaroSession(this.config,this.logDebug),c.status===Fs&&(this.disabledUntil=this.getRetryAfterDate(c),this.logWarn(`Too many requests, backing off until ${this.disabledUntil}`)),c.text().catch(q),c})).catch(c=>{this.logError(`Failed sending payload to the receiver
30`,JSON.parse(i),c)})}))}catch(i){this.logError(i)}})}getIgnoreUrls(){var e;return[this.options.url].concat((e=this.config.ignoreUrls)!==null&&e!==void 0?e:[])}isBatched(){return!0}getRetryAfterDate(e){let i=this.getNow(),n=e.headers.get("Retry-After");if(n){let r=Number(n);if(!isNaN(r))return new Date(r*1e3+i);let o=Date.parse(n);if(!isNaN(o))return new Date(o)}return new Date(i+this.rateLimitBackoffMs)}extendFaroSession(e,i){let n="Session expired",r=e.sessionTracking;if(r?.enabled){let{fetchUserSession:o,storeUserSession:a}=kt(r);We({fetchUserSession:o,storeUserSession:a})({forceSessionExtend:!0}),i(`${n} created new session.`)}else i(`${n}.`)}},Vs=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]]);return i};function Di(t){var e,i,n,r,o;let a=[],u=qe(t.unpatchedConsole,t.internalLoggerLevel);t.transports?((t.url||t.apiKey)&&u.error('if "transports" is defined, "url" and "apiKey" should not be defined'),a.push(...t.transports)):t.url?a.push(new pt({url:t.url,apiKey:t.apiKey})):u.error('either "url" or "transports" must be defined');let{dedupe:p=!0,eventDomain:m=Do,globalObjectKey:s=ri,instrumentations:d=dt(),internalLoggerLevel:c=Ge,isolate:l=!1,logArgsSerializer:f=ue,metas:h=Gs(t),paused:v=!1,preventGlobalExposure:g=!1,unpatchedConsole:b=J,url:N,experimental:y}=t,_=Vs(t,["dedupe","eventDomain","globalObjectKey","instrumentations","internalLoggerLevel","isolate","logArg
30sSerializer","metas","paused","preventGlobalExposure","unpatchedConsole","url","experimental"]),E=(e=y?.trackNavigation)!==null&&e!==void 0?e:!1,S={dataAttributeName:(n=(i=t.userActionsInstrumentation)===null||i===void 0?void 0:i.dataAttributeName)!==null&&n!==void 0?n:Dn,excludeItem:(r=t.userActionsInstrumentation)===null||r===void 0?void 0:r.excludeItem};return Object.assign(Object.assign({},_),{batching:Object.assign(Object.assign({},oi),t.batching),dedupe:p,globalObjectKey:s,instrumentations:zs(d,t),internalLoggerLevel:c,isolate:l,logArgsSerializer:f,metas:h,parseStacktrace:Mt,paused:v,preventGlobalExposure:g,transports:a,unpatchedConsole:b,eventDomain:m,ignoreUrls:[...(o=t.ignoreUrls)!==null&&o!==void 0?o:[],...N?[N]:[],/\/collect(?:\/[\w]*)?$/],sessionTracking:Object.assign(Object.assign(Object.assign({},fi),t.sessionTracking),qs({trackGeolocation:t.trackGeolocation,sessionTracking:t.sessionTracking})),userActionsInstrumentation:S,experimental:{trackNavigation:E}})}function zs(t,{experimental:e}){var i;let n=(i=e?.trackNavigation)!==null&&i!==void 0?i:!1;return t.filter(r=>!(r.name==="@grafana/faro-web-sdk:instrumentation-navigation"&&!n))}function Gs(t){var e,i;let{page:n,generatePageId:r}=(e=t?.pageTracking)!==null&&e!==void 0?e:{},o=[li,Kn({generatePageId:r,initialPageMeta:n}),...(i=t.metas)!==null&&i!==void 0?i:[],ui];return j(window?.k6)?[...o,Hn]:o}function qs({trackGeolocation:t,sessionTracking:e}){var i;let n={};return Gt(t)&&(n.geoLocationTrackingEnabled=t),F(n)?{}:{session:Object.assign(Object.assign({},(i=e?.session)!==null&&i!==void 0?i:{}),{overrides:n})}}function Wn(t){let e=Di(t);if(e)return dn(e)}var Hs="https://faro-collector-prod-eu-central-0.grafana.net/collect/7b2203dd546274e5e877b35b1c8a6e1f";try{Wn({url:Hs,app:{name:"d2c-website",version:"1.0.0",environment:window.Shopify?.shop||window.location.hostname},instrumentations:[...dt({captureConsoleDisabledLevels:["debug","info","log"]})],sessionTracking:{enabled:!0,samplingRate:.01}})}catch(t){console.error("Failed to initialize Faro:",t.message)}})();
31//# sourceMappingURL=/cdn/shop/t/183/assets/faro.js.map?v=118806548626866429071777034859

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.