Files
server/opt/grafana/plugins/grafana-metricsdrilldown-app/module.js
cutemeli 0bfc6c8425 Initial
2025-12-22 10:32:59 +00:00

4 lines
105 KiB
JavaScript

/* [create-plugin] version: 5.26.9 */
/* [create-plugin] plugin: grafana-metricsdrilldown-app@1.0.19 */
define(["i18next","react-router","rxjs","module","@grafana/ui","lodash","react","@emotion/css","@grafana/data","react-dom","@grafana/runtime"],(e,t,n,i,r,s,o,a,l,c,u)=>(()=>{var d,p,f,g,h={211:t=>{"use strict";t.exports=e},1159:e=>{"use strict";e.exports=t},1269:e=>{"use strict";e.exports=n},1308:e=>{"use strict";e.exports=i},2007:e=>{"use strict";e.exports=r},2075:(e,t,n)=>{"use strict";var i;n.d(t,{n1:()=>Ri,Js:()=>Ni}),function(e){e.EXCEPTION="exception",e.LOG="log",e.MEASUREMENT="measurement",e.TRACE="trace",e.EVENT="event"}(i||(i={}));const r={[i.EXCEPTION]:"exceptions",[i.LOG]:"logs",[i.MEASUREMENT]:"measurements",[i.TRACE]:"traces",[i.EVENT]:"events"};function s(e,t){return typeof e===t}function o(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function a(e,t){try{return e instanceof t}catch(e){return!1}}const l=e=>s(e,"null"),c=e=>s(e,"string"),u=e=>s(e,"number")&&!isNaN(e)||s(e,"bigint"),d=e=>s(e,"boolean"),p=e=>!l(e)&&s(e,"object"),f=e=>s(e,"function"),g=e=>o(e,"Array"),h="undefined"!=typeof Event,m="undefined"!=typeof Error,v=e=>m&&a(e,Error);function b(e){return null==e||(g(e)||c(e)?0===e.length:!!p(e)&&0===Object.keys(e).length)}function w(e={}){return JSON.stringify(null!=e?e:{},function(){const e=new WeakSet;return function(t,n){if(p(n)&&null!==n){if(e.has(n))return null;e.add(n)}return n}}())}function y(e={}){const t={};for(const[n,i]of Object.entries(e))t[n]=p(i)&&null!==i?w(i):String(i);return t}function S(){return Date.now()}function T(){return(new Date).toISOString()}function E(e){return new Date(e).toISOString()}function x(e,t){if(e===t)return!0;if(s(e,"number")&&isNaN(e))return s(t,"number")&&isNaN(t);const n=g(e),i=g(t);if(n!==i)return!1;if(n&&i){const n=e.length;if(n!==t.length)return!1;for(let i=n;0!==i--;)if(!x(e[i],t[i]))return!1;return!0}const r=p(e),o=p(t);if(r!==o)return!1;if(e&&t&&r&&o){const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(let e of n)if(!i.includes(e))return!1;for(let i of n)if(!x(e[i],t[i]))return!1;return!0}return!1}const k="Error",I=e=>e.map(e=>p(e)?w(e):String(e)).join(" ");let A;function O({internalLogger:e,config:t,metas:n,transports:r,tracesApi:s,userActionsApi:o}){var a;e.debug("Initializing exceptions API");let u=null;A=null!==(a=t.parseStacktrace)&&void 0!==a?a:A;const d=t=>{e.debug("Changing stacktrace parser"),A=null!=t?t:A},{ignoreErrors:f=[],preserveOriginalError:h}=t;return d(t.parseStacktrace),{changeStacktraceParser:d,getStacktraceParser:()=>A,pushError:(a,{skipDedupe:d,stackFrames:m,type:S,context:I,spanContext:O,timestampOverwriteMs:P,originalError:C}={})=>{if(!function(e,t){const{message:n,name:i,stack:r}=t;return s=e,o=n+" "+i+" "+r,s.some(e=>c(e)?o.includes(e):!!o.match(e));var s,o}(f,null!=C?C:a))try{const c=y(Object.assign(Object.assign({},function(e){let t=e.cause;v(t)?t=e.cause.toString():null!==t&&(p(e.cause)||g(e.cause))?t=w(e.cause):null!=t&&(t=e.cause.toString());return null==t?{}:{cause:t}}(null!=C?C:a)),null!=I?I:{})),f={meta:n.value,payload:Object.assign(Object.assign({type:S||a.name||k,value:a.message,timestamp:P?E(P):T(),trace:O?{trace_id:O.traceId,span_id:O.spanId}:s.getTraceContext()},b(c)?{}:{context:c}),h?{originalError:C}:{}),type:i.EXCEPTION};(null==(m=null!=m?m:a.stack?null==A?void 0:A(a).frames:void 0)?void 0:m.length)&&(f.payload.stacktrace={frames:m});const L={type:f.payload.type,value:f.payload.value,stackTrace:f.payload.stacktrace,context:f.payload.context};if(!d&&t.dedupe&&!l(u)&&x(L,u))return void e.debug("Skipping error push because it is the same as the last one\n",f.payload);u=L,e.debug("Pushing exception\n",f);const R=o.getActiveUserAction();R?R.addItem(f):r.execute(f)}catch(t){e.error("Error pushing event",t)}}}}var P=n(5438);const C=e=>e.map(e=>{try{return String(e)}catch(e){return""}}).join(" ");class L{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(){const e=new L,t=t=>{e.notify(t),n.unsubscribe()},n=this.subscribe(t),i=e.unsubscribe.bind(e);return this.withUnsubscribeOverride(e,i,t)}takeWhile(e){const t=new L,n=i=>{e(i)?t.notify(i):t.unsubscribe(n)};this.subscribe(n);const i=t.unsubscribe.bind(t);return this.withUnsubscribeOverride(t,i,n)}filter(e){const t=new L,n=n=>{e(n)&&t.notify(n)};this.subscribe(n);const i=t.unsubscribe.bind(t);return this.withUnsubscribeOverride(t,i,n)}merge(...e){const t=new L,n=[];e.forEach(e=>{const i=e.subscribe(e=>{t.notify(e)});n.push(i)});const i=t.unsubscribeAll.bind(t);return t.unsubscribe=()=>{n.forEach(e=>e.unsubscribe()),i()},t}withUnsubscribeOverride(e,t,n){return e.unsubscribe=e=>{t(e),this.unsubscribe(n)},e}unsubscribeAll(){this.subscribers=[]}}const R="faroApiCall",j="user_action_start";var N,H;!function(e){e.Normal="normal",e.Critical="critical"}(N||(N={})),function(e){e[e.Started=0]="Started",e[e.Halted=1]="Halted",e[e.Cancelled=2]="Cancelled",e[e.Ended=3]="Ended"}(H||(H={}));const U="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:"undefined"!=typeof self?self:void 0;const _="_faroInternal";let M={};function D(e,t,n,i,r,s,o){return t.debug("Initializing Faro"),M={api:s,config:n,instrumentations:o,internalLogger:t,metas:i,pause:r.pause,transports:r,unpatchedConsole:e,unpause:r.unpause},function(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(U,_,{configurable:!1,enumerable:!1,writable:!1,value:e}))}(M),function(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 U)return void 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"`);Object.defineProperty(U,e.config.globalObjectKey,{configurable:!1,writable:!1,value:e})}}(M),M}const z="abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789";function B(e=10){return Array.from(Array(e)).map(()=>z[Math.floor(59*Math.random())]).join("")}class q{constructor(){this.buffer=[]}addItem(e){this.buffer.push(e)}flushBuffer(e){if(f(e))for(const t of this.buffer)e(t);this.buffer.length=0}size(){return this.buffer.length}}class F extends L{constructor({name:e,parentId:t,haltTimeout:n,trigger:i,transports:r,attributes:s,trackUserActionsExcludeItem:o,severity:a=N.Normal}){super(),this.name=e,this.attributes=s,this.id=B(),this.trigger=i,this.cancelTimeout=100,this.haltTimeout=null!=n?n:1e4,this.parentId=null!=t?t:this.id,this.trackUserActionsExcludeItem=o,this.severity=a,this._itemBuffer=new q,this._transports=r,this._haltTimeoutId=-1,this._state=H.Started,this._isValid=!1,this._start()}addItem(e){this._itemBuffer.addItem(e)}extend(e){this._isValid||(this._isValid=!0),this._setFollowupActionTimeout(e)}_setFollowupActionTimeout(e){this._timeoutId=function(e,t,n){e&&clearTimeout(e);return e=setTimeout(()=>{t()},n)}(this._timeoutId,()=>{this._state===H.Started&&(null==e?void 0:e())?this.halt():this._isValid?this.end():this.cancel()},100)}_start(){this._state=H.Started,this._state===H.Started&&(this.startTime=S()),this._setFollowupActionTimeout()}halt(){this._state===H.Started&&(this._state=H.Halted,this._haltTimeoutId=setTimeout(()=>{this.end()},this.haltTimeout),this.notify(this._state))}cancel(){this._state===H.Started&&this._itemBuffer.flushBuffer(),this._state=H.Cancelled,this.notify(this._state)}end(){if(this._state===H.Cancelled)return;clearTimeout(this._haltTimeoutId),clearTimeout(this._timeoutId);const e=S(),t=e-this.startTime;this._state=H.Ended,this._itemBuffer.flushBuffer(e=>{if(function(e,t){return(null==t?void 0:t(e))||e.type===i.MEASUREMENT&&"web-vitals"===e.payload.type}(e,this.trackUserActionsExcludeItem))return void this._transports.execute(e);const t=Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{action:{parentId:this.id,name:this.name}})});this._transports.execute(t)}),this._state=H.Ended,this.notify(this._state),M.api.pushEvent(this.name,Object.assign({userActionStartTime:this.startTime.toString(),userActionEndTime:e.toString(),userActionDuration:t.toString(),userActionTrigger:this.trigger,userActionSeverity:this.severity},y(this.attributes)),void 0,{timestampOverwriteMs:this.startTime,customPayloadTransformer:e=>(e.action={id:this.id,name:this.name},e)})}getState(){return this._state}}const $=new L;function V(e,t,n,r,s){t.debug("Initializing API");const o=function({transports:e,internalLogger:t,config:n}){const i=n.trackUserActionsExcludeItem;let r;const s=()=>r;return{startUserAction:(n,o,a)=>{if(void 0===s()){const t=new F({name:n,transports:e,attributes:o,trigger:(null==a?void 0:a.triggerName)||R,trackUserActionsExcludeItem:i});return t.filter(e=>[H.Ended,H.Cancelled].includes(e)).first().subscribe(()=>{r=void 0}),$.notify({type:j,userAction:t}),r=t,r}t.error("Attempted to create a new user action while one is already running. This is not possible.")},getActiveUserAction:s}}({transports:s,config:n,internalLogger:t}),a=function(e,t,n,r,s){let o;return t.debug("Initializing traces API"),{getOTEL:()=>o,getTraceContext:()=>{const e=null==o?void 0:o.trace.getSpanContext(o.context.active());return e?{trace_id:e.traceId,span_id:e.spanId}:void 0},initOTEL:(e,n)=>{t.debug("Initializing OpenTelemetry"),o={trace:e,context:n}},isOTELInitialized:()=>!!o,pushTraces:e=>{try{const n={type:i.TRACE,payload:e,meta:r.value};t.debug("Pushing trace\n",n),s.execute(n)}catch(e){t.error("Error pushing trace\n",e)}}}}(0,t,0,r,s),u={unpatchedConsole:e,internalLogger:t,userActionsApi:o,config:n,metas:r,transports:s,tracesApi:a};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),O(u)),function({internalLogger:e,metas:t}){let n,i,r,s;e.debug("Initializing meta API");const o=e=>{i&&t.remove(i),i={user:e},t.add(i)},a=(e,i)=>{var r;const s=null==i?void 0:i.overrides,o=s?{overrides:Object.assign(Object.assign({},null===(r=null==n?void 0:n.session)||void 0===r?void 0:r.overrides),s)}:{};n&&t.remove(n),n={session:Object.assign(Object.assign({},b(e)?void 0:e),o)},t.add(n)},l=()=>t.value.session,u=()=>t.value.page;return{setUser:o,resetUser:o,setSession:a,resetSession:a,getSession:l,setView:(e,n)=>{var i;if((null==n?void 0:n.overrides)&&a(l(),{overrides:n.overrides}),(null===(i=null==r?void 0:r.view)||void 0===i?void 0:i.name)===(null==e?void 0:e.name))return;const s=r;r={view:e},t.add(r),s&&t.remove(s)},getView:()=>t.value.view,setPage:e=>{var n;const i=c(e)?Object.assign(Object.assign({},null!==(n=null==s?void 0:s.page)&&void 0!==n?n:u()),{id:e}):e;s&&t.remove(s),s={page:i},t.add(s)},getPage:u}}(u)),function({internalLogger:e,config:t,metas:n,transports:r,tracesApi:s,userActionsApi:o}){var a;e.debug("Initializing logs API");let c=null;const u=null!==(a=t.logArgsSerializer)&&void 0!==a?a:C;return{pushLog:(a,{context:d,level:p,skipDedupe:f,spanContext:g,timestampOverwriteMs:h}={})=>{try{const m=y(d),v={type:i.LOG,payload:{message:u(a),level:null!=p?p:P.Ic,context:b(m)?void 0:m,timestamp:h?E(h):T(),trace:g?{trace_id:g.traceId,span_id:g.spanId}:s.getTraceContext()},meta:n.value},w={message:v.payload.message,level:v.payload.level,context:v.payload.context};if(!f&&t.dedupe&&!l(c)&&x(w,c))return void e.debug("Skipping log push because it is the same as the last one\n",v.payload);c=w,e.debug("Pushing log\n",v);const S=o.getActiveUserAction();S?S.addItem(v):r.execute(v)}catch(t){e.error("Error pushing log\n",t)}}}}(u)),function({internalLogger:e,config:t,metas:n,transports:r,tracesApi:s,userActionsApi:o}){e.debug("Initializing measurements API");let a=null;return{pushMeasurement:(c,{skipDedupe:u,context:d,spanContext:p,timestampOverwriteMs:f}={})=>{try{const g=y(d),h={type:i.MEASUREMENT,payload:Object.assign(Object.assign({},c),{trace:p?{trace_id:p.traceId,span_id:p.spanId}:s.getTraceContext(),timestamp:f?E(f):T(),context:b(g)?void 0:g}),meta:n.value},m={type:h.payload.type,values:h.payload.values,context:h.payload.context};if(!u&&t.dedupe&&!l(a)&&x(m,a))return void e.debug("Skipping measurement push because it is the same as the last one\n",h.payload);a=m,e.debug("Pushing measurement\n",h);const v=o.getActiveUserAction();v?v.addItem(h):r.execute(h)}catch(t){e.error("Error pushing measurement\n",t)}}}}(u)),function({internalLogger:e,config:t,metas:n,transports:r,tracesApi:s,userActionsApi:o}){let a=null;return{pushEvent:(c,u,d,{skipDedupe:p,spanContext:f,timestampOverwriteMs:g,customPayloadTransformer:h=e=>e}={})=>{try{const m=y(u),v={meta:n.value,payload:h({name:c,domain:null!=d?d:t.eventDomain,attributes:b(m)?void 0:m,timestamp:g?E(g):T(),trace:f?{trace_id:f.traceId,span_id:f.spanId}:s.getTraceContext()}),type:i.EVENT},w={name:v.payload.name,attributes:v.payload.attributes,domain:v.payload.domain};if(!p&&t.dedupe&&!l(a)&&x(w,a))return void e.debug("Skipping event push because it is the same as the last one\n",v.payload);a=w,e.debug("Pushing event\n",v);const S=o.getActiveUserAction();S?S.addItem(v):r.execute(v)}catch(t){e.error("Error pushing event",t)}}}}(u)),o)}function K(){}var W;!function(e){e[e.OFF=0]="OFF",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.VERBOSE=4]="VERBOSE"}(W||(W={}));const G={debug:K,error:K,info:K,prefix:"Faro",warn:K},J=W.ERROR,X=Object.assign({},console);function Q(e=X,t=J){const n=G;return t>W.OFF&&(n.error=t>=W.ERROR?function(...t){e.error(`${n.prefix}\n`,...t)}:K,n.warn=t>=W.WARN?function(...t){e.warn(`${n.prefix}\n`,...t)}:K,n.info=t>=W.INFO?function(...t){e.info(`${n.prefix}\n`,...t)}:K,n.debug=t>=W.VERBOSE?function(...t){e.debug(`${n.prefix}\n`,...t)}:K),n}let Y=G;function Z(e,t){return Y=Q(e,t.internalLoggerLevel),Y}const ee="2.0.0-beta-2";class te{constructor(e,t){var n,i;this.signalBuffer=[],this.itemLimit=null!==(n=null==t?void 0:t.itemLimit)&&void 0!==n?n:50,this.sendTimeout=null!==(i=null==t?void 0:t.sendTimeout)&&void 0!==i?i:250,this.paused=(null==t?void 0:t.paused)||!1,this.sendFn=e,this.flushInterval=-1,this.paused||this.start(),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.flush()})}addItem(e){this.paused||(this.signalBuffer.push(e),this.signalBuffer.length>=this.itemLimit&&this.flush())}start(){this.paused=!1,this.sendTimeout>0&&(this.flushInterval=window.setInterval(()=>this.flush(),this.sendTimeout))}pause(){this.paused=!0,clearInterval(this.flushInterval)}groupItems(e){const t=new Map;return e.forEach(e=>{const n=JSON.stringify(e.meta);let i=t.get(n);i=void 0===i?[e]:[...i,e],t.set(n,i)}),Array.from(t.values())}flush(){if(this.paused||0===this.signalBuffer.length)return;this.groupItems(this.signalBuffer).forEach(this.sendFn),this.signalBuffer=[]}}function ne(e,t,n,i){var r;t.debug("Initializing transports");const s=[];let o=n.paused,a=[];const l=e=>{let t=e;for(const e of a){const i=t.map(e).filter(Boolean);if(0===i.length)return[];t=ie(i,n)}return t},c=e=>{const n=l(e);if(0!==n.length)for(const e of s)t.debug(`Transporting item using ${e.name}\n`,n),e.isBatched()&&e.send(n)};let u;(null===(r=n.batching)||void 0===r?void 0:r.enabled)&&(u=new te(c,{sendTimeout:n.batching.sendTimeout,itemLimit:n.batching.itemLimit,paused:o}));return{add:(...r)=>{t.debug("Adding transports"),r.forEach(r=>{t.debug(`Adding "${r.name}" transport`);s.some(e=>e===r)?t.warn(`Transport ${r.name} is already added`):(r.unpatchedConsole=e,r.internalLogger=t,r.config=n,r.metas=i,s.push(r))})},addBeforeSendHooks:(...e)=>{t.debug("Adding beforeSendHooks\n",a),e.forEach(e=>{e&&a.push(e)})},getBeforeSendHooks:()=>[...a],execute:e=>{var i;o||((null===(i=n.batching)||void 0===i?void 0:i.enabled)&&(null==u||u.addItem(e)),(e=>{var i,r;if((null===(i=n.batching)||void 0===i?void 0:i.enabled)&&s.every(e=>e.isBatched()))return;const[o]=l([e]);if(void 0!==o)for(const e of s)t.debug(`Transporting item using ${e.name}\n`,o),e.isBatched()?(null===(r=n.batching)||void 0===r?void 0:r.enabled)||e.send([o]):e.send(o)})(e))},isPaused:()=>o,pause:()=>{t.debug("Pausing transports"),null==u||u.pause(),o=!0},remove:(...e)=>{t.debug("Removing transports"),e.forEach(e=>{t.debug(`Removing "${e.name}" transport`);const n=s.indexOf(e);-1!==n?s.splice(n,1):t.warn(`Transport "${e.name}" is not added`)})},removeBeforeSendHooks:(...e)=>{a.filter(t=>!e.includes(t))},get transports(){return[...s]},unpause:()=>{t.debug("Unpausing transports"),null==u||u.start(),o=!1}}}function ie(e,t){if(t.preserveOriginalError)for(const t of e)t.type===i.EXCEPTION&&delete t.payload.originalError;return e}let re=X;function se(e){var t;return re=null!==(t=e.unpatchedConsole)&&void 0!==t?t:re,re}function oe(e){const t=se(e),n=Z(t,e);if(_ in U&&!e.isolate)return void n.error('Faro is already registered. Either add instrumentations, transports etc. to the global faro instance or use the "isolate" property');n.debug("Initializing");const i=function(e,t){let n=[],i=[];const r=()=>n.reduce((e,t)=>Object.assign(e,f(t)?t():t),{}),s=()=>{if(i.length){const e=r();i.forEach(t=>t(e))}};return{add:(...e)=>{t.debug("Adding metas\n",e),n.push(...e),s()},remove:(...e)=>{t.debug("Removing metas\n",e),n=n.filter(t=>!e.includes(t)),s()},addListener:e=>{t.debug("Adding metas listener\n",e),i.push(e)},removeListener:e=>{t.debug("Removing metas listener\n",e),i=i.filter(t=>t!==e)},get value(){return r()}}}(0,n),r=ne(t,n,e,i),s=V(t,n,e,i,r),o=function(e,t,n,i,r,s){t.debug("Initializing instrumentations");const o=[];return{add:(...a)=>{t.debug("Adding instrumentations"),a.forEach(a=>{t.debug(`Adding "${a.name}" instrumentation`),o.some(e=>e.name===a.name)?t.warn(`Instrumentation ${a.name} is already added`):(a.unpatchedConsole=e,a.internalLogger=t,a.config=n,a.metas=i,a.transports=r,a.api=s,o.push(a),a.initialize())})},get instrumentations(){return[...o]},remove:(...e)=>{t.debug("Removing instrumentations"),e.forEach(e=>{var n,i;t.debug(`Removing "${e.name}" instrumentation`);const r=o.reduce((t,n,i)=>null===t&&n.name===e.name?i:null,null);null!==r?(null===(i=(n=o[r]).destroy)||void 0===i||i.call(n),o.splice(r,1)):t.warn(`Instrumentation "${e.name}" is not added`)})}}}(t,n,e,i,r,s),a=D(t,n,e,i,r,s,o);return function(e){var t,n;const i={sdk:{version:ee},app:{bundleId:e.config.app.name&&(r=e.config.app.name,null==U?void 0:U[`__faroBundleId_${r}`])}};var r;const s=null===(t=e.config.sessionTracking)||void 0===t?void 0:t.session;s&&e.api.setSession(s),e.config.app&&(i.app=Object.assign(Object.assign({},e.config.app),i.app)),e.config.user&&(i.user=e.config.user),e.config.view&&(i.view=e.config.view),e.metas.add(i,...null!==(n=e.config.metas)&&void 0!==n?n:[])}(a),function(e){e.transports.add(...e.config.transports),e.transports.addBeforeSendHooks(e.config.beforeSend)}(a),function(e){e.instrumentations.add(...e.config.instrumentations)}(a),a}const ae="faro",le={enabled:!0,sendTimeout:250,itemLimit:50},ce="browser",ue="\n",de="eval",pe="?",fe="@",ge=/^\s*at (?:(?![a-z]+:\/\/)([^(]+?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,he=/\((\S*)(?::(\d+))(?::(\d+))\)/,me="eval",ve="address at ",be=ve.length,we=/^\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,ye=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Se=" > eval",Te="safari-extension",Ee="safari-web-extension",xe=/Minified React error #\d+;/i;function ke(e,t,n,i){const r={filename:e||document.location.href,function:t||pe};return void 0!==n&&(r.lineno=n),void 0!==i&&(r.colno=i),r}function Ie(e,t){const n=null==e?void 0:e.includes(Te),i=!n&&(null==e?void 0:e.includes(Ee));return n||i?[(null==e?void 0:e.includes(fe))?e.split(fe)[0]:e,n?`${Te}:${t}`:`${Ee}:${t}`]:[e,t]}function Ae(e){let t=[];e.stacktrace?t=e.stacktrace.split(ue).filter((e,t)=>t%2==0):e.stack&&(t=e.stack.split(ue));const n=t.reduce((t,n,i)=>{let r,s,o,a,l;if(r=ge.exec(n)){if(s=r[1],o=r[2],a=r[3],l=r[4],null==o?void 0:o.startsWith(me)){const e=he.exec(o);e&&(o=e[1],a=e[2],l=e[3])}o=(null==o?void 0:o.startsWith(ve))?o.substring(be):o,[s,o]=Ie(s,o)}else if(r=we.exec(n)){if(s=r[1],o=r[3],a=r[4],l=r[5],o&&o.includes(Se)){const e=ye.exec(o);e&&(s=s||de,o=e[1],a=e[2])}else 0===i&&!l&&u(e.columnNumber)&&(l=String(e.columnNumber+1));[s,o]=Ie(s,o)}return(o||s)&&t.push(ke(o,s,a?Number(a):void 0,l?Number(l):void 0)),t},[]);return xe.test(e.message)?n.slice(1):n}function Oe(e){return{frames:Ae(e)}}const Pe="com.grafana.faro.session",Ce=9e5,Le={enabled:!0,persistent:!1,maxSessionPersistenceTime:Ce},Re="http-request-start",je="http-request-end",Ne="data-faro-user-action-name";var He=n(6660);const Ue="unknown",_e=()=>{const e=new He.UAParser,{name:t,version:n}=e.getBrowser(),{name:i,version:r}=e.getOS(),s=e.getUA(),o=navigator.language,a=navigator.userAgent.includes("Mobi"),l=function(){if(!t||!n)return;if("userAgentData"in navigator&&navigator.userAgentData)return navigator.userAgentData.brands;return}();return{browser:{name:null!=t?t:Ue,version:null!=n?n:Ue,os:`${null!=i?i:Ue} ${null!=r?r:Ue}`,userAgent:null!=s?s:Ue,language:null!=o?o:Ue,mobile:a,brands:null!=l?l:Ue,viewportWidth:`${window.innerWidth}`,viewportHeight:`${window.innerHeight}`}}},Me=()=>{const e=window.k6;return{k6:Object.assign({isK6Browser:!0},(null==e?void 0:e.testRunId)&&{testRunId:null==e?void 0:e.testRunId})}};let De,ze;function Be({generatePageId:e,initialPageMeta:t}={}){return()=>{const n=location.href;return f(e)&&De!==n&&(De=n,ze=e(location)),{page:Object.assign(Object.assign({url:n},ze?{id:ze}:{}),t)}}}class qe{constructor(){this.unpatchedConsole=X,this.internalLogger=G,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)}}class Fe extends qe{isBatched(){return!1}getIgnoreUrls(){return[]}}function $e(e,t){var n,i;if(void 0===t)return e;if(void 0===e)return{resourceSpans:t};const r=null===(n=e.resourceSpans)||void 0===n?void 0:n[0];if(void 0===r)return e;const s=(null==r?void 0:r.scopeSpans)||[],o=(null===(i=null==t?void 0:t[0])||void 0===i?void 0:i.scopeSpans)||[];return Object.assign(Object.assign({},e),{resourceSpans:[Object.assign(Object.assign({},r),{scopeSpans:[...s,...o]})]})}function Ve(e,t){let n,i=!1;const r=()=>{null!=n?(e(...n),n=null,setTimeout(r,t)):i=!1};return(...s)=>{i?n=s:(e(...s),i=!0,setTimeout(r,t))}}const Ke="sessionStorage",We="localStorage";function Ge(e){var t;try{let t;t=window[e];const n="__faro_storage_test__";return t.setItem(n,n),t.removeItem(n),!0}catch(n){return null===(t=M.internalLogger)||void 0===t||t.info(`Web storage of type ${e} is not available. Reason: ${n}`),!1}}function Je(e,t){return et(t)?window[t].getItem(e):null}function Xe(e,t,n){if(et(n))try{window[n].setItem(e,t)}catch(e){}}function Qe(e,t){et(t)&&window[t].removeItem(e)}const Ye=Ge(We),Ze=Ge(Ke);function et(e){return e===We?Ye:e===Ke&&Ze}const tt="session_start",nt="session_resume",it="service_name_override";function rt(){var e,t,n;const i=M.config.sessionTracking;let r=null!==(n=null!==(t=null===(e=null==i?void 0:i.sampler)||void 0===e?void 0:e.call(i,{metas:M.metas.value}))&&void 0!==t?t:null==i?void 0:i.samplingRate)&&void 0!==n?n:1;if("number"!=typeof r){r=0}return Math.random()<r}function st({sessionId:e,started:t,lastActivity:n,isSampled:i=!0}={}){var r,s;const o=S(),a=null===(s=null===(r=M.config)||void 0===r?void 0:r.sessionTracking)||void 0===s?void 0:s.generateSessionId;return null==e&&(e="function"==typeof a?a():B()),{sessionId:e,lastActivity:null!=n?n:o,started:null!=t?t:o,isSampled:i}}function ot(e){if(null==e)return!1;const t=S();if(!(t-e.started<144e5))return!1;return t-e.lastActivity<Ce}function at({fetchUserSession:e,storeUserSession:t}){return function({forceSessionExtend:n}={forceSessionExtend:!1}){var i,r,s;if(!e||!t)return;const o=M.config.sessionTracking,a=null==o?void 0:o.persistent;if(a&&!Ye||!a&&!Ze)return;const l=e();if(!1===n&&ot(l))t(Object.assign(Object.assign({},l),{lastActivity:S()}));else{let e=lt(st({isSampled:rt()}),l);t(e),null===(i=M.api)||void 0===i||i.setSession(e.sessionMeta),null===(r=null==o?void 0:o.onSessionChange)||void 0===r||r.call(o,null!==(s=null==l?void 0:l.sessionMeta)&&void 0!==s?s:null,e.sessionMeta)}}}function lt(e,t){var n,i,r,s,o,a,l;const c=Object.assign(Object.assign({},e),{sessionMeta:{id:e.sessionId,attributes:Object.assign(Object.assign(Object.assign({},null===(i=null===(n=M.config.sessionTracking)||void 0===n?void 0:n.session)||void 0===i?void 0:i.attributes),null!==(s=null===(r=M.metas.value.session)||void 0===r?void 0:r.attributes)&&void 0!==s?s:{}),{isSampled:e.isSampled.toString()})}}),u=null!==(a=null===(o=M.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;b(u)||(c.sessionMeta.overrides=u);const d=null==t?void 0:t.sessionId;return null!=d&&(c.sessionMeta.attributes.previousSession=d),c}function ct({fetchUserSession:e,storeUserSession:t}){return function(n){const i=n.session,r=e();let s=null==i?void 0:i.id;const o=null==i?void 0:i.attributes,a=null==i?void 0:i.overrides,l=null==r?void 0:r.sessionMeta,c=null==l?void 0:l.overrides,u=!!a&&!x(a,c),d=!!o&&!x(o,null==l?void 0:l.attributes);if(!!i&&s!==(null==r?void 0:r.sessionId)||d||u){const e=lt(st({sessionId:s,isSampled:rt()}),r);t(e),function(e,t={},n={}){var i,r,s;if(!e)return;const o=t.serviceName,a=null!==(s=null!==(i=n.serviceName)&&void 0!==i?i:null===(r=M.metas.value.app)||void 0===r?void 0:r.name)&&void 0!==s?s:"";o&&o!==a&&M.api.pushEvent(it,{serviceName:o,previousServiceName:a})}(u,a,c),M.api.setSession(e.sessionMeta)}}}class ut{constructor(){this.updateSession=Ve(()=>this.updateUserSession(),1e3),this.updateUserSession=at({fetchUserSession:ut.fetchUserSession,storeUserSession:ut.storeUserSession}),this.init()}static removeUserSession(){Qe(Pe,ut.storageTypeLocal)}static storeUserSession(e){Xe(Pe,w(e),ut.storageTypeLocal)}static fetchUserSession(){const e=Je(Pe,ut.storageTypeLocal);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&this.updateSession()}),M.metas.addListener(ct({fetchUserSession:ut.fetchUserSession,storeUserSession:ut.storeUserSession}))}}ut.storageTypeLocal=We;class dt{constructor(){this.updateSession=Ve(()=>this.updateUserSession(),1e3),this.updateUserSession=at({fetchUserSession:dt.fetchUserSession,storeUserSession:dt.storeUserSession}),this.init()}static removeUserSession(){Qe(Pe,dt.storageTypeSession)}static storeUserSession(e){Xe(Pe,w(e),dt.storageTypeSession)}static fetchUserSession(){const e=Je(Pe,dt.storageTypeSession);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&this.updateSession()}),M.metas.addListener(ct({fetchUserSession:dt.fetchUserSession,storeUserSession:dt.storeUserSession}))}}function pt(e){return(null==e?void 0:e.persistent)?ut:dt}dt.storageTypeSession=Ke;var ft=function(e,t,n,i){return new(n||(n=Promise))(function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}l((i=i.apply(e,t||[])).next())})},gt=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};class ht extends Fe{constructor(e){var t,n,i,r;super(),this.options=e,this.name="@grafana/faro-web-sdk:transport-fetch",this.version=ee,this.disabledUntil=new Date,this.rateLimitBackoffMs=null!==(t=e.defaultRateLimitBackoffMs)&&void 0!==t?t:5e3,this.getNow=null!==(n=e.getNow)&&void 0!==n?n:()=>Date.now(),this.promiseBuffer=function(e){const{size:t,concurrency:n}=e,i=[];let r=0;const s=()=>{if(r<n&&i.length){const{producer:e,resolve:t,reject:n}=i.shift();r++,e().then(e=>{r--,s(),t(e)},e=>{r--,s(),n(e)})}};return{add:e=>{if(i.length+r>=t)throw new Error("Task buffer full");return new Promise((t,n)=>{i.push({producer:e,resolve:t,reject:n}),s()})}}}({size:null!==(i=e.bufferSize)&&void 0!==i?i:30,concurrency:null!==(r=e.concurrency)&&void 0!==r?r:5})}send(e){return ft(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(()=>{const t=JSON.stringify(function(e){let t={meta:{}};return void 0!==e[0]&&(t.meta=e[0].meta),e.forEach(e=>{switch(e.type){case i.LOG:case i.EVENT:case i.EXCEPTION:case i.MEASUREMENT:const n=r[e.type],s=t[n];t=Object.assign(Object.assign({},t),{[n]:void 0===s?[e.payload]:[...s,e.payload]});break;case i.TRACE:t=Object.assign(Object.assign({},t),{traces:$e(t.traces,e.payload.resourceSpans)})}}),t}(e)),{url:n,requestOptions:s,apiKey:o}=this.options,a=null!=s?s:{},{headers:l}=a,c=gt(a,["headers"]);let u;const d=this.metas.value.session;return null!=d&&(u=d.id),fetch(n,Object.assign({method:"POST",headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},null!=l?l:{}),o?{"x-api-key":o}:{}),u?{"x-faro-session-id":u}:{}),body:t,keepalive:t.length<=6e4},null!=c?c:{})).then(e=>ft(this,void 0,void 0,function*(){if(202===e.status){"invalid"===e.headers.get("X-Faro-Session-Status")&&this.extendFaroSession(this.config,this.logDebug)}return 429===e.status&&(this.disabledUntil=this.getRetryAfterDate(e),this.logWarn(`Too many requests, backing off until ${this.disabledUntil}`)),e.text().catch(K),e})).catch(e=>{this.logError("Failed sending payload to the receiver\n",JSON.parse(t),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){const t=this.getNow(),n=e.headers.get("Retry-After");if(n){const e=Number(n);if(!isNaN(e))return new Date(1e3*e+t);const i=Date.parse(n);if(!isNaN(i))return new Date(i)}return new Date(t+this.rateLimitBackoffMs)}extendFaroSession(e,t){const n="Session expired",i=e.sessionTracking;if(null==i?void 0:i.enabled){const{fetchUserSession:e,storeUserSession:r}=pt(i);at({fetchUserSession:e,storeUserSession:r})({forceSessionExtend:!0}),t(`${n} created new session.`)}else t(`${n}.`)}}class mt extends qe{constructor(){super(...arguments),this.api={},this.transports={}}}function vt(e=""){return M.transports.transports.flatMap(e=>e.getIgnoreUrls()).some(t=>e&&null!=e.match(t))}const bt="fetch",wt="xhr";function yt(){const e=new L;function t(t){e.notify({type:Re,request:t})}function n(t){e.notify({type:je,request:t})}return function({onRequestEnd:e,onRequestStart:t}){const n=window.fetch;window.fetch=function(){var i,r;const s=null!==(i=c(o=arguments[0])?o:o instanceof URL?o.href:!b(o)&&f(null==o?void 0:o.toString)?o.toString():void 0)&&void 0!==i?i:"";var o;const a=vt(s),l=(null!==(r=arguments[1])&&void 0!==r?r:{}).method,u=B();return a||t({url:s,method:l,requestId:u,apiType:bt}),n.apply(this,arguments).then(t=>(a||e({url:s,method:l,requestId:u,apiType:bt}),t)).catch(t=>{throw a||e({url:s,method:l,requestId:u,apiType:bt}),t})}}({onRequestStart:t,onRequestEnd:n}),function({onRequestStart:e,onRequestEnd:t}){const n=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){const i=arguments[1],r=vt(i),s=arguments[0],o=B();this.addEventListener("loadstart",function(){r||e({url:i,method:s,requestId:o,apiType:wt})}),this.addEventListener("load",function(){r||t({url:i,method:s,requestId:o,apiType:wt})}),this.addEventListener("error",function(){r||t({url:i,method:s,requestId:o,apiType:wt})}),this.addEventListener("abort",function(){r||t({url:i,method:s,requestId:o,apiType:wt})}),n.apply(this,arguments)}}({onRequestStart:t,onRequestEnd:n}),e}const St="com.grafana.faro.lastNavigationId",Tt="resource",Et=/^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;function xt(e=[]){for(const t of e)if("traceparent"===t.name){if(!Et.test(t.description))continue;const[,e,n]=t.description.split("-");if(null!=e&&null!=n)return{traceId:e,spanId:n};break}}function kt(e,t={}){for(const[n,i]of Object.entries(t)){const t=e[n];return null!=t&&(g(i)?i.includes(t):t===i)}return!0}function It(e){const{connectEnd:t,connectStart:n,decodedBodySize:i,domainLookupEnd:r,domainLookupStart:s,duration:o,encodedBodySize:a,fetchStart:l,initiatorType:c,name:u,nextHopProtocol:d,redirectEnd:p,redirectStart:f,renderBlockingStatus:g,requestStart:h,responseEnd:m,responseStart:v,responseStatus:b,secureConnectionStart:w,transferSize:y,workerStart:S}=e;return{name:u,duration:Ot(o),tcpHandshakeTime:Ot(t-n),dnsLookupTime:Ot(r-s),tlsNegotiationTime:Ot(t-w),responseStatus:Ot(b),redirectTime:Ot(p-f),requestTime:Ot(v-h),responseTime:Ot(m-v),fetchTime:Ot(m-l),serviceWorkerTime:Ot(l-S),decodedBodySize:Ot(i),encodedBodySize:Ot(a),cacheHitStatus:function(){let e="fullLoad";0===y?i>0&&(e="cache"):null!=b?304===b&&(e="conditionalFetch"):a>0&&y<a&&(e="conditionalFetch");return e}(),renderBlockingStatus:Ot(g),protocol:d,initiatorType:c,visibilityState:document.visibilityState,ttfb:Ot(v-h),transferSize:Ot(y)}}function At(e){const{activationStart:t,domComplete:n,domContentLoadedEventEnd:i,domContentLoadedEventStart:r,domInteractive:s,fetchStart:o,loadEventEnd:a,loadEventStart:l,responseStart:c,type:u}=e,d=function(){var e;if(null!=(null===(e=performance.timing)||void 0===e?void 0:e.domLoading))return performance.timing.domLoading-performance.timeOrigin;return null}();return Object.assign(Object.assign({},It(e)),{pageLoadTime:Ot(n-o),documentParsingTime:Ot(d?s-d:null),domProcessingTime:Ot(n-s),domContentLoadHandlerTime:Ot(i-r),onLoadTime:Ot(a-l),ttfb:Ot(Math.max(c-(null!=t?t:0),0)),type:u})}function Ot(e){return null==e?Ue:"number"==typeof e?Math.round(e>0?e:0).toString():e.toString()}const Pt={initiatorType:["xmlhttprequest","fetch"]};var Ct=function(e,t,n,i){return new(n||(n=Promise))(function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}l((i=i.apply(e,t||[])).next())})};const Lt=new L;class Rt extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-performance",this.version=ee}initialize(){"PerformanceObserver"in window?function(e){if("complete"===document.readyState)e();else{const t=()=>{"complete"===document.readyState&&(e(),document.removeEventListener("readystatechange",t))};document.addEventListener("readystatechange",t)}}(()=>Ct(this,void 0,void 0,function*(){const e=this.api.pushEvent,{faroNavigationId:t}=yield function(e){let t;const n=new Promise(e=>{t=e});return new PerformanceObserver(n=>{var i;const[r]=n.getEntries();if(null==r||vt(r.name))return;const s=r.toJSON();let o=xt(null==s?void 0:s.serverTiming);const a=null!==(i=Je(St,Ke))&&void 0!==i?i:Ue,l=Object.assign(Object.assign({},At(s)),{faroNavigationId:B(),faroPreviousNavigationId:a});Xe(St,l.faroNavigationId,Ke),e("faro.performance.navigation",l,void 0,{spanContext:o,timestampOverwriteMs:performance.timeOrigin+s.startTime}),t(l)}).observe({type:"navigation",buffered:!0}),n}(e);null!=t&&function(e,t,n){const i=M.config.trackResources;new PerformanceObserver(r=>{const s=r.getEntries();for(const r of s){if(vt(r.name))return;const s=r.toJSON();let o=xt(null==s?void 0:s.serverTiming);if(null==i&&kt(s,Pt)||i){const i=Object.assign(Object.assign({},It(s)),{faroNavigationId:e,faroResourceId:B()});M.config.trackUserActionsPreview&&(null==n||n.notify({type:Tt})),t("faro.performance.resource",i,void 0,{spanContext:o,timestampOverwriteMs:performance.timeOrigin+s.startTime})}}}).observe({type:Tt,buffered:!0})}(t,e,Lt)})):this.logDebug("performance observer not supported. Disable performance instrumentation.")}}function jt(e){const{api:t,config:n}=e,i=yt(),r=function(){const e=new L;return new MutationObserver((t,n)=>{e.notify({type:"dom-mutation"})}).observe(document,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),e}(),s=function(){const e=new L;return Lt.subscribe(t=>{t.type===Tt&&e.notify({type:"resource-entry"})}),e}();function o(e){const t=new Map,n=(new L).merge(i,r,s).takeWhile(()=>[H.Started,H.Halted].includes(e.getState())).filter(n=>!!(e.getState()!==H.Halted||Nt(n)&&t.has(n.request.requestId))).subscribe(n=>{(function(e){return e.type===Re})(n)&&t.set(n.request.requestId,n.request),Nt(n)&&t.delete(n.request.requestId),Nt(n)?e.getState()===H.Halted&&0===t.size&&e.end():e.extend(()=>t.size>0)});e.filter(e=>[H.Ended,H.Cancelled].includes(e)).first().subscribe(()=>{!function(e){null==e||e.unsubscribe(),e=void 0}(n)})}return{processUserEvent:function(e){var i;const r=function(e,t){const n=function(e){const t=e.split("data-")[1],n=null==t?void 0:t.replace(/-(.)/g,(e,t)=>t.toUpperCase());return null==n?void 0:n.replace(/-/g,"")}(t),i=e.dataset;for(const e in i)if(e===n)return i[e];return}(e.target,null!==(i=n.trackUserActionsDataAttributeName)&&void 0!==i?i:"faroUserActionName");if(!r)return;const s=t.startUserAction(r,{},{triggerName:e.type});s&&o(s)},proceessUserActionStarted:o}}function Nt(e){return e.type===je}class Ht extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-user-action",this.version=ee}initialize(){const{processUserEvent:e,proceessUserActionStarted:t}=jt(M);window.addEventListener("pointerdown",e),window.addEventListener("keydown",t=>{[" ","Enter"].includes(t.key)&&e(t)}),this._userActionSub=$.subscribe(({type:e,userAction:n})=>{"user_action_start"===e&&t(n)})}destroy(){var e;null===(e=this._userActionSub)||void 0===e||e.unsubscribe()}}const Ut=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function _t(e){let t,n,i,r,s=[];if((e=>o(e,"ErrorEvent"))(e)&&e.error)t=e.error.message,n=e.error.name,s=Ae(e.error);else if((i=(e=>o(e,"DOMError"))(e))||(e=>o(e,"DOMException"))(e)){const{name:r,message:s}=e;n=null!=r?r:i?"DOMError":"DOMException",t=s?`${n}: ${s}`:n}else v(e)?(t=e.message,s=Ae(e)):(p(e)||(r=(e=>h&&a(e,Event))(e)))&&(n=r?e.constructor.name:void 0,t=`Non-Error exception captured with keys: ${Object.keys(e)}`);return[t,n,s]}function Mt(e){const[t,n,i,r,s]=e;let o,a,l=[];const u=c(t),d=ke(n,"?",i,r);return s||!u?([o,a,l]=_t(null!=s?s:t),0===l.length&&(l=[d])):u&&([o,a]=function(e){var t,n;const i=e.match(Ut),r=null!==(t=null==i?void 0:i[1])&&void 0!==t?t:k;return[null!==(n=null==i?void 0:i[2])&&void 0!==n?n:e,r]}(t),l=[d]),{value:o,type:a,stackFrames:l}}function Dt(e,t){return v(e[0])?Mt(e):{value:t(e)}}function zt(e){window.addEventListener("unhandledrejection",t=>{var n,i;let r,s,o=t;o.reason?o=t.reason:(null===(n=t.detail)||void 0===n?void 0:n.reason)&&(o=null===(i=t.detail)||void 0===i?void 0:i.reason);let a=[];(e=>!p(e)&&!f(e))(o)?(r=`Non-Error promise rejection captured with value: ${String(o)}`,s="UnhandledRejection"):[r,s,a]=_t(o),r&&e.pushError(new Error(r),{type:s,stackFrames:a})})}class Bt extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-errors",this.version=ee}initialize(){this.logDebug("Initializing"),function(e){const t=window.onerror;window.onerror=(...n)=>{try{const{value:t,type:i,stackFrames:r}=Mt(n),s=n[4];if(t){const n={type:i,stackFrames:r};null!=s&&(n.originalError=s),e.pushError(new Error(t),n)}}finally{null==t||t.apply(window,n)}}}(this.api),zt(this.api)}}let qt=-1;const Ft=e=>{addEventListener("pageshow",t=>{t.persisted&&(qt=t.timeStamp,e(t))},!0)},$t=(e,t,n,i)=>{let r,s;return o=>{t.value>=0&&(o||i)&&(s=t.value-(r??0),(s||void 0===r)&&(r=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Vt=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},Kt=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Wt=()=>{const e=Kt();return e?.activationStart??0},Gt=(e,t=-1)=>{const n=Kt();let i="navigate";return qt>=0?i="back-forward-cache":n&&(document.prerendering||Wt()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},Jt=new WeakMap;function Xt(e,t){return Jt.get(e)||Jt.set(e,new t),Jt.get(e)}class Qt{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const Yt=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return i.observe({type:e,buffered:!0,...n}),i}}catch{}},Zt=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let en=-1;const tn=new Set,nn=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,rn=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of tn)e();isFinite(en)||(en="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",rn,!0))}},sn=()=>{if(en<0){const e=Wt(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;en=t??nn(),addEventListener("visibilitychange",rn,!0),addEventListener("prerenderingchange",rn,!0),Ft(()=>{setTimeout(()=>{en=nn()})})}return{get firstHiddenTime(){return en},onHidden(e){tn.add(e)}}},on=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},an=[1800,3e3],ln=(e,t={})=>{on(()=>{const n=sn();let i,r=Gt("FCP");const s=Yt("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Wt(),0),r.entries.push(t),i(!0)))});s&&(i=$t(e,r,an,t.reportAllChanges),Ft(n=>{r=Gt("FCP"),i=$t(e,r,an,t.reportAllChanges),Vt(()=>{r.value=performance.now()-n.timeStamp,i(!0)})}))})},cn=[.1,.25];let un=0,dn=1/0,pn=0;const fn=e=>{for(const t of e)t.interactionId&&(dn=Math.min(dn,t.interactionId),pn=Math.max(pn,t.interactionId),un=pn?(pn-dn)/7+1:0)};let gn;const hn=()=>gn?un:performance.interactionCount??0;let mn=0;class vn{u=[];l=new Map;m;p;v(){mn=hn(),this.u.length=0,this.l.clear()}L(){const e=Math.min(this.u.length-1,Math.floor((hn()-mn)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.u.at(-1);let n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort((e,t)=>t.P-e.P),this.u.length>10){const e=this.u.splice(10);for(const t of e)this.l.delete(t.id)}this.p?.(n)}}}const bn=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=Zt(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},wn=[200,500];class yn{m;h(e){this.m?.(e)}}const Sn=[2500,4e3],Tn=[800,1800],En=e=>{document.prerendering?on(()=>En(e)):"complete"!==document.readyState?addEventListener("load",()=>En(e),!0):setTimeout(e)};class xn{constructor(e,t){this.pushMeasurement=e,this.webVitalConfig=t}initialize(){Object.entries(xn.mapping).forEach(([e,t])=>{var n;t(t=>{this.pushMeasurement({type:"web-vitals",values:{[e]:t.value}})},{reportAllChanges:null===(n=this.webVitalConfig)||void 0===n?void 0:n.reportAllChanges})})}}xn.mapping={cls:(e,t={})=>{const n=sn();ln(Zt(()=>{let i,r=Gt("CLS",0);const s=Xt(t,Qt),o=e=>{for(const t of e)s.h(t);s.i>r.value&&(r.value=s.i,r.entries=s.o,i())},a=Yt("layout-shift",o);a&&(i=$t(e,r,cn,t.reportAllChanges),n.onHidden(()=>{o(a.takeRecords()),i(!0)}),Ft(()=>{s.i=0,r=Gt("CLS",0),i=$t(e,r,cn,t.reportAllChanges),Vt(()=>i())}),setTimeout(i))}))},fcp:ln,inp:(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=sn();on(()=>{"interactionCount"in performance||gn||(gn=Yt("event",fn,{type:"event",buffered:!0,durationThreshold:0}));let i,r=Gt("INP");const s=Xt(t,vn),o=e=>{bn(()=>{for(const t of e)s.h(t);const t=s.L();t&&t.P!==r.value&&(r.value=t.P,r.entries=t.entries,i())})},a=Yt("event",o,{durationThreshold:t.durationThreshold??40});i=$t(e,r,wn,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{o(a.takeRecords()),i(!0)}),Ft(()=>{s.v(),r=Gt("INP"),i=$t(e,r,wn,t.reportAllChanges)}))})},lcp:(e,t={})=>{on(()=>{const n=sn();let i,r=Gt("LCP");const s=Xt(t,yn),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)s.h(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Wt(),0),r.entries=[t],i())},a=Yt("largest-contentful-paint",o);if(a){i=$t(e,r,Sn,t.reportAllChanges);const n=Zt(()=>{o(a.takeRecords()),a.disconnect(),i(!0)}),s=e=>{e.isTrusted&&(bn(n),removeEventListener(e.type,s,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addEventListener(e,s,{capture:!0});Ft(n=>{r=Gt("LCP"),i=$t(e,r,Sn,t.reportAllChanges),Vt(()=>{r.value=performance.now()-n.timeStamp,i(!0)})})}})},ttfb:(e,t={})=>{let n=Gt("TTFB"),i=$t(e,n,Tn,t.reportAllChanges);En(()=>{const r=Kt();r&&(n.value=Math.max(r.responseStart-Wt(),0),n.entries=[r],i(!0),Ft(()=>{n=Gt("TTFB",0),i=$t(e,n,Tn,t.reportAllChanges),i(!0)}))})}};class kn{t;o=0;i=[];u(e){if(e.hadRecentInput)return;const 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)}}const In=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},An=e=>{if("loading"===document.readyState)return"loading";{const t=In();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}}return"complete"},On=e=>{const t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},Pn=e=>{let t="";try{for(;9!==e?.nodeType;){const n=e,i=n.id?"#"+n.id:[On(n),...Array.from(n.classList).sort()].join(".");if(t.length+i.length>99)return t||i;if(t=t?i+">"+t:i,n.id)break;e=n.parentNode}}catch{}return t},Cn=new WeakMap;function Ln(e,t){return Cn.get(e)||Cn.set(e,new t),Cn.get(e)}let Rn=-1;const jn=()=>Rn,Nn=e=>{addEventListener("pageshow",t=>{t.persisted&&(Rn=t.timeStamp,e(t))},!0)},Hn=(e,t,n,i)=>{let r,s;return o=>{t.value>=0&&(o||i)&&(s=t.value-(r??0),(s||void 0===r)&&(r=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Un=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},_n=()=>{const e=In();return e?.activationStart??0},Mn=(e,t=-1)=>{const n=In();let i="navigate";return jn()>=0?i="back-forward-cache":n&&(document.prerendering||_n()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},Dn=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return i.observe({type:e,buffered:!0,...n}),i}}catch{}},zn=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Bn=-1;const qn=new Set,Fn=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,$n=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of qn)e();isFinite(Bn)||(Bn="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",$n,!0))}},Vn=()=>{if(Bn<0){const e=_n(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;Bn=t??Fn(),addEventListener("visibilitychange",$n,!0),addEventListener("prerenderingchange",$n,!0),Nn(()=>{setTimeout(()=>{Bn=Fn()})})}return{get firstHiddenTime(){return Bn},onHidden(e){qn.add(e)}}},Kn=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Wn=[1800,3e3],Gn=(e,t={})=>{Kn(()=>{const n=Vn();let i,r=Mn("FCP");const s=Dn("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-_n(),0),r.entries.push(t),i(!0)))});s&&(i=Hn(e,r,Wn,t.reportAllChanges),Nn(n=>{r=Mn("FCP"),i=Hn(e,r,Wn,t.reportAllChanges),Un(()=>{r.value=performance.now()-n.timeStamp,i(!0)})}))})},Jn=[.1,.25],Xn=e=>e.find(e=>1===e.node?.nodeType)||e[0];let Qn=0,Yn=1/0,Zn=0;const ei=e=>{for(const t of e)t.interactionId&&(Yn=Math.min(Yn,t.interactionId),Zn=Math.max(Zn,t.interactionId),Qn=Zn?(Zn-Yn)/7+1:0)};let ti;const ni=()=>ti?Qn:performance.interactionCount??0;let ii=0;class ri{l=[];h=new Map;m;p;v(){ii=ni(),this.l.length=0,this.h.clear()}M(){const e=Math.min(this.l.length-1,Math.floor((ni()-ii)/50));return this.l[e]}u(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.l.at(-1);let n=this.h.get(e.interactionId);if(n||this.l.length<10||e.duration>t.T){if(n?e.duration>n.T?(n.entries=[e],n.T=e.duration):e.duration===n.T&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],T:e.duration},this.h.set(n.id,n),this.l.push(n)),this.l.sort((e,t)=>t.T-e.T),this.l.length>10){const e=this.l.splice(10);for(const t of e)this.h.delete(t.id)}this.p?.(n)}}}const si=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=zn(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},oi=[200,500],ai=(e,t={})=>{const n=Ln(t=Object.assign({},t),ri);let i=[],r=[],s=0;const o=new WeakMap,a=new WeakMap;let l=!1;const c=()=>{l||(si(u),l=!0)},u=()=>{const e=n.l.map(e=>o.get(e.entries[0])),t=r.length-50;r=r.filter((n,i)=>i>=t||e.includes(n));const a=new Set;for(const e of r){const t=d(e.startTime,e.processingEnd);for(const e of t)a.add(e)}const c=i.length-1-50;i=i.filter((e,t)=>e.startTime>s&&t>c||a.has(e)),l=!1};n.m=e=>{const t=e.startTime+e.duration;let n;s=Math.max(s,e.processingEnd);for(let i=r.length-1;i>=0;i--){const s=r[i];if(Math.abs(t-s.renderTime)<=8){n=s,n.startTime=Math.min(e.startTime,n.startTime),n.processingStart=Math.min(e.processingStart,n.processingStart),n.processingEnd=Math.max(e.processingEnd,n.processingEnd),n.entries.push(e);break}}n||(n={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:t,entries:[e]},r.push(n)),(e.interactionId||"first-input"===e.entryType)&&o.set(e,n),c()},n.p=e=>{if(!a.get(e)){const n=e.entries[0].target;if(n){const i=t.generateTarget?.(n)??Pn(n);a.set(e,i)}}};const d=(e,t)=>{const n=[];for(const r of i)if(!(r.startTime+r.duration<e)){if(r.startTime>t)break;n.push(r)}return n};Dn("long-animation-frame",e=>{i=i.concat(e),c()}),((e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=Vn();Kn(()=>{"interactionCount"in performance||ti||(ti=Dn("event",ei,{type:"event",buffered:!0,durationThreshold:0}));let i,r=Mn("INP");const s=Ln(t,ri),o=e=>{si(()=>{for(const t of e)s.u(t);const t=s.M();t&&t.T!==r.value&&(r.value=t.T,r.entries=t.entries,i())})},a=Dn("event",o,{durationThreshold:t.durationThreshold??40});i=Hn(e,r,oi,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{o(a.takeRecords()),i(!0)}),Nn(()=>{s.v(),r=Mn("INP"),i=Hn(e,r,oi,t.reportAllChanges)}))})})(t=>{const i=(e=>{const t=e.entries[0],i=o.get(t),r=t.processingStart,s=Math.max(t.startTime+t.duration,r),l=Math.min(i.processingEnd,s),c=i.entries.sort((e,t)=>e.processingStart-t.processingStart),u=d(t.startTime,l),p=n.h.get(t.interactionId),f={interactionTarget:a.get(p),interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:s,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:r-t.startTime,processingDuration:l-r,presentationDelay:s-l,loadState:An(t.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(e=>{if(!e.longAnimationFrameEntries?.length)return;const t=e.interactionTime,n=e.inputDelay,i=e.processingDuration;let r,s,o=0,a=0,l=0,c=0;for(const l of e.longAnimationFrameEntries){a=a+l.startTime+l.duration-l.styleAndLayoutStart;for(const e of l.scripts){const l=e.startTime+e.duration;if(l<t)continue;const u=l-Math.max(t,e.startTime),d=e.duration?u/e.duration*e.forcedStyleAndLayoutDuration:0;o+=u-d,a+=d,u>c&&(s=e.startTime<t+n?"input-delay":e.startTime>=t+n+i?"presentation-delay":"processing-duration",r=e,c=u)}}const u=e.longAnimationFrameEntries.at(-1),d=u?u.startTime+u.duration:0;d>=t+n+i&&(l=e.nextPaintTime-d),r&&s&&(e.longestScript={entry:r,subpart:s,intersectingDuration:c}),e.totalScriptDuration=o,e.totalStyleAndLayoutDuration=a,e.totalPaintDuration=l,e.totalUnattributedDuration=e.nextPaintTime-t-o-a-l})(f),Object.assign(e,{attribution:f})})(t);e(i)},t)};class li{m;u(e){this.m?.(e)}}const ci=[2500,4e3],ui=[800,1800],di=e=>{document.prerendering?Kn(()=>di(e)):"complete"!==document.readyState?addEventListener("load",()=>di(e),!0):setTimeout(e)},pi="load_state",fi="time_to_first_byte";class gi{constructor(e,t){this.corePushMeasurement=e,this.webVitalConfig=t}initialize(){this.measureCLS(),this.measureFCP(),this.measureINP(),this.measureLCP(),this.measureTTFB()}measureCLS(){var e;((e,t={})=>{const n=Ln(t=Object.assign({},t),kn),i=new WeakMap;n.t=e=>{if(e?.sources?.length){const n=Xn(e.sources),r=n?.node;if(r){const e=t.generateTarget?.(r)??Pn(r);i.set(n,e)}}},((e,t={})=>{const n=Vn();Gn(zn(()=>{let i,r=Mn("CLS",0);const s=Ln(t,kn),o=e=>{for(const t of e)s.u(t);s.o>r.value&&(r.value=s.o,r.entries=s.i,i())},a=Dn("layout-shift",o);a&&(i=Hn(e,r,Jn,t.reportAllChanges),n.onHidden(()=>{o(a.takeRecords()),i(!0)}),Nn(()=>{s.o=0,r=Mn("CLS",0),i=Hn(e,r,Jn,t.reportAllChanges),Un(()=>i())}),setTimeout(i))}))})(t=>{const n=(e=>{let t={};if(e.entries.length){const n=e.entries.reduce((e,t)=>e.value>t.value?e:t);if(n?.sources?.length){const e=Xn(n.sources);e&&(t={largestShiftTarget:i.get(e),largestShiftTime:n.startTime,largestShiftValue:n.value,largestShiftSource:e,largestShiftEntry:n,loadState:An(n.startTime)})}}return Object.assign(e,{attribution:t})})(t);e(n)},t)})(e=>{const{loadState:t,largestShiftValue:n,largestShiftTime:i,largestShiftTarget:r}=e.attribution,s=this.buildInitialValues(e);this.addIfPresent(s,"largest_shift_value",n),this.addIfPresent(s,"largest_shift_time",i);const o=this.buildInitialContext(e);this.addIfPresent(o,pi,t),this.addIfPresent(o,"largest_shift_target",r),this.pushMeasurement(s,o)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureFCP(){var e;((e,t={})=>{Gn(t=>{const n=(e=>{let t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:An(jn())};if(e.entries.length){const n=In(),i=e.entries.at(-1);if(n){const r=n.activationStart||0,s=Math.max(0,n.responseStart-r);t={timeToFirstByte:s,firstByteToFCP:e.value-s,loadState:An(e.entries[0].startTime),navigationEntry:n,fcpEntry:i}}}return Object.assign(e,{attribution:t})})(t);e(n)},t)})(e=>{const{firstByteToFCP:t,timeToFirstByte:n,loadState:i}=e.attribution,r=this.buildInitialValues(e);this.addIfPresent(r,"first_byte_to_fcp",t),this.addIfPresent(r,fi,n);const s=this.buildInitialContext(e);this.addIfPresent(s,pi,i),this.pushMeasurement(r,s)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureINP(){var e;ai(e=>{const{interactionTime:t,presentationDelay:n,inputDelay:i,processingDuration:r,nextPaintTime:s,loadState:o,interactionTarget:a,interactionType:l}=e.attribution,c=this.buildInitialValues(e);this.addIfPresent(c,"interaction_time",t),this.addIfPresent(c,"presentation_delay",n),this.addIfPresent(c,"input_delay",i),this.addIfPresent(c,"processing_duration",r),this.addIfPresent(c,"next_paint_time",s);const u=this.buildInitialContext(e);this.addIfPresent(u,pi,o),this.addIfPresent(u,"interaction_target",a),this.addIfPresent(u,"interaction_type",l),this.pushMeasurement(c,u)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureLCP(){var e;((e,t={})=>{const n=Ln(t=Object.assign({},t),li),i=new WeakMap;n.m=e=>{const n=e.element;if(n){const r=t.generateTarget?.(n)??Pn(n);i.set(e,r)}},((e,t={})=>{Kn(()=>{const n=Vn();let i,r=Mn("LCP");const s=Ln(t,li),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)s.u(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-_n(),0),r.entries=[t],i())},a=Dn("largest-contentful-paint",o);if(a){i=Hn(e,r,ci,t.reportAllChanges);const n=zn(()=>{o(a.takeRecords()),a.disconnect(),i(!0)}),s=e=>{e.isTrusted&&(si(n),removeEventListener(e.type,s,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addEventListener(e,s,{capture:!0});Nn(n=>{r=Mn("LCP"),i=Hn(e,r,ci,t.reportAllChanges),Un(()=>{r.value=performance.now()-n.timeStamp,i(!0)})})}})})(t=>{const n=(e=>{let t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){const n=In();if(n){const r=n.activationStart||0,s=e.entries.at(-1),o=s.url&&performance.getEntriesByType("resource").filter(e=>e.name===s.url)[0],a=Math.max(0,n.responseStart-r),l=Math.max(a,o?(o.requestStart||o.startTime)-r:0),c=Math.min(e.value,Math.max(l,o?o.responseEnd-r:0));t={target:i.get(s),timeToFirstByte:a,resourceLoadDelay:l-a,resourceLoadDuration:c-l,elementRenderDelay:e.value-c,navigationEntry:n,lcpEntry:s},s.url&&(t.url=s.url),o&&(t.lcpResourceEntry=o)}}return Object.assign(e,{attribution:t})})(t);e(n)},t)})(e=>{const{elementRenderDelay:t,resourceLoadDelay:n,resourceLoadDuration:i,timeToFirstByte:r,target:s}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"element_render_delay",t),this.addIfPresent(o,"resource_load_delay",n),this.addIfPresent(o,"resource_load_duration",i),this.addIfPresent(o,fi,r);const a=this.buildInitialContext(e);this.addIfPresent(a,"element",s),this.pushMeasurement(o,a)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureTTFB(){var e;((e,t={})=>{((e,t={})=>{let n=Mn("TTFB"),i=Hn(e,n,ui,t.reportAllChanges);di(()=>{const r=In();r&&(n.value=Math.max(r.responseStart-_n(),0),n.entries=[r],i(!0),Nn(()=>{n=Mn("TTFB",0),i=Hn(e,n,ui,t.reportAllChanges),i(!0)}))})})(t=>{const n=(e=>{let t={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(e.entries.length){const n=e.entries[0],i=n.activationStart||0,r=Math.max((n.workerStart||n.fetchStart)-i,0),s=Math.max(n.domainLookupStart-i,0),o=Math.max(n.connectStart-i,0),a=Math.max(n.connectEnd-i,0);t={waitingDuration:r,cacheDuration:s-r,dnsDuration:o-s,connectionDuration:a-o,requestDuration:e.value-a,navigationEntry:n}}return Object.assign(e,{attribution:t})})(t);e(n)},t)})(e=>{const{dnsDuration:t,connectionDuration:n,requestDuration:i,waitingDuration:r,cacheDuration:s}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"dns_duration",t),this.addIfPresent(o,"connection_duration",n),this.addIfPresent(o,"request_duration",i),this.addIfPresent(o,"waiting_duration",r),this.addIfPresent(o,"cache_duration",s);const a=this.buildInitialContext(e);this.pushMeasurement(o,a)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}buildInitialValues(e){const t=e.name.toLowerCase();return{[t]:e.value,delta:e.delta}}buildInitialContext(e){var t;const n=null!==(t=Je(St,Ke))&&void 0!==t?t:Ue;return{id:e.id,rating:e.rating,navigation_type:e.navigationType,navigation_entry_id:n}}pushMeasurement(e,t){this.corePushMeasurement({type:"web-vitals",values:e},{context:t})}addIfPresent(e,t,n){n&&(e[t]=n)}}class hi extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-web-vitals",this.version=ee}initialize(){this.logDebug("Initializing");this.intializeWebVitalsInstrumentation().initialize()}intializeWebVitalsInstrumentation(){var e,t,n;return!1===(null===(e=this.config)||void 0===e?void 0:e.trackWebVitalsAttribution)||!1===(null===(n=null===(t=this.config)||void 0===t?void 0:t.webVitalsInstrumentation)||void 0===n?void 0:n.trackAttribution)?new xn(this.api.pushMeasurement,this.config.webVitalsInstrumentation):new gi(this.api.pushMeasurement,this.config.webVitalsInstrumentation)}}class mi extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-session",this.version=ee}sendSessionStartEvent(e){var t,n;const i=e.session;if(i&&i.id!==(null===(t=this.notifiedSession)||void 0===t?void 0:t.id)){if(this.notifiedSession&&this.notifiedSession.id===(null===(n=i.attributes)||void 0===n?void 0:n.previousSession))return this.api.pushEvent("session_extend",{},void 0,{skipDedupe:!0}),void(this.notifiedSession=i);this.notifiedSession=i,this.api.pushEvent(tt,{},void 0,{skipDedupe:!0})}}createInitialSession(e,t){var n,i,r,s,o,a;let l,c,u=e.fetchUserSession();if(t.persistent&&t.maxSessionPersistenceTime&&u){const e=S();u.lastActivity<e-t.maxSessionPersistenceTime&&(ut.removeUserSession(),u=null)}if(ot(u)){const e=null==u?void 0:u.sessionId;c=st({sessionId:e,isSampled:u.isSampled||!1,started:null==u?void 0:u.started});const r=null==u?void 0:u.sessionMeta,s=Object.assign(Object.assign({},null===(n=t.session)||void 0===n?void 0:n.overrides),null==r?void 0:r.overrides);c.sessionMeta=Object.assign(Object.assign({},t.session),{id:e,attributes:Object.assign(Object.assign(Object.assign({},null===(i=t.session)||void 0===i?void 0:i.attributes),null==r?void 0:r.attributes),{isSampled:c.isSampled.toString()}),overrides:s}),l=nt}else{const e=null!==(s=null===(r=t.session)||void 0===r?void 0:r.id)&&void 0!==s?s:function(e){var t,n,i,r;return{id:null!==(r=null===(i=null===(n=null===(t=M.config)||void 0===t?void 0:t.sessionTracking)||void 0===n?void 0:n.generateSessionId)||void 0===i?void 0:i.call(n))&&void 0!==r?r:B(),attributes:e}}().id;c=st({sessionId:e,isSampled:rt()});const n=null===(o=t.session)||void 0===o?void 0:o.overrides;c.sessionMeta=Object.assign({id:e,attributes:Object.assign({isSampled:c.isSampled.toString()},null===(a=t.session)||void 0===a?void 0:a.attributes)},n?{overrides:n}:{}),l=tt}return{initialSession:c,lifecycleType:l}}registerBeforeSendHook(e){var t;const{updateSession:n}=new e;null===(t=this.transports)||void 0===t||t.addBeforeSendHooks(e=>{var t,i,r;n();const s=null===(t=e.meta.session)||void 0===t?void 0:t.attributes;if(s&&"true"===(null==s?void 0:s.isSampled)){let t=JSON.parse(JSON.stringify(e));const n=null===(i=t.meta.session)||void 0===i?void 0:i.attributes;return null==n||delete n.isSampled,0===Object.keys(null!=n?n:{}).length&&(null===(r=t.meta.session)||void 0===r||delete r.attributes),t}return null})}initialize(){this.logDebug("init session instrumentation");const e=this.config.sessionTracking;if(null==e?void 0:e.enabled){const t=pt(e);this.registerBeforeSendHook(t);const{initialSession:n,lifecycleType:i}=this.createInitialSession(t,e);t.storeUserSession(n);const r=n.sessionMeta;this.notifiedSession=r,this.api.setSession(r),i===tt&&this.api.pushEvent(tt,{},void 0,{skipDedupe:!0}),i===nt&&this.api.pushEvent(nt,{},void 0,{skipDedupe:!0})}this.metas.addListener(this.sendSessionStartEvent.bind(this))}}class vi extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-view",this.version=ee}sendViewChangedEvent(e){var t,n,i,r;const s=e.view;s&&s.name!==(null===(t=this.notifiedView)||void 0===t?void 0:t.name)&&(this.api.pushEvent("view_changed",{fromView:null!==(i=null===(n=this.notifiedView)||void 0===n?void 0:n.name)&&void 0!==i?i:Ue,toView:null!==(r=s.name)&&void 0!==r?r:Ue},void 0,{skipDedupe:!0}),this.notifiedView=s)}initialize(){this.metas.addListener(this.sendViewChangedEvent.bind(this))}}class bi extends mt{constructor(){super(),this.name="@grafana/faro-web-sdk:instrumentation-csp",this.version=ee}initialize(){document.addEventListener("securitypolicyviolation",this.securitypolicyviolationHandler.bind(this))}destroy(){document.removeEventListener("securitypolicyviolation",this.securitypolicyviolationHandler)}securitypolicyviolationHandler(e){this.api.pushEvent("securitypolicyviolation",y(e))}}class wi extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-console",this.version=ee,this.errorSerializer=C}initialize(){var e;const t=this.config.consoleInstrumentation,n=(null==t?void 0:t.serializeErrors)||!!(null==t?void 0:t.errorSerializer);this.errorSerializer=n?null!==(e=null==t?void 0:t.errorSerializer)&&void 0!==e?e:I:C,P.HT.filter(e=>{var n;return!(null!==(n=null==t?void 0:t.disabledLevels)&&void 0!==n?n:wi.defaultDisabledLevels).includes(e)}).forEach(e=>{console[e]=(...n)=>{try{if(e!==P.$b.ERROR||(null==t?void 0:t.consoleErrorAsLog))if(e===P.$b.ERROR&&(null==t?void 0:t.consoleErrorAsLog)){const{value:t,type:i,stackFrames:r}=Dt(n,this.errorSerializer);this.api.pushLog(t?[wi.consoleErrorPrefix+t]:n,{level:e,context:{value:null!=t?t:"",type:null!=i?i:"",stackFrames:(null==r?void 0:r.length)?I(r):""}})}else this.api.pushLog(n,{level:e});else{const{value:e,type:t,stackFrames:i}=Dt(n,this.errorSerializer);if(e&&!t&&!i)return void this.api.pushError(new Error(wi.consoleErrorPrefix+e));this.api.pushError(new Error(wi.consoleErrorPrefix+e),{type:t,stackFrames:i})}}catch(e){this.logError(e)}finally{this.unpatchedConsole[e](...n)}}})}}function yi(e={}){const t=[new Ht,new Bt,new hi,new mi,new vi];return!1!==e.enablePerformanceInstrumentation&&t.unshift(new Rt),!1!==e.enableContentSecurityPolicyInstrumentation&&t.push(new bi),!1!==e.captureConsole&&t.push(new wi),t}wi.defaultDisabledLevels=[P.$b.DEBUG,P.$b.TRACE,P.$b.LOG],wi.consoleErrorPrefix="console.error: ";var Si=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};function Ti(e,{trackUserActionsPreview:t}){return e.filter(e=>!("@grafana/faro-web-sdk:instrumentation-user-action"===e.name&&!t))}function Ei(e){var t,n;const{page:i,generatePageId:r}=null!==(t=null==e?void 0:e.pageTracking)&&void 0!==t?t:{},s=[_e,Be({generatePageId:r,initialPageMeta:i}),...null!==(n=e.metas)&&void 0!==n?n:[]];return p(window.k6)?[...s,Me]:s}function xi({trackGeolocation:e,sessionTracking:t}){var n;const i={};return d(e)&&(i.geoLocationTrackingEnabled=e),b(i)?{}:{session:Object.assign(Object.assign({},null!==(n=null==t?void 0:t.session)&&void 0!==n?n:{}),{overrides:i})}}function ki(e){const t=function(e){var t;const n=[],i=Q(e.unpatchedConsole,e.internalLoggerLevel);e.transports?((e.url||e.apiKey)&&i.error('if "transports" is defined, "url" and "apiKey" should not be defined'),n.push(...e.transports)):e.url?n.push(new ht({url:e.url,apiKey:e.apiKey})):i.error('either "url" or "transports" must be defined');const{dedupe:r=!0,eventDomain:s=ce,globalObjectKey:o=ae,instrumentations:a=yi(),internalLoggerLevel:l=J,isolate:c=!1,logArgsSerializer:u=C,metas:d=Ei(e),paused:p=!1,preventGlobalExposure:f=!1,unpatchedConsole:g=X,trackUserActionsPreview:h=!1,trackUserActionsDataAttributeName:m=Ne,url:v}=e,b=Si(e,["dedupe","eventDomain","globalObjectKey","instrumentations","internalLoggerLevel","isolate","logArgsSerializer","metas","paused","preventGlobalExposure","unpatchedConsole","trackUserActionsPreview","trackUserActionsDataAttributeName","url"]);return Object.assign(Object.assign({},b),{batching:Object.assign(Object.assign({},le),e.batching),dedupe:r,globalObjectKey:o,instrumentations:Ti(a,e),internalLoggerLevel:l,isolate:c,logArgsSerializer:u,metas:d,parseStacktrace:Oe,paused:p,preventGlobalExposure:f,transports:n,unpatchedConsole:g,eventDomain:s,ignoreUrls:[...null!==(t=e.ignoreUrls)&&void 0!==t?t:[],...v?[v]:[],/\/collect(?:\/[\w]*)?$/],sessionTracking:Object.assign(Object.assign(Object.assign({},Le),e.sessionTracking),xi({trackGeolocation:e.trackGeolocation,sessionTracking:e.sessionTracking})),trackUserActionsPreview:h,trackUserActionsDataAttributeName:m})}(e);if(t)return oe(t)}var Ii=n(8531),Ai=n(4696);const Oi=new Map([["dev",{environment:"dev",appName:"grafana-metricsdrilldown-app-dev",faroUrl:"https://faro-collector-ops-eu-south-0.grafana-ops.net/collect/8c57b32175ba39d35dfaccee7cd793c7"}],["ops",{environment:"ops",appName:"grafana-metricsdrilldown-app-ops",faroUrl:"https://faro-collector-ops-eu-south-0.grafana-ops.net/collect/d65ab91eb9c5e8c51b474d9313ba28f4"}],["prod",{environment:"prod",appName:"grafana-metricsdrilldown-app-prod",faroUrl:"https://faro-collector-ops-eu-south-0.grafana-ops.net/collect/0f4f1bbc97c9e2db4fa85ef75a559885"}]]);var Pi=n(5176),Ci=n(8943);let Li=null;const Ri=()=>Li,ji=e=>Li=e;function Ni(){if(Ri())return;const e=function(){const e=(0,Ai.u)();if(e&&Oi.has(e))return Oi.get(e)}();if(!e)return;const{environment:t,faroUrl:n,appName:i}=e,{apps:r,bootData:s}=Ii.config,o=r[Ci.s].version,a=s.user.email;ji(ki({url:n,app:{name:i,release:o,version:Pi.t,environment:t},user:{email:a},instrumentations:[...yi({captureConsole:!1})],isolate:!0,beforeSend:e=>{var t,n;return(null!==(n=null===(t=e.meta.page)||void 0===t?void 0:t.url)&&void 0!==n?n:"").includes(Ci.G)?e:null}}))}},2533:e=>{"use strict";e.exports=JSON.parse('{"id":"grafana-metricsdrilldown-app"}')},3241:e=>{"use strict";e.exports=s},3498:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});const i={Trail:"trail",Drilldown:"drilldown"}},3781:(e,t,n)=>{"use strict";n.d(t,{I8:()=>S,kY:()=>T,Rk:()=>y,Ge:()=>h,$9:()=>m});var i=n(7781),r=n(8531);function s(e=[],t){if(!t.multi&&!t.includeAll)return function(e){if("string"!=typeof e)return e;if(r.config.featureToggles.prometheusSpecialCharsInLabelValues)return/^\w+(=|!=|=~|!~)".*"$/.test(e)?e:e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return e.replace(/\\/g,"\\\\").replace(/'/g,"\\\\'")}(e);if("string"==typeof e)return o(e);const n=e.map(e=>o(e));return 1===n.length?n[0]:"("+n.join("|")+")"}function o(e){return"string"!=typeof e?e:r.config.featureToggles.prometheusSpecialCharsInLabelValues?e.replace(/\\/g,"\\\\\\\\").replace(/"/g,'\\\\\\"').replace(/[$^*{}\[\]\'+?.()|]/g,"\\\\$&"):e.replace(/\\/g,"\\\\\\\\").replace(/[$^*{}\[\]+?.()|]/g,"\\\\$&")}var a=n(8943),l=n(3498),c=n(8705);const u=new RegExp("([a-zA-Z_]\\w*)(>|<|!~|=~|!=|=)(.+)");var d=n(6538);function p(e,t,n,i,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function f(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var s=e.apply(t,n);function o(e){p(s,i,r,o,a,"next",e)}function a(e){p(s,i,r,o,a,"throw",e)}o(void 0)})}}const g="Grafana Metrics Drilldown",h=[{title:`Open in ${g}`,description:`Open current query in the ${g} view`,category:"metrics-drilldown",icon:"gf-prometheus",path:y(l.b.Drilldown),targets:[i.PluginExtensionPoints.DashboardPanelMenu,i.PluginExtensionPoints.ExploreToolbarAction,"grafana/alerting/alertingrule/queryeditor","grafana-assistant-app/navigateToDrilldown/v1"],configure:function(e){if(void 0===e)return;if("pluginId"in e&&"timeseries"!==e.pluginId)return;if(!e.targets.filter(E).length)return;return{}},onClick:(e,t)=>f(function*(){const e=t.context,n=yield function(e){return f(function*(){var t;if(void 0===e)return null;if("pluginId"in e&&"timeseries"!==e.pluginId)return null;const n=e.targets.filter(E);if(!n.length)return null;const i=n[0],o=(0,r.getTemplateSrv)(),a=o.replace(null===(t=i.datasource)||void 0===t?void 0:t.uid,e.scopedVars);if(!i.expr)return y(l.b.Drilldown);const u=o.replace(i.expr,e.scopedVars,s);try{const{metric:t,labels:n,hasErrors:i,errors:r}=yield m(u);i&&c.v.warn(`PromQL query has parsing errors: ${r.join(", ")}`);const s="timeRange"in e&&"object"==typeof e.timeRange&&null!=e.timeRange&&"from"in e.timeRange&&"to"in e.timeRange?e.timeRange:void 0,o=w(b(a,n,t,null==s?void 0:s.from,null==s?void 0:s.to));return y(l.b.Drilldown,o)}catch(e){return c.v.error(new Error(`[Metrics Drilldown] Error parsing PromQL query: ${e}`)),y(l.b.Drilldown)}})()}(e);n&&(window.location.href=n)})()},{targets:["grafana-metricsdrilldown-app/grafana-assistant-app/navigateToDrilldown/v0-alpha"],title:"Navigate to metrics drilldown",description:"Build a url path to the metrics drilldown",path:y(l.b.Drilldown),configure:e=>{if(void 0===e)return;const{navigateToMetrics:t,datasource_uid:n,label_filters:i,metric:r,start:s,end:o}=e,a=function(e){if(!e)return[];return e.map(e=>{const t=function(e){const[,t,n,i]=e.match(u)||[,"","",""];return{key:t.trim(),value:i.replace(/['" ]/g,""),operator:n.trim()}}(e);return{label:t.key,op:t.operator,value:t.value}})}(i),c=b(n,a,r,s,o),d=t?w(c):void 0;return{path:y(l.b.Drilldown,d)}}}];function m(e){return f(function*(){const{parser:t}=yield Promise.all([n.e(782),n.e(851)]).then(n.bind(n,9851)),i=t.parse(e);let r="";const s=[];let o=!1;const a=[];return i.iterate({enter:t=>{var n;if(t.type.isError||"⚠"===t.name){o=!0;const n=e.slice(t.from,t.to),i=n?`Parse error at position ${t.from}-${t.to}: "${n}"`:`Parse error at position ${t.from}`;a.push(i)}r||"Identifier"!==t.name||"VectorSelector"!==(null===(n=t.node.parent)||void 0===n?void 0:n.type.name)||(r=e.slice(t.from,t.to));const i=(0,d.W)(t,e);i&&s.push(i)}}),{metric:r,labels:s,hasErrors:o,errors:a}})()}function v(e){return[S.Filters,`${e.label}|${e.op}|${x(e.value)}`]}function b(e,t,n,i,r){return{datasource_uid:e,label_filters:null!=t?t:[],metric:n,start:i,end:r}}function w(e){const{metric:t,start:n,end:i,datasource_uid:r,label_filters:s}=e,o=null!=s?s:[];return T([[S.Metric,t],[S.TimeRangeFrom,n],[S.TimeRangeTo,i],[S.DatasourceId,r],...o.map(v)])}function y(e,t){const n=t?`?${t.toString()}`:"";return`${a.G}/${e}${n}`}const S={TimeRangeFrom:"from",TimeRangeTo:"to",Metric:"metric",DatasourceId:"var-ds",Filters:"var-filters"};function T(e,t){const n=new URLSearchParams(null==t?void 0:t.toString());return e.forEach(([e,t])=>{t&&n.append(e,t)}),n}function E(e){const{datasource:t}=e;return"prometheus"===(null==t?void 0:t.type)}function x(e){return null==e?"":/\|/g[Symbol.replace](e,"__gfp__")}},4440:(e,t,n)=>{"use strict";n.d(t,{aQ:()=>c,tS:()=>p});var i=n(8531),r=n(8705);function s(e,t,n,i,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(e){s(o,i,r,a,l,"next",e)}function l(e){s(o,i,r,a,l,"throw",e)}a(void 0)})}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=/^grafana-[0-9a-z]+prometheus-datasource$/;function c(e){return"object"==typeof e&&null!==e&&"type"in e&&"string"==typeof e.type&&("prometheus"===e.type||l.test(e.type))&&"uid"in e&&"string"==typeof e.uid}class u{getHealthyDataSources(e){return o(function*(){const t=this.cache.get(e);if(null==t?void 0:t.length)return t;let n=this.pendingRequests.get(e);n||(n=this.fetchHealthyDataSources(e).finally(()=>{this.pendingRequests.delete(e)}),this.pendingRequests.set(e,n));const i=yield n;return this.cache.set(e,i),i}).call(this)}fetchHealthyDataSources(e){return o(function*(){const t=(0,i.getDataSourceSrv)().getList({logs:!0,type:e,filter:e=>"grafana"!==e.uid}),n=[],s=[];return yield Promise.all(t.map(e=>o(function*(){try{const t=yield(0,i.getBackendSrv)().get(`/api/datasources/uid/${e.uid}/health`,void 0,void 0,{showSuccessAlert:!1,showErrorAlert:!1});"OK"===(null==t?void 0:t.status)?n.push(e):s.push(e)}catch(t){s.push(e)}})())),s.length>0&&r.v.warn(`Found ${s.length} unhealthy ${e} data sources: ${s.map(e=>e.name).join(", ")}`),n})()}constructor(){a(this,"pendingRequests",new Map),a(this,"cache",new Map)}}let d;function p(){return d||(d=new u),d}},4696:(e,t,n)=>{"use strict";n.d(t,{u:()=>r});const i=[{regExp:/localhost/,environment:"local"},{regExp:/grafana-dev\.net/,environment:"dev"},{regExp:/grafana-ops\.net/,environment:"ops"},{regExp:/grafana\.net/,environment:"prod"}];function r(){var e,t;if(!(null===(t=window)||void 0===t||null===(e=t.location)||void 0===e?void 0:e.host))return null;const n=i.find(({regExp:e})=>e.test(window.location.host));return n?n.environment:null}},5176:(e,t,n)=>{"use strict";n.d(t,{t:()=>i});const i="974d559ae0a7a9fd17aa88a485225325494036b9"},5438:(e,t,n)=>{"use strict";var i;n.d(t,{$b:()=>i,HT:()=>s,Ic:()=>r}),function(e){e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.LOG="log",e.WARN="warn",e.ERROR="error"}(i||(i={}));const r=i.LOG,s=[i.TRACE,i.DEBUG,i.INFO,i.LOG,i.WARN,i.ERROR]},5959:e=>{"use strict";e.exports=o},6089:e=>{"use strict";e.exports=a},6538:(e,t,n)=>{"use strict";function i(e,t,n,i,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}function r(e){return(t=function*(){const{parser:t}=yield Promise.all([n.e(782),n.e(851)]).then(n.bind(n,9851)),i=t.parse(e),r=new Set,o=i.cursor();do{if(o.type.is("VectorSelector")&&o.firstChild()){do{o.type.is("Identifier")&&s(e,o,r)}while(o.nextSibling());o.parent()}}while(o.next());return Array.from(r)},function(){var e=this,n=arguments;return new Promise(function(r,s){var o=t.apply(e,n);function a(e){i(o,r,s,a,l,"next",e)}function l(e){i(o,r,s,a,l,"throw",e)}a(void 0)})})();var t}function s(e,t,n){const i=e.slice(t.from,t.to);i&&n.add(i)}function o(e,t){if("UnquotedLabelMatcher"!==e.name)return null;let n="",i="",r="";for(let s=e.node.firstChild;s;s=s.nextSibling)"LabelName"===s.type.name?n=t.slice(s.from,s.to):"MatchOp"===s.type.name?i=t.slice(s.from,s.to):"StringLiteral"===s.type.name&&(r=t.slice(s.from+1,s.to-1));return n&&i?{label:n,op:i,value:r}:null}n.d(t,{M:()=>r,W:()=>o})},6660:function(e,t,n){var i;!function(r,s){"use strict";var o="function",a="undefined",l="object",c="string",u="major",d="model",p="name",f="type",g="vendor",h="version",m="architecture",v="console",b="mobile",w="tablet",y="smarttv",S="wearable",T="embedded",E="Amazon",x="Apple",k="ASUS",I="BlackBerry",A="Browser",O="Chrome",P="Firefox",C="Google",L="Huawei",R="LG",j="Microsoft",N="Motorola",H="Opera",U="Samsung",_="Sharp",M="Sony",D="Xiaomi",z="Zebra",B="Facebook",q="Chromium OS",F="Mac OS",$=" Browser",V=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},K=function(e,t){return typeof e===c&&-1!==W(t).indexOf(W(e))},W=function(e){return e.toLowerCase()},G=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},J=function(e,t){for(var n,i,r,a,c,u,d=0;d<t.length&&!c;){var p=t[d],f=t[d+1];for(n=i=0;n<p.length&&!c&&p[n];)if(c=p[n++].exec(e))for(r=0;r<f.length;r++)u=c[++i],typeof(a=f[r])===l&&a.length>0?2===a.length?typeof a[1]==o?this[a[0]]=a[1].call(this,u):this[a[0]]=a[1]:3===a.length?typeof a[1]!==o||a[1].exec&&a[1].test?this[a[0]]=u?u.replace(a[1],a[2]):s:this[a[0]]=u?a[1].call(this,u,a[2]):s:4===a.length&&(this[a[0]]=u?a[3].call(this,u.replace(a[1],a[2])):s):this[a]=u||s;d+=2}},X=function(e,t){for(var n in t)if(typeof t[n]===l&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(K(t[n][i],e))return"?"===n?s:n}else if(K(t[n],e))return"?"===n?s:n;return t.hasOwnProperty("*")?t["*"]:e},Q={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"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,h],[/opios[\/ ]+([\w\.]+)/i],[h,[p,H+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[p,H+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[p,H]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[p,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[p,"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],[p,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[p,"Quark"]],[/\bddg\/([\w\.]+)/i],[h,[p,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[p,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[p,"Smart Lenovo "+A]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+A],h],[/\bfocus\/([\w\.]+)/i],[h,[p,P+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[p,H+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[p,H+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[p,"MIUI"+$]],[/fxios\/([\w\.-]+)/i],[h,[p,P]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[p,"360"]],[/\b(qq)\/([\w\.]+)/i],[[p,/(.+)/,"$1Browser"],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1"+$],h],[/samsungbrowser\/([\w\.]+)/i],[h,[p,U+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[h,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[p,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[p],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,B],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\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],[p,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[p,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,O+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[p,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[h,X,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[p,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[p,P+" 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,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[p,[h,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[p,[h,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,W]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",W]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,W]]],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,[g,U],[f,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[g,U],[f,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[g,x],[f,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[g,x],[f,w]],[/(macintosh);/i],[d,[g,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[g,_],[f,b]],[/(?:honor)([-\w ]+)[;\)]/i],[d,[g,"Honor"],[f,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[g,L],[f,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[g,L],[f,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[d,/_/g," "],[g,D],[f,b]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[g,D],[f,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[g,"OPPO"],[f,b]],[/\b(opd2\d{3}a?) bui/i],[d,[g,"OPPO"],[f,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[g,"Vivo"],[f,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[g,"Realme"],[f,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[g,N],[f,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[g,N],[f,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[g,R],[f,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[g,R],[f,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[g,"Lenovo"],[f,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[g,"Nokia"],[f,b]],[/(pixel c)\b/i],[d,[g,C],[f,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[g,C],[f,b]],[/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,[g,M],[f,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[g,M],[f,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[g,"OnePlus"],[f,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[g,E],[f,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[g,E],[f,b]],[/(playbook);[-\w\),; ]+(rim)/i],[d,g,[f,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[g,I],[f,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[g,k],[f,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[g,k],[f,b]],[/(nexus 9)/i],[d,[g,"HTC"],[f,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[d,/_/g," "],[f,b]],[/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,[g,"TCL"],[f,w]],[/(itel) ((\w+))/i],[[g,W],d,[f,X,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[g,"Acer"],[f,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[g,"Meizu"],[f,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[g,"Ulefone"],[f,b]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[g,"Energizer"],[f,b]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[g,"Cat"],[f,b]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[g,"Smartfren"],[f,b]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[g,"Nothing"],[f,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,d,[f,b]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/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],[g,d,[f,w]],[/(surface duo)/i],[d,[g,j],[f,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[g,"Fairphone"],[f,b]],[/(u304aa)/i],[d,[g,"AT&T"],[f,b]],[/\bsie-(\w*)/i],[d,[g,"Siemens"],[f,b]],[/\b(rct\w+) b/i],[d,[g,"RCA"],[f,w]],[/\b(venue[\d ]{2,7}) b/i],[d,[g,"Dell"],[f,w]],[/\b(q(?:mv|ta)\w+) b/i],[d,[g,"Verizon"],[f,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[g,"Barnes & Noble"],[f,w]],[/\b(tm\d{3}\w+) b/i],[d,[g,"NuVision"],[f,w]],[/\b(k88) b/i],[d,[g,"ZTE"],[f,w]],[/\b(nx\d{3}j) b/i],[d,[g,"ZTE"],[f,b]],[/\b(gen\d{3}) b.+49h/i],[d,[g,"Swiss"],[f,b]],[/\b(zur\d{3}) b/i],[d,[g,"Swiss"],[f,w]],[/\b((zeki)?tb.*\b) b/i],[d,[g,"Zeki"],[f,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],d,[f,w]],[/\b(ns-?\w{0,9}) b/i],[d,[g,"Insignia"],[f,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[g,"NextBook"],[f,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],d,[f,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],d,[f,b]],[/\b(ph-1) /i],[d,[g,"Essential"],[f,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[g,"Envizen"],[f,w]],[/\b(trio[-\w\. ]+) b/i],[d,[g,"MachSpeed"],[f,w]],[/\btu_(1491) b/i],[d,[g,"Rotor"],[f,w]],[/(shield[\w ]+) b/i],[d,[g,"Nvidia"],[f,w]],[/(sprint) (\w+)/i],[g,d,[f,b]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[g,j],[f,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[g,z],[f,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[g,z],[f,b]],[/smart-tv.+(samsung)/i],[g,[f,y]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[g,U],[f,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,R],[f,y]],[/(apple) ?tv/i],[g,[d,x+" TV"],[f,y]],[/crkey/i],[[d,O+"cast"],[g,C],[f,y]],[/droid.+aft(\w+)( bui|\))/i],[d,[g,E],[f,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[g,_],[f,y]],[/(bravia[\w ]+)( bui|\))/i],[d,[g,M],[f,y]],[/(mitv-\w{5}) bui/i],[d,[g,D],[f,y]],[/Hbbtv.*(technisat) (.*);/i],[g,d,[f,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,G],[d,G],[f,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,d,[f,v]],[/droid.+; (shield) bui/i],[d,[g,"Nvidia"],[f,v]],[/(playstation [345portablevi]+)/i],[d,[g,M],[f,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[g,j],[f,v]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[d,[g,U],[f,S]],[/((pebble))app/i],[g,d,[f,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[g,x],[f,S]],[/droid.+; (glass) \d/i],[d,[g,C],[f,S]],[/droid.+; (wt63?0{2,3})\)/i],[d,[g,z],[f,S]],[/droid.+; (glass) \d/i],[d,[g,C],[f,S]],[/(pico) (4|neo3(?: link|pro)?)/i],[g,d,[f,S]],[/; (quest( \d| pro)?)/i],[d,[g,B],[f,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[f,T]],[/(aeobc)\b/i],[d,[g,E],[f,T]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[f,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[f,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,b]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[p,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[p,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[p,"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],[p,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,h],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[h,X,Q]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,X,Q],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,F],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,h],[/\(bb(10);/i],[h,[p,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[p,P+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[p,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,q],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) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,h],[/(sunos) ?([\w\.\d]*)/i],[[p,"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],[p,h]]},Z=function(e,t){if(typeof e===l&&(t=e,e=s),!(this instanceof Z))return new Z(e,t).getResult();var n=typeof r!==a&&r.navigator?r.navigator:s,i=e||(n&&n.userAgent?n.userAgent:""),v=n&&n.userAgentData?n.userAgentData:s,y=t?function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n}(Y,t):Y,S=n&&n.userAgent==i;return this.getBrowser=function(){var e,t={};return t[p]=s,t[h]=s,J.call(t,i,y.browser),t[u]=typeof(e=t[h])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:s,S&&n&&n.brave&&typeof n.brave.isBrave==o&&(t[p]="Brave"),t},this.getCPU=function(){var e={};return e[m]=s,J.call(e,i,y.cpu),e},this.getDevice=function(){var e={};return e[g]=s,e[d]=s,e[f]=s,J.call(e,i,y.device),S&&!e[f]&&v&&v.mobile&&(e[f]=b),S&&"Macintosh"==e[d]&&n&&typeof n.standalone!==a&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[d]="iPad",e[f]=w),e},this.getEngine=function(){var e={};return e[p]=s,e[h]=s,J.call(e,i,y.engine),e},this.getOS=function(){var e={};return e[p]=s,e[h]=s,J.call(e,i,y.os),S&&!e[p]&&v&&v.platform&&"Unknown"!=v.platform&&(e[p]=v.platform.replace(/chrome os/i,q).replace(/macos/i,F)),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 i},this.setUA=function(e){return i=typeof e===c&&e.length>500?G(e,500):e,this},this.setUA(i),this};Z.VERSION="1.0.40",Z.BROWSER=V([p,h,u]),Z.CPU=V([m]),Z.DEVICE=V([d,g,f,v,b,y,w,S,T]),Z.ENGINE=Z.OS=V([p,h]),typeof t!==a?(e.exports&&(t=e.exports=Z),t.UAParser=Z):n.amdO?(i=function(){return Z}.call(t,n,t,e))===s||(e.exports=i):typeof r!==a&&(r.UAParser=Z);var ee=typeof r!==a&&(r.jQuery||r.Zepto);if(ee&&!ee.ua){var te=new Z;ee.ua=te.getResult(),ee.ua.get=function(){return te.getUA()},ee.ua.set=function(e){te.setUA(e);var t=te.getResult();for(var n in t)ee.ua[n]=t[n]}}}("object"==typeof window?window:this)},7781:e=>{"use strict";e.exports=l},8398:e=>{"use strict";e.exports=c},8531:e=>{"use strict";e.exports=u},8705:(e,t,n)=>{"use strict";n.d(t,{v:()=>f});var i=n(5438),r=n(2075),s=n(4696);function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function l(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,a(e,t,"set"),n),n}function c(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}var u=new WeakMap,d=new WeakSet;function p(e,t){var n;"prod"!==function(e,t){return t.get?t.get.call(e):t.value}(n=this,a(n,u,"get"))&&console[e](...t)}const f=new class{trace(){var e;c(this,d,p).call(this,"trace",[]),null===(e=(0,r.n1)())||void 0===e||e.api.pushLog([],{level:i.$b.TRACE})}debug(...e){var t;c(this,d,p).call(this,"debug",e),null===(t=(0,r.n1)())||void 0===t||t.api.pushLog(e,{level:i.$b.DEBUG})}info(...e){var t;c(this,d,p).call(this,"info",e),null===(t=(0,r.n1)())||void 0===t||t.api.pushLog(e,{level:i.$b.INFO})}log(...e){var t;c(this,d,p).call(this,"log",e),null===(t=(0,r.n1)())||void 0===t||t.api.pushLog(e,{level:i.$b.LOG})}warn(...e){var t;c(this,d,p).call(this,"warn",e),null===(t=(0,r.n1)())||void 0===t||t.api.pushLog(e,{level:i.$b.WARN})}error(e,t){var n;c(this,d,p).call(this,"error",[e]),t&&c(this,d,p).call(this,"error",["Error context",t]),null===(n=(0,r.n1)())||void 0===n||n.api.pushError(e,{context:t})}constructor(){var e,t;o(e=this,t=d),t.add(e),function(e,t,n){o(e,t),t.set(e,n)}(this,u,{writable:!0,value:void 0}),l(this,u,(0,s.u)())}}},8943:(e,t,n)=>{"use strict";n.d(t,{G:()=>s,s:()=>r});var i=n(2533);const r=i.id,s=`/a/${i.id}`}},m={};function v(e){var t=m[e];if(void 0!==t)return t.exports;var n=m[e]={id:e,loaded:!1,exports:{}};return h[e].call(n.exports,n,n.exports,v),n.loaded=!0,n.exports}v.m=h,v.amdO={},v.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return v.d(t,{a:t}),t},p=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,v.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);v.r(n);var i={};d=d||[null,p({}),p([]),p(p)];for(var r=2&t&&e;("object"==typeof r||"function"==typeof r)&&!~d.indexOf(r);r=p(r))Object.getOwnPropertyNames(r).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,v.d(n,i),n},v.d=(e,t)=>{for(var n in t)v.o(t,n)&&!v.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},v.f={},v.e=e=>Promise.all(Object.keys(v.f).reduce((t,n)=>(v.f[n](e,t),t),[])),v.u=e=>e+".js?_cache="+{2:"6bc4878d4d9e63c12da9",64:"e38a98b9fe41eb70b8fc",70:"41af3bfdf4de62b9fbd7",74:"860a490cbab4209e465b",150:"27876e62d816cb9590a5",156:"dcd383229c5404d776bf",190:"3e794f4d59b662c5c922",206:"4720daabdf402e20df3a",220:"974ff4e5d0fc7706c85c",290:"91bfb31e190fe1da1985",327:"c43cad31d28436cfa250",341:"439352a98d26cc4e2775",353:"abd436cb48a10de1ece9",377:"c5b1e167fa8ac06565b4",494:"c1b48203603f318428d9",503:"60d29976a765e012e812",509:"e476fb30202886e2bdfa",549:"c021be7a5841105f985a",582:"68b7b01dcf4894e7a09b",591:"72d8c50f59d75a36ab7e",605:"6af7ff87010f6e6cdcac",614:"2152c49a19e8cb88bff6",644:"8aeba062dbcfb1d7daa4",660:"9b299df16cf279f6f22b",697:"fbbc9b6cf8f8f0f32362",751:"62c0e08c8d3642ab137d",767:"a8ab42dd2e5816a647cd",782:"35041ce5d612c8c83ccf",792:"79c48dbde1c722d712fa",851:"6cfdc72d68c2c3754b46",876:"d73f0775b5b69abe604d",944:"b4c7bab5d72bcf4cb8cf",980:"683eed83543c656fdbc1"}[e],v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),v.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f={},g="grafana-metricsdrilldown-app:",v.l=(e,t,n,i)=>{if(f[e])f[e].push(t);else{var r,s;if(void 0!==n)for(var o=document.getElementsByTagName("script"),a=0;a<o.length;a++){var l=o[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==g+n){r=l;break}}r||(s=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,v.nc&&r.setAttribute("nonce",v.nc),r.setAttribute("data-webpack",g+n),r.src=e,0!==r.src.indexOf(window.location.origin+"/")&&(r.crossOrigin="anonymous"),r.integrity=v.sriHashes[i],r.crossOrigin="anonymous"),f[e]=[t];var c=(t,n)=>{r.onerror=r.onload=null,clearTimeout(u);var i=f[e];if(delete f[e],r.parentNode&&r.parentNode.removeChild(r),i&&i.forEach(e=>e(n)),t)return t(n)},u=setTimeout(c.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=c.bind(null,r.onerror),r.onload=c.bind(null,r.onload),s&&document.head.appendChild(r)}},v.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},v.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),v.p="public/plugins/grafana-metricsdrilldown-app/",v.sriHashes={2:"sha256-OseGARuemcGiyfZz/mxGPJ6JzzwAdQIsrX6fIKbshz4=",64:"sha256-tdKXaRH7BsZaIxQ5fnMQfo7HagoKcOpu45fApbCDpbk=",70:"sha256-MCKdpxlxcSiO/VpSHNc0q+heibk7+7ve06veaItb6SQ=",74:"sha256-aaO+SnNZSQSpyr3nVB9Tc0Dez7WWE5jrYR5uG1cV3Do=",150:"sha256-dV9ly5d1+pNpr+jSRiuPQvHA+ivTNQ3g7BbXHw32gA4=",156:"sha256-Bo5PyLaQ8sgO6yPS4FhAlVlpOscfzI0pWdsqBDuIX20=",190:"sha256-aiXsGnR1OwMzr4lluBWP2Ftrd/yFFLJyKOgKFLPuPS8=",206:"sha256-gVenjTmWjXMdnojT0VRuPkPD4H2G5kqcjp3R6lNLG3w=",220:"sha256-YymTJWbpaBG9/NToORnODTJYz7Q6znFGZXVfo1fVdQ0=",290:"sha256-fxgiK6Niwngs3yCJ7zRnsfnEiJaCD8HUaazc4xh/Oko=",327:"sha256-gwgEd0Wwg4enHcwX2bkAM7zpFTaMzHpNiWZgPemncik=",341:"sha256-+CNXdnoZaI5STGfYeklR0JAQbCTeIDEsjIjp3reVtm0=",353:"sha256-iSYf29BsXEymYHas7i57XARKHu6jltLQQiKoXSwPZIE=",377:"sha256-oY/nuuZ8IuRvApmygmsv+DAn5NurdOfunc2xMKuT4oM=",494:"sha256-qpU/bCbtJ8CXOz8+iEgmnNZi5sSU+gsshz3LRebu5Hg=",503:"sha256-2iK7hZ2Cx6sB3e3Pav/7ldpQOo2YLcl4ut4SNFzs1Qo=",509:"sha256-6c8j9l6lxMdD2+lF5J+/0D7KqacQkR/l/Om17NHJcaU=",549:"sha256-NObCzvpbs9zayvGudZ3ZtmFh+Faonojt0G1S3rD5JSY=",582:"sha256-manrrzZEfPd+OJ9Z3Bd3TEVadI6D3g1JDDq1YBzOqoc=",591:"sha256-aFeKURcdDlRpmIAImf0xoFCaEkdixTyfviao544ElvY=",605:"sha256-vnVJLJegVwXWNkko/gkVnslr+Xsq6BELFgOvll8JVNs=",614:"sha256-fmemCb1Ob8KYboZpmB6K5xor5pMpMbwHXmA/YTTiHhk=",644:"sha256-pf7HlD5FSMUKKIZ98QpuPt+AplyjCyNcSJEdaxqE41c=",660:"sha256-ZbNxIRINNDO5yO+2KULr8sRhwwIcswCQU8Mr4aswrdM=",697:"sha256-teQZ5qeTs8UaDJtgBp/QKBHwpzarmWz+n0eLKd8i/hA=",751:"sha256-I1ewgSGFf0uiDrKalu2OZBH+ZGQ/xpC4EMH8pJK6ZKk=",767:"sha256-UXExZ8boHLVctNdsJ2yn929JcRp4RkYRK7UfkpjRsaU=",782:"sha256-C7Zv3xHyJHVrAuio3U4xafJANpu+Dhhjidakg9K1es0=",792:"sha256-n9glSvUoslqv4tg53t94pHnbLrTU+AZ5rQm88Td1s2I=",851:"sha256-qfsXp3RcR72OvM5GoP2E4F+JJ4yYeBhaImAz9RyQqYw=",876:"sha256-l8hEFs+KeBF8hsMbOnP1ZhCmbFmcGzs/bhPXWkHacF4=",944:"sha256-OVZI3gSJuxoudok5S/svrimmNB8Q45bCdne9r4Izhiw=",980:"sha256-zODIPAchU8yhVSHg6/AIPGzUczSGmmQaBtjEsdmoyfM="},(()=>{v.b=document.baseURI||self.location.href;var e={231:0};v.f.j=(t,n)=>{var i=v.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise((n,r)=>i=e[t]=[n,r]);n.push(i[2]=r);var s=v.p+v.u(t),o=new Error;v.l(s,n=>{if(v.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;o.message="Loading chunk "+t+" failed.\n("+r+": "+s+")",o.name="ChunkLoadError",o.type=r,o.request=s,i[1](o)}},"chunk-"+t,t)}};var t=(t,n)=>{var i,r,[s,o,a]=n,l=0;if(s.some(t=>0!==e[t])){for(i in o)v.o(o,i)&&(v.m[i]=o[i]);if(a)a(v)}for(t&&t(n);l<s.length;l++)r=s[l],v.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=self.webpackChunkgrafana_metricsdrilldown_app=self.webpackChunkgrafana_metricsdrilldown_app||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var b={};return(()=>{"use strict";v.r(b),v.d(b,{plugin:()=>w});var e=v(1308),t=v.n(e);v.p=t()&&t().uri?t().uri.slice(0,t().uri.lastIndexOf("/")+1):"public/plugins/grafana-metricsdrilldown-app/";var n=v(7781),i=v(2007),r=v(5959),s=v.n(r);const o=(0,r.lazy)(()=>Promise.all([v.e(944),v.e(591),v.e(751),v.e(782),v.e(614),v.e(605),v.e(377)]).then(v.bind(v,2377)));const a=[{id:`${v(2533).id}/label-breakdown-component/v1`,title:"Label Breakdown",description:"A metrics label breakdown view from the Metrics Drilldown app.",component:e=>s().createElement(r.Suspense,{fallback:s().createElement("div",null,"Loading...")},s().createElement(o,e))}];var l=v(3781),c=v(3498),u=v(4440);function d(e,t=c.b.Drilldown){const n=(0,l.kY)([[l.I8.DatasourceId,e]]);return(0,l.Rk)(t,n)}const p="Browse metrics in Grafana Metrics Drilldown",f=[{title:"Open in Metrics Drilldown",description:p,targets:[n.PluginExtensionPoints.DataSourceConfigActions,n.PluginExtensionPoints.DataSourceConfigStatus],icon:"drilldown",category:"metrics-drilldown",path:(0,l.Rk)(c.b.Drilldown),configure:e=>{var t,n;if((null==e||null===(t=e.dataSource)||void 0===t?void 0:t.type)&&(null==e||null===(n=e.dataSource)||void 0===n?void 0:n.uid)&&(0,u.aQ)(e.dataSource))return{path:d(e.dataSource.uid),description:p}}}];var g=v(8705);function h(e,t,n,i,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,r)}const m=(0,r.lazy)(()=>{return(e=function*(){const{initPluginTranslations:e}=yield Promise.all([v.e(591),v.e(503)]).then(v.bind(v,5503)),{loadResources:t}=yield Promise.all([v.e(591),v.e(751)]).then(v.bind(v,6751));yield e("grafana-scenes",[t]);const{wasmSupported:n}=yield Promise.all([v.e(944),v.e(290)]).then(v.bind(v,2290)),{default:i}=yield v.e(944).then(v.bind(v,6944));if(n())try{yield i()}catch(e){g.v.error(e,{message:"Error while initializing outlier detection"})}else g.v.warn("WASM not supported, outlier detection will not work");return Promise.all([v.e(944),v.e(591),v.e(751),v.e(782),v.e(614),v.e(792),v.e(605),v.e(509)]).then(v.bind(v,4509))},function(){var t=this,n=arguments;return new Promise(function(i,r){var s=e.apply(t,n);function o(e){h(s,i,r,o,a,"next",e)}function a(e){h(s,i,r,o,a,"throw",e)}o(void 0)})})();var e}),w=(new n.AppPlugin).setRootPage(e=>s().createElement(r.Suspense,{fallback:s().createElement(i.LoadingPlaceholder,{text:""})},s().createElement(m,e)));for(const e of[...l.Ge,...f])w.addLink(e);for(const e of a)w.exposeComponent(e)})(),b})());
//# sourceMappingURL=module.js.map