@eka-care/ekascribe-ts-sdk 3.0.31 → 3.0.33
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 +8 -6
- package/dist/index.mjs +321 -326
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,10 +3,10 @@ var Ds = (t, e, n) => e in t ? As(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var w = (t, e, n) => Ds(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { SessionStatus as Os, ScribeError as mn, ScribeClient as $s, TransportMode as _n } from "med-scribe-alliance-ts-sdk";
|
|
5
5
|
import { createWorkerBlobUrl as ld, getWorkerUrl as ud } from "med-scribe-alliance-ts-sdk";
|
|
6
|
-
const
|
|
7
|
-
class
|
|
6
|
+
const Ls = 1e4;
|
|
7
|
+
class Ps {
|
|
8
8
|
constructor(e) {
|
|
9
|
-
this.tokenRefreshPromise = null, this.accessToken = e.access_token, this.clientId = e.clientId, this.flavour = e.flavour, this.defaultTimeout = e.defaultTimeout ??
|
|
9
|
+
this.tokenRefreshPromise = null, this.accessToken = e.access_token, this.clientId = e.clientId, this.flavour = e.flavour, this.defaultTimeout = e.defaultTimeout ?? Ls, this.onUnauthorized = e.onUnauthorized;
|
|
10
10
|
}
|
|
11
11
|
setAuthToken(e) {
|
|
12
12
|
this.accessToken = e;
|
|
@@ -201,15 +201,15 @@ class zs {
|
|
|
201
201
|
return !!n && n.size > 0;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
const
|
|
204
|
+
const y = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, x = globalThis, re = "10.43.0";
|
|
205
205
|
function et() {
|
|
206
|
-
return tt(
|
|
206
|
+
return tt(x), x;
|
|
207
207
|
}
|
|
208
208
|
function tt(t) {
|
|
209
209
|
const e = t.__SENTRY__ = t.__SENTRY__ || {};
|
|
210
210
|
return e.version = e.version || re, e[re] = e[re] || {};
|
|
211
211
|
}
|
|
212
|
-
function ge(t, e, n =
|
|
212
|
+
function ge(t, e, n = x) {
|
|
213
213
|
const r = n.__SENTRY__ = n.__SENTRY__ || {}, s = r[re] = r[re] || {};
|
|
214
214
|
return s[t] || (s[t] = e());
|
|
215
215
|
}
|
|
@@ -223,9 +223,9 @@ const js = [
|
|
|
223
223
|
"trace"
|
|
224
224
|
], qs = "Sentry Logger ", Xe = {};
|
|
225
225
|
function me(t) {
|
|
226
|
-
if (!("console" in
|
|
226
|
+
if (!("console" in x))
|
|
227
227
|
return t();
|
|
228
|
-
const e =
|
|
228
|
+
const e = x.console, n = {}, r = Object.keys(Xe);
|
|
229
229
|
r.forEach((s) => {
|
|
230
230
|
const i = Xe[s];
|
|
231
231
|
n[s] = e[s], e[s] = i;
|
|
@@ -257,12 +257,12 @@ function Ks(...t) {
|
|
|
257
257
|
Vt("error", ...t);
|
|
258
258
|
}
|
|
259
259
|
function Vt(t, ...e) {
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
y && wr() && me(() => {
|
|
261
|
+
x.console[t](`${qs}[${t}]:`, ...e);
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
function Gt() {
|
|
265
|
-
return
|
|
265
|
+
return y ? ge("loggerSettings", () => ({ enabled: !1 })) : { enabled: !1 };
|
|
266
266
|
}
|
|
267
267
|
const m = {
|
|
268
268
|
/** Enable logging. */
|
|
@@ -309,13 +309,13 @@ function Zs(t) {
|
|
|
309
309
|
if (!t.length)
|
|
310
310
|
return [];
|
|
311
311
|
const e = Array.from(t);
|
|
312
|
-
return /sentryWrapped/.test(
|
|
312
|
+
return /sentryWrapped/.test(Le(e).function || "") && e.pop(), e.reverse(), En.test(Le(e).function || "") && (e.pop(), En.test(Le(e).function || "") && e.pop()), e.slice(0, Tr).map((n) => ({
|
|
313
313
|
...n,
|
|
314
|
-
filename: n.filename ||
|
|
314
|
+
filename: n.filename || Le(e).filename,
|
|
315
315
|
function: n.function || se
|
|
316
316
|
}));
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Le(t) {
|
|
319
319
|
return t[t.length - 1] || {};
|
|
320
320
|
}
|
|
321
321
|
const pt = "<anonymous>";
|
|
@@ -352,7 +352,7 @@ function ae(t, e) {
|
|
|
352
352
|
try {
|
|
353
353
|
e();
|
|
354
354
|
} catch (n) {
|
|
355
|
-
|
|
355
|
+
y && m.error(`Error while instrumenting ${t}`, n);
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
}
|
|
@@ -363,7 +363,7 @@ function F(t, e) {
|
|
|
363
363
|
try {
|
|
364
364
|
r(e);
|
|
365
365
|
} catch (s) {
|
|
366
|
-
|
|
366
|
+
y && m.error(
|
|
367
367
|
`Error while triggering instrumentation handler.
|
|
368
368
|
Type: ${t}
|
|
369
369
|
Name: ${X(r)}
|
|
@@ -378,7 +378,7 @@ function Js(t) {
|
|
|
378
378
|
oe(e, t), ae(e, Qs);
|
|
379
379
|
}
|
|
380
380
|
function Qs() {
|
|
381
|
-
ht =
|
|
381
|
+
ht = x.onerror, x.onerror = function(t, e, n, r, s) {
|
|
382
382
|
return F("error", {
|
|
383
383
|
column: r,
|
|
384
384
|
error: s,
|
|
@@ -386,7 +386,7 @@ function Qs() {
|
|
|
386
386
|
msg: t,
|
|
387
387
|
url: e
|
|
388
388
|
}), ht ? ht.apply(this, arguments) : !1;
|
|
389
|
-
},
|
|
389
|
+
}, x.onerror.__SENTRY_INSTRUMENTED__ = !0;
|
|
390
390
|
}
|
|
391
391
|
let ft = null;
|
|
392
392
|
function ei(t) {
|
|
@@ -394,9 +394,9 @@ function ei(t) {
|
|
|
394
394
|
oe(e, t), ae(e, ti);
|
|
395
395
|
}
|
|
396
396
|
function ti() {
|
|
397
|
-
ft =
|
|
397
|
+
ft = x.onunhandledrejection, x.onunhandledrejection = function(t) {
|
|
398
398
|
return F("unhandledrejection", t), ft ? ft.apply(this, arguments) : !0;
|
|
399
|
-
},
|
|
399
|
+
}, x.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
|
|
400
400
|
}
|
|
401
401
|
const Cr = Object.prototype.toString;
|
|
402
402
|
function nt(t) {
|
|
@@ -462,7 +462,7 @@ function Ar(t) {
|
|
|
462
462
|
function Dr(t) {
|
|
463
463
|
return typeof Request < "u" && K(t, Request);
|
|
464
464
|
}
|
|
465
|
-
const Xt =
|
|
465
|
+
const Xt = x, oi = 80;
|
|
466
466
|
function Or(t, e = {}) {
|
|
467
467
|
if (!t)
|
|
468
468
|
return "<unknown>";
|
|
@@ -548,7 +548,7 @@ function $(t, e, n) {
|
|
|
548
548
|
try {
|
|
549
549
|
t[e] = s;
|
|
550
550
|
} catch {
|
|
551
|
-
|
|
551
|
+
y && m.log(`Failed to replace method "${e}" in object`, t);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
function Y(t, e, n) {
|
|
@@ -560,7 +560,7 @@ function Y(t, e, n) {
|
|
|
560
560
|
configurable: !0
|
|
561
561
|
});
|
|
562
562
|
} catch {
|
|
563
|
-
|
|
563
|
+
y && m.log(`Failed to add non-enumerable property "${e}" to object`, t);
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
function $r(t, e) {
|
|
@@ -573,33 +573,33 @@ function $r(t, e) {
|
|
|
573
573
|
function Yt(t) {
|
|
574
574
|
return t.__sentry_original__;
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function Lr(t) {
|
|
577
577
|
if (nt(t))
|
|
578
578
|
return {
|
|
579
579
|
message: t.message,
|
|
580
580
|
name: t.name,
|
|
581
581
|
stack: t.stack,
|
|
582
|
-
...
|
|
582
|
+
...xn(t)
|
|
583
583
|
};
|
|
584
584
|
if (st(t)) {
|
|
585
585
|
const e = {
|
|
586
586
|
type: t.type,
|
|
587
|
-
target:
|
|
588
|
-
currentTarget:
|
|
589
|
-
...
|
|
587
|
+
target: Rn(t.target),
|
|
588
|
+
currentTarget: Rn(t.currentTarget),
|
|
589
|
+
...xn(t)
|
|
590
590
|
};
|
|
591
591
|
return typeof CustomEvent < "u" && K(t, CustomEvent) && (e.detail = t.detail), e;
|
|
592
592
|
} else
|
|
593
593
|
return t;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Rn(t) {
|
|
596
596
|
try {
|
|
597
597
|
return ri(t) ? Or(t) : Object.prototype.toString.call(t);
|
|
598
598
|
} catch {
|
|
599
599
|
return "<unknown>";
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function xn(t) {
|
|
603
603
|
if (typeof t == "object" && t !== null) {
|
|
604
604
|
const e = {};
|
|
605
605
|
for (const n in t)
|
|
@@ -609,14 +609,14 @@ function Rn(t) {
|
|
|
609
609
|
return {};
|
|
610
610
|
}
|
|
611
611
|
function li(t) {
|
|
612
|
-
const e = Object.keys(
|
|
612
|
+
const e = Object.keys(Lr(t));
|
|
613
613
|
return e.sort(), e[0] ? e.join(", ") : "[object has no keys]";
|
|
614
614
|
}
|
|
615
615
|
let le;
|
|
616
616
|
function it(t) {
|
|
617
617
|
if (le !== void 0)
|
|
618
618
|
return le ? le(t) : t();
|
|
619
|
-
const e = Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"), n =
|
|
619
|
+
const e = Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"), n = x;
|
|
620
620
|
return e in n && typeof n[e] == "function" ? (le = n[e], le(t)) : (le = null, t());
|
|
621
621
|
}
|
|
622
622
|
function Ke() {
|
|
@@ -649,14 +649,14 @@ function at(t, e = [], n = !1) {
|
|
|
649
649
|
return e.some((r) => je(t, r, n));
|
|
650
650
|
}
|
|
651
651
|
function ui() {
|
|
652
|
-
const t =
|
|
652
|
+
const t = x;
|
|
653
653
|
return t.crypto || t.msCrypto;
|
|
654
654
|
}
|
|
655
655
|
let gt;
|
|
656
656
|
function di() {
|
|
657
657
|
return Ke() * 16;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function L(t = ui()) {
|
|
660
660
|
try {
|
|
661
661
|
if (t?.randomUUID)
|
|
662
662
|
return it(() => t.randomUUID()).replace(/-/g, "");
|
|
@@ -670,14 +670,14 @@ function P(t = ui()) {
|
|
|
670
670
|
)
|
|
671
671
|
);
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function Pr(t) {
|
|
674
674
|
return t.exception?.values?.[0];
|
|
675
675
|
}
|
|
676
676
|
function te(t) {
|
|
677
677
|
const { message: e, event_id: n } = t;
|
|
678
678
|
if (e)
|
|
679
679
|
return e;
|
|
680
|
-
const r =
|
|
680
|
+
const r = Pr(t);
|
|
681
681
|
return r ? r.type && r.value ? `${r.type}: ${r.value}` : r.type || r.value || n || "<unknown>" : n || "<unknown>";
|
|
682
682
|
}
|
|
683
683
|
function Tt(t, e, n) {
|
|
@@ -685,7 +685,7 @@ function Tt(t, e, n) {
|
|
|
685
685
|
i.value || (i.value = e || ""), i.type || (i.type = "Error");
|
|
686
686
|
}
|
|
687
687
|
function de(t, e) {
|
|
688
|
-
const n =
|
|
688
|
+
const n = Pr(t);
|
|
689
689
|
if (!n)
|
|
690
690
|
return;
|
|
691
691
|
const r = { type: "generic", handled: !0 }, s = n.mechanism;
|
|
@@ -714,7 +714,7 @@ function Ne() {
|
|
|
714
714
|
return ot() / Mr;
|
|
715
715
|
}
|
|
716
716
|
function hi() {
|
|
717
|
-
const { performance: t } =
|
|
717
|
+
const { performance: t } = x;
|
|
718
718
|
if (!t?.now || !t.timeOrigin)
|
|
719
719
|
return Ne;
|
|
720
720
|
const e = t.timeOrigin;
|
|
@@ -726,7 +726,7 @@ function V() {
|
|
|
726
726
|
}
|
|
727
727
|
function fi(t) {
|
|
728
728
|
const e = V(), n = {
|
|
729
|
-
sid:
|
|
729
|
+
sid: L(),
|
|
730
730
|
init: !0,
|
|
731
731
|
timestamp: e,
|
|
732
732
|
started: e,
|
|
@@ -739,7 +739,7 @@ function fi(t) {
|
|
|
739
739
|
return t && pe(n, t), n;
|
|
740
740
|
}
|
|
741
741
|
function pe(t, e = {}) {
|
|
742
|
-
if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp || V(), e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), e.sid && (t.sid = e.sid.length === 32 ? e.sid :
|
|
742
|
+
if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp || V(), e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), e.sid && (t.sid = e.sid.length === 32 ? e.sid : L()), e.init !== void 0 && (t.init = e.init), !t.did && e.did && (t.did = `${e.did}`), typeof e.started == "number" && (t.started = e.started), t.ignoreDuration)
|
|
743
743
|
t.duration = void 0;
|
|
744
744
|
else if (typeof e.duration == "number")
|
|
745
745
|
t.duration = e.duration;
|
|
@@ -784,10 +784,10 @@ function Ae(t, e, n = 2) {
|
|
|
784
784
|
return r;
|
|
785
785
|
}
|
|
786
786
|
function In() {
|
|
787
|
-
return
|
|
787
|
+
return L();
|
|
788
788
|
}
|
|
789
789
|
function Fr() {
|
|
790
|
-
return
|
|
790
|
+
return L().substring(16);
|
|
791
791
|
}
|
|
792
792
|
const vt = "_sentrySpan";
|
|
793
793
|
function Cn(t, e) {
|
|
@@ -1168,9 +1168,9 @@ class B {
|
|
|
1168
1168
|
* @returns {string} The id of the captured Sentry event.
|
|
1169
1169
|
*/
|
|
1170
1170
|
captureException(e, n) {
|
|
1171
|
-
const r = n?.event_id ||
|
|
1171
|
+
const r = n?.event_id || L();
|
|
1172
1172
|
if (!this._client)
|
|
1173
|
-
return
|
|
1173
|
+
return y && m.warn("No client configured on scope - will not capture exception!"), r;
|
|
1174
1174
|
const s = new Error("Sentry syntheticException");
|
|
1175
1175
|
return this._client.captureException(
|
|
1176
1176
|
e,
|
|
@@ -1189,9 +1189,9 @@ class B {
|
|
|
1189
1189
|
* @returns {string} The id of the captured message.
|
|
1190
1190
|
*/
|
|
1191
1191
|
captureMessage(e, n, r) {
|
|
1192
|
-
const s = r?.event_id ||
|
|
1192
|
+
const s = r?.event_id || L();
|
|
1193
1193
|
if (!this._client)
|
|
1194
|
-
return
|
|
1194
|
+
return y && m.warn("No client configured on scope - will not capture message!"), s;
|
|
1195
1195
|
const i = r?.syntheticException ?? new Error(e);
|
|
1196
1196
|
return this._client.captureMessage(
|
|
1197
1197
|
e,
|
|
@@ -1211,8 +1211,8 @@ class B {
|
|
|
1211
1211
|
* @returns {string} The id of the captured event.
|
|
1212
1212
|
*/
|
|
1213
1213
|
captureEvent(e, n) {
|
|
1214
|
-
const r = e.event_id || n?.event_id ||
|
|
1215
|
-
return this._client ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) : (
|
|
1214
|
+
const r = e.event_id || n?.event_id || L();
|
|
1215
|
+
return this._client ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) : (y && m.warn("No client configured on scope - will not capture event!"), r);
|
|
1216
1216
|
}
|
|
1217
1217
|
/**
|
|
1218
1218
|
* This will be called on every set call.
|
|
@@ -1309,7 +1309,7 @@ function ki(t, e) {
|
|
|
1309
1309
|
function An(t) {
|
|
1310
1310
|
return he().withScope(() => t(he().getIsolationScope()));
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function Ri() {
|
|
1313
1313
|
return {
|
|
1314
1314
|
withIsolationScope: An,
|
|
1315
1315
|
withScope: Si,
|
|
@@ -1321,7 +1321,7 @@ function xi() {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
function Zt(t) {
|
|
1323
1323
|
const e = tt(t);
|
|
1324
|
-
return e.acs ? e.acs :
|
|
1324
|
+
return e.acs ? e.acs : Ri();
|
|
1325
1325
|
}
|
|
1326
1326
|
function H() {
|
|
1327
1327
|
const t = et();
|
|
@@ -1331,7 +1331,7 @@ function J() {
|
|
|
1331
1331
|
const t = et();
|
|
1332
1332
|
return Zt(t).getIsolationScope();
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1334
|
+
function xi() {
|
|
1335
1335
|
return ge("globalScope", () => new B());
|
|
1336
1336
|
}
|
|
1337
1337
|
function wi(...t) {
|
|
@@ -1352,7 +1352,7 @@ function Ti(t) {
|
|
|
1352
1352
|
};
|
|
1353
1353
|
return r && (i.parent_span_id = r), i;
|
|
1354
1354
|
}
|
|
1355
|
-
const vi = "sentry.source", Ii = "sentry.sample_rate", Ci = "sentry.previous_trace_sample_rate", Ni = "sentry.op", Ai = "sentry.origin", Ur = "sentry.profile_id", Br = "sentry.exclusive_time", Di = "gen_ai.conversation.id", Oi = 0, $i = 1,
|
|
1355
|
+
const vi = "sentry.source", Ii = "sentry.sample_rate", Ci = "sentry.previous_trace_sample_rate", Ni = "sentry.op", Ai = "sentry.origin", Ur = "sentry.profile_id", Br = "sentry.exclusive_time", Di = "gen_ai.conversation.id", Oi = 0, $i = 1, Li = "_sentryScope", Pi = "_sentryIsolationScope";
|
|
1356
1356
|
function Mi(t) {
|
|
1357
1357
|
if (t) {
|
|
1358
1358
|
if (typeof t == "object" && "deref" in t && typeof t.deref == "function")
|
|
@@ -1367,8 +1367,8 @@ function Mi(t) {
|
|
|
1367
1367
|
function Hr(t) {
|
|
1368
1368
|
const e = t;
|
|
1369
1369
|
return {
|
|
1370
|
-
scope: e[
|
|
1371
|
-
isolationScope: Mi(e[
|
|
1370
|
+
scope: e[Li],
|
|
1371
|
+
isolationScope: Mi(e[Pi])
|
|
1372
1372
|
};
|
|
1373
1373
|
}
|
|
1374
1374
|
const Fi = "sentry-", Ui = /^sentry-/;
|
|
@@ -1447,7 +1447,7 @@ function zr(t) {
|
|
|
1447
1447
|
};
|
|
1448
1448
|
}
|
|
1449
1449
|
function Gi(t) {
|
|
1450
|
-
if (!
|
|
1450
|
+
if (!y)
|
|
1451
1451
|
return !0;
|
|
1452
1452
|
const { port: e, projectId: n, protocol: r } = t;
|
|
1453
1453
|
return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? !1 : (m.error(`Invalid Sentry Dsn: ${o} missing`), !0)) ? !1 : n.match(/^\d+$/) ? qi(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);
|
|
@@ -1493,9 +1493,9 @@ function Ji(t) {
|
|
|
1493
1493
|
}));
|
|
1494
1494
|
}
|
|
1495
1495
|
function $n(t) {
|
|
1496
|
-
return typeof t == "number" ?
|
|
1496
|
+
return typeof t == "number" ? Ln(t) : Array.isArray(t) ? t[0] + t[1] / 1e9 : t instanceof Date ? Ln(t.getTime()) : V();
|
|
1497
1497
|
}
|
|
1498
|
-
function
|
|
1498
|
+
function Ln(t) {
|
|
1499
1499
|
return t > 9999999999 ? t / 1e3 : t;
|
|
1500
1500
|
}
|
|
1501
1501
|
function Jt(t) {
|
|
@@ -1545,7 +1545,7 @@ const ro = "_sentryRootSpan";
|
|
|
1545
1545
|
function qr(t) {
|
|
1546
1546
|
return t[ro] || t;
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1548
|
+
function Pn() {
|
|
1549
1549
|
On || (me(() => {
|
|
1550
1550
|
console.warn(
|
|
1551
1551
|
"[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`."
|
|
@@ -1568,14 +1568,14 @@ function Fn(t, e) {
|
|
|
1568
1568
|
for (const n of e) {
|
|
1569
1569
|
if (oo(n)) {
|
|
1570
1570
|
if (je(t.description, n))
|
|
1571
|
-
return
|
|
1571
|
+
return y && Mn(t), !0;
|
|
1572
1572
|
continue;
|
|
1573
1573
|
}
|
|
1574
1574
|
if (!n.name && !n.op)
|
|
1575
1575
|
continue;
|
|
1576
1576
|
const r = n.name ? je(t.description, n.name) : !0, s = n.op ? t.op && je(t.op, n.op) : !0;
|
|
1577
1577
|
if (r && s)
|
|
1578
|
-
return
|
|
1578
|
+
return y && Mn(t), !0;
|
|
1579
1579
|
}
|
|
1580
1580
|
return !1;
|
|
1581
1581
|
}
|
|
@@ -1658,7 +1658,7 @@ function It(t, e, n = 1 / 0, r = 1 / 0, s = go()) {
|
|
|
1658
1658
|
}
|
|
1659
1659
|
const d = Array.isArray(e) ? [] : {};
|
|
1660
1660
|
let u = 0;
|
|
1661
|
-
const p =
|
|
1661
|
+
const p = Lr(e);
|
|
1662
1662
|
for (const h in p) {
|
|
1663
1663
|
if (!Object.prototype.hasOwnProperty.call(p, h))
|
|
1664
1664
|
continue;
|
|
@@ -1741,7 +1741,7 @@ function _o(t, e) {
|
|
|
1741
1741
|
return Ct(t, (n, r) => e.includes(r));
|
|
1742
1742
|
}
|
|
1743
1743
|
function Nt(t) {
|
|
1744
|
-
const e = tt(
|
|
1744
|
+
const e = tt(x);
|
|
1745
1745
|
return e.encodePolyfill ? e.encodePolyfill(t) : new TextEncoder().encode(t);
|
|
1746
1746
|
}
|
|
1747
1747
|
function yo(t) {
|
|
@@ -1829,7 +1829,7 @@ function ko(t, e, n, r) {
|
|
|
1829
1829
|
}
|
|
1830
1830
|
};
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1832
|
+
function Ro(t, e) {
|
|
1833
1833
|
if (!e)
|
|
1834
1834
|
return t;
|
|
1835
1835
|
const n = t.sdk || {};
|
|
@@ -1845,7 +1845,7 @@ function xo(t, e) {
|
|
|
1845
1845
|
} : void 0
|
|
1846
1846
|
}, t;
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function xo(t, e, n, r) {
|
|
1849
1849
|
const s = Wr(n), i = {
|
|
1850
1850
|
sent_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1851
1851
|
...s && { sdk: s },
|
|
@@ -1855,7 +1855,7 @@ function Ro(t, e, n, r) {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
function wo(t, e, n, r) {
|
|
1857
1857
|
const s = Wr(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
|
|
1858
|
-
|
|
1858
|
+
Ro(t, n?.sdk);
|
|
1859
1859
|
const o = ko(t, s, r, e);
|
|
1860
1860
|
return delete t.sdkProcessingMetadata, ye(o, [[{ type: i }, t]]);
|
|
1861
1861
|
}
|
|
@@ -1970,11 +1970,11 @@ function At(t, e, n, r) {
|
|
|
1970
1970
|
if (!t || !s)
|
|
1971
1971
|
return t;
|
|
1972
1972
|
const i = s({ ...t }, e);
|
|
1973
|
-
return
|
|
1973
|
+
return y && i === null && m.log(`Event processor "${s.id || "?"}" dropped event`), Ce(i) ? i.then((o) => At(o, e, n, r + 1)) : At(i, e, n, r + 1);
|
|
1974
1974
|
}
|
|
1975
1975
|
let Q, zn, jn, G;
|
|
1976
1976
|
function vo(t) {
|
|
1977
|
-
const e =
|
|
1977
|
+
const e = x._sentryDebugIds, n = x._debugIds;
|
|
1978
1978
|
if (!e && !n)
|
|
1979
1979
|
return {};
|
|
1980
1980
|
const r = e ? Object.keys(e) : [], s = n ? Object.keys(n) : [];
|
|
@@ -2027,7 +2027,7 @@ function ke(t, e, n) {
|
|
|
2027
2027
|
t[e] = Ae(t[e], n, 1);
|
|
2028
2028
|
}
|
|
2029
2029
|
function Xr(t, e) {
|
|
2030
|
-
const n =
|
|
2030
|
+
const n = xi().getScopeData();
|
|
2031
2031
|
return t && qn(n, t.getScopeData()), e && qn(n, e.getScopeData()), n;
|
|
2032
2032
|
}
|
|
2033
2033
|
function Co(t, e) {
|
|
@@ -2061,10 +2061,10 @@ function Oo(t, e) {
|
|
|
2061
2061
|
function $o(t, e, n, r, s, i) {
|
|
2062
2062
|
const { normalizeDepth: o = 3, normalizeMaxBreadth: a = 1e3 } = t, c = {
|
|
2063
2063
|
...e,
|
|
2064
|
-
event_id: e.event_id || n.event_id ||
|
|
2064
|
+
event_id: e.event_id || n.event_id || L(),
|
|
2065
2065
|
timestamp: e.timestamp || Ne()
|
|
2066
2066
|
}, l = n.integrations || t.integrations.map((N) => N.name);
|
|
2067
|
-
|
|
2067
|
+
Lo(c, t), Fo(c, l), s && s.emit("applyFrameMetadata", e), e.type === void 0 && Po(c, t.stackParser);
|
|
2068
2068
|
const d = Bo(r, n.captureContext);
|
|
2069
2069
|
n.mechanism && de(c, n.mechanism);
|
|
2070
2070
|
const u = s ? s.getEventProcessors() : [], p = Xr(i, d), h = [...n.attachments || [], ...p.attachments];
|
|
@@ -2076,7 +2076,7 @@ function $o(t, e, n, r, s, i) {
|
|
|
2076
2076
|
];
|
|
2077
2077
|
return (n.data && n.data.__sentry__ === !0 ? Oe(c) : To(f, c, n)).then((N) => (N && Mo(N), typeof o == "number" && o > 0 ? Uo(N, o, a) : N));
|
|
2078
2078
|
}
|
|
2079
|
-
function
|
|
2079
|
+
function Lo(t, e) {
|
|
2080
2080
|
const { environment: n, release: r, dist: s, maxValueLength: i } = e;
|
|
2081
2081
|
t.environment = t.environment || n || Qt, !t.release && r && (t.release = r), !t.dist && s && (t.dist = s);
|
|
2082
2082
|
const o = t.request;
|
|
@@ -2084,7 +2084,7 @@ function Po(t, e) {
|
|
|
2084
2084
|
a.value && (a.value = wt(a.value, i));
|
|
2085
2085
|
});
|
|
2086
2086
|
}
|
|
2087
|
-
function
|
|
2087
|
+
function Po(t, e) {
|
|
2088
2088
|
const n = vo(e);
|
|
2089
2089
|
t.exception?.values?.forEach((r) => {
|
|
2090
2090
|
r.stacktrace?.frames?.forEach((s) => {
|
|
@@ -2184,7 +2184,7 @@ function Go(t) {
|
|
|
2184
2184
|
J().setUser(t);
|
|
2185
2185
|
}
|
|
2186
2186
|
function Vn(t) {
|
|
2187
|
-
const e = J(), { user: n } = Xr(e, H()), { userAgent: r } =
|
|
2187
|
+
const e = J(), { user: n } = Xr(e, H()), { userAgent: r } = x.navigator || {}, s = fi({
|
|
2188
2188
|
user: n,
|
|
2189
2189
|
...r && { userAgent: r },
|
|
2190
2190
|
...t
|
|
@@ -2258,7 +2258,7 @@ function Wn(t, e) {
|
|
|
2258
2258
|
}
|
|
2259
2259
|
function Qr(t, e, n) {
|
|
2260
2260
|
if (n[e.name]) {
|
|
2261
|
-
|
|
2261
|
+
y && m.log(`Integration skipped because it was already installed: ${e.name}`);
|
|
2262
2262
|
return;
|
|
2263
2263
|
}
|
|
2264
2264
|
if (n[e.name] = e, !Gn.includes(e.name) && typeof e.setupOnce == "function" && (e.setupOnce(), Gn.push(e.name)), e.setup && typeof e.setup == "function" && e.setup(t), typeof e.preprocessEvent == "function") {
|
|
@@ -2271,7 +2271,7 @@ function Qr(t, e, n) {
|
|
|
2271
2271
|
});
|
|
2272
2272
|
t.addEventProcessor(s);
|
|
2273
2273
|
}
|
|
2274
|
-
|
|
2274
|
+
y && m.log(`Integration installed: ${e.name}`);
|
|
2275
2275
|
}
|
|
2276
2276
|
function ta(t) {
|
|
2277
2277
|
return [
|
|
@@ -2423,25 +2423,25 @@ function pa(t, e, n = nn(
|
|
|
2423
2423
|
return Promise.resolve({});
|
|
2424
2424
|
const c = ye(o[0], a), l = (u) => {
|
|
2425
2425
|
if (_o(c, ["client_report"])) {
|
|
2426
|
-
|
|
2426
|
+
y && m.warn(`Dropping client report. Will not send outcomes (reason: ${u}).`);
|
|
2427
2427
|
return;
|
|
2428
2428
|
}
|
|
2429
2429
|
Ct(c, (p, h) => {
|
|
2430
2430
|
t.recordDroppedEvent(u, Un(h));
|
|
2431
2431
|
});
|
|
2432
2432
|
}, d = () => e({ body: yo(c) }).then(
|
|
2433
|
-
(u) => u.statusCode === 413 ? (
|
|
2433
|
+
(u) => u.statusCode === 413 ? (y && m.error(
|
|
2434
2434
|
"Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."
|
|
2435
|
-
), l("send_error"), u) : (
|
|
2435
|
+
), l("send_error"), u) : (y && u.statusCode !== void 0 && (u.statusCode < 200 || u.statusCode >= 300) && m.warn(`Sentry responded with status code ${u.statusCode} to sent event.`), r = da(r, u), u),
|
|
2436
2436
|
(u) => {
|
|
2437
|
-
throw l("network_error"),
|
|
2437
|
+
throw l("network_error"), y && m.error("Encountered error running transport request:", u), u;
|
|
2438
2438
|
}
|
|
2439
2439
|
);
|
|
2440
2440
|
return n.add(d).then(
|
|
2441
2441
|
(u) => u,
|
|
2442
2442
|
(u) => {
|
|
2443
2443
|
if (u === tn)
|
|
2444
|
-
return
|
|
2444
|
+
return y && m.error("Skipped sending event because buffer is full."), l("queue_overflow"), Promise.resolve({});
|
|
2445
2445
|
throw u;
|
|
2446
2446
|
}
|
|
2447
2447
|
);
|
|
@@ -2560,7 +2560,7 @@ class _a {
|
|
|
2560
2560
|
* @param options Options for the client.
|
|
2561
2561
|
*/
|
|
2562
2562
|
constructor(e) {
|
|
2563
|
-
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], this._promiseBuffer = nn(e.transportOptions?.bufferSize ?? ss), e.dsn ? this._dsn = Ki(e.dsn) :
|
|
2563
|
+
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], this._promiseBuffer = nn(e.transportOptions?.bufferSize ?? ss), e.dsn ? this._dsn = Ki(e.dsn) : y && m.warn("No DSN provided, client will not send events."), this._dsn) {
|
|
2564
2564
|
const r = Zo(
|
|
2565
2565
|
this._dsn,
|
|
2566
2566
|
e.tunnel,
|
|
@@ -2587,9 +2587,9 @@ class _a {
|
|
|
2587
2587
|
* Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.
|
|
2588
2588
|
*/
|
|
2589
2589
|
captureException(e, n, r) {
|
|
2590
|
-
const s =
|
|
2590
|
+
const s = L();
|
|
2591
2591
|
if (Tn(e))
|
|
2592
|
-
return
|
|
2592
|
+
return y && m.log(Xn), s;
|
|
2593
2593
|
const i = {
|
|
2594
2594
|
event_id: s,
|
|
2595
2595
|
...n
|
|
@@ -2606,7 +2606,7 @@ class _a {
|
|
|
2606
2606
|
*/
|
|
2607
2607
|
captureMessage(e, n, r, s) {
|
|
2608
2608
|
const i = {
|
|
2609
|
-
event_id:
|
|
2609
|
+
event_id: L(),
|
|
2610
2610
|
...r
|
|
2611
2611
|
}, o = Wt(e) ? e : String(e), a = rt(e), c = a ? this.eventFromMessage(o, n, i) : this.eventFromException(e, i);
|
|
2612
2612
|
return this._process(
|
|
@@ -2620,9 +2620,9 @@ class _a {
|
|
|
2620
2620
|
* Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.
|
|
2621
2621
|
*/
|
|
2622
2622
|
captureEvent(e, n, r) {
|
|
2623
|
-
const s =
|
|
2623
|
+
const s = L();
|
|
2624
2624
|
if (n?.originalException && Tn(n.originalException))
|
|
2625
|
-
return
|
|
2625
|
+
return y && m.log(Xn), s;
|
|
2626
2626
|
const i = {
|
|
2627
2627
|
event_id: s,
|
|
2628
2628
|
...n
|
|
@@ -2765,19 +2765,19 @@ class _a {
|
|
|
2765
2765
|
if ("aggregates" in e) {
|
|
2766
2766
|
const i = e.attrs || {};
|
|
2767
2767
|
if (!i.release && !n) {
|
|
2768
|
-
|
|
2768
|
+
y && m.warn(Kn);
|
|
2769
2769
|
return;
|
|
2770
2770
|
}
|
|
2771
2771
|
i.release = i.release || n, i.environment = i.environment || r, e.attrs = i;
|
|
2772
2772
|
} else {
|
|
2773
2773
|
if (!e.release && !n) {
|
|
2774
|
-
|
|
2774
|
+
y && m.warn(Kn);
|
|
2775
2775
|
return;
|
|
2776
2776
|
}
|
|
2777
2777
|
e.release = e.release || n, e.environment = e.environment || r;
|
|
2778
2778
|
}
|
|
2779
2779
|
this.emit("beforeSendSession", e);
|
|
2780
|
-
const s =
|
|
2780
|
+
const s = xo(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
2781
2781
|
this.sendEnvelope(s);
|
|
2782
2782
|
}
|
|
2783
2783
|
/**
|
|
@@ -2786,7 +2786,7 @@ class _a {
|
|
|
2786
2786
|
recordDroppedEvent(e, n, r = 1) {
|
|
2787
2787
|
if (this._options.sendClientReports) {
|
|
2788
2788
|
const s = `${e}:${n}`;
|
|
2789
|
-
|
|
2789
|
+
y && m.log(`Recording outcome: "${s}"${r > 1 ? ` (${r} times)` : ""}`), this._outcomes[s] = (this._outcomes[s] || 0) + r;
|
|
2790
2790
|
}
|
|
2791
2791
|
}
|
|
2792
2792
|
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
@@ -2821,9 +2821,9 @@ class _a {
|
|
|
2821
2821
|
try {
|
|
2822
2822
|
return await this._transport.send(e);
|
|
2823
2823
|
} catch (n) {
|
|
2824
|
-
return
|
|
2824
|
+
return y && m.error("Error while sending envelope:", n), {};
|
|
2825
2825
|
}
|
|
2826
|
-
return
|
|
2826
|
+
return y && m.error("Transport disabled"), {};
|
|
2827
2827
|
}
|
|
2828
2828
|
/**
|
|
2829
2829
|
* Disposes of the client and releases all resources.
|
|
@@ -2917,10 +2917,10 @@ class _a {
|
|
|
2917
2917
|
* @param scope
|
|
2918
2918
|
*/
|
|
2919
2919
|
_captureEvent(e, n = {}, r = H(), s = J()) {
|
|
2920
|
-
return
|
|
2920
|
+
return y && Ot(e) && m.log(`Captured error event \`${is(e)[0] || "<unknown>"}\``), this._processEvent(e, n, r, s).then(
|
|
2921
2921
|
(i) => i.event_id,
|
|
2922
2922
|
(i) => {
|
|
2923
|
-
|
|
2923
|
+
y && (Zn(i) ? m.log(i.message) : Yn(i) ? m.warn(i.message) : m.warn(i));
|
|
2924
2924
|
}
|
|
2925
2925
|
);
|
|
2926
2926
|
}
|
|
@@ -3018,17 +3018,17 @@ Reason: ${h}`
|
|
|
3018
3018
|
* Sends client reports as an envelope.
|
|
3019
3019
|
*/
|
|
3020
3020
|
_flushOutcomes() {
|
|
3021
|
-
|
|
3021
|
+
y && m.log("Flushing outcomes...");
|
|
3022
3022
|
const e = this._clearOutcomes();
|
|
3023
3023
|
if (e.length === 0) {
|
|
3024
|
-
|
|
3024
|
+
y && m.log("No outcomes to send");
|
|
3025
3025
|
return;
|
|
3026
3026
|
}
|
|
3027
3027
|
if (!this._dsn) {
|
|
3028
|
-
|
|
3028
|
+
y && m.log("No dsn provided, will not send outcomes");
|
|
3029
3029
|
return;
|
|
3030
3030
|
}
|
|
3031
|
-
|
|
3031
|
+
y && m.log("Sending outcomes:", e);
|
|
3032
3032
|
const n = ha(e, this._options.tunnel && De(this._dsn));
|
|
3033
3033
|
this.sendEnvelope(n);
|
|
3034
3034
|
}
|
|
@@ -3068,7 +3068,7 @@ function Ea(t, e, n, r) {
|
|
|
3068
3068
|
return null;
|
|
3069
3069
|
if (o) {
|
|
3070
3070
|
const d = o(l);
|
|
3071
|
-
d ? c = Ae(n, ga(d)) :
|
|
3071
|
+
d ? c = Ae(n, ga(d)) : Pn();
|
|
3072
3072
|
}
|
|
3073
3073
|
if (c.spans) {
|
|
3074
3074
|
const d = [], u = c.spans;
|
|
@@ -3079,7 +3079,7 @@ function Ea(t, e, n, r) {
|
|
|
3079
3079
|
}
|
|
3080
3080
|
if (o) {
|
|
3081
3081
|
const f = o(h);
|
|
3082
|
-
f ? d.push(f) : (
|
|
3082
|
+
f ? d.push(f) : (Pn(), d.push(h));
|
|
3083
3083
|
} else
|
|
3084
3084
|
d.push(h);
|
|
3085
3085
|
}
|
|
@@ -3131,14 +3131,14 @@ function ka(t) {
|
|
|
3131
3131
|
function tr(t) {
|
|
3132
3132
|
return ka(t) ? `${t.message} (${t.__sentry_fetch_url_host__})` : t.message;
|
|
3133
3133
|
}
|
|
3134
|
-
function
|
|
3135
|
-
e.debug === !0 && (
|
|
3134
|
+
function Ra(t, e) {
|
|
3135
|
+
e.debug === !0 && (y ? m.enable() : me(() => {
|
|
3136
3136
|
console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
|
|
3137
3137
|
})), H().update(e.initialScope);
|
|
3138
3138
|
const r = new t(e);
|
|
3139
|
-
return
|
|
3139
|
+
return xa(r), r.init(), r;
|
|
3140
3140
|
}
|
|
3141
|
-
function
|
|
3141
|
+
function xa(t) {
|
|
3142
3142
|
H().setClient(t);
|
|
3143
3143
|
}
|
|
3144
3144
|
function Et(t) {
|
|
@@ -3242,10 +3242,10 @@ const Ca = "FunctionToString", rr = /* @__PURE__ */ new WeakMap(), Na = (() => (
|
|
|
3242
3242
|
const i = s.getOptions();
|
|
3243
3243
|
e = sr(t, i);
|
|
3244
3244
|
}
|
|
3245
|
-
return
|
|
3245
|
+
return Pa(n, e) ? null : n;
|
|
3246
3246
|
}
|
|
3247
3247
|
};
|
|
3248
|
-
},
|
|
3248
|
+
}, La = ((t = {}) => ({
|
|
3249
3249
|
...$a(t),
|
|
3250
3250
|
name: "InboundFilters"
|
|
3251
3251
|
}));
|
|
@@ -3261,28 +3261,28 @@ function sr(t = {}, e = {}) {
|
|
|
3261
3261
|
ignoreTransactions: [...t.ignoreTransactions || [], ...e.ignoreTransactions || []]
|
|
3262
3262
|
};
|
|
3263
3263
|
}
|
|
3264
|
-
function
|
|
3264
|
+
function Pa(t, e) {
|
|
3265
3265
|
if (t.type) {
|
|
3266
3266
|
if (t.type === "transaction" && Fa(t, e.ignoreTransactions))
|
|
3267
|
-
return
|
|
3267
|
+
return y && m.warn(
|
|
3268
3268
|
`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
3269
3269
|
Event: ${te(t)}`
|
|
3270
3270
|
), !0;
|
|
3271
3271
|
} else {
|
|
3272
3272
|
if (Ma(t, e.ignoreErrors))
|
|
3273
|
-
return
|
|
3273
|
+
return y && m.warn(
|
|
3274
3274
|
`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
3275
3275
|
Event: ${te(t)}`
|
|
3276
3276
|
), !0;
|
|
3277
3277
|
if (za(t))
|
|
3278
|
-
return
|
|
3278
|
+
return y && m.warn(
|
|
3279
3279
|
`Event dropped due to not having an error message, error type or stacktrace.
|
|
3280
3280
|
Event: ${te(
|
|
3281
3281
|
t
|
|
3282
3282
|
)}`
|
|
3283
3283
|
), !0;
|
|
3284
3284
|
if (Ua(t, e.denyUrls))
|
|
3285
|
-
return
|
|
3285
|
+
return y && m.warn(
|
|
3286
3286
|
`Event dropped due to being matched by \`denyUrls\` option.
|
|
3287
3287
|
Event: ${te(
|
|
3288
3288
|
t
|
|
@@ -3290,7 +3290,7 @@ Event: ${te(
|
|
|
3290
3290
|
Url: ${Ye(t)}`
|
|
3291
3291
|
), !0;
|
|
3292
3292
|
if (!Ba(t, e.allowUrls))
|
|
3293
|
-
return
|
|
3293
|
+
return y && m.warn(
|
|
3294
3294
|
`Event dropped due to not being matched by \`allowUrls\` option.
|
|
3295
3295
|
Event: ${te(
|
|
3296
3296
|
t
|
|
@@ -3334,7 +3334,7 @@ function Ye(t) {
|
|
|
3334
3334
|
const n = [...t.exception?.values ?? []].reverse().find((r) => r.mechanism?.parent_id === void 0 && r.stacktrace?.frames?.length)?.stacktrace?.frames;
|
|
3335
3335
|
return n ? Ha(n) : null;
|
|
3336
3336
|
} catch {
|
|
3337
|
-
return
|
|
3337
|
+
return y && m.error(`Cannot extract url for event ${te(t)}`), null;
|
|
3338
3338
|
}
|
|
3339
3339
|
}
|
|
3340
3340
|
function za(t) {
|
|
@@ -3421,10 +3421,10 @@ function qa(t) {
|
|
|
3421
3421
|
oe(e, t), ae(e, Va);
|
|
3422
3422
|
}
|
|
3423
3423
|
function Va() {
|
|
3424
|
-
"console" in
|
|
3425
|
-
t in
|
|
3424
|
+
"console" in x && js.forEach(function(t) {
|
|
3425
|
+
t in x.console && $(x.console, t, function(e) {
|
|
3426
3426
|
return Xe[t] = e, function(...n) {
|
|
3427
|
-
F("console", { args: n, level: t }), Xe[t]?.apply(
|
|
3427
|
+
F("console", { args: n, level: t }), Xe[t]?.apply(x.console, n);
|
|
3428
3428
|
};
|
|
3429
3429
|
});
|
|
3430
3430
|
});
|
|
@@ -3441,7 +3441,7 @@ const Wa = "Dedupe", Xa = (() => {
|
|
|
3441
3441
|
return e;
|
|
3442
3442
|
try {
|
|
3443
3443
|
if (Ya(e, t))
|
|
3444
|
-
return
|
|
3444
|
+
return y && m.warn("Event dropped due to being a duplicate of previously captured event."), null;
|
|
3445
3445
|
} catch {
|
|
3446
3446
|
}
|
|
3447
3447
|
return t = e;
|
|
@@ -3501,7 +3501,7 @@ function hs(t) {
|
|
|
3501
3501
|
if (t !== void 0)
|
|
3502
3502
|
return t >= 400 && t < 500 ? "warning" : t >= 500 ? "error" : void 0;
|
|
3503
3503
|
}
|
|
3504
|
-
const Ie =
|
|
3504
|
+
const Ie = x;
|
|
3505
3505
|
function nc() {
|
|
3506
3506
|
return "history" in Ie && !!Ie.history;
|
|
3507
3507
|
}
|
|
@@ -3514,7 +3514,7 @@ function rc() {
|
|
|
3514
3514
|
return !1;
|
|
3515
3515
|
}
|
|
3516
3516
|
}
|
|
3517
|
-
function
|
|
3517
|
+
function Lt(t) {
|
|
3518
3518
|
return t && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString());
|
|
3519
3519
|
}
|
|
3520
3520
|
function sc() {
|
|
@@ -3522,16 +3522,16 @@ function sc() {
|
|
|
3522
3522
|
return !0;
|
|
3523
3523
|
if (!rc())
|
|
3524
3524
|
return !1;
|
|
3525
|
-
if (
|
|
3525
|
+
if (Lt(Ie.fetch))
|
|
3526
3526
|
return !0;
|
|
3527
3527
|
let t = !1;
|
|
3528
3528
|
const e = Ie.document;
|
|
3529
3529
|
if (e && typeof e.createElement == "function")
|
|
3530
3530
|
try {
|
|
3531
3531
|
const n = e.createElement("iframe");
|
|
3532
|
-
n.hidden = !0, e.head.appendChild(n), n.contentWindow?.fetch && (t =
|
|
3532
|
+
n.hidden = !0, e.head.appendChild(n), n.contentWindow?.fetch && (t = Lt(n.contentWindow.fetch)), e.head.removeChild(n);
|
|
3533
3533
|
} catch (n) {
|
|
3534
|
-
|
|
3534
|
+
y && m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", n);
|
|
3535
3535
|
}
|
|
3536
3536
|
return t;
|
|
3537
3537
|
}
|
|
@@ -3540,7 +3540,7 @@ function ic(t, e) {
|
|
|
3540
3540
|
oe(n, t), ae(n, () => oc(void 0, e));
|
|
3541
3541
|
}
|
|
3542
3542
|
function oc(t, e = !1) {
|
|
3543
|
-
e && !sc() || $(
|
|
3543
|
+
e && !sc() || $(x, "fetch", function(n) {
|
|
3544
3544
|
return function(...r) {
|
|
3545
3545
|
const s = new Error(), { method: i, url: o } = ac(r), a = {
|
|
3546
3546
|
args: r,
|
|
@@ -3555,7 +3555,7 @@ function oc(t, e = !1) {
|
|
|
3555
3555
|
};
|
|
3556
3556
|
return F("fetch", {
|
|
3557
3557
|
...a
|
|
3558
|
-
}), n.apply(
|
|
3558
|
+
}), n.apply(x, r).then(
|
|
3559
3559
|
async (c) => (F("fetch", {
|
|
3560
3560
|
...a,
|
|
3561
3561
|
endTimestamp: V() * 1e3,
|
|
@@ -3618,14 +3618,14 @@ function cc(t) {
|
|
|
3618
3618
|
function lc() {
|
|
3619
3619
|
return "npm";
|
|
3620
3620
|
}
|
|
3621
|
-
const T =
|
|
3622
|
-
let
|
|
3621
|
+
const T = x;
|
|
3622
|
+
let Pt = 0;
|
|
3623
3623
|
function fs() {
|
|
3624
|
-
return
|
|
3624
|
+
return Pt > 0;
|
|
3625
3625
|
}
|
|
3626
3626
|
function uc() {
|
|
3627
|
-
|
|
3628
|
-
|
|
3627
|
+
Pt++, setTimeout(() => {
|
|
3628
|
+
Pt--;
|
|
3629
3629
|
});
|
|
3630
3630
|
}
|
|
3631
3631
|
function fe(t, e = {}) {
|
|
@@ -3814,14 +3814,14 @@ function kc(t) {
|
|
|
3814
3814
|
return n;
|
|
3815
3815
|
}
|
|
3816
3816
|
}
|
|
3817
|
-
class
|
|
3817
|
+
class Rc extends _a {
|
|
3818
3818
|
/**
|
|
3819
3819
|
* Creates a new Browser SDK instance.
|
|
3820
3820
|
*
|
|
3821
3821
|
* @param options Configuration options for this SDK.
|
|
3822
3822
|
*/
|
|
3823
3823
|
constructor(e) {
|
|
3824
|
-
const n =
|
|
3824
|
+
const n = xc(e), r = T.SENTRY_SDK_SOURCE || lc();
|
|
3825
3825
|
va(n, "browser", ["browser"], r), n._metadata?.sdk && (n._metadata.sdk.settings = {
|
|
3826
3826
|
infer_ip: n.sendDefaultPii ? "auto" : "never",
|
|
3827
3827
|
// purposefully allowing already passed settings to override the default
|
|
@@ -3857,7 +3857,7 @@ class xc extends _a {
|
|
|
3857
3857
|
return e.platform = e.platform || "javascript", super._prepareEvent(e, n, r, s);
|
|
3858
3858
|
}
|
|
3859
3859
|
}
|
|
3860
|
-
function
|
|
3860
|
+
function xc(t) {
|
|
3861
3861
|
return {
|
|
3862
3862
|
release: typeof __SENTRY_RELEASE__ == "string" ? __SENTRY_RELEASE__ : T.SENTRY_RELEASE?.id,
|
|
3863
3863
|
// This supports the variable that sentry-webpack-plugin injects
|
|
@@ -3867,7 +3867,7 @@ function Rc(t) {
|
|
|
3867
3867
|
...t
|
|
3868
3868
|
};
|
|
3869
3869
|
}
|
|
3870
|
-
const wc = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, A =
|
|
3870
|
+
const wc = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, A = x, Tc = 1e3;
|
|
3871
3871
|
let lr, Ft, Ut;
|
|
3872
3872
|
function vc(t) {
|
|
3873
3873
|
oe("dom", t), ae("dom", Ic);
|
|
@@ -3929,7 +3929,7 @@ function ur(t, e = !1) {
|
|
|
3929
3929
|
const r = Ac(n);
|
|
3930
3930
|
if (Nc(n.type, r))
|
|
3931
3931
|
return;
|
|
3932
|
-
Y(n, "_sentryCaptured", !0), r && !r._sentryId && Y(r, "_sentryId",
|
|
3932
|
+
Y(n, "_sentryCaptured", !0), r && !r._sentryId && Y(r, "_sentryId", L());
|
|
3933
3933
|
const s = n.type === "keypress" ? "input" : n.type;
|
|
3934
3934
|
Cc(n) || (t({ event: n, name: s, global: e }), Ft = n.type, Ut = r ? r._sentryId : void 0), clearTimeout(lr), lr = A.setTimeout(() => {
|
|
3935
3935
|
Ut = void 0, Ft = void 0;
|
|
@@ -3943,15 +3943,15 @@ function Ac(t) {
|
|
|
3943
3943
|
return null;
|
|
3944
3944
|
}
|
|
3945
3945
|
}
|
|
3946
|
-
let
|
|
3946
|
+
let Pe;
|
|
3947
3947
|
function ms(t) {
|
|
3948
3948
|
const e = "history";
|
|
3949
3949
|
oe(e, t), ae(e, Dc);
|
|
3950
3950
|
}
|
|
3951
3951
|
function Dc() {
|
|
3952
3952
|
if (A.addEventListener("popstate", () => {
|
|
3953
|
-
const e = A.location.href, n =
|
|
3954
|
-
if (
|
|
3953
|
+
const e = A.location.href, n = Pe;
|
|
3954
|
+
if (Pe = e, n === e)
|
|
3955
3955
|
return;
|
|
3956
3956
|
F("history", { from: n, to: e });
|
|
3957
3957
|
}), !nc())
|
|
@@ -3960,8 +3960,8 @@ function Dc() {
|
|
|
3960
3960
|
return function(...n) {
|
|
3961
3961
|
const r = n.length > 2 ? n[2] : void 0;
|
|
3962
3962
|
if (r) {
|
|
3963
|
-
const s =
|
|
3964
|
-
if (
|
|
3963
|
+
const s = Pe, i = Oc(String(r));
|
|
3964
|
+
if (Pe = i, s === i)
|
|
3965
3965
|
return e.apply(this, n);
|
|
3966
3966
|
F("history", { from: s, to: i });
|
|
3967
3967
|
}
|
|
@@ -3983,7 +3983,7 @@ function $c(t) {
|
|
|
3983
3983
|
if (e)
|
|
3984
3984
|
return e;
|
|
3985
3985
|
let n = A[t];
|
|
3986
|
-
if (
|
|
3986
|
+
if (Lt(n))
|
|
3987
3987
|
return Ge[t] = n.bind(A);
|
|
3988
3988
|
const r = A.document;
|
|
3989
3989
|
if (r && typeof r.createElement == "function")
|
|
@@ -3997,11 +3997,11 @@ function $c(t) {
|
|
|
3997
3997
|
}
|
|
3998
3998
|
return n && (Ge[t] = n.bind(A));
|
|
3999
3999
|
}
|
|
4000
|
-
function
|
|
4000
|
+
function Lc(t) {
|
|
4001
4001
|
Ge[t] = void 0;
|
|
4002
4002
|
}
|
|
4003
|
-
const
|
|
4004
|
-
function
|
|
4003
|
+
const xe = "__sentry_xhr_v3__";
|
|
4004
|
+
function Pc(t) {
|
|
4005
4005
|
oe("xhr", t), ae("xhr", Mc);
|
|
4006
4006
|
}
|
|
4007
4007
|
function Mc() {
|
|
@@ -4013,13 +4013,13 @@ function Mc() {
|
|
|
4013
4013
|
const s = new Error(), i = V() * 1e3, o = q(r[0]) ? r[0].toUpperCase() : void 0, a = Fc(r[1]);
|
|
4014
4014
|
if (!o || !a)
|
|
4015
4015
|
return e.apply(n, r);
|
|
4016
|
-
n[
|
|
4016
|
+
n[xe] = {
|
|
4017
4017
|
method: o,
|
|
4018
4018
|
url: a,
|
|
4019
4019
|
request_headers: {}
|
|
4020
4020
|
}, o === "POST" && a.match(/sentry_key/) && (n.__sentry_own_request__ = !0);
|
|
4021
4021
|
const c = () => {
|
|
4022
|
-
const l = n[
|
|
4022
|
+
const l = n[xe];
|
|
4023
4023
|
if (l && n.readyState === 4) {
|
|
4024
4024
|
try {
|
|
4025
4025
|
l.status_code = n.status;
|
|
@@ -4040,14 +4040,14 @@ function Mc() {
|
|
|
4040
4040
|
}
|
|
4041
4041
|
}) : n.addEventListener("readystatechange", c), n.setRequestHeader = new Proxy(n.setRequestHeader, {
|
|
4042
4042
|
apply(l, d, u) {
|
|
4043
|
-
const [p, h] = u, f = d[
|
|
4043
|
+
const [p, h] = u, f = d[xe];
|
|
4044
4044
|
return f && q(p) && q(h) && (f.request_headers[p.toLowerCase()] = h), l.apply(d, u);
|
|
4045
4045
|
}
|
|
4046
4046
|
}), e.apply(n, r);
|
|
4047
4047
|
}
|
|
4048
4048
|
}), t.send = new Proxy(t.send, {
|
|
4049
4049
|
apply(e, n, r) {
|
|
4050
|
-
const s = n[
|
|
4050
|
+
const s = n[xe];
|
|
4051
4051
|
if (!s)
|
|
4052
4052
|
return e.apply(n, r);
|
|
4053
4053
|
r[0] !== void 0 && (s.body = r[0]);
|
|
@@ -4102,7 +4102,7 @@ function Bc(t, e = $c("fetch")) {
|
|
|
4102
4102
|
}
|
|
4103
4103
|
};
|
|
4104
4104
|
} catch (c) {
|
|
4105
|
-
throw
|
|
4105
|
+
throw Lc("fetch"), c;
|
|
4106
4106
|
} finally {
|
|
4107
4107
|
n -= o, r--;
|
|
4108
4108
|
}
|
|
@@ -4173,7 +4173,7 @@ const jc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, qc = /^\s*at (?:(.+?\)(?: \
|
|
|
4173
4173
|
return {
|
|
4174
4174
|
name: tl,
|
|
4175
4175
|
setup(n) {
|
|
4176
|
-
e.console && qa(ol(n)), e.dom && vc(il(n, e.dom)), e.xhr &&
|
|
4176
|
+
e.console && qa(ol(n)), e.dom && vc(il(n, e.dom)), e.xhr && Pc(al(n)), e.fetch && ic(cl(n)), e.history && ms(ll(n)), e.sentry && n.on("beforeSendEvent", sl(n));
|
|
4177
4177
|
}
|
|
4178
4178
|
};
|
|
4179
4179
|
}), rl = nl;
|
|
@@ -4247,7 +4247,7 @@ function al(t) {
|
|
|
4247
4247
|
return function(n) {
|
|
4248
4248
|
if (C() !== t)
|
|
4249
4249
|
return;
|
|
4250
|
-
const { startTimestamp: r, endTimestamp: s } = n, i = n.xhr[
|
|
4250
|
+
const { startTimestamp: r, endTimestamp: s } = n, i = n.xhr[xe];
|
|
4251
4251
|
if (!r || !s || !i)
|
|
4252
4252
|
return;
|
|
4253
4253
|
const { method: o, url: a, status_code: c, body: l } = i, d = {
|
|
@@ -4498,14 +4498,14 @@ const bl = (t = {}) => {
|
|
|
4498
4498
|
}, Sl = "CultureContext", kl = (() => ({
|
|
4499
4499
|
name: Sl,
|
|
4500
4500
|
preprocessEvent(t) {
|
|
4501
|
-
const e =
|
|
4501
|
+
const e = xl();
|
|
4502
4502
|
e && (t.contexts = {
|
|
4503
4503
|
...t.contexts,
|
|
4504
4504
|
culture: { ...e, ...t.contexts?.culture }
|
|
4505
4505
|
});
|
|
4506
4506
|
}
|
|
4507
|
-
})),
|
|
4508
|
-
function
|
|
4507
|
+
})), Rl = kl;
|
|
4508
|
+
function xl() {
|
|
4509
4509
|
try {
|
|
4510
4510
|
const t = T.Intl;
|
|
4511
4511
|
if (!t)
|
|
@@ -4634,8 +4634,8 @@ const $l = () => ({
|
|
|
4634
4634
|
headers: n
|
|
4635
4635
|
};
|
|
4636
4636
|
}
|
|
4637
|
-
}),
|
|
4638
|
-
const e = t.limit ||
|
|
4637
|
+
}), Ll = "cause", Pl = 5, Ml = "LinkedErrors", Fl = ((t = {}) => {
|
|
4638
|
+
const e = t.limit || Pl, n = t.key || Ll;
|
|
4639
4639
|
return {
|
|
4640
4640
|
name: Ml,
|
|
4641
4641
|
preprocessEvent(r, s, i) {
|
|
@@ -4672,7 +4672,7 @@ function zl(t) {
|
|
|
4672
4672
|
return [
|
|
4673
4673
|
// TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
|
|
4674
4674
|
// eslint-disable-next-line deprecation/deprecation
|
|
4675
|
-
|
|
4675
|
+
La(),
|
|
4676
4676
|
Aa(),
|
|
4677
4677
|
tc(),
|
|
4678
4678
|
fl(),
|
|
@@ -4681,7 +4681,7 @@ function zl(t) {
|
|
|
4681
4681
|
Ul(),
|
|
4682
4682
|
Ka(),
|
|
4683
4683
|
$l(),
|
|
4684
|
-
|
|
4684
|
+
Rl(),
|
|
4685
4685
|
bl()
|
|
4686
4686
|
];
|
|
4687
4687
|
}
|
|
@@ -4698,7 +4698,7 @@ function jl(t = {}) {
|
|
|
4698
4698
|
}),
|
|
4699
4699
|
transport: t.transport || Bc
|
|
4700
4700
|
};
|
|
4701
|
-
return
|
|
4701
|
+
return Ra(Rc, r);
|
|
4702
4702
|
}
|
|
4703
4703
|
const ql = "https://06451c8d861702902d2e6b2088fa9b62@o1128948.ingest.us.sentry.io/4509207135387648";
|
|
4704
4704
|
class Vl {
|
|
@@ -4737,7 +4737,7 @@ class Vl {
|
|
|
4737
4737
|
});
|
|
4738
4738
|
}
|
|
4739
4739
|
}
|
|
4740
|
-
const
|
|
4740
|
+
const _ = {
|
|
4741
4741
|
AUDIO_ERROR: 1001,
|
|
4742
4742
|
SUCCESS: 200,
|
|
4743
4743
|
TXN_ERROR: 1003,
|
|
@@ -4746,35 +4746,35 @@ const y = {
|
|
|
4746
4746
|
UNAUTHORIZED: 401,
|
|
4747
4747
|
FORBIDDEN: 403
|
|
4748
4748
|
};
|
|
4749
|
-
var Gl = /* @__PURE__ */ ((t) => (t.NOT_INITIALIZED = "na", t.INIT = "init", t.STOP = "stop", t.COMMIT = "commit", t))(Gl || {}), Wl = /* @__PURE__ */ ((t) => (t.START = "start", t.PAUSE = "pause", t.RESUME = "resume", t.STOP = "stop", t))(Wl || {}), Xl = /* @__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))(Xl || {}), Kl = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.FAILURE = "failure", t.PARTIAL_COMPLETE = "partial_complete", t.IN_PROGRESS = "in-progress", t))(Kl || {}),
|
|
4750
|
-
function
|
|
4749
|
+
var Gl = /* @__PURE__ */ ((t) => (t.NOT_INITIALIZED = "na", t.INIT = "init", t.STOP = "stop", t.COMMIT = "commit", t))(Gl || {}), Wl = /* @__PURE__ */ ((t) => (t.START = "start", t.PAUSE = "pause", t.RESUME = "resume", t.STOP = "stop", t))(Wl || {}), Xl = /* @__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))(Xl || {}), Kl = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.FAILURE = "failure", t.PARTIAL_COMPLETE = "partial_complete", t.IN_PROGRESS = "in-progress", t))(Kl || {}), E = /* @__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))(E || {}), Yl = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.IN_PROGRESS = "in-progress", t.FAILED = "failed", t.CANCELLED = "cancelled", t))(Yl || {}), Zl = /* @__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))(Zl || {}), We = /* @__PURE__ */ ((t) => (t.JSON = "json", t.TRANSCRIPT = "transcript", t.MARKDOWN = "markdown", t))(We || {}), ee = /* @__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))(ee || {}), v = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.ERROR = "error", t.WARNING = "warning", t))(v || {});
|
|
4750
|
+
function S(t, e) {
|
|
4751
4751
|
return t instanceof j ? t.status === 401 ? {
|
|
4752
|
-
error_code:
|
|
4753
|
-
status_code:
|
|
4752
|
+
error_code: E.UNAUTHORIZED,
|
|
4753
|
+
status_code: _.UNAUTHORIZED,
|
|
4754
4754
|
message: "Authentication failed. Token may be expired."
|
|
4755
4755
|
} : t.status === 403 ? {
|
|
4756
|
-
error_code:
|
|
4757
|
-
status_code:
|
|
4756
|
+
error_code: E.FORBIDDEN,
|
|
4757
|
+
status_code: _.FORBIDDEN,
|
|
4758
4758
|
message: "Access forbidden."
|
|
4759
4759
|
} : t.status === 408 ? {
|
|
4760
|
-
error_code:
|
|
4760
|
+
error_code: E.NETWORK_ERROR,
|
|
4761
4761
|
status_code: t.status,
|
|
4762
4762
|
message: `${e} Request timed out.`
|
|
4763
4763
|
} : {
|
|
4764
|
-
error_code:
|
|
4764
|
+
error_code: E.INTERNAL_SERVER_ERROR,
|
|
4765
4765
|
status_code: t.status,
|
|
4766
4766
|
message: `${e} ${t.message}`
|
|
4767
4767
|
} : t instanceof DOMException && t.name === "AbortError" ? {
|
|
4768
|
-
error_code:
|
|
4769
|
-
status_code:
|
|
4768
|
+
error_code: E.NETWORK_ERROR,
|
|
4769
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
4770
4770
|
message: `${e} Request aborted (timeout).`
|
|
4771
4771
|
} : t instanceof TypeError && (t.message.includes("fetch") || t.message.includes("network")) ? {
|
|
4772
|
-
error_code:
|
|
4773
|
-
status_code:
|
|
4772
|
+
error_code: E.NETWORK_ERROR,
|
|
4773
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
4774
4774
|
message: `${e} Network error.`
|
|
4775
4775
|
} : {
|
|
4776
|
-
error_code:
|
|
4777
|
-
status_code:
|
|
4776
|
+
error_code: E.INTERNAL_SERVER_ERROR,
|
|
4777
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
4778
4778
|
message: `${e} ${t}`
|
|
4779
4779
|
};
|
|
4780
4780
|
}
|
|
@@ -4791,7 +4791,7 @@ class Jl {
|
|
|
4791
4791
|
});
|
|
4792
4792
|
return { ...e.data, status_code: e.status };
|
|
4793
4793
|
} catch (e) {
|
|
4794
|
-
return { status_code:
|
|
4794
|
+
return { status_code: S(e, "Failed to fetch templates,").status_code, items: [] };
|
|
4795
4795
|
}
|
|
4796
4796
|
}
|
|
4797
4797
|
async createTemplate({
|
|
@@ -4807,7 +4807,7 @@ class Jl {
|
|
|
4807
4807
|
});
|
|
4808
4808
|
return { ...s.data, status_code: s.status };
|
|
4809
4809
|
} catch (s) {
|
|
4810
|
-
const i =
|
|
4810
|
+
const i = S(s, "Failed to create template,");
|
|
4811
4811
|
return {
|
|
4812
4812
|
status_code: i.status_code,
|
|
4813
4813
|
message: i.message
|
|
@@ -4828,7 +4828,7 @@ class Jl {
|
|
|
4828
4828
|
});
|
|
4829
4829
|
return { ...i.data, status_code: i.status };
|
|
4830
4830
|
} catch (i) {
|
|
4831
|
-
const o =
|
|
4831
|
+
const o = S(i, "Failed to update template,");
|
|
4832
4832
|
return { status_code: o.status_code, msg: o.message };
|
|
4833
4833
|
}
|
|
4834
4834
|
}
|
|
@@ -4840,7 +4840,7 @@ class Jl {
|
|
|
4840
4840
|
});
|
|
4841
4841
|
return { ...n.data, status_code: n.status };
|
|
4842
4842
|
} catch (n) {
|
|
4843
|
-
const r =
|
|
4843
|
+
const r = S(n, "Failed to delete template,");
|
|
4844
4844
|
return { status_code: r.status_code, msg: r.message };
|
|
4845
4845
|
}
|
|
4846
4846
|
}
|
|
@@ -4855,7 +4855,7 @@ class Jl {
|
|
|
4855
4855
|
});
|
|
4856
4856
|
return { ...n.data, status_code: n.status };
|
|
4857
4857
|
} catch (n) {
|
|
4858
|
-
const r =
|
|
4858
|
+
const r = S(n, "Failed to AI generate template,");
|
|
4859
4859
|
return {
|
|
4860
4860
|
status_code: r.status_code,
|
|
4861
4861
|
message: r.message
|
|
@@ -4887,7 +4887,7 @@ class Jl {
|
|
|
4887
4887
|
});
|
|
4888
4888
|
return { ...i.data, status_code: i.status };
|
|
4889
4889
|
} catch (i) {
|
|
4890
|
-
const o =
|
|
4890
|
+
const o = S(i, "Failed to convert transcription to template,");
|
|
4891
4891
|
return {
|
|
4892
4892
|
status_code: o.status_code,
|
|
4893
4893
|
message: o.message
|
|
@@ -4903,7 +4903,7 @@ class Jl {
|
|
|
4903
4903
|
});
|
|
4904
4904
|
return { ...e.data, status_code: e.status };
|
|
4905
4905
|
} catch (e) {
|
|
4906
|
-
return { status_code:
|
|
4906
|
+
return { status_code: S(e, "Failed to fetch template sections,").status_code, items: [] };
|
|
4907
4907
|
}
|
|
4908
4908
|
}
|
|
4909
4909
|
async createTemplateSection({
|
|
@@ -4920,7 +4920,7 @@ class Jl {
|
|
|
4920
4920
|
});
|
|
4921
4921
|
return { ...i.data, status_code: i.status };
|
|
4922
4922
|
} catch (i) {
|
|
4923
|
-
const o =
|
|
4923
|
+
const o = S(i, "Failed to create template section,");
|
|
4924
4924
|
return {
|
|
4925
4925
|
status_code: o.status_code,
|
|
4926
4926
|
msg: o.message,
|
|
@@ -4943,7 +4943,7 @@ class Jl {
|
|
|
4943
4943
|
});
|
|
4944
4944
|
return { ...o.data, status_code: o.status };
|
|
4945
4945
|
} catch (o) {
|
|
4946
|
-
const a =
|
|
4946
|
+
const a = S(o, "Failed to update template section,");
|
|
4947
4947
|
return {
|
|
4948
4948
|
status_code: a.status_code,
|
|
4949
4949
|
msg: a.message,
|
|
@@ -4960,7 +4960,7 @@ class Jl {
|
|
|
4960
4960
|
});
|
|
4961
4961
|
return { ...n.data, status_code: n.status };
|
|
4962
4962
|
} catch (n) {
|
|
4963
|
-
const r =
|
|
4963
|
+
const r = S(n, "Failed to delete template section,");
|
|
4964
4964
|
return {
|
|
4965
4965
|
status_code: r.status_code,
|
|
4966
4966
|
msg: r.message
|
|
@@ -4979,7 +4979,7 @@ class Jl {
|
|
|
4979
4979
|
});
|
|
4980
4980
|
return { ...s.data, status_code: s.status };
|
|
4981
4981
|
} catch (r) {
|
|
4982
|
-
return { status_code:
|
|
4982
|
+
return { status_code: S(r, "Failed to fetch document,").status_code };
|
|
4983
4983
|
}
|
|
4984
4984
|
}
|
|
4985
4985
|
async createDocument({
|
|
@@ -5003,7 +5003,7 @@ class Jl {
|
|
|
5003
5003
|
});
|
|
5004
5004
|
return { ...o.data, status_code: o.status };
|
|
5005
5005
|
} catch (o) {
|
|
5006
|
-
const a =
|
|
5006
|
+
const a = S(o, "Failed to create document,");
|
|
5007
5007
|
return {
|
|
5008
5008
|
status_code: a.status_code,
|
|
5009
5009
|
message: a.message
|
|
@@ -5034,7 +5034,7 @@ class Jl {
|
|
|
5034
5034
|
});
|
|
5035
5035
|
return { ...c.data, status_code: c.status };
|
|
5036
5036
|
} catch (c) {
|
|
5037
|
-
const l =
|
|
5037
|
+
const l = S(c, "Failed to update document,");
|
|
5038
5038
|
return {
|
|
5039
5039
|
status_code: l.status_code,
|
|
5040
5040
|
message: l.message
|
|
@@ -5049,7 +5049,7 @@ class Jl {
|
|
|
5049
5049
|
});
|
|
5050
5050
|
return { ...n.data, status_code: n.status };
|
|
5051
5051
|
} catch (n) {
|
|
5052
|
-
const r =
|
|
5052
|
+
const r = S(n, "Failed to delete document,");
|
|
5053
5053
|
return {
|
|
5054
5054
|
status_code: r.status_code,
|
|
5055
5055
|
message: r.message
|
|
@@ -5068,7 +5068,7 @@ class Jl {
|
|
|
5068
5068
|
});
|
|
5069
5069
|
return { ...r.data, status_code: r.status };
|
|
5070
5070
|
} catch (r) {
|
|
5071
|
-
const s =
|
|
5071
|
+
const s = S(r, "Failed to publish document,");
|
|
5072
5072
|
return {
|
|
5073
5073
|
status_code: s.status_code,
|
|
5074
5074
|
message: s.message
|
|
@@ -5097,7 +5097,7 @@ class Ql {
|
|
|
5097
5097
|
message: `Past ${e} transactions fetched successfully.`
|
|
5098
5098
|
};
|
|
5099
5099
|
} catch (r) {
|
|
5100
|
-
const s =
|
|
5100
|
+
const s = S(r, "Failed to fetch transactions,");
|
|
5101
5101
|
return { status_code: s.status_code, message: s.message };
|
|
5102
5102
|
}
|
|
5103
5103
|
}
|
|
@@ -5109,7 +5109,7 @@ class Ql {
|
|
|
5109
5109
|
});
|
|
5110
5110
|
return { ...n.data, status_code: n.status };
|
|
5111
5111
|
} catch (n) {
|
|
5112
|
-
const r =
|
|
5112
|
+
const r = S(n, "Failed to delete transaction,");
|
|
5113
5113
|
return { status_code: r.status_code, message: r.message };
|
|
5114
5114
|
}
|
|
5115
5115
|
}
|
|
@@ -5127,7 +5127,7 @@ class Ql {
|
|
|
5127
5127
|
});
|
|
5128
5128
|
return { ...r.data, status_code: r.status };
|
|
5129
5129
|
} catch (r) {
|
|
5130
|
-
const s =
|
|
5130
|
+
const s = S(r, "Failed to fetch session details,");
|
|
5131
5131
|
return {
|
|
5132
5132
|
status_code: s.status_code,
|
|
5133
5133
|
message: s.message
|
|
@@ -5142,7 +5142,7 @@ class Ql {
|
|
|
5142
5142
|
});
|
|
5143
5143
|
return { ...n.data, status_code: n.status };
|
|
5144
5144
|
} catch (n) {
|
|
5145
|
-
const r =
|
|
5145
|
+
const r = S(n, "Failed to fetch suggested medications,");
|
|
5146
5146
|
return {
|
|
5147
5147
|
status_code: r.status_code,
|
|
5148
5148
|
message: r.message
|
|
@@ -5161,7 +5161,7 @@ class Ql {
|
|
|
5161
5161
|
});
|
|
5162
5162
|
return { ...r.data, status_code: r.status };
|
|
5163
5163
|
} catch (r) {
|
|
5164
|
-
const s =
|
|
5164
|
+
const s = S(r, "Failed to add session context,");
|
|
5165
5165
|
return {
|
|
5166
5166
|
status_code: s.status_code,
|
|
5167
5167
|
message: s.message
|
|
@@ -5180,7 +5180,7 @@ class Ql {
|
|
|
5180
5180
|
});
|
|
5181
5181
|
return { ...r.data, status_code: r.status };
|
|
5182
5182
|
} catch (r) {
|
|
5183
|
-
const s =
|
|
5183
|
+
const s = S(r, "Failed to remove session context,");
|
|
5184
5184
|
return {
|
|
5185
5185
|
status_code: s.status_code,
|
|
5186
5186
|
message: s.message
|
|
@@ -5201,7 +5201,7 @@ class Ql {
|
|
|
5201
5201
|
});
|
|
5202
5202
|
return { ...r.data, status_code: r.status };
|
|
5203
5203
|
} catch (r) {
|
|
5204
|
-
const s =
|
|
5204
|
+
const s = S(r, "Failed to update result summary,");
|
|
5205
5205
|
return {
|
|
5206
5206
|
status_code: s.status_code,
|
|
5207
5207
|
message: s.message
|
|
@@ -5217,7 +5217,7 @@ class Ql {
|
|
|
5217
5217
|
});
|
|
5218
5218
|
return { ...e.data, status_code: e.status };
|
|
5219
5219
|
} catch (e) {
|
|
5220
|
-
const n =
|
|
5220
|
+
const n = S(e, "Failed to fetch configurations,");
|
|
5221
5221
|
return { status_code: n.status_code, message: n.message };
|
|
5222
5222
|
}
|
|
5223
5223
|
}
|
|
@@ -5229,7 +5229,7 @@ class Ql {
|
|
|
5229
5229
|
});
|
|
5230
5230
|
return { ...e.data, status_code: e.status };
|
|
5231
5231
|
} catch (e) {
|
|
5232
|
-
const n =
|
|
5232
|
+
const n = S(e, "Failed to fetch configurations,");
|
|
5233
5233
|
return { status_code: n.status_code, message: n.message };
|
|
5234
5234
|
}
|
|
5235
5235
|
}
|
|
@@ -5242,7 +5242,7 @@ class Ql {
|
|
|
5242
5242
|
});
|
|
5243
5243
|
return { ...r.data, status_code: r.status };
|
|
5244
5244
|
} catch (n) {
|
|
5245
|
-
const r =
|
|
5245
|
+
const r = S(n, "Failed to update config,");
|
|
5246
5246
|
return {
|
|
5247
5247
|
status_code: r.status_code,
|
|
5248
5248
|
msg: r.message
|
|
@@ -5291,7 +5291,7 @@ class Ql {
|
|
|
5291
5291
|
status_code: r.status
|
|
5292
5292
|
};
|
|
5293
5293
|
} catch (r) {
|
|
5294
|
-
const s =
|
|
5294
|
+
const s = S(r, "Failed to fetch doctor header/footer,");
|
|
5295
5295
|
return {
|
|
5296
5296
|
data: this.getDefaultHeaderFooterInfo(),
|
|
5297
5297
|
status_code: s.status_code,
|
|
@@ -5326,7 +5326,7 @@ class Ql {
|
|
|
5326
5326
|
status_code: n.status
|
|
5327
5327
|
};
|
|
5328
5328
|
} catch (n) {
|
|
5329
|
-
const r =
|
|
5329
|
+
const r = S(n, "Failed to fetch doctor clinics,");
|
|
5330
5330
|
return { data: null, status_code: r.status_code, message: r.message };
|
|
5331
5331
|
}
|
|
5332
5332
|
}
|
|
@@ -5436,20 +5436,20 @@ class eu {
|
|
|
5436
5436
|
);
|
|
5437
5437
|
return r.success ? (this.storedSession = r.data, this.txnID = r.data.session_id, this.tracker.setTransactionId(this.txnID), this.tracker.captureEvent("Session started", {
|
|
5438
5438
|
txn_id: this.txnID,
|
|
5439
|
-
status_code: r.httpStatus ??
|
|
5439
|
+
status_code: r.httpStatus ?? _.SUCCESS
|
|
5440
5440
|
}), {
|
|
5441
|
-
status_code: r.httpStatus ??
|
|
5441
|
+
status_code: r.httpStatus ?? _.SUCCESS,
|
|
5442
5442
|
message: "Transaction initialized successfully.",
|
|
5443
5443
|
txn_id: r.data.session_id
|
|
5444
5444
|
}) : {
|
|
5445
|
-
error_code: r.error.code === "txn_limit_exceeded" ?
|
|
5446
|
-
status_code: r.error.httpStatus ??
|
|
5445
|
+
error_code: r.error.code === "txn_limit_exceeded" ? E.TXN_LIMIT_EXCEEDED : E.TXN_INIT_FAILED,
|
|
5446
|
+
status_code: r.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
|
|
5447
5447
|
message: r.error.message || "Transaction initialization failed."
|
|
5448
5448
|
};
|
|
5449
5449
|
} catch (n) {
|
|
5450
5450
|
return {
|
|
5451
|
-
error_code:
|
|
5452
|
-
status_code:
|
|
5451
|
+
error_code: E.TXN_INIT_FAILED,
|
|
5452
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
5453
5453
|
message: `Failed to initialize transaction. ${n}`
|
|
5454
5454
|
};
|
|
5455
5455
|
}
|
|
@@ -5462,20 +5462,20 @@ class eu {
|
|
|
5462
5462
|
const n = await this.allianceClient.startRecording(e);
|
|
5463
5463
|
return n.success ? (this.storedSession = n.data, this.txnID = n.data.session_id, this.tracker.setTransactionId(this.txnID), this.tracker.captureEvent("Session started (v2)", {
|
|
5464
5464
|
txn_id: this.txnID,
|
|
5465
|
-
status_code: n.httpStatus ??
|
|
5465
|
+
status_code: n.httpStatus ?? _.SUCCESS
|
|
5466
5466
|
}), {
|
|
5467
|
-
status_code: n.httpStatus ??
|
|
5467
|
+
status_code: n.httpStatus ?? _.SUCCESS,
|
|
5468
5468
|
message: "Recording started successfully.",
|
|
5469
5469
|
txn_id: n.data.session_id
|
|
5470
5470
|
}) : {
|
|
5471
|
-
error_code: n.error.code === "txn_limit_exceeded" ?
|
|
5472
|
-
status_code: n.error.httpStatus ??
|
|
5471
|
+
error_code: n.error.code === "txn_limit_exceeded" ? E.TXN_LIMIT_EXCEEDED : E.TXN_INIT_FAILED,
|
|
5472
|
+
status_code: n.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
|
|
5473
5473
|
message: n.error.message || "Failed to start recording."
|
|
5474
5474
|
};
|
|
5475
5475
|
} catch (n) {
|
|
5476
5476
|
return {
|
|
5477
|
-
error_code:
|
|
5478
|
-
status_code:
|
|
5477
|
+
error_code: E.INTERNAL_SERVER_ERROR,
|
|
5478
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
5479
5479
|
message: `Failed to start recording. ${n}`
|
|
5480
5480
|
};
|
|
5481
5481
|
}
|
|
@@ -5485,8 +5485,8 @@ class eu {
|
|
|
5485
5485
|
try {
|
|
5486
5486
|
if (!this.storedSession)
|
|
5487
5487
|
return {
|
|
5488
|
-
error_code:
|
|
5489
|
-
status_code:
|
|
5488
|
+
error_code: E.TXN_STATUS_MISMATCH,
|
|
5489
|
+
status_code: _.TXN_ERROR,
|
|
5490
5490
|
message: "Transaction not initialized. Call initTransaction() first."
|
|
5491
5491
|
};
|
|
5492
5492
|
this.allianceClient.clearRecordingState();
|
|
@@ -5498,18 +5498,18 @@ class eu {
|
|
|
5498
5498
|
}
|
|
5499
5499
|
);
|
|
5500
5500
|
return n.success ? {
|
|
5501
|
-
status_code: n.httpStatus ??
|
|
5501
|
+
status_code: n.httpStatus ?? _.SUCCESS,
|
|
5502
5502
|
message: "Recording started successfully.",
|
|
5503
5503
|
txn_id: this.txnID
|
|
5504
5504
|
} : {
|
|
5505
|
-
error_code:
|
|
5506
|
-
status_code: n.error.httpStatus ??
|
|
5505
|
+
error_code: E.START_RECORDING_FAILED,
|
|
5506
|
+
status_code: n.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
|
|
5507
5507
|
message: n.error.message || "Failed to start recording."
|
|
5508
5508
|
};
|
|
5509
5509
|
} catch (n) {
|
|
5510
5510
|
return {
|
|
5511
|
-
error_code:
|
|
5512
|
-
status_code:
|
|
5511
|
+
error_code: E.INTERNAL_SERVER_ERROR,
|
|
5512
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
5513
5513
|
message: `Failed to start recording. ${n}`
|
|
5514
5514
|
};
|
|
5515
5515
|
}
|
|
@@ -5531,18 +5531,18 @@ class eu {
|
|
|
5531
5531
|
}
|
|
5532
5532
|
);
|
|
5533
5533
|
return r.success ? (this.storedSession = n, this.txnID = e.txn_id, this.tracker.setTransactionId(this.txnID), {
|
|
5534
|
-
status_code: r.httpStatus ??
|
|
5534
|
+
status_code: r.httpStatus ?? _.SUCCESS,
|
|
5535
5535
|
message: "Recording started for existing session.",
|
|
5536
5536
|
txn_id: this.txnID
|
|
5537
5537
|
}) : {
|
|
5538
|
-
error_code:
|
|
5539
|
-
status_code: r.error.httpStatus ??
|
|
5538
|
+
error_code: E.START_RECORDING_FAILED,
|
|
5539
|
+
status_code: r.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
|
|
5540
5540
|
message: r.error.message || "Failed to start recording for existing session."
|
|
5541
5541
|
};
|
|
5542
5542
|
} catch (n) {
|
|
5543
5543
|
return {
|
|
5544
|
-
error_code:
|
|
5545
|
-
status_code:
|
|
5544
|
+
error_code: E.INTERNAL_SERVER_ERROR,
|
|
5545
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
5546
5546
|
message: `Failed to start recording for existing session. ${n}`
|
|
5547
5547
|
};
|
|
5548
5548
|
}
|
|
@@ -5550,14 +5550,14 @@ class eu {
|
|
|
5550
5550
|
pauseRecording() {
|
|
5551
5551
|
try {
|
|
5552
5552
|
return this.allianceClient.pauseRecording(), {
|
|
5553
|
-
status_code:
|
|
5553
|
+
status_code: _.SUCCESS,
|
|
5554
5554
|
message: "Recording paused.",
|
|
5555
5555
|
is_paused: !0
|
|
5556
5556
|
};
|
|
5557
5557
|
} catch (e) {
|
|
5558
5558
|
return {
|
|
5559
|
-
error_code:
|
|
5560
|
-
status_code:
|
|
5559
|
+
error_code: E.INTERNAL_SERVER_ERROR,
|
|
5560
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
5561
5561
|
message: `Failed to pause recording. ${e}`
|
|
5562
5562
|
};
|
|
5563
5563
|
}
|
|
@@ -5565,14 +5565,14 @@ class eu {
|
|
|
5565
5565
|
resumeRecording() {
|
|
5566
5566
|
try {
|
|
5567
5567
|
return this.allianceClient.resumeRecording(), {
|
|
5568
|
-
status_code:
|
|
5568
|
+
status_code: _.SUCCESS,
|
|
5569
5569
|
message: "Recording resumed.",
|
|
5570
5570
|
is_paused: !1
|
|
5571
5571
|
};
|
|
5572
5572
|
} catch (e) {
|
|
5573
5573
|
return {
|
|
5574
|
-
error_code:
|
|
5575
|
-
status_code:
|
|
5574
|
+
error_code: E.INTERNAL_SERVER_ERROR,
|
|
5575
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
5576
5576
|
message: `Failed to resume recording. ${e}`
|
|
5577
5577
|
};
|
|
5578
5578
|
}
|
|
@@ -5586,27 +5586,27 @@ class eu {
|
|
|
5586
5586
|
total_files: e.data.totalFiles,
|
|
5587
5587
|
failed_files: e.data.failedUploads.length
|
|
5588
5588
|
}), this.storedSession = null, e.data.failedUploads.length > 0 ? {
|
|
5589
|
-
error_code:
|
|
5590
|
-
status_code: e.httpStatus ??
|
|
5589
|
+
error_code: E.AUDIO_UPLOAD_FAILED,
|
|
5590
|
+
status_code: e.httpStatus ?? _.AUDIO_ERROR,
|
|
5591
5591
|
message: `Recording ended but ${e.data.failedUploads.length} audio file(s) failed to upload.`,
|
|
5592
5592
|
failed_files: e.data.failedUploads,
|
|
5593
5593
|
total_audio_files: e.data.endSessionResponse?.audio_files
|
|
5594
5594
|
} : {
|
|
5595
|
-
status_code: e.httpStatus ??
|
|
5595
|
+
status_code: e.httpStatus ?? _.SUCCESS,
|
|
5596
5596
|
message: "Recording ended successfully.",
|
|
5597
5597
|
total_audio_files: e.data.endSessionResponse?.audio_files
|
|
5598
5598
|
}) : (this.tracker.captureEvent("Session end failed", {
|
|
5599
5599
|
txn_id: this.txnID,
|
|
5600
5600
|
error: e.error.message
|
|
5601
5601
|
}), {
|
|
5602
|
-
error_code:
|
|
5603
|
-
status_code: e.error.httpStatus ??
|
|
5602
|
+
error_code: E.END_RECORDING_FAILED,
|
|
5603
|
+
status_code: e.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
|
|
5604
5604
|
message: e.error.message || "Failed to end recording."
|
|
5605
5605
|
});
|
|
5606
5606
|
} catch (e) {
|
|
5607
5607
|
return {
|
|
5608
|
-
error_code:
|
|
5609
|
-
status_code:
|
|
5608
|
+
error_code: E.INTERNAL_SERVER_ERROR,
|
|
5609
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
5610
5610
|
message: `Failed to end recording. ${e}`
|
|
5611
5611
|
};
|
|
5612
5612
|
}
|
|
@@ -5616,34 +5616,34 @@ class eu {
|
|
|
5616
5616
|
if (!r)
|
|
5617
5617
|
return {
|
|
5618
5618
|
success: !1,
|
|
5619
|
-
status_code:
|
|
5619
|
+
status_code: _.TXN_ERROR,
|
|
5620
5620
|
error: new mn(
|
|
5621
5621
|
"No session ID available. Call initTransaction() first or pass a sessionId.",
|
|
5622
|
-
|
|
5622
|
+
E.TXN_STATUS_MISMATCH
|
|
5623
5623
|
)
|
|
5624
5624
|
};
|
|
5625
5625
|
const s = await this.allianceClient.getSessionStatus(r, n);
|
|
5626
5626
|
return {
|
|
5627
5627
|
...s,
|
|
5628
|
-
status_code: s.success ? s.httpStatus ??
|
|
5628
|
+
status_code: s.success ? s.httpStatus ?? _.SUCCESS : s.error.httpStatus ?? _.INTERNAL_SERVER_ERROR
|
|
5629
5629
|
};
|
|
5630
5630
|
}
|
|
5631
5631
|
async retryUploadRecording() {
|
|
5632
5632
|
try {
|
|
5633
5633
|
const e = await this.allianceClient.retryFailedUploads();
|
|
5634
5634
|
return e.success ? {
|
|
5635
|
-
status_code: e.httpStatus ??
|
|
5635
|
+
status_code: e.httpStatus ?? _.SUCCESS,
|
|
5636
5636
|
message: `Retried ${e.data.retried} files. ${e.data.succeeded} succeeded.`,
|
|
5637
5637
|
failed_files: e.data.stillFailed
|
|
5638
5638
|
} : {
|
|
5639
|
-
error_code:
|
|
5640
|
-
status_code: e.error.httpStatus ??
|
|
5639
|
+
error_code: E.AUDIO_UPLOAD_FAILED,
|
|
5640
|
+
status_code: e.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
|
|
5641
5641
|
message: e.error.message || "Retry upload failed."
|
|
5642
5642
|
};
|
|
5643
5643
|
} catch (e) {
|
|
5644
5644
|
return {
|
|
5645
|
-
error_code:
|
|
5646
|
-
status_code:
|
|
5645
|
+
error_code: E.INTERNAL_SERVER_ERROR,
|
|
5646
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
5647
5647
|
message: `Failed to retry upload. ${e}`
|
|
5648
5648
|
};
|
|
5649
5649
|
}
|
|
@@ -5653,43 +5653,38 @@ class eu {
|
|
|
5653
5653
|
if (!n)
|
|
5654
5654
|
return {
|
|
5655
5655
|
success: !1,
|
|
5656
|
-
status_code:
|
|
5656
|
+
status_code: _.TXN_ERROR,
|
|
5657
5657
|
error: new mn(
|
|
5658
5658
|
"No session ID available. Call initTransaction() first or pass a sessionId.",
|
|
5659
|
-
|
|
5659
|
+
E.TXN_STATUS_MISMATCH
|
|
5660
5660
|
)
|
|
5661
5661
|
};
|
|
5662
5662
|
const r = await this.allianceClient.cancelSession(n);
|
|
5663
5663
|
return this.storedSession = null, this.txnID = "", {
|
|
5664
5664
|
...r,
|
|
5665
|
-
status_code: r.success ? r.httpStatus ??
|
|
5665
|
+
status_code: r.success ? r.httpStatus ?? _.SUCCESS : r.error.httpStatus ?? _.INTERNAL_SERVER_ERROR
|
|
5666
5666
|
};
|
|
5667
5667
|
}
|
|
5668
5668
|
async processPreRecordedAudio({
|
|
5669
|
-
|
|
5670
|
-
audioFile: n
|
|
5669
|
+
upload: e,
|
|
5670
|
+
audioFile: n,
|
|
5671
|
+
audioFileName: r = "audio_1.mp3"
|
|
5671
5672
|
}) {
|
|
5672
5673
|
try {
|
|
5673
|
-
const
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
body: n,
|
|
5677
|
-
headers: { "Content-Type": "audio/mp3" }
|
|
5678
|
-
});
|
|
5679
|
-
return s.status < 200 || s.status >= 300 ? {
|
|
5680
|
-
error_code: S.AUDIO_UPLOAD_FAILED,
|
|
5681
|
-
status_code: s.status,
|
|
5682
|
-
message: `Audio upload failed with status: ${s.status}`
|
|
5683
|
-
} : {
|
|
5684
|
-
status_code: y.SUCCESS,
|
|
5674
|
+
const s = await this.allianceClient.uploadAudioFile(n, r, e);
|
|
5675
|
+
return s.success ? {
|
|
5676
|
+
status_code: s.httpStatus ?? _.SUCCESS,
|
|
5685
5677
|
message: "Audio file uploaded successfully."
|
|
5678
|
+
} : {
|
|
5679
|
+
error_code: E.AUDIO_UPLOAD_FAILED,
|
|
5680
|
+
status_code: s.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
|
|
5681
|
+
message: s.error.message || "Audio upload failed."
|
|
5686
5682
|
};
|
|
5687
|
-
} catch (
|
|
5688
|
-
const s = E(r, "Audio upload failed:");
|
|
5683
|
+
} catch (s) {
|
|
5689
5684
|
return {
|
|
5690
|
-
error_code:
|
|
5691
|
-
status_code:
|
|
5692
|
-
message: s
|
|
5685
|
+
error_code: E.INTERNAL_SERVER_ERROR,
|
|
5686
|
+
status_code: _.INTERNAL_SERVER_ERROR,
|
|
5687
|
+
message: `Failed to upload audio file. ${s}`
|
|
5693
5688
|
};
|
|
5694
5689
|
}
|
|
5695
5690
|
}
|
|
@@ -5697,8 +5692,8 @@ class eu {
|
|
|
5697
5692
|
try {
|
|
5698
5693
|
if (!this.txnID)
|
|
5699
5694
|
return {
|
|
5700
|
-
error_code:
|
|
5701
|
-
status_code:
|
|
5695
|
+
error_code: E.TXN_STATUS_MISMATCH,
|
|
5696
|
+
status_code: _.TXN_ERROR,
|
|
5702
5697
|
message: "Transaction not initialized."
|
|
5703
5698
|
};
|
|
5704
5699
|
const e = await this.transport.request({
|
|
@@ -5707,15 +5702,15 @@ class eu {
|
|
|
5707
5702
|
body: { audio_files: [] }
|
|
5708
5703
|
});
|
|
5709
5704
|
return e.status !== 200 ? {
|
|
5710
|
-
error_code:
|
|
5705
|
+
error_code: E.TXN_COMMIT_FAILED,
|
|
5711
5706
|
status_code: e.status,
|
|
5712
5707
|
message: e.data.message || "Transaction commit failed."
|
|
5713
5708
|
} : {
|
|
5714
|
-
status_code:
|
|
5709
|
+
status_code: _.SUCCESS,
|
|
5715
5710
|
message: e.data.message || "Transaction committed successfully."
|
|
5716
5711
|
};
|
|
5717
5712
|
} catch (e) {
|
|
5718
|
-
const n =
|
|
5713
|
+
const n = S(e, "Failed to commit transaction,");
|
|
5719
5714
|
return {
|
|
5720
5715
|
error_code: n.error_code,
|
|
5721
5716
|
status_code: n.status_code,
|
|
@@ -5727,8 +5722,8 @@ class eu {
|
|
|
5727
5722
|
try {
|
|
5728
5723
|
if (!this.txnID)
|
|
5729
5724
|
return {
|
|
5730
|
-
error_code:
|
|
5731
|
-
status_code:
|
|
5725
|
+
error_code: E.TXN_STATUS_MISMATCH,
|
|
5726
|
+
status_code: _.TXN_ERROR,
|
|
5732
5727
|
message: "Transaction not initialized."
|
|
5733
5728
|
};
|
|
5734
5729
|
const e = await this.transport.request({
|
|
@@ -5741,7 +5736,7 @@ class eu {
|
|
|
5741
5736
|
message: e.data.message || "Transaction stopped."
|
|
5742
5737
|
};
|
|
5743
5738
|
} catch (e) {
|
|
5744
|
-
const n =
|
|
5739
|
+
const n = S(e, "Failed to stop transaction,");
|
|
5745
5740
|
return {
|
|
5746
5741
|
error_code: n.error_code,
|
|
5747
5742
|
status_code: n.status_code,
|
|
@@ -5795,7 +5790,7 @@ class ru {
|
|
|
5795
5790
|
try {
|
|
5796
5791
|
return await this.fetchV3Status(e);
|
|
5797
5792
|
} catch (n) {
|
|
5798
|
-
const r =
|
|
5793
|
+
const r = S(n, "Failed to fetch output templates,");
|
|
5799
5794
|
return { status_code: r.status_code, message: r.message };
|
|
5800
5795
|
}
|
|
5801
5796
|
}
|
|
@@ -5803,7 +5798,7 @@ class ru {
|
|
|
5803
5798
|
try {
|
|
5804
5799
|
return await this.fetchV3Status(e, "transcript=true", 15e3);
|
|
5805
5800
|
} catch (n) {
|
|
5806
|
-
const r =
|
|
5801
|
+
const r = S(n, "Failed to fetch output transcription,");
|
|
5807
5802
|
return { status_code: r.status_code, message: r.message };
|
|
5808
5803
|
}
|
|
5809
5804
|
}
|
|
@@ -5814,9 +5809,9 @@ class ru {
|
|
|
5814
5809
|
url: `${this.hosts.voiceV3}/transcript/${e}/${n}`,
|
|
5815
5810
|
timeout: 1e4
|
|
5816
5811
|
});
|
|
5817
|
-
return r.status >= 400 ? { success: !1, error: r.data?.error?.code ??
|
|
5812
|
+
return r.status >= 400 ? { success: !1, error: r.data?.error?.code ?? E.UNKNOWN_ERROR } : { success: !0, data: r.data };
|
|
5818
5813
|
} catch (r) {
|
|
5819
|
-
return { success: !1, error:
|
|
5814
|
+
return { success: !1, error: S(r, "Failed to fetch chunk transcript,").error_code };
|
|
5820
5815
|
}
|
|
5821
5816
|
}
|
|
5822
5817
|
async pollSessionOutput(e) {
|
|
@@ -5909,7 +5904,7 @@ class ru {
|
|
|
5909
5904
|
status_code: i.status
|
|
5910
5905
|
};
|
|
5911
5906
|
} catch (s) {
|
|
5912
|
-
const i =
|
|
5907
|
+
const i = S(s, "Failed to fetch status,");
|
|
5913
5908
|
return { status_code: i.status_code, message: i.message };
|
|
5914
5909
|
}
|
|
5915
5910
|
}
|
|
@@ -6231,7 +6226,7 @@ var ou = ((t = "") => {
|
|
|
6231
6226
|
return !1;
|
|
6232
6227
|
}
|
|
6233
6228
|
})(), 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: ue((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: ue((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: ue((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: ue((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: ue((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: ue((t) => new RegExp(`^ {0,${t}}>`)) }, au = /^(?:[ \t]*(?:\n|$))+/, cu = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, lu = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, $e = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, uu = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, cn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, bs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ss = b(bs).replace(/bull/g, cn).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(), du = b(bs).replace(/bull/g, cn).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(), ln = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, pu = /^[^\n]+/, un = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, hu = b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", un).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), fu = b(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, cn).getRegex(), lt = "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", dn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, gu = b("^ {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", dn).replace("tag", lt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ks = b(ln).replace("hr", $e).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", lt).getRegex(), mu = b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ks).getRegex(), pn = { blockquote: mu, code: cu, def: hu, fences: lu, heading: uu, hr: $e, html: gu, lheading: Ss, list: fu, newline: au, paragraph: ks, table: ne, text: pu }, mr = b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", $e).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", lt).getRegex(), _u = { ...pn, lheading: du, table: mr, paragraph: b(ln).replace("hr", $e).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", mr).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", lt).getRegex() }, yu = { ...pn, html: b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", dn).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: ne, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: b(ln).replace("hr", $e).replace("heading", ` *#{1,6} *[^
|
|
6234
|
-
]`).replace("lheading", Ss).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Eu = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, bu = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
|
|
6229
|
+
]`).replace("lheading", Ss).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Eu = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, bu = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Rs = /^( {2,}|\\)\n(?!\s*$)/, Su = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ee = /[\p{P}\p{S}]/u, ut = /[\s\p{P}\p{S}]/u, hn = /[^\s\p{P}\p{S}]/u, ku = b(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, ut).getRegex(), xs = /(?!~)[\p{P}\p{S}]/u, Ru = /(?!~)[\s\p{P}\p{S}]/u, xu = /(?:[^\s\p{P}\p{S}]|~)/u, wu = b(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ou ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ws = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Tu = b(ws, "u").replace(/punct/g, Ee).getRegex(), vu = b(ws, "u").replace(/punct/g, xs).getRegex(), Ts = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Iu = b(Ts, "gu").replace(/notPunctSpace/g, hn).replace(/punctSpace/g, ut).replace(/punct/g, Ee).getRegex(), Cu = b(Ts, "gu").replace(/notPunctSpace/g, xu).replace(/punctSpace/g, Ru).replace(/punct/g, xs).getRegex(), Nu = b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, hn).replace(/punctSpace/g, ut).replace(/punct/g, Ee).getRegex(), Au = b(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ee).getRegex(), Du = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Ou = b(Du, "gu").replace(/notPunctSpace/g, hn).replace(/punctSpace/g, ut).replace(/punct/g, Ee).getRegex(), $u = b(/\\(punct)/, "gu").replace(/punct/g, Ee).getRegex(), Lu = b(/^<(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(), Pu = b(dn).replace("(?:-->|$)", "-->").getRegex(), Mu = b("^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", Pu).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ze = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Fu = b(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Ze).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), vs = b(/^!?\[(label)\]\[(ref)\]/).replace("label", Ze).replace("ref", un).getRegex(), Is = b(/^!?\[(ref)\](?:\[\])?/).replace("ref", un).getRegex(), Uu = b("reflink|nolink(?!\\()", "g").replace("reflink", vs).replace("nolink", Is).getRegex(), _r = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, fn = { _backpedal: ne, anyPunctuation: $u, autolink: Lu, blockSkip: wu, br: Rs, code: bu, del: ne, delLDelim: ne, delRDelim: ne, emStrongLDelim: Tu, emStrongRDelimAst: Iu, emStrongRDelimUnd: Nu, escape: Eu, link: Fu, nolink: Is, punctuation: ku, reflink: vs, reflinkSearch: Uu, tag: Mu, text: Su, url: ne }, Bu = { ...fn, link: b(/^!?\[(label)\]\((.*?)\)/).replace("label", Ze).getRegex(), reflink: b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ze).getRegex() }, Ht = { ...fn, emStrongRDelimAst: Cu, emStrongLDelim: vu, delLDelim: Au, delRDelim: Ou, url: b(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", _r).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: b(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", _r).getRegex() }, Hu = { ...Ht, br: b(Rs).replace("{2,}", "*").getRegex(), text: b(Ht.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Ue = { normal: pn, gfm: _u, pedantic: yu }, Re = { normal: fn, gfm: Ht, breaks: Hu, pedantic: Bu }, zu = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, yr = (t) => zu[t];
|
|
6235
6230
|
function U(t, e) {
|
|
6236
6231
|
if (e) {
|
|
6237
6232
|
if (I.escapeTest.test(t)) return t.replace(I.escapeReplace, yr);
|
|
@@ -6626,7 +6621,7 @@ ${d}` : d;
|
|
|
6626
6621
|
return { type: "text", raw: e[0], text: e[0], escaped: n };
|
|
6627
6622
|
}
|
|
6628
6623
|
}
|
|
6629
|
-
},
|
|
6624
|
+
}, P = class zt {
|
|
6630
6625
|
constructor(e) {
|
|
6631
6626
|
w(this, "tokens");
|
|
6632
6627
|
w(this, "options");
|
|
@@ -6634,11 +6629,11 @@ ${d}` : d;
|
|
|
6634
6629
|
w(this, "inlineQueue");
|
|
6635
6630
|
w(this, "tokenizer");
|
|
6636
6631
|
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ce, this.options.tokenizer = this.options.tokenizer || new Je(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
6637
|
-
let n = { other: I, block: Ue.normal, inline:
|
|
6638
|
-
this.options.pedantic ? (n.block = Ue.pedantic, n.inline =
|
|
6632
|
+
let n = { other: I, block: Ue.normal, inline: Re.normal };
|
|
6633
|
+
this.options.pedantic ? (n.block = Ue.pedantic, n.inline = Re.pedantic) : this.options.gfm && (n.block = Ue.gfm, this.options.breaks ? n.inline = Re.breaks : n.inline = Re.gfm), this.tokenizer.rules = n;
|
|
6639
6634
|
}
|
|
6640
6635
|
static get rules() {
|
|
6641
|
-
return { block: Ue, inline:
|
|
6636
|
+
return { block: Ue, inline: Re };
|
|
6642
6637
|
}
|
|
6643
6638
|
static lex(e, n) {
|
|
6644
6639
|
return new zt(n).lex(e);
|
|
@@ -7163,7 +7158,7 @@ ${t}</tr>
|
|
|
7163
7158
|
return t;
|
|
7164
7159
|
}
|
|
7165
7160
|
provideLexer(t = this.block) {
|
|
7166
|
-
return t ?
|
|
7161
|
+
return t ? P.lex : P.lexInline;
|
|
7167
7162
|
}
|
|
7168
7163
|
provideParser(t = this.block) {
|
|
7169
7164
|
return t ? M.parse : M.parseInline;
|
|
@@ -7177,7 +7172,7 @@ ${t}</tr>
|
|
|
7177
7172
|
w(this, "Parser", M);
|
|
7178
7173
|
w(this, "Renderer", Qe);
|
|
7179
7174
|
w(this, "TextRenderer", gn);
|
|
7180
|
-
w(this, "Lexer",
|
|
7175
|
+
w(this, "Lexer", P);
|
|
7181
7176
|
w(this, "Tokenizer", Je);
|
|
7182
7177
|
w(this, "Hooks", we);
|
|
7183
7178
|
this.use(...t);
|
|
@@ -7289,7 +7284,7 @@ ${t}</tr>
|
|
|
7289
7284
|
return this.defaults = { ...this.defaults, ...t }, this;
|
|
7290
7285
|
}
|
|
7291
7286
|
lexer(t, e) {
|
|
7292
|
-
return
|
|
7287
|
+
return P.lex(t, e ?? this.defaults);
|
|
7293
7288
|
}
|
|
7294
7289
|
parser(t, e) {
|
|
7295
7290
|
return M.parse(t, e ?? this.defaults);
|
|
@@ -7301,14 +7296,14 @@ ${t}</tr>
|
|
|
7301
7296
|
if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
|
|
7302
7297
|
if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
7303
7298
|
if (s.hooks && (s.hooks.options = s, s.hooks.block = t), s.async) return (async () => {
|
|
7304
|
-
let o = s.hooks ? await s.hooks.preprocess(e) : e, a = await (s.hooks ? await s.hooks.provideLexer(t) : t ?
|
|
7299
|
+
let o = s.hooks ? await s.hooks.preprocess(e) : e, a = await (s.hooks ? await s.hooks.provideLexer(t) : t ? P.lex : P.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(a) : a;
|
|
7305
7300
|
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
7306
7301
|
let l = await (s.hooks ? await s.hooks.provideParser(t) : t ? M.parse : M.parseInline)(c, s);
|
|
7307
7302
|
return s.hooks ? await s.hooks.postprocess(l) : l;
|
|
7308
7303
|
})().catch(i);
|
|
7309
7304
|
try {
|
|
7310
7305
|
s.hooks && (e = s.hooks.preprocess(e));
|
|
7311
|
-
let o = (s.hooks ? s.hooks.provideLexer(t) : t ?
|
|
7306
|
+
let o = (s.hooks ? s.hooks.provideLexer(t) : t ? P.lex : P.lexInline)(e, s);
|
|
7312
7307
|
s.hooks && (o = s.hooks.processAllTokens(o)), s.walkTokens && this.walkTokens(o, s.walkTokens);
|
|
7313
7308
|
let a = (s.hooks ? s.hooks.provideParser(t) : t ? M.parse : M.parseInline)(o, s);
|
|
7314
7309
|
return s.hooks && (a = s.hooks.postprocess(a)), a;
|
|
@@ -7329,37 +7324,37 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
7329
7324
|
};
|
|
7330
7325
|
}
|
|
7331
7326
|
}, ie = new Gu();
|
|
7332
|
-
function
|
|
7327
|
+
function R(t, e) {
|
|
7333
7328
|
return ie.parse(t, e);
|
|
7334
7329
|
}
|
|
7335
|
-
|
|
7336
|
-
return ie.setOptions(t),
|
|
7330
|
+
R.options = R.setOptions = function(t) {
|
|
7331
|
+
return ie.setOptions(t), R.defaults = ie.defaults, Es(R.defaults), R;
|
|
7337
7332
|
};
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
return ie.use(...t),
|
|
7333
|
+
R.getDefaults = an;
|
|
7334
|
+
R.defaults = ce;
|
|
7335
|
+
R.use = function(...t) {
|
|
7336
|
+
return ie.use(...t), R.defaults = ie.defaults, Es(R.defaults), R;
|
|
7342
7337
|
};
|
|
7343
|
-
|
|
7338
|
+
R.walkTokens = function(t, e) {
|
|
7344
7339
|
return ie.walkTokens(t, e);
|
|
7345
7340
|
};
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7341
|
+
R.parseInline = ie.parseInline;
|
|
7342
|
+
R.Parser = M;
|
|
7343
|
+
R.parser = M.parse;
|
|
7344
|
+
R.Renderer = Qe;
|
|
7345
|
+
R.TextRenderer = gn;
|
|
7346
|
+
R.Lexer = P;
|
|
7347
|
+
R.lexer = P.lex;
|
|
7348
|
+
R.Tokenizer = Je;
|
|
7349
|
+
R.Hooks = we;
|
|
7350
|
+
R.parse = R;
|
|
7351
|
+
R.options;
|
|
7352
|
+
R.setOptions;
|
|
7353
|
+
R.use;
|
|
7354
|
+
R.walkTokens;
|
|
7355
|
+
R.parseInline;
|
|
7361
7356
|
M.parse;
|
|
7362
|
-
|
|
7357
|
+
P.lex;
|
|
7363
7358
|
var g = /* @__PURE__ */ ((t) => (t.COLLAPSED = "collapsed", t.RECORDING = "recording", t.PAUSED = "paused", t.PROCESSING = "processing", t.DONE = "done", t.ERROR = "error", t))(g || {});
|
|
7364
7359
|
const Wu = {
|
|
7365
7360
|
[g.COLLAPSED]: [g.RECORDING, g.ERROR],
|
|
@@ -7857,7 +7852,7 @@ function Zu(t, e) {
|
|
|
7857
7852
|
e.removeEventListener("mousedown", i), e.removeEventListener("touchstart", i), a();
|
|
7858
7853
|
};
|
|
7859
7854
|
}
|
|
7860
|
-
const Ju = '<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>', Qu = '<svg viewBox="0 0 24 24"><polygon points="8,4 20,12 8,20"/></svg>',
|
|
7855
|
+
const Ju = '<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>', Qu = '<svg viewBox="0 0 24 24"><polygon points="8,4 20,12 8,20"/></svg>', Rr = '<svg viewBox="0 0 24 24"><rect x="5" y="5" width="14" height="14" rx="2"/></svg>', xr = '<svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>', Be = '<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>', ed = 20, td = 14, Rt = 3, xt = 2;
|
|
7861
7856
|
class nd {
|
|
7862
7857
|
constructor(e, n, r, s) {
|
|
7863
7858
|
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" });
|
|
@@ -7905,7 +7900,7 @@ class nd {
|
|
|
7905
7900
|
i.className = "timer", i.textContent = e, n.appendChild(i);
|
|
7906
7901
|
const o = this.createButton("btn btn-play-pause", Ju);
|
|
7907
7902
|
o.addEventListener("click", this.actions.onPause), n.appendChild(o);
|
|
7908
|
-
const a = this.createButton("btn btn-stop",
|
|
7903
|
+
const a = this.createButton("btn btn-stop", Rr);
|
|
7909
7904
|
a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n), this.startAnimation();
|
|
7910
7905
|
}
|
|
7911
7906
|
renderPaused(e) {
|
|
@@ -7919,7 +7914,7 @@ class nd {
|
|
|
7919
7914
|
i.className = "timer", i.textContent = e, n.appendChild(i);
|
|
7920
7915
|
const o = this.createButton("btn btn-play-pause", Qu);
|
|
7921
7916
|
o.addEventListener("click", this.actions.onResume), n.appendChild(o);
|
|
7922
|
-
const a = this.createButton("btn btn-stop",
|
|
7917
|
+
const a = this.createButton("btn btn-stop", Rr);
|
|
7923
7918
|
a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n);
|
|
7924
7919
|
}
|
|
7925
7920
|
renderProcessing() {
|
|
@@ -7934,7 +7929,7 @@ class nd {
|
|
|
7934
7929
|
this.widgetEl.classList.remove("hidden"), this.contentEl.innerHTML = "";
|
|
7935
7930
|
const e = document.createElement("div");
|
|
7936
7931
|
e.className = "pill", e.innerHTML = `
|
|
7937
|
-
<div class="done-icon">${
|
|
7932
|
+
<div class="done-icon">${xr}</div>
|
|
7938
7933
|
<span class="done-text">Notes ready</span>
|
|
7939
7934
|
`;
|
|
7940
7935
|
const n = document.createElement("button");
|
|
@@ -7956,7 +7951,7 @@ class nd {
|
|
|
7956
7951
|
this.stopAnimation(), this.widgetEl.classList.remove("hidden"), this.contentEl.innerHTML = "", this.contentEl.className = "content-expanded";
|
|
7957
7952
|
const n = document.createElement("div");
|
|
7958
7953
|
n.className = "pill", n.innerHTML = `
|
|
7959
|
-
<div class="done-icon">${
|
|
7954
|
+
<div class="done-icon">${xr}</div>
|
|
7960
7955
|
<span class="done-text">Notes ready</span>
|
|
7961
7956
|
`;
|
|
7962
7957
|
const r = document.createElement("button");
|
|
@@ -7988,7 +7983,7 @@ class nd {
|
|
|
7988
7983
|
}
|
|
7989
7984
|
// ─── Waveform ─────────────────────────────────────────────────────────────
|
|
7990
7985
|
createWaveform() {
|
|
7991
|
-
const e = this.orientation === "vertical" ? td : ed, n = 28, r = e * (
|
|
7986
|
+
const e = this.orientation === "vertical" ? td : ed, n = 28, r = e * (Rt + xt) - xt, s = n, i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
7992
7987
|
i.setAttribute("width", String(r)), i.setAttribute("height", String(s)), i.setAttribute("viewBox", `0 0 ${r} ${s}`);
|
|
7993
7988
|
const o = [], a = n * 0.4;
|
|
7994
7989
|
for (let c = 0; c < e; c++) {
|
|
@@ -7997,8 +7992,8 @@ class nd {
|
|
|
7997
7992
|
"rect"
|
|
7998
7993
|
);
|
|
7999
7994
|
l.setAttribute("fill", "#2563EB"), l.setAttribute("rx", "1.5");
|
|
8000
|
-
const d = c * (
|
|
8001
|
-
l.setAttribute("x", String(d)), l.setAttribute("y", String((n - a) / 2)), l.setAttribute("width", String(
|
|
7995
|
+
const d = c * (Rt + xt);
|
|
7996
|
+
l.setAttribute("x", String(d)), l.setAttribute("y", String((n - a) / 2)), l.setAttribute("width", String(Rt)), l.setAttribute("height", String(a)), l.style.opacity = "0.35", i.appendChild(l), o.push(l);
|
|
8002
7997
|
}
|
|
8003
7998
|
return { svg: i, bars: o };
|
|
8004
7999
|
}
|
|
@@ -8191,7 +8186,7 @@ class rd {
|
|
|
8191
8186
|
}
|
|
8192
8187
|
if (s) {
|
|
8193
8188
|
const i = typeof s == "string" ? s : JSON.stringify(s, null, 2);
|
|
8194
|
-
r.notesHtml =
|
|
8189
|
+
r.notesHtml = R.parse(i);
|
|
8195
8190
|
}
|
|
8196
8191
|
}
|
|
8197
8192
|
return r;
|
|
@@ -8206,7 +8201,7 @@ const O = class O {
|
|
|
8206
8201
|
flavour: e.flavour,
|
|
8207
8202
|
onUnauthorized: () => this.handleUnauthorized()
|
|
8208
8203
|
};
|
|
8209
|
-
if (e.mode === "ipc" && e.ipcBridge ? this.transport = new Fs(n, e.ipcBridge) : this.transport = new
|
|
8204
|
+
if (e.mode === "ipc" && e.ipcBridge ? this.transport = new Fs(n, e.ipcBridge) : this.transport = new Ps(n), e.enableTracking && (this.tracker.init(e.env), e.flavour && this.tracker.setUser(e.flavour)), !e.allianceConfig?.baseUrl)
|
|
8210
8205
|
throw new Error("[EkaScribe] allianceConfig.baseUrl is required.");
|
|
8211
8206
|
this.allianceClient = new $s({
|
|
8212
8207
|
baseUrl: e.allianceConfig.baseUrl,
|
|
@@ -8289,7 +8284,7 @@ const O = class O {
|
|
|
8289
8284
|
*
|
|
8290
8285
|
* Client flow:
|
|
8291
8286
|
* 1. createSession() — via sessions.createSession()
|
|
8292
|
-
* 2. processPreRecordedAudio(
|
|
8287
|
+
* 2. processPreRecordedAudio(upload, audioFile, audioFileName) — this method
|
|
8293
8288
|
* 3. endSession — via sessions.endSession()
|
|
8294
8289
|
*/
|
|
8295
8290
|
processPreRecordedAudio(e) {
|
|
@@ -8364,7 +8359,7 @@ export {
|
|
|
8364
8359
|
Zl as CALLBACK_TYPE,
|
|
8365
8360
|
v as COMPATIBILITY_TEST_STATUS,
|
|
8366
8361
|
ee as COMPATIBILITY_TEST_TYPE,
|
|
8367
|
-
|
|
8362
|
+
E as ERROR_CODE,
|
|
8368
8363
|
Yl as PROCESSING_STATUS,
|
|
8369
8364
|
Kl as RESULT_STATUS,
|
|
8370
8365
|
Xl as TEMPLATE_ID,
|