2034 lines
73 KiB
JavaScript
2034 lines
73 KiB
JavaScript
// H2Fixed
|
|
|
|
!function(e) {
|
|
if ("object" == typeof exports && "undefined" != typeof module)
|
|
module.exports = e();
|
|
else if ("function" == typeof define && define.amd)
|
|
define([], e);
|
|
else {
|
|
("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).bugsnag = e()
|
|
}
|
|
}(function() {
|
|
var t = function(e, t, n) {
|
|
for (var r = n, i = 0, o = e.length; i < o; i++)
|
|
r = t(r, e[i], i, e);
|
|
return r
|
|
}
|
|
, o = !{
|
|
toString: null
|
|
}.propertyIsEnumerable("toString")
|
|
, a = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"]
|
|
, n = function(e) {
|
|
return e < 10 ? "0" + e : e
|
|
}
|
|
, e = function(e, i) {
|
|
return t(e, function(e, t, n, r) {
|
|
return e.concat(i(t, n, r))
|
|
}, [])
|
|
}
|
|
, r = t
|
|
, i = function(e, i) {
|
|
return t(e, function(e, t, n, r) {
|
|
return i(t, n, r) ? e.concat(t) : e
|
|
}, [])
|
|
}
|
|
, s = function(e, i) {
|
|
return t(e, function(e, t, n, r) {
|
|
return !0 === e || t === i
|
|
}, !1)
|
|
}
|
|
, u = function(e) {
|
|
return "[object Array]" === Object.prototype.toString.call(e)
|
|
}
|
|
, c = function() {
|
|
var e = new Date;
|
|
return e.getUTCFullYear() + "-" + n(e.getUTCMonth() + 1) + "-" + n(e.getUTCDate()) + "T" + n(e.getUTCHours()) + ":" + n(e.getUTCMinutes()) + ":" + n(e.getUTCSeconds()) + "." + (e.getUTCMilliseconds() / 1e3).toFixed(3).slice(2, 5) + "Z"
|
|
}
|
|
, f = {
|
|
intRange: function(t, n) {
|
|
return void 0 === t && (t = 1),
|
|
void 0 === n && (n = Infinity),
|
|
function(e) {
|
|
return "number" == typeof e && parseInt("" + e, 10) === e && t <= e && e <= n
|
|
}
|
|
},
|
|
stringWithLength: function(e) {
|
|
return "string" == typeof e && !!e.length
|
|
}
|
|
}
|
|
, l = {}
|
|
, d = i
|
|
, g = r
|
|
, p = function(e) {
|
|
var t, n = [];
|
|
for (t in e)
|
|
Object.prototype.hasOwnProperty.call(e, t) && n.push(t);
|
|
if (!o)
|
|
return n;
|
|
for (var r = 0, i = a.length; r < i; r++)
|
|
Object.prototype.hasOwnProperty.call(e, a[r]) && n.push(a[r]);
|
|
return n
|
|
}
|
|
, h = u
|
|
, v = s
|
|
, m = f.intRange
|
|
, y = f.stringWithLength;
|
|
function b() {
|
|
return (b = Object.assign || function(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = arguments[t];
|
|
for (var r in n)
|
|
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
|
|
}
|
|
return e
|
|
}
|
|
).apply(this, arguments)
|
|
}
|
|
l.schema = {
|
|
apiKey: {
|
|
defaultValue: function() {
|
|
return null
|
|
},
|
|
message: "is required",
|
|
validate: y
|
|
},
|
|
appVersion: {
|
|
defaultValue: function() {
|
|
return null
|
|
},
|
|
message: "should be a string",
|
|
validate: function(e) {
|
|
return null === e || y(e)
|
|
}
|
|
},
|
|
appType: {
|
|
defaultValue: function() {
|
|
return null
|
|
},
|
|
message: "should be a string",
|
|
validate: function(e) {
|
|
return null === e || y(e)
|
|
}
|
|
},
|
|
autoNotify: {
|
|
defaultValue: function() {
|
|
return !0
|
|
},
|
|
message: "should be true|false",
|
|
validate: function(e) {
|
|
return !0 === e || !1 === e
|
|
}
|
|
},
|
|
beforeSend: {
|
|
defaultValue: function() {
|
|
return []
|
|
},
|
|
message: "should be a function or array of functions",
|
|
validate: function(e) {
|
|
return "function" == typeof e || h(e) && d(e, function(e) {
|
|
return "function" == typeof e
|
|
}).length === e.length
|
|
}
|
|
},
|
|
endpoints: {
|
|
defaultValue: function() {
|
|
return {
|
|
notify: "https://notify.bugsnag.com",
|
|
sessions: "https://sessions.bugsnag.com"
|
|
}
|
|
},
|
|
message: "should be an object containing endpoint URLs { notify, sessions }. sessions is optional if autoCaptureSessions=false",
|
|
validate: function(e, t) {
|
|
return e && "object" == typeof e && y(e.notify) && (!1 === t.autoCaptureSessions || y(e.sessions)) && 0 === d(p(e), function(e) {
|
|
return !v(["notify", "sessions"], e)
|
|
}).length
|
|
}
|
|
},
|
|
autoCaptureSessions: {
|
|
defaultValue: function(e, t) {
|
|
return t.endpoints === undefined || !!t.endpoints && !!t.endpoints.sessions
|
|
},
|
|
message: "should be true|false",
|
|
validate: function(e) {
|
|
return !0 === e || !1 === e
|
|
}
|
|
},
|
|
notifyReleaseStages: {
|
|
defaultValue: function() {
|
|
return null
|
|
},
|
|
message: "should be an array of strings",
|
|
validate: function(e) {
|
|
return null === e || h(e) && d(e, function(e) {
|
|
return "string" == typeof e
|
|
}).length === e.length
|
|
}
|
|
},
|
|
releaseStage: {
|
|
defaultValue: function() {
|
|
return "production"
|
|
},
|
|
message: "should be a string",
|
|
validate: function(e) {
|
|
return "string" == typeof e && e.length
|
|
}
|
|
},
|
|
maxBreadcrumbs: {
|
|
defaultValue: function() {
|
|
return 20
|
|
},
|
|
message: "should be a number ≤40",
|
|
validate: function(e) {
|
|
return m(0, 40)(e)
|
|
}
|
|
},
|
|
autoBreadcrumbs: {
|
|
defaultValue: function() {
|
|
return !0
|
|
},
|
|
message: "should be true|false",
|
|
validate: function(e) {
|
|
return "boolean" == typeof e
|
|
}
|
|
},
|
|
user: {
|
|
defaultValue: function() {
|
|
return null
|
|
},
|
|
message: "(object) user should be an object",
|
|
validate: function(e) {
|
|
return "object" == typeof e
|
|
}
|
|
},
|
|
metaData: {
|
|
defaultValue: function() {
|
|
return null
|
|
},
|
|
message: "should be an object",
|
|
validate: function(e) {
|
|
return "object" == typeof e
|
|
}
|
|
},
|
|
logger: {
|
|
defaultValue: function() {
|
|
return undefined
|
|
},
|
|
message: "should be null or an object with methods { debug, info, warn, error }",
|
|
validate: function(n) {
|
|
return !n || n && g(["debug", "info", "warn", "error"], function(e, t) {
|
|
return e && "function" == typeof n[t]
|
|
}, !0)
|
|
}
|
|
},
|
|
filters: {
|
|
defaultValue: function() {
|
|
return ["password"]
|
|
},
|
|
message: "should be an array of strings|regexes",
|
|
validate: function(e) {
|
|
return h(e) && e.length === d(e, function(e) {
|
|
return "string" == typeof e || e && "function" == typeof e.test
|
|
}).length
|
|
}
|
|
}
|
|
},
|
|
l.mergeDefaults = function(n, r) {
|
|
if (!n || !r)
|
|
throw new Error("opts and schema objects are required");
|
|
return g(p(r), function(e, t) {
|
|
return e[t] = n[t] !== undefined ? n[t] : r[t].defaultValue(n[t], n),
|
|
e
|
|
}, {})
|
|
}
|
|
,
|
|
l.validate = function(n, r) {
|
|
if (!n || !r)
|
|
throw new Error("opts and schema objects are required");
|
|
var e = g(p(r), function(e, t) {
|
|
return r[t].validate(n[t], n) ? e : e.concat({
|
|
key: t,
|
|
message: r[t].message,
|
|
value: n[t]
|
|
})
|
|
}, []);
|
|
return {
|
|
valid: !e.length,
|
|
errors: e
|
|
}
|
|
}
|
|
;
|
|
var S = l.schema
|
|
, w = e
|
|
, O = {
|
|
releaseStage: {
|
|
defaultValue: function() {
|
|
return /^localhost(:\d+)?$/.test(window.location.host) ? "development" : "production"
|
|
},
|
|
message: "should be set",
|
|
validate: f.stringWithLength
|
|
},
|
|
logger: b({}, S.logger, {
|
|
defaultValue: function() {
|
|
return "undefined" != typeof console && "function" == typeof console.debug ? _() : undefined
|
|
}
|
|
})
|
|
}
|
|
, _ = function() {
|
|
var n = {}
|
|
, r = console.log;
|
|
return w(["debug", "info", "warn", "error"], function(e) {
|
|
var t = console[e];
|
|
n[e] = "function" == typeof t ? t.bind(console, "[bugsnag]") : r.bind(console, "[bugsnag]")
|
|
}),
|
|
n
|
|
}
|
|
, E = c
|
|
, j = function() {
|
|
function e(e, t, n, r) {
|
|
void 0 === e && (e = "[anonymous]"),
|
|
void 0 === t && (t = {}),
|
|
void 0 === n && (n = "manual"),
|
|
void 0 === r && (r = E()),
|
|
this.type = n,
|
|
this.name = e,
|
|
this.metaData = t,
|
|
this.timestamp = r
|
|
}
|
|
return e.prototype.toJSON = function() {
|
|
return {
|
|
type: this.type,
|
|
name: this.name,
|
|
timestamp: this.timestamp,
|
|
metaData: this.metaData
|
|
}
|
|
}
|
|
,
|
|
e
|
|
}()
|
|
, N = function(e) {
|
|
return e.app && "string" == typeof e.app.releaseStage ? e.app.releaseStage : e.config.releaseStage
|
|
};
|
|
var k = function Ut(e) {
|
|
switch (Object.prototype.toString.call(e)) {
|
|
case "[object Error]":
|
|
case "[object Exception]":
|
|
case "[object DOMException]":
|
|
return !0;
|
|
default:
|
|
return e instanceof Error
|
|
}
|
|
}
|
|
, B = function(e, t) {
|
|
return e.isIgnored() || !1 === t
|
|
}
|
|
, R = {};
|
|
!function(e, t) {
|
|
"use strict";
|
|
"object" == typeof R ? R = t() : e.StackFrame = t()
|
|
}(this, function() {
|
|
"use strict";
|
|
function n(e) {
|
|
return !isNaN(parseFloat(e)) && isFinite(e)
|
|
}
|
|
function r(e) {
|
|
return e.charAt(0).toUpperCase() + e.substring(1)
|
|
}
|
|
function e(e) {
|
|
return function() {
|
|
return this[e]
|
|
}
|
|
}
|
|
var t = ["isConstructor", "isEval", "isNative", "isToplevel"]
|
|
, i = ["columnNumber", "lineNumber"]
|
|
, o = ["fileName", "functionName", "source"]
|
|
, a = t.concat(i, o, ["args"]);
|
|
function s(e) {
|
|
if (e instanceof Object)
|
|
for (var t = 0; t < a.length; t++)
|
|
e.hasOwnProperty(a[t]) && e[a[t]] !== undefined && this["set" + r(a[t])](e[a[t]])
|
|
}
|
|
s.prototype = {
|
|
getArgs: function() {
|
|
return this.args
|
|
},
|
|
setArgs: function(e) {
|
|
if ("[object Array]" !== Object.prototype.toString.call(e))
|
|
throw new TypeError("Args must be an Array");
|
|
this.args = e
|
|
},
|
|
getEvalOrigin: function() {
|
|
return this.evalOrigin
|
|
},
|
|
setEvalOrigin: function(e) {
|
|
if (e instanceof s)
|
|
this.evalOrigin = e;
|
|
else {
|
|
if (!(e instanceof Object))
|
|
throw new TypeError("Eval Origin must be an Object or StackFrame");
|
|
this.evalOrigin = new s(e)
|
|
}
|
|
},
|
|
toString: function() {
|
|
return (this.getFunctionName() || "{anonymous}") + ("(" + (this.getArgs() || []).join(",") + ")") + (this.getFileName() ? "@" + this.getFileName() : "") + (n(this.getLineNumber()) ? ":" + this.getLineNumber() : "") + (n(this.getColumnNumber()) ? ":" + this.getColumnNumber() : "")
|
|
}
|
|
};
|
|
for (var u = 0; u < t.length; u++)
|
|
s.prototype["get" + r(t[u])] = e(t[u]),
|
|
s.prototype["set" + r(t[u])] = function(t) {
|
|
return function(e) {
|
|
this[t] = Boolean(e)
|
|
}
|
|
}(t[u]);
|
|
for (var c = 0; c < i.length; c++)
|
|
s.prototype["get" + r(i[c])] = e(i[c]),
|
|
s.prototype["set" + r(i[c])] = function(t) {
|
|
return function(e) {
|
|
if (!n(e))
|
|
throw new TypeError(t + " must be a Number");
|
|
this[t] = Number(e)
|
|
}
|
|
}(i[c]);
|
|
for (var f = 0; f < o.length; f++)
|
|
s.prototype["get" + r(o[f])] = e(o[f]),
|
|
s.prototype["set" + r(o[f])] = function(t) {
|
|
return function(e) {
|
|
this[t] = String(e)
|
|
}
|
|
}(o[f]);
|
|
return s
|
|
});
|
|
var L = {};
|
|
!function(e, t) {
|
|
"use strict";
|
|
"object" == typeof L ? L = t(R) : e.ErrorStackParser = t(e.StackFrame)
|
|
}(this, function(s) {
|
|
"use strict";
|
|
var t = /(^|@)\S+\:\d+/
|
|
, n = /^\s*at .*(\S+\:\d+|\(native\))/m
|
|
, r = /^(eval@)?(\[native code\])?$/;
|
|
return {
|
|
parse: function(e) {
|
|
if ("undefined" != typeof e.stacktrace || "undefined" != typeof e["opera#sourceloc"])
|
|
return this.parseOpera(e);
|
|
if (e.stack && e.stack.match(n))
|
|
return this.parseV8OrIE(e);
|
|
if (e.stack)
|
|
return this.parseFFOrSafari(e);
|
|
throw new Error("Cannot parse given Error object")
|
|
},
|
|
extractLocation: function(e) {
|
|
if (-1 === e.indexOf(":"))
|
|
return [e];
|
|
var t = /(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(e.replace(/[\(\)]/g, ""));
|
|
return [t[1], t[2] || undefined, t[3] || undefined]
|
|
},
|
|
parseV8OrIE: function(e) {
|
|
return e.stack.split("\n").filter(function(e) {
|
|
return !!e.match(n)
|
|
}, this).map(function(e) {
|
|
-1 < e.indexOf("(eval ") && (e = e.replace(/eval code/g, "eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g, ""));
|
|
var t = e.replace(/^\s+/, "").replace(/\(eval code/g, "(")
|
|
, n = t.match(/ (\((.+):(\d+):(\d+)\)$)/)
|
|
, r = (t = n ? t.replace(n[0], "") : t).split(/\s+/).slice(1)
|
|
, i = this.extractLocation(n ? n[1] : r.pop())
|
|
, o = r.join(" ") || undefined
|
|
, a = -1 < ["eval", "<anonymous>"].indexOf(i[0]) ? undefined : i[0];
|
|
return new s({
|
|
functionName: o,
|
|
fileName: a,
|
|
lineNumber: i[1],
|
|
columnNumber: i[2],
|
|
source: e
|
|
})
|
|
}, this)
|
|
},
|
|
parseFFOrSafari: function(e) {
|
|
return e.stack.split("\n").filter(function(e) {
|
|
return !e.match(r)
|
|
}, this).map(function(e) {
|
|
if (-1 < e.indexOf(" > eval") && (e = e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g, ":$1")),
|
|
-1 === e.indexOf("@") && -1 === e.indexOf(":"))
|
|
return new s({
|
|
functionName: e
|
|
});
|
|
var t = /((.*".+"[^@]*)?[^@]*)(?:@)/
|
|
, n = e.match(t)
|
|
, r = n && n[1] ? n[1] : undefined
|
|
, i = this.extractLocation(e.replace(t, ""));
|
|
return new s({
|
|
functionName: r,
|
|
fileName: i[0],
|
|
lineNumber: i[1],
|
|
columnNumber: i[2],
|
|
source: e
|
|
})
|
|
}, this)
|
|
},
|
|
parseOpera: function(e) {
|
|
return !e.stacktrace || -1 < e.message.indexOf("\n") && e.message.split("\n").length > e.stacktrace.split("\n").length ? this.parseOpera9(e) : e.stack ? this.parseOpera11(e) : this.parseOpera10(e)
|
|
},
|
|
parseOpera9: function(e) {
|
|
for (var t = /Line (\d+).*script (?:in )?(\S+)/i, n = e.message.split("\n"), r = [], i = 2, o = n.length; i < o; i += 2) {
|
|
var a = t.exec(n[i]);
|
|
a && r.push(new s({
|
|
fileName: a[2],
|
|
lineNumber: a[1],
|
|
source: n[i]
|
|
}))
|
|
}
|
|
return r
|
|
},
|
|
parseOpera10: function(e) {
|
|
for (var t = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, n = e.stacktrace.split("\n"), r = [], i = 0, o = n.length; i < o; i += 2) {
|
|
var a = t.exec(n[i]);
|
|
a && r.push(new s({
|
|
functionName: a[3] || undefined,
|
|
fileName: a[2],
|
|
lineNumber: a[1],
|
|
source: n[i]
|
|
}))
|
|
}
|
|
return r
|
|
},
|
|
parseOpera11: function(e) {
|
|
return e.stack.split("\n").filter(function(e) {
|
|
return !!e.match(t) && !e.match(/^Error created at/)
|
|
}, this).map(function(e) {
|
|
var t, n = e.split("@"), r = this.extractLocation(n.pop()), i = n.shift() || "", o = i.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^\)]*\)/g, "") || undefined;
|
|
i.match(/\(([^\)]*)\)/) && (t = i.replace(/^[^\(]+\(([^\)]*)\)$/, "$1"));
|
|
var a = t === undefined || "[arguments not available]" === t ? undefined : t.split(",");
|
|
return new s({
|
|
functionName: o,
|
|
args: a,
|
|
fileName: r[0],
|
|
lineNumber: r[1],
|
|
columnNumber: r[2],
|
|
source: e
|
|
})
|
|
}, this)
|
|
}
|
|
}
|
|
});
|
|
var D = L
|
|
, x = function(e) {
|
|
return !(!e || !e.stack && !e.stacktrace && !e["opera#sourceloc"] || "string" != typeof (e.stack || e.stacktrace || e["opera#sourceloc"]) || e.stack === e.name + ": " + e.message)
|
|
}
|
|
, T = {};
|
|
function q() {
|
|
return (q = Object.assign || function(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = arguments[t];
|
|
for (var r in n)
|
|
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
|
|
}
|
|
return e
|
|
}
|
|
).apply(this, arguments)
|
|
}
|
|
!function(e, t) {
|
|
"use strict";
|
|
"object" == typeof T ? T = t(R) : e.StackGenerator = t(e.StackFrame)
|
|
}(this, function(s) {
|
|
return {
|
|
backtrace: function(e) {
|
|
var t = []
|
|
, n = 10;
|
|
"object" == typeof e && "number" == typeof e.maxStackSize && (n = e.maxStackSize);
|
|
for (var r = arguments.callee; r && t.length < n && r.arguments; ) {
|
|
for (var i = new Array(r.arguments.length), o = 0; o < i.length; ++o)
|
|
i[o] = r.arguments[o];
|
|
/function(?:\s+([\w$]+))+\s*\(/.test(r.toString()) ? t.push(new s({
|
|
functionName: RegExp.$1 || undefined,
|
|
args: i
|
|
})) : t.push(new s({
|
|
args: i
|
|
}));
|
|
try {
|
|
r = r.caller
|
|
} catch (a) {
|
|
break
|
|
}
|
|
}
|
|
return t
|
|
}
|
|
}
|
|
});
|
|
var C = r
|
|
, M = i
|
|
, P = function() {
|
|
function e(e, t, n, r, i) {
|
|
void 0 === n && (n = []),
|
|
void 0 === r && (r = H()),
|
|
this.__isBugsnagReport = !0,
|
|
this._ignored = !1,
|
|
this._handledState = r,
|
|
this.app = undefined,
|
|
this.apiKey = undefined,
|
|
this.breadcrumbs = [],
|
|
this.context = undefined,
|
|
this.device = undefined,
|
|
this.errorClass = I(e, "[no error class]"),
|
|
this.errorMessage = I(t, "[no error message]"),
|
|
this.groupingHash = undefined,
|
|
this.metaData = {},
|
|
this.request = undefined,
|
|
this.severity = this._handledState.severity,
|
|
this.stacktrace = C(n, function(e, t) {
|
|
var n = A(t);
|
|
try {
|
|
return "{}" === JSON.stringify(n) ? e : e.concat(n)
|
|
} catch (r) {
|
|
return e
|
|
}
|
|
}, []),
|
|
this.user = undefined,
|
|
this.session = undefined,
|
|
this.originalError = i
|
|
}
|
|
var t = e.prototype;
|
|
return t.ignore = function() {
|
|
this._ignored = !0
|
|
}
|
|
,
|
|
t.isIgnored = function() {
|
|
return this._ignored
|
|
}
|
|
,
|
|
t.updateMetaData = function(e) {
|
|
var t, n;
|
|
return e ? null === (arguments.length <= 1 ? undefined : arguments[1]) ? this.removeMetaData(e) : null === (arguments.length <= 2 ? undefined : arguments[2]) ? this.removeMetaData(e, arguments.length <= 1 ? undefined : arguments[1], arguments.length <= 2 ? undefined : arguments[2]) : ("object" == typeof (arguments.length <= 1 ? undefined : arguments[1]) && (n = arguments.length <= 1 ? undefined : arguments[1]),
|
|
"string" == typeof (arguments.length <= 1 ? undefined : arguments[1]) && ((t = {})[arguments.length <= 1 ? undefined : arguments[1]] = arguments.length <= 2 ? undefined : arguments[2],
|
|
n = t),
|
|
n && (this.metaData[e] || (this.metaData[e] = {}),
|
|
this.metaData[e] = q({}, this.metaData[e], n)),
|
|
this) : this
|
|
}
|
|
,
|
|
t.removeMetaData = function(e, t) {
|
|
return "string" != typeof e || (t ? this.metaData[e] && delete this.metaData[e][t] : delete this.metaData[e]),
|
|
this
|
|
}
|
|
,
|
|
t.toJSON = function() {
|
|
return {
|
|
payloadVersion: "4",
|
|
exceptions: [{
|
|
errorClass: this.errorClass,
|
|
message: this.errorMessage,
|
|
stacktrace: this.stacktrace,
|
|
type: "browserjs"
|
|
}],
|
|
severity: this.severity,
|
|
unhandled: this._handledState.unhandled,
|
|
severityReason: this._handledState.severityReason,
|
|
app: this.app,
|
|
device: this.device,
|
|
breadcrumbs: this.breadcrumbs,
|
|
context: this.context,
|
|
user: this.user,
|
|
metaData: this.metaData,
|
|
groupingHash: this.groupingHash,
|
|
request: this.request,
|
|
session: this.session
|
|
}
|
|
}
|
|
,
|
|
e
|
|
}()
|
|
, A = function(e) {
|
|
var t = {
|
|
file: e.fileName,
|
|
method: V(e.functionName),
|
|
lineNumber: e.lineNumber,
|
|
columnNumber: e.columnNumber,
|
|
code: undefined,
|
|
inProject: undefined
|
|
};
|
|
return -1 < t.lineNumber && !t.file && !t.method && (t.file = "global code"),
|
|
t
|
|
}
|
|
, V = function(e) {
|
|
return /^global code$/i.test(e) ? "global code" : e
|
|
}
|
|
, H = function() {
|
|
return {
|
|
unhandled: !1,
|
|
severity: "warning",
|
|
severityReason: {
|
|
type: "handledException"
|
|
}
|
|
}
|
|
}
|
|
, I = function(e, t) {
|
|
return "string" == typeof e && e ? e : t
|
|
};
|
|
P.getStacktrace = function(e, t, n) {
|
|
if (void 0 === t && (t = 0),
|
|
void 0 === n && (n = 0),
|
|
x(e))
|
|
return D.parse(e).slice(t);
|
|
try {
|
|
throw e
|
|
} catch (r) {
|
|
if (x(r))
|
|
return D.parse(e).slice(1 + n);
|
|
try {
|
|
return M(T.backtrace(), function(e) {
|
|
return -1 === (e.functionName || "").indexOf("StackGenerator$$")
|
|
}).slice(1 + n)
|
|
} catch (r) {
|
|
return []
|
|
}
|
|
}
|
|
}
|
|
,
|
|
P.ensureReport = function(e, t, n) {
|
|
if (void 0 === t && (t = 0),
|
|
void 0 === n && (n = 0),
|
|
e.__isBugsnagReport)
|
|
return e;
|
|
try {
|
|
var r = P.getStacktrace(e, t, 1 + n);
|
|
return new P(e.name,e.message,r,undefined,e)
|
|
} catch (i) {
|
|
return new P(e.name,e.message,[],undefined,e)
|
|
}
|
|
}
|
|
;
|
|
var U = P
|
|
, $ = function(e, t) {
|
|
var n = "000000000" + e;
|
|
return n.substr(n.length - t)
|
|
}
|
|
, F = "object" == typeof window ? window : self
|
|
, K = 0;
|
|
for (var X in F)
|
|
Object.hasOwnProperty.call(F, X) && K++;
|
|
var J = navigator.mimeTypes ? navigator.mimeTypes.length : 0
|
|
, W = $((J + navigator.userAgent.length).toString(36) + K.toString(36), 4)
|
|
, z = function() {
|
|
return W
|
|
}
|
|
, G = 0
|
|
, Y = 4
|
|
, Z = 36
|
|
, Q = Math.pow(Z, Y);
|
|
function ee() {
|
|
return $((Math.random() * Q << 0).toString(Z), Y)
|
|
}
|
|
function te() {
|
|
return "c" + (new Date).getTime().toString(Z) + $(function e() {
|
|
return G = G < Q ? G : 0,
|
|
++G - 1
|
|
}().toString(Z), Y) + z() + (ee() + ee())
|
|
}
|
|
te.fingerprint = z;
|
|
var ne = te
|
|
, re = c
|
|
, ie = function() {
|
|
function e() {
|
|
this.id = ne(),
|
|
this.startedAt = re(),
|
|
this._handled = 0,
|
|
this._unhandled = 0
|
|
}
|
|
var t = e.prototype;
|
|
return t.toJSON = function() {
|
|
return {
|
|
id: this.id,
|
|
startedAt: this.startedAt,
|
|
events: {
|
|
handled: this._handled,
|
|
unhandled: this._unhandled
|
|
}
|
|
}
|
|
}
|
|
,
|
|
t.trackError = function(e) {
|
|
this[e._handledState.unhandled ? "_unhandled" : "_handled"] += 1
|
|
}
|
|
,
|
|
e
|
|
}();
|
|
function oe() {
|
|
return (oe = Object.assign || function(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = arguments[t];
|
|
for (var r in n)
|
|
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
|
|
}
|
|
return e
|
|
}
|
|
).apply(this, arguments)
|
|
}
|
|
var ae = e
|
|
, se = s
|
|
, ue = u
|
|
, ce = function() {
|
|
function r(e) {
|
|
if (!(e && e.name && e.version && e.url))
|
|
throw new Error("`notifier` argument is required");
|
|
this.notifier = e,
|
|
this._configured = !1,
|
|
this._opts = {},
|
|
this.config = {},
|
|
this._delivery = {
|
|
sendSession: function() {},
|
|
sendReport: function() {}
|
|
},
|
|
this._logger = {
|
|
debug: function() {},
|
|
info: function() {},
|
|
warn: function() {},
|
|
error: function() {}
|
|
},
|
|
this._plugins = {},
|
|
this._session = null,
|
|
this.breadcrumbs = [],
|
|
this.app = {},
|
|
this.context = undefined,
|
|
this.device = undefined,
|
|
this.metaData = undefined,
|
|
this.request = undefined,
|
|
this.user = {},
|
|
this.BugsnagClient = r,
|
|
this.BugsnagReport = U,
|
|
this.BugsnagBreadcrumb = j,
|
|
this.BugsnagSession = ie;
|
|
var t = this
|
|
, n = this.notify;
|
|
this.notify = function() {
|
|
return n.apply(t, arguments)
|
|
}
|
|
}
|
|
var e = r.prototype;
|
|
return e.setOptions = function(e) {
|
|
this._opts = oe({}, this._opts, e)
|
|
}
|
|
,
|
|
e.configure = function(e) {
|
|
void 0 === e && (e = l.schema);
|
|
var t = l.mergeDefaults(this._opts, e)
|
|
, n = l.validate(t, e);
|
|
if (!0 == !n.valid)
|
|
throw new Error(de(n.errors));
|
|
return "function" == typeof t.beforeSend && (t.beforeSend = [t.beforeSend]),
|
|
t.appVersion && (this.app.version = t.appVersion),
|
|
t.appType && (this.app.type = t.appType),
|
|
t.metaData && (this.metaData = t.metaData),
|
|
t.user && (this.user = t.user),
|
|
t.logger && this.logger(t.logger),
|
|
this.config = oe({}, this.config, t),
|
|
this._configured = !0,
|
|
this
|
|
}
|
|
,
|
|
e.use = function(e) {
|
|
if (!this._configured)
|
|
throw new Error("client not configured");
|
|
e.configSchema && this.configure(e.configSchema);
|
|
for (var t = arguments.length, n = new Array(1 < t ? t - 1 : 0), r = 1; r < t; r++)
|
|
n[r - 1] = arguments[r];
|
|
var i = e.init.apply(e, [this].concat(n));
|
|
return e.name && (this._plugins["~" + e.name + "~"] = i),
|
|
this
|
|
}
|
|
,
|
|
e.getPlugin = function(e) {
|
|
return this._plugins["~" + e + "~"]
|
|
}
|
|
,
|
|
e.delivery = function(e) {
|
|
return this._delivery = e(this),
|
|
this
|
|
}
|
|
,
|
|
e.logger = function(e, t) {
|
|
return this._logger = e,
|
|
this
|
|
}
|
|
,
|
|
e.sessionDelegate = function(e) {
|
|
return this._sessionDelegate = e,
|
|
this
|
|
}
|
|
,
|
|
e.startSession = function() {
|
|
return this._sessionDelegate ? this._sessionDelegate.startSession(this) : (this._logger.warn("No session implementation is installed"),
|
|
this)
|
|
}
|
|
,
|
|
e.leaveBreadcrumb = function(e, t, n, r) {
|
|
if (!this._configured)
|
|
throw new Error("client not configured");
|
|
if (e = e || undefined,
|
|
n = "string" == typeof n ? n : undefined,
|
|
r = "string" == typeof r ? r : undefined,
|
|
t = "object" == typeof t && null !== t ? t : undefined,
|
|
"string" == typeof e || t) {
|
|
var i = new j(e,t,n,r);
|
|
return this.breadcrumbs.push(i),
|
|
this.breadcrumbs.length > this.config.maxBreadcrumbs && (this.breadcrumbs = this.breadcrumbs.slice(this.breadcrumbs.length - this.config.maxBreadcrumbs)),
|
|
this
|
|
}
|
|
}
|
|
,
|
|
e.notify = function(e, t, n) {
|
|
var r = this;
|
|
if (void 0 === t && (t = {}),
|
|
void 0 === n && (n = function() {}
|
|
),
|
|
!this._configured)
|
|
throw new Error("client not configured");
|
|
var i = N(this)
|
|
, o = fe(e, t, this._logger)
|
|
, a = o.err
|
|
, s = o.errorFramesToSkip
|
|
, u = o._opts;
|
|
u && (t = u),
|
|
"object" == typeof t && null !== t || (t = {});
|
|
var c = U.ensureReport(a, s, 2);
|
|
if (c.app = oe({}, {
|
|
releaseStage: i
|
|
}, c.app, this.app),
|
|
c.context = c.context || t.context || this.context || undefined,
|
|
c.device = oe({}, c.device, this.device, t.device),
|
|
c.request = oe({}, c.request, this.request, t.request),
|
|
c.user = oe({}, c.user, this.user, t.user),
|
|
c.metaData = oe({}, c.metaData, this.metaData, t.metaData),
|
|
c.breadcrumbs = this.breadcrumbs.slice(0),
|
|
this._session && (this._session.trackError(c),
|
|
c.session = this._session),
|
|
t.severity !== undefined && (c.severity = t.severity,
|
|
c._handledState.severityReason = {
|
|
type: "userSpecifiedSeverity"
|
|
}),
|
|
ue(this.config.notifyReleaseStages) && !se(this.config.notifyReleaseStages, i))
|
|
return this._logger.warn("Report not sent due to releaseStage/notifyReleaseStages configuration"),
|
|
n(null, c);
|
|
var f, l, d, g, p, h, v, m, y = c.severity, b = [].concat(t.beforeSend).concat(this.config.beforeSend), S = function(e) {
|
|
r._logger.error("Error occurred in beforeSend callback, continuing anyway…"),
|
|
r._logger.error(e)
|
|
};
|
|
v = c,
|
|
m = S,
|
|
l = function(e, n) {
|
|
if ("function" != typeof e)
|
|
return n(null, !1);
|
|
try {
|
|
if (2 !== e.length) {
|
|
var t = e(v);
|
|
return t && "function" == typeof t.then ? t.then(function(e) {
|
|
return setTimeout(function() {
|
|
return n(null, B(v, e))
|
|
}, 0)
|
|
}, function(e) {
|
|
setTimeout(function() {
|
|
return m(e),
|
|
n(null, !1)
|
|
})
|
|
}) : n(null, B(v, t))
|
|
}
|
|
e(v, function(e, t) {
|
|
if (e)
|
|
return m(e),
|
|
n(null, !1);
|
|
n(null, B(v, t))
|
|
})
|
|
} catch (r) {
|
|
m(r),
|
|
n(null, !1)
|
|
}
|
|
}
|
|
,
|
|
d = function(e, t) {
|
|
if (e && S(e),
|
|
t)
|
|
return r._logger.debug("Report not sent due to beforeSend callback"),
|
|
n(null, c);
|
|
r.config.autoBreadcrumbs && r.leaveBreadcrumb(c.errorClass, {
|
|
errorClass: c.errorClass,
|
|
errorMessage: c.errorMessage,
|
|
severity: c.severity
|
|
}, "error"),
|
|
y !== c.severity && (c._handledState.severityReason = {
|
|
type: "userCallbackSetSeverity"
|
|
}),
|
|
r._delivery.sendReport({
|
|
apiKey: c.apiKey || r.config.apiKey,
|
|
notifier: r.notifier,
|
|
events: [c]
|
|
}, function(e) {
|
|
return n(e, c)
|
|
})
|
|
}
|
|
,
|
|
g = (f = b).length,
|
|
p = 0,
|
|
(h = function() {
|
|
if (g <= p)
|
|
return d(null, !1);
|
|
l(f[p], function(e, t) {
|
|
return e ? d(e, !1) : !0 === t ? d(null, !0) : (p++,
|
|
void h())
|
|
})
|
|
}
|
|
)()
|
|
}
|
|
,
|
|
r
|
|
}()
|
|
, fe = function(e, t, n) {
|
|
var r, i, o = function(e) {
|
|
var t = ge(e);
|
|
return n.warn("Usage error. " + t),
|
|
new Error("Bugsnag usage error. " + t)
|
|
}, a = 0;
|
|
switch (typeof e) {
|
|
case "string":
|
|
"string" == typeof t ? (r = o("string/string"),
|
|
i = {
|
|
metaData: {
|
|
notifier: {
|
|
notifyArgs: [e, t]
|
|
}
|
|
}
|
|
}) : (r = new Error(String(e)),
|
|
a = 3);
|
|
break;
|
|
case "number":
|
|
case "boolean":
|
|
r = new Error(String(e));
|
|
break;
|
|
case "function":
|
|
r = o("function");
|
|
break;
|
|
case "object":
|
|
null !== e && (k(e) || e.__isBugsnagReport) ? r = e : null !== e && le(e) ? ((r = new Error(e.message || e.errorMessage)).name = e.name || e.errorClass,
|
|
a = 3) : r = o(null === e ? "null" : "unsupported object");
|
|
break;
|
|
default:
|
|
r = o("nothing")
|
|
}
|
|
return {
|
|
err: r,
|
|
errorFramesToSkip: a,
|
|
_opts: i
|
|
}
|
|
}
|
|
, le = function(e) {
|
|
return !("string" != typeof e.name && "string" != typeof e.errorClass || "string" != typeof e.message && "string" != typeof e.errorMessage)
|
|
}
|
|
, de = function(e) {
|
|
return "Bugsnag configuration error\n" + ae(e, function(e) {
|
|
return '"' + e.key + '" ' + e.message + " \n got " + pe(e.value)
|
|
}).join("\n\n")
|
|
}
|
|
, ge = function(e) {
|
|
return "notify() expected error/opts parameters, got " + e
|
|
}
|
|
, pe = function(e) {
|
|
return "object" == typeof e ? JSON.stringify(e) : String(e)
|
|
}
|
|
, he = ce
|
|
, ve = function(e, t, n, r) {
|
|
var i = r && r.filterKeys ? r.filterKeys : []
|
|
, o = r && r.filterPaths ? r.filterPaths : [];
|
|
return JSON.stringify(function a(e, h, v) {
|
|
var m = []
|
|
, y = 0;
|
|
return function b(e, t) {
|
|
function n() {
|
|
return t.length > be && ye < y
|
|
}
|
|
y++;
|
|
if (t.length > me)
|
|
return Se;
|
|
if (n())
|
|
return Se;
|
|
if (null === e || "object" != typeof e)
|
|
return e;
|
|
if (Oe(m, e))
|
|
return "[Circular]";
|
|
m.push(e);
|
|
if ("function" == typeof e.toJSON)
|
|
try {
|
|
y--;
|
|
var r = b(e.toJSON(), t);
|
|
return m.pop(),
|
|
r
|
|
} catch (g) {
|
|
return we(g)
|
|
}
|
|
var i = (o = e,
|
|
o instanceof Error || /^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(o)));
|
|
var o;
|
|
if (i) {
|
|
y--;
|
|
var a = b({
|
|
name: e.name,
|
|
message: e.message
|
|
}, t);
|
|
return m.pop(),
|
|
a
|
|
}
|
|
if (f = e,
|
|
"[object Array]" === Object.prototype.toString.call(f)) {
|
|
for (var s = [], u = 0, c = e.length; u < c; u++) {
|
|
if (n()) {
|
|
s.push(Se);
|
|
break
|
|
}
|
|
s.push(b(e[u], t.concat("[]")))
|
|
}
|
|
return m.pop(),
|
|
s
|
|
}
|
|
var f;
|
|
var l = {};
|
|
try {
|
|
for (var d in e)
|
|
if (Object.prototype.hasOwnProperty.call(e, d))
|
|
if (_e(v, t.join(".")) && Ee(h, d))
|
|
l[d] = "[Filtered]";
|
|
else {
|
|
if (n()) {
|
|
l[d] = Se;
|
|
break
|
|
}
|
|
l[d] = b(je(e, d), t.concat(d))
|
|
}
|
|
} catch (p) {}
|
|
m.pop();
|
|
return l
|
|
}(e, [])
|
|
}(e, i, o), t, n)
|
|
}
|
|
, me = 20
|
|
, ye = 25e3
|
|
, be = 8
|
|
, Se = "...";
|
|
function we(e) {
|
|
return "[Throws: " + (e ? e.message : "?") + "]"
|
|
}
|
|
function Oe(e, t) {
|
|
for (var n = 0, r = e.length; n < r; n++) {
|
|
if (e[n] === t)
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
function _e(e, t) {
|
|
for (var n = 0, r = e.length; n < r; n++)
|
|
if (0 === t.indexOf(e[n]))
|
|
return !0;
|
|
return !1
|
|
}
|
|
function Ee(e, t) {
|
|
for (var n = 0, r = e.length; n < r; n++) {
|
|
if ("string" == typeof e[n] && e[n] === t)
|
|
return !0;
|
|
if (e[n] && "function" == typeof e[n].test && e[n].test(t))
|
|
return !0
|
|
}
|
|
return !1
|
|
}
|
|
function je(e, t) {
|
|
try {
|
|
return e[t]
|
|
} catch (n) {
|
|
return we(n)
|
|
}
|
|
}
|
|
var Ne = {}
|
|
, ke = ["events.[].app", "events.[].metaData", "events.[].user", "events.[].breadcrumbs", "events.[].request", "events.[].device"]
|
|
, Be = ["device", "app", "user"];
|
|
Ne.report = function(e, t) {
|
|
var n = ve(e, null, null, {
|
|
filterPaths: ke,
|
|
filterKeys: t
|
|
});
|
|
if (1e6 < n.length && (delete e.events[0].metaData,
|
|
e.events[0].metaData = {
|
|
notifier: "WARNING!\nSerialized payload was " + n.length / 1e6 + "MB (limit = 1MB)\nmetaData was removed"
|
|
},
|
|
1e6 < (n = ve(e, null, null, {
|
|
filterPaths: ke,
|
|
filterKeys: t
|
|
})).length))
|
|
throw new Error("payload exceeded 1MB limit");
|
|
return n
|
|
}
|
|
,
|
|
Ne.session = function(e, t) {
|
|
var n = ve(e, null, null, {
|
|
filterPaths: Be,
|
|
filterKeys: t
|
|
});
|
|
if (1e6 < n.length)
|
|
throw new Error("payload exceeded 1MB limit");
|
|
return n
|
|
}
|
|
;
|
|
var Re, Le = c;
|
|
Re = function(i, o) {
|
|
return void 0 === o && (o = window),
|
|
{
|
|
sendReport: function(t, n) {
|
|
void 0 === n && (n = function() {}
|
|
);
|
|
var e = De(i.config, "notify", "4", o)
|
|
, r = new o.XDomainRequest;
|
|
r.onload = function() {
|
|
n(null)
|
|
}
|
|
,
|
|
r.open("POST", e),
|
|
setTimeout(function() {
|
|
try {
|
|
r.send(Ne.report(t, i.config.filters))
|
|
} catch (e) {
|
|
i._logger.error(e),
|
|
n(e)
|
|
}
|
|
}, 0)
|
|
},
|
|
sendSession: function(t, n) {
|
|
void 0 === n && (n = function() {}
|
|
);
|
|
var e = De(i.config, "sessions", "1", o)
|
|
, r = new o.XDomainRequest;
|
|
r.onload = function() {
|
|
n(null)
|
|
}
|
|
,
|
|
r.open("POST", e),
|
|
setTimeout(function() {
|
|
try {
|
|
r.send(Ne.session(t, i.config.filters))
|
|
} catch (e) {
|
|
i._logger.error(e),
|
|
n(e)
|
|
}
|
|
}, 0)
|
|
}
|
|
}
|
|
}
|
|
;
|
|
var De = function(e, t, n, r) {
|
|
return xe(e.endpoints[t], r.location.protocol) + "?apiKey=" + encodeURIComponent(e.apiKey) + "&payloadVersion=" + n + "&sentAt=" + encodeURIComponent(Le())
|
|
}
|
|
, xe = Re._matchPageProtocol = function(e, t) {
|
|
return "http:" === t ? e.replace(/^https:/, "http:") : e
|
|
}
|
|
, Te = c
|
|
, qe = function(o, a) {
|
|
return void 0 === a && (a = window),
|
|
{
|
|
sendReport: function(e, t) {
|
|
void 0 === t && (t = function() {}
|
|
);
|
|
try {
|
|
var n = o.config.endpoints.notify
|
|
, r = new a.XMLHttpRequest;
|
|
r.onreadystatechange = function() {
|
|
r.readyState === a.XMLHttpRequest.DONE && t(null)
|
|
}
|
|
,
|
|
r.open("POST", n),
|
|
r.setRequestHeader("Content-Type", "application/json"),
|
|
r.setRequestHeader("Bugsnag-Api-Key", e.apiKey || o.config.apiKey),
|
|
r.setRequestHeader("Bugsnag-Payload-Version", "4"),
|
|
r.setRequestHeader("Bugsnag-Sent-At", Te()),
|
|
r.send(Ne.report(e, o.config.filters))
|
|
} catch (i) {
|
|
o._logger.error(i)
|
|
}
|
|
},
|
|
sendSession: function(e, t) {
|
|
void 0 === t && (t = function() {}
|
|
);
|
|
try {
|
|
var n = o.config.endpoints.sessions
|
|
, r = new a.XMLHttpRequest;
|
|
r.onreadystatechange = function() {
|
|
r.readyState === a.XMLHttpRequest.DONE && t(null)
|
|
}
|
|
,
|
|
r.open("POST", n),
|
|
r.setRequestHeader("Content-Type", "application/json"),
|
|
r.setRequestHeader("Bugsnag-Api-Key", o.config.apiKey),
|
|
r.setRequestHeader("Bugsnag-Payload-Version", "1"),
|
|
r.setRequestHeader("Bugsnag-Sent-At", Te()),
|
|
r.send(Ne.session(e, o.config.filters))
|
|
} catch (i) {
|
|
o._logger.error(i)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
, Ce = {
|
|
init: function(e, t) {
|
|
void 0 === t && (t = window),
|
|
e.config.beforeSend.unshift(function(e) {
|
|
e.context || (e.context = t.location.pathname)
|
|
})
|
|
}
|
|
};
|
|
function Me() {
|
|
return (Me = Object.assign || function(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = arguments[t];
|
|
for (var r in n)
|
|
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
|
|
}
|
|
return e
|
|
}
|
|
).apply(this, arguments)
|
|
}
|
|
var Pe = c
|
|
, Ae = {
|
|
init: function(e, t) {
|
|
void 0 === t && (t = navigator);
|
|
var n = {
|
|
locale: t.browserLanguage || t.systemLanguage || t.userLanguage || t.language,
|
|
userAgent: t.userAgent
|
|
};
|
|
e.device = Me({}, n, e.device),
|
|
e.config.beforeSend.unshift(function(e) {
|
|
e.device = Me({}, e.device, {
|
|
time: Pe()
|
|
})
|
|
})
|
|
}
|
|
};
|
|
function Ve() {
|
|
return (Ve = Object.assign || function(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = arguments[t];
|
|
for (var r in n)
|
|
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
|
|
}
|
|
return e
|
|
}
|
|
).apply(this, arguments)
|
|
}
|
|
var He = {
|
|
init: function(e, t) {
|
|
void 0 === t && (t = window),
|
|
e.config.beforeSend.unshift(function(e) {
|
|
e.request && e.request.url || (e.request = Ve({}, e.request, {
|
|
url: t.location.href
|
|
}))
|
|
})
|
|
}
|
|
};
|
|
function Ie() {
|
|
return (Ie = Object.assign || function(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = arguments[t];
|
|
for (var r in n)
|
|
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
|
|
}
|
|
return e
|
|
}
|
|
).apply(this, arguments)
|
|
}
|
|
var Ue = u
|
|
, $e = s
|
|
, Fe = {
|
|
init: function(e) {
|
|
return e.sessionDelegate(Ke)
|
|
}
|
|
}
|
|
, Ke = {
|
|
startSession: function(e) {
|
|
var t = e;
|
|
t._session = new e.BugsnagSession;
|
|
var n = N(t);
|
|
return Ue(t.config.notifyReleaseStages) && !$e(t.config.notifyReleaseStages, n) ? t._logger.warn("Session not sent due to releaseStage/notifyReleaseStages configuration") : t.config.endpoints.sessions ? t._delivery.sendSession({
|
|
notifier: t.notifier,
|
|
device: t.device,
|
|
app: Ie({}, {
|
|
releaseStage: n
|
|
}, t.app),
|
|
sessions: [{
|
|
id: t._session.id,
|
|
startedAt: t._session.startedAt,
|
|
user: t.user
|
|
}]
|
|
}) : t._logger.warn("Session not sent due to missing endpoints.sessions configuration"),
|
|
t
|
|
}
|
|
};
|
|
function Xe() {
|
|
return (Xe = Object.assign || function(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = arguments[t];
|
|
for (var r in n)
|
|
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
|
|
}
|
|
return e
|
|
}
|
|
).apply(this, arguments)
|
|
}
|
|
var Je = {
|
|
init: function(e) {
|
|
e.config.collectUserIp || e.config.beforeSend.push(function(e) {
|
|
e.user && "undefined" == typeof e.user.id && delete e.user.id,
|
|
e.user = Xe({
|
|
id: "[NOT COLLECTED]"
|
|
}, e.user),
|
|
e.request = Xe({
|
|
clientIp: "[NOT COLLECTED]"
|
|
}, e.request)
|
|
})
|
|
},
|
|
configSchema: {
|
|
collectUserIp: {
|
|
defaultValue: function() {
|
|
return !0
|
|
},
|
|
message: "should be true|false",
|
|
validate: function(e) {
|
|
return !0 === e || !1 === e
|
|
}
|
|
}
|
|
}
|
|
}
|
|
, We = {}
|
|
, ze = e
|
|
, Ge = r
|
|
, Ye = i;
|
|
We.init = function(o) {
|
|
var e = /^dev(elopment)?$/.test(o.config.releaseStage)
|
|
, t = !1 === o.config.consoleBreadcrumbsEnabled
|
|
, n = (!1 === o.config.autoBreadcrumbs || e) && !0 !== o.config.consoleBreadcrumbsEnabled;
|
|
t || n || ze(Ze, function(r) {
|
|
var i = console[r];
|
|
console[r] = function() {
|
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
t[n] = arguments[n];
|
|
o.leaveBreadcrumb("Console output", Ge(t, function(e, t, n) {
|
|
var r = "[Unknown value]";
|
|
try {
|
|
r = String(t)
|
|
} catch (i) {}
|
|
if ("[object Object]" === r)
|
|
try {
|
|
r = JSON.stringify(t)
|
|
} catch (i) {}
|
|
return e["[" + n + "]"] = r,
|
|
e
|
|
}, {
|
|
severity: 0 === r.indexOf("group") ? "log" : r
|
|
}), "log"),
|
|
i.apply(console, t)
|
|
}
|
|
,
|
|
console[r]._restore = function() {
|
|
console[r] = i
|
|
}
|
|
})
|
|
}
|
|
,
|
|
We.configSchema = {
|
|
consoleBreadcrumbsEnabled: {
|
|
defaultValue: function() {
|
|
return undefined
|
|
},
|
|
validate: function(e) {
|
|
return !0 === e || !1 === e || e === undefined
|
|
},
|
|
message: "should be true|false"
|
|
}
|
|
};
|
|
var Ze = Ye(["log", "debug", "info", "warn", "error"], function(e) {
|
|
return "undefined" != typeof console && "function" == typeof console[e]
|
|
})
|
|
, Qe = e
|
|
, et = r
|
|
, tt = i
|
|
, nt = {
|
|
init: function(e, n, t) {
|
|
if (void 0 === n && (n = document),
|
|
void 0 === t && (t = window),
|
|
e.config.trackInlineScripts) {
|
|
var i = t.location.href
|
|
, o = ""
|
|
, a = !1
|
|
, s = function() {
|
|
return n.documentElement.outerHTML
|
|
};
|
|
o = s();
|
|
var r = n.onreadystatechange;
|
|
n.onreadystatechange = function() {
|
|
"interactive" === n.readyState && (o = s(),
|
|
a = !0);
|
|
try {
|
|
r.apply(this, arguments)
|
|
} catch (e) {}
|
|
}
|
|
;
|
|
var u = null
|
|
, c = function(e) {
|
|
u = e
|
|
}
|
|
, f = function() {
|
|
var e = n.currentScript || u;
|
|
if (!e && !a) {
|
|
var t = n.scripts || n.getElementsByTagName("script");
|
|
e = t[t.length - 1]
|
|
}
|
|
return e
|
|
};
|
|
e.config.beforeSend.unshift(function(e) {
|
|
e.stacktrace = tt(e.stacktrace, function(e) {
|
|
return !/__trace__$/.test(e.method)
|
|
});
|
|
var t = e.stacktrace[0];
|
|
if (!t || !t.file || t.file.replace(/#.*$/, "") === i.replace(/#.*$/, "")) {
|
|
var n = f();
|
|
if (n) {
|
|
var r = n.innerHTML;
|
|
e.updateMetaData("script", "content", r.length <= 5e5 ? r : r.substr(0, 5e5))
|
|
}
|
|
t && t.lineNumber && (t.code = function(e) {
|
|
a && o || (o = s());
|
|
var t = ["\x3c!-- DOC START --\x3e"].concat(o.split("\n"))
|
|
, n = e - 1
|
|
, r = Math.max(n - 3, 0)
|
|
, i = Math.min(n + 3, t.length);
|
|
return et(t.slice(r, i), function(e, t, n) {
|
|
return e[r + 1 + n] = t.length <= 200 ? t : t.substr(0, 200),
|
|
e
|
|
}, {})
|
|
}(t.lineNumber))
|
|
}
|
|
});
|
|
var l = Qe(["setTimeout", "setInterval", "setImmediate", "requestAnimationFrame"], function(e) {
|
|
return rt(t, e, function(e) {
|
|
return d(e, function(t) {
|
|
return {
|
|
get: function() {
|
|
return t[0]
|
|
},
|
|
replace: function(e) {
|
|
t[0] = e
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})[0];
|
|
Qe(["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"], function(e) {
|
|
t[e] && t[e].prototype && t[e].prototype.hasOwnProperty && t[e].prototype.hasOwnProperty("addEventListener") && (rt(t[e].prototype, "addEventListener", function(e) {
|
|
return d(e, it)
|
|
}),
|
|
rt(t[e].prototype, "removeEventListener", function(e) {
|
|
return d(e, it, !0)
|
|
}))
|
|
})
|
|
}
|
|
function d(o, a, s) {
|
|
return void 0 === s && (s = !1),
|
|
function() {
|
|
var e = Array.prototype.slice.call(arguments);
|
|
try {
|
|
var t = a(e)
|
|
, n = t.get();
|
|
if (s && o.apply(this, e),
|
|
"function" != typeof n)
|
|
return o.apply(this, e);
|
|
if (n.__trace__)
|
|
t.replace(n.__trace__);
|
|
else {
|
|
var r = f();
|
|
n.__trace__ = function() {
|
|
c(r),
|
|
l(function() {
|
|
c(null)
|
|
}, 0);
|
|
var e = n.apply(this, arguments);
|
|
return c(null),
|
|
e
|
|
}
|
|
,
|
|
n.__trace__.__trace__ = n.__trace__,
|
|
t.replace(n.__trace__)
|
|
}
|
|
} catch (i) {}
|
|
if (o.apply)
|
|
return o.apply(this, e);
|
|
switch (e.length) {
|
|
case 1:
|
|
return o(e[0]);
|
|
case 2:
|
|
return o(e[0], e[1]);
|
|
default:
|
|
return o()
|
|
}
|
|
}
|
|
}
|
|
},
|
|
configSchema: {
|
|
trackInlineScripts: {
|
|
validate: function(e) {
|
|
return !0 === e || !1 === e
|
|
},
|
|
defaultValue: function() {
|
|
return !0
|
|
},
|
|
message: "should be true|false"
|
|
}
|
|
}
|
|
};
|
|
function rt(e, t, n) {
|
|
var r = e[t];
|
|
if (!r)
|
|
return r;
|
|
var i = n(r);
|
|
return e[t] = i,
|
|
r
|
|
}
|
|
function it(t) {
|
|
var n = !!t[1] && "function" == typeof t[1].handleEvent;
|
|
return {
|
|
get: function() {
|
|
return n ? t[1].handleEvent : t[1]
|
|
},
|
|
replace: function(e) {
|
|
n ? t[1].handleEvent = e : t[1] = e
|
|
}
|
|
}
|
|
}
|
|
var ot = {
|
|
init: function(i, a) {
|
|
if (void 0 === a && (a = window),
|
|
"addEventListener"in a) {
|
|
var e = !1 === i.config.interactionBreadcrumbsEnabled
|
|
, t = !1 === i.config.autoBreadcrumbs && !0 !== i.config.interactionBreadcrumbsEnabled;
|
|
e || t || a.addEventListener("click", function(e) {
|
|
var t, n;
|
|
try {
|
|
t = at(e.target),
|
|
n = function o(e, t) {
|
|
var n = [e.tagName];
|
|
e.id && n.push("#" + e.id);
|
|
e.className && e.className.length && n.push("." + e.className.split(" ").join("."));
|
|
if (!t.document.querySelectorAll || !Array.prototype.indexOf)
|
|
return n.join("");
|
|
try {
|
|
if (1 === t.document.querySelectorAll(n.join("")).length)
|
|
return n.join("")
|
|
} catch (i) {
|
|
return n.join("")
|
|
}
|
|
if (1 < e.parentNode.childNodes.length) {
|
|
var r = Array.prototype.indexOf.call(e.parentNode.childNodes, e) + 1;
|
|
n.push(":nth-child(" + r + ")")
|
|
}
|
|
if (1 === t.document.querySelectorAll(n.join("")).length)
|
|
return n.join("");
|
|
if (e.parentNode)
|
|
return o(e.parentNode, t) + " > " + n.join("");
|
|
return n.join("")
|
|
}(e.target, a)
|
|
} catch (r) {
|
|
n = t = "[hidden]",
|
|
i._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")
|
|
}
|
|
i.leaveBreadcrumb("UI click", {
|
|
targetText: t,
|
|
targetSelector: n
|
|
}, "user")
|
|
}, !0)
|
|
}
|
|
},
|
|
configSchema: {
|
|
interactionBreadcrumbsEnabled: {
|
|
defaultValue: function() {
|
|
return undefined
|
|
},
|
|
validate: function(e) {
|
|
return !0 === e || !1 === e || e === undefined
|
|
},
|
|
message: "should be true|false"
|
|
}
|
|
}
|
|
}
|
|
, at = function(e) {
|
|
var t = e.textContent || e.innerText || "";
|
|
return t || "submit" !== e.type && "button" !== e.type || (t = e.value),
|
|
function n(e, t) {
|
|
return e && e.length <= t ? e : e.slice(0, t - "(...)".length) + "(...)"
|
|
}(t = t.replace(/^\s+|\s+$/g, ""), 140)
|
|
};
|
|
var st = {
|
|
init: function(n, r) {
|
|
if (void 0 === r && (r = window),
|
|
"addEventListener"in r) {
|
|
var e = !1 === n.config.navigationBreadcrumbsEnabled
|
|
, t = !1 === n.config.autoBreadcrumbs && !0 !== n.config.navigationBreadcrumbsEnabled;
|
|
if (!e && !t) {
|
|
var i = function(e) {
|
|
return function() {
|
|
return n.leaveBreadcrumb(e, {}, "navigation")
|
|
}
|
|
};
|
|
r.addEventListener("pagehide", i("Page hidden"), !0),
|
|
r.addEventListener("pageshow", i("Page shown"), !0),
|
|
r.addEventListener("load", i("Page loaded"), !0),
|
|
r.document.addEventListener("DOMContentLoaded", i("DOMContentLoaded"), !0),
|
|
r.addEventListener("load", function() {
|
|
return r.addEventListener("popstate", i("Navigated back"), !0)
|
|
}),
|
|
r.addEventListener("hashchange", function(e) {
|
|
var t = e.oldURL ? {
|
|
from: lt(e.oldURL, r),
|
|
to: lt(e.newURL, r),
|
|
state: gt(r)
|
|
} : {
|
|
to: lt(r.location.href, r)
|
|
};
|
|
n.leaveBreadcrumb("Hash changed", t, "navigation")
|
|
}, !0),
|
|
r.history.replaceState && dt(n, r.history, "replaceState", r),
|
|
r.history.pushState && dt(n, r.history, "pushState", r),
|
|
n.leaveBreadcrumb("Bugsnag loaded", {}, "navigation")
|
|
}
|
|
}
|
|
}
|
|
};
|
|
st.configSchema = {
|
|
navigationBreadcrumbsEnabled: {
|
|
defaultValue: function() {
|
|
return undefined
|
|
},
|
|
validate: function(e) {
|
|
return !0 === e || !1 === e || e === undefined
|
|
},
|
|
message: "should be true|false"
|
|
}
|
|
};
|
|
var ut, ct, ft, lt = function(e, t) {
|
|
var n = t.document.createElement("A");
|
|
return n.href = e,
|
|
"" + n.pathname + n.search + n.hash
|
|
}, dt = function(u, c, f, l) {
|
|
var d = c[f];
|
|
c[f] = function(e, t, n) {
|
|
var r, i, o, a, s;
|
|
u.leaveBreadcrumb("History " + f, (i = e,
|
|
o = t,
|
|
a = n,
|
|
s = lt((r = l).location.href, r),
|
|
{
|
|
title: o,
|
|
state: i,
|
|
prevState: gt(r),
|
|
to: a || s,
|
|
from: s
|
|
}), "navigation"),
|
|
"function" == typeof u.refresh && u.refresh(),
|
|
u.config.autoCaptureSessions && u.startSession(),
|
|
d.apply(c, [e, t].concat(n !== undefined ? n : []))
|
|
}
|
|
}, gt = function(e) {
|
|
try {
|
|
return e.history.state
|
|
} catch (t) {}
|
|
}, pt = {}, ht = "request", vt = "BS~~U", mt = "BS~~M", yt = s, bt = function() {
|
|
return [ut.config.endpoints.notify, ut.config.endpoints.sessions]
|
|
};
|
|
pt.name = "networkBreadcrumbs",
|
|
pt.init = function(e, t, n) {
|
|
void 0 === t && (t = bt),
|
|
void 0 === n && (n = window);
|
|
var r = !1 === e.config.networkBreadcrumbsEnabled
|
|
, i = !1 === e.config.autoBreadcrumbs && !0 !== e.config.networkBreadcrumbsEnabled;
|
|
r || i || (ut = e,
|
|
ct = n,
|
|
ft = t,
|
|
St(),
|
|
_t())
|
|
}
|
|
,
|
|
pt.configSchema = {
|
|
networkBreadcrumbsEnabled: {
|
|
defaultValue: function() {
|
|
return undefined
|
|
},
|
|
validate: function(e) {
|
|
return !0 === e || !1 === e || e === undefined
|
|
},
|
|
message: "should be true|false"
|
|
}
|
|
};
|
|
var St = function() {
|
|
if ("addEventListener"in ct.XMLHttpRequest.prototype) {
|
|
var n = ct.XMLHttpRequest.prototype.open;
|
|
ct.XMLHttpRequest.prototype.open = function(e, t) {
|
|
this[vt] = t,
|
|
this[mt] = e,
|
|
this["BS~~S"] && (this.removeEventListener("load", wt),
|
|
this.removeEventListener("error", Ot)),
|
|
this.addEventListener("load", wt),
|
|
this.addEventListener("error", Ot),
|
|
this["BS~~S"] = !0,
|
|
n.apply(this, arguments)
|
|
}
|
|
}
|
|
};
|
|
function wt() {
|
|
if (!yt(ft(), this[vt])) {
|
|
var e = {
|
|
status: this.status,
|
|
request: this[mt] + " " + this[vt]
|
|
};
|
|
400 <= this.status ? ut.leaveBreadcrumb("XMLHttpRequest failed", e, ht) : ut.leaveBreadcrumb("XMLHttpRequest succeeded", e, ht)
|
|
}
|
|
}
|
|
function Ot() {
|
|
yt(ft, this[vt]) || ut.leaveBreadcrumb("XMLHttpRequest error", {
|
|
request: this[mt] + " " + this[vt]
|
|
}, ht)
|
|
}
|
|
var _t = function() {
|
|
if ("fetch"in ct && !ct.fetch.polyfill) {
|
|
var o = ct.fetch;
|
|
ct.fetch = function() {
|
|
var r, e = arguments, t = arguments[0], n = arguments[1], i = null;
|
|
return t && "object" == typeof t ? (i = t.url,
|
|
n && "method"in n ? r = n.method : t && "method"in t && (r = t.method)) : (i = t,
|
|
n && "method"in n && (r = n.method)),
|
|
r === undefined && (r = "GET"),
|
|
new Promise(function(t, n) {
|
|
o.apply(void 0, e).then(function(e) {
|
|
Et(e, r, i),
|
|
t(e)
|
|
})["catch"](function(e) {
|
|
jt(r, i),
|
|
n(e)
|
|
})
|
|
}
|
|
)
|
|
}
|
|
}
|
|
}
|
|
, Et = function(e, t, n) {
|
|
var r = {
|
|
status: e.status,
|
|
request: t + " " + n
|
|
};
|
|
400 <= e.status ? ut.leaveBreadcrumb("fetch() failed", r, ht) : ut.leaveBreadcrumb("fetch() succeeded", r, ht)
|
|
}
|
|
, jt = function(e, t) {
|
|
ut.leaveBreadcrumb("fetch() error", {
|
|
request: e + " " + t
|
|
}, ht)
|
|
}
|
|
, Nt = f.intRange
|
|
, kt = {
|
|
init: function(t) {
|
|
var n = 0;
|
|
t.config.beforeSend.push(function(e) {
|
|
if (n >= t.config.maxEvents)
|
|
return e.ignore();
|
|
n++
|
|
}),
|
|
t.refresh = function() {
|
|
n = 0
|
|
}
|
|
},
|
|
configSchema: {
|
|
maxEvents: {
|
|
defaultValue: function() {
|
|
return 10
|
|
},
|
|
message: "should be a positive integer ≤100",
|
|
validate: function(e) {
|
|
return Nt(1, 100)(e)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
, Bt = {};
|
|
function Rt() {
|
|
return (Rt = Object.assign || function(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = arguments[t];
|
|
for (var r in n)
|
|
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
|
|
}
|
|
return e
|
|
}
|
|
).apply(this, arguments)
|
|
}
|
|
var Lt = e
|
|
, Dt = (Bt = {
|
|
init: function(e) {
|
|
e.config.beforeSend.push(function(e) {
|
|
e.stacktrace = Lt(e.stacktrace, function(e) {
|
|
return Rt({}, e, {
|
|
file: Dt(e.file)
|
|
})
|
|
})
|
|
})
|
|
}
|
|
})._strip = function(e) {
|
|
return "string" == typeof e ? e.replace(/\?.*$/, "").replace(/#.*$/, "") : e
|
|
}
|
|
, xt = {
|
|
init: function(c, e) {
|
|
void 0 === e && (e = window);
|
|
var f = e.onerror;
|
|
e.onerror = function l(e, t, n, r, i) {
|
|
if (0 === n && /Script error\.?/.test(e))
|
|
c._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");
|
|
else {
|
|
var o, a = {
|
|
severity: "error",
|
|
unhandled: !0,
|
|
severityReason: {
|
|
type: "unhandledException"
|
|
}
|
|
};
|
|
if (i)
|
|
i.name && i.message ? o = new c.BugsnagReport(i.name,i.message,Tt(c.BugsnagReport.getStacktrace(i), t, n, r),a,i) : (o = new c.BugsnagReport("window.onerror",String(i),Tt(c.BugsnagReport.getStacktrace(i, 1), t, n, r),a,i)).updateMetaData("window onerror", {
|
|
error: i
|
|
});
|
|
else if ("object" != typeof e || null === e || t && "string" == typeof t || n || r || i)
|
|
(o = new c.BugsnagReport("window.onerror",String(e),Tt(c.BugsnagReport.getStacktrace(i, 1), t, n, r),a,e)).updateMetaData("window onerror", {
|
|
event: e
|
|
});
|
|
else {
|
|
var s = e.type ? "Event: " + e.type : "window.onerror"
|
|
, u = e.message || e.detail || "";
|
|
(o = new c.BugsnagReport(s,u,c.BugsnagReport.getStacktrace(new Error, 1).slice(1),a,e)).updateMetaData("window onerror", {
|
|
event: e,
|
|
extraParameters: t
|
|
})
|
|
}
|
|
c.notify(o)
|
|
}
|
|
"function" == typeof f && f.apply(this, arguments)
|
|
}
|
|
}
|
|
}
|
|
, Tt = function(e, t, n, r) {
|
|
var i = e[0];
|
|
return i && (i.fileName || "string" != typeof t || i.setFileName(t),
|
|
!i.lineNumber && qt(n) && i.setLineNumber(n),
|
|
i.columnNumber || (qt(r) ? i.setColumnNumber(r) : window.event && qt(window.event.errorCharacter) && i.setColumnNumber(window.event.errorCharacter))),
|
|
e
|
|
}
|
|
, qt = function(e) {
|
|
return "number" == typeof e && "NaN" !== String.call(e)
|
|
}
|
|
, Ct = {}
|
|
, Mt = r;
|
|
Ct.init = function(a, e) {
|
|
void 0 === e && (e = window);
|
|
var n = function(e) {
|
|
var t = e.reason
|
|
, n = !1;
|
|
try {
|
|
e.detail && e.detail.reason && (t = e.detail.reason,
|
|
n = !0)
|
|
} catch (o) {}
|
|
var r, i = {
|
|
severity: "error",
|
|
unhandled: !0,
|
|
severityReason: {
|
|
type: "unhandledPromiseRejection"
|
|
}
|
|
};
|
|
if (t && x(t))
|
|
r = new a.BugsnagReport(t.name,t.message,D.parse(t),i,t),
|
|
n && (r.stacktrace = Mt(r.stacktrace, Vt(t), []));
|
|
else {
|
|
(r = new a.BugsnagReport(t && t.name ? t.name : "UnhandledRejection",t && t.message ? t.message : 'Rejection reason was not an Error. See "Promise" tab for more detail.',[],i,t)).updateMetaData("promise", "rejection reason", At(t))
|
|
}
|
|
a.notify(r)
|
|
};
|
|
"addEventListener"in e ? e.addEventListener("unhandledrejection", n) : e.onunhandledrejection = function(e, t) {
|
|
n({
|
|
detail: {
|
|
reason: e,
|
|
promise: t
|
|
}
|
|
})
|
|
}
|
|
,
|
|
n
|
|
}
|
|
;
|
|
var Pt, At = function(e) {
|
|
return null === e || e === undefined ? "undefined (or null)" : k(e) ? ((t = {})[Object.prototype.toString.call(e)] = {
|
|
name: e.name,
|
|
message: e.message,
|
|
code: e.code,
|
|
stack: e.stack
|
|
},
|
|
t) : e;
|
|
var t
|
|
}, Vt = function(n) {
|
|
return function(e, t) {
|
|
return t.file === n.toString() ? e : (t.method && (t.method = t.method.replace(/^\s+/, "")),
|
|
e.concat(t))
|
|
}
|
|
};
|
|
function Ht() {
|
|
return (Ht = Object.assign || function(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = arguments[t];
|
|
for (var r in n)
|
|
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
|
|
}
|
|
return e
|
|
}
|
|
).apply(this, arguments)
|
|
}
|
|
var It = Ht({}, l.schema, O);
|
|
return (Pt = function(e) {
|
|
"string" == typeof e && (e = {
|
|
apiKey: e
|
|
});
|
|
var t = "";
|
|
e.endpoints && e.endpoints.notify && !e.endpoints.sessions && (t += "notify endpoint is set but sessions endpoint is not. No sessions will be sent.");
|
|
var n = new he({
|
|
name: "Bugsnag JavaScript",
|
|
version: "6.5.2",
|
|
url: "https://github.com/bugsnag/bugsnag-js"
|
|
});
|
|
return n.setOptions(e),
|
|
n.delivery(window.XDomainRequest ? Re : qe),
|
|
n.configure(It),
|
|
t && n._logger.warn(t),
|
|
n.use(Ae),
|
|
n.use(Ce),
|
|
n.use(He),
|
|
n.use(kt),
|
|
n.use(Fe),
|
|
n.use(Je),
|
|
n.use(Bt),
|
|
!1 !== n.config.autoNotify && (n.use(xt),
|
|
n.use(Ct)),
|
|
n.use(st),
|
|
n.use(ot),
|
|
n.use(pt),
|
|
n.use(We),
|
|
n.use(nt),
|
|
n._logger.debug("Loaded!"),
|
|
n.config.autoCaptureSessions ? n.startSession() : n
|
|
}
|
|
).Bugsnag = {
|
|
Client: he,
|
|
Report: U,
|
|
Session: ie,
|
|
Breadcrumb: j
|
|
},
|
|
Pt["default"] = Pt
|
|
});
|
|
//# sourceMappingURL=bugsnag.min.js.map
|