PageSourceSearch

https://www.lidl.sk/otc/assets/index-DTyAdH08.js

js lidl.sk collected 2026-09-24 19:50:31 UTC 252,434 bytes, 22 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/layout-handover-Cdde6gfq.js","assets/runtime-core.esm-bundler-p-GyBnd5.js","assets/_plugin-vue_export-helper-BDNMzG2s.js","assets/checkout-handover-page-CDrkjrOo.js","assets/redirect.util-Bnvatk6t.js","assets/rolldown-runtime-B0Z9INg1.js","assets/preload-helper-Bo7DGFeJ.js","assets/clients-DOBKKKZH.js","assets/MobileAppWebviewIntegration-hER8sDzA.js","assets/mobile-app.util-YF0PHko0.js","assets/localeUtils-CoMfnM0F.js","assets/checkout-handover-page-CW6PBgkx.css","assets/checkout-handover-flashsales-page-Bef5GWI0.js","assets/LidlPlusWebviewIntegration-CIXSrtkn.js","assets/checkout-handover-flashsales-page-CCLc5AlP.css","assets/login-view-CUS1SCcS.js","assets/modal-C954hs1T-B3oQsgnj.js","assets/OdsIconLocal-DuPE143F-3tBWGcRf.js","assets/OdsIconLocal-DuPE143F-iLpN6krg.css","assets/modal-C954hs1T-DSTvn-ki.css","assets/sso.service-CWOAij7d.js","assets/cart.store-sPJqPuUo.js","assets/tracking.composable-TILdoDrj.js","assets/BaseInput-HYruheGm.js","assets/TheAppMessages-oo_hclRa.js","assets/LidlPointsHint-nTJevDmO.js","assets/LidlPointsHint-Dd86BPaA.css","assets/TheAppMessages-iVozsBpQ.css","assets/BaseInput-CCTbXic5.css","assets/AccountBenefits-BbadkM5c.js","assets/dynamic-asset.util-CYXJHIWj.js","assets/AccountBenefits-BGzDxjvx.css","assets/login-view-CN_GuZ4K.css","assets/checkout-view-CKQA-YnI.js","assets/BaseDivider-BKFqFfXS.js","assets/ThePriceSummary-wpnZbHbs.js","assets/ThePriceSummary-44G2fhIA.css","assets/BaseDivider-CsBdJzyS.css","assets/OdsDialog-DVUdwDs_.js","assets/OdsDialog-BDL9t_8W.css","assets/addressType.service-CSCLXJuZ.js","assets/addressType-y3xPbXGJ.css","assets/checkout-view-BXVIE4RD.css","assets/checkout-flow-view-DF486KKN.js","assets/checkout-flow-view-BmAzt67-.css","assets/checkout-success-view-BA6_43sy.js","assets/error-view-BWOVSlIW.js","assets/error-view-Cfg0bGzZ.css","assets/checkout-success-view-BDTkpfiJ.css"])))=>i.map(i=>d[i]);
2import{i as e,n as t,r as n,t as r}from"./rolldown-runtime-B0Z9INg1.js";import{A as i,C as a,D as o,E as s,F as c,I as l,J as u,L as d,Lt as f,N as p,O as m,P as h,Pt as g,R as _,V as v,X as y,Z as b,_ as x,c as S,ct as C,d as w,dt as ee,g as T,gt as E,h as D,j as te,k as ne,l as O,lt as re,ot as ie,r as ae,s as k,u as A,v as oe,x as se,z as ce}from"./runtime-core.esm-bundler-p-GyBnd5.js";import{m as le,o as ue,s as de,u as fe}from"./modal-C954hs1T-B3oQsgnj.js";import{a as pe,i as me,l as he,r as ge,t as _e}from"./sso.service-CWOAij7d.js";import{A as ve,C as ye,M as be,S as j,T as xe,_ as Se,a as M,b as Ce,c as N,d as we,f as Te,g as Ee,h as De,i as P,l as Oe,m as ke,o as Ae,p as je,s as Me,t as Ne,u as Pe,v as Fe,w as Ie,x as Le,y as Re}from"./redirect.util-Bnvatk6t.js";import{A as ze,E as Be,H as Ve,I as He,J as Ue,L as We,M as Ge,O as Ke,P as qe,Q as Je,T as Ye,Y as Xe,Z as Ze,a as Qe,g as $e,j as et,k as tt,m as nt,n as rt,q as it,t as at,z as ot}from"./cart.store-sPJqPuUo.js";import{n as st,r as ct}from"./tracking.composable-TILdoDrj.js";import{d as lt,f as ut,i as dt,n as ft,o as pt,r as mt,s as ht,t as gt}from"./BaseDivider-BKFqFfXS.js";import{c as _t,f as vt,p as yt,u as bt}from"./clients-DOBKKKZH.js";import{t as xt}from"./preload-helper-Bo7DGFeJ.js";import{t as St}from"./MobileAppWebviewIntegration-hER8sDzA.js";import{t as Ct}from"./mobile-app.util-YF0PHko0.js";import{t as F}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{s as wt,t as Tt}from"./LidlPointsHint-nTJevDmO.js";import{c as Et,l as Dt,o as Ot,s as kt,t as At,u as jt}from"./TheAppMessages-oo_hclRa.js";import{f as Mt,l as Nt,r as Pt,t as Ft}from"./ThePriceSummary-wpnZbHbs.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var It=async(e,t,n=5e3)=>{let r=(e,t)=>t.split(`.`).reduce((e,t)=>
vendor: 4,149 bytes, line 2
2e&&e?.[t],e);return new Promise(i=>{let a=setInterval(()=>{r(e,t)&&(clearInterval(a),i(!0))},84);setTimeout(()=>{clearInterval(a),i(!1)},n)})},Lt=`browser`,Rt=r(((e,t)=>{(function(n,r){var i=`1.0.41`,a=``,o=`function`,s=`undefined`,c=`object`,l=`string`,u=`major`,d=`model`,f=`name`,p=`type`,m=`vendor`,h=`version`,g=`architecture`,_=`console`,v=`mobile`,y=`tablet`,b=`smarttv`,x=`wearable`,S=`embedded`,C=`Amazon`,w=`Apple`,ee=`ASUS`,T=`BlackBerry`,E=`Browser`,D=`Chrome`,te=`Edge`,ne=`Firefox`,O=`Google`,re=`Honor`,ie=`Huawei`,ae=`Lenovo`,k=`LG`,A=`Microsoft`,oe=`Motorola`,se=`Nvidia`,ce=`OnePlus`,le=`Opera`,ue=`OPPO`,de=`Samsung`,fe=`Sharp`,pe=`Sony`,me=`Xiaomi`,he=`Zebra`,ge=`Facebook`,_e=`Chromium OS`,ve=`Mac OS`,ye=` Browser`,be=function(e,t){var n={};for(var r in e)n[r]=t[r]&&t[r].length%2==0?t[r].concat(e[r]):e[r];return n},j=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},xe=function(e,t){return typeof e==l&&Se(t).indexOf(Se(e))!==-1},Se=function(e){return e.toLowerCase()},M=function(e){return typeof e==l?e.replace(/[^\d\.]/g,a).split(`.`)[0]:r},Ce=function(e,t){if(typeof e==l)return e=e.replace(/^\s\s*/,a),typeof t===s?e:e.substring(0,500)},N=function(e,t){for(var n=0,i,a,s,l,u,d;n<t.length&&!u;){var f=t[n],p=t[n+1];for(i=a=0;i<f.length&&!u&&f[i];)if(u=f[i++].exec(e),u)for(s=0;s<p.length;s++)d=u[++a],l=p[s],typeof l==c&&l.length>0?l.length===2?typeof l[1]==o?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:l.length===3?typeof l[1]===o&&!(l[1].exec&&l[1].test)?this[l[0]]=d?l[1].call(this,d,l[2]):r:this[l[0]]=d?d.replace(l[1],l[2]):r:l.length===4&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):r):this[l]=d||r;n+=2}},we=function(e,t){for(var n in t)if(typeof t[n]==c&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(xe(t[n][i],e))return n===`?`?r:n}else if(xe(t[n],e))return n===`?`?r:n;return t.hasOwnProperty(`*`)?t[`*`]:e},Te={"1.0":`/8`,"1.2":`/1`,"1.3":`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`},Ee={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`},De={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[f,`Chrome`]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[f,`Edge`]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,h],[/opios[\/ ]+([\w\.]+)/i],[h,[f,le+` Mini`]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[f,le+` GX`]],[/\bopr\/([\w\.]+)/i],[h,[f,le]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[f,`Baidu`]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[f,`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],[f,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[f,`Quark`]],[/\bddg\/([\w\.]+)/i],[h,[f,`DuckDuckGo`]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[f,`UC`+E]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[f,`WeChat`]],[/konqueror\/([\w\.]+)/i],[h,[f,`Konqueror`]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[f,`IE`]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[f,`Yandex`]],[/slbrowser\/([\w\.]+)/i],[h,[f,`Smart Lenovo `+E]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,`$1 Secure `+E],h],[/\bfocus\/([\w\.]+)/i],[h,[f,ne+` Focus`]],[/\bopt\/([\w\.]+)/i],[h,[f,le+` Touch`]],[/coc_coc\w+\/([\w\.]+)/i],[h,[f,`Coc Coc`]],[/dolfin\/([\w\.]+)/i],[h,[f,`Dolphin`]],[/coast\/([\w\.]+)/i],[h,[f,le+` Coast`]],[/miuibrowser\/([\w\.]+)/i],[h,[f,`MIUI`+ye]],[/fxios\/([\w\.-]+)/i],[h,[f,ne]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[f,`360`]],[/\b(qq)\/([\w\.]+)/i],[[f,/(.+)/,`$1Browser`],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[f,/(.+)/,`$1`+ye],h
vendor: 5,038 bytes, line 2
2],[/samsungbrowser\/([\w\.]+)/i],[h,[f,de+` Internet`]],[/metasr[\/ ]?([\d\.]+)/i],[h,[f,`Sogou Explorer`]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,`Sogou Mobile`],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[f,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[f],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,ge],h],[/(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],[f,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[f,`GSA`]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[f,`TikTok`]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[f,D+` Headless`]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,D+` WebView`],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[f,`Android `+E]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[f,`Mobile Safari`]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[h,we,Te]],[/(webkit|khtml)\/([\w\.]+)/i],[f,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,`Netscape`],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[f,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[f,ne+` 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],[f,[h,/_/g,`.`]],[/(cobalt)\/([\w\.]+)/i],[f,[h,/master.|lts./,``]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[g,`amd64`]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[g,`ia32`]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[g,`arm64`]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[g,`armhf`]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[g,`arm`]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[g,/ower/,a,Se]],[/ sun4\w[;\)]/i],[[g,`sparc`]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[g,Se]]],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],[d,[m,de],[p,y]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[m,de],[p,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[m,w],[p,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[m,w],[p,y]],[/(macintosh);/i],[d,[m,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[m,fe],[p,v]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[d,[m,re],[p,y]],[/honor([-\w ]+)[;\)]/i],[d,[m,re],[p,v]],[/\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],[d,[m,ie],[p,y]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[m,ie],[p,v]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[d,/_/g,` `],[m,me],[p,y]],[/\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],[[d,/_/g,` `],[m,me],[p,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[m,ue],[p,v]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[d,[m,we,{OnePlus:[`304`,`403`,`203`],"*":ue}],[p,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[m,`Vivo`],[p,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[m,`Realme`],[p,v]],[/\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],[d,[m,oe],[p,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[m,oe],[p,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[m,k],[p,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[m,k],[p,v]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}
2(?: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],[d,[m,ae],[p,y]],[/(nokia) (t[12][01])/i],[m,d,[p,y]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[d,/_/g,` `],[p,v],[m,`Nokia`]],[/(pixel (c|tablet))\b/i],[d,[m,O],[p,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[m,O],[p,v]],[/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],[d,[m,pe],[p,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,`Xperia Tablet`],[m,pe],[p,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[m,ce],[p,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[m,C],[p,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,`Fire Phone $1`],[m,C],[p,v]],[/(playbook);[-\w\),; ]+(rim)/i],[d,m,[p,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[m,T],[p,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[m,ee],[p,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[m,ee],[p,v]],[/(nexus 9)/i],[d,[m,`HTC`],[p,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[d,/_/g,` `],[p,v]],[/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],[d,[m,`TCL`],[p,y]],[/(itel) ((\w+))/i],[[m,Se],d,[p,we,{tablet:[`p10001l`,`w7001`],"*":`mobile`}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[m,`Acer`],[p,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[m,`Meizu`],[p,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[m,`Ulefone`],[p,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[m,`Energizer`],[p,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[m,`Cat`],[p,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[m,`Smartfren`],[p,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[m,`Nothing`],[p,v]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[d,[m,`Archos`],[p,y]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[d,[m,`Archos`],[p,v]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[m,d,[p,y]],[/(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],[m,d,[p,v]],[/(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],[m,d,[p,y]],[/(surface duo)/i],[d,[m,A],[p,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[m,`Fairphone`],[p,v]],[/(u304aa)/i],[d,[m,`AT&T`],[p,v]],[/\bsie-(\w*)/i],[d,[m,`Siemens`],[p,v]],[/\b(rct\w+) b/i],[d,[m,`RCA`],[p,y]],[/\b(venue[\d ]{2,7}) b/i],[d,[m,`Dell`],[p,y]],[/\b(q(?:mv|ta)\w+) b/i],[d,[m,`Verizon`],[p,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[m,`Barnes & Noble`],[p,y]],[/\b(tm\d{3}\w+) b/i],[d,[m,`NuVision`],[p,y]],[/\b(k88) b/i],[d,[m,`ZTE`],[p,y]],[/\b(nx\d{3}j) b/i],[d,[m,`ZTE`],[p,v]],[/\b(gen\d{3}) b.+49h/i],[d,[m,`Swiss`],[p,v]],[/\b(zur\d{3}) b/i],[d,[m,`Swiss`],[p,y]],[/\b((zeki)?tb.*\b) b/i],[d,[m,`Zeki`],[p,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,`Dragon Touch`],d,[p,y]],[/\b(ns-?\w{0,9}) b/i],[d,[m,`Insignia`],[p,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[m,`NextBook`],[p,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,`Voice`],d,[p,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,`LvTel`],d,[p,v]],[/\b(ph-1) /i],[d,[m,`Essential`],[p,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[m,`Envizen`],[p,y]],[/\b(trio[-\w\. ]+) b/i],[d,[m,`MachSpeed`],[p,y]],[/\btu_(1491) b/i],[d,[m,`Rotor`],[p,y]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[d,[m,se],[p,y]],[/(sprint) (\w+)/i],[m,d,[p,v]],[/(kin\.[onetw]{3})/i],[[d,/\./g,` `],[m,A],[p,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[m,he],[p,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[m,he],[p,v]],[/smart-tv.+(samsung)/i],[m,[p,b]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,`SmartTV`],[m,de],[p,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,k],[p,b]],[/(apple) ?tv/i],[m,[d,w+` TV`],[p,b]],[/crkey/i],[[d,D+`cast`],[m,O],[p,b]],[/droid.+aft(\w+)( bui|\))/i],[d,[m,C],[p,b]],[/(shield \w+ tv)/i],[d,[m,se],[p,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[m,fe],[p,b]],[/(bravia[\w ]+)( bui|\))/i],[d,[m,pe],[p,b]],[/(mi(tv|box)-?\w+) bui/i],[d,[m,me],[p,b]],[/Hbbtv.*(technisat) (.*);/i],[m,d,[p,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,Ce],[d,Ce],[p,b]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[d,[p,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,d,[p,_]],[/droid.+; (shield)( bui|\))/i],[d,[m,se],[p,_]],[/(playstation \w+)/i],[d,[m,pe],[p,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[m,A],[p,_]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[d,[m,de],[p,x]],[/((pebble))app/i,/(asu
vendor: 4,952 bytes, line 2
2s|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[m,d,[p,x]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[d,[m,ue],[p,x]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[m,w],[p,x]],[/(opwwe\d{3})/i],[d,[m,ce],[p,x]],[/(moto 360)/i],[d,[m,oe],[p,x]],[/(smartwatch 3)/i],[d,[m,pe],[p,x]],[/(g watch r)/i],[d,[m,k],[p,x]],[/droid.+; (wt63?0{2,3})\)/i],[d,[m,he],[p,x]],[/droid.+; (glass) \d/i],[d,[m,O],[p,x]],[/(pico) (4|neo3(?: link|pro)?)/i],[m,d,[p,x]],[/; (quest( \d| pro)?)/i],[d,[m,ge],[p,x]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[p,S]],[/(aeobc)\b/i],[d,[m,C],[p,S]],[/(homepod).+mac os/i],[d,[m,w],[p,S]],[/windows iot/i],[[p,S]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[p,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[p,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,v]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[d,[m,`Generic`]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[f,te+`HTML`]],[/(arkweb)\/([\w\.]+)/i],[f,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[f,`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],[f,h],[/ladybird\//i],[[f,`LibWeb`]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[f,[h,we,Ee]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,we,Ee],[f,`Windows`]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,`.`],[f,`iOS`]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,ve],[h,/_/g,`.`]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,f],[/(ubuntu) ([\w\.]+) like android/i],[[f,/(.+)/,`$1 Touch`],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[f,h],[/\(bb(10);/i],[h,[f,T]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[f,`Symbian`]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[f,ne+` OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[f,`webOS`]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[f,`watchOS`]],[/crkey\/([\d\.]+)/i],[h,[f,D+`cast`]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,_e],h],[/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],[f,h],[/(sunos) ?([\w\.\d]*)/i],[[f,`Solaris`],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,h]]},P=function(e,t){if(typeof e==c&&(t=e,e=r),!(this instanceof P))return new P(e,t).getResult();var i=typeof n!==s&&n.navigator?n.navigator:r,_=e||(i&&i.userAgent?i.userAgent:a),b=i&&i.userAgentData?i.userAgentData:r,x=t?be(De,t):De,S=i&&i.userAgent==_;return this.getBrowser=function(){var e={};return e[f]=r,e[h]=r,N.call(e,_,x.browser),e[u]=M(e[h]),S&&i&&i.brave&&typeof i.brave.isBrave==o&&(e[f]=`Brave`),e},this.getCPU=function(){var e={};return e[g]=r,N.call(e,_,x.cpu),e},this.getDevice=function(){var e={};return e[m]=r,e[d]=r,e[p]=r,N.call(e,_,x.device),S&&!e[p]&&b&&b.mobile&&(e[p]=v),S&&e[d]==`Macintosh`&&i&&typeof i.standalone!==s&&i.maxTouchPoints&&i.maxTouchPoints>2&&(e[d]=`iPad`,e[p]=y),e},this.getEngine=function(){var e={};return e[f]=r,e[h]=r,N.call(e,_,x.engine),e},this.getOS=function(){var e={};return e[f]=r,e[h]=r,N.call(e,_,x.os),S&&!e[f]&&b&&b.platform&&b.platform!=`Unknown`&&(e[f]=b.platform.replace(/chrome os/i,_e).replace(/macos/i,ve)),e},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 _},this.setUA=function(e){return _=typeof e==l&&e.length>500?Ce(e,500):e,this},this.setUA(_),this};P.VERSION=i,P.BROWSER=j([f,h,u]),P.CPU=j([g]),P.DEVICE=j([d,m,p,_,v,b,y,x,S]),P.ENGINE=P.OS=j([f,h]),typeof e===s?typeof define===o&&define.amd?define(function(){return P}
2):typeof n!==s&&(n.UAParser=P):(typeof t!==s&&t.exports&&(e=t.exports=P),e.UAParser=P);var Oe=typeof n!==s&&(n.jQuery||n.Zepto);if(Oe&&!Oe.ua){var ke=new P;Oe.ua=ke.getResult(),Oe.ua.get=function(){return ke.getUA()},Oe.ua.set=function(e){ke.setUA(e);var t=ke.getResult();for(var n in t)Oe.ua[n]=t[n]}}})(typeof window==`object`?window:e)}))(),zt,Bt;function Vt(){let e=typeof navigator<`u`?navigator.userAgent:``;return(zt!==e||!Bt)&&(Bt=new Rt.UAParser(e).getResult(),zt=e),Bt}var I=`unknown`,Ht={exception:`exceptions`,log:`logs`,measurement:`measurements`,trace:`traces`,event:`events`};function Ut(e){return Math.min(1,Math.max(0,e))}function Wt(e,t){return typeof e===t}function Gt(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function Kt(e,t){try{return e instanceof t}catch{return!1}}var qt=(e=>Wt(e,`null`)),Jt=(e=>Wt(e,`string`)),Yt=(e=>Wt(e,`number`)&&!isNaN(e)||Wt(e,`bigint`)),Xt=(e=>Wt(e,`boolean`)),Zt=(e=>!qt(e)&&Wt(e,`object`)),Qt=(e=>Wt(e,`function`)),$t=(e=>Gt(e,`Array`)),en=(e=>!Zt(e)&&!Qt(e)),tn=typeof Event<`u`,nn=(e=>tn&&Kt(e,Event)),rn=typeof Error<`u`,an=(e=>rn&&Kt(e,Error)),on=(e=>Gt(e,`ErrorEvent`)),sn=(e=>Gt(e,`DOMError`)),cn=(e=>Gt(e,`DOMException`));function ln(e){return e==null?!0:$t(e)||Jt(e)?e.length===0:Zt(e)?Object.keys(e).length===0:!1}function un(e,t){if(e===t)return!0;if(Wt(e,`number`)&&isNaN(e))return Wt(t,`number`)&&isNaN(t);let n=$t(e),r=$t(t);if(n!==r)return!1;if(n&&r){let n=e.length;if(n!==t.length)return!1;for(let r=n;r--!==0;)if(!un(e[r],t[r]))return!1;return!0}let i=Zt(e),a=Zt(t);if(i!==a)return!1;if(e&&t&&i&&a){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;for(let r of n)if(!un(e[r],t[r]))return!1;return!0}return!1}function dn(){return Date.now()}function fn(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function pn(){return new Date().toISOString()}function mn(e){return new Date(e).toISOString()}var hn=function(e){return e.TRACE=`trace`,e.DEBUG=`debug`,e.INFO=`info`,e.LOG=`log`,e.WARN=`warn`,e.ERROR=`error`,e}({}),gn=[`trace`,`debug`,`info`,`log`,`warn`,`error`];function L(){}function _n(e){let{size:t,concurrency:n}=e,r=[],i=0,a=()=>{if(i<n&&r.length){let{producer:e,resolve:t,reject:n}=r.shift();i++,e().then(e=>{i--,a(),t(e)},e=>{i--,a(),n(e)})}};return{add:e=>{if(r.length+i>=t)throw Error(`Task buffer full`);return new Promise((t,n)=>{r.push({producer:e,resolve:t,reject:n}),a()})}}}var vn=`abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789`;function yn(e=10){let t=new Uint32Array(e),n=typeof globalThis<`u`?globalThis.crypto:void 0;if(n?.getRandomValues)n.getRandomValues(t);else for(let n=0;n<e;n++)t[n]=Math.floor(Math.random()*4294967296);let r=``;for(let n=0;n<e;n++)r+=vn[t[n]%59];return r}var bn=typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof self<`u`?self:void 0;function xn(){let e=new WeakSet;return function(t,n){if(Zt(n)&&n!==null){if(e.has(n))return null;e.add(n)}return n}}function Sn(e={}){return JSON.stringify(e??{},xn())}function Cn(e={}){let t={};for(let[n,r]of Object.entries(e))t[n]=Zt(r)&&r!==null?Sn(r):String(r);return t}var R=class e{constructor(){this.subscribers=[]}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>this.unsubscribe(e)}}unsubscribe(e){this.subscribers=this.subscribers.filter(t=>t!==e)}notify(e){this.subscribers.forEach(t=>t(e))}first(){let t=new e,n=e=>{t.notify(e),r.unsubscribe()},r=this.subscribe(n),i=t.unsubscribe.bind(t);return this.withUnsubscribeOverride(t,i,n)}takeWhile(t){let n=new e,r=e=>{t(e)?n.notify(e):n.unsubscribe(r)};this.subscribe(r);let i=n.unsubscribe.bind(n);return this.withUnsubscribeOverride(n,i,r)}filter(t){let n=new e,r=e=>{t(e)&&n.notify(e)};this.subscribe(r);let i=n.unsubscribe.bind(n);return this.withUnsubscribeOverride(n,i,r)}merge(...t){let n=new e,r=[];t.forEach(e=>{let t=e.subscribe(e=>{n.notify(e)});r.push(t)});let i=n.unsubscribeAll.bind(n);return n.unsubscribe=()=>{r.forEach(e=>e.unsubscribe()),i()},n}withUnsubscribeOverride(e,t,n){return e.unsubscribe=e=>{t(e),this.unsubscribe(n)},e}
2unsubscribeAll(){this.subscribers=[]}},wn={debug:L,error:L,info:L,prefix:`Faro`,warn:L};function Tn(e){"@babel/helpers - typeof";return Tn=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Tn(e)}function En(e,t){if(Tn(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Tn(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Dn(e){var t=En(e,`string`);return Tn(t)==`symbol`?t:t+``}function On(e,t,n){return(t=Dn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kn(Object(n),!0).forEach(function(t){On(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var An=z({},console);function jn(e=An,t=1){let n=wn;return t>0&&(n.error=t>=1?function(...t){e.error(`${n.prefix}\n`,...t)}:L,n.warn=t>=2?function(...t){e.warn(`${n.prefix}\n`,...t)}:L,n.info=t>=3?function(...t){e.info(`${n.prefix}\n`,...t)}:L,n.debug=t>=4?function(...t){e.debug(`${n.prefix}\n`,...t)}:L),n}var Mn=class{constructor(){this.unpatchedConsole=An,this.internalLogger=wn,this.config={},this.metas={}}logDebug(...e){this.internalLogger.debug(`${this.name}\n`,...e)}logInfo(...e){this.internalLogger.info(`${this.name}\n`,...e)}logWarn(...e){this.internalLogger.warn(`${this.name}\n`,...e)}logError(...e){this.internalLogger.error(`${this.name}\n`,...e)}},Nn=class extends Mn{isBatched(){return!1}getIgnoreUrls(){return[]}};function Pn(e,t){var n;if(t===void 0)return e;if(e===void 0)return{resourceSpans:t};let r=e.resourceSpans?.[0];if(r===void 0)return e;let i=r?.scopeSpans||[],a=(t==null||(n=t[0])==null?void 0:n.scopeSpans)||[];return z(z({},e),{},{resourceSpans:[z(z({},r),{},{scopeSpans:[...i,...a]})]})}function Fn(e){let t={meta:{}};return e[0]!==void 0&&(t.meta=e[0].meta),e.forEach(e=>{switch(e.type){case`log`:case`event`:case`exception`:case`measurement`:{let n=Ht[e.type],r=t[n];t=z(z({},t),{},{[n]:r===void 0?[e.payload]:[...r,e.payload]});break}case`trace`:t=z(z({},t),{},{traces:Pn(t.traces,e.payload.resourceSpans)})}}),t}var In=`user_action_start`,Ln={Normal:`normal`,Critical:`critical`},Rn=`faro.user.action`,zn=function(e){return e[e.Started=0]=`Started`,e[e.Halted=1]=`Halted`,e[e.Cancelled=2]=`Cancelled`,e[e.Ended=3]=`Ended`,e}({}),Bn=class{constructor(){this.buffer=[]}addItem(e){this.buffer.push(e)}flushBuffer(e){if(Qt(e))for(let t of this.buffer)e(t);this.buffer.length=0}size(){return this.buffer.length}},Vn=class extends R{constructor({name:e,parentId:t,trigger:n,transports:r,attributes:i,trackUserActionsExcludeItem:a,importance:o=Ln.Normal,pushEvent:s}){super(),this.name=e,this.attributes=i,this.id=yn(),this.trigger=n,this.parentId=t??this.id,this.trackUserActionsExcludeItem=a,this.importance=o,this._pushEvent=s,this._itemBuffer=new Bn,this._transports=r,this._state=0,this._start()}addItem(e){return this._state===0&&(this._itemBuffer.addItem(e),!0)}_start(){this._state=0,this._state===0&&(this.startTime=dn(),this._startTimeMono=fn())}halt(){this._state===0&&(this._state=1,this.notify(this._state))}cancel(){this._state===0&&this._itemBuffer.flushBuffer(e=>{this._transports.execute(e)}),this._state=2,this.notify(this._state)}end(){if(this._state===2)return;let e=dn(),t=fn()-this._startTimeMono;this._state=3,this._itemBuffer.flushBuffer(e=>{if(Hn(e,this.trackUserActionsExcludeItem)){this._transports.execute(e);return}let t=z(z({},e),{},{payload:z(z({},e.payload),{},{action:{parentId:this.id,name:this.name}})});this._transports.execute(t)}),this._state=3,this.notify(this._state),this._pushEvent(Rn,z({userActionName:this.name,userActionStartTime:this.startTime.toString(),userActionEndTime:e.toString(),userActionDuration:t.toString(),userActionTrigger:this.trigger,userActionImportance:this.importance},Cn(this.attributes)),void 0,{timestampOverwriteMs:this.startTime,customPayloadTransformer:e=>(e.action={id:this.id,name:this.name},e)})}getState(){return this._state}};function Hn(e,t){return t?.(e)||e.type===`measurement`&&e.payload.type===`web-vitals`}var Un=new R;function Wn({transports:e,internalLogger:t,config:n,pushEvent:r}){let i=n.userActionsInstrumentation?.excludeItem,a,o=(n,o,c)=>{if(s()===void 0){let t=new Vn({name:n,transports:e,attributes:o,trigger:c?.triggerName||`faroApiCall`,importance:c?.importance||Ln.Normal,trackUserActionsExcludeItem:i,pushEvent:r});return t.filter(e=>[3,2].includes(e)).first().subscribe(()=>{a=void 0}),Un.notify({type:In,userAction:t,initialActivityTimeout:c?.initialActivityTimeout}),a=t,a}t.error(`Attempted to create a new user action while one is already running. This is not possible.`)},s=()=>a;return{startUserAction:o,getActiveUserAction:s}}function Gn(e,t){return!e||e?.getState()!==0?!1:(e.addItem(t),!0)}var Kn=`Error`,qn=e=>e.map(e=>Zt(e)?Sn(e):String(e)).join(` `),Jn=e=>e.map(e=>{try{return String(e)}catch{return``}}).join(` `),Yn=class extends Mn{constructor(...e){super(...e),this.api={},this.transports={}}},B=`2.11.0`,Xn=`_faroInternal`;function Zn(e){e.config.isolate?e.internalLogger.debug(`Skipping registering internal Faro instance on global object`):(e.internalLogger.debug(`Registering internal Faro instance on global object`),Object.defineProperty(bn,Xn,{configurable:!1,enumerable:!1,writable:!1,value:e}))}function Qn(){return Xn in bn}function $n(){return{pushLog:()=>{},pushError:()=>{},changeStacktraceParser:()=>{},getStacktraceParser:()=>void 0,pushMeasurement:()=>{},pushTraces:()=>{},getOTEL:()=>void 0,getTraceContext:()=>void 0,initOTEL:()=>{},isOTELInitialized:()=>!1,setUser:()=>{},resetUser:()=>{},setSession:()=>{},resetSession:()=>{},getSession:()=>
2void 0,setView:()=>{},getView:()=>void 0,setPage:()=>{},getPage:()=>void 0,pushEvent:()=>{},startUserAction:()=>void 0,getActiveUserAction:()=>void 0}}function er(e){if(e.config.preventGlobalExposure)e.internalLogger.debug(`Skipping registering public Faro instance in the global scope`);else{if(e.internalLogger.debug(`Registering public faro reference in the global scope using "${e.config.globalObjectKey}" key`),e.config.globalObjectKey in bn){e.internalLogger.warn(`Skipping global registration due to key "${e.config.globalObjectKey}" being used already. Please set "globalObjectKey" to something else or set "preventGlobalExposure" to "true"`);return}Object.defineProperty(bn,e.config.globalObjectKey,{configurable:!1,writable:!1,value:e})}}var V={api:$n()};function tr(e,t,n,r,i,a,o){return t.debug(`Initializing Faro`),V={api:a,config:n,instrumentations:o,internalLogger:t,metas:r,pause:i.pause,transports:i,unpatchedConsole:e,unpause:i.unpause},Zn(V),er(V),V}var nr=250,rr=50,ir=class{constructor(e,t){this.signalBuffer=[],this.itemLimit=t?.itemLimit??rr,this.sendTimeout=t?.sendTimeout??nr,this.paused=t?.paused||!1,this.sendFn=e,this.paused||this.start(),typeof document<`u`&&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=setInterval(()=>this.flush(),this.sendTimeout))}pause(){this.paused=!0,clearInterval(this.flushInterval)}groupItems(e){let t=new Map;return e.forEach(e=>{let n=JSON.stringify(e.meta),r=t.get(n);r=r===void 0?[e]:[...r,e],t.set(n,r)}),Array.from(t.values())}flush(){this.paused||this.signalBuffer.length===0||(this.groupItems(this.signalBuffer).forEach(this.sendFn),this.signalBuffer=[])}};function ar(e,t,n,r){t.debug(`Initializing transports`);let i=[],a=[],o=(...a)=>{t.debug(`Adding transports`),a.forEach(a=>{if(t.debug(`Adding "${a.name}" transport`),i.some(e=>e===a)){t.warn(`Transport ${a.name} is already added`);return}a.unpatchedConsole=e,a.internalLogger=t,a.config=n,a.metas=r,i.push(a)})},s=(...e)=>{t.debug(`Adding beforeSendHooks
3`,a),e.forEach(e=>{e&&a.push(e)})},c=e=>{let t=e;for(let e of a){let r=t.map(e).filter(Boolean);if(r.length===0)return[];t=or(r,n)}return t},l=e=>{let n=c(e);if(n.length!==0)for(let e of i)t.debug(`Transporting item using ${e.name}\n`,n),e.isBatched()&&e.send(n)},u=e=>{if(n.batching?.enabled&&i.every(e=>e.isBatched()))return;let[r]=c([e]);if(r!==void 0)for(let e of i)t.debug(`Transporting item using ${e.name}\n`,r),e.isBatched()?n.batching?.enabled||e.send([r]):e.send(r)},d;return n.batching?.enabled&&(d=new ir(l,{sendTimeout:n.batching.sendTimeout,itemLimit:n.batching.itemLimit,paused:n.paused})),{add:o,addBeforeSendHooks:s,getBeforeSendHooks:()=>[...a],execute:e=>{n.paused||(n.batching?.enabled&&d?.addItem(e),u(e))},isPaused:()=>n.paused,pause:()=>{t.debug(`Pausing transports`),d?.pause(),n.paused=!0},remove:(...e)=>{t.debug(`Removing transports`),e.forEach(e=>{t.debug(`Removing "${e.name}" transport`);let n=i.indexOf(e);if(n===-1){t.warn(`Transport "${e.name}" is not added`);return}i.splice(n,1)})},removeBeforeSendHooks:(...e)=>{t.debug(`Removing beforeSendHooks`),a=a.filter(t=>!e.includes(t))},get transports(){return[...i]},unpause:()=>{t.debug(`Unpausing transports`),d?.start(),n.paused=!1}}}function or(e,t){if(t.preserveOriginalError)for(let t of e)t.type===`exception`&&delete t.payload.originalError;return e}var sr=An;function cr(e){return sr=e.unpatchedConsole??sr,sr}var lr=wn;function ur(e,t){return lr=jn(e,t.internalLoggerLevel),lr}function dr(e){e.transports.add(...e.config.transports),e.transports.addBeforeSendHooks(e.config.beforeSend)}function fr({internalLogger:e,config:t,metas:n,transports:r,tracesApi:i,userActionsApi:a}){let o=null;return{pushEvent:(s,c,l,{skipDedupe:u,spanContext:d,timestampOverwriteMs:f,customPayloadTransformer:p=e=>e}={})=>{try{let m=Cn(c),h={meta:n.value,payload:p({name:s,domain:l??t.eventDomain,attributes:ln(m)?void 0:m,timestamp:f?mn(f):pn(),trace:d?{trace_id:d.traceId,span_id:d.spanId}:i.getTraceContext()}),type:`event`},g={name:h.payload.name,attributes:h.payload.attributes,domain:h.payload.domain};if(!u&&t.dedupe&&!qt(o)&&un(g,o)){e.debug(`Skipping event push because it is the same as the last one
4`,h.payload);return}o=g,e.debug(`Pushing event
5`,h),Gn(a.getActiveUserAction(),h)||r.execute(h)}catch(t){e.error(`Error pushing event`,t)}}}}function pr(e,t){return e.some(e=>Jt(e)?t.includes(e):!!t.match(e))}var mr;function hr({internalLogger:e,config:t,metas:n,transports:r,tracesApi:i,userActionsApi:a}){e.debug(`Initializing exceptions API`);let o=null;mr=t.parseStacktrace??mr;let s=t=>{e.debug(`Changing stacktrace parser`),mr=t??mr},c=()=>mr,{ignoreErrors:l=[],preserveOriginalError:u}=t;return s(t.parseStacktrace),{changeStacktraceParser:s,getStacktraceParser:c,pushError:(s,{skipDedupe:c,stackFrames:d,type:f,context:p,spanContext:m,timestampOverwriteMs:h,originalError:g,fingerprint:_,fatal:v}={})=>
5{if(!_r(l,g??s))try{let l=Cn(z(z({},gr(g??s)),p??{})),y={meta:n.value,payload:z(z(z(z({type:f||s.name||`Error`,value:s.message,timestamp:h?mn(h):pn(),trace:m?{trace_id:m.traceId,span_id:m.spanId}:i.getTraceContext()},ln(l)?{}:{context:l}),u?{originalError:g}:{}),_?{fingerprint:_}:{}),v===void 0?{}:{fatal:v}),type:`exception`};d??=s.stack?mr?.(s).frames:void 0,d?.length&&(y.payload.stacktrace={frames:d});let b={type:y.payload.type,value:y.payload.value,stacktrace:y.payload.stacktrace,context:y.payload.context,fingerprint:y.payload.fingerprint,fatal:y.payload.fatal??!1};if(!c&&t.dedupe&&!qt(o)&&un(b,o)){e.debug(`Skipping error push because it is the same as the last one
6`,y.payload);return}o=b,e.debug(`Pushing exception
7`,y),Gn(a.getActiveUserAction(),y)||r.execute(y)}catch(t){e.error(`Error pushing event`,t)}}}}function gr(e){let t=e.cause;return an(t)?t=e.cause.toString():t!==null&&(Zt(e.cause)||$t(e.cause))?t=Sn(e.cause):t!=null&&(t=e.cause.toString()),t==null?{}:{cause:t}}function _r(e,t){let{message:n,name:r,stack:i}=t;return pr(e,n+` `+r+` `+i)}function vr({internalLogger:e,config:t,metas:n,transports:r,tracesApi:i,userActionsApi:a}){e.debug(`Initializing logs API`);let o=null,s=t.logArgsSerializer??Jn;return{pushLog:(c,{context:l,level:u,skipDedupe:d,spanContext:f,timestampOverwriteMs:p}={})=>{try{let m=Cn(l),h={type:`log`,payload:{message:s(c),level:u??`log`,context:ln(m)?void 0:m,timestamp:p?mn(p):pn(),trace:f?{trace_id:f.traceId,span_id:f.spanId}:i.getTraceContext()},meta:n.value},g={message:h.payload.message,level:h.payload.level,context:h.payload.context};if(!d&&t.dedupe&&!qt(o)&&un(g,o)){e.debug(`Skipping log push because it is the same as the last one
8`,h.payload);return}o=g,e.debug(`Pushing log
9`,h),Gn(a.getActiveUserAction(),h)||r.execute(h)}catch(t){e.error(`Error pushing log
10`,t)}}}}function yr({internalLogger:e,config:t,metas:n,transports:r,tracesApi:i,userActionsApi:a}){e.debug(`Initializing measurements API`);let o=null;return{pushMeasurement:(s,{skipDedupe:c,context:l,spanContext:u,timestampOverwriteMs:d}={})=>{try{let f=Cn(l),p={type:`measurement`,payload:z(z({},s),{},{trace:u?{trace_id:u.traceId,span_id:u.spanId}:i.getTraceContext(),timestamp:d?mn(d):pn(),context:ln(f)?void 0:f}),meta:n.value},m={type:p.payload.type,values:p.payload.values,context:p.payload.context};if(!c&&t.dedupe&&!qt(o)&&un(m,o)){e.debug(`Skipping measurement push because it is the same as the last one
11`,p.payload);return}o=m,e.debug(`Pushing measurement
12`,p),Gn(a.getActiveUserAction(),p)||r.execute(p)}catch(t){e.error(`Error pushing measurement
13`,t)}}}}function br({internalLogger:e,metas:t}){e.debug(`Initializing meta API`);let n,r,i,a,o=e=>{r&&t.remove(r),r={user:e},t.add(r)},s=(e,r)=>{var i;let a=r?.overrides,o=a?{overrides:z(z({},n==null||(i=n.session)==null?void 0:i.overrides),a)}:{};n&&t.remove(n),n={session:z(z({},ln(e)?void 0:e),o)},t.add(n)},c=()=>t.value.session,l=(e,n)=>{var r;if(n?.overrides&&s(c(),{overrides:n.overrides}),(i==null||(r=i.view)==null?void 0:r.name)===e?.name)return;let a=i;i={view:e},t.add(i),a&&t.remove(a)},u=()=>t.value.view,d=e=>{let n=Jt(e)?z(z({},a?.page??f()),{},{id:e}):e;a&&t.remove(a),a={page:n},t.add(a)},f=()=>t.value.page;return{setUser:o,resetUser:o,setSession:s,resetSession:s,getSession:c,setView:l,getView:u,setPage:d,getPage:f}}function xr(e,t,n,r,i){t.debug(`Initializing traces API`);let a;return{getOTEL:()=>a,getTraceContext:()=>{let e=a?.trace.getSpanContext(a.context.active());return e?{trace_id:e.traceId,span_id:e.spanId}:void 0},initOTEL:(e,n)=>{t.debug(`Initializing OpenTelemetry`),a={trace:e,context:n}},isOTELInitialized:()=>!!a,pushTraces:e=>{try{let n={type:`trace`,payload:e,meta:r.value};t.debug(`Pushing trace
14`,n),i.execute(n)}catch(e){t.error(`Error pushing trace
15`,e)}}}}function Sr(e,t,n,r,i){t.debug(`Initializing API`);let a=null,o=Wn({transports:i,config:n,internalLogger:t,pushEvent:(e,n,r,i)=>{a?a(e,n,r,i):t.warn(`pushEventImpl is not initialized. Event dropped:`,{name:e,attributes:n,domain:r,options:i})}}),s=xr(e,t,n,r,i),c={unpatchedConsole:e,internalLogger:t,userActionsApi:o,config:n,metas:r,transports:i,tracesApi:s},l=fr(c);
15return a=l.pushEvent,z(z(z(z(z(z(z({},s),hr(c)),br(c)),vr(c)),yr(c)),l),o)}function Cr(e,t,n,r,i,a){t.debug(`Initializing instrumentations`);let o=[];return{add:(...s)=>{t.debug(`Adding instrumentations`),s.forEach(s=>{if(t.debug(`Adding "${s.name}" instrumentation`),o.some(e=>e.name===s.name)){t.warn(`Instrumentation ${s.name} is already added`);return}s.unpatchedConsole=e,s.internalLogger=t,s.config=n,s.metas=r,s.transports=i,s.api=a,o.push(s),s.initialize()})},get instrumentations(){return[...o]},remove:(...e)=>{t.debug(`Removing instrumentations`),e.forEach(e=>{var n,r;t.debug(`Removing "${e.name}" instrumentation`);let i=o.reduce((t,n,r)=>t===null&&n.name===e.name?r:null,null);if(i===null){t.warn(`Instrumentation "${e.name}" is not added`);return}(n=(r=o[i]).destroy)==null||n.call(r),o.splice(i,1)})}}}function wr(e){e.instrumentations.add(...e.config.instrumentations)}function Tr(e,t,n){let r=[],i=[],a=()=>r.reduce((e,t)=>Object.assign(e,Qt(t)?t():t),{}),o=()=>{if(i.length){let e=a();i.forEach(t=>t(e))}};return{add:(...e)=>{t.debug(`Adding metas
16`,e),r.push(...e),o()},remove:(...e)=>{t.debug(`Removing metas
17`,e),r=r.filter(t=>!e.includes(t)),o()},addListener:e=>{t.debug(`Adding metas listener
18`,e),i.push(e)},removeListener:e=>{t.debug(`Removing metas listener
19`,e),i=i.filter(t=>t!==e)},get value(){return a()}}}function Er(e){let t=`__faroBundleId_${e}`,n=bn?.[t];if(typeof n==`string`&&n!==``)return n;let r=typeof window<`u`?window[t]:void 0;if(typeof r==`string`&&r!==``)return r}function Dr(e){return bn?.[`__faroGitHash_${e}`]}function Or(e){let t=e.config.app.name,n=t?Dr(t):void 0,r={sdk:{version:B,name:`faro`},app:z({bundleId:t&&Er(t)},n===void 0?{}:{gitHash:n})},i=e.config.sessionTracking?.session;i&&e.api.setSession(i),e.config.app&&(r.app=z(z({},e.config.app),r.app)),e.config.user&&(r.user=e.config.user),e.config.view&&(r.view=e.config.view),e.metas.add(r,...e.config.metas??[])}function kr(e){let t=cr(e),n=ur(t,e);if(Qn()&&!e.isolate){n.error(`Faro is already registered. Either add instrumentations, transports etc. to the global faro instance or use the "isolate" property`);return}n.debug(`Initializing`);let r=Tr(t,n,e),i=ar(t,n,e,r),a=Sr(t,n,e,r,i),o=tr(t,n,e,r,i,a,Cr(t,n,e,r,i,a));return Or(o),dr(o),wr(o),o}var Ar=`faro`,jr={enabled:!0,sendTimeout:250,itemLimit:50},Mr=`view_changed`,Nr=`session_start`,Pr=`session_resume`,Fr=`session_extend`,Ir=`service_name_override`,Lr=()=>{let{browser:e,os:t,ua:n}=Vt(),{name:r,version:i}=e,{name:a,version:o}=t,s=navigator.language,c=n.includes(`Mobi`),l=u();return{browser:{name:r??I,version:i??I,os:`${a??I} ${o??I}`,userAgent:n??I,language:s??I,mobile:c,brands:l??I,viewportWidth:`${window.innerWidth}`,viewportHeight:`${window.innerHeight}`}};function u(){if(r&&i&&`userAgentData`in navigator&&navigator.userAgentData)return navigator.userAgentData.brands}},Rr=()=>{let{name:e,version:t}=Vt().os;if(!e&&!t)return{};let n={};return e&&(n.name=e),t&&(n.version=t),{os:n}};function zr(e){var t,n;return{id:((t=V.config)==null||(t=t.sessionTracking)==null||(n=t.generateSessionId)==null?void 0:n.call(t))??yn(),attributes:e}}var Br=()=>({sdk:{name:`faro-web`,version:B}});function Vr(){return V.transports.transports.flatMap(e=>e.getIgnoreUrls())}function Hr(e=``){return Vr().some(t=>e&&e.match(t)!=null)}function Ur(e){if(Jt(e))return e;if(e instanceof URL)return e.href;if(!ln(e)&&Qt(e?.toString))return e.toString()}var Wr=`com.grafana.faro.session`,Gr=9e5,Kr=1e3,qr={enabled:!0,persistent:!1,maxSessionPersistenceTime:Gr},Jr={session:`sessionStorage`,local:`localStorage`};function Yr(e){try{let t;t=window[e];let n=`__faro_storage_test__`;return t.setItem(n,n),t.removeItem(n),!0}catch(n){var t;return(t=V.internalLogger)==null||t.info(`Web storage of type ${e} is not available. Reason: ${n}`),!1}}function Xr(e,t){return ti(t)?window[t].getItem(e):null}function Zr(e,t,n){if(ti(n))try{window[n].setItem(e,t)}catch{}}function Qr(e,t){ti(t)&&window[t].removeItem(e)}var $r=Yr(Jr.local),ei=Yr(Jr.session);function ti(e){return e===Jr.local?$r:e===Jr.session&&ei}function ni(e,t){let n=!1,r,i=()=>{if(r==null){n=!1;return}e(...r),r=null,setTimeout(i,t)};return(...a)=>{if(n){r=a;return}e(...a),n=!0,setTimeout(i,t)}}function ri(){var e;let t=V.config.sessionTracking,n=(t==null||(e=t.sampler)==null?void 0:e.call(t,{metas:V.metas.value}
19))??t?.samplingRate??1,r=typeof n==`number`?Ut(n):0;return Math.random()<r}function ii(e){"@babel/helpers - typeof";return ii=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ii(e)}function ai(e,t){if(ii(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ii(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function oi(e){var t=ai(e,`string`);return ii(t)==`symbol`?t:t+``}function si(e,t,n){return(t=oi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ci(Object(n),!0).forEach(function(t){si(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function li({sessionId:e,started:t,lastActivity:n,isSampled:r=!0}={}){var i;let a=dn(),o=(i=V.config)==null||(i=i.sessionTracking)==null?void 0:i.generateSessionId;return e??=typeof o==`function`?o():yn(),{sessionId:e,lastActivity:n??a,started:t??a,isSampled:r}}function ui(e){if(e==null)return!1;let t=dn();return t-e.started<144e5&&t-e.lastActivity<Gr}function di({fetchUserSession:e,storeUserSession:t,adoptSession:n}){return function({forceSessionExtend:r}={forceSessionExtend:!1}){if(!e||!t)return;let i=V.config.sessionTracking,a=i?.persistent;if(a&&!$r||!a&&!ei)return;let o=e();if(r===!1&&ui(o)){t(H(H({},o),{},{lastActivity:dn()}));let e=V.metas.value.session?.id;n!=null&&o.sessionMeta!=null&&o.sessionId!==e&&n(o.sessionMeta)}else{var s,c;let e=fi(li({isSampled:ri()}),o);t(e),(s=V.api)==null||s.setSession(e.sessionMeta),i==null||(c=i.onSessionChange)==null||c.call(i,o?.sessionMeta??null,e.sessionMeta)}}}function fi(e,t){var n,r;let i=H(H({},e),{},{sessionMeta:{id:e.sessionId,attributes:mi(H(H(H({},(n=V.config.sessionTracking)==null||(n=n.session)==null?void 0:n.attributes),V.metas.value.session?.attributes??{}),{},{isSampled:e.isSampled.toString()}))}}),a=V.metas.value.session?.overrides??(t==null||(r=t.sessionMeta)==null?void 0:r.overrides);ln(a)||(i.sessionMeta.overrides=a);let o=t?.sessionId;return o!=null&&(i.sessionMeta.attributes.previousSession=o),i}function pi({fetchUserSession:e,storeUserSession:t}){let n=!1;return function(r){if(n)return;let i=r.session,a=e(),o=i?.id,s=i?.attributes,c=i?.overrides,l=a?.sessionMeta,u=l?.overrides,d=!!c&&!un(c,u),f=!!s&&!un(s,l?.attributes);if(i&&o!==a?.sessionId||f||d){let e=fi(li({sessionId:o,isSampled:ri()}),a);t(e),hi(d,c,u),n=!0;try{V.api.setSession(e.sessionMeta)}finally{n=!1}}}}function mi(e){let t={};for(let n of Object.keys(e)){let r=e[n];r!==void 0&&(t[n]=r)}return t}function hi(e,t={},n={}){if(!e)return;let r=t.serviceName,i=n.serviceName??V.metas.value.app?.name??``;r&&r!==i&&V.api.pushEvent(Ir,{serviceName:r,previousServiceName:i})}var gi=class e{constructor(){this.adopting=!1,this.isAdopting=()=>this.adopting,this.adoptSession=e=>{this.adopting=!0;try{var t;(t=V.api)==null||t.setSession(e)}finally{this.adopting=!1}},this.updateSession=ni(()=>this.updateUserSession(),Kr),this.updateUserSession=di({fetchUserSession:e.fetchUserSession,storeUserSession:e.storeUserSession,adoptSession:this.adoptSession}),this.init()}static removeUserSession(){Qr(Wr,e.storageTypeLocal)}static storeUserSession(t){Zr(Wr,Sn(t),e.storageTypeLocal)}static fetchUserSession(){let t=Xr(Wr,e.storageTypeLocal);return t?JSON.parse(t):null}init(){document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&this.updateSession()}),V.metas.addListener(pi({fetchUserSession:e.fetchUserSession,storeUserSession:e.storeUserSession}))}};gi.storageTypeLocal=Jr.local;var _i=class e{constructor(){this.isAdopting=()=>!1,this.updateSession=ni(()=>this.updateUserSession(),Kr),this.updateUserSession=di({fetchUserSession:e.fetchUserSession,storeUserSession:e.storeUserSession}),this.init()}static removeUserSession(){Qr(Wr,e.storageTypeSession)}static storeUserSession(t){Zr(Wr,Sn(t),e.storageTypeSession)}static fetchUserSession(){let t=Xr(Wr,e.storageTypeSession);return t?JSON.parse(t):null}init(){document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&this.updateSession()}),V.metas.addListener(pi({fetchUserSession:e.fetchUserSession,storeUserSession:e.storeUserSession}))}};_i.storageTypeSession=Jr.session;function vi(e){return e?.persistent?gi:_i}var yi=class extends Yn{constructor(...e){super(...e),this.name=`@grafana/faro-web-sdk:instrumentation-se
19ssion`,this.version=B,this.isAdoptingSession=()=>!1}sendSessionStartEvent(e){let t=e.session;if(t&&t.id!==this.notifiedSession?.id){if(this.isAdoptingSession()){this.notifiedSession=t;return}if(this.notifiedSession&&this.notifiedSession.id===t.attributes?.previousSession){this.api.pushEvent(Fr,{},void 0,{skipDedupe:!0}),this.notifiedSession=t;return}this.notifiedSession=t,this.api.pushEvent(Nr,{},void 0,{skipDedupe:!0})}}createInitialSession(e,t){let n=e.fetchUserSession();if(t.persistent&&t.maxSessionPersistenceTime&&n){let e=dn();n.lastActivity<e-t.maxSessionPersistenceTime&&(gi.removeUserSession(),n=null)}let r,i;if(ui(n)){let e=n?.sessionId;i=li({sessionId:e,isSampled:n.isSampled||!1,started:n?.started});let a=n?.sessionMeta,o=H(H({},t.session?.overrides),a?.overrides);i.sessionMeta=H(H({},t.session),{},{id:e,attributes:H(H(H({},t.session?.attributes),a?.attributes),{},{isSampled:i.isSampled.toString()}),overrides:o}),r=Pr}else{let e=t.session?.id??zr().id;i=li({sessionId:e,isSampled:ri()});let n=t.session?.overrides;i.sessionMeta=H({id:e,attributes:H({isSampled:i.isSampled.toString()},t.session?.attributes)},n?{overrides:n}:{}),r=Nr}return{initialSession:i,lifecycleType:r}}registerBeforeSendHook(e){var t;let n=new e;this.isAdoptingSession=n.isAdopting;let{updateSession:r}=n,i;(t=this.transports)==null||t.addBeforeSendHooks(e=>{let t=this.metas.value.session?.id;r();let n=this.metas.value.session;n!=null&&t!=null&&n.id!==t&&(i={from:t,to:n});let a=i!=null&&e.meta.session?.id===i.from,o=(a?i.to:e.meta.session)?.attributes;if(o&&o?.isSampled===`true`){let t=JSON.parse(JSON.stringify(e));a&&(t.meta.session=JSON.parse(JSON.stringify(i.to)));let n=t.meta.session?.attributes;if(n==null||delete n.isSampled,Object.keys(n??{}).length===0){var s;(s=t.meta.session)==null||delete s.attributes}return t}return null})}initialize(){this.logDebug(`init session instrumentation`);let e=this.config.sessionTracking;if(e?.enabled){let t=vi(e);this.registerBeforeSendHook(t);let{initialSession:n,lifecycleType:r}=this.createInitialSession(t,e);t.storeUserSession(n);let i=n.sessionMeta;this.notifiedSession=i,this.api.setSession(i),r===`session_start`&&this.api.pushEvent(Nr,{},void 0,{skipDedupe:!0}),r===`session_resume`&&this.api.pushEvent(Pr,{},void 0,{skipDedupe:!0})}this.metas.addListener(this.sendSessionStartEvent.bind(this))}},bi=/^\s*at (?:(?![a-z]+:\/\/)([^(]+?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,xi=/\((\S*)(?::(\d+))(?::(\d+))\)/,Si=/^(?=[\s\S]*?(?:\/|bundle|\.js|\[native code]))\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,Ci=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,wi=`safari-extension`,Ti=`safari-web-extension`,Ei=/Minified React error #\d+;/i;function Di(e,t,n,r){let i={filename:e||document.location.href,function:t||`?`};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}function Oi(e,t){let n=e?.includes(wi),r=!n&&e?.includes(`safari-web-extension`);return!n&&!r?[e,t]:[e?.includes(`@`)?e.split(`@`)[0]:e,n?`${wi}:${t}`:`${Ti}:${t}`]}var ki=1024;function Ai(e){let t=[];e.stacktrace?t=e.stacktrace.split(`
20`).filter((e,t)=>t%2==0):e.stack&&(t=e.stack.split(`
21`));let n=t.reduce((t,n,r)=>{if(n.length>ki)return t;let i,a,o,s,c;if(i=bi.exec(n)){if(a=i[1],o=i[2],s=i[3],c=i[4],o?.startsWith(`eval`)){let e=xi.exec(o);e&&(o=e[1],s=e[2],c=e[3])}o=o?.startsWith(`address at `)?o.substring(11):o,[a,o]=Oi(a,o)}else if(i=Si.exec(n)){if(a=i[1],o=i[3],s=i[4],c=i[5],o&&o.includes(` > eval`)){let e=Ci.exec(o);e&&(a||=`eval`,o=e[1],s=e[2])}else r===0&&!c&&Yt(e.columnNumber)&&(c=String(e.columnNumber+1));[a,o]=Oi(a,o)}return(o||a)&&t.push(Di(o,a,s?Number(s):void 0,c?Number(c):void 0)),t},[]);return Ei.test(e.message)?n.slice(1):n}function ji(e){return{frames:Ai(e)}}var Mi=`resource-entry`,Ni=`http-request-start`,Pi=`http-request-end`,Fi=`dom-mutation`,Ii=`console`,Li,Ri=!1;function zi(e){if(Li||=new R,!Ri){let t=e??An;
21gn.forEach(e=>{console[e]=(...n)=>{var r;Li.notify({type:Ii,level:e,args:n}),(r=t[e])==null||r.apply(console,n)}}),Ri=!0}return Li}var Bi=`Non-Error promise rejection captured with value:`,Vi=`UnhandledRejection`,Hi=`DOMError`,Ui=`DOMException`,Wi=`Non-Error exception captured with keys:`,Gi=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Ki(e){let t=e.match(Gi),n=t?.[1]??Kn;return[t?.[2]??e,n]}function qi(e){let t,n,r=[],i,a;if(on(e)&&e.error)t=e.error.message,n=e.error.name,r=Ai(e.error);else if((i=sn(e))||cn(e)){let{name:r,message:a}=e;n=r??(i?Hi:Ui),t=a?`${n}: ${a}`:n}else an(e)?(n=e.name,t=e.message,r=Ai(e)):(Zt(e)||(a=nn(e)))&&(n=a?e.constructor.name:void 0,t=`${Wi} ${Object.keys(e)}`);return[t,n,r]}function Ji(e){let[t,n,r,i,a]=e,o,s,c=[],l=Jt(t),u=Di(n,`?`,r,i);return a||!l?([o,s,c]=qi(a??t),c.length===0&&(c=[u])):l&&([o,s]=Ki(t),c=[u]),{value:o,type:s,stackFrames:c}}function Yi(e,t){return an(e[0])?Ji(e):{value:t(e)}}var Xi=class e extends Yn{constructor(...e){super(...e),this.name=`@grafana/faro-web-sdk:instrumentation-console`,this.version=B,this.errorSerializer=Jn}initialize(){let t=this.config.consoleInstrumentation,n=t?.serializeErrors||!!t?.errorSerializer;this.errorSerializer=n?t?.errorSerializer??qn:Jn;let r=t?.disabledLevels??e.defaultDisabledLevels,i=zi(this.unpatchedConsole);this.subscription=i.subscribe(({level:n,args:i})=>{if(!r.includes(n))try{if(n===hn.ERROR&&!t?.consoleErrorAsLog){let{value:t,type:n,stackFrames:r}=Yi(i,this.errorSerializer);if(t&&!n&&!r){this.api.pushError(Error(e.consoleErrorPrefix+t));return}this.api.pushError(Error(e.consoleErrorPrefix+t),{type:n,stackFrames:r})}else if(n===hn.ERROR&&t?.consoleErrorAsLog){let{value:t,type:r,stackFrames:a}=Yi(i,this.errorSerializer);this.api.pushLog(t?[e.consoleErrorPrefix+t]:i,{level:n,context:{value:t??``,type:r??``,stackFrames:a?.length?qn(a):``}})}else this.api.pushLog(i,{level:n})}catch(e){this.logError(e)}})}destroy(){var e;(e=this.subscription)==null||e.unsubscribe(),this.subscription=void 0}};Xi.defaultDisabledLevels=[hn.DEBUG,hn.TRACE,hn.LOG],Xi.consoleErrorPrefix=`console.error: `;function Zi(e){let t=window.onerror;window.onerror=(...n)=>{try{let{value:t,type:r,stackFrames:i}=Ji(n),a=n[4];if(t){let n={type:r,stackFrames:i};a!=null&&(n.originalError=a),e.pushError(Error(t),n)}}finally{t?.apply(window,n)}}}var Qi=[];function $i(e){let t=t=>{let n=t;n.reason?n=t.reason:t.detail?.reason&&(n=t.detail?.reason);let r,i,a=[];en(n)?(r=`${Bi} ${String(n)}`,i=Vi):[r,i,a]=qi(n),r&&e.pushError(Error(r),{type:i,stackFrames:a})};window.addEventListener(`unhandledrejection`,t),Qi.push(t)}var ea=class extends Yn{constructor(...e){super(...e),this.name=`@grafana/faro-web-sdk:instrumentation-errors`,this.version=B}initialize(){this.logDebug(`Initializing`),Zi(this.api),$i(this.api)}},ta=class extends Yn{constructor(...e){super(...e),this.name=`@grafana/faro-web-sdk:instrumentation-view`,this.version=B}sendViewChangedEvent(e){let t=e.view;t&&t.name!==this.notifiedView?.name&&(this.api.pushEvent(Mr,{fromView:this.notifiedView?.name??I,toView:t.name??I},void 0,{skipDedupe:!0}),this.notifiedView=t)}initialize(){this.metas.addListener(this.sendViewChangedEvent.bind(this))}},na=`com.grafana.faro.lastNavigationId`,ra=class{t;o=0;i=[];l(e){if(e.hadRecentInput)return;let t=this.i[0],n=this.i.at(-1);this.o&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.o+=e.value,this.i.push(e)):(this.o=e.value,this.i=[e]),this.t?.(e)}},ia=()=>{let e=performance.getEntriesByType(`navigation`)[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},aa=e=>{if(document.readyState===`loading`)return`loading`;let t=ia();if(t){if(e<t.domInteractive)return`loading`;if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return`dom-interactive`;if(t.domComplete===0||e<t.domComplete)return`dom-content-loaded`}return`complete`},oa=e=>{let t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,``)},sa=e=>{let t=``;try{for(;e?.nodeType!==9;){let n=e,r=n.id?`#`+n.id:[oa(n),...Array.from(n.classList??[]).sort()].join(`.`);if(t.length+r.length>99)return t||r;if(t=t?r+`>`+t:r,n.id)break;e=n.parentNode}}catch{}return t},ca=new WeakMap;function la(e,t){let n=ca.get(t);return n||(n=new WeakMap,ca.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var ua=-1,da=()=>ua,fa=e=>{addEventListener(`pageshow`,t=>{t.persisted&&(ua=t.timeStamp,e(t))},!0)},U=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=((e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`)(t.value,n),e(t)))}},pa=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},ma=()=>ia()?.activationStart??0,ha=-1,ga=new Set,_a=()=>document.visibilityState!==`hidden`||document.prerendering?1/0:0,va=e=>{if(document.visibilityState===`hidden`){if(e.type===`visibilitychange`)for(let e of ga)e();isFinite(ha)||(ha=e.type===`visibilitychange`?e.timeStamp:0,removeEventListener(`prerenderingchange`,va,!0))}},ya=(e=!1)=>
21{if(e&&(ha=1/0),ha<0){let e=ma();ha=(document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).find(t=>t.name===`hidden`&&t.startTime>=e)?.startTime)??_a(),addEventListener(`visibilitychange`,va,!0),addEventListener(`prerenderingchange`,va,!0),fa(()=>{setTimeout(()=>{ha=_a()})})}return{get firstHiddenTime(){return ha},onHidden(e){ga.add(e)}}},ba=(e,t=-1,n,r=0,i,a,o)=>{let s=ia(),c=s?.navigationId||0,l=`navigate`;return n?l=n:da()>=0?l=`back-forward-cache`:s&&(document.prerendering||ma()>0?l=`prerender`:document.wasDiscarded?l=`restore`:s.type&&(l=s.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+0xe8d4a51000}`,navigationType:l,navigationId:r||c,navigationInteractionId:i,navigationURL:a||s?.name,navigationStartTime:o||0}},xa=(e,t,n={})=>{try{let r=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(r.length>0){let e=new PerformanceObserver(e=>{queueMicrotask(()=>{let n=e.getEntries();r.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(let t of r)e.observe({type:t,buffered:!0,...n});return e}}catch{}},Sa=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes(`soft-navigation`)&&typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint==`function`&&e&&e.reportSoftNavs,Ca=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){let t=e.keys().next().value;t!==void 0&&e.delete(t)}},wa=e=>{let t=!1;return()=>{t||=(e(),!0)}},Ta=class{u},Ea=e=>{document.prerendering?addEventListener(`prerenderingchange`,e,!0):e()},Da=[1800,3e3],Oa=(e,t={})=>{let n=Sa(t);Ea(()=>{let r=la(t,Ta),i=ya(),a,o=ba(`FCP`),s=xa([`paint`],e=>{for(let t of e)t.name===`first-contentful-paint`&&(s.disconnect(),t.startTime<i.firstHiddenTime&&(o.value=Math.max(t.startTime-ma(),0),o.entries.push(t),o.navigationId=t.navigationId||o.navigationId,a(!0)))});s&&(a=U(e,o,Da,t.reportAllChanges),fa(n=>{o=ba(`FCP`,-1,`back-forward-cache`,o.navigationId,o.navigationInteractionId,o.navigationURL,da()),a=U(e,o,Da,t.reportAllChanges),pa(()=>{o.value=performance.now()-n.timeStamp,a(!0)})})),n&&xa([`soft-navigation`],n=>{n.forEach(n=>{r.u&&n.navigationId&&Ca(r.u,n),o=ba(`FCP`,Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0),`soft-navigation`,n.navigationId,n.interactionId,n.name,n.startTime),a=U(e,o,Da,t.reportAllChanges),a(!0)})},t)})},ka=[.1,.25],Aa=e=>e.find(e=>e.node?.nodeType===1)||e[0],ja=(e,t={})=>{let n=la(t=Object.assign({},t),ra),r=new WeakMap;n.t=e=>{if(e?.sources?.length){let n=Aa(e.sources),i=n?.node;if(i){let e=t.generateTarget?.(i)??sa(i);r.set(n,e)}}},((e,t={})=>{let n=ya();Oa(wa(()=>{let r,i=ba(`CLS`,0),a=la(t,ra),o=(n,o,s,c,l)=>{i=ba(`CLS`,0,n,o,s,c,l),a.o=0,r=U(e,i,ka,t.reportAllChanges)},s=(e=!1)=>{a.o>i.value&&(i.value=a.o,i.entries=a.i),r(e)},c=e=>{s(!0),o(`soft-navigation`,e.navigationId,e.interactionId,e.name,e.startTime)},l=e=>{for(let t of e)t.entryType===`soft-navigation`?c(t):a.l(t);s()},u=[`layout-shift`];Sa(t)&&u.push(`soft-navigation`);let d=xa(u,l);d&&(r=U(e,i,ka,t.reportAllChanges),n.onHidden(()=>{l(d.takeRecords()),r(!0)}),fa(()=>{o(`back-forward-cache`,i.navigationId,i.navigationInteractionId,i.navigationURL,da()),pa(r)}),setTimeout(r))}))})(t=>{e((e=>{let t={};if(e.entries.length){let n=e.entries.reduce((e,t)=>e.value>t.value?e:t);if(n?.sources?.length){let e=Aa(n.sources);e&&(t={largestShiftTarget:r.get(e),largestShiftTime:n.startTime,largestShiftValue:n.value,largestShiftSource:e,largestShiftEntry:n,loadState:aa(n.startTime)})}}return Object.assign(e,{attribution:t})})(t))},t)},Ma=(e,t={})=>{let n=la(t=Object.assign({},t),Ta);Sa(t)&&(n.u=new Map),Oa(t=>{e((e=>{let t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:aa(da())};if(e.navigationType!==`soft-navigation`){if(e.entries.length){let n=ia(),r=e.entries.at(-1);if(n){let i=n.responseStart,a=n.activationStart||0,o=Math.max(0,i-a);t={timeToFirstByte:o,firstByteToFCP:e.value-o,loadState:aa(e.entries[0].startTime),navigationEntry:n,fcpEntry:r}}}}else{let r=n.u?.get(e.navigationId);r&&(t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:`complete`,navigationEntry:r})}return Object.assign(e,{attribution:t})})(t))},t)},Na=0,Pa=1/0,Fa=0,Ia=e=>{for(let t of e)t.interactionId&&(Pa=Math.min(Pa,t.interactionId),Fa=Math.max(F
21a,t.interactionId),Na=Fa?(Fa-Pa)/7+1:0)},La,Ra=()=>La?Na:performance.interactionCount??0,za=()=>{`interactionCount`in performance||La||(La=xa([`event`],Ia,{durationThreshold:0}))},Ba=class{h=0;v=[];p=new Map;m;M;T(){return Ra()-this.h}D(){this.h=Ra(),this.v.length=0,this.p.clear()}S(e){let t=this.T(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||n!==-1||e!==`soft-navigation`&&e!==`back-forward-cache`?this.v[n]:{k:8,id:-1,entries:[]}}l(e){if(this.m?.(e),!e.interactionId)return;let t=this.v.at(-1),n=this.p.get(e.interactionId);if(n||this.v.length<10||e.duration>t.k){if(n?e.duration>n.k?(n.entries=[e],n.k=e.duration):e.duration===n.k&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],k:e.duration},this.p.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.k-e.k),this.v.length>10){let e=this.v.splice(10);for(let t of e)this.p.delete(t.id)}this.M?.(n)}}},Va=e=>{let t=`requestIdleCallback`in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,r=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState===`hidden`)e();else{let i=wa(e),a=-1,o=()=>{r(a),i()};addEventListener(`visibilitychange`,o,{once:!0,capture:!0}),a=n(()=>{removeEventListener(`visibilitychange`,o,{capture:!0}),i()},{timeout:t})}},Ha=[200,500],Ua=(e,t={})=>{let n=la(t=Object.assign({},t),Ba),r=[],i=[],a=0,o=new WeakMap,s=new WeakMap,c=!1,l=()=>{c||=(Va(u),!0)},u=()=>{let e=new Set(n.v.map(e=>o.get(e.entries[0]))),t=i.length-10;i=i.filter((n,r)=>r>=t||e.has(n));let s=new Set;for(let e of i){let t=d(e.startTime,e.processingEnd);for(let e of t)s.add(e)}r=r.filter(e=>e.startTime>a||s.has(e)),c=!1};n.m=e=>{let n=e.startTime+e.duration,r;a=Math.max(a,e.processingEnd);for(let a=i.length-1;a>=0;a--){let o=i[a];if(Math.abs(n-o.renderTime)<=8){r=o,r.startTime=Math.min(e.startTime,r.startTime),r.processingStart=Math.min(e.processingStart,r.processingStart),r.processingEnd=Math.max(e.processingEnd,r.processingEnd),t.includeProcessedEventEntries&&r.entries.push(e);break}}r||(r={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:t.includeProcessedEventEntries?[e]:[]},i.push(r)),e.interactionId&&o.set(e,r),l()},n.M=e=>{if(!s.get(e)){let n=e.entries.find(e=>e.target)?.target;if(n){let r=t.generateTarget?.(n)??sa(n);s.set(e,r)}else{let t=e.entries.find(e=>e.targetSelector)?.targetSelector;t&&s.set(e,t)}}};let d=(e,t)=>{let n=[];for(let i of r)if(!(i.startTime+i.duration<e)){if(i.startTime>t)break;n.push(i)}return n},f=e=>{if(e.entries.length===0){let t=e.navigationStartTime||0,n={processedEventEntries:[],longAnimationFrameEntries:[],inputDelay:0,processingDuration:0,presentationDelay:e.value,loadState:aa(t)};return Object.assign(e,{attribution:n})}let t=e.entries[0],r=o.get(t),i=Math.max(r.processingStart,t.startTime),a=Math.max(t.startTime+t.duration,i),c=Math.min(r.processingEnd,a),l=r.entries.sort((e,t)=>e.processingStart-t.processingStart),u=d(t.startTime,c),f=n.p.get(t.interactionId),p={interactionTarget:s.get(f),interactionType:t.name.startsWith(`key`)?`keyboard`:`pointer`,interactionTime:t.startTime,nextPaintTime:a,processedEventEntries:l,longAnimationFrameEntries:u,inputDelay:i-t.startTime,processingDuration:c-i,presentationDelay:a-c,loadState:aa(t.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(e=>{let t=e.interactionTime,n=e.nextPaintTime;if(!e.longAnimationFrameEntries?.length||!t||!n)return;let r=e.inputDelay,i=e.processingDuration,a,o,s=0,c=0,l=0,u=0;for(let n of e.longAnimationFrameEntries){c=c+n.startTime+n.duration-n.styleAndLayoutStart;for(let e of n.scripts){let n=e.startTime+e.duration;if(n<t)continue;let l=n-Math.max(t,e.startTime),d=e.duration?l/e.duration*e.forcedStyleAndLayoutDuration:0;s+=l-d,c+=d,l>u&&(o=e.startTime<t+r?`input-delay`:e.startTime>=t+r+i?`presentation-delay`:`processing-duration`,a=e,u=l)}}let d=e.longAnimationFrameEntries.at(-1),f=d?d.startTime+d.duration:0;f>=t+r+i&&(l=n-f),a&&o&&(e.longestScript={entry:a,subpart:o,intersectingDuration:u}),e.totalScriptDuration=s,e.totalStyleAndLayoutDuration=c,e.totalPaintDuration=l,e.totalUnattributedDuration=n-t-s-c-l})(p),Object.assign(e,{attribution:p})};xa([`long-animation-frame`],e=>{r=r.concat(e),l()},t),((e,t={})=>
21{if(!globalThis.PerformanceEventTiming||!(`interactionId`in PerformanceEventTiming.prototype))return;let n=ya();Ea(()=>{za();let r,i=ba(`INP`),a=la(t,Ba),o=(n,o,s,c,l)=>{a.D(),i=ba(`INP`,-1,n,o,s,c,l),r=U(e,i,Ha,t.reportAllChanges)},s=()=>{let e=a.S(i.navigationType);e&&e.k!==i.value&&(i.value=e.k,i.entries=e.entries,r())},c=e=>{s(),r(!0),o(`soft-navigation`,e.navigationId,e.interactionId,e.name,e.startTime)},l=(e,t=!1)=>{Va(()=>{for(let t of e)t.entryType===`soft-navigation`?c(t):a.l(t);s(),t&&r(!0)})},u=[`event`,`first-input`];Sa(t)&&u.push(`soft-navigation`);let d=xa(u,l,{...t,durationThreshold:t.durationThreshold??40});r=U(e,i,Ha,t.reportAllChanges),d&&(n.onHidden(()=>{l(d.takeRecords(),!0)}),fa(()=>{o(`back-forward-cache`,i.navigationId,i.navigationInteractionId,i.navigationURL,da())}))})})(t=>{e(f(t))},t)},Wa=class{m;u;l(e){this.m?.(e)}},Ga=[2500,4e3],Ka=50,qa=[];xa([`resource`],e=>{for(let t of e)qa.push(t),qa.length>Ka&&qa.shift()});var Ja=(e,t={})=>{(t=Object.assign({},t)).resourceBufferSize!=null&&(Ka=t.resourceBufferSize);let n=la(t,Wa),r=new WeakMap;Sa(t)&&(n.u=new Map),n.m=e=>{let n=e.element;if(n){let i=t.generateTarget?.(n)??sa(n);r.set(e,i)}else e.id&&r.set(e,`#${e.id}`)},((e,t={})=>{let n=!1,r=Sa(t);Ea(()=>{let i,a=ya(),o=ba(`LCP`),s=la(t,Wa),c=(r,s,c,l,u)=>{o=ba(`LCP`,-1,r,s,c,l,u),i=U(e,o,Ga,t.reportAllChanges),n=!1,r===`soft-navigation`&&(a=ya(!0))},l=e=>{s.u&&e.navigationId&&Ca(s.u,e),n||i(!0),c(`soft-navigation`,e.navigationId,e.interactionId,e.name,e.startTime);let t=e.getLargestInteractionContentfulPaint?.();t&&u([t])},u=e=>{t.reportAllChanges||r||(e=e.slice(-1));for(let t of e){if(!t)continue;if(t.entryType===`soft-navigation`){l(t);continue}let e=0,n=[],r=t.startTime;if(t.entryType===`largest-contentful-paint`)e=Math.max(t.startTime-ma(),0),s.l(t),n=[t];else if(t.entryType===`interaction-contentful-paint`){let i=t;if(!o.navigationId||`interactionId`in i&&i.interactionId!=o.navigationInteractionId)continue;r=i.largestContentfulPaint?.renderTime||0,e=Math.max(r-t.startTime,0),i.largestContentfulPaint&&(s.l(i.largestContentfulPaint),n=[i.largestContentfulPaint])}r<a.firstHiddenTime&&(o.value=e,o.entries=n,i())}},d=[`largest-contentful-paint`];r&&d.push(`interaction-contentful-paint`,`soft-navigation`);let f=xa(d,u);if(f){i=U(e,o,Ga,t.reportAllChanges);let a=[`keydown`,`click`,`visibilitychange`],s=e=>{if(e.isTrusted&&!n){let e=o.id;Va(()=>{if(!n){if(!r){f.disconnect();for(let e of a)removeEventListener(e,s,{capture:!0})}e===o.id&&(n=!0,i(!0))}})}};for(let e of a)addEventListener(e,s,{capture:!0});fa(r=>{c(`back-forward-cache`,o.navigationId,o.navigationInteractionId,o.navigationURL,da()),i=U(e,o,Ga,t.reportAllChanges),pa(()=>{o.value=performance.now()-r.timeStamp,n=!0,i(!0)})})}})})(t=>{e((e=>{let t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){let i=e.entries.at(-1),a=i.url&&(qa.findLast(e=>e.name===i.url)||performance.getEntriesByType(`resource`).findLast(e=>e.name===i.url)),o;t.target=r.get(i),t.lcpEntry=i,i.url&&(t.url=i.url),a&&(t.lcpResourceEntry=a);let s=0,c=0;if(e.navigationType===`soft-navigation`?(s=e.navigationStartTime||0,o=n.u?.get(e.navigationId)):(o=ia(),s=o?.activationStart??0,c=o?.responseStart??0),o){let n=Math.max(0,c-s),r=Math.max(n,a?(a.requestStart||a.startTime)-s:0),i=Math.min(e.value,Math.max(r,a?a.responseEnd-s:0));t={...t,timeToFirstByte:n,resourceLoadDelay:r-n,resourceLoadDuration:i-r,elementRenderDelay:e.value-i,navigationEntry:o}}}return Object.assign(e,{attribution:t})})(t))},t)},Ya=[800,1800],Xa=e=>{document.prerendering?Ea(()=>Xa(e)):document.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>Xa(e),!0)},Za=(e,t={})=>{((e,t={})=>{let n=Sa(t),r=ba(`TTFB`),i=U(e,r,Ya,t.reportAllChanges);Xa(()=>{let a=ia();if(a){let o=a.responseStart;r.value=Math.max(o-ma(),0),r.entries=[a],i(!0),fa(()=>{r=ba(`TTFB`,0,`back-forward-cache`,r.navigationId,r.navigationInteractionId,r.navigationURL,da()),i=U(e,r,Ya,t.reportAllChanges),i(!0)}),n&&xa([`soft-navigation`],n=>{n.forEach(n=>{n.navigationId&&(r=ba(`TTFB`,0,`soft-navigation`,n.navigationId,n.interactionId,n.name,n.startTime),r.entries=[n],i=U(e,r,Ya,t.reportAllChanges),i(!0))})},t)}})})(t=>{e((e=>
21{let t=e.entries[0],n={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0,navigationEntry:t};if(e.entries.length&&t instanceof PerformanceNavigationTiming){let r=t.activationStart||0,i=Math.max((t.workerStart||t.fetchStart||0)-r,0),a=Math.max(t.domainLookupStart-r,0),o=Math.max(t.connectStart-r,0),s=Math.max(t.connectEnd-r,0);n={waitingDuration:i,cacheDuration:a-i,dnsDuration:o-a,connectionDuration:s-o,requestDuration:e.value-s,navigationEntry:t}}return Object.assign(e,{attribution:n})})(t))},t)},Qa=`load_state`,$a=`time_to_first_byte`,eo=class{constructor(e,t){this.corePushMeasurement=e,this.webVitalConfig=t}initialize(){this.measureCLS(),this.measureFCP(),this.measureINP(),this.measureLCP(),this.measureTTFB()}measureCLS(){ja(e=>{let{loadState:t,largestShiftValue:n,largestShiftTime:r,largestShiftTarget:i}=e.attribution,a=this.buildInitialValues(e);this.addIfPresent(a,`largest_shift_value`,n),this.addIfPresent(a,`largest_shift_time`,r);let o=this.buildInitialContext(e);this.addIfPresent(o,Qa,t),this.addIfPresent(o,`largest_shift_target`,i),this.pushMeasurement(a,o)},{reportAllChanges:this.webVitalConfig?.reportAllChanges})}measureFCP(){Ma(e=>{let{firstByteToFCP:t,timeToFirstByte:n,loadState:r}=e.attribution,i=this.buildInitialValues(e);this.addIfPresent(i,`first_byte_to_fcp`,t),this.addIfPresent(i,$a,n);let a=this.buildInitialContext(e);this.addIfPresent(a,Qa,r),this.pushMeasurement(i,a)},{reportAllChanges:this.webVitalConfig?.reportAllChanges})}measureINP(){Ua(e=>{let{interactionTime:t,presentationDelay:n,inputDelay:r,processingDuration:i,nextPaintTime:a,loadState:o,interactionTarget:s,interactionType:c,totalScriptDuration:l,totalStyleAndLayoutDuration:u,totalPaintDuration:d,totalUnattributedDuration:f,longestScript:p}=e.attribution,m=this.buildInitialValues(e);this.addIfPresent(m,`interaction_time`,t),this.addIfPresent(m,`presentation_delay`,n),this.addIfPresent(m,`input_delay`,r),this.addIfPresent(m,`processing_duration`,i),this.addIfPresent(m,`next_paint_time`,a),this.addNumberIfDefined(m,`total_script_duration`,l),this.addNumberIfDefined(m,`total_style_and_layout_duration`,u),this.addNumberIfDefined(m,`total_paint_duration`,d),this.addNumberIfDefined(m,`total_unattributed_duration`,f),this.addNumberIfDefined(m,`longest_script_intersecting_duration`,p?.intersectingDuration);let h=this.buildInitialContext(e);this.addIfPresent(h,Qa,o),this.addIfPresent(h,`interaction_target`,s),this.addIfPresent(h,`interaction_type`,c),this.addIfPresent(h,`longest_script_subpart`,p?.subpart),this.addIfPresent(h,`longest_script_invoker_type`,p?.entry.invokerType),this.webVitalConfig?.trackAttributionSources&&(this.addIfPresent(h,`longest_script_invoker`,p?.entry.invoker),this.addIfPresent(h,`longest_script_source_url`,p?.entry.sourceURL),this.addIfPresent(h,`longest_script_source_function_name`,p?.entry.sourceFunctionName),this.addIfPresent(h,`longest_script_source_char_position`,p?.entry.sourceCharPosition===void 0?void 0:String(p.entry.sourceCharPosition))),this.pushMeasurement(m,h)},{reportAllChanges:this.webVitalConfig?.reportAllChanges})}measureLCP(){Ja(e=>{let{elementRenderDelay:t,resourceLoadDelay:n,resourceLoadDuration:r,timeToFirstByte:i,target:a,url:o,lcpResourceEntry:s}=e.attribution,c=this.buildInitialValues(e);this.addIfPresent(c,`element_render_delay`,t),this.addIfPresent(c,`resource_load_delay`,n),this.addIfPresent(c,`resource_load_duration`,r),this.addIfPresent(c,$a,i);let l=this.buildInitialContext(e);this.addIfPresent(l,`element`,a),this.webVitalConfig?.trackAttributionSources&&(this.addIfPresent(l,`resource_url`,o),this.addIfPresent(l,`resource_delivery_type`,s?.deliveryType),this.addIfPresent(l,`resource_initiator_type`,s?.initiatorType)),this.pushMeasurement(c,l)},{reportAllChanges:this.webVitalConfig?.reportAllChanges})}measureTTFB(){Za(e=>{let{dnsDuration:t,connectionDuration:n,requestDuration:r,waitingDuration:i,cacheDuration:a}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,`dns_duration`,t),this.addIfPresent(o,`connection_duration`,n),this.addIfPresent(o,`request_duration`,r),this.addIfPresent(o,`waiting_duration`,i),this.addIfPresent(o,`cache_duration`,a);let s=this.buildInitialContext(e);this.pushMeasurement(o,s)},{reportAllChanges:this.webVitalConfig?.reportAllChanges})}buildInitialValues(e){return{[e.name.toLowerCase()]:e.value,delta:e.delta}}buildInitialContext(e){let t=Xr(`com.grafana.faro.lastNavigationId`,Jr.session)??I;return{id:e.id,rating:e.rating,navigation_type:e.navigationType,navigation_entry_id:t}}pushMeasurement(e,t){this.corePushMeasurement({type:`web-vitals`,values:e},{context:t})}addIfPresent(e,t,n){n&&(e[t]=n)}addNumberIfDefined(e,t,n){n!==void 0&&(e[t]=n)}},to=class extends Yn{constructor(...e){super(...e),this.name=`@grafana/faro-web-sdk:instrumentation-web-vitals`,this.version=B}initialize(){this.logDebug(`Initializing`),new eo(this.api.pushMeasurement,this.config.webVitalsInstrumentation).initialize()}},no=/^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;function ro(e=[]){for(let t of e)if(t.name===`traceparent`){if(!no.test(t.description))continue;let[,e,n]=t.description.split(`-`);if(e!=null&&n!=null)return{traceId:e,spanId:n};break}}function io(e,t={wallNow:Date.now(),monoNow:performance.now()}){let{wallNow:n,monoNow:r}=t;return Math.min(n,n-(r-e))}function ao(){return`PerformanceObserver`in window}function oo(e){if(document.readyState===`complete`)e();else{let t=()=>{document.readyState===`complete`&&(e(),document.removeEventListener(`readystatechange`,t))};document.addEventListener(`readystatechange`,t)}}function so(e,t={}){for(let[n,r]of Object.entries(t)){let t=e[n];return t==null?!1:$t(r)?r.includes(t):t===r}return!0}
21function co(e){let{connectEnd:t,connectStart:n,decodedBodySize:r,domainLookupEnd:i,domainLookupStart:a,duration:o,encodedBodySize:s,fetchStart:c,initiatorType:l,name:u,nextHopProtocol:d,redirectEnd:f,redirectStart:p,renderBlockingStatus:m,requestStart:h,responseEnd:g,responseStart:_,responseStatus:v,secureConnectionStart:y,transferSize:b,workerStart:x}=e;return{name:u,httpHost:fo(u),duration:W(o),tcpHandshakeTime:W(t-n),dnsLookupTime:W(i-a),tlsNegotiationTime:W(t-y),responseStatus:W(v),redirectTime:W(f-p),requestTime:W(_-h),responseTime:W(g-_),fetchTime:W(g-c),serviceWorkerTime:W(x>0?c-x:0),decodedBodySize:W(r),encodedBodySize:W(s),cacheHitStatus:S(),renderBlockingStatus:W(m),protocol:d,initiatorType:l,visibilityState:document.visibilityState,ttfb:W(_-h),transferSize:W(b)};function S(){let e=`fullLoad`;return b===0?r>0&&(e=`cache`):v==null?s>0&&b<s&&(e=`conditionalFetch`):v===304&&(e=`conditionalFetch`),e}}function lo(e){let{activationStart:t,domComplete:n,domContentLoadedEventEnd:r,domContentLoadedEventStart:i,domInteractive:a,fetchStart:o,loadEventEnd:s,loadEventStart:c,responseStart:l,type:u}=e,d=uo();return H(H({},co(e)),{},{pageLoadTime:W(n-o),documentParsingTime:W(d?a-d:null),domProcessingTime:W(n-a),domContentLoadHandlerTime:W(r-i),onLoadTime:W(s-c),ttfb:W(Math.max(l-(t??0),0)),type:u})}function uo(){return performance.timing?.domLoading==null?null:performance.timing.domLoading-performance.timeOrigin}function fo(e){try{return new URL(e).host||`unknown`}catch{return I}}function W(e){return e==null?I:typeof e==`number`?Math.round(e>0?e:0).toString():e.toString()}var po=`navigation`,mo=`resource`;function ho(e){let t,n=new Promise(e=>{t=e});return new PerformanceObserver(n=>{let[r]=n.getEntries();if(r==null||Hr(r.name))return;let i=r.toJSON(),a=ro(i?.serverTiming),o=Xr(`com.grafana.faro.lastNavigationId`,Jr.session)??I,s=H(H({},lo(i)),{},{faroNavigationId:yn(),faroPreviousNavigationId:o});Zr(na,s.faroNavigationId,Jr.session),e(`faro.performance.navigation`,s,void 0,{spanContext:a,timestampOverwriteMs:io(i.startTime)}),t(s)}).observe({type:po,buffered:!0}),n}var go={initiatorType:[`xmlhttprequest`,`fetch`]};function _o(e,t,n){let r=V.config.trackResources;new PerformanceObserver(i=>{let a=i.getEntries(),o={wallNow:Date.now(),monoNow:performance.now()};for(let i of a){if(Hr(i.name))continue;n?.notify({type:`resource`});let a=i.toJSON(),s=ro(a?.serverTiming);(r==null&&so(a,go)||r)&&t(`faro.performance.resource`,H(H({},co(a)),{},{faroNavigationId:e,faroResourceId:yn()}),void 0,{spanContext:s,timestampOverwriteMs:io(a.startTime,o)})}}).observe({type:mo,buffered:!0})}function vo(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function G(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){vo(a,r,i,o,s,`next`,e)}function s(e){vo(a,r,i,o,s,`throw`,e)}o(void 0)})}}var yo=new R,bo=class extends Yn{constructor(...e){super(...e),this.name=`@grafana/faro-web-sdk:instrumentation-performance`,this.version=B}initialize(){var e=this;if(!ao()){this.logDebug(`performance observer not supported. Disable performance instrumentation.`);return}oo(G(function*(){let t=e.api.pushEvent,{faroNavigationId:n}=yield ho(t);n!=null&&_o(n,t,yo)}))}},xo=`data-faro-user-action-name`;xo.replace(/-name$/,`-timeout`);var So=1e3;function Co(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}`}function wo(e){let t=Co(e);return t.endsWith(`-name`)?`${t.slice(0,-5)}-timeout`:`${t}-timeout`}function To(e,t=100,n=L){if(e===void 0)return t;let r=NaN;try{r=typeof e==`string`&&e.trim()===``?NaN:Number(e)}catch{}return!Number.isFinite(r)||r<=0?(n(`initialActivityTimeout must be a finite number greater than zero; using ${t} ms`),t):r>1e3?(n(`initialActivityTimeout cannot exceed ${So} ms; clamping to the maximum`),So):r}function Eo(e){return Co(e).slice(5).replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Do(e,t,n){return e!==void 0&&window.clearTimeout(e),window.setTimeout(()=>{t()},n)}function Oo(e){return e.type===Ni}function ko(e){return e.type===Pi}var Ao,jo;
21function Mo(){return Ao||=new R,jo||(jo=new MutationObserver((e,t)=>{Ao.notify({type:Fi})}),jo.observe(document,{attributes:!0,childList:!0,subtree:!0,characterData:!0})),Ao}var No=`fetch`,Po=`xhr`,Fo,Io=!1,Lo,Ro;function zo(){if(Fo)return Fo;Fo=new R;function e(e){Fo.notify({type:Ni,request:e})}function t(e){Fo.notify({type:Pi,request:e})}return Io||=(Vo({onRequestStart:e,onRequestEnd:t}),Bo({onRequestStart:e,onRequestEnd:t}),!0),Fo}function Bo({onRequestStart:e,onRequestEnd:t}){Lo||=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){let n=arguments[1],r=Hr(n),i=arguments[0],a=yn();this.addEventListener(`loadstart`,function(){r||e({url:n,method:i,requestId:a,apiType:Po})}),this.addEventListener(`load`,function(){r||t({url:n,method:i,requestId:a,apiType:Po})}),this.addEventListener(`error`,function(){r||t({url:n,method:i,requestId:a,apiType:Po})}),this.addEventListener(`abort`,function(){r||t({url:n,method:i,requestId:a,apiType:Po})}),Lo.apply(this,arguments)}}function Vo({onRequestEnd:e,onRequestStart:t}){Ro||=window.fetch,window.fetch=function(){let n=Ur(arguments[0])??``,r=Hr(n),i=(arguments[1]??{}).method,a=yn();return r||t({url:n,method:i,requestId:a,apiType:No}),Ro.apply(this,arguments).then(t=>(r||e({url:n,method:i,requestId:a,apiType:No}),t)).catch(t=>{throw r||e({url:n,method:i,requestId:a,apiType:No}),t})}}var Ho,Uo=!1;function Wo(){return Ho||=new R,Uo||=(yo.subscribe(e=>{e.type===`resource`&&Ho.notify({type:Mi})}),!0),Ho}var Go=100,Ko=1e4,qo=class{constructor(e,t,n=100){this.userAction=e,this.logDebug=t,this.initialActivityTimeout=n,this.http=zo(),this.dom=Mo(),this.perf=Wo(),this.isValid=!1,this.runningRequests=new Map}attach(){this.allMonitorsSub=new R().merge(this.http,this.dom,this.perf).takeWhile(()=>[zn.Started,zn.Halted].includes(this.userAction.getState())).filter(e=>!(this.userAction.getState()===zn.Halted&&!(ko(e)&&this.runningRequests.has(e.request.requestId)))).subscribe(e=>{Oo(e)&&this.runningRequests.set(e.request.requestId,e.request),ko(e)&&this.runningRequests.delete(e.request.requestId),ko(e)?this.userAction.getState()===zn.Halted&&this.runningRequests.size===0&&this.endAction():(this.isValid||(this.isValid=!0,this.clearTimer(this.startupTid)),this.scheduleFollowUp())}),this.stateSub=this.userAction.filter(e=>[zn.Ended,zn.Cancelled].includes(e)).first().subscribe(()=>this.cleanup()),this.startupTid=Do(this.startupTid,()=>{this.logDebug(`User action not sent; no DOM, resource, or HTTP activity:`,this.userAction.name),this.cancelAction()},this.initialActivityTimeout)}scheduleFollowUp(){this.clearTimer(this.followUpTid),this.followUpTid=window.setTimeout(()=>{if(this.userAction.getState()===zn.Started&&this.runningRequests.size>0){this.haltAction();return}if(this.isValid){this.endAction();return}this.cancelAction()},Go)}haltAction(){this.userAction.getState()===zn.Started&&(this.userAction.halt(),this.startHaltTimeout())}startHaltTimeout(){this.clearTimer(this.haltTid),this.haltTid=Do(this.haltTid,()=>{this.userAction.getState()===zn.Halted&&this.endAction()},Ko)}endAction(){this.userAction.end(),this.cleanup()}cancelAction(){this.userAction.cancel(),this.cleanup()}cleanup(){var e,t;this.clearTimer(this.startupTid),this.clearTimer(this.followUpTid),this.clearTimer(this.haltTid),(e=this.allMonitorsSub)==null||e.unsubscribe(),(t=this.stateSub)==null||t.unsubscribe(),this.allMonitorsSub=void 0,this.stateSub=void 0,this.runningRequests.clear()}clearTimer(e){e!==void 0&&window.clearTimeout(e)}};function Jo(e,t=L){let{api:n,config:r,internalLogger:i}=e,a=To(r.userActionsInstrumentation?.initialActivityTimeout,100,t);function o(e){let t=e.target,i=r.userActionsInstrumentation?.dataAttributeName??xo,a=Xo(t,i);if(!a)return;let o=Yo(t,i);n.startUserAction(a,{},{triggerName:e.type,initialActivityTimeout:o})}function s(e,n){let r=e,o=To(n,a,t);new qo(r,i.debug,o).attach()}return{processUserEvent:o,processUserActionStarted:s}}function Yo(e,t){let n=e.getAttribute(wo(t));return n===null?void 0:Number(n)}function Xo(e,t){let n=Eo(t),r=e.dataset;for(let e in r)if(e===n)return r[e]}var Zo=class extends Yn{constructor(...e){super(...e),this.name=`@grafana/faro-web-sdk:instrumentation-user-action`,this.version=B}initialize(){let{processUserEvent:e,processUserActionStarted:t}=Jo(V,e=>this.logWarn(e));this._processUserEvent=e,this._processKeydown=t=>{[` `,`Enter`].includes(t.key)&&e(t)},window.addEventListener(`pointerdown`,this._processUserEvent),window.addEventListener(`ke
21ydown`,this._processKeydown),this._userActionSub=Un.subscribe(({type:e,userAction:n,initialActivityTimeout:r})=>{e===`user_action_start`&&t(n,r)})}destroy(){var e;this._processUserEvent&&window.removeEventListener(`pointerdown`,this._processUserEvent),this._processKeydown&&window.removeEventListener(`keydown`,this._processKeydown),(e=this._userActionSub)==null||e.unsubscribe()}},Qo=class extends Yn{constructor(){super(),this.name=`@grafana/faro-web-sdk:instrumentation-csp`,this.version=B,this.boundSecuritypolicyviolationHandler=this.securitypolicyviolationHandler.bind(this)}initialize(){document.addEventListener(`securitypolicyviolation`,this.boundSecuritypolicyviolationHandler)}destroy(){document.removeEventListener(`securitypolicyviolation`,this.boundSecuritypolicyviolationHandler)}securitypolicyviolationHandler(e){let t={blockedURI:e.blockedURI,columnNumber:e.columnNumber,disposition: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`,Cn(t))}};function $o(e){return e.type===Ni}function es(e){return e.type===Pi}var ts=class extends R{constructor(e,t){super(),this._tracking=!1,this.eventsObservable=e,this._options={inactivityMs:t?.inactivityMs??100,drainTimeoutMs:t?.drainTimeoutMs??1e4,isOperationStart:t?.isOperationStart??(()=>void 0),isOperationEnd:t?.isOperationEnd??(()=>void 0)},this._initialize()}_initialize(){this.eventsObservable.filter(()=>this._tracking).subscribe(e=>{var t;this._lastEventTime=fn(),(t=this._currentEvents)==null||t.push(e);let n=this._options.isOperationStart(e);if(n){var r;(r=this._activeOperations)==null||r.set(n,!0)}let i=this._options.isOperationEnd(e);if(i){var a;(a=this._activeOperations)==null||a.delete(i)}this._scheduleInactivityCheck()})}startTracking(){this._tracking||(this._tracking=!0,this._startTime=fn(),this._lastEventTime=this._startTime,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;e=this.hasActiveOperations()?fn()-this._startTime:this._lastEventTime?this._lastEventTime-this._startTime:0,this.notify({message:`tracking-ended`,events:this._currentEvents,duration:e})}
21_scheduleInactivityCheck(){this._inactivityTid=ns(this._inactivityTid,()=>{this.hasActiveOperations()?this._startDrainTimeout():this.stopTracking()},this._options.inactivityMs)}_startDrainTimeout(){this._drainTid=ns(this._drainTid,()=>{this.stopTracking()},this._options.drainTimeoutMs)}hasActiveOperations(){return!!this._activeOperations&&this._activeOperations.size>0}_clearTimer(e){e&&clearTimeout(e)}};function ns(e,t,n){return e&&clearTimeout(e),e=setTimeout(()=>{t()},n),e}var rs=`interaction`,is,as=new Set,os=new Map;function ss(e){return is||=new R,e.forEach(e=>{if(!as.has(e)){let t=()=>{is.notify({type:rs,name:e})};window.addEventListener(e,t),as.add(e),os.set(e,t)}}),is}var cs=`url-change`,ls,us=!1,ds,fs,ps,ms,hs,gs,_s;function vs(){ls||(ls=new R,ds=location.href);function e(e,t){let n=t??location.href;n!==ds&&(ls.notify({type:cs,from:ds,to:n,trigger:e}),ds=n)}if(!us){if(`navigation`in window&&`NavigateEvent`in window){gs=t=>{try{let n=t?.destination;n?.sameDocument&&typeof n.url==`string`&&e(`navigate`,n.url)}catch{}},window.navigation.addEventListener(`navigate`,gs);let t=window.NavigateEvent;t&&t.prototype&&typeof t.prototype.intercept==`function`&&(_s||=t.prototype.intercept,t.prototype.intercept=function(t){try{let t=!!this?.canIntercept,n=this?.destination;t&&n&&n.sameDocument===!1&&typeof n.url==`string`&&e(`navigate-intercept`,n.url)}catch{}return _s.call(this,t)}),us=!0}else fs||=window.history.pushState,window.history.pushState=function(...t){let n=fs.apply(window.history,t);return e(`pushState`),n},ps||=window.history.replaceState,window.history.replaceState=function(...t){let n=ps.apply(window.history,t);return e(`replaceState`),n},ms=()=>e(`popstate`),hs=()=>e(`hashchange`),window.addEventListener(`popstate`,ms),window.addEventListener(`hashchange`,hs),us=!0}return ls}var ys=class extends Yn{constructor(...e){super(...e),this.name=`@grafana/faro-web-sdk:instrumentation-navigation`,this.version=B}initialize(){let e=zo(),t=Mo(),n=vs(),r=ss([`pointerdown`,`keydown`]),i=new ts(new R().merge(e,t,n),{inactivityMs:100,drainTimeoutMs:1e4,isOperationStart:e=>$o(e)?e.request.requestId:void 0,isOperationEnd:e=>es(e)?e.request.requestId:void 0});i.filter(e=>e.message===`tracking-ended`).subscribe(e=>{if(e.events?.some(e=>e.type===`url-change`)&&e.events?.some(e=>e.type===`dom-mutation`)){let t=e.events?.find(e=>e.type===`url-change`);V.api.pushEvent(`faro.navigation`,{fromUrl:t?.from,toUrl:t?.to,sameDocument:`true`,duration:e.duration})}}),r.subscribe(()=>{i.startTracking()})}};function bs(e={}){let t=[new Zo,new ea,new to,new yi,new ta,new ys];return e.enablePerformanceInstrumentation!==!1&&t.unshift(new bo),e.enableContentSecurityPolicyInstrumentation!==!1&&t.push(new Qo),e.captureConsole!==!1&&t.push(new Xi),t}function xs(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Ss(e,t){if(e==null)return{};var n,r,i=xs(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Cs=[`headers`],ws=[`keepalive`],Ts=30,Es=5,Ds=5e3,Os=6e4,ks=9,As=429,js=202,Ms=0,Ns=0;function Ps(e){return typeof TextEncoder>`u`?e.length:new TextEncoder().encode(e).byteLength}var Fs=class extends Nn{constructor(e){super(),this.options=e,this.name=`@grafana/faro-web-sdk:transport-fetch`,this.version=B,this.disabledUntil=new Date(0),this.rateLimitBackoffMs=e.defaultRateLimitBackoffMs??Ds,this.getNow=e.getNow??(()=>Date.now());let t=e.requestCompression??!1;t&&typeof CompressionStream>`u`?(this.compressionEnabled=!1,this.logWarn(`requestCompression is enabled but CompressionStream is not available. Falling back to uncompressed.`)):this.compressionEnabled=t,this.promiseBuffer=_n({size:e.bufferSize??Ts,concurrency:e.concurrency??Es})}send(e){var t=this;return G(function*(){try{if(t.disabledUntil>new Date(t.getNow()))return t.logWarn(`Dropping transport item due to too many requests. Backoff until ${t.disabledUntil}`),Promise.resolve();yield t.promiseBuffer.add(G(function*(){let n=JSON.stringify(Fn(e)),{url:r,requestOptions:i,apiKey:a}=t.options,o=i??{},{headers:s={}}=o,c=Ss(o,Cs),{keepalive:l}=c,u=Ss(c,ws),d,f=t.metas.value.session;f!=null&&(d=f.id);let p={};for(let[e,t]of Object.entries(s))p[e]=typeof t==`function`?yield Promise.resolve(t()):t;let m=n,h=Ps(n),g={};t.compressionEnabled&&(m=yield t.compress(n),h=m.size,g[`Content-Encoding`]=`gzip`);let _=H({method:`POST`,headers:H(H(H(H({"Content-Type":`application/json`},g),p),a?{"x-api-key":a}:{}),d?{"x-faro-session-id":d}:{}),body:m},u??{});
21return t.fetchWithKeepaliveRetry(r,_,h,l).catch(e=>{t.logError(`Failed sending payload to the receiver
22`,JSON.parse(n),e)})}))}catch(e){t.logError(e)}})()}getIgnoreUrls(){return[this.options.url].concat(this.config.ignoreUrls??[])}isBatched(){return!0}getRetryAfterDate(e){let t=this.getNow(),n=e.headers.get(`Retry-After`);if(n){let e=Number(n);if(!isNaN(e))return new Date(e*1e3+t);let r=Date.parse(n);if(!isNaN(r))return new Date(r)}return new Date(t+this.rateLimitBackoffMs)}reserveKeepalive(e,t){if(t===!1)return{keepalive:!1,release:L};if(e>Os||Ms+e>Os||Ns>=ks)return this.logDebug(`Disabling keepalive because the pending keepalive request budget would be exceeded.`),{keepalive:!1,release:L};Ms+=e,Ns++;let n=!1;return{keepalive:!0,release:()=>{n||(n=!0,Ms=Math.max(0,Ms-e),Ns=Math.max(0,Ns-1))}}}fetchWithKeepaliveRetry(e,t,n,r){var i=this;return G(function*(){let a=i.reserveKeepalive(n,r);try{let n=yield fetch(e,H(H({},t),{},{keepalive:a.keepalive}));return i.handleResponse(n)}catch(n){if(a.keepalive&&i.isFetchNetworkError(n)){i.logDebug(`Retrying failed keepalive request with keepalive disabled.`);let n=yield fetch(e,H(H({},t),{},{keepalive:!1}));return i.handleResponse(n)}throw n}finally{a.release()}})()}handleResponse(e){var t=this;return G(function*(){return e.status===js&&e.headers.get(`X-Faro-Session-Status`)===`invalid`&&t.extendFaroSession(t.config,t.logDebug),e.status===As&&(t.disabledUntil=t.getRetryAfterDate(e),t.logWarn(`Too many requests, backing off until ${t.disabledUntil}`)),e.text().catch(L),e})()}isFetchNetworkError(e){return e instanceof TypeError}compress(e){return G(function*(){let t=new ReadableStream({start(t){t.enqueue(new TextEncoder().encode(e)),t.close()}}).pipeThrough(new CompressionStream(`gzip`)).getReader(),n=[];for(;;){let{done:e,value:r}=yield t.read();if(e)break;n.push(r)}return new Blob(n)})()}extendFaroSession(e,t){let n=`Session expired`,r=e.sessionTracking;if(r?.enabled){let{fetchUserSession:e,storeUserSession:i}=vi(r);di({fetchUserSession:e,storeUserSession:i})({forceSessionExtend:!0}),t(`${n} created new session.`)}else t(`${n}.`)}},Is=()=>{let e=window.k6;return{k6:H({isK6Browser:!0},e?.testRunId&&{testRunId:e?.testRunId})}},Ls,Rs;function zs({generatePageId:e,initialPageMeta:t}={}){return()=>{let n=location.href;return Qt(e)&&Ls!==n&&(Ls=n,Rs=e(location)),{page:H(H({url:n},Rs?{id:Rs}:{}),t)}}}var Bs=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), ([0-9]{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ([0-9]{4}) ([0-9]{2}):([0-9]{2}):([0-9]{2}) GMT$/,Vs=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), ([0-9]{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2}) GMT$/,Hs=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (?:(?:([0-9]{2}))|(?: ([0-9]))) ([0-9]{2}):([0-9]{2}):([0-9]{2}) ([0-9]{4})$/,Us=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],Ws=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],Gs=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function Ks({weekday:e,day:t,month:n,year:r,hour:i,minute:a,second:o}){if(r<1900||t<1||i>23||a>59||o>60)return;let s=o===60,c=new Date(0);if(c.setUTCFullYear(r,n,t),c.setUTCHours(i,a,s?59:o,0),c.getUTCDay()===e&&c.getUTCDate()===t&&c.getUTCMonth()===n&&c.getUTCFullYear()===r&&c.getUTCHours()===i&&c.getUTCMinutes()===a&&c.getUTCSeconds()===(s?59:o))return c.getTime()+(s?1e3:0)}function qs(e,t){return e.month-t.month||e.day-t.day||e.hour-t.hour||e.minute-t.minute||e.second-t.second||e.millisecond-t.millisecond}function Js(e,t){let n=Bs.exec(e);if(n){let[,e,t,r,i,a,o,s]=n;return Ks({weekday:Us.indexOf(e),day:Number(t),month:Gs.indexOf(r),year:Number(i),hour:Number(a),minute:Number(o),second:Number(s)})}let r=Vs.exec(e);if(r){let[,e,n,i,a,o,s,c]=r,l=new Date(t);if(Number.isNaN(l.getTime()))return;let u=l.getUTCFullYear(),d=Math.floor(u/100)*100+Number(a);d<u&&(d+=100);let f=Gs.indexOf(i),p={month:f,day:Number(n),hour:Number(o),minute:Number(s),second:Number(c),millisecond:0},m={month:l.getUTCMonth(),day:l.getUTCDate(),hour:l.getUTCHours(),minute:l.getUTCMinutes(),second:l.getUTCSeconds(),millisecond:l.getUTCMilliseconds()};return(d>u+50||d===u+50&&qs(p,m)>0)&&(d-=100),Ks({weekday:Ws.indexOf(e),day:Number(n),month:f,year:d,hour:Number(o),minute:Number(s),second:Number(c)})}let i=Hs.exec(e);if(!i)return;let[,a,o,s,c,l,u,d,f]=i;return Ks({weekday:Us.indexOf(a),day:Number(s??c),month:Gs.indexOf(o),year:Number(f),hour:Number(l),minute:Number(u),second:Number(d)})}var Ys=class{constructor(e){this.options=e,this.admitted=0,this.inProgress=0,this.sequence=0,this.nextSendAt=0,this.attemptQueue=[],this.waiting=[],this.unloading=!1}reserve(){var e=this;if(this.admitted>=this.options.bufferSize)return;this.admitted++;let t=this.sequence++,n=!1;return{deliver:function(){var n=G(function*(n){let r=e.options.getNow(),i=0,a;for(;;){var o,s;let c=e.options.retry.maxAttempts-i,l=yield e.runAttempt(()=>n(c,e.unloading),i>0);if(i+=l.attemptsMade,l.kind===`success`)return{kind:`success`,attempts:i,elapsedTimeMs:e.options.getNow()-r};if(a=l.failure,l.kind===`terminal`||e.unloading)return{kind:`terminal`,attempts:i,elapsedTimeMs:e.options.getNow()-r,failure:a};if(i>=e.options.retry.maxAttempts)return{kind:`terminal`,attempts:i,elapsedTimeMs:e.options.getNow()-r,failure:a,reason:`retries-exhausted`};
22if(l.retryAfterMs!=null&&l.retryAfterMs>e.options.retry.maxBackoffMs)return{kind:`terminal`,attempts:i,elapsedTimeMs:e.options.getNow()-r,failure:a,reason:`retry-after-too-long`};let u=Math.min(l.retryAfterMs??e.options.retry.initialBackoffMs*e.options.retry.backoffMultiplier**(i-1),e.options.retry.maxBackoffMs);if((o=(s=e.options).onRetry)==null||o.call(s,u,i+1),yield e.waitForTurn(t,u)){let t=e.options.retry.maxAttempts-i,a=yield e.runAttempt(()=>n(t,!0));return i+=a.attemptsMade,{kind:a.kind===`success`?`success`:`terminal`,attempts:i,elapsedTimeMs:e.options.getNow()-r,failure:a.kind===`success`?void 0:a.failure}}}});return function(e){return n.apply(this,arguments)}}(),release:()=>{n||(n=!0,this.admitted--)}}}flush(){this.unloading=!0,this.nextSendAt=0;let e=this.waiting.splice(0);this.redeliveryTimer!=null&&(clearTimeout(this.redeliveryTimer),this.redeliveryTimer=void 0),this.waitingTimer!=null&&(clearTimeout(this.waitingTimer),this.waitingTimer=void 0);for(let t of e)t.resolve(!0);this.runNextAttempt()}resume(){this.unloading=!1}runAttempt(e,t=!1){return new Promise((n,r)=>{this.attemptQueue.push({run:()=>{this.inProgress++;let t=()=>{this.inProgress--,this.runNextAttempt()};e().then(e=>{t(),n(e)},e=>{t(),r(e)})},isRedelivery:t}),this.runNextAttempt()})}runNextAttempt(){for(this.redeliveryTimer!=null&&(clearTimeout(this.redeliveryTimer),this.redeliveryTimer=void 0);this.inProgress<this.options.concurrency&&this.attemptQueue.length>0;){let e=this.options.getNow(),t=this.attemptQueue.findIndex(({isRedelivery:t})=>this.unloading||!t||e>=this.nextSendAt);if(t<0){this.redeliveryTimer=setTimeout(()=>{this.redeliveryTimer=void 0,this.runNextAttempt()},Math.max(0,this.nextSendAt-e));return}let[n]=this.attemptQueue.splice(t,1);n.isRedelivery&&!this.unloading&&(this.nextSendAt=e+1),n.run()}}waitForTurn(e,t){let n=Math.min(t*(1+this.options.getRandom()*.2),this.options.retry.maxBackoffMs);return new Promise(t=>{this.waiting.push({sequence:e,readyAt:this.options.getNow()+n,resolve:t}),this.waiting.sort((e,t)=>e.readyAt===t.readyAt?e.sequence-t.sequence:e.readyAt-t.readyAt),this.waitingTimer!=null&&(clearTimeout(this.waitingTimer),this.waitingTimer=void 0),this.scheduleNext()})}scheduleNext(){if(this.waitingTimer!=null||this.waiting.length===0)return;let e=this.waiting[0],t=e.readyAt;this.waitingTimer=setTimeout(()=>{this.waitingTimer=void 0;let t=this.waiting.indexOf(e);t>=0&&this.waiting.splice(t,1),e.resolve(!1),this.scheduleNext()},Math.max(0,t-this.options.getNow()))}},Xs=[`headers`],Zs=[`keepalive`,`signal`],Qs=30,$s=5,ec=3,tc=1e3,nc=3e4,rc=2,ic=1e4,ac=new Set([408,425,429,500,502,503,504]),oc=new Set([429,503]),sc=6e4,cc=9,lc=202,uc=0,dc=0,fc=class extends Error{};function pc(e){return typeof TextEncoder>`u`?e.length:new TextEncoder().encode(e).byteLength}var mc=class extends Nn{constructor(e){super(),this.options=e,this.name=`@grafana/faro-web-sdk:transport-fetch-v2`,this.version=B,this.getNow=e.getNow??Date.now,this.requestTimeoutMs=e.requestTimeoutMs??ic,this.compressionEnabled=(e.requestCompression??!1)&&typeof CompressionStream<`u`,e.requestCompression&&!this.compressionEnabled&&this.logWarn(`requestCompression is enabled but CompressionStream is not available. Falling back to uncompressed.`),this.requestTimeoutMs>0&&typeof AbortController>`u`&&this.logWarn(`AbortController is unavailable. Requests will be sent without the configured timeout.`),this.deliveryQueue=new Ys({bufferSize:e.bufferSize??Qs,concurrency:e.concurrency??$s,retry:{maxAttempts:e.retry?.maxAttempts??ec,initialBackoffMs:e.retry?.initialBackoffMs??tc,maxBackoffMs:e.retry?.maxBackoffMs??nc,backoffMultiplier:e.retry?.backoffMultiplier??rc},getNow:this.getNow,getRandom:e.getRandom??Math.random,onRetry:(e,t)=>{this.logDebug(`Retrying failed request after ${e}ms. Attempt ${t}.`)}}),typeof window<`u`&&(window.addEventListener(`pagehide`,()=>this.deliveryQueue.flush()),window.addEventListener(`pageshow`,e=>{e.persisted&&this.deliveryQueue.resume()}))}send(e){var t=this;return G(function*(){let n=t.deliveryQueue.reserve();if(!n){t.logError(`Permanent delivery failure`,{error:`Reliable delivery queue is full`,attempts:0,elapsedTimeMs:0});return}
22try{let r=yield t.prepareRequest(e),i=yield n.deliver((e,n)=>t.performAttempt(r,e,n));i.kind===`terminal`&&t.logError(i.reason===`retries-exhausted`?`Delivery retries exhausted`:`Permanent delivery failure`,H(H({},i.failure),{},{attempts:i.attempts,elapsedTimeMs:i.elapsedTimeMs}))}catch(e){t.logError(`Permanent delivery failure`,{error:e,attempts:0,elapsedTimeMs:0})}finally{n.release()}})()}getIgnoreUrls(){return[this.options.url].concat(this.config.ignoreUrls??[])}isBatched(){return!0}prepareRequest(e){var t=this;return G(function*(){let n=JSON.stringify(Fn(e)),r=t.options.requestOptions??{},{headers:i={}}=r,a=Ss(r,Xs),{keepalive:o,signal:s}=a,c=Ss(a,Zs),l={};for(let[e,t]of Object.entries(i))l[e]=typeof t==`function`?yield t():t;let u=n,d=pc(n),f={};t.compressionEnabled&&(u=yield t.compress(n),d=u.size,f[`Content-Encoding`]=`gzip`);let p=t.metas.value.session?.id;return{bodySize:d,requestInit:H({method:`POST`,headers:H(H(H(H(H({"Content-Type":`application/json`},f),l),t.options.apiKey?{"x-api-key":t.options.apiKey}:{}),p?{"x-faro-session-id":p}:{}),{},{"Idempotency-Key":yn(20)}),body:u},c)}})()}performAttempt(e,t,n){var r=this;return G(function*(){let i=r.options.requestOptions?.signal;if(i?.aborted)return{kind:`terminal`,failure:{error:i.reason},attemptsMade:0};let a=0;try{let i=yield r.fetchWithKeepaliveFallback(e.requestInit,e.bodySize,n?!0:r.options.requestOptions?.keepalive,t,()=>a++);if(r.handleResponse(i),i.status>=200&&i.status<300)return{kind:`success`,attemptsMade:a};let o={status:i.status};return!ac.has(i.status)||n?{kind:`terminal`,failure:o,attemptsMade:a}:{kind:`retry`,failure:o,attemptsMade:a,retryAfterMs:oc.has(i.status)?r.getRetryAfterDelayMs(i):void 0}}catch(e){let t={error:e};return i?.aborted||!r.isFetchNetworkError(e)||n?{kind:`terminal`,failure:t,attemptsMade:a}:{kind:`retry`,failure:t,attemptsMade:a}}})()}fetchWithKeepaliveFallback(e,t,n,r,i){var a=this;return G(function*(){let o=a.getNow(),s=a.reserveKeepalive(t,n);try{return yield a.fetchWithTimeout(H(H({},e),{},{keepalive:s.keepalive}),a.requestTimeoutMs,i)}catch(t){var c;if(s.keepalive&&r>1&&a.isFetchNetworkError(t)&&!(t instanceof fc)&&!((c=a.options.requestOptions)!=null&&(c=c.signal)!=null&&c.aborted)){a.logDebug(`Retrying failed keepalive request with keepalive disabled.`);let t=a.requestTimeoutMs-(a.getNow()-o);return a.fetchWithTimeout(H(H({},e),{},{keepalive:!1}),t,i)}throw t}finally{s.release()}})()}fetchWithTimeout(e,t,n){var r=this;return G(function*(){let i=r.options.requestOptions?.signal;if(r.requestTimeoutMs<=0||typeof AbortController>`u`)return n(),fetch(r.options.url,H(H({},e),{},{signal:i}));if(t<=0)throw new fc(`Request timed out`);let a=new AbortController,o=()=>a.abort(i?.reason);i?.addEventListener(`abort`,o,{once:!0});let s=!1,c=setTimeout(()=>{s=!0,a.abort()},t);try{return n(),yield fetch(r.options.url,H(H({},e),{},{signal:a.signal}))}catch(e){throw s&&!i?.aborted?new fc(`Request timed out`):e}finally{clearTimeout(c),i?.removeEventListener(`abort`,o)}})()}getRetryAfterDelayMs(e){let t=e.headers.get(`Retry-After`);if(!t)return;if(/^\d+$/.test(t)){let e=Number(t)*1e3;return Number.isFinite(e)?e:1/0}let n=this.getNow(),r=Js(t,n);return r==null?void 0:Math.max(0,r-n)}reserveKeepalive(e,t){if(t===!1||e>sc||uc+e>sc||dc>=cc)return{keepalive:!1,release:L};uc+=e,dc++;let n=!1;return{keepalive:!0,release:()=>{n||(n=!0,uc-=e,dc--)}}}handleResponse(e){e.status===lc&&e.headers.get(`X-Faro-Session-Status`)===`invalid`&&this.extendFaroSession(this.config,this.logDebug.bind(this)),e.text().catch(L)}isFetchNetworkError(e){return e instanceof TypeError||e instanceof fc||e instanceof DOMException&&e.name===`AbortError`}compress(e){return G(function*(){let t=new ReadableStream({start(t){t.enqueue(new TextEncoder().encode(e)),t.close()}}).pipeThrough(new CompressionStream(`gzip`)),n=[],r=t.getReader();for(;;){let{done:e,value:t}=yield r.read();if(e)return new Blob(n);n.push(t)}})()}extendFaroSession(e,t){let n=e.sessionTracking;if(n?.enabled){let{fetchUserSession:e,storeUserSession:r}=vi(n);di({fetchUserSession:e,storeUserSession:r})({forceSessionExtend:!0}),t(`Session expired created new session.`)}else t(`Session expired.`)}},hc=[`dedupe`,`eventDomain`,`globalObjectKey`,`instrumentations`,`internalLoggerLevel`,`isolate`,`logArgsSerializer`,`metas`,`paused`,`preventGlobalExposure`,`unpatchedConsole`,`url`,`experimental`];function gc(e){let t=[],n=jn(e.unpatchedConsole,e.internalLoggerLevel);
22if(e.transports)(e.url||e.apiKey)&&n.error(`if "transports" is defined, "url" and "apiKey" should not be defined`),e.experimental?.fetchTransportV2&&n.error(`experimental.fetchTransportV2 cannot take effect when explicit "transports" are defined`),t.push(...e.transports);else if(e.url){let n=e.experimental?.fetchTransportV2?mc:Fs;t.push(new n({url:e.url,apiKey:e.apiKey,requestCompression:e.requestCompression}))}else n.error(`either "url" or "transports" must be defined`);let{dedupe:r=!0,eventDomain:i=Lt,globalObjectKey:a=Ar,instrumentations:o=bs(),internalLoggerLevel:s=1,isolate:c=!1,logArgsSerializer:l=Jn,metas:u=vc(e),paused:d=!1,preventGlobalExposure:f=!1,unpatchedConsole:p=An,url:m,experimental:h}=e,g=Ss(e,hc),_=h?.trackNavigation??!1,v=h?.fetchTransportV2??!1,y={dataAttributeName:Co(e.userActionsInstrumentation?.dataAttributeName??xo),excludeItem:e.userActionsInstrumentation?.excludeItem,initialActivityTimeout:To(e.userActionsInstrumentation?.initialActivityTimeout,100,e=>n.warn(e))};return H(H({},g),{},{batching:H(H({},jr),e.batching),dedupe:r,globalObjectKey:a,instrumentations:_c(o,e),internalLoggerLevel:s,isolate:c,logArgsSerializer:l,metas:u,parseStacktrace:ji,paused:d,preventGlobalExposure:f,transports:t,unpatchedConsole:p,eventDomain:i,ignoreUrls:[...e.ignoreUrls??[],...m?[m]:[],/\/collect(?:\/[\w]*)?$/],sessionTracking:H(H(H({},qr),e.sessionTracking),yc({trackGeolocation:e.trackGeolocation,sessionTracking:e.sessionTracking})),userActionsInstrumentation:y,experimental:{trackNavigation:_,fetchTransportV2:v}})}function _c(e,{experimental:t}){let n=t?.trackNavigation??!1;return e.filter(e=>!(e.name===`@grafana/faro-web-sdk:instrumentation-navigation`&&!n))}function vc(e){let{page:t,generatePageId:n}=e?.pageTracking??{},r=[Lr,Rr,zs({generatePageId:n,initialPageMeta:t}),...e.metas??[],Br];return Zt(window?.k6)?[...r,Is]:r}function yc({trackGeolocation:e,sessionTracking:t}){let n={};return Xt(e)&&(n.geoLocationTrackingEnabled=e),ln(n)?{}:{session:H(H({},t?.session??{}),{},{overrides:n})}}function bc(e){let t=gc(e);if(t)return kr(t)}var xc=`session.id`,Sc=`deployment.environment.name`,Cc=`service.namespace`,wc=`process.runtime.name`,Tc=`process.runtime.version`,Ec=`telemetry.distro.name`,Dc=`telemetry.distro.version`,Oc=`browser.brands`,kc=`browser.language`,Ac=`browser.mobile`,jc=`browser.platform`,Mc=class{constructor(e,t){this.processor=e,this.metas=t}forceFlush(){return this.processor.forceFlush()}onStart(e,t){let n=this.metas.value.session;n?.id&&(e.attributes[xc]=n.id);let r=this.metas.value.user??{};r.email&&(e.attributes[`user.email`]=r.email),r.id&&(e.attributes[`user.id`]=r.id),r.username&&(e.attributes[`user.name`]=r.username),r.fullName&&(e.attributes[`user.full_name`]=r.fullName),r.roles&&(e.attributes[`user.roles`]=r.roles.split(`,`).map(e=>e.trim())),r.hash&&(e.attributes[`user.hash`]=r.hash),this.processor.onStart(e,t)}onEnd(e){this.processor.onEnd(e)}shutdown(){return this.processor.shutdown()}},Nc=class{constructor(e,t){this.propagator=e,this.shouldOmitTraceContext=t}inject(e,t,n){this.shouldOmitTraceContext()||this.propagator.inject(e,t,n)}extract(e,t,n){return this.propagator.extract(e,t,n)}fields(){return this.propagator.fields()}},Pc=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EStatusCode=e.ESpanKind=void 0;var t;(function(e){e[e.SPAN_KIND_UNSPECIFIED=0]=`SPAN_KIND_UNSPECIFIED`,e[e.SPAN_KIND_INTERNAL=1]=`SPAN_KIND_INTERNAL`,e[e.SPAN_KIND_SERVER=2]=`SPAN_KIND_SERVER`,e[e.SPAN_KIND_CLIENT=3]=`SPAN_KIND_CLIENT`,e[e.SPAN_KIND_PRODUCER=4]=`SPAN_KIND_PRODUCER`,e[e.SPAN_KIND_CONSUMER=5]=`SPAN_KIND_CONSUMER`})(t||(e.ESpanKind=t={}));var n;(function(e){e[e.STATUS_CODE_UNSET=0]=`STATUS_CODE_UNSET`,e[e.STATUS_CODE_OK=1]=`STATUS_CODE_OK`,e[e.STATUS_CODE_ERROR=2]=`STATUS_CODE_ERROR`})(n||(e.EStatusCode=n={}))}))(),Fc=`duration_ns`;function Ic(e=[],t){for(let n of e){let{scopeSpans:e}=n;for(let n of e){let{scope:e,spans:r=[]}=n;for(let n of r){if(n.kind!==Pc.ESpanKind.SPAN_KIND_CLIENT)continue;let r={traceId:n.traceId.toString(),spanId:n.spanId.toString()},i={};for(let e of n.attributes)i[e.key]=String(Object.values(e.value)[0]);!Number.isNaN(n.endTimeUnixNano)&&!Number.isNaN(n.startTimeUnixNano)&&(i[Fc]=String(Number(n.endTimeUnixNano)-Number(n.startTimeUnixNano)));let a=(e?.name??``).indexOf(`-`),o=I;e?.name&&(a===-1&&(o=e.name.split(`/`)[1]??e.name),a>-1&&(o=e?.name.substring(a+1))),t.pushEvent(`faro.tracing.${o}`,i,void 0,{spanContext:r,timestampOverwriteMs:Number(n.endTimeUnixNano)/1e6,customPayloadTransformer:e=>
22{if(i[`faro.action.user.name`]!=null&&i[`faro.action.user.parentId`]!=null){var t,n;e.action={name:i[`faro.action.user.name`],parentId:i[`faro.action.user.parentId`]},(t=e.attributes)==null||delete t[`faro.action.user.name`],(n=e.attributes)==null||delete n[`faro.action.user.parentId`]}return e}})}}}}var Lc,Rc=t((()=>{Lc=`1.9.1`}));function zc(e){let t=new Set([e]),n=new Set,r=e.match(Bc);if(!r)return()=>!1;let i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(t){return t===e};function a(e){return n.add(e),!1}function o(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;let r=e.match(Bc);if(!r)return a(e);let s={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};return s.prerelease!=null||i.major!==s.major?a(e):i.major===0?i.minor===s.minor&&i.patch<=s.patch?o(e):a(e):i.minor<=s.minor?o(e):a(e)}}var Bc,Vc,Hc=t((()=>{Rc(),Bc=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,Vc=zc(Lc)}));function Uc(e,t,n,r=!1){let i=Jc[qc]=Jc[qc]??{version:Lc};if(!r&&i[e]){let t=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(t.stack||t.message),!1}if(i.version!==`1.9.1`){let t=Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Lc}`);return n.error(t.stack||t.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Lc}.`),!0}function Wc(e){let t=Jc[qc]?.version;if(t&&Vc(t))return Jc[qc]?.[e]}function Gc(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Lc}.`);let n=Jc[qc];n&&delete n[e]}var Kc,qc,Jc,Yc=t((()=>{Rc(),Hc(),Kc=Lc.split(`.`)[0],qc=Symbol.for(`opentelemetry.js.api.${Kc}`),Jc=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{}}));function Xc(e,t,n){let r=Wc(`diag`);if(r)return r[e](t,...n)}var Zc,Qc=t((()=>{Yc(),Zc=class{constructor(e){this._namespace=e.namespace||`DiagComponentLogger`}debug(...e){return Xc(`debug`,this._namespace,e)}error(...e){return Xc(`error`,this._namespace,e)}info(...e){return Xc(`info`,this._namespace,e)}warn(...e){return Xc(`warn`,this._namespace,e)}verbose(...e){return Xc(`verbose`,this._namespace,e)}}})),K,$c=t((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.ERROR=30]=`ERROR`,e[e.WARN=50]=`WARN`,e[e.INFO=60]=`INFO`,e[e.DEBUG=70]=`DEBUG`,e[e.VERBOSE=80]=`VERBOSE`,e[e.ALL=9999]=`ALL`})(K||={})}));function el(e,t){e<K.NONE?e=K.NONE:e>K.ALL&&(e=K.ALL),t||={};function n(n,r){let i=t[n];return typeof i==`function`&&e>=r?i.bind(t):function(){}}return{error:n(`error`,K.ERROR),warn:n(`warn`,K.WARN),info:n(`info`,K.INFO),debug:n(`debug`,K.DEBUG),verbose:n(`verbose`,K.VERBOSE)}}var tl=t((()=>{$c()})),nl,rl,il=t((()=>{Qc(),tl(),$c(),Yc(),nl=`diag`,rl=class e{static instance(){return this._instance||=new e,this._instance}constructor(){function e(e){return function(...t){let n=Wc(`diag`);if(n)return n[e](...t)}}let t=this;t.setLogger=(e,n={logLevel:K.INFO})=>{if(e===t){let e=Error(`Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation`);return t.error(e.stack??e.message),!1}typeof n==`number`&&(n={logLevel:n});let r=Wc(`diag`),i=el(n.logLevel??K.INFO,e);if(r&&!n.suppressOverrideMessage){let e=Error().stack??`<failed to generate stacktrace>`;r.warn(`Current logger will be overwritten from ${e}
22`),i.warn(`Current logger will overwrite one already registered from ${e}`)}return Uc(`diag`,i,t,!0)},t.disable=()=>{Gc(nl,t)},t.createComponentLogger=e=>new Zc(e),t.verbose=e(`verbose`),t.debug=e(`debug`),t.info=e(`info`),t.warn=e(`warn`),t.error=e(`error`)}}})),al,ol=t((()=>{al=class e{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){let t=this._entries.get(e);if(t)return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(t,n){let r=new e(this._entries);return r._entries.set(t,n),r}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let e of t)n._entries.delete(e);return n}clear(){return new e}}})),sl,cl=t((()=>{sl=Symbol(`BaggageEntryMetadata`)}));function ll(e={}){return new al(new Map(Object.entries(e)))}function ul(e){return typeof e!=`string`&&(dl.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=``),{__TYPE__:sl,toString(){return e}}}var dl,fl=t((()=>{il(),ol(),cl(),dl=rl.instance()}));function pl(e){return Symbol.for(e)}var ml,hl,gl=t((()=>{ml=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=e=>n._currentContext.get(e),n.setValue=(t,r)=>{let i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=t=>{let r=new e(n._currentContext);return r._currentContext.delete(t),r}}},hl=new ml}));function _l(){return Ol}var vl,yl,bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Fl,Il=t((()=>{vl=class{constructor(){}createGauge(e,t){return Al}createHistogram(e,t){return jl}createCounter(e,t){return kl}createUpDownCounter(e,t){return Ml}createObservableGauge(e,t){return Pl}createObservableCounter(e,t){return Nl}createObservableUpDownCounter(e,t){return Fl}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},yl=class{},bl=class extends yl{add(e,t){}},xl=class extends yl{add(e,t){}},Sl=class extends yl{record(e,t){}},Cl=class extends yl{record(e,t){}},wl=class{addCallback(e){}removeCallback(e){}},Tl=class extends wl{},El=class extends wl{},Dl=class extends wl{},Ol=new vl,kl=new bl,Al=new Sl,jl=new Cl,Ml=new xl,Nl=new Tl,Pl=new El,Fl=new Dl})),Ll,Rl,zl=t((()=>{Ll={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},Rl={set(e,t,n){e!=null&&(e[t]=n)}}})),Bl,Vl=t((()=>{gl(),Bl=class{active(){return hl}with(e,t,n,...r){return t.call(n,...r)}bind(e,t){return t}enable(){return this}disable(){return this}}})),Hl,Ul,Wl,Gl=t((()=>{Vl(),Yc(),il(),Hl=`context`,Ul=new Bl,Wl=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalContextManager(e){return Uc(Hl,e,rl.instance())}active(){return this._getContextManager().active()}with(e,t,n,...r){return this._getContextManager().with(e,t,n,...r)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return Wc(Hl)||Ul}disable(){this._getContextManager().disable(),Gc(Hl,rl.instance())}}})),Kl,ql=t((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.SAMPLED=1]=`SAMPLED`})(Kl||={})})),Jl,Yl,Xl,Zl=t((()=>{ql(),Jl=`0000000000000000`,Yl=`00000000000000000000000000000000`,Xl={traceId:Yl,spanId:Jl,traceFlags:Kl.NONE}})),Ql,$l=t((()=>{Zl(),Ql=class{constructor(e=Xl){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,t){}}}));function eu(e){return e.getValue(ou)||void 0}function tu(){return eu(Wl.getInstance().active())}function nu(e,t){return e.setValue(ou,t)}function ru(e){return e.deleteValue(ou)}function iu(e,t){return nu(e,new Ql(t))}function au(e){return eu(e)?.spanContext()}var ou,su=t((()=>{gl(),$l(),Gl(),ou=pl(`OpenTelemetry Context Key SPAN`)}));function cu(e,t){if(typeof e!=`string`||e.length!==t)return!1;let n=0;for(let t=0;t<e.length;t+=4)n+=(pu[e.charCodeAt(t)]|0)+(pu[e.charCodeAt(t+1)]|0)+(pu[e.charCodeAt(t+2)]|0)+(pu[e.charCodeAt(t+3)]|0);return n===t}function lu(e){return cu(e,32)&&e!==`00000000000000000000000000000000`}function uu(e){return cu(e,16)&&e!==`0000000000000000`}function du(e){return lu(e.traceId)&&uu(e.spanId)}function fu(e){return new Ql(e)}var pu,mu=t((()=>{Zl(),$l(),pu=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1])}));function hu(e){return typeof e==`object`&&!!e&&`spanId`in e&&typeof e.spanId==`string`&&`traceId`in e&&typeof e.traceId==`string`&&`traceFlags`in e&&typeof e.traceFlags==`
22number`}var gu,_u,vu=t((()=>{Gl(),su(),$l(),mu(),gu=Wl.getInstance(),_u=class{startSpan(e,t,n=gu.active()){if(t?.root)return new Ql;let r=n&&au(n);return hu(r)&&du(r)?new Ql(r):new Ql}startActiveSpan(e,t,n,r){let i,a,o;if(arguments.length<2)return;arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);let s=a??gu.active(),c=this.startSpan(e,i,s),l=nu(s,c);return gu.with(l,o,void 0,c)}}})),yu,bu,xu=t((()=>{vu(),yu=new _u,bu=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}startSpan(e,t,n){return this._getTracer().startSpan(e,t,n)}startActiveSpan(e,t,n,r){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):yu}}})),Su,Cu=t((()=>{vu(),Su=class{getTracer(e,t,n){return new _u}}})),wu,Tu,Eu=t((()=>{xu(),Cu(),wu=new Su,Tu=class{getTracer(e,t,n){return this.getDelegateTracer(e,t,n)??new bu(this,e,t,n)}getDelegate(){return this._delegate??wu}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,n){return this._delegate?.getTracer(e,t,n)}}})),Du,Ou=t((()=>{(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(Du||={})})),ku,Au=t((()=>{(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(ku||={})})),ju,Mu=t((()=>{(function(e){e[e.UNSET=0]=`UNSET`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`})(ju||={})})),q,Nu=t((()=>{Gl(),q=Wl.getInstance()})),J,Pu=t((()=>{il(),J=rl.instance()})),Fu,Iu,Lu=t((()=>{Il(),Fu=class{getMeter(e,t,n){return Ol}},Iu=new Fu})),Ru,zu,Bu=t((()=>{Lu(),Yc(),il(),Ru=`metrics`,zu=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalMeterProvider(e){return Uc(Ru,e,rl.instance())}getMeterProvider(){return Wc(Ru)||Iu}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){Gc(Ru,rl.instance())}}})),Vu,Hu=t((()=>{Bu(),Vu=zu.getInstance()})),Uu,Wu=t((()=>{Uu=class{inject(e,t){}extract(e,t){return e}fields(){return[]}}}));function Gu(e){return e.getValue(Yu)||void 0}function Ku(){return Gu(Wl.getInstance().active())}function qu(e,t){return e.setValue(Yu,t)}function Ju(e){return e.deleteValue(Yu)}var Yu,Xu=t((()=>{Gl(),gl(),Yu=pl(`OpenTelemetry Baggage Key`)})),Zu,Qu,$u,ed=t((()=>{Yc(),Wu(),zl(),Xu(),fl(),il(),Zu=`propagation`,Qu=new Uu,$u=class e{constructor(){this.createBaggage=ll,this.getBaggage=Gu,this.getActiveBaggage=Ku,this.setBaggage=qu,this.deleteBaggage=Ju}static getInstance(){return this._instance||=new e,this._instance}setGlobalPropagator(e){return Uc(Zu,e,rl.instance())}inject(e,t,n=Rl){return this._getGlobalPropagator().inject(e,t,n)}extract(e,t,n=Ll){return this._getGlobalPropagator().extract(e,t,n)}fields(){return this._getGlobalPropagator().fields()}disable(){Gc(Zu,rl.instance())}_getGlobalPropagator(){return Wc(Zu)||Qu}}})),Y,td=t((()=>{ed(),Y=$u.getInstance()})),nd,rd,id=t((()=>{Yc(),Eu(),mu(),su(),il(),nd=`trace`,rd=class e{constructor(){this._proxyTracerProvider=new Tu,this.wrapSpanContext=fu,this.isSpanContextValid=du,this.deleteSpan=ru,this.getSpan=eu,this.getActiveSpan=tu,this.getSpanContext=au,this.setSpan=nu,this.setSpanContext=iu}static getInstance(){return this._instance||=new e,this._instance}setGlobalTracerProvider(e){let t=Uc(nd,this._proxyTracerProvider,rl.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}getTracerProvider(){return Wc(nd)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){Gc(nd,rl.instance()),this._proxyTracerProvider=new Tu}}})),X,ad=t((()=>{id(),X=rd.getInstance()})),Z=t((()=>{fl(),gl(),$c(),Il(),zl(),xu(),Eu(),Ou(),Au(),Mu(),ql(),mu(),Zl(),Nu(),Pu(),Hu(),td(),ad()}));Z();var od=pl(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`);function sd(e){return e.setValue(od,!0)}function cd(e){return e.getValue(od)===!0}var ld=`baggage`,ud=4096;Z();function dd(e){return e.reduce((e,t)=>
22{let n=`${e}${e===``?``:`,`}${t}`;return n.length>8192?e:n},``)}function fd(e){return e.getAllEntries().map(([e,t])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(n+=`;`+t.metadata.toString()),n})}function pd(e){if(!e)return;let t=e.indexOf(`;`),n=t===-1?e:e.substring(0,t),r=n.indexOf(`=`);if(r<=0)return;let i=n.substring(0,r).trim(),a=n.substring(r+1).trim();if(!i||!a)return;let o,s;try{o=decodeURIComponent(i),s=decodeURIComponent(a)}catch{return}let c;return t!==-1&&t<e.length-1&&(c=ul(e.substring(t+1))),{key:o,value:s,metadata:c}}function md(e,t,n,r){let i=0;for(;i<e.length&&n<180;){let a=e.indexOf(`,`,i),o=a===-1?e.length:a,s=o-i;if(s<=4096){let a=pd(e.substring(i,o));if(a){let e=(n===0?0:1)+s;if(r+e>8192)break;t[a.key]=a.metadata?{value:a.value,metadata:a.metadata}:{value:a.value},n++,r+=e}}if(a===-1)break;i=a+1}return[n,r]}Z();var hd=class{inject(e,t,n){let r=Y.getBaggage(e);if(!r||cd(e))return;let i=dd(fd(r).filter(e=>e.length<=ud).slice(0,180));i.length>0&&n.set(t,ld,i)}extract(e,t,n){let r=n.get(t,ld);if(!r)return e;let i={},a=0,o=0;if(Array.isArray(r))for(let e=0;e<r.length;e++)[a,o]=md(r[e],i,a,o);else[a]=md(r,i,a,o);return a===0?e:Y.setBaggage(e,Y.createBaggage(i))}fields(){return[ld]}};Z();function gd(e){let t={};if(typeof e!=`object`||!e)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!_d(n)){J.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!vd(r)){J.warn(`Invalid attribute value set for key: ${n}`);continue}t[n]=Array.isArray(r)?r.slice():r}return t}function _d(e){return typeof e==`string`&&e!==``}function vd(e){return e==null?!0:Array.isArray(e)?yd(e):bd(typeof e)}function yd(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(bd(e)){t=e;continue}return!1}return!1}}return!0}function bd(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}Z();function xd(){return e=>{J.error(Sd(e))}}function Sd(e){return typeof e==`string`?e:JSON.stringify(Cd(e))}function Cd(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))}),n=Object.getPrototypeOf(n);return t}var wd=xd();function Td(e){try{wd(e)}catch{}}var Ed=`2.11.0`,Dd=t((()=>{})),Od=t((()=>{Dd()})),kd,Ad,jd=t((()=>{kd=`deployment.environment`,Ad=kd})),Md=t((()=>{jd()})),Nd,Pd,Fd,Id,Ld,Rd,zd,Bd,Vd,Hd,Ud,Wd,Gd,Kd,qd,Jd,Yd,Xd=t((()=>{Nd=`error.type`,Pd=`exception.message`,Fd=`exception.stacktrace`,Id=`exception.type`,Ld=`http.request.method`,Rd=`http.request.method_original`,zd=`http.response.status_code`,Bd=`server.address`,Vd=`server.port`,Hd=`service.name`,Ud=`service.version`,Wd=`telemetry.sdk.language`,Gd=`webjs`,Kd=`telemetry.sdk.name`,qd=`telemetry.sdk.version`,Jd=`url.full`,Yd=`user_agent.original`})),Zd=t((()=>{})),Qd=t((()=>{})),$d=t((()=>{Od(),Md(),Xd(),Zd(),Qd()})),ef=`process.runtime.name`;$d();var tf={[Kd]:`opentelemetry`,[ef]:`browser`,[Wd]:Gd,[qd]:Ed},nf=performance,rf=9,af=10**6,of=10**rf;function sf(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*af)]}function cf(e){return ff(sf(nf.timeOrigin),sf(typeof e==`number`?e:nf.now()))}function lf(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(--n,r+=of),[n,r]}function uf(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function df(e){return uf(e)||typeof e==`number`||e instanceof Date}function ff(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=of&&(n[1]-=of,n[0]+=1),n}var pf;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(pf||={}),Z();var mf=class{_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[];let t=new Set;for(let e of this._propagators){let n=typeof e.fields==`function`?e.fields():[];for(let e of n)t.add(e)}this._fields=Array.from(t)}inject(e,t,n){for(let r of this._propagators)try{r.inject(e,t,n)}catch(e){J.warn(`Failed to inject with ${r.constructor.name}. Err: ${e.message}`)}}extract(e,t,n){return this._propagators.reduce((e,r)=>{try{return r.extract(e,t,n)}catch(e){J.warn(`Failed to extract with ${r.constructor.name}. Err: ${e.message}`)}return e},e)}fields(){return this._fields.slice()}},hf=`[_0-9a-z-*/]`,gf=RegExp(`^(?:${`[a-z]${hf}{0,255}`}|${`[a-z0-9]${hf}{0,240}@[a-z]${hf}{0,13}`})$`),_f=/^[ -~]{0,255}[!-~]$/,vf=/,|=/;function yf(e){return gf.test(e)}function bf(e){return _f.test(e)&&!vf.test(e)}var xf=32,Sf=512,Cf=`,`,wf=`=`,Tf=class e{_length;_rawTraceState;_internalState;constructor(e){this._rawTraceState=typeof e==`string`?e:``,this._length=this._rawTraceState.length}set(e,t){if(!yf(e)||!bf(t))return this;let n=this._getState(),r=n.get(e),i=this._length;if(i+=typeof r==`string`?t.length-r.length:e.length+t.length+(n.size>0?2:1),i>Sf)return this;let a=new Map(n);return a.delete(e),a.set(e,t),this._fromState(a,i)}unset(e){let t=this._getState(),n=t.get(e);if(typeof n!=`string`)return this;let r=this._length-(e.length+n.length+1);t.size>1&&--r;let i=new Map(t);return i.delete(e),this._fromState(i,r)}get(e){return this._getState().get(e)}serialize(){let e=``,t=0;for(let n of this._getState())t>0&&(e=Cf+e),e=`${n[0]}${wf}${n[1]}`+e,t++;return e}_getState(){if(this._internalState)return this._internalState;let e=this._rawTraceState.split(Cf),t=new Map,n=0;for(let r of e){let e=r.trim(),i=e.indexOf(wf);if(i===-1)continue;let a=e.slice(0,i),o=e.slice(i+1);if(!yf(a)||!bf(o))continue;let s=n+e.length+ +(t.size>0);if(!(s>Sf)&&(t.set(a,o),n=s,t.size>=xf))break}return this._length=n,this._internalState=new Map(Array.from(t.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}};Z();var Ef=`traceparent`,Df=`tracestate`,Of=`00`,kf=RegExp(`^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$`);function Af(e){let t=kf.exec(e);return!t||t[1]===`00`&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}
vendor: 15,735 bytes, line 22
22var jf=class{inject(e,t,n){let r=X.getSpanContext(e);if(!r||cd(e)||!du(r))return;let i=`${Of}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags||Kl.NONE).toString(16)}`;n.set(t,Ef,i),r.traceState&&n.set(t,Df,r.traceState.serialize())}extract(e,t,n){let r=n.get(t,Ef);if(!r)return e;let i=Array.isArray(r)?r[0]:r;if(typeof i!=`string`)return e;let a=Af(i);if(!a)return e;a.isRemote=!0;let o=n.get(t,Df);if(o){let e=Array.isArray(o)?o.join(`,`):o;a.traceState=new Tf(typeof e==`string`?e:void 0)}return X.setSpanContext(e,a)}fields(){return[Ef,Df]}},Mf=`[object Object]`,Nf=`[object Null]`,Pf=`[object Undefined]`,Ff=Function.prototype.toString,If=Ff.call(Object),Lf=Object.getPrototypeOf,Rf=Object.prototype,zf=Rf.hasOwnProperty,Bf=Symbol?Symbol.toStringTag:void 0,Vf=Rf.toString;function Hf(e){if(!Uf(e)||Wf(e)!==Mf)return!1;let t=Lf(e);if(t===null)return!0;let n=zf.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Ff.call(n)===If}function Uf(e){return typeof e==`object`&&!!e}function Wf(e){return e==null?e===void 0?Pf:Nf:Bf&&Bf in Object(e)?Gf(e):Kf(e)}function Gf(e){let t=zf.call(e,Bf),n=e[Bf],r=!1;try{e[Bf]=void 0,r=!0}catch{}let i=Vf.call(e);return r&&(t?e[Bf]=n:delete e[Bf]),i}function Kf(e){return Vf.call(e)}var qf=20;function Jf(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Xf(t,e.shift(),0,n);return t}function Yf(e){return Qf(e)?e.slice():e}function Xf(e,t,n=0,r){let i;if(!(n>qf)){if(n++,tp(e)||tp(t)||$f(t))i=Yf(t);else if(Qf(e)){if(i=e.slice(),Qf(t))for(let e=0,n=t.length;e<n;e++)i.push(Yf(t[e]));else if(ep(t)){let e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){let r=e[n];r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&(i[r]=Yf(t[r]))}}}else if(ep(e)){if(ep(t)){if(!np(e,t))return t;i=Object.assign({},e);let a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){let s=a[o];if(s===`__proto__`||s===`constructor`||s===`prototype`)continue;let c=t[s];if(tp(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(Zf(e,s,r)||Zf(t,s,r))delete i[s];else{if(ep(a)&&ep(o)){let n=r.get(a)||[],i=r.get(o)||[];n.push({obj:e,key:s}),i.push({obj:t,key:s}),r.set(a,n),r.set(o,i)}i[s]=Xf(i[s],c,n,r)}}}}else i=t}return i}}function Zf(e,t,n){let r=n.get(e[t])||[];for(let n=0,i=r.length;n<i;n++){let i=r[n];if(i.key===t&&i.obj===e)return!0}return!1}function Qf(e){return Array.isArray(e)}function $f(e){return typeof e==`function`}function ep(e){return!tp(e)&&!Qf(e)&&!$f(e)&&typeof e==`object`}function tp(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function np(e,t){return!(!Hf(e)||!Hf(t))}var rp=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}},ip=class{_isCalled=!1;_deferred=new rp;_callback;_that;constructor(e,t){this._callback=e,this._that=t}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(e=>this._deferred.resolve(e),e=>this._deferred.reject(e))}catch(e){this._deferred.reject(e)}}return this._deferred.promise}};function ap(e){return e.setValue(cp,!0)}function op(e){return e.deleteValue(cp)}function sp(e){return e.getValue(cp)===!0}var cp,lp=t((()=>{Z(),cp=pl(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`)})),up,dp,fp=t((()=>{up=`baggage`,dp=4096}));function pp(e){return e.reduce((e,t)=>{let n=`${e}${e===``?``:`,`}${t}`;return n.length>8192?e:n},``)}function mp(e){return e.getAllEntries().map(([e,t])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(n+=`;`+t.metadata.toString()),n})}function hp(e){if(!e)return;let t=e.indexOf(`;`),n=t===-1?e:e.substring(0,t),r=n.indexOf(`=`);if(r<=0)return;let i=n.substring(0,r).trim(),a=n.substring(r+1).trim();if(!i||!a)return;let o,s;try{o=decodeURIComponent(i),s=decodeURIComponent(a)}catch{return}let c;return t!==-1&&t<e.length-1&&(c=ul(e.substring(t+1))),{key:o,value:s,metadata:c}}function gp(e,t,n,r){let i=0;for(;i<e.length&&n<180;){let a=e.indexOf(`,`,i),o=a===-1?e.length:a,s=o-i;if(s<=4096){let a=hp(e.substring(i,o));if(a){let e=(n===0?0:1)+s;if(r+e>8192)break;t[a.key]=a.metadata?{value:a.value,metadata:a.metadata}:{value:a.value},n++,r+=e}}if(a===-1)break;i=a+1}return[n,r]}function _p(e){let t={};return typeof e==`string`&&e.length>0&&e.split(`,`).forEach(e=>{let n=hp(e);n!==void 0&&n.value.length>0&&(t[n.key]=n.value)}),t}var vp=t((()=>{Z(),fp()})),yp,bp=t((()=>{Z(),lp(),fp(),vp(),yp=class{inject(e,t,n){let r=Y.getBaggage(e);if(!r||sp(e))return;let i=pp(mp(r).filter(e=>e.length<=dp).slice(0,180));i.length>0&&n.set(t,up,i)}extract(e,t,n){let r=n.get(t,up);if(!r)return e;let i={},a=0,o=0;if(Array.isArray(r))for(let e=0;e<r.length;e++)[a,o]=gp(r[e],i,a,o);else[a]=gp(r,i,a,o);return a===0?e:Y.setBaggage(e,Y.createBaggage(i))}fields(){return[up]}}})),xp,Sp=t((()=>{xp=class{_monotonicClock;_epochMillis;_performanceMillis;constructor(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}}}));function Cp(e){let t={};if(typeof e!=`object`||!e)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!wp(n)){J.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Tp(r)){J.warn(`Invalid attribute value set for key: ${n}`);continue}t[n]=Array.isArray(r)?r.slice():r}return t}function wp(e){return typeof e==`string`&&e!==``}function Tp(e){return e==null?!0:Array.isArray(e)?Ep(e):Dp(typeof e)}function Ep(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(Dp(e)){t=e;continue}return!1}return!1}}return!0}function Dp(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}var Op=t((()=>{Z()}));function kp(){return e=>{J.error(Ap(e))}}function Ap(e){return typeof e==`string`?e:JSON.stringify(jp(e))}function jp(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))}),n=Object.getPrototypeOf(n);return t}var Mp=t((()=>{Z()}));function Np(e){Fp=e}function Pp(e){try{Fp(e)}catch{}}var Fp,Ip=t((()=>{Mp(),Fp=kp()}));function Lp(e){}function Rp(e){}function zp(e){}function Bp(e){}var Vp=t((()=>{})),Hp,Up=t((()=>{Hp=globalThis})),Wp,Gp=t((()=>{Wp=`2.10.0`})),Kp,qp=t((()=>{Kp=`process.runtime.name`})),Jp,Yp=t((()=>{Gp(),$d(),qp(),Jp={[Kd]:`opentelemetry`,[Kp]:`browser`,[Wd]:Gd,[qd]:Wp}})),Xp,Zp=t((()=>{Vp(),Up(),Yp(),Xp=performance}));function Qp(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*fm)]}function $p(){return Xp.timeOrigin}function em(e){return um(Qp(Xp.timeOrigin),Qp(typeof e==`number`?e:Xp.now()))}function tm(e){if(cm(e))return e;if(typeof e==`number`)return e<Xp.timeOrigin/2?em(e):Qp(e);if(e instanceof Date)return Qp(e.getTime());throw TypeError(`Invalid input type`)}function nm(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(--n,r+=pm),[n,r]}function rm(e){let t=dm,n=`${`0`.repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace(`000Z`,r)}function im(e){return e[0]*pm+e[1]}function am(e){return e[0]*1e6+e[1]/1e3}function om(e){return e[0]*1e3+e[1]/1e6}function sm(e){return e[0]+e[1]/pm}function cm(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function lm(e){return cm(e)||typeof e==`number`||e instanceof Date}function um(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=pm&&(n[1]-=pm,n[0]+=1),n}var dm,fm,pm,mm=t((()=>{Zp(),dm=9,fm=10**6,pm=10**dm}));function hm(e){typeof e!=`number`&&e.unref()}var gm=t((()=>{})),_m,vm=t((()=>{(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(_m||={})})),ym,bm=t((()=>{Z(),ym=class{_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[];let t=new Set;for(let e of this._propagators){let n=typeof e.fields==`function`?e.fields():[];for(let e of n)t.add(e)}this._fields=Array.from(t)}inject(e,t,n){for(let r of this._propagators)try{r.inject(e,t,n)}catch(e){J.warn(`Failed to inject with ${r.constructor.name}. Err: ${e.message}`)}}extract(e,t,n){return this._propagators.reduce((e,r)=>{try{return r.extract(e,t,n)}catch(e){J.warn(`Failed to extract with ${r.constructor.name}. Err: ${e.message}`)}return e},e)}fields(){return this._fields.slice()}}}));function xm(e){return wm.test(e)}function Sm(e){return Tm.test(e)&&!Em.test(e)}var Cm,wm,Tm,Em,Dm=t((()=>{Cm=`[_0-9a-z-*/]`,wm=RegExp(`^(?:${`[a-z]${Cm}{0,255}`}|${`[a-z0-9]${Cm}{0,240}@[a-z]${Cm}{0,13}`})$`),Tm=/^[ -~]{0,255}[!-~]$/,Em=/,|=/})),Om,km,Am,jm,Mm,Nm=t((()=>{Dm(),Om=32,km=512,Am=`,`,jm=`=`,Mm=class e{_length;_rawTraceState;_internalState;constructor(e){this._rawTraceState=typeof e==`string`?e:``,this._length=this._rawTraceState.length}set(e,t){if(!xm(e)||!Sm(t))return this;let n=this._getState(),r=n.get(e),i=this._length;if(i+=typeof r==`string`?t.length-r.length:e.length+t.length+(n.size>0?2:1),i>km)return this;let a=new Map(n);return a.delete(e),a.set(e,t),this._fromState(a,i)}unset(e){let t=this._getState(),n=t.get(e);if(typeof n!=`string`)return this;let r=this._length-(e.length+n.length+1);t.size>1&&--r;let i=new Map(t);return i.delete(e),this._fromState(i,r)}get(e){return this._getState().get(e)}serialize(){let e=``,t=0;for(let n of this._getState())t>0&&(e=Am+e),e=`${n[0]}${jm}${n[1]}`+e,t++;return e}_getState(){if(this._internalState)return this._internalState;let e=this._rawTraceState.split(Am),t=new Map,n=0;for(let r of e){let e=r.trim(),i=e.indexOf(jm);if(i===-1)continue;let a=e.slice(0,i),o=e.slice(i+1);if(!xm(a)||!Sm(o))continue;let s=n+e.length+ +(t.size>0);if(!(s>km)&&(t.set(a,o),n=s,t.size>=Om))break}return this._length=n,this._internalState=new Map(Array.from(t.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}}}));function Pm(e){let t=Rm.exec(e);return!t||t[1]===`00`&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Fm,Im,Lm,Rm,zm,Bm=t((()=>{Z(),lp(),Nm(),Fm=`traceparent`,Im=`tracestate`,Lm=`00`,Rm=RegExp(`^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$`),zm=class{inject(e,t,n){let r=X.getSpanContext(e);if(!r||sp(e)||!du(r))return;let i=`${Lm}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags||Kl.NONE).toString(16)}`;n.set(t,Fm,i),r.traceState&&n.set(t,Im,r.traceState.serialize())}extract(e,t,n){let r=n.get(t,Fm);if(!r)return e;let i=Array.isArray(r)?r[0]:r;if(typeof i!=`string`)return e;let a=Pm(i);if(!a)return e;a.isRemote=!0;let o=n.get(t,Im);if(o){let e=Array.isArray(o)?o.join(`,`):o;a.traceState=new Mm(typeof e==`string`?e:void 0)}return X.setSpanContext(e,a)}fields(){return[Fm,Im]}}}));function Vm(e,t){return e.setValue(Wm,t)}function Hm(e){return e.deleteValue(Wm)}function Um(e){return e.getValue(Wm)}var Wm,Gm,Km=t((()=>{Z(),Wm=pl(`OpenTelemetry SDK Context Key RPC_METADATA`),(function(e){e.HTTP=`http`})(Gm||={})}));function qm(e){if(!Jm(e)||Ym(e)!==Qm)return!1;let t=rh(e);if(t===null)return!0;let n=ah.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&th.call(n)===nh}function Jm(e){return typeof e==`object`&&!!e}function Ym(e){return e==null?e===void 0?eh:$m:oh&&oh in Object(e)?Xm(e):Zm(e)}function Xm(e){let t=ah.call(e,oh),n=e[oh],r=!1;try{e[oh]=void 0,r=!0}catch{}let i=sh.call(e);return r&&(t?e[oh]=n:delete e[oh]),i}function Zm(e){return sh.call(e)}var Qm,$m,eh,th,nh,rh,ih,ah,oh,sh,ch=t((()=>{Qm=`[object Object]`,$m=`[object Null]`,eh=`[object Undefined]`,th=Function.prototype.toString,nh=th.call(Object),rh=Object.getPrototypeOf,ih=Object.prototype,ah=ih.hasOwnProperty,oh=Symbol?Symbol.toStringTag:void 0,sh=ih.toString}));function lh(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=dh(t,e.shift(),0,n);return t}function uh(e){return ph(e)?e.slice():e}function dh(e,t,n=0,r){let i;if(!(n>vh)){if(n++,gh(e)||gh(t)||mh(t))i=uh(t);else if(ph(e)){if(i=e.slice(),ph(t))for(let e=0,n=t.length;e<n;e++)i.push(uh(t[e]));else if(hh(t)){let e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){let r=e[n];r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&(i[r]=uh(t[r]))}}}else if(hh(e)){if(hh(t)){if(!_h(e,t))return t;i=Object.assign({},e);let a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){let s=a[o];if(s===`__proto__`||s===`constructor`||s===`prototype`)continue;let c=t[s];if(gh(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(fh(e,s,r)||fh(t,s,r))delete i[s];else{if(hh(a)&&hh(o)){let n=r.get(a)||[],i=r.get(o)||[];n.push({obj:e,key:s}),i.push({obj:t,key:s}),r.set(a,n),r.set(o,i)}i[s]=dh(i[s],c,n,r)}}}}else i=t}return i}}function fh(e,t,n){let r=n.get(e[t])||[];for(let n=0,i=r.length;n<i;n++){let i=r[n];if(i.key===t&&i.obj===e)return!0}return!1}function ph(e){return Array.isArray(e)}function mh(e){return typeof e==`function`}function hh(e){return!gh(e)&&!ph(e)&&!mh(e)&&typeof e==`object`}function gh(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function _h(e,t){return!(!qm(e)||!qm(t))}var vh,yh=t((()=>{ch(),vh=20}));function bh(e,t){let n,r=new Promise(function(e,r){n=setTimeout(function(){r(new xh(`Operation timed out.`))},t)});return Promise.race([e,r]).then(e=>(clearTimeout(n),e),e=>{throw clearTimeout(n),e})}var xh,Sh=t((()=>{xh=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}}));function Ch(e,t){return typeof t==`string`?e===t:!!e.match(t)}function wh(e,t){if(!t)return!1;for(let n of t)if(Ch(e,n))return!0;return!1}var Th=t((()=>{})),Eh,Dh=t((()=>{Eh=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}})),Oh,kh=t((()=>{Dh(),Oh=class{_isCalled=!1;_deferred=new Eh;_callback;_that;constructor(e,t){this._callback=e,this._that=t}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(e=>this._deferred.resolve(e),e=>this._deferred.reject(e))}catch(e){this._deferred.reject(e)}}return this._deferred.promise}}}));function Ah(e){return e==null?void 0:jh[e.toUpperCase()]??(J.warn(`Unknown log level "${e}", expected one of ${Object.keys(jh)}, using default`),K.INFO)}var jh,Mh=t((()=>{Z(),jh={ALL:K.ALL,VERBOSE:K.VERBOSE,DEBUG:K.DEBUG,INFO:K.INFO,WARN:K.WARN,ERROR:K.ERROR,NONE:K.NONE}}));function Nh(e,t){return new Promise(n=>{q.with(ap(q.active()),()=>{e.export(t,n)})})}var Ph=t((()=>{Z(),lp()})),Fh=n({AnchoredClock:()=>xp,BindOnceFuture:()=>Oh,CompositePropagator:()=>ym,ExportResultCode:()=>_m,RPCType:()=>Gm,SDK_INFO:()=>Jp,TRACE_PARENT_HEADER:()=>Fm,TRACE_STATE_HEADER:()=>Im,TimeoutError:()=>xh,TraceState:()=>Mm,W3CBaggagePropagator:()=>yp,W3CTraceContextPropagator:()=>zm,_globalThis:()=>Hp,addHrTimes:()=>um,callWithTimeout:()=>bh,deleteRPCMetadata:()=>Hm,diagLogLevelFromString:()=>Ah,getBooleanFromEnv:()=>Rp,getNumberFromEnv:()=>zp,getRPCMetadata:()=>Um,getStringFromEnv:()=>Lp,getStringListFromEnv:()=>Bp,getTimeOrigin:()=>$p,globalErrorHandler:()=>Pp,hrTime:()=>em,hrTimeDuration:()=>nm,hrTimeToMicroseconds:()=>am,hrTimeToMilliseconds:()=>om,hrTimeToNanoseconds:()=>im,hrTimeToSeconds:()=>sm,hrTimeToTimeStamp:()=>rm,internal:()=>Ih,isAttributeValue:()=>Tp,isTimeInput:()=>lm,isTimeInputHrTime:()=>cm,isTracingSuppressed:()=>sp,isUrlIgnored:()=>wh,loggingErrorHandler:()=>kp,merge:()=>lh,millisToHrTime:()=>Qp,otperformance:()=>
22Xp,parseKeyPairsIntoRecord:()=>_p,parseTraceParent:()=>Pm,sanitizeAttributes:()=>Cp,setGlobalErrorHandler:()=>Np,setRPCMetadata:()=>Vm,suppressTracing:()=>ap,timeInputToHrTime:()=>tm,unrefTimer:()=>hm,unsuppressTracing:()=>op,urlMatches:()=>Ch}),Ih,Lh=t((()=>{bp(),Sp(),Op(),Ip(),Mp(),mm(),gm(),vm(),vp(),Zp(),bm(),Bm(),Km(),lp(),Nm(),yh(),Sh(),Th(),kh(),Mh(),Ph(),Ih={_export:Nh}})),Rh=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBinary=void 0;function t(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function n(e){let n=new Uint8Array(e.length/2),r=0;for(let i=0;i<e.length;i+=2){let a=t(e.charCodeAt(i)),o=t(e.charCodeAt(i+1));n[r++]=a<<4|o}return n}e.hexToBinary=n})),zh=r((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSON_ENCODER=t.PROTOBUF_ENCODER=t.encodeAsString=t.encodeAsLongBits=t.toLongBits=t.hrTimeToNanos=void 0;var n=(Lh(),e(Fh)),r=Rh();function i(e){let t=BigInt(1e9);return BigInt(Math.trunc(e[0]))*t+BigInt(Math.trunc(e[1]))}t.hrTimeToNanos=i;function a(e){return{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}t.toLongBits=a;function o(e){return a(i(e))}t.encodeAsLongBits=o;function s(e){return i(e).toString()}t.encodeAsString=s;var c=typeof BigInt<`u`?s:n.hrTimeToNanoseconds;function l(e){return e}function u(e){if(e!==void 0)return(0,r.hexToBinary)(e)}t.PROTOBUF_ENCODER={encodeHrTime:o,encodeSpanContext:r.hexToBinary,encodeOptionalSpanContext:u,encodeUint8Array:l},t.JSON_ENCODER={encodeHrTime:c,encodeSpanContext:l,encodeOptionalSpanContext:l,encodeUint8Array:e=>{if(typeof Buffer<`u`)return Buffer.from(e).toString(`base64`);let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=String.fromCharCode(e[n]);return btoa(t.join(``))}}})),Bh=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.toAnyValue=e.toKeyValue=e.toAttributes=e.createInstrumentationScope=e.createResource=void 0;function t(e,t){let n={attributes:r(e.attributes,t),droppedAttributesCount:0},i=e.schemaUrl;return i&&i!==``&&(n.schemaUrl=i),n}e.createResource=t;function n(e,t){let n={name:e.name,version:e.version};return e.attributes&&Object.keys(e.attributes).length>0&&(n.attributes=r(e.attributes,t),n.droppedAttributesCount=e.droppedAttributesCount??0),n}e.createInstrumentationScope=n;function r(e,t){return Object.keys(e).map(n=>i(n,e[n],t))}e.toAttributes=r;function i(e,t,n){return{key:e,value:a(t,n)}}e.toKeyValue=i;function a(e,t){let n=typeof e;if(n===`string`)return{stringValue:e};if(n===`number`)return Number.isInteger(e)?{intValue:e}:{doubleValue:e};if(n===`boolean`)return{boolValue:e};if(e instanceof Uint8Array)return{bytesValue:t.encodeUint8Array(e)};if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=a(e[r],t);return{arrayValue:{values:n}}}if(n===`object`&&e!=null){let n=Object.keys(e),r=Array(n.length);for(let i=0;i<n.length;i++)r[i]={key:n[i],value:a(e[n[i]],t)};return{kvlistValue:{values:r}}}return{}}e.toAnyValue=a})),Vh=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createExportTraceServiceRequest=e.toOtlpSpanEvent=e.toOtlpLink=e.sdkSpanToOtlpSpan=void 0;var t=Bh(),n=256,r=512;function i(e,t){let i=e&255|n;return t&&(i|=r),i}function a(e,n){let r=e.spanContext(),a=e.status,c=e.parentSpanContext?.spanId?n.encodeSpanContext(e.parentSpanContext?.spanId):void 0;return{traceId:n.encodeSpanContext(r.traceId),spanId:n.encodeSpanContext(r.spanId),parentSpanId:c,traceState:r.traceState?.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:n.encodeHrTime(e.startTime),endTimeUnixNano:n.encodeHrTime(e.endTime),attributes:(0,t.toAttributes)(e.attributes,n),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(e=>s(e,n)),droppedEventsCount:e.droppedEventsCount,status:{code:a.code,message:a.message},links:e.links.map(e=>o(e,n)),droppedLinksCount:e.droppedLinksCount,flags:i(r.traceFlags,e.parentSpanContext?.isRemote)}}e.sdkSpanToOtlpSpan=a;function o(e,n){return{attributes:e.attributes?(0,t.toAttributes)(e.attributes,n):[],spanId:n.encodeSpanContext(e.context.spanId),traceId:n.encodeSpanContext(e.context.traceId),traceState:e.context.traceState?.serialize(),droppedAttributesCount:e.droppedAttributesCount||0,flags:i(e.context.traceFlags,e.context.
22isRemote)}}e.toOtlpLink=o;function s(e,n){return{attributes:e.attributes?(0,t.toAttributes)(e.attributes,n):[],name:e.name,timeUnixNano:n.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}e.toOtlpSpanEvent=s;function c(e,t){return{resourceSpans:u(e,t)}}e.createExportTraceServiceRequest=c;function l(e){let t=new Map;for(let n of e){let e=t.get(n.resource);e||(e=new Map,t.set(n.resource,e));let r=`${n.instrumentationScope.name}@${n.instrumentationScope.version||``}:${n.instrumentationScope.schemaUrl||``}`,i=e.get(r);i||(i=[],e.set(r,i)),i.push(n)}return t}function u(e,n){let r=l(e),i=[],o=r.entries(),s=o.next();for(;!s.done;){let[e,r]=s.value,c=[],l=r.values(),u=l.next();for(;!u.done;){let e=u.value;if(e.length>0){let r=e.map(e=>a(e,n));c.push({scope:(0,t.createInstrumentationScope)(e[0].instrumentationScope,n),spans:r,schemaUrl:e[0].instrumentationScope.schemaUrl})}u=l.next()}let d=(0,t.createResource)(e,n),f={resource:d,scopeSpans:c,schemaUrl:d.schemaUrl};i.push(f),s=o.next()}return i}})),Hh=zh(),Uh=Vh(),Wh=class{constructor(e){this.config=e}export(e,t){let n=(0,Uh.createExportTraceServiceRequest)(e,Hh.JSON_ENCODER);this.config.api.pushTraces(n),Ic(n.resourceSpans,this.config.api),t({code:pf.SUCCESS})}shutdown(){return Promise.resolve(void 0)}};Z();function Gh(e,t,n){qh(e,n instanceof Error?0:n.status)}function Kh(e,t){qh(e,t.status)}function qh(e,t){t!=null&&(t===0||t>=400&&t<600)&&e.setStatus({code:ju.ERROR})}function Jh(e){return(t,n,r)=>{Gh(t,n,r),e?.(t,n,r)}}function Yh(e){return(t,n)=>{Kh(t,n),e?.(t,n)}}var Xh=class{emit(e){}enabled(){return!1}},Zh=new Xh,Qh=Symbol.for(`io.opentelemetry.js.api.logs`),$h=globalThis;function eg(e,t,n){return r=>r===e?t:n}var tg=new class{getLogger(e,t,n){return new Xh}},ng=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}emit(e){this._getLogger().emit(e)}enabled(e){return this._getLogger().enabled(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider._getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Zh}},rg=class{getLogger(e,t,n){return this._getDelegateLogger(e,t,n)??new ng(this,e,t,n)}_getDelegate(){return this._delegate??tg}_setDelegate(e){this._delegate=e}_getDelegateLogger(e,t,n){return this._delegate?.getLogger(e,t,n)}},ig=class e{constructor(){this._proxyLoggerProvider=new rg}static getInstance(){return this._instance||=new e,this._instance}setGlobalLoggerProvider(e){return $h[Qh]?this.getLoggerProvider():($h[Qh]=eg(1,e,tg),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){return $h[Qh]?.call($h,1)??this._proxyLoggerProvider}getLogger(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)}disable(){delete $h[Qh],this._proxyLoggerProvider=new rg}}.getInstance();function ag(e,t,n,r){for(let i=0,a=e.length;i<a;i++){let a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function og(e){e.forEach(e=>e.disable())}Z();function sg(e){let t=e.tracerProvider||X.getTracerProvider(),n=e.meterProvider||Vu.getMeterProvider(),r=e.loggerProvider||ig.getLoggerProvider(),i=e.instrumentations?.flat()??[];return ag(i,t,n,r),()=>{og(i)}}var Q=console.error.bind(console);function cg(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var lg=(e,t,n)=>{if(!e||!e[t]){Q(`no original function `+String(t)+` to wrap`);return}if(!n){Q(`no wrapper function`),Q(Error().stack);return}let r=e[t];if(typeof r!=`function`||typeof n!=`function`){Q(`original object and wrapper must be functions`);return}let i=n(r,t);return cg(i,`__original`,r),cg(i,`__unwrap`,()=>{e[t]===i&&cg(e,t,r)}),cg(i,`__wrapped`,!0),cg(e,t,i),i},ug=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Q(`must provide one or more modules to patch`),Q(Error().stack);return}if(!(t&&Array.isArray(t))){Q(`must provide one or more functions to wrap on modules`);return}e.forEach(e=>{t.forEach(t=>{lg(e,t,n)})})},dg=(e,t)=>{if(!e||!e[t]){Q(`no function to unwrap.`),Q(Error().stack);return}let n=e[t];if(!n.__unwrap)Q(`no original to unwrap to -- has `+String(t)+` already been unwrapped?`);else{n.__unwrap();return}},fg=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Q(`must provide one or more modules to patch`),Q(Error().stack);return}if(!(t&&Array.isArray(t))){Q(`must provide one or more functions to unwrap on modules`);return}
22e.forEach(e=>{t.forEach(t=>{dg(e,t)})})};Z();var pg=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this.setConfig(n),this._diag=J.createComponentLogger({namespace:e}),this._tracer=X.getTracer(e,t),this._meter=Vu.getMeter(e,t),this._logger=ig.getLogger(e,t),this._updateMetricInstruments()}_wrap=lg;_unwrap=dg;_massWrap=ug;_massUnwrap=fg;get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,t,n,r){if(e)try{e(n,r)}catch(e){this._diag.error(`Error running span customization hook due to exception in handler`,{triggerName:t},e)}}},mg=class extends pg{constructor(e,t,n){super(e,t,n),this._config.enabled&&this.enable()}};function hg(e,t,n){let r,i;try{i=e()}catch(e){r=e}finally{if(t(r,i),r&&!n)throw r;return i}}var $;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})($||={});var gg=`http.response_content_length`,_g=`http.response_content_length_uncompressed`;Lh();var vg;function yg(){return vg||=document.createElement(`a`),vg}function bg(e,t){return t in e}function xg(e,t,n,r=!0){if(bg(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function Sg(e,t,n=!1,r,i){if(r===void 0&&(r=t[$.START_TIME]!==0),n||(xg(e,$.FETCH_START,t,r),xg(e,$.DOMAIN_LOOKUP_START,t,r),xg(e,$.DOMAIN_LOOKUP_END,t,r),xg(e,$.CONNECT_START,t,r),xg(e,$.SECURE_CONNECTION_START,t,r),xg(e,$.CONNECT_END,t,r),xg(e,$.REQUEST_START,t,r),xg(e,$.RESPONSE_START,t,r),xg(e,$.RESPONSE_END,t,r)),!i){let n=t[$.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(gg,n);let r=t[$.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(_g,r)}}function Cg(e){return e.slice().sort((e,t)=>{let n=e[$.FETCH_START],r=t[$.FETCH_START];return n>r?1:n<r?-1:0})}function wg(){return typeof location<`u`?location.origin:void 0}function Tg(e,t,n,r,i=new WeakSet,a){let o=Og(e);e=o.toString();let s=Dg(e,t,n,r,i,a);if(s.length===0)return{mainRequest:void 0};if(s.length===1)return{mainRequest:s[0]};let c=Cg(s);if(o.origin!==wg()&&c.length>1){let e=c[0],t=Eg(c,e[$.RESPONSE_END],n),r=e[$.RESPONSE_END];return t[$.FETCH_START]<r&&(t=e,e=void 0),{corsPreFlightRequest:e,mainRequest:t}}return{mainRequest:s[0]}}function Eg(e,t,n){let r=im(n),i=im(tm(t)),a=e[1],o,s=e.length;for(let t=1;t<s;t++){let n=e[t],s=im(tm(n[$.FETCH_START])),c=r-im(tm(n[$.RESPONSE_END]));s>=i&&(!o||c<o)&&(o=c,a=n)}return a}function Dg(e,t,n,r,i,a){let o=im(t),s=im(n),c=r.filter(t=>{let n=im(tm(t[$.FETCH_START])),r=im(tm(t[$.RESPONSE_END]));return t.initiatorType.toLowerCase()===(a||`xmlhttprequest`)&&t.name===e&&n>=o&&r<=s});return c.length>0&&(c=c.filter(e=>!i.has(e))),c}function Og(e){if(typeof URL==`function`)return new URL(e,typeof document<`u`?document.baseURI:typeof location<`u`?location.href:void 0);let t=yg();return t.href=e,t}function kg(e,t){let n=t||[];return(typeof n==`string`||n instanceof RegExp)&&(n=[n]),Og(e).origin===wg()||n.some(t=>Ch(e,t))}var Ag=`http.request.body.size`,jg;(function(e){e.METHOD_OPEN=`open`,e.METHOD_SEND=`send`,e.EVENT_ABORT=`abort`,e.EVENT_ERROR=`error`,e.EVENT_LOAD=`loaded`,e.EVENT_TIMEOUT=`timeout`})(jg||={}),Z(),Lh();var Mg=J.createComponentLogger({namespace:`@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils`});function Ng(e){return typeof Document<`u`&&e instanceof Document}function Pg(e){if(Ng(e))return new XMLSerializer().serializeToString(document).length;if(typeof e==`string`)return Ig(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return Lg(e);
vendor: 6,417 bytes, line 22
22if(e instanceof URLSearchParams)return Ig(e.toString());if(e.byteLength!==void 0)return e.byteLength;Mg.warn(`unknown body type`)}var Fg=new TextEncoder;function Ig(e){return Fg.encode(e).byteLength}function Lg(e){let t=0;for(let[n,r]of e.entries())t+=n.length,r instanceof Blob?t+=r.size:t+=r.length;return t}function Rg(e){let t=Vg(),n=e.toUpperCase();return n in t?n:`_OTHER`}var zg={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0,QUERY:!0},Bg;function Vg(){return Bg===void 0&&(Bg=zg),Bg}var Hg={"https:":`443`,"http:":`80`};function Ug(e){let t=Number(e.port||Hg[e.protocol]);if(t&&!isNaN(t))return t}var Wg=`0.221.0`;Z(),Lh(),$d();var Gg=300,Kg=class extends mg{component=`xml-http-request`;version=Wg;moduleName=this.component;_tasksCount=0;_xhrMem=new WeakMap;_usedResources=new WeakSet;constructor(e={}){super(`@opentelemetry/instrumentation-xml-http-request`,Wg,e)}init(){}_addHeaders(e,t){let n=Og(t).href;if(!kg(n,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};Y.inject(q.active(),e),Object.keys(e).length>0&&this._diag.debug(`headers inject skipped due to CORS policy`);return}let r={};Y.inject(q.active(),r),Object.keys(r).forEach(t=>{e.setRequestHeader(t,String(r[t]))})}_addChildSpan(e,t){q.with(X.setSpan(q.active(),e),()=>{let e=this.tracer.startSpan(`CORS Preflight`,{startTime:t[$.FETCH_START]});Sg(e,t,this.getConfig().ignoreNetworkEvents,void 0,!0),e.end(t[$.RESPONSE_END])})}_addFinalSpanAttributes(e,t){t.status&&e.setAttribute(zd,t.status)}_applyAttributesAfterXHR(e,t){let n=this.getConfig().applyCustomAttributesOnSpan;typeof n==`function`&&hg(()=>n(e,t),e=>{e&&this._diag.error(`applyCustomAttributesOnSpan`,e)},!0)}_addResourceObserver(e,t){let n=this._xhrMem.get(e);n&&typeof PerformanceObserver==`function`&&typeof PerformanceResourceTiming==`function`&&(n.createdResources={observer:new PerformanceObserver(e=>{let r=e.getEntries(),i=Og(t);r.forEach(e=>{e.initiatorType===`xmlhttprequest`&&e.name===i.href&&n.createdResources&&n.createdResources.entries.push(e)})}),entries:[]},n.createdResources.observer.observe({entryTypes:[`resource`]}))}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(Xp.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}_findResourceAndAddNetworkEvents(e,t,n,r,i){if(!n||!r||!i||!e.createdResources)return;let a=e.createdResources.entries;(!a||!a.length)&&(a=Xp.getEntriesByType(`resource`));let o=Tg(Og(n).href,r,i,a,this._usedResources);if(o.mainRequest){let e=o.mainRequest;this._markResourceAsUsed(e);let n=o.corsPreFlightRequest;n&&(this._addChildSpan(t,n),this._markResourceAsUsed(n)),Sg(t,e,this.getConfig().ignoreNetworkEvents,void 0,!0)}}_cleanPreviousSpanInformation(e){let t=this._xhrMem.get(e);if(t){let n=t.callbackToRemoveEvents;n&&n(),this._xhrMem.delete(e)}}_createSpan(e,t,n){let r=Og(t);if(wh(r.href,this.getConfig().ignoreUrls)){this._diag.debug(`ignoring span as url matches ignored url`);return}let i={},a=n,o=Rg(n),s=o;i[Ld]=o,o!==a&&(i[Rd]=a),i[Jd]=r.toString(),i[Bd]=r.hostname;let c=Ug(r);c&&(i[Vd]=c);let l=this.tracer.startSpan(s,{kind:ku.CLIENT,attributes:i});return l.addEvent(jg.METHOD_OPEN),this._cleanPreviousSpanInformation(e),this._xhrMem.set(e,{span:l,spanUrl:t}),l}_markResourceAsUsed(e){this._usedResources.add(e)}_patchOpen(){return e=>{let t=this;return function(...n){if(!t._isEnabled)return e.apply(this,n);let r=n[0],i=n[1];return t._createSpan(this,i,r),e.apply(this,n)}}}_patchSend(){let e=this;function t(t,n,r,i){let a=n.callbackToRemoveEvents;typeof a==`function`&&a();let{span:o,spanUrl:s,sendStartTime:c}=n;o&&(e._findResourceAndAddNetworkEvents(n,o,s,c,r),o.addEvent(t,i),e._addFinalSpanAttributes(o,n),o.end(i),e._tasksCount--),e._clearResources()}function n(n,r,i,a){let o=e._xhrMem.get(r);if(!o)return;if(o.status=r.status,o.statusText=r.statusText,e._xhrMem.delete(r),o.span){let t=o.span;e._applyAttributesAfterXHR(t,r),i?a&&(t.setStatus({code:ju.ERROR,message:a}),t.setAttribute(Nd,a)):o.status&&o.status>=400&&(t.setStatus({code:ju.ERROR}),t.setAttribute(Nd,String(o.status)))}let s=em(),c=Date.now();setTimeout(()=>{t(n,o,s,c)},Gg)}function r(){n(jg.EVENT_ERROR,this,!0,`error`)}function i(){n(jg.EVENT_ABORT,this,!1)}function a(){n(jg.EVENT_TIMEOUT,this,!0,`timeout`)}function o(){this.status<299?n(jg.EVENT_LOAD,this,!1):n(jg.EVENT_ERROR,this,!1)}function s(t){t.removeEventListener(`abort`,i),t.removeEventListener(`error`,r),t.removeEventListener(`load`,o),t.removeEventListener(`timeout`,a);let n=e._xhrMem.get(t);n&&(n.callbackToRemoveEvents=void 0)}return t=>function(...n){if(!e._isEnabled)return t.apply(this,n);let c=e._xhrMem.get(this);if(!c)return t.apply(this,n);let l=c.span,u=c.spanUrl;if(l&&u){if(e.getConfig().measureRequestSize&&n?.[0]){let e=n[0],t=Pg(e);t!==void 0&&l.setAttribute(Ag,t)}q.with(X.setSpan(q.active(),l),()=>{e._tasksCount++,c.sendStartTime=em(),l.addEvent(jg.METHOD_SEND),this.addEventListener(`abort`,i),this.addEventListener(`error`,r),this.addEventListener(`load`,o),this.addEventListener(`timeout`,a),c.callbackToRemoveEvents=()=>{s(this),c.createdResources&&c.createdResources.observer.disconnect()},e._addHeaders(this,u),e._addResourceObserver(this,u)})}return t.apply(this,n)}}enable(){if(!this._isEnabled){if(this._isXhrPatched){this._diag.debug(`reactivating existing patch on`,this.moduleName,this.version),this._isEnabled=!0;return}try{this._diag.debug(`applying patch to`,this.moduleName,this.version),this._wrap(XMLHttpRequest.prototype,`open`,this._patchOpen()),this._wrap(XMLHttpRequest.prototype,`send`,this._patchSend()),this._isXhrPatched=!0,this._isEnabled=!0}catch(e){this._unwrap(XMLHttpRequest.prototype,`open`),this._unwrap(XMLHttpRequest.prototype,`send`),this._diag.warn(`Failed to patch globalThis.XMLHttpRequest; instrumentation will not be enabled. Another script may have locked globalThis.XMLHttpRequest via Object.defineProperty.`,e)}}}disable(){this._isEnabled&&(this._isEnabled=!1,this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}},qg=class extends Kg{constructor(e={}){super(e);let t=this;this.parentCreateSpan=t._createSpan.bind(this)}_patchOpen(){return e=>{let t=this;return function(...n){let r;try{let e=n[0],i=Ur(n[1]);r=t.parentCreateSpan(this,i,e)}catch(e){V.internalLogger.error(e)}let i=V.api.getActiveUserAction();return r&&i&&i?.getState()===zn.Started&&(r.setAttribute(`faro.action.user.n
22ame`,i.name),r.setAttribute(`faro.action.user.parentId`,i.parentId)),e.apply(this,n)}}}};function Jg(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Yg(e,t){if(e==null)return{};var n,r,i=Jg(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xg(e){"@babel/helpers - typeof";return Xg=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Xg(e)}function Zg(e,t){if(Xg(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Xg(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Qg(e){var t=Zg(e,`string`);return Xg(t)==`symbol`?t:t+``}function $g(e,t,n){return(t=Qg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?e_(Object(n),!0).forEach(function(t){$g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var n_=`http.request.body.size`;Z(),Lh();var r_=J.createComponentLogger({namespace:`@opentelemetry/opentelemetry-instrumentation-fetch/utils`});function i_(...e){if(e[0]instanceof URL||typeof e[0]==`string`){let t=e[1];if(!t?.body)return Promise.resolve();if(t.body instanceof ReadableStream){let{body:e,length:n}=a_(t.body);return t.body=e,n}return Promise.resolve(s_(t.body))}{let t=e[0];return t?.body?t.clone().text().then(e=>l_(e)):Promise.resolve()}}function a_(e){if(!e.pipeThrough)return r_.warn(`Platform has ReadableStream but not pipeThrough!`),{body:e,length:Promise.resolve(void 0)};let t=0,n,r=new Promise(e=>{n=e}),i=new TransformStream({start(){},async transform(e,n){let r=await e;t+=r.byteLength,n.enqueue(e)},flush(){n(t)}});return{body:e.pipeThrough(i),length:r}}function o_(e){return typeof Document<`u`&&e instanceof Document}function s_(e){if(o_(e))return new XMLSerializer().serializeToString(document).length;if(typeof e==`string`)return l_(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return u_(e);if(e instanceof URLSearchParams)return l_(e.toString());if(e.byteLength!==void 0)return e.byteLength;r_.warn(`unknown body type`)}var c_=new TextEncoder;function l_(e){return c_.encode(e).byteLength}function u_(e){let t=0;for(let[n,r]of e.entries())t+=n.length,r instanceof Blob?t+=r.size:t+=r.length;return t}function d_(e){let t=m_(),n=e.toUpperCase();return n in t?n:`_OTHER`}var f_={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0,QUERY:!0},p_;function m_(){return p_===void 0&&(p_=f_),p_}var h_={"https:":`443`,"http:":`80`};function g_(e){let t=Number(e.port||h_[e.protocol]);if(t&&!isNaN(t))return t}var __=`0.221.0`;Z(),Lh(),$d();var v_=300,y_=typeof PerformanceObserver<`u`,b_=class extends mg{component=`fetch`;version=__;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;constructor(e={}){super(`@opentelemetry/instrumentation-fetch`,__,e)}init(){}_addChildSpan(e,t){let n=this.tracer.startSpan(`CORS Preflight`,{startTime:t[$.FETCH_START]},X.setSpan(q.active(),e));Sg(n,t,this.getConfig().ignoreNetworkEvents,void 0,!0),n.end(t[$.RESPONSE_END])}_addFinalSpanAttributes(e,t){let n=Og(t.url);e.setAttribute(zd,t.status),e.setAttribute(Bd,n.hostname);let r=g_(n);r&&e.setAttribute(Vd,r)}_addHeaders(e,t){if(!kg(t,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};Y.inject(q.active(),e),Object.keys(e).length>0&&this._diag.debug(`headers inject skipped due to CORS policy`);return}if(e instanceof Request)Y.inject(q.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else{let t=new Headers(e.headers);Y.inject(q.active(),t,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))}),e.headers=t}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(e,t={}){if(wh(e,this.getConfig().ignoreUrls)){this._diag.debug(`ignoring span as url matches ignored url`);return}let n={},r=t.method,i=d_(t.method||`GET`),a=i;return n[Ld]=i,i!==r&&(n[Rd]=r),n[Jd]=e,this.tracer.startSpan(a,{kind:ku.CLIENT,attributes:n}
22)}_findResourceAndAddNetworkEvents(e,t,n){let r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType(`resource`)}let i=Tg(t.spanUrl,t.startTime,n,r,this._usedResources,`fetch`);if(i.mainRequest){let t=i.mainRequest;this._markResourceAsUsed(t);let n=i.corsPreFlightRequest;n&&(this._addChildSpan(e,n),this._markResourceAsUsed(n)),Sg(e,t,this.getConfig().ignoreNetworkEvents,void 0,!0)}}_markResourceAsUsed(e){this._usedResources.add(e)}_endSpan(e,t,n){let r=Qp(Date.now()),i=em();this._addFinalSpanAttributes(e,n),n.status>=400&&(e.setStatus({code:ju.ERROR}),e.setAttribute(Nd,String(n.status))),setTimeout(()=>{t.observer?.disconnect(),this._findResourceAndAddNetworkEvents(e,t,i),this._tasksCount--,this._clearResources(),e.end(r)},v_)}_patchConstructor(){return e=>{let t=this;return function(...n){if(!t._isEnabled)return e.apply(this,n);let r=this,i=Og(n[0]instanceof Request?n[0].url:String(n[0])).href,a;a=n[0]instanceof Request?n[1]==null?n[0]:new Request(n[0],n[1]):n[1]||{};let o=t._createSpan(i,a);if(!o)return e.apply(this,n);let s=t._prepareSpanData(i);t.getConfig().measureRequestSize&&i_(...n).then(e=>{e&&o.setAttribute(n_,e)}).catch(e=>{t._diag.warn(`getFetchBodyLength`,e)});function c(e,n){t._applyAttributesAfterFetch(e,a,n),t._endSpan(e,s,{status:n.status||0,statusText:n.message,url:i})}function l(e,n){t._applyAttributesAfterFetch(e,a,n),n.status>=200&&n.status<400?t._endSpan(e,s,n):t._endSpan(e,s,{status:n.status,statusText:n.statusText,url:i})}function u(e,n){try{let t=n.clone().body;if(t){let r=t.getReader(),i=()=>{r.read().then(({done:t})=>{t?l(e,n):i()},t=>{c(e,t)})};i()}else l(e,n)}catch(n){t._diag.error(`Failed to read fetch response body`,n),t._endSpan(e,s,{status:0,url:i})}return n}function d(e,n){try{c(e,n)}catch(r){t._diag.error(`Failed to end span on fetch error`,r),t._endSpan(e,s,{status:n.status||0,url:i})}throw n}return q.with(X.setSpan(q.active(),o),()=>(t._callRequestHook(o,a),t._addHeaders(a,i),t._tasksCount++,e.apply(r,a instanceof Request?[a]:[i,a]).then(u.bind(r,o),d.bind(r,o))))}}}_applyAttributesAfterFetch(e,t,n){let r=this.getConfig().applyCustomAttributesOnSpan;r&&hg(()=>r(e,t,n),e=>{e&&this._diag.error(`applyCustomAttributesOnSpan`,e)},!0)}_callRequestHook(e,t){let n=this.getConfig().requestHook;n&&hg(()=>n(e,t),e=>{e&&this._diag.error(`requestHook`,e)},!0)}_prepareSpanData(e){let t=em(),n=[];if(typeof PerformanceObserver!=`function`)return{entries:n,startTime:t,spanUrl:e};let r=new PerformanceObserver(t=>{t.getEntries().forEach(t=>{t.initiatorType===`fetch`&&t.name===e&&n.push(t)})});return r.observe({entryTypes:[`resource`]}),{entries:n,observer:r,startTime:t,spanUrl:e}}enable(){if(!y_){this._diag.warn(`this instrumentation is intended for web usage only, it does not instrument server-side fetch()`);return}if(!this._isEnabled){if(this._isFetchPatched){this._diag.debug(`fetch constructor already patched`),this._isEnabled=!0;return}try{this._wrap(globalThis,`fetch`,this._patchConstructor()),this._isFetchPatched=!0,this._isEnabled=!0}catch(e){this._diag.warn(`Failed to patch globalThis.fetch; instrumentation will not be enabled. Another script may have locked globalThis.fetch via Object.defineProperty.`,e)}}}disable(){y_&&this._isEnabled&&(this._isEnabled=!1,this._usedResources=new WeakSet)}},x_=[`fetchInstrumentationOptions`,`xhrInstrumentationOptions`];function S_(e={}){let{fetchInstrumentationOptions:t,xhrInstrumentationOptions:n}=e,r=Yg(e,x_),i=C_(t,r),a=T_(n,r);return[new b_(i),new qg(a)]}function C_(e,t){return t_(t_(t_({},t),{},{ignoreNetworkEvents:!0},e),{},{applyCustomAttributesOnSpan:Jh(e?.applyCustomAttributesOnSpan),requestHook:w_(e?.requestHook)})}function w_(e){return(t,n)=>{let r=V.api.getActiveUserAction();r&&r?.getState()===zn.Started&&(t.setAttribute(`faro.action.user.name`,r.name),t.setAttribute(`faro.action.user.parentId`,r.parentId)),e?.(t,n)}}function T_(e,t){return t_(t_(t_({},t),{},{ignoreNetworkEvents:!0},e),{},{applyCustomAttributesOnSpan:Yh(e?.applyCustomAttributesOnSpan)})}var E_;function D_(){if(E_===void 0)try{let e=globalThis.process.argv0;E_=e?`unknown_service:${e}`:`unknown_service`}catch{E_=`unknown_service`}return E_}var O_=e=>typeof e==`object`&&!!e&&typeof e.then==`function`;Z(),$d();var k_=class e{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(t,n){let r=new e({},n);return r._rawAttributes=M_(t),r._asyncAttributesPending=t.filter(([e,t])=>O_(t)).length>0,r}constructor(e,t){let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>(O_(t)&&(this._asyncAttributesPending=!0),[e,t])),this._rawAttributes=M_(this._rawAttributes),this._schemaUrl=N_(t?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[t,n]=this._rawAttributes[e];this._rawAttributes[e]=[t,O_(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&J.error(`Accessing resource attributes before async attributes settled`),this._memoizedAttributes)return this._memoizedAttributes;let e={};
22for(let[t,n]of this._rawAttributes){if(O_(n)){J.debug(`Unsettled resource attribute ${t} skipped`);continue}n!=null&&(e[t]??=n)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(t){if(t==null)return this;let n=P_(this,t),r=n?{schemaUrl:n}:void 0;return e.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()],r)}};function A_(e,t){return k_.FromAttributeList(Object.entries(e),t)}function j_(){return A_({[Hd]:D_(),[Wd]:tf[Wd],[Kd]:tf[Kd],[qd]:tf[qd]})}function M_(e){return e.map(([e,t])=>O_(t)?[e,t.catch(t=>{J.debug(`promise rejection for resource attribute: %s - %s`,e,t)})]:[e,t])}function N_(e){if(typeof e==`string`||e===void 0)return e;J.warn(`Schema URL must be string or undefined, got %s. Schema URL will be ignored.`,e)}function P_(e,t){let n=e?.schemaUrl,r=t?.schemaUrl,i=n===void 0||n===``,a=r===void 0||r===``;if(i)return r;if(a||n===r)return n;J.warn(`Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.`,n,r)}var F_=`exception`,I_=Symbol.for(`nodejs.util.inspect.custom`);function L_(e){let t={};for(let[n,r]of e.getRawAttributes())typeof r?.then!=`function`&&r!=null&&(t[n]??=r);return t}function R_(e,t,n,r,i){if(typeof n==`number`&&n<0){let t=`[${e}]`;return r?.stylize?r.stylize(t,`special`):t}return typeof i!=`function`||!r?t:`${e} ${i(t,{...r,depth:r.depth==null?r.depth:r.depth-1})}`}Z(),$d();var z_=class{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:ju.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let t=Date.now();if(this._spanContext=e.spanContext,this._performanceStartTime=nf.now(),this._performanceOffset=t-(this._performanceStartTime+nf.timeOrigin),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,e.links)for(let t of e.links)this.addLink(t);this.startTime=this._getTime(e.startTime??t),this.resource=e.resource,this.instrumentationScope=e.scope,this._recordEndMetrics=e.recordEndMetrics,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,t){if(t==null||this._isSpanEnded())return this;if(e.length===0)return J.warn(`Invalid attribute key: ${e}`),this;if(!vd(t))return J.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:n}=this._spanLimits,r=!Object.prototype.hasOwnProperty.call(this.attributes,e);return n!==void 0&&this._attributesCount>=n&&r?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),r&&this._attributesCount++,this)}setAttributes(e){for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.setAttribute(t,e[t]);return this}addEvent(e,t,n){if(this._isSpanEnded())return this;let{eventCountLimit:r}=this._spanLimits;if(r===0)return J.warn(`No events allowed.`),this._droppedEventsCount++,this;r!==void 0&&this.events.length>=r&&(this._droppedEventsCount===0&&J.debug(`Dropping extra events.`),this.events.shift(),this._droppedEventsCount++),df(t)&&(df(n)||(n=t),t=void 0);let i=gd(t),{attributePerEventCountLimit:a}=this._spanLimits,o={},s=0,c=0;for(let e in i){if(!Object.prototype.hasOwnProperty.call(i,e))continue;let t=i[e];if(a!==void 0&&c>=a){s++;continue}o[e]=this._truncateToSize(t),c++}return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:s}),this}addLink(e){if(this._isSpanEnded())return this;let{linkCountLimit:t}=this._spanLimits;if(t===0)return this._droppedLinksCount++,this;t!==void 0&&this.links.length>=t&&(this._droppedLinksCount===0&&J.debug(`Dropping extra links.`),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:n}=this._spanLimits,r=gd(e.attributes),i={},a=0,o=0;for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let t=r[e];if(n!==void 0&&o>=n){a++;continue}i[e]=this._truncateToSize(t),o++}let s={context:e.context};return o>0&&(s.attributes=i),a>0&&(s.droppedAttributesCount=a),this.links.push(s),this}addLinks(e){for(let t of e)this.addLink(t);return this}setStatus(e){if(this._isSpanEnded()||e.code===ju.UNSET||this.status.code===ju.OK)return this;let t={code:e.code};return e.code===ju.ERROR&&(typeof e.message==`string`?t.message=e.message:e.message!=null&&J.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`)),this.status=t,this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e){if(this._isSpanEnded()){J.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this.endTime=this._getTime(e),this._duration=lf(this.startTime,this.endTime),this._duration[0]<0&&(J.warn(`Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.`,this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&J.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._droppedLinksCount>0&&J.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`),this._spanProcessor.onEnding&&this._spanProcessor.onEnding(this),this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e==`number`&&e<=nf.now())return cf(e+this._performanceOffset);if(typeof e==`number`)return sf(e);
22if(e instanceof Date)return sf(e.getTime());if(uf(e))return e;if(this._startTimeProvided)return sf(Date.now());let t=nf.now()-this._performanceStartTime;return ff(this.startTime,sf(t))}isRecording(){return this._ended===!1}recordException(e,t){let n={};typeof e==`string`?n[Pd]=e:e&&(e.code?n[Id]=e.code.toString():e.name&&(n[Id]=e.name),e.message&&(n[Pd]=e.message),e.stack&&(n[Fd]=e.stack)),n[`exception.type`]||n[`exception.message`]?this.addEvent(F_,n,t):J.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let e=Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);J.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(J.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e==`string`?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(e=>typeof e==`string`?this._truncateToLimitUtil(e,t):e):e}[I_](e,t,n){return R_(`SpanImpl`,{name:this.name,kind:this.kind,spanContext:this._spanContext,parentSpanContext:this.parentSpanContext,status:this.status,startTime:this.startTime,endTime:this.endTime,duration:this._duration,ended:this._ended,attributes:this.attributes,events:this.events,links:this.links,droppedAttributesCount:this._droppedAttributesCount,droppedEventsCount:this._droppedEventsCount,droppedLinksCount:this._droppedLinksCount,instrumentationScope:this.instrumentationScope,resource:{attributes:L_(this.resource)}},e,t,n)}},B_;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(B_||={});var V_=`otel.component.name`,H_=`otel.component.type`,U_=`otel.span.parent.origin`,W_=`otel.span.sampling_result`,G_=`otel.sdk.processor.span.processed`,K_=`otel.sdk.processor.span.queue.capacity`,q_=`otel.sdk.processor.span.queue.size`,J_=`otel.sdk.span.live`,Y_=`otel.sdk.span.started`,X_=`batching_span_processor`,Z_=class{startedSpans;liveSpans;constructor(e){this.startedSpans=e.createCounter(Y_,{unit:`{span}`,description:`The number of created spans.`}),this.liveSpans=e.createUpDownCounter(J_,{unit:`{span}`,description:`The number of currently live spans.`})}startSpan(e,t){let n=$_(t);if(this.startedSpans.add(1,{[U_]:Q_(e),[W_]:n}),t===B_.NOT_RECORD)return()=>{};let r={[W_]:n};return this.liveSpans.add(1,r),()=>{this.liveSpans.add(-1,r)}}};function Q_(e){return e?e.isRemote?`remote`:`local`:`none`}function $_(e){switch(e){case B_.RECORD_AND_SAMPLED:return`RECORD_AND_SAMPLE`;case B_.RECORD:return`RECORD_ONLY`;case B_.NOT_RECORD:return`DROP`}}var ev=`2.11.0`;Z();var tv=class{_sampler;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(e,t){this.instrumentationScope=e,this._sampler=t.sampler,this._spanLimits=t.spanLimits,this._resource=t.resource,this._idGenerator=t.idGenerator,this._spanProcessor=t.spanProcessor;let n=t.meterProvider.getMeter(`@opentelemetry/sdk-trace`,ev);this._tracerMetrics=new Z_(n)}startSpan(e,t={},n=q.active()){t.root&&(n=X.deleteSpan(n));let r=X.getSpan(n);if(cd(n))return J.debug(`Instrumentation suppressed, returning Noop Span`),X.wrapSpanContext(Xl);let i=r?.spanContext(),a=this._idGenerator.generateSpanId(),o,s,c;!i||!X.isSpanContextValid(i)?s=this._idGenerator.generateTraceId():(s=i.traceId,c=i.traceState,o=i);let l=t.kind??ku.INTERNAL,u=(t.links??[]).map(e=>({context:e.context,attributes:gd(e.attributes)})),d=gd(t.attributes),f=this._sampler.shouldSample(n,s,e,l,d,u),p=this._tracerMetrics.startSpan(i,f.decision);c=f.traceState??c;let m=f.decision===Du.RECORD_AND_SAMPLED?Kl.SAMPLED:Kl.NONE,h={traceId:s,spanId:a,traceFlags:m,traceState:c};if(f.decision===Du.NOT_RECORD)return J.debug(`Recording is off, prop
22agating context in a non-recording span`),X.wrapSpanContext(h);let g=gd(Object.assign(d,f.attributes));return new z_({resource:this._resource,scope:this.instrumentationScope,context:n,spanContext:h,name:e,kind:l,links:u,parentSpanContext:o,attributes:g,startTime:t.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:p})}startActiveSpan(e,t,n,r){let i,a,o;if(arguments.length<2)return;arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);let s=a??q.active(),c=this.startSpan(e,i,s),l=X.setSpan(s,c);return q.with(l,o,void 0,c)}[I_](e,t,n){return R_(`Tracer`,{instrumentationScope:this.instrumentationScope,resource:{attributes:L_(this._resource)},spanLimits:this._spanLimits},e,t,n)}},nv=class{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(e=>{Td(e||Error(`MultiSpanProcessor: forceFlush failed`)),t()})})}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnding(e){for(let t of this._spanProcessors)t.onEnding&&t.onEnding(e)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,n)=>{Promise.all(e).then(()=>{t()},n)})}},rv=class{shouldSample(){return{decision:B_.NOT_RECORD}}toString(){return`AlwaysOffSampler`}},iv=class{shouldSample(){return{decision:B_.RECORD_AND_SAMPLED}}toString(){return`AlwaysOnSampler`}};Z();var av=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||=(Td(Error(`ParentBasedSampler must have a root sampler configured`)),new iv),this._remoteParentSampled=e.remoteParentSampled??new iv,this._remoteParentNotSampled=e.remoteParentNotSampled??new rv,this._localParentSampled=e.localParentSampled??new iv,this._localParentNotSampled=e.localParentNotSampled??new rv}shouldSample(e,t,n,r,i,a){let o=X.getSpanContext(e);return!o||!du(o)?this._root.shouldSample(e,t,n,r,i,a):o.isRemote?o.traceFlags&Kl.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,i,a):this._remoteParentNotSampled.shouldSample(e,t,n,r,i,a):o.traceFlags&Kl.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,i,a):this._localParentNotSampled.shouldSample(e,t,n,r,i,a)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};$d();var ov=new Map,sv=class{processedSpans;queueSize;queueSizeCallback;standardAttrs;droppedAttrs;constructor(e,t,n){let r=ov.get(e)??0;if(ov.set(e,r+1),this.standardAttrs={[H_]:e,[V_]:`${e}/${r}`},this.droppedAttrs={...this.standardAttrs,[Nd]:`queue_full`},this.processedSpans=t.createCounter(G_,{unit:`{span}`,description:`The number of spans for which the processing has finished, either successful or failed.`}),n){let{capacity:e,getQueueSize:r}=n;t.createUpDownCounter(K_,{unit:`{span}`,description:`The maximum number of spans the queue of a given instance of an SDK span processor can hold.`}).add(e,this.standardAttrs),this.queueSize=t.createObservableUpDownCounter(q_,{unit:`{span}`,description:`The number of spans in the queue of a given instance of an SDK span processor.`}),this.queueSizeCallback=e=>e.observe(r(),this.standardAttrs),this.queueSize.addCallback(this.queueSizeCallback)}}dropSpans(e){this.processedSpans.add(e,this.droppedAttrs)}finishSpans(e,t){if(!t){this.processedSpans.add(e,this.standardAttrs);return}let n={...this.standardAttrs,[Nd]:t.name};this.processedSpans.add(e,n)}shutdown(){this.queueSize&&this.queueSizeCallback&&this.queueSize.removeCallback(this.queueSizeCallback)}};Z();var cv=class{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_metrics;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e){this._exporter=e.exporter,this._maxExportBatchSize=e.maxExportBatchSize??512,this._maxQueueSize=e.maxQueueSize??2048,this._scheduledDelayMillis=e.scheduledDelayMillis??5e3,this._exportTimeoutMillis=e.exportTimeoutMillis??3e4,this._shutdownOnce=new ip(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(J.warn(`BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize`),this._maxExportBatchSize=this._maxQueueSize);let t=e.selfObsMeterProvider?e.selfObsMeterProvider.getMeter(`@opentelemetry/sdk-trace`):_l
22();this._metrics=new sv(X_,t,{capacity:this._maxQueueSize,getQueueSize:()=>this._finishedSpans.length})}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&Kl.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>(this._metrics.shutdown(),this._exporter.shutdown()))}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&J.debug(`maxQueueSize reached, dropping spans`),this._droppedSpansCount++,this._metrics.dropSpans(1);return}this._droppedSpansCount>0&&(J.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let n=[],r=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let e=0,t=r;e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let n=setTimeout(()=>{t(Error(`Timeout`))},this._exportTimeoutMillis);q.with(sd(q.active()),()=>{let r;this._finishedSpans.length<=this._maxExportBatchSize?(r=this._finishedSpans,this._finishedSpans=[]):r=this._finishedSpans.splice(0,this._maxExportBatchSize);let i=()=>this._exporter.export(r,i=>{clearTimeout(n),this._metrics.finishSpans(r.length,i.error),i.code===pf.SUCCESS?e():t(i.error??Error(`BatchSpanProcessor: span export failed`))}),a=null;for(let e=0,t=r.length;e<t;e++){let t=r[e];t.resource.asyncAttributesPending&&t.resource.waitForAsyncAttributes&&(a??=[],a.push(t.resource.waitForAsyncAttributes()))}a===null?i():Promise.all(a).then(i,e=>{Td(e),t(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{this._isExporting=!1,Td(e)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),typeof this._timer!=`number`&&this._timer.unref())}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}},lv=class extends cv{_visibilityChangeListener;_pageHideListener;constructor(e){super(e),this.onInit(e)}onInit(e){e.disableAutoFlushOnDocumentHide!==!0&&typeof document<`u`&&(this._visibilityChangeListener=()=>{document.visibilityState===`hidden`&&this.forceFlush().catch(e=>{Td(e)})},this._pageHideListener=()=>{this.forceFlush().catch(e=>{Td(e)})},document.addEventListener(`visibilitychange`,this._visibilityChangeListener),document.addEventListener(`pagehide`,this._pageHideListener))}onShutdown(){typeof document<`u`&&(this._visibilityChangeListener&&document.removeEventListener(`visibilitychange`,this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener(`pagehide`,this._pageHideListener))}},uv=16,dv=8,fv=new Uint8Array(uv),pv=new Uint8Array(dv),mv=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function hv(e){for(let t=0;t<e.length;t++)e[t]=Math.random()*256>>>0;for(let t=0;t<e.length;t++)if(e[t]>0)return;e[e.length-1]=1}function gv(e){let t=``;for(let n=0;n<e.length;n++)t+=mv[e[n]];return t}var _v=class{generateTraceId(){return hv(fv),gv(fv)}generateSpanId(){return hv(pv),gv(pv)}};Z();var vv;(function(e){e[e.resolved=0]=`resolved`,e[e.timeout=1]=`timeout`,e[e.error=2]=`error`,e[e.unresolved=3]=`unresolved`})(vv||={});var yv=class{_resource;_activeSpanProcessor;_forceFlushTimeoutMillis;_tracerOptions;_tracers=new Map;constructor(e={}){this._forceFlushTimeoutMillis=e.forceFlushTimeoutMillis??3e4,this._resource=e.resource??j_();let t=e.spanProcessors??[];this._activeSpanProcessor=new nv(t),this._tracerOptions={resource:this._resource,sampler:e.sampler??new av({root:new iv}),spanLimits:{attributeCountLimit:e.spanLimits?.attributeCountLimit??128,attributeValueLengthLimit:e.spanLimits?.attributeValueLengthLimit??1/0,eventCountLimit:e.spanLimits?.eventCountLimit??128,linkCountLimit:e.spanLimits?.linkCountLimit??128,attributePerEventCountLimit:e.spanLimits?.attributePerEventCountLimit??128,attributePerLinkCountLimit:e.spanLimits?.attributePerLinkCountLimit??128},idGenerator:e.idGenerator||new _v,spanProcessor:this._activeSpanProcessor,meterProvider:e.meterProvider??{getMeter(){return _l()}}}}getTracer(e,t,n){let r=`${e}@${t||``}:${n?.schemaUrl||``}`;return this._tracers.has(r)||this._tracers.set(r,new tv({name:e,version:t,schemaUrl:n?.schemaUrl},this._tracerOptions)),this._tracers.get(r)}forceFlush(e){let t=e?.timeoutMillis??this._forceFlushTimeoutMillis,n=this._activeSpanProcessor._spanProcessors.map(e=>new Promise(n=>{let r,i=setTimeout(()=>
22{n(Error(`Span processor did not completed within timeout period of ${t} ms`)),r=vv.timeout},t);e.forceFlush().then(()=>{clearTimeout(i),r!==vv.timeout&&(r=vv.resolved,n(r))}).catch(e=>{clearTimeout(i),r=vv.error,n(e)})}));return new Promise((e,t)=>{Promise.all(n).then(n=>{let r=n.filter(e=>e!==vv.resolved);r.length>0?t(r):e()}).catch(e=>t([e]))})}shutdown(){return this._activeSpanProcessor.shutdown()}[I_](e,t,n){let r=this._activeSpanProcessor._spanProcessors;return R_(`TracerProvider`,{resource:{attributes:L_(this._resource)},tracers:Array.from(this._tracers.keys()),spanProcessors:r.map(e=>e.constructor?.name??`SpanProcessor`)},e,t,n)}};Z();var bv=class{_ratio;_upperBound;constructor(e=0){this._ratio=this._normalize(e),this._upperBound=this._ratio===1?4294967296:Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:lu(t)&&this._accumulate(t)<this._upperBound?B_.RECORD_AND_SAMPLED:B_.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!=`number`||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<32;n+=8){let r=0;for(let t=0;t<8;t++){let i=e.charCodeAt(n+t),a=i<58?i-48:i<71?i-55:i-87;r=r<<4|a}t=(t^r)>>>0}return t}};Z();var xv;(function(e){e.AlwaysOff=`always_off`,e.AlwaysOn=`always_on`,e.ParentBasedAlwaysOff=`parentbased_always_off`,e.ParentBasedAlwaysOn=`parentbased_always_on`,e.ParentBasedTraceIdRatio=`parentbased_traceidratio`,e.TraceIdRatio=`traceidratio`})(xv||={});var Sv=1;function Cv(){return{sampler:wv(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function wv(){let e=xv.ParentBasedAlwaysOn;switch(e){case xv.AlwaysOn:return new iv;case xv.AlwaysOff:return new rv;case xv.ParentBasedAlwaysOn:return new av({root:new iv});case xv.ParentBasedAlwaysOff:return new av({root:new rv});case xv.TraceIdRatio:return new bv(Tv());case xv.ParentBasedTraceIdRatio:return new av({root:new bv(Tv())});default:return J.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${xv.ParentBasedAlwaysOn}".`),new av({root:new iv})}}function Tv(){return J.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Sv}.`),Sv}function Ev(e){let t=Object.assign({},e.spanLimits);return t.attributeCountLimit=e.spanLimits?.attributeCountLimit??e.generalLimits?.attributeCountLimit??void 0??void 0??128,t.attributeValueLengthLimit=e.spanLimits?.attributeValueLengthLimit??e.generalLimits?.attributeValueLengthLimit??void 0??void 0??1/0,Object.assign({},e,{spanLimits:t})}var Dv=class extends yv{constructor(e={}){let t=Jf({},Cv(),Ev(e));delete t.generalLimits,super(t)}},Ov=class extends lv{constructor(e,t){t||={};for(let[e,n]of[[`maxExportBatchSize`,`OTEL_BSP_MAX_EXPORT_BATCH_SIZE`],[`maxQueueSize`,`OTEL_BSP_MAX_QUEUE_SIZE`],[`scheduledDelayMillis`,`OTEL_BSP_SCHEDULE_DELAY`],[`exportTimeoutMillis`,`OTEL_BSP_EXPORT_TIMEOUT`]])t[e];super({exporter:e,...t})}};Z();var kv=class{_enabled=!1;_currentContext=hl;_bindFunction(e=hl,t){let n=this,r=function(...r){return n.with(e,()=>t.apply(this,r))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r}active(){return this._currentContext}bind(e,t){return e===void 0&&(e=this.active()),typeof t==`function`?this._bindFunction(e,t):t}disable(){return this._currentContext=hl,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=hl,this)}with(e,t,n,...r){let i=this._currentContext;this._currentContext=e||hl;try{return t.call(n,...r)}finally{this._currentContext=i}}};Z();function Av(e){if(e!==null){if(e===void 0){let e=new kv;e.enable(),q.setGlobalContextManager(e);return}e.enable(),q.setGlobalContextManager(e)}}function jv(e){if(e!==null){if(e===void 0){Y.setGlobalPropagator(new mf({propagators:[new jf,new hd]}));return}Y.setGlobalPropagator(e)}}var Mv=class extends Dv{constructor(e={}){super(e)}register(e={}){X.setGlobalTracerProvider(this),jv(e.propagator),Av(e.contextManager)}};function Nv(e={}){return e.attributes?.isSampled===`true`}function Pv(e={}){return Nv(e)?B_.RECORD_AND_SAMPLED:B_.NOT_RECORD}Z(),$d();var Fv=class e extends Yn{constructor(e={}){super(),this.options=e,this.name=`@grafana/faro-web-tracing`,this.version=B}initialize(){let t=this.options,n={};this.config.app.name&&(n[Hd]=this.config.app.name),this.config.app.namespace&&(n[Cc]=this.config.app.namespace),this.config.app.version&&(n[Ud]=this.config.app.version),this.config.app.environment&&(n[Sc]=this.config.app.environment,n[Ad]=this.config.app.environment);let r=this.metas.value.browser;$t(r?.brands)&&(n[Oc]=r.brands.map(e=>e.brand)),r?.language&&(n[kc]=r.language),typeof r?.mobile==`boolean`&&(n[Ac]=!!r.mobile),r?.os&&(n[jc]=r.os),r?.userAgent&&(n[Yd]=r.userAgent),n[wc]=`browser`,n[Tc]=this.metas.value.browser?.userAgent,n[Ec]=`faro-web-sdk`,n[Dc]=B,Object.assign(n,t.resourceAttributes);let i=new Mv({resource:j_().merge(A_(n)),sampler:{shouldSample:()=>({decision:Pv(this.api.getSession())})},spanProcessors:[t.spanProcessor??new Mc(new Ov(new Wh({api:this.api}),{scheduledDelayMillis:e.SCHEDULED_BATCH_DELAY_MS,maxExportBatchSize:30}),this.metas)]}),a=t.omitTraceContextForUnsampledSessions===!0;i.register({propagator:new Nc(t.propagator??new jf,()=>this.transports.isPaused()||a&&!Nv(this.api.getSession())),contextManager:t.contextManager});let{propagateTraceHeaderCorsUrls:o,fetchInstrumentationOptions:s,xhrInstrumentationOptions:c}=this.options.instrumentationOptions??{};
22sg({instrumentations:t.instrumentations??S_({ignoreUrls:this.getIgnoreUrls(),propagateTraceHeaderCorsUrls:o,fetchInstrumentationOptions:s,xhrInstrumentationOptions:c})}),this.api.initOTEL(X,q)}getIgnoreUrls(){return this.transports.transports.flatMap(e=>e.getIgnoreUrls())}};Fv.SCHEDULED_BATCH_DELAY_MS=1e3;var Iv=Symbol(`faro`),Lv={install(e,t){if(!t?.isEnabled||!t.isEnabled(t.app.environment))return;let n=bc({url:t.grafanaFaroCollectorUrl,app:{name:t.app.name,version:t.app.version,environment:t.app.environment},consoleInstrumentation:{disabledLevels:[hn.TRACE,hn.DEBUG,hn.INFO,hn.LOG]},instrumentations:[...bs(),new Fv],sessionTracking:{samplingRate:t.samplingRate??.05}});e.provide(Iv,n)}},Rv=typeof document<`u`,zv=/#/g,Bv=/&/g,Vv=/\//g,Hv=/=/g,Uv=/\?/g,Wv=/\+/g,Gv=/%5B/g,Kv=/%5D/g,qv=/%5E/g,Jv=/%60/g,Yv=/%7B/g,Xv=/%7C/g,Zv=/%7D/g,Qv=/%20/g;function $v(e){return e==null?``:encodeURI(``+e).replace(Xv,`|`).replace(Gv,`[`).replace(Kv,`]`)}function ey(e){return $v(e).replace(Yv,`{`).replace(Zv,`}`).replace(qv,`^`)}function ty(e){return $v(e).replace(Wv,`%2B`).replace(Qv,`+`).replace(zv,`%23`).replace(Bv,`%26`).replace(Jv,"`").replace(Yv,`{`).replace(Zv,`}`).replace(qv,`^`)}function ny(e){return ty(e).replace(Hv,`%3D`)}function ry(e){return $v(e).replace(zv,`%23`).replace(Uv,`%3F`)}function iy(e){return ry(e).replace(Vv,`%2F`)}function ay(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var oy=/\/$/,sy=e=>e.replace(oy,``);function cy(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=gy(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:ay(o)}}function ly(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function uy(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function dy(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&fy(t.matched[r],n.matched[i])&&py(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function fy(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function py(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!my(e[n],t[n]))return!1;return!0}function my(e,t){return N(e)?hy(e,t):N(t)?hy(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function hy(e,t){return N(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function gy(e,t){if(Me(e))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`){if(s===`..`)a>1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var _y={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function vy(e){if(!e){if(Rv){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),sy(e)}var yy=/^[^#]+#/;function by(e,t){return e.replace(yy,`#`)+t}function xy(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Sy=()=>history.scrollRestoration===`manual`?{left:window.scrollX,top:window.scrollY}:null;function Cy(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=xy(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function wy(e,t){return(history.state?history.state.position-t:-1)+e}var Ty=new Map;function Ey(e){Ty.set(e,Sy())}function Dy(e){let t=Ty.get(e);return Ty.delete(e),t}function Oy(e){return typeof e==`string`||e&&typeof e==`object`}function ky(e){return typeof e==`string`||typeof e==`symbol`}function Ay(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(Wv,` `),i=r.indexOf(`=`),a=ay(i<0?r:r.slice(0,i)),o=i<0?null:ay(r.slice(i+1));if(a in t){let e=t[a];N(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function jy(e){let t=``;for(let n in e){let r=e[n];if(n=ny(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(N(r)?r.map(e=>
vendor: 4,304 bytes, line 22
22e&&ty(e)):[r&&ty(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function My(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=N(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Ny(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Py(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Ae(4,{from:n,to:t})):e instanceof Error?c(e):Oy(e)?c(Ae(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Fy(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(t===`beforeRouteEnter`||o.instances[e]){if(we(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Py(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Oe(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Py(c,n,r,o,e,i)()}))}}}return a}function Iy(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>fy(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>fy(e,s))||i.push(s))}return[n,r,i]}var Ly=()=>location.protocol+`//`+location.host;function Ry(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),uy(n,``)}return uy(n,e)+r+i}function zy(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Ry(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){let{history:e}=window;e.state&&e.replaceState(M({},e.state,{scroll:Sy()}),``)}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),{pauseListeners:c,listen:l,destroy:d}}function By(e,t,n,r=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:null}}function Vy(e){let{history:t,location:n}=window,r={value:Ry(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:Ly()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,M({},t.state,By(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=M({},i.value,t.state,{forward:e,scroll:Sy()});a(o.current,o,!0),a(e,M({},By(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Hy(e){e=vy(e);let t=Vy(e),n=zy(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=M({location:``,base:e,go:r,createHref:by.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var Uy={type:0,value:``},Wy=/[a-zA-Z0-9_]/;function Gy(e){if(!e)return[[]];if(e===`/`)return[[Uy]];if(!Me(e))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case 0:c===`\\`?(r=n,n=4):c===`/`?(l&&d(),o()):c===`:`?(
vendor: 4,379 bytes, line 22
22d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:Wy.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`)}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var Ky=`[^/]+?`,qy={sensitive:!1,strict:!1,start:!0,end:!0},Jy=/[.+*?^${}()[\]/\\]/g;function Yy(e,t){let n=M({},qy,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(Jy,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||Ky;if(u!==Ky){s+=10;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===0)n+=e.value;else if(e.type===1){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(N(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=N(c)?c.join(`/`):c;if(!l){if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`)}n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Xy(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Zy(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Xy(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Qy(r))return 1;if(Qy(i))return-1}return i.length-r.length}function Qy(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var $y={strict:!1,end:!0,sensitive:!1};function eb(e,t,n){let r=Yy(Gy(e.path),n),i=M(r,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function tb(e,t){let n=[],r=new Map;t=je($y,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=rb(e);s.aliasOf=r&&r.record;let l=je(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(rb(M({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&!Me(u)){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=eb(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!ab(d)&&o(e.name)),lb(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:ke}function o(e){if(ky(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=sb(e,n);n.splice(t,0,e),e.record.name&&!ab(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Ae(1,{location:e});s=i.record.name,a=M(nb(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&nb(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Ae(1,{location:e,currentLocation:t});s=i.record.name,a=M({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:ob(c)}}
vendor: 6,317 bytes, line 22
22e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function nb(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function rb(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ib(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ib(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function ab(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ob(e){return e.reduce((e,t)=>M(e,t.meta),{})}function sb(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;Zy(e,t[i])<0?r=i:n=i+1}let i=cb(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function cb(e){let t=e;for(;t=t.parent;)if(lb(t)&&Zy(e,t)===0)return t}function lb({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ub(e){let t=a(Ee),n=a(De),r=k(()=>{let n=E(e.to);return t.resolve(n)}),i=k(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(fy.bind(null,i));if(o>-1)return o;let s=hb(e[t-2]);return t>1&&hb(i)===s&&a[a.length-1].path!==s?a.findIndex(fy.bind(null,e[t-2])):o}),o=k(()=>i.value>-1&&mb(n.params,r.value.params)),s=k(()=>i.value>-1&&i.value===n.matched.length-1&&py(n.params,r.value.params));function c(n={}){if(pb(n)){let n=t[E(e.replace)?`replace`:`push`](E(e.to)).catch(ke);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:k(()=>r.value.href),isActive:o,isExactActive:s,navigate:c}}function db(e){return e.length===1?e[0]:e}var fb=x({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:ub,setup(e,{slots:t}){let n=ie(ub(e)),{options:r}=a(Ee),i=k(()=>({[gb(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[gb(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&db(t.default(n));return e.custom?r:se(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function pb(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function mb(e,t){for(let n in t){let r=t[n],i=e[n];if(N(r)){if(!N(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}else if(r!==i)return!1}return!0}function hb(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var gb=(e,t,n)=>e??t??n,_b=x({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=a(Se),i=k(()=>e.route||r.value),o=a(Ce,0),s=k(()=>{let e=E(o),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),c=k(()=>i.value.matched[s.value]);h(Ce,k(()=>s.value+1)),h(Te,c),h(Se,i);let l=C();return u(()=>[l.value,c.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!fy(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=c.value,s=o&&o.components[a];if(!s)return vb(n.default,{Component:s,route:r});let u=o.props[a],d=u?u===!0?r.params:typeof u==`function`?u(r):u:null,f=se(s,M({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:l}));return vb(n.default,{Component:f,route:r})||f}}});function vb(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var yb=_b;function bb(e){let t=tb(e.routes,e),n=e.parseQuery||Ay,r=e.stringifyQuery||jy,i=e.history,a=Ny(),s=Ny(),c=Ny(),l=ee(_y),u=ee(0),d=_y;Rv&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let f=P.bind(null,e=>``+e),p=P.bind(null,iy),m=P.bind(null,ay);function h(e,n){let r,i;ky(e)?(r=t.getRecordMatcher(e),i=n):i=e;let a=t.addRoute(i,r);return u.value++,()=>{a(),u.value++}}function g(e){let n=t.getRecordMatcher(e);n&&(t.removeRoute(n),u.value++)}function _(){t.clearRoutes(),u.value++}function v(){return t.getRoutes().map(e=>e.record)}function y(e){return!!t.getRecordMatcher(e)}function b(e,a){if(u.value,typeof e==`string`){a||=e.startsWith(`/`)?_y:l.value;let r=cy(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return M(r,o,{params:m(o.params),redirectedFrom:void 0,href:s})}a=M({},a||(e.path!=null&&e.path.startsWith(`/`)&&!(`name`in e&&e.name)?_y:l.value));let o;if(e.path!=null)o=M({},e,{path:cy(n,e.path,a.path).path});else{let t=M({},e.params);for(let e in t)t[e]??delete t[e];o=M({},e,{params:p(t)}),a.params=p(a.params)}let s=t.resolve(o,a),c=e.hash||``;s.params=f(m(s.params));let d=ly(r,M({},e,{hash:ey(c),path:s.path})),h=i.createHref(d);return M({fullPath:d,hash:c,query:r===jy?My(e.query):e.query||{}},s,{redirectedFrom:void 0,href:h})}function x(e){return typeof e==`string`?cy(n,e,l.value.path):M({},e)}function S(e,t){if(d!==e)return Ae(8,{from:t,to:e})}function C(e){return D(e)}function w(e){return C(M(x(e),{replace:!0}))}function T(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=x(i):{path:i},i.params={}),M({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function D(e,t){let n=d=b(e),i=l.value,a=e.state,o=e.force,s=e.replace===!0,c=T(n,i);if(c)return D(M(x(c),{state:typeof c==`object`?M({},a,c.state):a,force:o,replace:s}),t||n);let u=n;u.redirectedFrom=t;let f;return!o&&dy(r,i,n)&&(f=Ae(16,{to:u,from:i}),fe(i,i,!0,!1)),(f?Promise.resolve(f):O(u,i)).catch(e=>
22Pe(e)?Pe(e,2)?e:de(e):le(e,u,i)).then(e=>{if(e){if(Pe(e,2))return D(M({replace:s},x(e.to),{state:typeof e.to==`object`?M({},a,e.to.state):a,force:o}),t||u)}else e=ae(u,i,!0,s,a);return ie(u,i,e),e})}function te(e,t){let n=S(e,t);return n?Promise.reject(n):Promise.resolve()}function ne(e){let t=he.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function O(e,t){let n,[r,i,o]=Iy(e,t);n=Fy(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Py(r,e,t))});let c=te.bind(null,e,t);return n.push(c),_e(n).then(()=>{n=[];for(let r of a.list())n.push(Py(r,e,t));return n.push(c),_e(n)}).then(()=>{n=Fy(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Py(r,e,t))});return n.push(c),_e(n)}).then(()=>{n=[];for(let r of o)if(r.beforeEnter){if(N(r.beforeEnter))for(let i of r.beforeEnter)n.push(Py(i,e,t));else n.push(Py(r.beforeEnter,e,t))}return n.push(c),_e(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Fy(o,`beforeRouteEnter`,e,t,ne),n.push(c),_e(n))).then(()=>{n=[];for(let r of s.list())n.push(Py(r,e,t));return n.push(c),_e(n)}).catch(e=>Pe(e,8)?e:Promise.reject(e))}function ie(e,t,n){c.list().forEach(r=>ne(()=>r(e,t,n)))}function ae(e,t,n,r,a){let o=S(e,t);if(o)return o;let s=t===_y,c=Rv?history.state:{};n&&(r||s?i.replace(e.fullPath,M({scroll:s&&c&&c.scroll},a)):i.push(e.fullPath,a)),l.value=e,fe(e,t,n,s),de()}let k;function A(){k||=i.listen((e,t,n)=>{if(!ge.listening)return;let r=b(e),a=T(r,ge.currentRoute.value);if(a){D(M(a,{replace:!0,force:!0}),r).catch(ke);return}d=r;let o=l.value;Rv&&n.delta&&Ey(wy(o.fullPath,n.delta)),O(r,o).catch(e=>Pe(e,12)?e:Pe(e,2)?(D(M(x(e.to),{force:!0}),r).then(e=>{Pe(e,20)&&!n.delta&&n.type===`pop`&&i.go(-1,!1)}).catch(ke),Promise.reject()):(n.delta&&i.go(-n.delta,!1),le(e,r,o))).then(e=>{e||=ae(r,o,!1),e&&(n.delta&&!Pe(e,8)?i.go(-n.delta,!1):n.type===`pop`&&Pe(e,20)&&i.go(-1,!1)),ie(r,o,e)}).catch(ke)})}let oe=Ny(),se=Ny(),ce;function le(e,t,n){de(e);let r=se.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function ue(){return ce&&l.value!==_y?Promise.resolve():new Promise((e,t)=>{oe.add([e,t])})}function de(e){return ce||(ce=!e,A(),oe.list().forEach(([t,n])=>e?n(e):t()),oe.reset()),e}function fe(t,n,r,i){let{scrollBehavior:a}=e;if(!Rv||!a)return Promise.resolve();let s=!r&&Dy(wy(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return o().then(()=>a(t,n,s)).then(e=>t===l.value&&e&&Cy(e)).catch(e=>t===l.value&&le(e,t,n))}let pe=e=>i.go(e),me,he=new Set,ge={currentRoute:l,listening:!0,addRoute:h,removeRoute:g,clearRoutes:_,hasRoute:y,getRoutes:v,resolve:b,options:e,push:C,replace:w,go:pe,back:()=>pe(-1),forward:()=>pe(1),beforeEach:a.add,beforeResolve:s.add,afterEach:c.add,onError:se.add,isReady:ue,install(e){e.component(`RouterLink`,fb),e.component(`RouterView`,yb),e.config.globalProperties.$router=ge,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>E(l)}),Rv&&!me&&l.value===_y&&(me=!0,C(i.location).catch(e=>{}));let t={};for(let e in _y)Object.defineProperty(t,e,{get:()=>l.value[e],enumerable:!0});e.provide(Ee,ge),e.provide(De,re(t)),e.provide(Se,l);let n=e.unmount;he.add(e),e.unmount=function(){he.delete(e),he.size<1&&(d=_y,k&&k(),k=null,l.value=_y,me=!1,ce=!1),n()}}};function _e(e){return e.reduce((e,t)=>e.then(()=>ne(t)),Promise.resolve())}return ge}var xb=x({__name:`App`,setup(e){return(e,t)=>(p(),O(E(yb)))}});function Sb(e){let{configs:t}=Ie(),n=t.value.locale,r={},i=[],a=C([]),o=e=>typeof e==`object`?e:{type:`CODE`,value:e},s=()=>{a.value=[]},c=e=>e.prefix?`${e.prefix} `:``,l=e=>{switch(e.type){case`CODE`:return r[e.value]||``;case`TEXT`:return e.value;default:return``}},u=e=>e.type===`CODE`||e.type===`TEXT`,d=e=>c(e)+l(e),f=e=>typeof e==`string`&&e.trim().length===0,p=e=>!(f(String(r[e.value]))||f(e.value)),m=(e,t,n)=>{let r=-1;for(let t=0;t<n.length;t++)if(n[t].value===e.value){r=t;break}return r===t},h=e=>e.map(e=>o(e)).filter(e=>u(e)).filter(e=>p(e)).filter((e,t,n)=>m(e,t,n)),g=e=>{s();let t=h(e);a.value=t.map(e=>({htmlContent:d(e),id:e.id}))},_=e=>{let t=[];e?.forEach&&(e?.forEach((e,i)=>{let a=o(e),s=a.value;if(a.type===`CODE`&&!r[s]){r[s]=` `;let e=n?`?locale=${n}`:``;t[i]=fetch(`/n/disclaimer-text/${s}${e}`).then(async e=>{if(e.status===204)throw Error(`No content`);return await e.json()}).then(e=>{r[s]=e.text}).catch(console.warn)}}),Promise.all(t).then(t=>{g(e)}).catch(()=>{}))},v=async()=>{let e=document.querySelectorAll(`img[src*="/static/assets/dt_"]`),t=[];
22e.forEach(e=>{t.push(e.getAttribute(`src`))});let n=new Set(t);t=Array.from(n);let r=t.map(async e=>await fetch(`/n/api/asset-dts?asset=${String(e)}`).then(async e=>await e.json())),i=[];return await Promise.all(r).then(e=>{let t=e.flat();return Array.prototype.push.apply(i,t),i})},y=()=>{let e=`data-n-disclaimers`,t=document.querySelectorAll(`[${e}]:not([${e}=""])`),n=[];return t.forEach(t=>{let r=t.getAttribute(e).split(`,`);n=n.concat(r)}),n},b=async()=>{let e=y();return await v().then(t=>{Array.prototype.push.apply(i,t),Array.prototype.push.apply(e,t);let n=new Set(e);return e=Array.from(n),e})};return e&&(e=>{let t=Array.isArray(e)?[...e]:[];window.disclaimerData={push:function(){let e=Array.prototype.slice.call(arguments);Array.prototype.push.apply(t,e),_(t)},pop:function(){t.pop(),g(t)},update:function(){let e=Array.prototype.slice.call(arguments);for(let n of e){if(!Object.hasOwn(n,`id`))return;let e=t.find(function(e){return e?.id===n.id});t[t.indexOf(e)]={type:`TEXT`,value:n.value,id:n.id}}_(t.filter(e=>e!==``))},remove:function(e){e=typeof e==`object`?e:{type:`CODE`,value:e};let n=t.find(t=>t?.value===e.value),r=t.indexOf(n);r>-1&&(t.splice(r,1),g(t))},removeAll:function(e){e=typeof e==`object`?e:{type:`CODE`,value:e},t=t.reduce((t,n)=>(n?.value!==e.value&&t.push(n),t),[]),g(t)},clear:function(){t.splice(0,t.length),g(t)},rescanAssets:function(){i.forEach(e=>{window.disclaimerData.remove(e)}),i.splice(0,i.length),v().then(function(e){Array.prototype.push.apply(i,e),Array.prototype.push.apply(t,e),_(t)}).catch(()=>{})}},b().then(e=>{Array.prototype.push.apply(t,e),_(t)}).catch(()=>{})})(window.disclaimerData),{push:async(...e)=>{await It(window,`disclaimerData.push`)&&window.disclaimerData.push(...e)},pop:async()=>{await It(window,`disclaimerData.pop`)&&window.disclaimerData.pop()},update:async(...e)=>{await It(window,`disclaimerData.update`)&&window.disclaimerData.update(...e)},remove:async e=>{await It(window,`disclaimerData.remove`)&&window.disclaimerData.remove(e)},removeAll:async e=>{await It(window,`disclaimerData.removeAll`)&&window.disclaimerData.removeAll(e)},clear:async()=>{await It(window,`disclaimerData.clear`)&&window.disclaimerData.clear()},rescanAssets:async()=>{await It(window,`disclaimerData.rescanAssets`)&&window.disclaimerData.rescanAssets()},disclaimerEntries:a}}var Cb={key:0,class:`legal-texts`},wb=[`id`],Tb=F(x({__name:`TheLegalTexts`,props:{headingLevel:{type:Number,default:5},useOwnImplementation:{type:Boolean,default:!1}},setup(e){let{t}=j(),n=rt(),{push:r,disclaimerEntries:a}=Sb(e.useOwnImplementation),o=async()=>{for(let e of n.discountDisclaimers)await r({id:`cart-${e.symbol}`,type:`TEXT`,value:`${e.symbol===`*`?`*`:`<sup>${e.symbol}</sup>`} ${e.content}`})};return u(()=>n.discountDisclaimers,async()=>await o()),i(async()=>{await r(`Basic`),await o()}),(n,r)=>{let i=_(`secure-html`);return E(a).length>0?(p(),w(`footer`,Cb,[(p(),O(ce(`h`+e.headingLevel),{class:`legal-texts__headline`},{default:y(()=>[D(f(E(t)(`footer.legalTexts.headline.label`)),1)]),_:1})),(p(!0),w(ae,null,c(E(a),e=>b((p(),w(`p`,{key:e.htmlContent.substring(0,10),class:`legal-texts__disclaimer`,id:e.id},null,8,wb)),[[i,e.htmlContent]])),128))])):A(``,!0)}}}),[[`__scopeId`,`data-v-0cdb6e88`]]),Eb=e=>{let{t}=j(),n=k(()=>t(e===`CART`?`global.title.cart`:`global.title.checkout`));m(()=>{document.title=String(n.value)})},Db={class:`cart-layout`},Ob=F(x({__name:`cart-layout`,setup(e){return Eb(`CART`),(e,t)=>{let n=d(`router-view`);return p(),w(`main`,Db,[T(n),T(Tb,{"use-own-implementation":!1,headingLevel:2})])}}}),[[`__scopeId`,`data-v-d45a0025`]]),kb={class:`checkout-footer-reduced`,"data-ee":`checkout-footer`},Ab={key:0,class:`dont-paint`},jb={class:`checkout-footer-reduced__section`},Mb={class:`checkout-footer-reduced__list`},Nb={class:`checkout-footer-reduced__list-item`},Pb=[`href`],Fb={class:`checkout-footer-reduced__list-item`},Ib=[`href`],Lb={class:`checkout-footer-reduced__list-item`},Rb=[`href`],zb={class:`checkout-footer-reduced__list-item`},Bb=[`href`],Vb={key:0,class:`checkout-footer-reduced__list-item`},Hb=[`href`],Ub=F(x({__name:`TheFooter`,setup(e){let{t,te:n}=j(),{configs:r}=Ie(),i=k(()=>r.value.locale===`de-DE`);return(e,r)=>(p(),w(`footer`,kb,[E(n)(`footer.title`)?(p(),w(`h2`,Ab,f(E(t)(`footer.title`)),1)):A(``,!0),S(`div`,jb,[S(`ul`,Mb,[S(`li`,Nb,[S(`a`,{class:`checkout-footer-reduced__list-item-link`,href:E(t)(`footer.url.imprint`),target:`_blank`,rel:`noopener`},f(E(t)(`footer.navigation.imprint`)),9,Pb)]),S(`li`,Fb,[S(`a`,{class:`checkout-footer-reduced__list-item-link`,href:E(t)(`footer.url.privacyPolicy`),target:`_blank`,rel:`noopener`},f(E(t)(`footer.navigation.privacyPolicy`)),9,Ib)]),S(`li`,Lb,[S(`a`,{class:`checkout-footer-reduced__list-item-link`,href:E(t)(`footer.url.rightToRecall`),target:`_blank`,rel:`noopener`}
22,f(E(t)(`footer.navigation.rightToRecall`)),9,Rb)]),S(`li`,zb,[S(`a`,{class:`checkout-footer-reduced__list-item-link`,href:E(t)(`footer.url.termsAndConditions`),target:`_blank`,rel:`noopener`},f(E(t)(`footer.navigation.termsAndConditions`)),9,Bb)]),i.value?(p(),w(`li`,Vb,[S(`a`,{class:`checkout-footer-reduced__list-item-link`,href:E(t)(`footer.url.deviceTakeback`),target:`_blank`,rel:`noopener`},f(E(t)(`footer.navigation.deviceTakeback`)),9,Hb)])):A(``,!0)])])]))}}),[[`__scopeId`,`data-v-dff03ca9`]]),Wb={class:`base-safe-badge`},Gb={class:`base-safe-badge__caption`},Kb=F(x({__name:`BaseSafeBadge`,setup(e){let{t}=j();return(e,n)=>(p(),w(`div`,Wb,[S(`span`,Gb,[T(E(fe),{class:`base-safe-badge__icon`,name:`lock-close`,"aria-hidden":`true`}),D(` `+f(E(t)(`header.safeConnection.label`)),1)])]))}}),[[`__scopeId`,`data-v-39d14f81`]]),qb={key:1,class:`the-header__container`},Jb={key:0,class:`the-header__content`},Yb=[`aria-label`],Xb=F(x({__name:`TheHeader`,props:{hasSafeConnection:{type:Boolean,default:!1},hasOnlyLogo:{type:Boolean,default:!1},hasHeaderContent:{type:Boolean,default:!0}},setup(e){let{t}=j(),n=rt(),r=Fe(),i=e,a=k(()=>n.pageOrigin===at.Success),o=k(()=>a.value?0:n.cart?.cartItems?.reduce((e,t)=>e+t.quantity,0)??Number.parseInt(ve(`CART_QUANTITY`),10)??0),s=k(()=>o.value<=0?``:o.value>99?`99+`:String(o.value)),c=()=>{a.value&&Ne(`/otc/cart`),Xe(ht.summary),document.getElementById(ht.summary).focus()},l=k(()=>!i.hasOnlyLogo&&r.name!==qe.LOGIN);return(n,r)=>{let a=_(`secure-html`);return p(),w(`nav`,{class:g([`the-header`,{"the-header--only-logo":i.hasOnlyLogo}])},[i.hasSafeConnection?(p(),O(Kb,{key:0})):A(``,!0),e.hasHeaderContent?(p(),w(`div`,qb,[r[0]||=S(`a`,{href:`/`,"aria-label":`Home`,class:`the-header__logo_link`},[S(`img`,{src:`/otc/brand-default.svg`,alt:`Lidl`,class:`the-header__logo`})],-1),i.hasOnlyLogo?A(``,!0):b((p(),w(`p`,Jb,null,512)),[[a,E(t)(`header.serviceInfo.text`)]]),l.value?(p(),w(`button`,{key:1,class:`the-header__nav-item`,"aria-label":E(t)(`pages.cartView.shoppingCart.headline.label`,o.value),onClick:c,"data-testid":`cartIcon`},[S(`span`,{class:g({"the-header__cross":!0,"the-header__cross--empty":o.value<=0})},f(s.value),3),T(E(fe),{class:`the-header__icon`,name:`shopping-cart-1`})],8,Yb)):A(``,!0)])):A(``,!0)],2)}}}),[[`__scopeId`,`data-v-52f45540`]]),Zb={class:`checkout-layout`},Qb={class:`checkout-layout__container`},$b=F(x({__name:`checkout-layout`,setup(e){Eb(`CHECKOUT`);let t=k(()=>!he());return(e,n)=>{let r=d(`router-view`);return p(),w(`div`,Zb,[T(Xb,{"has-safe-connection":``,"has-header-content":t.value},null,8,[`has-header-content`]),S(`main`,Qb,[T(r),T(Tb,{"use-own-implementation":!0,headingLevel:2})]),t.value?(p(),O(Ub,{key:0})):A(``,!0)])}}}),[[`__scopeId`,`data-v-8b70ef29`]]),ex=`recommendations-slider-show`,tx={};function nx(e,t){return p(),w(`div`,null,[...t[0]||=[S(`svg`,{class:`container`,viewBox:`0 0 66 66`,height:`66`,width:`66`},[S(`circle`,{class:`car`,cx:`33`,cy:`33`,r:`33`,pathLength:`100`,"stroke-width":`7px`,fill:`none`})],-1)]])}var rx=F(tx,[[`render`,nx],[`__scopeId`,`data-v-7672816d`]]),ix=F(x({__name:`CartCheckoutButton`,props:{isLoading:{type:Boolean},isDisabled:{type:Boolean},labelButton:{},level:{},submit:{type:Boolean},abTestTag:{},dataEe:{}},emits:[`submit`],setup(e,{emit:t}){let n=e,r=t,i=()=>{let e=n.submit?`submit`:`click`;r(`submit`,e)};return(e,t)=>b((p(),O(E(de),{class:`cart__button__checkout`,as:`button`,"data-testid":`cart-button-checkout`,"is-loading":n.isLoading,"is-disabled":n.isDisabled,label:n.labelButton,level:n.level,"data-ee":n.dataEe,onClick:i},null,8,[`is-loading`,`is-disabled`,`label`,`level`,`data-ee`])),[[E(Ot),n.abTestTag]])}}),[[`__scopeId`,`data-v-0a0b9638`]]),ax={class:`cart-submit-section`},ox=F(x({__name:`CartSubmitSection`,props:{isLoading:{type:Boolean},isButtonDisabled:{type:Boolean},abTestTag:{}},emits:[`submit`],setup(e,{emit:t}){let{t:n}=j(),r=e,i=t,a=k(()=>n(`submit.section.disclaimer`).trim());return(e,t)=>(p(),w(`section`,ax,[T(ft,{class:`cart-submit-section__legal-text`,disclaimer:a.value},null,8,[`disclaimer`]),T(ix,{"is-loading":r.isLoading,"is-disabled":r.
22isButtonDisabled,"label-button":E(n)(`submit.section.button.label`),level:E(ue).Primary,submit:!0,"ab-test-tag":r.abTestTag,"data-ee":`pca-cart-submit`,onSubmit:t[0]||=e=>i(`submit`)},null,8,[`is-loading`,`is-disabled`,`label-button`,`level`,`ab-test-tag`])]))}}),[[`__scopeId`,`data-v-34df08d1`]]),sx={key:0,class:`lidl-plus-voucher`},cx=[`data-zone`,`data-country`,`data-lang`],lx=x({__name:`LidlPlusVoucher`,setup(e){let{configs:t}=Ie(),{isLidlPlusCouponEnabled:n,dataZone:r}=dt();return(e,i)=>E(n)?(p(),w(`div`,sx,[S(`voucher-component`,{"data-zone":E(r),"data-country":E(t).country,"data-lang":E(t).language,"data-section":`coupon_web_cart`},null,8,cx)])):A(``,!0)}}),ux=[`id`,`title`,`src`],dx=F(x({__name:`OneClickButton`,props:{paymentMode:{type:String,required:!0},amount:{type:Number,required:!0},companyAccount:{type:String,required:!0},currency:{type:String,required:!0},salesChannel:{type:String,required:!0},cartId:{type:String,required:!0}},setup(e){let{configs:t}=Ie(),n=e;u(()=>n.amount,(e,t)=>{e!==t&&oe()?.proxy?.$forceUpdate()});let r=k(()=>{let e=new URL(`/payments/express/${n.paymentMode.toLowerCase()}`,globalThis.location.origin);return e.search=new URLSearchParams({amount:n.amount?.toString(),companyAccount:n.companyAccount?.toString(),currency:n.currency?.toString(),locale:t.value.locale?.toString(),salesChannel:n.salesChannel?.toString(),cartId:n.cartId?.toString()}).toString(),e.toString()});return(e,t)=>(p(),w(`iframe`,{id:`checkout-one-click-button-${n.paymentMode}`,class:`one-click-button`,allow:`payment`,title:n.paymentMode,src:r.value,"data-ee":`pca-one-click-button`},null,8,ux))}}),[[`__scopeId`,`data-v-fb278db9`]]),fx={},px={class:`section-heading`},mx={class:`section-heading__title`};function hx(e,t){return p(),w(`div`,px,[S(`h2`,mx,[l(e.$slots,`default`,{},void 0,!0)])])}var gx=F(fx,[[`render`,hx],[`__scopeId`,`data-v-1b0383c0`]]);function _x(e){switch(e){case`9018`:return`gpay`;case`9019`:return`apay`;case`9003`:return`paypal`;default:return``}}function vx(e){switch(e){case`gpay`:return`9018`;case`apay`:return`9019`;case`paypal`:return`9003`;default:return``}}function yx(e,t){switch(e){case`9018`:return t(`oneClickCheckoutEnabledGooglePay`);case`9019`:return t(`oneClickCheckoutEnabledApplePay`);case`9003`:return t(`oneClickCheckoutEnabledPayPal`);default:return!1}}var bx={class:`one-click`},xx={class:`one-click__buttons`},Sx=F(x({__name:`OneClick`,props:{cart:{type:Object,required:!0},allowedPaymentMethods:{type:Object,required:!0}},emits:[`success`,`error`,`cancel`,`panic`],setup(e,{emit:t}){let{configs:n}=Ie(),{isFeatureEnabled:r}=ye(),{t:a}=j(),o=t,l=e,u=k(()=>{let e=[];for(let t of l.allowedPaymentMethods??[])yx(t,r)&&e.push(t);return e}),d=k(()=>`LidlOnlineShop_${n.value.country.toUpperCase()}`),m=k(()=>({cartId:l.cart.id,amount:l.cart.cartAmountAfterCoupon,companyAccount:d.value,currency:n.value.currency,salesChannel:nt.WEB})),h=e=>_x(e),g=e=>{let t=new URL(`/`,globalThis.location.origin).toString();t.endsWith(`/`)&&(t=t.slice(0,-1)),e.origin===t&&(e=>{let t=e;return!!t.data.paymentDetails||!!t.data.walletCancel||!!t.data.walletError})(e)&&(e.data.paymentDetails?o(`success`,e.data.paymentDetails):e.data.walletError?o(`error`,e.data.walletError):e.data.walletCancel?o(`cancel`,e.data.walletCancel):o(`panic`,{paymentMode:e?.data?.paymentDetails?.paymentMode}))};return i(()=>{window.addEventListener(`message`,g)}),ne(()=>{window.removeEventListener(`message`,g)}),(e,t)=>(p(),w(`div`,bx,[T(gx,null,{default:y(()=>[D(f(E(a)(`pages.cartView.expressCheckout.headline`)),1)]),_:1}),S(`div`,xx,[(p(!0),w(ae,null,c(u.value,e=>(p(),O(dx,s({key:e,"payment-mode":h(e)},{ref_for:!0},m.value),null,16,[`payment-mode`]))),128))])]))}}),[[`__scopeId`,`data-v-96ec7cce`]]),Cx=x({__name:`PPAYAplazame`,props:{showAplazame:{type:Boolean,default:!1}},setup(e){let t=rt(),n=e,r=C(null),a=k(()=>t?.cart?.finalCartValueWithoutPaymentFees??0);i(()=>{o(a.value)}),u(()=>a.value,e=>{o(e)});let o=e=>{let t=r.value?.querySelector(`ppay-aplazame-offer-widget`);t&&t.setAttribute(`amount`,e.toString())};return(e,t)=>n.showAplazame?(p(),w(`div`,{key:0,class:`ppay-aplazame`,ref_key:`ppayAplazameRef`,ref:r},[t[0]||(v(-1,!0),(t[0]=S(`ppay-aplazame-offer-widget`)).cacheIndex=0,v(1),t[0])],512)):A(``,!0)}}),wx={class:`aplazame-container`},Tx=[`title`,`src`],Ex=`ppay-button-clicked`,Dx=F(x({__name:`PPAYAplazameSideSheet`,setup(e){let{t}=j(),n=C(!0),r=()=>{n.value=!1},{configs:a}=Ie(),o=rt(),{openInstallmentLink:s}=st(),c=k(()=>{let e=new URL(`/payments/installment/calculator`,globalThis.location.origin);return e.search=new URLSearchParams({locale:a.value.locale.substring(0,5),amount:Number.parseFloat(o.c
22art?.finalCartValueWithoutPaymentFees?.toString()??`0`).toString(),currency:a.value.currency.substring(0,3)}).toString(),e.toString()}),l=C(!1),u=()=>{l.value=!0,s({page:it.CART,calculatorUrl:c.value})};return i(()=>{document.addEventListener(Ex,u)}),te(()=>{document.removeEventListener(Ex,u)}),(e,i)=>(p(),O(E(wt),{"is-open":l.value,"accessible-close-text":E(t)(`global.close`),title:E(t)(`payment.aplazame.header`),"bottom-sheet-props":{isInvisibleWhenClosed:!0},zIndex:1004,"onUpdate:isOpen":i[0]||=e=>l.value=!l.value},{default:y(()=>[S(`div`,wx,[S(`iframe`,{id:`ppay-aplazame-calculator-id`,title:E(t)(`payment.aplazame.header`),class:`ppay-calculator`,onLoad:r,src:c.value},null,40,Tx),n.value?(p(),O(rx,{key:0,class:`loading-spinner-aplazame`})):A(``,!0)])]),_:1},8,[`is-open`,`accessible-close-text`,`title`]))}}),[[`__scopeId`,`data-v-14c27caa`]]),Ox={class:`the-empty-cart-wrapper`},kx={class:`the-empty-cart`},Ax={class:`main-content`},jx=[`data-heading`],Mx=F(x({__name:`TheEmptyCart`,setup(e){let t=Re(),n=k(()=>me()),r=()=>{pe(t)},{t:i}=j();return(e,t)=>(p(),w(`div`,Ox,[S(`div`,kx,[S(`h1`,null,f(E(i)(`pages.cartView.emptyPage.title`)),1),S(`div`,Ax,[T(E(de),{class:`the-empty-cart__primary-button`,as:`a`,href:`/`,label:E(i)(`pages.cartView.emptyPage.primaryButton`),level:`primary`},null,8,[`label`]),n.value?A(``,!0):(p(),w(ae,{key:0},[T(gt),S(`h2`,null,f(E(i)(`pages.cartView.emptyPage.subtitle`)),1),T(E(de),{class:`the-empty-cart__secondary-button`,as:`button`,label:E(i)(`pages.cartView.emptyPage.secondaryButton`),level:`secondary`,onClick:r},null,8,[`label`])],64))])]),S(`div`,{class:`recommendation`,"data-recommendations":``,"data-heading":E(i)(`pages.cartView.recommendations.title`),"data-type":`last_seen`},null,8,jx)]))}}),[[`__scopeId`,`data-v-f4e0c44b`]]),Nx=Je(`one-click-store`,()=>{let{configs:e}=Ie(),t=C([]),n=()=>t.value.length>0,r=e=>{if(!e?.allowedPaymentMethods){t.value=[];return}t.value=e.allowedPaymentMethods},i=()=>{t.value=[]};return{allowedPaymentMethods:t,isOneClickAvailable:n,setOneClick:r,clearOneClick:i,removeOneClickPaymentMethod:e=>{t.value=t.value.filter(t=>t!==e)},fetchOneClickData:async()=>{i();try{let t=rt(),n=await Be.getCheckoutOneClick({country:e.value.country,language:e.value.language,cartId:$e(t.cart?.id),zoneId:yt(t.cart)});r(n.data.payload)}catch{r(null)}},oneClickDataSubmit:async t=>{let n=rt();await Ye.postCheckoutOneClick({country:e.value.country,language:e.value.language,cartId:$e(rt().cart?.id),sales_channel:St.getSalesChannel()??Ct.WEB,zoneId:yt(n.cart)},t)}}}),Px={key:0,class:`loading-spinner`},Fx={key:1,class:`cart-view`},Ix={class:`cart-view__left`},Lx={class:`cart-view__title`},Rx={class:`title-headline`},zx={class:`title-subheadline`},Bx={class:`cart-view__right`},Vx={class:`right-order-summary`},Hx={key:0},Ux={class:`lidl-points-hint-text`},Wx={key:1,class:`lidl-points-hint-text`},Gx=[`data-heading`,`data-context-id`],Kx=F(x({__name:`cart-view`,setup(e){let{logger:t}=vt(),{t:n}=j(),{startCheckout:r,basketPageView:a}=st(),{isMobile:s}=Nt(1440),c=rt(),l=Nx(),u=We(),d=C(0),h=C(!1),{showLidlPlusHint:g}=Mt(),{isABTestVariantActive:_}=kt(),b=C(!1),x=k(()=>d.value===0||c.cart.cartItems.some(e=>e.quantity===0)||h.value),ee=k(()=>c.cart?.cartItems?.length??0),D=C(!1),{isFeatureEnabledOneOf:te,is
22FeatureEnabled:re,featureToggles:ie}=ye(),ae=k(()=>!!customElements.get(`ppay-aplazame-offer-widget`)&&!!c.cart),oe=k(()=>!c.cart?.cartItems||ut(c.cart.cartItems)),se=k(()=>c.cart?.cartItems.map(e=>e.erpNumber).join(`,`)),ce=k(()=>c.cart?.cartItems&&c.cart.cartItems.reduce((e,t)=>e+(t?.quantity??0),0)<=1?n(`pages.cartView.cartItemsHeader.singleArticle`):n(`pages.cartView.cartItemsHeader.multipleArticles`)),le=k(()=>!ve(bt)),ue=k(()=>ee.value>2),de=Qe(),fe=async()=>{h.value=!0,r({page:it.CART,buttonText:String(n(`submit.section.button.label`))}),await de.createCheckoutSession().catch(e=>{D.value=!0,h.value=!1,e.status===_t.INTERNAL_SERVER_ERROR&&u.addAppMessage(tt)})},me=k(()=>te([`oneClickCheckoutEnabledPayPal`,`oneClickCheckoutEnabledApplePay`,`oneClickCheckoutEnabledGooglePay`])&&l.isOneClickAvailable()&&!oe.value),he=async e=>{l.removeOneClickPaymentMethod(vx(e.paymentMode)),u.addAppMessage(et)},be=async e=>{l.removeOneClickPaymentMethod(vx(e.paymentMode)),u.addAppMessage(ze)},xe=async e=>{l.removeOneClickPaymentMethod(vx(e.paymentMode)),u.addAppMessage(et)},Se=async e=>{let t={cardNetwork:e.cardType,dateOfBirth:e.dateOfBirth,emailAddress:e.emailAddress,invoiceAddress:e.invoiceAddress,paymentMode:e.paymentMode,phone:e.phone,shippingAddress:e.shippingAddress,token:e.token};await l.oneClickDataSubmit(t)},M=C(),Ce=async()=>{await o(),b.value&&!oe.value&&M.value&&new pt({logger:t}).emit(ex,M.value)},N=C(!0),we=Fe(),Te=Re(),Ee=We(),De=e=>{e.persisted&&(h.value=!1)};return m(()=>{c.$patch({pageOrigin:at.Cart}),h.value=!1}),i(async()=>{if(we?.query?.refresh!==void 0&&await fe(),await c.fetch(),N.value=!1,ge(we?.query)){Ee.addAppMessage(Ge);let e={...we?.query};delete e[_e],await Te.replace({query:e})}!oe.value&&re(`isCartScarcityMessageEnabled`)&&Ee.addAppMessage(Ke),te([`oneClickCheckoutEnabledPayPal`,`oneClickCheckoutEnabledApplePay`,`oneClickCheckoutEnabledGooglePay`])&&!oe.value&&await l.fetchOneClickData(),d.value=c.cart?.cartItems?.length,a({page:it.CART}),b.value=_(Et.ShowRecoSlider,jt.T101),await Ce(),window.addEventListener(`pageshow`,De)}),ne(()=>{window.removeEventListener(`pageshow`,De)}),(e,t)=>(p(),w(`div`,null,[(p(),O(At,{key:`toast-${E(u).messages.value.length}`,location:E(ot).TOAST,class:`cart-view__app-messages`},null,8,[`location`])),N.value?(p(),w(`div`,Px,[T(rx)])):oe.value?(p(),O(Mx,{key:2})):(p(),w(`div`,Fx,[S(`div`,Ix,[(p(),O(At,{key:`page-${E(u).messages.value.length}`,location:E(ot).PAGE,class:`cart-view__app-messages`},null,8,[`location`])),S(`div`,Lx,[S(`h1`,Rx,f(E(n)(`pages.cartView.shoppingCart.headline.label`)),1),S(`h2`,zx,f(ce.value),1)]),ue.value?(p(),O(Ft,{key:0,class:`cart-view__mobile`,location:`top`,"show-lidl-plus-hint":E(g)},null,8,[`show-lidl-plus-hint`])):A(``,!0),E(c).cart?.cartItems?(p(),O(mt,{key:1})):A(``,!0)]),S(`div`,Bx,[S(`div`,Vx,[E(s)?A(``,!0):(p(),O(Ft,{key:0,"show-lidl-plus-hint":E(g),class:`cart-view__desktop`,location:`bottom`},null,8,[`show-lidl-plus-hint`])),E(re)(`isFreeReturnHintShown`)?(p(),O(Pt,{key:1,class:`cart-view__free-return`})):A(``,!0),E(s)?A(``,!0):(p(),O(Cx,{key:2,"show-aplazame":ae.value},null,8,[`show-aplazame`])),t[0]||(v(-1,!0),(t[0]=T(lx)).cacheIndex=0,v(1),t[0]),E(s)?(p(),O(Ft,{key:3,"show-lidl-plus-hint":E(g)&&!ue.value,class:`cart-view__mobile`,location:`bottom`},null,8,[`show-lidl-plus-hint`])):A(``,!0),E(s)?(p(),O(Cx,{key:4,"show-aplazame":ae.value},null,8,[`show-aplazame`])):A(``,!0),ae.value?(p(),O(Dx,{key:5})):A(``,!0),E(c).showLidlPointsHint?(p(),O(Tt,{key:6},{default:y(()=>[le.value?(p(),w(`div`,Hx,[S(`div`,Ux,f(E(n)(`lidl.points.cart.and.login.guestInfo`)),1),S(`a`,{class:`lidl-points-hint-link`,onClick:t[1]||=e=>E(pe)(E(Te))},f(E(n)(`lidl.points.cart.guest.infoLink`)),1)])):(p(),w(`div`,Wx,f(E(n)(`lidl.points.cart.registeredInfo`)),1))]),_:1})):A(``,!0),E(c).cart?(p(),O(ox,{key:7,"is-loading":h.value,"is-button-disabled":x.value,"ab-test-tag":E(Dt).basketToCheckout,onSubmit:fe},null,8,[`is-loading`,`is-button-disabled`,`ab-test-tag`])):A(``,!0),me.value?(p(),O(Sx,{key:8,cart:E(c).cart,"allowed-payment-methods":E(l).allowedPaymentMethods,onCancel:be,onPanic:he,onError:xe,onSuccess:Se},null,8,[`cart`,`allowed-payment-methods`])):A(``,!0)])]),b.value?(p(),w(`div`,{key:0,"data-recommendations":``,"data-heading":E(n)(`pages.cartView.shoppingCart.recommendations.title`),"data-context-id":se.value,"data-type":`multicross`,class:`cart-view__reco`,ref_key:`recommendationsContainer`,ref:M},null,8,Gx)):A(``,!0)]))]))}}),[[`__scopeId`,`data-v-678ece6b`]]),qx=n({default:()=>Jx}),Jx=bb({routes:[{path:``,redirect:`/checkout/flow`},{path:`/checkout`,redirect:`/checkout/flow`},{path:`/handover`,component:async()=>await xt(()=>import(`./layout-handover-Cdde6gfq.js`),__vite__mapDeps([0,1,2])),children:[{path:``,name:qe.HANDOVER,component:async()=>await xt(()=>import(`./checkout-handover-page-CDrkjrOo.js`),__vite__mapDeps([3,1,4,5,6,7,8,9,2,10,11]))},{path:`flash-sales`,name:qe.HANDOVER_FLASHSALES,component:async()=>await xt(()=>import(`./checkout-handover-flashsales-page-Bef5GWI0.js`),__vite__mapDeps([12,1,4,5,6,7,13,2,10,14]))}]},{path:`/cart`,component:Ob,children:[{path:``,name:qe.CART,component:Kx}]},{path:`/checkout`,component:$b,children:[{path:``,redirect:`/checkout/login`},{name:qe.LOGIN,path:`login`,component:async()=>await xt(()=>import(`./login-view-CUS1SCcS.js`),__vite__mapDeps([15,1,16,17,6,18,19,20,5,4,9,21,7,8,13,22,2,23,24,25,26,27,28,29,30,31,32]))},{path:`:step(${lt.join(`|`)})`,props:!0,component:async()=>await xt(()=>import(`./checkout-view-CKQA-YnI.js`),__vite__mapDeps([33,1,16,17,6,18,19,4,5,21,20,9,7,8,13,22,34,2,25,26,24,27,35,36,37,23,28,38,39,40,30,41,42]))},{path:`flow`,name:qe.FLOW,component:async()=>await xt(()=>import(`./checkout-flow-view-DF486KKN.js`),__vite__mapDeps([43,1,21,5,20,4,6,9,7,8,13,2,44]))},{path:`success`,name:qe.SUCCESS,component:async()=>await xt(()=>import(`./checkout-success-view-BA6_43sy.js`),__vite__mapDeps([45,1,16,17,6,18,19,20,5,4,9,21,7,8,13,22,2,25,26,35,36,30,29,31,40,41,46,38,39,47,48]))},{path:`:pathMatch(.*)*`,name:qe.ERROR,component:async()=>await xt(()=>import(`./error-view-BWOVSlIW.js`).then(e=>e.n),__vite__mapDeps([46,5,1,20,4,6,9,2,38,16,17,18,19,39,47]))}]}],history:Hy(`/otc`)});Jx.afterEach(He),Jx.afterEach(e=>{let{setCurrentLocation:t}=Ve();t(e.fullPath)}),(async()=>{let e=Ze();await Le();let{i18n:t}=j(),{configs:n}=Ie(),{featureToggles:r}=ye(),{getEnvironment:i}=be(),a=`checkoutview`,o=`v-checkoutview-98.7.0-RELEASE`,s=le(xb).use(Jx).use(t.value).use(e).use(Lv,{router:Jx,isEnabled:e=>!(!r.value.isMonitoringEnabled||n.value.grafanaFaroCollectorUrl?.length<=0),grafanaFaroCollectorUrl:n.value.grafanaFaroCollectorUrl,app:{name:a,version:o,environment:i()},samplingRate:n.value.grafanaFaroSamplingRate});
22s.directive(`secure-html`,xe),s.mount(`#app`),ct(a,{versionTag:o}),Ue()})();export{rx as n,qx as t};

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.