@eka-care/ekascribe-ts-sdk 3.0.55 → 3.0.56
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.d.ts +1 -0
- package/dist/index.mjs +545 -542
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Ls = Object.defineProperty;
|
|
2
2
|
var Ms = (t, e, n) => e in t ? Ls(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
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,
|
|
5
|
-
import { createWorkerBlobUrl as
|
|
4
|
+
import { SessionStatus as Fs, ScribeError as yn, UploadError as Us, BACKEND_STORAGE_PROVIDER as Bs, ScribeClient as Hs, TransportMode as En } from "med-scribe-alliance-ts-sdk";
|
|
5
|
+
import { createWorkerBlobUrl as xd, getWorkerUrl as Rd } from "med-scribe-alliance-ts-sdk";
|
|
6
6
|
function Ir() {
|
|
7
7
|
try {
|
|
8
8
|
return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
|
|
@@ -10,10 +10,10 @@ function Ir() {
|
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
class
|
|
13
|
+
const zs = 1e4;
|
|
14
|
+
class js {
|
|
15
15
|
constructor(e) {
|
|
16
|
-
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 ?? zs, this.onUnauthorized = e.onUnauthorized;
|
|
17
17
|
}
|
|
18
18
|
setAuthToken(e) {
|
|
19
19
|
this.accessToken = e;
|
|
@@ -98,10 +98,10 @@ function Cr(t, e) {
|
|
|
98
98
|
}
|
|
99
99
|
return e || "Request failed";
|
|
100
100
|
}
|
|
101
|
-
const
|
|
102
|
-
class
|
|
101
|
+
const qs = 1e4;
|
|
102
|
+
class Gs {
|
|
103
103
|
constructor(e, n) {
|
|
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 ??
|
|
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 ?? qs, this.onUnauthorized = e.onUnauthorized, this.bridge = n, this.bridge.onResponse((r) => {
|
|
105
105
|
const s = r;
|
|
106
106
|
if (s?.type !== "response" || !s.correlationId) return;
|
|
107
107
|
const i = this.pendingRequests.get(s.correlationId);
|
|
@@ -184,14 +184,14 @@ class qs {
|
|
|
184
184
|
return `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
const
|
|
187
|
+
const Vs = {
|
|
188
188
|
voiceV1: "https://api.dev.eka.care/voice/api/v1",
|
|
189
189
|
voiceV2: "https://api.dev.eka.care/voice/api/v2",
|
|
190
190
|
voiceV3: "https://api.dev.eka.care/voice/api/v3",
|
|
191
191
|
cookV1: "https://deepthought-genai.dev.eka.care/api/v1",
|
|
192
192
|
ekaHost: "https://api.dev.eka.care",
|
|
193
193
|
parchiHost: "https://parchi.dev.eka.care"
|
|
194
|
-
},
|
|
194
|
+
}, Ws = {
|
|
195
195
|
voiceV1: "https://api.eka.care/voice/api/v1",
|
|
196
196
|
voiceV2: "https://api.eka.care/voice/api/v2",
|
|
197
197
|
voiceV3: "https://api.eka.care/voice/api/v3",
|
|
@@ -199,10 +199,10 @@ const Gs = {
|
|
|
199
199
|
ekaHost: "https://api.eka.care",
|
|
200
200
|
parchiHost: "https://parchi.eka.care"
|
|
201
201
|
};
|
|
202
|
-
function
|
|
203
|
-
return t === "PROD" ?
|
|
202
|
+
function Xs(t) {
|
|
203
|
+
return t === "PROD" ? Ws : Vs;
|
|
204
204
|
}
|
|
205
|
-
class
|
|
205
|
+
class Ks {
|
|
206
206
|
constructor() {
|
|
207
207
|
this.handlers = /* @__PURE__ */ new Map();
|
|
208
208
|
}
|
|
@@ -245,7 +245,7 @@ function _e(t, e, n = R) {
|
|
|
245
245
|
const r = n.__SENTRY__ = n.__SENTRY__ || {}, s = r[ie] = r[ie] || {};
|
|
246
246
|
return s[t] || (s[t] = e());
|
|
247
247
|
}
|
|
248
|
-
const
|
|
248
|
+
const Ys = [
|
|
249
249
|
"debug",
|
|
250
250
|
"info",
|
|
251
251
|
"warn",
|
|
@@ -253,7 +253,7 @@ const Ks = [
|
|
|
253
253
|
"log",
|
|
254
254
|
"assert",
|
|
255
255
|
"trace"
|
|
256
|
-
],
|
|
256
|
+
], Zs = "Sentry Logger ", Ye = {};
|
|
257
257
|
function ye(t) {
|
|
258
258
|
if (!("console" in R))
|
|
259
259
|
return t();
|
|
@@ -270,27 +270,27 @@ function ye(t) {
|
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Js() {
|
|
274
274
|
Xt().enabled = !0;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Qs() {
|
|
277
277
|
Xt().enabled = !1;
|
|
278
278
|
}
|
|
279
279
|
function Ar() {
|
|
280
280
|
return Xt().enabled;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function ei(...t) {
|
|
283
283
|
Wt("log", ...t);
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function ti(...t) {
|
|
286
286
|
Wt("warn", ...t);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function ni(...t) {
|
|
289
289
|
Wt("error", ...t);
|
|
290
290
|
}
|
|
291
291
|
function Wt(t, ...e) {
|
|
292
292
|
_ && Ar() && ye(() => {
|
|
293
|
-
R.console[t](`${
|
|
293
|
+
R.console[t](`${Zs}[${t}]:`, ...e);
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
296
|
function Xt() {
|
|
@@ -298,17 +298,17 @@ function Xt() {
|
|
|
298
298
|
}
|
|
299
299
|
const m = {
|
|
300
300
|
/** Enable logging. */
|
|
301
|
-
enable:
|
|
301
|
+
enable: Js,
|
|
302
302
|
/** Disable logging. */
|
|
303
|
-
disable:
|
|
303
|
+
disable: Qs,
|
|
304
304
|
/** Check if logging is enabled. */
|
|
305
305
|
isEnabled: Ar,
|
|
306
306
|
/** Log a message. */
|
|
307
|
-
log:
|
|
307
|
+
log: ei,
|
|
308
308
|
/** Log a warning. */
|
|
309
|
-
warn:
|
|
309
|
+
warn: ti,
|
|
310
310
|
/** Log an error. */
|
|
311
|
-
error:
|
|
311
|
+
error: ni
|
|
312
312
|
}, Dr = 50, oe = "?", bn = /\(error: (.*)\)/, Sn = /captureMessage|captureException/;
|
|
313
313
|
function Nr(...t) {
|
|
314
314
|
const e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
|
|
@@ -331,13 +331,13 @@ function Nr(...t) {
|
|
|
331
331
|
break;
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
return
|
|
334
|
+
return si(i.slice(s));
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function ri(t) {
|
|
338
338
|
return Array.isArray(t) ? Nr(...t) : t;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function si(t) {
|
|
341
341
|
if (!t.length)
|
|
342
342
|
return [];
|
|
343
343
|
const e = Array.from(t);
|
|
@@ -405,11 +405,11 @@ Error:`,
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
let gt = null;
|
|
408
|
-
function
|
|
408
|
+
function ii(t) {
|
|
409
409
|
const e = "error";
|
|
410
|
-
ce(e, t), le(e,
|
|
410
|
+
ce(e, t), le(e, oi);
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function oi() {
|
|
413
413
|
gt = R.onerror, R.onerror = function(t, e, n, r, s) {
|
|
414
414
|
return F("error", {
|
|
415
415
|
column: r,
|
|
@@ -421,11 +421,11 @@ function ii() {
|
|
|
421
421
|
}, R.onerror.__SENTRY_INSTRUMENTED__ = !0;
|
|
422
422
|
}
|
|
423
423
|
let mt = null;
|
|
424
|
-
function
|
|
424
|
+
function ai(t) {
|
|
425
425
|
const e = "unhandledrejection";
|
|
426
|
-
ce(e, t), le(e,
|
|
426
|
+
ce(e, t), le(e, ci);
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function ci() {
|
|
429
429
|
mt = R.onunhandledrejection, R.onunhandledrejection = function(t) {
|
|
430
430
|
return F("unhandledrejection", t), mt ? mt.apply(this, arguments) : !0;
|
|
431
431
|
}, R.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
|
|
@@ -451,7 +451,7 @@ function Pr(t) {
|
|
|
451
451
|
function Rn(t) {
|
|
452
452
|
return Ee(t, "DOMError");
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function li(t) {
|
|
455
455
|
return Ee(t, "DOMException");
|
|
456
456
|
}
|
|
457
457
|
function j(t) {
|
|
@@ -469,16 +469,16 @@ function Ie(t) {
|
|
|
469
469
|
function ot(t) {
|
|
470
470
|
return typeof Event < "u" && K(t, Event);
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function ui(t) {
|
|
473
473
|
return typeof Element < "u" && K(t, Element);
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function di(t) {
|
|
476
476
|
return Ee(t, "RegExp");
|
|
477
477
|
}
|
|
478
478
|
function De(t) {
|
|
479
479
|
return !!(t?.then && typeof t.then == "function");
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function pi(t) {
|
|
482
482
|
return Ie(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
|
|
483
483
|
}
|
|
484
484
|
function K(t, e) {
|
|
@@ -494,7 +494,7 @@ function Lr(t) {
|
|
|
494
494
|
function Mr(t) {
|
|
495
495
|
return typeof Request < "u" && K(t, Request);
|
|
496
496
|
}
|
|
497
|
-
const Yt = R,
|
|
497
|
+
const Yt = R, hi = 80;
|
|
498
498
|
function Fr(t, e = {}) {
|
|
499
499
|
if (!t)
|
|
500
500
|
return "<unknown>";
|
|
@@ -504,15 +504,15 @@ function Fr(t, e = {}) {
|
|
|
504
504
|
let i = 0, o = 0;
|
|
505
505
|
const a = " > ", c = a.length;
|
|
506
506
|
let l;
|
|
507
|
-
const d = Array.isArray(e) ? e : e.keyAttrs, u = !Array.isArray(e) && e.maxStringLength ||
|
|
508
|
-
for (; n && i++ < r && (l =
|
|
507
|
+
const d = Array.isArray(e) ? e : e.keyAttrs, u = !Array.isArray(e) && e.maxStringLength || hi;
|
|
508
|
+
for (; n && i++ < r && (l = fi(n, d), !(l === "html" || i > 1 && o + s.length * c + l.length >= u)); )
|
|
509
509
|
s.push(l), o += l.length, n = n.parentNode;
|
|
510
510
|
return s.reverse().join(a);
|
|
511
511
|
} catch {
|
|
512
512
|
return "<unknown>";
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function fi(t, e) {
|
|
516
516
|
const n = t, r = [];
|
|
517
517
|
if (!n?.tagName)
|
|
518
518
|
return "";
|
|
@@ -551,7 +551,7 @@ function Zt() {
|
|
|
551
551
|
return "";
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function gi(t) {
|
|
555
555
|
if (!Yt.HTMLElement)
|
|
556
556
|
return null;
|
|
557
557
|
let e = t;
|
|
@@ -626,7 +626,7 @@ function Br(t) {
|
|
|
626
626
|
}
|
|
627
627
|
function wn(t) {
|
|
628
628
|
try {
|
|
629
|
-
return
|
|
629
|
+
return ui(t) ? Fr(t) : Object.prototype.toString.call(t);
|
|
630
630
|
} catch {
|
|
631
631
|
return "<unknown>";
|
|
632
632
|
}
|
|
@@ -640,7 +640,7 @@ function Tn(t) {
|
|
|
640
640
|
} else
|
|
641
641
|
return {};
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function mi(t) {
|
|
644
644
|
const e = Object.keys(Br(t));
|
|
645
645
|
return e.sort(), e[0] ? e.join(", ") : "[object has no keys]";
|
|
646
646
|
}
|
|
@@ -675,20 +675,20 @@ function vn(t, e) {
|
|
|
675
675
|
return n.join(e);
|
|
676
676
|
}
|
|
677
677
|
function Ge(t, e, n = !1) {
|
|
678
|
-
return j(t) ?
|
|
678
|
+
return j(t) ? di(e) ? e.test(t) : j(e) ? n ? t === e : t.includes(e) : !1 : !1;
|
|
679
679
|
}
|
|
680
680
|
function lt(t, e = [], n = !1) {
|
|
681
681
|
return e.some((r) => Ge(t, r, n));
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function _i() {
|
|
684
684
|
const t = R;
|
|
685
685
|
return t.crypto || t.msCrypto;
|
|
686
686
|
}
|
|
687
687
|
let _t;
|
|
688
|
-
function
|
|
688
|
+
function yi() {
|
|
689
689
|
return Ze() * 16;
|
|
690
690
|
}
|
|
691
|
-
function P(t =
|
|
691
|
+
function P(t = _i()) {
|
|
692
692
|
try {
|
|
693
693
|
if (t?.randomUUID)
|
|
694
694
|
return at(() => t.randomUUID()).replace(/-/g, "");
|
|
@@ -698,7 +698,7 @@ function P(t = mi()) {
|
|
|
698
698
|
/[018]/g,
|
|
699
699
|
(e) => (
|
|
700
700
|
// eslint-disable-next-line no-bitwise
|
|
701
|
-
(e ^ (
|
|
701
|
+
(e ^ (yi() & 15) >> e / 4).toString(16)
|
|
702
702
|
)
|
|
703
703
|
);
|
|
704
704
|
}
|
|
@@ -727,7 +727,7 @@ function he(t, e) {
|
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
729
|
function In(t) {
|
|
730
|
-
if (
|
|
730
|
+
if (Ei(t))
|
|
731
731
|
return !0;
|
|
732
732
|
try {
|
|
733
733
|
Y(t, "__sentry_captured__", !0);
|
|
@@ -735,7 +735,7 @@ function In(t) {
|
|
|
735
735
|
}
|
|
736
736
|
return !1;
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function Ei(t) {
|
|
739
739
|
try {
|
|
740
740
|
return t.__sentry_captured__;
|
|
741
741
|
} catch {
|
|
@@ -745,7 +745,7 @@ const zr = 1e3;
|
|
|
745
745
|
function Ne() {
|
|
746
746
|
return ct() / zr;
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function bi() {
|
|
749
749
|
const { performance: t } = R;
|
|
750
750
|
if (!t?.now || !t.timeOrigin)
|
|
751
751
|
return Ne;
|
|
@@ -754,9 +754,9 @@ function Ei() {
|
|
|
754
754
|
}
|
|
755
755
|
let Cn;
|
|
756
756
|
function q() {
|
|
757
|
-
return (Cn ?? (Cn =
|
|
757
|
+
return (Cn ?? (Cn = bi()))();
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function Si(t) {
|
|
760
760
|
const e = q(), n = {
|
|
761
761
|
sid: P(),
|
|
762
762
|
init: !0,
|
|
@@ -766,7 +766,7 @@ function bi(t) {
|
|
|
766
766
|
status: "ok",
|
|
767
767
|
errors: 0,
|
|
768
768
|
ignoreDuration: !1,
|
|
769
|
-
toJSON: () =>
|
|
769
|
+
toJSON: () => xi(n)
|
|
770
770
|
};
|
|
771
771
|
return t && fe(n, t), n;
|
|
772
772
|
}
|
|
@@ -781,11 +781,11 @@ function fe(t, e = {}) {
|
|
|
781
781
|
}
|
|
782
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);
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function ki(t, e) {
|
|
785
785
|
let n = {};
|
|
786
786
|
t.status === "ok" && (n = { status: "exited" }), fe(t, n);
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function xi(t) {
|
|
789
789
|
return {
|
|
790
790
|
sid: `${t.sid}`,
|
|
791
791
|
init: t.init,
|
|
@@ -828,7 +828,7 @@ function Dn(t, e) {
|
|
|
828
828
|
function Nn(t) {
|
|
829
829
|
return t[Ct];
|
|
830
830
|
}
|
|
831
|
-
const
|
|
831
|
+
const Ri = 100;
|
|
832
832
|
class B {
|
|
833
833
|
/** Flag if notifying is happening. */
|
|
834
834
|
/** Callback for client to receive scope changes. */
|
|
@@ -1119,7 +1119,7 @@ class B {
|
|
|
1119
1119
|
* By default, the last 100 breadcrumbs are kept.
|
|
1120
1120
|
*/
|
|
1121
1121
|
addBreadcrumb(e, n) {
|
|
1122
|
-
const r = typeof n == "number" ? n :
|
|
1122
|
+
const r = typeof n == "number" ? n : Ri;
|
|
1123
1123
|
if (r <= 0)
|
|
1124
1124
|
return this;
|
|
1125
1125
|
const s = {
|
|
@@ -1255,13 +1255,13 @@ class B {
|
|
|
1255
1255
|
}), this._notifyingListeners = !1);
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1258
|
+
function wi() {
|
|
1259
1259
|
return _e("defaultCurrentScope", () => new B());
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1261
|
+
function Ti() {
|
|
1262
1262
|
return _e("defaultIsolationScope", () => new B());
|
|
1263
1263
|
}
|
|
1264
|
-
class
|
|
1264
|
+
class vi {
|
|
1265
1265
|
constructor(e, n) {
|
|
1266
1266
|
let r;
|
|
1267
1267
|
e ? r = e : r = new B();
|
|
@@ -1329,23 +1329,23 @@ class Ti {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
function ge() {
|
|
1331
1331
|
const t = nt(), e = rt(t);
|
|
1332
|
-
return e.stack = e.stack || new
|
|
1332
|
+
return e.stack = e.stack || new vi(wi(), Ti());
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1334
|
+
function Ii(t) {
|
|
1335
1335
|
return ge().withScope(t);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Ci(t, e) {
|
|
1338
1338
|
const n = ge();
|
|
1339
1339
|
return n.withScope(() => (n.getStackTop().scope = t, e(t)));
|
|
1340
1340
|
}
|
|
1341
1341
|
function On(t) {
|
|
1342
1342
|
return ge().withScope(() => t(ge().getIsolationScope()));
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function Ai() {
|
|
1345
1345
|
return {
|
|
1346
1346
|
withIsolationScope: On,
|
|
1347
|
-
withScope:
|
|
1348
|
-
withSetScope:
|
|
1347
|
+
withScope: Ii,
|
|
1348
|
+
withSetScope: Ci,
|
|
1349
1349
|
withSetIsolationScope: (t, e) => On(e),
|
|
1350
1350
|
getCurrentScope: () => ge().getScope(),
|
|
1351
1351
|
getIsolationScope: () => ge().getIsolationScope()
|
|
@@ -1353,7 +1353,7 @@ function Ci() {
|
|
|
1353
1353
|
}
|
|
1354
1354
|
function Qt(t) {
|
|
1355
1355
|
const e = rt(t);
|
|
1356
|
-
return e.acs ? e.acs :
|
|
1356
|
+
return e.acs ? e.acs : Ai();
|
|
1357
1357
|
}
|
|
1358
1358
|
function H() {
|
|
1359
1359
|
const t = nt();
|
|
@@ -1363,10 +1363,10 @@ function J() {
|
|
|
1363
1363
|
const t = nt();
|
|
1364
1364
|
return Qt(t).getIsolationScope();
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1366
|
+
function Di() {
|
|
1367
1367
|
return _e("globalScope", () => new B());
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function Ni(...t) {
|
|
1370
1370
|
const e = nt(), n = Qt(e);
|
|
1371
1371
|
if (t.length === 2) {
|
|
1372
1372
|
const [r, s] = t;
|
|
@@ -1377,15 +1377,15 @@ function Di(...t) {
|
|
|
1377
1377
|
function C() {
|
|
1378
1378
|
return H().getClient();
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1380
|
+
function Oi(t) {
|
|
1381
1381
|
const e = t.getPropagationContext(), { traceId: n, parentSpanId: r, propagationSpanId: s } = e, i = {
|
|
1382
1382
|
trace_id: n,
|
|
1383
1383
|
span_id: s || jr()
|
|
1384
1384
|
};
|
|
1385
1385
|
return r && (i.parent_span_id = r), i;
|
|
1386
1386
|
}
|
|
1387
|
-
const
|
|
1388
|
-
function
|
|
1387
|
+
const $i = "sentry.source", Pi = "sentry.sample_rate", Li = "sentry.previous_trace_sample_rate", Mi = "sentry.op", Fi = "sentry.origin", qr = "sentry.profile_id", Gr = "sentry.exclusive_time", Ui = "gen_ai.conversation.id", Bi = 0, Hi = 1, zi = "_sentryScope", ji = "_sentryIsolationScope";
|
|
1388
|
+
function qi(t) {
|
|
1389
1389
|
if (t) {
|
|
1390
1390
|
if (typeof t == "object" && "deref" in t && typeof t.deref == "function")
|
|
1391
1391
|
try {
|
|
@@ -1399,18 +1399,18 @@ function ji(t) {
|
|
|
1399
1399
|
function Vr(t) {
|
|
1400
1400
|
const e = t;
|
|
1401
1401
|
return {
|
|
1402
|
-
scope: e[
|
|
1403
|
-
isolationScope:
|
|
1402
|
+
scope: e[zi],
|
|
1403
|
+
isolationScope: qi(e[ji])
|
|
1404
1404
|
};
|
|
1405
1405
|
}
|
|
1406
|
-
const
|
|
1407
|
-
function
|
|
1408
|
-
const e =
|
|
1406
|
+
const Gi = "sentry-", Vi = /^sentry-/;
|
|
1407
|
+
function Wi(t) {
|
|
1408
|
+
const e = Xi(t);
|
|
1409
1409
|
if (!e)
|
|
1410
1410
|
return;
|
|
1411
1411
|
const n = Object.entries(e).reduce((r, [s, i]) => {
|
|
1412
|
-
if (s.match(
|
|
1413
|
-
const o = s.slice(
|
|
1412
|
+
if (s.match(Vi)) {
|
|
1413
|
+
const o = s.slice(Gi.length);
|
|
1414
1414
|
r[o] = i;
|
|
1415
1415
|
}
|
|
1416
1416
|
return r;
|
|
@@ -1418,7 +1418,7 @@ function Vi(t) {
|
|
|
1418
1418
|
if (Object.keys(n).length > 0)
|
|
1419
1419
|
return n;
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1421
|
+
function Xi(t) {
|
|
1422
1422
|
if (!(!t || !j(t) && !Array.isArray(t)))
|
|
1423
1423
|
return Array.isArray(t) ? t.reduce((e, n) => {
|
|
1424
1424
|
const r = $n(n);
|
|
@@ -1442,16 +1442,16 @@ function $n(t) {
|
|
|
1442
1442
|
});
|
|
1443
1443
|
}).reduce((e, [n, r]) => (n && r && (e[n] = r), e), {});
|
|
1444
1444
|
}
|
|
1445
|
-
const
|
|
1446
|
-
function
|
|
1445
|
+
const Ki = /^o(\d+)\./, Yi = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;
|
|
1446
|
+
function Zi(t) {
|
|
1447
1447
|
return t === "http" || t === "https";
|
|
1448
1448
|
}
|
|
1449
1449
|
function $e(t, e = !1) {
|
|
1450
1450
|
const { host: n, path: r, pass: s, port: i, projectId: o, protocol: a, publicKey: c } = t;
|
|
1451
1451
|
return `${a}://${c}${e && s ? `:${s}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${o}`;
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1454
|
-
const e =
|
|
1453
|
+
function Ji(t) {
|
|
1454
|
+
const e = Yi.exec(t);
|
|
1455
1455
|
if (!e) {
|
|
1456
1456
|
ye(() => {
|
|
1457
1457
|
console.error(`Invalid Sentry Dsn: ${t}`);
|
|
@@ -1478,26 +1478,26 @@ function Wr(t) {
|
|
|
1478
1478
|
projectId: t.projectId
|
|
1479
1479
|
};
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1481
|
+
function Qi(t) {
|
|
1482
1482
|
if (!_)
|
|
1483
1483
|
return !0;
|
|
1484
1484
|
const { port: e, projectId: n, protocol: r } = t;
|
|
1485
|
-
return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? !1 : (m.error(`Invalid Sentry Dsn: ${o} missing`), !0)) ? !1 : n.match(/^\d+$/) ?
|
|
1486
|
-
}
|
|
1487
|
-
function Qi(t) {
|
|
1488
|
-
return t.match(Xi)?.[1];
|
|
1485
|
+
return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? !1 : (m.error(`Invalid Sentry Dsn: ${o} missing`), !0)) ? !1 : n.match(/^\d+$/) ? Zi(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);
|
|
1489
1486
|
}
|
|
1490
1487
|
function eo(t) {
|
|
1488
|
+
return t.match(Ki)?.[1];
|
|
1489
|
+
}
|
|
1490
|
+
function to(t) {
|
|
1491
1491
|
const e = t.getOptions(), { host: n } = t.getDsn() || {};
|
|
1492
1492
|
let r;
|
|
1493
|
-
return e.orgId ? r = String(e.orgId) : n && (r =
|
|
1493
|
+
return e.orgId ? r = String(e.orgId) : n && (r = eo(n)), r;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1496
|
-
const e = typeof t == "string" ?
|
|
1497
|
-
if (!(!e || !
|
|
1495
|
+
function no(t) {
|
|
1496
|
+
const e = typeof t == "string" ? Ji(t) : Wr(t);
|
|
1497
|
+
if (!(!e || !Qi(e)))
|
|
1498
1498
|
return e;
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function ro(t) {
|
|
1501
1501
|
if (typeof t == "boolean")
|
|
1502
1502
|
return Number(t);
|
|
1503
1503
|
const e = typeof t == "string" ? parseFloat(t) : t;
|
|
@@ -1506,7 +1506,7 @@ function no(t) {
|
|
|
1506
1506
|
}
|
|
1507
1507
|
const Xr = 1;
|
|
1508
1508
|
let Pn = !1;
|
|
1509
|
-
function
|
|
1509
|
+
function so(t) {
|
|
1510
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;
|
|
1511
1511
|
return {
|
|
1512
1512
|
parent_span_id: s,
|
|
@@ -1514,7 +1514,7 @@ function ro(t) {
|
|
|
1514
1514
|
trace_id: n
|
|
1515
1515
|
};
|
|
1516
1516
|
}
|
|
1517
|
-
function
|
|
1517
|
+
function io(t) {
|
|
1518
1518
|
if (t && t.length > 0)
|
|
1519
1519
|
return t.map(({ context: { spanId: e, traceId: n, traceFlags: r, ...s }, attributes: i }) => ({
|
|
1520
1520
|
span_id: e,
|
|
@@ -1531,10 +1531,10 @@ function Mn(t) {
|
|
|
1531
1531
|
return t > 9999999999 ? t / 1e3 : t;
|
|
1532
1532
|
}
|
|
1533
1533
|
function en(t) {
|
|
1534
|
-
if (
|
|
1534
|
+
if (ao(t))
|
|
1535
1535
|
return t.getSpanJSON();
|
|
1536
1536
|
const { spanId: e, traceId: n } = t.spanContext();
|
|
1537
|
-
if (
|
|
1537
|
+
if (oo(t)) {
|
|
1538
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;
|
|
1539
1539
|
return {
|
|
1540
1540
|
span_id: e,
|
|
@@ -1545,10 +1545,10 @@ function en(t) {
|
|
|
1545
1545
|
start_timestamp: Ln(s),
|
|
1546
1546
|
// This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
|
|
1547
1547
|
timestamp: Ln(o) || void 0,
|
|
1548
|
-
status:
|
|
1549
|
-
op: r[
|
|
1550
|
-
origin: r[
|
|
1551
|
-
links:
|
|
1548
|
+
status: lo(a),
|
|
1549
|
+
op: r[Mi],
|
|
1550
|
+
origin: r[Fi],
|
|
1551
|
+
links: io(c)
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
1554
|
return {
|
|
@@ -1558,24 +1558,24 @@ function en(t) {
|
|
|
1558
1558
|
data: {}
|
|
1559
1559
|
};
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1561
|
+
function oo(t) {
|
|
1562
1562
|
const e = t;
|
|
1563
1563
|
return !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status;
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function ao(t) {
|
|
1566
1566
|
return typeof t.getSpanJSON == "function";
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function co(t) {
|
|
1569
1569
|
const { traceFlags: e } = t.spanContext();
|
|
1570
1570
|
return e === Xr;
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
1573
|
-
if (!(!t || t.code ===
|
|
1574
|
-
return t.code ===
|
|
1572
|
+
function lo(t) {
|
|
1573
|
+
if (!(!t || t.code === Bi))
|
|
1574
|
+
return t.code === Hi ? "ok" : t.message || "internal_error";
|
|
1575
1575
|
}
|
|
1576
|
-
const
|
|
1576
|
+
const uo = "_sentryRootSpan";
|
|
1577
1577
|
function Kr(t) {
|
|
1578
|
-
return t[
|
|
1578
|
+
return t[uo] || t;
|
|
1579
1579
|
}
|
|
1580
1580
|
function Fn() {
|
|
1581
1581
|
Pn || (ye(() => {
|
|
@@ -1584,7 +1584,7 @@ function Fn() {
|
|
|
1584
1584
|
);
|
|
1585
1585
|
}), Pn = !0);
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function po(t) {
|
|
1588
1588
|
if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__)
|
|
1589
1589
|
return !1;
|
|
1590
1590
|
const e = C()?.getOptions();
|
|
@@ -1598,7 +1598,7 @@ function Bn(t, e) {
|
|
|
1598
1598
|
if (!e?.length || !t.description)
|
|
1599
1599
|
return !1;
|
|
1600
1600
|
for (const n of e) {
|
|
1601
|
-
if (
|
|
1601
|
+
if (fo(n)) {
|
|
1602
1602
|
if (Ge(t.description, n))
|
|
1603
1603
|
return _ && Un(t), !0;
|
|
1604
1604
|
continue;
|
|
@@ -1611,46 +1611,46 @@ function Bn(t, e) {
|
|
|
1611
1611
|
}
|
|
1612
1612
|
return !1;
|
|
1613
1613
|
}
|
|
1614
|
-
function
|
|
1614
|
+
function ho(t, e) {
|
|
1615
1615
|
const n = e.parent_span_id, r = e.span_id;
|
|
1616
1616
|
if (n)
|
|
1617
1617
|
for (const s of t)
|
|
1618
1618
|
s.parent_span_id === r && (s.parent_span_id = n);
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1620
|
+
function fo(t) {
|
|
1621
1621
|
return typeof t == "string" || t instanceof RegExp;
|
|
1622
1622
|
}
|
|
1623
|
-
const tn = "production",
|
|
1623
|
+
const tn = "production", go = "_frozenDsc";
|
|
1624
1624
|
function Yr(t, e) {
|
|
1625
1625
|
const n = e.getOptions(), { publicKey: r } = e.getDsn() || {}, s = {
|
|
1626
1626
|
environment: n.environment || tn,
|
|
1627
1627
|
release: n.release,
|
|
1628
1628
|
public_key: r,
|
|
1629
1629
|
trace_id: t,
|
|
1630
|
-
org_id:
|
|
1630
|
+
org_id: to(e)
|
|
1631
1631
|
};
|
|
1632
1632
|
return e.emit("createDsc", s), s;
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function mo(t, e) {
|
|
1635
1635
|
const n = e.getPropagationContext();
|
|
1636
1636
|
return n.dsc || Yr(n.traceId, t);
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1638
|
+
function _o(t) {
|
|
1639
1639
|
const e = C();
|
|
1640
1640
|
if (!e)
|
|
1641
1641
|
return {};
|
|
1642
|
-
const n = Kr(t), r = en(n), s = r.data, i = n.spanContext().traceState, o = i?.get("sentry.sample_rate") ?? s[
|
|
1642
|
+
const n = Kr(t), r = en(n), s = r.data, i = n.spanContext().traceState, o = i?.get("sentry.sample_rate") ?? s[Pi] ?? s[Li];
|
|
1643
1643
|
function a(f) {
|
|
1644
1644
|
return (typeof o == "number" || typeof o == "string") && (f.sample_rate = `${o}`), f;
|
|
1645
1645
|
}
|
|
1646
|
-
const c = n[
|
|
1646
|
+
const c = n[go];
|
|
1647
1647
|
if (c)
|
|
1648
1648
|
return a(c);
|
|
1649
|
-
const l = i?.get("sentry.dsc"), d = l &&
|
|
1649
|
+
const l = i?.get("sentry.dsc"), d = l && Wi(l);
|
|
1650
1650
|
if (d)
|
|
1651
1651
|
return a(d);
|
|
1652
|
-
const u = Yr(t.spanContext().traceId, e), p = s[
|
|
1653
|
-
return p !== "url" && h && (u.transaction = h),
|
|
1652
|
+
const u = Yr(t.spanContext().traceId, e), p = s[$i], h = r.description;
|
|
1653
|
+
return p !== "url" && h && (u.transaction = h), po() && (u.sampled = String(co(n)), u.sample_rand = // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans
|
|
1654
1654
|
// The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span
|
|
1655
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)
|
|
1656
1656
|
Vr(n).scope?.getPropagationContext().sampleRand.toString()), a(u), e.emit("createDsc", u, n), u;
|
|
@@ -1664,14 +1664,14 @@ function z(t, e = 100, n = 1 / 0) {
|
|
|
1664
1664
|
}
|
|
1665
1665
|
function Zr(t, e = 3, n = 100 * 1024) {
|
|
1666
1666
|
const r = z(t, e);
|
|
1667
|
-
return
|
|
1667
|
+
return So(r) > n ? Zr(t, e - 1, n) : r;
|
|
1668
1668
|
}
|
|
1669
|
-
function At(t, e, n = 1 / 0, r = 1 / 0, s =
|
|
1669
|
+
function At(t, e, n = 1 / 0, r = 1 / 0, s = ko()) {
|
|
1670
1670
|
const [i, o] = s;
|
|
1671
1671
|
if (e == null || // this matches null and undefined -> eqeq not eqeqeq
|
|
1672
1672
|
["boolean", "string"].includes(typeof e) || typeof e == "number" && Number.isFinite(e))
|
|
1673
1673
|
return e;
|
|
1674
|
-
const a =
|
|
1674
|
+
const a = yo(t, e);
|
|
1675
1675
|
if (!a.startsWith("[object "))
|
|
1676
1676
|
return a;
|
|
1677
1677
|
if (e.__sentry_skip_normalization__)
|
|
@@ -1703,7 +1703,7 @@ function At(t, e, n = 1 / 0, r = 1 / 0, s = So()) {
|
|
|
1703
1703
|
}
|
|
1704
1704
|
return o(e), d;
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1706
|
+
function yo(t, e) {
|
|
1707
1707
|
try {
|
|
1708
1708
|
if (t === "domain" && e && typeof e == "object" && e._events)
|
|
1709
1709
|
return "[Domain]";
|
|
@@ -1717,7 +1717,7 @@ function _o(t, e) {
|
|
|
1717
1717
|
return "[Document]";
|
|
1718
1718
|
if (Lr(e))
|
|
1719
1719
|
return Or(e);
|
|
1720
|
-
if (
|
|
1720
|
+
if (pi(e))
|
|
1721
1721
|
return "[SyntheticEvent]";
|
|
1722
1722
|
if (typeof e == "number" && !Number.isFinite(e))
|
|
1723
1723
|
return `[${e}]`;
|
|
@@ -1727,23 +1727,23 @@ function _o(t, e) {
|
|
|
1727
1727
|
return `[${String(e)}]`;
|
|
1728
1728
|
if (typeof e == "bigint")
|
|
1729
1729
|
return `[BigInt: ${String(e)}]`;
|
|
1730
|
-
const n =
|
|
1730
|
+
const n = Eo(e);
|
|
1731
1731
|
return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
|
|
1732
1732
|
} catch (n) {
|
|
1733
1733
|
return `**non-serializable** (${n})`;
|
|
1734
1734
|
}
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1736
|
+
function Eo(t) {
|
|
1737
1737
|
const e = Object.getPrototypeOf(t);
|
|
1738
1738
|
return e?.constructor ? e.constructor.name : "null prototype";
|
|
1739
1739
|
}
|
|
1740
|
-
function
|
|
1740
|
+
function bo(t) {
|
|
1741
1741
|
return ~-encodeURI(t).split(/%..|./).length;
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1744
|
-
return
|
|
1743
|
+
function So(t) {
|
|
1744
|
+
return bo(JSON.stringify(t));
|
|
1745
1745
|
}
|
|
1746
|
-
function
|
|
1746
|
+
function ko() {
|
|
1747
1747
|
const t = /* @__PURE__ */ new WeakSet();
|
|
1748
1748
|
function e(r) {
|
|
1749
1749
|
return t.has(r) ? !0 : (t.add(r), !1);
|
|
@@ -1756,7 +1756,7 @@ function So() {
|
|
|
1756
1756
|
function be(t, e = []) {
|
|
1757
1757
|
return [t, e];
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1759
|
+
function xo(t, e) {
|
|
1760
1760
|
const [n, r] = t;
|
|
1761
1761
|
return [n, [...r, e]];
|
|
1762
1762
|
}
|
|
@@ -1769,14 +1769,14 @@ function Dt(t, e) {
|
|
|
1769
1769
|
}
|
|
1770
1770
|
return !1;
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1772
|
+
function Ro(t, e) {
|
|
1773
1773
|
return Dt(t, (n, r) => e.includes(r));
|
|
1774
1774
|
}
|
|
1775
1775
|
function Nt(t) {
|
|
1776
1776
|
const e = rt(R);
|
|
1777
1777
|
return e.encodePolyfill ? e.encodePolyfill(t) : new TextEncoder().encode(t);
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1779
|
+
function wo(t) {
|
|
1780
1780
|
const [e, n] = t;
|
|
1781
1781
|
let r = JSON.stringify(e);
|
|
1782
1782
|
function s(i) {
|
|
@@ -1798,16 +1798,16 @@ ${JSON.stringify(o)}
|
|
|
1798
1798
|
s(c);
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
|
-
return typeof r == "string" ? r :
|
|
1801
|
+
return typeof r == "string" ? r : To(r);
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function To(t) {
|
|
1804
1804
|
const e = t.reduce((s, i) => s + i.length, 0), n = new Uint8Array(e);
|
|
1805
1805
|
let r = 0;
|
|
1806
1806
|
for (const s of t)
|
|
1807
1807
|
n.set(s, r), r += s.length;
|
|
1808
1808
|
return n;
|
|
1809
1809
|
}
|
|
1810
|
-
function
|
|
1810
|
+
function vo(t) {
|
|
1811
1811
|
const e = typeof t.data == "string" ? Nt(t.data) : t.data;
|
|
1812
1812
|
return [
|
|
1813
1813
|
{
|
|
@@ -1820,7 +1820,7 @@ function To(t) {
|
|
|
1820
1820
|
e
|
|
1821
1821
|
];
|
|
1822
1822
|
}
|
|
1823
|
-
const
|
|
1823
|
+
const Io = {
|
|
1824
1824
|
session: "session",
|
|
1825
1825
|
sessions: "session",
|
|
1826
1826
|
attachment: "attachment",
|
|
@@ -1841,7 +1841,7 @@ const vo = {
|
|
|
1841
1841
|
trace_metric: "metric"
|
|
1842
1842
|
};
|
|
1843
1843
|
function Hn(t) {
|
|
1844
|
-
return
|
|
1844
|
+
return Io[t];
|
|
1845
1845
|
}
|
|
1846
1846
|
function Jr(t) {
|
|
1847
1847
|
if (!t?.sdk)
|
|
@@ -1849,7 +1849,7 @@ function Jr(t) {
|
|
|
1849
1849
|
const { name: e, version: n } = t.sdk;
|
|
1850
1850
|
return { name: e, version: n };
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1852
|
+
function Co(t, e, n, r) {
|
|
1853
1853
|
const s = t.sdkProcessingMetadata?.dynamicSamplingContext;
|
|
1854
1854
|
return {
|
|
1855
1855
|
event_id: t.event_id,
|
|
@@ -1861,7 +1861,7 @@ function Io(t, e, n, r) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
};
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1864
|
+
function Ao(t, e) {
|
|
1865
1865
|
if (!e)
|
|
1866
1866
|
return t;
|
|
1867
1867
|
const n = t.sdk || {};
|
|
@@ -1877,7 +1877,7 @@ function Co(t, e) {
|
|
|
1877
1877
|
} : void 0
|
|
1878
1878
|
}, t;
|
|
1879
1879
|
}
|
|
1880
|
-
function
|
|
1880
|
+
function Do(t, e, n, r) {
|
|
1881
1881
|
const s = Jr(n), i = {
|
|
1882
1882
|
sent_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1883
1883
|
...s && { sdk: s },
|
|
@@ -1885,10 +1885,10 @@ function Ao(t, e, n, r) {
|
|
|
1885
1885
|
}, o = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
|
|
1886
1886
|
return be(i, [o]);
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function No(t, e, n, r) {
|
|
1889
1889
|
const s = Jr(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
|
|
1890
|
-
|
|
1891
|
-
const o =
|
|
1890
|
+
Ao(t, n?.sdk);
|
|
1891
|
+
const o = Co(t, s, r, e);
|
|
1892
1892
|
return delete t.sdkProcessingMetadata, be(o, [[{ type: i }, t]]);
|
|
1893
1893
|
}
|
|
1894
1894
|
const yt = 0, zn = 1, jn = 2;
|
|
@@ -1989,7 +1989,7 @@ class Ce {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
|
-
function
|
|
1992
|
+
function Oo(t, e, n, r = 0) {
|
|
1993
1993
|
try {
|
|
1994
1994
|
const s = Ot(e, n, t, r);
|
|
1995
1995
|
return De(s) ? s : Pe(s);
|
|
@@ -2005,7 +2005,7 @@ function Ot(t, e, n, r) {
|
|
|
2005
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);
|
|
2006
2006
|
}
|
|
2007
2007
|
let Q, qn, Gn, G;
|
|
2008
|
-
function
|
|
2008
|
+
function $o(t) {
|
|
2009
2009
|
const e = R._sentryDebugIds, n = R._debugIds;
|
|
2010
2010
|
if (!e && !n)
|
|
2011
2011
|
return {};
|
|
@@ -2032,9 +2032,9 @@ function Oo(t) {
|
|
|
2032
2032
|
};
|
|
2033
2033
|
return e && i(r, e), n && i(s, n), G;
|
|
2034
2034
|
}
|
|
2035
|
-
function
|
|
2035
|
+
function Po(t, e) {
|
|
2036
2036
|
const { fingerprint: n, span: r, breadcrumbs: s, sdkProcessingMetadata: i } = e;
|
|
2037
|
-
|
|
2037
|
+
Lo(t, e), r && Uo(t, r), Bo(t, n), Mo(t, s), Fo(t, i);
|
|
2038
2038
|
}
|
|
2039
2039
|
function Vn(t, e) {
|
|
2040
2040
|
const {
|
|
@@ -2059,56 +2059,56 @@ function Re(t, e, n) {
|
|
|
2059
2059
|
t[e] = Oe(t[e], n, 1);
|
|
2060
2060
|
}
|
|
2061
2061
|
function Qr(t, e) {
|
|
2062
|
-
const n =
|
|
2062
|
+
const n = Di().getScopeData();
|
|
2063
2063
|
return t && Vn(n, t.getScopeData()), e && Vn(n, e.getScopeData()), n;
|
|
2064
2064
|
}
|
|
2065
|
-
function
|
|
2065
|
+
function Lo(t, e) {
|
|
2066
2066
|
const { extra: n, tags: r, user: s, contexts: i, level: o, transactionName: a } = e;
|
|
2067
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);
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2069
|
+
function Mo(t, e) {
|
|
2070
2070
|
const n = [...t.breadcrumbs || [], ...e];
|
|
2071
2071
|
t.breadcrumbs = n.length ? n : void 0;
|
|
2072
2072
|
}
|
|
2073
|
-
function
|
|
2073
|
+
function Fo(t, e) {
|
|
2074
2074
|
t.sdkProcessingMetadata = {
|
|
2075
2075
|
...t.sdkProcessingMetadata,
|
|
2076
2076
|
...e
|
|
2077
2077
|
};
|
|
2078
2078
|
}
|
|
2079
|
-
function
|
|
2079
|
+
function Uo(t, e) {
|
|
2080
2080
|
t.contexts = {
|
|
2081
|
-
trace:
|
|
2081
|
+
trace: so(e),
|
|
2082
2082
|
...t.contexts
|
|
2083
2083
|
}, t.sdkProcessingMetadata = {
|
|
2084
|
-
dynamicSamplingContext:
|
|
2084
|
+
dynamicSamplingContext: _o(e),
|
|
2085
2085
|
...t.sdkProcessingMetadata
|
|
2086
2086
|
};
|
|
2087
2087
|
const n = Kr(e), r = en(n).description;
|
|
2088
2088
|
r && !t.transaction && t.type === "transaction" && (t.transaction = r);
|
|
2089
2089
|
}
|
|
2090
|
-
function
|
|
2090
|
+
function Bo(t, e) {
|
|
2091
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;
|
|
2092
2092
|
}
|
|
2093
|
-
function
|
|
2093
|
+
function Ho(t, e, n, r, s, i) {
|
|
2094
2094
|
const { normalizeDepth: o = 3, normalizeMaxBreadth: a = 1e3 } = t, c = {
|
|
2095
2095
|
...e,
|
|
2096
2096
|
event_id: e.event_id || n.event_id || P(),
|
|
2097
2097
|
timestamp: e.timestamp || Ne()
|
|
2098
2098
|
}, l = n.integrations || t.integrations.map((A) => A.name);
|
|
2099
|
-
|
|
2100
|
-
const d =
|
|
2099
|
+
zo(c, t), Go(c, l), s && s.emit("applyFrameMetadata", e), e.type === void 0 && jo(c, t.stackParser);
|
|
2100
|
+
const d = Wo(r, n.captureContext);
|
|
2101
2101
|
n.mechanism && he(c, n.mechanism);
|
|
2102
2102
|
const u = s ? s.getEventProcessors() : [], p = Qr(i, d), h = [...n.attachments || [], ...p.attachments];
|
|
2103
|
-
h.length && (n.attachments = h),
|
|
2103
|
+
h.length && (n.attachments = h), Po(c, p);
|
|
2104
2104
|
const f = [
|
|
2105
2105
|
...u,
|
|
2106
2106
|
// Run scope event processors _after_ all other processors
|
|
2107
2107
|
...p.eventProcessors
|
|
2108
2108
|
];
|
|
2109
|
-
return (n.data && n.data.__sentry__ === !0 ? Pe(c) :
|
|
2109
|
+
return (n.data && n.data.__sentry__ === !0 ? Pe(c) : Oo(f, c, n)).then((A) => (A && qo(A), typeof o == "number" && o > 0 ? Vo(A, o, a) : A));
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2111
|
+
function zo(t, e) {
|
|
2112
2112
|
const { environment: n, release: r, dist: s, maxValueLength: i } = e;
|
|
2113
2113
|
t.environment = t.environment || n || tn, !t.release && r && (t.release = r), !t.dist && s && (t.dist = s);
|
|
2114
2114
|
const o = t.request;
|
|
@@ -2116,15 +2116,15 @@ function Ho(t, e) {
|
|
|
2116
2116
|
a.value && (a.value = vt(a.value, i));
|
|
2117
2117
|
});
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2120
|
-
const n =
|
|
2119
|
+
function jo(t, e) {
|
|
2120
|
+
const n = $o(e);
|
|
2121
2121
|
t.exception?.values?.forEach((r) => {
|
|
2122
2122
|
r.stacktrace?.frames?.forEach((s) => {
|
|
2123
2123
|
s.filename && (s.debug_id = n[s.filename]);
|
|
2124
2124
|
});
|
|
2125
2125
|
});
|
|
2126
2126
|
}
|
|
2127
|
-
function
|
|
2127
|
+
function qo(t) {
|
|
2128
2128
|
const e = {};
|
|
2129
2129
|
if (t.exception?.values?.forEach((r) => {
|
|
2130
2130
|
r.stacktrace?.frames?.forEach((s) => {
|
|
@@ -2142,10 +2142,10 @@ function jo(t) {
|
|
|
2142
2142
|
});
|
|
2143
2143
|
});
|
|
2144
2144
|
}
|
|
2145
|
-
function
|
|
2145
|
+
function Go(t, e) {
|
|
2146
2146
|
e.length > 0 && (t.sdk = t.sdk || {}, t.sdk.integrations = [...t.sdk.integrations || [], ...e]);
|
|
2147
2147
|
}
|
|
2148
|
-
function
|
|
2148
|
+
function Vo(t, e, n) {
|
|
2149
2149
|
if (!t)
|
|
2150
2150
|
return null;
|
|
2151
2151
|
const r = {
|
|
@@ -2175,22 +2175,22 @@ function Go(t, e, n) {
|
|
|
2175
2175
|
}
|
|
2176
2176
|
}))), t.contexts?.flags && r.contexts && (r.contexts.flags = z(t.contexts.flags, 3, n)), r;
|
|
2177
2177
|
}
|
|
2178
|
-
function
|
|
2178
|
+
function Wo(t, e) {
|
|
2179
2179
|
if (!e)
|
|
2180
2180
|
return t;
|
|
2181
2181
|
const n = t ? t.clone() : new B();
|
|
2182
2182
|
return n.update(e), n;
|
|
2183
2183
|
}
|
|
2184
|
-
function
|
|
2184
|
+
function Xo(t) {
|
|
2185
2185
|
if (t)
|
|
2186
|
-
return
|
|
2186
|
+
return Ko(t) ? { captureContext: t } : Zo(t) ? {
|
|
2187
2187
|
captureContext: t
|
|
2188
2188
|
} : t;
|
|
2189
2189
|
}
|
|
2190
|
-
function
|
|
2190
|
+
function Ko(t) {
|
|
2191
2191
|
return t instanceof B || typeof t == "function";
|
|
2192
2192
|
}
|
|
2193
|
-
const
|
|
2193
|
+
const Yo = [
|
|
2194
2194
|
"user",
|
|
2195
2195
|
"level",
|
|
2196
2196
|
"extra",
|
|
@@ -2199,24 +2199,24 @@ const Ko = [
|
|
|
2199
2199
|
"fingerprint",
|
|
2200
2200
|
"propagationContext"
|
|
2201
2201
|
];
|
|
2202
|
-
function
|
|
2203
|
-
return Object.keys(t).some((e) =>
|
|
2202
|
+
function Zo(t) {
|
|
2203
|
+
return Object.keys(t).some((e) => Yo.includes(e));
|
|
2204
2204
|
}
|
|
2205
2205
|
function es(t, e) {
|
|
2206
|
-
return H().captureException(t,
|
|
2206
|
+
return H().captureException(t, Xo(e));
|
|
2207
2207
|
}
|
|
2208
|
-
function
|
|
2208
|
+
function Jo(t, e) {
|
|
2209
2209
|
const n = typeof e == "string" ? e : void 0, r = typeof e != "string" ? { captureContext: e } : void 0;
|
|
2210
2210
|
return H().captureMessage(t, n, r);
|
|
2211
2211
|
}
|
|
2212
2212
|
function ts(t, e) {
|
|
2213
2213
|
return H().captureEvent(t, e);
|
|
2214
2214
|
}
|
|
2215
|
-
function
|
|
2215
|
+
function Qo(t) {
|
|
2216
2216
|
J().setUser(t);
|
|
2217
2217
|
}
|
|
2218
2218
|
function Wn(t) {
|
|
2219
|
-
const e = J(), { user: n } = Qr(e, H()), { userAgent: r } = R.navigator || {}, s =
|
|
2219
|
+
const e = J(), { user: n } = Qr(e, H()), { userAgent: r } = R.navigator || {}, s = Si({
|
|
2220
2220
|
user: n,
|
|
2221
2221
|
...r && { userAgent: r },
|
|
2222
2222
|
...t
|
|
@@ -2225,7 +2225,7 @@ function Wn(t) {
|
|
|
2225
2225
|
}
|
|
2226
2226
|
function ns() {
|
|
2227
2227
|
const t = J(), n = H().getSession() || t.getSession();
|
|
2228
|
-
n &&
|
|
2228
|
+
n && ki(n), rs(), t.setSession();
|
|
2229
2229
|
}
|
|
2230
2230
|
function rs() {
|
|
2231
2231
|
const t = J(), e = C(), n = t.getSession();
|
|
@@ -2238,32 +2238,32 @@ function Et(t = !1) {
|
|
|
2238
2238
|
}
|
|
2239
2239
|
rs();
|
|
2240
2240
|
}
|
|
2241
|
-
const
|
|
2242
|
-
function
|
|
2241
|
+
const ea = "7";
|
|
2242
|
+
function ta(t) {
|
|
2243
2243
|
const e = t.protocol ? `${t.protocol}:` : "", n = t.port ? `:${t.port}` : "";
|
|
2244
2244
|
return `${e}//${t.host}${n}${t.path ? `/${t.path}` : ""}/api/`;
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2247
|
-
return `${
|
|
2246
|
+
function na(t) {
|
|
2247
|
+
return `${ta(t)}${t.projectId}/envelope/`;
|
|
2248
2248
|
}
|
|
2249
|
-
function
|
|
2249
|
+
function ra(t, e) {
|
|
2250
2250
|
const n = {
|
|
2251
|
-
sentry_version:
|
|
2251
|
+
sentry_version: ea
|
|
2252
2252
|
};
|
|
2253
2253
|
return t.publicKey && (n.sentry_key = t.publicKey), e && (n.sentry_client = `${e.name}/${e.version}`), new URLSearchParams(n).toString();
|
|
2254
2254
|
}
|
|
2255
|
-
function
|
|
2256
|
-
return e || `${
|
|
2255
|
+
function sa(t, e, n) {
|
|
2256
|
+
return e || `${na(t)}?${ra(t, n)}`;
|
|
2257
2257
|
}
|
|
2258
2258
|
const Xn = [];
|
|
2259
|
-
function
|
|
2259
|
+
function ia(t) {
|
|
2260
2260
|
const e = {};
|
|
2261
2261
|
return t.forEach((n) => {
|
|
2262
2262
|
const { name: r } = n, s = e[r];
|
|
2263
2263
|
s && !s.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
|
|
2264
2264
|
}), Object.values(e);
|
|
2265
2265
|
}
|
|
2266
|
-
function
|
|
2266
|
+
function oa(t) {
|
|
2267
2267
|
const e = t.defaultIntegrations || [], n = t.integrations;
|
|
2268
2268
|
e.forEach((s) => {
|
|
2269
2269
|
s.isDefaultInstance = !0;
|
|
@@ -2276,9 +2276,9 @@ function ia(t) {
|
|
|
2276
2276
|
r = Array.isArray(s) ? s : [s];
|
|
2277
2277
|
} else
|
|
2278
2278
|
r = e;
|
|
2279
|
-
return
|
|
2279
|
+
return ia(r);
|
|
2280
2280
|
}
|
|
2281
|
-
function
|
|
2281
|
+
function aa(t, e) {
|
|
2282
2282
|
const n = {};
|
|
2283
2283
|
return e.forEach((r) => {
|
|
2284
2284
|
r && ss(t, r, n);
|
|
@@ -2305,7 +2305,7 @@ function ss(t, e, n) {
|
|
|
2305
2305
|
}
|
|
2306
2306
|
_ && m.log(`Integration installed: ${e.name}`);
|
|
2307
2307
|
}
|
|
2308
|
-
function
|
|
2308
|
+
function ca(t) {
|
|
2309
2309
|
return [
|
|
2310
2310
|
{
|
|
2311
2311
|
type: "log",
|
|
@@ -2317,27 +2317,27 @@ function aa(t) {
|
|
|
2317
2317
|
}
|
|
2318
2318
|
];
|
|
2319
2319
|
}
|
|
2320
|
-
function
|
|
2320
|
+
function la(t, e, n, r) {
|
|
2321
2321
|
const s = {};
|
|
2322
2322
|
return e?.sdk && (s.sdk = {
|
|
2323
2323
|
name: e.sdk.name,
|
|
2324
2324
|
version: e.sdk.version
|
|
2325
|
-
}), n && r && (s.dsn = $e(r)), be(s, [
|
|
2325
|
+
}), n && r && (s.dsn = $e(r)), be(s, [ca(t)]);
|
|
2326
2326
|
}
|
|
2327
2327
|
function $t(t, e) {
|
|
2328
|
-
const n = e ??
|
|
2328
|
+
const n = e ?? ua(t) ?? [];
|
|
2329
2329
|
if (n.length === 0)
|
|
2330
2330
|
return;
|
|
2331
|
-
const r = t.getOptions(), s =
|
|
2331
|
+
const r = t.getOptions(), s = la(n, r._metadata, r.tunnel, t.getDsn());
|
|
2332
2332
|
is().set(t, []), t.emit("flushLogs"), t.sendEnvelope(s);
|
|
2333
2333
|
}
|
|
2334
|
-
function
|
|
2334
|
+
function ua(t) {
|
|
2335
2335
|
return is().get(t);
|
|
2336
2336
|
}
|
|
2337
2337
|
function is() {
|
|
2338
2338
|
return _e("clientToLogBufferMap", () => /* @__PURE__ */ new WeakMap());
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2340
|
+
function da(t) {
|
|
2341
2341
|
return [
|
|
2342
2342
|
{
|
|
2343
2343
|
type: "trace_metric",
|
|
@@ -2349,21 +2349,21 @@ function ua(t) {
|
|
|
2349
2349
|
}
|
|
2350
2350
|
];
|
|
2351
2351
|
}
|
|
2352
|
-
function
|
|
2352
|
+
function pa(t, e, n, r) {
|
|
2353
2353
|
const s = {};
|
|
2354
2354
|
return e?.sdk && (s.sdk = {
|
|
2355
2355
|
name: e.sdk.name,
|
|
2356
2356
|
version: e.sdk.version
|
|
2357
|
-
}), n && r && (s.dsn = $e(r)), be(s, [
|
|
2357
|
+
}), n && r && (s.dsn = $e(r)), be(s, [da(t)]);
|
|
2358
2358
|
}
|
|
2359
2359
|
function os(t, e) {
|
|
2360
|
-
const n = e ??
|
|
2360
|
+
const n = e ?? ha(t) ?? [];
|
|
2361
2361
|
if (n.length === 0)
|
|
2362
2362
|
return;
|
|
2363
|
-
const r = t.getOptions(), s =
|
|
2363
|
+
const r = t.getOptions(), s = pa(n, r._metadata, r.tunnel, t.getDsn());
|
|
2364
2364
|
as().set(t, []), t.emit("flushMetrics"), t.sendEnvelope(s);
|
|
2365
2365
|
}
|
|
2366
|
-
function
|
|
2366
|
+
function ha(t) {
|
|
2367
2367
|
return as().get(t);
|
|
2368
2368
|
}
|
|
2369
2369
|
function as() {
|
|
@@ -2410,21 +2410,21 @@ function sn(t = 100) {
|
|
|
2410
2410
|
drain: i
|
|
2411
2411
|
};
|
|
2412
2412
|
}
|
|
2413
|
-
const
|
|
2414
|
-
function
|
|
2413
|
+
const fa = 60 * 1e3;
|
|
2414
|
+
function ga(t, e = ct()) {
|
|
2415
2415
|
const n = parseInt(`${t}`, 10);
|
|
2416
2416
|
if (!isNaN(n))
|
|
2417
2417
|
return n * 1e3;
|
|
2418
2418
|
const r = Date.parse(`${t}`);
|
|
2419
|
-
return isNaN(r) ?
|
|
2419
|
+
return isNaN(r) ? fa : r - e;
|
|
2420
2420
|
}
|
|
2421
|
-
function
|
|
2421
|
+
function ma(t, e) {
|
|
2422
2422
|
return t[e] || t.all || 0;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2425
|
-
return
|
|
2424
|
+
function _a(t, e, n = ct()) {
|
|
2425
|
+
return ma(t, e) > n;
|
|
2426
2426
|
}
|
|
2427
|
-
function
|
|
2427
|
+
function ya(t, { statusCode: e, headers: n }, r = ct()) {
|
|
2428
2428
|
const s = {
|
|
2429
2429
|
...t
|
|
2430
2430
|
}, i = n?.["x-sentry-rate-limits"], o = n?.["retry-after"];
|
|
@@ -2437,11 +2437,11 @@ function _a(t, { statusCode: e, headers: n }, r = ct()) {
|
|
|
2437
2437
|
for (const h of l.split(";"))
|
|
2438
2438
|
h === "metric_bucket" ? (!d || d.split(";").includes("custom")) && (s[h] = r + p) : s[h] = r + p;
|
|
2439
2439
|
}
|
|
2440
|
-
else o ? s.all = r +
|
|
2440
|
+
else o ? s.all = r + ga(o, r) : e === 429 && (s.all = r + 60 * 1e3);
|
|
2441
2441
|
return s;
|
|
2442
2442
|
}
|
|
2443
2443
|
const ls = 64;
|
|
2444
|
-
function
|
|
2444
|
+
function Ea(t, e, n = sn(
|
|
2445
2445
|
t.bufferSize || ls
|
|
2446
2446
|
)) {
|
|
2447
2447
|
let r = {};
|
|
@@ -2450,21 +2450,21 @@ function ya(t, e, n = sn(
|
|
|
2450
2450
|
const a = [];
|
|
2451
2451
|
if (Dt(o, (u, p) => {
|
|
2452
2452
|
const h = Hn(p);
|
|
2453
|
-
|
|
2453
|
+
_a(r, h) ? t.recordDroppedEvent("ratelimit_backoff", h) : a.push(u);
|
|
2454
2454
|
}), a.length === 0)
|
|
2455
2455
|
return Promise.resolve({});
|
|
2456
2456
|
const c = be(o[0], a), l = (u) => {
|
|
2457
|
-
if (
|
|
2457
|
+
if (Ro(c, ["client_report"])) {
|
|
2458
2458
|
_ && m.warn(`Dropping client report. Will not send outcomes (reason: ${u}).`);
|
|
2459
2459
|
return;
|
|
2460
2460
|
}
|
|
2461
2461
|
Dt(c, (p, h) => {
|
|
2462
2462
|
t.recordDroppedEvent(u, Hn(h));
|
|
2463
2463
|
});
|
|
2464
|
-
}, d = () => e({ body:
|
|
2464
|
+
}, d = () => e({ body: wo(c) }).then(
|
|
2465
2465
|
(u) => u.statusCode === 413 ? (_ && m.error(
|
|
2466
2466
|
"Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."
|
|
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 =
|
|
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 = ya(r, u), u),
|
|
2468
2468
|
(u) => {
|
|
2469
2469
|
throw l("network_error"), _ && m.error("Encountered error running transport request:", u), u;
|
|
2470
2470
|
}
|
|
@@ -2483,7 +2483,7 @@ function ya(t, e, n = sn(
|
|
|
2483
2483
|
flush: s
|
|
2484
2484
|
};
|
|
2485
2485
|
}
|
|
2486
|
-
function
|
|
2486
|
+
function ba(t, e, n) {
|
|
2487
2487
|
const r = [
|
|
2488
2488
|
{ type: "client_report" },
|
|
2489
2489
|
{
|
|
@@ -2503,7 +2503,7 @@ function us(t) {
|
|
|
2503
2503
|
}
|
|
2504
2504
|
return e;
|
|
2505
2505
|
}
|
|
2506
|
-
function
|
|
2506
|
+
function Sa(t) {
|
|
2507
2507
|
const { trace_id: e, parent_span_id: n, span_id: r, status: s, origin: i, data: o, op: a } = t.contexts?.trace ?? {};
|
|
2508
2508
|
return {
|
|
2509
2509
|
data: o ?? {},
|
|
@@ -2522,7 +2522,7 @@ function ba(t) {
|
|
|
2522
2522
|
is_segment: !0
|
|
2523
2523
|
};
|
|
2524
2524
|
}
|
|
2525
|
-
function
|
|
2525
|
+
function ka(t) {
|
|
2526
2526
|
return {
|
|
2527
2527
|
type: "transaction",
|
|
2528
2528
|
timestamp: t.timestamp,
|
|
@@ -2546,7 +2546,7 @@ function Sa(t) {
|
|
|
2546
2546
|
measurements: t.measurements
|
|
2547
2547
|
};
|
|
2548
2548
|
}
|
|
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"),
|
|
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"), xa = 5e3;
|
|
2550
2550
|
function Ve(t) {
|
|
2551
2551
|
return {
|
|
2552
2552
|
message: t,
|
|
@@ -2573,13 +2573,13 @@ function er(t, e, n, r, s) {
|
|
|
2573
2573
|
i += r(c), i >= 8e5 ? s(t) : a || (a = !0, o = cs(
|
|
2574
2574
|
setTimeout(() => {
|
|
2575
2575
|
s(t);
|
|
2576
|
-
},
|
|
2576
|
+
}, xa)
|
|
2577
2577
|
));
|
|
2578
2578
|
}), t.on("flush", () => {
|
|
2579
2579
|
s(t);
|
|
2580
2580
|
});
|
|
2581
2581
|
}
|
|
2582
|
-
class
|
|
2582
|
+
class Ra {
|
|
2583
2583
|
/** Options passed to the SDK. */
|
|
2584
2584
|
/** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
|
|
2585
2585
|
/** Array of set up integrations. */
|
|
@@ -2592,8 +2592,8 @@ class xa {
|
|
|
2592
2592
|
* @param options Options for the client.
|
|
2593
2593
|
*/
|
|
2594
2594
|
constructor(e) {
|
|
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 =
|
|
2596
|
-
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 = no(e.dsn) : _ && m.warn("No DSN provided, client will not send events."), this._dsn) {
|
|
2596
|
+
const r = sa(
|
|
2597
2597
|
this._dsn,
|
|
2598
2598
|
e.tunnel,
|
|
2599
2599
|
e._metadata ? e._metadata.sdk : void 0
|
|
@@ -2605,11 +2605,11 @@ class xa {
|
|
|
2605
2605
|
url: r
|
|
2606
2606
|
});
|
|
2607
2607
|
}
|
|
2608
|
-
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", Ia, $t), (this._options.enableMetrics ?? this._options._experiments?.enableMetrics ?? !0) && er(
|
|
2609
2609
|
this,
|
|
2610
2610
|
"afterCaptureMetric",
|
|
2611
2611
|
"flushMetrics",
|
|
2612
|
-
|
|
2612
|
+
va,
|
|
2613
2613
|
os
|
|
2614
2614
|
);
|
|
2615
2615
|
}
|
|
@@ -2784,9 +2784,9 @@ class xa {
|
|
|
2784
2784
|
*/
|
|
2785
2785
|
sendEvent(e, n = {}) {
|
|
2786
2786
|
this.emit("beforeSendEvent", e, n);
|
|
2787
|
-
let r =
|
|
2787
|
+
let r = No(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
2788
2788
|
for (const s of n.attachments || [])
|
|
2789
|
-
r =
|
|
2789
|
+
r = xo(r, vo(s));
|
|
2790
2790
|
this.sendEnvelope(r).then((s) => this.emit("afterSendEvent", e, s));
|
|
2791
2791
|
}
|
|
2792
2792
|
/**
|
|
@@ -2809,7 +2809,7 @@ class xa {
|
|
|
2809
2809
|
e.release = e.release || n, e.environment = e.environment || r;
|
|
2810
2810
|
}
|
|
2811
2811
|
this.emit("beforeSendSession", e);
|
|
2812
|
-
const s =
|
|
2812
|
+
const s = Do(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
2813
2813
|
this.sendEnvelope(s);
|
|
2814
2814
|
}
|
|
2815
2815
|
/**
|
|
@@ -2869,7 +2869,7 @@ class xa {
|
|
|
2869
2869
|
/** Setup integrations for this client. */
|
|
2870
2870
|
_setupIntegrations() {
|
|
2871
2871
|
const { integrations: e } = this._options;
|
|
2872
|
-
this._integrations =
|
|
2872
|
+
this._integrations = aa(this, e), Kn(this, e);
|
|
2873
2873
|
}
|
|
2874
2874
|
/** Updates existing session based on the provided event */
|
|
2875
2875
|
_updateSessionFromEvent(e, n) {
|
|
@@ -2928,14 +2928,14 @@ class xa {
|
|
|
2928
2928
|
*/
|
|
2929
2929
|
_prepareEvent(e, n, r, s) {
|
|
2930
2930
|
const i = this.getOptions(), o = Object.keys(this._integrations);
|
|
2931
|
-
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), Ho(i, e, n, r, this, s).then((a) => {
|
|
2932
2932
|
if (a === null)
|
|
2933
2933
|
return a;
|
|
2934
2934
|
this.emit("postprocessEvent", a, n), a.contexts = {
|
|
2935
|
-
trace: { ...a.contexts?.trace, ...
|
|
2935
|
+
trace: { ...a.contexts?.trace, ...Oi(r) },
|
|
2936
2936
|
...a.contexts
|
|
2937
2937
|
};
|
|
2938
|
-
const c =
|
|
2938
|
+
const c = mo(this, r);
|
|
2939
2939
|
return a.sdkProcessingMetadata = {
|
|
2940
2940
|
dynamicSamplingContext: c,
|
|
2941
2941
|
...a.sdkProcessingMetadata
|
|
@@ -2970,7 +2970,7 @@ class xa {
|
|
|
2970
2970
|
* @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
|
|
2971
2971
|
*/
|
|
2972
2972
|
_processEvent(e, n, r, s) {
|
|
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 :
|
|
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 : ro(o);
|
|
2974
2974
|
if (c && typeof u == "number" && Ze() > u)
|
|
2975
2975
|
return this.recordDroppedEvent("sample_rate", "error"), nn(
|
|
2976
2976
|
bt(
|
|
@@ -2983,8 +2983,8 @@ class xa {
|
|
|
2983
2983
|
throw this.recordDroppedEvent("event_processor", p), bt("An event processor returned `null`, will not send event.");
|
|
2984
2984
|
if (n.data && n.data.__sentry__ === !0)
|
|
2985
2985
|
return h;
|
|
2986
|
-
const k =
|
|
2987
|
-
return
|
|
2986
|
+
const k = Ta(this, i, h, n);
|
|
2987
|
+
return wa(k, d);
|
|
2988
2988
|
}).then((h) => {
|
|
2989
2989
|
if (h === null) {
|
|
2990
2990
|
if (this.recordDroppedEvent("before_send", p), a) {
|
|
@@ -3061,7 +3061,7 @@ Reason: ${h}`
|
|
|
3061
3061
|
return;
|
|
3062
3062
|
}
|
|
3063
3063
|
_ && m.log("Sending outcomes:", e);
|
|
3064
|
-
const n =
|
|
3064
|
+
const n = ba(e, this._options.tunnel && $e(this._dsn));
|
|
3065
3065
|
this.sendEnvelope(n);
|
|
3066
3066
|
}
|
|
3067
3067
|
/**
|
|
@@ -3071,7 +3071,7 @@ Reason: ${h}`
|
|
|
3071
3071
|
function tr(t) {
|
|
3072
3072
|
return t === "replay_event" ? "replay" : t || "error";
|
|
3073
3073
|
}
|
|
3074
|
-
function
|
|
3074
|
+
function wa(t, e) {
|
|
3075
3075
|
const n = `${e} must return \`null\` or a valid event.`;
|
|
3076
3076
|
if (De(t))
|
|
3077
3077
|
return t.then(
|
|
@@ -3088,25 +3088,25 @@ function Ra(t, e) {
|
|
|
3088
3088
|
throw Ve(n);
|
|
3089
3089
|
return t;
|
|
3090
3090
|
}
|
|
3091
|
-
function
|
|
3091
|
+
function Ta(t, e, n, r) {
|
|
3092
3092
|
const { beforeSend: s, beforeSendTransaction: i, beforeSendSpan: o, ignoreSpans: a } = e;
|
|
3093
3093
|
let c = n;
|
|
3094
3094
|
if (Pt(c) && s)
|
|
3095
3095
|
return s(c, r);
|
|
3096
3096
|
if (hs(c)) {
|
|
3097
3097
|
if (o || a) {
|
|
3098
|
-
const l =
|
|
3098
|
+
const l = Sa(c);
|
|
3099
3099
|
if (a?.length && Bn(l, a))
|
|
3100
3100
|
return null;
|
|
3101
3101
|
if (o) {
|
|
3102
3102
|
const d = o(l);
|
|
3103
|
-
d ? c = Oe(n,
|
|
3103
|
+
d ? c = Oe(n, ka(d)) : Fn();
|
|
3104
3104
|
}
|
|
3105
3105
|
if (c.spans) {
|
|
3106
3106
|
const d = [], u = c.spans;
|
|
3107
3107
|
for (const h of u) {
|
|
3108
3108
|
if (a?.length && Bn(h, a)) {
|
|
3109
|
-
|
|
3109
|
+
ho(u, h);
|
|
3110
3110
|
continue;
|
|
3111
3111
|
}
|
|
3112
3112
|
if (o) {
|
|
@@ -3138,11 +3138,11 @@ function Pt(t) {
|
|
|
3138
3138
|
function hs(t) {
|
|
3139
3139
|
return t.type === "transaction";
|
|
3140
3140
|
}
|
|
3141
|
-
function
|
|
3141
|
+
function va(t) {
|
|
3142
3142
|
let e = 0;
|
|
3143
3143
|
return t.name && (e += t.name.length * 2), e += 8, e + fs(t.attributes);
|
|
3144
3144
|
}
|
|
3145
|
-
function
|
|
3145
|
+
function Ia(t) {
|
|
3146
3146
|
let e = 0;
|
|
3147
3147
|
return t.message && (e += t.message.length * 2), e + fs(t.attributes);
|
|
3148
3148
|
}
|
|
@@ -3157,20 +3157,20 @@ function fs(t) {
|
|
|
3157
3157
|
function nr(t) {
|
|
3158
3158
|
return typeof t == "string" ? t.length * 2 : typeof t == "number" ? 8 : typeof t == "boolean" ? 4 : 0;
|
|
3159
3159
|
}
|
|
3160
|
-
function
|
|
3160
|
+
function Ca(t) {
|
|
3161
3161
|
return st(t) && "__sentry_fetch_url_host__" in t && typeof t.__sentry_fetch_url_host__ == "string";
|
|
3162
3162
|
}
|
|
3163
3163
|
function rr(t) {
|
|
3164
|
-
return
|
|
3164
|
+
return Ca(t) ? `${t.message} (${t.__sentry_fetch_url_host__})` : t.message;
|
|
3165
3165
|
}
|
|
3166
|
-
function
|
|
3166
|
+
function Aa(t, e) {
|
|
3167
3167
|
e.debug === !0 && (_ ? m.enable() : ye(() => {
|
|
3168
3168
|
console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
|
|
3169
3169
|
})), H().update(e.initialScope);
|
|
3170
3170
|
const r = new t(e);
|
|
3171
|
-
return
|
|
3171
|
+
return Da(r), r.init(), r;
|
|
3172
3172
|
}
|
|
3173
|
-
function
|
|
3173
|
+
function Da(t) {
|
|
3174
3174
|
H().setClient(t);
|
|
3175
3175
|
}
|
|
3176
3176
|
function St(t) {
|
|
@@ -3190,7 +3190,7 @@ function St(t) {
|
|
|
3190
3190
|
// everything minus origin
|
|
3191
3191
|
};
|
|
3192
3192
|
}
|
|
3193
|
-
function
|
|
3193
|
+
function Na(t, e = !0) {
|
|
3194
3194
|
if (t.startsWith("data:")) {
|
|
3195
3195
|
const n = t.match(/^data:([^;,]+)/), r = n ? n[1] : "text/plain", s = t.includes(";base64,"), i = t.indexOf(",");
|
|
3196
3196
|
let o = "";
|
|
@@ -3202,31 +3202,31 @@ function Da(t, e = !0) {
|
|
|
3202
3202
|
}
|
|
3203
3203
|
return t;
|
|
3204
3204
|
}
|
|
3205
|
-
function
|
|
3205
|
+
function Oa(t) {
|
|
3206
3206
|
"aggregates" in t ? t.attrs?.ip_address === void 0 && (t.attrs = {
|
|
3207
3207
|
...t.attrs,
|
|
3208
3208
|
ip_address: "{{auto}}"
|
|
3209
3209
|
}) : t.ipAddress === void 0 && (t.ipAddress = "{{auto}}");
|
|
3210
3210
|
}
|
|
3211
|
-
function
|
|
3211
|
+
function $a(t, e, n = [e], r = "npm") {
|
|
3212
3212
|
const s = (t._metadata = t._metadata || {}).sdk = t._metadata.sdk || {};
|
|
3213
3213
|
s.name || (s.name = `sentry.javascript.${e}`, s.packages = n.map((i) => ({
|
|
3214
3214
|
name: `${r}:@sentry/${i}`,
|
|
3215
3215
|
version: ie
|
|
3216
3216
|
})), s.version = ie);
|
|
3217
3217
|
}
|
|
3218
|
-
const
|
|
3218
|
+
const Pa = 100;
|
|
3219
3219
|
function Z(t, e) {
|
|
3220
3220
|
const n = C(), r = J();
|
|
3221
3221
|
if (!n) return;
|
|
3222
|
-
const { beforeBreadcrumb: s = null, maxBreadcrumbs: i =
|
|
3222
|
+
const { beforeBreadcrumb: s = null, maxBreadcrumbs: i = Pa } = n.getOptions();
|
|
3223
3223
|
if (i <= 0) return;
|
|
3224
3224
|
const a = { timestamp: Ne(), ...t }, c = s ? ye(() => s(a, e)) : a;
|
|
3225
3225
|
c !== null && (n.emit && n.emit("beforeAddBreadcrumb", c, e), r.addBreadcrumb(c, i));
|
|
3226
3226
|
}
|
|
3227
3227
|
let sr;
|
|
3228
|
-
const
|
|
3229
|
-
name:
|
|
3228
|
+
const La = "FunctionToString", ir = /* @__PURE__ */ new WeakMap(), Ma = (() => ({
|
|
3229
|
+
name: La,
|
|
3230
3230
|
setupOnce() {
|
|
3231
3231
|
sr = Function.prototype.toString;
|
|
3232
3232
|
try {
|
|
@@ -3240,7 +3240,7 @@ const Pa = "FunctionToString", ir = /* @__PURE__ */ new WeakMap(), La = (() => (
|
|
|
3240
3240
|
setup(t) {
|
|
3241
3241
|
ir.set(t, !0);
|
|
3242
3242
|
}
|
|
3243
|
-
})),
|
|
3243
|
+
})), Fa = Ma, Ua = [
|
|
3244
3244
|
/^Script error\.?$/,
|
|
3245
3245
|
/^Javascript error: Script error\.? on line 0$/,
|
|
3246
3246
|
/^ResizeObserver loop completed with undelivered notifications.$/,
|
|
@@ -3261,10 +3261,10 @@ const Pa = "FunctionToString", ir = /* @__PURE__ */ new WeakMap(), La = (() => (
|
|
|
3261
3261
|
// unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps
|
|
3262
3262
|
/^Java exception was raised during method invocation$/
|
|
3263
3263
|
// error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065)
|
|
3264
|
-
],
|
|
3264
|
+
], Ba = "EventFilters", Ha = (t = {}) => {
|
|
3265
3265
|
let e;
|
|
3266
3266
|
return {
|
|
3267
|
-
name:
|
|
3267
|
+
name: Ba,
|
|
3268
3268
|
setup(n) {
|
|
3269
3269
|
const r = n.getOptions();
|
|
3270
3270
|
e = or(t, r);
|
|
@@ -3274,11 +3274,11 @@ const Pa = "FunctionToString", ir = /* @__PURE__ */ new WeakMap(), La = (() => (
|
|
|
3274
3274
|
const i = s.getOptions();
|
|
3275
3275
|
e = or(t, i);
|
|
3276
3276
|
}
|
|
3277
|
-
return
|
|
3277
|
+
return ja(n, e) ? null : n;
|
|
3278
3278
|
}
|
|
3279
3279
|
};
|
|
3280
|
-
},
|
|
3281
|
-
...
|
|
3280
|
+
}, za = ((t = {}) => ({
|
|
3281
|
+
...Ha(t),
|
|
3282
3282
|
name: "InboundFilters"
|
|
3283
3283
|
}));
|
|
3284
3284
|
function or(t = {}, e = {}) {
|
|
@@ -3288,32 +3288,32 @@ function or(t = {}, e = {}) {
|
|
|
3288
3288
|
ignoreErrors: [
|
|
3289
3289
|
...t.ignoreErrors || [],
|
|
3290
3290
|
...e.ignoreErrors || [],
|
|
3291
|
-
...t.disableErrorDefaults ? [] :
|
|
3291
|
+
...t.disableErrorDefaults ? [] : Ua
|
|
3292
3292
|
],
|
|
3293
3293
|
ignoreTransactions: [...t.ignoreTransactions || [], ...e.ignoreTransactions || []]
|
|
3294
3294
|
};
|
|
3295
3295
|
}
|
|
3296
|
-
function
|
|
3296
|
+
function ja(t, e) {
|
|
3297
3297
|
if (t.type) {
|
|
3298
|
-
if (t.type === "transaction" &&
|
|
3298
|
+
if (t.type === "transaction" && Ga(t, e.ignoreTransactions))
|
|
3299
3299
|
return _ && m.warn(
|
|
3300
3300
|
`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
3301
3301
|
Event: ${re(t)}`
|
|
3302
3302
|
), !0;
|
|
3303
3303
|
} else {
|
|
3304
|
-
if (
|
|
3304
|
+
if (qa(t, e.ignoreErrors))
|
|
3305
3305
|
return _ && m.warn(
|
|
3306
3306
|
`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
3307
3307
|
Event: ${re(t)}`
|
|
3308
3308
|
), !0;
|
|
3309
|
-
if (
|
|
3309
|
+
if (Ka(t))
|
|
3310
3310
|
return _ && m.warn(
|
|
3311
3311
|
`Event dropped due to not having an error message, error type or stacktrace.
|
|
3312
3312
|
Event: ${re(
|
|
3313
3313
|
t
|
|
3314
3314
|
)}`
|
|
3315
3315
|
), !0;
|
|
3316
|
-
if (
|
|
3316
|
+
if (Va(t, e.denyUrls))
|
|
3317
3317
|
return _ && m.warn(
|
|
3318
3318
|
`Event dropped due to being matched by \`denyUrls\` option.
|
|
3319
3319
|
Event: ${re(
|
|
@@ -3321,7 +3321,7 @@ Event: ${re(
|
|
|
3321
3321
|
)}.
|
|
3322
3322
|
Url: ${Je(t)}`
|
|
3323
3323
|
), !0;
|
|
3324
|
-
if (!
|
|
3324
|
+
if (!Wa(t, e.allowUrls))
|
|
3325
3325
|
return _ && m.warn(
|
|
3326
3326
|
`Event dropped due to not being matched by \`allowUrls\` option.
|
|
3327
3327
|
Event: ${re(
|
|
@@ -3332,28 +3332,28 @@ Url: ${Je(t)}`
|
|
|
3332
3332
|
}
|
|
3333
3333
|
return !1;
|
|
3334
3334
|
}
|
|
3335
|
-
function
|
|
3335
|
+
function qa(t, e) {
|
|
3336
3336
|
return e?.length ? us(t).some((n) => lt(n, e)) : !1;
|
|
3337
3337
|
}
|
|
3338
|
-
function
|
|
3338
|
+
function Ga(t, e) {
|
|
3339
3339
|
if (!e?.length)
|
|
3340
3340
|
return !1;
|
|
3341
3341
|
const n = t.transaction;
|
|
3342
3342
|
return n ? lt(n, e) : !1;
|
|
3343
3343
|
}
|
|
3344
|
-
function
|
|
3344
|
+
function Va(t, e) {
|
|
3345
3345
|
if (!e?.length)
|
|
3346
3346
|
return !1;
|
|
3347
3347
|
const n = Je(t);
|
|
3348
3348
|
return n ? lt(n, e) : !1;
|
|
3349
3349
|
}
|
|
3350
|
-
function
|
|
3350
|
+
function Wa(t, e) {
|
|
3351
3351
|
if (!e?.length)
|
|
3352
3352
|
return !0;
|
|
3353
3353
|
const n = Je(t);
|
|
3354
3354
|
return n ? lt(n, e) : !0;
|
|
3355
3355
|
}
|
|
3356
|
-
function
|
|
3356
|
+
function Xa(t = []) {
|
|
3357
3357
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
3358
3358
|
const n = t[e];
|
|
3359
3359
|
if (n && n.filename !== "<anonymous>" && n.filename !== "[native code]")
|
|
@@ -3364,19 +3364,19 @@ function Wa(t = []) {
|
|
|
3364
3364
|
function Je(t) {
|
|
3365
3365
|
try {
|
|
3366
3366
|
const n = [...t.exception?.values ?? []].reverse().find((r) => r.mechanism?.parent_id === void 0 && r.stacktrace?.frames?.length)?.stacktrace?.frames;
|
|
3367
|
-
return n ?
|
|
3367
|
+
return n ? Xa(n) : null;
|
|
3368
3368
|
} catch {
|
|
3369
3369
|
return _ && m.error(`Cannot extract url for event ${re(t)}`), null;
|
|
3370
3370
|
}
|
|
3371
3371
|
}
|
|
3372
|
-
function
|
|
3372
|
+
function Ka(t) {
|
|
3373
3373
|
return t.exception?.values?.length ? (
|
|
3374
3374
|
// No top-level message
|
|
3375
3375
|
!t.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value
|
|
3376
3376
|
!t.exception.values.some((e) => e.stacktrace || e.type && e.type !== "Error" || e.value)
|
|
3377
3377
|
) : !1;
|
|
3378
3378
|
}
|
|
3379
|
-
function
|
|
3379
|
+
function Ya(t, e, n, r, s, i) {
|
|
3380
3380
|
if (!s.exception?.values || !i || !K(i.originalException, Error))
|
|
3381
3381
|
return;
|
|
3382
3382
|
const o = s.exception.values.length > 0 ? s.exception.values[s.exception.values.length - 1] : void 0;
|
|
@@ -3448,12 +3448,12 @@ function cr(t, e, n, r) {
|
|
|
3448
3448
|
parent_id: r
|
|
3449
3449
|
};
|
|
3450
3450
|
}
|
|
3451
|
-
function
|
|
3451
|
+
function Za(t) {
|
|
3452
3452
|
const e = "console";
|
|
3453
|
-
ce(e, t), le(e,
|
|
3453
|
+
ce(e, t), le(e, Ja);
|
|
3454
3454
|
}
|
|
3455
|
-
function
|
|
3456
|
-
"console" in R &&
|
|
3455
|
+
function Ja() {
|
|
3456
|
+
"console" in R && Ys.forEach(function(t) {
|
|
3457
3457
|
t in R.console && $(R.console, t, function(e) {
|
|
3458
3458
|
return Ye[t] = e, function(...n) {
|
|
3459
3459
|
F("console", { args: n, level: t }), Ye[t]?.apply(R.console, n);
|
|
@@ -3461,33 +3461,33 @@ function Za() {
|
|
|
3461
3461
|
});
|
|
3462
3462
|
});
|
|
3463
3463
|
}
|
|
3464
|
-
function
|
|
3464
|
+
function Qa(t) {
|
|
3465
3465
|
return t === "warn" ? "warning" : ["fatal", "error", "warning", "log", "info", "debug"].includes(t) ? t : "log";
|
|
3466
3466
|
}
|
|
3467
|
-
const
|
|
3467
|
+
const ec = "Dedupe", tc = (() => {
|
|
3468
3468
|
let t;
|
|
3469
3469
|
return {
|
|
3470
|
-
name:
|
|
3470
|
+
name: ec,
|
|
3471
3471
|
processEvent(e) {
|
|
3472
3472
|
if (e.type)
|
|
3473
3473
|
return e;
|
|
3474
3474
|
try {
|
|
3475
|
-
if (
|
|
3475
|
+
if (rc(e, t))
|
|
3476
3476
|
return _ && m.warn("Event dropped due to being a duplicate of previously captured event."), null;
|
|
3477
3477
|
} catch {
|
|
3478
3478
|
}
|
|
3479
3479
|
return t = e;
|
|
3480
3480
|
}
|
|
3481
3481
|
};
|
|
3482
|
-
}),
|
|
3483
|
-
function nc(t, e) {
|
|
3484
|
-
return e ? !!(rc(t, e) || sc(t, e)) : !1;
|
|
3485
|
-
}
|
|
3482
|
+
}), nc = tc;
|
|
3486
3483
|
function rc(t, e) {
|
|
3484
|
+
return e ? !!(sc(t, e) || ic(t, e)) : !1;
|
|
3485
|
+
}
|
|
3486
|
+
function sc(t, e) {
|
|
3487
3487
|
const n = t.message, r = e.message;
|
|
3488
3488
|
return !(!n && !r || n && !r || !n && r || n !== r || !_s(t, e) || !ms(t, e));
|
|
3489
3489
|
}
|
|
3490
|
-
function
|
|
3490
|
+
function ic(t, e) {
|
|
3491
3491
|
const n = lr(e), r = lr(t);
|
|
3492
3492
|
return !(!n || !r || n.type !== r.type || n.value !== r.value || !_s(t, e) || !ms(t, e));
|
|
3493
3493
|
}
|
|
@@ -3520,24 +3520,24 @@ function _s(t, e) {
|
|
|
3520
3520
|
function lr(t) {
|
|
3521
3521
|
return t.exception?.values?.[0];
|
|
3522
3522
|
}
|
|
3523
|
-
const
|
|
3524
|
-
name:
|
|
3523
|
+
const oc = "ConversationId", ac = (() => ({
|
|
3524
|
+
name: oc,
|
|
3525
3525
|
setup(t) {
|
|
3526
3526
|
t.on("spanStart", (e) => {
|
|
3527
3527
|
const n = H().getScopeData(), r = J().getScopeData(), s = n.conversationId || r.conversationId;
|
|
3528
|
-
s && e.setAttribute(
|
|
3528
|
+
s && e.setAttribute(Ui, s);
|
|
3529
3529
|
});
|
|
3530
3530
|
}
|
|
3531
|
-
})),
|
|
3531
|
+
})), cc = ac;
|
|
3532
3532
|
function ys(t) {
|
|
3533
3533
|
if (t !== void 0)
|
|
3534
3534
|
return t >= 400 && t < 500 ? "warning" : t >= 500 ? "error" : void 0;
|
|
3535
3535
|
}
|
|
3536
3536
|
const Ae = R;
|
|
3537
|
-
function
|
|
3537
|
+
function lc() {
|
|
3538
3538
|
return "history" in Ae && !!Ae.history;
|
|
3539
3539
|
}
|
|
3540
|
-
function
|
|
3540
|
+
function uc() {
|
|
3541
3541
|
if (!("fetch" in Ae))
|
|
3542
3542
|
return !1;
|
|
3543
3543
|
try {
|
|
@@ -3549,10 +3549,10 @@ function lc() {
|
|
|
3549
3549
|
function Mt(t) {
|
|
3550
3550
|
return t && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString());
|
|
3551
3551
|
}
|
|
3552
|
-
function
|
|
3552
|
+
function dc() {
|
|
3553
3553
|
if (typeof EdgeRuntime == "string")
|
|
3554
3554
|
return !0;
|
|
3555
|
-
if (!
|
|
3555
|
+
if (!uc())
|
|
3556
3556
|
return !1;
|
|
3557
3557
|
if (Mt(Ae.fetch))
|
|
3558
3558
|
return !0;
|
|
@@ -3567,14 +3567,14 @@ function uc() {
|
|
|
3567
3567
|
}
|
|
3568
3568
|
return t;
|
|
3569
3569
|
}
|
|
3570
|
-
function
|
|
3570
|
+
function pc(t, e) {
|
|
3571
3571
|
const n = "fetch";
|
|
3572
|
-
ce(n, t), le(n, () =>
|
|
3572
|
+
ce(n, t), le(n, () => hc(void 0, e));
|
|
3573
3573
|
}
|
|
3574
|
-
function
|
|
3575
|
-
e && !
|
|
3574
|
+
function hc(t, e = !1) {
|
|
3575
|
+
e && !dc() || $(R, "fetch", function(n) {
|
|
3576
3576
|
return function(...r) {
|
|
3577
|
-
const s = new Error(), { method: i, url: o } =
|
|
3577
|
+
const s = new Error(), { method: i, url: o } = fc(r), a = {
|
|
3578
3578
|
args: r,
|
|
3579
3579
|
fetchData: {
|
|
3580
3580
|
method: i,
|
|
@@ -3583,7 +3583,7 @@ function pc(t, e = !1) {
|
|
|
3583
3583
|
startTimestamp: q() * 1e3,
|
|
3584
3584
|
// // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation
|
|
3585
3585
|
virtualError: s,
|
|
3586
|
-
headers:
|
|
3586
|
+
headers: gc(r)
|
|
3587
3587
|
};
|
|
3588
3588
|
return F("fetch", {
|
|
3589
3589
|
...a
|
|
@@ -3618,7 +3618,7 @@ function We(t, e) {
|
|
|
3618
3618
|
function ur(t) {
|
|
3619
3619
|
return typeof t == "string" ? t : t ? We(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
|
|
3620
3620
|
}
|
|
3621
|
-
function
|
|
3621
|
+
function fc(t) {
|
|
3622
3622
|
if (t.length === 0)
|
|
3623
3623
|
return { method: "GET", url: "" };
|
|
3624
3624
|
if (t.length === 2) {
|
|
@@ -3637,7 +3637,7 @@ function hc(t) {
|
|
|
3637
3637
|
method: We(e, "method") ? String(e.method).toUpperCase() : "GET"
|
|
3638
3638
|
};
|
|
3639
3639
|
}
|
|
3640
|
-
function
|
|
3640
|
+
function gc(t) {
|
|
3641
3641
|
const [e, n] = t;
|
|
3642
3642
|
try {
|
|
3643
3643
|
if (typeof n == "object" && n !== null && "headers" in n && n.headers)
|
|
@@ -3647,7 +3647,7 @@ function fc(t) {
|
|
|
3647
3647
|
} catch {
|
|
3648
3648
|
}
|
|
3649
3649
|
}
|
|
3650
|
-
function
|
|
3650
|
+
function mc() {
|
|
3651
3651
|
return "npm";
|
|
3652
3652
|
}
|
|
3653
3653
|
const T = R;
|
|
@@ -3655,7 +3655,7 @@ let Ft = 0;
|
|
|
3655
3655
|
function Es() {
|
|
3656
3656
|
return Ft > 0;
|
|
3657
3657
|
}
|
|
3658
|
-
function
|
|
3658
|
+
function _c() {
|
|
3659
3659
|
Ft++, setTimeout(() => {
|
|
3660
3660
|
Ft--;
|
|
3661
3661
|
});
|
|
@@ -3680,7 +3680,7 @@ function me(t, e = {}) {
|
|
|
3680
3680
|
const i = s.map((o) => me(o, e));
|
|
3681
3681
|
return t.apply(this, i);
|
|
3682
3682
|
} catch (i) {
|
|
3683
|
-
throw
|
|
3683
|
+
throw _c(), Ni((o) => {
|
|
3684
3684
|
o.addEventProcessor((a) => (e.mechanism && (It(a, void 0), he(a, e.mechanism)), a.extra = {
|
|
3685
3685
|
...a.extra,
|
|
3686
3686
|
arguments: s
|
|
@@ -3704,7 +3704,7 @@ function me(t, e = {}) {
|
|
|
3704
3704
|
}
|
|
3705
3705
|
return r;
|
|
3706
3706
|
}
|
|
3707
|
-
function
|
|
3707
|
+
function yc() {
|
|
3708
3708
|
const t = Zt(), { referrer: e } = T.document || {}, { userAgent: n } = T.navigator || {}, r = {
|
|
3709
3709
|
...e && { Referer: e },
|
|
3710
3710
|
...n && { "User-Agent": n }
|
|
@@ -3716,13 +3716,13 @@ function _c() {
|
|
|
3716
3716
|
}
|
|
3717
3717
|
function on(t, e) {
|
|
3718
3718
|
const n = an(t, e), r = {
|
|
3719
|
-
type:
|
|
3720
|
-
value:
|
|
3719
|
+
type: xc(e),
|
|
3720
|
+
value: Rc(e)
|
|
3721
3721
|
};
|
|
3722
3722
|
return n.length && (r.stacktrace = { frames: n }), r.type === void 0 && r.value === "" && (r.value = "Unrecoverable error caught"), r;
|
|
3723
3723
|
}
|
|
3724
|
-
function
|
|
3725
|
-
const i = C()?.getOptions().normalizeDepth, o =
|
|
3724
|
+
function Ec(t, e, n, r) {
|
|
3725
|
+
const i = C()?.getOptions().normalizeDepth, o = Cc(e), a = {
|
|
3726
3726
|
__serialized__: Zr(e, i)
|
|
3727
3727
|
};
|
|
3728
3728
|
if (o)
|
|
@@ -3737,7 +3737,7 @@ function yc(t, e, n, r) {
|
|
|
3737
3737
|
values: [
|
|
3738
3738
|
{
|
|
3739
3739
|
type: ot(e) ? e.constructor.name : r ? "UnhandledRejection" : "Error",
|
|
3740
|
-
value:
|
|
3740
|
+
value: vc(e, { isUnhandledRejection: r })
|
|
3741
3741
|
}
|
|
3742
3742
|
]
|
|
3743
3743
|
},
|
|
@@ -3757,36 +3757,36 @@ function kt(t, e) {
|
|
|
3757
3757
|
};
|
|
3758
3758
|
}
|
|
3759
3759
|
function an(t, e) {
|
|
3760
|
-
const n = e.stacktrace || e.stack || "", r =
|
|
3760
|
+
const n = e.stacktrace || e.stack || "", r = Sc(e), s = kc(e);
|
|
3761
3761
|
try {
|
|
3762
3762
|
return t(n, r, s);
|
|
3763
3763
|
} catch {
|
|
3764
3764
|
}
|
|
3765
3765
|
return [];
|
|
3766
3766
|
}
|
|
3767
|
-
const
|
|
3768
|
-
function bc(t) {
|
|
3769
|
-
return t && Ec.test(t.message) ? 1 : 0;
|
|
3770
|
-
}
|
|
3767
|
+
const bc = /Minified React error #\d+;/i;
|
|
3771
3768
|
function Sc(t) {
|
|
3769
|
+
return t && bc.test(t.message) ? 1 : 0;
|
|
3770
|
+
}
|
|
3771
|
+
function kc(t) {
|
|
3772
3772
|
return typeof t.framesToPop == "number" ? t.framesToPop : 0;
|
|
3773
3773
|
}
|
|
3774
3774
|
function bs(t) {
|
|
3775
3775
|
return typeof WebAssembly < "u" && typeof WebAssembly.Exception < "u" ? t instanceof WebAssembly.Exception : !1;
|
|
3776
3776
|
}
|
|
3777
|
-
function
|
|
3777
|
+
function xc(t) {
|
|
3778
3778
|
const e = t?.name;
|
|
3779
3779
|
return !e && bs(t) ? t.message && Array.isArray(t.message) && t.message.length == 2 ? t.message[0] : "WebAssembly.Exception" : e;
|
|
3780
3780
|
}
|
|
3781
|
-
function
|
|
3781
|
+
function Rc(t) {
|
|
3782
3782
|
const e = t?.message;
|
|
3783
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";
|
|
3784
3784
|
}
|
|
3785
|
-
function
|
|
3785
|
+
function wc(t, e, n, r) {
|
|
3786
3786
|
const s = n?.syntheticException || void 0, i = cn(t, e, s, r);
|
|
3787
3787
|
return he(i), i.level = "error", n?.event_id && (i.event_id = n.event_id), Pe(i);
|
|
3788
3788
|
}
|
|
3789
|
-
function
|
|
3789
|
+
function Tc(t, e, n = "info", r, s) {
|
|
3790
3790
|
const i = r?.syntheticException || void 0, o = Ut(t, e, i, s);
|
|
3791
3791
|
return o.level = n, r?.event_id && (o.event_id = r.event_id), Pe(o);
|
|
3792
3792
|
}
|
|
@@ -3794,7 +3794,7 @@ function cn(t, e, n, r, s) {
|
|
|
3794
3794
|
let i;
|
|
3795
3795
|
if (Pr(e) && e.error)
|
|
3796
3796
|
return kt(t, e.error);
|
|
3797
|
-
if (Rn(e) ||
|
|
3797
|
+
if (Rn(e) || li(e)) {
|
|
3798
3798
|
const o = e;
|
|
3799
3799
|
if ("stack" in e)
|
|
3800
3800
|
i = kt(t, e);
|
|
@@ -3804,7 +3804,7 @@ function cn(t, e, n, r, s) {
|
|
|
3804
3804
|
}
|
|
3805
3805
|
return "code" in o && (i.tags = { ...i.tags, "DOMException.code": `${o.code}` }), i;
|
|
3806
3806
|
}
|
|
3807
|
-
return st(e) ? kt(t, e) : Ie(e) || ot(e) ? (i =
|
|
3807
|
+
return st(e) ? kt(t, e) : Ie(e) || ot(e) ? (i = Ec(t, e, n, s), he(i, {
|
|
3808
3808
|
synthetic: !0
|
|
3809
3809
|
}), i) : (i = Ut(t, e, n, r), It(i, `${e}`), he(i, {
|
|
3810
3810
|
synthetic: !0
|
|
@@ -3827,18 +3827,18 @@ function Ut(t, e, n, r) {
|
|
|
3827
3827
|
}
|
|
3828
3828
|
return s.message = e, s;
|
|
3829
3829
|
}
|
|
3830
|
-
function
|
|
3831
|
-
const n =
|
|
3832
|
-
return Pr(t) ? `Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\`` : ot(t) ? `Event \`${
|
|
3830
|
+
function vc(t, { isUnhandledRejection: e }) {
|
|
3831
|
+
const n = mi(t), r = e ? "promise rejection" : "exception";
|
|
3832
|
+
return Pr(t) ? `Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\`` : ot(t) ? `Event \`${Ic(t)}\` (type=${t.type}) captured as ${r}` : `Object captured as ${r} with keys: ${n}`;
|
|
3833
3833
|
}
|
|
3834
|
-
function
|
|
3834
|
+
function Ic(t) {
|
|
3835
3835
|
try {
|
|
3836
3836
|
const e = Object.getPrototypeOf(t);
|
|
3837
3837
|
return e ? e.constructor.name : void 0;
|
|
3838
3838
|
} catch {
|
|
3839
3839
|
}
|
|
3840
3840
|
}
|
|
3841
|
-
function
|
|
3841
|
+
function Cc(t) {
|
|
3842
3842
|
for (const e in t)
|
|
3843
3843
|
if (Object.prototype.hasOwnProperty.call(t, e)) {
|
|
3844
3844
|
const n = t[e];
|
|
@@ -3846,15 +3846,15 @@ function Ic(t) {
|
|
|
3846
3846
|
return n;
|
|
3847
3847
|
}
|
|
3848
3848
|
}
|
|
3849
|
-
class
|
|
3849
|
+
class Ac extends Ra {
|
|
3850
3850
|
/**
|
|
3851
3851
|
* Creates a new Browser SDK instance.
|
|
3852
3852
|
*
|
|
3853
3853
|
* @param options Configuration options for this SDK.
|
|
3854
3854
|
*/
|
|
3855
3855
|
constructor(e) {
|
|
3856
|
-
const n =
|
|
3857
|
-
|
|
3856
|
+
const n = Dc(e), r = T.SENTRY_SDK_SOURCE || mc();
|
|
3857
|
+
$a(n, "browser", ["browser"], r), n._metadata?.sdk && (n._metadata.sdk.settings = {
|
|
3858
3858
|
infer_ip: n.sendDefaultPii ? "auto" : "never",
|
|
3859
3859
|
// purposefully allowing already passed settings to override the default
|
|
3860
3860
|
...n._metadata.sdk.settings
|
|
@@ -3868,19 +3868,19 @@ class Cc extends xa {
|
|
|
3868
3868
|
} = this._options, l = c ?? a?.enableMetrics ?? !0;
|
|
3869
3869
|
T.document && (i || o || l) && T.document.addEventListener("visibilitychange", () => {
|
|
3870
3870
|
T.document.visibilityState === "hidden" && (i && this._flushOutcomes(), o && $t(this), l && os(this));
|
|
3871
|
-
}), s && this.on("beforeSendSession",
|
|
3871
|
+
}), s && this.on("beforeSendSession", Oa);
|
|
3872
3872
|
}
|
|
3873
3873
|
/**
|
|
3874
3874
|
* @inheritDoc
|
|
3875
3875
|
*/
|
|
3876
3876
|
eventFromException(e, n) {
|
|
3877
|
-
return
|
|
3877
|
+
return wc(this._options.stackParser, e, n, this._options.attachStacktrace);
|
|
3878
3878
|
}
|
|
3879
3879
|
/**
|
|
3880
3880
|
* @inheritDoc
|
|
3881
3881
|
*/
|
|
3882
3882
|
eventFromMessage(e, n = "info", r) {
|
|
3883
|
-
return
|
|
3883
|
+
return Tc(this._options.stackParser, e, n, r, this._options.attachStacktrace);
|
|
3884
3884
|
}
|
|
3885
3885
|
/**
|
|
3886
3886
|
* @inheritDoc
|
|
@@ -3889,7 +3889,7 @@ class Cc extends xa {
|
|
|
3889
3889
|
return e.platform = e.platform || "javascript", super._prepareEvent(e, n, r, s);
|
|
3890
3890
|
}
|
|
3891
3891
|
}
|
|
3892
|
-
function
|
|
3892
|
+
function Dc(t) {
|
|
3893
3893
|
return {
|
|
3894
3894
|
release: typeof __SENTRY_RELEASE__ == "string" ? __SENTRY_RELEASE__ : T.SENTRY_RELEASE?.id,
|
|
3895
3895
|
// This supports the variable that sentry-webpack-plugin injects
|
|
@@ -3899,12 +3899,12 @@ function Ac(t) {
|
|
|
3899
3899
|
...t
|
|
3900
3900
|
};
|
|
3901
3901
|
}
|
|
3902
|
-
const
|
|
3902
|
+
const Nc = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, D = R, Oc = 1e3;
|
|
3903
3903
|
let dr, Bt, Ht;
|
|
3904
|
-
function
|
|
3905
|
-
ce("dom", t), le("dom",
|
|
3904
|
+
function $c(t) {
|
|
3905
|
+
ce("dom", t), le("dom", Pc);
|
|
3906
3906
|
}
|
|
3907
|
-
function
|
|
3907
|
+
function Pc() {
|
|
3908
3908
|
if (!D.document)
|
|
3909
3909
|
return;
|
|
3910
3910
|
const t = F.bind(null, "dom"), e = pr(t, !0);
|
|
@@ -3941,7 +3941,7 @@ function $c() {
|
|
|
3941
3941
|
));
|
|
3942
3942
|
});
|
|
3943
3943
|
}
|
|
3944
|
-
function
|
|
3944
|
+
function Lc(t) {
|
|
3945
3945
|
if (t.type !== Bt)
|
|
3946
3946
|
return !1;
|
|
3947
3947
|
try {
|
|
@@ -3951,24 +3951,24 @@ function Pc(t) {
|
|
|
3951
3951
|
}
|
|
3952
3952
|
return !0;
|
|
3953
3953
|
}
|
|
3954
|
-
function
|
|
3954
|
+
function Mc(t, e) {
|
|
3955
3955
|
return t !== "keypress" ? !1 : e?.tagName ? !(e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.isContentEditable) : !0;
|
|
3956
3956
|
}
|
|
3957
3957
|
function pr(t, e = !1) {
|
|
3958
3958
|
return (n) => {
|
|
3959
3959
|
if (!n || n._sentryCaptured)
|
|
3960
3960
|
return;
|
|
3961
|
-
const r =
|
|
3962
|
-
if (
|
|
3961
|
+
const r = Fc(n);
|
|
3962
|
+
if (Mc(n.type, r))
|
|
3963
3963
|
return;
|
|
3964
3964
|
Y(n, "_sentryCaptured", !0), r && !r._sentryId && Y(r, "_sentryId", P());
|
|
3965
3965
|
const s = n.type === "keypress" ? "input" : n.type;
|
|
3966
|
-
|
|
3966
|
+
Lc(n) || (t({ event: n, name: s, global: e }), Bt = n.type, Ht = r ? r._sentryId : void 0), clearTimeout(dr), dr = D.setTimeout(() => {
|
|
3967
3967
|
Ht = void 0, Bt = void 0;
|
|
3968
|
-
},
|
|
3968
|
+
}, Oc);
|
|
3969
3969
|
};
|
|
3970
3970
|
}
|
|
3971
|
-
function
|
|
3971
|
+
function Fc(t) {
|
|
3972
3972
|
try {
|
|
3973
3973
|
return t.target;
|
|
3974
3974
|
} catch {
|
|
@@ -3978,21 +3978,21 @@ function Mc(t) {
|
|
|
3978
3978
|
let Fe;
|
|
3979
3979
|
function Ss(t) {
|
|
3980
3980
|
const e = "history";
|
|
3981
|
-
ce(e, t), le(e,
|
|
3981
|
+
ce(e, t), le(e, Uc);
|
|
3982
3982
|
}
|
|
3983
|
-
function
|
|
3983
|
+
function Uc() {
|
|
3984
3984
|
if (D.addEventListener("popstate", () => {
|
|
3985
3985
|
const e = D.location.href, n = Fe;
|
|
3986
3986
|
if (Fe = e, n === e)
|
|
3987
3987
|
return;
|
|
3988
3988
|
F("history", { from: n, to: e });
|
|
3989
|
-
}), !
|
|
3989
|
+
}), !lc())
|
|
3990
3990
|
return;
|
|
3991
3991
|
function t(e) {
|
|
3992
3992
|
return function(...n) {
|
|
3993
3993
|
const r = n.length > 2 ? n[2] : void 0;
|
|
3994
3994
|
if (r) {
|
|
3995
|
-
const s = Fe, i =
|
|
3995
|
+
const s = Fe, i = Bc(String(r));
|
|
3996
3996
|
if (Fe = i, s === i)
|
|
3997
3997
|
return e.apply(this, n);
|
|
3998
3998
|
F("history", { from: s, to: i });
|
|
@@ -4002,7 +4002,7 @@ function Fc() {
|
|
|
4002
4002
|
}
|
|
4003
4003
|
$(D.history, "pushState", t), $(D.history, "replaceState", t);
|
|
4004
4004
|
}
|
|
4005
|
-
function
|
|
4005
|
+
function Bc(t) {
|
|
4006
4006
|
try {
|
|
4007
4007
|
return new URL(t, D.location.origin).toString();
|
|
4008
4008
|
} catch {
|
|
@@ -4010,7 +4010,7 @@ function Uc(t) {
|
|
|
4010
4010
|
}
|
|
4011
4011
|
}
|
|
4012
4012
|
const Xe = {};
|
|
4013
|
-
function
|
|
4013
|
+
function Hc(t) {
|
|
4014
4014
|
const e = Xe[t];
|
|
4015
4015
|
if (e)
|
|
4016
4016
|
return e;
|
|
@@ -4025,24 +4025,24 @@ function Bc(t) {
|
|
|
4025
4025
|
const i = s.contentWindow;
|
|
4026
4026
|
i?.[t] && (n = i[t]), r.head.removeChild(s);
|
|
4027
4027
|
} catch (s) {
|
|
4028
|
-
|
|
4028
|
+
Nc && m.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `, s);
|
|
4029
4029
|
}
|
|
4030
4030
|
return n && (Xe[t] = n.bind(D));
|
|
4031
4031
|
}
|
|
4032
|
-
function
|
|
4032
|
+
function zc(t) {
|
|
4033
4033
|
Xe[t] = void 0;
|
|
4034
4034
|
}
|
|
4035
4035
|
const Te = "__sentry_xhr_v3__";
|
|
4036
|
-
function
|
|
4037
|
-
ce("xhr", t), le("xhr",
|
|
4036
|
+
function jc(t) {
|
|
4037
|
+
ce("xhr", t), le("xhr", qc);
|
|
4038
4038
|
}
|
|
4039
|
-
function
|
|
4039
|
+
function qc() {
|
|
4040
4040
|
if (!D.XMLHttpRequest)
|
|
4041
4041
|
return;
|
|
4042
4042
|
const t = XMLHttpRequest.prototype;
|
|
4043
4043
|
t.open = new Proxy(t.open, {
|
|
4044
4044
|
apply(e, n, r) {
|
|
4045
|
-
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 = Gc(r[1]);
|
|
4046
4046
|
if (!o || !a)
|
|
4047
4047
|
return e.apply(n, r);
|
|
4048
4048
|
n[Te] = {
|
|
@@ -4091,7 +4091,7 @@ function jc() {
|
|
|
4091
4091
|
}
|
|
4092
4092
|
});
|
|
4093
4093
|
}
|
|
4094
|
-
function
|
|
4094
|
+
function Gc(t) {
|
|
4095
4095
|
if (j(t))
|
|
4096
4096
|
return t;
|
|
4097
4097
|
try {
|
|
@@ -4099,8 +4099,8 @@ function qc(t) {
|
|
|
4099
4099
|
} catch {
|
|
4100
4100
|
}
|
|
4101
4101
|
}
|
|
4102
|
-
const
|
|
4103
|
-
function
|
|
4102
|
+
const Vc = 40;
|
|
4103
|
+
function Wc(t, e = Hc("fetch")) {
|
|
4104
4104
|
let n = 0, r = 0;
|
|
4105
4105
|
async function s(i) {
|
|
4106
4106
|
const o = i.body.length;
|
|
@@ -4134,18 +4134,18 @@ function Vc(t, e = Bc("fetch")) {
|
|
|
4134
4134
|
}
|
|
4135
4135
|
};
|
|
4136
4136
|
} catch (c) {
|
|
4137
|
-
throw
|
|
4137
|
+
throw zc("fetch"), c;
|
|
4138
4138
|
} finally {
|
|
4139
4139
|
n -= o, r--;
|
|
4140
4140
|
}
|
|
4141
4141
|
}
|
|
4142
|
-
return
|
|
4142
|
+
return Ea(
|
|
4143
4143
|
t,
|
|
4144
4144
|
s,
|
|
4145
|
-
sn(t.bufferSize ||
|
|
4145
|
+
sn(t.bufferSize || Vc)
|
|
4146
4146
|
);
|
|
4147
4147
|
}
|
|
4148
|
-
const ut = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__,
|
|
4148
|
+
const ut = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Xc = 30, Kc = 50;
|
|
4149
4149
|
function zt(t, e, n, r) {
|
|
4150
4150
|
const s = {
|
|
4151
4151
|
filename: t,
|
|
@@ -4155,44 +4155,44 @@ function zt(t, e, n, r) {
|
|
|
4155
4155
|
};
|
|
4156
4156
|
return n !== void 0 && (s.lineno = n), r !== void 0 && (s.colno = r), s;
|
|
4157
4157
|
}
|
|
4158
|
-
const
|
|
4159
|
-
const e = t.match(
|
|
4158
|
+
const Yc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Zc = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, Jc = /\((\S*)(?::(\d+))(?::(\d+))\)/, Qc = /at (.+?) ?\(data:(.+?),/, el = (t) => {
|
|
4159
|
+
const e = t.match(Qc);
|
|
4160
4160
|
if (e)
|
|
4161
4161
|
return {
|
|
4162
4162
|
filename: `<data:${e[2]}>`,
|
|
4163
4163
|
function: e[1]
|
|
4164
4164
|
};
|
|
4165
|
-
const n =
|
|
4165
|
+
const n = Yc.exec(t);
|
|
4166
4166
|
if (n) {
|
|
4167
4167
|
const [, s, i, o] = n;
|
|
4168
4168
|
return zt(s, oe, +i, +o);
|
|
4169
4169
|
}
|
|
4170
|
-
const r =
|
|
4170
|
+
const r = Zc.exec(t);
|
|
4171
4171
|
if (r) {
|
|
4172
4172
|
if (r[2] && r[2].indexOf("eval") === 0) {
|
|
4173
|
-
const a =
|
|
4173
|
+
const a = Jc.exec(r[2]);
|
|
4174
4174
|
a && (r[2] = a[1], r[3] = a[2], r[4] = a[3]);
|
|
4175
4175
|
}
|
|
4176
4176
|
const [i, o] = ks(r[1] || oe, r[2]);
|
|
4177
4177
|
return zt(o, i, r[3] ? +r[3] : void 0, r[4] ? +r[4] : void 0);
|
|
4178
4178
|
}
|
|
4179
|
-
},
|
|
4180
|
-
const e =
|
|
4179
|
+
}, tl = [Xc, el], nl = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, rl = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, sl = (t) => {
|
|
4180
|
+
const e = nl.exec(t);
|
|
4181
4181
|
if (e) {
|
|
4182
4182
|
if (e[3] && e[3].indexOf(" > eval") > -1) {
|
|
4183
|
-
const i =
|
|
4183
|
+
const i = rl.exec(e[3]);
|
|
4184
4184
|
i && (e[1] = e[1] || "eval", e[3] = i[1], e[4] = i[2], e[5] = "");
|
|
4185
4185
|
}
|
|
4186
4186
|
let r = e[3], s = e[1] || oe;
|
|
4187
4187
|
return [s, r] = ks(s, r), zt(r, s, e[4] ? +e[4] : void 0, e[5] ? +e[5] : void 0);
|
|
4188
4188
|
}
|
|
4189
|
-
},
|
|
4189
|
+
}, il = [Kc, sl], ol = [tl, il], al = Nr(...ol), ks = (t, e) => {
|
|
4190
4190
|
const n = t.indexOf("safari-extension") !== -1, r = t.indexOf("safari-web-extension") !== -1;
|
|
4191
4191
|
return n || r ? [
|
|
4192
4192
|
t.indexOf("@") !== -1 ? t.split("@")[0] : oe,
|
|
4193
4193
|
n ? `safari-extension:${e}` : `safari-web-extension:${e}`
|
|
4194
4194
|
] : [t, e];
|
|
4195
|
-
}, Ue = 1024,
|
|
4195
|
+
}, Ue = 1024, cl = "Breadcrumbs", ll = ((t = {}) => {
|
|
4196
4196
|
const e = {
|
|
4197
4197
|
console: !0,
|
|
4198
4198
|
dom: !0,
|
|
@@ -4203,13 +4203,13 @@ const Kc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Yc = /^\s*at (?:(.+?\)(?: \
|
|
|
4203
4203
|
...t
|
|
4204
4204
|
};
|
|
4205
4205
|
return {
|
|
4206
|
-
name:
|
|
4206
|
+
name: cl,
|
|
4207
4207
|
setup(n) {
|
|
4208
|
-
e.console &&
|
|
4208
|
+
e.console && Za(hl(n)), e.dom && $c(pl(n, e.dom)), e.xhr && jc(fl(n)), e.fetch && pc(gl(n)), e.history && Ss(ml(n)), e.sentry && n.on("beforeSendEvent", dl(n));
|
|
4209
4209
|
}
|
|
4210
4210
|
};
|
|
4211
|
-
}),
|
|
4212
|
-
function
|
|
4211
|
+
}), ul = ll;
|
|
4212
|
+
function dl(t) {
|
|
4213
4213
|
return function(n) {
|
|
4214
4214
|
C() === t && Z(
|
|
4215
4215
|
{
|
|
@@ -4224,7 +4224,7 @@ function ul(t) {
|
|
|
4224
4224
|
);
|
|
4225
4225
|
};
|
|
4226
4226
|
}
|
|
4227
|
-
function
|
|
4227
|
+
function pl(t, e) {
|
|
4228
4228
|
return function(r) {
|
|
4229
4229
|
if (C() !== t)
|
|
4230
4230
|
return;
|
|
@@ -4233,8 +4233,8 @@ function dl(t, e) {
|
|
|
4233
4233
|
`\`dom.maxStringLength\` cannot exceed ${Ue}, but a value of ${a} was configured. Sentry will use ${Ue} instead.`
|
|
4234
4234
|
), a = Ue), typeof o == "string" && (o = [o]);
|
|
4235
4235
|
try {
|
|
4236
|
-
const l = r.event, d =
|
|
4237
|
-
s = Fr(d, { keyAttrs: o, maxStringLength: a }), i =
|
|
4236
|
+
const l = r.event, d = _l(l) ? l.target : l;
|
|
4237
|
+
s = Fr(d, { keyAttrs: o, maxStringLength: a }), i = gi(d);
|
|
4238
4238
|
} catch {
|
|
4239
4239
|
s = "<unknown>";
|
|
4240
4240
|
}
|
|
@@ -4251,7 +4251,7 @@ function dl(t, e) {
|
|
|
4251
4251
|
});
|
|
4252
4252
|
};
|
|
4253
4253
|
}
|
|
4254
|
-
function
|
|
4254
|
+
function hl(t) {
|
|
4255
4255
|
return function(n) {
|
|
4256
4256
|
if (C() !== t)
|
|
4257
4257
|
return;
|
|
@@ -4261,7 +4261,7 @@ function pl(t) {
|
|
|
4261
4261
|
arguments: n.args,
|
|
4262
4262
|
logger: "console"
|
|
4263
4263
|
},
|
|
4264
|
-
level:
|
|
4264
|
+
level: Qa(n.level),
|
|
4265
4265
|
message: vn(n.args, " ")
|
|
4266
4266
|
};
|
|
4267
4267
|
if (n.level === "assert")
|
|
@@ -4275,7 +4275,7 @@ function pl(t) {
|
|
|
4275
4275
|
});
|
|
4276
4276
|
};
|
|
4277
4277
|
}
|
|
4278
|
-
function
|
|
4278
|
+
function fl(t) {
|
|
4279
4279
|
return function(n) {
|
|
4280
4280
|
if (C() !== t)
|
|
4281
4281
|
return;
|
|
@@ -4300,7 +4300,7 @@ function hl(t) {
|
|
|
4300
4300
|
t.emit("beforeOutgoingRequestBreadcrumb", p, u), Z(p, u);
|
|
4301
4301
|
};
|
|
4302
4302
|
}
|
|
4303
|
-
function
|
|
4303
|
+
function gl(t) {
|
|
4304
4304
|
return function(n) {
|
|
4305
4305
|
if (C() !== t)
|
|
4306
4306
|
return;
|
|
@@ -4340,7 +4340,7 @@ function fl(t) {
|
|
|
4340
4340
|
}
|
|
4341
4341
|
};
|
|
4342
4342
|
}
|
|
4343
|
-
function
|
|
4343
|
+
function ml(t) {
|
|
4344
4344
|
return function(n) {
|
|
4345
4345
|
if (C() !== t)
|
|
4346
4346
|
return;
|
|
@@ -4357,10 +4357,10 @@ function gl(t) {
|
|
|
4357
4357
|
});
|
|
4358
4358
|
};
|
|
4359
4359
|
}
|
|
4360
|
-
function
|
|
4360
|
+
function _l(t) {
|
|
4361
4361
|
return !!t && !!t.target;
|
|
4362
4362
|
}
|
|
4363
|
-
const
|
|
4363
|
+
const yl = [
|
|
4364
4364
|
"EventTarget",
|
|
4365
4365
|
"Window",
|
|
4366
4366
|
"Node",
|
|
@@ -4392,7 +4392,7 @@ const _l = [
|
|
|
4392
4392
|
"XMLHttpRequest",
|
|
4393
4393
|
"XMLHttpRequestEventTarget",
|
|
4394
4394
|
"XMLHttpRequestUpload"
|
|
4395
|
-
],
|
|
4395
|
+
], El = "BrowserApiErrors", bl = ((t = {}) => {
|
|
4396
4396
|
const e = {
|
|
4397
4397
|
XMLHttpRequest: !0,
|
|
4398
4398
|
eventTarget: !0,
|
|
@@ -4403,16 +4403,16 @@ const _l = [
|
|
|
4403
4403
|
...t
|
|
4404
4404
|
};
|
|
4405
4405
|
return {
|
|
4406
|
-
name:
|
|
4406
|
+
name: El,
|
|
4407
4407
|
// TODO: This currently only works for the first client this is setup
|
|
4408
4408
|
// We may want to adjust this to check for client etc.
|
|
4409
4409
|
setupOnce() {
|
|
4410
|
-
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", kl), e.XMLHttpRequest && "XMLHttpRequest" in T && $(XMLHttpRequest.prototype, "send", xl);
|
|
4411
4411
|
const n = e.eventTarget;
|
|
4412
|
-
n && (Array.isArray(n) ? n :
|
|
4412
|
+
n && (Array.isArray(n) ? n : yl).forEach((s) => Rl(s, e));
|
|
4413
4413
|
}
|
|
4414
4414
|
};
|
|
4415
|
-
}),
|
|
4415
|
+
}), Sl = bl;
|
|
4416
4416
|
function hr(t) {
|
|
4417
4417
|
return function(...e) {
|
|
4418
4418
|
const n = e[0];
|
|
@@ -4424,7 +4424,7 @@ function hr(t) {
|
|
|
4424
4424
|
}), t.apply(this, e);
|
|
4425
4425
|
};
|
|
4426
4426
|
}
|
|
4427
|
-
function
|
|
4427
|
+
function kl(t) {
|
|
4428
4428
|
return function(e) {
|
|
4429
4429
|
return t.apply(this, [
|
|
4430
4430
|
me(e, {
|
|
@@ -4439,7 +4439,7 @@ function Sl(t) {
|
|
|
4439
4439
|
]);
|
|
4440
4440
|
};
|
|
4441
4441
|
}
|
|
4442
|
-
function
|
|
4442
|
+
function xl(t) {
|
|
4443
4443
|
return function(...e) {
|
|
4444
4444
|
const n = this;
|
|
4445
4445
|
return ["onload", "onerror", "onprogress", "onreadystatechange"].forEach((s) => {
|
|
@@ -4458,12 +4458,12 @@ function kl(t) {
|
|
|
4458
4458
|
}), t.apply(this, e);
|
|
4459
4459
|
};
|
|
4460
4460
|
}
|
|
4461
|
-
function
|
|
4461
|
+
function Rl(t, e) {
|
|
4462
4462
|
const r = T[t]?.prototype;
|
|
4463
4463
|
r?.hasOwnProperty?.("addEventListener") && ($(r, "addEventListener", function(s) {
|
|
4464
4464
|
return function(i, o, a) {
|
|
4465
4465
|
try {
|
|
4466
|
-
|
|
4466
|
+
wl(o) && (o.handleEvent = me(o.handleEvent, {
|
|
4467
4467
|
mechanism: {
|
|
4468
4468
|
data: {
|
|
4469
4469
|
handler: X(o),
|
|
@@ -4475,7 +4475,7 @@ function xl(t, e) {
|
|
|
4475
4475
|
}));
|
|
4476
4476
|
} catch {
|
|
4477
4477
|
}
|
|
4478
|
-
return e.unregisterOriginalCallbacks &&
|
|
4478
|
+
return e.unregisterOriginalCallbacks && Tl(this, i, o), s.apply(this, [
|
|
4479
4479
|
i,
|
|
4480
4480
|
me(o, {
|
|
4481
4481
|
mechanism: {
|
|
@@ -4501,13 +4501,13 @@ function xl(t, e) {
|
|
|
4501
4501
|
};
|
|
4502
4502
|
}));
|
|
4503
4503
|
}
|
|
4504
|
-
function
|
|
4504
|
+
function wl(t) {
|
|
4505
4505
|
return typeof t.handleEvent == "function";
|
|
4506
4506
|
}
|
|
4507
|
-
function
|
|
4507
|
+
function Tl(t, e, n) {
|
|
4508
4508
|
t && typeof t == "object" && "removeEventListener" in t && typeof t.removeEventListener == "function" && t.removeEventListener(e, n);
|
|
4509
4509
|
}
|
|
4510
|
-
const
|
|
4510
|
+
const vl = (t = {}) => {
|
|
4511
4511
|
const e = t.lifecycle ?? "route";
|
|
4512
4512
|
return {
|
|
4513
4513
|
name: "BrowserSession",
|
|
@@ -4527,17 +4527,17 @@ const Tl = (t = {}) => {
|
|
|
4527
4527
|
});
|
|
4528
4528
|
}
|
|
4529
4529
|
};
|
|
4530
|
-
},
|
|
4531
|
-
name:
|
|
4530
|
+
}, Il = "CultureContext", Cl = (() => ({
|
|
4531
|
+
name: Il,
|
|
4532
4532
|
preprocessEvent(t) {
|
|
4533
|
-
const e =
|
|
4533
|
+
const e = Dl();
|
|
4534
4534
|
e && (t.contexts = {
|
|
4535
4535
|
...t.contexts,
|
|
4536
4536
|
culture: { ...e, ...t.contexts?.culture }
|
|
4537
4537
|
});
|
|
4538
4538
|
}
|
|
4539
|
-
})),
|
|
4540
|
-
function
|
|
4539
|
+
})), Al = Cl;
|
|
4540
|
+
function Dl() {
|
|
4541
4541
|
try {
|
|
4542
4542
|
const t = T.Intl;
|
|
4543
4543
|
if (!t)
|
|
@@ -4552,28 +4552,28 @@ function Al() {
|
|
|
4552
4552
|
return;
|
|
4553
4553
|
}
|
|
4554
4554
|
}
|
|
4555
|
-
const
|
|
4555
|
+
const Nl = "GlobalHandlers", Ol = ((t = {}) => {
|
|
4556
4556
|
const e = {
|
|
4557
4557
|
onerror: !0,
|
|
4558
4558
|
onunhandledrejection: !0,
|
|
4559
4559
|
...t
|
|
4560
4560
|
};
|
|
4561
4561
|
return {
|
|
4562
|
-
name:
|
|
4562
|
+
name: Nl,
|
|
4563
4563
|
setupOnce() {
|
|
4564
4564
|
Error.stackTraceLimit = 50;
|
|
4565
4565
|
},
|
|
4566
4566
|
setup(n) {
|
|
4567
|
-
e.onerror && (
|
|
4567
|
+
e.onerror && (Pl(n), fr("onerror")), e.onunhandledrejection && (Ll(n), fr("onunhandledrejection"));
|
|
4568
4568
|
}
|
|
4569
4569
|
};
|
|
4570
|
-
}),
|
|
4571
|
-
function
|
|
4572
|
-
|
|
4570
|
+
}), $l = Ol;
|
|
4571
|
+
function Pl(t) {
|
|
4572
|
+
ii((e) => {
|
|
4573
4573
|
const { stackParser: n, attachStacktrace: r } = xs();
|
|
4574
4574
|
if (C() !== t || Es())
|
|
4575
4575
|
return;
|
|
4576
|
-
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 = Ul(
|
|
4577
4577
|
cn(n, c || s, void 0, r, !1),
|
|
4578
4578
|
i,
|
|
4579
4579
|
o,
|
|
@@ -4588,12 +4588,12 @@ function $l(t) {
|
|
|
4588
4588
|
});
|
|
4589
4589
|
});
|
|
4590
4590
|
}
|
|
4591
|
-
function
|
|
4592
|
-
|
|
4591
|
+
function Ll(t) {
|
|
4592
|
+
ai((e) => {
|
|
4593
4593
|
const { stackParser: n, attachStacktrace: r } = xs();
|
|
4594
4594
|
if (C() !== t || Es())
|
|
4595
4595
|
return;
|
|
4596
|
-
const s =
|
|
4596
|
+
const s = Ml(e), i = it(s) ? Fl(s) : cn(n, s, void 0, r, !0);
|
|
4597
4597
|
i.level = "error", ts(i, {
|
|
4598
4598
|
originalException: s,
|
|
4599
4599
|
mechanism: {
|
|
@@ -4603,7 +4603,7 @@ function Pl(t) {
|
|
|
4603
4603
|
});
|
|
4604
4604
|
});
|
|
4605
4605
|
}
|
|
4606
|
-
function
|
|
4606
|
+
function Ml(t) {
|
|
4607
4607
|
if (it(t))
|
|
4608
4608
|
return t;
|
|
4609
4609
|
try {
|
|
@@ -4615,7 +4615,7 @@ function Ll(t) {
|
|
|
4615
4615
|
}
|
|
4616
4616
|
return t;
|
|
4617
4617
|
}
|
|
4618
|
-
function
|
|
4618
|
+
function Fl(t) {
|
|
4619
4619
|
return {
|
|
4620
4620
|
exception: {
|
|
4621
4621
|
values: [
|
|
@@ -4628,8 +4628,8 @@ function Ml(t) {
|
|
|
4628
4628
|
}
|
|
4629
4629
|
};
|
|
4630
4630
|
}
|
|
4631
|
-
function
|
|
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 =
|
|
4631
|
+
function Ul(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 = Bl(e) ?? Zt();
|
|
4633
4633
|
return c.length === 0 && c.push({
|
|
4634
4634
|
colno: l,
|
|
4635
4635
|
filename: u,
|
|
@@ -4647,16 +4647,16 @@ function xs() {
|
|
|
4647
4647
|
attachStacktrace: !1
|
|
4648
4648
|
};
|
|
4649
4649
|
}
|
|
4650
|
-
function
|
|
4650
|
+
function Bl(t) {
|
|
4651
4651
|
if (!(!j(t) || t.length === 0))
|
|
4652
|
-
return t.startsWith("data:") ? `<${
|
|
4652
|
+
return t.startsWith("data:") ? `<${Na(t, !1)}>` : t;
|
|
4653
4653
|
}
|
|
4654
|
-
const
|
|
4654
|
+
const Hl = () => ({
|
|
4655
4655
|
name: "HttpContext",
|
|
4656
4656
|
preprocessEvent(t) {
|
|
4657
4657
|
if (!T.navigator && !T.location && !T.document)
|
|
4658
4658
|
return;
|
|
4659
|
-
const e =
|
|
4659
|
+
const e = yc(), n = {
|
|
4660
4660
|
...e.headers,
|
|
4661
4661
|
...t.request?.headers
|
|
4662
4662
|
};
|
|
@@ -4666,13 +4666,13 @@ const Bl = () => ({
|
|
|
4666
4666
|
headers: n
|
|
4667
4667
|
};
|
|
4668
4668
|
}
|
|
4669
|
-
}),
|
|
4670
|
-
const e = t.limit ||
|
|
4669
|
+
}), zl = "cause", jl = 5, ql = "LinkedErrors", Gl = ((t = {}) => {
|
|
4670
|
+
const e = t.limit || jl, n = t.key || zl;
|
|
4671
4671
|
return {
|
|
4672
|
-
name:
|
|
4672
|
+
name: ql,
|
|
4673
4673
|
preprocessEvent(r, s, i) {
|
|
4674
4674
|
const o = i.getOptions();
|
|
4675
|
-
|
|
4675
|
+
Ya(
|
|
4676
4676
|
// This differs from the LinkedErrors integration in core by using a different exceptionFromError function
|
|
4677
4677
|
on,
|
|
4678
4678
|
o.stackParser,
|
|
@@ -4683,15 +4683,15 @@ const Bl = () => ({
|
|
|
4683
4683
|
);
|
|
4684
4684
|
}
|
|
4685
4685
|
};
|
|
4686
|
-
}),
|
|
4687
|
-
function
|
|
4688
|
-
return
|
|
4686
|
+
}), Vl = Gl;
|
|
4687
|
+
function Wl() {
|
|
4688
|
+
return Xl() ? (ut && ye(() => {
|
|
4689
4689
|
console.error(
|
|
4690
4690
|
"[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/"
|
|
4691
4691
|
);
|
|
4692
4692
|
}), !0) : !1;
|
|
4693
4693
|
}
|
|
4694
|
-
function
|
|
4694
|
+
function Xl() {
|
|
4695
4695
|
if (typeof T.window > "u")
|
|
4696
4696
|
return !1;
|
|
4697
4697
|
const t = T;
|
|
@@ -4700,53 +4700,53 @@ function Wl() {
|
|
|
4700
4700
|
const n = Zt(), r = ["chrome-extension", "moz-extension", "ms-browser-extension", "safari-web-extension"];
|
|
4701
4701
|
return !(T === T.top && r.some((i) => n.startsWith(`${i}://`)));
|
|
4702
4702
|
}
|
|
4703
|
-
function
|
|
4703
|
+
function Kl(t) {
|
|
4704
4704
|
return [
|
|
4705
4705
|
// TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
|
|
4706
4706
|
// eslint-disable-next-line deprecation/deprecation
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4707
|
+
za(),
|
|
4708
|
+
Fa(),
|
|
4709
|
+
cc(),
|
|
4710
|
+
Sl(),
|
|
4711
|
+
ul(),
|
|
4712
|
+
$l(),
|
|
4713
|
+
Vl(),
|
|
4714
|
+
nc(),
|
|
4715
|
+
Hl(),
|
|
4716
|
+
Al(),
|
|
4717
|
+
vl()
|
|
4718
4718
|
];
|
|
4719
4719
|
}
|
|
4720
|
-
function
|
|
4721
|
-
const e = !t.skipBrowserExtensionCheck &&
|
|
4722
|
-
let n = t.defaultIntegrations == null ?
|
|
4720
|
+
function Yl(t = {}) {
|
|
4721
|
+
const e = !t.skipBrowserExtensionCheck && Wl();
|
|
4722
|
+
let n = t.defaultIntegrations == null ? Kl() : t.defaultIntegrations;
|
|
4723
4723
|
const r = {
|
|
4724
4724
|
...t,
|
|
4725
4725
|
enabled: e ? !1 : t.enabled,
|
|
4726
|
-
stackParser:
|
|
4727
|
-
integrations:
|
|
4726
|
+
stackParser: ri(t.stackParser || al),
|
|
4727
|
+
integrations: oa({
|
|
4728
4728
|
integrations: t.integrations,
|
|
4729
4729
|
defaultIntegrations: n
|
|
4730
4730
|
}),
|
|
4731
|
-
transport: t.transport ||
|
|
4731
|
+
transport: t.transport || Wc
|
|
4732
4732
|
};
|
|
4733
|
-
return
|
|
4733
|
+
return Aa(Ac, r);
|
|
4734
4734
|
}
|
|
4735
|
-
const
|
|
4736
|
-
class
|
|
4735
|
+
const Zl = "https://06451c8d861702902d2e6b2088fa9b62@o1128948.ingest.us.sentry.io/4509207135387648";
|
|
4736
|
+
class Jl {
|
|
4737
4737
|
constructor(e) {
|
|
4738
4738
|
this.enabled = e;
|
|
4739
4739
|
}
|
|
4740
4740
|
init(e) {
|
|
4741
|
-
this.enabled &&
|
|
4742
|
-
dsn:
|
|
4741
|
+
this.enabled && Yl({
|
|
4742
|
+
dsn: Zl,
|
|
4743
4743
|
environment: e,
|
|
4744
4744
|
defaultIntegrations: !1,
|
|
4745
4745
|
tracesSampleRate: 0
|
|
4746
4746
|
});
|
|
4747
4747
|
}
|
|
4748
4748
|
setUser(e) {
|
|
4749
|
-
!this.enabled || !e || (this.flavour = e,
|
|
4749
|
+
!this.enabled || !e || (this.flavour = e, Qo({ id: e, username: e }));
|
|
4750
4750
|
}
|
|
4751
4751
|
setTransactionId(e) {
|
|
4752
4752
|
this.txnId = e;
|
|
@@ -4755,7 +4755,7 @@ class Zl {
|
|
|
4755
4755
|
this.enabled && Z({ category: e, message: n, data: r, level: "info", timestamp: Date.now() / 1e3 });
|
|
4756
4756
|
}
|
|
4757
4757
|
captureEvent(e, n) {
|
|
4758
|
-
this.enabled &&
|
|
4758
|
+
this.enabled && Jo(e, {
|
|
4759
4759
|
level: "info",
|
|
4760
4760
|
tags: { txn_id: this.txnId, flavour: this.flavour },
|
|
4761
4761
|
extra: n,
|
|
@@ -4778,8 +4778,8 @@ const b = {
|
|
|
4778
4778
|
UNAUTHORIZED: 401,
|
|
4779
4779
|
FORBIDDEN: 403
|
|
4780
4780
|
};
|
|
4781
|
-
var
|
|
4782
|
-
const
|
|
4781
|
+
var Ql = /* @__PURE__ */ ((t) => (t.NOT_INITIALIZED = "na", t.INIT = "init", t.STOP = "stop", t.COMMIT = "commit", t))(Ql || {}), eu = /* @__PURE__ */ ((t) => (t.START = "start", t.PAUSE = "pause", t.RESUME = "resume", t.STOP = "stop", t))(eu || {}), tu = /* @__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))(tu || {}), nu = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.FAILURE = "failure", t.PARTIAL_COMPLETE = "partial_complete", t.IN_PROGRESS = "in-progress", t))(nu || {}), 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 || {}), ru = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.IN_PROGRESS = "in-progress", t.FAILED = "failed", t.CANCELLED = "cancelled", t))(ru || {}), su = /* @__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))(su || {}), 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 iu = 404, ou = 408, au = {
|
|
4783
4783
|
[b.UNAUTHORIZED]: {
|
|
4784
4784
|
error_code: y.UNAUTHORIZED,
|
|
4785
4785
|
detail: "Authentication failed. Token may be expired."
|
|
@@ -4788,35 +4788,35 @@ const su = 404, iu = 408, ou = {
|
|
|
4788
4788
|
error_code: y.FORBIDDEN,
|
|
4789
4789
|
detail: "Access forbidden."
|
|
4790
4790
|
},
|
|
4791
|
-
[
|
|
4791
|
+
[iu]: {
|
|
4792
4792
|
error_code: y.NOT_FOUND,
|
|
4793
4793
|
detail: "Requested resource not found."
|
|
4794
4794
|
},
|
|
4795
|
-
[
|
|
4795
|
+
[ou]: {
|
|
4796
4796
|
error_code: y.NETWORK_ERROR,
|
|
4797
4797
|
detail: "Request timed out."
|
|
4798
4798
|
}
|
|
4799
4799
|
};
|
|
4800
|
-
function
|
|
4801
|
-
const n =
|
|
4800
|
+
function cu(t, e) {
|
|
4801
|
+
const n = au[t];
|
|
4802
4802
|
return n ? { error_code: n.error_code, message: n.detail } : {
|
|
4803
4803
|
error_code: t >= 400 && t < 500 ? y.BAD_REQUEST : y.INTERNAL_SERVER_ERROR,
|
|
4804
4804
|
message: e
|
|
4805
4805
|
};
|
|
4806
4806
|
}
|
|
4807
|
-
function
|
|
4807
|
+
function lu(t) {
|
|
4808
4808
|
if (t instanceof W)
|
|
4809
4809
|
return t.body?.error?.code;
|
|
4810
4810
|
}
|
|
4811
|
-
function
|
|
4811
|
+
function uu(t) {
|
|
4812
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;
|
|
4813
4813
|
}
|
|
4814
4814
|
function S(t, e) {
|
|
4815
4815
|
if (t instanceof W) {
|
|
4816
|
-
const { error_code: r, message: s } =
|
|
4816
|
+
const { error_code: r, message: s } = cu(t.status, t.message);
|
|
4817
4817
|
return { error_code: r, status_code: t.status, message: `${e} ${s}` };
|
|
4818
4818
|
}
|
|
4819
|
-
const n =
|
|
4819
|
+
const n = uu(t);
|
|
4820
4820
|
return n ? {
|
|
4821
4821
|
error_code: y.NETWORK_ERROR,
|
|
4822
4822
|
status_code: b.INTERNAL_SERVER_ERROR,
|
|
@@ -4827,7 +4827,7 @@ function S(t, e) {
|
|
|
4827
4827
|
message: `${e} ${t}`
|
|
4828
4828
|
};
|
|
4829
4829
|
}
|
|
4830
|
-
class
|
|
4830
|
+
class du {
|
|
4831
4831
|
constructor(e, n, r) {
|
|
4832
4832
|
this.transport = e, this.hosts = n, this.allianceClient = r;
|
|
4833
4833
|
}
|
|
@@ -5099,7 +5099,7 @@ class uu {
|
|
|
5099
5099
|
}
|
|
5100
5100
|
}
|
|
5101
5101
|
const gr = "https://cdn.eka.care/vagus/cmlf0ip4a00000td1dmth2wk3.png", mr = "https://cdn.eka.care/vagus/cmlf0j9ea00010td1h3mi6zqk.png", xt = "3cm", Rt = "3.5cm";
|
|
5102
|
-
class
|
|
5102
|
+
class pu {
|
|
5103
5103
|
constructor(e, n, r) {
|
|
5104
5104
|
this.transport = e, this.hosts = n, this.allianceClient = r;
|
|
5105
5105
|
}
|
|
@@ -5389,7 +5389,7 @@ class du {
|
|
|
5389
5389
|
}
|
|
5390
5390
|
function ee(t, e, n) {
|
|
5391
5391
|
return {
|
|
5392
|
-
error_code:
|
|
5392
|
+
error_code: hu(t, e),
|
|
5393
5393
|
status_code: t.httpStatus ?? b.INTERNAL_SERVER_ERROR,
|
|
5394
5394
|
message: t.message || n
|
|
5395
5395
|
};
|
|
@@ -5400,10 +5400,10 @@ function ne(t) {
|
|
|
5400
5400
|
function _r(t) {
|
|
5401
5401
|
return t.success ? ne(t) : t.error.httpStatus ?? b.INTERNAL_SERVER_ERROR;
|
|
5402
5402
|
}
|
|
5403
|
-
function
|
|
5403
|
+
function hu(t, e) {
|
|
5404
5404
|
return t.code === "txn_limit_exceeded" ? y.TXN_LIMIT_EXCEEDED : t.httpStatus === b.UNAUTHORIZED ? y.UNAUTHORIZED : t.httpStatus === b.FORBIDDEN ? y.FORBIDDEN : e;
|
|
5405
5405
|
}
|
|
5406
|
-
class
|
|
5406
|
+
class fu {
|
|
5407
5407
|
constructor(e, n, r, s) {
|
|
5408
5408
|
this.allianceClient = e, this.transport = n, this.hosts = r, this.tracker = s, this.txnID = "", this.storedSession = null, this.sessionEnded = !1;
|
|
5409
5409
|
}
|
|
@@ -5713,23 +5713,26 @@ class hu {
|
|
|
5713
5713
|
async processPreRecordedAudio({
|
|
5714
5714
|
upload: e,
|
|
5715
5715
|
audioFile: n,
|
|
5716
|
-
audioFileName: r = "audio_1.mp3"
|
|
5716
|
+
audioFileName: r = "audio_1.mp3",
|
|
5717
|
+
storage_provider: s = Bs
|
|
5717
5718
|
}) {
|
|
5718
5719
|
try {
|
|
5719
|
-
const
|
|
5720
|
-
|
|
5721
|
-
|
|
5720
|
+
const i = await this.allianceClient.uploadAudioFile(n, r, e, {
|
|
5721
|
+
storageProvider: s
|
|
5722
|
+
});
|
|
5723
|
+
return i.success ? {
|
|
5724
|
+
status_code: ne(i),
|
|
5722
5725
|
message: "Audio file uploaded successfully."
|
|
5723
5726
|
} : ee(
|
|
5724
|
-
|
|
5727
|
+
i.error,
|
|
5725
5728
|
y.AUDIO_UPLOAD_FAILED,
|
|
5726
5729
|
"Audio upload failed."
|
|
5727
5730
|
);
|
|
5728
|
-
} catch (
|
|
5731
|
+
} catch (i) {
|
|
5729
5732
|
return {
|
|
5730
5733
|
error_code: y.INTERNAL_SERVER_ERROR,
|
|
5731
5734
|
status_code: b.INTERNAL_SERVER_ERROR,
|
|
5732
|
-
message: `Failed to upload audio file. ${
|
|
5735
|
+
message: `Failed to upload audio file. ${i}`
|
|
5733
5736
|
};
|
|
5734
5737
|
}
|
|
5735
5738
|
}
|
|
@@ -5785,7 +5788,7 @@ const yr = (t) => {
|
|
|
5785
5788
|
} catch {
|
|
5786
5789
|
return t;
|
|
5787
5790
|
}
|
|
5788
|
-
},
|
|
5791
|
+
}, gu = (t) => {
|
|
5789
5792
|
try {
|
|
5790
5793
|
const e = atob(t), n = new Uint8Array(e.length);
|
|
5791
5794
|
for (let s = 0; s < e.length; s++)
|
|
@@ -5794,9 +5797,9 @@ const yr = (t) => {
|
|
|
5794
5797
|
} catch (e) {
|
|
5795
5798
|
return console.error("Error decoding base64 string:", e), "";
|
|
5796
5799
|
}
|
|
5797
|
-
},
|
|
5800
|
+
}, mu = (t, e) => {
|
|
5798
5801
|
if (!e || e.trim() === "") return null;
|
|
5799
|
-
const n =
|
|
5802
|
+
const n = gu(e);
|
|
5800
5803
|
switch (t) {
|
|
5801
5804
|
case Ke.JSON:
|
|
5802
5805
|
return yr(n);
|
|
@@ -5810,10 +5813,10 @@ const yr = (t) => {
|
|
|
5810
5813
|
const { value: n } = e;
|
|
5811
5814
|
return typeof n != "string" ? { ...e, value: n ?? null } : {
|
|
5812
5815
|
...e,
|
|
5813
|
-
value:
|
|
5816
|
+
value: mu(e.type, n)
|
|
5814
5817
|
};
|
|
5815
5818
|
}) : [];
|
|
5816
|
-
class
|
|
5819
|
+
class _u {
|
|
5817
5820
|
constructor(e, n) {
|
|
5818
5821
|
this.transport = e, this.hosts = n;
|
|
5819
5822
|
}
|
|
@@ -5840,7 +5843,7 @@ class mu {
|
|
|
5840
5843
|
})).data };
|
|
5841
5844
|
} catch (r) {
|
|
5842
5845
|
const s = S(r, "Failed to fetch chunk transcript,");
|
|
5843
|
-
return { success: !1, error:
|
|
5846
|
+
return { success: !1, error: lu(r) ?? s.error_code };
|
|
5844
5847
|
}
|
|
5845
5848
|
}
|
|
5846
5849
|
async pollSessionOutput(e) {
|
|
@@ -5954,8 +5957,8 @@ class mu {
|
|
|
5954
5957
|
};
|
|
5955
5958
|
}
|
|
5956
5959
|
}
|
|
5957
|
-
const
|
|
5958
|
-
class
|
|
5960
|
+
const yu = 5e3;
|
|
5961
|
+
class Eu {
|
|
5959
5962
|
constructor(e, n) {
|
|
5960
5963
|
this.transport = e, this.hosts = n, this.microphoneStream = null;
|
|
5961
5964
|
}
|
|
@@ -5997,7 +6000,7 @@ class yu {
|
|
|
5997
6000
|
"No internet connection detected",
|
|
5998
6001
|
{ isOnline: !1 }
|
|
5999
6002
|
);
|
|
6000
|
-
const r = new AbortController(), s = setTimeout(() => r.abort(),
|
|
6003
|
+
const r = new AbortController(), s = setTimeout(() => r.abort(), yu);
|
|
6001
6004
|
try {
|
|
6002
6005
|
await fetch("https://www.google.com/favicon.ico", {
|
|
6003
6006
|
mode: "no-cors",
|
|
@@ -6247,14 +6250,14 @@ function E(t, e = "") {
|
|
|
6247
6250
|
}, getRegex: () => new RegExp(n, e) };
|
|
6248
6251
|
return r;
|
|
6249
6252
|
}
|
|
6250
|
-
var
|
|
6253
|
+
var bu = ((t = "") => {
|
|
6251
6254
|
try {
|
|
6252
6255
|
return !!new RegExp("(?<=1)(?<!1)" + t);
|
|
6253
6256
|
} catch {
|
|
6254
6257
|
return !1;
|
|
6255
6258
|
}
|
|
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}}>`)) },
|
|
6257
|
-
]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() },
|
|
6259
|
+
})(), 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}}>`)) }, Su = /^(?:[ \t]*(?:\n|$))+/, ku = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, xu = /^ {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+|$)/, Ru = /^ {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(), wu = 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]+)*)/, Tu = /^[^\n]+/, pn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, vu = E(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", pn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Iu = 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]*?(?:-->|$))/, Cu = 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(), Au = E(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vs).getRegex(), fn = { blockquote: Au, code: ku, def: vu, fences: xu, heading: Ru, hr: Le, html: Cu, lheading: Ts, list: Iu, newline: Su, paragraph: vs, table: se, text: Tu }, 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(), Du = { ...fn, lheading: wu, 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() }, Nu = { ...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} *[^
|
|
6260
|
+
]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ou = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, $u = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Is = /^( {2,}|\\)\n(?!\s*$)/, Pu = /^(`+|[^`])(?:(?= {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, Lu = E(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, pt).getRegex(), Cs = /(?!~)[\p{P}\p{S}]/u, Mu = /(?!~)[\s\p{P}\p{S}]/u, Fu = /(?:[^\s\p{P}\p{S}]|~)/u, Uu = E(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", bu ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), As = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Bu = E(As, "u").replace(/punct/g, Se).getRegex(), Hu = E(As, "u").replace(/punct/g, Cs).getRegex(), Ds = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", zu = E(Ds, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), ju = E(Ds, "gu").replace(/notPunctSpace/g, Fu).replace(/punctSpace/g, Mu).replace(/punct/g, Cs).getRegex(), qu = 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(), Gu = E(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Se).getRegex(), Vu = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Wu = E(Vu, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), Xu = E(/\\(punct)/, "gu").replace(/punct/g, Se).getRegex(), Ku = 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(), Yu = E(hn).replace("(?:-->|$)", "-->").getRegex(), Zu = 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", Yu).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Qe = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Ju = 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(), Qu = E("reflink|nolink(?!\\()", "g").replace("reflink", Ns).replace("nolink", Os).getRegex(), br = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, mn = { _backpedal: se, anyPunctuation: Xu, autolink: Ku, blockSkip: Uu, br: Is, code: $u, del: se, delLDelim: se, delRDelim: se, emStrongLDelim: Bu, emStrongRDelimAst: zu, emStrongRDelimUnd: qu, escape: Ou, link: Ju, nolink: Os, punctuation: Lu, reflink: Ns, reflinkSearch: Qu, tag: Zu, text: Pu, url: se }, ed = { ...mn, link: E(/^!?\[(label)\]\((.*?)\)/).replace("label", Qe).getRegex(), reflink: E(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Qe).getRegex() }, jt = { ...mn, emStrongRDelimAst: ju, emStrongLDelim: Hu, delLDelim: Gu, delRDelim: Wu, 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() }, td = { ...jt, br: E(Is).replace("{2,}", "*").getRegex(), text: E(jt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, He = { normal: fn, gfm: Du, pedantic: Nu }, we = { normal: mn, gfm: jt, breaks: td, pedantic: ed }, nd = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Sr = (t) => nd[t];
|
|
6258
6261
|
function U(t, e) {
|
|
6259
6262
|
if (e) {
|
|
6260
6263
|
if (I.escapeTest.test(t)) return t.replace(I.escapeReplace, Sr);
|
|
@@ -6295,7 +6298,7 @@ function Rr(t) {
|
|
|
6295
6298
|
return e.length - n <= 2 ? t : e.slice(0, n + 1).join(`
|
|
6296
6299
|
`);
|
|
6297
6300
|
}
|
|
6298
|
-
function
|
|
6301
|
+
function rd(t, e) {
|
|
6299
6302
|
if (t.indexOf(e[1]) === -1) return -1;
|
|
6300
6303
|
let n = 0;
|
|
6301
6304
|
for (let r = 0; r < t.length; r++) if (t[r] === "\\") r++;
|
|
@@ -6303,7 +6306,7 @@ function nd(t, e) {
|
|
|
6303
6306
|
else if (t[r] === e[1] && (n--, n < 0)) return r;
|
|
6304
6307
|
return n > 0 ? -2 : -1;
|
|
6305
6308
|
}
|
|
6306
|
-
function
|
|
6309
|
+
function sd(t, e = 0) {
|
|
6307
6310
|
let n = e, r = "";
|
|
6308
6311
|
for (let s of t) if (s === " ") {
|
|
6309
6312
|
let i = 4 - n % 4;
|
|
@@ -6317,7 +6320,7 @@ function wr(t, e, n, r, s) {
|
|
|
6317
6320
|
let c = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: i, title: o, text: a, tokens: r.inlineTokens(a) };
|
|
6318
6321
|
return r.state.inLink = !1, c;
|
|
6319
6322
|
}
|
|
6320
|
-
function
|
|
6323
|
+
function id(t, e, n) {
|
|
6321
6324
|
let r = t.match(n.other.indentCodeCompensation);
|
|
6322
6325
|
if (r === null) return e;
|
|
6323
6326
|
let s = r[1];
|
|
@@ -6351,7 +6354,7 @@ var et = class {
|
|
|
6351
6354
|
fences(t) {
|
|
6352
6355
|
let e = this.rules.block.fences.exec(t);
|
|
6353
6356
|
if (e) {
|
|
6354
|
-
let n = e[0], r =
|
|
6357
|
+
let n = e[0], r = id(n, e[3] || "", this.rules);
|
|
6355
6358
|
return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
|
|
6356
6359
|
}
|
|
6357
6360
|
}
|
|
@@ -6422,7 +6425,7 @@ ${d}` : d;
|
|
|
6422
6425
|
let c = !1, l = "", d = "";
|
|
6423
6426
|
if (!(e = i.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
6424
6427
|
l = e[0], t = t.substring(l.length);
|
|
6425
|
-
let u =
|
|
6428
|
+
let u = sd(e[2].split(`
|
|
6426
6429
|
`, 1)[0], e[1].length), p = t.split(`
|
|
6427
6430
|
`, 1)[0], h = !u.trim(), f = 0;
|
|
6428
6431
|
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 + `
|
|
@@ -6541,7 +6544,7 @@ ${d}` : d;
|
|
|
6541
6544
|
let i = V(n.slice(0, -1), "\\");
|
|
6542
6545
|
if ((n.length - i.length) % 2 === 0) return;
|
|
6543
6546
|
} else {
|
|
6544
|
-
let i =
|
|
6547
|
+
let i = rd(e[2], "()");
|
|
6545
6548
|
if (i === -2) return;
|
|
6546
6549
|
if (i > -1) {
|
|
6547
6550
|
let o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
|
|
@@ -7191,7 +7194,7 @@ ${t}</tr>
|
|
|
7191
7194
|
provideParser(t = this.block) {
|
|
7192
7195
|
return t ? M.parse : M.parseInline;
|
|
7193
7196
|
}
|
|
7194
|
-
}, w(je, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), w(je, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), je),
|
|
7197
|
+
}, w(je, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), w(je, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), je), od = class {
|
|
7195
7198
|
constructor(...t) {
|
|
7196
7199
|
w(this, "defaults", ln());
|
|
7197
7200
|
w(this, "options", this.setOptions);
|
|
@@ -7351,7 +7354,7 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
7351
7354
|
throw n;
|
|
7352
7355
|
};
|
|
7353
7356
|
}
|
|
7354
|
-
}, ae = new
|
|
7357
|
+
}, ae = new od();
|
|
7355
7358
|
function x(t, e) {
|
|
7356
7359
|
return ae.parse(t, e);
|
|
7357
7360
|
}
|
|
@@ -7384,7 +7387,7 @@ x.parseInline;
|
|
|
7384
7387
|
M.parse;
|
|
7385
7388
|
L.lex;
|
|
7386
7389
|
var g = /* @__PURE__ */ ((t) => (t.COLLAPSED = "collapsed", t.RECORDING = "recording", t.PAUSED = "paused", t.PROCESSING = "processing", t.DONE = "done", t.ERROR = "error", t))(g || {});
|
|
7387
|
-
const
|
|
7390
|
+
const ad = {
|
|
7388
7391
|
[g.COLLAPSED]: [g.RECORDING, g.ERROR],
|
|
7389
7392
|
[g.RECORDING]: [
|
|
7390
7393
|
g.PAUSED,
|
|
@@ -7400,7 +7403,7 @@ const od = {
|
|
|
7400
7403
|
[g.DONE]: [g.COLLAPSED],
|
|
7401
7404
|
[g.ERROR]: [g.COLLAPSED, g.RECORDING]
|
|
7402
7405
|
};
|
|
7403
|
-
class
|
|
7406
|
+
class cd {
|
|
7404
7407
|
constructor() {
|
|
7405
7408
|
this.state = g.COLLAPSED, this.listeners = /* @__PURE__ */ new Set();
|
|
7406
7409
|
}
|
|
@@ -7408,7 +7411,7 @@ class ad {
|
|
|
7408
7411
|
return this.state;
|
|
7409
7412
|
}
|
|
7410
7413
|
canTransition(e) {
|
|
7411
|
-
return
|
|
7414
|
+
return ad[this.state].includes(e);
|
|
7412
7415
|
}
|
|
7413
7416
|
transition(e) {
|
|
7414
7417
|
if (!this.canTransition(e))
|
|
@@ -7430,7 +7433,7 @@ class ad {
|
|
|
7430
7433
|
this.state = g.COLLAPSED;
|
|
7431
7434
|
}
|
|
7432
7435
|
}
|
|
7433
|
-
class
|
|
7436
|
+
class ld {
|
|
7434
7437
|
constructor(e) {
|
|
7435
7438
|
this.startTime = 0, this.elapsed = 0, this.intervalId = null, this.tickCallback = e;
|
|
7436
7439
|
}
|
|
@@ -7463,7 +7466,7 @@ class cd {
|
|
|
7463
7466
|
this.intervalId !== null && (clearInterval(this.intervalId), this.intervalId = null);
|
|
7464
7467
|
}
|
|
7465
7468
|
}
|
|
7466
|
-
function
|
|
7469
|
+
function ud() {
|
|
7467
7470
|
return `
|
|
7468
7471
|
:host {
|
|
7469
7472
|
all: initial;
|
|
@@ -7860,7 +7863,7 @@ function ld() {
|
|
|
7860
7863
|
}
|
|
7861
7864
|
`;
|
|
7862
7865
|
}
|
|
7863
|
-
function
|
|
7866
|
+
function dd(t, e) {
|
|
7864
7867
|
let n = 0, r = 0, s = !1;
|
|
7865
7868
|
function i(c) {
|
|
7866
7869
|
if (c.target.closest("button")) return;
|
|
@@ -7880,12 +7883,12 @@ function ud(t, e) {
|
|
|
7880
7883
|
e.removeEventListener("mousedown", i), e.removeEventListener("touchstart", i), a();
|
|
7881
7884
|
};
|
|
7882
7885
|
}
|
|
7883
|
-
const
|
|
7884
|
-
class
|
|
7886
|
+
const pd = '<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>', hd = '<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>', fd = 20, gd = 14, wt = 3, Tt = 2;
|
|
7887
|
+
class md {
|
|
7885
7888
|
constructor(e, n, r, s) {
|
|
7886
7889
|
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" });
|
|
7887
7890
|
const i = document.createElement("style");
|
|
7888
|
-
i.textContent =
|
|
7891
|
+
i.textContent = ud(), 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);
|
|
7889
7892
|
}
|
|
7890
7893
|
renderState(e, n) {
|
|
7891
7894
|
switch (this.stopAnimation(), this.contentEl.className = "", e) {
|
|
@@ -7926,7 +7929,7 @@ class gd {
|
|
|
7926
7929
|
this.waveformBars = s, n.appendChild(r);
|
|
7927
7930
|
const i = document.createElement("span");
|
|
7928
7931
|
i.className = "timer", i.textContent = e, n.appendChild(i);
|
|
7929
|
-
const o = this.createButton("btn btn-play-pause",
|
|
7932
|
+
const o = this.createButton("btn btn-play-pause", pd);
|
|
7930
7933
|
o.addEventListener("click", this.actions.onPause), n.appendChild(o);
|
|
7931
7934
|
const a = this.createButton("btn btn-stop", Tr);
|
|
7932
7935
|
a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n), this.startAnimation();
|
|
@@ -7940,7 +7943,7 @@ class gd {
|
|
|
7940
7943
|
n.appendChild(r);
|
|
7941
7944
|
const i = document.createElement("span");
|
|
7942
7945
|
i.className = "timer", i.textContent = e, n.appendChild(i);
|
|
7943
|
-
const o = this.createButton("btn btn-play-pause",
|
|
7946
|
+
const o = this.createButton("btn btn-play-pause", hd);
|
|
7944
7947
|
o.addEventListener("click", this.actions.onResume), n.appendChild(o);
|
|
7945
7948
|
const a = this.createButton("btn btn-stop", Tr);
|
|
7946
7949
|
a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n);
|
|
@@ -8011,7 +8014,7 @@ class gd {
|
|
|
8011
8014
|
}
|
|
8012
8015
|
// ─── Waveform ─────────────────────────────────────────────────────────────
|
|
8013
8016
|
createWaveform() {
|
|
8014
|
-
const e = this.orientation === "vertical" ?
|
|
8017
|
+
const e = this.orientation === "vertical" ? gd : fd, n = 28, r = e * (wt + Tt) - Tt, s = n, i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
8015
8018
|
i.setAttribute("width", String(r)), i.setAttribute("height", String(s)), i.setAttribute("viewBox", `0 0 ${r} ${s}`);
|
|
8016
8019
|
const o = [], a = n * 0.4;
|
|
8017
8020
|
for (let c = 0; c < e; c++) {
|
|
@@ -8049,7 +8052,7 @@ class gd {
|
|
|
8049
8052
|
return r.className = e, r.innerHTML = n, r;
|
|
8050
8053
|
}
|
|
8051
8054
|
bindDrag(e) {
|
|
8052
|
-
this.cleanupDrag && this.cleanupDrag(), this.cleanupDrag =
|
|
8055
|
+
this.cleanupDrag && this.cleanupDrag(), this.cleanupDrag = dd(this.widgetEl, e);
|
|
8053
8056
|
}
|
|
8054
8057
|
applyPosition(e) {
|
|
8055
8058
|
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`));
|
|
@@ -8059,9 +8062,9 @@ class gd {
|
|
|
8059
8062
|
return n.textContent = e, n.innerHTML;
|
|
8060
8063
|
}
|
|
8061
8064
|
}
|
|
8062
|
-
class
|
|
8065
|
+
class _d {
|
|
8063
8066
|
constructor(e, n) {
|
|
8064
|
-
this.currentTxnId = "", this.isProcessing = !1, this.isStarting = !1, this.sdk = e, this.config = n, this.callbacks = n.callbacks || {}, this.stateMachine = new
|
|
8067
|
+
this.currentTxnId = "", this.isProcessing = !1, this.isStarting = !1, this.sdk = e, this.config = n, this.callbacks = n.callbacks || {}, this.stateMachine = new cd(), this.timer = new ld((r) => this.renderer.updateTimer(r)), this.renderer = new md(
|
|
8065
8068
|
n.zIndex ?? 9999,
|
|
8066
8069
|
n.position,
|
|
8067
8070
|
n.orientation || "horizontal",
|
|
@@ -8225,16 +8228,16 @@ class md {
|
|
|
8225
8228
|
}
|
|
8226
8229
|
const O = class O {
|
|
8227
8230
|
constructor(e) {
|
|
8228
|
-
this.widgetManager = null, this.config = e, this.hosts =
|
|
8231
|
+
this.widgetManager = null, this.config = e, this.hosts = Xs(e.env), this.callbackRegistry = new Ks(), this.tracker = new Jl(e.enableTracking ?? !1);
|
|
8229
8232
|
const n = {
|
|
8230
8233
|
access_token: e.access_token,
|
|
8231
8234
|
clientId: e.clientId,
|
|
8232
8235
|
flavour: e.flavour,
|
|
8233
8236
|
onUnauthorized: () => this.handleUnauthorized()
|
|
8234
8237
|
};
|
|
8235
|
-
if (e.mode === "ipc" && e.ipcBridge ? this.transport = new
|
|
8238
|
+
if (e.mode === "ipc" && e.ipcBridge ? this.transport = new Gs(n, e.ipcBridge) : this.transport = new js(n), e.enableTracking && (this.tracker.init(e.env), e.flavour && this.tracker.setUser(e.flavour)), !e.allianceConfig?.baseUrl)
|
|
8236
8239
|
throw new Error("[EkaScribe] allianceConfig.baseUrl is required.");
|
|
8237
|
-
this.allianceClient = new
|
|
8240
|
+
this.allianceClient = new Hs({
|
|
8238
8241
|
baseUrl: e.allianceConfig.baseUrl,
|
|
8239
8242
|
accessToken: e.access_token,
|
|
8240
8243
|
mode: e.mode === "ipc" ? En.IPC : En.DIRECT,
|
|
@@ -8246,12 +8249,12 @@ const O = class O {
|
|
|
8246
8249
|
flavour: e.flavour
|
|
8247
8250
|
}), this.allianceClient.init().catch((r) => {
|
|
8248
8251
|
console.error("[EkaScribe] Alliance SDK init failed:", r);
|
|
8249
|
-
}), this.documents = new
|
|
8252
|
+
}), this.documents = new du(this.transport, this.hosts, this.allianceClient), this.sessions = new pu(this.transport, this.hosts, this.allianceClient), this.output = new _u(this.transport, this.hosts), this.recording = new fu(
|
|
8250
8253
|
this.allianceClient,
|
|
8251
8254
|
this.transport,
|
|
8252
8255
|
this.hosts,
|
|
8253
8256
|
this.tracker
|
|
8254
|
-
), e.widget?.enabled && (this.widgetManager = new
|
|
8257
|
+
), e.widget?.enabled && (this.widgetManager = new _d(this, e.widget)), this.allianceClient.registerCallback("onTokenRequired", (r) => {
|
|
8255
8258
|
this.handleUnauthorized().then((s) => {
|
|
8256
8259
|
s ? r.resolve(s) : (console.error("[EkaScribe] Token refresh returned empty token."), r.resolve(""));
|
|
8257
8260
|
}).catch((s) => {
|
|
@@ -8372,7 +8375,7 @@ const O = class O {
|
|
|
8372
8375
|
}
|
|
8373
8376
|
// ─── Compatibility ─────────────────────────────────────────────────────────
|
|
8374
8377
|
async runSystemCompatibilityTest(e) {
|
|
8375
|
-
return new
|
|
8378
|
+
return new Eu(this.transport, this.hosts).runCompatibilityTest(e);
|
|
8376
8379
|
}
|
|
8377
8380
|
// ─── Lifecycle ─────────────────────────────────────────────────────────────
|
|
8378
8381
|
async resetInstance() {
|
|
@@ -8391,20 +8394,20 @@ const O = class O {
|
|
|
8391
8394
|
};
|
|
8392
8395
|
O.instance = null;
|
|
8393
8396
|
let Vt = O;
|
|
8394
|
-
const
|
|
8397
|
+
const bd = (t) => Vt.getInstance(t);
|
|
8395
8398
|
export {
|
|
8396
|
-
|
|
8397
|
-
|
|
8399
|
+
Ql as API_STATUS,
|
|
8400
|
+
su as CALLBACK_TYPE,
|
|
8398
8401
|
v as COMPATIBILITY_TEST_STATUS,
|
|
8399
8402
|
te as COMPATIBILITY_TEST_TYPE,
|
|
8400
8403
|
y as ERROR_CODE,
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
+
ru as PROCESSING_STATUS,
|
|
8405
|
+
nu as RESULT_STATUS,
|
|
8406
|
+
tu as TEMPLATE_ID,
|
|
8404
8407
|
Ke as TEMPLATE_TYPE,
|
|
8405
|
-
|
|
8408
|
+
eu as VAD_STATUS,
|
|
8406
8409
|
g as WidgetState,
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
+
xd as createWorkerBlobUrl,
|
|
8411
|
+
bd as getEkaScribeInstance,
|
|
8412
|
+
Rd as getWorkerUrl
|
|
8410
8413
|
};
|