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