1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4927],{6025:function(e,t,i){i.d(t,{LogLevel:function(){return n.in}});var n=i(10047)},49863:function(e,t,i){let n,s,r;i.d(t,{p:function(){return eN}});var o=i(64899),a=i(10761),l=i(32785),u=i(25598),d=i(90103),c=i(44976),f=i(26307),v=i(52922);function h(e){return{frames:(0,v.E)(e)}}let p="com.grafana.faro.session",m={enabled:!0,persistent:!1,maxSessionPersistenceTime:9e5},g="http-request-start",b="http-request-end";var y=i(62061),S=i(41088);let w=()=>{let e=new y.UAParser,{name:t,version:i}=e.getBrowser(),{name:n,version:s}=e.getOS(),r=e.getUA(),o=navigator.language,a=navigator.userAgent.includes("Mobi"),l=function(){if(t&&i&&"userAgentData"in navigator&&navigator.userAgentData)return navigator.userAgentData.brands}();return{browser:{name:null!=t?t:S.h,version:null!=i?i:S.h,os:`${null!=n?n:S.h} ${null!=s?s:S.h}`,userAgent:null!=r?r:S.h,language:null!=o?o:S.h,mobile:a,brands:null!=l?l:S.h,viewportWidth:`${window.innerWidth}`,viewportHeight:`${window.innerHeight}`}}},O=()=>{let e=window.k6;return{k6:Object.assign({isK6Browser:!0},(null==e?void 0:e.testRunId)&&{testRunId:null==e?void 0:e.testRunId})}};var I=i(87089),E=i(23176),k=i(64091),T=i(57208),P=i(2575),x=i(3492),L=i(70390);function j(e,t){let i,n=!1,s=()=>{if(null==i){n=!1;return}e(...i),i=null,setTimeout(s,t)};return(...r)=>{if(n){i=r;return}e(...r),n=!0,setTimeout(s,t)}}let C="sessionStorage",U="localStorage";function D(e){var t;try{let t;t=window[e];let i="__faro_storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(i){return null===(t=L.s.internalLogger)||void 0===t||t.info(`Web storage of type ${e} is not available. Reason: ${i}`),!1}}function M(e,t){return z(t)?window[t].getItem(e):null}function _(e,t,i){if(z(i))try{window[i].setItem(e,t)}catch(e){}}function A(e,t){z(t)&&window[t].removeItem(e)}let N=D(U),q=D(C);function z(e){return e===U?N:e===C&&q}var V=i(8597),R=i(63964),F=i(54637),$=i(46681);function B(){var e,t,i;let n=L.s.config.sessionTracking,s=null!==(i=null!==(t=null===(e=null==n?void 0:n.sampler)||void 0===e?void 0:e.call(n,{metas:L.s.metas.value}))&&void 0!==t?t:null==n?void 0:n.samplingRate)&&void 0!==i?i:1;return"number"!=typeof s&&(s=0),Math.random()<s}function H({sessionId:e,started:t,lastActivity:i,isSampled:n=!0}={}){var s,r;let o=(0,V.m6)(),a=null===(r=null===(s=L.s.config)||void 0===s?void 0:s.sessionTracking)||void 0===r?void 0:r.generateSessionId;return null==e&&(e="function"==typeof a?a():(0,R.D)()),{sessionId:e,lastActivity:null!=i?i:o,started:null!=t?t:o,isSampled:n}}function W(e){if(null==e)return!1;let t=(0,V.m6)();return t-e.started<144e5&&t-e.lastActivity<9e5}function G({fetchUserSession:e,storeUserSession:t}){return function({forceSessionExtend:i}={forceSessionExtend:!1}){var n,s,r;if(!e||!t)return;let o=L.s.config.sessionTracking,a=null==o?void 0:o.persistent;if(a&&!N||!a&&!q)return;let l=e();if(!1===i&&W(l))t(Object.assign(Object.assign({},l),{lastActivity:(0,V.m6)()}));else{let e=J(H({isSampled:B()}),l);t(e),null===(n=L.s.api)||void 0===n||n.setSession(e.sessionMeta),null===(s=null==o?void 0:o.onSessionChange)||void 0===s||s.call(o,null!==(r=null==l?void 0:l.sessionMeta)&&void 0!==r?r:null,e.sessionMeta)}}}function J(e,t){var i,n,s,r,o,a,l;let u=Object.assign(Object.assign({},e),{sessionMeta:{id:e.sessionId,attributes:Object.assign(Object.assign(Object.assign({},null===(n=null===(i=L.s.config.sessionTracking)||void 0===i?void 0:i.session)||void 0===n?void 0:n.attributes),null!==(r=null===(s=L.s.metas.value.session)||void 0===s?void 0:s.attributes)&&void 0!==r?r:{}),{isSampled:e.isSampled.toString()})}}),d=null!==(a=null===(o=L.s.metas.value.session)||void 0===o?void 0:o.overrides)&&void 0!==a?a:null===(l=null==t?void 0:t.sessionMeta)||void 0===l?void 0:l.overrides;(0,f.xb)(d)||(u.sessionMeta.overrides=d);let c=null==t?void 0:t.sessionId;return null!=c&&(u.sessionMeta.attributes.previousSession=c),u}function K({fetchUserSession:e,storeUserSession:t}){return function(i){let n=i.session,s=e(),r=null==n?void 0:n.id,o=null==n?void 0:n.attributes,a=null==n?void 0:n.overrides,l=null==s?void 0:s.sessionMeta,u=null==l?void 0:l.overrides,d=!!a&&!(0,F.v)(a,u),c=!!o&&!(0,F.v)(o,null==l?void 0:l.attributes);if(n&&r!==(null==s?void 0:s.sessionId)||c||d){let e=J(H({sessionId:r,isSampled:B()}),s);t(e),function(e,t={},i={}){var n,s,r;if(!e)return;let o=t.serviceName,a=null!==(r=null!==(n=i.serviceName)&&void 0!==n?n:null===(s=L.s.metas.value.app)||void 0===s?void 0:s.name)&&void 0!==r?r:"";o&&o!==a&&L.s.api.pushEvent($.qW,{serviceName:o,previousServiceName:a})}(d,a,u),L.s.api.setSession(e.sessionMeta)}}}class Y{constructor(){this.updateSession=j(()=>this.updateUserSession(),1e3),this.updateUserSession=G({fetchUserSession:Y.fetchUserSession,storeUserSession:Y.storeUserSession}),this.init()}static removeUserSession(){A(p,Y.storageTypeLocal)}static storeUserSession(e){_(p,(0,x.qb)(e),Y.storageTypeLocal)}static fetchUserSession(){let e=M(p,Y.storageTypeLocal);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&this.updateSession()}),L.s.metas.addListener(K({fetchUserSession:Y.fetchUserSession,storeUserSession:Y.storeUserSession}))}}Y.storageTypeLocal=U;class Q{constructor(){this.updateSession=j(()=>this.updateUserSession(),1e3),this.updateUserSession=G({fetchUserSession:Q.fetchUserSession,storeUserSession:Q.storeUserSession}),this.init()}static removeUserSession(){A(p,Q.storageTypeSession)}static storeUserSession(e){_(p,(0,x.qb)(e),Q.storageTypeSession)}static fetchUserSession(){let e=M(p,Q.storageTypeSession);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&this.updateSession()}),L.s.metas.addListener(K({fetchUserSession:Q.fetchUserSession,storeUserSession:Q.storeUserSession}))}}function Z(e){return(null==e?void 0:e.persistent)?Y:Q}Q.storageTypeSession=C;
1var X=function(e,t,i,n){return new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},ee=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)0>t.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]]);return i};class et extends I.d{constructor(e){var t,i,n,s;super(),this.options=e,this.name="@grafana/faro-web-sdk:transport-fetch",this.version=E.q,this.disabledUntil=new Date,this.rateLimitBackoffMs=null!==(t=e.defaultRateLimitBackoffMs)&&void 0!==t?t:5e3,this.getNow=null!==(i=e.getNow)&&void 0!==i?i:()=>Date.now(),this.promiseBuffer=(0,k.z)({size:null!==(n=e.bufferSize)&&void 0!==n?n:30,concurrency:null!==(s=e.concurrency)&&void 0!==s?s:5})}send(e){return X(this,void 0,void 0,function*(){try{if(this.disabledUntil>new Date(this.getNow()))return this.logWarn(`Dropping transport item due to too many requests. Backoff until ${this.disabledUntil}`),Promise.resolve();yield this.promiseBuffer.add(()=>{let t;let i=JSON.stringify((0,T.M)(e)),{url:n,requestOptions:s,apiKey:r}=this.options,o=null!=s?s:{},{headers:a}=o,l=ee(o,["headers"]),u=this.metas.value.session;return null!=u&&(t=u.id),fetch(n,Object.assign({method:"POST",headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},null!=a?a:{}),r?{"x-api-key":r}:{}),t?{"x-faro-session-id":t}:{}),body:i,keepalive:i.length<=6e4},null!=l?l:{})).then(e=>X(this,void 0,void 0,function*(){return 202===e.status&&"invalid"===e.headers.get("X-Faro-Session-Status")&&this.extendFaroSession(this.config,this.logDebug),429===e.status&&(this.disabledUntil=this.getRetryAfterDate(e),this.logWarn(`Too many requests, backing off until ${this.disabledUntil}`)),e.text().catch(P.Z),e})).catch(e=>{this.logError("Failed sending payload to the receiver\n",JSON.parse(i),e)})})}catch(e){this.logError(e)}})}getIgnoreUrls(){var e;return[this.options.url].concat(null!==(e=this.config.ignoreUrls)&&void 0!==e?e:[])}isBatched(){return!0}getRetryAfterDate(e){let t=this.getNow(),i=e.headers.get("Retry-After");if(i){let e=Number(i);if(!isNaN(e))return new Date(1e3*e+t);let n=Date.parse(i);if(!isNaN(n))return new Date(n)}return new Date(t+this.rateLimitBackoffMs)}extendFaroSession(e,t){let i="Session expired",n=e.sessionTracking;if(null==n?void 0:n.enabled){let{fetchUserSession:e,storeUserSession:s}=Z(n);G({fetchUserSession:e,storeUserSession:s})({forceSessionExtend:!0}),t(`${i} created new session.`)}else t(`${i}.`)}}var ei=i(88558),en=i(73407),es=i(75851),er=i(23240),eo=i(77694);let ea="fetch",el="com.grafana.faro.lastNavigationId",eu="resource",ed=/^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;function ec(e=[]){for(let t of e)if("traceparent"===t.name){if(!ed.test(t.description))continue;let[,e,i]=t.description.split("-");if(null!=e&&null!=i)return{traceId:e,spanId:i};break}}function ef(e){let t;let{connectEnd:i,connectStart:n,decodedBodySize:s,domainLookupEnd:r,domainLookupStart:o,duration:a,encodedBodySize:l,fetchStart:u,initiatorType:d,name:c,nextHopProtocol:f,redirectEnd:v,redirectStart:h,renderBlockingStatus:p,requestStart:m,responseEnd:g,responseStart:b,responseStatus:y,secureConnectionStart:S,transferSize:w,workerStart:O}=e;return{name:c,duration:ev(a),tcpHandshakeTime:ev(i-n),dnsLookupTime:ev(r-o),tlsNegotiationTime:ev(i-S),responseStatus:ev(y),redirectTime:ev(v-h),requestTime:ev(b-m),responseTime:ev(g-b),fetchTime:ev(g-u),serviceWorkerTime:ev(u-O),decodedBodySize:ev(s),encodedBodySize:ev(l),cacheHitStatus:(t="fullLoad",0===w?s>0&&(t="cache"):null!=y?304===y&&(t="conditionalFetch"):l>0&&w<l&&(t="conditionalFetch"),t),renderBlockingStatus:ev(p),protocol:f,initiatorType:d,visibilityState:document.visibilityState,ttfb:ev(b-m),transferSize:ev(w)}}function ev(e){return null==e?S.h:"number"==typeof e?Math.round(e>0?e:0).toString():e.toString()}let eh={initiatorType:["xmlhttprequest","fetch"]},ep=new er.y;class em extends ei.F{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-performance",this.version=E.q}initialize(){if(!("PerformanceObserver"in window)){this.logDebug("performance observer not supported. Disable performance instrumentation.");return}!function(e){if("complete"===document.readyState)e();else{let t=()=>{"complete"===document.readyState&&(e(),document.removeEventListener("readystatechange",t))};document.addEventListener("readystatechange",t)}}(()=>{var e,t,i,n;return e=this,t=void 0,i=void 0,n=function*(){let e=this.api.pushEvent,{faroNavigationId:t}=yield function(e){let t;let i=new Promise(e=>{t=e});return new PerformanceObserver(i=>{var n;let[s]=i.getEntries();if(null==s||(0,eo.dF)(s.name))return;let r=s.toJSON(),o=ec(null==r?void 0:r.serverTiming),a=null!==(n=M(el,C))&&void 0!==n?n:S.h,l=Object.assign(Object.assign({},function(e){var t;let{activationStart:i,domComplete:n,domContentLoadedEventEnd:s,domContentLoadedEventStart:r,domInteractive:o,fetchStart:a,loadEventEnd:l,loadEventStart:u,responseStart:d,type:c}=e,f=(null===(t=performance.timing)||void 0===t?void 0:t.domLoading)!=null?performance.timing.domLoading-performance.timeOrigin:null;return Object.assign(Object.assign({},ef(e)),{pageLoadTime:ev(n-a),documentParsingTime:ev(f?o-f:null),domProcessingTime:ev(n-o),domContentLoadHandlerTime:ev(s-r),onLoadTime:ev(l-u),ttfb:ev(Math.max(d-(null!=i?i:0),0)),type:c})}(r)),{faroNavigationId:(0,R.D)(),faroPreviousNavigationId:a});_(el,l.faroNavigationId,C),e("faro.performance.navigation",l,void 0,{spanContext:o,timestampOverwriteMs:performance.timeOrigin+r.startTime}),t(l)}).observe({type:"navigation",buffered:!0}),i}(e);null!=t&&function(e,t,i){let n=L.s.config.trackResources;new PerformanceObserver(s=>{for(let r of s.getEntries()){if((0,eo.dF)(r.name))return;let s=r.toJSON(),o=ec(null==s?void 0:s.serverTiming);if(null==n&&function(e,t={}){for(let[i,n]of Object.entries(t)){let t=e[i];if(null==t)return!1;if((0,f.kJ)(n))return n.includes(t);return t===n}return!0}(s,eh)||n){let n=Object.assign(Object.assign({},ef(s)),{faroNavigationId:e,faroResourceId:(0,R.D)()});L.s.config.trackUserActionsPreview&&(null==i||i.notify({type:eu})),t("faro.performance.resource",n,void 0,{spanContext:o,timestampOverwriteMs:performance.timeOrigin+s.startTime})}}}).observe({type:eu,buffered:!0})}(t,e,ep)}
1,new(i||(i=Promise))(function(s,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})})}}function eg(e){let{api:t,userActionName:i,startTime:n,endTime:s,actionId:r,event:o,attributes:a}=e,l=s-n,u=o.type;en.e.notify({type:es.N,name:i,id:r,startTime:n,endTime:s,duration:l,eventType:u}),t.pushEvent(i,Object.assign({userActionStartTime:n.toString(),userActionEndTime:s.toString(),userActionDuration:l.toString(),userActionTrigger:u},(0,x.yM)(a)),void 0,{timestampOverwriteMs:n,customPayloadTransformer:e=>(e.action={id:r,name:i},e)})}function eb(e,t,i){return e&&clearTimeout(e),e=setTimeout(()=>{t()},i)}function ey(e){null==e||e.unsubscribe(),e=void 0}class eS extends ei.F{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-user-action",this.version=E.q}initialize(){r=function(e){let t;let{api:i,config:n}=e,s=function(){let e=new er.y;function t(t){e.notify({type:g,request:t})}function i(t){e.notify({type:b,request:t})}return function({onRequestEnd:e,onRequestStart:t}){let i=window.fetch;window.fetch=function(){var n,s;let r=null!==(n=(0,eo.a)(arguments[0]))&&void 0!==n?n:"",o=(0,eo.dF)(r),a=(null!==(s=arguments[1])&&void 0!==s?s:{}).method,l=(0,R.D)();return o||t({url:r,method:a,requestId:l,apiType:ea}),i.apply(this,arguments).then(t=>(o||e({url:r,method:a,requestId:l,apiType:ea}),t)).catch(t=>{throw o||e({url:r,method:a,requestId:l,apiType:ea}),t})}}({onRequestStart:t,onRequestEnd:i}),function({onRequestStart:e,onRequestEnd:t}){let i=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){let n=arguments[1],s=(0,eo.dF)(n),r=arguments[0],o=(0,R.D)();this.addEventListener("loadstart",function(){s||e({url:n,method:r,requestId:o,apiType:"xhr"})}),this.addEventListener("load",function(){s||t({url:n,method:r,requestId:o,apiType:"xhr"})}),this.addEventListener("error",function(){s||t({url:n,method:r,requestId:o,apiType:"xhr"})}),this.addEventListener("abort",function(){s||t({url:n,method:r,requestId:o,apiType:"xhr"})}),i.apply(this,arguments)}}({onRequestStart:t,onRequestEnd:i}),e}(),r=function(){let e=new er.y;return new MutationObserver((t,i)=>{e.notify({type:"dom-mutation"})}).observe(document,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),e}(),o=function(){let e=new er.y;return ep.subscribe(t=>{t.type===eu&&e.notify({type:"resource-entry"})}),e}(),a=!1;return function(e){var l;let u,d,c;let f="faroApiCall"===e.type&&"string"==typeof e.name;if(u=f?e.name:function(e,t){let i=function(e){let t=e.split("data-")[1],i=null==t?void 0:t.replace(/-(.)/g,(e,t)=>t.toUpperCase());return null==i?void 0:i.replace(/-/g,"")}(t),n=e.dataset;for(let e in n)if(e===i)return n[e]}(e.target,null!==(l=n.trackUserActionsDataAttributeName)&&void 0!==l?l:"faroUserActionName"),a||null==u)return;a=!0;let v=(0,V.m6)(),h=(0,R.D)();en.e.notify({type:es.ap,name:u,startTime:v,parentId:h}),t=eb(t,()=>{(0,V.m6)(),a=!1,en.e.notify({type:es.BG,name:u,parentId:h})},100);let p=new Map,m=!1,y=new er.y().merge(s,r,o).takeWhile(()=>a).filter(e=>!m||!!(e.type===b&&p.has(e.request.requestId))).subscribe(n=>{n.type===g&&p.set(n.request.requestId,n.request),n.type===b&&p.delete(n.request.requestId),t=eb(t,()=>{let t=Object.assign({api:i,userActionName:u,startTime:v,endTime:(0,V.m6)(),actionId:h,event:e},f?{attributes:e.attributes}:{}),n=p.size>0;m&&!n&&(clearTimeout(c),m=!1),n?(m=!0,en.e.notify({type:es.L5,name:u,parentId:h,reason:"pending-requests",haltTime:(0,V.m6)()}),c=eb(void 0,()=>{ey(y),eg(t),a=!1,m=!1},1e4)):(ey(y),eg(t),a=!1,m=!1)},100)})}}(L.s),window.addEventListener("pointerdown",r),window.addEventListener("keydown",r)}}var ew=i(65360),eO=i(69459);class eI{constructor(e,t){this.pushMeasurement=e,this.webVitalConfig=t}initialize(){Object.entries(eI.mapping).forEach(([e,t])=>{var i;t(t=>{this.pushMeasurement({type:"web-vitals",values:{[e]:t.value}})},{reportAllChanges:null===(i=this.webVitalConfig)||void 0===i?void 0:i.reportAllChanges})})}}eI.mapping={cls:eO.mw,fcp:eO.a4,fid:eO.Fu,inp:eO.Yn,lcp:eO.NO,ttfb
1:eO.mr};var eE=i(56559);let ek="load_state",eT="time_to_first_byte";class eP{constructor(e,t){this.corePushMeasurement=e,this.webVitalConfig=t}initialize(){this.measureCLS(),this.measureFCP(),this.measureFID(),this.measureINP(),this.measureLCP(),this.measureTTFB()}measureCLS(){var e;(0,eE.mw)(e=>{let{loadState:t,largestShiftValue:i,largestShiftTime:n,largestShiftTarget:s}=e.attribution,r=this.buildInitialValues(e);this.addIfPresent(r,"largest_shift_value",i),this.addIfPresent(r,"largest_shift_time",n);let o=this.buildInitialContext(e);this.addIfPresent(o,ek,t),this.addIfPresent(o,"largest_shift_target",s),this.pushMeasurement(r,o)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureFCP(){var e;(0,eE.a4)(e=>{let{firstByteToFCP:t,timeToFirstByte:i,loadState:n}=e.attribution,s=this.buildInitialValues(e);this.addIfPresent(s,"first_byte_to_fcp",t),this.addIfPresent(s,eT,i);let r=this.buildInitialContext(e);this.addIfPresent(r,ek,n),this.pushMeasurement(s,r)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureFID(){var e;(0,eE.Fu)(e=>{let{eventTime:t,eventTarget:i,eventType:n,loadState:s}=e.attribution,r=this.buildInitialValues(e);this.addIfPresent(r,"event_time",t);let o=this.buildInitialContext(e);this.addIfPresent(o,"event_target",i),this.addIfPresent(o,"event_type",n),this.addIfPresent(o,ek,s),this.pushMeasurement(r,o)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureINP(){var e;(0,eE.Yn)(e=>{let{interactionTime:t,presentationDelay:i,inputDelay:n,processingDuration:s,nextPaintTime:r,loadState:o,interactionTarget:a,interactionType:l}=e.attribution,u=this.buildInitialValues(e);this.addIfPresent(u,"interaction_time",t),this.addIfPresent(u,"presentation_delay",i),this.addIfPresent(u,"input_delay",n),this.addIfPresent(u,"processing_duration",s),this.addIfPresent(u,"next_paint_time",r);let d=this.buildInitialContext(e);this.addIfPresent(d,ek,o),this.addIfPresent(d,"interaction_target",a),this.addIfPresent(d,"interaction_type",l),this.pushMeasurement(u,d)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureLCP(){var e;(0,eE.NO)(e=>{let{elementRenderDelay:t,resourceLoadDelay:i,resourceLoadDuration:n,timeToFirstByte:s,element:r}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"element_render_delay",t),this.addIfPresent(o,"resource_load_delay",i),this.addIfPresent(o,"resource_load_duration",n),this.addIfPresent(o,eT,s);let a=this.buildInitialContext(e);this.addIfPresent(a,"element",r),this.pushMeasurement(o,a)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureTTFB(){var e;(0,eE.mr)(e=>{let{dnsDuration:t,connectionDuration:i,requestDuration:n,waitingDuration:s,cacheDuration:r}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"dns_duration",t),this.addIfPresent(o,"connection_duration",i),this.addIfPresent(o,"request_duration",n),this.addIfPresent(o,"waiting_duration",s),this.addIfPresent(o,"cache_duration",r);let a=this.buildInitialContext(e);this.pushMeasurement(o,a)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}buildInitialValues(e){return{[e.name.toLowerCase()]:e.value,delta:e.delta}}buildInitialContext(e){var t;let i=null!==(t=M(el,C))&&void 0!==t?t:S.h;return{id:e.id,rating:e.rating,navigation_type:e.navigationType,navigation_entry_id:i}}pushMeasurement(e,t){this.corePushMeasurement({type:"web-vitals",values:e},{context:t})}addIfPresent(e,t,i){i&&(e[t]=i)}}class ex extends ei.F{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-web-vitals",this.version=E.q}initialize(){this.logDebug("Initializing"),this.intializeWebVitalsInstrumentation().initialize()}intializeWebVitalsInstrumentation(){var e,t,i;return(null===(e=this.config)||void 0===e?void 0:e.trackWebVitalsAttribution)===!1||(null===(i=null===(t=this.config)||void 0===t?void 0:t.webVitalsInstrumentation)||void 0===i?void 0:i.trackAttribution)===!1?new eI(this.api.pushMeasurement,this.config.webVitalsInstrumentation):new eP(this.api.pushMeasurement,this.config.webVitalsInstrumentation)}}class eL extends ei.F{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-se
1ssion",this.version=E.q}sendSessionStartEvent(e){var t,i;let n=e.session;if(n&&n.id!==(null===(t=this.notifiedSession)||void 0===t?void 0:t.id)){if(this.notifiedSession&&this.notifiedSession.id===(null===(i=n.attributes)||void 0===i?void 0:i.previousSession)){this.api.pushEvent($.fi,{},void 0,{skipDedupe:!0}),this.notifiedSession=n;return}this.notifiedSession=n,this.api.pushEvent($.Lq,{},void 0,{skipDedupe:!0})}}createInitialSession(e,t){var i,n,s,r,o,a,l,u,d,c;let f,v;let h=e.fetchUserSession();if(t.persistent&&t.maxSessionPersistenceTime&&h){let e=(0,V.m6)();h.lastActivity<e-t.maxSessionPersistenceTime&&(Y.removeUserSession(),h=null)}if(W(h)){let e=null==h?void 0:h.sessionId;v=H({sessionId:e,isSampled:h.isSampled||!1,started:null==h?void 0:h.started});let s=null==h?void 0:h.sessionMeta,r=Object.assign(Object.assign({},null===(i=t.session)||void 0===i?void 0:i.overrides),null==s?void 0:s.overrides);v.sessionMeta=Object.assign(Object.assign({},t.session),{id:e,attributes:Object.assign(Object.assign(Object.assign({},null===(n=t.session)||void 0===n?void 0:n.attributes),null==s?void 0:s.attributes),{isSampled:v.isSampled.toString()}),overrides:r}),f=$.QW}else{let e=null!==(r=null===(s=t.session)||void 0===s?void 0:s.id)&&void 0!==r?r:({id:null!==(c=null===(d=null===(u=null===(l=L.s.config)||void 0===l?void 0:l.sessionTracking)||void 0===u?void 0:u.generateSessionId)||void 0===d?void 0:d.call(u))&&void 0!==c?c:(0,R.D)(),attributes:void 0}).id;v=H({sessionId:e,isSampled:B()});let i=null===(o=t.session)||void 0===o?void 0:o.overrides;v.sessionMeta=Object.assign({id:e,attributes:Object.assign({isSampled:v.isSampled.toString()},null===(a=t.session)||void 0===a?void 0:a.attributes)},i?{overrides:i}:{}),f=$.Lq}return{initialSession:v,lifecycleType:f}}registerBeforeSendHook(e){var t;let{updateSession:i}=new e;null===(t=this.transports)||void 0===t||t.addBeforeSendHooks(e=>{var t,n,s;i();let r=null===(t=e.meta.session)||void 0===t?void 0:t.attributes;if(r&&(null==r?void 0:r.isSampled)==="true"){let t=JSON.parse(JSON.stringify(e)),i=null===(n=t.meta.session)||void 0===n?void 0:n.attributes;return null==i||delete i.isSampled,0===Object.keys(null!=i?i:{}).length&&(null===(s=t.meta.session)||void 0===s||delete s.attributes),t}return null})}initialize(){this.logDebug("init session instrumentation");let e=this.config.sessionTracking;if(null==e?void 0:e.enabled){let t=Z(e);this.registerBeforeSendHook(t);let{initialSession:i,lifecycleType:n}=this.createInitialSession(t,e);t.storeUserSession(i);let s=i.sessionMeta;this.notifiedSession=s,this.api.setSession(s),n===$.Lq&&this.api.pushEvent($.Lq,{},void 0,{skipDedupe:!0}),n===$.QW&&this.api.pushEvent($.QW,{},void 0,{skipDedupe:!0})}this.metas.addListener(this.sendSessionStartEvent.bind(this))}}class ej extends ei.F{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-view",this.version=E.q}sendViewChangedEvent(e){var t,i,n,s;let r=e.view;r&&r.name!==(null===(t=this.notifiedView)||void 0===t?void 0:t.name)&&(this.api.pushEvent($.N,{fromView:null!==(n=null===(i=this.notifiedView)||void 0===i?void 0:i.name)&&void 0!==n?n:S.h,toView:null!==(s=r.name)&&void 0!==s?s:S.h},void 0,{skipDedupe:!0}),this.notifiedView=r)}initialize(){this.metas.addListener(this.sendViewChangedEvent.bind(this))}}class eC extends ei.F{constructor(){super(),this.name="@grafana/faro-web-sdk:instrumentation-csp",this.version=E.q}initialize(){document.addEventListener("securitypolicyviolation",this.securitypolicyviolationHandler.bind(this))}destroy(){document.removeEventListener("securitypolicyviolation",this.securitypolicyviolationHandler)}securitypolicyviolationHandler(e){this.api.pushEvent("securitypolicyviolation",(0,x.yM)(e))}}var eU=i(21222),eD=i(10047),eM=i(17927);class e_ extends ei.F{constructor(e={}){super(),this.options=e,this.name="@grafana/faro-web-sdk:instrumentation-console",this.version=E.q,this.errorSerializer=d.c}initialize(){var e,t,i,n;this.options=Object.assign(Object.assign({},this.options),this.config.consoleInstrumentation);let s=(null===(e=this.options)||void 0===e?void 0:e.serializeErrors)||!!(null===(t=this.options)||void 0===t?void 0:t.errorSerializer);
1this.errorSerializer=s?null!==(n=null===(i=this.options)||void 0===i?void 0:i.errorSerializer)&&void 0!==n?n:eU.u:d.c,eD.N8.filter(e=>{var t,i;return!(null!==(i=null===(t=this.options)||void 0===t?void 0:t.disabledLevels)&&void 0!==i?i:e_.defaultDisabledLevels).includes(e)}).forEach(e=>{console[e]=(...t)=>{var i,n;try{if(e!==eD.in.ERROR||(null===(i=this.options)||void 0===i?void 0:i.consoleErrorAsLog)){if(e===eD.in.ERROR&&(null===(n=this.options)||void 0===n?void 0:n.consoleErrorAsLog)){let{value:i,type:n,stackFrames:s}=(0,eM.Gr)(t,this.errorSerializer);this.api.pushLog(i?[e_.consoleErrorPrefix+i]:t,{level:e,context:{value:null!=i?i:"",type:null!=n?n:"",stackFrames:(null==s?void 0:s.length)?(0,eU.u)(s):""}})}else this.api.pushLog(t,{level:e})}else{let{value:e,type:i,stackFrames:n}=(0,eM.Gr)(t,this.errorSerializer);if(e&&!i&&!n){this.api.pushError(Error(e_.consoleErrorPrefix+e));return}this.api.pushError(Error(e_.consoleErrorPrefix+e),{type:i,stackFrames:n})}}catch(e){this.logError(e)}finally{this.unpatchedConsole[e](...t)}}})}}e_.defaultDisabledLevels=[eD.in.DEBUG,eD.in.TRACE,eD.in.LOG],e_.consoleErrorPrefix="console.error: ";var eA=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)0>t.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]]);return i};function eN(e){let t=function(e){var t;let i=[],r=(0,a._)(e.unpatchedConsole,e.internalLoggerLevel);e.transports?((e.url||e.apiKey)&&r.error('if "transports" is defined, "url" and "apiKey" should not be defined'),i.push(...e.transports)):e.url?i.push(new et({url:e.url,apiKey:e.apiKey})):r.error('either "url" or "transports" must be defined');let{dedupe:o=!0,eventDomain:v="browser",globalObjectKey:p=l.S,instrumentations:g=function(e={}){let t=[new eS,new ew.w,new ex,new eL,new ej];return!1!==e.enablePerformanceInstrumentation&&t.unshift(new em),!1!==e.enableContentSecurityPolicyInstrumentation&&t.push(new eC),!1!==e.captureConsole&&t.push(new e_({disabledLevels:e.captureConsoleDisabledLevels})),t}(),internalLoggerLevel:b=u.hQ,isolate:y=!1,logArgsSerializer:S=d.c,metas:I=function(e){var t,i;let{page:r,generatePageId:o}=null!==(t=null==e?void 0:e.pageTracking)&&void 0!==t?t:{},a=[w,function({generatePageId:e,initialPageMeta:t}={}){return()=>{let i=location.href;return(0,f.mf)(e)&&n!==i&&(n=i,s=e(location)),{page:Object.assign(Object.assign({url:i},s?{id:s}:{}),t)}}}({generatePageId:o,initialPageMeta:r}),...null!==(i=e.metas)&&void 0!==i?i:[]];return(0,f.Kn)(window.k6)?[...a,O]:a}(e),paused:E=!1,preventGlobalExposure:k=!1,unpatchedConsole:T=c.L,trackUserActionsPreview:P=!1,trackUserActionsDataAttributeName:x="data-faro-user-action-name",url:L}=e;return Object.assign(Object.assign({},eA(e,["dedupe","eventDomain","globalObjectKey","instrumentations","internalLoggerLevel","isolate","logArg
1sSerializer","metas","paused","preventGlobalExposure","unpatchedConsole","trackUserActionsPreview","trackUserActionsDataAttributeName","url"])),{batching:Object.assign(Object.assign({},l.y),e.batching),dedupe:o,globalObjectKey:p,instrumentations:function(e,{trackUserActionsPreview:t}){return e.filter(e=>"@grafana/faro-web-sdk:instrumentation-user-action"!==e.name||!!t)}(g,e),internalLoggerLevel:b,isolate:y,logArgsSerializer:S,metas:I,parseStacktrace:h,paused:E,preventGlobalExposure:k,transports:i,unpatchedConsole:T,eventDomain:v,ignoreUrls:[...null!==(t=e.ignoreUrls)&&void 0!==t?t:[],...L?[L]:[],/\/collect(?:\/[\w]*)?$/],sessionTracking:Object.assign(Object.assign(Object.assign({},m),e.sessionTracking),function({trackGeolocation:e,sessionTracking:t}){var i;let n={};return((0,f.jn)(e)&&(n.geoLocationTrackingEnabled=e),(0,f.xb)(n))?{}:{session:Object.assign(Object.assign({},null!==(i=null==t?void 0:t.session)&&void 0!==i?i:{}),{overrides:n})}}({trackGeolocation:e.trackGeolocation,sessionTracking:e.sessionTracking})),trackUserActionsPreview:P,trackUserActionsDataAttributeName:x})}(e);if(t)return(0,o.p)(t)}},1601:function(e,t,i){i.d(t,{Gs:function(){return o},b7:function(){return n},dN:function(){return a},of:function(){return l},rv:function(){return u},tR:function(){return r},zE:function(){return s}});let n="Non-Error promise rejection captured with value:",s="UnhandledRejection",r="DOMError",o="DOMException",a="Non-Error exception captured with keys:",l="?",u=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i},17927:function(e,t,i){i.d(t,{Gr:function(){return d},KV:function(){return u},T7:function(){return l}});var n=i(26307),s=i(1601),r=i(21222),o=i(52922),a=i(8645);function l(e){let t,i,r,a;let l=[];if((0,n.VW)(e)&&e.error)t=e.error.message,i=e.error.name,l=(0,o.E)(e.error);else if((r=(0,n.YZ)(e))||(0,n.fq)(e)){let{name:n,message:o}=e;i=null!=n?n:r?s.tR:s.Gs,t=o?`${i}: ${o}`:i}else(0,n.VZ)(e)?(t=e.message,l=(0,o.E)(e)):((0,n.Kn)(e)||(a=(0,n.cO)(e)))&&(i=a?e.constructor.name:void 0,t=`${s.dN} ${Object.keys(e)}`);return[t,i,l]}function u(e){let t,i;let[o,u,d,c,f]=e,v=[],h=(0,n.HD)(o),p=(0,a.H)(u,s.of,d,c);return f||!h?([t,i,v]=l(null!=f?f:o),0===v.length&&(v=[p])):h&&([t,i]=function(e){var t,i;let n=e.match(s.rv),o=null!==(t=null==n?void 0:n[1])&&void 0!==t?t:r.A;return[null!==(i=null==n?void 0:n[2])&&void 0!==i?i:e,o]}(o),v=[p]),{value:t,type:i,stackFrames:v}}function d(e,t){return(0,n.VZ)(e[0])?u(e):{value:t(e)}}},65360:function(e,t,i){i.d(t,{w:function(){return l}});var n=i(88558),s=i(23176),r=i(17927),o=i(26307),a=i(1601);class l extends n.F{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-errors",this.version=s.q}initialize(){var e;this.logDebug("Initializing"),function(e){let t=window.onerror;window.onerror=(...i)=>{try{let{value:t,type:n,stackFrames:s}=(0,r.KV)(i),o=i[4];if(t){let i={type:n,stackFrames:s};null!=o&&(i.originalError=o),e.pushError(Error(t),i)}}finally{null==t||t.apply(window,i)}}}(this.api),e=this.api,window.addEventListener("unhandledrejection",t=>{var i,n;let s,l;let u=t;u.reason?u=t.reason:(null===(i=t.detail)||void 0===i?void 0:i.reason)&&(u=null===(n=t.detail)||void 0===n?void 0:n.reason);let d=[];(0,o.pt)(u)?(s=`${a.b7} ${String(u)}`,l=a.zE):[s,l,d]=(0,r.T7)(u),s&&e.pushError(Error(s),{type:l,stackFrames:d})})}}},8645:function(e,t,i){i.d(t,{H:function(){return s}});var n=i(6197);function s(e,t,i,s){let r={filename:e||document.location.href,function:t||n.of};return void 0!==i&&(r.lineno=i),void 0!==s&&(r.colno=s),r}},6197:function(e,t,i){i.d(t,{BI:function(){return s},DV:function(){return l},Ds:function(){return h},GF:function(){return m},Sh:function(){return c},YJ:function(){return v},dl:function(){return n},eP:function(){return f},eS:function(){return d},i7:function(){return p},iS:function(){return g},oM:function(){return a},of:function(){return r},u5:function(){return o},ze:function(){return u}});let n="\n",s="eval",r="?",o="@",a=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,l=/\((\S*)(?::(\d+))(?::(\d+))\)/,u="eval",d="address at ",c=d.length,f=/^\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,v=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,h=" > eval",p="safari-extension",m="safari-web-extension",g=/Minified React error #\d+;/i},52922:function(e,t,i){i.d(t,{E:function(){return a}});var n=i(26307),s=i(8645),r=i(6197);function o(e,t){let i=null==e?void 0:e.includes(r.i7),n=!i&&(null==e?void 0:e.includes(r.GF));return i||n?[(null==e?void 0:e.includes(r.u5))?e.split(r.u5)[0]:e,i?`${r.i7}:${t}`:`${r.GF}:${t}`]:[e,t]}function a(e){let t=[];e.stacktrace?t=e.stacktrace.split(r.dl).filter((e,t)=>
1t%2==0):e.stack&&(t=e.stack.split(r.dl));let i=t.reduce((t,i,a)=>{let l,u,d,c,f;if(l=r.oM.exec(i)){if(u=l[1],d=l[2],c=l[3],f=l[4],null==d?void 0:d.startsWith(r.ze)){let e=r.DV.exec(d);e&&(d=e[1],c=e[2],f=e[3])}d=(null==d?void 0:d.startsWith(r.eS))?d.substring(r.Sh):d,[u,d]=o(u,d)}else if(l=r.eP.exec(i)){if(u=l[1],d=l[3],c=l[4],f=l[5],d&&d.includes(r.Ds)){let e=r.YJ.exec(d);e&&(u=u||r.BI,d=e[1],c=e[2])}else 0===a&&!f&&(0,n.hj)(e.columnNumber)&&(f=String(e.columnNumber+1));[u,d]=o(u,d)}return(d||u)&&t.push((0,s.H)(d,u,c?Number(c):void 0,f?Number(f):void 0)),t},[]);return r.iS.test(e.message)?i.slice(1):i}},77694:function(e,t,i){i.d(t,{a:function(){return o},dF:function(){return r}});var n=i(70390),s=i(26307);function r(e=""){return n.s.transports.transports.flatMap(e=>e.getIgnoreUrls()).some(t=>e&&null!=e.match(t))}function o(e){return(0,s.HD)(e)?e:e instanceof URL?e.href:!(0,s.xb)(e)&&(0,s.mf)(null==e?void 0:e.toString)?e.toString():void 0}}}]);
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.