@cloudflare/vite-plugin 0.0.0-ddaef2b9c → 0.0.0-dfbf03f87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -1
- package/dist/asset-workers/asset-worker.js +1586 -1837
- package/dist/asset-workers/router-worker.js +1279 -1663
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7801 -657
- package/dist/runner-worker/index.js +65 -23
- package/package.json +19 -11
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
// ../workers-shared/dist/router-worker.mjs
|
|
2
|
-
var
|
|
3
|
-
var Bn = (t, e, n) => e in t ? Fn(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
|
|
4
|
-
var le = (t, e, n) => (Bn(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
5
|
-
var It = (t, e, n) => {
|
|
6
|
-
if (!e.has(t)) throw TypeError("Cannot " + n);
|
|
7
|
-
};
|
|
8
|
-
var je = (t, e, n) => (It(t, e, "read from private field"), n ? n.call(t) : e.get(t));
|
|
9
|
-
var Dt = (t, e, n) => {
|
|
10
|
-
if (e.has(t)) throw TypeError("Cannot add the same private member more than once");
|
|
11
|
-
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
12
|
-
};
|
|
13
|
-
var Nt = (t, e, n, r) => (It(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
|
|
14
|
-
var me = class {
|
|
2
|
+
var ue = class {
|
|
15
3
|
constructor(e) {
|
|
16
4
|
this.performanceTimer = e;
|
|
17
5
|
}
|
|
@@ -19,749 +7,533 @@ var me = class {
|
|
|
19
7
|
return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now();
|
|
20
8
|
}
|
|
21
9
|
};
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
switch (
|
|
10
|
+
var bt = Object.prototype.toString;
|
|
11
|
+
function F(t4) {
|
|
12
|
+
switch (bt.call(t4)) {
|
|
25
13
|
case "[object Error]":
|
|
26
14
|
case "[object Exception]":
|
|
27
15
|
case "[object DOMException]":
|
|
28
16
|
return true;
|
|
29
17
|
default:
|
|
30
|
-
return
|
|
18
|
+
return O(t4, Error);
|
|
31
19
|
}
|
|
32
20
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
21
|
+
function Le(t4, e) {
|
|
22
|
+
return bt.call(t4) === `[object ${e}]`;
|
|
23
|
+
}
|
|
24
|
+
function Fe(t4) {
|
|
25
|
+
return Le(t4, "ErrorEvent");
|
|
35
26
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
27
|
+
function Ue(t4) {
|
|
28
|
+
return Le(t4, "String");
|
|
38
29
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
30
|
+
function H(t4) {
|
|
31
|
+
return typeof t4 == "object" && t4 !== null && "__sentry_template_string__" in t4 && "__sentry_template_values__" in t4;
|
|
41
32
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
33
|
+
function pe(t4) {
|
|
34
|
+
return t4 === null || H(t4) || typeof t4 != "object" && typeof t4 != "function";
|
|
44
35
|
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
36
|
+
function A(t4) {
|
|
37
|
+
return Le(t4, "Object");
|
|
47
38
|
}
|
|
48
|
-
function
|
|
49
|
-
return typeof
|
|
39
|
+
function Be(t4) {
|
|
40
|
+
return typeof Event < "u" && O(t4, Event);
|
|
50
41
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
42
|
+
function $e(t4) {
|
|
43
|
+
return typeof Element < "u" && O(t4, Element);
|
|
53
44
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
45
|
+
function C(t4) {
|
|
46
|
+
return !!(t4 && t4.then && typeof t4.then == "function");
|
|
56
47
|
}
|
|
57
|
-
function
|
|
58
|
-
return
|
|
48
|
+
function je(t4) {
|
|
49
|
+
return A(t4) && "nativeEvent" in t4 && "preventDefault" in t4 && "stopPropagation" in t4;
|
|
59
50
|
}
|
|
60
|
-
function
|
|
51
|
+
function O(t4, e) {
|
|
61
52
|
try {
|
|
62
|
-
return
|
|
53
|
+
return t4 instanceof e;
|
|
63
54
|
} catch {
|
|
64
55
|
return false;
|
|
65
56
|
}
|
|
66
57
|
}
|
|
67
|
-
function
|
|
68
|
-
return !!(typeof
|
|
58
|
+
function Ge(t4) {
|
|
59
|
+
return !!(typeof t4 == "object" && t4 !== null && (t4.__isVue || t4._isVue));
|
|
69
60
|
}
|
|
70
|
-
function
|
|
71
|
-
return typeof
|
|
61
|
+
function k(t4, e = 0) {
|
|
62
|
+
return typeof t4 != "string" || e === 0 || t4.length <= e ? t4 : `${t4.slice(0, e)}...`;
|
|
72
63
|
}
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
var D = "8.9.2";
|
|
65
|
+
var m = globalThis;
|
|
66
|
+
function q(t4, e, n) {
|
|
67
|
+
let r = n || m, o = r.__SENTRY__ = r.__SENTRY__ || {}, s = o[D] = o[D] || {};
|
|
68
|
+
return s[t4] || (s[t4] = e());
|
|
75
69
|
}
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return m;
|
|
81
|
-
}
|
|
82
|
-
function ee(t, e, n) {
|
|
83
|
-
let r = n || m, s = r.__SENTRY__ = r.__SENTRY__ || {};
|
|
84
|
-
return s[t] || (s[t] = e());
|
|
85
|
-
}
|
|
86
|
-
var hs = I();
|
|
87
|
-
var Ln = 80;
|
|
88
|
-
function At(t, e = {}) {
|
|
89
|
-
if (!t) return "<unknown>";
|
|
70
|
+
var kn = m;
|
|
71
|
+
var Dn = 80;
|
|
72
|
+
function Rt(t4, e = {}) {
|
|
73
|
+
if (!t4) return "<unknown>";
|
|
90
74
|
try {
|
|
91
|
-
let n =
|
|
92
|
-
for (; n &&
|
|
93
|
-
return
|
|
75
|
+
let n = t4, r = 5, o = [], s = 0, i = 0, a = " > ", c = a.length, u, f = Array.isArray(e) ? e : e.keyAttrs, p = !Array.isArray(e) && e.maxStringLength || Dn;
|
|
76
|
+
for (; n && s++ < r && (u = vn(n, f), !(u === "html" || s > 1 && i + o.length * c + u.length >= p)); ) o.push(u), i += u.length, n = n.parentNode;
|
|
77
|
+
return o.reverse().join(a);
|
|
94
78
|
} catch {
|
|
95
79
|
return "<unknown>";
|
|
96
80
|
}
|
|
97
81
|
}
|
|
98
|
-
function
|
|
99
|
-
let n =
|
|
82
|
+
function vn(t4, e) {
|
|
83
|
+
let n = t4, r = [], o, s, i, a, c;
|
|
100
84
|
if (!n || !n.tagName) return "";
|
|
85
|
+
if (kn.HTMLElement && n instanceof HTMLElement && n.dataset) {
|
|
86
|
+
if (n.dataset.sentryComponent) return n.dataset.sentryComponent;
|
|
87
|
+
if (n.dataset.sentryElement) return n.dataset.sentryElement;
|
|
88
|
+
}
|
|
101
89
|
r.push(n.tagName.toLowerCase());
|
|
102
|
-
let
|
|
103
|
-
if (
|
|
104
|
-
r.push(`[${
|
|
90
|
+
let u = e && e.length ? e.filter((p) => n.getAttribute(p)).map((p) => [p, n.getAttribute(p)]) : null;
|
|
91
|
+
if (u && u.length) u.forEach((p) => {
|
|
92
|
+
r.push(`[${p[0]}="${p[1]}"]`);
|
|
105
93
|
});
|
|
106
|
-
else if (n.id && r.push(`#${n.id}`),
|
|
94
|
+
else if (n.id && r.push(`#${n.id}`), o = n.className, o && Ue(o)) for (s = o.split(/\s+/), c = 0; c < s.length; c++) r.push(`.${s[c]}`);
|
|
107
95
|
let f = ["aria-label", "type", "name", "title", "alt"];
|
|
108
|
-
for (
|
|
96
|
+
for (c = 0; c < f.length; c++) i = f[c], a = n.getAttribute(i), a && r.push(`[${i}="${a}"]`);
|
|
109
97
|
return r.join("");
|
|
110
98
|
}
|
|
111
|
-
var
|
|
112
|
-
var
|
|
113
|
-
var
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
r.
|
|
118
|
-
|
|
119
|
-
|
|
99
|
+
var v = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
|
|
100
|
+
var Mn = "Sentry Logger ";
|
|
101
|
+
var He = ["debug", "info", "warn", "error", "log", "assert", "trace"];
|
|
102
|
+
var qe = {};
|
|
103
|
+
function fe(t4) {
|
|
104
|
+
if (!("console" in m)) return t4();
|
|
105
|
+
let e = m.console, n = {}, r = Object.keys(qe);
|
|
106
|
+
r.forEach((o) => {
|
|
107
|
+
let s = qe[o];
|
|
108
|
+
n[o] = e[o], e[o] = s;
|
|
120
109
|
});
|
|
121
110
|
try {
|
|
122
|
-
return
|
|
111
|
+
return t4();
|
|
123
112
|
} finally {
|
|
124
|
-
r.forEach((
|
|
125
|
-
e[
|
|
113
|
+
r.forEach((o) => {
|
|
114
|
+
e[o] = n[o];
|
|
126
115
|
});
|
|
127
116
|
}
|
|
128
117
|
}
|
|
129
|
-
function
|
|
130
|
-
let
|
|
131
|
-
|
|
118
|
+
function Pn() {
|
|
119
|
+
let t4 = false, e = { enable: () => {
|
|
120
|
+
t4 = true;
|
|
132
121
|
}, disable: () => {
|
|
133
|
-
|
|
134
|
-
}, isEnabled: () =>
|
|
135
|
-
return
|
|
122
|
+
t4 = false;
|
|
123
|
+
}, isEnabled: () => t4 };
|
|
124
|
+
return v ? He.forEach((n) => {
|
|
136
125
|
e[n] = (...r) => {
|
|
137
|
-
|
|
138
|
-
m.console[n](`${
|
|
126
|
+
t4 && fe(() => {
|
|
127
|
+
m.console[n](`${Mn}[${n}]:`, ...r);
|
|
139
128
|
});
|
|
140
129
|
};
|
|
141
|
-
}) :
|
|
130
|
+
}) : He.forEach((n) => {
|
|
142
131
|
e[n] = () => {
|
|
143
132
|
};
|
|
144
133
|
}), e;
|
|
145
134
|
}
|
|
146
|
-
var
|
|
147
|
-
var
|
|
148
|
-
function
|
|
149
|
-
return
|
|
135
|
+
var d = Pn();
|
|
136
|
+
var wn = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
|
|
137
|
+
function Ln(t4) {
|
|
138
|
+
return t4 === "http" || t4 === "https";
|
|
150
139
|
}
|
|
151
|
-
function
|
|
152
|
-
let { host: n, path: r, pass:
|
|
153
|
-
return `${a}://${
|
|
140
|
+
function M(t4, e = false) {
|
|
141
|
+
let { host: n, path: r, pass: o, port: s, projectId: i, protocol: a, publicKey: c } = t4;
|
|
142
|
+
return `${a}://${c}${e && o ? `:${o}` : ""}@${n}${s ? `:${s}` : ""}/${r && `${r}/`}${i}`;
|
|
154
143
|
}
|
|
155
|
-
function
|
|
156
|
-
let e =
|
|
144
|
+
function Ct(t4) {
|
|
145
|
+
let e = wn.exec(t4);
|
|
157
146
|
if (!e) {
|
|
158
|
-
|
|
147
|
+
fe(() => {
|
|
148
|
+
console.error(`Invalid Sentry Dsn: ${t4}`);
|
|
149
|
+
});
|
|
159
150
|
return;
|
|
160
151
|
}
|
|
161
|
-
let [n, r,
|
|
162
|
-
if (f.length > 1 && (
|
|
163
|
-
let
|
|
164
|
-
|
|
152
|
+
let [n, r, o = "", s, i = "", a] = e.slice(1), c = "", u = a, f = u.split("/");
|
|
153
|
+
if (f.length > 1 && (c = f.slice(0, -1).join("/"), u = f.pop()), u) {
|
|
154
|
+
let p = u.match(/^\d+/);
|
|
155
|
+
p && (u = p[0]);
|
|
165
156
|
}
|
|
166
|
-
return
|
|
157
|
+
return Ot({ host: s, pass: o, path: c, projectId: u, port: i, protocol: n, publicKey: r });
|
|
167
158
|
}
|
|
168
|
-
function
|
|
169
|
-
return { protocol:
|
|
159
|
+
function Ot(t4) {
|
|
160
|
+
return { protocol: t4.protocol, publicKey: t4.publicKey || "", pass: t4.pass || "", host: t4.host, port: t4.port || "", path: t4.path || "", projectId: t4.projectId };
|
|
170
161
|
}
|
|
171
|
-
function
|
|
172
|
-
if (!
|
|
173
|
-
let { port: e, projectId: n, protocol: r } =
|
|
174
|
-
return ["protocol", "publicKey", "host", "projectId"].find((
|
|
162
|
+
function Fn(t4) {
|
|
163
|
+
if (!v) return true;
|
|
164
|
+
let { port: e, projectId: n, protocol: r } = t4;
|
|
165
|
+
return ["protocol", "publicKey", "host", "projectId"].find((i) => t4[i] ? false : (d.error(`Invalid Sentry Dsn: ${i} missing`), true)) ? false : n.match(/^\d+$/) ? Ln(r) ? e && isNaN(parseInt(e, 10)) ? (d.error(`Invalid Sentry Dsn: Invalid port ${e}`), false) : true : (d.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), false) : (d.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), false);
|
|
175
166
|
}
|
|
176
|
-
function
|
|
177
|
-
let e = typeof
|
|
178
|
-
if (!(!e || !
|
|
167
|
+
function de(t4) {
|
|
168
|
+
let e = typeof t4 == "string" ? Ct(t4) : Ot(t4);
|
|
169
|
+
if (!(!e || !Fn(e))) return e;
|
|
179
170
|
}
|
|
180
171
|
var y = class extends Error {
|
|
181
172
|
constructor(e, n = "warn") {
|
|
182
173
|
super(e), this.message = e, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = n;
|
|
183
174
|
}
|
|
184
175
|
};
|
|
185
|
-
function
|
|
186
|
-
if (!(e in t)) return;
|
|
187
|
-
let r = t[e], s = n(r);
|
|
188
|
-
typeof s == "function" && Mt(s, r), t[e] = s;
|
|
189
|
-
}
|
|
190
|
-
function W(t, e, n) {
|
|
176
|
+
function U(t4, e, n) {
|
|
191
177
|
try {
|
|
192
|
-
Object.defineProperty(
|
|
178
|
+
Object.defineProperty(t4, e, { value: n, writable: true, configurable: true });
|
|
193
179
|
} catch {
|
|
194
|
-
|
|
180
|
+
v && d.log(`Failed to add non-enumerable property "${e}" to object`, t4);
|
|
195
181
|
}
|
|
196
182
|
}
|
|
197
|
-
function
|
|
198
|
-
|
|
199
|
-
let n = e.prototype || {};
|
|
200
|
-
t.prototype = e.prototype = n, W(t, "__sentry_original__", e);
|
|
201
|
-
} catch {
|
|
202
|
-
}
|
|
183
|
+
function Ye(t4) {
|
|
184
|
+
return Object.keys(t4).map((e) => `${encodeURIComponent(e)}=${encodeURIComponent(t4[e])}`).join("&");
|
|
203
185
|
}
|
|
204
|
-
function
|
|
205
|
-
|
|
186
|
+
function le(t4) {
|
|
187
|
+
if (F(t4)) return { message: t4.message, name: t4.name, stack: t4.stack, ...kt(t4) };
|
|
188
|
+
if (Be(t4)) {
|
|
189
|
+
let e = { type: t4.type, target: Nt(t4.target), currentTarget: Nt(t4.currentTarget), ...kt(t4) };
|
|
190
|
+
return typeof CustomEvent < "u" && O(t4, CustomEvent) && (e.detail = t4.detail), e;
|
|
191
|
+
} else return t4;
|
|
206
192
|
}
|
|
207
|
-
function
|
|
208
|
-
if (G(t)) return { message: t.message, name: t.name, stack: t.stack, ...Pt(t) };
|
|
209
|
-
if (He(t)) {
|
|
210
|
-
let e = { type: t.type, target: Ct(t.target), currentTarget: Ct(t.currentTarget), ...Pt(t) };
|
|
211
|
-
return typeof CustomEvent < "u" && A(t, CustomEvent) && (e.detail = t.detail), e;
|
|
212
|
-
} else return t;
|
|
213
|
-
}
|
|
214
|
-
function Ct(t) {
|
|
193
|
+
function Nt(t4) {
|
|
215
194
|
try {
|
|
216
|
-
return
|
|
195
|
+
return $e(t4) ? Rt(t4) : Object.prototype.toString.call(t4);
|
|
217
196
|
} catch {
|
|
218
197
|
return "<unknown>";
|
|
219
198
|
}
|
|
220
199
|
}
|
|
221
|
-
function
|
|
222
|
-
if (typeof
|
|
200
|
+
function kt(t4) {
|
|
201
|
+
if (typeof t4 == "object" && t4 !== null) {
|
|
223
202
|
let e = {};
|
|
224
|
-
for (let n in
|
|
203
|
+
for (let n in t4) Object.prototype.hasOwnProperty.call(t4, n) && (e[n] = t4[n]);
|
|
225
204
|
return e;
|
|
226
205
|
} else return {};
|
|
227
206
|
}
|
|
228
|
-
function
|
|
229
|
-
let n = Object.keys(
|
|
207
|
+
function K(t4, e = 40) {
|
|
208
|
+
let n = Object.keys(le(t4));
|
|
230
209
|
if (n.sort(), !n.length) return "[object has no keys]";
|
|
231
|
-
if (n[0].length >= e) return
|
|
210
|
+
if (n[0].length >= e) return k(n[0], e);
|
|
232
211
|
for (let r = n.length; r > 0; r--) {
|
|
233
|
-
let
|
|
234
|
-
if (!(
|
|
212
|
+
let o = n.slice(0, r).join(", ");
|
|
213
|
+
if (!(o.length > e)) return r === n.length ? o : k(o, e);
|
|
235
214
|
}
|
|
236
215
|
return "";
|
|
237
216
|
}
|
|
238
|
-
function
|
|
239
|
-
return
|
|
217
|
+
function E(t4) {
|
|
218
|
+
return ze(t4, /* @__PURE__ */ new Map());
|
|
240
219
|
}
|
|
241
|
-
function
|
|
242
|
-
if (
|
|
243
|
-
let n = e.get(
|
|
220
|
+
function ze(t4, e) {
|
|
221
|
+
if (Un(t4)) {
|
|
222
|
+
let n = e.get(t4);
|
|
244
223
|
if (n !== void 0) return n;
|
|
245
224
|
let r = {};
|
|
246
|
-
e.set(
|
|
247
|
-
for (let
|
|
225
|
+
e.set(t4, r);
|
|
226
|
+
for (let o of Object.keys(t4)) typeof t4[o] < "u" && (r[o] = ze(t4[o], e));
|
|
248
227
|
return r;
|
|
249
228
|
}
|
|
250
|
-
if (Array.isArray(
|
|
251
|
-
let n = e.get(
|
|
229
|
+
if (Array.isArray(t4)) {
|
|
230
|
+
let n = e.get(t4);
|
|
252
231
|
if (n !== void 0) return n;
|
|
253
232
|
let r = [];
|
|
254
|
-
return e.set(
|
|
255
|
-
r.push(
|
|
233
|
+
return e.set(t4, r), t4.forEach((o) => {
|
|
234
|
+
r.push(ze(o, e));
|
|
256
235
|
}), r;
|
|
257
236
|
}
|
|
258
|
-
return
|
|
259
|
-
}
|
|
260
|
-
function zn(t, e = false) {
|
|
261
|
-
return !(e || t && !t.startsWith("/") && !t.includes(":\\") && !t.startsWith(".") && !t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && t !== void 0 && !t.includes("node_modules/");
|
|
237
|
+
return t4;
|
|
262
238
|
}
|
|
263
|
-
function
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
let
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
let l = a.lastIndexOf(".");
|
|
272
|
-
if (a[l - 1] === "." && l--, l > 0) {
|
|
273
|
-
i = a.slice(0, l), o = a.slice(l + 1);
|
|
274
|
-
let _ = i.indexOf(".Module");
|
|
275
|
-
_ > 0 && (a = a.slice(_ + 1), i = i.slice(0, _));
|
|
276
|
-
}
|
|
277
|
-
u = void 0;
|
|
278
|
-
}
|
|
279
|
-
o && (u = i, c = o), o === "<anonymous>" && (c = void 0, a = void 0), a === void 0 && (c = c || "<anonymous>", a = u ? `${u}.${c}` : c);
|
|
280
|
-
let f = s[2] && s[2].startsWith("file://") ? s[2].slice(7) : s[2], d = s[5] === "native";
|
|
281
|
-
return !f && s[5] && !d && (f = s[5]), { filename: f, module: t ? t(f) : void 0, function: a, lineno: parseInt(s[3], 10) || void 0, colno: parseInt(s[4], 10) || void 0, in_app: zn(f, d) };
|
|
282
|
-
}
|
|
283
|
-
if (r.match(e)) return { filename: r };
|
|
284
|
-
};
|
|
239
|
+
function Un(t4) {
|
|
240
|
+
if (!A(t4)) return false;
|
|
241
|
+
try {
|
|
242
|
+
let e = Object.getPrototypeOf(t4).constructor.name;
|
|
243
|
+
return !e || e === "Object";
|
|
244
|
+
} catch {
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
285
247
|
}
|
|
286
|
-
var
|
|
287
|
-
var
|
|
288
|
-
var
|
|
289
|
-
function
|
|
290
|
-
let e =
|
|
291
|
-
return (n, r = 0) => {
|
|
248
|
+
var me = "?";
|
|
249
|
+
var Dt = /\(error: (.*)\)/;
|
|
250
|
+
var vt = /captureMessage|captureException/;
|
|
251
|
+
function ge(...t4) {
|
|
252
|
+
let e = t4.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
|
|
253
|
+
return (n, r = 0, o = 0) => {
|
|
292
254
|
let s = [], i = n.split(`
|
|
293
255
|
`);
|
|
294
|
-
for (let
|
|
295
|
-
let
|
|
296
|
-
if (
|
|
297
|
-
let u =
|
|
256
|
+
for (let a = r; a < i.length; a++) {
|
|
257
|
+
let c = i[a];
|
|
258
|
+
if (c.length > 1024) continue;
|
|
259
|
+
let u = Dt.test(c) ? c.replace(Dt, "$1") : c;
|
|
298
260
|
if (!u.match(/\S*Error: /)) {
|
|
299
|
-
for (let
|
|
300
|
-
let
|
|
301
|
-
if (
|
|
302
|
-
s.push(
|
|
261
|
+
for (let f of e) {
|
|
262
|
+
let p = f(u);
|
|
263
|
+
if (p) {
|
|
264
|
+
s.push(p);
|
|
303
265
|
break;
|
|
304
266
|
}
|
|
305
267
|
}
|
|
306
|
-
if (s.length >=
|
|
268
|
+
if (s.length >= 50 + o) break;
|
|
307
269
|
}
|
|
308
270
|
}
|
|
309
|
-
return
|
|
271
|
+
return Mt(s.slice(o));
|
|
310
272
|
};
|
|
311
273
|
}
|
|
312
|
-
function
|
|
313
|
-
return Array.isArray(
|
|
274
|
+
function We(t4) {
|
|
275
|
+
return Array.isArray(t4) ? ge(...t4) : t4;
|
|
314
276
|
}
|
|
315
|
-
function
|
|
316
|
-
if (!
|
|
317
|
-
let e = Array.from(
|
|
318
|
-
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(),
|
|
277
|
+
function Mt(t4) {
|
|
278
|
+
if (!t4.length) return [];
|
|
279
|
+
let e = Array.from(t4);
|
|
280
|
+
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), vt.test(e[e.length - 1].function || "") && (e.pop(), vt.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, 50).map((n) => ({ ...n, filename: n.filename || e[e.length - 1].filename, function: n.function || me }));
|
|
319
281
|
}
|
|
320
282
|
var Je = "<anonymous>";
|
|
321
|
-
function
|
|
283
|
+
function V(t4) {
|
|
322
284
|
try {
|
|
323
|
-
return !
|
|
285
|
+
return !t4 || typeof t4 != "function" ? Je : t4.name || Je;
|
|
324
286
|
} catch {
|
|
325
287
|
return Je;
|
|
326
288
|
}
|
|
327
289
|
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}
|
|
353
|
-
return
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
function Kn(t) {
|
|
365
|
-
if (!Ht[t]) switch (Ht[t] = true, t) {
|
|
366
|
-
case "console":
|
|
367
|
-
Jn();
|
|
368
|
-
break;
|
|
369
|
-
case "dom":
|
|
370
|
-
Jt();
|
|
371
|
-
break;
|
|
372
|
-
case "xhr":
|
|
373
|
-
Kt();
|
|
374
|
-
break;
|
|
375
|
-
case "fetch":
|
|
376
|
-
Xn();
|
|
377
|
-
break;
|
|
378
|
-
case "history":
|
|
379
|
-
Zn();
|
|
380
|
-
break;
|
|
381
|
-
case "error":
|
|
382
|
-
nr();
|
|
383
|
-
break;
|
|
384
|
-
case "unhandledrejection":
|
|
385
|
-
rr();
|
|
386
|
-
break;
|
|
387
|
-
default:
|
|
388
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("unknown instrumentation type:", t);
|
|
389
|
-
return;
|
|
290
|
+
var he = {};
|
|
291
|
+
var Pt = {};
|
|
292
|
+
function _e(t4, e) {
|
|
293
|
+
he[t4] = he[t4] || [], he[t4].push(e);
|
|
294
|
+
}
|
|
295
|
+
function Ee(t4, e) {
|
|
296
|
+
Pt[t4] || (e(), Pt[t4] = true);
|
|
297
|
+
}
|
|
298
|
+
function Se(t4, e) {
|
|
299
|
+
let n = t4 && he[t4];
|
|
300
|
+
if (n) for (let r of n) try {
|
|
301
|
+
r(e);
|
|
302
|
+
} catch (o) {
|
|
303
|
+
v && d.error(`Error while triggering instrumentation handler.
|
|
304
|
+
Type: ${t4}
|
|
305
|
+
Name: ${V(r)}
|
|
306
|
+
Error:`, o);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
var wt = 1e3;
|
|
310
|
+
function z() {
|
|
311
|
+
return Date.now() / wt;
|
|
312
|
+
}
|
|
313
|
+
function Bn() {
|
|
314
|
+
let { performance: t4 } = m;
|
|
315
|
+
if (!t4 || !t4.now) return z;
|
|
316
|
+
let e = Date.now() - t4.now(), n = t4.timeOrigin == null ? e : t4.timeOrigin;
|
|
317
|
+
return () => (n + t4.now()) / wt;
|
|
318
|
+
}
|
|
319
|
+
var Z = Bn();
|
|
320
|
+
var X;
|
|
321
|
+
var $n = (() => {
|
|
322
|
+
let { performance: t4 } = m;
|
|
323
|
+
if (!t4 || !t4.now) {
|
|
324
|
+
X = "none";
|
|
325
|
+
return;
|
|
390
326
|
}
|
|
327
|
+
let e = 3600 * 1e3, n = t4.now(), r = Date.now(), o = t4.timeOrigin ? Math.abs(t4.timeOrigin + n - r) : e, s = o < e, i = t4.timing && t4.timing.navigationStart, c = typeof i == "number" ? Math.abs(i + n - r) : e, u = c < e;
|
|
328
|
+
return s || u ? o <= c ? (X = "timeOrigin", t4.timeOrigin) : (X = "navigationStart", i) : (X = "dateNow", r);
|
|
329
|
+
})();
|
|
330
|
+
var ye = null;
|
|
331
|
+
function Ke(t4) {
|
|
332
|
+
let e = "error";
|
|
333
|
+
_e(e, t4), Ee(e, jn);
|
|
391
334
|
}
|
|
392
|
-
function
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
if (!(!t || !ie[t])) for (let n of ie[t] || []) try {
|
|
397
|
-
n(e);
|
|
398
|
-
} catch (r) {
|
|
399
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.error(`Error while triggering instrumentation handler.
|
|
400
|
-
Type: ${t}
|
|
401
|
-
Name: ${re(n)}
|
|
402
|
-
Error:`, r);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
function Jn() {
|
|
406
|
-
"console" in m && te.forEach(function(t) {
|
|
407
|
-
t in m.console && x(m.console, t, function(e) {
|
|
408
|
-
return q[t] = e, function(...n) {
|
|
409
|
-
D("console", { args: n, level: t });
|
|
410
|
-
let r = q[t];
|
|
411
|
-
r && r.apply(m.console, n);
|
|
412
|
-
};
|
|
413
|
-
});
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
function Xn() {
|
|
417
|
-
$t() && x(m, "fetch", function(t) {
|
|
418
|
-
return function(...e) {
|
|
419
|
-
let { method: n, url: r } = Vt(e), s = { args: e, fetchData: { method: n, url: r }, startTimestamp: Date.now() };
|
|
420
|
-
return D("fetch", { ...s }), t.apply(m, e).then((i) => (D("fetch", { ...s, endTimestamp: Date.now(), response: i }), i), (i) => {
|
|
421
|
-
throw D("fetch", { ...s, endTimestamp: Date.now(), error: i }), i;
|
|
422
|
-
});
|
|
423
|
-
};
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
function et(t, e) {
|
|
427
|
-
return !!t && typeof t == "object" && !!t[e];
|
|
428
|
-
}
|
|
429
|
-
function qt(t) {
|
|
430
|
-
return typeof t == "string" ? t : t ? et(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
|
|
431
|
-
}
|
|
432
|
-
function Vt(t) {
|
|
433
|
-
if (t.length === 0) return { method: "GET", url: "" };
|
|
434
|
-
if (t.length === 2) {
|
|
435
|
-
let [n, r] = t;
|
|
436
|
-
return { url: qt(n), method: et(r, "method") ? String(r.method).toUpperCase() : "GET" };
|
|
437
|
-
}
|
|
438
|
-
let e = t[0];
|
|
439
|
-
return { url: qt(e), method: et(e, "method") ? String(e.method).toUpperCase() : "GET" };
|
|
440
|
-
}
|
|
441
|
-
function Kt() {
|
|
442
|
-
if (!E.XMLHttpRequest) return;
|
|
443
|
-
let t = XMLHttpRequest.prototype;
|
|
444
|
-
x(t, "open", function(e) {
|
|
445
|
-
return function(...n) {
|
|
446
|
-
let r = Date.now(), s = n[1], i = this[se] = { method: H(n[0]) ? n[0].toUpperCase() : n[0], url: n[1], request_headers: {} };
|
|
447
|
-
H(s) && i.method === "POST" && s.match(/sentry_key/) && (this.__sentry_own_request__ = true);
|
|
448
|
-
let o = () => {
|
|
449
|
-
let a = this[se];
|
|
450
|
-
if (a && this.readyState === 4) {
|
|
451
|
-
try {
|
|
452
|
-
a.status_code = this.status;
|
|
453
|
-
} catch {
|
|
454
|
-
}
|
|
455
|
-
D("xhr", { args: n, endTimestamp: Date.now(), startTimestamp: r, xhr: this });
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
return "onreadystatechange" in this && typeof this.onreadystatechange == "function" ? x(this, "onreadystatechange", function(a) {
|
|
459
|
-
return function(...u) {
|
|
460
|
-
return o(), a.apply(this, u);
|
|
461
|
-
};
|
|
462
|
-
}) : this.addEventListener("readystatechange", o), x(this, "setRequestHeader", function(a) {
|
|
463
|
-
return function(...u) {
|
|
464
|
-
let [c, f] = u, d = this[se];
|
|
465
|
-
return d && (d.request_headers[c.toLowerCase()] = f), a.apply(this, u);
|
|
466
|
-
};
|
|
467
|
-
}), e.apply(this, n);
|
|
468
|
-
};
|
|
469
|
-
}), x(t, "send", function(e) {
|
|
470
|
-
return function(...n) {
|
|
471
|
-
let r = this[se];
|
|
472
|
-
return r && n[0] !== void 0 && (r.body = n[0]), D("xhr", { args: n, startTimestamp: Date.now(), xhr: this }), e.apply(this, n);
|
|
473
|
-
};
|
|
474
|
-
});
|
|
335
|
+
function jn() {
|
|
336
|
+
ye = m.onerror, m.onerror = function(t4, e, n, r, o) {
|
|
337
|
+
return Se("error", { column: r, error: o, line: n, msg: t4, url: e }), ye && !ye.__SENTRY_LOADER__ ? ye.apply(this, arguments) : false;
|
|
338
|
+
}, m.onerror.__SENTRY_INSTRUMENTED__ = true;
|
|
475
339
|
}
|
|
476
|
-
var
|
|
477
|
-
function
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
E.onpopstate = function(...n) {
|
|
481
|
-
let r = E.location.href, s = be;
|
|
482
|
-
if (be = r, D("history", { from: s, to: r }), t) try {
|
|
483
|
-
return t.apply(this, n);
|
|
484
|
-
} catch {
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
function e(n) {
|
|
488
|
-
return function(...r) {
|
|
489
|
-
let s = r.length > 2 ? r[2] : void 0;
|
|
490
|
-
if (s) {
|
|
491
|
-
let i = be, o = String(s);
|
|
492
|
-
be = o, D("history", { from: i, to: o });
|
|
493
|
-
}
|
|
494
|
-
return n.apply(this, r);
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
x(E.history, "pushState", e), x(E.history, "replaceState", e);
|
|
340
|
+
var Te = null;
|
|
341
|
+
function Ve(t4) {
|
|
342
|
+
let e = "unhandledrejection";
|
|
343
|
+
_e(e, t4), Ee(e, Gn);
|
|
498
344
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
if (t.type !== e.type) return false;
|
|
504
|
-
try {
|
|
505
|
-
if (t.target !== e.target) return false;
|
|
506
|
-
} catch {
|
|
507
|
-
}
|
|
508
|
-
return true;
|
|
345
|
+
function Gn() {
|
|
346
|
+
Te = m.onunhandledrejection, m.onunhandledrejection = function(t4) {
|
|
347
|
+
return Se("unhandledrejection", t4), Te && !Te.__SENTRY_LOADER__ ? Te.apply(this, arguments) : true;
|
|
348
|
+
}, m.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
|
|
509
349
|
}
|
|
510
|
-
function
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
} catch {
|
|
350
|
+
function Lt() {
|
|
351
|
+
let t4 = typeof WeakSet == "function", e = t4 ? /* @__PURE__ */ new WeakSet() : [];
|
|
352
|
+
function n(o) {
|
|
353
|
+
if (t4) return e.has(o) ? true : (e.add(o), false);
|
|
354
|
+
for (let s = 0; s < e.length; s++) if (e[s] === o) return true;
|
|
355
|
+
return e.push(o), false;
|
|
517
356
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
if (!n || n._sentryCaptured || tr(n)) return;
|
|
523
|
-
W(n, "_sentryCaptured", true);
|
|
524
|
-
let r = n.type === "keypress" ? "input" : n.type;
|
|
525
|
-
(Re === void 0 || !er(Re, n)) && (t({ event: n, name: r, global: e }), Re = n), clearTimeout(Wt), Wt = E.setTimeout(() => {
|
|
526
|
-
Re = void 0;
|
|
527
|
-
}, Qn);
|
|
528
|
-
};
|
|
529
|
-
}
|
|
530
|
-
function Jt() {
|
|
531
|
-
if (!E.document) return;
|
|
532
|
-
let t = D.bind(null, "dom"), e = zt(t, true);
|
|
533
|
-
E.document.addEventListener("click", e, false), E.document.addEventListener("keypress", e, false), ["EventTarget", "Node"].forEach((n) => {
|
|
534
|
-
let r = E[n] && E[n].prototype;
|
|
535
|
-
!r || !r.hasOwnProperty || !r.hasOwnProperty("addEventListener") || (x(r, "addEventListener", function(s) {
|
|
536
|
-
return function(i, o, a) {
|
|
537
|
-
if (i === "click" || i == "keypress") try {
|
|
538
|
-
let u = this, c = u.__sentry_instrumentation_handlers__ = u.__sentry_instrumentation_handlers__ || {}, f = c[i] = c[i] || { refCount: 0 };
|
|
539
|
-
if (!f.handler) {
|
|
540
|
-
let d = zt(t);
|
|
541
|
-
f.handler = d, s.call(this, i, d, a);
|
|
542
|
-
}
|
|
543
|
-
f.refCount++;
|
|
544
|
-
} catch {
|
|
545
|
-
}
|
|
546
|
-
return s.call(this, i, o, a);
|
|
547
|
-
};
|
|
548
|
-
}), x(r, "removeEventListener", function(s) {
|
|
549
|
-
return function(i, o, a) {
|
|
550
|
-
if (i === "click" || i == "keypress") try {
|
|
551
|
-
let u = this, c = u.__sentry_instrumentation_handlers__ || {}, f = c[i];
|
|
552
|
-
f && (f.refCount--, f.refCount <= 0 && (s.call(this, i, f.handler, a), f.handler = void 0, delete c[i]), Object.keys(c).length === 0 && delete u.__sentry_instrumentation_handlers__);
|
|
553
|
-
} catch {
|
|
554
|
-
}
|
|
555
|
-
return s.call(this, i, o, a);
|
|
556
|
-
};
|
|
557
|
-
}));
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
var xe = null;
|
|
561
|
-
function nr() {
|
|
562
|
-
xe = E.onerror, E.onerror = function(t, e, n, r, s) {
|
|
563
|
-
return D("error", { column: r, error: s, line: n, msg: t, url: e }), xe && !xe.__SENTRY_LOADER__ ? xe.apply(this, arguments) : false;
|
|
564
|
-
}, E.onerror.__SENTRY_INSTRUMENTED__ = true;
|
|
565
|
-
}
|
|
566
|
-
var Ie = null;
|
|
567
|
-
function rr() {
|
|
568
|
-
Ie = E.onunhandledrejection, E.onunhandledrejection = function(t) {
|
|
569
|
-
return D("unhandledrejection", t), Ie && !Ie.__SENTRY_LOADER__ ? Ie.apply(this, arguments) : true;
|
|
570
|
-
}, E.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
|
|
571
|
-
}
|
|
572
|
-
function Xt() {
|
|
573
|
-
return typeof __SENTRY_BROWSER_BUNDLE__ < "u" && !!__SENTRY_BROWSER_BUNDLE__;
|
|
574
|
-
}
|
|
575
|
-
function Zt() {
|
|
576
|
-
return !Xt() && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
|
|
577
|
-
}
|
|
578
|
-
function Qt(t, e) {
|
|
579
|
-
return t.require(e);
|
|
580
|
-
}
|
|
581
|
-
function en() {
|
|
582
|
-
let t = typeof WeakSet == "function", e = t ? /* @__PURE__ */ new WeakSet() : [];
|
|
583
|
-
function n(s) {
|
|
584
|
-
if (t) return e.has(s) ? true : (e.add(s), false);
|
|
585
|
-
for (let i = 0; i < e.length; i++) if (e[i] === s) return true;
|
|
586
|
-
return e.push(s), false;
|
|
587
|
-
}
|
|
588
|
-
function r(s) {
|
|
589
|
-
if (t) e.delete(s);
|
|
590
|
-
else for (let i = 0; i < e.length; i++) if (e[i] === s) {
|
|
591
|
-
e.splice(i, 1);
|
|
357
|
+
function r(o) {
|
|
358
|
+
if (t4) e.delete(o);
|
|
359
|
+
else for (let s = 0; s < e.length; s++) if (e[s] === o) {
|
|
360
|
+
e.splice(s, 1);
|
|
592
361
|
break;
|
|
593
362
|
}
|
|
594
363
|
}
|
|
595
364
|
return [n, r];
|
|
596
365
|
}
|
|
597
|
-
function
|
|
598
|
-
let
|
|
366
|
+
function S() {
|
|
367
|
+
let t4 = m, e = t4.crypto || t4.msCrypto, n = () => Math.random() * 16;
|
|
599
368
|
try {
|
|
600
369
|
if (e && e.randomUUID) return e.randomUUID().replace(/-/g, "");
|
|
601
|
-
e && e.getRandomValues && (n = () =>
|
|
370
|
+
e && e.getRandomValues && (n = () => {
|
|
371
|
+
let r = new Uint8Array(1);
|
|
372
|
+
return e.getRandomValues(r), r[0];
|
|
373
|
+
});
|
|
602
374
|
} catch {
|
|
603
375
|
}
|
|
604
376
|
return ("10000000100040008000" + 1e11).replace(/[018]/g, (r) => (r ^ (n() & 15) >> r / 4).toString(16));
|
|
605
377
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
378
|
+
function Hn(t4) {
|
|
379
|
+
return t4.exception && t4.exception.values ? t4.exception.values[0] : void 0;
|
|
608
380
|
}
|
|
609
|
-
function
|
|
610
|
-
let r =
|
|
611
|
-
|
|
381
|
+
function Q(t4, e, n) {
|
|
382
|
+
let r = t4.exception = t4.exception || {}, o = r.values = r.values || [], s = o[0] = o[0] || {};
|
|
383
|
+
s.value || (s.value = e || ""), s.type || (s.type = n || "Error");
|
|
612
384
|
}
|
|
613
|
-
function
|
|
614
|
-
let n =
|
|
385
|
+
function B(t4, e) {
|
|
386
|
+
let n = Hn(t4);
|
|
615
387
|
if (!n) return;
|
|
616
|
-
let r = { type: "generic", handled: true },
|
|
617
|
-
if (n.mechanism = { ...r, ...
|
|
618
|
-
let
|
|
619
|
-
n.mechanism.data =
|
|
388
|
+
let r = { type: "generic", handled: true }, o = n.mechanism;
|
|
389
|
+
if (n.mechanism = { ...r, ...o, ...e }, e && "data" in e) {
|
|
390
|
+
let s = { ...o && o.data, ...e.data };
|
|
391
|
+
n.mechanism.data = s;
|
|
620
392
|
}
|
|
621
393
|
}
|
|
622
|
-
function
|
|
623
|
-
if (
|
|
394
|
+
function Ie(t4) {
|
|
395
|
+
if (t4 && t4.__sentry_captured__) return true;
|
|
624
396
|
try {
|
|
625
|
-
|
|
397
|
+
U(t4, "__sentry_captured__", true);
|
|
626
398
|
} catch {
|
|
627
399
|
}
|
|
628
400
|
return false;
|
|
629
401
|
}
|
|
630
|
-
function
|
|
631
|
-
return Array.isArray(
|
|
402
|
+
function ee(t4) {
|
|
403
|
+
return Array.isArray(t4) ? t4 : [t4];
|
|
632
404
|
}
|
|
633
|
-
function
|
|
405
|
+
function b(t4, e = 100, n = 1 / 0) {
|
|
634
406
|
try {
|
|
635
|
-
return
|
|
407
|
+
return Xe("", t4, e, n);
|
|
636
408
|
} catch (r) {
|
|
637
409
|
return { ERROR: `**non-serializable** (${r})` };
|
|
638
410
|
}
|
|
639
411
|
}
|
|
640
|
-
function
|
|
641
|
-
let r =
|
|
642
|
-
return
|
|
412
|
+
function Y(t4, e = 3, n = 100 * 1024) {
|
|
413
|
+
let r = b(t4, e);
|
|
414
|
+
return Jn(r) > n ? Y(t4, e - 1, n) : r;
|
|
643
415
|
}
|
|
644
|
-
function
|
|
645
|
-
let [
|
|
646
|
-
if (e == null || ["number", "boolean", "string"].includes(typeof e) && !
|
|
647
|
-
let a =
|
|
416
|
+
function Xe(t4, e, n = 1 / 0, r = 1 / 0, o = Lt()) {
|
|
417
|
+
let [s, i] = o;
|
|
418
|
+
if (e == null || ["number", "boolean", "string"].includes(typeof e) && !Number.isNaN(e)) return e;
|
|
419
|
+
let a = qn(t4, e);
|
|
648
420
|
if (!a.startsWith("[object ")) return a;
|
|
649
421
|
if (e.__sentry_skip_normalization__) return e;
|
|
650
|
-
let
|
|
651
|
-
if (
|
|
652
|
-
if (
|
|
653
|
-
let
|
|
654
|
-
if (
|
|
655
|
-
let
|
|
656
|
-
return
|
|
422
|
+
let c = typeof e.__sentry_override_normalization_depth__ == "number" ? e.__sentry_override_normalization_depth__ : n;
|
|
423
|
+
if (c === 0) return a.replace("object ", "");
|
|
424
|
+
if (s(e)) return "[Circular ~]";
|
|
425
|
+
let u = e;
|
|
426
|
+
if (u && typeof u.toJSON == "function") try {
|
|
427
|
+
let g = u.toJSON();
|
|
428
|
+
return Xe("", g, c - 1, r, o);
|
|
657
429
|
} catch {
|
|
658
430
|
}
|
|
659
|
-
let f = Array.isArray(e) ? [] : {},
|
|
660
|
-
for (let
|
|
661
|
-
if (!Object.prototype.hasOwnProperty.call(l,
|
|
662
|
-
if (
|
|
663
|
-
f[
|
|
431
|
+
let f = Array.isArray(e) ? [] : {}, p = 0, l = le(e);
|
|
432
|
+
for (let g in l) {
|
|
433
|
+
if (!Object.prototype.hasOwnProperty.call(l, g)) continue;
|
|
434
|
+
if (p >= r) {
|
|
435
|
+
f[g] = "[MaxProperties ~]";
|
|
664
436
|
break;
|
|
665
437
|
}
|
|
666
|
-
let
|
|
667
|
-
f[
|
|
438
|
+
let h = l[g];
|
|
439
|
+
f[g] = Xe(g, h, c - 1, r, o), p++;
|
|
668
440
|
}
|
|
669
|
-
return
|
|
441
|
+
return i(e), f;
|
|
670
442
|
}
|
|
671
|
-
function
|
|
443
|
+
function qn(t4, e) {
|
|
672
444
|
try {
|
|
673
|
-
if (
|
|
674
|
-
if (
|
|
445
|
+
if (t4 === "domain" && e && typeof e == "object" && e._events) return "[Domain]";
|
|
446
|
+
if (t4 === "domainEmitter") return "[DomainEmitter]";
|
|
675
447
|
if (typeof global < "u" && e === global) return "[Global]";
|
|
676
448
|
if (typeof window < "u" && e === window) return "[Window]";
|
|
677
449
|
if (typeof document < "u" && e === document) return "[Document]";
|
|
678
|
-
if (
|
|
679
|
-
if (
|
|
450
|
+
if (Ge(e)) return "[VueViewModel]";
|
|
451
|
+
if (je(e)) return "[SyntheticEvent]";
|
|
680
452
|
if (typeof e == "number" && e !== e) return "[NaN]";
|
|
681
|
-
if (typeof e == "function") return `[Function: ${
|
|
453
|
+
if (typeof e == "function") return `[Function: ${V(e)}]`;
|
|
682
454
|
if (typeof e == "symbol") return `[${String(e)}]`;
|
|
683
455
|
if (typeof e == "bigint") return `[BigInt: ${String(e)}]`;
|
|
684
|
-
let n =
|
|
456
|
+
let n = zn(e);
|
|
685
457
|
return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
|
|
686
458
|
} catch (n) {
|
|
687
459
|
return `**non-serializable** (${n})`;
|
|
688
460
|
}
|
|
689
461
|
}
|
|
690
|
-
function
|
|
691
|
-
let e = Object.getPrototypeOf(
|
|
462
|
+
function zn(t4) {
|
|
463
|
+
let e = Object.getPrototypeOf(t4);
|
|
692
464
|
return e ? e.constructor.name : "null prototype";
|
|
693
465
|
}
|
|
694
|
-
function
|
|
695
|
-
return ~-encodeURI(
|
|
466
|
+
function Yn(t4) {
|
|
467
|
+
return ~-encodeURI(t4).split(/%..|./).length;
|
|
696
468
|
}
|
|
697
|
-
function
|
|
698
|
-
return
|
|
469
|
+
function Jn(t4) {
|
|
470
|
+
return Yn(JSON.stringify(t4));
|
|
699
471
|
}
|
|
700
|
-
function
|
|
472
|
+
function Wn(t4, e) {
|
|
701
473
|
let n = 0;
|
|
702
|
-
for (let r =
|
|
703
|
-
let
|
|
704
|
-
|
|
474
|
+
for (let r = t4.length - 1; r >= 0; r--) {
|
|
475
|
+
let o = t4[r];
|
|
476
|
+
o === "." ? t4.splice(r, 1) : o === ".." ? (t4.splice(r, 1), n++) : n && (t4.splice(r, 1), n--);
|
|
705
477
|
}
|
|
706
|
-
if (e) for (; n--; n)
|
|
707
|
-
return
|
|
478
|
+
if (e) for (; n--; n) t4.unshift("..");
|
|
479
|
+
return t4;
|
|
708
480
|
}
|
|
709
|
-
var
|
|
710
|
-
function
|
|
711
|
-
let e =
|
|
481
|
+
var Kn = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
|
|
482
|
+
function Vn(t4) {
|
|
483
|
+
let e = t4.length > 1024 ? `<truncated>${t4.slice(-1024)}` : t4, n = Kn.exec(e);
|
|
712
484
|
return n ? n.slice(1) : [];
|
|
713
485
|
}
|
|
714
|
-
function
|
|
486
|
+
function Ze(...t4) {
|
|
715
487
|
let e = "", n = false;
|
|
716
|
-
for (let r =
|
|
717
|
-
let
|
|
718
|
-
|
|
488
|
+
for (let r = t4.length - 1; r >= -1 && !n; r--) {
|
|
489
|
+
let o = r >= 0 ? t4[r] : "/";
|
|
490
|
+
o && (e = `${o}/${e}`, n = o.charAt(0) === "/");
|
|
719
491
|
}
|
|
720
|
-
return e =
|
|
492
|
+
return e = Wn(e.split("/").filter((r) => !!r), !n).join("/"), (n ? "/" : "") + e || ".";
|
|
721
493
|
}
|
|
722
|
-
function
|
|
494
|
+
function Ft(t4) {
|
|
723
495
|
let e = 0;
|
|
724
|
-
for (; e <
|
|
725
|
-
let n =
|
|
726
|
-
for (; n >= 0 &&
|
|
727
|
-
return e > n ? [] :
|
|
728
|
-
}
|
|
729
|
-
function
|
|
730
|
-
|
|
731
|
-
let n =
|
|
732
|
-
for (let a = 0; a <
|
|
733
|
-
|
|
496
|
+
for (; e < t4.length && t4[e] === ""; e++) ;
|
|
497
|
+
let n = t4.length - 1;
|
|
498
|
+
for (; n >= 0 && t4[n] === ""; n--) ;
|
|
499
|
+
return e > n ? [] : t4.slice(e, n - e + 1);
|
|
500
|
+
}
|
|
501
|
+
function Qe(t4, e) {
|
|
502
|
+
t4 = Ze(t4).slice(1), e = Ze(e).slice(1);
|
|
503
|
+
let n = Ft(t4.split("/")), r = Ft(e.split("/")), o = Math.min(n.length, r.length), s = o;
|
|
504
|
+
for (let a = 0; a < o; a++) if (n[a] !== r[a]) {
|
|
505
|
+
s = a;
|
|
734
506
|
break;
|
|
735
507
|
}
|
|
736
|
-
let
|
|
737
|
-
for (let a =
|
|
738
|
-
return
|
|
508
|
+
let i = [];
|
|
509
|
+
for (let a = s; a < n.length; a++) i.push("..");
|
|
510
|
+
return i = i.concat(r.slice(s)), i.join("/");
|
|
739
511
|
}
|
|
740
|
-
function
|
|
741
|
-
let n =
|
|
512
|
+
function te(t4, e) {
|
|
513
|
+
let n = Vn(t4)[2];
|
|
742
514
|
return e && n.slice(e.length * -1) === e && (n = n.slice(0, n.length - e.length)), n;
|
|
743
515
|
}
|
|
744
|
-
var
|
|
745
|
-
(function(
|
|
746
|
-
|
|
516
|
+
var N;
|
|
517
|
+
(function(t4) {
|
|
518
|
+
t4[t4.PENDING = 0] = "PENDING";
|
|
747
519
|
let n = 1;
|
|
748
|
-
|
|
520
|
+
t4[t4.RESOLVED = n] = "RESOLVED";
|
|
749
521
|
let r = 2;
|
|
750
|
-
|
|
751
|
-
})(
|
|
752
|
-
function
|
|
753
|
-
return new
|
|
754
|
-
e(
|
|
522
|
+
t4[t4.REJECTED = r] = "REJECTED";
|
|
523
|
+
})(N || (N = {}));
|
|
524
|
+
function I(t4) {
|
|
525
|
+
return new R((e) => {
|
|
526
|
+
e(t4);
|
|
755
527
|
});
|
|
756
528
|
}
|
|
757
|
-
function
|
|
758
|
-
return new
|
|
759
|
-
n(
|
|
529
|
+
function $(t4) {
|
|
530
|
+
return new R((e, n) => {
|
|
531
|
+
n(t4);
|
|
760
532
|
});
|
|
761
533
|
}
|
|
762
|
-
var
|
|
534
|
+
var R = class t {
|
|
763
535
|
constructor(e) {
|
|
764
|
-
|
|
536
|
+
t.prototype.__init.call(this), t.prototype.__init2.call(this), t.prototype.__init3.call(this), t.prototype.__init4.call(this), this._state = N.PENDING, this._handlers = [];
|
|
765
537
|
try {
|
|
766
538
|
e(this._resolve, this._reject);
|
|
767
539
|
} catch (n) {
|
|
@@ -769,20 +541,20 @@ var S = class {
|
|
|
769
541
|
}
|
|
770
542
|
}
|
|
771
543
|
then(e, n) {
|
|
772
|
-
return new
|
|
773
|
-
this._handlers.push([false, (
|
|
774
|
-
if (!e) r(
|
|
544
|
+
return new t((r, o) => {
|
|
545
|
+
this._handlers.push([false, (s) => {
|
|
546
|
+
if (!e) r(s);
|
|
775
547
|
else try {
|
|
776
|
-
r(e(
|
|
777
|
-
} catch (
|
|
778
|
-
|
|
548
|
+
r(e(s));
|
|
549
|
+
} catch (i) {
|
|
550
|
+
o(i);
|
|
779
551
|
}
|
|
780
|
-
}, (
|
|
781
|
-
if (!n) s
|
|
552
|
+
}, (s) => {
|
|
553
|
+
if (!n) o(s);
|
|
782
554
|
else try {
|
|
783
|
-
r(n(
|
|
784
|
-
} catch (
|
|
785
|
-
|
|
555
|
+
r(n(s));
|
|
556
|
+
} catch (i) {
|
|
557
|
+
o(i);
|
|
786
558
|
}
|
|
787
559
|
}]), this._executeHandlers();
|
|
788
560
|
});
|
|
@@ -791,35 +563,35 @@ var S = class {
|
|
|
791
563
|
return this.then((n) => n, e);
|
|
792
564
|
}
|
|
793
565
|
finally(e) {
|
|
794
|
-
return new
|
|
795
|
-
let
|
|
796
|
-
return this.then((
|
|
797
|
-
|
|
798
|
-
}, (
|
|
799
|
-
|
|
566
|
+
return new t((n, r) => {
|
|
567
|
+
let o, s;
|
|
568
|
+
return this.then((i) => {
|
|
569
|
+
s = false, o = i, e && e();
|
|
570
|
+
}, (i) => {
|
|
571
|
+
s = true, o = i, e && e();
|
|
800
572
|
}).then(() => {
|
|
801
|
-
if (
|
|
802
|
-
r(
|
|
573
|
+
if (s) {
|
|
574
|
+
r(o);
|
|
803
575
|
return;
|
|
804
576
|
}
|
|
805
|
-
n(
|
|
577
|
+
n(o);
|
|
806
578
|
});
|
|
807
579
|
});
|
|
808
580
|
}
|
|
809
581
|
__init() {
|
|
810
582
|
this._resolve = (e) => {
|
|
811
|
-
this._setResult(
|
|
583
|
+
this._setResult(N.RESOLVED, e);
|
|
812
584
|
};
|
|
813
585
|
}
|
|
814
586
|
__init2() {
|
|
815
587
|
this._reject = (e) => {
|
|
816
|
-
this._setResult(
|
|
588
|
+
this._setResult(N.REJECTED, e);
|
|
817
589
|
};
|
|
818
590
|
}
|
|
819
591
|
__init3() {
|
|
820
592
|
this._setResult = (e, n) => {
|
|
821
|
-
if (this._state ===
|
|
822
|
-
if (
|
|
593
|
+
if (this._state === N.PENDING) {
|
|
594
|
+
if (C(n)) {
|
|
823
595
|
n.then(this._resolve, this._reject);
|
|
824
596
|
return;
|
|
825
597
|
}
|
|
@@ -829,283 +601,261 @@ var S = class {
|
|
|
829
601
|
}
|
|
830
602
|
__init4() {
|
|
831
603
|
this._executeHandlers = () => {
|
|
832
|
-
if (this._state ===
|
|
604
|
+
if (this._state === N.PENDING) return;
|
|
833
605
|
let e = this._handlers.slice();
|
|
834
606
|
this._handlers = [], e.forEach((n) => {
|
|
835
|
-
n[0] || (this._state ===
|
|
607
|
+
n[0] || (this._state === N.RESOLVED && n[1](this._value), this._state === N.REJECTED && n[2](this._value), n[0] = true);
|
|
836
608
|
});
|
|
837
609
|
};
|
|
838
610
|
}
|
|
839
611
|
};
|
|
840
|
-
function
|
|
612
|
+
function et(t4) {
|
|
841
613
|
let e = [];
|
|
842
614
|
function n() {
|
|
843
|
-
return
|
|
615
|
+
return t4 === void 0 || e.length < t4;
|
|
844
616
|
}
|
|
845
|
-
function r(
|
|
846
|
-
return e.splice(e.indexOf(
|
|
617
|
+
function r(i) {
|
|
618
|
+
return e.splice(e.indexOf(i), 1)[0];
|
|
847
619
|
}
|
|
848
|
-
function
|
|
849
|
-
if (!n()) return
|
|
850
|
-
let a =
|
|
620
|
+
function o(i) {
|
|
621
|
+
if (!n()) return $(new y("Not adding Promise because buffer limit was reached."));
|
|
622
|
+
let a = i();
|
|
851
623
|
return e.indexOf(a) === -1 && e.push(a), a.then(() => r(a)).then(null, () => r(a).then(null, () => {
|
|
852
624
|
})), a;
|
|
853
625
|
}
|
|
854
|
-
function i
|
|
855
|
-
return new
|
|
856
|
-
let
|
|
857
|
-
if (!
|
|
626
|
+
function s(i) {
|
|
627
|
+
return new R((a, c) => {
|
|
628
|
+
let u = e.length;
|
|
629
|
+
if (!u) return a(true);
|
|
858
630
|
let f = setTimeout(() => {
|
|
859
|
-
|
|
860
|
-
},
|
|
861
|
-
e.forEach((
|
|
862
|
-
|
|
863
|
-
--
|
|
864
|
-
},
|
|
631
|
+
i && i > 0 && a(false);
|
|
632
|
+
}, i);
|
|
633
|
+
e.forEach((p) => {
|
|
634
|
+
I(p).then(() => {
|
|
635
|
+
--u || (clearTimeout(f), a(true));
|
|
636
|
+
}, c);
|
|
865
637
|
});
|
|
866
638
|
});
|
|
867
639
|
}
|
|
868
|
-
return { $: e, add:
|
|
640
|
+
return { $: e, add: o, drain: s };
|
|
869
641
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
function pr() {
|
|
873
|
-
let { performance: t } = rn;
|
|
874
|
-
if (!t || !t.now) return;
|
|
875
|
-
let e = Date.now() - t.now();
|
|
876
|
-
return { now: () => t.now(), timeOrigin: e };
|
|
642
|
+
function Ut(t4, e = false) {
|
|
643
|
+
return !(e || t4 && !t4.startsWith("/") && !t4.match(/^[A-Z]:/) && !t4.startsWith(".") && !t4.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && t4 !== void 0 && !t4.includes("node_modules/");
|
|
877
644
|
}
|
|
878
|
-
function
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
645
|
+
function Bt(t4) {
|
|
646
|
+
let e = /^\s*[-]{4,}$/, n = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
647
|
+
return (r) => {
|
|
648
|
+
let o = r.match(n);
|
|
649
|
+
if (o) {
|
|
650
|
+
let s, i, a, c, u;
|
|
651
|
+
if (o[1]) {
|
|
652
|
+
a = o[1];
|
|
653
|
+
let l = a.lastIndexOf(".");
|
|
654
|
+
if (a[l - 1] === "." && l--, l > 0) {
|
|
655
|
+
s = a.slice(0, l), i = a.slice(l + 1);
|
|
656
|
+
let g = s.indexOf(".Module");
|
|
657
|
+
g > 0 && (a = a.slice(g + 1), s = s.slice(0, g));
|
|
658
|
+
}
|
|
659
|
+
c = void 0;
|
|
660
|
+
}
|
|
661
|
+
i && (c = s, u = i), i === "<anonymous>" && (u = void 0, a = void 0), a === void 0 && (u = u || me, a = c ? `${c}.${u}` : u);
|
|
662
|
+
let f = o[2] && o[2].startsWith("file://") ? o[2].slice(7) : o[2], p = o[5] === "native";
|
|
663
|
+
return f && f.match(/\/[A-Z]:/) && (f = f.slice(1)), !f && o[5] && !p && (f = o[5]), { filename: f, module: t4 ? t4(f) : void 0, function: a, lineno: parseInt(o[3], 10) || void 0, colno: parseInt(o[4], 10) || void 0, in_app: Ut(f, p) };
|
|
664
|
+
}
|
|
665
|
+
if (r.match(e)) return { filename: r };
|
|
666
|
+
};
|
|
884
667
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
var L = it.nowSeconds.bind(it);
|
|
888
|
-
var Y = nn.nowSeconds.bind(nn);
|
|
889
|
-
var de;
|
|
890
|
-
var mr = (() => {
|
|
891
|
-
let { performance: t } = rn;
|
|
892
|
-
if (!t || !t.now) {
|
|
893
|
-
de = "none";
|
|
894
|
-
return;
|
|
895
|
-
}
|
|
896
|
-
let e = 3600 * 1e3, n = t.now(), r = Date.now(), s = t.timeOrigin ? Math.abs(t.timeOrigin + n - r) : e, i = s < e, o = t.timing && t.timing.navigationStart, u = typeof o == "number" ? Math.abs(o + n - r) : e, c = u < e;
|
|
897
|
-
return i || c ? s <= u ? (de = "timeOrigin", t.timeOrigin) : (de = "navigationStart", o) : (de = "dateNow", r);
|
|
898
|
-
})();
|
|
899
|
-
var _r = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");
|
|
900
|
-
function ot(t = h(), e = h().substring(16), n) {
|
|
901
|
-
let r = "";
|
|
902
|
-
return n !== void 0 && (r = n ? "-1" : "-0"), `${t}-${e}${r}`;
|
|
668
|
+
function tt(t4) {
|
|
669
|
+
return [90, Bt(t4)];
|
|
903
670
|
}
|
|
904
|
-
function
|
|
905
|
-
return [
|
|
671
|
+
function P(t4, e = []) {
|
|
672
|
+
return [t4, e];
|
|
906
673
|
}
|
|
907
|
-
function
|
|
908
|
-
let [n, r] =
|
|
674
|
+
function rt(t4, e) {
|
|
675
|
+
let [n, r] = t4;
|
|
909
676
|
return [n, [...r, e]];
|
|
910
677
|
}
|
|
911
|
-
function
|
|
912
|
-
let n =
|
|
678
|
+
function xe(t4, e) {
|
|
679
|
+
let n = t4[1];
|
|
913
680
|
for (let r of n) {
|
|
914
|
-
let
|
|
915
|
-
if (e(r,
|
|
681
|
+
let o = r[0].type;
|
|
682
|
+
if (e(r, o)) return true;
|
|
916
683
|
}
|
|
917
684
|
return false;
|
|
918
685
|
}
|
|
919
|
-
function
|
|
920
|
-
return (
|
|
686
|
+
function nt(t4) {
|
|
687
|
+
return m.__SENTRY__ && m.__SENTRY__.encodePolyfill ? m.__SENTRY__.encodePolyfill(t4) : new TextEncoder().encode(t4);
|
|
921
688
|
}
|
|
922
|
-
function
|
|
923
|
-
let [
|
|
924
|
-
function
|
|
925
|
-
typeof
|
|
689
|
+
function ot(t4) {
|
|
690
|
+
let [e, n] = t4, r = JSON.stringify(e);
|
|
691
|
+
function o(s) {
|
|
692
|
+
typeof r == "string" ? r = typeof s == "string" ? r + s : [nt(r), s] : r.push(typeof s == "string" ? nt(s) : s);
|
|
926
693
|
}
|
|
927
|
-
for (let
|
|
928
|
-
let [
|
|
929
|
-
if (
|
|
930
|
-
${JSON.stringify(
|
|
931
|
-
`), typeof
|
|
694
|
+
for (let s of n) {
|
|
695
|
+
let [i, a] = s;
|
|
696
|
+
if (o(`
|
|
697
|
+
${JSON.stringify(i)}
|
|
698
|
+
`), typeof a == "string" || a instanceof Uint8Array) o(a);
|
|
932
699
|
else {
|
|
933
700
|
let c;
|
|
934
701
|
try {
|
|
935
|
-
c = JSON.stringify(
|
|
702
|
+
c = JSON.stringify(a);
|
|
936
703
|
} catch {
|
|
937
|
-
c = JSON.stringify(
|
|
704
|
+
c = JSON.stringify(b(a));
|
|
938
705
|
}
|
|
939
|
-
|
|
706
|
+
o(c);
|
|
940
707
|
}
|
|
941
708
|
}
|
|
942
|
-
return typeof
|
|
709
|
+
return typeof r == "string" ? r : Xn(r);
|
|
943
710
|
}
|
|
944
|
-
function
|
|
945
|
-
let e =
|
|
946
|
-
for (let
|
|
711
|
+
function Xn(t4) {
|
|
712
|
+
let e = t4.reduce((o, s) => o + s.length, 0), n = new Uint8Array(e), r = 0;
|
|
713
|
+
for (let o of t4) n.set(o, r), r += o.length;
|
|
947
714
|
return n;
|
|
948
715
|
}
|
|
949
|
-
function
|
|
950
|
-
let
|
|
951
|
-
return [
|
|
716
|
+
function st(t4) {
|
|
717
|
+
let e = typeof t4.data == "string" ? nt(t4.data) : t4.data;
|
|
718
|
+
return [E({ type: "attachment", length: e.length, filename: t4.filename, content_type: t4.contentType, attachment_type: t4.attachmentType }), e];
|
|
952
719
|
}
|
|
953
|
-
var
|
|
954
|
-
function Ae(
|
|
955
|
-
return
|
|
720
|
+
var Zn = { session: "session", sessions: "session", attachment: "attachment", transaction: "transaction", event: "error", client_report: "internal", user_report: "default", profile: "profile", profile_chunk: "profile", replay_event: "replay", replay_recording: "replay", check_in: "monitor", feedback: "feedback", span: "span", statsd: "metric_bucket" };
|
|
721
|
+
function Ae(t4) {
|
|
722
|
+
return Zn[t4];
|
|
956
723
|
}
|
|
957
|
-
function
|
|
958
|
-
if (!
|
|
959
|
-
let { name: e, version: n } =
|
|
724
|
+
function be(t4) {
|
|
725
|
+
if (!t4 || !t4.sdk) return;
|
|
726
|
+
let { name: e, version: n } = t4.sdk;
|
|
960
727
|
return { name: e, version: n };
|
|
961
728
|
}
|
|
962
|
-
function
|
|
963
|
-
let
|
|
964
|
-
return { event_id:
|
|
729
|
+
function it(t4, e, n, r) {
|
|
730
|
+
let o = t4.sdkProcessingMetadata && t4.sdkProcessingMetadata.dynamicSamplingContext;
|
|
731
|
+
return { event_id: t4.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn: M(r) }, ...o && { trace: E({ ...o }) } };
|
|
965
732
|
}
|
|
966
|
-
function
|
|
967
|
-
let n = parseInt(`${
|
|
733
|
+
function $t(t4, e = Date.now()) {
|
|
734
|
+
let n = parseInt(`${t4}`, 10);
|
|
968
735
|
if (!isNaN(n)) return n * 1e3;
|
|
969
|
-
let r = Date.parse(`${
|
|
736
|
+
let r = Date.parse(`${t4}`);
|
|
970
737
|
return isNaN(r) ? 6e4 : r - e;
|
|
971
738
|
}
|
|
972
|
-
function
|
|
973
|
-
return
|
|
739
|
+
function jt(t4, e) {
|
|
740
|
+
return t4[e] || t4.all || 0;
|
|
974
741
|
}
|
|
975
|
-
function
|
|
976
|
-
return
|
|
742
|
+
function at(t4, e, n = Date.now()) {
|
|
743
|
+
return jt(t4, e) > n;
|
|
977
744
|
}
|
|
978
|
-
function
|
|
979
|
-
let
|
|
980
|
-
if (
|
|
981
|
-
let [u,
|
|
982
|
-
if (!
|
|
983
|
-
else for (let
|
|
745
|
+
function ct(t4, { statusCode: e, headers: n }, r = Date.now()) {
|
|
746
|
+
let o = { ...t4 }, s = n && n["x-sentry-rate-limits"], i = n && n["retry-after"];
|
|
747
|
+
if (s) for (let a of s.trim().split(",")) {
|
|
748
|
+
let [c, u, , , f] = a.split(":", 5), p = parseInt(c, 10), l = (isNaN(p) ? 60 : p) * 1e3;
|
|
749
|
+
if (!u) o.all = r + l;
|
|
750
|
+
else for (let g of u.split(";")) g === "metric_bucket" ? (!f || f.split(";").includes("custom")) && (o[g] = r + l) : o[g] = r + l;
|
|
984
751
|
}
|
|
985
|
-
else
|
|
986
|
-
return
|
|
752
|
+
else i ? o.all = r + $t(i, r) : e === 429 && (o.all = r + 60 * 1e3);
|
|
753
|
+
return o;
|
|
987
754
|
}
|
|
988
|
-
function
|
|
989
|
-
return
|
|
755
|
+
function ut(t4, e) {
|
|
756
|
+
return t4(e.stack || "", 1);
|
|
990
757
|
}
|
|
991
|
-
function
|
|
992
|
-
let n = { type: e.name || e.constructor.name, value: e.message }, r =
|
|
758
|
+
function Gt(t4, e) {
|
|
759
|
+
let n = { type: e.name || e.constructor.name, value: e.message }, r = ut(t4, e);
|
|
993
760
|
return r.length && (n.stacktrace = { frames: r }), n;
|
|
994
761
|
}
|
|
995
|
-
function
|
|
996
|
-
|
|
997
|
-
let
|
|
998
|
-
|
|
999
|
-
} else return "message" in t && typeof t.message == "string" ? t.message : `Object captured as exception with keys: ${ne(t)}`;
|
|
1000
|
-
}
|
|
1001
|
-
function _t(t, e, n, r) {
|
|
1002
|
-
let s = n, o = r && r.data && r.data.mechanism || { handled: true, type: "generic" };
|
|
1003
|
-
if (!G(n)) {
|
|
1004
|
-
if (R(n)) {
|
|
1005
|
-
let u = t(), c = u.getClient(), f = c && c.getOptions().normalizeDepth;
|
|
1006
|
-
u.configureScope((l) => {
|
|
1007
|
-
l.setExtra("__serialized__", z(n, f));
|
|
1008
|
-
});
|
|
1009
|
-
let d = Er(n);
|
|
1010
|
-
s = r && r.syntheticException || new Error(d), s.message = d;
|
|
1011
|
-
} else s = r && r.syntheticException || new Error(n), s.message = n;
|
|
1012
|
-
o.synthetic = true;
|
|
762
|
+
function Qn(t4) {
|
|
763
|
+
for (let e in t4) if (Object.prototype.hasOwnProperty.call(t4, e)) {
|
|
764
|
+
let n = t4[e];
|
|
765
|
+
if (n instanceof Error) return n;
|
|
1013
766
|
}
|
|
1014
|
-
let a = { exception: { values: [an(e, s)] } };
|
|
1015
|
-
return oe(a, void 0, void 0), ae(a, o), { ...a, event_id: r && r.event_id };
|
|
1016
767
|
}
|
|
1017
|
-
function
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
return
|
|
768
|
+
function er(t4) {
|
|
769
|
+
if ("name" in t4 && typeof t4.name == "string") {
|
|
770
|
+
let r = `'${t4.name}' captured as exception`;
|
|
771
|
+
return "message" in t4 && typeof t4.message == "string" && (r += ` with message '${t4.message}'`), r;
|
|
772
|
+
} else if ("message" in t4 && typeof t4.message == "string") return t4.message;
|
|
773
|
+
let e = K(t4);
|
|
774
|
+
if (Fe(t4)) return `Event \`ErrorEvent\` captured as exception with message \`${t4.message}\``;
|
|
775
|
+
let n = tr(t4);
|
|
776
|
+
return `${n && n !== "Object" ? `'${n}'` : "Object"} captured as exception with keys: ${e}`;
|
|
1024
777
|
}
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
O.prototype.__init.call(this), this.name = O.id, e.root && (this._root = e.root), this._prefix = e.prefix || "app:///", e.iteratee && (this._iteratee = e.iteratee);
|
|
1031
|
-
}
|
|
1032
|
-
setupOnce(e, n) {
|
|
1033
|
-
}
|
|
1034
|
-
processEvent(e) {
|
|
1035
|
-
return this.process(e);
|
|
1036
|
-
}
|
|
1037
|
-
process(e) {
|
|
1038
|
-
let n = e;
|
|
1039
|
-
return e.exception && Array.isArray(e.exception.values) && (n = this._processExceptionsEvent(n)), n;
|
|
778
|
+
function tr(t4) {
|
|
779
|
+
try {
|
|
780
|
+
let e = Object.getPrototypeOf(t4);
|
|
781
|
+
return e ? e.constructor.name : void 0;
|
|
782
|
+
} catch {
|
|
1040
783
|
}
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
return e;
|
|
1050
|
-
};
|
|
784
|
+
}
|
|
785
|
+
function nr(t4, e, n, r) {
|
|
786
|
+
if (F(n)) return [n, void 0];
|
|
787
|
+
if (e.synthetic = true, A(n)) {
|
|
788
|
+
let s = t4 && t4.getOptions().normalizeDepth, i = { __serialized__: Y(n, s) }, a = Qn(n);
|
|
789
|
+
if (a) return [a, i];
|
|
790
|
+
let c = er(n), u = r && r.syntheticException || new Error(c);
|
|
791
|
+
return u.message = c, [u, i];
|
|
1051
792
|
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
793
|
+
let o = r && r.syntheticException || new Error(n);
|
|
794
|
+
return o.message = `${n}`, [o, void 0];
|
|
795
|
+
}
|
|
796
|
+
function pt(t4, e, n, r) {
|
|
797
|
+
let s = r && r.data && r.data.mechanism || { handled: true, type: "generic" }, [i, a] = nr(t4, s, n, r), c = { exception: { values: [Gt(e, i)] } };
|
|
798
|
+
return a && (c.extra = a), Q(c, void 0, void 0), B(c, s), { ...c, event_id: r && r.event_id };
|
|
799
|
+
}
|
|
800
|
+
function ft(t4, e, n = "info", r, o) {
|
|
801
|
+
let s = { event_id: r && r.event_id, level: n };
|
|
802
|
+
if (o && r && r.syntheticException) {
|
|
803
|
+
let i = ut(t4, r.syntheticException);
|
|
804
|
+
i.length && (s.exception = { values: [{ value: e, stacktrace: { frames: i } }] });
|
|
1058
805
|
}
|
|
1059
|
-
|
|
1060
|
-
|
|
806
|
+
if (H(e)) {
|
|
807
|
+
let { __sentry_template_string__: i, __sentry_template_values__: a } = e;
|
|
808
|
+
return s.logentry = { message: i, params: a }, s;
|
|
1061
809
|
}
|
|
1062
|
-
|
|
1063
|
-
O.__initStatic();
|
|
1064
|
-
var V = "production";
|
|
1065
|
-
function fe() {
|
|
1066
|
-
return ee("globalEventProcessors", () => []);
|
|
1067
|
-
}
|
|
1068
|
-
function cn(t) {
|
|
1069
|
-
fe().push(t);
|
|
1070
|
-
}
|
|
1071
|
-
function K(t, e, n, r = 0) {
|
|
1072
|
-
return new S((s, i) => {
|
|
1073
|
-
let o = t[r];
|
|
1074
|
-
if (e === null || typeof o != "function") s(e);
|
|
1075
|
-
else {
|
|
1076
|
-
let a = o({ ...e }, n);
|
|
1077
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && o.id && a === null && p.log(`Event processor "${o.id}" dropped event`), F(a) ? a.then((u) => K(t, u, n, r + 1).then(s)).then(null, i) : K(t, a, n, r + 1).then(s).then(null, i);
|
|
1078
|
-
}
|
|
1079
|
-
});
|
|
810
|
+
return s.message = e, s;
|
|
1080
811
|
}
|
|
1081
|
-
function
|
|
1082
|
-
|
|
1083
|
-
return t && v(n, t), n;
|
|
812
|
+
function Re() {
|
|
813
|
+
return { traceId: S(), spanId: S().substring(16) };
|
|
1084
814
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
815
|
+
var _ = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
|
|
816
|
+
function w() {
|
|
817
|
+
return ne(m), m;
|
|
818
|
+
}
|
|
819
|
+
function ne(t4) {
|
|
820
|
+
let e = t4.__SENTRY__ = t4.__SENTRY__ || {};
|
|
821
|
+
return e.version = e.version || D, e[D] = e[D] || {};
|
|
822
|
+
}
|
|
823
|
+
function re(t4, e = {}) {
|
|
824
|
+
if (e.user && (!t4.ipAddress && e.user.ip_address && (t4.ipAddress = e.user.ip_address), !t4.did && !e.did && (t4.did = e.user.id || e.user.email || e.user.username)), t4.timestamp = e.timestamp || Z(), e.abnormal_mechanism && (t4.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t4.ignoreDuration = e.ignoreDuration), e.sid && (t4.sid = e.sid.length === 32 ? e.sid : S()), e.init !== void 0 && (t4.init = e.init), !t4.did && e.did && (t4.did = `${e.did}`), typeof e.started == "number" && (t4.started = e.started), t4.ignoreDuration) t4.duration = void 0;
|
|
825
|
+
else if (typeof e.duration == "number") t4.duration = e.duration;
|
|
1088
826
|
else {
|
|
1089
|
-
let n =
|
|
1090
|
-
|
|
827
|
+
let n = t4.timestamp - t4.started;
|
|
828
|
+
t4.duration = n >= 0 ? n : 0;
|
|
1091
829
|
}
|
|
1092
|
-
e.release && (
|
|
830
|
+
e.release && (t4.release = e.release), e.environment && (t4.environment = e.environment), !t4.ipAddress && e.ipAddress && (t4.ipAddress = e.ipAddress), !t4.userAgent && e.userAgent && (t4.userAgent = e.userAgent), typeof e.errors == "number" && (t4.errors = e.errors), e.status && (t4.status = e.status);
|
|
1093
831
|
}
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
e ?
|
|
832
|
+
var dt = "_sentrySpan";
|
|
833
|
+
function lt(t4, e) {
|
|
834
|
+
e ? U(t4, dt, e) : delete t4[dt];
|
|
1097
835
|
}
|
|
1098
|
-
function
|
|
1099
|
-
return
|
|
836
|
+
function j(t4) {
|
|
837
|
+
return t4[dt];
|
|
1100
838
|
}
|
|
1101
|
-
var
|
|
1102
|
-
var
|
|
839
|
+
var or = 100;
|
|
840
|
+
var mt = class t2 {
|
|
1103
841
|
constructor() {
|
|
1104
|
-
this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext =
|
|
842
|
+
this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = Re();
|
|
1105
843
|
}
|
|
1106
|
-
|
|
1107
|
-
let
|
|
1108
|
-
return e
|
|
844
|
+
clone() {
|
|
845
|
+
let e = new t2();
|
|
846
|
+
return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, e._user = this._user, e._level = this._level, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._requestSession = this._requestSession, e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._client = this._client, e._lastEventId = this._lastEventId, lt(e, j(this)), e;
|
|
847
|
+
}
|
|
848
|
+
setClient(e) {
|
|
849
|
+
this._client = e;
|
|
850
|
+
}
|
|
851
|
+
setLastEventId(e) {
|
|
852
|
+
this._lastEventId = e;
|
|
853
|
+
}
|
|
854
|
+
getClient() {
|
|
855
|
+
return this._client;
|
|
856
|
+
}
|
|
857
|
+
lastEventId() {
|
|
858
|
+
return this._lastEventId;
|
|
1109
859
|
}
|
|
1110
860
|
addScopeListener(e) {
|
|
1111
861
|
this._scopeListeners.push(e);
|
|
@@ -1114,7 +864,7 @@ var k = class {
|
|
|
1114
864
|
return this._eventProcessors.push(e), this;
|
|
1115
865
|
}
|
|
1116
866
|
setUser(e) {
|
|
1117
|
-
return this._user = e || {}, this._session &&
|
|
867
|
+
return this._user = e || { email: void 0, id: void 0, ip_address: void 0, username: void 0 }, this._session && re(this._session, { user: e }), this._notifyScopeListeners(), this;
|
|
1118
868
|
}
|
|
1119
869
|
getUser() {
|
|
1120
870
|
return this._user;
|
|
@@ -1149,16 +899,6 @@ var k = class {
|
|
|
1149
899
|
setContext(e, n) {
|
|
1150
900
|
return n === null ? delete this._contexts[e] : this._contexts[e] = n, this._notifyScopeListeners(), this;
|
|
1151
901
|
}
|
|
1152
|
-
setSpan(e) {
|
|
1153
|
-
return this._span = e, this._notifyScopeListeners(), this;
|
|
1154
|
-
}
|
|
1155
|
-
getSpan() {
|
|
1156
|
-
return this._span;
|
|
1157
|
-
}
|
|
1158
|
-
getTransaction() {
|
|
1159
|
-
let e = this.getSpan();
|
|
1160
|
-
return e && e.transaction;
|
|
1161
|
-
}
|
|
1162
902
|
setSession(e) {
|
|
1163
903
|
return e ? this._session = e : delete this._session, this._notifyScopeListeners(), this;
|
|
1164
904
|
}
|
|
@@ -1167,20 +907,17 @@ var k = class {
|
|
|
1167
907
|
}
|
|
1168
908
|
update(e) {
|
|
1169
909
|
if (!e) return this;
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
return n instanceof k ? n : this;
|
|
1173
|
-
}
|
|
1174
|
-
return e instanceof k ? (this._tags = { ...this._tags, ...e._tags }, this._extra = { ...this._extra, ...e._extra }, this._contexts = { ...this._contexts, ...e._contexts }, e._user && Object.keys(e._user).length && (this._user = e._user), e._level && (this._level = e._level), e._fingerprint && (this._fingerprint = e._fingerprint), e._requestSession && (this._requestSession = e._requestSession), e._propagationContext && (this._propagationContext = e._propagationContext)) : R(e) && (e = e, this._tags = { ...this._tags, ...e.tags }, this._extra = { ...this._extra, ...e.extra }, this._contexts = { ...this._contexts, ...e.contexts }, e.user && (this._user = e.user), e.level && (this._level = e.level), e.fingerprint && (this._fingerprint = e.fingerprint), e.requestSession && (this._requestSession = e.requestSession), e.propagationContext && (this._propagationContext = e.propagationContext)), this;
|
|
910
|
+
let n = typeof e == "function" ? e(this) : e, [r, o] = n instanceof x ? [n.getScopeData(), n.getRequestSession()] : A(n) ? [e, e.requestSession] : [], { tags: s, extra: i, user: a, contexts: c, level: u, fingerprint: f = [], propagationContext: p } = r || {};
|
|
911
|
+
return this._tags = { ...this._tags, ...s }, this._extra = { ...this._extra, ...i }, this._contexts = { ...this._contexts, ...c }, a && Object.keys(a).length && (this._user = a), u && (this._level = u), f.length && (this._fingerprint = f), p && (this._propagationContext = p), o && (this._requestSession = o), this;
|
|
1175
912
|
}
|
|
1176
913
|
clear() {
|
|
1177
|
-
return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this.
|
|
914
|
+
return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, lt(this, void 0), this._attachments = [], this._propagationContext = Re(), this._notifyScopeListeners(), this;
|
|
1178
915
|
}
|
|
1179
916
|
addBreadcrumb(e, n) {
|
|
1180
|
-
let r = typeof n == "number" ? n :
|
|
917
|
+
let r = typeof n == "number" ? n : or;
|
|
1181
918
|
if (r <= 0) return this;
|
|
1182
|
-
let
|
|
1183
|
-
return
|
|
919
|
+
let o = { timestamp: z(), ...e }, s = this._breadcrumbs;
|
|
920
|
+
return s.push(o), this._breadcrumbs = s.length > r ? s.slice(-r) : s, this._notifyScopeListeners(), this;
|
|
1184
921
|
}
|
|
1185
922
|
getLastBreadcrumb() {
|
|
1186
923
|
return this._breadcrumbs[this._breadcrumbs.length - 1];
|
|
@@ -1191,25 +928,11 @@ var k = class {
|
|
|
1191
928
|
addAttachment(e) {
|
|
1192
929
|
return this._attachments.push(e), this;
|
|
1193
930
|
}
|
|
1194
|
-
getAttachments() {
|
|
1195
|
-
return this._attachments;
|
|
1196
|
-
}
|
|
1197
931
|
clearAttachments() {
|
|
1198
932
|
return this._attachments = [], this;
|
|
1199
933
|
}
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
e.contexts = { trace: this._span.getTraceContext(), ...e.contexts };
|
|
1203
|
-
let o = this._span.transaction;
|
|
1204
|
-
if (o) {
|
|
1205
|
-
e.sdkProcessingMetadata = { dynamicSamplingContext: o.getDynamicSamplingContext(), ...e.sdkProcessingMetadata };
|
|
1206
|
-
let a = o.name;
|
|
1207
|
-
a && (e.tags = { transaction: a, ...e.tags });
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
this._applyFingerprint(e);
|
|
1211
|
-
let s = this._getBreadcrumbs(), i = [...e.breadcrumbs || [], ...s];
|
|
1212
|
-
return e.breadcrumbs = i.length > 0 ? i : void 0, e.sdkProcessingMetadata = { ...e.sdkProcessingMetadata, ...this._sdkProcessingMetadata, propagationContext: this._propagationContext }, K([...r || [], ...fe(), ...this._eventProcessors], e, n);
|
|
934
|
+
getScopeData() {
|
|
935
|
+
return { breadcrumbs: this._breadcrumbs, attachments: this._attachments, contexts: this._contexts, tags: this._tags, extra: this._extra, user: this._user, level: this._level, fingerprint: this._fingerprint || [], eventProcessors: this._eventProcessors, propagationContext: this._propagationContext, sdkProcessingMetadata: this._sdkProcessingMetadata, transactionName: this._transactionName, span: j(this) };
|
|
1213
936
|
}
|
|
1214
937
|
setSDKProcessingMetadata(e) {
|
|
1215
938
|
return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...e }, this;
|
|
@@ -1220,48 +943,52 @@ var k = class {
|
|
|
1220
943
|
getPropagationContext() {
|
|
1221
944
|
return this._propagationContext;
|
|
1222
945
|
}
|
|
1223
|
-
|
|
1224
|
-
|
|
946
|
+
captureException(e, n) {
|
|
947
|
+
let r = n && n.event_id ? n.event_id : S();
|
|
948
|
+
if (!this._client) return d.warn("No client configured on scope - will not capture exception!"), r;
|
|
949
|
+
let o = new Error("Sentry syntheticException");
|
|
950
|
+
return this._client.captureException(e, { originalException: e, syntheticException: o, ...n, event_id: r }, this), r;
|
|
951
|
+
}
|
|
952
|
+
captureMessage(e, n, r) {
|
|
953
|
+
let o = r && r.event_id ? r.event_id : S();
|
|
954
|
+
if (!this._client) return d.warn("No client configured on scope - will not capture message!"), o;
|
|
955
|
+
let s = new Error(e);
|
|
956
|
+
return this._client.captureMessage(e, n, { originalException: e, syntheticException: s, ...r, event_id: o }, this), o;
|
|
957
|
+
}
|
|
958
|
+
captureEvent(e, n) {
|
|
959
|
+
let r = n && n.event_id ? n.event_id : S();
|
|
960
|
+
return this._client ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) : (d.warn("No client configured on scope - will not capture event!"), r);
|
|
1225
961
|
}
|
|
1226
962
|
_notifyScopeListeners() {
|
|
1227
963
|
this._notifyingListeners || (this._notifyingListeners = true, this._scopeListeners.forEach((e) => {
|
|
1228
964
|
e(this);
|
|
1229
965
|
}), this._notifyingListeners = false);
|
|
1230
966
|
}
|
|
1231
|
-
_applyFingerprint(e) {
|
|
1232
|
-
e.fingerprint = e.fingerprint ? ce(e.fingerprint) : [], this._fingerprint && (e.fingerprint = e.fingerprint.concat(this._fingerprint)), e.fingerprint && !e.fingerprint.length && delete e.fingerprint;
|
|
1233
|
-
}
|
|
1234
967
|
};
|
|
1235
|
-
|
|
1236
|
-
|
|
968
|
+
var x = mt;
|
|
969
|
+
function Ht() {
|
|
970
|
+
return q("defaultCurrentScope", () => new x());
|
|
1237
971
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
bindClient(e) {
|
|
1248
|
-
let n = this.getStackTop();
|
|
1249
|
-
n.client = e, e && e.setupIntegrations && e.setupIntegrations();
|
|
1250
|
-
}
|
|
1251
|
-
pushScope() {
|
|
1252
|
-
let e = k.clone(this.getScope());
|
|
1253
|
-
return this.getStack().push({ client: this.getClient(), scope: e }), e;
|
|
1254
|
-
}
|
|
1255
|
-
popScope() {
|
|
1256
|
-
return this.getStack().length <= 1 ? false : !!this.getStack().pop();
|
|
972
|
+
function qt() {
|
|
973
|
+
return q("defaultIsolationScope", () => new x());
|
|
974
|
+
}
|
|
975
|
+
var gt = class {
|
|
976
|
+
constructor(e, n) {
|
|
977
|
+
let r;
|
|
978
|
+
e ? r = e : r = new x();
|
|
979
|
+
let o;
|
|
980
|
+
n ? o = n : o = new x(), this._stack = [{ scope: r }], this._isolationScope = o;
|
|
1257
981
|
}
|
|
1258
982
|
withScope(e) {
|
|
1259
|
-
let n = this.
|
|
983
|
+
let n = this._pushScope(), r;
|
|
1260
984
|
try {
|
|
1261
|
-
e(n);
|
|
1262
|
-
}
|
|
1263
|
-
this.
|
|
985
|
+
r = e(n);
|
|
986
|
+
} catch (o) {
|
|
987
|
+
throw this._popScope(), o;
|
|
1264
988
|
}
|
|
989
|
+
return C(r) ? r.then((o) => (this._popScope(), o), (o) => {
|
|
990
|
+
throw this._popScope(), o;
|
|
991
|
+
}) : (this._popScope(), r);
|
|
1265
992
|
}
|
|
1266
993
|
getClient() {
|
|
1267
994
|
return this.getStackTop().client;
|
|
@@ -1269,367 +996,304 @@ var $ = class {
|
|
|
1269
996
|
getScope() {
|
|
1270
997
|
return this.getStackTop().scope;
|
|
1271
998
|
}
|
|
999
|
+
getIsolationScope() {
|
|
1000
|
+
return this._isolationScope;
|
|
1001
|
+
}
|
|
1272
1002
|
getStack() {
|
|
1273
1003
|
return this._stack;
|
|
1274
1004
|
}
|
|
1275
1005
|
getStackTop() {
|
|
1276
1006
|
return this._stack[this._stack.length - 1];
|
|
1277
1007
|
}
|
|
1278
|
-
|
|
1279
|
-
let
|
|
1280
|
-
return this.
|
|
1281
|
-
i.captureException(e, { originalException: e, syntheticException: s, ...n, event_id: r }, o);
|
|
1282
|
-
}), r;
|
|
1283
|
-
}
|
|
1284
|
-
captureMessage(e, n, r) {
|
|
1285
|
-
let s = this._lastEventId = r && r.event_id ? r.event_id : h(), i = new Error(e);
|
|
1286
|
-
return this._withClient((o, a) => {
|
|
1287
|
-
o.captureMessage(e, n, { originalException: e, syntheticException: i, ...r, event_id: s }, a);
|
|
1288
|
-
}), s;
|
|
1289
|
-
}
|
|
1290
|
-
captureEvent(e, n) {
|
|
1291
|
-
let r = n && n.event_id ? n.event_id : h();
|
|
1292
|
-
return e.type || (this._lastEventId = r), this._withClient((s, i) => {
|
|
1293
|
-
s.captureEvent(e, { ...n, event_id: r }, i);
|
|
1294
|
-
}), r;
|
|
1295
|
-
}
|
|
1296
|
-
lastEventId() {
|
|
1297
|
-
return this._lastEventId;
|
|
1298
|
-
}
|
|
1299
|
-
addBreadcrumb(e, n) {
|
|
1300
|
-
let { scope: r, client: s } = this.getStackTop();
|
|
1301
|
-
if (!s) return;
|
|
1302
|
-
let { beforeBreadcrumb: i = null, maxBreadcrumbs: o = Tr } = s.getOptions && s.getOptions() || {};
|
|
1303
|
-
if (o <= 0) return;
|
|
1304
|
-
let u = { timestamp: L(), ...e }, c = i ? ge(() => i(u, n)) : u;
|
|
1305
|
-
c !== null && (s.emit && s.emit("beforeAddBreadcrumb", c, n), r.addBreadcrumb(c, o));
|
|
1306
|
-
}
|
|
1307
|
-
setUser(e) {
|
|
1308
|
-
this.getScope().setUser(e);
|
|
1309
|
-
}
|
|
1310
|
-
setTags(e) {
|
|
1311
|
-
this.getScope().setTags(e);
|
|
1312
|
-
}
|
|
1313
|
-
setExtras(e) {
|
|
1314
|
-
this.getScope().setExtras(e);
|
|
1315
|
-
}
|
|
1316
|
-
setTag(e, n) {
|
|
1317
|
-
this.getScope().setTag(e, n);
|
|
1318
|
-
}
|
|
1319
|
-
setExtra(e, n) {
|
|
1320
|
-
this.getScope().setExtra(e, n);
|
|
1321
|
-
}
|
|
1322
|
-
setContext(e, n) {
|
|
1323
|
-
this.getScope().setContext(e, n);
|
|
1324
|
-
}
|
|
1325
|
-
configureScope(e) {
|
|
1326
|
-
let { scope: n, client: r } = this.getStackTop();
|
|
1327
|
-
r && e(n);
|
|
1328
|
-
}
|
|
1329
|
-
run(e) {
|
|
1330
|
-
let n = gt(this);
|
|
1331
|
-
try {
|
|
1332
|
-
e(this);
|
|
1333
|
-
} finally {
|
|
1334
|
-
gt(n);
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
getIntegration(e) {
|
|
1338
|
-
let n = this.getClient();
|
|
1339
|
-
if (!n) return null;
|
|
1340
|
-
try {
|
|
1341
|
-
return n.getIntegration(e);
|
|
1342
|
-
} catch {
|
|
1343
|
-
return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn(`Cannot retrieve integration ${e.id} from the current Hub`), null;
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
startTransaction(e, n) {
|
|
1347
|
-
let r = this._callExtensionMethod("startTransaction", e, n);
|
|
1348
|
-
if ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && !r) {
|
|
1349
|
-
let s = this.getClient();
|
|
1350
|
-
console.warn(s ? `Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
1351
|
-
Sentry.addTracingExtensions();
|
|
1352
|
-
Sentry.init({...});
|
|
1353
|
-
` : "Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'");
|
|
1354
|
-
}
|
|
1355
|
-
return r;
|
|
1356
|
-
}
|
|
1357
|
-
traceHeaders() {
|
|
1358
|
-
return this._callExtensionMethod("traceHeaders");
|
|
1359
|
-
}
|
|
1360
|
-
captureSession(e = false) {
|
|
1361
|
-
if (e) return this.endSession();
|
|
1362
|
-
this._sendSessionUpdate();
|
|
1363
|
-
}
|
|
1364
|
-
endSession() {
|
|
1365
|
-
let n = this.getStackTop().scope, r = n.getSession();
|
|
1366
|
-
r && dn(r), this._sendSessionUpdate(), n.setSession();
|
|
1367
|
-
}
|
|
1368
|
-
startSession(e) {
|
|
1369
|
-
let { scope: n, client: r } = this.getStackTop(), { release: s, environment: i = V } = r && r.getOptions() || {}, { userAgent: o } = m.navigator || {}, a = un({ release: s, environment: i, user: n.getUser(), ...o && { userAgent: o }, ...e }), u = n.getSession && n.getSession();
|
|
1370
|
-
return u && u.status === "ok" && v(u, { status: "exited" }), this.endSession(), n.setSession(a), a;
|
|
1371
|
-
}
|
|
1372
|
-
shouldSendDefaultPii() {
|
|
1373
|
-
let e = this.getClient(), n = e && e.getOptions();
|
|
1374
|
-
return !!(n && n.sendDefaultPii);
|
|
1375
|
-
}
|
|
1376
|
-
_sendSessionUpdate() {
|
|
1377
|
-
let { scope: e, client: n } = this.getStackTop(), r = e.getSession();
|
|
1378
|
-
r && n && n.captureSession && n.captureSession(r);
|
|
1379
|
-
}
|
|
1380
|
-
_withClient(e) {
|
|
1381
|
-
let { scope: n, client: r } = this.getStackTop();
|
|
1382
|
-
r && e(r, n);
|
|
1008
|
+
_pushScope() {
|
|
1009
|
+
let e = this.getScope().clone();
|
|
1010
|
+
return this.getStack().push({ client: this.getClient(), scope: e }), e;
|
|
1383
1011
|
}
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
if (s && s.extensions && typeof s.extensions[e] == "function") return s.extensions[e].apply(this, n);
|
|
1387
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn(`Extension method ${e} couldn't be found, doing nothing.`);
|
|
1012
|
+
_popScope() {
|
|
1013
|
+
return this.getStack().length <= 1 ? false : !!this.getStack().pop();
|
|
1388
1014
|
}
|
|
1389
1015
|
};
|
|
1390
|
-
function
|
|
1391
|
-
|
|
1016
|
+
function J() {
|
|
1017
|
+
let t4 = w(), e = ne(t4);
|
|
1018
|
+
return e.stack = e.stack || new gt(Ht(), qt());
|
|
1392
1019
|
}
|
|
1393
|
-
function
|
|
1394
|
-
|
|
1395
|
-
return Et(e, t), n;
|
|
1020
|
+
function sr(t4) {
|
|
1021
|
+
return J().withScope(t4);
|
|
1396
1022
|
}
|
|
1397
|
-
function
|
|
1398
|
-
let
|
|
1399
|
-
|
|
1400
|
-
let e = t.__SENTRY__.acs.getCurrentHub();
|
|
1401
|
-
if (e) return e;
|
|
1402
|
-
}
|
|
1403
|
-
return br(t);
|
|
1023
|
+
function ir(t4, e) {
|
|
1024
|
+
let n = J();
|
|
1025
|
+
return n.withScope(() => (n.getStackTop().scope = t4, e(t4)));
|
|
1404
1026
|
}
|
|
1405
|
-
function
|
|
1406
|
-
return (
|
|
1027
|
+
function zt(t4) {
|
|
1028
|
+
return J().withScope(() => t4(J().getIsolationScope()));
|
|
1407
1029
|
}
|
|
1408
|
-
function
|
|
1409
|
-
return
|
|
1030
|
+
function Yt() {
|
|
1031
|
+
return { withIsolationScope: zt, withScope: sr, withSetScope: ir, withSetIsolationScope: (t4, e) => zt(e), getCurrentScope: () => J().getScope(), getIsolationScope: () => J().getIsolationScope() };
|
|
1410
1032
|
}
|
|
1411
|
-
function
|
|
1412
|
-
|
|
1033
|
+
function oe(t4) {
|
|
1034
|
+
let e = ne(t4);
|
|
1035
|
+
return e.acs ? e.acs : Yt();
|
|
1413
1036
|
}
|
|
1414
|
-
function
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
return n.hub = e, true;
|
|
1037
|
+
function ht() {
|
|
1038
|
+
let t4 = w();
|
|
1039
|
+
return oe(t4).getCurrentScope();
|
|
1418
1040
|
}
|
|
1419
|
-
function
|
|
1420
|
-
|
|
1041
|
+
function G() {
|
|
1042
|
+
let t4 = w();
|
|
1043
|
+
return oe(t4).getIsolationScope();
|
|
1421
1044
|
}
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
mn || (mn = true, De("error", St), De("unhandledrejection", St));
|
|
1045
|
+
function Jt() {
|
|
1046
|
+
return q("globalScope", () => new x());
|
|
1425
1047
|
}
|
|
1426
|
-
function
|
|
1427
|
-
|
|
1428
|
-
if (t) {
|
|
1429
|
-
let e = "internal_error";
|
|
1430
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] Transaction: ${e} -> Global error occured`), t.setStatus(e);
|
|
1431
|
-
}
|
|
1048
|
+
function Wt() {
|
|
1049
|
+
return ht().getClient();
|
|
1432
1050
|
}
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
var
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
setData(e, n) {
|
|
1464
|
-
return this.data = { ...this.data, [e]: n }, this;
|
|
1465
|
-
}
|
|
1466
|
-
setStatus(e) {
|
|
1467
|
-
return this.status = e, this;
|
|
1468
|
-
}
|
|
1469
|
-
setHttpStatus(e) {
|
|
1470
|
-
this.setTag("http.status_code", String(e)), this.setData("http.response.status_code", e);
|
|
1471
|
-
let n = xr(e);
|
|
1472
|
-
return n !== "unknown_error" && this.setStatus(n), this;
|
|
1473
|
-
}
|
|
1474
|
-
setName(e) {
|
|
1475
|
-
this.description = e;
|
|
1476
|
-
}
|
|
1477
|
-
isSuccess() {
|
|
1478
|
-
return this.status === "ok";
|
|
1479
|
-
}
|
|
1480
|
-
finish(e) {
|
|
1481
|
-
if ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && this.transaction && this.transaction.spanId !== this.spanId) {
|
|
1482
|
-
let { logMessage: n } = this.transaction.metadata.spanMetadata[this.spanId];
|
|
1483
|
-
n && p.log(n.replace("Starting", "Finishing"));
|
|
1051
|
+
var ar = "_sentryMetrics";
|
|
1052
|
+
function Kt(t4) {
|
|
1053
|
+
let e = t4[ar];
|
|
1054
|
+
if (!e) return;
|
|
1055
|
+
let n = {};
|
|
1056
|
+
for (let [, [r, o]] of e) n[r] || (n[r] = []), n[r].push(E(o));
|
|
1057
|
+
return n;
|
|
1058
|
+
}
|
|
1059
|
+
var Vt = "sentry.source";
|
|
1060
|
+
var Xt = "sentry.sample_rate";
|
|
1061
|
+
var Zt = "sentry.op";
|
|
1062
|
+
var Qt = "sentry.origin";
|
|
1063
|
+
var cr = 1;
|
|
1064
|
+
function Ce(t4) {
|
|
1065
|
+
let { spanId: e, traceId: n } = t4.spanContext(), { parent_span_id: r } = W(t4);
|
|
1066
|
+
return E({ parent_span_id: r, span_id: e, trace_id: n });
|
|
1067
|
+
}
|
|
1068
|
+
function en(t4) {
|
|
1069
|
+
return typeof t4 == "number" ? tn(t4) : Array.isArray(t4) ? t4[0] + t4[1] / 1e9 : t4 instanceof Date ? tn(t4.getTime()) : Z();
|
|
1070
|
+
}
|
|
1071
|
+
function tn(t4) {
|
|
1072
|
+
return t4 > 9999999999 ? t4 / 1e3 : t4;
|
|
1073
|
+
}
|
|
1074
|
+
function W(t4) {
|
|
1075
|
+
if (pr(t4)) return t4.getSpanJSON();
|
|
1076
|
+
try {
|
|
1077
|
+
let { spanId: e, traceId: n } = t4.spanContext();
|
|
1078
|
+
if (ur(t4)) {
|
|
1079
|
+
let { attributes: r, startTime: o, name: s, endTime: i, parentSpanId: a, status: c } = t4;
|
|
1080
|
+
return E({ span_id: e, trace_id: n, data: r, description: s, parent_span_id: a, start_timestamp: en(o), timestamp: en(i) || void 0, status: fr(c), op: r[Zt], origin: r[Qt], _metrics_summary: Kt(t4) });
|
|
1484
1081
|
}
|
|
1485
|
-
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
return ot(this.traceId, this.spanId, this.sampled);
|
|
1489
|
-
}
|
|
1490
|
-
toContext() {
|
|
1491
|
-
return g({ data: this.data, description: this.description, endTimestamp: this.endTimestamp, op: this.op, parentSpanId: this.parentSpanId, sampled: this.sampled, spanId: this.spanId, startTimestamp: this.startTimestamp, status: this.status, tags: this.tags, traceId: this.traceId });
|
|
1492
|
-
}
|
|
1493
|
-
updateWithContext(e) {
|
|
1494
|
-
return this.data = e.data || {}, this.description = e.description, this.endTimestamp = e.endTimestamp, this.op = e.op, this.parentSpanId = e.parentSpanId, this.sampled = e.sampled, this.spanId = e.spanId || this.spanId, this.startTimestamp = e.startTimestamp || this.startTimestamp, this.status = e.status, this.tags = e.tags || {}, this.traceId = e.traceId || this.traceId, this;
|
|
1495
|
-
}
|
|
1496
|
-
getTraceContext() {
|
|
1497
|
-
return g({ data: Object.keys(this.data).length > 0 ? this.data : void 0, description: this.description, op: this.op, parent_span_id: this.parentSpanId, span_id: this.spanId, status: this.status, tags: Object.keys(this.tags).length > 0 ? this.tags : void 0, trace_id: this.traceId });
|
|
1498
|
-
}
|
|
1499
|
-
toJSON() {
|
|
1500
|
-
return g({ data: Object.keys(this.data).length > 0 ? this.data : void 0, description: this.description, op: this.op, parent_span_id: this.parentSpanId, span_id: this.spanId, start_timestamp: this.startTimestamp, status: this.status, tags: Object.keys(this.tags).length > 0 ? this.tags : void 0, timestamp: this.endTimestamp, trace_id: this.traceId, origin: this.origin });
|
|
1082
|
+
return { span_id: e, trace_id: n };
|
|
1083
|
+
} catch {
|
|
1084
|
+
return {};
|
|
1501
1085
|
}
|
|
1502
|
-
}
|
|
1503
|
-
function
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1086
|
+
}
|
|
1087
|
+
function ur(t4) {
|
|
1088
|
+
let e = t4;
|
|
1089
|
+
return !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status;
|
|
1090
|
+
}
|
|
1091
|
+
function pr(t4) {
|
|
1092
|
+
return typeof t4.getSpanJSON == "function";
|
|
1093
|
+
}
|
|
1094
|
+
function nn(t4) {
|
|
1095
|
+
let { traceFlags: e } = t4.spanContext();
|
|
1096
|
+
return e === cr;
|
|
1097
|
+
}
|
|
1098
|
+
function fr(t4) {
|
|
1099
|
+
if (!(!t4 || t4.code === 0)) return t4.code === 1 ? "ok" : t4.message || "unknown_error";
|
|
1100
|
+
}
|
|
1101
|
+
var dr = "_sentryRootSpan";
|
|
1102
|
+
function L(t4) {
|
|
1103
|
+
return t4[dr] || t4;
|
|
1104
|
+
}
|
|
1105
|
+
function rn() {
|
|
1106
|
+
let t4 = w(), e = oe(t4);
|
|
1107
|
+
return e.getActiveSpan ? e.getActiveSpan() : j(ht());
|
|
1108
|
+
}
|
|
1109
|
+
var on = false;
|
|
1110
|
+
function sn() {
|
|
1111
|
+
on || (on = true, Ke(_t), Ve(_t));
|
|
1112
|
+
}
|
|
1113
|
+
function _t() {
|
|
1114
|
+
let t4 = rn(), e = t4 && L(t4);
|
|
1115
|
+
if (e) {
|
|
1116
|
+
let n = "internal_error";
|
|
1117
|
+
_ && d.log(`[Tracing] Root span: ${n} -> Global error occured`), e.setStatus({ code: 2, message: n });
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
_t.tag = "sentry_tracingErrorCallback";
|
|
1121
|
+
var Oe = "production";
|
|
1122
|
+
var lr = "_frozenDsc";
|
|
1123
|
+
function se(t4, e) {
|
|
1124
|
+
let n = e.getOptions(), { publicKey: r } = e.getDsn() || {}, o = E({ environment: n.environment || Oe, release: n.release, public_key: r, trace_id: t4 });
|
|
1125
|
+
return e.emit("createDsc", o), o;
|
|
1126
|
+
}
|
|
1127
|
+
function Ne(t4) {
|
|
1128
|
+
let e = Wt();
|
|
1129
|
+
if (!e) return {};
|
|
1130
|
+
let n = se(W(t4).trace_id || "", e), r = L(t4);
|
|
1131
|
+
if (!r) return n;
|
|
1132
|
+
let o = r[lr];
|
|
1133
|
+
if (o) return o;
|
|
1134
|
+
let s = W(r), i = s.data || {}, a = i[Xt];
|
|
1135
|
+
a != null && (n.sample_rate = `${a}`);
|
|
1136
|
+
let c = i[Vt];
|
|
1137
|
+
return c && c !== "url" && (n.transaction = s.description), n.sampled = String(nn(r)), e.emit("createDsc", n), n;
|
|
1138
|
+
}
|
|
1139
|
+
function an(t4) {
|
|
1140
|
+
if (typeof t4 == "boolean") return Number(t4);
|
|
1141
|
+
let e = typeof t4 == "string" ? parseFloat(t4) : t4;
|
|
1142
|
+
if (typeof e != "number" || isNaN(e) || e < 0 || e > 1) {
|
|
1143
|
+
_ && d.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t4)} of type ${JSON.stringify(typeof t4)}.`);
|
|
1144
|
+
return;
|
|
1530
1145
|
}
|
|
1531
|
-
return
|
|
1146
|
+
return e;
|
|
1532
1147
|
}
|
|
1533
|
-
function
|
|
1534
|
-
|
|
1535
|
-
return e.emit && e.emit("createDsc", o), o;
|
|
1148
|
+
function mr(t4, e) {
|
|
1149
|
+
return e && (t4.sdk = t4.sdk || {}, t4.sdk.name = t4.sdk.name || e.name, t4.sdk.version = t4.sdk.version || e.version, t4.sdk.integrations = [...t4.sdk.integrations || [], ...e.integrations || []], t4.sdk.packages = [...t4.sdk.packages || [], ...e.packages || []]), t4;
|
|
1536
1150
|
}
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
}
|
|
1555
|
-
setContext(e, n) {
|
|
1556
|
-
n === null ? delete this._contexts[e] : this._contexts[e] = n;
|
|
1557
|
-
}
|
|
1558
|
-
setMeasurement(e, n, r = "") {
|
|
1559
|
-
this._measurements[e] = { value: n, unit: r };
|
|
1560
|
-
}
|
|
1561
|
-
setMetadata(e) {
|
|
1562
|
-
this.metadata = { ...this.metadata, ...e };
|
|
1563
|
-
}
|
|
1564
|
-
finish(e) {
|
|
1565
|
-
let n = this._finishTransaction(e);
|
|
1566
|
-
if (n) return this._hub.captureEvent(n);
|
|
1567
|
-
}
|
|
1568
|
-
toContext() {
|
|
1569
|
-
let e = super.toContext();
|
|
1570
|
-
return g({ ...e, name: this.name, trimEnd: this._trimEnd });
|
|
1571
|
-
}
|
|
1572
|
-
updateWithContext(e) {
|
|
1573
|
-
return super.updateWithContext(e), this.name = e.name || "", this._trimEnd = e.trimEnd, this;
|
|
1574
|
-
}
|
|
1575
|
-
getDynamicSamplingContext() {
|
|
1576
|
-
if (this._frozenDynamicSamplingContext) return this._frozenDynamicSamplingContext;
|
|
1577
|
-
let e = this._hub || b(), n = e.getClient();
|
|
1578
|
-
if (!n) return {};
|
|
1579
|
-
let r = e.getScope(), s = X(this.traceId, n, r), i = this.metadata.sampleRate;
|
|
1580
|
-
i !== void 0 && (s.sample_rate = `${i}`);
|
|
1581
|
-
let o = this.metadata.source;
|
|
1582
|
-
return o && o !== "url" && (s.transaction = this.name), this.sampled !== void 0 && (s.sampled = String(this.sampled)), s;
|
|
1583
|
-
}
|
|
1584
|
-
setHub(e) {
|
|
1585
|
-
this._hub = e;
|
|
1586
|
-
}
|
|
1587
|
-
_finishTransaction(e) {
|
|
1588
|
-
if (this.endTimestamp !== void 0) return;
|
|
1589
|
-
this.name || ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("Transaction has no name, falling back to `<unlabeled transaction>`."), this.name = "<unlabeled transaction>"), super.finish(e);
|
|
1590
|
-
let n = this._hub.getClient();
|
|
1591
|
-
if (n && n.emit && n.emit("finishTransaction", this), this.sampled !== true) {
|
|
1592
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."), n && n.recordDroppedEvent("sample_rate", "transaction");
|
|
1593
|
-
return;
|
|
1151
|
+
function cn(t4, e, n, r) {
|
|
1152
|
+
let o = be(n), s = { sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...o && { sdk: o }, ...!!r && e && { dsn: M(e) } }, i = "aggregates" in t4 ? [{ type: "sessions" }, t4] : [{ type: "session" }, t4.toJSON()];
|
|
1153
|
+
return P(s, [i]);
|
|
1154
|
+
}
|
|
1155
|
+
function un(t4, e, n, r) {
|
|
1156
|
+
let o = be(n), s = t4.type && t4.type !== "replay_event" ? t4.type : "event";
|
|
1157
|
+
mr(t4, n && n.sdk);
|
|
1158
|
+
let i = it(t4, o, r, e);
|
|
1159
|
+
return delete t4.sdkProcessingMetadata, P(i, [[{ type: s }, t4]]);
|
|
1160
|
+
}
|
|
1161
|
+
function ke(t4, e, n, r = 0) {
|
|
1162
|
+
return new R((o, s) => {
|
|
1163
|
+
let i = t4[r];
|
|
1164
|
+
if (e === null || typeof i != "function") o(e);
|
|
1165
|
+
else {
|
|
1166
|
+
let a = i({ ...e }, n);
|
|
1167
|
+
_ && i.id && a === null && d.log(`Event processor "${i.id}" dropped event`), C(a) ? a.then((c) => ke(t4, c, n, r + 1).then(o)).then(null, s) : ke(t4, a, n, r + 1).then(o).then(null, s);
|
|
1594
1168
|
}
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1171
|
+
function pn(t4, e) {
|
|
1172
|
+
let { fingerprint: n, span: r, breadcrumbs: o, sdkProcessingMetadata: s } = e;
|
|
1173
|
+
gr(t4, e), r && Er(t4, r), Sr(t4, n), hr(t4, o), _r(t4, s);
|
|
1174
|
+
}
|
|
1175
|
+
function Et(t4, e) {
|
|
1176
|
+
let { extra: n, tags: r, user: o, contexts: s, level: i, sdkProcessingMetadata: a, breadcrumbs: c, fingerprint: u, eventProcessors: f, attachments: p, propagationContext: l, transactionName: g, span: h } = e;
|
|
1177
|
+
ie(t4, "extra", n), ie(t4, "tags", r), ie(t4, "user", o), ie(t4, "contexts", s), ie(t4, "sdkProcessingMetadata", a), i && (t4.level = i), g && (t4.transactionName = g), h && (t4.span = h), c.length && (t4.breadcrumbs = [...t4.breadcrumbs, ...c]), u.length && (t4.fingerprint = [...t4.fingerprint, ...u]), f.length && (t4.eventProcessors = [...t4.eventProcessors, ...f]), p.length && (t4.attachments = [...t4.attachments, ...p]), t4.propagationContext = { ...t4.propagationContext, ...l };
|
|
1178
|
+
}
|
|
1179
|
+
function ie(t4, e, n) {
|
|
1180
|
+
if (n && Object.keys(n).length) {
|
|
1181
|
+
t4[e] = { ...t4[e] };
|
|
1182
|
+
for (let r in n) Object.prototype.hasOwnProperty.call(n, r) && (t4[e][r] = n[r]);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
function gr(t4, e) {
|
|
1186
|
+
let { extra: n, tags: r, user: o, contexts: s, level: i, transactionName: a } = e, c = E(n);
|
|
1187
|
+
c && Object.keys(c).length && (t4.extra = { ...c, ...t4.extra });
|
|
1188
|
+
let u = E(r);
|
|
1189
|
+
u && Object.keys(u).length && (t4.tags = { ...u, ...t4.tags });
|
|
1190
|
+
let f = E(o);
|
|
1191
|
+
f && Object.keys(f).length && (t4.user = { ...f, ...t4.user });
|
|
1192
|
+
let p = E(s);
|
|
1193
|
+
p && Object.keys(p).length && (t4.contexts = { ...p, ...t4.contexts }), i && (t4.level = i), a && t4.type !== "transaction" && (t4.transaction = a);
|
|
1194
|
+
}
|
|
1195
|
+
function hr(t4, e) {
|
|
1196
|
+
let n = [...t4.breadcrumbs || [], ...e];
|
|
1197
|
+
t4.breadcrumbs = n.length ? n : void 0;
|
|
1198
|
+
}
|
|
1199
|
+
function _r(t4, e) {
|
|
1200
|
+
t4.sdkProcessingMetadata = { ...t4.sdkProcessingMetadata, ...e };
|
|
1201
|
+
}
|
|
1202
|
+
function Er(t4, e) {
|
|
1203
|
+
t4.contexts = { trace: Ce(e), ...t4.contexts }, t4.sdkProcessingMetadata = { dynamicSamplingContext: Ne(e), ...t4.sdkProcessingMetadata };
|
|
1204
|
+
let n = L(e), r = W(n).description;
|
|
1205
|
+
r && !t4.transaction && t4.type === "transaction" && (t4.transaction = r);
|
|
1206
|
+
}
|
|
1207
|
+
function Sr(t4, e) {
|
|
1208
|
+
t4.fingerprint = t4.fingerprint ? ee(t4.fingerprint) : [], e && (t4.fingerprint = t4.fingerprint.concat(e)), t4.fingerprint && !t4.fingerprint.length && delete t4.fingerprint;
|
|
1209
|
+
}
|
|
1210
|
+
function dn(t4, e, n, r, o, s) {
|
|
1211
|
+
let { normalizeDepth: i = 3, normalizeMaxBreadth: a = 1e3 } = t4, c = { ...e, event_id: e.event_id || n.event_id || S(), timestamp: e.timestamp || z() }, u = n.integrations || t4.integrations.map((T) => T.name);
|
|
1212
|
+
yr(c, t4), xr(c, u), e.type === void 0 && Tr(c, t4.stackParser);
|
|
1213
|
+
let f = br(r, n.captureContext);
|
|
1214
|
+
n.mechanism && B(c, n.mechanism);
|
|
1215
|
+
let p = o ? o.getEventProcessors() : [], l = Jt().getScopeData();
|
|
1216
|
+
if (s) {
|
|
1217
|
+
let T = s.getScopeData();
|
|
1218
|
+
Et(l, T);
|
|
1219
|
+
}
|
|
1220
|
+
if (f) {
|
|
1221
|
+
let T = f.getScopeData();
|
|
1222
|
+
Et(l, T);
|
|
1223
|
+
}
|
|
1224
|
+
let g = [...n.attachments || [], ...l.attachments];
|
|
1225
|
+
g.length && (n.attachments = g), pn(c, l);
|
|
1226
|
+
let h = [...p, ...l.eventProcessors];
|
|
1227
|
+
return ke(h, c, n).then((T) => (T && Ir(T), typeof i == "number" && i > 0 ? Ar(T, i, a) : T));
|
|
1228
|
+
}
|
|
1229
|
+
function yr(t4, e) {
|
|
1230
|
+
let { environment: n, release: r, dist: o, maxValueLength: s = 250 } = e;
|
|
1231
|
+
"environment" in t4 || (t4.environment = "environment" in e ? n : Oe), t4.release === void 0 && r !== void 0 && (t4.release = r), t4.dist === void 0 && o !== void 0 && (t4.dist = o), t4.message && (t4.message = k(t4.message, s));
|
|
1232
|
+
let i = t4.exception && t4.exception.values && t4.exception.values[0];
|
|
1233
|
+
i && i.value && (i.value = k(i.value, s));
|
|
1234
|
+
let a = t4.request;
|
|
1235
|
+
a && a.url && (a.url = k(a.url, s));
|
|
1236
|
+
}
|
|
1237
|
+
var fn = /* @__PURE__ */ new WeakMap();
|
|
1238
|
+
function Tr(t4, e) {
|
|
1239
|
+
let n = m._sentryDebugIds;
|
|
1240
|
+
if (!n) return;
|
|
1241
|
+
let r, o = fn.get(e);
|
|
1242
|
+
o ? r = o : (r = /* @__PURE__ */ new Map(), fn.set(e, r));
|
|
1243
|
+
let s = Object.keys(n).reduce((i, a) => {
|
|
1244
|
+
let c, u = r.get(a);
|
|
1245
|
+
u ? c = u : (c = e(a), r.set(a, c));
|
|
1246
|
+
for (let f = c.length - 1; f >= 0; f--) {
|
|
1247
|
+
let p = c[f];
|
|
1248
|
+
if (p.filename) {
|
|
1249
|
+
i[p.filename] = n[a];
|
|
1250
|
+
break;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
return i;
|
|
1254
|
+
}, {});
|
|
1255
|
+
try {
|
|
1256
|
+
t4.exception.values.forEach((i) => {
|
|
1257
|
+
i.stacktrace.frames.forEach((a) => {
|
|
1258
|
+
a.filename && (a.debug_id = s[a.filename]);
|
|
1259
|
+
});
|
|
1260
|
+
});
|
|
1261
|
+
} catch {
|
|
1599
1262
|
}
|
|
1600
|
-
};
|
|
1601
|
-
function hn(t) {
|
|
1602
|
-
if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) return false;
|
|
1603
|
-
let e = b().getClient(), n = t || e && e.getOptions();
|
|
1604
|
-
return !!n && (n.enableTracing || "tracesSampleRate" in n || "tracesSampler" in n);
|
|
1605
|
-
}
|
|
1606
|
-
function gn(t, e, n) {
|
|
1607
|
-
if (!hn(e)) return t.sampled = false, t;
|
|
1608
|
-
if (t.sampled !== void 0) return t.setMetadata({ sampleRate: Number(t.sampled) }), t;
|
|
1609
|
-
let r;
|
|
1610
|
-
return typeof e.tracesSampler == "function" ? (r = e.tracesSampler(n), t.setMetadata({ sampleRate: Number(r) })) : n.parentSampled !== void 0 ? r = n.parentSampled : typeof e.tracesSampleRate < "u" ? (r = e.tracesSampleRate, t.setMetadata({ sampleRate: Number(r) })) : (r = 1, t.setMetadata({ sampleRate: r })), Ir(r) ? r ? (t.sampled = Math.random() < r, t.sampled ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] starting ${t.op} transaction - ${t.name}`), t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`), t)) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}`), t.sampled = false, t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("[Tracing] Discarding transaction because of invalid sample rate."), t.sampled = false, t);
|
|
1611
1263
|
}
|
|
1612
|
-
function Ir(
|
|
1613
|
-
|
|
1264
|
+
function Ir(t4) {
|
|
1265
|
+
let e = {};
|
|
1266
|
+
try {
|
|
1267
|
+
t4.exception.values.forEach((r) => {
|
|
1268
|
+
r.stacktrace.frames.forEach((o) => {
|
|
1269
|
+
o.debug_id && (o.abs_path ? e[o.abs_path] = o.debug_id : o.filename && (e[o.filename] = o.debug_id), delete o.debug_id);
|
|
1270
|
+
});
|
|
1271
|
+
});
|
|
1272
|
+
} catch {
|
|
1273
|
+
}
|
|
1274
|
+
if (Object.keys(e).length === 0) return;
|
|
1275
|
+
t4.debug_meta = t4.debug_meta || {}, t4.debug_meta.images = t4.debug_meta.images || [];
|
|
1276
|
+
let n = t4.debug_meta.images;
|
|
1277
|
+
Object.keys(e).forEach((r) => {
|
|
1278
|
+
n.push({ type: "sourcemap", code_file: r, debug_id: e[r] });
|
|
1279
|
+
});
|
|
1614
1280
|
}
|
|
1615
|
-
function
|
|
1616
|
-
|
|
1617
|
-
return e ? { "sentry-trace": e.toTraceparent() } : {};
|
|
1281
|
+
function xr(t4, e) {
|
|
1282
|
+
e.length > 0 && (t4.sdk = t4.sdk || {}, t4.sdk.integrations = [...t4.sdk.integrations || [], ...e]);
|
|
1618
1283
|
}
|
|
1619
|
-
function
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
let o = new Pe(t, this);
|
|
1624
|
-
return o = gn(o, r, { parentSampled: t.parentSampled, transactionContext: t, ...e }), o.sampled && o.initSpanRecorder(r._experiments && r._experiments.maxSpans), n && n.emit && n.emit("startTransaction", o), o;
|
|
1284
|
+
function Ar(t4, e, n) {
|
|
1285
|
+
if (!t4) return null;
|
|
1286
|
+
let r = { ...t4, ...t4.breadcrumbs && { breadcrumbs: t4.breadcrumbs.map((o) => ({ ...o, ...o.data && { data: b(o.data, e, n) } })) }, ...t4.user && { user: b(t4.user, e, n) }, ...t4.contexts && { contexts: b(t4.contexts, e, n) }, ...t4.extra && { extra: b(t4.extra, e, n) } };
|
|
1287
|
+
return t4.contexts && t4.contexts.trace && r.contexts && (r.contexts.trace = t4.contexts.trace, t4.contexts.trace.data && (r.contexts.trace.data = b(t4.contexts.trace.data, e, n))), t4.spans && (r.spans = t4.spans.map((o) => ({ ...o, ...o.data && { data: b(o.data, e, n) } }))), r;
|
|
1625
1288
|
}
|
|
1626
|
-
function
|
|
1627
|
-
|
|
1628
|
-
|
|
1289
|
+
function br(t4, e) {
|
|
1290
|
+
if (!e) return t4;
|
|
1291
|
+
let n = t4 ? t4.clone() : new x();
|
|
1292
|
+
return n.update(e), n;
|
|
1629
1293
|
}
|
|
1630
|
-
var
|
|
1294
|
+
var De = class {
|
|
1631
1295
|
constructor(e, n) {
|
|
1632
|
-
this._client = e, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = true, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._sessionAttrs = n;
|
|
1296
|
+
this._client = e, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = true, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._intervalId.unref && this._intervalId.unref(), this._sessionAttrs = n;
|
|
1633
1297
|
}
|
|
1634
1298
|
flush() {
|
|
1635
1299
|
let e = this.getSessionAggregates();
|
|
@@ -1637,212 +1301,120 @@ var Me = class {
|
|
|
1637
1301
|
}
|
|
1638
1302
|
getSessionAggregates() {
|
|
1639
1303
|
let e = Object.keys(this._pendingAggregates).map((r) => this._pendingAggregates[parseInt(r)]), n = { attrs: this._sessionAttrs, aggregates: e };
|
|
1640
|
-
return
|
|
1304
|
+
return E(n);
|
|
1641
1305
|
}
|
|
1642
1306
|
close() {
|
|
1643
1307
|
clearInterval(this._intervalId), this._isEnabled = false, this.flush();
|
|
1644
1308
|
}
|
|
1645
1309
|
incrementSessionStatusCount() {
|
|
1646
1310
|
if (!this._isEnabled) return;
|
|
1647
|
-
let e =
|
|
1311
|
+
let e = G(), n = e.getRequestSession();
|
|
1648
1312
|
n && n.status && (this._incrementSessionStatusCount(n.status, /* @__PURE__ */ new Date()), e.setRequestSession(void 0));
|
|
1649
1313
|
}
|
|
1650
1314
|
_incrementSessionStatusCount(e, n) {
|
|
1651
1315
|
let r = new Date(n).setSeconds(0, 0);
|
|
1652
1316
|
this._pendingAggregates[r] = this._pendingAggregates[r] || {};
|
|
1653
|
-
let
|
|
1654
|
-
switch (
|
|
1317
|
+
let o = this._pendingAggregates[r];
|
|
1318
|
+
switch (o.started || (o.started = new Date(r).toISOString()), e) {
|
|
1655
1319
|
case "errored":
|
|
1656
|
-
return
|
|
1320
|
+
return o.errored = (o.errored || 0) + 1, o.errored;
|
|
1657
1321
|
case "ok":
|
|
1658
|
-
return
|
|
1322
|
+
return o.exited = (o.exited || 0) + 1, o.exited;
|
|
1659
1323
|
default:
|
|
1660
|
-
return
|
|
1324
|
+
return o.crashed = (o.crashed || 0) + 1, o.crashed;
|
|
1661
1325
|
}
|
|
1662
1326
|
}
|
|
1663
1327
|
};
|
|
1664
|
-
var
|
|
1665
|
-
function
|
|
1666
|
-
let e =
|
|
1667
|
-
return `${e}//${
|
|
1668
|
-
}
|
|
1669
|
-
function Ar(t) {
|
|
1670
|
-
return `${Or(t)}${t.projectId}/envelope/`;
|
|
1671
|
-
}
|
|
1672
|
-
function wr(t, e) {
|
|
1673
|
-
return Ke({ sentry_key: t.publicKey, sentry_version: kr, ...e && { sentry_client: `${e.name}/${e.version}` } });
|
|
1674
|
-
}
|
|
1675
|
-
function Sn(t, e = {}) {
|
|
1676
|
-
let n = typeof e == "string" ? e : e.tunnel, r = typeof e == "string" || !e._metadata ? void 0 : e._metadata.sdk;
|
|
1677
|
-
return n || `${Ar(t)}?${wr(t, r)}`;
|
|
1328
|
+
var Rr = "7";
|
|
1329
|
+
function Cr(t4) {
|
|
1330
|
+
let e = t4.protocol ? `${t4.protocol}:` : "", n = t4.port ? `:${t4.port}` : "";
|
|
1331
|
+
return `${e}//${t4.host}${n}${t4.path ? `/${t4.path}` : ""}/api/`;
|
|
1678
1332
|
}
|
|
1679
|
-
function
|
|
1680
|
-
return
|
|
1333
|
+
function Or(t4) {
|
|
1334
|
+
return `${Cr(t4)}${t4.projectId}/envelope/`;
|
|
1681
1335
|
}
|
|
1682
|
-
function
|
|
1683
|
-
|
|
1684
|
-
return M(i, [o]);
|
|
1336
|
+
function Nr(t4, e) {
|
|
1337
|
+
return Ye({ sentry_key: t4.publicKey, sentry_version: Rr, ...e && { sentry_client: `${e.name}/${e.version}` } });
|
|
1685
1338
|
}
|
|
1686
|
-
function
|
|
1687
|
-
|
|
1688
|
-
vr(t, n && n.sdk);
|
|
1689
|
-
let o = ft(t, s, r, e);
|
|
1690
|
-
return delete t.sdkProcessingMetadata, M(o, [[{ type: i }, t]]);
|
|
1339
|
+
function ln(t4, e, n) {
|
|
1340
|
+
return e || `${Or(t4)}?${Nr(t4, n)}`;
|
|
1691
1341
|
}
|
|
1692
|
-
var
|
|
1693
|
-
function
|
|
1342
|
+
var mn = [];
|
|
1343
|
+
function kr(t4) {
|
|
1694
1344
|
let e = {};
|
|
1695
|
-
return
|
|
1696
|
-
let { name: r } = n,
|
|
1697
|
-
|
|
1345
|
+
return t4.forEach((n) => {
|
|
1346
|
+
let { name: r } = n, o = e[r];
|
|
1347
|
+
o && !o.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
|
|
1698
1348
|
}), Object.keys(e).map((n) => e[n]);
|
|
1699
1349
|
}
|
|
1700
|
-
function
|
|
1701
|
-
let e =
|
|
1702
|
-
e.forEach((
|
|
1703
|
-
|
|
1350
|
+
function St(t4) {
|
|
1351
|
+
let e = t4.defaultIntegrations || [], n = t4.integrations;
|
|
1352
|
+
e.forEach((i) => {
|
|
1353
|
+
i.isDefaultInstance = true;
|
|
1704
1354
|
});
|
|
1705
1355
|
let r;
|
|
1706
|
-
Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r =
|
|
1707
|
-
let
|
|
1708
|
-
if (
|
|
1709
|
-
let [
|
|
1710
|
-
|
|
1356
|
+
Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r = ee(n(e)) : r = e;
|
|
1357
|
+
let o = kr(r), s = Dr(o, (i) => i.name === "Debug");
|
|
1358
|
+
if (s !== -1) {
|
|
1359
|
+
let [i] = o.splice(s, 1);
|
|
1360
|
+
o.push(i);
|
|
1711
1361
|
}
|
|
1712
|
-
return
|
|
1362
|
+
return o;
|
|
1713
1363
|
}
|
|
1714
|
-
function
|
|
1364
|
+
function gn(t4, e) {
|
|
1715
1365
|
let n = {};
|
|
1716
1366
|
return e.forEach((r) => {
|
|
1717
|
-
r && Tt(
|
|
1367
|
+
r && Tt(t4, r, n);
|
|
1718
1368
|
}), n;
|
|
1719
1369
|
}
|
|
1720
|
-
function
|
|
1721
|
-
|
|
1370
|
+
function yt(t4, e) {
|
|
1371
|
+
for (let n of e) n && n.afterAllSetup && n.afterAllSetup(t4);
|
|
1372
|
+
}
|
|
1373
|
+
function Tt(t4, e, n) {
|
|
1374
|
+
if (n[e.name]) {
|
|
1375
|
+
_ && d.log(`Integration skipped because it was already installed: ${e.name}`);
|
|
1376
|
+
return;
|
|
1377
|
+
}
|
|
1378
|
+
if (n[e.name] = e, mn.indexOf(e.name) === -1 && typeof e.setupOnce == "function" && (e.setupOnce(), mn.push(e.name)), e.setup && typeof e.setup == "function" && e.setup(t4), typeof e.preprocessEvent == "function") {
|
|
1722
1379
|
let r = e.preprocessEvent.bind(e);
|
|
1723
|
-
|
|
1380
|
+
t4.on("preprocessEvent", (o, s) => r(o, s, t4));
|
|
1724
1381
|
}
|
|
1725
|
-
if (
|
|
1726
|
-
let r = e.processEvent.bind(e),
|
|
1727
|
-
|
|
1382
|
+
if (typeof e.processEvent == "function") {
|
|
1383
|
+
let r = e.processEvent.bind(e), o = Object.assign((s, i) => r(s, i, t4), { id: e.name });
|
|
1384
|
+
t4.addEventProcessor(o);
|
|
1728
1385
|
}
|
|
1729
|
-
|
|
1386
|
+
_ && d.log(`Integration installed: ${e.name}`);
|
|
1730
1387
|
}
|
|
1731
|
-
function
|
|
1732
|
-
for (let n = 0; n <
|
|
1388
|
+
function Dr(t4, e) {
|
|
1389
|
+
for (let n = 0; n < t4.length; n++) if (e(t4[n]) === true) return n;
|
|
1733
1390
|
return -1;
|
|
1734
1391
|
}
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
Mr(a, t), Fr(a, u), e.type === void 0 && Ur(a, t.stackParser);
|
|
1738
|
-
let c = r;
|
|
1739
|
-
n.captureContext && (c = k.clone(c).update(n.captureContext));
|
|
1740
|
-
let f = T(a), d = s && s.getEventProcessors ? s.getEventProcessors() : [];
|
|
1741
|
-
if (c) {
|
|
1742
|
-
if (c.getAttachments) {
|
|
1743
|
-
let l = [...n.attachments || [], ...c.getAttachments()];
|
|
1744
|
-
l.length && (n.attachments = l);
|
|
1745
|
-
}
|
|
1746
|
-
f = c.applyToEvent(a, n, d);
|
|
1747
|
-
} else f = K([...d, ...fe()], a, n);
|
|
1748
|
-
return f.then((l) => (l && Gr(l), typeof i == "number" && i > 0 ? Br(l, i, o) : l));
|
|
1749
|
-
}
|
|
1750
|
-
function Mr(t, e) {
|
|
1751
|
-
let { environment: n, release: r, dist: s, maxValueLength: i = 250 } = e;
|
|
1752
|
-
"environment" in t || (t.environment = "environment" in e ? n : V), t.release === void 0 && r !== void 0 && (t.release = r), t.dist === void 0 && s !== void 0 && (t.dist = s), t.message && (t.message = C(t.message, i));
|
|
1753
|
-
let o = t.exception && t.exception.values && t.exception.values[0];
|
|
1754
|
-
o && o.value && (o.value = C(o.value, i));
|
|
1755
|
-
let a = t.request;
|
|
1756
|
-
a && a.url && (a.url = C(a.url, i));
|
|
1757
|
-
}
|
|
1758
|
-
var xn = /* @__PURE__ */ new WeakMap();
|
|
1759
|
-
function Ur(t, e) {
|
|
1760
|
-
let n = m._sentryDebugIds;
|
|
1761
|
-
if (!n) return;
|
|
1762
|
-
let r, s = xn.get(e);
|
|
1763
|
-
s ? r = s : (r = /* @__PURE__ */ new Map(), xn.set(e, r));
|
|
1764
|
-
let i = Object.keys(n).reduce((o, a) => {
|
|
1765
|
-
let u, c = r.get(a);
|
|
1766
|
-
c ? u = c : (u = e(a), r.set(a, u));
|
|
1767
|
-
for (let f = u.length - 1; f >= 0; f--) {
|
|
1768
|
-
let d = u[f];
|
|
1769
|
-
if (d.filename) {
|
|
1770
|
-
o[d.filename] = n[a];
|
|
1771
|
-
break;
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
return o;
|
|
1775
|
-
}, {});
|
|
1776
|
-
try {
|
|
1777
|
-
t.exception.values.forEach((o) => {
|
|
1778
|
-
o.stacktrace.frames.forEach((a) => {
|
|
1779
|
-
a.filename && (a.debug_id = i[a.filename]);
|
|
1780
|
-
});
|
|
1781
|
-
});
|
|
1782
|
-
} catch {
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
function Gr(t) {
|
|
1786
|
-
let e = {};
|
|
1787
|
-
try {
|
|
1788
|
-
t.exception.values.forEach((r) => {
|
|
1789
|
-
r.stacktrace.frames.forEach((s) => {
|
|
1790
|
-
s.debug_id && (s.abs_path ? e[s.abs_path] = s.debug_id : s.filename && (e[s.filename] = s.debug_id), delete s.debug_id);
|
|
1791
|
-
});
|
|
1792
|
-
});
|
|
1793
|
-
} catch {
|
|
1794
|
-
}
|
|
1795
|
-
if (Object.keys(e).length === 0) return;
|
|
1796
|
-
t.debug_meta = t.debug_meta || {}, t.debug_meta.images = t.debug_meta.images || [];
|
|
1797
|
-
let n = t.debug_meta.images;
|
|
1798
|
-
Object.keys(e).forEach((r) => {
|
|
1799
|
-
n.push({ type: "sourcemap", code_file: r, debug_id: e[r] });
|
|
1800
|
-
});
|
|
1801
|
-
}
|
|
1802
|
-
function Fr(t, e) {
|
|
1803
|
-
e.length > 0 && (t.sdk = t.sdk || {}, t.sdk.integrations = [...t.sdk.integrations || [], ...e]);
|
|
1804
|
-
}
|
|
1805
|
-
function Br(t, e, n) {
|
|
1806
|
-
if (!t) return null;
|
|
1807
|
-
let r = { ...t, ...t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((s) => ({ ...s, ...s.data && { data: N(s.data, e, n) } })) }, ...t.user && { user: N(t.user, e, n) }, ...t.contexts && { contexts: N(t.contexts, e, n) }, ...t.extra && { extra: N(t.extra, e, n) } };
|
|
1808
|
-
return t.contexts && t.contexts.trace && r.contexts && (r.contexts.trace = t.contexts.trace, t.contexts.trace.data && (r.contexts.trace.data = N(t.contexts.trace.data, e, n))), t.spans && (r.spans = t.spans.map((s) => (s.data && (s.data = N(s.data, e, n)), s))), r;
|
|
1809
|
-
}
|
|
1810
|
-
var Dn = "Not capturing exception because it's already been captured.";
|
|
1811
|
-
var Ue = class {
|
|
1392
|
+
var hn = "Not capturing exception because it's already been captured.";
|
|
1393
|
+
var ve = class {
|
|
1812
1394
|
constructor(e) {
|
|
1813
|
-
if (this._options = e, this._integrations = {}, this.
|
|
1814
|
-
let n =
|
|
1815
|
-
this._transport = e.transport({ recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: n });
|
|
1395
|
+
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = de(e.dsn) : _ && d.warn("No DSN provided, client will not send events."), this._dsn) {
|
|
1396
|
+
let n = ln(this._dsn, e.tunnel, e._metadata ? e._metadata.sdk : void 0);
|
|
1397
|
+
this._transport = e.transport({ tunnel: this._options.tunnel, recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: n });
|
|
1816
1398
|
}
|
|
1817
1399
|
}
|
|
1818
1400
|
captureException(e, n, r) {
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
let s = n && n.event_id;
|
|
1824
|
-
return this._process(this.eventFromException(e, n).then((i) => this._captureEvent(i, n, r)).then((i) => {
|
|
1825
|
-
s = i;
|
|
1826
|
-
})), s;
|
|
1401
|
+
let o = S();
|
|
1402
|
+
if (Ie(e)) return _ && d.log(hn), o;
|
|
1403
|
+
let s = { event_id: o, ...n };
|
|
1404
|
+
return this._process(this.eventFromException(e, s).then((i) => this._captureEvent(i, s, r))), s.event_id;
|
|
1827
1405
|
}
|
|
1828
|
-
captureMessage(e, n, r,
|
|
1829
|
-
let
|
|
1830
|
-
return this._process(
|
|
1831
|
-
i = a;
|
|
1832
|
-
})), i;
|
|
1406
|
+
captureMessage(e, n, r, o) {
|
|
1407
|
+
let s = { event_id: S(), ...r }, i = H(e) ? e : String(e), a = pe(e) ? this.eventFromMessage(i, n, s) : this.eventFromException(e, s);
|
|
1408
|
+
return this._process(a.then((c) => this._captureEvent(c, s, o))), s.event_id;
|
|
1833
1409
|
}
|
|
1834
1410
|
captureEvent(e, n, r) {
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
let s = n && n.event_id;
|
|
1840
|
-
return this._process(this._captureEvent(e, n, r).then((i) => {
|
|
1841
|
-
s = i;
|
|
1842
|
-
})), s;
|
|
1411
|
+
let o = S();
|
|
1412
|
+
if (n && n.originalException && Ie(n.originalException)) return _ && d.log(hn), o;
|
|
1413
|
+
let s = { event_id: o, ...n }, a = (e.sdkProcessingMetadata || {}).capturedSpanScope;
|
|
1414
|
+
return this._process(this._captureEvent(e, s, a || r)), s.event_id;
|
|
1843
1415
|
}
|
|
1844
1416
|
captureSession(e) {
|
|
1845
|
-
typeof e.release != "string" ?
|
|
1417
|
+
typeof e.release != "string" ? _ && d.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), re(e, { init: false }));
|
|
1846
1418
|
}
|
|
1847
1419
|
getDsn() {
|
|
1848
1420
|
return this._dsn;
|
|
@@ -1858,10 +1430,10 @@ var Ue = class {
|
|
|
1858
1430
|
}
|
|
1859
1431
|
flush(e) {
|
|
1860
1432
|
let n = this._transport;
|
|
1861
|
-
return n ? this._isClientDoneProcessing(e).then((r) => n.flush(e).then((
|
|
1433
|
+
return n ? (this.emit("flush"), this._isClientDoneProcessing(e).then((r) => n.flush(e).then((o) => r && o))) : I(true);
|
|
1862
1434
|
}
|
|
1863
1435
|
close(e) {
|
|
1864
|
-
return this.flush(e).then((n) => (this.getOptions().enabled = false, n));
|
|
1436
|
+
return this.flush(e).then((n) => (this.getOptions().enabled = false, this.emit("close"), n));
|
|
1865
1437
|
}
|
|
1866
1438
|
getEventProcessors() {
|
|
1867
1439
|
return this._eventProcessors;
|
|
@@ -1869,37 +1441,31 @@ var Ue = class {
|
|
|
1869
1441
|
addEventProcessor(e) {
|
|
1870
1442
|
this._eventProcessors.push(e);
|
|
1871
1443
|
}
|
|
1872
|
-
|
|
1873
|
-
|
|
1444
|
+
init() {
|
|
1445
|
+
this._isEnabled() && this._setupIntegrations();
|
|
1874
1446
|
}
|
|
1875
|
-
|
|
1447
|
+
getIntegrationByName(e) {
|
|
1876
1448
|
return this._integrations[e];
|
|
1877
1449
|
}
|
|
1878
|
-
getIntegration(e) {
|
|
1879
|
-
try {
|
|
1880
|
-
return this._integrations[e.id] || null;
|
|
1881
|
-
} catch {
|
|
1882
|
-
return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn(`Cannot retrieve integration ${e.id} from the current Client`), null;
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
1450
|
addIntegration(e) {
|
|
1886
|
-
|
|
1451
|
+
let n = this._integrations[e.name];
|
|
1452
|
+
Tt(this, e, this._integrations), n || yt(this, [e]);
|
|
1887
1453
|
}
|
|
1888
1454
|
sendEvent(e, n = {}) {
|
|
1889
1455
|
this.emit("beforeSendEvent", e, n);
|
|
1890
|
-
let r =
|
|
1891
|
-
for (let
|
|
1892
|
-
let
|
|
1893
|
-
|
|
1456
|
+
let r = un(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
1457
|
+
for (let s of n.attachments || []) r = rt(r, st(s));
|
|
1458
|
+
let o = this.sendEnvelope(r);
|
|
1459
|
+
o && o.then((s) => this.emit("afterSendEvent", e, s), null);
|
|
1894
1460
|
}
|
|
1895
1461
|
sendSession(e) {
|
|
1896
|
-
let n =
|
|
1897
|
-
this.
|
|
1462
|
+
let n = cn(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
1463
|
+
this.sendEnvelope(n);
|
|
1898
1464
|
}
|
|
1899
1465
|
recordDroppedEvent(e, n, r) {
|
|
1900
1466
|
if (this._options.sendClientReports) {
|
|
1901
|
-
let
|
|
1902
|
-
|
|
1467
|
+
let o = `${e}:${n}`;
|
|
1468
|
+
_ && d.log(`Adding outcome: "${o}"`), this._outcomes[o] = this._outcomes[o] + 1 || 1;
|
|
1903
1469
|
}
|
|
1904
1470
|
}
|
|
1905
1471
|
on(e, n) {
|
|
@@ -1908,145 +1474,158 @@ var Ue = class {
|
|
|
1908
1474
|
emit(e, ...n) {
|
|
1909
1475
|
this._hooks[e] && this._hooks[e].forEach((r) => r(...n));
|
|
1910
1476
|
}
|
|
1477
|
+
sendEnvelope(e) {
|
|
1478
|
+
return this.emit("beforeEnvelope", e), this._isEnabled() && this._transport ? this._transport.send(e).then(null, (n) => (_ && d.error("Error while sending event:", n), n)) : (_ && d.error("Transport disabled"), I({}));
|
|
1479
|
+
}
|
|
1480
|
+
_setupIntegrations() {
|
|
1481
|
+
let { integrations: e } = this._options;
|
|
1482
|
+
this._integrations = gn(this, e), yt(this, e);
|
|
1483
|
+
}
|
|
1911
1484
|
_updateSessionFromEvent(e, n) {
|
|
1912
|
-
let r = false,
|
|
1913
|
-
if (
|
|
1914
|
-
|
|
1915
|
-
for (let
|
|
1916
|
-
let
|
|
1917
|
-
if (
|
|
1485
|
+
let r = false, o = false, s = n.exception && n.exception.values;
|
|
1486
|
+
if (s) {
|
|
1487
|
+
o = true;
|
|
1488
|
+
for (let c of s) {
|
|
1489
|
+
let u = c.mechanism;
|
|
1490
|
+
if (u && u.handled === false) {
|
|
1918
1491
|
r = true;
|
|
1919
1492
|
break;
|
|
1920
1493
|
}
|
|
1921
1494
|
}
|
|
1922
1495
|
}
|
|
1923
|
-
let
|
|
1924
|
-
(
|
|
1496
|
+
let i = e.status === "ok";
|
|
1497
|
+
(i && e.errors === 0 || i && r) && (re(e, { ...r && { status: "crashed" }, errors: e.errors || Number(o || r) }), this.captureSession(e));
|
|
1925
1498
|
}
|
|
1926
1499
|
_isClientDoneProcessing(e) {
|
|
1927
|
-
return new
|
|
1928
|
-
let r = 0,
|
|
1929
|
-
this._numProcessing == 0 ? (clearInterval(
|
|
1930
|
-
},
|
|
1500
|
+
return new R((n) => {
|
|
1501
|
+
let r = 0, o = 1, s = setInterval(() => {
|
|
1502
|
+
this._numProcessing == 0 ? (clearInterval(s), n(true)) : (r += o, e && r >= e && (clearInterval(s), n(false)));
|
|
1503
|
+
}, o);
|
|
1931
1504
|
});
|
|
1932
1505
|
}
|
|
1933
1506
|
_isEnabled() {
|
|
1934
1507
|
return this.getOptions().enabled !== false && this._transport !== void 0;
|
|
1935
1508
|
}
|
|
1936
|
-
_prepareEvent(e, n, r) {
|
|
1509
|
+
_prepareEvent(e, n, r, o = G()) {
|
|
1937
1510
|
let s = this.getOptions(), i = Object.keys(this._integrations);
|
|
1938
|
-
return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n),
|
|
1939
|
-
if (
|
|
1940
|
-
let {
|
|
1941
|
-
if (!(
|
|
1942
|
-
let { traceId:
|
|
1943
|
-
|
|
1944
|
-
let
|
|
1945
|
-
|
|
1511
|
+
return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n), e.type || o.setLastEventId(e.event_id || n.event_id), dn(s, e, n, r, this, o).then((a) => {
|
|
1512
|
+
if (a === null) return a;
|
|
1513
|
+
let c = { ...o.getPropagationContext(), ...r ? r.getPropagationContext() : void 0 };
|
|
1514
|
+
if (!(a.contexts && a.contexts.trace) && c) {
|
|
1515
|
+
let { traceId: f, spanId: p, parentSpanId: l, dsc: g } = c;
|
|
1516
|
+
a.contexts = { trace: E({ trace_id: f, span_id: p, parent_span_id: l }), ...a.contexts };
|
|
1517
|
+
let h = g || se(f, this);
|
|
1518
|
+
a.sdkProcessingMetadata = { dynamicSamplingContext: h, ...a.sdkProcessingMetadata };
|
|
1946
1519
|
}
|
|
1947
|
-
return
|
|
1520
|
+
return a;
|
|
1948
1521
|
});
|
|
1949
1522
|
}
|
|
1950
1523
|
_captureEvent(e, n = {}, r) {
|
|
1951
|
-
return this._processEvent(e, n, r).then((
|
|
1952
|
-
if (
|
|
1953
|
-
let
|
|
1954
|
-
|
|
1524
|
+
return this._processEvent(e, n, r).then((o) => o.event_id, (o) => {
|
|
1525
|
+
if (_) {
|
|
1526
|
+
let s = o;
|
|
1527
|
+
s.logLevel === "log" ? d.log(s.message) : d.warn(s);
|
|
1955
1528
|
}
|
|
1956
1529
|
});
|
|
1957
1530
|
}
|
|
1958
1531
|
_processEvent(e, n, r) {
|
|
1959
|
-
let
|
|
1960
|
-
if (a && typeof
|
|
1961
|
-
let
|
|
1962
|
-
return this._prepareEvent(e, n, r).then((
|
|
1963
|
-
if (
|
|
1964
|
-
if (n.data && n.data.__sentry__ === true) return
|
|
1965
|
-
let
|
|
1966
|
-
return
|
|
1967
|
-
}).then((
|
|
1968
|
-
if (
|
|
1969
|
-
let
|
|
1970
|
-
!
|
|
1971
|
-
let
|
|
1972
|
-
if (
|
|
1973
|
-
let
|
|
1974
|
-
|
|
1532
|
+
let o = this.getOptions(), { sampleRate: s } = o, i = En(e), a = _n(e), c = e.type || "error", u = `before send for type \`${c}\``, f = typeof s > "u" ? void 0 : an(s);
|
|
1533
|
+
if (a && typeof f == "number" && Math.random() > f) return this.recordDroppedEvent("sample_rate", "error", e), $(new y(`Discarding event because it's not included in the random sample (sampling rate = ${s})`, "log"));
|
|
1534
|
+
let p = c === "replay_event" ? "replay" : c, g = (e.sdkProcessingMetadata || {}).capturedSpanIsolationScope;
|
|
1535
|
+
return this._prepareEvent(e, n, r, g).then((h) => {
|
|
1536
|
+
if (h === null) throw this.recordDroppedEvent("event_processor", p, e), new y("An event processor returned `null`, will not send event.", "log");
|
|
1537
|
+
if (n.data && n.data.__sentry__ === true) return h;
|
|
1538
|
+
let T = Mr(o, h, n);
|
|
1539
|
+
return vr(T, u);
|
|
1540
|
+
}).then((h) => {
|
|
1541
|
+
if (h === null) throw this.recordDroppedEvent("before_send", p, e), new y(`${u} returned \`null\`, will not send event.`, "log");
|
|
1542
|
+
let ce = r && r.getSession();
|
|
1543
|
+
!i && ce && this._updateSessionFromEvent(ce, h);
|
|
1544
|
+
let T = h.transaction_info;
|
|
1545
|
+
if (i && T && h.transaction !== e.transaction) {
|
|
1546
|
+
let Nn = "custom";
|
|
1547
|
+
h.transaction_info = { ...T, source: Nn };
|
|
1975
1548
|
}
|
|
1976
|
-
return this.sendEvent(
|
|
1977
|
-
}).then(null, (
|
|
1978
|
-
throw
|
|
1979
|
-
Reason: ${
|
|
1549
|
+
return this.sendEvent(h, n), h;
|
|
1550
|
+
}).then(null, (h) => {
|
|
1551
|
+
throw h instanceof y ? h : (this.captureException(h, { data: { __sentry__: true }, originalException: h }), new y(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
1552
|
+
Reason: ${h}`));
|
|
1980
1553
|
});
|
|
1981
1554
|
}
|
|
1982
1555
|
_process(e) {
|
|
1983
1556
|
this._numProcessing++, e.then((n) => (this._numProcessing--, n), (n) => (this._numProcessing--, n));
|
|
1984
1557
|
}
|
|
1985
|
-
_sendEnvelope(e) {
|
|
1986
|
-
if (this.emit("beforeEnvelope", e), this._isEnabled() && this._transport) return this._transport.send(e).then(null, (n) => {
|
|
1987
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.error("Error while sending event:", n);
|
|
1988
|
-
});
|
|
1989
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.error("Transport disabled");
|
|
1990
|
-
}
|
|
1991
1558
|
_clearOutcomes() {
|
|
1992
1559
|
let e = this._outcomes;
|
|
1993
1560
|
return this._outcomes = {}, Object.keys(e).map((n) => {
|
|
1994
|
-
let [r,
|
|
1995
|
-
return { reason: r, category:
|
|
1561
|
+
let [r, o] = n.split(":");
|
|
1562
|
+
return { reason: r, category: o, quantity: e[n] };
|
|
1996
1563
|
});
|
|
1997
1564
|
}
|
|
1998
1565
|
};
|
|
1999
|
-
function
|
|
1566
|
+
function vr(t4, e) {
|
|
2000
1567
|
let n = `${e} must return \`null\` or a valid event.`;
|
|
2001
|
-
if (
|
|
2002
|
-
if (!
|
|
1568
|
+
if (C(t4)) return t4.then((r) => {
|
|
1569
|
+
if (!A(r) && r !== null) throw new y(n);
|
|
2003
1570
|
return r;
|
|
2004
1571
|
}, (r) => {
|
|
2005
1572
|
throw new y(`${e} rejected with ${r}`);
|
|
2006
1573
|
});
|
|
2007
|
-
if (!
|
|
2008
|
-
return
|
|
2009
|
-
}
|
|
2010
|
-
function
|
|
2011
|
-
let { beforeSend: r, beforeSendTransaction: s } =
|
|
2012
|
-
|
|
1574
|
+
if (!A(t4) && t4 !== null) throw new y(n);
|
|
1575
|
+
return t4;
|
|
1576
|
+
}
|
|
1577
|
+
function Mr(t4, e, n) {
|
|
1578
|
+
let { beforeSend: r, beforeSendTransaction: o, beforeSendSpan: s } = t4;
|
|
1579
|
+
if (_n(e) && r) return r(e, n);
|
|
1580
|
+
if (En(e)) {
|
|
1581
|
+
if (e.spans && s) {
|
|
1582
|
+
let i = [];
|
|
1583
|
+
for (let a of e.spans) {
|
|
1584
|
+
let c = s(a);
|
|
1585
|
+
c && i.push(c);
|
|
1586
|
+
}
|
|
1587
|
+
e.spans = i;
|
|
1588
|
+
}
|
|
1589
|
+
if (o) return o(e, n);
|
|
1590
|
+
}
|
|
1591
|
+
return e;
|
|
2013
1592
|
}
|
|
2014
|
-
function
|
|
2015
|
-
return
|
|
1593
|
+
function _n(t4) {
|
|
1594
|
+
return t4.type === void 0;
|
|
2016
1595
|
}
|
|
2017
|
-
function
|
|
2018
|
-
return
|
|
1596
|
+
function En(t4) {
|
|
1597
|
+
return t4.type === "transaction";
|
|
2019
1598
|
}
|
|
2020
|
-
function
|
|
2021
|
-
let
|
|
2022
|
-
n && n.sdk && (
|
|
2023
|
-
let
|
|
2024
|
-
return
|
|
1599
|
+
function Sn(t4, e, n, r, o) {
|
|
1600
|
+
let s = { sent_at: (/* @__PURE__ */ new Date()).toISOString() };
|
|
1601
|
+
n && n.sdk && (s.sdk = { name: n.sdk.name, version: n.sdk.version }), r && o && (s.dsn = M(o)), e && (s.trace = E(e));
|
|
1602
|
+
let i = Pr(t4);
|
|
1603
|
+
return P(s, [i]);
|
|
2025
1604
|
}
|
|
2026
|
-
function
|
|
2027
|
-
return [{ type: "check_in" },
|
|
1605
|
+
function Pr(t4) {
|
|
1606
|
+
return [{ type: "check_in" }, t4];
|
|
2028
1607
|
}
|
|
2029
|
-
var
|
|
1608
|
+
var ae = class extends ve {
|
|
2030
1609
|
constructor(e) {
|
|
2031
|
-
|
|
1610
|
+
sn(), super(e);
|
|
2032
1611
|
}
|
|
2033
1612
|
eventFromException(e, n) {
|
|
2034
|
-
return
|
|
1613
|
+
return I(pt(this, this._options.stackParser, e, n));
|
|
2035
1614
|
}
|
|
2036
1615
|
eventFromMessage(e, n = "info", r) {
|
|
2037
|
-
return
|
|
1616
|
+
return I(ft(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
2038
1617
|
}
|
|
2039
1618
|
captureException(e, n, r) {
|
|
2040
|
-
if (this._options.autoSessionTracking && this._sessionFlusher
|
|
2041
|
-
let
|
|
2042
|
-
|
|
1619
|
+
if (this._options.autoSessionTracking && this._sessionFlusher) {
|
|
1620
|
+
let o = G().getRequestSession();
|
|
1621
|
+
o && o.status === "ok" && (o.status = "errored");
|
|
2043
1622
|
}
|
|
2044
1623
|
return super.captureException(e, n, r);
|
|
2045
1624
|
}
|
|
2046
1625
|
captureEvent(e, n, r) {
|
|
2047
|
-
if (this._options.autoSessionTracking && this._sessionFlusher &&
|
|
2048
|
-
let
|
|
2049
|
-
|
|
1626
|
+
if (this._options.autoSessionTracking && this._sessionFlusher && (e.type || "exception") === "exception" && e.exception && e.exception.values && e.exception.values.length > 0) {
|
|
1627
|
+
let i = G().getRequestSession();
|
|
1628
|
+
i && i.status === "ok" && (i.status = "errored");
|
|
2050
1629
|
}
|
|
2051
1630
|
return super.captureEvent(e, n, r);
|
|
2052
1631
|
}
|
|
@@ -2055,229 +1634,250 @@ var pe = class extends Ue {
|
|
|
2055
1634
|
}
|
|
2056
1635
|
initSessionFlusher() {
|
|
2057
1636
|
let { release: e, environment: n } = this._options;
|
|
2058
|
-
e ? this._sessionFlusher = new
|
|
1637
|
+
e ? this._sessionFlusher = new De(this, { release: e, environment: n }) : _ && d.warn("Cannot initialise an instance of SessionFlusher if no release is provided!");
|
|
2059
1638
|
}
|
|
2060
1639
|
captureCheckIn(e, n, r) {
|
|
2061
|
-
let
|
|
2062
|
-
if (!this._isEnabled()) return
|
|
2063
|
-
let
|
|
2064
|
-
|
|
2065
|
-
let [f,
|
|
2066
|
-
|
|
2067
|
-
let l =
|
|
2068
|
-
return
|
|
1640
|
+
let o = "checkInId" in e && e.checkInId ? e.checkInId : S();
|
|
1641
|
+
if (!this._isEnabled()) return _ && d.warn("SDK not enabled, will not capture checkin."), o;
|
|
1642
|
+
let s = this.getOptions(), { release: i, environment: a, tunnel: c } = s, u = { check_in_id: o, monitor_slug: e.monitorSlug, status: e.status, release: i, environment: a };
|
|
1643
|
+
"duration" in e && (u.duration = e.duration), n && (u.monitor_config = { schedule: n.schedule, checkin_margin: n.checkinMargin, max_runtime: n.maxRuntime, timezone: n.timezone, failure_issue_threshold: n.failureIssueThreshold, recovery_threshold: n.recoveryThreshold });
|
|
1644
|
+
let [f, p] = this._getTraceInfoFromScope(r);
|
|
1645
|
+
p && (u.contexts = { trace: p });
|
|
1646
|
+
let l = Sn(u, f, this.getSdkMetadata(), c, this.getDsn());
|
|
1647
|
+
return _ && d.info("Sending checkin:", e.monitorSlug, e.status), this.sendEnvelope(l), o;
|
|
2069
1648
|
}
|
|
2070
1649
|
_captureRequestSession() {
|
|
2071
|
-
this._sessionFlusher ? this._sessionFlusher.incrementSessionStatusCount() :
|
|
1650
|
+
this._sessionFlusher ? this._sessionFlusher.incrementSessionStatusCount() : _ && d.warn("Discarded request mode session because autoSessionTracking option was disabled");
|
|
2072
1651
|
}
|
|
2073
|
-
_prepareEvent(e, n, r) {
|
|
2074
|
-
return this._options.platform && (e.platform = e.platform || this._options.platform), this._options.runtime && (e.contexts = { ...e.contexts, runtime: (e.contexts || {}).runtime || this._options.runtime }), this._options.serverName && (e.server_name = e.server_name || this._options.serverName), super._prepareEvent(e, n, r);
|
|
1652
|
+
_prepareEvent(e, n, r, o) {
|
|
1653
|
+
return this._options.platform && (e.platform = e.platform || this._options.platform), this._options.runtime && (e.contexts = { ...e.contexts, runtime: (e.contexts || {}).runtime || this._options.runtime }), this._options.serverName && (e.server_name = e.server_name || this._options.serverName), super._prepareEvent(e, n, r, o);
|
|
2075
1654
|
}
|
|
2076
1655
|
_getTraceInfoFromScope(e) {
|
|
2077
1656
|
if (!e) return [void 0, void 0];
|
|
2078
|
-
let n = e
|
|
2079
|
-
if (n)
|
|
2080
|
-
|
|
2081
|
-
|
|
1657
|
+
let n = j(e);
|
|
1658
|
+
if (n) {
|
|
1659
|
+
let c = L(n);
|
|
1660
|
+
return [Ne(c), Ce(c)];
|
|
1661
|
+
}
|
|
1662
|
+
let { traceId: r, spanId: o, parentSpanId: s, dsc: i } = e.getPropagationContext(), a = { trace_id: r, span_id: o, parent_span_id: s };
|
|
1663
|
+
return i ? [i, a] : [se(r, this), a];
|
|
2082
1664
|
}
|
|
2083
1665
|
};
|
|
2084
|
-
var
|
|
2085
|
-
function
|
|
2086
|
-
let r = {},
|
|
2087
|
-
function i
|
|
1666
|
+
var wr = 64;
|
|
1667
|
+
function It(t4, e, n = et(t4.bufferSize || wr)) {
|
|
1668
|
+
let r = {}, o = (i) => n.drain(i);
|
|
1669
|
+
function s(i) {
|
|
2088
1670
|
let a = [];
|
|
2089
|
-
if (
|
|
2090
|
-
let
|
|
2091
|
-
if (
|
|
2092
|
-
let
|
|
2093
|
-
|
|
2094
|
-
} else a.push(
|
|
2095
|
-
}), a.length === 0) return
|
|
2096
|
-
let
|
|
2097
|
-
|
|
2098
|
-
let
|
|
2099
|
-
|
|
1671
|
+
if (xe(i, (p, l) => {
|
|
1672
|
+
let g = Ae(l);
|
|
1673
|
+
if (at(r, g)) {
|
|
1674
|
+
let h = yn(p, l);
|
|
1675
|
+
t4.recordDroppedEvent("ratelimit_backoff", g, h);
|
|
1676
|
+
} else a.push(p);
|
|
1677
|
+
}), a.length === 0) return I({});
|
|
1678
|
+
let c = P(i[0], a), u = (p) => {
|
|
1679
|
+
xe(c, (l, g) => {
|
|
1680
|
+
let h = yn(l, g);
|
|
1681
|
+
t4.recordDroppedEvent(p, Ae(g), h);
|
|
2100
1682
|
});
|
|
2101
|
-
}, f = () => e({ body:
|
|
2102
|
-
throw
|
|
1683
|
+
}, f = () => e({ body: ot(c) }).then((p) => (p.statusCode !== void 0 && (p.statusCode < 200 || p.statusCode >= 300) && _ && d.warn(`Sentry responded with status code ${p.statusCode} to sent event.`), r = ct(r, p), p), (p) => {
|
|
1684
|
+
throw u("network_error"), p;
|
|
2103
1685
|
});
|
|
2104
|
-
return n.add(f).then((
|
|
2105
|
-
if (
|
|
2106
|
-
throw
|
|
1686
|
+
return n.add(f).then((p) => p, (p) => {
|
|
1687
|
+
if (p instanceof y) return _ && d.error("Skipped sending event because buffer is full."), u("queue_overflow"), I({});
|
|
1688
|
+
throw p;
|
|
2107
1689
|
});
|
|
2108
1690
|
}
|
|
2109
|
-
return
|
|
1691
|
+
return { send: s, flush: o };
|
|
2110
1692
|
}
|
|
2111
|
-
function
|
|
2112
|
-
if (!(e !== "event" && e !== "transaction")) return Array.isArray(
|
|
1693
|
+
function yn(t4, e) {
|
|
1694
|
+
if (!(e !== "event" && e !== "transaction")) return Array.isArray(t4) ? t4[1] : void 0;
|
|
2113
1695
|
}
|
|
2114
|
-
|
|
2115
|
-
|
|
1696
|
+
var Lr = "RewriteFrames";
|
|
1697
|
+
var Me = (t4 = {}) => {
|
|
1698
|
+
let e = t4.root, n = t4.prefix || "app:///", r = "window" in m && m.window !== void 0, o = t4.iteratee || Fr({ isBrowser: r, root: e, prefix: n });
|
|
1699
|
+
function s(a) {
|
|
1700
|
+
try {
|
|
1701
|
+
return { ...a, exception: { ...a.exception, values: a.exception.values.map((c) => ({ ...c, ...c.stacktrace && { stacktrace: i(c.stacktrace) } })) } };
|
|
1702
|
+
} catch {
|
|
1703
|
+
return a;
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
function i(a) {
|
|
1707
|
+
return { ...a, frames: a && a.frames && a.frames.map((c) => o(c)) };
|
|
1708
|
+
}
|
|
1709
|
+
return { name: Lr, processEvent(a) {
|
|
1710
|
+
let c = a;
|
|
1711
|
+
return a.exception && Array.isArray(a.exception.values) && (c = s(c)), c;
|
|
1712
|
+
} };
|
|
1713
|
+
};
|
|
1714
|
+
function Fr({ isBrowser: t4, root: e, prefix: n }) {
|
|
1715
|
+
return (r) => {
|
|
1716
|
+
if (!r.filename) return r;
|
|
1717
|
+
let o = /^[a-zA-Z]:\\/.test(r.filename) || r.filename.includes("\\") && !r.filename.includes("/"), s = /^\//.test(r.filename);
|
|
1718
|
+
if (t4) {
|
|
1719
|
+
if (e) {
|
|
1720
|
+
let i = r.filename;
|
|
1721
|
+
i.indexOf(e) === 0 && (r.filename = i.replace(e, n));
|
|
1722
|
+
}
|
|
1723
|
+
} else if (o || s) {
|
|
1724
|
+
let i = o ? r.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : r.filename, a = e ? Qe(e, i) : te(i);
|
|
1725
|
+
r.filename = `${n}${a}`;
|
|
1726
|
+
}
|
|
1727
|
+
return r;
|
|
1728
|
+
};
|
|
2116
1729
|
}
|
|
2117
|
-
function
|
|
2118
|
-
return
|
|
1730
|
+
function In(t4) {
|
|
1731
|
+
return typeof t4 == "object" && t4 !== null;
|
|
2119
1732
|
}
|
|
2120
|
-
function
|
|
2121
|
-
return
|
|
1733
|
+
function Br(t4) {
|
|
1734
|
+
return In(t4) && "handled" in t4 && typeof t4.handled == "boolean" && "type" in t4 && typeof t4.type == "string";
|
|
2122
1735
|
}
|
|
2123
|
-
function
|
|
1736
|
+
function $r(t4) {
|
|
1737
|
+
return In(t4) && "mechanism" in t4 && Br(t4.mechanism);
|
|
1738
|
+
}
|
|
1739
|
+
function jr() {
|
|
2124
1740
|
if (m.SENTRY_RELEASE && m.SENTRY_RELEASE.id) return m.SENTRY_RELEASE.id;
|
|
2125
1741
|
}
|
|
2126
|
-
function
|
|
2127
|
-
return
|
|
1742
|
+
function Tn(t4, e) {
|
|
1743
|
+
return t4 !== void 0 ? (t4[e[0]] = e[1], t4) : { [e[0]]: e[1] };
|
|
2128
1744
|
}
|
|
2129
|
-
function
|
|
2130
|
-
return
|
|
1745
|
+
function xn(t4, e) {
|
|
1746
|
+
return t4(e.stack || "", 1);
|
|
2131
1747
|
}
|
|
2132
|
-
function
|
|
2133
|
-
let e =
|
|
1748
|
+
function Gr(t4) {
|
|
1749
|
+
let e = t4 && t4.message;
|
|
2134
1750
|
return e ? e.error && typeof e.error.message == "string" ? e.error.message : e : "No error message";
|
|
2135
1751
|
}
|
|
2136
|
-
function
|
|
2137
|
-
let n = { type: e.name || e.constructor.name, value:
|
|
1752
|
+
function An(t4, e) {
|
|
1753
|
+
let n = { type: e.name || e.constructor.name, value: Gr(e) }, r = xn(t4, e);
|
|
2138
1754
|
return r.length && (n.stacktrace = { frames: r }), n.type === void 0 && n.value === "" && (n.value = "Unrecoverable error caught"), n;
|
|
2139
1755
|
}
|
|
2140
|
-
function
|
|
2141
|
-
let
|
|
2142
|
-
if (
|
|
1756
|
+
function Hr(t4, e, n, r) {
|
|
1757
|
+
let o, i = (r && r.data && $r(r.data) ? r.data.mechanism : void 0) ?? { handled: true, type: "generic" };
|
|
1758
|
+
if (F(n)) o = n;
|
|
2143
1759
|
else {
|
|
2144
|
-
if (
|
|
2145
|
-
let
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
} else s = r && r.syntheticException || new Error(n), s.message = n;
|
|
2150
|
-
o.synthetic = true;
|
|
2151
|
-
}
|
|
2152
|
-
let a = { exception: { values: [Pn(e, s)] } };
|
|
2153
|
-
return oe(a, void 0, void 0), ae(a, o), { ...a, event_id: r && r.event_id };
|
|
2154
|
-
}
|
|
2155
|
-
function Kr(t, e, n = "info", r, s) {
|
|
2156
|
-
let i = { event_id: r && r.event_id, level: n, message: e };
|
|
2157
|
-
if (s && r && r.syntheticException) {
|
|
2158
|
-
let o = Cn(t, r.syntheticException);
|
|
2159
|
-
o.length && (i.exception = { values: [{ value: e, stacktrace: { frames: o } }] });
|
|
2160
|
-
}
|
|
2161
|
-
return i;
|
|
2162
|
-
}
|
|
2163
|
-
var Jr = 5;
|
|
2164
|
-
var Le = class {
|
|
2165
|
-
name = Le.id;
|
|
2166
|
-
limit;
|
|
2167
|
-
constructor(e = {}) {
|
|
2168
|
-
this.limit = e.limit || Jr;
|
|
2169
|
-
}
|
|
2170
|
-
setupOnce(e, n) {
|
|
2171
|
-
let r = n().getClient();
|
|
2172
|
-
r && e((s, i) => {
|
|
2173
|
-
let o = n().getIntegration(Le);
|
|
2174
|
-
return o ? Xr(r.getOptions().stackParser, o.limit, s, i) : s;
|
|
2175
|
-
});
|
|
1760
|
+
if (A(n)) {
|
|
1761
|
+
let c = `Non-Error exception captured with keys: ${K(n)}`, u = t4?.getClient(), f = u && u.getOptions().normalizeDepth;
|
|
1762
|
+
t4?.setExtra("__serialized__", Y(n, f)), o = r && r.syntheticException || new Error(c), o.message = c;
|
|
1763
|
+
} else o = r && r.syntheticException || new Error(n), o.message = n;
|
|
1764
|
+
i.synthetic = true;
|
|
2176
1765
|
}
|
|
2177
|
-
};
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
function
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
}
|
|
2185
|
-
function Mn(t, e, n, r = []) {
|
|
2186
|
-
if (!A(n.cause, Error) || r.length + 1 >= e) return r;
|
|
2187
|
-
let s = Pn(t, n.cause);
|
|
2188
|
-
return Mn(t, e, n.cause, [s, ...r]);
|
|
2189
|
-
}
|
|
2190
|
-
var Zr = { allowedHeaders: ["CF-RAY", "CF-Worker"] };
|
|
2191
|
-
var Z;
|
|
2192
|
-
var Ye = class {
|
|
2193
|
-
constructor(e = {}) {
|
|
2194
|
-
le(this, "name", Ye.id);
|
|
2195
|
-
Dt(this, Z, void 0);
|
|
2196
|
-
Nt(this, Z, { ...Zr, ...e });
|
|
2197
|
-
}
|
|
2198
|
-
setupOnce(e, n) {
|
|
2199
|
-
n().getClient() && e((s) => {
|
|
2200
|
-
let { sdkProcessingMetadata: i } = s;
|
|
2201
|
-
return !n().getIntegration(Ye) || !i || ("request" in i && i.request instanceof Request && (s.request = es(i.request, je(this, Z)), s.user = Qr(s.user ?? {}, i.request, je(this, Z))), "requestData" in i && (s.request ? s.request.data = i.requestData : s.request = { data: i.requestData })), s;
|
|
2202
|
-
});
|
|
1766
|
+
let a = { exception: { values: [An(e, o)] } };
|
|
1767
|
+
return Q(a, void 0, void 0), B(a, i), { ...a, event_id: r && r.event_id };
|
|
1768
|
+
}
|
|
1769
|
+
function qr(t4, e, n = "info", r, o) {
|
|
1770
|
+
let s = { event_id: r && r.event_id, level: n, message: e };
|
|
1771
|
+
if (o && r && r.syntheticException) {
|
|
1772
|
+
let i = xn(t4, r.syntheticException);
|
|
1773
|
+
i.length && (s.exception = { values: [{ value: e, stacktrace: { frames: i } }] });
|
|
2203
1774
|
}
|
|
1775
|
+
return s;
|
|
1776
|
+
}
|
|
1777
|
+
var zr = 5;
|
|
1778
|
+
var Yr = (t4 = { limit: zr }) => ({ name: "LinkedErrors", processEvent: (e, n, r) => Jr(r.getOptions().stackParser, t4.limit, e, n) });
|
|
1779
|
+
function Jr(t4, e, n, r) {
|
|
1780
|
+
if (!n.exception || !n.exception.values || !r || !O(r.originalException, Error)) return n;
|
|
1781
|
+
let o = bn(t4, e, r.originalException);
|
|
1782
|
+
return n.exception.values = [...o, ...n.exception.values], n;
|
|
1783
|
+
}
|
|
1784
|
+
function bn(t4, e, n, r = []) {
|
|
1785
|
+
if (!O(n.cause, Error) || r.length + 1 >= e) return r;
|
|
1786
|
+
let o = An(t4, n.cause);
|
|
1787
|
+
return bn(t4, e, n.cause, [o, ...r]);
|
|
1788
|
+
}
|
|
1789
|
+
var Wr = { allowedHeaders: ["CF-RAY", "CF-Worker"] };
|
|
1790
|
+
var Kr = (t4 = {}) => {
|
|
1791
|
+
let e = { ...Wr, ...t4 };
|
|
1792
|
+
return { name: "RequestData", preprocessEvent: (n) => {
|
|
1793
|
+
let { sdkProcessingMetadata: r } = n;
|
|
1794
|
+
return r && ("request" in r && r.request instanceof Request && (n.request = Xr(r.request, e), n.user = Vr(n.user ?? {}, r.request, e)), "requestData" in r && (n.request ? n.request.data = r.requestData : n.request = { data: r.requestData })), n;
|
|
1795
|
+
} };
|
|
2204
1796
|
};
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
function es(t, e) {
|
|
2212
|
-
let n = t.headers.get("cookie"), r;
|
|
1797
|
+
function Vr(t4, e, n) {
|
|
1798
|
+
let r = e.headers.get("CF-Connecting-IP"), { allowedIps: o } = n, s = { ...t4 };
|
|
1799
|
+
return !("ip_address" in t4) && r && o !== void 0 && Zr(r, o) && (s.ip_address = r), Object.keys(s).length > 0 ? s : void 0;
|
|
1800
|
+
}
|
|
1801
|
+
function Xr(t4, e) {
|
|
1802
|
+
let n = t4.headers.get("cookie"), r;
|
|
2213
1803
|
if (n) try {
|
|
2214
|
-
r =
|
|
1804
|
+
r = Qr(n);
|
|
2215
1805
|
} catch {
|
|
2216
1806
|
}
|
|
2217
|
-
let
|
|
2218
|
-
for (let [
|
|
2219
|
-
let
|
|
1807
|
+
let o = {};
|
|
1808
|
+
for (let [u, f] of t4.headers.entries()) u !== "cookie" && (o[u] = f);
|
|
1809
|
+
let s = { method: t4.method, cookies: r, headers: o };
|
|
2220
1810
|
try {
|
|
2221
|
-
let
|
|
2222
|
-
|
|
1811
|
+
let u = new URL(t4.url);
|
|
1812
|
+
s.url = `${u.protocol}//${u.hostname}${u.pathname}`, s.query_string = u.search;
|
|
2223
1813
|
} catch {
|
|
2224
|
-
let f =
|
|
2225
|
-
f < 0 ?
|
|
2226
|
-
}
|
|
2227
|
-
let { allowedHeaders:
|
|
2228
|
-
if (
|
|
2229
|
-
let
|
|
2230
|
-
Object.keys(
|
|
2231
|
-
f.set(
|
|
2232
|
-
}),
|
|
2233
|
-
} else delete
|
|
2234
|
-
return
|
|
2235
|
-
}
|
|
2236
|
-
function
|
|
2237
|
-
return typeof e == "boolean" ? e : e instanceof RegExp ? e.test(
|
|
2238
|
-
}
|
|
2239
|
-
function
|
|
1814
|
+
let f = t4.url.indexOf("?");
|
|
1815
|
+
f < 0 ? s.url = t4.url : (s.url = t4.url.substr(0, f), s.query_string = t4.url.substr(f + 1));
|
|
1816
|
+
}
|
|
1817
|
+
let { allowedHeaders: i, allowedCookies: a, allowedSearchParams: c } = e;
|
|
1818
|
+
if (i !== void 0 && s.headers ? (s.headers = xt(s.headers, i), Object.keys(s.headers).length === 0 && delete s.headers) : delete s.headers, a !== void 0 && s.cookies ? (s.cookies = xt(s.cookies, a), Object.keys(s.cookies).length === 0 && delete s.cookies) : delete s.cookies, c !== void 0) {
|
|
1819
|
+
let u = Object.fromEntries(new URLSearchParams(s.query_string)), f = new URLSearchParams();
|
|
1820
|
+
Object.keys(xt(u, c)).forEach((p) => {
|
|
1821
|
+
f.set(p, u[p]);
|
|
1822
|
+
}), s.query_string = f.toString();
|
|
1823
|
+
} else delete s.query_string;
|
|
1824
|
+
return s;
|
|
1825
|
+
}
|
|
1826
|
+
function Zr(t4, e) {
|
|
1827
|
+
return typeof e == "boolean" ? e : e instanceof RegExp ? e.test(t4) : Array.isArray(e) ? e.map((r) => r.toLowerCase()).includes(t4) : false;
|
|
1828
|
+
}
|
|
1829
|
+
function xt(t4, e) {
|
|
2240
1830
|
let n = () => false;
|
|
2241
|
-
if (typeof e == "boolean") return e ?
|
|
1831
|
+
if (typeof e == "boolean") return e ? t4 : {};
|
|
2242
1832
|
if (e instanceof RegExp) n = (r) => e.test(r);
|
|
2243
1833
|
else if (Array.isArray(e)) {
|
|
2244
|
-
let r = e.map((
|
|
2245
|
-
n = (
|
|
1834
|
+
let r = e.map((o) => o.toLowerCase());
|
|
1835
|
+
n = (o) => r.includes(o.toLowerCase());
|
|
2246
1836
|
} else return {};
|
|
2247
|
-
return Object.keys(
|
|
1837
|
+
return Object.keys(t4).filter(n).reduce((r, o) => (r[o] = t4[o], r), {});
|
|
2248
1838
|
}
|
|
2249
|
-
function
|
|
2250
|
-
if (typeof
|
|
1839
|
+
function Qr(t4) {
|
|
1840
|
+
if (typeof t4 != "string") return {};
|
|
2251
1841
|
try {
|
|
2252
|
-
return
|
|
1842
|
+
return t4.split(";").map((e) => e.split("=")).reduce((e, [n, r]) => (e[decodeURIComponent(n.trim())] = decodeURIComponent(r.trim()), e), {});
|
|
2253
1843
|
} catch {
|
|
2254
1844
|
return {};
|
|
2255
1845
|
}
|
|
2256
1846
|
}
|
|
2257
|
-
function
|
|
1847
|
+
function eo(t4, e) {
|
|
2258
1848
|
let n = {};
|
|
2259
|
-
return
|
|
2260
|
-
n[r.name] = r, r.setupOnce(
|
|
2261
|
-
|
|
2262
|
-
|
|
1849
|
+
return t4.forEach((r) => {
|
|
1850
|
+
n[r.name] = r, typeof r.setupOnce == "function" && r.setupOnce();
|
|
1851
|
+
let o = e.getClient();
|
|
1852
|
+
if (o) {
|
|
1853
|
+
if (typeof r.setup == "function" && r.setup(o), typeof r.preprocessEvent == "function") {
|
|
1854
|
+
let s = r.preprocessEvent.bind(r);
|
|
1855
|
+
o.on("preprocessEvent", (i, a) => s(i, a, o));
|
|
1856
|
+
}
|
|
1857
|
+
if (typeof r.processEvent == "function") {
|
|
1858
|
+
let s = r.processEvent.bind(r), i = Object.assign((a, c) => s(a, c, o), { id: r.name });
|
|
1859
|
+
o.addEventProcessor(i);
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
2263
1862
|
}), n;
|
|
2264
1863
|
}
|
|
2265
|
-
var
|
|
1864
|
+
var At = class extends ae {
|
|
2266
1865
|
#e = null;
|
|
1866
|
+
#t = false;
|
|
2267
1867
|
constructor(e) {
|
|
2268
|
-
e._metadata = e._metadata || {}, e._metadata.sdk = e._metadata.sdk || { name: "toucan-js", packages: [{ name: "npm:toucan-js", version: "
|
|
1868
|
+
e._metadata = e._metadata || {}, e._metadata.sdk = e._metadata.sdk || { name: "toucan-js", packages: [{ name: "npm:toucan-js", version: "4.0.0" }], version: "4.0.0" }, super(e);
|
|
2269
1869
|
}
|
|
2270
1870
|
setupIntegrations() {
|
|
2271
|
-
this._isEnabled() && !this
|
|
1871
|
+
this._isEnabled() && !this.#t && this.#e && (this._integrations = eo(this._options.integrations, this.#e), this.#t = true);
|
|
2272
1872
|
}
|
|
2273
1873
|
eventFromException(e, n) {
|
|
2274
|
-
return
|
|
1874
|
+
return I(Hr(this.#e, this._options.stackParser, e, n));
|
|
2275
1875
|
}
|
|
2276
1876
|
eventFromMessage(e, n = "info", r) {
|
|
2277
|
-
return
|
|
1877
|
+
return I(qr(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
2278
1878
|
}
|
|
2279
1879
|
_prepareEvent(e, n, r) {
|
|
2280
|
-
return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata =
|
|
1880
|
+
return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata = Tn(e.sdkProcessingMetadata, ["request", this.getOptions().request])), this.getOptions().requestData && (e.sdkProcessingMetadata = Tn(e.sdkProcessingMetadata, ["requestData", this.getOptions().requestData])), super._prepareEvent(e, n, r);
|
|
2281
1881
|
}
|
|
2282
1882
|
getSdk() {
|
|
2283
1883
|
return this.#e;
|
|
@@ -2292,40 +1892,44 @@ var xt = class extends pe {
|
|
|
2292
1892
|
this.getOptions().enabled = e;
|
|
2293
1893
|
}
|
|
2294
1894
|
};
|
|
2295
|
-
function
|
|
2296
|
-
let [e, n] =
|
|
2297
|
-
return [e, (
|
|
2298
|
-
let
|
|
2299
|
-
if (
|
|
2300
|
-
let
|
|
2301
|
-
|
|
1895
|
+
function to(t4) {
|
|
1896
|
+
let [e, n] = tt(t4);
|
|
1897
|
+
return [e, (o) => {
|
|
1898
|
+
let s = n(o);
|
|
1899
|
+
if (s) {
|
|
1900
|
+
let i = s.filename;
|
|
1901
|
+
s.abs_path = i !== void 0 && !i.startsWith("/") ? `/${i}` : i, s.in_app = i !== void 0;
|
|
2302
1902
|
}
|
|
2303
|
-
return
|
|
1903
|
+
return s;
|
|
2304
1904
|
}];
|
|
2305
1905
|
}
|
|
2306
|
-
function
|
|
2307
|
-
if (
|
|
1906
|
+
function no(t4) {
|
|
1907
|
+
if (t4) return te(t4, ".js");
|
|
2308
1908
|
}
|
|
2309
|
-
var
|
|
2310
|
-
function
|
|
1909
|
+
var ro = ge(to(no));
|
|
1910
|
+
function oo(t4) {
|
|
2311
1911
|
function e({ body: n }) {
|
|
2312
1912
|
try {
|
|
2313
|
-
let
|
|
2314
|
-
return
|
|
1913
|
+
let o = (t4.fetcher ?? fetch)(t4.url, { method: "POST", headers: t4.headers, body: n }).then((s) => ({ statusCode: s.status, headers: { "retry-after": s.headers.get("Retry-After"), "x-sentry-rate-limits": s.headers.get("X-Sentry-Rate-Limits") } }));
|
|
1914
|
+
return t4.context && t4.context.waitUntil(o), o;
|
|
2315
1915
|
} catch (r) {
|
|
2316
|
-
return
|
|
1916
|
+
return $(r);
|
|
2317
1917
|
}
|
|
2318
1918
|
}
|
|
2319
|
-
return
|
|
1919
|
+
return It(t4, e);
|
|
2320
1920
|
}
|
|
2321
|
-
var
|
|
1921
|
+
var Pe = class t3 extends x {
|
|
1922
|
+
#e;
|
|
2322
1923
|
constructor(e) {
|
|
2323
|
-
if (e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [
|
|
2324
|
-
let
|
|
2325
|
-
|
|
1924
|
+
if (super(), e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [Kr(e.requestDataOptions), Yr()]], e.release === void 0) {
|
|
1925
|
+
let n = jr();
|
|
1926
|
+
n !== void 0 && (e.release = n);
|
|
2326
1927
|
}
|
|
2327
|
-
|
|
2328
|
-
|
|
1928
|
+
this.#e = e, this.attachNewClient();
|
|
1929
|
+
}
|
|
1930
|
+
attachNewClient() {
|
|
1931
|
+
let e = new At({ ...this.#e, transport: oo, integrations: St(this.#e), stackParser: We(this.#e.stackParser || ro), transportOptions: { ...this.#e.transportOptions, context: this.#e.context } });
|
|
1932
|
+
this.setClient(e), e.setSdk(this), e.setupIntegrations();
|
|
2329
1933
|
}
|
|
2330
1934
|
setRequestBody(e) {
|
|
2331
1935
|
this.getClient()?.setRequestBody(e);
|
|
@@ -2336,24 +1940,36 @@ var Be = class extends $ {
|
|
|
2336
1940
|
captureCheckIn(e, n, r) {
|
|
2337
1941
|
return e.status === "in_progress" && this.setContext("monitor", { slug: e.monitorSlug }), this.getClient().captureCheckIn(e, n, r);
|
|
2338
1942
|
}
|
|
1943
|
+
addBreadcrumb(e, n = 100) {
|
|
1944
|
+
let o = this.getClient().getOptions().maxBreadcrumbs || n;
|
|
1945
|
+
return super.addBreadcrumb(e, o);
|
|
1946
|
+
}
|
|
1947
|
+
clone() {
|
|
1948
|
+
let e = new t3({ ...this.#e });
|
|
1949
|
+
return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, e._user = this._user, e._level = this._level, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._requestSession = this._requestSession, e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._lastEventId = this._lastEventId, e;
|
|
1950
|
+
}
|
|
1951
|
+
withScope(e) {
|
|
1952
|
+
let n = this.clone();
|
|
1953
|
+
return e(n);
|
|
1954
|
+
}
|
|
2339
1955
|
};
|
|
2340
|
-
function
|
|
2341
|
-
if (!(n && r &&
|
|
2342
|
-
let
|
|
1956
|
+
function Rn(t4, e, n, r, o, s, i, a, c) {
|
|
1957
|
+
if (!(n && r && o)) return;
|
|
1958
|
+
let u = new Pe({ dsn: n, request: t4, context: e, sampleRate: 1, release: i?.tag, integrations: [Me({ iteratee(f) {
|
|
2343
1959
|
return f.filename = "/index.js", f;
|
|
2344
|
-
} })], requestDataOptions: { allowedHeaders: ["user-agent", "cf-challenge", "accept-encoding", "accept-language", "cf-ray", "content-length", "content-type", "host"], allowedSearchParams: /(.*)/ }, transportOptions: { headers: { "CF-Access-Client-ID": r, "CF-Access-Client-Secret":
|
|
2345
|
-
return
|
|
1960
|
+
} })], requestDataOptions: { allowedHeaders: ["user-agent", "cf-challenge", "accept-encoding", "accept-language", "cf-ray", "content-length", "content-type", "host"], allowedSearchParams: /(.*)/ }, transportOptions: { headers: { "CF-Access-Client-ID": r, "CF-Access-Client-Secret": o } } });
|
|
1961
|
+
return s && (u.setTag("colo", s.coloId), u.setTag("metal", s.metalId)), a && c && (u.setTag("accountId", a), u.setTag("scriptId", c)), u.setUser({ id: a?.toString() }), u;
|
|
2346
1962
|
}
|
|
2347
|
-
function
|
|
1963
|
+
function so() {
|
|
2348
1964
|
return { addLogs: () => {
|
|
2349
1965
|
}, setTags: () => {
|
|
2350
1966
|
}, end: () => {
|
|
2351
1967
|
}, isRecording: true };
|
|
2352
1968
|
}
|
|
2353
|
-
function
|
|
2354
|
-
return { enterSpan: (
|
|
1969
|
+
function Cn() {
|
|
1970
|
+
return { enterSpan: (t4, e, ...n) => e(so(), ...n), getSpanContext: () => ({ traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", traceFlags: 0 }), runWithSpanContext: (t4, e, ...n) => e(...n), traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", cfTraceIdHeader: "test-trace:test-span:0" };
|
|
2355
1971
|
}
|
|
2356
|
-
var
|
|
1972
|
+
var we = class {
|
|
2357
1973
|
constructor(e) {
|
|
2358
1974
|
this.data = {};
|
|
2359
1975
|
this.hasWritten = false;
|
|
@@ -2369,29 +1985,29 @@ var $e = class {
|
|
|
2369
1985
|
this.hasWritten || this.readyAnalytics && (this.hasWritten = true, this.readyAnalytics.logEvent({ version: 1, accountId: this.data.accountId, indexId: this.data.scriptId?.toString(), doubles: [this.data.requestTime ?? -1, this.data.coloId ?? -1, this.data.metalId ?? -1, this.data.coloTier ?? -1, this.data.userWorkerAhead === void 0 ? -1 : Number(this.data.userWorkerAhead)], blobs: [this.data.hostname?.substring(0, 256), this.data.dispatchtype, this.data.error?.substring(0, 256), this.data.version, this.data.coloRegion] }));
|
|
2370
1986
|
}
|
|
2371
1987
|
};
|
|
2372
|
-
var
|
|
2373
|
-
|
|
1988
|
+
var On = (t4) => ({ invoke_user_worker_ahead_of_assets: t4?.invoke_user_worker_ahead_of_assets ?? false, has_user_worker: t4?.has_user_worker ?? false, account_id: t4?.account_id ?? -1, script_id: t4?.script_id ?? -1 });
|
|
1989
|
+
var Bc = { async fetch(t4, e, n) {
|
|
1990
|
+
let r, o = false, s = new we(e.ANALYTICS), i = new ue(e.UNSAFE_PERFORMANCE), a = i.now();
|
|
2374
1991
|
try {
|
|
2375
|
-
e.JAEGER || (e.JAEGER =
|
|
2376
|
-
let u = new URL(
|
|
2377
|
-
e.COLO_METADATA && e.VERSION_METADATA && e.CONFIG &&
|
|
2378
|
-
let
|
|
2379
|
-
if (
|
|
2380
|
-
if (!
|
|
2381
|
-
return
|
|
1992
|
+
e.JAEGER || (e.JAEGER = Cn()), r = Rn(t4, n, e.SENTRY_DSN, e.SENTRY_ACCESS_CLIENT_ID, e.SENTRY_ACCESS_CLIENT_SECRET, e.COLO_METADATA, e.VERSION_METADATA, e.CONFIG?.account_id, e.CONFIG?.script_id);
|
|
1993
|
+
let c = On(e.CONFIG), u = new URL(t4.url);
|
|
1994
|
+
e.COLO_METADATA && e.VERSION_METADATA && e.CONFIG && s.setData({ accountId: e.CONFIG.account_id, scriptId: e.CONFIG.script_id, coloId: e.COLO_METADATA.coloId, metalId: e.COLO_METADATA.metalId, coloTier: e.COLO_METADATA.coloTier, coloRegion: e.COLO_METADATA.coloRegion, hostname: u.hostname, version: e.VERSION_METADATA.tag, userWorkerAhead: c.invoke_user_worker_ahead_of_assets });
|
|
1995
|
+
let f = t4.clone();
|
|
1996
|
+
if (c.invoke_user_worker_ahead_of_assets) {
|
|
1997
|
+
if (!c.has_user_worker) throw new Error("Fetch for user worker without having a user worker binding");
|
|
1998
|
+
return s.setData({ dispatchtype: "worker" }), await e.JAEGER.enterSpan("dispatch_worker", async (l) => (l.setTags({ hasUserWorker: true, asset: "ignored", dispatchType: "worker" }), o = true, e.USER_WORKER.fetch(f)));
|
|
2382
1999
|
}
|
|
2383
|
-
let
|
|
2384
|
-
return
|
|
2385
|
-
} catch (
|
|
2386
|
-
|
|
2387
|
-
throw u instanceof Error && i.setData({ error: u.message }), r && r.captureException(u), u;
|
|
2000
|
+
let p = await e.ASSET_WORKER.unstable_canFetch(t4);
|
|
2001
|
+
return c.has_user_worker && !p ? (s.setData({ dispatchtype: "worker" }), await e.JAEGER.enterSpan("dispatch_worker", async (l) => (l.setTags({ hasUserWorker: c.has_user_worker, asset: p, dispatchType: "worker" }), o = true, e.USER_WORKER.fetch(f)))) : (s.setData({ dispatchtype: "asset" }), await e.JAEGER.enterSpan("dispatch_assets", async (l) => (l.setTags({ hasUserWorker: c.has_user_worker, asset: p, dispatchType: "asset" }), e.ASSET_WORKER.fetch(f))));
|
|
2002
|
+
} catch (c) {
|
|
2003
|
+
throw o || (c instanceof Error && s.setData({ error: c.message }), r && r.captureException(c)), c;
|
|
2388
2004
|
} finally {
|
|
2389
|
-
|
|
2005
|
+
s.setData({ requestTime: i.now() - a }), s.write();
|
|
2390
2006
|
}
|
|
2391
2007
|
} };
|
|
2392
2008
|
|
|
2393
2009
|
// src/asset-workers/router-worker.ts
|
|
2394
|
-
var router_worker_default =
|
|
2010
|
+
var router_worker_default = Bc;
|
|
2395
2011
|
export {
|
|
2396
2012
|
router_worker_default as default
|
|
2397
2013
|
};
|