Files
TankIC/3dtank.com copy/play/static/js/unpacked/module_30285.js
T
TermiNexus fd0dffe31b feat(bundle): 迁移到新版 main.7cfa4058.js(重做拆分 + 移植 7 处针对性修改)
- 拆分:tools/split.js 重切新版(1347 模块 / 126 代码模块),主文件 main.7cfa4058.js,语法验证通过

- 修复 split.js 内自动刷新拦截的 \\n 转义:它在模板字符串里,必须写 \\\\n,否则生成的主文件字符串断行、语法报错

- 符号映射:map_symbols.js 对齐旧→新(qyr→ryz、w187→c18o、z4t→jtn、vgt→rkt、Bmt→Ezt、Qjt→Fjt、txt→Gjt、k15b→s15n、azi_1→vzr_1…)

- 移植 7 处针对性修改:炮塔摆头不回弹(vSt.ryz)、摆头不过冲(case 0)、精准跟手(case 1/2)、悬浮底盘 raw 两级(Ezt.n36 + Zmt 实际速度)、电磁炮蓄力时长(jtn.c18o)

- 重新打包 unpacked.pack.json(127 文件 / 版本 96833eb2b0cf8909)
2026-10-16 14:20:15 +08:00

3623 lines
121 KiB
JavaScript

// ============================================================
// Module ID: 30285
// ============================================================
;(window.__modules__ = window.__modules__ || {})[30285] = (t, n, i) => {
"use strict";
(i.r(n),
i.d(n, {
BrowserClient: () => Mn,
Hub: () => ot,
Integrations: () => ui,
SDK_NAME: () => Nn,
SDK_VERSION: () => On,
Scope: () => C,
Severity: () => _,
Status: () => a,
Transports: () => u,
addBreadcrumb: () => gt,
addGlobalEventProcessor: () => T,
captureEvent: () => pt,
captureException: () => captureException,
captureMessage: () => wt,
close: () => ni,
configureScope: () => dt,
defaultIntegrations: () => Kn,
eventFromException: () => eventFromException,
eventFromMessage: () => rn,
flush: () => ti,
forceLoad: () => Zn,
getCurrentHub: () => ht,
getHubFromCarrier: () => lt,
init: () => Yn,
injectReportDialog: () => gn,
lastEventId: () => Jn,
makeMain: () => at,
onLoad: () => Qn,
setContext: () => mt,
setExtra: () => bt,
setExtras: () => yt,
setTag: () => qt,
setTags: () => kt,
setUser: () => $t,
showReportDialog: () => Xn,
startTransaction: () => xt,
withScope: () => jt,
wrap: () => ii,
}));
var r = {};
(i.r(r), i.d(r, { FunctionToString: () => Bn, InboundFilters: () => Ln }));
var e = {};
(i.r(e),
i.d(e, {
Breadcrumbs: () => Pn,
GlobalHandlers: () => Gn,
LinkedErrors: () => Hn,
TryCatch: () => Fn,
UserAgent: () => Vn,
}));
var u = {};
(i.r(u), i.d(u, { BaseTransport: () => hn, FetchTransport: () => ln, XHRTransport: () => vn }));
var s = function (t, n) {
return (
(s =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (t, n) {
t.__proto__ = n;
}) ||
function (t, n) {
for (var i in n) n.hasOwnProperty(i) && (t[i] = n[i]);
}),
s(t, n)
);
};
function o(t, n) {
function i() {
this.constructor = t;
}
(s(t, n), (t.prototype = null === n ? Object.create(n) : ((i.prototype = n.prototype), new i())));
}
var _,
a,
h = function () {
return (
(h =
Object.assign ||
function (t) {
for (var n, i = 1, r = arguments.length; i < r; i++)
for (var e in (n = arguments[i])) Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
return t;
}),
h.apply(this, arguments)
);
};
function c(t) {
var n = "function" == typeof Symbol && Symbol.iterator,
i = n && t[n],
r = 0;
if (i) return i.call(t);
if (t && "number" == typeof t.length)
return {
next: function () {
return (t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t });
},
};
throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function l(t, n) {
var i = "function" == typeof Symbol && t[Symbol.iterator];
if (!i) return t;
var r,
e,
u = i.call(t),
s = [];
try {
for (; (void 0 === n || n-- > 0) && !(r = u.next()).done;) s.push(r.value);
} catch (t) {
e = { error: t };
} finally {
try {
r && !r.done && (i = u.return) && i.call(u);
} finally {
if (e) throw e.error;
}
}
return s;
}
function f() {
for (var t = [], n = 0; n < arguments.length; n++) t = t.concat(l(arguments[n]));
return t;
}
(!(function (t) {
((t.Fatal = "fatal"),
(t.Error = "error"),
(t.Warning = "warning"),
(t.Log = "log"),
(t.Info = "info"),
(t.Debug = "debug"),
(t.Critical = "critical"));
})(_ || (_ = {})),
(function (t) {
t.fromString = function (n) {
switch (n) {
case "debug":
return t.Debug;
case "info":
return t.Info;
case "warn":
case "warning":
return t.Warning;
case "error":
return t.Error;
case "fatal":
return t.Fatal;
case "critical":
return t.Critical;
default:
return t.Log;
}
};
})(_ || (_ = {})),
(function (t) {
((t.Unknown = "unknown"),
(t.Skipped = "skipped"),
(t.Success = "success"),
(t.RateLimit = "rate_limit"),
(t.Invalid = "invalid"),
(t.Failed = "failed"));
})(a || (a = {})),
(function (t) {
t.fromHttpCode = function (n) {
return n >= 200 && n < 300
? t.Success
: 429 === n
? t.RateLimit
: n >= 400 && n < 500
? t.Invalid
: n >= 500
? t.Failed
: t.Unknown;
};
})(a || (a = {})));
var v = function () {
return (
(v =
Object.assign ||
function (t) {
for (var n, i = 1, r = arguments.length; i < r; i++)
for (var e in (n = arguments[i])) Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
return t;
}),
v.apply(this, arguments)
);
};
function w(t, n) {
var i = "function" == typeof Symbol && t[Symbol.iterator];
if (!i) return t;
var r,
e,
u = i.call(t),
s = [];
try {
for (; (void 0 === n || n-- > 0) && !(r = u.next()).done;) s.push(r.value);
} catch (t) {
e = { error: t };
} finally {
try {
r && !r.done && (i = u.return) && i.call(u);
} finally {
if (e) throw e.error;
}
}
return s;
}
function p() {
for (var t = [], n = 0; n < arguments.length; n++) t = t.concat(w(arguments[n]));
return t;
}
function isError(t) {
switch (Object.prototype.toString.call(t)) {
case "[object Error]":
case "[object Exception]":
case "[object DOMException]":
return !0;
default:
return $(t, Error);
}
}
function d(t) {
return "[object ErrorEvent]" === Object.prototype.toString.call(t);
}
function isDOMError(t) {
return "[object DOMError]" === Object.prototype.toString.call(t);
}
function g(t) {
return "[object String]" === Object.prototype.toString.call(t);
}
function m(t) {
return null === t || ("object" != typeof t && "function" != typeof t);
}
function y(t) {
return "[object Object]" === Object.prototype.toString.call(t);
}
function k(t) {
return "undefined" != typeof Event && $(t, Event);
}
function b(t) {
return "undefined" != typeof Element && $(t, Element);
}
function q(t) {
return Boolean(t && t.then && "function" == typeof t.then);
}
function $(t, n) {
try {
return t instanceof n;
} catch (t) {
return !1;
}
}
var j,
x = i(80397);
!(function (t) {
((t.PENDING = "PENDING"), (t.RESOLVED = "RESOLVED"), (t.REJECTED = "REJECTED"));
})(j || (j = {}));
var z = (function () {
function t(t) {
var n = this;
((this._state = j.PENDING),
(this._handlers = []),
(this._resolve = function (t) {
n._setResult(j.RESOLVED, t);
}),
(this._reject = function (t) {
n._setResult(j.REJECTED, t);
}),
(this._setResult = function (t, i) {
n._state === j.PENDING &&
(q(i) ? i.then(n._resolve, n._reject) : ((n._state = t), (n._value = i), n._executeHandlers()));
}),
(this._attachHandler = function (t) {
((n._handlers = n._handlers.concat(t)), n._executeHandlers());
}),
(this._executeHandlers = function () {
if (n._state !== j.PENDING) {
var t = n._handlers.slice();
((n._handlers = []),
t.forEach(function (t) {
t.done ||
(n._state === j.RESOLVED && t.onfulfilled && t.onfulfilled(n._value),
n._state === j.REJECTED && t.onrejected && t.onrejected(n._value),
(t.done = !0));
}));
}
}));
try {
t(this._resolve, this._reject);
} catch (t) {
this._reject(t);
}
}
return (
(t.resolve = function (n) {
return new t(function (t) {
t(n);
});
}),
(t.reject = function (n) {
return new t(function (t, i) {
i(n);
});
}),
(t.all = function (n) {
return new t(function (i, r) {
if (Array.isArray(n))
if (0 !== n.length) {
var e = n.length,
u = [];
n.forEach(function (n, s) {
t.resolve(n)
.then(function (t) {
((u[s] = t), 0 == (e -= 1) && i(u));
})
.then(null, r);
});
} else i([]);
else r(new TypeError("Promise.all requires an array as input."));
});
}),
(t.prototype.then = function (n, i) {
var r = this;
return new t(function (t, e) {
r._attachHandler({
done: !1,
onfulfilled: function (i) {
if (n)
try {
return void t(n(i));
} catch (t) {
return void e(t);
}
else t(i);
},
onrejected: function (n) {
if (i)
try {
return void t(i(n));
} catch (t) {
return void e(t);
}
else e(n);
},
});
});
}),
(t.prototype.catch = function (t) {
return this.then(function (t) {
return t;
}, t);
}),
(t.prototype.finally = function (n) {
var i = this;
return new t(function (t, r) {
var e, u;
return i
.then(
function (t) {
((u = !1), (e = t), n && n());
},
function (t) {
((u = !0), (e = t), n && n());
},
)
.then(function () {
u ? r(e) : t(e);
});
});
}),
(t.prototype.toString = function () {
return "[object SyncPromise]";
}),
t
);
})(),
S = i(44740),
C = (function () {
function t() {
((this._notifyingListeners = !1),
(this._scopeListeners = []),
(this._eventProcessors = []),
(this._breadcrumbs = []),
(this._user = {}),
(this._tags = {}),
(this._extra = {}),
(this._contexts = {}));
}
return (
(t.clone = function (n) {
var i = new t();
return (
n &&
((i._breadcrumbs = p(n._breadcrumbs)),
(i._tags = v({}, n._tags)),
(i._extra = v({}, n._extra)),
(i._contexts = v({}, n._contexts)),
(i._user = n._user),
(i._level = n._level),
(i._span = n._span),
(i._session = n._session),
(i._transactionName = n._transactionName),
(i._fingerprint = n._fingerprint),
(i._eventProcessors = p(n._eventProcessors))),
i
);
}),
(t.prototype.addScopeListener = function (t) {
this._scopeListeners.push(t);
}),
(t.prototype.addEventProcessor = function (t) {
return (this._eventProcessors.push(t), this);
}),
(t.prototype.setUser = function (t) {
return (
(this._user = t || {}),
this._session && this._session.update({ user: t }),
this._notifyScopeListeners(),
this
);
}),
(t.prototype.getUser = function () {
return this._user;
}),
(t.prototype.setTags = function (t) {
return ((this._tags = v(v({}, this._tags), t)), this._notifyScopeListeners(), this);
}),
(t.prototype.setTag = function (t, n) {
var i;
return (
(this._tags = v(v({}, this._tags), (((i = {})[t] = n), i))),
this._notifyScopeListeners(),
this
);
}),
(t.prototype.setExtras = function (t) {
return ((this._extra = v(v({}, this._extra), t)), this._notifyScopeListeners(), this);
}),
(t.prototype.setExtra = function (t, n) {
var i;
return (
(this._extra = v(v({}, this._extra), (((i = {})[t] = n), i))),
this._notifyScopeListeners(),
this
);
}),
(t.prototype.setFingerprint = function (t) {
return ((this._fingerprint = t), this._notifyScopeListeners(), this);
}),
(t.prototype.setLevel = function (t) {
return ((this._level = t), this._notifyScopeListeners(), this);
}),
(t.prototype.setTransactionName = function (t) {
return ((this._transactionName = t), this._notifyScopeListeners(), this);
}),
(t.prototype.setTransaction = function (t) {
return this.setTransactionName(t);
}),
(t.prototype.setContext = function (t, n) {
var i;
return (
null === n
? delete this._contexts[t]
: (this._contexts = v(v({}, this._contexts), (((i = {})[t] = n), i))),
this._notifyScopeListeners(),
this
);
}),
(t.prototype.setSpan = function (t) {
return ((this._span = t), this._notifyScopeListeners(), this);
}),
(t.prototype.getSpan = function () {
return this._span;
}),
(t.prototype.getTransaction = function () {
var t,
n,
i,
r,
e = this.getSpan();
return (null === (t = e) || void 0 === t ? void 0 : t.transaction)
? null === (n = e) || void 0 === n
? void 0
: n.transaction
: (
null === (r = null === (i = e) || void 0 === i ? void 0 : i.spanRecorder) || void 0 === r
? void 0
: r.spans[0]
)
? e.spanRecorder.spans[0]
: void 0;
}),
(t.prototype.setSession = function (t) {
return (t ? (this._session = t) : delete this._session, this._notifyScopeListeners(), this);
}),
(t.prototype.getSession = function () {
return this._session;
}),
(t.prototype.update = function (n) {
if (!n) return this;
if ("function" == typeof n) {
var i = n(this);
return i instanceof t ? i : this;
}
return (
n instanceof t
? ((this._tags = v(v({}, this._tags), n._tags)),
(this._extra = v(v({}, this._extra), n._extra)),
(this._contexts = v(v({}, this._contexts), n._contexts)),
n._user && Object.keys(n._user).length && (this._user = n._user),
n._level && (this._level = n._level),
n._fingerprint && (this._fingerprint = n._fingerprint))
: y(n) &&
((this._tags = v(v({}, this._tags), n.tags)),
(this._extra = v(v({}, this._extra), n.extra)),
(this._contexts = v(v({}, this._contexts), n.contexts)),
n.user && (this._user = n.user),
n.level && (this._level = n.level),
n.fingerprint && (this._fingerprint = n.fingerprint)),
this
);
}),
(t.prototype.clear = function () {
return (
(this._breadcrumbs = []),
(this._tags = {}),
(this._extra = {}),
(this._user = {}),
(this._contexts = {}),
(this._level = void 0),
(this._transactionName = void 0),
(this._fingerprint = void 0),
(this._span = void 0),
(this._session = void 0),
this._notifyScopeListeners(),
this
);
}),
(t.prototype.addBreadcrumb = function (t, n) {
var i = v({ timestamp: (0, x.lu)() }, t);
return (
(this._breadcrumbs =
void 0 !== n && n >= 0 ? p(this._breadcrumbs, [i]).slice(-n) : p(this._breadcrumbs, [i])),
this._notifyScopeListeners(),
this
);
}),
(t.prototype.clearBreadcrumbs = function () {
return ((this._breadcrumbs = []), this._notifyScopeListeners(), this);
}),
(t.prototype.applyToEvent = function (t, n) {
var i;
if (
(this._extra && Object.keys(this._extra).length && (t.extra = v(v({}, this._extra), t.extra)),
this._tags && Object.keys(this._tags).length && (t.tags = v(v({}, this._tags), t.tags)),
this._user && Object.keys(this._user).length && (t.user = v(v({}, this._user), t.user)),
this._contexts &&
Object.keys(this._contexts).length &&
(t.contexts = v(v({}, this._contexts), t.contexts)),
this._level && (t.level = this._level),
this._transactionName && (t.transaction = this._transactionName),
this._span)
) {
t.contexts = v({ trace: this._span.getTraceContext() }, t.contexts);
var r = null === (i = this._span.transaction) || void 0 === i ? void 0 : i.name;
r && (t.tags = v({ transaction: r }, t.tags));
}
return (
this._applyFingerprint(t),
(t.breadcrumbs = p(t.breadcrumbs || [], this._breadcrumbs)),
(t.breadcrumbs = t.breadcrumbs.length > 0 ? t.breadcrumbs : void 0),
this._notifyEventProcessors(p(E(), this._eventProcessors), t, n)
);
}),
(t.prototype._notifyEventProcessors = function (t, n, i, r) {
var e = this;
return (
void 0 === r && (r = 0),
new z(function (u, s) {
var o = t[r];
if (null === n || "function" != typeof o) u(n);
else {
var _ = o(v({}, n), i);
q(_)
? _.then(function (n) {
return e._notifyEventProcessors(t, n, i, r + 1).then(u);
}).then(null, s)
: e
._notifyEventProcessors(t, _, i, r + 1)
.then(u)
.then(null, s);
}
})
);
}),
(t.prototype._notifyScopeListeners = function () {
var t = this;
this._notifyingListeners ||
((this._notifyingListeners = !0),
this._scopeListeners.forEach(function (n) {
n(t);
}),
(this._notifyingListeners = !1));
}),
(t.prototype._applyFingerprint = function (t) {
((t.fingerprint = t.fingerprint
? Array.isArray(t.fingerprint)
? t.fingerprint
: [t.fingerprint]
: []),
this._fingerprint && (t.fingerprint = t.fingerprint.concat(this._fingerprint)),
t.fingerprint && !t.fingerprint.length && delete t.fingerprint);
}),
t
);
})();
function E() {
var t = (0, S.VZ)();
return (
(t.__SENTRY__ = t.__SENTRY__ || {}),
(t.__SENTRY__.globalEventProcessors = t.__SENTRY__.globalEventProcessors || []),
t.__SENTRY__.globalEventProcessors
);
}
function T(t) {
E().push(t);
}
var I = function () {
return (
(I =
Object.assign ||
function (t) {
for (var n, i = 1, r = arguments.length; i < r; i++)
for (var e in (n = arguments[i])) Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
return t;
}),
I.apply(this, arguments)
);
};
function A(t, n) {
var i = "function" == typeof Symbol && t[Symbol.iterator];
if (!i) return t;
var r,
e,
u = i.call(t),
s = [];
try {
for (; (void 0 === n || n-- > 0) && !(r = u.next()).done;) s.push(r.value);
} catch (t) {
e = { error: t };
} finally {
try {
r && !r.done && (i = u.return) && i.call(u);
} finally {
if (e) throw e.error;
}
}
return s;
}
var R = (0, S.VZ)(),
P = "Sentry Logger ",
N = (function () {
function t() {
this._enabled = !1;
}
return (
(t.prototype.disable = function () {
this._enabled = !1;
}),
(t.prototype.enable = function () {
this._enabled = !0;
}),
(t.prototype.log = function () {
for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
this._enabled &&
(0, S.pq)(function () {
R.console.log(P + "[Log]: " + t.join(" "));
});
}),
(t.prototype.warn = function () {
for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
this._enabled &&
(0, S.pq)(function () {
R.console.warn(P + "[Warn]: " + t.join(" "));
});
}),
(t.prototype.error = function () {
for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
this._enabled &&
(0, S.pq)(function () {
R.console.error(P + "[Error]: " + t.join(" "));
});
}),
t
);
})();
R.__SENTRY__ = R.__SENTRY__ || {};
var O,
M = R.__SENTRY__.logger || (R.__SENTRY__.logger = new N()),
D = i(55920);
!(function (t) {
((t.Ok = "ok"), (t.Exited = "exited"), (t.Crashed = "crashed"), (t.Abnormal = "abnormal"));
})(O || (O = {}));
var L = function (t, n) {
return (
(L =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (t, n) {
t.__proto__ = n;
}) ||
function (t, n) {
for (var i in n) n.hasOwnProperty(i) && (t[i] = n[i]);
}),
L(t, n)
);
},
B = function () {
return (
(B =
Object.assign ||
function (t) {
for (var n, i = 1, r = arguments.length; i < r; i++)
for (var e in (n = arguments[i])) Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
return t;
}),
B.apply(this, arguments)
);
};
function U(t) {
var n = "function" == typeof Symbol && Symbol.iterator,
i = n && t[n],
r = 0;
if (i) return i.call(t);
if (t && "number" == typeof t.length)
return {
next: function () {
return (t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t });
},
};
throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function F(t) {
try {
for (
var n = t, i = [], r = 0, e = 0, u = void 0;
n && r++ < 5 && !("html" === (u = G(n)) || (r > 1 && e + 3 * i.length + u.length >= 80));
)
(i.push(u), (e += u.length), (n = n.parentNode));
return i.reverse().join(" > ");
} catch (t) {
return "<unknown>";
}
}
function G(t) {
var n,
i,
r,
e,
u,
s = t,
o = [];
if (!s || !s.tagName) return "";
if ((o.push(s.tagName.toLowerCase()), s.id && o.push("#" + s.id), (n = s.className) && g(n)))
for (i = n.split(/\s+/), u = 0; u < i.length; u++) o.push("." + i[u]);
var _ = ["type", "name", "title", "alt"];
for (u = 0; u < _.length; u++) ((r = _[u]), (e = s.getAttribute(r)) && o.push("[" + r + '="' + e + '"]'));
return o.join("");
}
var H = (function () {
function t() {
((this._hasWeakSet = "function" == typeof WeakSet),
(this._inner = this._hasWeakSet ? new WeakSet() : []));
}
return (
(t.prototype.memoize = function (t) {
if (this._hasWeakSet) return !!this._inner.has(t) || (this._inner.add(t), !1);
for (var n = 0; n < this._inner.length; n++) if (this._inner[n] === t) return !0;
return (this._inner.push(t), !1);
}),
(t.prototype.unmemoize = function (t) {
if (this._hasWeakSet) this._inner.delete(t);
else
for (var n = 0; n < this._inner.length; n++)
if (this._inner[n] === t) {
this._inner.splice(n, 1);
break;
}
}),
t
);
})(),
W = "<anonymous>";
function V(t) {
try {
return (t && "function" == typeof t && t.name) || W;
} catch (t) {
return W;
}
}
function K(t, n) {
return (
void 0 === n && (n = 0),
"string" != typeof t || 0 === n || t.length <= n ? t : t.substr(0, n) + "..."
);
}
function Y(t, n) {
if (!Array.isArray(t)) return "";
for (var i = [], r = 0; r < t.length; r++) {
var e = t[r];
try {
i.push(String(e));
} catch (t) {
i.push("[value cannot be serialized]");
}
}
return i.join(n);
}
function X(t, n) {
return (
!!g(t) &&
((i = n),
"[object RegExp]" === Object.prototype.toString.call(i)
? n.test(t)
: "string" == typeof n && -1 !== t.indexOf(n))
);
var i;
}
function J(t, n, i) {
if (n in t) {
var r = t[n],
e = i(r);
if ("function" == typeof e)
try {
((e.prototype = e.prototype || {}),
Object.defineProperties(e, { __sentry_original__: { enumerable: !1, value: r } }));
} catch (t) {}
t[n] = e;
}
}
function Z(t) {
if (isError(t)) {
var n = t,
i = { message: n.message, name: n.name, stack: n.stack };
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (i[r] = n[r]);
return i;
}
if (k(t)) {
var e = t,
u = {};
u.type = e.type;
try {
u.target = b(e.target) ? F(e.target) : Object.prototype.toString.call(e.target);
} catch (t) {
u.target = "<unknown>";
}
try {
u.currentTarget = b(e.currentTarget)
? F(e.currentTarget)
: Object.prototype.toString.call(e.currentTarget);
} catch (t) {
u.currentTarget = "<unknown>";
}
for (var r in ("undefined" != typeof CustomEvent && $(t, CustomEvent) && (u.detail = e.detail), e))
Object.prototype.hasOwnProperty.call(e, r) && (u[r] = e);
return u;
}
return t;
}
function Q(t, n, i) {
(void 0 === n && (n = 3), void 0 === i && (i = 102400));
var r,
e = it(t, n);
return (
(r = e),
(function (t) {
return ~-encodeURI(t).split(/%..|./).length;
})(JSON.stringify(r)) > i
? Q(t, n - 1, i)
: e
);
}
function tt(t, n) {
return "domain" === n && t && "object" == typeof t && t._events
? "[Domain]"
: "domainEmitter" === n
? "[DomainEmitter]"
: void 0 !== i.g && t === i.g
? "[Global]"
: "undefined" != typeof window && t === window
? "[Window]"
: "undefined" != typeof document && t === document
? "[Document]"
: y((r = t)) && "nativeEvent" in r && "preventDefault" in r && "stopPropagation" in r
? "[SyntheticEvent]"
: "number" == typeof t && t != t
? "[NaN]"
: void 0 === t
? "[undefined]"
: "function" == typeof t
? "[Function: " + V(t) + "]"
: "symbol" == typeof t
? "[" + String(t) + "]"
: "bigint" == typeof t
? "[BigInt: " + String(t) + "]"
: t;
var r;
}
function nt(t, n, i, r) {
if ((void 0 === i && (i = 1 / 0), void 0 === r && (r = new H()), 0 === i))
return (function (t) {
var n = Object.prototype.toString.call(t);
if ("string" == typeof t) return t;
if ("[object Object]" === n) return "[Object]";
if ("[object Array]" === n) return "[Array]";
var i = tt(t);
return m(i) ? i : n;
})(n);
if (null != n && "function" == typeof n.toJSON) return n.toJSON();
var e = tt(n, t);
if (m(e)) return e;
var u = Z(n),
s = Array.isArray(n) ? [] : {};
if (r.memoize(n)) return "[Circular ~]";
for (var o in u) Object.prototype.hasOwnProperty.call(u, o) && (s[o] = nt(o, u[o], i - 1, r));
return (r.unmemoize(n), s);
}
function it(t, n) {
try {
return JSON.parse(
JSON.stringify(t, function (t, i) {
return nt(t, i, n);
}),
);
} catch (t) {
return "**non-serializable**";
}
}
function rt(t, n) {
void 0 === n && (n = 40);
var i = Object.keys(Z(t));
if ((i.sort(), !i.length)) return "[object has no keys]";
if (i[0].length >= n) return K(i[0], n);
for (var r = i.length; r > 0; r--) {
var e = i.slice(0, r).join(", ");
if (!(e.length > n)) return r === i.length ? e : K(e, n);
}
return "";
}
function et(t) {
var n, i;
if (y(t)) {
var r = t,
e = {};
try {
for (var u = U(Object.keys(r)), s = u.next(); !s.done; s = u.next()) {
var o = s.value;
void 0 !== r[o] && (e[o] = et(r[o]));
}
} catch (t) {
n = { error: t };
} finally {
try {
s && !s.done && (i = u.return) && i.call(u);
} finally {
if (n) throw n.error;
}
}
return e;
}
return Array.isArray(t) ? t.map(et) : t;
}
var ut = (function () {
function t(t) {
((this.errors = 0),
(this.sid = (0, S.eJ)()),
(this.timestamp = Date.now()),
(this.started = Date.now()),
(this.duration = 0),
(this.status = O.Ok),
t && this.update(t));
}
return (
(t.prototype.update = function (t) {
(void 0 === t && (t = {}),
t.user &&
(t.user.ip_address && (this.ipAddress = t.user.ip_address),
t.did || (this.did = t.user.id || t.user.email || t.user.username)),
(this.timestamp = t.timestamp || Date.now()),
t.sid && (this.sid = 32 === t.sid.length ? t.sid : (0, S.eJ)()),
t.did && (this.did = "" + t.did),
"number" == typeof t.started && (this.started = t.started),
"number" == typeof t.duration
? (this.duration = t.duration)
: (this.duration = this.timestamp - this.started),
t.release && (this.release = t.release),
t.environment && (this.environment = t.environment),
t.ipAddress && (this.ipAddress = t.ipAddress),
t.userAgent && (this.userAgent = t.userAgent),
"number" == typeof t.errors && (this.errors = t.errors),
t.status && (this.status = t.status));
}),
(t.prototype.close = function (t) {
t
? this.update({ status: t })
: this.status === O.Ok
? this.update({ status: O.Exited })
: this.update();
}),
(t.prototype.toJSON = function () {
return et({
sid: "" + this.sid,
init: !0,
started: new Date(this.started).toISOString(),
timestamp: new Date(this.timestamp).toISOString(),
status: this.status,
errors: this.errors,
did: "number" == typeof this.did || "string" == typeof this.did ? "" + this.did : void 0,
duration: this.duration,
attrs: et({
release: this.release,
environment: this.environment,
ip_address: this.ipAddress,
user_agent: this.userAgent,
}),
});
}),
t
);
})(),
st = 3,
ot = (function () {
function t(t, n, i) {
(void 0 === n && (n = new C()),
void 0 === i && (i = st),
(this._version = i),
(this._stack = [{}]),
(this.getStackTop().scope = n),
this.bindClient(t));
}
return (
(t.prototype.isOlderThan = function (t) {
return this._version < t;
}),
(t.prototype.bindClient = function (t) {
((this.getStackTop().client = t), t && t.setupIntegrations && t.setupIntegrations());
}),
(t.prototype.pushScope = function () {
var t = C.clone(this.getScope());
return (this.getStack().push({ client: this.getClient(), scope: t }), t);
}),
(t.prototype.popScope = function () {
return !(this.getStack().length <= 1 || !this.getStack().pop());
}),
(t.prototype.withScope = function (t) {
var n = this.pushScope();
try {
t(n);
} finally {
this.popScope();
}
}),
(t.prototype.getClient = function () {
return this.getStackTop().client;
}),
(t.prototype.getScope = function () {
return this.getStackTop().scope;
}),
(t.prototype.getStack = function () {
return this._stack;
}),
(t.prototype.getStackTop = function () {
return this._stack[this._stack.length - 1];
}),
(t.prototype.captureException = function (t, n) {
var i = (this._lastEventId = (0, S.eJ)()),
r = n;
if (!n) {
var e = void 0;
try {
throw new Error("Sentry syntheticException");
} catch (t) {
e = t;
}
r = { originalException: t, syntheticException: e };
}
return (this._invokeClient("captureException", t, v(v({}, r), { event_id: i })), i);
}),
(t.prototype.captureMessage = function (t, n, i) {
var r = (this._lastEventId = (0, S.eJ)()),
e = i;
if (!i) {
var u = void 0;
try {
throw new Error(t);
} catch (t) {
u = t;
}
e = { originalException: t, syntheticException: u };
}
return (this._invokeClient("captureMessage", t, n, v(v({}, e), { event_id: r })), r);
}),
(t.prototype.captureEvent = function (t, n) {
var i = (this._lastEventId = (0, S.eJ)());
return (this._invokeClient("captureEvent", t, v(v({}, n), { event_id: i })), i);
}),
(t.prototype.lastEventId = function () {
return this._lastEventId;
}),
(t.prototype.addBreadcrumb = function (t, n) {
var i = this.getStackTop(),
r = i.scope,
e = i.client;
if (r && e) {
var u = (e.getOptions && e.getOptions()) || {},
s = u.beforeBreadcrumb,
o = void 0 === s ? null : s,
_ = u.maxBreadcrumbs,
a = void 0 === _ ? 100 : _;
if (!(a <= 0)) {
var h = (0, x.lu)(),
c = v({ timestamp: h }, t),
l = o
? (0, S.pq)(function () {
return o(c, n);
})
: c;
null !== l && r.addBreadcrumb(l, Math.min(a, 100));
}
}
}),
(t.prototype.setUser = function (t) {
var n = this.getScope();
n && n.setUser(t);
}),
(t.prototype.setTags = function (t) {
var n = this.getScope();
n && n.setTags(t);
}),
(t.prototype.setExtras = function (t) {
var n = this.getScope();
n && n.setExtras(t);
}),
(t.prototype.setTag = function (t, n) {
var i = this.getScope();
i && i.setTag(t, n);
}),
(t.prototype.setExtra = function (t, n) {
var i = this.getScope();
i && i.setExtra(t, n);
}),
(t.prototype.setContext = function (t, n) {
var i = this.getScope();
i && i.setContext(t, n);
}),
(t.prototype.configureScope = function (t) {
var n = this.getStackTop(),
i = n.scope,
r = n.client;
i && r && t(i);
}),
(t.prototype.run = function (t) {
var n = at(this);
try {
t(this);
} finally {
at(n);
}
}),
(t.prototype.getIntegration = function (t) {
var n = this.getClient();
if (!n) return null;
try {
return n.getIntegration(t);
} catch (n) {
return (M.warn("Cannot retrieve integration " + t.id + " from the current Hub"), null);
}
}),
(t.prototype.startSpan = function (t) {
return this._callExtensionMethod("startSpan", t);
}),
(t.prototype.startTransaction = function (t, n) {
return this._callExtensionMethod("startTransaction", t, n);
}),
(t.prototype.traceHeaders = function () {
return this._callExtensionMethod("traceHeaders");
}),
(t.prototype.startSession = function (t) {
this.endSession();
var n = this.getStackTop(),
i = n.scope,
r = n.client,
e = (r && r.getOptions()) || {},
u = e.release,
s = e.environment,
o = new ut(v(v({ release: u, environment: s }, i && { user: i.getUser() }), t));
return (i && i.setSession(o), o);
}),
(t.prototype.endSession = function () {
var t = this.getStackTop(),
n = t.scope,
i = t.client;
if (n) {
var r = n.getSession && n.getSession();
r && (r.close(), i && i.captureSession && i.captureSession(r), n.setSession());
}
}),
(t.prototype._invokeClient = function (t) {
for (var n, i = [], r = 1; r < arguments.length; r++) i[r - 1] = arguments[r];
var e = this.getStackTop(),
u = e.scope,
s = e.client;
s && s[t] && (n = s)[t].apply(n, p(i, [u]));
}),
(t.prototype._callExtensionMethod = function (t) {
for (var n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i];
var r = _t().__SENTRY__;
if (r && r.extensions && "function" == typeof r.extensions[t])
return r.extensions[t].apply(this, n);
M.warn("Extension method " + t + " couldn't be found, doing nothing.");
}),
t
);
})();
function _t() {
var t = (0, S.VZ)();
return ((t.__SENTRY__ = t.__SENTRY__ || { extensions: {}, hub: void 0 }), t);
}
function at(t) {
var n = _t(),
i = lt(n);
return (ft(n, t), i);
}
function ht() {
var t = _t();
return (
(ct(t) && !lt(t).isOlderThan(st)) || ft(t, new ot()),
(0, D.wD)()
? (function (t) {
try {
var n =
(r = _t().__SENTRY__) && r.extensions && r.extensions.domain && r.extensions.domain.active;
if (!n) return lt(t);
if (!ct(n) || lt(n).isOlderThan(st)) {
var i = lt(t).getStackTop();
ft(n, new ot(i.client, C.clone(i.scope)));
}
return lt(n);
} catch (n) {
return lt(t);
}
var r;
})(t)
: lt(t)
);
}
function ct(t) {
return !!(t && t.__SENTRY__ && t.__SENTRY__.hub);
}
function lt(t) {
return (
(t && t.__SENTRY__ && t.__SENTRY__.hub) ||
((t.__SENTRY__ = t.__SENTRY__ || {}), (t.__SENTRY__.hub = new ot())),
t.__SENTRY__.hub
);
}
function ft(t, n) {
return !!t && ((t.__SENTRY__ = t.__SENTRY__ || {}), (t.__SENTRY__.hub = n), !0);
}
function vt(t) {
for (var n = [], i = 1; i < arguments.length; i++) n[i - 1] = arguments[i];
var r = ht();
if (r && r[t])
return r[t].apply(
r,
(function () {
for (var t = [], n = 0; n < arguments.length; n++) t = t.concat(A(arguments[n]));
return t;
})(n),
);
throw new Error("No hub defined or " + t + " was not found on the hub, please open a bug report.");
}
function captureException(t, n) {
var i;
try {
throw new Error("Sentry syntheticException");
} catch (t) {
i = t;
}
return vt("captureException", t, { captureContext: n, originalException: t, syntheticException: i });
}
function wt(t, n) {
var i;
try {
throw new Error(t);
} catch (t) {
i = t;
}
return vt(
"captureMessage",
t,
"string" == typeof n ? n : void 0,
I(
{ originalException: t, syntheticException: i },
"string" != typeof n ? { captureContext: n } : void 0,
),
);
}
function pt(t) {
return vt("captureEvent", t);
}
function dt(t) {
vt("configureScope", t);
}
function gt(t) {
vt("addBreadcrumb", t);
}
function mt(t, n) {
vt("setContext", t, n);
}
function yt(t) {
vt("setExtras", t);
}
function kt(t) {
vt("setTags", t);
}
function bt(t, n) {
vt("setExtra", t, n);
}
function qt(t, n) {
vt("setTag", t, n);
}
function $t(t) {
vt("setUser", t);
}
function jt(t) {
vt("withScope", t);
}
function xt(t, n) {
return vt("startTransaction", I({}, t), n);
}
var zt = function () {
return (
(zt =
Object.assign ||
function (t) {
for (var n, i = 1, r = arguments.length; i < r; i++)
for (var e in (n = arguments[i])) Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
return t;
}),
zt.apply(this, arguments)
);
};
function St(t, n) {
var i = "function" == typeof Symbol && t[Symbol.iterator];
if (!i) return t;
var r,
e,
u = i.call(t),
s = [];
try {
for (; (void 0 === n || n-- > 0) && !(r = u.next()).done;) s.push(r.value);
} catch (t) {
e = { error: t };
} finally {
try {
r && !r.done && (i = u.return) && i.call(u);
} finally {
if (e) throw e.error;
}
}
return s;
}
function Ct() {
for (var t = [], n = 0; n < arguments.length; n++) t = t.concat(St(arguments[n]));
return t;
}
var Et =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array
? function (t, n) {
return ((t.__proto__ = n), t);
}
: function (t, n) {
for (var i in n) t.hasOwnProperty(i) || (t[i] = n[i]);
return t;
}),
Tt = (function (t) {
function SentryError(n) {
var i = this.constructor,
r = t.call(this, n) || this;
return ((r.message = n), (r.name = i.prototype.constructor.name), Et(r, i.prototype), r);
}
return (
(function (t, n) {
function i() {
this.constructor = t;
}
(L(t, n), (t.prototype = null === n ? Object.create(n) : ((i.prototype = n.prototype), new i())));
})(SentryError, t),
SentryError
);
})(Error),
It = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,
At = "Invalid Dsn",
Rt = (function () {
function t(t) {
("string" == typeof t ? this._fromString(t) : this._fromComponents(t), this._validate());
}
return (
(t.prototype.toString = function (t) {
void 0 === t && (t = !1);
var n = this,
i = n.host,
r = n.path,
e = n.pass,
u = n.port,
s = n.projectId;
return (
n.protocol +
"://" +
n.user +
(t && e ? ":" + e : "") +
"@" +
i +
(u ? ":" + u : "") +
"/" +
(r ? r + "/" : r) +
s
);
}),
(t.prototype._fromString = function (t) {
var n = It.exec(t);
if (!n) throw new Tt(At);
var i = (function (t, n) {
var i = "function" == typeof Symbol && t[Symbol.iterator];
if (!i) return t;
var r,
e,
u = i.call(t),
s = [];
try {
for (; (void 0 === n || n-- > 0) && !(r = u.next()).done;) s.push(r.value);
} catch (t) {
e = { error: t };
} finally {
try {
r && !r.done && (i = u.return) && i.call(u);
} finally {
if (e) throw e.error;
}
}
return s;
})(n.slice(1), 6),
r = i[0],
e = i[1],
u = i[2],
s = void 0 === u ? "" : u,
o = i[3],
_ = i[4],
a = void 0 === _ ? "" : _,
h = "",
c = i[5],
l = c.split("/");
if ((l.length > 1 && ((h = l.slice(0, -1).join("/")), (c = l.pop())), c)) {
var f = c.match(/^\d+/);
f && (c = f[0]);
}
this._fromComponents({ host: o, pass: s, path: h, projectId: c, port: a, protocol: r, user: e });
}),
(t.prototype._fromComponents = function (t) {
((this.protocol = t.protocol),
(this.user = t.user),
(this.pass = t.pass || ""),
(this.host = t.host),
(this.port = t.port || ""),
(this.path = t.path || ""),
(this.projectId = t.projectId));
}),
(t.prototype._validate = function () {
var t = this;
if (
(["protocol", "user", "host", "projectId"].forEach(function (n) {
if (!t[n]) throw new Tt(At + ": " + n + " missing");
}),
!this.projectId.match(/^\d+$/))
)
throw new Tt(At + ": Invalid projectId " + this.projectId);
if ("http" !== this.protocol && "https" !== this.protocol)
throw new Tt(At + ": Invalid protocol " + this.protocol);
if (this.port && isNaN(parseInt(this.port, 10))) throw new Tt(At + ": Invalid port " + this.port);
}),
t
);
})(),
Pt = [];
var Nt = (function () {
function t(t, n) {
((this._integrations = {}),
(this._processing = 0),
(this._backend = new t(n)),
(this._options = n),
n.dsn && (this._dsn = new Rt(n.dsn)));
}
return (
(t.prototype.captureException = function (t, n, i) {
var r = this,
e = n && n.event_id;
return (
this._process(
this._getBackend()
.eventFromException(t, n)
.then(function (t) {
return r._captureEvent(t, n, i);
})
.then(function (t) {
e = t;
}),
),
e
);
}),
(t.prototype.captureMessage = function (t, n, i, r) {
var e = this,
u = i && i.event_id,
s = m(t)
? this._getBackend().eventFromMessage(String(t), n, i)
: this._getBackend().eventFromException(t, i);
return (
this._process(
s
.then(function (t) {
return e._captureEvent(t, i, r);
})
.then(function (t) {
u = t;
}),
),
u
);
}),
(t.prototype.captureEvent = function (t, n, i) {
var r = n && n.event_id;
return (
this._process(
this._captureEvent(t, n, i).then(function (t) {
r = t;
}),
),
r
);
}),
(t.prototype.captureSession = function (t) {
t.release ? this._sendSession(t) : M.warn("Discarded session because of missing release");
}),
(t.prototype.getDsn = function () {
return this._dsn;
}),
(t.prototype.getOptions = function () {
return this._options;
}),
(t.prototype.flush = function (t) {
var n = this;
return this._isClientProcessing(t).then(function (i) {
return n
._getBackend()
.getTransport()
.close(t)
.then(function (t) {
return i && t;
});
});
}),
(t.prototype.close = function (t) {
var n = this;
return this.flush(t).then(function (t) {
return ((n.getOptions().enabled = !1), t);
});
}),
(t.prototype.setupIntegrations = function () {
var t, n;
this._isEnabled() &&
(this._integrations =
((t = this._options),
(n = {}),
(function (t) {
var n = (t.defaultIntegrations && Ct(t.defaultIntegrations)) || [],
i = t.integrations,
r = [];
if (Array.isArray(i)) {
var e = i.map(function (t) {
return t.name;
}),
u = [];
(n.forEach(function (t) {
-1 === e.indexOf(t.name) && -1 === u.indexOf(t.name) && (r.push(t), u.push(t.name));
}),
i.forEach(function (t) {
-1 === u.indexOf(t.name) && (r.push(t), u.push(t.name));
}));
} else "function" == typeof i ? ((r = i(n)), (r = Array.isArray(r) ? r : [r])) : (r = Ct(n));
var s = r.map(function (t) {
return t.name;
}),
o = "Debug";
return (-1 !== s.indexOf(o) && r.push.apply(r, Ct(r.splice(s.indexOf(o), 1))), r);
})(t).forEach(function (t) {
((n[t.name] = t),
(function (t) {
-1 === Pt.indexOf(t.name) &&
(t.setupOnce(T, ht), Pt.push(t.name), M.log("Integration installed: " + t.name));
})(t));
}),
n));
}),
(t.prototype.getIntegration = function (t) {
try {
return this._integrations[t.id] || null;
} catch (n) {
return (M.warn("Cannot retrieve integration " + t.id + " from the current Client"), null);
}
}),
(t.prototype._updateSessionFromEvent = function (t, n) {
var i,
r,
e,
u = !1,
s = !1,
o = n.exception && n.exception.values;
if (o) {
s = !0;
try {
for (
var _ = (function (t) {
var n = "function" == typeof Symbol && Symbol.iterator,
i = n && t[n],
r = 0;
if (i) return i.call(t);
if (t && "number" == typeof t.length)
return {
next: function () {
return (t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t });
},
};
throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
})(o),
a = _.next();
!a.done;
a = _.next()
) {
var h = a.value.mechanism;
if (h && !1 === h.handled) {
u = !0;
break;
}
}
} catch (t) {
i = { error: t };
} finally {
try {
a && !a.done && (r = _.return) && r.call(_);
} finally {
if (i) throw i.error;
}
}
}
var c = n.user;
if (!t.userAgent) {
var l = n.request ? n.request.headers : {};
for (var f in l)
if ("user-agent" === f.toLowerCase()) {
e = l[f];
break;
}
}
t.update(
zt(zt({}, u && { status: O.Crashed }), {
user: c,
userAgent: e,
errors: t.errors + Number(s || u),
}),
);
}),
(t.prototype._sendSession = function (t) {
this._getBackend().sendSession(t);
}),
(t.prototype._isClientProcessing = function (t) {
var n = this;
return new z(function (i) {
var r = 0,
e = setInterval(function () {
0 == n._processing
? (clearInterval(e), i(!0))
: ((r += 1), t && r >= t && (clearInterval(e), i(!1)));
}, 1);
});
}),
(t.prototype._getBackend = function () {
return this._backend;
}),
(t.prototype._isEnabled = function () {
return !1 !== this.getOptions().enabled && void 0 !== this._dsn;
}),
(t.prototype._prepareEvent = function (t, n, i) {
var r = this,
e = this.getOptions().normalizeDepth,
u = void 0 === e ? 3 : e,
s = zt(zt({}, t), {
event_id: t.event_id || (i && i.event_id ? i.event_id : (0, S.eJ)()),
timestamp: t.timestamp || (0, x.lu)(),
});
(this._applyClientOptions(s), this._applyIntegrationsMetadata(s));
var o = n;
i && i.captureContext && (o = C.clone(o).update(i.captureContext));
var _ = z.resolve(s);
return (
o && (_ = o.applyToEvent(s, i)),
_.then(function (t) {
return "number" == typeof u && u > 0 ? r._normalizeEvent(t, u) : t;
})
);
}),
(t.prototype._normalizeEvent = function (t, n) {
if (!t) return null;
var i = zt(
zt(
zt(
zt(
zt({}, t),
t.breadcrumbs && {
breadcrumbs: t.breadcrumbs.map(function (t) {
return zt(zt({}, t), t.data && { data: it(t.data, n) });
}),
},
),
t.user && { user: it(t.user, n) },
),
t.contexts && { contexts: it(t.contexts, n) },
),
t.extra && { extra: it(t.extra, n) },
);
return (t.contexts && t.contexts.trace && (i.contexts.trace = t.contexts.trace), i);
}),
(t.prototype._applyClientOptions = function (t) {
var n = this.getOptions(),
i = n.environment,
r = n.release,
e = n.dist,
u = n.maxValueLength,
s = void 0 === u ? 250 : u;
("environment" in t || (t.environment = "environment" in n ? i : "production"),
void 0 === t.release && void 0 !== r && (t.release = r),
void 0 === t.dist && void 0 !== e && (t.dist = e),
t.message && (t.message = K(t.message, s)));
var o = t.exception && t.exception.values && t.exception.values[0];
o && o.value && (o.value = K(o.value, s));
var _ = t.request;
_ && _.url && (_.url = K(_.url, s));
}),
(t.prototype._applyIntegrationsMetadata = function (t) {
var n = t.sdk,
i = Object.keys(this._integrations);
n && i.length > 0 && (n.integrations = i);
}),
(t.prototype._sendEvent = function (t) {
this._getBackend().sendEvent(t);
}),
(t.prototype._captureEvent = function (t, n, i) {
return this._processEvent(t, n, i).then(
function (t) {
return t.event_id;
},
function (t) {
M.error(t);
},
);
}),
(t.prototype._processEvent = function (t, n, i) {
var r = this,
e = this.getOptions(),
u = e.beforeSend,
s = e.sampleRate;
if (!this._isEnabled()) return z.reject(new Tt("SDK not enabled, will not send event."));
var o = "transaction" === t.type;
return !o && "number" == typeof s && Math.random() > s
? z.reject(
new Tt(
"Discarding event because it's not included in the random sample (sampling rate = " +
s +
")",
),
)
: this._prepareEvent(t, i, n)
.then(function (t) {
if (null === t) throw new Tt("An event processor returned null, will not send event.");
if ((n && n.data && !0 === n.data.__sentry__) || o || !u) return t;
var i = u(t, n);
if (void 0 === i)
throw new Tt("`beforeSend` method has to return `null` or a valid event.");
return q(i)
? i.then(
function (t) {
return t;
},
function (t) {
throw new Tt("beforeSend rejected with " + t);
},
)
: i;
})
.then(function (t) {
if (null === t) throw new Tt("`beforeSend` returned `null`, will not send event.");
var n = i && i.getSession && i.getSession();
return (!o && n && r._updateSessionFromEvent(n, t), r._sendEvent(t), t);
})
.then(null, function (t) {
if (t instanceof Tt) throw t;
throw (
r.captureException(t, { data: { __sentry__: !0 }, originalException: t }),
new Tt(
"Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: " +
t,
)
);
});
}),
(t.prototype._process = function (t) {
var n = this;
((this._processing += 1),
t.then(
function (t) {
return ((n._processing -= 1), t);
},
function (t) {
return ((n._processing -= 1), t);
},
));
}),
t
);
})(),
Ot = (function () {
function t() {}
return (
(t.prototype.sendEvent = function (t) {
return z.resolve({
reason: "NoopTransport: Event has been skipped because no Dsn is configured.",
status: a.Skipped,
});
}),
(t.prototype.close = function (t) {
return z.resolve(!0);
}),
t
);
})(),
Mt = (function () {
function t(t) {
((this._options = t),
this._options.dsn || M.warn("No DSN provided, backend will not do anything."),
(this._transport = this._setupTransport()));
}
return (
(t.prototype.eventFromException = function (t, n) {
throw new Tt("Backend has to implement `eventFromException` method");
}),
(t.prototype.eventFromMessage = function (t, n, i) {
throw new Tt("Backend has to implement `eventFromMessage` method");
}),
(t.prototype.sendEvent = function (t) {
this._transport.sendEvent(t).then(null, function (t) {
M.error("Error while sending event: " + t);
});
}),
(t.prototype.sendSession = function (t) {
this._transport.sendSession
? this._transport.sendSession(t).then(null, function (t) {
M.error("Error while sending session: " + t);
})
: M.warn("Dropping session because custom transport doesn't implement sendSession");
}),
(t.prototype.getTransport = function () {
return this._transport;
}),
(t.prototype._setupTransport = function () {
return new Ot();
}),
t
);
})();
function Dt() {
if (!("fetch" in (0, S.VZ)())) return !1;
try {
return (new Headers(), new Request(""), new Response(), !0);
} catch (t) {
return !1;
}
}
function Lt(t) {
return t && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString());
}
function Bt() {
if (!Dt()) return !1;
try {
return (new Request("_", { referrerPolicy: "origin" }), !0);
} catch (t) {
return !1;
}
}
var Ut = "?",
Ft =
/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
Gt =
/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,
Ht =
/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
Wt = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
Vt = /\((\S*)(?::(\d+))(?::(\d+))\)/,
Kt = /Minified React error #\d+;/i;
function Yt(t) {
var n = null,
i = 0;
t && ("number" == typeof t.framesToPop ? (i = t.framesToPop) : Kt.test(t.message) && (i = 1));
try {
if (
((n = (function (t) {
if (!t || !t.stacktrace) return null;
for (
var n,
i = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,
r =
/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,
e = t.stacktrace.split("\n"),
u = [],
s = 0;
s < e.length;
s += 2
) {
var o = null;
((n = i.exec(e[s]))
? (o = { url: n[2], func: n[3], args: [], line: +n[1], column: null })
: (n = r.exec(e[s])) &&
(o = {
url: n[6],
func: n[3] || n[4],
args: n[5] ? n[5].split(",") : [],
line: +n[1],
column: +n[2],
}),
o && (!o.func && o.line && (o.func = Ut), u.push(o)));
}
return u.length ? { message: Jt(t), name: t.name, stack: u } : null;
})(t)),
n)
)
return Xt(n, i);
} catch (t) {}
try {
if (
((n = (function (t) {
if (!t || !t.stack) return null;
for (var n, i, r, e = [], u = t.stack.split("\n"), s = 0; s < u.length; ++s) {
if ((i = Ft.exec(u[s]))) {
var o = i[2] && 0 === i[2].indexOf("native");
(i[2] &&
0 === i[2].indexOf("eval") &&
(n = Vt.exec(i[2])) &&
((i[2] = n[1]), (i[3] = n[2]), (i[4] = n[3])),
(r = {
url: i[2] && 0 === i[2].indexOf("address at ") ? i[2].substr(11) : i[2],
func: i[1] || Ut,
args: o ? [i[2]] : [],
line: i[3] ? +i[3] : null,
column: i[4] ? +i[4] : null,
}));
} else if ((i = Ht.exec(u[s])))
r = { url: i[2], func: i[1] || Ut, args: [], line: +i[3], column: i[4] ? +i[4] : null };
else {
if (!(i = Gt.exec(u[s]))) continue;
(i[3] && i[3].indexOf(" > eval") > -1 && (n = Wt.exec(i[3]))
? ((i[1] = i[1] || "eval"), (i[3] = n[1]), (i[4] = n[2]), (i[5] = ""))
: 0 !== s || i[5] || void 0 === t.columnNumber || (e[0].column = t.columnNumber + 1),
(r = {
url: i[3],
func: i[1] || Ut,
args: i[2] ? i[2].split(",") : [],
line: i[4] ? +i[4] : null,
column: i[5] ? +i[5] : null,
}));
}
(!r.func && r.line && (r.func = Ut), e.push(r));
}
return e.length ? { message: Jt(t), name: t.name, stack: e } : null;
})(t)),
n)
)
return Xt(n, i);
} catch (t) {}
return { message: Jt(t), name: t && t.name, stack: [], failed: !0 };
}
function Xt(t, n) {
try {
return h(h({}, t), { stack: t.stack.slice(n) });
} catch (n) {
return t;
}
}
function Jt(t) {
var n = t && t.message;
return n ? (n.error && "string" == typeof n.error.message ? n.error.message : n) : "No error message";
}
var Zt = 50;
function Qt(t) {
var n = nn(t.stack),
i = { type: t.name, value: t.message };
return (
n && n.length && (i.stacktrace = { frames: n }),
void 0 === i.type && "" === i.value && (i.value = "Unrecoverable error caught"),
i
);
}
function tn(t) {
return { exception: { values: [Qt(t)] } };
}
function nn(t) {
if (!t || !t.length) return [];
var n = t,
i = n[0].func || "",
r = n[n.length - 1].func || "";
return (
(-1 === i.indexOf("captureMessage") && -1 === i.indexOf("captureException")) || (n = n.slice(1)),
-1 !== r.indexOf("sentryWrapped") && (n = n.slice(0, -1)),
n
.slice(0, Zt)
.map(function (t) {
return {
colno: null === t.column ? void 0 : t.column,
filename: t.url || n[0].url,
function: t.func || "?",
in_app: !0,
lineno: null === t.line ? void 0 : t.line,
};
})
.reverse()
);
}
function eventFromException(t, n, i) {
var r = en(n, (i && i.syntheticException) || void 0, { attachStacktrace: t.attachStacktrace });
return (
(0, S.M6)(r, { handled: !0, type: "generic" }),
(r.level = _.Error),
i && i.event_id && (r.event_id = i.event_id),
z.resolve(r)
);
}
function rn(t, n, i, r) {
void 0 === i && (i = _.Info);
var e = un(n, (r && r.syntheticException) || void 0, { attachStacktrace: t.attachStacktrace });
return ((e.level = i), r && r.event_id && (e.event_id = r.event_id), z.resolve(e));
}
function en(t, n, i) {
var r;
if ((void 0 === i && (i = {}), d(t) && t.error)) return tn(Yt((t = t.error)));
if (
isDOMError(t) ||
(function isDOMException(t) {
return "[object DOMException]" === Object.prototype.toString.call(t);
})(t)
) {
var e = t,
u = e.name || (isDOMError(e) ? "DOMError" : "DOMException"),
s = e.message ? u + ": " + e.message : u;
return (
(r = un(s, n, i)),
(0, S.gO)(r, s),
"code" in e && (r.tags = h(h({}, r.tags), { "DOMException.code": "" + e.code })),
r
);
}
return isError(t)
? (r = tn(Yt(t)))
: y(t) || k(t)
? ((r = (function (t, n, i) {
var r = {
exception: {
values: [
{
type: k(t) ? t.constructor.name : i ? "UnhandledRejection" : "Error",
value:
"Non-Error " +
(i ? "promise rejection" : "exception") +
" captured with keys: " +
rt(t),
},
],
},
extra: { __serialized__: Q(t) },
};
if (n) {
var e = nn(Yt(n).stack);
r.stacktrace = { frames: e };
}
return r;
})(t, n, i.rejection)),
(0, S.M6)(r, { synthetic: !0 }),
r)
: ((r = un(t, n, i)), (0, S.gO)(r, "" + t, void 0), (0, S.M6)(r, { synthetic: !0 }), r);
}
function un(t, n, i) {
void 0 === i && (i = {});
var r = { message: t };
if (i.attachStacktrace && n) {
var e = nn(Yt(n).stack);
r.stacktrace = { frames: e };
}
return r;
}
function sn(t, n) {
return {
body:
JSON.stringify({ sent_at: new Date().toISOString() }) +
"\n" +
JSON.stringify({ type: "session" }) +
"\n" +
JSON.stringify(t),
type: "session",
url: n.getEnvelopeEndpointWithUrlEncodedAuth(),
};
}
function on(t, n) {
var i = t.tags || {},
r = i.__sentry_samplingMethod,
e = i.__sentry_sampleRate,
u = (function (t, n) {
var i = {};
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && n.indexOf(r) < 0 && (i[r] = t[r]);
if (null != t && "function" == typeof Object.getOwnPropertySymbols) {
var e = 0;
for (r = Object.getOwnPropertySymbols(t); e < r.length; e++)
n.indexOf(r[e]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[e]) && (i[r[e]] = t[r[e]]);
}
return i;
})(i, ["__sentry_samplingMethod", "__sentry_sampleRate"]);
t.tags = u;
var s = "transaction" === t.type,
o = {
body: JSON.stringify(t),
type: t.type || "event",
url: s ? n.getEnvelopeEndpointWithUrlEncodedAuth() : n.getStoreEndpointWithUrlEncodedAuth(),
};
if (s) {
var _ =
JSON.stringify({ event_id: t.event_id, sent_at: new Date().toISOString() }) +
"\n" +
JSON.stringify({ type: t.type, sample_rates: [{ id: r, rate: e }] }) +
"\n" +
o.body;
o.body = _;
}
return o;
}
var _n = (function () {
function t(t) {
((this.dsn = t), (this._dsnObject = new Rt(t)));
}
return (
(t.prototype.getDsn = function () {
return this._dsnObject;
}),
(t.prototype.getBaseApiEndpoint = function () {
var t = this._dsnObject,
n = t.protocol ? t.protocol + ":" : "",
i = t.port ? ":" + t.port : "";
return n + "//" + t.host + i + (t.path ? "/" + t.path : "") + "/api/";
}),
(t.prototype.getStoreEndpoint = function () {
return this._getIngestEndpoint("store");
}),
(t.prototype.getStoreEndpointWithUrlEncodedAuth = function () {
return this.getStoreEndpoint() + "?" + this._encodedAuth();
}),
(t.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {
return this._getEnvelopeEndpoint() + "?" + this._encodedAuth();
}),
(t.prototype.getStoreEndpointPath = function () {
var t = this._dsnObject;
return (t.path ? "/" + t.path : "") + "/api/" + t.projectId + "/store/";
}),
(t.prototype.getRequestHeaders = function (t, n) {
var i = this._dsnObject,
r = ["Sentry sentry_version=7"];
return (
r.push("sentry_client=" + t + "/" + n),
r.push("sentry_key=" + i.user),
i.pass && r.push("sentry_secret=" + i.pass),
{ "Content-Type": "application/json", "X-Sentry-Auth": r.join(", ") }
);
}),
(t.prototype.getReportDialogEndpoint = function (t) {
void 0 === t && (t = {});
var n = this._dsnObject,
i = this.getBaseApiEndpoint() + "embed/error-page/",
r = [];
for (var e in (r.push("dsn=" + n.toString()), t))
if ("dsn" !== e)
if ("user" === e) {
if (!t.user) continue;
(t.user.name && r.push("name=" + encodeURIComponent(t.user.name)),
t.user.email && r.push("email=" + encodeURIComponent(t.user.email)));
} else r.push(encodeURIComponent(e) + "=" + encodeURIComponent(t[e]));
return r.length ? i + "?" + r.join("&") : i;
}),
(t.prototype._getEnvelopeEndpoint = function () {
return this._getIngestEndpoint("envelope");
}),
(t.prototype._getIngestEndpoint = function (t) {
return "" + this.getBaseApiEndpoint() + this._dsnObject.projectId + "/" + t + "/";
}),
(t.prototype._encodedAuth = function () {
var t,
n = { sentry_key: this._dsnObject.user, sentry_version: "7" };
return (
(t = n),
Object.keys(t)
.map(function (n) {
return encodeURIComponent(n) + "=" + encodeURIComponent(t[n]);
})
.join("&")
);
}),
t
);
})(),
an = (function () {
function t(t) {
((this._limit = t), (this._buffer = []));
}
return (
(t.prototype.isReady = function () {
return void 0 === this._limit || this.length() < this._limit;
}),
(t.prototype.add = function (t) {
var n = this;
return this.isReady()
? (-1 === this._buffer.indexOf(t) && this._buffer.push(t),
t
.then(function () {
return n.remove(t);
})
.then(null, function () {
return n.remove(t).then(null, function () {});
}),
t)
: z.reject(new Tt("Not adding Promise due to buffer limit reached."));
}),
(t.prototype.remove = function (t) {
return this._buffer.splice(this._buffer.indexOf(t), 1)[0];
}),
(t.prototype.length = function () {
return this._buffer.length;
}),
(t.prototype.drain = function (t) {
var n = this;
return new z(function (i) {
var r = setTimeout(function () {
t && t > 0 && i(!1);
}, t);
z.all(n._buffer)
.then(function () {
(clearTimeout(r), i(!0));
})
.then(null, function () {
i(!0);
});
});
}),
t
);
})(),
hn = (function () {
function t(t) {
((this.options = t),
(this._buffer = new an(30)),
(this._rateLimits = {}),
(this._api = new _n(this.options.dsn)),
(this.url = this._api.getStoreEndpointWithUrlEncodedAuth()));
}
return (
(t.prototype.sendEvent = function (t) {
throw new Tt("Transport Class has to implement `sendEvent` method");
}),
(t.prototype.close = function (t) {
return this._buffer.drain(t);
}),
(t.prototype._handleResponse = function (t) {
var n = t.requestType,
i = t.response,
r = t.headers,
e = t.resolve,
u = t.reject,
s = a.fromHttpCode(i.status);
(this._handleRateLimit(r) &&
M.warn("Too many requests, backing off until: " + this._disabledUntil(n)),
s !== a.Success ? u(i) : e({ status: s }));
}),
(t.prototype._disabledUntil = function (t) {
return this._rateLimits[t] || this._rateLimits.all;
}),
(t.prototype._isRateLimited = function (t) {
return this._disabledUntil(t) > new Date(Date.now());
}),
(t.prototype._handleRateLimit = function (t) {
var n,
i,
r,
e,
u = Date.now(),
s = t["x-sentry-rate-limits"],
o = t["retry-after"];
if (s) {
try {
for (var _ = c(s.trim().split(",")), a = _.next(); !a.done; a = _.next()) {
var h = a.value.split(":", 2),
l = parseInt(h[0], 10),
f = 1e3 * (isNaN(l) ? 60 : l);
try {
for (var v = ((r = void 0), c(h[1].split(";"))), w = v.next(); !w.done; w = v.next()) {
var p = w.value;
this._rateLimits[p || "all"] = new Date(u + f);
}
} catch (t) {
r = { error: t };
} finally {
try {
w && !w.done && (e = v.return) && e.call(v);
} finally {
if (r) throw r.error;
}
}
}
} catch (t) {
n = { error: t };
} finally {
try {
a && !a.done && (i = _.return) && i.call(_);
} finally {
if (n) throw n.error;
}
}
return !0;
}
return !!o && ((this._rateLimits.all = new Date(u + (0, S.FA)(u, o))), !0);
}),
t
);
})(),
cn = (0, S.VZ)(),
ln = (function (t) {
function n() {
return (null !== t && t.apply(this, arguments)) || this;
}
return (
o(n, t),
(n.prototype.sendEvent = function (t) {
return this._sendRequest(on(t, this._api), t);
}),
(n.prototype.sendSession = function (t) {
return this._sendRequest(sn(t, this._api), t);
}),
(n.prototype._sendRequest = function (t, n) {
var i = this;
if (this._isRateLimited(t.type))
return Promise.reject({
event: n,
type: t.type,
reason: "Transport locked till " + this._disabledUntil(t.type) + " due to too many requests.",
status: 429,
});
var r = { body: t.body, method: "POST", referrerPolicy: Bt() ? "origin" : "" };
return (
void 0 !== this.options.fetchParameters && Object.assign(r, this.options.fetchParameters),
void 0 !== this.options.headers && (r.headers = this.options.headers),
this._buffer.add(
new z(function (n, e) {
cn.fetch(t.url, r)
.then(function (r) {
var u = {
"x-sentry-rate-limits": r.headers.get("X-Sentry-Rate-Limits"),
"retry-after": r.headers.get("Retry-After"),
};
i._handleResponse({
requestType: t.type,
response: r,
headers: u,
resolve: n,
reject: e,
});
})
.catch(e);
}),
)
);
}),
n
);
})(hn),
vn = (function (t) {
function n() {
return (null !== t && t.apply(this, arguments)) || this;
}
return (
o(n, t),
(n.prototype.sendEvent = function (t) {
return this._sendRequest(on(t, this._api), t);
}),
(n.prototype.sendSession = function (t) {
return this._sendRequest(sn(t, this._api), t);
}),
(n.prototype._sendRequest = function (t, n) {
var i = this;
return this._isRateLimited(t.type)
? Promise.reject({
event: n,
type: t.type,
reason: "Transport locked till " + this._disabledUntil(t.type) + " due to too many requests.",
status: 429,
})
: this._buffer.add(
new z(function (n, r) {
var e = new XMLHttpRequest();
for (var u in ((e.onreadystatechange = function () {
if (4 === e.readyState) {
var u = {
"x-sentry-rate-limits": e.getResponseHeader("X-Sentry-Rate-Limits"),
"retry-after": e.getResponseHeader("Retry-After"),
};
i._handleResponse({
requestType: t.type,
response: e,
headers: u,
resolve: n,
reject: r,
});
}
}),
e.open("POST", t.url),
i.options.headers))
i.options.headers.hasOwnProperty(u) && e.setRequestHeader(u, i.options.headers[u]);
e.send(t.body);
}),
);
}),
n
);
})(hn),
wn = (function (t) {
function n() {
return (null !== t && t.apply(this, arguments)) || this;
}
return (
o(n, t),
(n.prototype.eventFromException = function (t, n) {
return eventFromException(this._options, t, n);
}),
(n.prototype.eventFromMessage = function (t, n, i) {
return (void 0 === n && (n = _.Info), rn(this._options, t, n, i));
}),
(n.prototype._setupTransport = function () {
if (!this._options.dsn) return t.prototype._setupTransport.call(this);
var n = h(h({}, this._options.transportOptions), { dsn: this._options.dsn });
return this._options.transport ? new this._options.transport(n) : Dt() ? new ln(n) : new vn(n);
}),
n
);
})(Mt),
pn = 0;
function shouldIgnoreOnError() {
return pn > 0;
}
function dn(t, n, i) {
if ((void 0 === n && (n = {}), "function" != typeof t)) return t;
try {
if (t.__sentry__) return t;
if (t.__sentry_wrapped__) return t.__sentry_wrapped__;
} catch (n) {
return t;
}
var r = function () {
var r = Array.prototype.slice.call(arguments);
try {
i && "function" == typeof i && i.apply(this, arguments);
var e = r.map(function (t) {
return dn(t, n);
});
return t.handleEvent ? t.handleEvent.apply(this, e) : t.apply(this, e);
} catch (t) {
throw (
(function ignoreNextOnError() {
((pn += 1),
setTimeout(function () {
pn -= 1;
}));
})(),
jt(function (i) {
(i.addEventProcessor(function (t) {
var i = h({}, t);
return (
n.mechanism && ((0, S.gO)(i, void 0, void 0), (0, S.M6)(i, n.mechanism)),
(i.extra = h(h({}, i.extra), { arguments: r })),
i
);
}),
captureException(t));
}),
t
);
}
};
try {
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && (r[e] = t[e]);
} catch (t) {}
((t.prototype = t.prototype || {}),
(r.prototype = t.prototype),
Object.defineProperty(t, "__sentry_wrapped__", { enumerable: !1, value: r }),
Object.defineProperties(r, {
__sentry__: { enumerable: !1, value: !0 },
__sentry_original__: { enumerable: !1, value: t },
}));
try {
Object.getOwnPropertyDescriptor(r, "name").configurable &&
Object.defineProperty(r, "name", {
get: function () {
return t.name;
},
});
} catch (t) {}
return r;
}
function gn(t) {
if ((void 0 === t && (t = {}), t.eventId))
if (t.dsn) {
var n = document.createElement("script");
((n.async = !0),
(n.src = new _n(t.dsn).getReportDialogEndpoint(t)),
t.onLoad && (n.onload = t.onLoad),
(document.head || document.body).appendChild(n));
} else M.error("Missing dsn option in showReportDialog call");
else M.error("Missing eventId option in showReportDialog call");
}
var mn,
yn = (0, S.VZ)(),
kn = {},
bn = {};
function qn(t) {
t &&
"string" == typeof t.type &&
"function" == typeof t.callback &&
((kn[t.type] = kn[t.type] || []),
kn[t.type].push(t.callback),
(function (t) {
if (!bn[t])
switch (((bn[t] = !0), t)) {
case "console":
"console" in yn &&
["debug", "info", "warn", "error", "log", "assert"].forEach(function (t) {
t in yn.console &&
J(yn.console, t, function (n) {
return function () {
for (var i = [], r = 0; r < arguments.length; r++) i[r] = arguments[r];
($n("console", { args: i, level: t }),
n && Function.prototype.apply.call(n, yn.console, i));
};
});
});
break;
case "dom":
"document" in yn &&
(yn.document.addEventListener("click", En("click", $n.bind(null, "dom")), !1),
yn.document.addEventListener("keypress", Tn($n.bind(null, "dom")), !1),
["EventTarget", "Node"].forEach(function (t) {
var n = yn[t] && yn[t].prototype;
n &&
n.hasOwnProperty &&
n.hasOwnProperty("addEventListener") &&
(J(n, "addEventListener", function (t) {
return function (n, i, r) {
return (
i && i.handleEvent
? ("click" === n &&
J(i, "handleEvent", function (t) {
return function (n) {
return (En("click", $n.bind(null, "dom"))(n), t.call(this, n));
};
}),
"keypress" === n &&
J(i, "handleEvent", function (t) {
return function (n) {
return (Tn($n.bind(null, "dom"))(n), t.call(this, n));
};
}))
: ("click" === n && En("click", $n.bind(null, "dom"), !0)(this),
"keypress" === n && Tn($n.bind(null, "dom"))(this)),
t.call(this, n, i, r)
);
};
}),
J(n, "removeEventListener", function (t) {
return function (n, i, r) {
try {
t.call(this, n, i.__sentry_wrapped__, r);
} catch (t) {}
return t.call(this, n, i, r);
};
}));
}));
break;
case "xhr":
!(function () {
if ("XMLHttpRequest" in yn) {
var t = [],
n = [],
i = XMLHttpRequest.prototype;
(J(i, "open", function (i) {
return function () {
for (var r = [], e = 0; e < arguments.length; e++) r[e] = arguments[e];
var u = this,
s = r[1];
((u.__sentry_xhr__ = { method: g(r[0]) ? r[0].toUpperCase() : r[0], url: r[1] }),
g(s) &&
"POST" === u.__sentry_xhr__.method &&
s.match(/sentry_key/) &&
(u.__sentry_own_request__ = !0));
var o = function () {
if (4 === u.readyState) {
try {
u.__sentry_xhr__ && (u.__sentry_xhr__.status_code = u.status);
} catch (t) {}
try {
var i = t.indexOf(u);
if (-1 !== i) {
t.splice(i);
var e = n.splice(i)[0];
u.__sentry_xhr__ && void 0 !== e[0] && (u.__sentry_xhr__.body = e[0]);
}
} catch (t) {}
$n("xhr", {
args: r,
endTimestamp: Date.now(),
startTimestamp: Date.now(),
xhr: u,
});
}
};
return (
"onreadystatechange" in u && "function" == typeof u.onreadystatechange
? J(u, "onreadystatechange", function (t) {
return function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
return (o(), t.apply(u, n));
};
})
: u.addEventListener("readystatechange", o),
i.apply(u, r)
);
};
}),
J(i, "send", function (i) {
return function () {
for (var r = [], e = 0; e < arguments.length; e++) r[e] = arguments[e];
return (
t.push(this),
n.push(r),
$n("xhr", { args: r, startTimestamp: Date.now(), xhr: this }),
i.apply(this, r)
);
};
}));
}
})();
break;
case "fetch":
(function () {
if (!Dt()) return !1;
var t = (0, S.VZ)();
if (Lt(t.fetch)) return !0;
var n = !1,
i = t.document;
if (i && "function" == typeof i.createElement)
try {
var r = i.createElement("iframe");
((r.hidden = !0),
i.head.appendChild(r),
r.contentWindow && r.contentWindow.fetch && (n = Lt(r.contentWindow.fetch)),
i.head.removeChild(r));
} catch (t) {
M.warn(
"Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",
t,
);
}
return n;
})() &&
J(yn, "fetch", function (t) {
return function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
var r,
e = {
args: n,
fetchData: {
method:
((r = n),
void 0 === r && (r = []),
"Request" in yn && $(r[0], Request) && r[0].method
? String(r[0].method).toUpperCase()
: r[1] && r[1].method
? String(r[1].method).toUpperCase()
: "GET"),
url: jn(n),
},
startTimestamp: Date.now(),
};
return (
$n("fetch", B({}, e)),
t.apply(yn, n).then(
function (t) {
return ($n("fetch", B(B({}, e), { endTimestamp: Date.now(), response: t })), t);
},
function (t) {
throw ($n("fetch", B(B({}, e), { endTimestamp: Date.now(), error: t })), t);
},
)
);
};
});
break;
case "history":
!(function () {
if (
(function () {
var t = (0, S.VZ)(),
n = t.chrome,
i = n && n.app && n.app.runtime,
r = "history" in t && !!t.history.pushState && !!t.history.replaceState;
return !i && r;
})()
) {
var t = yn.onpopstate;
((yn.onpopstate = function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
var r = yn.location.href,
e = mn;
if (((mn = r), $n("history", { from: e, to: r }), t)) return t.apply(this, n);
}),
J(yn.history, "pushState", n),
J(yn.history, "replaceState", n));
}
function n(t) {
return function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
var r = n.length > 2 ? n[2] : void 0;
if (r) {
var e = mn,
u = String(r);
((mn = u), $n("history", { from: e, to: u }));
}
return t.apply(this, n);
};
}
})();
break;
case "error":
!(function instrumentError() {
((An = yn.onerror),
(yn.onerror = function (t, n, i, r, e) {
return (
$n("error", { column: r, error: e, line: i, msg: t, url: n }),
!!An && An.apply(this, arguments)
);
}));
})();
break;
case "unhandledrejection":
((Rn = yn.onunhandledrejection),
(yn.onunhandledrejection = function (t) {
return ($n("unhandledrejection", t), !Rn || Rn.apply(this, arguments));
}));
break;
default:
M.warn("unknown instrumentation type:", t);
}
})(t.type));
}
function $n(t, n) {
var i, r;
if (t && kn[t])
try {
for (var e = U(kn[t] || []), u = e.next(); !u.done; u = e.next()) {
var s = u.value;
try {
s(n);
} catch (n) {
M.error(
"Error while triggering instrumentation handler.\nType: " +
t +
"\nName: " +
V(s) +
"\nError: " +
n,
);
}
}
} catch (t) {
i = { error: t };
} finally {
try {
u && !u.done && (r = e.return) && r.call(e);
} finally {
if (i) throw i.error;
}
}
}
function jn(t) {
return (
void 0 === t && (t = []),
"string" == typeof t[0] ? t[0] : "Request" in yn && $(t[0], Request) ? t[0].url : String(t[0])
);
}
var xn,
zn,
Sn = 1e3,
Cn = 0;
function En(t, n, i) {
return (
void 0 === i && (i = !1),
function (r) {
((xn = void 0),
r &&
zn !== r &&
((zn = r),
Cn && clearTimeout(Cn),
i
? (Cn = setTimeout(function () {
n({ event: r, name: t });
}))
: n({ event: r, name: t })));
}
);
}
function Tn(t) {
return function (n) {
var i;
try {
i = n.target;
} catch (t) {
return;
}
var r = i && i.tagName;
r &&
("INPUT" === r || "TEXTAREA" === r || i.isContentEditable) &&
(xn || En("input", t)(n),
clearTimeout(xn),
(xn = setTimeout(function () {
xn = void 0;
}, Sn)));
};
}
var In,
An = null,
Rn = null,
Pn = (function () {
function t(n) {
((this.name = t.id),
(this._options = h({ console: !0, dom: !0, fetch: !0, history: !0, sentry: !0, xhr: !0 }, n)));
}
return (
(t.prototype.addSentryBreadcrumb = function (t) {
this._options.sentry &&
ht().addBreadcrumb(
{
category: "sentry." + ("transaction" === t.type ? "transaction" : "event"),
event_id: t.event_id,
level: t.level,
message: (0, S.$X)(t),
},
{ event: t },
);
}),
(t.prototype.setupOnce = function () {
var t = this;
(this._options.console &&
qn({
callback: function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
t._consoleBreadcrumb.apply(t, f(n));
},
type: "console",
}),
this._options.dom &&
qn({
callback: function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
t._domBreadcrumb.apply(t, f(n));
},
type: "dom",
}),
this._options.xhr &&
qn({
callback: function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
t._xhrBreadcrumb.apply(t, f(n));
},
type: "xhr",
}),
this._options.fetch &&
qn({
callback: function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
t._fetchBreadcrumb.apply(t, f(n));
},
type: "fetch",
}),
this._options.history &&
qn({
callback: function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
t._historyBreadcrumb.apply(t, f(n));
},
type: "history",
}));
}),
(t.prototype._consoleBreadcrumb = function (t) {
var n = {
category: "console",
data: { arguments: t.args, logger: "console" },
level: _.fromString(t.level),
message: Y(t.args, " "),
};
if ("assert" === t.level) {
if (!1 !== t.args[0]) return;
((n.message = "Assertion failed: " + (Y(t.args.slice(1), " ") || "console.assert")),
(n.data.arguments = t.args.slice(1)));
}
ht().addBreadcrumb(n, { input: t.args, level: t.level });
}),
(t.prototype._domBreadcrumb = function (t) {
var n;
try {
n = t.event.target ? F(t.event.target) : F(t.event);
} catch (t) {
n = "<unknown>";
}
0 !== n.length &&
ht().addBreadcrumb({ category: "ui." + t.name, message: n }, { event: t.event, name: t.name });
}),
(t.prototype._xhrBreadcrumb = function (t) {
if (t.endTimestamp) {
if (t.xhr.__sentry_own_request__) return;
var n = t.xhr.__sentry_xhr__ || {},
i = n.method,
r = n.url,
e = n.status_code,
u = n.body;
ht().addBreadcrumb(
{ category: "xhr", data: { method: i, url: r, status_code: e }, type: "http" },
{ xhr: t.xhr, input: u },
);
}
}),
(t.prototype._fetchBreadcrumb = function (t) {
t.endTimestamp &&
((t.fetchData.url.match(/sentry_key/) && "POST" === t.fetchData.method) ||
(t.error
? ht().addBreadcrumb(
{ category: "fetch", data: t.fetchData, level: _.Error, type: "http" },
{ data: t.error, input: t.args },
)
: ht().addBreadcrumb(
{
category: "fetch",
data: h(h({}, t.fetchData), { status_code: t.response.status }),
type: "http",
},
{ input: t.args, response: t.response },
)));
}),
(t.prototype._historyBreadcrumb = function (t) {
var n = (0, S.VZ)(),
i = t.from,
r = t.to,
e = (0, S.Dl)(n.location.href),
u = (0, S.Dl)(i),
s = (0, S.Dl)(r);
(u.path || (u = e),
e.protocol === s.protocol && e.host === s.host && (r = s.relative),
e.protocol === u.protocol && e.host === u.host && (i = u.relative),
ht().addBreadcrumb({ category: "navigation", data: { from: i, to: r } }));
}),
(t.id = "Breadcrumbs"),
t
);
})(),
Nn = "sentry.javascript.browser",
On = "5.30.0",
Mn = (function (t) {
function n(n) {
return (void 0 === n && (n = {}), t.call(this, wn, n) || this);
}
return (
o(n, t),
(n.prototype.showReportDialog = function (t) {
(void 0 === t && (t = {}),
(0, S.VZ)().document &&
(this._isEnabled()
? gn(h(h({}, t), { dsn: t.dsn || this.getDsn() }))
: M.error("Trying to call showReportDialog with Sentry Client disabled")));
}),
(n.prototype._prepareEvent = function (n, i, r) {
return (
(n.platform = n.platform || "javascript"),
(n.sdk = h(h({}, n.sdk), {
name: Nn,
packages: f((n.sdk && n.sdk.packages) || [], [{ name: "npm:@sentry/browser", version: On }]),
version: On,
})),
t.prototype._prepareEvent.call(this, n, i, r)
);
}),
(n.prototype._sendEvent = function (n) {
var i = this.getIntegration(Pn);
(i && i.addSentryBreadcrumb(n), t.prototype._sendEvent.call(this, n));
}),
n
);
})(Nt),
Dn = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/],
Ln = (function () {
function t(n) {
(void 0 === n && (n = {}), (this._options = n), (this.name = t.id));
}
return (
(t.prototype.setupOnce = function () {
T(function (n) {
var i = ht();
if (!i) return n;
var r = i.getIntegration(t);
if (r) {
var e = i.getClient(),
u = e ? e.getOptions() : {},
s = r._mergeOptions(u);
if (r._shouldDropEvent(n, s)) return null;
}
return n;
});
}),
(t.prototype._shouldDropEvent = function (t, n) {
return this._isSentryError(t, n)
? (M.warn("Event dropped due to being internal Sentry Error.\nEvent: " + (0, S.$X)(t)), !0)
: this._isIgnoredError(t, n)
? (M.warn(
"Event dropped due to being matched by `ignoreErrors` option.\nEvent: " + (0, S.$X)(t),
),
!0)
: this._isDeniedUrl(t, n)
? (M.warn(
"Event dropped due to being matched by `denyUrls` option.\nEvent: " +
(0, S.$X)(t) +
".\nUrl: " +
this._getEventFilterUrl(t),
),
!0)
: !this._isAllowedUrl(t, n) &&
(M.warn(
"Event dropped due to not being matched by `allowUrls` option.\nEvent: " +
(0, S.$X)(t) +
".\nUrl: " +
this._getEventFilterUrl(t),
),
!0);
}),
(t.prototype._isSentryError = function (t, n) {
if (!n.ignoreInternal) return !1;
try {
return (
(t &&
t.exception &&
t.exception.values &&
t.exception.values[0] &&
"SentryError" === t.exception.values[0].type) ||
!1
);
} catch (t) {
return !1;
}
}),
(t.prototype._isIgnoredError = function (t, n) {
return (
!(!n.ignoreErrors || !n.ignoreErrors.length) &&
this._getPossibleEventMessages(t).some(function (t) {
return n.ignoreErrors.some(function (n) {
return X(t, n);
});
})
);
}),
(t.prototype._isDeniedUrl = function (t, n) {
if (!n.denyUrls || !n.denyUrls.length) return !1;
var i = this._getEventFilterUrl(t);
return (
!!i &&
n.denyUrls.some(function (t) {
return X(i, t);
})
);
}),
(t.prototype._isAllowedUrl = function (t, n) {
if (!n.allowUrls || !n.allowUrls.length) return !0;
var i = this._getEventFilterUrl(t);
return (
!i ||
n.allowUrls.some(function (t) {
return X(i, t);
})
);
}),
(t.prototype._mergeOptions = function (t) {
return (
void 0 === t && (t = {}),
{
allowUrls: Ct(
this._options.whitelistUrls || [],
this._options.allowUrls || [],
t.whitelistUrls || [],
t.allowUrls || [],
),
denyUrls: Ct(
this._options.blacklistUrls || [],
this._options.denyUrls || [],
t.blacklistUrls || [],
t.denyUrls || [],
),
ignoreErrors: Ct(this._options.ignoreErrors || [], t.ignoreErrors || [], Dn),
ignoreInternal: void 0 === this._options.ignoreInternal || this._options.ignoreInternal,
}
);
}),
(t.prototype._getPossibleEventMessages = function (t) {
if (t.message) return [t.message];
if (t.exception)
try {
var n = (t.exception.values && t.exception.values[0]) || {},
i = n.type,
r = void 0 === i ? "" : i,
e = n.value,
u = void 0 === e ? "" : e;
return ["" + u, r + ": " + u];
} catch (n) {
return (M.error("Cannot extract message for event " + (0, S.$X)(t)), []);
}
return [];
}),
(t.prototype._getEventFilterUrl = function (t) {
try {
if (t.stacktrace) {
var n = t.stacktrace.frames;
return (n && n[n.length - 1].filename) || null;
}
if (t.exception) {
var i =
t.exception.values &&
t.exception.values[0].stacktrace &&
t.exception.values[0].stacktrace.frames;
return (i && i[i.length - 1].filename) || null;
}
return null;
} catch (n) {
return (M.error("Cannot extract url for event " + (0, S.$X)(t)), null);
}
}),
(t.id = "InboundFilters"),
t
);
})(),
Bn = (function () {
function t() {
this.name = t.id;
}
return (
(t.prototype.setupOnce = function () {
((In = Function.prototype.toString),
(Function.prototype.toString = function () {
for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
var i = this.__sentry_original__ || this;
return In.apply(i, t);
}));
}),
(t.id = "FunctionToString"),
t
);
})(),
Un = [
"EventTarget",
"Window",
"Node",
"ApplicationCache",
"AudioTrackList",
"ChannelMergerNode",
"CryptoOperation",
"EventSource",
"FileReader",
"HTMLUnknownElement",
"IDBDatabase",
"IDBRequest",
"IDBTransaction",
"KeyOperation",
"MediaController",
"MessagePort",
"ModalWindow",
"Notification",
"SVGElementInstance",
"Screen",
"TextTrack",
"TextTrackCue",
"TextTrackList",
"WebSocket",
"WebSocketWorker",
"Worker",
"XMLHttpRequest",
"XMLHttpRequestEventTarget",
"XMLHttpRequestUpload",
],
Fn = (function () {
function t(n) {
((this.name = t.id),
(this._options = h(
{
XMLHttpRequest: !0,
eventTarget: !0,
requestAnimationFrame: !0,
setInterval: !0,
setTimeout: !0,
},
n,
)));
}
return (
(t.prototype.setupOnce = function () {
var t = (0, S.VZ)();
(this._options.setTimeout && J(t, "setTimeout", this._wrapTimeFunction.bind(this)),
this._options.setInterval && J(t, "setInterval", this._wrapTimeFunction.bind(this)),
this._options.requestAnimationFrame && J(t, "requestAnimationFrame", this._wrapRAF.bind(this)),
this._options.XMLHttpRequest &&
"XMLHttpRequest" in t &&
J(XMLHttpRequest.prototype, "send", this._wrapXHR.bind(this)),
this._options.eventTarget &&
(Array.isArray(this._options.eventTarget) ? this._options.eventTarget : Un).forEach(
this._wrapEventTarget.bind(this),
));
}),
(t.prototype._wrapTimeFunction = function (t) {
return function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
var r = n[0];
return (
(n[0] = dn(r, { mechanism: { data: { function: V(t) }, handled: !0, type: "instrument" } })),
t.apply(this, n)
);
};
}),
(t.prototype._wrapRAF = function (t) {
return function (n) {
return t.call(
this,
dn(n, {
mechanism: {
data: { function: "requestAnimationFrame", handler: V(t) },
handled: !0,
type: "instrument",
},
}),
);
};
}),
(t.prototype._wrapEventTarget = function (t) {
var n = (0, S.VZ)(),
i = n[t] && n[t].prototype;
i &&
i.hasOwnProperty &&
i.hasOwnProperty("addEventListener") &&
(J(i, "addEventListener", function (n) {
return function (i, r, e) {
try {
"function" == typeof r.handleEvent &&
(r.handleEvent = dn(r.handleEvent.bind(r), {
mechanism: {
data: { function: "handleEvent", handler: V(r), target: t },
handled: !0,
type: "instrument",
},
}));
} catch (t) {}
return n.call(
this,
i,
dn(r, {
mechanism: {
data: { function: "addEventListener", handler: V(r), target: t },
handled: !0,
type: "instrument",
},
}),
e,
);
};
}),
J(i, "removeEventListener", function (t) {
return function (n, i, r) {
var e,
u = i;
try {
var s = null === (e = u) || void 0 === e ? void 0 : e.__sentry_wrapped__;
s && t.call(this, n, s, r);
} catch (t) {}
return t.call(this, n, u, r);
};
}));
}),
(t.prototype._wrapXHR = function (t) {
return function () {
for (var n = [], i = 0; i < arguments.length; i++) n[i] = arguments[i];
var r = this;
return (
["onload", "onerror", "onprogress", "onreadystatechange"].forEach(function (t) {
t in r &&
"function" == typeof r[t] &&
J(r, t, function (n) {
var i = {
mechanism: { data: { function: t, handler: V(n) }, handled: !0, type: "instrument" },
};
return (
n.__sentry_original__ && (i.mechanism.data.handler = V(n.__sentry_original__)),
dn(n, i)
);
});
}),
t.apply(this, n)
);
};
}),
(t.id = "TryCatch"),
t
);
})(),
Gn = (function () {
function t(n) {
((this.name = t.id),
(this._onErrorHandlerInstalled = !1),
(this._onUnhandledRejectionHandlerInstalled = !1),
(this._options = h({ onerror: !0, onunhandledrejection: !0 }, n)));
}
return (
(t.prototype.setupOnce = function () {
((Error.stackTraceLimit = 50),
this._options.onerror &&
(M.log("Global Handler attached: onerror"), this._installGlobalOnErrorHandler()),
this._options.onunhandledrejection &&
(M.log("Global Handler attached: onunhandledrejection"),
this._installGlobalOnUnhandledRejectionHandler()));
}),
(t.prototype._installGlobalOnErrorHandler = function () {
var n = this;
this._onErrorHandlerInstalled ||
(qn({
callback: function (i) {
var r = i.error,
e = ht(),
u = e.getIntegration(t),
s = r && !0 === r.__sentry_own_request__;
if (u && !shouldIgnoreOnError() && !s) {
var o = e.getClient(),
_ = m(r)
? n._eventFromIncompleteOnError(i.msg, i.url, i.line, i.column)
: n._enhanceEventWithInitialFrame(
en(r, void 0, {
attachStacktrace: o && o.getOptions().attachStacktrace,
rejection: !1,
}),
i.url,
i.line,
i.column,
);
((0, S.M6)(_, { handled: !1, type: "onerror" }),
e.captureEvent(_, { originalException: r }));
}
},
type: "error",
}),
(this._onErrorHandlerInstalled = !0));
}),
(t.prototype._installGlobalOnUnhandledRejectionHandler = function () {
var n = this;
this._onUnhandledRejectionHandlerInstalled ||
(qn({
callback: function (i) {
var r = i;
try {
"reason" in i
? (r = i.reason)
: "detail" in i && "reason" in i.detail && (r = i.detail.reason);
} catch (t) {}
var e = ht(),
u = e.getIntegration(t),
s = r && !0 === r.__sentry_own_request__;
if (!u || shouldIgnoreOnError() || s) return !0;
var o = e.getClient(),
a = m(r)
? n._eventFromRejectionWithPrimitive(r)
: en(r, void 0, {
attachStacktrace: o && o.getOptions().attachStacktrace,
rejection: !0,
});
((a.level = _.Error),
(0, S.M6)(a, { handled: !1, type: "onunhandledrejection" }),
e.captureEvent(a, { originalException: r }));
},
type: "unhandledrejection",
}),
(this._onUnhandledRejectionHandlerInstalled = !0));
}),
(t.prototype._eventFromIncompleteOnError = function (t, n, i, r) {
var e,
u = d(t) ? t.message : t;
if (g(u)) {
var s = u.match(
/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,
);
s && ((e = s[1]), (u = s[2]));
}
var o = { exception: { values: [{ type: e || "Error", value: u }] } };
return this._enhanceEventWithInitialFrame(o, n, i, r);
}),
(t.prototype._eventFromRejectionWithPrimitive = function (t) {
return {
exception: {
values: [
{
type: "UnhandledRejection",
value: "Non-Error promise rejection captured with value: " + String(t),
},
],
},
};
}),
(t.prototype._enhanceEventWithInitialFrame = function (t, n, i, r) {
((t.exception = t.exception || {}),
(t.exception.values = t.exception.values || []),
(t.exception.values[0] = t.exception.values[0] || {}),
(t.exception.values[0].stacktrace = t.exception.values[0].stacktrace || {}),
(t.exception.values[0].stacktrace.frames = t.exception.values[0].stacktrace.frames || []));
var e = isNaN(parseInt(r, 10)) ? void 0 : r,
u = isNaN(parseInt(i, 10)) ? void 0 : i,
s = g(n) && n.length > 0 ? n : (0, S.$N)();
return (
0 === t.exception.values[0].stacktrace.frames.length &&
t.exception.values[0].stacktrace.frames.push({
colno: e,
filename: s,
function: "?",
in_app: !0,
lineno: u,
}),
t
);
}),
(t.id = "GlobalHandlers"),
t
);
})(),
Hn = (function () {
function t(n) {
(void 0 === n && (n = {}),
(this.name = t.id),
(this._key = n.key || "cause"),
(this._limit = n.limit || 5));
}
return (
(t.prototype.setupOnce = function () {
T(function (n, i) {
var r = ht().getIntegration(t);
return r ? r._handler(n, i) : n;
});
}),
(t.prototype._handler = function (t, n) {
if (!(t.exception && t.exception.values && n && $(n.originalException, Error))) return t;
var i = this._walkErrorTree(n.originalException, this._key);
return ((t.exception.values = f(i, t.exception.values)), t);
}),
(t.prototype._walkErrorTree = function (t, n, i) {
if ((void 0 === i && (i = []), !$(t[n], Error) || i.length + 1 >= this._limit)) return i;
var r = Qt(Yt(t[n]));
return this._walkErrorTree(t[n], n, f([r], i));
}),
(t.id = "LinkedErrors"),
t
);
})(),
Wn = (0, S.VZ)(),
Vn = (function () {
function t() {
this.name = t.id;
}
return (
(t.prototype.setupOnce = function () {
T(function (n) {
var i, r, e;
if (ht().getIntegration(t)) {
if (!Wn.navigator && !Wn.location && !Wn.document) return n;
var u =
(null === (i = n.request) || void 0 === i ? void 0 : i.url) ||
(null === (r = Wn.location) || void 0 === r ? void 0 : r.href),
s = (Wn.document || {}).referrer,
o = (Wn.navigator || {}).userAgent,
_ = h(
h(
h({}, null === (e = n.request) || void 0 === e ? void 0 : e.headers),
s && { Referer: s },
),
o && { "User-Agent": o },
),
a = h(h({}, u && { url: u }), { headers: _ });
return h(h({}, n), { request: a });
}
return n;
});
}),
(t.id = "UserAgent"),
t
);
})(),
Kn = [new Ln(), new Bn(), new Fn(), new Pn(), new Gn(), new Hn(), new Vn()];
function Yn(t) {
if (
(void 0 === t && (t = {}),
void 0 === t.defaultIntegrations && (t.defaultIntegrations = Kn),
void 0 === t.release)
) {
var n = (0, S.VZ)();
n.SENTRY_RELEASE && n.SENTRY_RELEASE.id && (t.release = n.SENTRY_RELEASE.id);
}
(void 0 === t.autoSessionTracking && (t.autoSessionTracking = !1),
(function (t, n) {
!0 === n.debug && M.enable();
var i = ht(),
r = new t(n);
i.bindClient(r);
})(Mn, t),
t.autoSessionTracking &&
(function () {
var t = (0, S.VZ)(),
n = ht(),
i = "complete" === document.readyState,
r = !1,
e = function () {
r && i && n.endSession();
},
u = function () {
((i = !0), e(), t.removeEventListener("load", u));
};
(n.startSession(), i || t.addEventListener("load", u));
try {
var s = new PerformanceObserver(function (t, n) {
t.getEntries().forEach(function (t) {
"first-contentful-paint" === t.name && t.startTime < o && (n.disconnect(), (r = !0), e());
});
}),
o = "hidden" === document.visibilityState ? 0 : 1 / 0;
(document.addEventListener(
"visibilitychange",
function (t) {
o = Math.min(o, t.timeStamp);
},
{ once: !0 },
),
s.observe({ type: "paint", buffered: !0 }));
} catch (t) {
((r = !0), e());
}
})());
}
function Xn(t) {
(void 0 === t && (t = {}), t.eventId || (t.eventId = ht().lastEventId()));
var n = ht().getClient();
n && n.showReportDialog(t);
}
function Jn() {
return ht().lastEventId();
}
function Zn() {}
function Qn(t) {
t();
}
function ti(t) {
var n = ht().getClient();
return n ? n.flush(t) : z.reject(!1);
}
function ni(t) {
var n = ht().getClient();
return n ? n.close(t) : z.reject(!1);
}
function ii(t) {
return dn(t)();
}
var ri = {},
ei = (0, S.VZ)();
ei.Sentry && ei.Sentry.Integrations && (ri = ei.Sentry.Integrations);
var ui = h(h(h({}, ri), r), e);
};