@eka-care/ekascribe-ts-sdk 3.0.34 → 3.0.36
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 +6 -12
- package/dist/index.mjs +326 -323
- 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 Ps = 1e4;
|
|
7
|
+
class Ls {
|
|
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 ?? Ps, 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 _ = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, R = globalThis, re = "10.43.0";
|
|
205
205
|
function et() {
|
|
206
|
-
return tt(
|
|
206
|
+
return tt(R), R;
|
|
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 = R) {
|
|
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 R))
|
|
227
227
|
return t();
|
|
228
|
-
const e =
|
|
228
|
+
const e = R.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
|
+
_ && wr() && me(() => {
|
|
261
|
+
R.console[t](`${qs}[${t}]:`, ...e);
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
function Gt() {
|
|
265
|
-
return
|
|
265
|
+
return _ ? 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(Pe(e).function || "") && e.pop(), e.reverse(), En.test(Pe(e).function || "") && (e.pop(), En.test(Pe(e).function || "") && e.pop()), e.slice(0, Tr).map((n) => ({
|
|
313
313
|
...n,
|
|
314
|
-
filename: n.filename ||
|
|
314
|
+
filename: n.filename || Pe(e).filename,
|
|
315
315
|
function: n.function || se
|
|
316
316
|
}));
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Pe(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
|
+
_ && 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
|
+
_ && 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 = R.onerror, R.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
|
+
}, R.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 = R.onunhandledrejection, R.onunhandledrejection = function(t) {
|
|
398
398
|
return F("unhandledrejection", t), ft ? ft.apply(this, arguments) : !0;
|
|
399
|
-
},
|
|
399
|
+
}, R.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 = R, 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
|
+
_ && 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
|
+
_ && 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 Pr(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
|
+
...Rn(t)
|
|
583
583
|
};
|
|
584
584
|
if (st(t)) {
|
|
585
585
|
const e = {
|
|
586
586
|
type: t.type,
|
|
587
|
-
target:
|
|
588
|
-
currentTarget:
|
|
589
|
-
...
|
|
587
|
+
target: xn(t.target),
|
|
588
|
+
currentTarget: xn(t.currentTarget),
|
|
589
|
+
...Rn(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 xn(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 Rn(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 xn(t) {
|
|
|
609
609
|
return {};
|
|
610
610
|
}
|
|
611
611
|
function li(t) {
|
|
612
|
-
const e = Object.keys(
|
|
612
|
+
const e = Object.keys(Pr(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 = R;
|
|
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 = R;
|
|
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 P(t = ui()) {
|
|
660
660
|
try {
|
|
661
661
|
if (t?.randomUUID)
|
|
662
662
|
return it(() => t.randomUUID()).replace(/-/g, "");
|
|
@@ -670,14 +670,14 @@ function L(t = ui()) {
|
|
|
670
670
|
)
|
|
671
671
|
);
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function Lr(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 = Lr(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 = Lr(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 } = R;
|
|
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: P(),
|
|
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 : P()), 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 P();
|
|
788
788
|
}
|
|
789
789
|
function Fr() {
|
|
790
|
-
return
|
|
790
|
+
return P().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 || P();
|
|
1172
1172
|
if (!this._client)
|
|
1173
|
-
return
|
|
1173
|
+
return _ && 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 || P();
|
|
1193
1193
|
if (!this._client)
|
|
1194
|
-
return
|
|
1194
|
+
return _ && 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 || P();
|
|
1215
|
+
return this._client ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) : (_ && 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 xi() {
|
|
1313
1313
|
return {
|
|
1314
1314
|
withIsolationScope: An,
|
|
1315
1315
|
withScope: Si,
|
|
@@ -1321,7 +1321,7 @@ function Ri() {
|
|
|
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 : xi();
|
|
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 Ri() {
|
|
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, Pi = "_sentryScope", Li = "_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[Pi],
|
|
1371
|
+
isolationScope: Mi(e[Li])
|
|
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 (!_)
|
|
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" ? Pn(t) : Array.isArray(t) ? t[0] + t[1] / 1e9 : t instanceof Date ? Pn(t.getTime()) : V();
|
|
1497
1497
|
}
|
|
1498
|
-
function
|
|
1498
|
+
function Pn(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 Ln() {
|
|
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 _ && 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 _ && 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 = Pr(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(R);
|
|
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 xo(t, e) {
|
|
1833
1833
|
if (!e)
|
|
1834
1834
|
return t;
|
|
1835
1835
|
const n = t.sdk || {};
|
|
@@ -1845,7 +1845,7 @@ function Ro(t, e) {
|
|
|
1845
1845
|
} : void 0
|
|
1846
1846
|
}, t;
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function Ro(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 xo(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
|
+
xo(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 _ && 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 = R._sentryDebugIds, n = R._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 = Ri().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 || P(),
|
|
2065
2065
|
timestamp: e.timestamp || Ne()
|
|
2066
2066
|
}, l = n.integrations || t.integrations.map((N) => N.name);
|
|
2067
|
-
|
|
2067
|
+
Po(c, t), Fo(c, l), s && s.emit("applyFrameMetadata", e), e.type === void 0 && Lo(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 Po(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 Lo(t, e) {
|
|
|
2084
2084
|
a.value && (a.value = wt(a.value, i));
|
|
2085
2085
|
});
|
|
2086
2086
|
}
|
|
2087
|
-
function
|
|
2087
|
+
function Lo(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 } = R.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
|
+
_ && 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
|
+
_ && 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
|
+
_ && 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 ? (_ && 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) : (_ && 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"), _ && 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 _ && 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) : _ && 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 = P();
|
|
2591
2591
|
if (Tn(e))
|
|
2592
|
-
return
|
|
2592
|
+
return _ && 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: P(),
|
|
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 = P();
|
|
2624
2624
|
if (n?.originalException && Tn(n.originalException))
|
|
2625
|
-
return
|
|
2625
|
+
return _ && 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
|
+
_ && 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
|
+
_ && 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 = Ro(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
|
+
_ && 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 _ && m.error("Error while sending envelope:", n), {};
|
|
2825
2825
|
}
|
|
2826
|
-
return
|
|
2826
|
+
return _ && 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 _ && 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
|
+
_ && (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
|
+
_ && m.log("Flushing outcomes...");
|
|
3022
3022
|
const e = this._clearOutcomes();
|
|
3023
3023
|
if (e.length === 0) {
|
|
3024
|
-
|
|
3024
|
+
_ && m.log("No outcomes to send");
|
|
3025
3025
|
return;
|
|
3026
3026
|
}
|
|
3027
3027
|
if (!this._dsn) {
|
|
3028
|
-
|
|
3028
|
+
_ && m.log("No dsn provided, will not send outcomes");
|
|
3029
3029
|
return;
|
|
3030
3030
|
}
|
|
3031
|
-
|
|
3031
|
+
_ && 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)) : Ln();
|
|
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) : (Ln(), 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 xa(t, e) {
|
|
3135
|
+
e.debug === !0 && (_ ? 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 Ra(r), r.init(), r;
|
|
3140
3140
|
}
|
|
3141
|
-
function
|
|
3141
|
+
function Ra(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 La(n, e) ? null : n;
|
|
3246
3246
|
}
|
|
3247
3247
|
};
|
|
3248
|
-
},
|
|
3248
|
+
}, Pa = ((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 La(t, e) {
|
|
3265
3265
|
if (t.type) {
|
|
3266
3266
|
if (t.type === "transaction" && Fa(t, e.ignoreTransactions))
|
|
3267
|
-
return
|
|
3267
|
+
return _ && 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 _ && 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 _ && 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 _ && 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 _ && 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 _ && 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 R && js.forEach(function(t) {
|
|
3425
|
+
t in R.console && $(R.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(R.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 _ && 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 = R;
|
|
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 Pt(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 (Pt(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 = Pt(n.contentWindow.fetch)), e.head.removeChild(n);
|
|
3533
3533
|
} catch (n) {
|
|
3534
|
-
|
|
3534
|
+
_ && 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() || $(R, "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(R, 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 = R;
|
|
3622
|
+
let Lt = 0;
|
|
3623
3623
|
function fs() {
|
|
3624
|
-
return
|
|
3624
|
+
return Lt > 0;
|
|
3625
3625
|
}
|
|
3626
3626
|
function uc() {
|
|
3627
|
-
|
|
3628
|
-
|
|
3627
|
+
Lt++, setTimeout(() => {
|
|
3628
|
+
Lt--;
|
|
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 xc 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 = Rc(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 Rc extends _a {
|
|
|
3857
3857
|
return e.platform = e.platform || "javascript", super._prepareEvent(e, n, r, s);
|
|
3858
3858
|
}
|
|
3859
3859
|
}
|
|
3860
|
-
function
|
|
3860
|
+
function Rc(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 xc(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 = R, 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", P());
|
|
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 Le;
|
|
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 = Le;
|
|
3954
|
+
if (Le = 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 = Le, i = Oc(String(r));
|
|
3964
|
+
if (Le = 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 (Pt(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 Pc(t) {
|
|
4001
4001
|
Ge[t] = void 0;
|
|
4002
4002
|
}
|
|
4003
|
-
const
|
|
4004
|
-
function
|
|
4003
|
+
const Re = "__sentry_xhr_v3__";
|
|
4004
|
+
function Lc(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[Re] = {
|
|
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[Re];
|
|
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[Re];
|
|
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[Re];
|
|
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 Pc("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 && Lc(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[Re];
|
|
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 = Rl();
|
|
4502
4502
|
e && (t.contexts = {
|
|
4503
4503
|
...t.contexts,
|
|
4504
4504
|
culture: { ...e, ...t.contexts?.culture }
|
|
4505
4505
|
});
|
|
4506
4506
|
}
|
|
4507
|
-
})),
|
|
4508
|
-
function
|
|
4507
|
+
})), xl = kl;
|
|
4508
|
+
function Rl() {
|
|
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
|
+
}), Pl = "cause", Ll = 5, Ml = "LinkedErrors", Fl = ((t = {}) => {
|
|
4638
|
+
const e = t.limit || Ll, n = t.key || Pl;
|
|
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
|
+
Pa(),
|
|
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
|
+
xl(),
|
|
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 xa(xc, 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 y = {
|
|
4741
4741
|
AUDIO_ERROR: 1001,
|
|
4742
4742
|
SUCCESS: 200,
|
|
4743
4743
|
TXN_ERROR: 1003,
|
|
@@ -4746,35 +4746,35 @@ const _ = {
|
|
|
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 || {}), S = /* @__PURE__ */ ((t) => (t.MICROPHONE = "microphone", 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))(S || {}), 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 E(t, e) {
|
|
4751
4751
|
return t instanceof j ? t.status === 401 ? {
|
|
4752
|
-
error_code:
|
|
4753
|
-
status_code:
|
|
4752
|
+
error_code: S.UNAUTHORIZED,
|
|
4753
|
+
status_code: y.UNAUTHORIZED,
|
|
4754
4754
|
message: "Authentication failed. Token may be expired."
|
|
4755
4755
|
} : t.status === 403 ? {
|
|
4756
|
-
error_code:
|
|
4757
|
-
status_code:
|
|
4756
|
+
error_code: S.FORBIDDEN,
|
|
4757
|
+
status_code: y.FORBIDDEN,
|
|
4758
4758
|
message: "Access forbidden."
|
|
4759
4759
|
} : t.status === 408 ? {
|
|
4760
|
-
error_code:
|
|
4760
|
+
error_code: S.NETWORK_ERROR,
|
|
4761
4761
|
status_code: t.status,
|
|
4762
4762
|
message: `${e} Request timed out.`
|
|
4763
4763
|
} : {
|
|
4764
|
-
error_code:
|
|
4764
|
+
error_code: S.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: S.NETWORK_ERROR,
|
|
4769
|
+
status_code: y.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: S.NETWORK_ERROR,
|
|
4773
|
+
status_code: y.INTERNAL_SERVER_ERROR,
|
|
4774
4774
|
message: `${e} Network error.`
|
|
4775
4775
|
} : {
|
|
4776
|
-
error_code:
|
|
4777
|
-
status_code:
|
|
4776
|
+
error_code: S.INTERNAL_SERVER_ERROR,
|
|
4777
|
+
status_code: y.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: E(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 = E(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 = E(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 = E(n, "Failed to delete template,");
|
|
4844
4844
|
return { status_code: r.status_code, msg: r.message };
|
|
4845
4845
|
}
|
|
4846
4846
|
}
|
|
@@ -4850,12 +4850,11 @@ class Jl {
|
|
|
4850
4850
|
method: "POST",
|
|
4851
4851
|
url: `${this.hosts.cookV1}/medai/ai-create-template`,
|
|
4852
4852
|
body: e,
|
|
4853
|
-
headers: { "Content-Type": "multipart/form-data" },
|
|
4854
4853
|
timeout: 6e4
|
|
4855
4854
|
});
|
|
4856
4855
|
return { ...n.data, status_code: n.status };
|
|
4857
4856
|
} catch (n) {
|
|
4858
|
-
const r =
|
|
4857
|
+
const r = E(n, "Failed to AI generate template,");
|
|
4859
4858
|
return {
|
|
4860
4859
|
status_code: r.status_code,
|
|
4861
4860
|
message: r.message
|
|
@@ -4887,7 +4886,7 @@ class Jl {
|
|
|
4887
4886
|
});
|
|
4888
4887
|
return { ...i.data, status_code: i.status };
|
|
4889
4888
|
} catch (i) {
|
|
4890
|
-
const o =
|
|
4889
|
+
const o = E(i, "Failed to convert transcription to template,");
|
|
4891
4890
|
return {
|
|
4892
4891
|
status_code: o.status_code,
|
|
4893
4892
|
message: o.message
|
|
@@ -4903,7 +4902,7 @@ class Jl {
|
|
|
4903
4902
|
});
|
|
4904
4903
|
return { ...e.data, status_code: e.status };
|
|
4905
4904
|
} catch (e) {
|
|
4906
|
-
return { status_code:
|
|
4905
|
+
return { status_code: E(e, "Failed to fetch template sections,").status_code, items: [] };
|
|
4907
4906
|
}
|
|
4908
4907
|
}
|
|
4909
4908
|
async createTemplateSection({
|
|
@@ -4920,7 +4919,7 @@ class Jl {
|
|
|
4920
4919
|
});
|
|
4921
4920
|
return { ...i.data, status_code: i.status };
|
|
4922
4921
|
} catch (i) {
|
|
4923
|
-
const o =
|
|
4922
|
+
const o = E(i, "Failed to create template section,");
|
|
4924
4923
|
return {
|
|
4925
4924
|
status_code: o.status_code,
|
|
4926
4925
|
msg: o.message,
|
|
@@ -4943,7 +4942,7 @@ class Jl {
|
|
|
4943
4942
|
});
|
|
4944
4943
|
return { ...o.data, status_code: o.status };
|
|
4945
4944
|
} catch (o) {
|
|
4946
|
-
const a =
|
|
4945
|
+
const a = E(o, "Failed to update template section,");
|
|
4947
4946
|
return {
|
|
4948
4947
|
status_code: a.status_code,
|
|
4949
4948
|
msg: a.message,
|
|
@@ -4960,7 +4959,7 @@ class Jl {
|
|
|
4960
4959
|
});
|
|
4961
4960
|
return { ...n.data, status_code: n.status };
|
|
4962
4961
|
} catch (n) {
|
|
4963
|
-
const r =
|
|
4962
|
+
const r = E(n, "Failed to delete template section,");
|
|
4964
4963
|
return {
|
|
4965
4964
|
status_code: r.status_code,
|
|
4966
4965
|
msg: r.message
|
|
@@ -4979,7 +4978,7 @@ class Jl {
|
|
|
4979
4978
|
});
|
|
4980
4979
|
return { ...s.data, status_code: s.status };
|
|
4981
4980
|
} catch (r) {
|
|
4982
|
-
return { status_code:
|
|
4981
|
+
return { status_code: E(r, "Failed to fetch document,").status_code };
|
|
4983
4982
|
}
|
|
4984
4983
|
}
|
|
4985
4984
|
async createDocument({
|
|
@@ -5003,7 +5002,7 @@ class Jl {
|
|
|
5003
5002
|
});
|
|
5004
5003
|
return { ...o.data, status_code: o.status };
|
|
5005
5004
|
} catch (o) {
|
|
5006
|
-
const a =
|
|
5005
|
+
const a = E(o, "Failed to create document,");
|
|
5007
5006
|
return {
|
|
5008
5007
|
status_code: a.status_code,
|
|
5009
5008
|
message: a.message
|
|
@@ -5034,7 +5033,7 @@ class Jl {
|
|
|
5034
5033
|
});
|
|
5035
5034
|
return { ...c.data, status_code: c.status };
|
|
5036
5035
|
} catch (c) {
|
|
5037
|
-
const l =
|
|
5036
|
+
const l = E(c, "Failed to update document,");
|
|
5038
5037
|
return {
|
|
5039
5038
|
status_code: l.status_code,
|
|
5040
5039
|
message: l.message
|
|
@@ -5049,7 +5048,7 @@ class Jl {
|
|
|
5049
5048
|
});
|
|
5050
5049
|
return { ...n.data, status_code: n.status };
|
|
5051
5050
|
} catch (n) {
|
|
5052
|
-
const r =
|
|
5051
|
+
const r = E(n, "Failed to delete document,");
|
|
5053
5052
|
return {
|
|
5054
5053
|
status_code: r.status_code,
|
|
5055
5054
|
message: r.message
|
|
@@ -5068,7 +5067,7 @@ class Jl {
|
|
|
5068
5067
|
});
|
|
5069
5068
|
return { ...r.data, status_code: r.status };
|
|
5070
5069
|
} catch (r) {
|
|
5071
|
-
const s =
|
|
5070
|
+
const s = E(r, "Failed to publish document,");
|
|
5072
5071
|
return {
|
|
5073
5072
|
status_code: s.status_code,
|
|
5074
5073
|
message: s.message
|
|
@@ -5097,7 +5096,7 @@ class Ql {
|
|
|
5097
5096
|
message: `Past ${e} transactions fetched successfully.`
|
|
5098
5097
|
};
|
|
5099
5098
|
} catch (r) {
|
|
5100
|
-
const s =
|
|
5099
|
+
const s = E(r, "Failed to fetch transactions,");
|
|
5101
5100
|
return { status_code: s.status_code, message: s.message };
|
|
5102
5101
|
}
|
|
5103
5102
|
}
|
|
@@ -5109,7 +5108,7 @@ class Ql {
|
|
|
5109
5108
|
});
|
|
5110
5109
|
return { ...n.data, status_code: n.status };
|
|
5111
5110
|
} catch (n) {
|
|
5112
|
-
const r =
|
|
5111
|
+
const r = E(n, "Failed to delete transaction,");
|
|
5113
5112
|
return { status_code: r.status_code, message: r.message };
|
|
5114
5113
|
}
|
|
5115
5114
|
}
|
|
@@ -5127,7 +5126,7 @@ class Ql {
|
|
|
5127
5126
|
});
|
|
5128
5127
|
return { ...r.data, status_code: r.status };
|
|
5129
5128
|
} catch (r) {
|
|
5130
|
-
const s =
|
|
5129
|
+
const s = E(r, "Failed to fetch session details,");
|
|
5131
5130
|
return {
|
|
5132
5131
|
status_code: s.status_code,
|
|
5133
5132
|
message: s.message
|
|
@@ -5142,7 +5141,7 @@ class Ql {
|
|
|
5142
5141
|
});
|
|
5143
5142
|
return { ...n.data, status_code: n.status };
|
|
5144
5143
|
} catch (n) {
|
|
5145
|
-
const r =
|
|
5144
|
+
const r = E(n, "Failed to fetch suggested medications,");
|
|
5146
5145
|
return {
|
|
5147
5146
|
status_code: r.status_code,
|
|
5148
5147
|
message: r.message
|
|
@@ -5161,7 +5160,7 @@ class Ql {
|
|
|
5161
5160
|
});
|
|
5162
5161
|
return { ...r.data, status_code: r.status };
|
|
5163
5162
|
} catch (r) {
|
|
5164
|
-
const s =
|
|
5163
|
+
const s = E(r, "Failed to add session context,");
|
|
5165
5164
|
return {
|
|
5166
5165
|
status_code: s.status_code,
|
|
5167
5166
|
message: s.message
|
|
@@ -5180,7 +5179,7 @@ class Ql {
|
|
|
5180
5179
|
});
|
|
5181
5180
|
return { ...r.data, status_code: r.status };
|
|
5182
5181
|
} catch (r) {
|
|
5183
|
-
const s =
|
|
5182
|
+
const s = E(r, "Failed to remove session context,");
|
|
5184
5183
|
return {
|
|
5185
5184
|
status_code: s.status_code,
|
|
5186
5185
|
message: s.message
|
|
@@ -5201,7 +5200,7 @@ class Ql {
|
|
|
5201
5200
|
});
|
|
5202
5201
|
return { ...r.data, status_code: r.status };
|
|
5203
5202
|
} catch (r) {
|
|
5204
|
-
const s =
|
|
5203
|
+
const s = E(r, "Failed to update result summary,");
|
|
5205
5204
|
return {
|
|
5206
5205
|
status_code: s.status_code,
|
|
5207
5206
|
message: s.message
|
|
@@ -5217,7 +5216,7 @@ class Ql {
|
|
|
5217
5216
|
});
|
|
5218
5217
|
return { ...e.data, status_code: e.status };
|
|
5219
5218
|
} catch (e) {
|
|
5220
|
-
const n =
|
|
5219
|
+
const n = E(e, "Failed to fetch configurations,");
|
|
5221
5220
|
return { status_code: n.status_code, message: n.message };
|
|
5222
5221
|
}
|
|
5223
5222
|
}
|
|
@@ -5229,7 +5228,7 @@ class Ql {
|
|
|
5229
5228
|
});
|
|
5230
5229
|
return { ...e.data, status_code: e.status };
|
|
5231
5230
|
} catch (e) {
|
|
5232
|
-
const n =
|
|
5231
|
+
const n = E(e, "Failed to fetch configurations,");
|
|
5233
5232
|
return { status_code: n.status_code, message: n.message };
|
|
5234
5233
|
}
|
|
5235
5234
|
}
|
|
@@ -5242,7 +5241,7 @@ class Ql {
|
|
|
5242
5241
|
});
|
|
5243
5242
|
return { ...r.data, status_code: r.status };
|
|
5244
5243
|
} catch (n) {
|
|
5245
|
-
const r =
|
|
5244
|
+
const r = E(n, "Failed to update config,");
|
|
5246
5245
|
return {
|
|
5247
5246
|
status_code: r.status_code,
|
|
5248
5247
|
msg: r.message
|
|
@@ -5291,7 +5290,7 @@ class Ql {
|
|
|
5291
5290
|
status_code: r.status
|
|
5292
5291
|
};
|
|
5293
5292
|
} catch (r) {
|
|
5294
|
-
const s =
|
|
5293
|
+
const s = E(r, "Failed to fetch doctor header/footer,");
|
|
5295
5294
|
return {
|
|
5296
5295
|
data: this.getDefaultHeaderFooterInfo(),
|
|
5297
5296
|
status_code: s.status_code,
|
|
@@ -5326,7 +5325,7 @@ class Ql {
|
|
|
5326
5325
|
status_code: n.status
|
|
5327
5326
|
};
|
|
5328
5327
|
} catch (n) {
|
|
5329
|
-
const r =
|
|
5328
|
+
const r = E(n, "Failed to fetch doctor clinics,");
|
|
5330
5329
|
return { data: null, status_code: r.status_code, message: r.message };
|
|
5331
5330
|
}
|
|
5332
5331
|
}
|
|
@@ -5436,20 +5435,20 @@ class eu {
|
|
|
5436
5435
|
);
|
|
5437
5436
|
return r.success ? (this.storedSession = r.data, this.txnID = r.data.session_id, this.tracker.setTransactionId(this.txnID), this.tracker.captureEvent("Session started", {
|
|
5438
5437
|
txn_id: this.txnID,
|
|
5439
|
-
status_code: r.httpStatus ??
|
|
5438
|
+
status_code: r.httpStatus ?? y.SUCCESS
|
|
5440
5439
|
}), {
|
|
5441
|
-
status_code: r.httpStatus ??
|
|
5440
|
+
status_code: r.httpStatus ?? y.SUCCESS,
|
|
5442
5441
|
message: "Transaction initialized successfully.",
|
|
5443
5442
|
txn_id: r.data.session_id
|
|
5444
5443
|
}) : {
|
|
5445
|
-
error_code: r.error.code === "txn_limit_exceeded" ?
|
|
5446
|
-
status_code: r.error.httpStatus ??
|
|
5444
|
+
error_code: r.error.code === "txn_limit_exceeded" ? S.TXN_LIMIT_EXCEEDED : S.TXN_INIT_FAILED,
|
|
5445
|
+
status_code: r.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
|
|
5447
5446
|
message: r.error.message || "Transaction initialization failed."
|
|
5448
5447
|
};
|
|
5449
5448
|
} catch (n) {
|
|
5450
5449
|
return {
|
|
5451
|
-
error_code:
|
|
5452
|
-
status_code:
|
|
5450
|
+
error_code: S.TXN_INIT_FAILED,
|
|
5451
|
+
status_code: y.INTERNAL_SERVER_ERROR,
|
|
5453
5452
|
message: `Failed to initialize transaction. ${n}`
|
|
5454
5453
|
};
|
|
5455
5454
|
}
|
|
@@ -5462,20 +5461,20 @@ class eu {
|
|
|
5462
5461
|
const n = await this.allianceClient.startRecording(e);
|
|
5463
5462
|
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
5463
|
txn_id: this.txnID,
|
|
5465
|
-
status_code: n.httpStatus ??
|
|
5464
|
+
status_code: n.httpStatus ?? y.SUCCESS
|
|
5466
5465
|
}), {
|
|
5467
|
-
status_code: n.httpStatus ??
|
|
5466
|
+
status_code: n.httpStatus ?? y.SUCCESS,
|
|
5468
5467
|
message: "Recording started successfully.",
|
|
5469
5468
|
txn_id: n.data.session_id
|
|
5470
5469
|
}) : {
|
|
5471
|
-
error_code: n.error.code === "txn_limit_exceeded" ?
|
|
5472
|
-
status_code: n.error.httpStatus ??
|
|
5470
|
+
error_code: n.error.code === "txn_limit_exceeded" ? S.TXN_LIMIT_EXCEEDED : S.TXN_INIT_FAILED,
|
|
5471
|
+
status_code: n.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
|
|
5473
5472
|
message: n.error.message || "Failed to start recording."
|
|
5474
5473
|
};
|
|
5475
5474
|
} catch (n) {
|
|
5476
5475
|
return {
|
|
5477
|
-
error_code:
|
|
5478
|
-
status_code:
|
|
5476
|
+
error_code: S.INTERNAL_SERVER_ERROR,
|
|
5477
|
+
status_code: y.INTERNAL_SERVER_ERROR,
|
|
5479
5478
|
message: `Failed to start recording. ${n}`
|
|
5480
5479
|
};
|
|
5481
5480
|
}
|
|
@@ -5485,11 +5484,10 @@ class eu {
|
|
|
5485
5484
|
try {
|
|
5486
5485
|
if (!this.storedSession)
|
|
5487
5486
|
return {
|
|
5488
|
-
error_code:
|
|
5489
|
-
status_code:
|
|
5487
|
+
error_code: S.TXN_STATUS_MISMATCH,
|
|
5488
|
+
status_code: y.TXN_ERROR,
|
|
5490
5489
|
message: "Transaction not initialized. Call initTransaction() first."
|
|
5491
5490
|
};
|
|
5492
|
-
this.allianceClient.clearRecordingState();
|
|
5493
5491
|
const n = await this.allianceClient.startRecordingWithSession(
|
|
5494
5492
|
this.storedSession,
|
|
5495
5493
|
{
|
|
@@ -5498,18 +5496,18 @@ class eu {
|
|
|
5498
5496
|
}
|
|
5499
5497
|
);
|
|
5500
5498
|
return n.success ? {
|
|
5501
|
-
status_code: n.httpStatus ??
|
|
5499
|
+
status_code: n.httpStatus ?? y.SUCCESS,
|
|
5502
5500
|
message: "Recording started successfully.",
|
|
5503
5501
|
txn_id: this.txnID
|
|
5504
5502
|
} : {
|
|
5505
|
-
error_code:
|
|
5506
|
-
status_code: n.error.httpStatus ??
|
|
5503
|
+
error_code: S.MICROPHONE,
|
|
5504
|
+
status_code: n.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
|
|
5507
5505
|
message: n.error.message || "Failed to start recording."
|
|
5508
5506
|
};
|
|
5509
5507
|
} catch (n) {
|
|
5510
5508
|
return {
|
|
5511
|
-
error_code:
|
|
5512
|
-
status_code:
|
|
5509
|
+
error_code: S.INTERNAL_SERVER_ERROR,
|
|
5510
|
+
status_code: y.INTERNAL_SERVER_ERROR,
|
|
5513
5511
|
message: `Failed to start recording. ${n}`
|
|
5514
5512
|
};
|
|
5515
5513
|
}
|
|
@@ -5531,18 +5529,18 @@ class eu {
|
|
|
5531
5529
|
}
|
|
5532
5530
|
);
|
|
5533
5531
|
return r.success ? (this.storedSession = n, this.txnID = e.txn_id, this.tracker.setTransactionId(this.txnID), {
|
|
5534
|
-
status_code: r.httpStatus ??
|
|
5532
|
+
status_code: r.httpStatus ?? y.SUCCESS,
|
|
5535
5533
|
message: "Recording started for existing session.",
|
|
5536
5534
|
txn_id: this.txnID
|
|
5537
5535
|
}) : {
|
|
5538
|
-
error_code:
|
|
5539
|
-
status_code: r.error.httpStatus ??
|
|
5536
|
+
error_code: S.MICROPHONE,
|
|
5537
|
+
status_code: r.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
|
|
5540
5538
|
message: r.error.message || "Failed to start recording for existing session."
|
|
5541
5539
|
};
|
|
5542
5540
|
} catch (n) {
|
|
5543
5541
|
return {
|
|
5544
|
-
error_code:
|
|
5545
|
-
status_code:
|
|
5542
|
+
error_code: S.INTERNAL_SERVER_ERROR,
|
|
5543
|
+
status_code: y.INTERNAL_SERVER_ERROR,
|
|
5546
5544
|
message: `Failed to start recording for existing session. ${n}`
|
|
5547
5545
|
};
|
|
5548
5546
|
}
|
|
@@ -5550,14 +5548,14 @@ class eu {
|
|
|
5550
5548
|
pauseRecording() {
|
|
5551
5549
|
try {
|
|
5552
5550
|
return this.allianceClient.pauseRecording(), {
|
|
5553
|
-
status_code:
|
|
5551
|
+
status_code: y.SUCCESS,
|
|
5554
5552
|
message: "Recording paused.",
|
|
5555
5553
|
is_paused: !0
|
|
5556
5554
|
};
|
|
5557
5555
|
} catch (e) {
|
|
5558
5556
|
return {
|
|
5559
|
-
error_code:
|
|
5560
|
-
status_code:
|
|
5557
|
+
error_code: S.INTERNAL_SERVER_ERROR,
|
|
5558
|
+
status_code: y.INTERNAL_SERVER_ERROR,
|
|
5561
5559
|
message: `Failed to pause recording. ${e}`
|
|
5562
5560
|
};
|
|
5563
5561
|
}
|
|
@@ -5565,14 +5563,14 @@ class eu {
|
|
|
5565
5563
|
resumeRecording() {
|
|
5566
5564
|
try {
|
|
5567
5565
|
return this.allianceClient.resumeRecording(), {
|
|
5568
|
-
status_code:
|
|
5566
|
+
status_code: y.SUCCESS,
|
|
5569
5567
|
message: "Recording resumed.",
|
|
5570
5568
|
is_paused: !1
|
|
5571
5569
|
};
|
|
5572
5570
|
} catch (e) {
|
|
5573
5571
|
return {
|
|
5574
|
-
error_code:
|
|
5575
|
-
status_code:
|
|
5572
|
+
error_code: S.INTERNAL_SERVER_ERROR,
|
|
5573
|
+
status_code: y.INTERNAL_SERVER_ERROR,
|
|
5576
5574
|
message: `Failed to resume recording. ${e}`
|
|
5577
5575
|
};
|
|
5578
5576
|
}
|
|
@@ -5586,27 +5584,27 @@ class eu {
|
|
|
5586
5584
|
total_files: e.data.totalFiles,
|
|
5587
5585
|
failed_files: e.data.failedUploads.length
|
|
5588
5586
|
}), this.storedSession = null, e.data.failedUploads.length > 0 ? {
|
|
5589
|
-
error_code:
|
|
5590
|
-
status_code: e.httpStatus ??
|
|
5587
|
+
error_code: S.AUDIO_UPLOAD_FAILED,
|
|
5588
|
+
status_code: e.httpStatus ?? y.AUDIO_ERROR,
|
|
5591
5589
|
message: `Recording ended but ${e.data.failedUploads.length} audio file(s) failed to upload.`,
|
|
5592
5590
|
failed_files: e.data.failedUploads,
|
|
5593
5591
|
total_audio_files: e.data.endSessionResponse?.audio_files
|
|
5594
5592
|
} : {
|
|
5595
|
-
status_code: e.httpStatus ??
|
|
5593
|
+
status_code: e.httpStatus ?? y.SUCCESS,
|
|
5596
5594
|
message: "Recording ended successfully.",
|
|
5597
5595
|
total_audio_files: e.data.endSessionResponse?.audio_files
|
|
5598
5596
|
}) : (this.tracker.captureEvent("Session end failed", {
|
|
5599
5597
|
txn_id: this.txnID,
|
|
5600
5598
|
error: e.error.message
|
|
5601
5599
|
}), {
|
|
5602
|
-
error_code:
|
|
5603
|
-
status_code: e.error.httpStatus ??
|
|
5600
|
+
error_code: S.END_RECORDING_FAILED,
|
|
5601
|
+
status_code: e.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
|
|
5604
5602
|
message: e.error.message || "Failed to end recording."
|
|
5605
5603
|
});
|
|
5606
5604
|
} catch (e) {
|
|
5607
5605
|
return {
|
|
5608
|
-
error_code:
|
|
5609
|
-
status_code:
|
|
5606
|
+
error_code: S.INTERNAL_SERVER_ERROR,
|
|
5607
|
+
status_code: y.INTERNAL_SERVER_ERROR,
|
|
5610
5608
|
message: `Failed to end recording. ${e}`
|
|
5611
5609
|
};
|
|
5612
5610
|
}
|
|
@@ -5616,34 +5614,34 @@ class eu {
|
|
|
5616
5614
|
if (!r)
|
|
5617
5615
|
return {
|
|
5618
5616
|
success: !1,
|
|
5619
|
-
status_code:
|
|
5617
|
+
status_code: y.TXN_ERROR,
|
|
5620
5618
|
error: new mn(
|
|
5621
5619
|
"No session ID available. Call initTransaction() first or pass a sessionId.",
|
|
5622
|
-
|
|
5620
|
+
S.TXN_STATUS_MISMATCH
|
|
5623
5621
|
)
|
|
5624
5622
|
};
|
|
5625
5623
|
const s = await this.allianceClient.getSessionStatus(r, n);
|
|
5626
5624
|
return {
|
|
5627
5625
|
...s,
|
|
5628
|
-
status_code: s.success ? s.httpStatus ??
|
|
5626
|
+
status_code: s.success ? s.httpStatus ?? y.SUCCESS : s.error.httpStatus ?? y.INTERNAL_SERVER_ERROR
|
|
5629
5627
|
};
|
|
5630
5628
|
}
|
|
5631
5629
|
async retryUploadRecording() {
|
|
5632
5630
|
try {
|
|
5633
5631
|
const e = await this.allianceClient.retryFailedUploads();
|
|
5634
5632
|
return e.success ? {
|
|
5635
|
-
status_code: e.httpStatus ??
|
|
5633
|
+
status_code: e.httpStatus ?? y.SUCCESS,
|
|
5636
5634
|
message: `Retried ${e.data.retried} files. ${e.data.succeeded} succeeded.`,
|
|
5637
5635
|
failed_files: e.data.stillFailed
|
|
5638
5636
|
} : {
|
|
5639
|
-
error_code:
|
|
5640
|
-
status_code: e.error.httpStatus ??
|
|
5637
|
+
error_code: S.AUDIO_UPLOAD_FAILED,
|
|
5638
|
+
status_code: e.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
|
|
5641
5639
|
message: e.error.message || "Retry upload failed."
|
|
5642
5640
|
};
|
|
5643
5641
|
} catch (e) {
|
|
5644
5642
|
return {
|
|
5645
|
-
error_code:
|
|
5646
|
-
status_code:
|
|
5643
|
+
error_code: S.INTERNAL_SERVER_ERROR,
|
|
5644
|
+
status_code: y.INTERNAL_SERVER_ERROR,
|
|
5647
5645
|
message: `Failed to retry upload. ${e}`
|
|
5648
5646
|
};
|
|
5649
5647
|
}
|
|
@@ -5653,38 +5651,43 @@ class eu {
|
|
|
5653
5651
|
if (!n)
|
|
5654
5652
|
return {
|
|
5655
5653
|
success: !1,
|
|
5656
|
-
status_code:
|
|
5654
|
+
status_code: y.TXN_ERROR,
|
|
5657
5655
|
error: new mn(
|
|
5658
5656
|
"No session ID available. Call initTransaction() first or pass a sessionId.",
|
|
5659
|
-
|
|
5657
|
+
S.TXN_STATUS_MISMATCH
|
|
5660
5658
|
)
|
|
5661
5659
|
};
|
|
5662
5660
|
const r = await this.allianceClient.cancelSession(n);
|
|
5663
5661
|
return this.storedSession = null, this.txnID = "", {
|
|
5664
5662
|
...r,
|
|
5665
|
-
status_code: r.success ? r.httpStatus ??
|
|
5663
|
+
status_code: r.success ? r.httpStatus ?? y.SUCCESS : r.error.httpStatus ?? y.INTERNAL_SERVER_ERROR
|
|
5666
5664
|
};
|
|
5667
5665
|
}
|
|
5668
5666
|
async processPreRecordedAudio({
|
|
5669
|
-
|
|
5670
|
-
audioFile: n
|
|
5671
|
-
audioFileName: r = "audio_1.mp3"
|
|
5667
|
+
uploadUrl: e,
|
|
5668
|
+
audioFile: n
|
|
5672
5669
|
}) {
|
|
5673
5670
|
try {
|
|
5674
|
-
const s = await this.
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5671
|
+
const r = e.endsWith("/") ? `${e}audio_1.mp3` : `${e}/audio_1.mp3`, s = await this.transport.request({
|
|
5672
|
+
method: "POST",
|
|
5673
|
+
url: r,
|
|
5674
|
+
body: n,
|
|
5675
|
+
headers: { "Content-Type": "audio/mp3" }
|
|
5676
|
+
});
|
|
5677
|
+
return s.status < 200 || s.status >= 300 ? {
|
|
5678
|
+
error_code: S.AUDIO_UPLOAD_FAILED,
|
|
5679
|
+
status_code: s.status,
|
|
5680
|
+
message: `Audio upload failed with status: ${s.status}`
|
|
5678
5681
|
} : {
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
message: s.error.message || "Audio upload failed."
|
|
5682
|
+
status_code: y.SUCCESS,
|
|
5683
|
+
message: "Audio file uploaded successfully."
|
|
5682
5684
|
};
|
|
5683
|
-
} catch (
|
|
5685
|
+
} catch (r) {
|
|
5686
|
+
const s = E(r, "Audio upload failed:");
|
|
5684
5687
|
return {
|
|
5685
|
-
error_code:
|
|
5686
|
-
status_code:
|
|
5687
|
-
message:
|
|
5688
|
+
error_code: s.error_code,
|
|
5689
|
+
status_code: s.status_code,
|
|
5690
|
+
message: s.message
|
|
5688
5691
|
};
|
|
5689
5692
|
}
|
|
5690
5693
|
}
|
|
@@ -5692,8 +5695,8 @@ class eu {
|
|
|
5692
5695
|
try {
|
|
5693
5696
|
if (!this.txnID)
|
|
5694
5697
|
return {
|
|
5695
|
-
error_code:
|
|
5696
|
-
status_code:
|
|
5698
|
+
error_code: S.TXN_STATUS_MISMATCH,
|
|
5699
|
+
status_code: y.TXN_ERROR,
|
|
5697
5700
|
message: "Transaction not initialized."
|
|
5698
5701
|
};
|
|
5699
5702
|
const e = await this.transport.request({
|
|
@@ -5702,15 +5705,15 @@ class eu {
|
|
|
5702
5705
|
body: { audio_files: [] }
|
|
5703
5706
|
});
|
|
5704
5707
|
return e.status !== 200 ? {
|
|
5705
|
-
error_code:
|
|
5708
|
+
error_code: S.TXN_COMMIT_FAILED,
|
|
5706
5709
|
status_code: e.status,
|
|
5707
5710
|
message: e.data.message || "Transaction commit failed."
|
|
5708
5711
|
} : {
|
|
5709
|
-
status_code:
|
|
5712
|
+
status_code: y.SUCCESS,
|
|
5710
5713
|
message: e.data.message || "Transaction committed successfully."
|
|
5711
5714
|
};
|
|
5712
5715
|
} catch (e) {
|
|
5713
|
-
const n =
|
|
5716
|
+
const n = E(e, "Failed to commit transaction,");
|
|
5714
5717
|
return {
|
|
5715
5718
|
error_code: n.error_code,
|
|
5716
5719
|
status_code: n.status_code,
|
|
@@ -5722,8 +5725,8 @@ class eu {
|
|
|
5722
5725
|
try {
|
|
5723
5726
|
if (!this.txnID)
|
|
5724
5727
|
return {
|
|
5725
|
-
error_code:
|
|
5726
|
-
status_code:
|
|
5728
|
+
error_code: S.TXN_STATUS_MISMATCH,
|
|
5729
|
+
status_code: y.TXN_ERROR,
|
|
5727
5730
|
message: "Transaction not initialized."
|
|
5728
5731
|
};
|
|
5729
5732
|
const e = await this.transport.request({
|
|
@@ -5736,7 +5739,7 @@ class eu {
|
|
|
5736
5739
|
message: e.data.message || "Transaction stopped."
|
|
5737
5740
|
};
|
|
5738
5741
|
} catch (e) {
|
|
5739
|
-
const n =
|
|
5742
|
+
const n = E(e, "Failed to stop transaction,");
|
|
5740
5743
|
return {
|
|
5741
5744
|
error_code: n.error_code,
|
|
5742
5745
|
status_code: n.status_code,
|
|
@@ -5790,7 +5793,7 @@ class ru {
|
|
|
5790
5793
|
try {
|
|
5791
5794
|
return await this.fetchV3Status(e);
|
|
5792
5795
|
} catch (n) {
|
|
5793
|
-
const r =
|
|
5796
|
+
const r = E(n, "Failed to fetch output templates,");
|
|
5794
5797
|
return { status_code: r.status_code, message: r.message };
|
|
5795
5798
|
}
|
|
5796
5799
|
}
|
|
@@ -5798,7 +5801,7 @@ class ru {
|
|
|
5798
5801
|
try {
|
|
5799
5802
|
return await this.fetchV3Status(e, "transcript=true", 15e3);
|
|
5800
5803
|
} catch (n) {
|
|
5801
|
-
const r =
|
|
5804
|
+
const r = E(n, "Failed to fetch output transcription,");
|
|
5802
5805
|
return { status_code: r.status_code, message: r.message };
|
|
5803
5806
|
}
|
|
5804
5807
|
}
|
|
@@ -5809,9 +5812,9 @@ class ru {
|
|
|
5809
5812
|
url: `${this.hosts.voiceV3}/transcript/${e}/${n}`,
|
|
5810
5813
|
timeout: 1e4
|
|
5811
5814
|
});
|
|
5812
|
-
return r.status >= 400 ? { success: !1, error: r.data?.error?.code ??
|
|
5815
|
+
return r.status >= 400 ? { success: !1, error: r.data?.error?.code ?? S.UNKNOWN_ERROR } : { success: !0, data: r.data };
|
|
5813
5816
|
} catch (r) {
|
|
5814
|
-
return { success: !1, error:
|
|
5817
|
+
return { success: !1, error: E(r, "Failed to fetch chunk transcript,").error_code };
|
|
5815
5818
|
}
|
|
5816
5819
|
}
|
|
5817
5820
|
async pollSessionOutput(e) {
|
|
@@ -5904,7 +5907,7 @@ class ru {
|
|
|
5904
5907
|
status_code: i.status
|
|
5905
5908
|
};
|
|
5906
5909
|
} catch (s) {
|
|
5907
|
-
const i =
|
|
5910
|
+
const i = E(s, "Failed to fetch status,");
|
|
5908
5911
|
return { status_code: i.status_code, message: i.message };
|
|
5909
5912
|
}
|
|
5910
5913
|
}
|
|
@@ -6226,7 +6229,7 @@ var ou = ((t = "") => {
|
|
|
6226
6229
|
return !1;
|
|
6227
6230
|
}
|
|
6228
6231
|
})(), 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} *[^
|
|
6229
|
-
]`).replace("lheading", Ss).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Eu = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, bu = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
|
|
6232
|
+
]`).replace("lheading", Ss).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Eu = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, bu = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, xs = /^( {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(), Rs = /(?!~)[\p{P}\p{S}]/u, xu = /(?!~)[\s\p{P}\p{S}]/u, Ru = /(?:[^\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, Rs).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, Ru).replace(/punctSpace/g, xu).replace(/punct/g, Rs).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(), Pu = 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(), Lu = 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", Lu).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: Pu, blockSkip: wu, br: xs, 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(xs).replace("{2,}", "*").getRegex(), text: b(Ht.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Ue = { normal: pn, gfm: _u, pedantic: yu }, xe = { normal: fn, gfm: Ht, breaks: Hu, pedantic: Bu }, zu = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, yr = (t) => zu[t];
|
|
6230
6233
|
function U(t, e) {
|
|
6231
6234
|
if (e) {
|
|
6232
6235
|
if (I.escapeTest.test(t)) return t.replace(I.escapeReplace, yr);
|
|
@@ -6621,7 +6624,7 @@ ${d}` : d;
|
|
|
6621
6624
|
return { type: "text", raw: e[0], text: e[0], escaped: n };
|
|
6622
6625
|
}
|
|
6623
6626
|
}
|
|
6624
|
-
},
|
|
6627
|
+
}, L = class zt {
|
|
6625
6628
|
constructor(e) {
|
|
6626
6629
|
w(this, "tokens");
|
|
6627
6630
|
w(this, "options");
|
|
@@ -6629,11 +6632,11 @@ ${d}` : d;
|
|
|
6629
6632
|
w(this, "inlineQueue");
|
|
6630
6633
|
w(this, "tokenizer");
|
|
6631
6634
|
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 };
|
|
6632
|
-
let n = { other: I, block: Ue.normal, inline:
|
|
6633
|
-
this.options.pedantic ? (n.block = Ue.pedantic, n.inline =
|
|
6635
|
+
let n = { other: I, block: Ue.normal, inline: xe.normal };
|
|
6636
|
+
this.options.pedantic ? (n.block = Ue.pedantic, n.inline = xe.pedantic) : this.options.gfm && (n.block = Ue.gfm, this.options.breaks ? n.inline = xe.breaks : n.inline = xe.gfm), this.tokenizer.rules = n;
|
|
6634
6637
|
}
|
|
6635
6638
|
static get rules() {
|
|
6636
|
-
return { block: Ue, inline:
|
|
6639
|
+
return { block: Ue, inline: xe };
|
|
6637
6640
|
}
|
|
6638
6641
|
static lex(e, n) {
|
|
6639
6642
|
return new zt(n).lex(e);
|
|
@@ -7158,7 +7161,7 @@ ${t}</tr>
|
|
|
7158
7161
|
return t;
|
|
7159
7162
|
}
|
|
7160
7163
|
provideLexer(t = this.block) {
|
|
7161
|
-
return t ?
|
|
7164
|
+
return t ? L.lex : L.lexInline;
|
|
7162
7165
|
}
|
|
7163
7166
|
provideParser(t = this.block) {
|
|
7164
7167
|
return t ? M.parse : M.parseInline;
|
|
@@ -7172,7 +7175,7 @@ ${t}</tr>
|
|
|
7172
7175
|
w(this, "Parser", M);
|
|
7173
7176
|
w(this, "Renderer", Qe);
|
|
7174
7177
|
w(this, "TextRenderer", gn);
|
|
7175
|
-
w(this, "Lexer",
|
|
7178
|
+
w(this, "Lexer", L);
|
|
7176
7179
|
w(this, "Tokenizer", Je);
|
|
7177
7180
|
w(this, "Hooks", we);
|
|
7178
7181
|
this.use(...t);
|
|
@@ -7284,7 +7287,7 @@ ${t}</tr>
|
|
|
7284
7287
|
return this.defaults = { ...this.defaults, ...t }, this;
|
|
7285
7288
|
}
|
|
7286
7289
|
lexer(t, e) {
|
|
7287
|
-
return
|
|
7290
|
+
return L.lex(t, e ?? this.defaults);
|
|
7288
7291
|
}
|
|
7289
7292
|
parser(t, e) {
|
|
7290
7293
|
return M.parse(t, e ?? this.defaults);
|
|
@@ -7296,14 +7299,14 @@ ${t}</tr>
|
|
|
7296
7299
|
if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
|
|
7297
7300
|
if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
7298
7301
|
if (s.hooks && (s.hooks.options = s, s.hooks.block = t), s.async) return (async () => {
|
|
7299
|
-
let o = s.hooks ? await s.hooks.preprocess(e) : e, a = await (s.hooks ? await s.hooks.provideLexer(t) : t ?
|
|
7302
|
+
let o = s.hooks ? await s.hooks.preprocess(e) : e, a = await (s.hooks ? await s.hooks.provideLexer(t) : t ? L.lex : L.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(a) : a;
|
|
7300
7303
|
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
7301
7304
|
let l = await (s.hooks ? await s.hooks.provideParser(t) : t ? M.parse : M.parseInline)(c, s);
|
|
7302
7305
|
return s.hooks ? await s.hooks.postprocess(l) : l;
|
|
7303
7306
|
})().catch(i);
|
|
7304
7307
|
try {
|
|
7305
7308
|
s.hooks && (e = s.hooks.preprocess(e));
|
|
7306
|
-
let o = (s.hooks ? s.hooks.provideLexer(t) : t ?
|
|
7309
|
+
let o = (s.hooks ? s.hooks.provideLexer(t) : t ? L.lex : L.lexInline)(e, s);
|
|
7307
7310
|
s.hooks && (o = s.hooks.processAllTokens(o)), s.walkTokens && this.walkTokens(o, s.walkTokens);
|
|
7308
7311
|
let a = (s.hooks ? s.hooks.provideParser(t) : t ? M.parse : M.parseInline)(o, s);
|
|
7309
7312
|
return s.hooks && (a = s.hooks.postprocess(a)), a;
|
|
@@ -7324,37 +7327,37 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
7324
7327
|
};
|
|
7325
7328
|
}
|
|
7326
7329
|
}, ie = new Gu();
|
|
7327
|
-
function
|
|
7330
|
+
function x(t, e) {
|
|
7328
7331
|
return ie.parse(t, e);
|
|
7329
7332
|
}
|
|
7330
|
-
|
|
7331
|
-
return ie.setOptions(t),
|
|
7333
|
+
x.options = x.setOptions = function(t) {
|
|
7334
|
+
return ie.setOptions(t), x.defaults = ie.defaults, Es(x.defaults), x;
|
|
7332
7335
|
};
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
return ie.use(...t),
|
|
7336
|
+
x.getDefaults = an;
|
|
7337
|
+
x.defaults = ce;
|
|
7338
|
+
x.use = function(...t) {
|
|
7339
|
+
return ie.use(...t), x.defaults = ie.defaults, Es(x.defaults), x;
|
|
7337
7340
|
};
|
|
7338
|
-
|
|
7341
|
+
x.walkTokens = function(t, e) {
|
|
7339
7342
|
return ie.walkTokens(t, e);
|
|
7340
7343
|
};
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7344
|
+
x.parseInline = ie.parseInline;
|
|
7345
|
+
x.Parser = M;
|
|
7346
|
+
x.parser = M.parse;
|
|
7347
|
+
x.Renderer = Qe;
|
|
7348
|
+
x.TextRenderer = gn;
|
|
7349
|
+
x.Lexer = L;
|
|
7350
|
+
x.lexer = L.lex;
|
|
7351
|
+
x.Tokenizer = Je;
|
|
7352
|
+
x.Hooks = we;
|
|
7353
|
+
x.parse = x;
|
|
7354
|
+
x.options;
|
|
7355
|
+
x.setOptions;
|
|
7356
|
+
x.use;
|
|
7357
|
+
x.walkTokens;
|
|
7358
|
+
x.parseInline;
|
|
7356
7359
|
M.parse;
|
|
7357
|
-
|
|
7360
|
+
L.lex;
|
|
7358
7361
|
var g = /* @__PURE__ */ ((t) => (t.COLLAPSED = "collapsed", t.RECORDING = "recording", t.PAUSED = "paused", t.PROCESSING = "processing", t.DONE = "done", t.ERROR = "error", t))(g || {});
|
|
7359
7362
|
const Wu = {
|
|
7360
7363
|
[g.COLLAPSED]: [g.RECORDING, g.ERROR],
|
|
@@ -7852,7 +7855,7 @@ function Zu(t, e) {
|
|
|
7852
7855
|
e.removeEventListener("mousedown", i), e.removeEventListener("touchstart", i), a();
|
|
7853
7856
|
};
|
|
7854
7857
|
}
|
|
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>',
|
|
7858
|
+
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>', xr = '<svg viewBox="0 0 24 24"><rect x="5" y="5" width="14" height="14" rx="2"/></svg>', Rr = '<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, xt = 3, Rt = 2;
|
|
7856
7859
|
class nd {
|
|
7857
7860
|
constructor(e, n, r, s) {
|
|
7858
7861
|
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" });
|
|
@@ -7900,7 +7903,7 @@ class nd {
|
|
|
7900
7903
|
i.className = "timer", i.textContent = e, n.appendChild(i);
|
|
7901
7904
|
const o = this.createButton("btn btn-play-pause", Ju);
|
|
7902
7905
|
o.addEventListener("click", this.actions.onPause), n.appendChild(o);
|
|
7903
|
-
const a = this.createButton("btn btn-stop",
|
|
7906
|
+
const a = this.createButton("btn btn-stop", xr);
|
|
7904
7907
|
a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n), this.startAnimation();
|
|
7905
7908
|
}
|
|
7906
7909
|
renderPaused(e) {
|
|
@@ -7914,7 +7917,7 @@ class nd {
|
|
|
7914
7917
|
i.className = "timer", i.textContent = e, n.appendChild(i);
|
|
7915
7918
|
const o = this.createButton("btn btn-play-pause", Qu);
|
|
7916
7919
|
o.addEventListener("click", this.actions.onResume), n.appendChild(o);
|
|
7917
|
-
const a = this.createButton("btn btn-stop",
|
|
7920
|
+
const a = this.createButton("btn btn-stop", xr);
|
|
7918
7921
|
a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n);
|
|
7919
7922
|
}
|
|
7920
7923
|
renderProcessing() {
|
|
@@ -7929,7 +7932,7 @@ class nd {
|
|
|
7929
7932
|
this.widgetEl.classList.remove("hidden"), this.contentEl.innerHTML = "";
|
|
7930
7933
|
const e = document.createElement("div");
|
|
7931
7934
|
e.className = "pill", e.innerHTML = `
|
|
7932
|
-
<div class="done-icon">${
|
|
7935
|
+
<div class="done-icon">${Rr}</div>
|
|
7933
7936
|
<span class="done-text">Notes ready</span>
|
|
7934
7937
|
`;
|
|
7935
7938
|
const n = document.createElement("button");
|
|
@@ -7951,7 +7954,7 @@ class nd {
|
|
|
7951
7954
|
this.stopAnimation(), this.widgetEl.classList.remove("hidden"), this.contentEl.innerHTML = "", this.contentEl.className = "content-expanded";
|
|
7952
7955
|
const n = document.createElement("div");
|
|
7953
7956
|
n.className = "pill", n.innerHTML = `
|
|
7954
|
-
<div class="done-icon">${
|
|
7957
|
+
<div class="done-icon">${Rr}</div>
|
|
7955
7958
|
<span class="done-text">Notes ready</span>
|
|
7956
7959
|
`;
|
|
7957
7960
|
const r = document.createElement("button");
|
|
@@ -7983,7 +7986,7 @@ class nd {
|
|
|
7983
7986
|
}
|
|
7984
7987
|
// ─── Waveform ─────────────────────────────────────────────────────────────
|
|
7985
7988
|
createWaveform() {
|
|
7986
|
-
const e = this.orientation === "vertical" ? td : ed, n = 28, r = e * (
|
|
7989
|
+
const e = this.orientation === "vertical" ? td : ed, n = 28, r = e * (xt + Rt) - Rt, s = n, i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
7987
7990
|
i.setAttribute("width", String(r)), i.setAttribute("height", String(s)), i.setAttribute("viewBox", `0 0 ${r} ${s}`);
|
|
7988
7991
|
const o = [], a = n * 0.4;
|
|
7989
7992
|
for (let c = 0; c < e; c++) {
|
|
@@ -7992,8 +7995,8 @@ class nd {
|
|
|
7992
7995
|
"rect"
|
|
7993
7996
|
);
|
|
7994
7997
|
l.setAttribute("fill", "#2563EB"), l.setAttribute("rx", "1.5");
|
|
7995
|
-
const d = c * (
|
|
7996
|
-
l.setAttribute("x", String(d)), l.setAttribute("y", String((n - a) / 2)), l.setAttribute("width", String(
|
|
7998
|
+
const d = c * (xt + Rt);
|
|
7999
|
+
l.setAttribute("x", String(d)), l.setAttribute("y", String((n - a) / 2)), l.setAttribute("width", String(xt)), l.setAttribute("height", String(a)), l.style.opacity = "0.35", i.appendChild(l), o.push(l);
|
|
7997
8000
|
}
|
|
7998
8001
|
return { svg: i, bars: o };
|
|
7999
8002
|
}
|
|
@@ -8186,7 +8189,7 @@ class rd {
|
|
|
8186
8189
|
}
|
|
8187
8190
|
if (s) {
|
|
8188
8191
|
const i = typeof s == "string" ? s : JSON.stringify(s, null, 2);
|
|
8189
|
-
r.notesHtml =
|
|
8192
|
+
r.notesHtml = x.parse(i);
|
|
8190
8193
|
}
|
|
8191
8194
|
}
|
|
8192
8195
|
return r;
|
|
@@ -8201,7 +8204,7 @@ const O = class O {
|
|
|
8201
8204
|
flavour: e.flavour,
|
|
8202
8205
|
onUnauthorized: () => this.handleUnauthorized()
|
|
8203
8206
|
};
|
|
8204
|
-
if (e.mode === "ipc" && e.ipcBridge ? this.transport = new Fs(n, e.ipcBridge) : this.transport = new
|
|
8207
|
+
if (e.mode === "ipc" && e.ipcBridge ? this.transport = new Fs(n, e.ipcBridge) : this.transport = new Ls(n), e.enableTracking && (this.tracker.init(e.env), e.flavour && this.tracker.setUser(e.flavour)), !e.allianceConfig?.baseUrl)
|
|
8205
8208
|
throw new Error("[EkaScribe] allianceConfig.baseUrl is required.");
|
|
8206
8209
|
this.allianceClient = new $s({
|
|
8207
8210
|
baseUrl: e.allianceConfig.baseUrl,
|
|
@@ -8284,7 +8287,7 @@ const O = class O {
|
|
|
8284
8287
|
*
|
|
8285
8288
|
* Client flow:
|
|
8286
8289
|
* 1. createSession() — via sessions.createSession()
|
|
8287
|
-
* 2. processPreRecordedAudio(
|
|
8290
|
+
* 2. processPreRecordedAudio(uploadUrl, audioFile, audioFileName) — this method
|
|
8288
8291
|
* 3. endSession — via sessions.endSession()
|
|
8289
8292
|
*/
|
|
8290
8293
|
processPreRecordedAudio(e) {
|
|
@@ -8359,7 +8362,7 @@ export {
|
|
|
8359
8362
|
Zl as CALLBACK_TYPE,
|
|
8360
8363
|
v as COMPATIBILITY_TEST_STATUS,
|
|
8361
8364
|
ee as COMPATIBILITY_TEST_TYPE,
|
|
8362
|
-
|
|
8365
|
+
S as ERROR_CODE,
|
|
8363
8366
|
Yl as PROCESSING_STATUS,
|
|
8364
8367
|
Kl as RESULT_STATUS,
|
|
8365
8368
|
Xl as TEMPLATE_ID,
|