UNPKG

@slashedcloud/player

Version:

A media player application utilizing Shaka Player for adaptive video streaming, capable of playing HLS, MPD and plain HTTP video streams.

1,954 lines 394 kB
var Xu = Object.defineProperty, Ku = Object.defineProperties; var Ju = Object.getOwnPropertyDescriptors; var Rn = Object.getOwnPropertySymbols; var Mi = Object.prototype.hasOwnProperty, xi = Object.prototype.propertyIsEnumerable; var Vr = (e, t, n) => t in e ? Xu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, p = (e, t) => { for (var n in t || (t = {})) Mi.call(t, n) && Vr(e, n, t[n]); if (Rn) for (var n of Rn(t)) xi.call(t, n) && Vr(e, n, t[n]); return e; }, A = (e, t) => Ku(e, Ju(t)); var Yr = (e, t) => { var n = {}; for (var r in e) Mi.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && Rn) for (var r of Rn(e)) t.indexOf(r) < 0 && xi.call(e, r) && (n[r] = e[r]); return n; }; var Mn = (e, t, n) => Vr(e, typeof t != "symbol" ? t + "" : t, n); var X = (e, t, n) => new Promise((r, s) => { var i = (c) => { try { a(n.next(c)); } catch (u) { s(u); } }, o = (c) => { try { a(n.throw(c)); } catch (u) { s(u); } }, a = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(i, o); a((n = n.apply(e, t)).next()); }); import Qu from "./Base.js"; import { P as Xr, S as Kr } from "../PlayerError-JebC7rsX.js"; /*! * SlashedCloud v0.1.2 (https://github.com/SlashedCloud/player#readme) * Copyright 2024-2024 rogerio.jardim@fedrax.pt * Licensed under Apache (https://github.com/SlashedCloud/player/blob/develop/LICENSE) */ const pa = Object.prototype.toString; function ft(e) { switch (pa.call(e)) { case "[object Error]": case "[object Exception]": case "[object DOMException]": return !0; default: return We(e, Error); } } function Gt(e, t) { return pa.call(e) === `[object ${t}]`; } function ha(e) { return Gt(e, "ErrorEvent"); } function Ai(e) { return Gt(e, "DOMError"); } function Zu(e) { return Gt(e, "DOMException"); } function He(e) { return Gt(e, "String"); } function Vs(e) { return typeof e == "object" && e !== null && "__sentry_template_string__" in e && "__sentry_template_values__" in e; } function Ys(e) { return e === null || Vs(e) || typeof e != "object" && typeof e != "function"; } function yt(e) { return Gt(e, "Object"); } function Er(e) { return typeof Event != "undefined" && We(e, Event); } function el(e) { return typeof Element != "undefined" && We(e, Element); } function tl(e) { return Gt(e, "RegExp"); } function br(e) { return !!(e && e.then && typeof e.then == "function"); } function nl(e) { return yt(e) && "nativeEvent" in e && "preventDefault" in e && "stopPropagation" in e; } function We(e, t) { try { return e instanceof t; } catch (n) { return !1; } } function ma(e) { return !!(typeof e == "object" && e !== null && (e.__isVue || e._isVue)); } function pt(e, t = 0) { return typeof e != "string" || t === 0 || e.length <= t ? e : `${e.slice(0, t)}...`; } function Jr(e, t) { let n = e; const r = n.length; if (r <= 150) return n; t > r && (t = r); let s = Math.max(t - 60, 0); s < 5 && (s = 0); let i = Math.min(s + 140, r); return i > r - 5 && (i = r), i === r && (s = Math.max(i - 140, 0)), n = n.slice(s, i), s > 0 && (n = `'{snip} ${n}`), i < r && (n += " {snip}"), n; } function Zn(e, t) { if (!Array.isArray(e)) return ""; const n = []; for (let r = 0; r < e.length; r++) { const s = e[r]; try { ma(s) ? n.push("[VueViewModel]") : n.push(String(s)); } catch (i) { n.push("[value cannot be serialized]"); } } return n.join(t); } function rl(e, t, n = !1) { return He(e) ? tl(t) ? t.test(e) : He(t) ? n ? e === t : e.includes(t) : !1 : !1; } function Qe(e, t = [], n = !1) { return t.some((r) => rl(e, r, n)); } function sl(e, t, n = 250, r, s, i, o) { if (!i.exception || !i.exception.values || !o || !We(o.originalException, Error)) return; const a = i.exception.values.length > 0 ? i.exception.values[i.exception.values.length - 1] : void 0; a && (i.exception.values = il( fs( e, t, s, o.originalException, r, i.exception.values, a, 0 ), n )); } function fs(e, t, n, r, s, i, o, a) { if (i.length >= n + 1) return i; let c = [...i]; if (We(r[s], Error)) { Oi(o, a); const u = e(t, r[s]), l = c.length; Ni(u, s, l, a), c = fs( e, t, n, r[s], s, [u, ...c], u, l ); } return Array.isArray(r.errors) && r.errors.forEach((u, l) => { if (We(u, Error)) { Oi(o, a); const d = e(t, u), f = c.length; Ni(d, `errors[${l}]`, f, a), c = fs( e, t, n, u, s, [d, ...c], d, f ); } }), c; } function Oi(e, t) { e.mechanism = e.mechanism || { type: "generic", handled: !0 }, e.mechanism = A(p(p({}, e.mechanism), e.type === "AggregateError" && { is_exception_group: !0 }), { exception_id: t }); } function Ni(e, t, n, r) { e.mechanism = e.mechanism || { type: "generic", handled: !0 }, e.mechanism = A(p({}, e.mechanism), { type: "chained", source: t, exception_id: n, parent_id: r }); } function il(e, t) { return e.map((n) => (n.value && (n.value = pt(n.value, t)), n)); } const ht = "8.30.0", N = globalThis; function vr(e, t, n) { const r = n || N, s = r.__SENTRY__ = r.__SENTRY__ || {}, i = s[ht] = s[ht] || {}; return i[e] || (i[e] = t()); } const Lt = N, ol = 80; function ze(e, t = {}) { if (!e) return "<unknown>"; try { let n = e; const r = 5, s = []; let i = 0, o = 0; const a = " > ", c = a.length; let u; const l = Array.isArray(t) ? t : t.keyAttrs, d = !Array.isArray(t) && t.maxStringLength || ol; for (; n && i++ < r && (u = al(n, l), !(u === "html" || i > 1 && o + s.length * c + u.length >= d)); ) s.push(u), o += u.length, n = n.parentNode; return s.reverse().join(a); } catch (n) { return "<unknown>"; } } function al(e, t) { const n = e, r = []; if (!n || !n.tagName) return ""; if (Lt.HTMLElement && n instanceof HTMLElement && n.dataset) { if (n.dataset.sentryComponent) return n.dataset.sentryComponent; if (n.dataset.sentryElement) return n.dataset.sentryElement; } r.push(n.tagName.toLowerCase()); const s = t && t.length ? t.filter((o) => n.getAttribute(o)).map((o) => [o, n.getAttribute(o)]) : null; if (s && s.length) s.forEach((o) => { r.push(`[${o[0]}="${o[1]}"]`); }); else { n.id && r.push(`#${n.id}`); const o = n.className; if (o && He(o)) { const a = o.split(/\s+/); for (const c of a) r.push(`.${c}`); } } const i = ["aria-label", "type", "name", "title", "alt"]; for (const o of i) { const a = n.getAttribute(o); a && r.push(`[${o}="${a}"]`); } return r.join(""); } function ga() { try { return Lt.document.location.href; } catch (e) { return ""; } } function cl(e) { return Lt.document && Lt.document.querySelector ? Lt.document.querySelector(e) : null; } function _a(e) { if (!Lt.HTMLElement) return null; let t = e; const n = 5; for (let r = 0; r < n; r++) { if (!t) return null; if (t instanceof HTMLElement) { if (t.dataset.sentryComponent) return t.dataset.sentryComponent; if (t.dataset.sentryElement) return t.dataset.sentryElement; } t = t.parentNode; } return null; } const Vt = typeof __SENTRY_DEBUG__ == "undefined" || __SENTRY_DEBUG__, ul = "Sentry Logger ", er = [ "debug", "info", "warn", "error", "log", "assert", "trace" ], tr = {}; function vt(e) { if (!("console" in N)) return e(); const t = N.console, n = {}, r = Object.keys(tr); r.forEach((s) => { const i = tr[s]; n[s] = t[s], t[s] = i; }); try { return e(); } finally { r.forEach((s) => { t[s] = n[s]; }); } } function ll() { let e = !1; const t = { enable: () => { e = !0; }, disable: () => { e = !1; }, isEnabled: () => e }; return Vt ? er.forEach((n) => { t[n] = (...r) => { e && vt(() => { N.console[n](`${ul}[${n}]:`, ...r); }); }; }) : er.forEach((n) => { t[n] = () => { }; }), t; } const _ = vr("logger", ll), dl = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; function fl(e) { return e === "http" || e === "https"; } function mn(e, t = !1) { const { host: n, path: r, pass: s, port: i, projectId: o, protocol: a, publicKey: c } = e; return `${a}://${c}${t && s ? `:${s}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${o}`; } function pl(e) { const t = dl.exec(e); if (!t) { vt(() => { console.error(`Invalid Sentry Dsn: ${e}`); }); return; } const [n, r, s = "", i = "", o = "", a = ""] = t.slice(1); let c = "", u = a; const l = u.split("/"); if (l.length > 1 && (c = l.slice(0, -1).join("/"), u = l.pop()), u) { const d = u.match(/^\d+/); d && (u = d[0]); } return ya({ host: i, pass: s, path: c, projectId: u, port: o, protocol: n, publicKey: r }); } function ya(e) { return { protocol: e.protocol, publicKey: e.publicKey || "", pass: e.pass || "", host: e.host, port: e.port || "", path: e.path || "", projectId: e.projectId }; } function hl(e) { if (!Vt) return !0; const { port: t, projectId: n, protocol: r } = e; return ["protocol", "publicKey", "host", "projectId"].find((o) => e[o] ? !1 : (_.error(`Invalid Sentry Dsn: ${o} missing`), !0)) ? !1 : n.match(/^\d+$/) ? fl(r) ? t && isNaN(parseInt(t, 10)) ? (_.error(`Invalid Sentry Dsn: Invalid port ${t}`), !1) : !0 : (_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) : (_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1); } function ml(e) { const t = typeof e == "string" ? pl(e) : ya(e); if (!(!t || !hl(t))) return t; } class Ne extends Error { /** Display name of this error instance. */ constructor(t, n = "warn") { super(t), this.message = t, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = n; } } function Ee(e, t, n) { if (!(t in e)) return; const r = e[t], s = n(r); typeof s == "function" && Sa(s, r), e[t] = s; } function we(e, t, n) { try { Object.defineProperty(e, t, { // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it value: n, writable: !0, configurable: !0 }); } catch (r) { Vt && _.log(`Failed to add non-enumerable property "${t}" to object`, e); } } function Sa(e, t) { try { const n = t.prototype || {}; e.prototype = t.prototype = n, we(e, "__sentry_original__", t); } catch (n) { } } function Xs(e) { return e.__sentry_original__; } function gl(e) { return Object.keys(e).map((t) => `${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&"); } function Ea(e) { if (ft(e)) return p({ message: e.message, name: e.name, stack: e.stack }, Li(e)); if (Er(e)) { const t = p({ type: e.type, target: Di(e.target), currentTarget: Di(e.currentTarget) }, Li(e)); return typeof CustomEvent != "undefined" && We(e, CustomEvent) && (t.detail = e.detail), t; } else return e; } function Di(e) { try { return el(e) ? ze(e) : Object.prototype.toString.call(e); } catch (t) { return "<unknown>"; } } function Li(e) { if (typeof e == "object" && e !== null) { const t = {}; for (const n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); return t; } else return {}; } function _l(e, t = 40) { const n = Object.keys(Ea(e)); n.sort(); const r = n[0]; if (!r) return "[object has no keys]"; if (r.length >= t) return pt(r, t); for (let s = n.length; s > 0; s--) { const i = n.slice(0, s).join(", "); if (!(i.length > t)) return s === n.length ? i : pt(i, t); } return ""; } function ae(e) { return ps(e, /* @__PURE__ */ new Map()); } function ps(e, t) { if (yl(e)) { const n = t.get(e); if (n !== void 0) return n; const r = {}; t.set(e, r); for (const s of Object.keys(e)) typeof e[s] != "undefined" && (r[s] = ps(e[s], t)); return r; } if (Array.isArray(e)) { const n = t.get(e); if (n !== void 0) return n; const r = []; return t.set(e, r), e.forEach((s) => { r.push(ps(s, t)); }), r; } return e; } function yl(e) { if (!yt(e)) return !1; try { const t = Object.getPrototypeOf(e).constructor.name; return !t || t === "Object"; } catch (t) { return !0; } } const ba = 50, St = "?", Pi = /\(error: (.*)\)/, Fi = /captureMessage|captureException/; function va(...e) { const t = e.sort((n, r) => n[0] - r[0]).map((n) => n[1]); return (n, r = 0, s = 0) => { const i = [], o = n.split(` `); for (let a = r; a < o.length; a++) { const c = o[a]; if (c.length > 1024) continue; const u = Pi.test(c) ? c.replace(Pi, "$1") : c; if (!u.match(/\S*Error: /)) { for (const l of t) { const d = l(u); if (d) { i.push(d); break; } } if (i.length >= ba + s) break; } } return El(i.slice(s)); }; } function Sl(e) { return Array.isArray(e) ? va(...e) : e; } function El(e) { if (!e.length) return []; const t = Array.from(e); return /sentryWrapped/.test(xn(t).function || "") && t.pop(), t.reverse(), Fi.test(xn(t).function || "") && (t.pop(), Fi.test(xn(t).function || "") && t.pop()), t.slice(0, ba).map((n) => A(p({}, n), { filename: n.filename || xn(t).filename, function: n.function || St })); } function xn(e) { return e[e.length - 1] || {}; } const Qr = "<anonymous>"; function je(e) { try { return !e || typeof e != "function" ? Qr : e.name || Qr; } catch (t) { return Qr; } } function $i(e) { const t = e.exception; if (t) { const n = []; try { return t.values.forEach((r) => { r.stacktrace.frames && n.push(...r.stacktrace.frames); }), n; } catch (r) { return; } } } const jn = {}, Bi = {}; function rt(e, t) { jn[e] = jn[e] || [], jn[e].push(t); } function st(e, t) { Bi[e] || (t(), Bi[e] = !0); } function ke(e, t) { const n = e && jn[e]; if (n) for (const r of n) try { r(t); } catch (s) { Vt && _.error( `Error while triggering instrumentation handler. Type: ${e} Name: ${je(r)} Error:`, s ); } } function wa(e) { const t = "console"; rt(t, e), st(t, bl); } function bl() { "console" in N && er.forEach(function(e) { e in N.console && Ee(N.console, e, function(t) { return tr[e] = t, function(...n) { ke("console", { args: n, level: e }); const s = tr[e]; s && s.apply(N.console, n); }; }); }); } const nr = N; function Ia() { if (!("fetch" in nr)) return !1; try { return new Headers(), new Request("http://www.example.com"), new Response(), !0; } catch (e) { return !1; } } function hs(e) { return e && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString()); } function Ta() { if (typeof EdgeRuntime == "string") return !0; if (!Ia()) return !1; if (hs(nr.fetch)) return !0; let e = !1; const t = nr.document; if (t && typeof t.createElement == "function") try { const n = t.createElement("iframe"); n.hidden = !0, t.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (e = hs(n.contentWindow.fetch)), t.head.removeChild(n); } catch (n) { Vt && _.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", n); } return e; } function vl() { return "ReportingObserver" in nr; } const ka = 1e3; function gn() { return Date.now() / ka; } function wl() { const { performance: e } = N; if (!e || !e.now) return gn; const t = Date.now() - e.now(), n = e.timeOrigin == null ? t : e.timeOrigin; return () => (n + e.now()) / ka; } const ie = wl(), he = (() => { const { performance: e } = N; if (!e || !e.now) return; const t = 3600 * 1e3, n = e.now(), r = Date.now(), s = e.timeOrigin ? Math.abs(e.timeOrigin + n - r) : t, i = s < t, o = e.timing && e.timing.navigationStart, c = typeof o == "number" ? Math.abs(o + n - r) : t, u = c < t; return i || u ? s <= c ? e.timeOrigin : o : r; })(); function Ks(e, t) { const n = "fetch"; rt(n, e), st(n, () => Ca(void 0, t)); } function Il(e) { const t = "fetch-body-resolved"; rt(t, e), st(t, () => Ca(kl)); } function Ca(e, t = !1) { t && !Ta() || Ee(N, "fetch", function(n) { return function(...r) { const { method: s, url: i } = Cl(r), o = { args: r, fetchData: { method: s, url: i }, startTimestamp: ie() * 1e3 }; e || ke("fetch", p({}, o)); const a = new Error().stack; return n.apply(N, r).then( (c) => X(this, null, function* () { return e ? e(c) : ke("fetch", A(p({}, o), { endTimestamp: ie() * 1e3, response: c })), c; }), (c) => { throw ke("fetch", A(p({}, o), { endTimestamp: ie() * 1e3, error: c })), ft(c) && c.stack === void 0 && (c.stack = a, we(c, "framesToPop", 1)), c; } ); }; }); } function Tl(e, t) { return X(this, null, function* () { if (e && e.body && e.body.getReader) { const n = e.body.getReader(); function r(i) { return X(this, arguments, function* ({ done: s }) { if (s) return Promise.resolve(); try { const o = yield Promise.race([ n.read(), new Promise((a) => { setTimeout(() => { a({ done: !0 }); }, 5e3); }) ]); yield r(o); } catch (o) { } }); } return n.read().then(r).then(t).catch(() => { }); } }); } function kl(e) { return X(this, null, function* () { let t; try { t = e.clone(); } catch (n) { return; } yield Tl(t, () => { ke("fetch-body-resolved", { endTimestamp: ie() * 1e3, response: e }); }); }); } function ms(e, t) { return !!e && typeof e == "object" && !!e[t]; } function Hi(e) { return typeof e == "string" ? e : e ? ms(e, "url") ? e.url : e.toString ? e.toString() : "" : ""; } function Cl(e) { if (e.length === 0) return { method: "GET", url: "" }; if (e.length === 2) { const [n, r] = e; return { url: Hi(n), method: ms(r, "method") ? String(r.method).toUpperCase() : "GET" }; } const t = e[0]; return { url: Hi(t), method: ms(t, "method") ? String(t.method).toUpperCase() : "GET" }; } let An = null; function Ra(e) { const t = "error"; rt(t, e), st(t, Rl); } function Rl() { An = N.onerror, N.onerror = function(e, t, n, r, s) { return ke("error", { column: r, error: s, line: n, msg: e, url: t }), An && !An.__SENTRY_LOADER__ ? An.apply(this, arguments) : !1; }, N.onerror.__SENTRY_INSTRUMENTED__ = !0; } let On = null; function Ma(e) { const t = "unhandledrejection"; rt(t, e), st(t, Ml); } function Ml() { On = N.onunhandledrejection, N.onunhandledrejection = function(e) { return ke("unhandledrejection", e), On && !On.__SENTRY_LOADER__ ? On.apply(this, arguments) : !0; }, N.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0; } function xl() { return typeof __SENTRY_BROWSER_BUNDLE__ != "undefined" && !!__SENTRY_BROWSER_BUNDLE__; } function Al() { return "npm"; } function Ol() { return !xl() && Object.prototype.toString.call(typeof process != "undefined" ? process : 0) === "[object process]"; } function Ui() { return typeof window != "undefined" && (!Ol() || Nl()); } function Nl() { return ( // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any N.process !== void 0 && N.process.type === "renderer" ); } function Dl() { const e = typeof WeakSet == "function", t = e ? /* @__PURE__ */ new WeakSet() : []; function n(s) { if (e) return t.has(s) ? !0 : (t.add(s), !1); for (let i = 0; i < t.length; i++) if (t[i] === s) return !0; return t.push(s), !1; } function r(s) { if (e) t.delete(s); else for (let i = 0; i < t.length; i++) if (t[i] === s) { t.splice(i, 1); break; } } return [n, r]; } function Z() { const e = N, t = e.crypto || e.msCrypto; let n = () => Math.random() * 16; try { if (t && t.randomUUID) return t.randomUUID().replace(/-/g, ""); t && t.getRandomValues && (n = () => { const r = new Uint8Array(1); return t.getRandomValues(r), r[0]; }); } catch (r) { } return ("10000000100040008000" + 1e11).replace( /[018]/g, (r) => ( // eslint-disable-next-line no-bitwise (r ^ (n() & 15) >> r / 4).toString(16) ) ); } function xa(e) { return e.exception && e.exception.values ? e.exception.values[0] : void 0; } function Ge(e) { const { message: t, event_id: n } = e; if (t) return t; const r = xa(e); return r ? r.type && r.value ? `${r.type}: ${r.value}` : r.type || r.value || n || "<unknown>" : n || "<unknown>"; } function gs(e, t, n) { const r = e.exception = e.exception || {}, s = r.values = r.values || [], i = s[0] = s[0] || {}; i.value || (i.value = t || ""), i.type || (i.type = "Error"); } function Et(e, t) { const n = xa(e); if (!n) return; const r = { type: "generic", handled: !0 }, s = n.mechanism; if (n.mechanism = p(p(p({}, r), s), t), t && "data" in t) { const i = p(p({}, s && s.data), t.data); n.mechanism.data = i; } } function Ll(e, t, n = 5) { if (t.lineno === void 0) return; const r = e.length, s = Math.max(Math.min(r - 1, t.lineno - 1), 0); t.pre_context = e.slice(Math.max(0, s - n), s).map((o) => Jr(o, 0)); const i = Math.min(r - 1, s); t.context_line = Jr(e[i], t.colno || 0), t.post_context = e.slice(Math.min(s + 1, r), s + 1 + n).map((o) => Jr(o, 0)); } function Wi(e) { if (e && e.__sentry_captured__) return !0; try { we(e, "__sentry_captured__", !0); } catch (t) { } return !1; } function Aa(e) { return Array.isArray(e) ? e : [e]; } function Me(e, t = 100, n = 1 / 0) { try { return _s("", e, t, n); } catch (r) { return { ERROR: `**non-serializable** (${r})` }; } } function Oa(e, t = 3, n = 100 * 1024) { const r = Me(e, t); return Bl(r) > n ? Oa(e, t - 1, n) : r; } function _s(e, t, n = 1 / 0, r = 1 / 0, s = Dl()) { const [i, o] = s; if (t == null || // this matches null and undefined -> eqeq not eqeqeq ["number", "boolean", "string"].includes(typeof t) && !Number.isNaN(t)) return t; const a = Pl(e, t); if (!a.startsWith("[object ")) return a; if (t.__sentry_skip_normalization__) return t; const c = typeof t.__sentry_override_normalization_depth__ == "number" ? t.__sentry_override_normalization_depth__ : n; if (c === 0) return a.replace("object ", ""); if (i(t)) return "[Circular ~]"; const u = t; if (u && typeof u.toJSON == "function") try { const h = u.toJSON(); return _s("", h, c - 1, r, s); } catch (h) { } const l = Array.isArray(t) ? [] : {}; let d = 0; const f = Ea(t); for (const h in f) { if (!Object.prototype.hasOwnProperty.call(f, h)) continue; if (d >= r) { l[h] = "[MaxProperties ~]"; break; } const m = f[h]; l[h] = _s(h, m, c - 1, r, s), d++; } return o(t), l; } function Pl(e, t) { try { if (e === "domain" && t && typeof t == "object" && t._events) return "[Domain]"; if (e === "domainEmitter") return "[DomainEmitter]"; if (typeof global != "undefined" && t === global) return "[Global]"; if (typeof window != "undefined" && t === window) return "[Window]"; if (typeof document != "undefined" && t === document) return "[Document]"; if (ma(t)) return "[VueViewModel]"; if (nl(t)) return "[SyntheticEvent]"; if (typeof t == "number" && t !== t) return "[NaN]"; if (typeof t == "function") return `[Function: ${je(t)}]`; if (typeof t == "symbol") return `[${String(t)}]`; if (typeof t == "bigint") return `[BigInt: ${String(t)}]`; const n = Fl(t); return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`; } catch (n) { return `**non-serializable** (${n})`; } } function Fl(e) { const t = Object.getPrototypeOf(e); return t ? t.constructor.name : "null prototype"; } function $l(e) { return ~-encodeURI(e).split(/%..|./).length; } function Bl(e) { return $l(JSON.stringify(e)); } function Hl(e, t) { let n = 0; for (let r = e.length - 1; r >= 0; r--) { const s = e[r]; s === "." ? e.splice(r, 1) : s === ".." ? (e.splice(r, 1), n++) : n && (e.splice(r, 1), n--); } if (t) for (; n--; n) e.unshift(".."); return e; } const Ul = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/; function Wl(e) { const t = e.length > 1024 ? `<truncated>${e.slice(-1024)}` : e, n = Ul.exec(t); return n ? n.slice(1) : []; } function zi(...e) { let t = "", n = !1; for (let r = e.length - 1; r >= -1 && !n; r--) { const s = r >= 0 ? e[r] : "/"; s && (t = `${s}/${t}`, n = s.charAt(0) === "/"); } return t = Hl( t.split("/").filter((r) => !!r), !n ).join("/"), (n ? "/" : "") + t || "."; } function ji(e) { let t = 0; for (; t < e.length && e[t] === ""; t++) ; let n = e.length - 1; for (; n >= 0 && e[n] === ""; n--) ; return t > n ? [] : e.slice(t, n - t + 1); } function zl(e, t) { e = zi(e).slice(1), t = zi(t).slice(1); const n = ji(e.split("/")), r = ji(t.split("/")), s = Math.min(n.length, r.length); let i = s; for (let a = 0; a < s; a++) if (n[a] !== r[a]) { i = a; break; } let o = []; for (let a = i; a < n.length; a++) o.push(".."); return o = o.concat(r.slice(i)), o.join("/"); } function jl(e, t) { return Wl(e)[2] || ""; } var Fe; (function(e) { e[e.PENDING = 0] = "PENDING"; const n = 1; e[e.RESOLVED = n] = "RESOLVED"; const r = 2; e[e.REJECTED = r] = "REJECTED"; })(Fe || (Fe = {})); function qe(e) { return new Te((t) => { t(e); }); } function rr(e) { return new Te((t, n) => { n(e); }); } class Te { constructor(t) { Te.prototype.__init.call(this), Te.prototype.__init2.call(this), Te.prototype.__init3.call(this), Te.prototype.__init4.call(this), this._state = Fe.PENDING, this._handlers = []; try { t(this._resolve, this._reject); } catch (n) { this._reject(n); } } /** JSDoc */ then(t, n) { return new Te((r, s) => { this._handlers.push([ !1, (i) => { if (!t) r(i); else try { r(t(i)); } catch (o) { s(o); } }, (i) => { if (!n) s(i); else try { r(n(i)); } catch (o) { s(o); } } ]), this._executeHandlers(); }); } /** JSDoc */ catch(t) { return this.then((n) => n, t); } /** JSDoc */ finally(t) { return new Te((n, r) => { let s, i; return this.then( (o) => { i = !1, s = o, t && t(); }, (o) => { i = !0, s = o, t && t(); } ).then(() => { if (i) { r(s); return; } n(s); }); }); } /** JSDoc */ __init() { this._resolve = (t) => { this._setResult(Fe.RESOLVED, t); }; } /** JSDoc */ __init2() { this._reject = (t) => { this._setResult(Fe.REJECTED, t); }; } /** JSDoc */ __init3() { this._setResult = (t, n) => { if (this._state === Fe.PENDING) { if (br(n)) { n.then(this._resolve, this._reject); return; } this._state = t, this._value = n, this._executeHandlers(); } }; } /** JSDoc */ __init4() { this._executeHandlers = () => { if (this._state === Fe.PENDING) return; const t = this._handlers.slice(); this._handlers = [], t.forEach((n) => { n[0] || (this._state === Fe.RESOLVED && n[1](this._value), this._state === Fe.REJECTED && n[2](this._value), n[0] = !0); }); }; } } function ql(e) { const t = []; function n() { return e === void 0 || t.length < e; } function r(o) { return t.splice(t.indexOf(o), 1)[0] || Promise.resolve(void 0); } function s(o) { if (!n()) return rr(new Ne("Not adding Promise because buffer limit was reached.")); const a = o(); return t.indexOf(a) === -1 && t.push(a), a.then(() => r(a)).then( null, () => r(a).then(null, () => { }) ), a; } function i(o) { return new Te((a, c) => { let u = t.length; if (!u) return a(!0); const l = setTimeout(() => { o && o > 0 && a(!1); }, o); t.forEach((d) => { qe(d).then(() => { --u || (clearTimeout(l), a(!0)); }, c); }); }); } return { $: t, add: s, drain: i }; } function mt(e) { if (!e) return {}; const t = e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); if (!t) return {}; const n = t[6] || "", r = t[8] || ""; return { host: t[4], path: t[5], protocol: t[2], search: n, hash: r, relative: t[5] + n + r // everything minus origin }; } function Gl(e) { return e.split(/[?#]/, 1)[0]; } const Vl = ["fatal", "error", "warning", "log", "info", "debug"]; function Na(e) { return e === "warn" ? "warning" : Vl.includes(e) ? e : "log"; } const ys = "baggage", Da = "sentry-", Yl = /^sentry-/, Xl = 8192; function La(e) { const t = Kl(e); if (!t) return; const n = Object.entries(t).reduce((r, [s, i]) => { if (s.match(Yl)) { const o = s.slice(Da.length); r[o] = i; } return r; }, {}); if (Object.keys(n).length > 0) return n; } function Pa(e) { if (!e) return; const t = Object.entries(e).reduce( (n, [r, s]) => (s && (n[`${Da}${r}`] = s), n), {} ); return Jl(t); } function Kl(e) { if (!(!e || !He(e) && !Array.isArray(e))) return Array.isArray(e) ? e.reduce((t, n) => { const r = qi(n); return Object.entries(r).forEach(([s, i]) => { t[s] = i; }), t; }, {}) : qi(e); } function qi(e) { return e.split(",").map((t) => t.split("=").map((n) => decodeURIComponent(n.trim()))).reduce((t, [n, r]) => (n && r && (t[n] = r), t), {}); } function Jl(e) { if (Object.keys(e).length !== 0) return Object.entries(e).reduce((t, [n, r], s) => { const i = `${encodeURIComponent(n)}=${encodeURIComponent(r)}`, o = s === 0 ? i : `${t},${i}`; return o.length > Xl ? (Vt && _.warn( `Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.` ), t) : o; }, ""); } const Ql = new RegExp( "^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$" // whitespace ); function Zl(e) { if (!e) return; const t = e.match(Ql); if (!t) return; let n; return t[3] === "1" ? n = !0 : t[3] === "0" && (n = !1), { traceId: t[1], parentSampled: n, parentSpanId: t[2] }; } function ed(e, t) { const n = Zl(e), r = La(t), { traceId: s, parentSpanId: i, parentSampled: o } = n || {}; return n ? { traceId: s || Z(), parentSpanId: i || Z().substring(16), spanId: Z().substring(16), sampled: o, dsc: r || {} // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it } : { traceId: s || Z(), spanId: Z().substring(16) }; } function Js(e = Z(), t = Z().substring(16), n) { let r = ""; return n !== void 0 && (r = n ? "-1" : "-0"), `${e}-${t}${r}`; } function wt(e, t = []) { return [e, t]; } function td(e, t) { const [n, r] = e; return [n, [...r, t]]; } function sr(e, t) { const n = e[1]; for (const r of n) { const s = r[0].type; if (t(r, s)) return !0; } return !1; } function Ss(e) { return N.__SENTRY__ && N.__SENTRY__.encodePolyfill ? N.__SENTRY__.encodePolyfill(e) : new TextEncoder().encode(e); } function nd(e) { const [t, n] = e; let r = JSON.stringify(t); function s(i) { typeof r == "string" ? r = typeof i == "string" ? r + i : [Ss(r), i] : r.push(typeof i == "string" ? Ss(i) : i); } for (const i of n) { const [o, a] = i; if (s(` ${JSON.stringify(o)} `), typeof a == "string" || a instanceof Uint8Array) s(a); else { let c; try { c = JSON.stringify(a); } catch (u) { c = JSON.stringify(Me(a)); } s(c); } } return typeof r == "string" ? r : rd(r); } function rd(e) { const t = e.reduce((s, i) => s + i.length, 0), n = new Uint8Array(t); let r = 0; for (const s of e) n.set(s, r), r += s.length; return n; } function sd(e) { return [{ type: "span" }, e]; } function id(e) { const t = typeof e.data == "string" ? Ss(e.data) : e.data; return [ ae({ type: "attachment", length: t.length, filename: e.filename, content_type: e.contentType, attachment_type: e.attachmentType }), t ]; } const od = { session: "session", sessions: "session", attachment: "attachment", transaction: "transaction", event: "error", client_report: "internal", user_report: "default", profile: "profile", profile_chunk: "profile", replay_event: "replay", replay_recording: "replay", check_in: "monitor", feedback: "feedback", span: "span", statsd: "metric_bucket" }; function Gi(e) { return od[e]; } function Qs(e) { if (!e || !e.sdk) return; const { name: t, version: n } = e.sdk; return { name: t, version: n }; } function Fa(e, t, n, r) { const s = e.sdkProcessingMetadata && e.sdkProcessingMetadata.dynamicSamplingContext; return p(p(p({ event_id: e.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString() }, t && { sdk: t }), !!n && r && { dsn: mn(r) }), s && { trace: ae(p({}, s)) }); } function ad(e, t, n) { const r = [ { type: "client_report" }, { timestamp: gn(), discarded_events: e } ]; return wt(t ? { dsn: t } : {}, [r]); } const cd = 60 * 1e3; function ud(e, t = Date.now()) { const n = parseInt(`${e}`, 10); if (!isNaN(n)) return n * 1e3; const r = Date.parse(`${e}`); return isNaN(r) ? cd : r - t; } function ld(e, t) { return e[t] || e.all || 0; } function $a(e, t, n = Date.now()) { return ld(e, t) > n; } function Ba(e, { statusCode: t, headers: n }, r = Date.now()) { const s = p({}, e), i = n && n["x-sentry-rate-limits"], o = n && n["retry-after"]; if (i) for (const a of i.trim().split(",")) { const [c, u, , , l] = a.split(":", 5), d = parseInt(c, 10), f = (isNaN(d) ? 60 : d) * 1e3; if (!u) s.all = r + f; else for (const h of u.split(";")) h === "metric_bucket" ? (!l || l.split(";").includes("custom")) && (s[h] = r + f) : s[h] = r + f; } else o ? s.all = r + ud(o, r) : t === 429 && (s.all = r + 60 * 1e3); return s; } function dd(e, t) { return e != null ? e : t(); } function ge(e) { let t, n = e[0], r = 1; for (; r < e.length; ) { const s = e[r], i = e[r + 1]; if (r += 2, (s === "optionalAccess" || s === "optionalCall") && n == null) return; s === "access" || s === "optionalAccess" ? (t = n, n = i(n)) : (s === "call" || s === "optionalCall") && (n = i((...o) => n.call(t, ...o)), t = void 0); } return n; } function ir() { return { traceId: Z(), spanId: Z().substring(16) }; } const Nn = N; function fd() { const e = Nn.chrome, t = e && e.app && e.app.runtime, n = "history" in Nn && !!Nn.history.pushState && !!Nn.history.replaceState; return !t && n; } const P = typeof __SENTRY_DEBUG__ == "undefined" || __SENTRY_DEBUG__; function Yt() { return Zs(N), N; } function Zs(e) { const t = e.__SENTRY__ = e.__SENTRY__ || {}; return t.version = t.version || ht, t[ht] = t[ht] || {}; } function pd(e) { const t = ie(), n = { sid: Z(), init: !0, timestamp: t, started: t, duration: 0, status: "ok", errors: 0, ignoreDuration: !1, toJSON: () => md(n) }; return e && Pt(n, e), n; } function Pt(e, t = {}) { if (t.user && (!e.ipAddress && t.user.ip_address && (e.ipAddress = t.user.ip_address), !e.did && !t.did && (e.did = t.user.id || t.user.email || t.user.username)), e.timestamp = t.timestamp || ie(), t.abnormal_mechanism && (e.abnormal_mechanism = t.abnormal_mechanism), t.ignoreDuration && (e.ignoreDuration = t.ignoreDuration), t.sid && (e.sid = t.sid.length === 32 ? t.sid : Z()), t.init !== void 0 && (e.init = t.init), !e.did && t.did && (e.did = `${t.did}`), typeof t.started == "number" && (e.started = t.started), e.ignoreDuration) e.duration = void 0; else if (typeof t.duration == "number") e.duration = t.duration; else { const n = e.timestamp - e.started; e.duration = n >= 0 ? n : 0; } t.release && (e.release = t.release), t.environment && (e.environment = t.environment), !e.ipAddress && t.ipAddress && (e.ipAddress = t.ipAddress), !e.userAgent && t.userAgent && (e.userAgent = t.userAgent), typeof t.errors == "number" && (e.errors = t.errors), t.status && (e.status = t.status); } function hd(e, t) { let n = {}; e.status === "ok" && (n = { status: "exited" }), Pt(e, n); } function md(e) { return ae({ sid: `${e.sid}`, init: e.init, // Make sure that sec is converted to ms for date constructor started: new Date(e.started * 1e3).toISOString(), timestamp: new Date(e.timestamp * 1e3).toISOString(), status: e.status, errors: e.errors, did: typeof e.did == "number" || typeof e.did == "string" ? `${e.did}` : void 0, duration: e.duration, abnormal_mechanism: e.abnormal_mechanism, attrs: { release: e.release, environment: e.environment, ip_address: e.ipAddress, user_agent: e.userAgent } }); } const Es = "_sentrySpan"; function cn(e, t) { t ? we(e, Es, t) : delete e[Es]; } function or(e) { return e[Es]; } const gd = 100; class ei { /** Flag if notifying is happening. */ /** Callback for client to receive scope changes. */ /** Callback list that will be called during event processing. */ /** Array of breadcrumbs. */ /** User */ /** Tags */ /** Extra */ /** Contexts */ /** Attachments */ /** Propagation Context for distributed tracing */ /** * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get * sent to Sentry */ /** Fingerprint */ /** Severity */ /** * Transaction Name * * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects. * It's purpose is to assign a transaction to the scope that's added to non-transaction events. */ /** Session */ /** Request Mode Session Status */ /** The client on this scope */ /** Contains the last event id of a captured event. */ // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method. constructor() { this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = ir(); } /** * @inheritDoc */ clone() { const t = new ei(); return t._breadcrumbs = [...this._breadcrumbs], t._tags = p({}, this._tags), t._extra = p({}, this._extra), t._contexts = p({}, this._contexts), t._user = this._user, t._level = this._level, t._session = this._session, t._transactionName = this._transactionName, t._fingerprint = this._fingerprint, t._eventProcessors = [...this._eventProcessors], t._requestSession = this._requestSession, t._attachments = [...this._attachments], t._sdkProcessingMetadata = p({}, this._sdkProcessingMetadata), t._propagationContext = p({}, this._propagationContext), t._client = this._client, t._lastEventId = this._lastEventId, cn(t, or(this)), t; } /** * @inheritDoc */ setClient(t) { this._client = t; } /** * @inheritDoc */ setLastEventId(t) { this._lastEventId = t; } /** * @inheritDoc */ getClient() { return this._client; } /** * @inheritDoc */ lastEventId() { return this._lastEventId; } /** * @inheritDoc */ addScopeListener(t) { this._scopeListeners.push(t); } /** * @inheritDoc */ addEventProcessor(t) { return this._eventProcessors.push(t), this; } /** * @inheritDoc */ setUser(t) { return this._user = t || { email: void 0, id: void 0, ip_address: void 0, username: void 0 }, this._session && Pt(this._session, { user: t }), this._notifyScopeListeners(), this; } /** * @inheritDoc */ getUser() { return this._user; } /** * @inheritDoc */ getRequestSession() { return this._requestSession; } /** * @inheritDoc */ setRequestSession(t) { return this._requestSession = t, this; } /** * @inheritDoc */ setTags(t) { return this._tags = p(p({}, this._tags), t), this._notifyScopeListeners(), this; } /** * @inheritDoc */ setTag(t, n) { return this._tags = A(p({}, this._tags), { [t]: n }), this._notifyScopeListeners(), this; } /** * @inheritDoc */ setExtras(t) { return this._extra = p(p({}, this._extra), t), this._notifyScopeListeners(), this; } /** * @inheritDoc */ setExtra(t, n) { return this._extra = A(p({}, this._extra), { [t]: n }), this._notifyScopeListeners(), this; } /** * @inheritDoc */ setFingerprint(t) { return this._fingerprint = t, this._notifyScopeListeners(), this; } /** * @inheritDoc */ setLevel(t) { return this._level = t, this._notifyScopeListeners(), this; } /** * @inheritDoc */ setTransactionName(t) { return this._transactionName = t, this._notifyScopeListeners(), this; } /** * @inheritDoc */ setContext(t, n) { return n === null ? delete this._contexts[t] : this._contexts[t] = n, this._notifyScopeListeners(), this; } /** * @inheritDoc */ setSession(t) { return t ? this._session = t : delete this._session, this._notifyScopeListeners(), this; } /** * @inheritDoc */ getSession() { return this._session; } /** * @inheritDoc */ update(t) { if (!t) return this; const n = typeof t == "function" ? t(this) : t, [r, s] = n instanceof et ? [n.getScopeData(), n.getRequestSession()] : yt(n) ? [t, t.requestSession] : [], { tags: i, extra: o, user: a, contexts: c, level: u, fingerprint: l = [], propagationContext: d } = r || {}; return this._tags = p(p({}, this._tags), i), this._extra = p(p({}, this._extra), o), this._contexts = p(p({}, this._contexts), c), a && Object.keys(a).length && (this._user = a), u && (this._level = u), l.length && (this._fingerprint = l), d && (this._propagationContext = d), s && (this._requestSession = s), this; } /** * @inheritDoc */ clear() { return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, cn(this, void 0), this._attachments = [], this._propagationContext = ir(), this._notifyScopeListeners(), this; } /** * @inheritDoc */ addBreadcrumb(t, n) { const r = typeof n == "number" ? n : gd; if (r <= 0) return this; const s = p({ timestamp: gn() }, t), i = this._breadcrumbs; return i.push(s), this._breadcrumbs = i.length > r ? i.slice(-r) : i, this._notifyScopeListeners(), this; } /** * @inheritDoc */ getLastBreadcrumb() { return this._breadcrumbs[this._breadcrumbs.length - 1]; } /** * @inheritDoc */ clearBreadcrumbs() { return this._breadcrumbs = [], this._notifyScopeListeners(), this; } /** * @inheritDoc */ addAttachment(t) { return this._attachments.push(t), this; } /** * @inheritDoc */ clearAttachments() { return this._attachments = [], this; } /** @inheritDoc */ getScopeData() { return { breadcrumbs: this._breadcrumbs, attachments: this._attachments, contexts: this._contexts, tags: this._tags, extra: this._extra, user: this._user, level: this._level, fingerprint: this._fingerprint || [], eventProcessors: this._eventProcessors, propagationContext: this._propagationContext, sdkProcessingMetadata: this._sdkProcessingMetadata, transactionName: this._transactionName, span: or(this) }; } /** * @inheritDoc */ setSDKProcessingMetadata(t) { return this._sdkProcessingMetadata = p(p({}, this._sdkProcessingMetadata), t), this; } /** * @inheritDoc */ setPropagationContext(t) { return this._propagationContext = t, this; } /** * @inheritDoc */ getPropagationContext() { return this._propagationContext; } /** * @inheritDoc */ captureException(t, n) { const r = n && n.event_id ? n.event_id : Z(); if (!this._client) return _.warn("No client configured on scope - will not capture exception!"), r; const s = new Error("Sentry syntheticException"); return this._client.captureException( t, A(p({ originalException: t, syntheticException: s }, n), { event_id: r }), this ), r; } /** * @inheritDoc */ captureMessage(t, n, r) { const s = r && r.event_id ? r.event_id : Z(); if (!this._client) return _.warn("No client configured on scope - will not capture message!"), s; const i = new Error(t); return this._client.captureMessage( t, n, A(p({ originalException: t, syntheticException: i }, r), { event_id: s }), this ), s; } /** * @inheritDoc */ captureEvent(t, n) { const r = n && n.event_id ? n.event_id : Z(); return this._client ? (this._client.captureEvent(t, A(p({}, n), { event_id: r }), this), r) : (_.warn("No client configured on scope - will not capture event!"), r); } /** * This will be called on every set call. */ _notifyScopeListeners() { this._notifyingListeners || (this._notifyingListeners = !0, this._scopeListeners.forEach((t) => { t(this); }), this._notifyingListeners = !1); } } const et = ei; function _d() { return vr("defaultCurrentScope", () => new et()); } function yd() { return vr("defaultIsolationScope", () => new et()); } class Sd { constructor(t, n) { let r; t ? r = t : r = new et(); let s; n ? s = n : s = new et(), this._stack = [{ scope: r }], this._isolationScope = s; } /** * Fork a scope for the stack. */ withScope(t) { const n = this._pushScope(); let r; try { r = t(n); } catch (s) { throw this._popScope(), s; } return br(r) ? r.then( (s) => (this._popScope(), s), (s) => { throw this._popScope(), s; } ) : (this._popScope(), r); } /** * Get the client of the stack. */ getClient() { return this.getStackTop().client; } /** * Returns the scope of the top stack. */ getScope() { return this.getStackTop().scope; } /** * Get the isolation scope for the stack. */ getIsolationScope() { return this._isolationScope; } /** * Returns the topmost scope layer in the order domain > local > process. */ getStackTop() { return this._stack[this._stack.length - 1]; } /** * Push a scope to the stack. */ _pushScope() { const t = this.getScope().clone(); return this._stack.push({ client: this.getClient(), scope: t }), t; } /** * Pop a scope from the stack. */ _popScope() { return this._stack.length <= 1 ? !1 : !!this._stack.pop(); } } function Ft() { const e = Yt(), t = Zs(e); return t.stack = t.stack || new Sd(_d(), yd()); } function Ed(e) { return Ft().withScope(e); } function bd(e, t) { const n = Ft(); return n.withScope(() => (n.getStackTop().scope = e, t(e))); } function Vi(e) { return Ft().withScope(() => e(Ft().getIsolationScope())); } function vd() { return { withIsolationScope: Vi, withScope: Ed, withSetScope: bd, withSetIsolationScope: (e, t) => Vi(t), getCurrentScope: () => Ft().getScope(), getIsolationScope: () => Ft().getIsolationScope() }; } function _n(e) { const t = Zs(e); return t.acs ? t.acs : vd(); } function K() { const e = Yt(); return _n(e).getCurrentScope(); } function Ie() { const e = Yt(); return _n(e).getIsolationScope(); } function wd() { return vr("globalScope", () => new et()); } function yn(...e) { const t = Yt(), n = _n(t); if (e.length === 2) { const [r, s] = e; return r ? n.withSetScope(r, s) : n.withScope(s); } return n.withScope(e[0]); } function D() { return K().getClient(); } const Id = "_sentryMetrics"; function bs(e) { const t = e[Id]; if (!t) return; const n = {}; for (const [,