@eka-care/ekascribe-ts-sdk 3.0.46 → 3.0.47
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/dist/index.mjs +683 -672
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var w = (t, e, n) =>
|
|
4
|
-
import { SessionStatus as
|
|
5
|
-
import { createWorkerBlobUrl as
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var Ls = Object.defineProperty;
|
|
2
|
+
var Ms = (t, e, n) => e in t ? Ls(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var w = (t, e, n) => Ms(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { SessionStatus as Fs, ScribeError as yn, UploadError as Us, ScribeClient as Bs, TransportMode as En } from "med-scribe-alliance-ts-sdk";
|
|
5
|
+
import { createWorkerBlobUrl as kd, getWorkerUrl as xd } from "med-scribe-alliance-ts-sdk";
|
|
6
|
+
function Ir() {
|
|
7
|
+
try {
|
|
8
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
|
|
9
|
+
} catch {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const Hs = 1e4;
|
|
14
|
+
class zs {
|
|
8
15
|
constructor(e) {
|
|
9
|
-
this.tokenRefreshPromise = null, this.accessToken = e.access_token, this.clientId = e.clientId, this.flavour = e.flavour, this.defaultTimeout = e.defaultTimeout ??
|
|
16
|
+
this.tokenRefreshPromise = null, this.accessToken = e.access_token, this.clientId = e.clientId, this.flavour = e.flavour, this.defaultTimeout = e.defaultTimeout ?? Hs, this.onUnauthorized = e.onUnauthorized;
|
|
10
17
|
}
|
|
11
18
|
setAuthToken(e) {
|
|
12
19
|
this.accessToken = e;
|
|
@@ -34,7 +41,7 @@ class Hs {
|
|
|
34
41
|
}), c = await this.parseBody(a);
|
|
35
42
|
if (!a.ok)
|
|
36
43
|
throw new W(
|
|
37
|
-
|
|
44
|
+
Cr(c, a.statusText),
|
|
38
45
|
a.status,
|
|
39
46
|
c
|
|
40
47
|
);
|
|
@@ -57,7 +64,9 @@ class Hs {
|
|
|
57
64
|
}
|
|
58
65
|
buildHeaders(e, n) {
|
|
59
66
|
const r = {};
|
|
60
|
-
|
|
67
|
+
n || (r["Content-Type"] = "application/json"), this.accessToken && (r.Authorization = `Bearer ${this.accessToken}`), this.clientId && (r["client-id"] = this.clientId), this.flavour && (r.flavour = this.flavour);
|
|
68
|
+
const s = Ir();
|
|
69
|
+
return s && (r["X-timezone"] = s), e && Object.assign(r, e), r;
|
|
61
70
|
}
|
|
62
71
|
async refreshToken() {
|
|
63
72
|
return this.tokenRefreshPromise ? this.tokenRefreshPromise : (this.tokenRefreshPromise = this.onUnauthorized().finally(() => {
|
|
@@ -79,7 +88,7 @@ class W extends Error {
|
|
|
79
88
|
super(e), this.status = n, this.body = r, this.name = "TransportError";
|
|
80
89
|
}
|
|
81
90
|
}
|
|
82
|
-
function
|
|
91
|
+
function Cr(t, e) {
|
|
83
92
|
if (typeof t == "string" && t.trim())
|
|
84
93
|
return t;
|
|
85
94
|
if (t && typeof t == "object") {
|
|
@@ -89,10 +98,10 @@ function Ir(t, e) {
|
|
|
89
98
|
}
|
|
90
99
|
return e || "Request failed";
|
|
91
100
|
}
|
|
92
|
-
const
|
|
93
|
-
class
|
|
101
|
+
const js = 1e4;
|
|
102
|
+
class qs {
|
|
94
103
|
constructor(e, n) {
|
|
95
|
-
this.tokenRefreshPromise = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.accessToken = e.access_token, this.clientId = e.clientId, this.flavour = e.flavour, this.defaultTimeout = e.defaultTimeout ??
|
|
104
|
+
this.tokenRefreshPromise = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.accessToken = e.access_token, this.clientId = e.clientId, this.flavour = e.flavour, this.defaultTimeout = e.defaultTimeout ?? js, this.onUnauthorized = e.onUnauthorized, this.bridge = n, this.bridge.onResponse((r) => {
|
|
96
105
|
const s = r;
|
|
97
106
|
if (s?.type !== "response" || !s.correlationId) return;
|
|
98
107
|
const i = this.pendingRequests.get(s.correlationId);
|
|
@@ -142,7 +151,7 @@ class js {
|
|
|
142
151
|
if (clearTimeout(l), d.status < 200 || d.status >= 300) {
|
|
143
152
|
c(
|
|
144
153
|
new W(
|
|
145
|
-
|
|
154
|
+
Cr(d.data, `Request failed with status ${d.status}`),
|
|
146
155
|
d.status,
|
|
147
156
|
d.data
|
|
148
157
|
)
|
|
@@ -159,7 +168,9 @@ class js {
|
|
|
159
168
|
}
|
|
160
169
|
buildHeaders(e, n) {
|
|
161
170
|
const r = {};
|
|
162
|
-
|
|
171
|
+
n || (r["Content-Type"] = "application/json"), this.accessToken && (r.Authorization = `Bearer ${this.accessToken}`), this.clientId && (r["client-id"] = this.clientId), this.flavour && (r.flavour = this.flavour);
|
|
172
|
+
const s = Ir();
|
|
173
|
+
return s && (r["X-timezone"] = s), e && Object.assign(r, e), r;
|
|
163
174
|
}
|
|
164
175
|
async refreshToken() {
|
|
165
176
|
return this.tokenRefreshPromise ? this.tokenRefreshPromise : (this.tokenRefreshPromise = this.onUnauthorized().finally(() => {
|
|
@@ -173,14 +184,14 @@ class js {
|
|
|
173
184
|
return `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
174
185
|
}
|
|
175
186
|
}
|
|
176
|
-
const
|
|
187
|
+
const Gs = {
|
|
177
188
|
voiceV1: "https://api.dev.eka.care/voice/api/v1",
|
|
178
189
|
voiceV2: "https://api.dev.eka.care/voice/api/v2",
|
|
179
190
|
voiceV3: "https://api.dev.eka.care/voice/api/v3",
|
|
180
191
|
cookV1: "https://deepthought-genai.dev.eka.care/api/v1",
|
|
181
192
|
ekaHost: "https://api.dev.eka.care",
|
|
182
193
|
parchiHost: "https://parchi.dev.eka.care"
|
|
183
|
-
},
|
|
194
|
+
}, Vs = {
|
|
184
195
|
voiceV1: "https://api.eka.care/voice/api/v1",
|
|
185
196
|
voiceV2: "https://api.eka.care/voice/api/v2",
|
|
186
197
|
voiceV3: "https://api.eka.care/voice/api/v3",
|
|
@@ -188,10 +199,10 @@ const qs = {
|
|
|
188
199
|
ekaHost: "https://api.eka.care",
|
|
189
200
|
parchiHost: "https://parchi.eka.care"
|
|
190
201
|
};
|
|
191
|
-
function
|
|
192
|
-
return t === "PROD" ?
|
|
202
|
+
function Ws(t) {
|
|
203
|
+
return t === "PROD" ? Vs : Gs;
|
|
193
204
|
}
|
|
194
|
-
class
|
|
205
|
+
class Xs {
|
|
195
206
|
constructor() {
|
|
196
207
|
this.handlers = /* @__PURE__ */ new Map();
|
|
197
208
|
}
|
|
@@ -234,7 +245,7 @@ function _e(t, e, n = R) {
|
|
|
234
245
|
const r = n.__SENTRY__ = n.__SENTRY__ || {}, s = r[ie] = r[ie] || {};
|
|
235
246
|
return s[t] || (s[t] = e());
|
|
236
247
|
}
|
|
237
|
-
const
|
|
248
|
+
const Ks = [
|
|
238
249
|
"debug",
|
|
239
250
|
"info",
|
|
240
251
|
"warn",
|
|
@@ -242,7 +253,7 @@ const Xs = [
|
|
|
242
253
|
"log",
|
|
243
254
|
"assert",
|
|
244
255
|
"trace"
|
|
245
|
-
],
|
|
256
|
+
], Ys = "Sentry Logger ", Ye = {};
|
|
246
257
|
function ye(t) {
|
|
247
258
|
if (!("console" in R))
|
|
248
259
|
return t();
|
|
@@ -259,27 +270,27 @@ function ye(t) {
|
|
|
259
270
|
});
|
|
260
271
|
}
|
|
261
272
|
}
|
|
262
|
-
function
|
|
273
|
+
function Zs() {
|
|
263
274
|
Xt().enabled = !0;
|
|
264
275
|
}
|
|
265
|
-
function
|
|
276
|
+
function Js() {
|
|
266
277
|
Xt().enabled = !1;
|
|
267
278
|
}
|
|
268
|
-
function
|
|
279
|
+
function Ar() {
|
|
269
280
|
return Xt().enabled;
|
|
270
281
|
}
|
|
271
|
-
function
|
|
282
|
+
function Qs(...t) {
|
|
272
283
|
Wt("log", ...t);
|
|
273
284
|
}
|
|
274
|
-
function
|
|
285
|
+
function ei(...t) {
|
|
275
286
|
Wt("warn", ...t);
|
|
276
287
|
}
|
|
277
|
-
function
|
|
288
|
+
function ti(...t) {
|
|
278
289
|
Wt("error", ...t);
|
|
279
290
|
}
|
|
280
291
|
function Wt(t, ...e) {
|
|
281
|
-
_ &&
|
|
282
|
-
R.console[t](`${
|
|
292
|
+
_ && Ar() && ye(() => {
|
|
293
|
+
R.console[t](`${Ys}[${t}]:`, ...e);
|
|
283
294
|
});
|
|
284
295
|
}
|
|
285
296
|
function Xt() {
|
|
@@ -287,19 +298,19 @@ function Xt() {
|
|
|
287
298
|
}
|
|
288
299
|
const m = {
|
|
289
300
|
/** Enable logging. */
|
|
290
|
-
enable:
|
|
301
|
+
enable: Zs,
|
|
291
302
|
/** Disable logging. */
|
|
292
|
-
disable:
|
|
303
|
+
disable: Js,
|
|
293
304
|
/** Check if logging is enabled. */
|
|
294
|
-
isEnabled:
|
|
305
|
+
isEnabled: Ar,
|
|
295
306
|
/** Log a message. */
|
|
296
|
-
log:
|
|
307
|
+
log: Qs,
|
|
297
308
|
/** Log a warning. */
|
|
298
|
-
warn:
|
|
309
|
+
warn: ei,
|
|
299
310
|
/** Log an error. */
|
|
300
|
-
error:
|
|
301
|
-
},
|
|
302
|
-
function
|
|
311
|
+
error: ti
|
|
312
|
+
}, Dr = 50, oe = "?", bn = /\(error: (.*)\)/, Sn = /captureMessage|captureException/;
|
|
313
|
+
function Nr(...t) {
|
|
303
314
|
const e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
|
|
304
315
|
return (n, r = 0, s = 0) => {
|
|
305
316
|
const i = [], o = n.split(`
|
|
@@ -316,21 +327,21 @@ function Dr(...t) {
|
|
|
316
327
|
break;
|
|
317
328
|
}
|
|
318
329
|
}
|
|
319
|
-
if (i.length >=
|
|
330
|
+
if (i.length >= Dr + s)
|
|
320
331
|
break;
|
|
321
332
|
}
|
|
322
333
|
}
|
|
323
|
-
return
|
|
334
|
+
return ri(i.slice(s));
|
|
324
335
|
};
|
|
325
336
|
}
|
|
326
|
-
function ti(t) {
|
|
327
|
-
return Array.isArray(t) ? Dr(...t) : t;
|
|
328
|
-
}
|
|
329
337
|
function ni(t) {
|
|
338
|
+
return Array.isArray(t) ? Nr(...t) : t;
|
|
339
|
+
}
|
|
340
|
+
function ri(t) {
|
|
330
341
|
if (!t.length)
|
|
331
342
|
return [];
|
|
332
343
|
const e = Array.from(t);
|
|
333
|
-
return /sentryWrapped/.test(Me(e).function || "") && e.pop(), e.reverse(), Sn.test(Me(e).function || "") && (e.pop(), Sn.test(Me(e).function || "") && e.pop()), e.slice(0,
|
|
344
|
+
return /sentryWrapped/.test(Me(e).function || "") && e.pop(), e.reverse(), Sn.test(Me(e).function || "") && (e.pop(), Sn.test(Me(e).function || "") && e.pop()), e.slice(0, Dr).map((n) => ({
|
|
334
345
|
...n,
|
|
335
346
|
filename: n.filename || Me(e).filename,
|
|
336
347
|
function: n.function || oe
|
|
@@ -360,7 +371,7 @@ function kn(t) {
|
|
|
360
371
|
}
|
|
361
372
|
}
|
|
362
373
|
}
|
|
363
|
-
function
|
|
374
|
+
function Or(t) {
|
|
364
375
|
return "__v_isVNode" in t && t.__v_isVNode ? "[VueVNode]" : "[VueViewModel]";
|
|
365
376
|
}
|
|
366
377
|
const qe = {}, xn = {};
|
|
@@ -394,11 +405,11 @@ Error:`,
|
|
|
394
405
|
}
|
|
395
406
|
}
|
|
396
407
|
let gt = null;
|
|
397
|
-
function
|
|
408
|
+
function si(t) {
|
|
398
409
|
const e = "error";
|
|
399
|
-
ce(e, t), le(e,
|
|
410
|
+
ce(e, t), le(e, ii);
|
|
400
411
|
}
|
|
401
|
-
function
|
|
412
|
+
function ii() {
|
|
402
413
|
gt = R.onerror, R.onerror = function(t, e, n, r, s) {
|
|
403
414
|
return F("error", {
|
|
404
415
|
column: r,
|
|
@@ -410,18 +421,18 @@ function si() {
|
|
|
410
421
|
}, R.onerror.__SENTRY_INSTRUMENTED__ = !0;
|
|
411
422
|
}
|
|
412
423
|
let mt = null;
|
|
413
|
-
function
|
|
424
|
+
function oi(t) {
|
|
414
425
|
const e = "unhandledrejection";
|
|
415
|
-
ce(e, t), le(e,
|
|
426
|
+
ce(e, t), le(e, ai);
|
|
416
427
|
}
|
|
417
|
-
function
|
|
428
|
+
function ai() {
|
|
418
429
|
mt = R.onunhandledrejection, R.onunhandledrejection = function(t) {
|
|
419
430
|
return F("unhandledrejection", t), mt ? mt.apply(this, arguments) : !0;
|
|
420
431
|
}, R.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
|
|
421
432
|
}
|
|
422
|
-
const
|
|
433
|
+
const $r = Object.prototype.toString;
|
|
423
434
|
function st(t) {
|
|
424
|
-
switch (
|
|
435
|
+
switch ($r.call(t)) {
|
|
425
436
|
case "[object Error]":
|
|
426
437
|
case "[object Exception]":
|
|
427
438
|
case "[object DOMException]":
|
|
@@ -432,15 +443,15 @@ function st(t) {
|
|
|
432
443
|
}
|
|
433
444
|
}
|
|
434
445
|
function Ee(t, e) {
|
|
435
|
-
return
|
|
446
|
+
return $r.call(t) === `[object ${e}]`;
|
|
436
447
|
}
|
|
437
|
-
function
|
|
448
|
+
function Pr(t) {
|
|
438
449
|
return Ee(t, "ErrorEvent");
|
|
439
450
|
}
|
|
440
451
|
function Rn(t) {
|
|
441
452
|
return Ee(t, "DOMError");
|
|
442
453
|
}
|
|
443
|
-
function
|
|
454
|
+
function ci(t) {
|
|
444
455
|
return Ee(t, "DOMException");
|
|
445
456
|
}
|
|
446
457
|
function j(t) {
|
|
@@ -458,16 +469,16 @@ function Ie(t) {
|
|
|
458
469
|
function ot(t) {
|
|
459
470
|
return typeof Event < "u" && K(t, Event);
|
|
460
471
|
}
|
|
461
|
-
function
|
|
472
|
+
function li(t) {
|
|
462
473
|
return typeof Element < "u" && K(t, Element);
|
|
463
474
|
}
|
|
464
|
-
function
|
|
475
|
+
function ui(t) {
|
|
465
476
|
return Ee(t, "RegExp");
|
|
466
477
|
}
|
|
467
478
|
function De(t) {
|
|
468
479
|
return !!(t?.then && typeof t.then == "function");
|
|
469
480
|
}
|
|
470
|
-
function
|
|
481
|
+
function di(t) {
|
|
471
482
|
return Ie(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
|
|
472
483
|
}
|
|
473
484
|
function K(t, e) {
|
|
@@ -477,14 +488,14 @@ function K(t, e) {
|
|
|
477
488
|
return !1;
|
|
478
489
|
}
|
|
479
490
|
}
|
|
480
|
-
function
|
|
491
|
+
function Lr(t) {
|
|
481
492
|
return !!(typeof t == "object" && t !== null && (t.__isVue || t._isVue || t.__v_isVNode));
|
|
482
493
|
}
|
|
483
|
-
function
|
|
494
|
+
function Mr(t) {
|
|
484
495
|
return typeof Request < "u" && K(t, Request);
|
|
485
496
|
}
|
|
486
|
-
const Yt = R,
|
|
487
|
-
function
|
|
497
|
+
const Yt = R, pi = 80;
|
|
498
|
+
function Fr(t, e = {}) {
|
|
488
499
|
if (!t)
|
|
489
500
|
return "<unknown>";
|
|
490
501
|
try {
|
|
@@ -493,15 +504,15 @@ function Mr(t, e = {}) {
|
|
|
493
504
|
let i = 0, o = 0;
|
|
494
505
|
const a = " > ", c = a.length;
|
|
495
506
|
let l;
|
|
496
|
-
const d = Array.isArray(e) ? e : e.keyAttrs, u = !Array.isArray(e) && e.maxStringLength ||
|
|
497
|
-
for (; n && i++ < r && (l =
|
|
507
|
+
const d = Array.isArray(e) ? e : e.keyAttrs, u = !Array.isArray(e) && e.maxStringLength || pi;
|
|
508
|
+
for (; n && i++ < r && (l = hi(n, d), !(l === "html" || i > 1 && o + s.length * c + l.length >= u)); )
|
|
498
509
|
s.push(l), o += l.length, n = n.parentNode;
|
|
499
510
|
return s.reverse().join(a);
|
|
500
511
|
} catch {
|
|
501
512
|
return "<unknown>";
|
|
502
513
|
}
|
|
503
514
|
}
|
|
504
|
-
function
|
|
515
|
+
function hi(t, e) {
|
|
505
516
|
const n = t, r = [];
|
|
506
517
|
if (!n?.tagName)
|
|
507
518
|
return "";
|
|
@@ -540,7 +551,7 @@ function Zt() {
|
|
|
540
551
|
return "";
|
|
541
552
|
}
|
|
542
553
|
}
|
|
543
|
-
function
|
|
554
|
+
function fi(t) {
|
|
544
555
|
if (!Yt.HTMLElement)
|
|
545
556
|
return null;
|
|
546
557
|
let e = t;
|
|
@@ -565,7 +576,7 @@ function $(t, e, n) {
|
|
|
565
576
|
if (typeof r != "function")
|
|
566
577
|
return;
|
|
567
578
|
const s = n(r);
|
|
568
|
-
typeof s == "function" &&
|
|
579
|
+
typeof s == "function" && Ur(s, r);
|
|
569
580
|
try {
|
|
570
581
|
t[e] = s;
|
|
571
582
|
} catch {
|
|
@@ -584,7 +595,7 @@ function Y(t, e, n) {
|
|
|
584
595
|
_ && m.log(`Failed to add non-enumerable property "${e}" to object`, t);
|
|
585
596
|
}
|
|
586
597
|
}
|
|
587
|
-
function
|
|
598
|
+
function Ur(t, e) {
|
|
588
599
|
try {
|
|
589
600
|
const n = e.prototype || {};
|
|
590
601
|
t.prototype = e.prototype = n, Y(t, "__sentry_original__", e);
|
|
@@ -594,7 +605,7 @@ function Fr(t, e) {
|
|
|
594
605
|
function Jt(t) {
|
|
595
606
|
return t.__sentry_original__;
|
|
596
607
|
}
|
|
597
|
-
function
|
|
608
|
+
function Br(t) {
|
|
598
609
|
if (st(t))
|
|
599
610
|
return {
|
|
600
611
|
message: t.message,
|
|
@@ -615,7 +626,7 @@ function Ur(t) {
|
|
|
615
626
|
}
|
|
616
627
|
function wn(t) {
|
|
617
628
|
try {
|
|
618
|
-
return
|
|
629
|
+
return li(t) ? Fr(t) : Object.prototype.toString.call(t);
|
|
619
630
|
} catch {
|
|
620
631
|
return "<unknown>";
|
|
621
632
|
}
|
|
@@ -629,8 +640,8 @@ function Tn(t) {
|
|
|
629
640
|
} else
|
|
630
641
|
return {};
|
|
631
642
|
}
|
|
632
|
-
function
|
|
633
|
-
const e = Object.keys(
|
|
643
|
+
function gi(t) {
|
|
644
|
+
const e = Object.keys(Br(t));
|
|
634
645
|
return e.sort(), e[0] ? e.join(", ") : "[object has no keys]";
|
|
635
646
|
}
|
|
636
647
|
let de;
|
|
@@ -656,7 +667,7 @@ function vn(t, e) {
|
|
|
656
667
|
for (let r = 0; r < t.length; r++) {
|
|
657
668
|
const s = t[r];
|
|
658
669
|
try {
|
|
659
|
-
|
|
670
|
+
Lr(s) ? n.push(Or(s)) : n.push(String(s));
|
|
660
671
|
} catch {
|
|
661
672
|
n.push("[value cannot be serialized]");
|
|
662
673
|
}
|
|
@@ -664,20 +675,20 @@ function vn(t, e) {
|
|
|
664
675
|
return n.join(e);
|
|
665
676
|
}
|
|
666
677
|
function Ge(t, e, n = !1) {
|
|
667
|
-
return j(t) ?
|
|
678
|
+
return j(t) ? ui(e) ? e.test(t) : j(e) ? n ? t === e : t.includes(e) : !1 : !1;
|
|
668
679
|
}
|
|
669
680
|
function lt(t, e = [], n = !1) {
|
|
670
681
|
return e.some((r) => Ge(t, r, n));
|
|
671
682
|
}
|
|
672
|
-
function
|
|
683
|
+
function mi() {
|
|
673
684
|
const t = R;
|
|
674
685
|
return t.crypto || t.msCrypto;
|
|
675
686
|
}
|
|
676
687
|
let _t;
|
|
677
|
-
function
|
|
688
|
+
function _i() {
|
|
678
689
|
return Ze() * 16;
|
|
679
690
|
}
|
|
680
|
-
function P(t =
|
|
691
|
+
function P(t = mi()) {
|
|
681
692
|
try {
|
|
682
693
|
if (t?.randomUUID)
|
|
683
694
|
return at(() => t.randomUUID()).replace(/-/g, "");
|
|
@@ -687,18 +698,18 @@ function P(t = gi()) {
|
|
|
687
698
|
/[018]/g,
|
|
688
699
|
(e) => (
|
|
689
700
|
// eslint-disable-next-line no-bitwise
|
|
690
|
-
(e ^ (
|
|
701
|
+
(e ^ (_i() & 15) >> e / 4).toString(16)
|
|
691
702
|
)
|
|
692
703
|
);
|
|
693
704
|
}
|
|
694
|
-
function
|
|
705
|
+
function Hr(t) {
|
|
695
706
|
return t.exception?.values?.[0];
|
|
696
707
|
}
|
|
697
708
|
function re(t) {
|
|
698
709
|
const { message: e, event_id: n } = t;
|
|
699
710
|
if (e)
|
|
700
711
|
return e;
|
|
701
|
-
const r =
|
|
712
|
+
const r = Hr(t);
|
|
702
713
|
return r ? r.type && r.value ? `${r.type}: ${r.value}` : r.type || r.value || n || "<unknown>" : n || "<unknown>";
|
|
703
714
|
}
|
|
704
715
|
function It(t, e, n) {
|
|
@@ -706,7 +717,7 @@ function It(t, e, n) {
|
|
|
706
717
|
i.value || (i.value = e || ""), i.type || (i.type = "Error");
|
|
707
718
|
}
|
|
708
719
|
function he(t, e) {
|
|
709
|
-
const n =
|
|
720
|
+
const n = Hr(t);
|
|
710
721
|
if (!n)
|
|
711
722
|
return;
|
|
712
723
|
const r = { type: "generic", handled: !0 }, s = n.mechanism;
|
|
@@ -716,7 +727,7 @@ function he(t, e) {
|
|
|
716
727
|
}
|
|
717
728
|
}
|
|
718
729
|
function In(t) {
|
|
719
|
-
if (
|
|
730
|
+
if (yi(t))
|
|
720
731
|
return !0;
|
|
721
732
|
try {
|
|
722
733
|
Y(t, "__sentry_captured__", !0);
|
|
@@ -724,28 +735,28 @@ function In(t) {
|
|
|
724
735
|
}
|
|
725
736
|
return !1;
|
|
726
737
|
}
|
|
727
|
-
function
|
|
738
|
+
function yi(t) {
|
|
728
739
|
try {
|
|
729
740
|
return t.__sentry_captured__;
|
|
730
741
|
} catch {
|
|
731
742
|
}
|
|
732
743
|
}
|
|
733
|
-
const
|
|
744
|
+
const zr = 1e3;
|
|
734
745
|
function Ne() {
|
|
735
|
-
return ct() /
|
|
746
|
+
return ct() / zr;
|
|
736
747
|
}
|
|
737
|
-
function
|
|
748
|
+
function Ei() {
|
|
738
749
|
const { performance: t } = R;
|
|
739
750
|
if (!t?.now || !t.timeOrigin)
|
|
740
751
|
return Ne;
|
|
741
752
|
const e = t.timeOrigin;
|
|
742
|
-
return () => (e + at(() => t.now())) /
|
|
753
|
+
return () => (e + at(() => t.now())) / zr;
|
|
743
754
|
}
|
|
744
755
|
let Cn;
|
|
745
756
|
function q() {
|
|
746
|
-
return (Cn ?? (Cn =
|
|
757
|
+
return (Cn ?? (Cn = Ei()))();
|
|
747
758
|
}
|
|
748
|
-
function
|
|
759
|
+
function bi(t) {
|
|
749
760
|
const e = q(), n = {
|
|
750
761
|
sid: P(),
|
|
751
762
|
init: !0,
|
|
@@ -755,7 +766,7 @@ function Ei(t) {
|
|
|
755
766
|
status: "ok",
|
|
756
767
|
errors: 0,
|
|
757
768
|
ignoreDuration: !1,
|
|
758
|
-
toJSON: () =>
|
|
769
|
+
toJSON: () => ki(n)
|
|
759
770
|
};
|
|
760
771
|
return t && fe(n, t), n;
|
|
761
772
|
}
|
|
@@ -770,11 +781,11 @@ function fe(t, e = {}) {
|
|
|
770
781
|
}
|
|
771
782
|
e.release && (t.release = e.release), e.environment && (t.environment = e.environment), !t.ipAddress && e.ipAddress && (t.ipAddress = e.ipAddress), !t.userAgent && e.userAgent && (t.userAgent = e.userAgent), typeof e.errors == "number" && (t.errors = e.errors), e.status && (t.status = e.status);
|
|
772
783
|
}
|
|
773
|
-
function
|
|
784
|
+
function Si(t, e) {
|
|
774
785
|
let n = {};
|
|
775
786
|
t.status === "ok" && (n = { status: "exited" }), fe(t, n);
|
|
776
787
|
}
|
|
777
|
-
function
|
|
788
|
+
function ki(t) {
|
|
778
789
|
return {
|
|
779
790
|
sid: `${t.sid}`,
|
|
780
791
|
init: t.init,
|
|
@@ -807,7 +818,7 @@ function Oe(t, e, n = 2) {
|
|
|
807
818
|
function An() {
|
|
808
819
|
return P();
|
|
809
820
|
}
|
|
810
|
-
function
|
|
821
|
+
function jr() {
|
|
811
822
|
return P().substring(16);
|
|
812
823
|
}
|
|
813
824
|
const Ct = "_sentrySpan";
|
|
@@ -817,7 +828,7 @@ function Dn(t, e) {
|
|
|
817
828
|
function Nn(t) {
|
|
818
829
|
return t[Ct];
|
|
819
830
|
}
|
|
820
|
-
const
|
|
831
|
+
const xi = 100;
|
|
821
832
|
class B {
|
|
822
833
|
/** Flag if notifying is happening. */
|
|
823
834
|
/** Callback for client to receive scope changes. */
|
|
@@ -1108,7 +1119,7 @@ class B {
|
|
|
1108
1119
|
* By default, the last 100 breadcrumbs are kept.
|
|
1109
1120
|
*/
|
|
1110
1121
|
addBreadcrumb(e, n) {
|
|
1111
|
-
const r = typeof n == "number" ? n :
|
|
1122
|
+
const r = typeof n == "number" ? n : xi;
|
|
1112
1123
|
if (r <= 0)
|
|
1113
1124
|
return this;
|
|
1114
1125
|
const s = {
|
|
@@ -1244,13 +1255,13 @@ class B {
|
|
|
1244
1255
|
}), this._notifyingListeners = !1);
|
|
1245
1256
|
}
|
|
1246
1257
|
}
|
|
1247
|
-
function
|
|
1258
|
+
function Ri() {
|
|
1248
1259
|
return _e("defaultCurrentScope", () => new B());
|
|
1249
1260
|
}
|
|
1250
|
-
function
|
|
1261
|
+
function wi() {
|
|
1251
1262
|
return _e("defaultIsolationScope", () => new B());
|
|
1252
1263
|
}
|
|
1253
|
-
class
|
|
1264
|
+
class Ti {
|
|
1254
1265
|
constructor(e, n) {
|
|
1255
1266
|
let r;
|
|
1256
1267
|
e ? r = e : r = new B();
|
|
@@ -1318,23 +1329,23 @@ class wi {
|
|
|
1318
1329
|
}
|
|
1319
1330
|
function ge() {
|
|
1320
1331
|
const t = nt(), e = rt(t);
|
|
1321
|
-
return e.stack = e.stack || new
|
|
1332
|
+
return e.stack = e.stack || new Ti(Ri(), wi());
|
|
1322
1333
|
}
|
|
1323
|
-
function
|
|
1334
|
+
function vi(t) {
|
|
1324
1335
|
return ge().withScope(t);
|
|
1325
1336
|
}
|
|
1326
|
-
function
|
|
1337
|
+
function Ii(t, e) {
|
|
1327
1338
|
const n = ge();
|
|
1328
1339
|
return n.withScope(() => (n.getStackTop().scope = t, e(t)));
|
|
1329
1340
|
}
|
|
1330
1341
|
function On(t) {
|
|
1331
1342
|
return ge().withScope(() => t(ge().getIsolationScope()));
|
|
1332
1343
|
}
|
|
1333
|
-
function
|
|
1344
|
+
function Ci() {
|
|
1334
1345
|
return {
|
|
1335
1346
|
withIsolationScope: On,
|
|
1336
|
-
withScope:
|
|
1337
|
-
withSetScope:
|
|
1347
|
+
withScope: vi,
|
|
1348
|
+
withSetScope: Ii,
|
|
1338
1349
|
withSetIsolationScope: (t, e) => On(e),
|
|
1339
1350
|
getCurrentScope: () => ge().getScope(),
|
|
1340
1351
|
getIsolationScope: () => ge().getIsolationScope()
|
|
@@ -1342,7 +1353,7 @@ function Ii() {
|
|
|
1342
1353
|
}
|
|
1343
1354
|
function Qt(t) {
|
|
1344
1355
|
const e = rt(t);
|
|
1345
|
-
return e.acs ? e.acs :
|
|
1356
|
+
return e.acs ? e.acs : Ci();
|
|
1346
1357
|
}
|
|
1347
1358
|
function H() {
|
|
1348
1359
|
const t = nt();
|
|
@@ -1352,10 +1363,10 @@ function J() {
|
|
|
1352
1363
|
const t = nt();
|
|
1353
1364
|
return Qt(t).getIsolationScope();
|
|
1354
1365
|
}
|
|
1355
|
-
function
|
|
1366
|
+
function Ai() {
|
|
1356
1367
|
return _e("globalScope", () => new B());
|
|
1357
1368
|
}
|
|
1358
|
-
function
|
|
1369
|
+
function Di(...t) {
|
|
1359
1370
|
const e = nt(), n = Qt(e);
|
|
1360
1371
|
if (t.length === 2) {
|
|
1361
1372
|
const [r, s] = t;
|
|
@@ -1366,15 +1377,15 @@ function Ai(...t) {
|
|
|
1366
1377
|
function C() {
|
|
1367
1378
|
return H().getClient();
|
|
1368
1379
|
}
|
|
1369
|
-
function
|
|
1380
|
+
function Ni(t) {
|
|
1370
1381
|
const e = t.getPropagationContext(), { traceId: n, parentSpanId: r, propagationSpanId: s } = e, i = {
|
|
1371
1382
|
trace_id: n,
|
|
1372
|
-
span_id: s ||
|
|
1383
|
+
span_id: s || jr()
|
|
1373
1384
|
};
|
|
1374
1385
|
return r && (i.parent_span_id = r), i;
|
|
1375
1386
|
}
|
|
1376
|
-
const
|
|
1377
|
-
function
|
|
1387
|
+
const Oi = "sentry.source", $i = "sentry.sample_rate", Pi = "sentry.previous_trace_sample_rate", Li = "sentry.op", Mi = "sentry.origin", qr = "sentry.profile_id", Gr = "sentry.exclusive_time", Fi = "gen_ai.conversation.id", Ui = 0, Bi = 1, Hi = "_sentryScope", zi = "_sentryIsolationScope";
|
|
1388
|
+
function ji(t) {
|
|
1378
1389
|
if (t) {
|
|
1379
1390
|
if (typeof t == "object" && "deref" in t && typeof t.deref == "function")
|
|
1380
1391
|
try {
|
|
@@ -1385,21 +1396,21 @@ function zi(t) {
|
|
|
1385
1396
|
return t;
|
|
1386
1397
|
}
|
|
1387
1398
|
}
|
|
1388
|
-
function
|
|
1399
|
+
function Vr(t) {
|
|
1389
1400
|
const e = t;
|
|
1390
1401
|
return {
|
|
1391
|
-
scope: e[
|
|
1392
|
-
isolationScope:
|
|
1402
|
+
scope: e[Hi],
|
|
1403
|
+
isolationScope: ji(e[zi])
|
|
1393
1404
|
};
|
|
1394
1405
|
}
|
|
1395
|
-
const
|
|
1396
|
-
function
|
|
1397
|
-
const e =
|
|
1406
|
+
const qi = "sentry-", Gi = /^sentry-/;
|
|
1407
|
+
function Vi(t) {
|
|
1408
|
+
const e = Wi(t);
|
|
1398
1409
|
if (!e)
|
|
1399
1410
|
return;
|
|
1400
1411
|
const n = Object.entries(e).reduce((r, [s, i]) => {
|
|
1401
|
-
if (s.match(
|
|
1402
|
-
const o = s.slice(
|
|
1412
|
+
if (s.match(Gi)) {
|
|
1413
|
+
const o = s.slice(qi.length);
|
|
1403
1414
|
r[o] = i;
|
|
1404
1415
|
}
|
|
1405
1416
|
return r;
|
|
@@ -1407,7 +1418,7 @@ function Gi(t) {
|
|
|
1407
1418
|
if (Object.keys(n).length > 0)
|
|
1408
1419
|
return n;
|
|
1409
1420
|
}
|
|
1410
|
-
function
|
|
1421
|
+
function Wi(t) {
|
|
1411
1422
|
if (!(!t || !j(t) && !Array.isArray(t)))
|
|
1412
1423
|
return Array.isArray(t) ? t.reduce((e, n) => {
|
|
1413
1424
|
const r = $n(n);
|
|
@@ -1431,16 +1442,16 @@ function $n(t) {
|
|
|
1431
1442
|
});
|
|
1432
1443
|
}).reduce((e, [n, r]) => (n && r && (e[n] = r), e), {});
|
|
1433
1444
|
}
|
|
1434
|
-
const
|
|
1435
|
-
function
|
|
1445
|
+
const Xi = /^o(\d+)\./, Ki = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;
|
|
1446
|
+
function Yi(t) {
|
|
1436
1447
|
return t === "http" || t === "https";
|
|
1437
1448
|
}
|
|
1438
1449
|
function $e(t, e = !1) {
|
|
1439
1450
|
const { host: n, path: r, pass: s, port: i, projectId: o, protocol: a, publicKey: c } = t;
|
|
1440
1451
|
return `${a}://${c}${e && s ? `:${s}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${o}`;
|
|
1441
1452
|
}
|
|
1442
|
-
function
|
|
1443
|
-
const e =
|
|
1453
|
+
function Zi(t) {
|
|
1454
|
+
const e = Ki.exec(t);
|
|
1444
1455
|
if (!e) {
|
|
1445
1456
|
ye(() => {
|
|
1446
1457
|
console.error(`Invalid Sentry Dsn: ${t}`);
|
|
@@ -1454,9 +1465,9 @@ function Yi(t) {
|
|
|
1454
1465
|
const u = l.match(/^\d+/);
|
|
1455
1466
|
u && (l = u[0]);
|
|
1456
1467
|
}
|
|
1457
|
-
return
|
|
1468
|
+
return Wr({ host: i, pass: s, path: c, projectId: l, port: o, protocol: n, publicKey: r });
|
|
1458
1469
|
}
|
|
1459
|
-
function
|
|
1470
|
+
function Wr(t) {
|
|
1460
1471
|
return {
|
|
1461
1472
|
protocol: t.protocol,
|
|
1462
1473
|
publicKey: t.publicKey || "",
|
|
@@ -1467,48 +1478,48 @@ function Vr(t) {
|
|
|
1467
1478
|
projectId: t.projectId
|
|
1468
1479
|
};
|
|
1469
1480
|
}
|
|
1470
|
-
function
|
|
1481
|
+
function Ji(t) {
|
|
1471
1482
|
if (!_)
|
|
1472
1483
|
return !0;
|
|
1473
1484
|
const { port: e, projectId: n, protocol: r } = t;
|
|
1474
|
-
return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? !1 : (m.error(`Invalid Sentry Dsn: ${o} missing`), !0)) ? !1 : n.match(/^\d+$/) ?
|
|
1475
|
-
}
|
|
1476
|
-
function Ji(t) {
|
|
1477
|
-
return t.match(Wi)?.[1];
|
|
1485
|
+
return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? !1 : (m.error(`Invalid Sentry Dsn: ${o} missing`), !0)) ? !1 : n.match(/^\d+$/) ? Yi(r) ? e && isNaN(parseInt(e, 10)) ? (m.error(`Invalid Sentry Dsn: Invalid port ${e}`), !1) : !0 : (m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) : (m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1);
|
|
1478
1486
|
}
|
|
1479
1487
|
function Qi(t) {
|
|
1488
|
+
return t.match(Xi)?.[1];
|
|
1489
|
+
}
|
|
1490
|
+
function eo(t) {
|
|
1480
1491
|
const e = t.getOptions(), { host: n } = t.getDsn() || {};
|
|
1481
1492
|
let r;
|
|
1482
|
-
return e.orgId ? r = String(e.orgId) : n && (r =
|
|
1493
|
+
return e.orgId ? r = String(e.orgId) : n && (r = Qi(n)), r;
|
|
1483
1494
|
}
|
|
1484
|
-
function
|
|
1485
|
-
const e = typeof t == "string" ?
|
|
1486
|
-
if (!(!e || !
|
|
1495
|
+
function to(t) {
|
|
1496
|
+
const e = typeof t == "string" ? Zi(t) : Wr(t);
|
|
1497
|
+
if (!(!e || !Ji(e)))
|
|
1487
1498
|
return e;
|
|
1488
1499
|
}
|
|
1489
|
-
function
|
|
1500
|
+
function no(t) {
|
|
1490
1501
|
if (typeof t == "boolean")
|
|
1491
1502
|
return Number(t);
|
|
1492
1503
|
const e = typeof t == "string" ? parseFloat(t) : t;
|
|
1493
1504
|
if (!(typeof e != "number" || isNaN(e) || e < 0 || e > 1))
|
|
1494
1505
|
return e;
|
|
1495
1506
|
}
|
|
1496
|
-
const
|
|
1507
|
+
const Xr = 1;
|
|
1497
1508
|
let Pn = !1;
|
|
1498
|
-
function
|
|
1499
|
-
const { spanId: e, traceId: n, isRemote: r } = t.spanContext(), s = r ? e : en(t).parent_span_id, i =
|
|
1509
|
+
function ro(t) {
|
|
1510
|
+
const { spanId: e, traceId: n, isRemote: r } = t.spanContext(), s = r ? e : en(t).parent_span_id, i = Vr(t).scope, o = r ? i?.getPropagationContext().propagationSpanId || jr() : e;
|
|
1500
1511
|
return {
|
|
1501
1512
|
parent_span_id: s,
|
|
1502
1513
|
span_id: o,
|
|
1503
1514
|
trace_id: n
|
|
1504
1515
|
};
|
|
1505
1516
|
}
|
|
1506
|
-
function
|
|
1517
|
+
function so(t) {
|
|
1507
1518
|
if (t && t.length > 0)
|
|
1508
1519
|
return t.map(({ context: { spanId: e, traceId: n, traceFlags: r, ...s }, attributes: i }) => ({
|
|
1509
1520
|
span_id: e,
|
|
1510
1521
|
trace_id: n,
|
|
1511
|
-
sampled: r ===
|
|
1522
|
+
sampled: r === Xr,
|
|
1512
1523
|
attributes: i,
|
|
1513
1524
|
...s
|
|
1514
1525
|
}));
|
|
@@ -1520,10 +1531,10 @@ function Mn(t) {
|
|
|
1520
1531
|
return t > 9999999999 ? t / 1e3 : t;
|
|
1521
1532
|
}
|
|
1522
1533
|
function en(t) {
|
|
1523
|
-
if (
|
|
1534
|
+
if (oo(t))
|
|
1524
1535
|
return t.getSpanJSON();
|
|
1525
1536
|
const { spanId: e, traceId: n } = t.spanContext();
|
|
1526
|
-
if (
|
|
1537
|
+
if (io(t)) {
|
|
1527
1538
|
const { attributes: r, startTime: s, name: i, endTime: o, status: a, links: c } = t, l = "parentSpanId" in t ? t.parentSpanId : "parentSpanContext" in t ? t.parentSpanContext?.spanId : void 0;
|
|
1528
1539
|
return {
|
|
1529
1540
|
span_id: e,
|
|
@@ -1534,10 +1545,10 @@ function en(t) {
|
|
|
1534
1545
|
start_timestamp: Ln(s),
|
|
1535
1546
|
// This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
|
|
1536
1547
|
timestamp: Ln(o) || void 0,
|
|
1537
|
-
status:
|
|
1538
|
-
op: r[
|
|
1539
|
-
origin: r[
|
|
1540
|
-
links:
|
|
1548
|
+
status: co(a),
|
|
1549
|
+
op: r[Li],
|
|
1550
|
+
origin: r[Mi],
|
|
1551
|
+
links: so(c)
|
|
1541
1552
|
};
|
|
1542
1553
|
}
|
|
1543
1554
|
return {
|
|
@@ -1547,24 +1558,24 @@ function en(t) {
|
|
|
1547
1558
|
data: {}
|
|
1548
1559
|
};
|
|
1549
1560
|
}
|
|
1550
|
-
function
|
|
1561
|
+
function io(t) {
|
|
1551
1562
|
const e = t;
|
|
1552
1563
|
return !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status;
|
|
1553
1564
|
}
|
|
1554
|
-
function
|
|
1565
|
+
function oo(t) {
|
|
1555
1566
|
return typeof t.getSpanJSON == "function";
|
|
1556
1567
|
}
|
|
1557
|
-
function
|
|
1568
|
+
function ao(t) {
|
|
1558
1569
|
const { traceFlags: e } = t.spanContext();
|
|
1559
|
-
return e ===
|
|
1570
|
+
return e === Xr;
|
|
1560
1571
|
}
|
|
1561
|
-
function
|
|
1562
|
-
if (!(!t || t.code ===
|
|
1563
|
-
return t.code ===
|
|
1572
|
+
function co(t) {
|
|
1573
|
+
if (!(!t || t.code === Ui))
|
|
1574
|
+
return t.code === Bi ? "ok" : t.message || "internal_error";
|
|
1564
1575
|
}
|
|
1565
|
-
const
|
|
1566
|
-
function
|
|
1567
|
-
return t[
|
|
1576
|
+
const lo = "_sentryRootSpan";
|
|
1577
|
+
function Kr(t) {
|
|
1578
|
+
return t[lo] || t;
|
|
1568
1579
|
}
|
|
1569
1580
|
function Fn() {
|
|
1570
1581
|
Pn || (ye(() => {
|
|
@@ -1573,7 +1584,7 @@ function Fn() {
|
|
|
1573
1584
|
);
|
|
1574
1585
|
}), Pn = !0);
|
|
1575
1586
|
}
|
|
1576
|
-
function
|
|
1587
|
+
function uo(t) {
|
|
1577
1588
|
if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__)
|
|
1578
1589
|
return !1;
|
|
1579
1590
|
const e = C()?.getOptions();
|
|
@@ -1587,7 +1598,7 @@ function Bn(t, e) {
|
|
|
1587
1598
|
if (!e?.length || !t.description)
|
|
1588
1599
|
return !1;
|
|
1589
1600
|
for (const n of e) {
|
|
1590
|
-
if (
|
|
1601
|
+
if (ho(n)) {
|
|
1591
1602
|
if (Ge(t.description, n))
|
|
1592
1603
|
return _ && Un(t), !0;
|
|
1593
1604
|
continue;
|
|
@@ -1600,49 +1611,49 @@ function Bn(t, e) {
|
|
|
1600
1611
|
}
|
|
1601
1612
|
return !1;
|
|
1602
1613
|
}
|
|
1603
|
-
function
|
|
1614
|
+
function po(t, e) {
|
|
1604
1615
|
const n = e.parent_span_id, r = e.span_id;
|
|
1605
1616
|
if (n)
|
|
1606
1617
|
for (const s of t)
|
|
1607
1618
|
s.parent_span_id === r && (s.parent_span_id = n);
|
|
1608
1619
|
}
|
|
1609
|
-
function
|
|
1620
|
+
function ho(t) {
|
|
1610
1621
|
return typeof t == "string" || t instanceof RegExp;
|
|
1611
1622
|
}
|
|
1612
|
-
const tn = "production",
|
|
1613
|
-
function
|
|
1623
|
+
const tn = "production", fo = "_frozenDsc";
|
|
1624
|
+
function Yr(t, e) {
|
|
1614
1625
|
const n = e.getOptions(), { publicKey: r } = e.getDsn() || {}, s = {
|
|
1615
1626
|
environment: n.environment || tn,
|
|
1616
1627
|
release: n.release,
|
|
1617
1628
|
public_key: r,
|
|
1618
1629
|
trace_id: t,
|
|
1619
|
-
org_id:
|
|
1630
|
+
org_id: eo(e)
|
|
1620
1631
|
};
|
|
1621
1632
|
return e.emit("createDsc", s), s;
|
|
1622
1633
|
}
|
|
1623
|
-
function
|
|
1634
|
+
function go(t, e) {
|
|
1624
1635
|
const n = e.getPropagationContext();
|
|
1625
|
-
return n.dsc ||
|
|
1636
|
+
return n.dsc || Yr(n.traceId, t);
|
|
1626
1637
|
}
|
|
1627
|
-
function
|
|
1638
|
+
function mo(t) {
|
|
1628
1639
|
const e = C();
|
|
1629
1640
|
if (!e)
|
|
1630
1641
|
return {};
|
|
1631
|
-
const n =
|
|
1642
|
+
const n = Kr(t), r = en(n), s = r.data, i = n.spanContext().traceState, o = i?.get("sentry.sample_rate") ?? s[$i] ?? s[Pi];
|
|
1632
1643
|
function a(f) {
|
|
1633
1644
|
return (typeof o == "number" || typeof o == "string") && (f.sample_rate = `${o}`), f;
|
|
1634
1645
|
}
|
|
1635
|
-
const c = n[
|
|
1646
|
+
const c = n[fo];
|
|
1636
1647
|
if (c)
|
|
1637
1648
|
return a(c);
|
|
1638
|
-
const l = i?.get("sentry.dsc"), d = l &&
|
|
1649
|
+
const l = i?.get("sentry.dsc"), d = l && Vi(l);
|
|
1639
1650
|
if (d)
|
|
1640
1651
|
return a(d);
|
|
1641
|
-
const u =
|
|
1642
|
-
return p !== "url" && h && (u.transaction = h),
|
|
1652
|
+
const u = Yr(t.spanContext().traceId, e), p = s[Oi], h = r.description;
|
|
1653
|
+
return p !== "url" && h && (u.transaction = h), uo() && (u.sampled = String(ao(n)), u.sample_rand = // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans
|
|
1643
1654
|
// The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span
|
|
1644
1655
|
i?.get("sentry.sample_rand") ?? // On all other platforms we can actually get the scopes from a root span (we use this as a fallback)
|
|
1645
|
-
|
|
1656
|
+
Vr(n).scope?.getPropagationContext().sampleRand.toString()), a(u), e.emit("createDsc", u, n), u;
|
|
1646
1657
|
}
|
|
1647
1658
|
function z(t, e = 100, n = 1 / 0) {
|
|
1648
1659
|
try {
|
|
@@ -1651,16 +1662,16 @@ function z(t, e = 100, n = 1 / 0) {
|
|
|
1651
1662
|
return { ERROR: `**non-serializable** (${r})` };
|
|
1652
1663
|
}
|
|
1653
1664
|
}
|
|
1654
|
-
function
|
|
1665
|
+
function Zr(t, e = 3, n = 100 * 1024) {
|
|
1655
1666
|
const r = z(t, e);
|
|
1656
|
-
return
|
|
1667
|
+
return bo(r) > n ? Zr(t, e - 1, n) : r;
|
|
1657
1668
|
}
|
|
1658
|
-
function At(t, e, n = 1 / 0, r = 1 / 0, s =
|
|
1669
|
+
function At(t, e, n = 1 / 0, r = 1 / 0, s = So()) {
|
|
1659
1670
|
const [i, o] = s;
|
|
1660
1671
|
if (e == null || // this matches null and undefined -> eqeq not eqeqeq
|
|
1661
1672
|
["boolean", "string"].includes(typeof e) || typeof e == "number" && Number.isFinite(e))
|
|
1662
1673
|
return e;
|
|
1663
|
-
const a =
|
|
1674
|
+
const a = _o(t, e);
|
|
1664
1675
|
if (!a.startsWith("[object "))
|
|
1665
1676
|
return a;
|
|
1666
1677
|
if (e.__sentry_skip_normalization__)
|
|
@@ -1679,7 +1690,7 @@ function At(t, e, n = 1 / 0, r = 1 / 0, s = bo()) {
|
|
|
1679
1690
|
}
|
|
1680
1691
|
const d = Array.isArray(e) ? [] : {};
|
|
1681
1692
|
let u = 0;
|
|
1682
|
-
const p =
|
|
1693
|
+
const p = Br(e);
|
|
1683
1694
|
for (const h in p) {
|
|
1684
1695
|
if (!Object.prototype.hasOwnProperty.call(p, h))
|
|
1685
1696
|
continue;
|
|
@@ -1692,7 +1703,7 @@ function At(t, e, n = 1 / 0, r = 1 / 0, s = bo()) {
|
|
|
1692
1703
|
}
|
|
1693
1704
|
return o(e), d;
|
|
1694
1705
|
}
|
|
1695
|
-
function
|
|
1706
|
+
function _o(t, e) {
|
|
1696
1707
|
try {
|
|
1697
1708
|
if (t === "domain" && e && typeof e == "object" && e._events)
|
|
1698
1709
|
return "[Domain]";
|
|
@@ -1704,9 +1715,9 @@ function mo(t, e) {
|
|
|
1704
1715
|
return "[Window]";
|
|
1705
1716
|
if (typeof document < "u" && e === document)
|
|
1706
1717
|
return "[Document]";
|
|
1707
|
-
if (
|
|
1708
|
-
return
|
|
1709
|
-
if (
|
|
1718
|
+
if (Lr(e))
|
|
1719
|
+
return Or(e);
|
|
1720
|
+
if (di(e))
|
|
1710
1721
|
return "[SyntheticEvent]";
|
|
1711
1722
|
if (typeof e == "number" && !Number.isFinite(e))
|
|
1712
1723
|
return `[${e}]`;
|
|
@@ -1716,23 +1727,23 @@ function mo(t, e) {
|
|
|
1716
1727
|
return `[${String(e)}]`;
|
|
1717
1728
|
if (typeof e == "bigint")
|
|
1718
1729
|
return `[BigInt: ${String(e)}]`;
|
|
1719
|
-
const n =
|
|
1730
|
+
const n = yo(e);
|
|
1720
1731
|
return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
|
|
1721
1732
|
} catch (n) {
|
|
1722
1733
|
return `**non-serializable** (${n})`;
|
|
1723
1734
|
}
|
|
1724
1735
|
}
|
|
1725
|
-
function
|
|
1736
|
+
function yo(t) {
|
|
1726
1737
|
const e = Object.getPrototypeOf(t);
|
|
1727
1738
|
return e?.constructor ? e.constructor.name : "null prototype";
|
|
1728
1739
|
}
|
|
1729
|
-
function
|
|
1740
|
+
function Eo(t) {
|
|
1730
1741
|
return ~-encodeURI(t).split(/%..|./).length;
|
|
1731
1742
|
}
|
|
1732
|
-
function
|
|
1733
|
-
return
|
|
1743
|
+
function bo(t) {
|
|
1744
|
+
return Eo(JSON.stringify(t));
|
|
1734
1745
|
}
|
|
1735
|
-
function
|
|
1746
|
+
function So() {
|
|
1736
1747
|
const t = /* @__PURE__ */ new WeakSet();
|
|
1737
1748
|
function e(r) {
|
|
1738
1749
|
return t.has(r) ? !0 : (t.add(r), !1);
|
|
@@ -1745,7 +1756,7 @@ function bo() {
|
|
|
1745
1756
|
function be(t, e = []) {
|
|
1746
1757
|
return [t, e];
|
|
1747
1758
|
}
|
|
1748
|
-
function
|
|
1759
|
+
function ko(t, e) {
|
|
1749
1760
|
const [n, r] = t;
|
|
1750
1761
|
return [n, [...r, e]];
|
|
1751
1762
|
}
|
|
@@ -1758,14 +1769,14 @@ function Dt(t, e) {
|
|
|
1758
1769
|
}
|
|
1759
1770
|
return !1;
|
|
1760
1771
|
}
|
|
1761
|
-
function
|
|
1772
|
+
function xo(t, e) {
|
|
1762
1773
|
return Dt(t, (n, r) => e.includes(r));
|
|
1763
1774
|
}
|
|
1764
1775
|
function Nt(t) {
|
|
1765
1776
|
const e = rt(R);
|
|
1766
1777
|
return e.encodePolyfill ? e.encodePolyfill(t) : new TextEncoder().encode(t);
|
|
1767
1778
|
}
|
|
1768
|
-
function
|
|
1779
|
+
function Ro(t) {
|
|
1769
1780
|
const [e, n] = t;
|
|
1770
1781
|
let r = JSON.stringify(e);
|
|
1771
1782
|
function s(i) {
|
|
@@ -1787,16 +1798,16 @@ ${JSON.stringify(o)}
|
|
|
1787
1798
|
s(c);
|
|
1788
1799
|
}
|
|
1789
1800
|
}
|
|
1790
|
-
return typeof r == "string" ? r :
|
|
1801
|
+
return typeof r == "string" ? r : wo(r);
|
|
1791
1802
|
}
|
|
1792
|
-
function
|
|
1803
|
+
function wo(t) {
|
|
1793
1804
|
const e = t.reduce((s, i) => s + i.length, 0), n = new Uint8Array(e);
|
|
1794
1805
|
let r = 0;
|
|
1795
1806
|
for (const s of t)
|
|
1796
1807
|
n.set(s, r), r += s.length;
|
|
1797
1808
|
return n;
|
|
1798
1809
|
}
|
|
1799
|
-
function
|
|
1810
|
+
function To(t) {
|
|
1800
1811
|
const e = typeof t.data == "string" ? Nt(t.data) : t.data;
|
|
1801
1812
|
return [
|
|
1802
1813
|
{
|
|
@@ -1809,7 +1820,7 @@ function wo(t) {
|
|
|
1809
1820
|
e
|
|
1810
1821
|
];
|
|
1811
1822
|
}
|
|
1812
|
-
const
|
|
1823
|
+
const vo = {
|
|
1813
1824
|
session: "session",
|
|
1814
1825
|
sessions: "session",
|
|
1815
1826
|
attachment: "attachment",
|
|
@@ -1830,15 +1841,15 @@ const To = {
|
|
|
1830
1841
|
trace_metric: "metric"
|
|
1831
1842
|
};
|
|
1832
1843
|
function Hn(t) {
|
|
1833
|
-
return
|
|
1844
|
+
return vo[t];
|
|
1834
1845
|
}
|
|
1835
|
-
function
|
|
1846
|
+
function Jr(t) {
|
|
1836
1847
|
if (!t?.sdk)
|
|
1837
1848
|
return;
|
|
1838
1849
|
const { name: e, version: n } = t.sdk;
|
|
1839
1850
|
return { name: e, version: n };
|
|
1840
1851
|
}
|
|
1841
|
-
function
|
|
1852
|
+
function Io(t, e, n, r) {
|
|
1842
1853
|
const s = t.sdkProcessingMetadata?.dynamicSamplingContext;
|
|
1843
1854
|
return {
|
|
1844
1855
|
event_id: t.event_id,
|
|
@@ -1850,7 +1861,7 @@ function vo(t, e, n, r) {
|
|
|
1850
1861
|
}
|
|
1851
1862
|
};
|
|
1852
1863
|
}
|
|
1853
|
-
function
|
|
1864
|
+
function Co(t, e) {
|
|
1854
1865
|
if (!e)
|
|
1855
1866
|
return t;
|
|
1856
1867
|
const n = t.sdk || {};
|
|
@@ -1866,18 +1877,18 @@ function Io(t, e) {
|
|
|
1866
1877
|
} : void 0
|
|
1867
1878
|
}, t;
|
|
1868
1879
|
}
|
|
1869
|
-
function
|
|
1870
|
-
const s =
|
|
1880
|
+
function Ao(t, e, n, r) {
|
|
1881
|
+
const s = Jr(n), i = {
|
|
1871
1882
|
sent_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1872
1883
|
...s && { sdk: s },
|
|
1873
1884
|
...!!r && e && { dsn: $e(e) }
|
|
1874
1885
|
}, o = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
|
|
1875
1886
|
return be(i, [o]);
|
|
1876
1887
|
}
|
|
1877
|
-
function
|
|
1878
|
-
const s =
|
|
1879
|
-
|
|
1880
|
-
const o =
|
|
1888
|
+
function Do(t, e, n, r) {
|
|
1889
|
+
const s = Jr(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
|
|
1890
|
+
Co(t, n?.sdk);
|
|
1891
|
+
const o = Io(t, s, r, e);
|
|
1881
1892
|
return delete t.sdkProcessingMetadata, be(o, [[{ type: i }, t]]);
|
|
1882
1893
|
}
|
|
1883
1894
|
const yt = 0, zn = 1, jn = 2;
|
|
@@ -1978,7 +1989,7 @@ class Ce {
|
|
|
1978
1989
|
}
|
|
1979
1990
|
}
|
|
1980
1991
|
}
|
|
1981
|
-
function
|
|
1992
|
+
function No(t, e, n, r = 0) {
|
|
1982
1993
|
try {
|
|
1983
1994
|
const s = Ot(e, n, t, r);
|
|
1984
1995
|
return De(s) ? s : Pe(s);
|
|
@@ -1994,7 +2005,7 @@ function Ot(t, e, n, r) {
|
|
|
1994
2005
|
return _ && i === null && m.log(`Event processor "${s.id || "?"}" dropped event`), De(i) ? i.then((o) => Ot(o, e, n, r + 1)) : Ot(i, e, n, r + 1);
|
|
1995
2006
|
}
|
|
1996
2007
|
let Q, qn, Gn, G;
|
|
1997
|
-
function
|
|
2008
|
+
function Oo(t) {
|
|
1998
2009
|
const e = R._sentryDebugIds, n = R._debugIds;
|
|
1999
2010
|
if (!e && !n)
|
|
2000
2011
|
return {};
|
|
@@ -2021,9 +2032,9 @@ function No(t) {
|
|
|
2021
2032
|
};
|
|
2022
2033
|
return e && i(r, e), n && i(s, n), G;
|
|
2023
2034
|
}
|
|
2024
|
-
function
|
|
2035
|
+
function $o(t, e) {
|
|
2025
2036
|
const { fingerprint: n, span: r, breadcrumbs: s, sdkProcessingMetadata: i } = e;
|
|
2026
|
-
|
|
2037
|
+
Po(t, e), r && Fo(t, r), Uo(t, n), Lo(t, s), Mo(t, i);
|
|
2027
2038
|
}
|
|
2028
2039
|
function Vn(t, e) {
|
|
2029
2040
|
const {
|
|
@@ -2047,57 +2058,57 @@ function Vn(t, e) {
|
|
|
2047
2058
|
function Re(t, e, n) {
|
|
2048
2059
|
t[e] = Oe(t[e], n, 1);
|
|
2049
2060
|
}
|
|
2050
|
-
function
|
|
2051
|
-
const n =
|
|
2061
|
+
function Qr(t, e) {
|
|
2062
|
+
const n = Ai().getScopeData();
|
|
2052
2063
|
return t && Vn(n, t.getScopeData()), e && Vn(n, e.getScopeData()), n;
|
|
2053
2064
|
}
|
|
2054
|
-
function
|
|
2065
|
+
function Po(t, e) {
|
|
2055
2066
|
const { extra: n, tags: r, user: s, contexts: i, level: o, transactionName: a } = e;
|
|
2056
2067
|
Object.keys(n).length && (t.extra = { ...n, ...t.extra }), Object.keys(r).length && (t.tags = { ...r, ...t.tags }), Object.keys(s).length && (t.user = { ...s, ...t.user }), Object.keys(i).length && (t.contexts = { ...i, ...t.contexts }), o && (t.level = o), a && t.type !== "transaction" && (t.transaction = a);
|
|
2057
2068
|
}
|
|
2058
|
-
function
|
|
2069
|
+
function Lo(t, e) {
|
|
2059
2070
|
const n = [...t.breadcrumbs || [], ...e];
|
|
2060
2071
|
t.breadcrumbs = n.length ? n : void 0;
|
|
2061
2072
|
}
|
|
2062
|
-
function
|
|
2073
|
+
function Mo(t, e) {
|
|
2063
2074
|
t.sdkProcessingMetadata = {
|
|
2064
2075
|
...t.sdkProcessingMetadata,
|
|
2065
2076
|
...e
|
|
2066
2077
|
};
|
|
2067
2078
|
}
|
|
2068
|
-
function
|
|
2079
|
+
function Fo(t, e) {
|
|
2069
2080
|
t.contexts = {
|
|
2070
|
-
trace:
|
|
2081
|
+
trace: ro(e),
|
|
2071
2082
|
...t.contexts
|
|
2072
2083
|
}, t.sdkProcessingMetadata = {
|
|
2073
|
-
dynamicSamplingContext:
|
|
2084
|
+
dynamicSamplingContext: mo(e),
|
|
2074
2085
|
...t.sdkProcessingMetadata
|
|
2075
2086
|
};
|
|
2076
|
-
const n =
|
|
2087
|
+
const n = Kr(e), r = en(n).description;
|
|
2077
2088
|
r && !t.transaction && t.type === "transaction" && (t.transaction = r);
|
|
2078
2089
|
}
|
|
2079
|
-
function
|
|
2090
|
+
function Uo(t, e) {
|
|
2080
2091
|
t.fingerprint = t.fingerprint ? Array.isArray(t.fingerprint) ? t.fingerprint : [t.fingerprint] : [], e && (t.fingerprint = t.fingerprint.concat(e)), t.fingerprint.length || delete t.fingerprint;
|
|
2081
2092
|
}
|
|
2082
|
-
function
|
|
2093
|
+
function Bo(t, e, n, r, s, i) {
|
|
2083
2094
|
const { normalizeDepth: o = 3, normalizeMaxBreadth: a = 1e3 } = t, c = {
|
|
2084
2095
|
...e,
|
|
2085
2096
|
event_id: e.event_id || n.event_id || P(),
|
|
2086
2097
|
timestamp: e.timestamp || Ne()
|
|
2087
2098
|
}, l = n.integrations || t.integrations.map((A) => A.name);
|
|
2088
|
-
|
|
2089
|
-
const d =
|
|
2099
|
+
Ho(c, t), qo(c, l), s && s.emit("applyFrameMetadata", e), e.type === void 0 && zo(c, t.stackParser);
|
|
2100
|
+
const d = Vo(r, n.captureContext);
|
|
2090
2101
|
n.mechanism && he(c, n.mechanism);
|
|
2091
|
-
const u = s ? s.getEventProcessors() : [], p =
|
|
2092
|
-
h.length && (n.attachments = h),
|
|
2102
|
+
const u = s ? s.getEventProcessors() : [], p = Qr(i, d), h = [...n.attachments || [], ...p.attachments];
|
|
2103
|
+
h.length && (n.attachments = h), $o(c, p);
|
|
2093
2104
|
const f = [
|
|
2094
2105
|
...u,
|
|
2095
2106
|
// Run scope event processors _after_ all other processors
|
|
2096
2107
|
...p.eventProcessors
|
|
2097
2108
|
];
|
|
2098
|
-
return (n.data && n.data.__sentry__ === !0 ? Pe(c) :
|
|
2109
|
+
return (n.data && n.data.__sentry__ === !0 ? Pe(c) : No(f, c, n)).then((A) => (A && jo(A), typeof o == "number" && o > 0 ? Go(A, o, a) : A));
|
|
2099
2110
|
}
|
|
2100
|
-
function
|
|
2111
|
+
function Ho(t, e) {
|
|
2101
2112
|
const { environment: n, release: r, dist: s, maxValueLength: i } = e;
|
|
2102
2113
|
t.environment = t.environment || n || tn, !t.release && r && (t.release = r), !t.dist && s && (t.dist = s);
|
|
2103
2114
|
const o = t.request;
|
|
@@ -2105,15 +2116,15 @@ function Bo(t, e) {
|
|
|
2105
2116
|
a.value && (a.value = vt(a.value, i));
|
|
2106
2117
|
});
|
|
2107
2118
|
}
|
|
2108
|
-
function
|
|
2109
|
-
const n =
|
|
2119
|
+
function zo(t, e) {
|
|
2120
|
+
const n = Oo(e);
|
|
2110
2121
|
t.exception?.values?.forEach((r) => {
|
|
2111
2122
|
r.stacktrace?.frames?.forEach((s) => {
|
|
2112
2123
|
s.filename && (s.debug_id = n[s.filename]);
|
|
2113
2124
|
});
|
|
2114
2125
|
});
|
|
2115
2126
|
}
|
|
2116
|
-
function
|
|
2127
|
+
function jo(t) {
|
|
2117
2128
|
const e = {};
|
|
2118
2129
|
if (t.exception?.values?.forEach((r) => {
|
|
2119
2130
|
r.stacktrace?.frames?.forEach((s) => {
|
|
@@ -2131,10 +2142,10 @@ function zo(t) {
|
|
|
2131
2142
|
});
|
|
2132
2143
|
});
|
|
2133
2144
|
}
|
|
2134
|
-
function
|
|
2145
|
+
function qo(t, e) {
|
|
2135
2146
|
e.length > 0 && (t.sdk = t.sdk || {}, t.sdk.integrations = [...t.sdk.integrations || [], ...e]);
|
|
2136
2147
|
}
|
|
2137
|
-
function
|
|
2148
|
+
function Go(t, e, n) {
|
|
2138
2149
|
if (!t)
|
|
2139
2150
|
return null;
|
|
2140
2151
|
const r = {
|
|
@@ -2164,22 +2175,22 @@ function qo(t, e, n) {
|
|
|
2164
2175
|
}
|
|
2165
2176
|
}))), t.contexts?.flags && r.contexts && (r.contexts.flags = z(t.contexts.flags, 3, n)), r;
|
|
2166
2177
|
}
|
|
2167
|
-
function
|
|
2178
|
+
function Vo(t, e) {
|
|
2168
2179
|
if (!e)
|
|
2169
2180
|
return t;
|
|
2170
2181
|
const n = t ? t.clone() : new B();
|
|
2171
2182
|
return n.update(e), n;
|
|
2172
2183
|
}
|
|
2173
|
-
function
|
|
2184
|
+
function Wo(t) {
|
|
2174
2185
|
if (t)
|
|
2175
|
-
return
|
|
2186
|
+
return Xo(t) ? { captureContext: t } : Yo(t) ? {
|
|
2176
2187
|
captureContext: t
|
|
2177
2188
|
} : t;
|
|
2178
2189
|
}
|
|
2179
|
-
function
|
|
2190
|
+
function Xo(t) {
|
|
2180
2191
|
return t instanceof B || typeof t == "function";
|
|
2181
2192
|
}
|
|
2182
|
-
const
|
|
2193
|
+
const Ko = [
|
|
2183
2194
|
"user",
|
|
2184
2195
|
"level",
|
|
2185
2196
|
"extra",
|
|
@@ -2188,71 +2199,71 @@ const Xo = [
|
|
|
2188
2199
|
"fingerprint",
|
|
2189
2200
|
"propagationContext"
|
|
2190
2201
|
];
|
|
2191
|
-
function
|
|
2192
|
-
return Object.keys(t).some((e) =>
|
|
2202
|
+
function Yo(t) {
|
|
2203
|
+
return Object.keys(t).some((e) => Ko.includes(e));
|
|
2193
2204
|
}
|
|
2194
|
-
function
|
|
2195
|
-
return H().captureException(t,
|
|
2205
|
+
function es(t, e) {
|
|
2206
|
+
return H().captureException(t, Wo(e));
|
|
2196
2207
|
}
|
|
2197
|
-
function
|
|
2208
|
+
function Zo(t, e) {
|
|
2198
2209
|
const n = typeof e == "string" ? e : void 0, r = typeof e != "string" ? { captureContext: e } : void 0;
|
|
2199
2210
|
return H().captureMessage(t, n, r);
|
|
2200
2211
|
}
|
|
2201
|
-
function
|
|
2212
|
+
function ts(t, e) {
|
|
2202
2213
|
return H().captureEvent(t, e);
|
|
2203
2214
|
}
|
|
2204
|
-
function
|
|
2215
|
+
function Jo(t) {
|
|
2205
2216
|
J().setUser(t);
|
|
2206
2217
|
}
|
|
2207
2218
|
function Wn(t) {
|
|
2208
|
-
const e = J(), { user: n } =
|
|
2219
|
+
const e = J(), { user: n } = Qr(e, H()), { userAgent: r } = R.navigator || {}, s = bi({
|
|
2209
2220
|
user: n,
|
|
2210
2221
|
...r && { userAgent: r },
|
|
2211
2222
|
...t
|
|
2212
2223
|
}), i = e.getSession();
|
|
2213
|
-
return i?.status === "ok" && fe(i, { status: "exited" }),
|
|
2224
|
+
return i?.status === "ok" && fe(i, { status: "exited" }), ns(), e.setSession(s), s;
|
|
2214
2225
|
}
|
|
2215
|
-
function
|
|
2226
|
+
function ns() {
|
|
2216
2227
|
const t = J(), n = H().getSession() || t.getSession();
|
|
2217
|
-
n &&
|
|
2228
|
+
n && Si(n), rs(), t.setSession();
|
|
2218
2229
|
}
|
|
2219
|
-
function
|
|
2230
|
+
function rs() {
|
|
2220
2231
|
const t = J(), e = C(), n = t.getSession();
|
|
2221
2232
|
n && e && e.captureSession(n);
|
|
2222
2233
|
}
|
|
2223
2234
|
function Et(t = !1) {
|
|
2224
2235
|
if (t) {
|
|
2225
|
-
|
|
2236
|
+
ns();
|
|
2226
2237
|
return;
|
|
2227
2238
|
}
|
|
2228
|
-
|
|
2239
|
+
rs();
|
|
2229
2240
|
}
|
|
2230
|
-
const
|
|
2231
|
-
function
|
|
2241
|
+
const Qo = "7";
|
|
2242
|
+
function ea(t) {
|
|
2232
2243
|
const e = t.protocol ? `${t.protocol}:` : "", n = t.port ? `:${t.port}` : "";
|
|
2233
2244
|
return `${e}//${t.host}${n}${t.path ? `/${t.path}` : ""}/api/`;
|
|
2234
2245
|
}
|
|
2235
|
-
function
|
|
2236
|
-
return `${
|
|
2246
|
+
function ta(t) {
|
|
2247
|
+
return `${ea(t)}${t.projectId}/envelope/`;
|
|
2237
2248
|
}
|
|
2238
|
-
function
|
|
2249
|
+
function na(t, e) {
|
|
2239
2250
|
const n = {
|
|
2240
|
-
sentry_version:
|
|
2251
|
+
sentry_version: Qo
|
|
2241
2252
|
};
|
|
2242
2253
|
return t.publicKey && (n.sentry_key = t.publicKey), e && (n.sentry_client = `${e.name}/${e.version}`), new URLSearchParams(n).toString();
|
|
2243
2254
|
}
|
|
2244
|
-
function
|
|
2245
|
-
return e || `${
|
|
2255
|
+
function ra(t, e, n) {
|
|
2256
|
+
return e || `${ta(t)}?${na(t, n)}`;
|
|
2246
2257
|
}
|
|
2247
2258
|
const Xn = [];
|
|
2248
|
-
function
|
|
2259
|
+
function sa(t) {
|
|
2249
2260
|
const e = {};
|
|
2250
2261
|
return t.forEach((n) => {
|
|
2251
2262
|
const { name: r } = n, s = e[r];
|
|
2252
2263
|
s && !s.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
|
|
2253
2264
|
}), Object.values(e);
|
|
2254
2265
|
}
|
|
2255
|
-
function
|
|
2266
|
+
function ia(t) {
|
|
2256
2267
|
const e = t.defaultIntegrations || [], n = t.integrations;
|
|
2257
2268
|
e.forEach((s) => {
|
|
2258
2269
|
s.isDefaultInstance = !0;
|
|
@@ -2265,19 +2276,19 @@ function sa(t) {
|
|
|
2265
2276
|
r = Array.isArray(s) ? s : [s];
|
|
2266
2277
|
} else
|
|
2267
2278
|
r = e;
|
|
2268
|
-
return
|
|
2279
|
+
return sa(r);
|
|
2269
2280
|
}
|
|
2270
|
-
function
|
|
2281
|
+
function oa(t, e) {
|
|
2271
2282
|
const n = {};
|
|
2272
2283
|
return e.forEach((r) => {
|
|
2273
|
-
r &&
|
|
2284
|
+
r && ss(t, r, n);
|
|
2274
2285
|
}), n;
|
|
2275
2286
|
}
|
|
2276
2287
|
function Kn(t, e) {
|
|
2277
2288
|
for (const n of e)
|
|
2278
2289
|
n?.afterAllSetup && n.afterAllSetup(t);
|
|
2279
2290
|
}
|
|
2280
|
-
function
|
|
2291
|
+
function ss(t, e, n) {
|
|
2281
2292
|
if (n[e.name]) {
|
|
2282
2293
|
_ && m.log(`Integration skipped because it was already installed: ${e.name}`);
|
|
2283
2294
|
return;
|
|
@@ -2294,7 +2305,7 @@ function rs(t, e, n) {
|
|
|
2294
2305
|
}
|
|
2295
2306
|
_ && m.log(`Integration installed: ${e.name}`);
|
|
2296
2307
|
}
|
|
2297
|
-
function
|
|
2308
|
+
function aa(t) {
|
|
2298
2309
|
return [
|
|
2299
2310
|
{
|
|
2300
2311
|
type: "log",
|
|
@@ -2306,27 +2317,27 @@ function oa(t) {
|
|
|
2306
2317
|
}
|
|
2307
2318
|
];
|
|
2308
2319
|
}
|
|
2309
|
-
function
|
|
2320
|
+
function ca(t, e, n, r) {
|
|
2310
2321
|
const s = {};
|
|
2311
2322
|
return e?.sdk && (s.sdk = {
|
|
2312
2323
|
name: e.sdk.name,
|
|
2313
2324
|
version: e.sdk.version
|
|
2314
|
-
}), n && r && (s.dsn = $e(r)), be(s, [
|
|
2325
|
+
}), n && r && (s.dsn = $e(r)), be(s, [aa(t)]);
|
|
2315
2326
|
}
|
|
2316
2327
|
function $t(t, e) {
|
|
2317
|
-
const n = e ??
|
|
2328
|
+
const n = e ?? la(t) ?? [];
|
|
2318
2329
|
if (n.length === 0)
|
|
2319
2330
|
return;
|
|
2320
|
-
const r = t.getOptions(), s =
|
|
2321
|
-
|
|
2331
|
+
const r = t.getOptions(), s = ca(n, r._metadata, r.tunnel, t.getDsn());
|
|
2332
|
+
is().set(t, []), t.emit("flushLogs"), t.sendEnvelope(s);
|
|
2322
2333
|
}
|
|
2323
|
-
function
|
|
2324
|
-
return
|
|
2334
|
+
function la(t) {
|
|
2335
|
+
return is().get(t);
|
|
2325
2336
|
}
|
|
2326
|
-
function
|
|
2337
|
+
function is() {
|
|
2327
2338
|
return _e("clientToLogBufferMap", () => /* @__PURE__ */ new WeakMap());
|
|
2328
2339
|
}
|
|
2329
|
-
function
|
|
2340
|
+
function ua(t) {
|
|
2330
2341
|
return [
|
|
2331
2342
|
{
|
|
2332
2343
|
type: "trace_metric",
|
|
@@ -2338,27 +2349,27 @@ function la(t) {
|
|
|
2338
2349
|
}
|
|
2339
2350
|
];
|
|
2340
2351
|
}
|
|
2341
|
-
function
|
|
2352
|
+
function da(t, e, n, r) {
|
|
2342
2353
|
const s = {};
|
|
2343
2354
|
return e?.sdk && (s.sdk = {
|
|
2344
2355
|
name: e.sdk.name,
|
|
2345
2356
|
version: e.sdk.version
|
|
2346
|
-
}), n && r && (s.dsn = $e(r)), be(s, [
|
|
2357
|
+
}), n && r && (s.dsn = $e(r)), be(s, [ua(t)]);
|
|
2347
2358
|
}
|
|
2348
|
-
function
|
|
2349
|
-
const n = e ??
|
|
2359
|
+
function os(t, e) {
|
|
2360
|
+
const n = e ?? pa(t) ?? [];
|
|
2350
2361
|
if (n.length === 0)
|
|
2351
2362
|
return;
|
|
2352
|
-
const r = t.getOptions(), s =
|
|
2353
|
-
|
|
2363
|
+
const r = t.getOptions(), s = da(n, r._metadata, r.tunnel, t.getDsn());
|
|
2364
|
+
as().set(t, []), t.emit("flushMetrics"), t.sendEnvelope(s);
|
|
2354
2365
|
}
|
|
2355
|
-
function
|
|
2356
|
-
return
|
|
2366
|
+
function pa(t) {
|
|
2367
|
+
return as().get(t);
|
|
2357
2368
|
}
|
|
2358
|
-
function
|
|
2369
|
+
function as() {
|
|
2359
2370
|
return _e("clientToMetricBufferMap", () => /* @__PURE__ */ new WeakMap());
|
|
2360
2371
|
}
|
|
2361
|
-
function
|
|
2372
|
+
function cs(t) {
|
|
2362
2373
|
return typeof t == "object" && typeof t.unref == "function" && t.unref(), t;
|
|
2363
2374
|
}
|
|
2364
2375
|
const rn = Symbol.for("SentryBufferFullError");
|
|
@@ -2387,7 +2398,7 @@ function sn(t = 100) {
|
|
|
2387
2398
|
return a;
|
|
2388
2399
|
const c = [
|
|
2389
2400
|
a,
|
|
2390
|
-
new Promise((l) =>
|
|
2401
|
+
new Promise((l) => cs(setTimeout(() => l(!1), o)))
|
|
2391
2402
|
];
|
|
2392
2403
|
return Promise.race(c);
|
|
2393
2404
|
}
|
|
@@ -2399,21 +2410,21 @@ function sn(t = 100) {
|
|
|
2399
2410
|
drain: i
|
|
2400
2411
|
};
|
|
2401
2412
|
}
|
|
2402
|
-
const
|
|
2403
|
-
function
|
|
2413
|
+
const ha = 60 * 1e3;
|
|
2414
|
+
function fa(t, e = ct()) {
|
|
2404
2415
|
const n = parseInt(`${t}`, 10);
|
|
2405
2416
|
if (!isNaN(n))
|
|
2406
2417
|
return n * 1e3;
|
|
2407
2418
|
const r = Date.parse(`${t}`);
|
|
2408
|
-
return isNaN(r) ?
|
|
2419
|
+
return isNaN(r) ? ha : r - e;
|
|
2409
2420
|
}
|
|
2410
|
-
function
|
|
2421
|
+
function ga(t, e) {
|
|
2411
2422
|
return t[e] || t.all || 0;
|
|
2412
2423
|
}
|
|
2413
|
-
function
|
|
2414
|
-
return
|
|
2424
|
+
function ma(t, e, n = ct()) {
|
|
2425
|
+
return ga(t, e) > n;
|
|
2415
2426
|
}
|
|
2416
|
-
function
|
|
2427
|
+
function _a(t, { statusCode: e, headers: n }, r = ct()) {
|
|
2417
2428
|
const s = {
|
|
2418
2429
|
...t
|
|
2419
2430
|
}, i = n?.["x-sentry-rate-limits"], o = n?.["retry-after"];
|
|
@@ -2426,12 +2437,12 @@ function ma(t, { statusCode: e, headers: n }, r = ct()) {
|
|
|
2426
2437
|
for (const h of l.split(";"))
|
|
2427
2438
|
h === "metric_bucket" ? (!d || d.split(";").includes("custom")) && (s[h] = r + p) : s[h] = r + p;
|
|
2428
2439
|
}
|
|
2429
|
-
else o ? s.all = r +
|
|
2440
|
+
else o ? s.all = r + fa(o, r) : e === 429 && (s.all = r + 60 * 1e3);
|
|
2430
2441
|
return s;
|
|
2431
2442
|
}
|
|
2432
|
-
const
|
|
2433
|
-
function
|
|
2434
|
-
t.bufferSize ||
|
|
2443
|
+
const ls = 64;
|
|
2444
|
+
function ya(t, e, n = sn(
|
|
2445
|
+
t.bufferSize || ls
|
|
2435
2446
|
)) {
|
|
2436
2447
|
let r = {};
|
|
2437
2448
|
const s = (o) => n.drain(o);
|
|
@@ -2439,21 +2450,21 @@ function _a(t, e, n = sn(
|
|
|
2439
2450
|
const a = [];
|
|
2440
2451
|
if (Dt(o, (u, p) => {
|
|
2441
2452
|
const h = Hn(p);
|
|
2442
|
-
|
|
2453
|
+
ma(r, h) ? t.recordDroppedEvent("ratelimit_backoff", h) : a.push(u);
|
|
2443
2454
|
}), a.length === 0)
|
|
2444
2455
|
return Promise.resolve({});
|
|
2445
2456
|
const c = be(o[0], a), l = (u) => {
|
|
2446
|
-
if (
|
|
2457
|
+
if (xo(c, ["client_report"])) {
|
|
2447
2458
|
_ && m.warn(`Dropping client report. Will not send outcomes (reason: ${u}).`);
|
|
2448
2459
|
return;
|
|
2449
2460
|
}
|
|
2450
2461
|
Dt(c, (p, h) => {
|
|
2451
2462
|
t.recordDroppedEvent(u, Hn(h));
|
|
2452
2463
|
});
|
|
2453
|
-
}, d = () => e({ body:
|
|
2464
|
+
}, d = () => e({ body: Ro(c) }).then(
|
|
2454
2465
|
(u) => u.statusCode === 413 ? (_ && m.error(
|
|
2455
2466
|
"Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."
|
|
2456
|
-
), l("send_error"), u) : (_ && u.statusCode !== void 0 && (u.statusCode < 200 || u.statusCode >= 300) && m.warn(`Sentry responded with status code ${u.statusCode} to sent event.`), r =
|
|
2467
|
+
), l("send_error"), u) : (_ && u.statusCode !== void 0 && (u.statusCode < 200 || u.statusCode >= 300) && m.warn(`Sentry responded with status code ${u.statusCode} to sent event.`), r = _a(r, u), u),
|
|
2457
2468
|
(u) => {
|
|
2458
2469
|
throw l("network_error"), _ && m.error("Encountered error running transport request:", u), u;
|
|
2459
2470
|
}
|
|
@@ -2472,7 +2483,7 @@ function _a(t, e, n = sn(
|
|
|
2472
2483
|
flush: s
|
|
2473
2484
|
};
|
|
2474
2485
|
}
|
|
2475
|
-
function
|
|
2486
|
+
function Ea(t, e, n) {
|
|
2476
2487
|
const r = [
|
|
2477
2488
|
{ type: "client_report" },
|
|
2478
2489
|
{
|
|
@@ -2482,7 +2493,7 @@ function ya(t, e, n) {
|
|
|
2482
2493
|
];
|
|
2483
2494
|
return be(e ? { dsn: e } : {}, [r]);
|
|
2484
2495
|
}
|
|
2485
|
-
function
|
|
2496
|
+
function us(t) {
|
|
2486
2497
|
const e = [];
|
|
2487
2498
|
t.message && e.push(t.message);
|
|
2488
2499
|
try {
|
|
@@ -2492,7 +2503,7 @@ function ls(t) {
|
|
|
2492
2503
|
}
|
|
2493
2504
|
return e;
|
|
2494
2505
|
}
|
|
2495
|
-
function
|
|
2506
|
+
function ba(t) {
|
|
2496
2507
|
const { trace_id: e, parent_span_id: n, span_id: r, status: s, origin: i, data: o, op: a } = t.contexts?.trace ?? {};
|
|
2497
2508
|
return {
|
|
2498
2509
|
data: o ?? {},
|
|
@@ -2505,13 +2516,13 @@ function Ea(t) {
|
|
|
2505
2516
|
timestamp: t.timestamp,
|
|
2506
2517
|
trace_id: e ?? "",
|
|
2507
2518
|
origin: i,
|
|
2508
|
-
profile_id: o?.[
|
|
2509
|
-
exclusive_time: o?.[
|
|
2519
|
+
profile_id: o?.[qr],
|
|
2520
|
+
exclusive_time: o?.[Gr],
|
|
2510
2521
|
measurements: t.measurements,
|
|
2511
2522
|
is_segment: !0
|
|
2512
2523
|
};
|
|
2513
2524
|
}
|
|
2514
|
-
function
|
|
2525
|
+
function Sa(t) {
|
|
2515
2526
|
return {
|
|
2516
2527
|
type: "transaction",
|
|
2517
2528
|
timestamp: t.timestamp,
|
|
@@ -2527,48 +2538,48 @@ function ba(t) {
|
|
|
2527
2538
|
origin: t.origin,
|
|
2528
2539
|
data: {
|
|
2529
2540
|
...t.data,
|
|
2530
|
-
...t.profile_id && { [
|
|
2531
|
-
...t.exclusive_time && { [
|
|
2541
|
+
...t.profile_id && { [qr]: t.profile_id },
|
|
2542
|
+
...t.exclusive_time && { [Gr]: t.exclusive_time }
|
|
2532
2543
|
}
|
|
2533
2544
|
}
|
|
2534
2545
|
},
|
|
2535
2546
|
measurements: t.measurements
|
|
2536
2547
|
};
|
|
2537
2548
|
}
|
|
2538
|
-
const Yn = "Not capturing exception because it's already been captured.", Zn = "Discarded session because of missing or non-string release",
|
|
2549
|
+
const Yn = "Not capturing exception because it's already been captured.", Zn = "Discarded session because of missing or non-string release", ds = Symbol.for("SentryInternalError"), ps = Symbol.for("SentryDoNotSendEventError"), ka = 5e3;
|
|
2539
2550
|
function Ve(t) {
|
|
2540
2551
|
return {
|
|
2541
2552
|
message: t,
|
|
2542
|
-
[
|
|
2553
|
+
[ds]: !0
|
|
2543
2554
|
};
|
|
2544
2555
|
}
|
|
2545
2556
|
function bt(t) {
|
|
2546
2557
|
return {
|
|
2547
2558
|
message: t,
|
|
2548
|
-
[
|
|
2559
|
+
[ps]: !0
|
|
2549
2560
|
};
|
|
2550
2561
|
}
|
|
2551
2562
|
function Jn(t) {
|
|
2552
|
-
return !!t && typeof t == "object" &&
|
|
2563
|
+
return !!t && typeof t == "object" && ds in t;
|
|
2553
2564
|
}
|
|
2554
2565
|
function Qn(t) {
|
|
2555
|
-
return !!t && typeof t == "object" &&
|
|
2566
|
+
return !!t && typeof t == "object" && ps in t;
|
|
2556
2567
|
}
|
|
2557
2568
|
function er(t, e, n, r, s) {
|
|
2558
2569
|
let i = 0, o, a = !1;
|
|
2559
2570
|
t.on(n, () => {
|
|
2560
2571
|
i = 0, clearTimeout(o), a = !1;
|
|
2561
2572
|
}), t.on(e, (c) => {
|
|
2562
|
-
i += r(c), i >= 8e5 ? s(t) : a || (a = !0, o =
|
|
2573
|
+
i += r(c), i >= 8e5 ? s(t) : a || (a = !0, o = cs(
|
|
2563
2574
|
setTimeout(() => {
|
|
2564
2575
|
s(t);
|
|
2565
|
-
},
|
|
2576
|
+
}, ka)
|
|
2566
2577
|
));
|
|
2567
2578
|
}), t.on("flush", () => {
|
|
2568
2579
|
s(t);
|
|
2569
2580
|
});
|
|
2570
2581
|
}
|
|
2571
|
-
class
|
|
2582
|
+
class xa {
|
|
2572
2583
|
/** Options passed to the SDK. */
|
|
2573
2584
|
/** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
|
|
2574
2585
|
/** Array of set up integrations. */
|
|
@@ -2581,8 +2592,8 @@ class ka {
|
|
|
2581
2592
|
* @param options Options for the client.
|
|
2582
2593
|
*/
|
|
2583
2594
|
constructor(e) {
|
|
2584
|
-
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], this._promiseBuffer = sn(e.transportOptions?.bufferSize ??
|
|
2585
|
-
const r =
|
|
2595
|
+
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], this._promiseBuffer = sn(e.transportOptions?.bufferSize ?? ls), e.dsn ? this._dsn = to(e.dsn) : _ && m.warn("No DSN provided, client will not send events."), this._dsn) {
|
|
2596
|
+
const r = ra(
|
|
2586
2597
|
this._dsn,
|
|
2587
2598
|
e.tunnel,
|
|
2588
2599
|
e._metadata ? e._metadata.sdk : void 0
|
|
@@ -2594,12 +2605,12 @@ class ka {
|
|
|
2594
2605
|
url: r
|
|
2595
2606
|
});
|
|
2596
2607
|
}
|
|
2597
|
-
this._options.enableLogs = this._options.enableLogs ?? this._options._experiments?.enableLogs, this._options.enableLogs && er(this, "afterCaptureLog", "flushLogs",
|
|
2608
|
+
this._options.enableLogs = this._options.enableLogs ?? this._options._experiments?.enableLogs, this._options.enableLogs && er(this, "afterCaptureLog", "flushLogs", va, $t), (this._options.enableMetrics ?? this._options._experiments?.enableMetrics ?? !0) && er(
|
|
2598
2609
|
this,
|
|
2599
2610
|
"afterCaptureMetric",
|
|
2600
2611
|
"flushMetrics",
|
|
2601
|
-
|
|
2602
|
-
|
|
2612
|
+
Ta,
|
|
2613
|
+
os
|
|
2603
2614
|
);
|
|
2604
2615
|
}
|
|
2605
2616
|
/**
|
|
@@ -2766,16 +2777,16 @@ class ka {
|
|
|
2766
2777
|
*/
|
|
2767
2778
|
addIntegration(e) {
|
|
2768
2779
|
const n = this._integrations[e.name];
|
|
2769
|
-
|
|
2780
|
+
ss(this, e, this._integrations), n || Kn(this, [e]);
|
|
2770
2781
|
}
|
|
2771
2782
|
/**
|
|
2772
2783
|
* Send a fully prepared event to Sentry.
|
|
2773
2784
|
*/
|
|
2774
2785
|
sendEvent(e, n = {}) {
|
|
2775
2786
|
this.emit("beforeSendEvent", e, n);
|
|
2776
|
-
let r =
|
|
2787
|
+
let r = Do(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
2777
2788
|
for (const s of n.attachments || [])
|
|
2778
|
-
r =
|
|
2789
|
+
r = ko(r, To(s));
|
|
2779
2790
|
this.sendEnvelope(r).then((s) => this.emit("afterSendEvent", e, s));
|
|
2780
2791
|
}
|
|
2781
2792
|
/**
|
|
@@ -2798,7 +2809,7 @@ class ka {
|
|
|
2798
2809
|
e.release = e.release || n, e.environment = e.environment || r;
|
|
2799
2810
|
}
|
|
2800
2811
|
this.emit("beforeSendSession", e);
|
|
2801
|
-
const s =
|
|
2812
|
+
const s = Ao(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
2802
2813
|
this.sendEnvelope(s);
|
|
2803
2814
|
}
|
|
2804
2815
|
/**
|
|
@@ -2858,7 +2869,7 @@ class ka {
|
|
|
2858
2869
|
/** Setup integrations for this client. */
|
|
2859
2870
|
_setupIntegrations() {
|
|
2860
2871
|
const { integrations: e } = this._options;
|
|
2861
|
-
this._integrations =
|
|
2872
|
+
this._integrations = oa(this, e), Kn(this, e);
|
|
2862
2873
|
}
|
|
2863
2874
|
/** Updates existing session based on the provided event */
|
|
2864
2875
|
_updateSessionFromEvent(e, n) {
|
|
@@ -2917,14 +2928,14 @@ class ka {
|
|
|
2917
2928
|
*/
|
|
2918
2929
|
_prepareEvent(e, n, r, s) {
|
|
2919
2930
|
const i = this.getOptions(), o = Object.keys(this._integrations);
|
|
2920
|
-
return !n.integrations && o?.length && (n.integrations = o), this.emit("preprocessEvent", e, n), e.type || s.setLastEventId(e.event_id || n.event_id),
|
|
2931
|
+
return !n.integrations && o?.length && (n.integrations = o), this.emit("preprocessEvent", e, n), e.type || s.setLastEventId(e.event_id || n.event_id), Bo(i, e, n, r, this, s).then((a) => {
|
|
2921
2932
|
if (a === null)
|
|
2922
2933
|
return a;
|
|
2923
2934
|
this.emit("postprocessEvent", a, n), a.contexts = {
|
|
2924
|
-
trace: { ...a.contexts?.trace, ...
|
|
2935
|
+
trace: { ...a.contexts?.trace, ...Ni(r) },
|
|
2925
2936
|
...a.contexts
|
|
2926
2937
|
};
|
|
2927
|
-
const c =
|
|
2938
|
+
const c = go(this, r);
|
|
2928
2939
|
return a.sdkProcessingMetadata = {
|
|
2929
2940
|
dynamicSamplingContext: c,
|
|
2930
2941
|
...a.sdkProcessingMetadata
|
|
@@ -2938,7 +2949,7 @@ class ka {
|
|
|
2938
2949
|
* @param scope
|
|
2939
2950
|
*/
|
|
2940
2951
|
_captureEvent(e, n = {}, r = H(), s = J()) {
|
|
2941
|
-
return _ && Pt(e) && m.log(`Captured error event \`${
|
|
2952
|
+
return _ && Pt(e) && m.log(`Captured error event \`${us(e)[0] || "<unknown>"}\``), this._processEvent(e, n, r, s).then(
|
|
2942
2953
|
(i) => i.event_id,
|
|
2943
2954
|
(i) => {
|
|
2944
2955
|
_ && (Qn(i) ? m.log(i.message) : Jn(i) ? m.warn(i.message) : m.warn(i));
|
|
@@ -2959,7 +2970,7 @@ class ka {
|
|
|
2959
2970
|
* @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
|
|
2960
2971
|
*/
|
|
2961
2972
|
_processEvent(e, n, r, s) {
|
|
2962
|
-
const i = this.getOptions(), { sampleRate: o } = i, a =
|
|
2973
|
+
const i = this.getOptions(), { sampleRate: o } = i, a = hs(e), c = Pt(e), d = `before send for type \`${e.type || "error"}\``, u = typeof o > "u" ? void 0 : no(o);
|
|
2963
2974
|
if (c && typeof u == "number" && Ze() > u)
|
|
2964
2975
|
return this.recordDroppedEvent("sample_rate", "error"), nn(
|
|
2965
2976
|
bt(
|
|
@@ -2972,8 +2983,8 @@ class ka {
|
|
|
2972
2983
|
throw this.recordDroppedEvent("event_processor", p), bt("An event processor returned `null`, will not send event.");
|
|
2973
2984
|
if (n.data && n.data.__sentry__ === !0)
|
|
2974
2985
|
return h;
|
|
2975
|
-
const k =
|
|
2976
|
-
return
|
|
2986
|
+
const k = wa(this, i, h, n);
|
|
2987
|
+
return Ra(k, d);
|
|
2977
2988
|
}).then((h) => {
|
|
2978
2989
|
if (h === null) {
|
|
2979
2990
|
if (this.recordDroppedEvent("before_send", p), a) {
|
|
@@ -3050,7 +3061,7 @@ Reason: ${h}`
|
|
|
3050
3061
|
return;
|
|
3051
3062
|
}
|
|
3052
3063
|
_ && m.log("Sending outcomes:", e);
|
|
3053
|
-
const n =
|
|
3064
|
+
const n = Ea(e, this._options.tunnel && $e(this._dsn));
|
|
3054
3065
|
this.sendEnvelope(n);
|
|
3055
3066
|
}
|
|
3056
3067
|
/**
|
|
@@ -3060,7 +3071,7 @@ Reason: ${h}`
|
|
|
3060
3071
|
function tr(t) {
|
|
3061
3072
|
return t === "replay_event" ? "replay" : t || "error";
|
|
3062
3073
|
}
|
|
3063
|
-
function
|
|
3074
|
+
function Ra(t, e) {
|
|
3064
3075
|
const n = `${e} must return \`null\` or a valid event.`;
|
|
3065
3076
|
if (De(t))
|
|
3066
3077
|
return t.then(
|
|
@@ -3077,25 +3088,25 @@ function xa(t, e) {
|
|
|
3077
3088
|
throw Ve(n);
|
|
3078
3089
|
return t;
|
|
3079
3090
|
}
|
|
3080
|
-
function
|
|
3091
|
+
function wa(t, e, n, r) {
|
|
3081
3092
|
const { beforeSend: s, beforeSendTransaction: i, beforeSendSpan: o, ignoreSpans: a } = e;
|
|
3082
3093
|
let c = n;
|
|
3083
3094
|
if (Pt(c) && s)
|
|
3084
3095
|
return s(c, r);
|
|
3085
|
-
if (
|
|
3096
|
+
if (hs(c)) {
|
|
3086
3097
|
if (o || a) {
|
|
3087
|
-
const l =
|
|
3098
|
+
const l = ba(c);
|
|
3088
3099
|
if (a?.length && Bn(l, a))
|
|
3089
3100
|
return null;
|
|
3090
3101
|
if (o) {
|
|
3091
3102
|
const d = o(l);
|
|
3092
|
-
d ? c = Oe(n,
|
|
3103
|
+
d ? c = Oe(n, Sa(d)) : Fn();
|
|
3093
3104
|
}
|
|
3094
3105
|
if (c.spans) {
|
|
3095
3106
|
const d = [], u = c.spans;
|
|
3096
3107
|
for (const h of u) {
|
|
3097
3108
|
if (a?.length && Bn(h, a)) {
|
|
3098
|
-
|
|
3109
|
+
po(u, h);
|
|
3099
3110
|
continue;
|
|
3100
3111
|
}
|
|
3101
3112
|
if (o) {
|
|
@@ -3124,18 +3135,18 @@ function Ra(t, e, n, r) {
|
|
|
3124
3135
|
function Pt(t) {
|
|
3125
3136
|
return t.type === void 0;
|
|
3126
3137
|
}
|
|
3127
|
-
function
|
|
3138
|
+
function hs(t) {
|
|
3128
3139
|
return t.type === "transaction";
|
|
3129
3140
|
}
|
|
3130
|
-
function
|
|
3141
|
+
function Ta(t) {
|
|
3131
3142
|
let e = 0;
|
|
3132
|
-
return t.name && (e += t.name.length * 2), e += 8, e +
|
|
3143
|
+
return t.name && (e += t.name.length * 2), e += 8, e + fs(t.attributes);
|
|
3133
3144
|
}
|
|
3134
|
-
function
|
|
3145
|
+
function va(t) {
|
|
3135
3146
|
let e = 0;
|
|
3136
|
-
return t.message && (e += t.message.length * 2), e +
|
|
3147
|
+
return t.message && (e += t.message.length * 2), e + fs(t.attributes);
|
|
3137
3148
|
}
|
|
3138
|
-
function
|
|
3149
|
+
function fs(t) {
|
|
3139
3150
|
if (!t)
|
|
3140
3151
|
return 0;
|
|
3141
3152
|
let e = 0;
|
|
@@ -3146,20 +3157,20 @@ function hs(t) {
|
|
|
3146
3157
|
function nr(t) {
|
|
3147
3158
|
return typeof t == "string" ? t.length * 2 : typeof t == "number" ? 8 : typeof t == "boolean" ? 4 : 0;
|
|
3148
3159
|
}
|
|
3149
|
-
function
|
|
3160
|
+
function Ia(t) {
|
|
3150
3161
|
return st(t) && "__sentry_fetch_url_host__" in t && typeof t.__sentry_fetch_url_host__ == "string";
|
|
3151
3162
|
}
|
|
3152
3163
|
function rr(t) {
|
|
3153
|
-
return
|
|
3164
|
+
return Ia(t) ? `${t.message} (${t.__sentry_fetch_url_host__})` : t.message;
|
|
3154
3165
|
}
|
|
3155
|
-
function
|
|
3166
|
+
function Ca(t, e) {
|
|
3156
3167
|
e.debug === !0 && (_ ? m.enable() : ye(() => {
|
|
3157
3168
|
console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
|
|
3158
3169
|
})), H().update(e.initialScope);
|
|
3159
3170
|
const r = new t(e);
|
|
3160
|
-
return
|
|
3171
|
+
return Aa(r), r.init(), r;
|
|
3161
3172
|
}
|
|
3162
|
-
function
|
|
3173
|
+
function Aa(t) {
|
|
3163
3174
|
H().setClient(t);
|
|
3164
3175
|
}
|
|
3165
3176
|
function St(t) {
|
|
@@ -3179,7 +3190,7 @@ function St(t) {
|
|
|
3179
3190
|
// everything minus origin
|
|
3180
3191
|
};
|
|
3181
3192
|
}
|
|
3182
|
-
function
|
|
3193
|
+
function Da(t, e = !0) {
|
|
3183
3194
|
if (t.startsWith("data:")) {
|
|
3184
3195
|
const n = t.match(/^data:([^;,]+)/), r = n ? n[1] : "text/plain", s = t.includes(";base64,"), i = t.indexOf(",");
|
|
3185
3196
|
let o = "";
|
|
@@ -3191,31 +3202,31 @@ function Aa(t, e = !0) {
|
|
|
3191
3202
|
}
|
|
3192
3203
|
return t;
|
|
3193
3204
|
}
|
|
3194
|
-
function
|
|
3205
|
+
function Na(t) {
|
|
3195
3206
|
"aggregates" in t ? t.attrs?.ip_address === void 0 && (t.attrs = {
|
|
3196
3207
|
...t.attrs,
|
|
3197
3208
|
ip_address: "{{auto}}"
|
|
3198
3209
|
}) : t.ipAddress === void 0 && (t.ipAddress = "{{auto}}");
|
|
3199
3210
|
}
|
|
3200
|
-
function
|
|
3211
|
+
function Oa(t, e, n = [e], r = "npm") {
|
|
3201
3212
|
const s = (t._metadata = t._metadata || {}).sdk = t._metadata.sdk || {};
|
|
3202
3213
|
s.name || (s.name = `sentry.javascript.${e}`, s.packages = n.map((i) => ({
|
|
3203
3214
|
name: `${r}:@sentry/${i}`,
|
|
3204
3215
|
version: ie
|
|
3205
3216
|
})), s.version = ie);
|
|
3206
3217
|
}
|
|
3207
|
-
const
|
|
3218
|
+
const $a = 100;
|
|
3208
3219
|
function Z(t, e) {
|
|
3209
3220
|
const n = C(), r = J();
|
|
3210
3221
|
if (!n) return;
|
|
3211
|
-
const { beforeBreadcrumb: s = null, maxBreadcrumbs: i =
|
|
3222
|
+
const { beforeBreadcrumb: s = null, maxBreadcrumbs: i = $a } = n.getOptions();
|
|
3212
3223
|
if (i <= 0) return;
|
|
3213
3224
|
const a = { timestamp: Ne(), ...t }, c = s ? ye(() => s(a, e)) : a;
|
|
3214
3225
|
c !== null && (n.emit && n.emit("beforeAddBreadcrumb", c, e), r.addBreadcrumb(c, i));
|
|
3215
3226
|
}
|
|
3216
3227
|
let sr;
|
|
3217
|
-
const
|
|
3218
|
-
name:
|
|
3228
|
+
const Pa = "FunctionToString", ir = /* @__PURE__ */ new WeakMap(), La = (() => ({
|
|
3229
|
+
name: Pa,
|
|
3219
3230
|
setupOnce() {
|
|
3220
3231
|
sr = Function.prototype.toString;
|
|
3221
3232
|
try {
|
|
@@ -3229,7 +3240,7 @@ const $a = "FunctionToString", ir = /* @__PURE__ */ new WeakMap(), Pa = (() => (
|
|
|
3229
3240
|
setup(t) {
|
|
3230
3241
|
ir.set(t, !0);
|
|
3231
3242
|
}
|
|
3232
|
-
})),
|
|
3243
|
+
})), Ma = La, Fa = [
|
|
3233
3244
|
/^Script error\.?$/,
|
|
3234
3245
|
/^Javascript error: Script error\.? on line 0$/,
|
|
3235
3246
|
/^ResizeObserver loop completed with undelivered notifications.$/,
|
|
@@ -3250,10 +3261,10 @@ const $a = "FunctionToString", ir = /* @__PURE__ */ new WeakMap(), Pa = (() => (
|
|
|
3250
3261
|
// unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps
|
|
3251
3262
|
/^Java exception was raised during method invocation$/
|
|
3252
3263
|
// error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065)
|
|
3253
|
-
],
|
|
3264
|
+
], Ua = "EventFilters", Ba = (t = {}) => {
|
|
3254
3265
|
let e;
|
|
3255
3266
|
return {
|
|
3256
|
-
name:
|
|
3267
|
+
name: Ua,
|
|
3257
3268
|
setup(n) {
|
|
3258
3269
|
const r = n.getOptions();
|
|
3259
3270
|
e = or(t, r);
|
|
@@ -3263,11 +3274,11 @@ const $a = "FunctionToString", ir = /* @__PURE__ */ new WeakMap(), Pa = (() => (
|
|
|
3263
3274
|
const i = s.getOptions();
|
|
3264
3275
|
e = or(t, i);
|
|
3265
3276
|
}
|
|
3266
|
-
return
|
|
3277
|
+
return za(n, e) ? null : n;
|
|
3267
3278
|
}
|
|
3268
3279
|
};
|
|
3269
|
-
},
|
|
3270
|
-
...
|
|
3280
|
+
}, Ha = ((t = {}) => ({
|
|
3281
|
+
...Ba(t),
|
|
3271
3282
|
name: "InboundFilters"
|
|
3272
3283
|
}));
|
|
3273
3284
|
function or(t = {}, e = {}) {
|
|
@@ -3277,32 +3288,32 @@ function or(t = {}, e = {}) {
|
|
|
3277
3288
|
ignoreErrors: [
|
|
3278
3289
|
...t.ignoreErrors || [],
|
|
3279
3290
|
...e.ignoreErrors || [],
|
|
3280
|
-
...t.disableErrorDefaults ? [] :
|
|
3291
|
+
...t.disableErrorDefaults ? [] : Fa
|
|
3281
3292
|
],
|
|
3282
3293
|
ignoreTransactions: [...t.ignoreTransactions || [], ...e.ignoreTransactions || []]
|
|
3283
3294
|
};
|
|
3284
3295
|
}
|
|
3285
|
-
function
|
|
3296
|
+
function za(t, e) {
|
|
3286
3297
|
if (t.type) {
|
|
3287
|
-
if (t.type === "transaction" &&
|
|
3298
|
+
if (t.type === "transaction" && qa(t, e.ignoreTransactions))
|
|
3288
3299
|
return _ && m.warn(
|
|
3289
3300
|
`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
3290
3301
|
Event: ${re(t)}`
|
|
3291
3302
|
), !0;
|
|
3292
3303
|
} else {
|
|
3293
|
-
if (
|
|
3304
|
+
if (ja(t, e.ignoreErrors))
|
|
3294
3305
|
return _ && m.warn(
|
|
3295
3306
|
`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
3296
3307
|
Event: ${re(t)}`
|
|
3297
3308
|
), !0;
|
|
3298
|
-
if (
|
|
3309
|
+
if (Xa(t))
|
|
3299
3310
|
return _ && m.warn(
|
|
3300
3311
|
`Event dropped due to not having an error message, error type or stacktrace.
|
|
3301
3312
|
Event: ${re(
|
|
3302
3313
|
t
|
|
3303
3314
|
)}`
|
|
3304
3315
|
), !0;
|
|
3305
|
-
if (
|
|
3316
|
+
if (Ga(t, e.denyUrls))
|
|
3306
3317
|
return _ && m.warn(
|
|
3307
3318
|
`Event dropped due to being matched by \`denyUrls\` option.
|
|
3308
3319
|
Event: ${re(
|
|
@@ -3310,7 +3321,7 @@ Event: ${re(
|
|
|
3310
3321
|
)}.
|
|
3311
3322
|
Url: ${Je(t)}`
|
|
3312
3323
|
), !0;
|
|
3313
|
-
if (!
|
|
3324
|
+
if (!Va(t, e.allowUrls))
|
|
3314
3325
|
return _ && m.warn(
|
|
3315
3326
|
`Event dropped due to not being matched by \`allowUrls\` option.
|
|
3316
3327
|
Event: ${re(
|
|
@@ -3321,28 +3332,28 @@ Url: ${Je(t)}`
|
|
|
3321
3332
|
}
|
|
3322
3333
|
return !1;
|
|
3323
3334
|
}
|
|
3324
|
-
function za(t, e) {
|
|
3325
|
-
return e?.length ? ls(t).some((n) => lt(n, e)) : !1;
|
|
3326
|
-
}
|
|
3327
3335
|
function ja(t, e) {
|
|
3336
|
+
return e?.length ? us(t).some((n) => lt(n, e)) : !1;
|
|
3337
|
+
}
|
|
3338
|
+
function qa(t, e) {
|
|
3328
3339
|
if (!e?.length)
|
|
3329
3340
|
return !1;
|
|
3330
3341
|
const n = t.transaction;
|
|
3331
3342
|
return n ? lt(n, e) : !1;
|
|
3332
3343
|
}
|
|
3333
|
-
function
|
|
3344
|
+
function Ga(t, e) {
|
|
3334
3345
|
if (!e?.length)
|
|
3335
3346
|
return !1;
|
|
3336
3347
|
const n = Je(t);
|
|
3337
3348
|
return n ? lt(n, e) : !1;
|
|
3338
3349
|
}
|
|
3339
|
-
function
|
|
3350
|
+
function Va(t, e) {
|
|
3340
3351
|
if (!e?.length)
|
|
3341
3352
|
return !0;
|
|
3342
3353
|
const n = Je(t);
|
|
3343
3354
|
return n ? lt(n, e) : !0;
|
|
3344
3355
|
}
|
|
3345
|
-
function
|
|
3356
|
+
function Wa(t = []) {
|
|
3346
3357
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
3347
3358
|
const n = t[e];
|
|
3348
3359
|
if (n && n.filename !== "<anonymous>" && n.filename !== "[native code]")
|
|
@@ -3353,19 +3364,19 @@ function Va(t = []) {
|
|
|
3353
3364
|
function Je(t) {
|
|
3354
3365
|
try {
|
|
3355
3366
|
const n = [...t.exception?.values ?? []].reverse().find((r) => r.mechanism?.parent_id === void 0 && r.stacktrace?.frames?.length)?.stacktrace?.frames;
|
|
3356
|
-
return n ?
|
|
3367
|
+
return n ? Wa(n) : null;
|
|
3357
3368
|
} catch {
|
|
3358
3369
|
return _ && m.error(`Cannot extract url for event ${re(t)}`), null;
|
|
3359
3370
|
}
|
|
3360
3371
|
}
|
|
3361
|
-
function
|
|
3372
|
+
function Xa(t) {
|
|
3362
3373
|
return t.exception?.values?.length ? (
|
|
3363
3374
|
// No top-level message
|
|
3364
3375
|
!t.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value
|
|
3365
3376
|
!t.exception.values.some((e) => e.stacktrace || e.type && e.type !== "Error" || e.value)
|
|
3366
3377
|
) : !1;
|
|
3367
3378
|
}
|
|
3368
|
-
function
|
|
3379
|
+
function Ka(t, e, n, r, s, i) {
|
|
3369
3380
|
if (!s.exception?.values || !i || !K(i.originalException, Error))
|
|
3370
3381
|
return;
|
|
3371
3382
|
const o = s.exception.values.length > 0 ? s.exception.values[s.exception.values.length - 1] : void 0;
|
|
@@ -3398,7 +3409,7 @@ function Lt(t, e, n, r, s, i, o, a) {
|
|
|
3398
3409
|
d
|
|
3399
3410
|
);
|
|
3400
3411
|
}
|
|
3401
|
-
return
|
|
3412
|
+
return gs(r) && r.errors.forEach((l, d) => {
|
|
3402
3413
|
if (K(l, Error)) {
|
|
3403
3414
|
ar(o, a, r);
|
|
3404
3415
|
const u = t(e, l), p = c.length;
|
|
@@ -3415,14 +3426,14 @@ function Lt(t, e, n, r, s, i, o, a) {
|
|
|
3415
3426
|
}
|
|
3416
3427
|
}), c;
|
|
3417
3428
|
}
|
|
3418
|
-
function
|
|
3429
|
+
function gs(t) {
|
|
3419
3430
|
return Array.isArray(t.errors);
|
|
3420
3431
|
}
|
|
3421
3432
|
function ar(t, e, n) {
|
|
3422
3433
|
t.mechanism = {
|
|
3423
3434
|
handled: !0,
|
|
3424
3435
|
type: "auto.core.linked_errors",
|
|
3425
|
-
...
|
|
3436
|
+
...gs(n) && { is_exception_group: !0 },
|
|
3426
3437
|
...t.mechanism,
|
|
3427
3438
|
exception_id: e
|
|
3428
3439
|
};
|
|
@@ -3437,12 +3448,12 @@ function cr(t, e, n, r) {
|
|
|
3437
3448
|
parent_id: r
|
|
3438
3449
|
};
|
|
3439
3450
|
}
|
|
3440
|
-
function
|
|
3451
|
+
function Ya(t) {
|
|
3441
3452
|
const e = "console";
|
|
3442
|
-
ce(e, t), le(e,
|
|
3453
|
+
ce(e, t), le(e, Za);
|
|
3443
3454
|
}
|
|
3444
|
-
function
|
|
3445
|
-
"console" in R &&
|
|
3455
|
+
function Za() {
|
|
3456
|
+
"console" in R && Ks.forEach(function(t) {
|
|
3446
3457
|
t in R.console && $(R.console, t, function(e) {
|
|
3447
3458
|
return Ye[t] = e, function(...n) {
|
|
3448
3459
|
F("console", { args: n, level: t }), Ye[t]?.apply(R.console, n);
|
|
@@ -3450,37 +3461,37 @@ function Ya() {
|
|
|
3450
3461
|
});
|
|
3451
3462
|
});
|
|
3452
3463
|
}
|
|
3453
|
-
function
|
|
3464
|
+
function Ja(t) {
|
|
3454
3465
|
return t === "warn" ? "warning" : ["fatal", "error", "warning", "log", "info", "debug"].includes(t) ? t : "log";
|
|
3455
3466
|
}
|
|
3456
|
-
const
|
|
3467
|
+
const Qa = "Dedupe", ec = (() => {
|
|
3457
3468
|
let t;
|
|
3458
3469
|
return {
|
|
3459
|
-
name:
|
|
3470
|
+
name: Qa,
|
|
3460
3471
|
processEvent(e) {
|
|
3461
3472
|
if (e.type)
|
|
3462
3473
|
return e;
|
|
3463
3474
|
try {
|
|
3464
|
-
if (
|
|
3475
|
+
if (nc(e, t))
|
|
3465
3476
|
return _ && m.warn("Event dropped due to being a duplicate of previously captured event."), null;
|
|
3466
3477
|
} catch {
|
|
3467
3478
|
}
|
|
3468
3479
|
return t = e;
|
|
3469
3480
|
}
|
|
3470
3481
|
};
|
|
3471
|
-
}),
|
|
3472
|
-
function tc(t, e) {
|
|
3473
|
-
return e ? !!(nc(t, e) || rc(t, e)) : !1;
|
|
3474
|
-
}
|
|
3482
|
+
}), tc = ec;
|
|
3475
3483
|
function nc(t, e) {
|
|
3476
|
-
|
|
3477
|
-
return !(!n && !r || n && !r || !n && r || n !== r || !ms(t, e) || !gs(t, e));
|
|
3484
|
+
return e ? !!(rc(t, e) || sc(t, e)) : !1;
|
|
3478
3485
|
}
|
|
3479
3486
|
function rc(t, e) {
|
|
3487
|
+
const n = t.message, r = e.message;
|
|
3488
|
+
return !(!n && !r || n && !r || !n && r || n !== r || !_s(t, e) || !ms(t, e));
|
|
3489
|
+
}
|
|
3490
|
+
function sc(t, e) {
|
|
3480
3491
|
const n = lr(e), r = lr(t);
|
|
3481
|
-
return !(!n || !r || n.type !== r.type || n.value !== r.value || !
|
|
3492
|
+
return !(!n || !r || n.type !== r.type || n.value !== r.value || !_s(t, e) || !ms(t, e));
|
|
3482
3493
|
}
|
|
3483
|
-
function
|
|
3494
|
+
function ms(t, e) {
|
|
3484
3495
|
let n = kn(t), r = kn(e);
|
|
3485
3496
|
if (!n && !r)
|
|
3486
3497
|
return !0;
|
|
@@ -3493,7 +3504,7 @@ function gs(t, e) {
|
|
|
3493
3504
|
}
|
|
3494
3505
|
return !0;
|
|
3495
3506
|
}
|
|
3496
|
-
function
|
|
3507
|
+
function _s(t, e) {
|
|
3497
3508
|
let n = t.fingerprint, r = e.fingerprint;
|
|
3498
3509
|
if (!n && !r)
|
|
3499
3510
|
return !0;
|
|
@@ -3509,24 +3520,24 @@ function ms(t, e) {
|
|
|
3509
3520
|
function lr(t) {
|
|
3510
3521
|
return t.exception?.values?.[0];
|
|
3511
3522
|
}
|
|
3512
|
-
const
|
|
3513
|
-
name:
|
|
3523
|
+
const ic = "ConversationId", oc = (() => ({
|
|
3524
|
+
name: ic,
|
|
3514
3525
|
setup(t) {
|
|
3515
3526
|
t.on("spanStart", (e) => {
|
|
3516
3527
|
const n = H().getScopeData(), r = J().getScopeData(), s = n.conversationId || r.conversationId;
|
|
3517
|
-
s && e.setAttribute(
|
|
3528
|
+
s && e.setAttribute(Fi, s);
|
|
3518
3529
|
});
|
|
3519
3530
|
}
|
|
3520
|
-
})),
|
|
3521
|
-
function
|
|
3531
|
+
})), ac = oc;
|
|
3532
|
+
function ys(t) {
|
|
3522
3533
|
if (t !== void 0)
|
|
3523
3534
|
return t >= 400 && t < 500 ? "warning" : t >= 500 ? "error" : void 0;
|
|
3524
3535
|
}
|
|
3525
3536
|
const Ae = R;
|
|
3526
|
-
function
|
|
3537
|
+
function cc() {
|
|
3527
3538
|
return "history" in Ae && !!Ae.history;
|
|
3528
3539
|
}
|
|
3529
|
-
function
|
|
3540
|
+
function lc() {
|
|
3530
3541
|
if (!("fetch" in Ae))
|
|
3531
3542
|
return !1;
|
|
3532
3543
|
try {
|
|
@@ -3538,10 +3549,10 @@ function cc() {
|
|
|
3538
3549
|
function Mt(t) {
|
|
3539
3550
|
return t && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString());
|
|
3540
3551
|
}
|
|
3541
|
-
function
|
|
3552
|
+
function uc() {
|
|
3542
3553
|
if (typeof EdgeRuntime == "string")
|
|
3543
3554
|
return !0;
|
|
3544
|
-
if (!
|
|
3555
|
+
if (!lc())
|
|
3545
3556
|
return !1;
|
|
3546
3557
|
if (Mt(Ae.fetch))
|
|
3547
3558
|
return !0;
|
|
@@ -3556,14 +3567,14 @@ function lc() {
|
|
|
3556
3567
|
}
|
|
3557
3568
|
return t;
|
|
3558
3569
|
}
|
|
3559
|
-
function
|
|
3570
|
+
function dc(t, e) {
|
|
3560
3571
|
const n = "fetch";
|
|
3561
|
-
ce(n, t), le(n, () =>
|
|
3572
|
+
ce(n, t), le(n, () => pc(void 0, e));
|
|
3562
3573
|
}
|
|
3563
|
-
function
|
|
3564
|
-
e && !
|
|
3574
|
+
function pc(t, e = !1) {
|
|
3575
|
+
e && !uc() || $(R, "fetch", function(n) {
|
|
3565
3576
|
return function(...r) {
|
|
3566
|
-
const s = new Error(), { method: i, url: o } =
|
|
3577
|
+
const s = new Error(), { method: i, url: o } = hc(r), a = {
|
|
3567
3578
|
args: r,
|
|
3568
3579
|
fetchData: {
|
|
3569
3580
|
method: i,
|
|
@@ -3572,7 +3583,7 @@ function dc(t, e = !1) {
|
|
|
3572
3583
|
startTimestamp: q() * 1e3,
|
|
3573
3584
|
// // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation
|
|
3574
3585
|
virtualError: s,
|
|
3575
|
-
headers:
|
|
3586
|
+
headers: fc(r)
|
|
3576
3587
|
};
|
|
3577
3588
|
return F("fetch", {
|
|
3578
3589
|
...a
|
|
@@ -3607,7 +3618,7 @@ function We(t, e) {
|
|
|
3607
3618
|
function ur(t) {
|
|
3608
3619
|
return typeof t == "string" ? t : t ? We(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
|
|
3609
3620
|
}
|
|
3610
|
-
function
|
|
3621
|
+
function hc(t) {
|
|
3611
3622
|
if (t.length === 0)
|
|
3612
3623
|
return { method: "GET", url: "" };
|
|
3613
3624
|
if (t.length === 2) {
|
|
@@ -3616,7 +3627,7 @@ function pc(t) {
|
|
|
3616
3627
|
url: ur(n),
|
|
3617
3628
|
method: We(r, "method") ? String(r.method).toUpperCase() : (
|
|
3618
3629
|
// Request object as first argument
|
|
3619
|
-
|
|
3630
|
+
Mr(n) && We(n, "method") ? String(n.method).toUpperCase() : "GET"
|
|
3620
3631
|
)
|
|
3621
3632
|
};
|
|
3622
3633
|
}
|
|
@@ -3626,25 +3637,25 @@ function pc(t) {
|
|
|
3626
3637
|
method: We(e, "method") ? String(e.method).toUpperCase() : "GET"
|
|
3627
3638
|
};
|
|
3628
3639
|
}
|
|
3629
|
-
function
|
|
3640
|
+
function fc(t) {
|
|
3630
3641
|
const [e, n] = t;
|
|
3631
3642
|
try {
|
|
3632
3643
|
if (typeof n == "object" && n !== null && "headers" in n && n.headers)
|
|
3633
3644
|
return new Headers(n.headers);
|
|
3634
|
-
if (
|
|
3645
|
+
if (Mr(e))
|
|
3635
3646
|
return new Headers(e.headers);
|
|
3636
3647
|
} catch {
|
|
3637
3648
|
}
|
|
3638
3649
|
}
|
|
3639
|
-
function
|
|
3650
|
+
function gc() {
|
|
3640
3651
|
return "npm";
|
|
3641
3652
|
}
|
|
3642
3653
|
const T = R;
|
|
3643
3654
|
let Ft = 0;
|
|
3644
|
-
function
|
|
3655
|
+
function Es() {
|
|
3645
3656
|
return Ft > 0;
|
|
3646
3657
|
}
|
|
3647
|
-
function
|
|
3658
|
+
function mc() {
|
|
3648
3659
|
Ft++, setTimeout(() => {
|
|
3649
3660
|
Ft--;
|
|
3650
3661
|
});
|
|
@@ -3669,11 +3680,11 @@ function me(t, e = {}) {
|
|
|
3669
3680
|
const i = s.map((o) => me(o, e));
|
|
3670
3681
|
return t.apply(this, i);
|
|
3671
3682
|
} catch (i) {
|
|
3672
|
-
throw
|
|
3683
|
+
throw mc(), Di((o) => {
|
|
3673
3684
|
o.addEventProcessor((a) => (e.mechanism && (It(a, void 0), he(a, e.mechanism)), a.extra = {
|
|
3674
3685
|
...a.extra,
|
|
3675
3686
|
arguments: s
|
|
3676
|
-
}, a)),
|
|
3687
|
+
}, a)), es(i);
|
|
3677
3688
|
}), i;
|
|
3678
3689
|
}
|
|
3679
3690
|
};
|
|
@@ -3682,7 +3693,7 @@ function me(t, e = {}) {
|
|
|
3682
3693
|
Object.prototype.hasOwnProperty.call(t, s) && (r[s] = t[s]);
|
|
3683
3694
|
} catch {
|
|
3684
3695
|
}
|
|
3685
|
-
|
|
3696
|
+
Ur(r, t), Y(t, "__sentry_wrapped__", r);
|
|
3686
3697
|
try {
|
|
3687
3698
|
Object.getOwnPropertyDescriptor(r, "name").configurable && Object.defineProperty(r, "name", {
|
|
3688
3699
|
get() {
|
|
@@ -3693,7 +3704,7 @@ function me(t, e = {}) {
|
|
|
3693
3704
|
}
|
|
3694
3705
|
return r;
|
|
3695
3706
|
}
|
|
3696
|
-
function
|
|
3707
|
+
function _c() {
|
|
3697
3708
|
const t = Zt(), { referrer: e } = T.document || {}, { userAgent: n } = T.navigator || {}, r = {
|
|
3698
3709
|
...e && { Referer: e },
|
|
3699
3710
|
...n && { "User-Agent": n }
|
|
@@ -3705,14 +3716,14 @@ function mc() {
|
|
|
3705
3716
|
}
|
|
3706
3717
|
function on(t, e) {
|
|
3707
3718
|
const n = an(t, e), r = {
|
|
3708
|
-
type:
|
|
3709
|
-
value:
|
|
3719
|
+
type: kc(e),
|
|
3720
|
+
value: xc(e)
|
|
3710
3721
|
};
|
|
3711
3722
|
return n.length && (r.stacktrace = { frames: n }), r.type === void 0 && r.value === "" && (r.value = "Unrecoverable error caught"), r;
|
|
3712
3723
|
}
|
|
3713
|
-
function
|
|
3714
|
-
const i = C()?.getOptions().normalizeDepth, o =
|
|
3715
|
-
__serialized__:
|
|
3724
|
+
function yc(t, e, n, r) {
|
|
3725
|
+
const i = C()?.getOptions().normalizeDepth, o = Ic(e), a = {
|
|
3726
|
+
__serialized__: Zr(e, i)
|
|
3716
3727
|
};
|
|
3717
3728
|
if (o)
|
|
3718
3729
|
return {
|
|
@@ -3726,7 +3737,7 @@ function _c(t, e, n, r) {
|
|
|
3726
3737
|
values: [
|
|
3727
3738
|
{
|
|
3728
3739
|
type: ot(e) ? e.constructor.name : r ? "UnhandledRejection" : "Error",
|
|
3729
|
-
value:
|
|
3740
|
+
value: Tc(e, { isUnhandledRejection: r })
|
|
3730
3741
|
}
|
|
3731
3742
|
]
|
|
3732
3743
|
},
|
|
@@ -3746,44 +3757,44 @@ function kt(t, e) {
|
|
|
3746
3757
|
};
|
|
3747
3758
|
}
|
|
3748
3759
|
function an(t, e) {
|
|
3749
|
-
const n = e.stacktrace || e.stack || "", r =
|
|
3760
|
+
const n = e.stacktrace || e.stack || "", r = bc(e), s = Sc(e);
|
|
3750
3761
|
try {
|
|
3751
3762
|
return t(n, r, s);
|
|
3752
3763
|
} catch {
|
|
3753
3764
|
}
|
|
3754
3765
|
return [];
|
|
3755
3766
|
}
|
|
3756
|
-
const
|
|
3757
|
-
function Ec(t) {
|
|
3758
|
-
return t && yc.test(t.message) ? 1 : 0;
|
|
3759
|
-
}
|
|
3767
|
+
const Ec = /Minified React error #\d+;/i;
|
|
3760
3768
|
function bc(t) {
|
|
3769
|
+
return t && Ec.test(t.message) ? 1 : 0;
|
|
3770
|
+
}
|
|
3771
|
+
function Sc(t) {
|
|
3761
3772
|
return typeof t.framesToPop == "number" ? t.framesToPop : 0;
|
|
3762
3773
|
}
|
|
3763
|
-
function
|
|
3774
|
+
function bs(t) {
|
|
3764
3775
|
return typeof WebAssembly < "u" && typeof WebAssembly.Exception < "u" ? t instanceof WebAssembly.Exception : !1;
|
|
3765
3776
|
}
|
|
3766
|
-
function
|
|
3777
|
+
function kc(t) {
|
|
3767
3778
|
const e = t?.name;
|
|
3768
|
-
return !e &&
|
|
3779
|
+
return !e && bs(t) ? t.message && Array.isArray(t.message) && t.message.length == 2 ? t.message[0] : "WebAssembly.Exception" : e;
|
|
3769
3780
|
}
|
|
3770
|
-
function
|
|
3781
|
+
function xc(t) {
|
|
3771
3782
|
const e = t?.message;
|
|
3772
|
-
return
|
|
3783
|
+
return bs(t) ? Array.isArray(t.message) && t.message.length == 2 ? t.message[1] : "wasm exception" : e ? e.error && typeof e.error.message == "string" ? rr(e.error) : rr(t) : "No error message";
|
|
3773
3784
|
}
|
|
3774
|
-
function
|
|
3785
|
+
function Rc(t, e, n, r) {
|
|
3775
3786
|
const s = n?.syntheticException || void 0, i = cn(t, e, s, r);
|
|
3776
3787
|
return he(i), i.level = "error", n?.event_id && (i.event_id = n.event_id), Pe(i);
|
|
3777
3788
|
}
|
|
3778
|
-
function
|
|
3789
|
+
function wc(t, e, n = "info", r, s) {
|
|
3779
3790
|
const i = r?.syntheticException || void 0, o = Ut(t, e, i, s);
|
|
3780
3791
|
return o.level = n, r?.event_id && (o.event_id = r.event_id), Pe(o);
|
|
3781
3792
|
}
|
|
3782
3793
|
function cn(t, e, n, r, s) {
|
|
3783
3794
|
let i;
|
|
3784
|
-
if (
|
|
3795
|
+
if (Pr(e) && e.error)
|
|
3785
3796
|
return kt(t, e.error);
|
|
3786
|
-
if (Rn(e) ||
|
|
3797
|
+
if (Rn(e) || ci(e)) {
|
|
3787
3798
|
const o = e;
|
|
3788
3799
|
if ("stack" in e)
|
|
3789
3800
|
i = kt(t, e);
|
|
@@ -3793,7 +3804,7 @@ function cn(t, e, n, r, s) {
|
|
|
3793
3804
|
}
|
|
3794
3805
|
return "code" in o && (i.tags = { ...i.tags, "DOMException.code": `${o.code}` }), i;
|
|
3795
3806
|
}
|
|
3796
|
-
return st(e) ? kt(t, e) : Ie(e) || ot(e) ? (i =
|
|
3807
|
+
return st(e) ? kt(t, e) : Ie(e) || ot(e) ? (i = yc(t, e, n, s), he(i, {
|
|
3797
3808
|
synthetic: !0
|
|
3798
3809
|
}), i) : (i = Ut(t, e, n, r), It(i, `${e}`), he(i, {
|
|
3799
3810
|
synthetic: !0
|
|
@@ -3816,18 +3827,18 @@ function Ut(t, e, n, r) {
|
|
|
3816
3827
|
}
|
|
3817
3828
|
return s.message = e, s;
|
|
3818
3829
|
}
|
|
3819
|
-
function
|
|
3820
|
-
const n =
|
|
3821
|
-
return
|
|
3830
|
+
function Tc(t, { isUnhandledRejection: e }) {
|
|
3831
|
+
const n = gi(t), r = e ? "promise rejection" : "exception";
|
|
3832
|
+
return Pr(t) ? `Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\`` : ot(t) ? `Event \`${vc(t)}\` (type=${t.type}) captured as ${r}` : `Object captured as ${r} with keys: ${n}`;
|
|
3822
3833
|
}
|
|
3823
|
-
function
|
|
3834
|
+
function vc(t) {
|
|
3824
3835
|
try {
|
|
3825
3836
|
const e = Object.getPrototypeOf(t);
|
|
3826
3837
|
return e ? e.constructor.name : void 0;
|
|
3827
3838
|
} catch {
|
|
3828
3839
|
}
|
|
3829
3840
|
}
|
|
3830
|
-
function
|
|
3841
|
+
function Ic(t) {
|
|
3831
3842
|
for (const e in t)
|
|
3832
3843
|
if (Object.prototype.hasOwnProperty.call(t, e)) {
|
|
3833
3844
|
const n = t[e];
|
|
@@ -3835,15 +3846,15 @@ function vc(t) {
|
|
|
3835
3846
|
return n;
|
|
3836
3847
|
}
|
|
3837
3848
|
}
|
|
3838
|
-
class
|
|
3849
|
+
class Cc extends xa {
|
|
3839
3850
|
/**
|
|
3840
3851
|
* Creates a new Browser SDK instance.
|
|
3841
3852
|
*
|
|
3842
3853
|
* @param options Configuration options for this SDK.
|
|
3843
3854
|
*/
|
|
3844
3855
|
constructor(e) {
|
|
3845
|
-
const n =
|
|
3846
|
-
|
|
3856
|
+
const n = Ac(e), r = T.SENTRY_SDK_SOURCE || gc();
|
|
3857
|
+
Oa(n, "browser", ["browser"], r), n._metadata?.sdk && (n._metadata.sdk.settings = {
|
|
3847
3858
|
infer_ip: n.sendDefaultPii ? "auto" : "never",
|
|
3848
3859
|
// purposefully allowing already passed settings to override the default
|
|
3849
3860
|
...n._metadata.sdk.settings
|
|
@@ -3856,20 +3867,20 @@ class Ic extends ka {
|
|
|
3856
3867
|
enableMetrics: c
|
|
3857
3868
|
} = this._options, l = c ?? a?.enableMetrics ?? !0;
|
|
3858
3869
|
T.document && (i || o || l) && T.document.addEventListener("visibilitychange", () => {
|
|
3859
|
-
T.document.visibilityState === "hidden" && (i && this._flushOutcomes(), o && $t(this), l &&
|
|
3860
|
-
}), s && this.on("beforeSendSession",
|
|
3870
|
+
T.document.visibilityState === "hidden" && (i && this._flushOutcomes(), o && $t(this), l && os(this));
|
|
3871
|
+
}), s && this.on("beforeSendSession", Na);
|
|
3861
3872
|
}
|
|
3862
3873
|
/**
|
|
3863
3874
|
* @inheritDoc
|
|
3864
3875
|
*/
|
|
3865
3876
|
eventFromException(e, n) {
|
|
3866
|
-
return
|
|
3877
|
+
return Rc(this._options.stackParser, e, n, this._options.attachStacktrace);
|
|
3867
3878
|
}
|
|
3868
3879
|
/**
|
|
3869
3880
|
* @inheritDoc
|
|
3870
3881
|
*/
|
|
3871
3882
|
eventFromMessage(e, n = "info", r) {
|
|
3872
|
-
return
|
|
3883
|
+
return wc(this._options.stackParser, e, n, r, this._options.attachStacktrace);
|
|
3873
3884
|
}
|
|
3874
3885
|
/**
|
|
3875
3886
|
* @inheritDoc
|
|
@@ -3878,7 +3889,7 @@ class Ic extends ka {
|
|
|
3878
3889
|
return e.platform = e.platform || "javascript", super._prepareEvent(e, n, r, s);
|
|
3879
3890
|
}
|
|
3880
3891
|
}
|
|
3881
|
-
function
|
|
3892
|
+
function Ac(t) {
|
|
3882
3893
|
return {
|
|
3883
3894
|
release: typeof __SENTRY_RELEASE__ == "string" ? __SENTRY_RELEASE__ : T.SENTRY_RELEASE?.id,
|
|
3884
3895
|
// This supports the variable that sentry-webpack-plugin injects
|
|
@@ -3888,12 +3899,12 @@ function Cc(t) {
|
|
|
3888
3899
|
...t
|
|
3889
3900
|
};
|
|
3890
3901
|
}
|
|
3891
|
-
const
|
|
3902
|
+
const Dc = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, D = R, Nc = 1e3;
|
|
3892
3903
|
let dr, Bt, Ht;
|
|
3893
|
-
function
|
|
3894
|
-
ce("dom", t), le("dom",
|
|
3904
|
+
function Oc(t) {
|
|
3905
|
+
ce("dom", t), le("dom", $c);
|
|
3895
3906
|
}
|
|
3896
|
-
function
|
|
3907
|
+
function $c() {
|
|
3897
3908
|
if (!D.document)
|
|
3898
3909
|
return;
|
|
3899
3910
|
const t = F.bind(null, "dom"), e = pr(t, !0);
|
|
@@ -3930,7 +3941,7 @@ function Oc() {
|
|
|
3930
3941
|
));
|
|
3931
3942
|
});
|
|
3932
3943
|
}
|
|
3933
|
-
function
|
|
3944
|
+
function Pc(t) {
|
|
3934
3945
|
if (t.type !== Bt)
|
|
3935
3946
|
return !1;
|
|
3936
3947
|
try {
|
|
@@ -3940,24 +3951,24 @@ function $c(t) {
|
|
|
3940
3951
|
}
|
|
3941
3952
|
return !0;
|
|
3942
3953
|
}
|
|
3943
|
-
function
|
|
3954
|
+
function Lc(t, e) {
|
|
3944
3955
|
return t !== "keypress" ? !1 : e?.tagName ? !(e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.isContentEditable) : !0;
|
|
3945
3956
|
}
|
|
3946
3957
|
function pr(t, e = !1) {
|
|
3947
3958
|
return (n) => {
|
|
3948
3959
|
if (!n || n._sentryCaptured)
|
|
3949
3960
|
return;
|
|
3950
|
-
const r =
|
|
3951
|
-
if (
|
|
3961
|
+
const r = Mc(n);
|
|
3962
|
+
if (Lc(n.type, r))
|
|
3952
3963
|
return;
|
|
3953
3964
|
Y(n, "_sentryCaptured", !0), r && !r._sentryId && Y(r, "_sentryId", P());
|
|
3954
3965
|
const s = n.type === "keypress" ? "input" : n.type;
|
|
3955
|
-
|
|
3966
|
+
Pc(n) || (t({ event: n, name: s, global: e }), Bt = n.type, Ht = r ? r._sentryId : void 0), clearTimeout(dr), dr = D.setTimeout(() => {
|
|
3956
3967
|
Ht = void 0, Bt = void 0;
|
|
3957
|
-
},
|
|
3968
|
+
}, Nc);
|
|
3958
3969
|
};
|
|
3959
3970
|
}
|
|
3960
|
-
function
|
|
3971
|
+
function Mc(t) {
|
|
3961
3972
|
try {
|
|
3962
3973
|
return t.target;
|
|
3963
3974
|
} catch {
|
|
@@ -3965,23 +3976,23 @@ function Lc(t) {
|
|
|
3965
3976
|
}
|
|
3966
3977
|
}
|
|
3967
3978
|
let Fe;
|
|
3968
|
-
function
|
|
3979
|
+
function Ss(t) {
|
|
3969
3980
|
const e = "history";
|
|
3970
|
-
ce(e, t), le(e,
|
|
3981
|
+
ce(e, t), le(e, Fc);
|
|
3971
3982
|
}
|
|
3972
|
-
function
|
|
3983
|
+
function Fc() {
|
|
3973
3984
|
if (D.addEventListener("popstate", () => {
|
|
3974
3985
|
const e = D.location.href, n = Fe;
|
|
3975
3986
|
if (Fe = e, n === e)
|
|
3976
3987
|
return;
|
|
3977
3988
|
F("history", { from: n, to: e });
|
|
3978
|
-
}), !
|
|
3989
|
+
}), !cc())
|
|
3979
3990
|
return;
|
|
3980
3991
|
function t(e) {
|
|
3981
3992
|
return function(...n) {
|
|
3982
3993
|
const r = n.length > 2 ? n[2] : void 0;
|
|
3983
3994
|
if (r) {
|
|
3984
|
-
const s = Fe, i =
|
|
3995
|
+
const s = Fe, i = Uc(String(r));
|
|
3985
3996
|
if (Fe = i, s === i)
|
|
3986
3997
|
return e.apply(this, n);
|
|
3987
3998
|
F("history", { from: s, to: i });
|
|
@@ -3991,7 +4002,7 @@ function Mc() {
|
|
|
3991
4002
|
}
|
|
3992
4003
|
$(D.history, "pushState", t), $(D.history, "replaceState", t);
|
|
3993
4004
|
}
|
|
3994
|
-
function
|
|
4005
|
+
function Uc(t) {
|
|
3995
4006
|
try {
|
|
3996
4007
|
return new URL(t, D.location.origin).toString();
|
|
3997
4008
|
} catch {
|
|
@@ -3999,7 +4010,7 @@ function Fc(t) {
|
|
|
3999
4010
|
}
|
|
4000
4011
|
}
|
|
4001
4012
|
const Xe = {};
|
|
4002
|
-
function
|
|
4013
|
+
function Bc(t) {
|
|
4003
4014
|
const e = Xe[t];
|
|
4004
4015
|
if (e)
|
|
4005
4016
|
return e;
|
|
@@ -4014,24 +4025,24 @@ function Uc(t) {
|
|
|
4014
4025
|
const i = s.contentWindow;
|
|
4015
4026
|
i?.[t] && (n = i[t]), r.head.removeChild(s);
|
|
4016
4027
|
} catch (s) {
|
|
4017
|
-
|
|
4028
|
+
Dc && m.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `, s);
|
|
4018
4029
|
}
|
|
4019
4030
|
return n && (Xe[t] = n.bind(D));
|
|
4020
4031
|
}
|
|
4021
|
-
function
|
|
4032
|
+
function Hc(t) {
|
|
4022
4033
|
Xe[t] = void 0;
|
|
4023
4034
|
}
|
|
4024
4035
|
const Te = "__sentry_xhr_v3__";
|
|
4025
|
-
function
|
|
4026
|
-
ce("xhr", t), le("xhr",
|
|
4036
|
+
function zc(t) {
|
|
4037
|
+
ce("xhr", t), le("xhr", jc);
|
|
4027
4038
|
}
|
|
4028
|
-
function
|
|
4039
|
+
function jc() {
|
|
4029
4040
|
if (!D.XMLHttpRequest)
|
|
4030
4041
|
return;
|
|
4031
4042
|
const t = XMLHttpRequest.prototype;
|
|
4032
4043
|
t.open = new Proxy(t.open, {
|
|
4033
4044
|
apply(e, n, r) {
|
|
4034
|
-
const s = new Error(), i = q() * 1e3, o = j(r[0]) ? r[0].toUpperCase() : void 0, a =
|
|
4045
|
+
const s = new Error(), i = q() * 1e3, o = j(r[0]) ? r[0].toUpperCase() : void 0, a = qc(r[1]);
|
|
4035
4046
|
if (!o || !a)
|
|
4036
4047
|
return e.apply(n, r);
|
|
4037
4048
|
n[Te] = {
|
|
@@ -4080,7 +4091,7 @@ function zc() {
|
|
|
4080
4091
|
}
|
|
4081
4092
|
});
|
|
4082
4093
|
}
|
|
4083
|
-
function
|
|
4094
|
+
function qc(t) {
|
|
4084
4095
|
if (j(t))
|
|
4085
4096
|
return t;
|
|
4086
4097
|
try {
|
|
@@ -4088,8 +4099,8 @@ function jc(t) {
|
|
|
4088
4099
|
} catch {
|
|
4089
4100
|
}
|
|
4090
4101
|
}
|
|
4091
|
-
const
|
|
4092
|
-
function
|
|
4102
|
+
const Gc = 40;
|
|
4103
|
+
function Vc(t, e = Bc("fetch")) {
|
|
4093
4104
|
let n = 0, r = 0;
|
|
4094
4105
|
async function s(i) {
|
|
4095
4106
|
const o = i.body.length;
|
|
@@ -4123,18 +4134,18 @@ function Gc(t, e = Uc("fetch")) {
|
|
|
4123
4134
|
}
|
|
4124
4135
|
};
|
|
4125
4136
|
} catch (c) {
|
|
4126
|
-
throw
|
|
4137
|
+
throw Hc("fetch"), c;
|
|
4127
4138
|
} finally {
|
|
4128
4139
|
n -= o, r--;
|
|
4129
4140
|
}
|
|
4130
4141
|
}
|
|
4131
|
-
return
|
|
4142
|
+
return ya(
|
|
4132
4143
|
t,
|
|
4133
4144
|
s,
|
|
4134
|
-
sn(t.bufferSize ||
|
|
4145
|
+
sn(t.bufferSize || Gc)
|
|
4135
4146
|
);
|
|
4136
4147
|
}
|
|
4137
|
-
const ut = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__,
|
|
4148
|
+
const ut = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Wc = 30, Xc = 50;
|
|
4138
4149
|
function zt(t, e, n, r) {
|
|
4139
4150
|
const s = {
|
|
4140
4151
|
filename: t,
|
|
@@ -4144,44 +4155,44 @@ function zt(t, e, n, r) {
|
|
|
4144
4155
|
};
|
|
4145
4156
|
return n !== void 0 && (s.lineno = n), r !== void 0 && (s.colno = r), s;
|
|
4146
4157
|
}
|
|
4147
|
-
const
|
|
4148
|
-
const e = t.match(
|
|
4158
|
+
const Kc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Yc = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, Zc = /\((\S*)(?::(\d+))(?::(\d+))\)/, Jc = /at (.+?) ?\(data:(.+?),/, Qc = (t) => {
|
|
4159
|
+
const e = t.match(Jc);
|
|
4149
4160
|
if (e)
|
|
4150
4161
|
return {
|
|
4151
4162
|
filename: `<data:${e[2]}>`,
|
|
4152
4163
|
function: e[1]
|
|
4153
4164
|
};
|
|
4154
|
-
const n =
|
|
4165
|
+
const n = Kc.exec(t);
|
|
4155
4166
|
if (n) {
|
|
4156
4167
|
const [, s, i, o] = n;
|
|
4157
4168
|
return zt(s, oe, +i, +o);
|
|
4158
4169
|
}
|
|
4159
|
-
const r =
|
|
4170
|
+
const r = Yc.exec(t);
|
|
4160
4171
|
if (r) {
|
|
4161
4172
|
if (r[2] && r[2].indexOf("eval") === 0) {
|
|
4162
|
-
const a =
|
|
4173
|
+
const a = Zc.exec(r[2]);
|
|
4163
4174
|
a && (r[2] = a[1], r[3] = a[2], r[4] = a[3]);
|
|
4164
4175
|
}
|
|
4165
|
-
const [i, o] =
|
|
4176
|
+
const [i, o] = ks(r[1] || oe, r[2]);
|
|
4166
4177
|
return zt(o, i, r[3] ? +r[3] : void 0, r[4] ? +r[4] : void 0);
|
|
4167
4178
|
}
|
|
4168
|
-
},
|
|
4169
|
-
const e =
|
|
4179
|
+
}, el = [Wc, Qc], tl = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, nl = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, rl = (t) => {
|
|
4180
|
+
const e = tl.exec(t);
|
|
4170
4181
|
if (e) {
|
|
4171
4182
|
if (e[3] && e[3].indexOf(" > eval") > -1) {
|
|
4172
|
-
const i =
|
|
4183
|
+
const i = nl.exec(e[3]);
|
|
4173
4184
|
i && (e[1] = e[1] || "eval", e[3] = i[1], e[4] = i[2], e[5] = "");
|
|
4174
4185
|
}
|
|
4175
4186
|
let r = e[3], s = e[1] || oe;
|
|
4176
|
-
return [s, r] =
|
|
4187
|
+
return [s, r] = ks(s, r), zt(r, s, e[4] ? +e[4] : void 0, e[5] ? +e[5] : void 0);
|
|
4177
4188
|
}
|
|
4178
|
-
},
|
|
4189
|
+
}, sl = [Xc, rl], il = [el, sl], ol = Nr(...il), ks = (t, e) => {
|
|
4179
4190
|
const n = t.indexOf("safari-extension") !== -1, r = t.indexOf("safari-web-extension") !== -1;
|
|
4180
4191
|
return n || r ? [
|
|
4181
4192
|
t.indexOf("@") !== -1 ? t.split("@")[0] : oe,
|
|
4182
4193
|
n ? `safari-extension:${e}` : `safari-web-extension:${e}`
|
|
4183
4194
|
] : [t, e];
|
|
4184
|
-
}, Ue = 1024,
|
|
4195
|
+
}, Ue = 1024, al = "Breadcrumbs", cl = ((t = {}) => {
|
|
4185
4196
|
const e = {
|
|
4186
4197
|
console: !0,
|
|
4187
4198
|
dom: !0,
|
|
@@ -4192,13 +4203,13 @@ const Xc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Kc = /^\s*at (?:(.+?\)(?: \
|
|
|
4192
4203
|
...t
|
|
4193
4204
|
};
|
|
4194
4205
|
return {
|
|
4195
|
-
name:
|
|
4206
|
+
name: al,
|
|
4196
4207
|
setup(n) {
|
|
4197
|
-
e.console &&
|
|
4208
|
+
e.console && Ya(pl(n)), e.dom && Oc(dl(n, e.dom)), e.xhr && zc(hl(n)), e.fetch && dc(fl(n)), e.history && Ss(gl(n)), e.sentry && n.on("beforeSendEvent", ul(n));
|
|
4198
4209
|
}
|
|
4199
4210
|
};
|
|
4200
|
-
}),
|
|
4201
|
-
function
|
|
4211
|
+
}), ll = cl;
|
|
4212
|
+
function ul(t) {
|
|
4202
4213
|
return function(n) {
|
|
4203
4214
|
C() === t && Z(
|
|
4204
4215
|
{
|
|
@@ -4213,7 +4224,7 @@ function ll(t) {
|
|
|
4213
4224
|
);
|
|
4214
4225
|
};
|
|
4215
4226
|
}
|
|
4216
|
-
function
|
|
4227
|
+
function dl(t, e) {
|
|
4217
4228
|
return function(r) {
|
|
4218
4229
|
if (C() !== t)
|
|
4219
4230
|
return;
|
|
@@ -4222,8 +4233,8 @@ function ul(t, e) {
|
|
|
4222
4233
|
`\`dom.maxStringLength\` cannot exceed ${Ue}, but a value of ${a} was configured. Sentry will use ${Ue} instead.`
|
|
4223
4234
|
), a = Ue), typeof o == "string" && (o = [o]);
|
|
4224
4235
|
try {
|
|
4225
|
-
const l = r.event, d =
|
|
4226
|
-
s =
|
|
4236
|
+
const l = r.event, d = ml(l) ? l.target : l;
|
|
4237
|
+
s = Fr(d, { keyAttrs: o, maxStringLength: a }), i = fi(d);
|
|
4227
4238
|
} catch {
|
|
4228
4239
|
s = "<unknown>";
|
|
4229
4240
|
}
|
|
@@ -4240,7 +4251,7 @@ function ul(t, e) {
|
|
|
4240
4251
|
});
|
|
4241
4252
|
};
|
|
4242
4253
|
}
|
|
4243
|
-
function
|
|
4254
|
+
function pl(t) {
|
|
4244
4255
|
return function(n) {
|
|
4245
4256
|
if (C() !== t)
|
|
4246
4257
|
return;
|
|
@@ -4250,7 +4261,7 @@ function dl(t) {
|
|
|
4250
4261
|
arguments: n.args,
|
|
4251
4262
|
logger: "console"
|
|
4252
4263
|
},
|
|
4253
|
-
level:
|
|
4264
|
+
level: Ja(n.level),
|
|
4254
4265
|
message: vn(n.args, " ")
|
|
4255
4266
|
};
|
|
4256
4267
|
if (n.level === "assert")
|
|
@@ -4264,7 +4275,7 @@ function dl(t) {
|
|
|
4264
4275
|
});
|
|
4265
4276
|
};
|
|
4266
4277
|
}
|
|
4267
|
-
function
|
|
4278
|
+
function hl(t) {
|
|
4268
4279
|
return function(n) {
|
|
4269
4280
|
if (C() !== t)
|
|
4270
4281
|
return;
|
|
@@ -4284,12 +4295,12 @@ function pl(t) {
|
|
|
4284
4295
|
category: "xhr",
|
|
4285
4296
|
data: d,
|
|
4286
4297
|
type: "http",
|
|
4287
|
-
level:
|
|
4298
|
+
level: ys(c)
|
|
4288
4299
|
};
|
|
4289
4300
|
t.emit("beforeOutgoingRequestBreadcrumb", p, u), Z(p, u);
|
|
4290
4301
|
};
|
|
4291
4302
|
}
|
|
4292
|
-
function
|
|
4303
|
+
function fl(t) {
|
|
4293
4304
|
return function(n) {
|
|
4294
4305
|
if (C() !== t)
|
|
4295
4306
|
return;
|
|
@@ -4323,13 +4334,13 @@ function hl(t) {
|
|
|
4323
4334
|
category: "fetch",
|
|
4324
4335
|
data: o,
|
|
4325
4336
|
type: "http",
|
|
4326
|
-
level:
|
|
4337
|
+
level: ys(o.status_code)
|
|
4327
4338
|
};
|
|
4328
4339
|
t.emit("beforeOutgoingRequestBreadcrumb", c, a), Z(c, a);
|
|
4329
4340
|
}
|
|
4330
4341
|
};
|
|
4331
4342
|
}
|
|
4332
|
-
function
|
|
4343
|
+
function gl(t) {
|
|
4333
4344
|
return function(n) {
|
|
4334
4345
|
if (C() !== t)
|
|
4335
4346
|
return;
|
|
@@ -4346,10 +4357,10 @@ function fl(t) {
|
|
|
4346
4357
|
});
|
|
4347
4358
|
};
|
|
4348
4359
|
}
|
|
4349
|
-
function
|
|
4360
|
+
function ml(t) {
|
|
4350
4361
|
return !!t && !!t.target;
|
|
4351
4362
|
}
|
|
4352
|
-
const
|
|
4363
|
+
const _l = [
|
|
4353
4364
|
"EventTarget",
|
|
4354
4365
|
"Window",
|
|
4355
4366
|
"Node",
|
|
@@ -4381,7 +4392,7 @@ const ml = [
|
|
|
4381
4392
|
"XMLHttpRequest",
|
|
4382
4393
|
"XMLHttpRequestEventTarget",
|
|
4383
4394
|
"XMLHttpRequestUpload"
|
|
4384
|
-
],
|
|
4395
|
+
], yl = "BrowserApiErrors", El = ((t = {}) => {
|
|
4385
4396
|
const e = {
|
|
4386
4397
|
XMLHttpRequest: !0,
|
|
4387
4398
|
eventTarget: !0,
|
|
@@ -4392,16 +4403,16 @@ const ml = [
|
|
|
4392
4403
|
...t
|
|
4393
4404
|
};
|
|
4394
4405
|
return {
|
|
4395
|
-
name:
|
|
4406
|
+
name: yl,
|
|
4396
4407
|
// TODO: This currently only works for the first client this is setup
|
|
4397
4408
|
// We may want to adjust this to check for client etc.
|
|
4398
4409
|
setupOnce() {
|
|
4399
|
-
e.setTimeout && $(T, "setTimeout", hr), e.setInterval && $(T, "setInterval", hr), e.requestAnimationFrame && $(T, "requestAnimationFrame",
|
|
4410
|
+
e.setTimeout && $(T, "setTimeout", hr), e.setInterval && $(T, "setInterval", hr), e.requestAnimationFrame && $(T, "requestAnimationFrame", Sl), e.XMLHttpRequest && "XMLHttpRequest" in T && $(XMLHttpRequest.prototype, "send", kl);
|
|
4400
4411
|
const n = e.eventTarget;
|
|
4401
|
-
n && (Array.isArray(n) ? n :
|
|
4412
|
+
n && (Array.isArray(n) ? n : _l).forEach((s) => xl(s, e));
|
|
4402
4413
|
}
|
|
4403
4414
|
};
|
|
4404
|
-
}),
|
|
4415
|
+
}), bl = El;
|
|
4405
4416
|
function hr(t) {
|
|
4406
4417
|
return function(...e) {
|
|
4407
4418
|
const n = e[0];
|
|
@@ -4413,7 +4424,7 @@ function hr(t) {
|
|
|
4413
4424
|
}), t.apply(this, e);
|
|
4414
4425
|
};
|
|
4415
4426
|
}
|
|
4416
|
-
function
|
|
4427
|
+
function Sl(t) {
|
|
4417
4428
|
return function(e) {
|
|
4418
4429
|
return t.apply(this, [
|
|
4419
4430
|
me(e, {
|
|
@@ -4428,7 +4439,7 @@ function bl(t) {
|
|
|
4428
4439
|
]);
|
|
4429
4440
|
};
|
|
4430
4441
|
}
|
|
4431
|
-
function
|
|
4442
|
+
function kl(t) {
|
|
4432
4443
|
return function(...e) {
|
|
4433
4444
|
const n = this;
|
|
4434
4445
|
return ["onload", "onerror", "onprogress", "onreadystatechange"].forEach((s) => {
|
|
@@ -4447,12 +4458,12 @@ function Sl(t) {
|
|
|
4447
4458
|
}), t.apply(this, e);
|
|
4448
4459
|
};
|
|
4449
4460
|
}
|
|
4450
|
-
function
|
|
4461
|
+
function xl(t, e) {
|
|
4451
4462
|
const r = T[t]?.prototype;
|
|
4452
4463
|
r?.hasOwnProperty?.("addEventListener") && ($(r, "addEventListener", function(s) {
|
|
4453
4464
|
return function(i, o, a) {
|
|
4454
4465
|
try {
|
|
4455
|
-
|
|
4466
|
+
Rl(o) && (o.handleEvent = me(o.handleEvent, {
|
|
4456
4467
|
mechanism: {
|
|
4457
4468
|
data: {
|
|
4458
4469
|
handler: X(o),
|
|
@@ -4464,7 +4475,7 @@ function kl(t, e) {
|
|
|
4464
4475
|
}));
|
|
4465
4476
|
} catch {
|
|
4466
4477
|
}
|
|
4467
|
-
return e.unregisterOriginalCallbacks &&
|
|
4478
|
+
return e.unregisterOriginalCallbacks && wl(this, i, o), s.apply(this, [
|
|
4468
4479
|
i,
|
|
4469
4480
|
me(o, {
|
|
4470
4481
|
mechanism: {
|
|
@@ -4490,13 +4501,13 @@ function kl(t, e) {
|
|
|
4490
4501
|
};
|
|
4491
4502
|
}));
|
|
4492
4503
|
}
|
|
4493
|
-
function
|
|
4504
|
+
function Rl(t) {
|
|
4494
4505
|
return typeof t.handleEvent == "function";
|
|
4495
4506
|
}
|
|
4496
|
-
function
|
|
4507
|
+
function wl(t, e, n) {
|
|
4497
4508
|
t && typeof t == "object" && "removeEventListener" in t && typeof t.removeEventListener == "function" && t.removeEventListener(e, n);
|
|
4498
4509
|
}
|
|
4499
|
-
const
|
|
4510
|
+
const Tl = (t = {}) => {
|
|
4500
4511
|
const e = t.lifecycle ?? "route";
|
|
4501
4512
|
return {
|
|
4502
4513
|
name: "BrowserSession",
|
|
@@ -4511,22 +4522,22 @@ const wl = (t = {}) => {
|
|
|
4511
4522
|
n.addScopeListener((s) => {
|
|
4512
4523
|
const i = s.getUser();
|
|
4513
4524
|
(r?.id !== i?.id || r?.ip_address !== i?.ip_address) && (Et(), r = i);
|
|
4514
|
-
}), e === "route" &&
|
|
4525
|
+
}), e === "route" && Ss(({ from: s, to: i }) => {
|
|
4515
4526
|
s !== i && (Wn({ ignoreDuration: !0 }), Et());
|
|
4516
4527
|
});
|
|
4517
4528
|
}
|
|
4518
4529
|
};
|
|
4519
|
-
},
|
|
4520
|
-
name:
|
|
4530
|
+
}, vl = "CultureContext", Il = (() => ({
|
|
4531
|
+
name: vl,
|
|
4521
4532
|
preprocessEvent(t) {
|
|
4522
|
-
const e =
|
|
4533
|
+
const e = Al();
|
|
4523
4534
|
e && (t.contexts = {
|
|
4524
4535
|
...t.contexts,
|
|
4525
4536
|
culture: { ...e, ...t.contexts?.culture }
|
|
4526
4537
|
});
|
|
4527
4538
|
}
|
|
4528
|
-
})),
|
|
4529
|
-
function
|
|
4539
|
+
})), Cl = Il;
|
|
4540
|
+
function Al() {
|
|
4530
4541
|
try {
|
|
4531
4542
|
const t = T.Intl;
|
|
4532
4543
|
if (!t)
|
|
@@ -4541,34 +4552,34 @@ function Cl() {
|
|
|
4541
4552
|
return;
|
|
4542
4553
|
}
|
|
4543
4554
|
}
|
|
4544
|
-
const
|
|
4555
|
+
const Dl = "GlobalHandlers", Nl = ((t = {}) => {
|
|
4545
4556
|
const e = {
|
|
4546
4557
|
onerror: !0,
|
|
4547
4558
|
onunhandledrejection: !0,
|
|
4548
4559
|
...t
|
|
4549
4560
|
};
|
|
4550
4561
|
return {
|
|
4551
|
-
name:
|
|
4562
|
+
name: Dl,
|
|
4552
4563
|
setupOnce() {
|
|
4553
4564
|
Error.stackTraceLimit = 50;
|
|
4554
4565
|
},
|
|
4555
4566
|
setup(n) {
|
|
4556
|
-
e.onerror && (
|
|
4567
|
+
e.onerror && ($l(n), fr("onerror")), e.onunhandledrejection && (Pl(n), fr("onunhandledrejection"));
|
|
4557
4568
|
}
|
|
4558
4569
|
};
|
|
4559
|
-
}),
|
|
4560
|
-
function
|
|
4561
|
-
|
|
4562
|
-
const { stackParser: n, attachStacktrace: r } =
|
|
4563
|
-
if (C() !== t ||
|
|
4570
|
+
}), Ol = Nl;
|
|
4571
|
+
function $l(t) {
|
|
4572
|
+
si((e) => {
|
|
4573
|
+
const { stackParser: n, attachStacktrace: r } = xs();
|
|
4574
|
+
if (C() !== t || Es())
|
|
4564
4575
|
return;
|
|
4565
|
-
const { msg: s, url: i, line: o, column: a, error: c } = e, l =
|
|
4576
|
+
const { msg: s, url: i, line: o, column: a, error: c } = e, l = Fl(
|
|
4566
4577
|
cn(n, c || s, void 0, r, !1),
|
|
4567
4578
|
i,
|
|
4568
4579
|
o,
|
|
4569
4580
|
a
|
|
4570
4581
|
);
|
|
4571
|
-
l.level = "error",
|
|
4582
|
+
l.level = "error", ts(l, {
|
|
4572
4583
|
originalException: c,
|
|
4573
4584
|
mechanism: {
|
|
4574
4585
|
handled: !1,
|
|
@@ -4577,13 +4588,13 @@ function Ol(t) {
|
|
|
4577
4588
|
});
|
|
4578
4589
|
});
|
|
4579
4590
|
}
|
|
4580
|
-
function
|
|
4581
|
-
|
|
4582
|
-
const { stackParser: n, attachStacktrace: r } =
|
|
4583
|
-
if (C() !== t ||
|
|
4591
|
+
function Pl(t) {
|
|
4592
|
+
oi((e) => {
|
|
4593
|
+
const { stackParser: n, attachStacktrace: r } = xs();
|
|
4594
|
+
if (C() !== t || Es())
|
|
4584
4595
|
return;
|
|
4585
|
-
const s =
|
|
4586
|
-
i.level = "error",
|
|
4596
|
+
const s = Ll(e), i = it(s) ? Ml(s) : cn(n, s, void 0, r, !0);
|
|
4597
|
+
i.level = "error", ts(i, {
|
|
4587
4598
|
originalException: s,
|
|
4588
4599
|
mechanism: {
|
|
4589
4600
|
handled: !1,
|
|
@@ -4592,7 +4603,7 @@ function $l(t) {
|
|
|
4592
4603
|
});
|
|
4593
4604
|
});
|
|
4594
4605
|
}
|
|
4595
|
-
function
|
|
4606
|
+
function Ll(t) {
|
|
4596
4607
|
if (it(t))
|
|
4597
4608
|
return t;
|
|
4598
4609
|
try {
|
|
@@ -4604,7 +4615,7 @@ function Pl(t) {
|
|
|
4604
4615
|
}
|
|
4605
4616
|
return t;
|
|
4606
4617
|
}
|
|
4607
|
-
function
|
|
4618
|
+
function Ml(t) {
|
|
4608
4619
|
return {
|
|
4609
4620
|
exception: {
|
|
4610
4621
|
values: [
|
|
@@ -4617,8 +4628,8 @@ function Ll(t) {
|
|
|
4617
4628
|
}
|
|
4618
4629
|
};
|
|
4619
4630
|
}
|
|
4620
|
-
function
|
|
4621
|
-
const s = t.exception = t.exception || {}, i = s.values = s.values || [], o = i[0] = i[0] || {}, a = o.stacktrace = o.stacktrace || {}, c = a.frames = a.frames || [], l = r, d = n, u =
|
|
4631
|
+
function Fl(t, e, n, r) {
|
|
4632
|
+
const s = t.exception = t.exception || {}, i = s.values = s.values || [], o = i[0] = i[0] || {}, a = o.stacktrace = o.stacktrace || {}, c = a.frames = a.frames || [], l = r, d = n, u = Ul(e) ?? Zt();
|
|
4622
4633
|
return c.length === 0 && c.push({
|
|
4623
4634
|
colno: l,
|
|
4624
4635
|
filename: u,
|
|
@@ -4630,22 +4641,22 @@ function Ml(t, e, n, r) {
|
|
|
4630
4641
|
function fr(t) {
|
|
4631
4642
|
ut && m.log(`Global Handler attached: ${t}`);
|
|
4632
4643
|
}
|
|
4633
|
-
function
|
|
4644
|
+
function xs() {
|
|
4634
4645
|
return C()?.getOptions() || {
|
|
4635
4646
|
stackParser: () => [],
|
|
4636
4647
|
attachStacktrace: !1
|
|
4637
4648
|
};
|
|
4638
4649
|
}
|
|
4639
|
-
function
|
|
4650
|
+
function Ul(t) {
|
|
4640
4651
|
if (!(!j(t) || t.length === 0))
|
|
4641
|
-
return t.startsWith("data:") ? `<${
|
|
4652
|
+
return t.startsWith("data:") ? `<${Da(t, !1)}>` : t;
|
|
4642
4653
|
}
|
|
4643
|
-
const
|
|
4654
|
+
const Bl = () => ({
|
|
4644
4655
|
name: "HttpContext",
|
|
4645
4656
|
preprocessEvent(t) {
|
|
4646
4657
|
if (!T.navigator && !T.location && !T.document)
|
|
4647
4658
|
return;
|
|
4648
|
-
const e =
|
|
4659
|
+
const e = _c(), n = {
|
|
4649
4660
|
...e.headers,
|
|
4650
4661
|
...t.request?.headers
|
|
4651
4662
|
};
|
|
@@ -4655,13 +4666,13 @@ const Ul = () => ({
|
|
|
4655
4666
|
headers: n
|
|
4656
4667
|
};
|
|
4657
4668
|
}
|
|
4658
|
-
}),
|
|
4659
|
-
const e = t.limit ||
|
|
4669
|
+
}), Hl = "cause", zl = 5, jl = "LinkedErrors", ql = ((t = {}) => {
|
|
4670
|
+
const e = t.limit || zl, n = t.key || Hl;
|
|
4660
4671
|
return {
|
|
4661
|
-
name:
|
|
4672
|
+
name: jl,
|
|
4662
4673
|
preprocessEvent(r, s, i) {
|
|
4663
4674
|
const o = i.getOptions();
|
|
4664
|
-
|
|
4675
|
+
Ka(
|
|
4665
4676
|
// This differs from the LinkedErrors integration in core by using a different exceptionFromError function
|
|
4666
4677
|
on,
|
|
4667
4678
|
o.stackParser,
|
|
@@ -4672,15 +4683,15 @@ const Ul = () => ({
|
|
|
4672
4683
|
);
|
|
4673
4684
|
}
|
|
4674
4685
|
};
|
|
4675
|
-
}),
|
|
4676
|
-
function
|
|
4677
|
-
return
|
|
4686
|
+
}), Gl = ql;
|
|
4687
|
+
function Vl() {
|
|
4688
|
+
return Wl() ? (ut && ye(() => {
|
|
4678
4689
|
console.error(
|
|
4679
4690
|
"[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/"
|
|
4680
4691
|
);
|
|
4681
4692
|
}), !0) : !1;
|
|
4682
4693
|
}
|
|
4683
|
-
function
|
|
4694
|
+
function Wl() {
|
|
4684
4695
|
if (typeof T.window > "u")
|
|
4685
4696
|
return !1;
|
|
4686
4697
|
const t = T;
|
|
@@ -4689,53 +4700,53 @@ function Vl() {
|
|
|
4689
4700
|
const n = Zt(), r = ["chrome-extension", "moz-extension", "ms-browser-extension", "safari-web-extension"];
|
|
4690
4701
|
return !(T === T.top && r.some((i) => n.startsWith(`${i}://`)));
|
|
4691
4702
|
}
|
|
4692
|
-
function
|
|
4703
|
+
function Xl(t) {
|
|
4693
4704
|
return [
|
|
4694
4705
|
// TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
|
|
4695
4706
|
// eslint-disable-next-line deprecation/deprecation
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
+
Ha(),
|
|
4708
|
+
Ma(),
|
|
4709
|
+
ac(),
|
|
4710
|
+
bl(),
|
|
4711
|
+
ll(),
|
|
4712
|
+
Ol(),
|
|
4713
|
+
Gl(),
|
|
4714
|
+
tc(),
|
|
4715
|
+
Bl(),
|
|
4716
|
+
Cl(),
|
|
4717
|
+
Tl()
|
|
4707
4718
|
];
|
|
4708
4719
|
}
|
|
4709
|
-
function
|
|
4710
|
-
const e = !t.skipBrowserExtensionCheck &&
|
|
4711
|
-
let n = t.defaultIntegrations == null ?
|
|
4720
|
+
function Kl(t = {}) {
|
|
4721
|
+
const e = !t.skipBrowserExtensionCheck && Vl();
|
|
4722
|
+
let n = t.defaultIntegrations == null ? Xl() : t.defaultIntegrations;
|
|
4712
4723
|
const r = {
|
|
4713
4724
|
...t,
|
|
4714
4725
|
enabled: e ? !1 : t.enabled,
|
|
4715
|
-
stackParser:
|
|
4716
|
-
integrations:
|
|
4726
|
+
stackParser: ni(t.stackParser || ol),
|
|
4727
|
+
integrations: ia({
|
|
4717
4728
|
integrations: t.integrations,
|
|
4718
4729
|
defaultIntegrations: n
|
|
4719
4730
|
}),
|
|
4720
|
-
transport: t.transport ||
|
|
4731
|
+
transport: t.transport || Vc
|
|
4721
4732
|
};
|
|
4722
|
-
return
|
|
4733
|
+
return Ca(Cc, r);
|
|
4723
4734
|
}
|
|
4724
|
-
const
|
|
4725
|
-
class
|
|
4735
|
+
const Yl = "https://06451c8d861702902d2e6b2088fa9b62@o1128948.ingest.us.sentry.io/4509207135387648";
|
|
4736
|
+
class Zl {
|
|
4726
4737
|
constructor(e) {
|
|
4727
4738
|
this.enabled = e;
|
|
4728
4739
|
}
|
|
4729
4740
|
init(e) {
|
|
4730
|
-
this.enabled &&
|
|
4731
|
-
dsn:
|
|
4741
|
+
this.enabled && Kl({
|
|
4742
|
+
dsn: Yl,
|
|
4732
4743
|
environment: e,
|
|
4733
4744
|
defaultIntegrations: !1,
|
|
4734
4745
|
tracesSampleRate: 0
|
|
4735
4746
|
});
|
|
4736
4747
|
}
|
|
4737
4748
|
setUser(e) {
|
|
4738
|
-
!this.enabled || !e || (this.flavour = e,
|
|
4749
|
+
!this.enabled || !e || (this.flavour = e, Jo({ id: e, username: e }));
|
|
4739
4750
|
}
|
|
4740
4751
|
setTransactionId(e) {
|
|
4741
4752
|
this.txnId = e;
|
|
@@ -4744,7 +4755,7 @@ class Yl {
|
|
|
4744
4755
|
this.enabled && Z({ category: e, message: n, data: r, level: "info", timestamp: Date.now() / 1e3 });
|
|
4745
4756
|
}
|
|
4746
4757
|
captureEvent(e, n) {
|
|
4747
|
-
this.enabled &&
|
|
4758
|
+
this.enabled && Zo(e, {
|
|
4748
4759
|
level: "info",
|
|
4749
4760
|
tags: { txn_id: this.txnId, flavour: this.flavour },
|
|
4750
4761
|
extra: n,
|
|
@@ -4752,7 +4763,7 @@ class Yl {
|
|
|
4752
4763
|
});
|
|
4753
4764
|
}
|
|
4754
4765
|
captureError(e, n) {
|
|
4755
|
-
this.enabled &&
|
|
4766
|
+
this.enabled && es(e, {
|
|
4756
4767
|
tags: { txn_id: this.txnId, flavour: this.flavour },
|
|
4757
4768
|
extra: n
|
|
4758
4769
|
});
|
|
@@ -4767,8 +4778,8 @@ const b = {
|
|
|
4767
4778
|
UNAUTHORIZED: 401,
|
|
4768
4779
|
FORBIDDEN: 403
|
|
4769
4780
|
};
|
|
4770
|
-
var
|
|
4771
|
-
const
|
|
4781
|
+
var Jl = /* @__PURE__ */ ((t) => (t.NOT_INITIALIZED = "na", t.INIT = "init", t.STOP = "stop", t.COMMIT = "commit", t))(Jl || {}), Ql = /* @__PURE__ */ ((t) => (t.START = "start", t.PAUSE = "pause", t.RESUME = "resume", t.STOP = "stop", t))(Ql || {}), eu = /* @__PURE__ */ ((t) => (t.EKA_EMR_TEMPLATE = "eka_emr_template", t.CLINICAL_NOTE_TEMPLATE = "clinical_notes_template", t.TRANSCRIPT_TEMPLATE = "transcript_template", t.EKA_EMR_TO_FHIR_TEMPLATE = "eka_emr_to_fhir_template", t.NIC_TEMPLATE = "nic_template", t))(eu || {}), tu = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.FAILURE = "failure", t.PARTIAL_COMPLETE = "partial_complete", t.IN_PROGRESS = "in-progress", t))(tu || {}), y = /* @__PURE__ */ ((t) => (t.TXN_INIT_FAILED = "txn_init_failed", t.TXN_LIMIT_EXCEEDED = "txn_limit_exceeded", t.INTERNAL_SERVER_ERROR = "internal_server_error", t.END_RECORDING_FAILED = "end_recording_failed", t.AUDIO_UPLOAD_FAILED = "audio_upload_failed", t.TXN_COMMIT_FAILED = "txn_commit_failed", t.TXN_STATUS_MISMATCH = "txn_status_mismatch", t.NETWORK_ERROR = "network_error", t.UNKNOWN_ERROR = "unknown_error", t.UNAUTHORIZED = "unauthorized", t.FORBIDDEN = "forbidden", t.START_RECORDING_FAILED = "start_recording_failed", t.BAD_REQUEST = "bad_request", t.NOT_FOUND = "not_found", t))(y || {}), nu = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.IN_PROGRESS = "in-progress", t.FAILED = "failed", t.CANCELLED = "cancelled", t))(nu || {}), ru = /* @__PURE__ */ ((t) => (t.AWS_CONFIGURE_STATUS = "aws_configure_status", t.FILE_UPLOAD_STATUS = "file_upload_status", t.TRANSACTION_STATUS = "transaction_status", t.TEMPLATE_OPERATION_STATUS = "template_operation_status", t.AUTHENTICATION_STATUS = "authentication_status", t.NETWORK_STATUS = "network_status", t.STORAGE_STATUS = "storage_status", t))(ru || {}), Ke = /* @__PURE__ */ ((t) => (t.JSON = "json", t.TRANSCRIPT = "transcript", t.MARKDOWN = "markdown", t))(Ke || {}), te = /* @__PURE__ */ ((t) => (t.INTERNET_CONNECTIVITY = "INTERNET_CONNECTIVITY", t.SYSTEM_INFO = "SYSTEM_INFO", t.MICROPHONE = "MICROPHONE", t.SHARED_WORKER = "SHARED_WORKER", t.NETWORK_API = "NETWORK_API", t))(te || {}), v = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.ERROR = "error", t.WARNING = "warning", t))(v || {});
|
|
4782
|
+
const su = 404, iu = 408, ou = {
|
|
4772
4783
|
[b.UNAUTHORIZED]: {
|
|
4773
4784
|
error_code: y.UNAUTHORIZED,
|
|
4774
4785
|
detail: "Authentication failed. Token may be expired."
|
|
@@ -4777,35 +4788,35 @@ const ru = 404, su = 408, iu = {
|
|
|
4777
4788
|
error_code: y.FORBIDDEN,
|
|
4778
4789
|
detail: "Access forbidden."
|
|
4779
4790
|
},
|
|
4780
|
-
[
|
|
4791
|
+
[su]: {
|
|
4781
4792
|
error_code: y.NOT_FOUND,
|
|
4782
4793
|
detail: "Requested resource not found."
|
|
4783
4794
|
},
|
|
4784
|
-
[
|
|
4795
|
+
[iu]: {
|
|
4785
4796
|
error_code: y.NETWORK_ERROR,
|
|
4786
4797
|
detail: "Request timed out."
|
|
4787
4798
|
}
|
|
4788
4799
|
};
|
|
4789
|
-
function
|
|
4790
|
-
const n =
|
|
4800
|
+
function au(t, e) {
|
|
4801
|
+
const n = ou[t];
|
|
4791
4802
|
return n ? { error_code: n.error_code, message: n.detail } : {
|
|
4792
4803
|
error_code: t >= 400 && t < 500 ? y.BAD_REQUEST : y.INTERNAL_SERVER_ERROR,
|
|
4793
4804
|
message: e
|
|
4794
4805
|
};
|
|
4795
4806
|
}
|
|
4796
|
-
function
|
|
4807
|
+
function cu(t) {
|
|
4797
4808
|
if (t instanceof W)
|
|
4798
4809
|
return t.body?.error?.code;
|
|
4799
4810
|
}
|
|
4800
|
-
function
|
|
4811
|
+
function lu(t) {
|
|
4801
4812
|
return t instanceof DOMException && t.name === "AbortError" ? "Request aborted (timeout)." : t instanceof TypeError && (t.message.includes("fetch") || t.message.includes("network")) ? "Network error." : null;
|
|
4802
4813
|
}
|
|
4803
4814
|
function S(t, e) {
|
|
4804
4815
|
if (t instanceof W) {
|
|
4805
|
-
const { error_code: r, message: s } =
|
|
4816
|
+
const { error_code: r, message: s } = au(t.status, t.message);
|
|
4806
4817
|
return { error_code: r, status_code: t.status, message: `${e} ${s}` };
|
|
4807
4818
|
}
|
|
4808
|
-
const n =
|
|
4819
|
+
const n = lu(t);
|
|
4809
4820
|
return n ? {
|
|
4810
4821
|
error_code: y.NETWORK_ERROR,
|
|
4811
4822
|
status_code: b.INTERNAL_SERVER_ERROR,
|
|
@@ -4816,7 +4827,7 @@ function S(t, e) {
|
|
|
4816
4827
|
message: `${e} ${t}`
|
|
4817
4828
|
};
|
|
4818
4829
|
}
|
|
4819
|
-
class
|
|
4830
|
+
class uu {
|
|
4820
4831
|
constructor(e, n, r) {
|
|
4821
4832
|
this.transport = e, this.hosts = n, this.allianceClient = r;
|
|
4822
4833
|
}
|
|
@@ -5088,7 +5099,7 @@ class lu {
|
|
|
5088
5099
|
}
|
|
5089
5100
|
}
|
|
5090
5101
|
const gr = "https://cdn.eka.care/vagus/cmlf0ip4a00000td1dmth2wk3.png", mr = "https://cdn.eka.care/vagus/cmlf0j9ea00010td1h3mi6zqk.png", xt = "3cm", Rt = "3.5cm";
|
|
5091
|
-
class
|
|
5102
|
+
class du {
|
|
5092
5103
|
constructor(e, n, r) {
|
|
5093
5104
|
this.transport = e, this.hosts = n, this.allianceClient = r;
|
|
5094
5105
|
}
|
|
@@ -5378,7 +5389,7 @@ class uu {
|
|
|
5378
5389
|
}
|
|
5379
5390
|
function ee(t, e, n) {
|
|
5380
5391
|
return {
|
|
5381
|
-
error_code:
|
|
5392
|
+
error_code: pu(t, e),
|
|
5382
5393
|
status_code: t.httpStatus ?? b.INTERNAL_SERVER_ERROR,
|
|
5383
5394
|
message: t.message || n
|
|
5384
5395
|
};
|
|
@@ -5389,10 +5400,10 @@ function ne(t) {
|
|
|
5389
5400
|
function _r(t) {
|
|
5390
5401
|
return t.success ? ne(t) : t.error.httpStatus ?? b.INTERNAL_SERVER_ERROR;
|
|
5391
5402
|
}
|
|
5392
|
-
function
|
|
5403
|
+
function pu(t, e) {
|
|
5393
5404
|
return t.code === "txn_limit_exceeded" ? y.TXN_LIMIT_EXCEEDED : t.httpStatus === b.UNAUTHORIZED ? y.UNAUTHORIZED : t.httpStatus === b.FORBIDDEN ? y.FORBIDDEN : e;
|
|
5394
5405
|
}
|
|
5395
|
-
class
|
|
5406
|
+
class hu {
|
|
5396
5407
|
constructor(e, n, r, s) {
|
|
5397
5408
|
this.allianceClient = e, this.transport = n, this.hosts = r, this.tracker = s, this.txnID = "", this.storedSession = null, this.sessionEnded = !1;
|
|
5398
5409
|
}
|
|
@@ -5533,7 +5544,7 @@ class pu {
|
|
|
5533
5544
|
this.allianceClient.clearRecordingState();
|
|
5534
5545
|
const n = {
|
|
5535
5546
|
session_id: e.txn_id,
|
|
5536
|
-
status:
|
|
5547
|
+
status: Fs.CREATED,
|
|
5537
5548
|
created_at: new Date(e.created_at * 1e3).toISOString(),
|
|
5538
5549
|
expires_at: e.expires_at,
|
|
5539
5550
|
upload_url: e.upload_url
|
|
@@ -5664,7 +5675,7 @@ class pu {
|
|
|
5664
5675
|
try {
|
|
5665
5676
|
const e = await this.allianceClient.retryFailedUploads();
|
|
5666
5677
|
if (!e.success)
|
|
5667
|
-
return e.error instanceof
|
|
5678
|
+
return e.error instanceof Us ? this.failedUploadResponse(e.error.failedFiles) : ee(
|
|
5668
5679
|
e.error,
|
|
5669
5680
|
y.AUDIO_UPLOAD_FAILED,
|
|
5670
5681
|
"Retry upload failed."
|
|
@@ -5774,7 +5785,7 @@ const yr = (t) => {
|
|
|
5774
5785
|
} catch {
|
|
5775
5786
|
return t;
|
|
5776
5787
|
}
|
|
5777
|
-
},
|
|
5788
|
+
}, fu = (t) => {
|
|
5778
5789
|
try {
|
|
5779
5790
|
const e = atob(t), n = new Uint8Array(e.length);
|
|
5780
5791
|
for (let s = 0; s < e.length; s++)
|
|
@@ -5783,9 +5794,9 @@ const yr = (t) => {
|
|
|
5783
5794
|
} catch (e) {
|
|
5784
5795
|
return console.error("Error decoding base64 string:", e), "";
|
|
5785
5796
|
}
|
|
5786
|
-
},
|
|
5797
|
+
}, gu = (t, e) => {
|
|
5787
5798
|
if (!e || e.trim() === "") return null;
|
|
5788
|
-
const n =
|
|
5799
|
+
const n = fu(e);
|
|
5789
5800
|
switch (t) {
|
|
5790
5801
|
case Ke.JSON:
|
|
5791
5802
|
return yr(n);
|
|
@@ -5799,10 +5810,10 @@ const yr = (t) => {
|
|
|
5799
5810
|
const { value: n } = e;
|
|
5800
5811
|
return typeof n != "string" ? { ...e, value: n ?? null } : {
|
|
5801
5812
|
...e,
|
|
5802
|
-
value:
|
|
5813
|
+
value: gu(e.type, n)
|
|
5803
5814
|
};
|
|
5804
5815
|
}) : [];
|
|
5805
|
-
class
|
|
5816
|
+
class mu {
|
|
5806
5817
|
constructor(e, n) {
|
|
5807
5818
|
this.transport = e, this.hosts = n;
|
|
5808
5819
|
}
|
|
@@ -5829,7 +5840,7 @@ class gu {
|
|
|
5829
5840
|
})).data };
|
|
5830
5841
|
} catch (r) {
|
|
5831
5842
|
const s = S(r, "Failed to fetch chunk transcript,");
|
|
5832
|
-
return { success: !1, error:
|
|
5843
|
+
return { success: !1, error: cu(r) ?? s.error_code };
|
|
5833
5844
|
}
|
|
5834
5845
|
}
|
|
5835
5846
|
async pollSessionOutput(e) {
|
|
@@ -5943,8 +5954,8 @@ class gu {
|
|
|
5943
5954
|
};
|
|
5944
5955
|
}
|
|
5945
5956
|
}
|
|
5946
|
-
const
|
|
5947
|
-
class
|
|
5957
|
+
const _u = 5e3;
|
|
5958
|
+
class yu {
|
|
5948
5959
|
constructor(e, n) {
|
|
5949
5960
|
this.transport = e, this.hosts = n, this.microphoneStream = null;
|
|
5950
5961
|
}
|
|
@@ -5986,7 +5997,7 @@ class _u {
|
|
|
5986
5997
|
"No internet connection detected",
|
|
5987
5998
|
{ isOnline: !1 }
|
|
5988
5999
|
);
|
|
5989
|
-
const r = new AbortController(), s = setTimeout(() => r.abort(),
|
|
6000
|
+
const r = new AbortController(), s = setTimeout(() => r.abort(), _u);
|
|
5990
6001
|
try {
|
|
5991
6002
|
await fetch("https://www.google.com/favicon.ico", {
|
|
5992
6003
|
mode: "no-cors",
|
|
@@ -6218,7 +6229,7 @@ function ln() {
|
|
|
6218
6229
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
6219
6230
|
}
|
|
6220
6231
|
var ue = ln();
|
|
6221
|
-
function
|
|
6232
|
+
function Rs(t) {
|
|
6222
6233
|
ue = t;
|
|
6223
6234
|
}
|
|
6224
6235
|
var se = { exec: () => null };
|
|
@@ -6236,14 +6247,14 @@ function E(t, e = "") {
|
|
|
6236
6247
|
}, getRegex: () => new RegExp(n, e) };
|
|
6237
6248
|
return r;
|
|
6238
6249
|
}
|
|
6239
|
-
var
|
|
6250
|
+
var Eu = ((t = "") => {
|
|
6240
6251
|
try {
|
|
6241
6252
|
return !!new RegExp("(?<=1)(?<!1)" + t);
|
|
6242
6253
|
} catch {
|
|
6243
6254
|
return !1;
|
|
6244
6255
|
}
|
|
6245
|
-
})(), I = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: pe((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: pe((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: pe((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: pe((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: pe((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: pe((t) => new RegExp(`^ {0,${t}}>`)) },
|
|
6246
|
-
]`).replace("lheading",
|
|
6256
|
+
})(), I = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: pe((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: pe((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: pe((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: pe((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: pe((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: pe((t) => new RegExp(`^ {0,${t}}>`)) }, bu = /^(?:[ \t]*(?:\n|$))+/, Su = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ku = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Le = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, xu = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, un = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ws = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ts = E(ws).replace(/bull/g, un).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Ru = E(ws).replace(/bull/g, un).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), dn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, wu = /^[^\n]+/, pn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Tu = E(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", pn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), vu = E(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, un).getRegex(), dt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", hn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Iu = E("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", hn).replace("tag", dt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), vs = E(dn).replace("hr", Le).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", dt).getRegex(), Cu = E(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vs).getRegex(), fn = { blockquote: Cu, code: Su, def: Tu, fences: ku, heading: xu, hr: Le, html: Iu, lheading: Ts, list: vu, newline: bu, paragraph: vs, table: se, text: wu }, Er = E("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Le).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", dt).getRegex(), Au = { ...fn, lheading: Ru, table: Er, paragraph: E(dn).replace("hr", Le).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Er).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", dt).getRegex() }, Du = { ...fn, html: E(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", hn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: se, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: E(dn).replace("hr", Le).replace("heading", ` *#{1,6} *[^
|
|
6257
|
+
]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Nu = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ou = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Is = /^( {2,}|\\)\n(?!\s*$)/, $u = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Se = /[\p{P}\p{S}]/u, pt = /[\s\p{P}\p{S}]/u, gn = /[^\s\p{P}\p{S}]/u, Pu = E(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, pt).getRegex(), Cs = /(?!~)[\p{P}\p{S}]/u, Lu = /(?!~)[\s\p{P}\p{S}]/u, Mu = /(?:[^\s\p{P}\p{S}]|~)/u, Fu = E(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Eu ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), As = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Uu = E(As, "u").replace(/punct/g, Se).getRegex(), Bu = E(As, "u").replace(/punct/g, Cs).getRegex(), Ds = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Hu = E(Ds, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), zu = E(Ds, "gu").replace(/notPunctSpace/g, Mu).replace(/punctSpace/g, Lu).replace(/punct/g, Cs).getRegex(), ju = E("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), qu = E(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Se).getRegex(), Gu = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Vu = E(Gu, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), Wu = E(/\\(punct)/, "gu").replace(/punct/g, Se).getRegex(), Xu = E(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ku = E(hn).replace("(?:-->|$)", "-->").getRegex(), Yu = E("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ku).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Qe = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Zu = E(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Qe).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Ns = E(/^!?\[(label)\]\[(ref)\]/).replace("label", Qe).replace("ref", pn).getRegex(), Os = E(/^!?\[(ref)\](?:\[\])?/).replace("ref", pn).getRegex(), Ju = E("reflink|nolink(?!\\()", "g").replace("reflink", Ns).replace("nolink", Os).getRegex(), br = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, mn = { _backpedal: se, anyPunctuation: Wu, autolink: Xu, blockSkip: Fu, br: Is, code: Ou, del: se, delLDelim: se, delRDelim: se, emStrongLDelim: Uu, emStrongRDelimAst: Hu, emStrongRDelimUnd: ju, escape: Nu, link: Zu, nolink: Os, punctuation: Pu, reflink: Ns, reflinkSearch: Ju, tag: Yu, text: $u, url: se }, Qu = { ...mn, link: E(/^!?\[(label)\]\((.*?)\)/).replace("label", Qe).getRegex(), reflink: E(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Qe).getRegex() }, jt = { ...mn, emStrongRDelimAst: zu, emStrongLDelim: Bu, delLDelim: qu, delRDelim: Vu, url: E(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", br).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: E(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", br).getRegex() }, ed = { ...jt, br: E(Is).replace("{2,}", "*").getRegex(), text: E(jt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, He = { normal: fn, gfm: Au, pedantic: Du }, we = { normal: mn, gfm: jt, breaks: ed, pedantic: Qu }, td = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Sr = (t) => td[t];
|
|
6247
6258
|
function U(t, e) {
|
|
6248
6259
|
if (e) {
|
|
6249
6260
|
if (I.escapeTest.test(t)) return t.replace(I.escapeReplace, Sr);
|
|
@@ -6284,7 +6295,7 @@ function Rr(t) {
|
|
|
6284
6295
|
return e.length - n <= 2 ? t : e.slice(0, n + 1).join(`
|
|
6285
6296
|
`);
|
|
6286
6297
|
}
|
|
6287
|
-
function
|
|
6298
|
+
function nd(t, e) {
|
|
6288
6299
|
if (t.indexOf(e[1]) === -1) return -1;
|
|
6289
6300
|
let n = 0;
|
|
6290
6301
|
for (let r = 0; r < t.length; r++) if (t[r] === "\\") r++;
|
|
@@ -6292,7 +6303,7 @@ function td(t, e) {
|
|
|
6292
6303
|
else if (t[r] === e[1] && (n--, n < 0)) return r;
|
|
6293
6304
|
return n > 0 ? -2 : -1;
|
|
6294
6305
|
}
|
|
6295
|
-
function
|
|
6306
|
+
function rd(t, e = 0) {
|
|
6296
6307
|
let n = e, r = "";
|
|
6297
6308
|
for (let s of t) if (s === " ") {
|
|
6298
6309
|
let i = 4 - n % 4;
|
|
@@ -6306,7 +6317,7 @@ function wr(t, e, n, r, s) {
|
|
|
6306
6317
|
let c = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: i, title: o, text: a, tokens: r.inlineTokens(a) };
|
|
6307
6318
|
return r.state.inLink = !1, c;
|
|
6308
6319
|
}
|
|
6309
|
-
function
|
|
6320
|
+
function sd(t, e, n) {
|
|
6310
6321
|
let r = t.match(n.other.indentCodeCompensation);
|
|
6311
6322
|
if (r === null) return e;
|
|
6312
6323
|
let s = r[1];
|
|
@@ -6340,7 +6351,7 @@ var et = class {
|
|
|
6340
6351
|
fences(t) {
|
|
6341
6352
|
let e = this.rules.block.fences.exec(t);
|
|
6342
6353
|
if (e) {
|
|
6343
|
-
let n = e[0], r =
|
|
6354
|
+
let n = e[0], r = sd(n, e[3] || "", this.rules);
|
|
6344
6355
|
return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
|
|
6345
6356
|
}
|
|
6346
6357
|
}
|
|
@@ -6411,16 +6422,16 @@ ${d}` : d;
|
|
|
6411
6422
|
let c = !1, l = "", d = "";
|
|
6412
6423
|
if (!(e = i.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
6413
6424
|
l = e[0], t = t.substring(l.length);
|
|
6414
|
-
let u =
|
|
6425
|
+
let u = rd(e[2].split(`
|
|
6415
6426
|
`, 1)[0], e[1].length), p = t.split(`
|
|
6416
6427
|
`, 1)[0], h = !u.trim(), f = 0;
|
|
6417
6428
|
if (this.options.pedantic ? (f = 2, d = u.trimStart()) : h ? f = e[1].length + 1 : (f = u.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, d = u.slice(f), f += e[1].length), h && this.rules.other.blankLine.test(p) && (l += p + `
|
|
6418
6429
|
`, t = t.substring(p.length + 1), c = !0), !c) {
|
|
6419
|
-
let k = this.rules.other.nextBulletRegex(f), N = this.rules.other.hrRegex(f), A = this.rules.other.fencesBeginRegex(f), ke = this.rules.other.headingBeginRegex(f),
|
|
6430
|
+
let k = this.rules.other.nextBulletRegex(f), N = this.rules.other.hrRegex(f), A = this.rules.other.fencesBeginRegex(f), ke = this.rules.other.headingBeginRegex(f), $s = this.rules.other.htmlBeginRegex(f), Ps = this.rules.other.blockquoteBeginRegex(f);
|
|
6420
6431
|
for (; t; ) {
|
|
6421
6432
|
let ht = t.split(`
|
|
6422
6433
|
`, 1)[0], xe;
|
|
6423
|
-
if (p = ht, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), xe = p) : xe = p.replace(this.rules.other.tabCharGlobal, " "), A.test(p) || ke.test(p) ||
|
|
6434
|
+
if (p = ht, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), xe = p) : xe = p.replace(this.rules.other.tabCharGlobal, " "), A.test(p) || ke.test(p) || $s.test(p) || Ps.test(p) || k.test(p) || N.test(p)) break;
|
|
6424
6435
|
if (xe.search(this.rules.other.nonSpaceChar) >= f || !p.trim()) d += `
|
|
6425
6436
|
` + xe.slice(f);
|
|
6426
6437
|
else {
|
|
@@ -6530,7 +6541,7 @@ ${d}` : d;
|
|
|
6530
6541
|
let i = V(n.slice(0, -1), "\\");
|
|
6531
6542
|
if ((n.length - i.length) % 2 === 0) return;
|
|
6532
6543
|
} else {
|
|
6533
|
-
let i =
|
|
6544
|
+
let i = nd(e[2], "()");
|
|
6534
6545
|
if (i === -2) return;
|
|
6535
6546
|
if (i > -1) {
|
|
6536
6547
|
let o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
|
|
@@ -7180,7 +7191,7 @@ ${t}</tr>
|
|
|
7180
7191
|
provideParser(t = this.block) {
|
|
7181
7192
|
return t ? M.parse : M.parseInline;
|
|
7182
7193
|
}
|
|
7183
|
-
}, w(je, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), w(je, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), je),
|
|
7194
|
+
}, w(je, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), w(je, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), je), id = class {
|
|
7184
7195
|
constructor(...t) {
|
|
7185
7196
|
w(this, "defaults", ln());
|
|
7186
7197
|
w(this, "options", this.setOptions);
|
|
@@ -7340,17 +7351,17 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
7340
7351
|
throw n;
|
|
7341
7352
|
};
|
|
7342
7353
|
}
|
|
7343
|
-
}, ae = new
|
|
7354
|
+
}, ae = new id();
|
|
7344
7355
|
function x(t, e) {
|
|
7345
7356
|
return ae.parse(t, e);
|
|
7346
7357
|
}
|
|
7347
7358
|
x.options = x.setOptions = function(t) {
|
|
7348
|
-
return ae.setOptions(t), x.defaults = ae.defaults,
|
|
7359
|
+
return ae.setOptions(t), x.defaults = ae.defaults, Rs(x.defaults), x;
|
|
7349
7360
|
};
|
|
7350
7361
|
x.getDefaults = ln;
|
|
7351
7362
|
x.defaults = ue;
|
|
7352
7363
|
x.use = function(...t) {
|
|
7353
|
-
return ae.use(...t), x.defaults = ae.defaults,
|
|
7364
|
+
return ae.use(...t), x.defaults = ae.defaults, Rs(x.defaults), x;
|
|
7354
7365
|
};
|
|
7355
7366
|
x.walkTokens = function(t, e) {
|
|
7356
7367
|
return ae.walkTokens(t, e);
|
|
@@ -7373,7 +7384,7 @@ x.parseInline;
|
|
|
7373
7384
|
M.parse;
|
|
7374
7385
|
L.lex;
|
|
7375
7386
|
var g = /* @__PURE__ */ ((t) => (t.COLLAPSED = "collapsed", t.RECORDING = "recording", t.PAUSED = "paused", t.PROCESSING = "processing", t.DONE = "done", t.ERROR = "error", t))(g || {});
|
|
7376
|
-
const
|
|
7387
|
+
const od = {
|
|
7377
7388
|
[g.COLLAPSED]: [g.RECORDING, g.ERROR],
|
|
7378
7389
|
[g.RECORDING]: [
|
|
7379
7390
|
g.PAUSED,
|
|
@@ -7389,7 +7400,7 @@ const id = {
|
|
|
7389
7400
|
[g.DONE]: [g.COLLAPSED],
|
|
7390
7401
|
[g.ERROR]: [g.COLLAPSED, g.RECORDING]
|
|
7391
7402
|
};
|
|
7392
|
-
class
|
|
7403
|
+
class ad {
|
|
7393
7404
|
constructor() {
|
|
7394
7405
|
this.state = g.COLLAPSED, this.listeners = /* @__PURE__ */ new Set();
|
|
7395
7406
|
}
|
|
@@ -7397,7 +7408,7 @@ class od {
|
|
|
7397
7408
|
return this.state;
|
|
7398
7409
|
}
|
|
7399
7410
|
canTransition(e) {
|
|
7400
|
-
return
|
|
7411
|
+
return od[this.state].includes(e);
|
|
7401
7412
|
}
|
|
7402
7413
|
transition(e) {
|
|
7403
7414
|
if (!this.canTransition(e))
|
|
@@ -7419,7 +7430,7 @@ class od {
|
|
|
7419
7430
|
this.state = g.COLLAPSED;
|
|
7420
7431
|
}
|
|
7421
7432
|
}
|
|
7422
|
-
class
|
|
7433
|
+
class cd {
|
|
7423
7434
|
constructor(e) {
|
|
7424
7435
|
this.startTime = 0, this.elapsed = 0, this.intervalId = null, this.tickCallback = e;
|
|
7425
7436
|
}
|
|
@@ -7452,7 +7463,7 @@ class ad {
|
|
|
7452
7463
|
this.intervalId !== null && (clearInterval(this.intervalId), this.intervalId = null);
|
|
7453
7464
|
}
|
|
7454
7465
|
}
|
|
7455
|
-
function
|
|
7466
|
+
function ld() {
|
|
7456
7467
|
return `
|
|
7457
7468
|
:host {
|
|
7458
7469
|
all: initial;
|
|
@@ -7849,7 +7860,7 @@ function cd() {
|
|
|
7849
7860
|
}
|
|
7850
7861
|
`;
|
|
7851
7862
|
}
|
|
7852
|
-
function
|
|
7863
|
+
function ud(t, e) {
|
|
7853
7864
|
let n = 0, r = 0, s = !1;
|
|
7854
7865
|
function i(c) {
|
|
7855
7866
|
if (c.target.closest("button")) return;
|
|
@@ -7869,12 +7880,12 @@ function ld(t, e) {
|
|
|
7869
7880
|
e.removeEventListener("mousedown", i), e.removeEventListener("touchstart", i), a();
|
|
7870
7881
|
};
|
|
7871
7882
|
}
|
|
7872
|
-
const
|
|
7873
|
-
class
|
|
7883
|
+
const dd = '<svg viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"/><rect x="14" y="4" width="4" height="16"/></svg>', pd = '<svg viewBox="0 0 24 24"><polygon points="8,4 20,12 8,20"/></svg>', Tr = '<svg viewBox="0 0 24 24"><rect x="5" y="5" width="14" height="14" rx="2"/></svg>', vr = '<svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>', ze = '<svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', hd = 20, fd = 14, wt = 3, Tt = 2;
|
|
7884
|
+
class gd {
|
|
7874
7885
|
constructor(e, n, r, s) {
|
|
7875
7886
|
this.cleanupDrag = null, this.animationId = null, this.waveformBars = [], this.actions = s, this.orientation = r, this.host = document.createElement("eka-scribe-widget"), this.shadow = this.host.attachShadow({ mode: "closed" });
|
|
7876
7887
|
const i = document.createElement("style");
|
|
7877
|
-
i.textContent =
|
|
7888
|
+
i.textContent = ld(), this.shadow.appendChild(i), this.widgetEl = document.createElement("div"), this.widgetEl.className = "widget hidden", this.widgetEl.style.zIndex = String(e), this.applyPosition(n), this.shadow.appendChild(this.widgetEl), this.contentEl = document.createElement("div"), this.widgetEl.appendChild(this.contentEl), document.body.appendChild(this.host);
|
|
7878
7889
|
}
|
|
7879
7890
|
renderState(e, n) {
|
|
7880
7891
|
switch (this.stopAnimation(), this.contentEl.className = "", e) {
|
|
@@ -7915,7 +7926,7 @@ class fd {
|
|
|
7915
7926
|
this.waveformBars = s, n.appendChild(r);
|
|
7916
7927
|
const i = document.createElement("span");
|
|
7917
7928
|
i.className = "timer", i.textContent = e, n.appendChild(i);
|
|
7918
|
-
const o = this.createButton("btn btn-play-pause",
|
|
7929
|
+
const o = this.createButton("btn btn-play-pause", dd);
|
|
7919
7930
|
o.addEventListener("click", this.actions.onPause), n.appendChild(o);
|
|
7920
7931
|
const a = this.createButton("btn btn-stop", Tr);
|
|
7921
7932
|
a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n), this.startAnimation();
|
|
@@ -7929,7 +7940,7 @@ class fd {
|
|
|
7929
7940
|
n.appendChild(r);
|
|
7930
7941
|
const i = document.createElement("span");
|
|
7931
7942
|
i.className = "timer", i.textContent = e, n.appendChild(i);
|
|
7932
|
-
const o = this.createButton("btn btn-play-pause",
|
|
7943
|
+
const o = this.createButton("btn btn-play-pause", pd);
|
|
7933
7944
|
o.addEventListener("click", this.actions.onResume), n.appendChild(o);
|
|
7934
7945
|
const a = this.createButton("btn btn-stop", Tr);
|
|
7935
7946
|
a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n);
|
|
@@ -8000,7 +8011,7 @@ class fd {
|
|
|
8000
8011
|
}
|
|
8001
8012
|
// ─── Waveform ─────────────────────────────────────────────────────────────
|
|
8002
8013
|
createWaveform() {
|
|
8003
|
-
const e = this.orientation === "vertical" ?
|
|
8014
|
+
const e = this.orientation === "vertical" ? fd : hd, n = 28, r = e * (wt + Tt) - Tt, s = n, i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
8004
8015
|
i.setAttribute("width", String(r)), i.setAttribute("height", String(s)), i.setAttribute("viewBox", `0 0 ${r} ${s}`);
|
|
8005
8016
|
const o = [], a = n * 0.4;
|
|
8006
8017
|
for (let c = 0; c < e; c++) {
|
|
@@ -8038,7 +8049,7 @@ class fd {
|
|
|
8038
8049
|
return r.className = e, r.innerHTML = n, r;
|
|
8039
8050
|
}
|
|
8040
8051
|
bindDrag(e) {
|
|
8041
|
-
this.cleanupDrag && this.cleanupDrag(), this.cleanupDrag =
|
|
8052
|
+
this.cleanupDrag && this.cleanupDrag(), this.cleanupDrag = ud(this.widgetEl, e);
|
|
8042
8053
|
}
|
|
8043
8054
|
applyPosition(e) {
|
|
8044
8055
|
e && (e.top != null && (this.widgetEl.style.top = `${e.top}px`, this.widgetEl.style.bottom = "auto"), e.bottom != null && (this.widgetEl.style.bottom = `${e.bottom}px`), e.left != null && (this.widgetEl.style.left = `${e.left}px`, this.widgetEl.style.right = "auto"), e.right != null && (this.widgetEl.style.right = `${e.right}px`));
|
|
@@ -8048,9 +8059,9 @@ class fd {
|
|
|
8048
8059
|
return n.textContent = e, n.innerHTML;
|
|
8049
8060
|
}
|
|
8050
8061
|
}
|
|
8051
|
-
class
|
|
8062
|
+
class md {
|
|
8052
8063
|
constructor(e, n) {
|
|
8053
|
-
this.currentTxnId = "", this.isProcessing = !1, this.isStarting = !1, this.sdk = e, this.config = n, this.callbacks = n.callbacks || {}, this.stateMachine = new
|
|
8064
|
+
this.currentTxnId = "", this.isProcessing = !1, this.isStarting = !1, this.sdk = e, this.config = n, this.callbacks = n.callbacks || {}, this.stateMachine = new ad(), this.timer = new cd((r) => this.renderer.updateTimer(r)), this.renderer = new gd(
|
|
8054
8065
|
n.zIndex ?? 9999,
|
|
8055
8066
|
n.position,
|
|
8056
8067
|
n.orientation || "horizontal",
|
|
@@ -8214,16 +8225,16 @@ class gd {
|
|
|
8214
8225
|
}
|
|
8215
8226
|
const O = class O {
|
|
8216
8227
|
constructor(e) {
|
|
8217
|
-
this.widgetManager = null, this.config = e, this.hosts =
|
|
8228
|
+
this.widgetManager = null, this.config = e, this.hosts = Ws(e.env), this.callbackRegistry = new Xs(), this.tracker = new Zl(e.enableTracking ?? !1);
|
|
8218
8229
|
const n = {
|
|
8219
8230
|
access_token: e.access_token,
|
|
8220
8231
|
clientId: e.clientId,
|
|
8221
8232
|
flavour: e.flavour,
|
|
8222
8233
|
onUnauthorized: () => this.handleUnauthorized()
|
|
8223
8234
|
};
|
|
8224
|
-
if (e.mode === "ipc" && e.ipcBridge ? this.transport = new
|
|
8235
|
+
if (e.mode === "ipc" && e.ipcBridge ? this.transport = new qs(n, e.ipcBridge) : this.transport = new zs(n), e.enableTracking && (this.tracker.init(e.env), e.flavour && this.tracker.setUser(e.flavour)), !e.allianceConfig?.baseUrl)
|
|
8225
8236
|
throw new Error("[EkaScribe] allianceConfig.baseUrl is required.");
|
|
8226
|
-
this.allianceClient = new
|
|
8237
|
+
this.allianceClient = new Bs({
|
|
8227
8238
|
baseUrl: e.allianceConfig.baseUrl,
|
|
8228
8239
|
accessToken: e.access_token,
|
|
8229
8240
|
mode: e.mode === "ipc" ? En.IPC : En.DIRECT,
|
|
@@ -8235,12 +8246,12 @@ const O = class O {
|
|
|
8235
8246
|
flavour: e.flavour
|
|
8236
8247
|
}), this.allianceClient.init().catch((r) => {
|
|
8237
8248
|
console.error("[EkaScribe] Alliance SDK init failed:", r);
|
|
8238
|
-
}), this.documents = new
|
|
8249
|
+
}), this.documents = new uu(this.transport, this.hosts, this.allianceClient), this.sessions = new du(this.transport, this.hosts, this.allianceClient), this.output = new mu(this.transport, this.hosts), this.recording = new hu(
|
|
8239
8250
|
this.allianceClient,
|
|
8240
8251
|
this.transport,
|
|
8241
8252
|
this.hosts,
|
|
8242
8253
|
this.tracker
|
|
8243
|
-
), e.widget?.enabled && (this.widgetManager = new
|
|
8254
|
+
), e.widget?.enabled && (this.widgetManager = new md(this, e.widget)), this.allianceClient.registerCallback("onTokenRequired", (r) => {
|
|
8244
8255
|
this.handleUnauthorized().then((s) => {
|
|
8245
8256
|
s ? r.resolve(s) : (console.error("[EkaScribe] Token refresh returned empty token."), r.resolve(""));
|
|
8246
8257
|
}).catch((s) => {
|
|
@@ -8361,7 +8372,7 @@ const O = class O {
|
|
|
8361
8372
|
}
|
|
8362
8373
|
// ─── Compatibility ─────────────────────────────────────────────────────────
|
|
8363
8374
|
async runSystemCompatibilityTest(e) {
|
|
8364
|
-
return new
|
|
8375
|
+
return new yu(this.transport, this.hosts).runCompatibilityTest(e);
|
|
8365
8376
|
}
|
|
8366
8377
|
// ─── Lifecycle ─────────────────────────────────────────────────────────────
|
|
8367
8378
|
async resetInstance() {
|
|
@@ -8380,20 +8391,20 @@ const O = class O {
|
|
|
8380
8391
|
};
|
|
8381
8392
|
O.instance = null;
|
|
8382
8393
|
let Vt = O;
|
|
8383
|
-
const
|
|
8394
|
+
const Ed = (t) => Vt.getInstance(t);
|
|
8384
8395
|
export {
|
|
8385
|
-
|
|
8386
|
-
|
|
8396
|
+
Jl as API_STATUS,
|
|
8397
|
+
ru as CALLBACK_TYPE,
|
|
8387
8398
|
v as COMPATIBILITY_TEST_STATUS,
|
|
8388
8399
|
te as COMPATIBILITY_TEST_TYPE,
|
|
8389
8400
|
y as ERROR_CODE,
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8401
|
+
nu as PROCESSING_STATUS,
|
|
8402
|
+
tu as RESULT_STATUS,
|
|
8403
|
+
eu as TEMPLATE_ID,
|
|
8393
8404
|
Ke as TEMPLATE_TYPE,
|
|
8394
|
-
|
|
8405
|
+
Ql as VAD_STATUS,
|
|
8395
8406
|
g as WidgetState,
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8407
|
+
kd as createWorkerBlobUrl,
|
|
8408
|
+
Ed as getEkaScribeInstance,
|
|
8409
|
+
xd as getWorkerUrl
|
|
8399
8410
|
};
|