iss-library-digital-video-v3 0.7.2 → 0.7.3
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.
|
@@ -9,11 +9,11 @@ const Pe = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a
|
|
|
9
9
|
function Ne(A) {
|
|
10
10
|
return typeof A == "string" && Pe.test(A);
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var F = [];
|
|
13
13
|
for (var RA = 0; RA < 256; ++RA)
|
|
14
|
-
|
|
14
|
+
F.push((RA + 256).toString(16).substr(1));
|
|
15
15
|
function Ve(A) {
|
|
16
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = (
|
|
16
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = (F[A[e + 0]] + F[A[e + 1]] + F[A[e + 2]] + F[A[e + 3]] + "-" + F[A[e + 4]] + F[A[e + 5]] + "-" + F[A[e + 6]] + F[A[e + 7]] + "-" + F[A[e + 8]] + F[A[e + 9]] + "-" + F[A[e + 10]] + F[A[e + 11]] + F[A[e + 12]] + F[A[e + 13]] + F[A[e + 14]] + F[A[e + 15]]).toLowerCase();
|
|
17
17
|
if (!Ne(t))
|
|
18
18
|
throw TypeError("Stringified UUID is invalid");
|
|
19
19
|
return t;
|
|
@@ -148,42 +148,42 @@ function se(A, e) {
|
|
|
148
148
|
const { toString: qe } = Object.prototype, { getPrototypeOf: GA } = Object, { iterator: QA, toStringTag: Be } = Symbol, DA = /* @__PURE__ */ ((A) => (e) => {
|
|
149
149
|
const t = qe.call(e);
|
|
150
150
|
return A[t] || (A[t] = t.slice(8, -1).toLowerCase());
|
|
151
|
-
})(/* @__PURE__ */ Object.create(null)), U = (A) => (A = A.toLowerCase(), (e) => DA(e) === A), hA = (A) => (e) => typeof e === A, { isArray:
|
|
152
|
-
function
|
|
153
|
-
return A !== null &&
|
|
151
|
+
})(/* @__PURE__ */ Object.create(null)), U = (A) => (A = A.toLowerCase(), (e) => DA(e) === A), hA = (A) => (e) => typeof e === A, { isArray: AA } = Array, $ = hA("undefined");
|
|
152
|
+
function sA(A) {
|
|
153
|
+
return A !== null && !$(A) && A.constructor !== null && !$(A.constructor) && G(A.constructor.isBuffer) && A.constructor.isBuffer(A);
|
|
154
154
|
}
|
|
155
155
|
const ae = U("ArrayBuffer");
|
|
156
156
|
function je(A) {
|
|
157
157
|
let e;
|
|
158
158
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(A) : e = A && A.buffer && ae(A.buffer), e;
|
|
159
159
|
}
|
|
160
|
-
const Ke = hA("string"), G = hA("function"), ie = hA("number"),
|
|
160
|
+
const Ke = hA("string"), G = hA("function"), ie = hA("number"), BA = (A) => A !== null && typeof A == "object", _e = (A) => A === !0 || A === !1, uA = (A) => {
|
|
161
161
|
if (DA(A) !== "object")
|
|
162
162
|
return !1;
|
|
163
163
|
const e = GA(A);
|
|
164
164
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Be in A) && !(QA in A);
|
|
165
165
|
}, $e = (A) => {
|
|
166
|
-
if (!
|
|
166
|
+
if (!BA(A) || sA(A))
|
|
167
167
|
return !1;
|
|
168
168
|
try {
|
|
169
169
|
return Object.keys(A).length === 0 && Object.getPrototypeOf(A) === Object.prototype;
|
|
170
170
|
} catch {
|
|
171
171
|
return !1;
|
|
172
172
|
}
|
|
173
|
-
}, At = U("Date"), et = U("File"), tt = U("Blob"), nt = U("FileList"), ot = (A) =>
|
|
173
|
+
}, At = U("Date"), et = U("File"), tt = U("Blob"), nt = U("FileList"), ot = (A) => BA(A) && G(A.pipe), rt = (A) => {
|
|
174
174
|
let e;
|
|
175
175
|
return A && (typeof FormData == "function" && A instanceof FormData || G(A.append) && ((e = DA(A)) === "formdata" || // detect form-data instance
|
|
176
176
|
e === "object" && G(A.toString) && A.toString() === "[object FormData]"));
|
|
177
177
|
}, st = U("URLSearchParams"), [Bt, at, it, ct] = ["ReadableStream", "Request", "Response", "Headers"].map(U), Et = (A) => A.trim ? A.trim() : A.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
178
|
-
function
|
|
178
|
+
function aA(A, e, { allOwnKeys: t = !1 } = {}) {
|
|
179
179
|
if (A === null || typeof A > "u")
|
|
180
180
|
return;
|
|
181
181
|
let n, o;
|
|
182
|
-
if (typeof A != "object" && (A = [A]),
|
|
182
|
+
if (typeof A != "object" && (A = [A]), AA(A))
|
|
183
183
|
for (n = 0, o = A.length; n < o; n++)
|
|
184
184
|
e.call(null, A[n], n, A);
|
|
185
185
|
else {
|
|
186
|
-
if (
|
|
186
|
+
if (sA(A))
|
|
187
187
|
return;
|
|
188
188
|
const s = t ? Object.getOwnPropertyNames(A) : Object.keys(A), r = s.length;
|
|
189
189
|
let a;
|
|
@@ -192,7 +192,7 @@ function BA(A, e, { allOwnKeys: t = !1 } = {}) {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
function ce(A, e) {
|
|
195
|
-
if (
|
|
195
|
+
if (sA(A))
|
|
196
196
|
return null;
|
|
197
197
|
e = e.toLowerCase();
|
|
198
198
|
const t = Object.keys(A);
|
|
@@ -202,17 +202,17 @@ function ce(A, e) {
|
|
|
202
202
|
return o;
|
|
203
203
|
return null;
|
|
204
204
|
}
|
|
205
|
-
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ee = (A) =>
|
|
205
|
+
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ee = (A) => !$(A) && A !== H;
|
|
206
206
|
function ZA() {
|
|
207
207
|
const { caseless: A, skipUndefined: e } = Ee(this) && this || {}, t = {}, n = (o, s) => {
|
|
208
208
|
const r = A && ce(t, s) || s;
|
|
209
|
-
uA(t[r]) && uA(o) ? t[r] = ZA(t[r], o) : uA(o) ? t[r] = ZA({}, o) :
|
|
209
|
+
uA(t[r]) && uA(o) ? t[r] = ZA(t[r], o) : uA(o) ? t[r] = ZA({}, o) : AA(o) ? t[r] = o.slice() : (!e || !$(o)) && (t[r] = o);
|
|
210
210
|
};
|
|
211
211
|
for (let o = 0, s = arguments.length; o < s; o++)
|
|
212
|
-
arguments[o] &&
|
|
212
|
+
arguments[o] && aA(arguments[o], n);
|
|
213
213
|
return t;
|
|
214
214
|
}
|
|
215
|
-
const gt = (A, e, t, { allOwnKeys: n } = {}) => (
|
|
215
|
+
const gt = (A, e, t, { allOwnKeys: n } = {}) => (aA(e, (o, s) => {
|
|
216
216
|
t && G(o) ? A[s] = se(o, t) : A[s] = o;
|
|
217
217
|
}, { allOwnKeys: n }), A), lt = (A) => (A.charCodeAt(0) === 65279 && (A = A.slice(1)), A), wt = (A, e, t, n) => {
|
|
218
218
|
A.prototype = Object.create(e.prototype, n), A.prototype.constructor = A, Object.defineProperty(A, "super", {
|
|
@@ -234,7 +234,7 @@ const gt = (A, e, t, { allOwnKeys: n } = {}) => (BA(e, (o, s) => {
|
|
|
234
234
|
return n !== -1 && n === t;
|
|
235
235
|
}, ft = (A) => {
|
|
236
236
|
if (!A) return null;
|
|
237
|
-
if (
|
|
237
|
+
if (AA(A)) return A;
|
|
238
238
|
let e = A.length;
|
|
239
239
|
if (!ie(e)) return null;
|
|
240
240
|
const t = new Array(e);
|
|
@@ -261,7 +261,7 @@ const gt = (A, e, t, { allOwnKeys: n } = {}) => (BA(e, (o, s) => {
|
|
|
261
261
|
}
|
|
262
262
|
), VA = (({ hasOwnProperty: A }) => (e, t) => A.call(e, t))(Object.prototype), Mt = U("RegExp"), ge = (A, e) => {
|
|
263
263
|
const t = Object.getOwnPropertyDescriptors(A), n = {};
|
|
264
|
-
|
|
264
|
+
aA(t, (o, s) => {
|
|
265
265
|
let r;
|
|
266
266
|
(r = e(o, s, A)) !== !1 && (n[s] = r || o);
|
|
267
267
|
}), Object.defineProperties(A, n);
|
|
@@ -286,7 +286,7 @@ const gt = (A, e, t, { allOwnKeys: n } = {}) => (BA(e, (o, s) => {
|
|
|
286
286
|
t[s] = !0;
|
|
287
287
|
});
|
|
288
288
|
};
|
|
289
|
-
return
|
|
289
|
+
return AA(A) ? n(A) : n(String(A).split(e)), t;
|
|
290
290
|
}, St = () => {
|
|
291
291
|
}, bt = (A, e) => A != null && Number.isFinite(A = +A) ? A : e;
|
|
292
292
|
function Ft(A) {
|
|
@@ -294,24 +294,24 @@ function Ft(A) {
|
|
|
294
294
|
}
|
|
295
295
|
const Zt = (A) => {
|
|
296
296
|
const e = new Array(10), t = (n, o) => {
|
|
297
|
-
if (
|
|
297
|
+
if (BA(n)) {
|
|
298
298
|
if (e.indexOf(n) >= 0)
|
|
299
299
|
return;
|
|
300
|
-
if (
|
|
300
|
+
if (sA(n))
|
|
301
301
|
return n;
|
|
302
302
|
if (!("toJSON" in n)) {
|
|
303
303
|
e[o] = n;
|
|
304
|
-
const s =
|
|
305
|
-
return
|
|
304
|
+
const s = AA(n) ? [] : {};
|
|
305
|
+
return aA(n, (r, a) => {
|
|
306
306
|
const g = t(r, o + 1);
|
|
307
|
-
|
|
307
|
+
!$(g) && (s[a] = g);
|
|
308
308
|
}), e[o] = void 0, s;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
return n;
|
|
312
312
|
};
|
|
313
313
|
return t(A, 0);
|
|
314
|
-
}, kt = U("AsyncFunction"), Ot = (A) => A && (
|
|
314
|
+
}, kt = U("AsyncFunction"), Ot = (A) => A && (BA(A) || G(A)) && G(A.then) && G(A.catch), le = ((A, e) => A ? setImmediate : e ? ((t, n) => (H.addEventListener("message", ({ source: o, data: s }) => {
|
|
315
315
|
o === H && s === t && n.length && n.shift()();
|
|
316
316
|
}, !1), (o) => {
|
|
317
317
|
n.push(o), H.postMessage(t, "*");
|
|
@@ -319,22 +319,22 @@ const Zt = (A) => {
|
|
|
319
319
|
typeof setImmediate == "function",
|
|
320
320
|
G(H.postMessage)
|
|
321
321
|
), vt = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick || le, It = (A) => A != null && G(A[QA]), B = {
|
|
322
|
-
isArray:
|
|
322
|
+
isArray: AA,
|
|
323
323
|
isArrayBuffer: ae,
|
|
324
|
-
isBuffer:
|
|
324
|
+
isBuffer: sA,
|
|
325
325
|
isFormData: rt,
|
|
326
326
|
isArrayBufferView: je,
|
|
327
327
|
isString: Ke,
|
|
328
328
|
isNumber: ie,
|
|
329
329
|
isBoolean: _e,
|
|
330
|
-
isObject:
|
|
330
|
+
isObject: BA,
|
|
331
331
|
isPlainObject: uA,
|
|
332
332
|
isEmptyObject: $e,
|
|
333
333
|
isReadableStream: Bt,
|
|
334
334
|
isRequest: at,
|
|
335
335
|
isResponse: it,
|
|
336
336
|
isHeaders: ct,
|
|
337
|
-
isUndefined:
|
|
337
|
+
isUndefined: $,
|
|
338
338
|
isDate: At,
|
|
339
339
|
isFile: et,
|
|
340
340
|
isBlob: tt,
|
|
@@ -344,7 +344,7 @@ const Zt = (A) => {
|
|
|
344
344
|
isURLSearchParams: st,
|
|
345
345
|
isTypedArray: dt,
|
|
346
346
|
isFileList: nt,
|
|
347
|
-
forEach:
|
|
347
|
+
forEach: aA,
|
|
348
348
|
merge: ZA,
|
|
349
349
|
extend: gt,
|
|
350
350
|
trim: Et,
|
|
@@ -496,14 +496,14 @@ function mA(A, e, t) {
|
|
|
496
496
|
if (!B.isUndefined(E)) {
|
|
497
497
|
if (w.indexOf(E) !== -1)
|
|
498
498
|
throw Error("Circular reference detected in " + u.join("."));
|
|
499
|
-
w.push(E), B.forEach(E, function(m,
|
|
499
|
+
w.push(E), B.forEach(E, function(m, Z) {
|
|
500
500
|
(!(B.isUndefined(m) || m === null) && o.call(
|
|
501
501
|
e,
|
|
502
502
|
m,
|
|
503
|
-
B.isString(
|
|
503
|
+
B.isString(Z) ? Z.trim() : Z,
|
|
504
504
|
u,
|
|
505
505
|
C
|
|
506
|
-
)) === !0 && h(m, u ? u.concat(
|
|
506
|
+
)) === !0 && h(m, u ? u.concat(Z) : [Z]);
|
|
507
507
|
}), w.pop();
|
|
508
508
|
}
|
|
509
509
|
}
|
|
@@ -632,14 +632,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xt
|
|
|
632
632
|
hasStandardBrowserWebWorkerEnv: Vt,
|
|
633
633
|
navigator: OA,
|
|
634
634
|
origin: Xt
|
|
635
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
635
|
+
}, Symbol.toStringTag, { value: "Module" })), v = {
|
|
636
636
|
...Wt,
|
|
637
637
|
...Pt
|
|
638
638
|
};
|
|
639
639
|
function Ht(A, e) {
|
|
640
|
-
return mA(A, new
|
|
640
|
+
return mA(A, new v.classes.URLSearchParams(), {
|
|
641
641
|
visitor: function(t, n, o, s) {
|
|
642
|
-
return
|
|
642
|
+
return v.isNode && B.isBuffer(t) ? (this.append(n, t.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
643
643
|
},
|
|
644
644
|
...e
|
|
645
645
|
});
|
|
@@ -681,7 +681,7 @@ function qt(A, e, t) {
|
|
|
681
681
|
}
|
|
682
682
|
return (t || JSON.stringify)(A);
|
|
683
683
|
}
|
|
684
|
-
const
|
|
684
|
+
const iA = {
|
|
685
685
|
transitional: Qe,
|
|
686
686
|
adapter: ["xhr", "http", "fetch"],
|
|
687
687
|
transformRequest: [function(e, t) {
|
|
@@ -710,7 +710,7 @@ const aA = {
|
|
|
710
710
|
return s || o ? (t.setContentType("application/json", !1), qt(e)) : e;
|
|
711
711
|
}],
|
|
712
712
|
transformResponse: [function(e) {
|
|
713
|
-
const t = this.transitional ||
|
|
713
|
+
const t = this.transitional || iA.transitional, n = t && t.forcedJSONParsing, o = this.responseType === "json";
|
|
714
714
|
if (B.isResponse(e) || B.isReadableStream(e))
|
|
715
715
|
return e;
|
|
716
716
|
if (e && B.isString(e) && (n && !this.responseType || o)) {
|
|
@@ -734,8 +734,8 @@ const aA = {
|
|
|
734
734
|
maxContentLength: -1,
|
|
735
735
|
maxBodyLength: -1,
|
|
736
736
|
env: {
|
|
737
|
-
FormData:
|
|
738
|
-
Blob:
|
|
737
|
+
FormData: v.classes.FormData,
|
|
738
|
+
Blob: v.classes.Blob
|
|
739
739
|
},
|
|
740
740
|
validateStatus: function(e) {
|
|
741
741
|
return e >= 200 && e < 300;
|
|
@@ -748,7 +748,7 @@ const aA = {
|
|
|
748
748
|
}
|
|
749
749
|
};
|
|
750
750
|
B.forEach(["delete", "get", "head", "post", "put", "patch"], (A) => {
|
|
751
|
-
|
|
751
|
+
iA.headers[A] = {};
|
|
752
752
|
});
|
|
753
753
|
const jt = B.toObjectSet([
|
|
754
754
|
"age",
|
|
@@ -776,7 +776,7 @@ const jt = B.toObjectSet([
|
|
|
776
776
|
o = r.indexOf(":"), t = r.substring(0, o).trim().toLowerCase(), n = r.substring(o + 1).trim(), !(!t || e[t] && jt[t]) && (t === "set-cookie" ? e[t] ? e[t].push(n) : e[t] = [n] : e[t] = e[t] ? e[t] + ", " + n : n);
|
|
777
777
|
}), e;
|
|
778
778
|
}, LA = Symbol("internals");
|
|
779
|
-
function
|
|
779
|
+
function oA(A) {
|
|
780
780
|
return A && String(A).trim().toLowerCase();
|
|
781
781
|
}
|
|
782
782
|
function CA(A) {
|
|
@@ -821,7 +821,7 @@ let T = class {
|
|
|
821
821
|
set(e, t, n) {
|
|
822
822
|
const o = this;
|
|
823
823
|
function s(a, g, c) {
|
|
824
|
-
const i =
|
|
824
|
+
const i = oA(g);
|
|
825
825
|
if (!i)
|
|
826
826
|
throw new Error("header name must be a non-empty string");
|
|
827
827
|
const w = B.findKey(o, i);
|
|
@@ -845,7 +845,7 @@ let T = class {
|
|
|
845
845
|
return this;
|
|
846
846
|
}
|
|
847
847
|
get(e, t) {
|
|
848
|
-
if (e =
|
|
848
|
+
if (e = oA(e), e) {
|
|
849
849
|
const n = B.findKey(this, e);
|
|
850
850
|
if (n) {
|
|
851
851
|
const o = this[n];
|
|
@@ -862,7 +862,7 @@ let T = class {
|
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
864
|
has(e, t) {
|
|
865
|
-
if (e =
|
|
865
|
+
if (e = oA(e), e) {
|
|
866
866
|
const n = B.findKey(this, e);
|
|
867
867
|
return !!(n && this[n] !== void 0 && (!t || SA(this, this[n], n, t)));
|
|
868
868
|
}
|
|
@@ -872,7 +872,7 @@ let T = class {
|
|
|
872
872
|
const n = this;
|
|
873
873
|
let o = !1;
|
|
874
874
|
function s(r) {
|
|
875
|
-
if (r =
|
|
875
|
+
if (r = oA(r), r) {
|
|
876
876
|
const a = B.findKey(n, r);
|
|
877
877
|
a && (!t || SA(n, n[a], a, t)) && (delete n[a], o = !0);
|
|
878
878
|
}
|
|
@@ -934,7 +934,7 @@ let T = class {
|
|
|
934
934
|
accessors: {}
|
|
935
935
|
}).accessors, o = this.prototype;
|
|
936
936
|
function s(r) {
|
|
937
|
-
const a =
|
|
937
|
+
const a = oA(r);
|
|
938
938
|
n[a] || (en(o, r), n[a] = !0);
|
|
939
939
|
}
|
|
940
940
|
return B.isArray(e) ? e.forEach(s) : s(e), this;
|
|
@@ -952,7 +952,7 @@ B.reduceDescriptors(T.prototype, ({ value: A }, e) => {
|
|
|
952
952
|
});
|
|
953
953
|
B.freezeMethods(T);
|
|
954
954
|
function bA(A, e) {
|
|
955
|
-
const t = this ||
|
|
955
|
+
const t = this || iA, n = e || t, o = T.from(n.headers);
|
|
956
956
|
let s = n.data;
|
|
957
957
|
return B.forEach(A, function(a) {
|
|
958
958
|
s = a.call(t, s, o.normalize(), e ? e.status : void 0);
|
|
@@ -961,10 +961,10 @@ function bA(A, e) {
|
|
|
961
961
|
function he(A) {
|
|
962
962
|
return !!(A && A.__CANCEL__);
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function eA(A, e, t) {
|
|
965
965
|
f.call(this, A ?? "canceled", f.ERR_CANCELED, e, t), this.name = "CanceledError";
|
|
966
966
|
}
|
|
967
|
-
B.inherits(
|
|
967
|
+
B.inherits(eA, f, {
|
|
968
968
|
__CANCEL__: !0
|
|
969
969
|
});
|
|
970
970
|
function me(A, e, t) {
|
|
@@ -1035,10 +1035,10 @@ const dA = (A, e, t = 3) => {
|
|
|
1035
1035
|
total: A,
|
|
1036
1036
|
loaded: n
|
|
1037
1037
|
}), e[1]];
|
|
1038
|
-
}, qA = (A) => (...e) => B.asap(() => A(...e)), rn =
|
|
1039
|
-
new URL(
|
|
1040
|
-
|
|
1041
|
-
) : () => !0, sn =
|
|
1038
|
+
}, qA = (A) => (...e) => B.asap(() => A(...e)), rn = v.hasStandardBrowserEnv ? /* @__PURE__ */ ((A, e) => (t) => (t = new URL(t, v.origin), A.protocol === t.protocol && A.host === t.host && (e || A.port === t.port)))(
|
|
1039
|
+
new URL(v.origin),
|
|
1040
|
+
v.navigator && /(msie|trident)/i.test(v.navigator.userAgent)
|
|
1041
|
+
) : () => !0, sn = v.hasStandardBrowserEnv ? (
|
|
1042
1042
|
// Standard browser envs support document.cookie
|
|
1043
1043
|
{
|
|
1044
1044
|
write(A, e, t, n, o, s) {
|
|
@@ -1147,7 +1147,7 @@ const pe = (A) => {
|
|
|
1147
1147
|
"Authorization",
|
|
1148
1148
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1149
1149
|
), B.isFormData(t)) {
|
|
1150
|
-
if (
|
|
1150
|
+
if (v.hasStandardBrowserEnv || v.hasStandardBrowserWebWorkerEnv)
|
|
1151
1151
|
r.setContentType(void 0);
|
|
1152
1152
|
else if (B.isFunction(t.getHeaders)) {
|
|
1153
1153
|
const g = t.getHeaders(), c = ["content-type", "content-length"];
|
|
@@ -1156,7 +1156,7 @@ const pe = (A) => {
|
|
|
1156
1156
|
});
|
|
1157
1157
|
}
|
|
1158
1158
|
}
|
|
1159
|
-
if (
|
|
1159
|
+
if (v.hasStandardBrowserEnv && (n && B.isFunction(n) && (n = n(e)), n || n !== !1 && rn(e.url))) {
|
|
1160
1160
|
const g = o && s && sn.read(s);
|
|
1161
1161
|
g && r.set(o, g);
|
|
1162
1162
|
}
|
|
@@ -1196,8 +1196,8 @@ const pe = (A) => {
|
|
|
1196
1196
|
}, l.onabort = function() {
|
|
1197
1197
|
l && (n(new f("Request aborted", f.ECONNABORTED, A, l)), l = null);
|
|
1198
1198
|
}, l.onerror = function(R) {
|
|
1199
|
-
const S = R && R.message ? R.message : "Network Error",
|
|
1200
|
-
|
|
1199
|
+
const S = R && R.message ? R.message : "Network Error", V = new f(S, f.ERR_NETWORK, A, l);
|
|
1200
|
+
V.event = R || null, n(V), l = null;
|
|
1201
1201
|
}, l.ontimeout = function() {
|
|
1202
1202
|
let R = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1203
1203
|
const S = o.transitional || Qe;
|
|
@@ -1210,11 +1210,11 @@ const pe = (A) => {
|
|
|
1210
1210
|
}, s === void 0 && r.setContentType(null), "setRequestHeader" in l && B.forEach(r.toJSON(), function(R, S) {
|
|
1211
1211
|
l.setRequestHeader(S, R);
|
|
1212
1212
|
}), B.isUndefined(o.withCredentials) || (l.withCredentials = !!o.withCredentials), a && a !== "json" && (l.responseType = o.responseType), c && ([C, E] = dA(c, !0), l.addEventListener("progress", C)), g && l.upload && ([w, h] = dA(g), l.upload.addEventListener("progress", w), l.upload.addEventListener("loadend", h)), (o.cancelToken || o.signal) && (i = (D) => {
|
|
1213
|
-
l && (n(!D || D.type ? new
|
|
1213
|
+
l && (n(!D || D.type ? new eA(null, A, l) : D), l.abort(), l = null);
|
|
1214
1214
|
}, o.cancelToken && o.cancelToken.subscribe(i), o.signal && (o.signal.aborted ? i() : o.signal.addEventListener("abort", i)));
|
|
1215
|
-
const
|
|
1216
|
-
if (
|
|
1217
|
-
n(new f("Unsupported protocol " +
|
|
1215
|
+
const Z = tn(o.url);
|
|
1216
|
+
if (Z && v.protocols.indexOf(Z) === -1) {
|
|
1217
|
+
n(new f("Unsupported protocol " + Z + ":", f.ERR_BAD_REQUEST, A));
|
|
1218
1218
|
return;
|
|
1219
1219
|
}
|
|
1220
1220
|
l.send(s || null);
|
|
@@ -1227,7 +1227,7 @@ const pe = (A) => {
|
|
|
1227
1227
|
if (!o) {
|
|
1228
1228
|
o = !0, a();
|
|
1229
1229
|
const i = c instanceof Error ? c : this.reason;
|
|
1230
|
-
n.abort(i instanceof f ? i : new
|
|
1230
|
+
n.abort(i instanceof f ? i : new eA(i instanceof Error ? i.message : i));
|
|
1231
1231
|
}
|
|
1232
1232
|
};
|
|
1233
1233
|
let r = e && setTimeout(() => {
|
|
@@ -1320,7 +1320,7 @@ const pe = (A) => {
|
|
|
1320
1320
|
return !1;
|
|
1321
1321
|
const a = o && wA($A), g = o && (typeof Ae == "function" ? /* @__PURE__ */ ((E) => (u) => E.encode(u))(new Ae()) : async (E) => new Uint8Array(await new t(E).arrayBuffer())), c = s && a && ee(() => {
|
|
1322
1322
|
let E = !1;
|
|
1323
|
-
const u = new t(
|
|
1323
|
+
const u = new t(v.origin, {
|
|
1324
1324
|
body: new $A(),
|
|
1325
1325
|
method: "POST",
|
|
1326
1326
|
get duplex() {
|
|
@@ -1345,7 +1345,7 @@ const pe = (A) => {
|
|
|
1345
1345
|
if (B.isBlob(E))
|
|
1346
1346
|
return E.size;
|
|
1347
1347
|
if (B.isSpecCompliantForm(E))
|
|
1348
|
-
return (await new t(
|
|
1348
|
+
return (await new t(v.origin, {
|
|
1349
1349
|
method: "POST",
|
|
1350
1350
|
body: E
|
|
1351
1351
|
}).arrayBuffer()).byteLength;
|
|
@@ -1362,70 +1362,70 @@ const pe = (A) => {
|
|
|
1362
1362
|
url: u,
|
|
1363
1363
|
method: l,
|
|
1364
1364
|
data: m,
|
|
1365
|
-
signal:
|
|
1365
|
+
signal: Z,
|
|
1366
1366
|
cancelToken: D,
|
|
1367
1367
|
timeout: R,
|
|
1368
1368
|
onDownloadProgress: S,
|
|
1369
|
-
onUploadProgress:
|
|
1369
|
+
onUploadProgress: V,
|
|
1370
1370
|
responseType: Q,
|
|
1371
|
-
headers:
|
|
1371
|
+
headers: tA,
|
|
1372
1372
|
withCredentials: q = "same-origin",
|
|
1373
|
-
fetchOptions:
|
|
1374
|
-
} = pe(E),
|
|
1373
|
+
fetchOptions: Y
|
|
1374
|
+
} = pe(E), cA = e || fetch;
|
|
1375
1375
|
Q = Q ? (Q + "").toLowerCase() : "text";
|
|
1376
|
-
let X = gn([
|
|
1377
|
-
const
|
|
1376
|
+
let X = gn([Z, D && D.toAbortSignal()], R), W = null;
|
|
1377
|
+
const J = X && X.unsubscribe && (() => {
|
|
1378
1378
|
X.unsubscribe();
|
|
1379
1379
|
});
|
|
1380
|
-
let
|
|
1380
|
+
let EA;
|
|
1381
1381
|
try {
|
|
1382
|
-
if (
|
|
1383
|
-
let
|
|
1382
|
+
if (V && c && l !== "get" && l !== "head" && (EA = await h(tA, m)) !== 0) {
|
|
1383
|
+
let z = new t(u, {
|
|
1384
1384
|
method: "POST",
|
|
1385
1385
|
body: m,
|
|
1386
1386
|
duplex: "half"
|
|
1387
|
-
}),
|
|
1388
|
-
if (B.isFormData(m) && (
|
|
1387
|
+
}), P;
|
|
1388
|
+
if (B.isFormData(m) && (P = z.headers.get("content-type")) && tA.setContentType(P), z.body) {
|
|
1389
1389
|
const [j, d] = xA(
|
|
1390
|
-
|
|
1391
|
-
dA(qA(
|
|
1390
|
+
EA,
|
|
1391
|
+
dA(qA(V))
|
|
1392
1392
|
);
|
|
1393
|
-
m = KA(
|
|
1393
|
+
m = KA(z.body, _A, j, d);
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
1396
|
B.isString(q) || (q = q ? "include" : "omit");
|
|
1397
|
-
const
|
|
1398
|
-
...
|
|
1397
|
+
const I = s && "credentials" in t.prototype, nA = {
|
|
1398
|
+
...Y,
|
|
1399
1399
|
signal: X,
|
|
1400
1400
|
method: l.toUpperCase(),
|
|
1401
|
-
headers:
|
|
1401
|
+
headers: tA.normalize().toJSON(),
|
|
1402
1402
|
body: m,
|
|
1403
1403
|
duplex: "half",
|
|
1404
|
-
credentials:
|
|
1404
|
+
credentials: I ? q : void 0
|
|
1405
1405
|
};
|
|
1406
|
-
W = s && new t(u,
|
|
1407
|
-
let y = await (s ?
|
|
1408
|
-
const
|
|
1409
|
-
if (i && (S ||
|
|
1410
|
-
const
|
|
1406
|
+
W = s && new t(u, nA);
|
|
1407
|
+
let y = await (s ? cA(W, Y) : cA(u, nA));
|
|
1408
|
+
const gA = i && (Q === "stream" || Q === "response");
|
|
1409
|
+
if (i && (S || gA && J)) {
|
|
1410
|
+
const z = {};
|
|
1411
1411
|
["status", "statusText", "headers"].forEach((k) => {
|
|
1412
|
-
|
|
1412
|
+
z[k] = y[k];
|
|
1413
1413
|
});
|
|
1414
|
-
const
|
|
1415
|
-
|
|
1414
|
+
const P = B.toFiniteNumber(y.headers.get("content-length")), [j, d] = S && xA(
|
|
1415
|
+
P,
|
|
1416
1416
|
dA(qA(S), !0)
|
|
1417
1417
|
) || [];
|
|
1418
1418
|
y = new n(
|
|
1419
1419
|
KA(y.body, _A, j, () => {
|
|
1420
|
-
d && d(),
|
|
1420
|
+
d && d(), J && J();
|
|
1421
1421
|
}),
|
|
1422
|
-
|
|
1422
|
+
z
|
|
1423
1423
|
);
|
|
1424
1424
|
}
|
|
1425
1425
|
Q = Q || "text";
|
|
1426
1426
|
let pA = await w[B.findKey(w, Q) || "text"](y, E);
|
|
1427
|
-
return !
|
|
1428
|
-
me(
|
|
1427
|
+
return !gA && J && J(), await new Promise((z, P) => {
|
|
1428
|
+
me(z, P, {
|
|
1429
1429
|
data: pA,
|
|
1430
1430
|
headers: T.from(y.headers),
|
|
1431
1431
|
status: y.status,
|
|
@@ -1434,13 +1434,13 @@ const pe = (A) => {
|
|
|
1434
1434
|
request: W
|
|
1435
1435
|
});
|
|
1436
1436
|
});
|
|
1437
|
-
} catch (
|
|
1438
|
-
throw
|
|
1437
|
+
} catch (I) {
|
|
1438
|
+
throw J && J(), I && I.name === "TypeError" && /Load failed|fetch/i.test(I.message) ? Object.assign(
|
|
1439
1439
|
new f("Network Error", f.ERR_NETWORK, E, W),
|
|
1440
1440
|
{
|
|
1441
|
-
cause:
|
|
1441
|
+
cause: I.cause || I
|
|
1442
1442
|
}
|
|
1443
|
-
) : f.from(
|
|
1443
|
+
) : f.from(I, I && I.code, E, W);
|
|
1444
1444
|
}
|
|
1445
1445
|
};
|
|
1446
1446
|
}, dn = /* @__PURE__ */ new Map(), Re = (A) => {
|
|
@@ -1505,13 +1505,13 @@ const te = (A) => `- ${A}`, Qn = (A) => B.isFunction(A) || A === null || A === !
|
|
|
1505
1505
|
};
|
|
1506
1506
|
function FA(A) {
|
|
1507
1507
|
if (A.cancelToken && A.cancelToken.throwIfRequested(), A.signal && A.signal.aborted)
|
|
1508
|
-
throw new
|
|
1508
|
+
throw new eA(null, A);
|
|
1509
1509
|
}
|
|
1510
1510
|
function ne(A) {
|
|
1511
1511
|
return FA(A), A.headers = T.from(A.headers), A.data = bA.call(
|
|
1512
1512
|
A,
|
|
1513
1513
|
A.transformRequest
|
|
1514
|
-
), ["post", "put", "patch"].indexOf(A.method) !== -1 && A.headers.setContentType("application/x-www-form-urlencoded", !1), Se.getAdapter(A.adapter ||
|
|
1514
|
+
), ["post", "put", "patch"].indexOf(A.method) !== -1 && A.headers.setContentType("application/x-www-form-urlencoded", !1), Se.getAdapter(A.adapter || iA.adapter, A)(A).then(function(n) {
|
|
1515
1515
|
return FA(A), n.data = bA.call(
|
|
1516
1516
|
A,
|
|
1517
1517
|
A.transformResponse,
|
|
@@ -1573,7 +1573,7 @@ function Dn(A, e, t) {
|
|
|
1573
1573
|
const fA = {
|
|
1574
1574
|
assertOptions: Dn,
|
|
1575
1575
|
validators: MA
|
|
1576
|
-
},
|
|
1576
|
+
}, N = fA.validators;
|
|
1577
1577
|
let L = class {
|
|
1578
1578
|
constructor(e) {
|
|
1579
1579
|
this.defaults = e || {}, this.interceptors = {
|
|
@@ -1610,17 +1610,17 @@ let L = class {
|
|
|
1610
1610
|
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = x(this.defaults, t);
|
|
1611
1611
|
const { transitional: n, paramsSerializer: o, headers: s } = t;
|
|
1612
1612
|
n !== void 0 && fA.assertOptions(n, {
|
|
1613
|
-
silentJSONParsing:
|
|
1614
|
-
forcedJSONParsing:
|
|
1615
|
-
clarifyTimeoutError:
|
|
1613
|
+
silentJSONParsing: N.transitional(N.boolean),
|
|
1614
|
+
forcedJSONParsing: N.transitional(N.boolean),
|
|
1615
|
+
clarifyTimeoutError: N.transitional(N.boolean)
|
|
1616
1616
|
}, !1), o != null && (B.isFunction(o) ? t.paramsSerializer = {
|
|
1617
1617
|
serialize: o
|
|
1618
1618
|
} : fA.assertOptions(o, {
|
|
1619
|
-
encode:
|
|
1620
|
-
serialize:
|
|
1619
|
+
encode: N.function,
|
|
1620
|
+
serialize: N.function
|
|
1621
1621
|
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0), fA.assertOptions(t, {
|
|
1622
|
-
baseUrl:
|
|
1623
|
-
withXsrfToken:
|
|
1622
|
+
baseUrl: N.spelling("baseURL"),
|
|
1623
|
+
withXsrfToken: N.spelling("withXSRFToken")
|
|
1624
1624
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1625
1625
|
let r = s && B.merge(
|
|
1626
1626
|
s.common,
|
|
@@ -1722,7 +1722,7 @@ let hn = class Fe {
|
|
|
1722
1722
|
n.unsubscribe(s);
|
|
1723
1723
|
}, r;
|
|
1724
1724
|
}, e(function(s, r, a) {
|
|
1725
|
-
n.reason || (n.reason = new
|
|
1725
|
+
n.reason || (n.reason = new eA(s, r, a), t(n.reason));
|
|
1726
1726
|
});
|
|
1727
1727
|
}
|
|
1728
1728
|
/**
|
|
@@ -1853,9 +1853,9 @@ function Ze(A) {
|
|
|
1853
1853
|
return Ze(x(A, o));
|
|
1854
1854
|
}, t;
|
|
1855
1855
|
}
|
|
1856
|
-
const M = Ze(
|
|
1856
|
+
const M = Ze(iA);
|
|
1857
1857
|
M.Axios = L;
|
|
1858
|
-
M.CanceledError =
|
|
1858
|
+
M.CanceledError = eA;
|
|
1859
1859
|
M.CancelToken = hn;
|
|
1860
1860
|
M.isCancel = he;
|
|
1861
1861
|
M.VERSION = be;
|
|
@@ -1936,64 +1936,64 @@ const Rn = "/lxlicence", Sn = {
|
|
|
1936
1936
|
emits: ["error", "voice-stop-event"],
|
|
1937
1937
|
setup(A, { expose: e, emit: t }) {
|
|
1938
1938
|
const n = t, o = A, s = p(!0), r = p(!1), a = p(null), g = p(""), c = p(""), i = p(!1), w = p(!1), C = p(!1), h = p(0), E = p(0), u = p(!1), l = p(null);
|
|
1939
|
-
let m = p(6),
|
|
1939
|
+
let m = p(6), Z = p(0), D = p(null);
|
|
1940
1940
|
const R = Ie({
|
|
1941
1941
|
mutedVolume: 0,
|
|
1942
1942
|
playerVolume: 1
|
|
1943
|
-
}), S = p("未连接"),
|
|
1943
|
+
}), S = p("未连接"), V = p([]), Q = p(null), tA = JA(() => o.videoClosed), q = JA(() => o.videoOpened), Y = (d, k = "") => {
|
|
1944
1944
|
Function(`window.console && console.log('${d}', '${k}');`)();
|
|
1945
|
-
},
|
|
1945
|
+
}, cA = async () => {
|
|
1946
1946
|
try {
|
|
1947
|
-
(await bn()).data.code === "0000" ? (
|
|
1947
|
+
(await bn()).data.code === "0000" ? (Y("✅ 获取授权成功"), u.value = !0) : (Y("❌ 获取授权失败"), u.value = !1);
|
|
1948
1948
|
} catch (d) {
|
|
1949
|
-
|
|
1949
|
+
Y("❌ 授权失败:", d), n("error", "授权失败: " + d), u.value = !1;
|
|
1950
1950
|
}
|
|
1951
1951
|
}, X = (d, k) => {
|
|
1952
1952
|
if (Q.value) {
|
|
1953
|
-
const
|
|
1954
|
-
if (
|
|
1953
|
+
const b = Q.value.readyState;
|
|
1954
|
+
if (b === WebSocket.OPEN) {
|
|
1955
1955
|
S.value = "已连接";
|
|
1956
1956
|
return;
|
|
1957
|
-
} else if (
|
|
1957
|
+
} else if (b === WebSocket.CONNECTING) {
|
|
1958
1958
|
S.value = "连接中";
|
|
1959
1959
|
return;
|
|
1960
1960
|
} else
|
|
1961
1961
|
Q.value.close();
|
|
1962
1962
|
}
|
|
1963
1963
|
Q.value = new WebSocket(o.wsUrl), Q.value.onopen = () => {
|
|
1964
|
-
S.value = "已连接", console.log("✅ WebSocket 连接成功"),
|
|
1965
|
-
}, Q.value.onmessage = (
|
|
1966
|
-
const
|
|
1967
|
-
|
|
1964
|
+
S.value = "已连接", console.log("✅ WebSocket 连接成功"), EA();
|
|
1965
|
+
}, Q.value.onmessage = (b) => {
|
|
1966
|
+
const K = b.data;
|
|
1967
|
+
V.value.push(K);
|
|
1968
1968
|
try {
|
|
1969
|
-
const
|
|
1970
|
-
if (
|
|
1969
|
+
const O = JSON.parse(K);
|
|
1970
|
+
if (O.info && O.info.speaker) {
|
|
1971
1971
|
if (a.value = o.spkId, !o.spkId) {
|
|
1972
|
-
const
|
|
1972
|
+
const _ = O.info.speaker, YA = Object.keys(_);
|
|
1973
1973
|
YA.length > 0 && (a.value = YA[0]);
|
|
1974
1974
|
}
|
|
1975
1975
|
console.log("spkId::", a.value);
|
|
1976
1976
|
}
|
|
1977
|
-
|
|
1978
|
-
} catch (
|
|
1979
|
-
console.error("解析消息失败:",
|
|
1977
|
+
O.status === 0 && O.info && (i.value = !0, console.log("✅ TTS初始化成功", d), console.log("readingText", k), d !== "init" && I(k || o.content)), O.status === 1 && O.audio && !w.value && pA(O.audio), O.status === 2 && console.log("当前执行秒", (/* @__PURE__ */ new Date()).getSeconds());
|
|
1978
|
+
} catch (O) {
|
|
1979
|
+
console.error("解析消息失败:", O);
|
|
1980
1980
|
}
|
|
1981
|
-
}, Q.value.onclose = (
|
|
1982
|
-
C.value = !1, S.value = `已关闭 (代码: ${
|
|
1983
|
-
}, Q.value.onerror = (
|
|
1984
|
-
S.value = "发生错误", console.error("❌ WebSocket 错误:",
|
|
1981
|
+
}, Q.value.onclose = (b) => {
|
|
1982
|
+
C.value = !1, S.value = `已关闭 (代码: ${b.code})`, console.log("🔌 WebSocket 连接已关闭", b);
|
|
1983
|
+
}, Q.value.onerror = (b) => {
|
|
1984
|
+
S.value = "发生错误", console.error("❌ WebSocket 错误:", b), n("error", "连接失败: " + b);
|
|
1985
1985
|
};
|
|
1986
1986
|
}, W = () => {
|
|
1987
1987
|
r.value = !0, s.value = !1;
|
|
1988
|
-
},
|
|
1988
|
+
}, J = () => {
|
|
1989
1989
|
r.value = !1, s.value = !0;
|
|
1990
|
-
},
|
|
1990
|
+
}, EA = () => {
|
|
1991
1991
|
if (Q.value && Q.value.readyState === WebSocket.OPEN) {
|
|
1992
1992
|
const d = { task: "tts", signal: "start" };
|
|
1993
1993
|
Q.value.send(JSON.stringify(d));
|
|
1994
1994
|
} else
|
|
1995
1995
|
console.error("请先初始化"), n("error", "请先初始化");
|
|
1996
|
-
},
|
|
1996
|
+
}, I = (d) => {
|
|
1997
1997
|
if (d)
|
|
1998
1998
|
if (Q.value && Q.value.readyState === WebSocket.OPEN) {
|
|
1999
1999
|
const k = {
|
|
@@ -2007,12 +2007,12 @@ const Rn = "/lxlicence", Sn = {
|
|
|
2007
2007
|
Q.value.send(JSON.stringify(k));
|
|
2008
2008
|
} else
|
|
2009
2009
|
console.error("请先初始化"), n("error", "请先初始化");
|
|
2010
|
-
},
|
|
2010
|
+
}, nA = () => {
|
|
2011
2011
|
if (console.log("关闭连接"), Q.value && Q.value.readyState === WebSocket.OPEN) {
|
|
2012
2012
|
const d = { task: "tts", signal: "end" };
|
|
2013
2013
|
Q.value.send(JSON.stringify(d));
|
|
2014
2014
|
}
|
|
2015
|
-
}, y = () => {
|
|
2015
|
+
}, y = (d = "init", k) => {
|
|
2016
2016
|
if (!u.value)
|
|
2017
2017
|
return console.log("license未授权"), n("error", "license未授权"), !1;
|
|
2018
2018
|
try {
|
|
@@ -2021,54 +2021,52 @@ const Rn = "/lxlicence", Sn = {
|
|
|
2021
2021
|
channels: 1,
|
|
2022
2022
|
sampleRate: 24e3,
|
|
2023
2023
|
flushTime: 2e3,
|
|
2024
|
-
onstatechange: (
|
|
2024
|
+
onstatechange: (b, K, O) => {
|
|
2025
2025
|
console.log("播放状态改变", O);
|
|
2026
2026
|
},
|
|
2027
2027
|
onstart: () => {
|
|
2028
2028
|
console.log("开始播放onstart"), s.value && !w.value && W(), h.value++;
|
|
2029
2029
|
},
|
|
2030
|
-
onended: (
|
|
2031
|
-
console.log("播放结束onended",
|
|
2030
|
+
onended: (b, K) => {
|
|
2031
|
+
console.log("播放结束onended", b), E.value++, h.value === E.value && (console.log("停止说话了~~~"), J(), setTimeout(() => {
|
|
2032
2032
|
console.log("停止说话了~~~2::", h.value === E.value), h.value === E.value && n("voice-stop-event", !0);
|
|
2033
2033
|
}, 1e3));
|
|
2034
2034
|
}
|
|
2035
|
-
}), l.value.volume(R.playerVolume), X(
|
|
2035
|
+
}), l.value.volume(R.playerVolume), X(d, k), !0;
|
|
2036
2036
|
} catch {
|
|
2037
2037
|
return n("error", "请先初始化"), !1;
|
|
2038
2038
|
}
|
|
2039
|
-
},
|
|
2040
|
-
if (l.value)
|
|
2039
|
+
}, gA = () => {
|
|
2040
|
+
if (l.value && i.value)
|
|
2041
2041
|
try {
|
|
2042
|
-
C.value = !0, l.value.volume(R.mutedVolume),
|
|
2042
|
+
C.value = !0, l.value.volume(R.mutedVolume), nA(), l.value.audioCtx && l.value.destroy(), w.value = !0, c.value = "", J(), i.value = !1, console.log("✅ 音频已停止"), n("voice-stop-event", !0);
|
|
2043
2043
|
} catch (d) {
|
|
2044
2044
|
console.warn("停止音频时发生异常:", d), n("error", "停止音频时发生异常");
|
|
2045
2045
|
}
|
|
2046
|
+
else
|
|
2047
|
+
Y("已停止无需重");
|
|
2046
2048
|
}, pA = (d) => {
|
|
2047
2049
|
if (!l.value) {
|
|
2048
2050
|
console.log("receivePCMStream 音频未初始化");
|
|
2049
2051
|
return;
|
|
2050
2052
|
}
|
|
2051
2053
|
d = d.replace(/=+$/, "");
|
|
2052
|
-
const k = atob(d),
|
|
2053
|
-
for (let
|
|
2054
|
-
|
|
2055
|
-
l.value.feed(
|
|
2056
|
-
},
|
|
2054
|
+
const k = atob(d), b = k.length, K = new ArrayBuffer(b), O = new Uint8Array(K);
|
|
2055
|
+
for (let _ = 0; _ < b; _++)
|
|
2056
|
+
O[_] = k.charCodeAt(_);
|
|
2057
|
+
l.value.feed(O.buffer), c.value = "";
|
|
2058
|
+
}, z = () => i, P = (d) => {
|
|
2057
2059
|
if (d) {
|
|
2058
2060
|
if (!u.value) {
|
|
2059
2061
|
n("error", "license未授权");
|
|
2060
2062
|
return;
|
|
2061
2063
|
}
|
|
2062
|
-
|
|
2063
|
-
console.error("请先初始化播放器"), n("error", "请先初始化播放器");
|
|
2064
|
-
return;
|
|
2065
|
-
}
|
|
2066
|
-
w.value = !1, h.value = 0, E.value = 0, i.value ? (c.value = "", v(d)) : (console.log("wss未连接,开始连接"), X(null, d));
|
|
2064
|
+
(!l.value || !l.value.audioCtx) && (console.log("正在初始化播放器"), y("data", d)), w.value = !1, h.value = 0, E.value = 0, i.value ? (c.value = "", I(d)) : (console.log("wss未连接,开始连接"), X(null, d));
|
|
2067
2065
|
}
|
|
2068
2066
|
}, j = (d) => {
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
}, 1e3) : (
|
|
2067
|
+
Z.value = 0, D.value && clearInterval(D.value), C.value ? D.value = setInterval(() => {
|
|
2068
|
+
Y("startReading 开启本地轮训,等待ws链接断开"), Z.value++, C.value || (D.value && clearInterval(D.value), P(d)), Z.value > m.value && (Y("startReading 已停止轮训 ws 断开无响应 链接异常"), clearInterval(D.value), C.value && (C.value = !1, P(d)));
|
|
2069
|
+
}, 1e3) : (Y("组件开始播报"), P(d));
|
|
2072
2070
|
};
|
|
2073
2071
|
return Ge(
|
|
2074
2072
|
() => o.content,
|
|
@@ -2077,18 +2075,18 @@ const Rn = "/lxlicence", Sn = {
|
|
|
2077
2075
|
},
|
|
2078
2076
|
{ immediate: !1 }
|
|
2079
2077
|
), Te(async () => {
|
|
2080
|
-
g.value = Xe(), await
|
|
2078
|
+
g.value = Xe(), await cA(), y("init");
|
|
2081
2079
|
}), ye(() => {
|
|
2082
|
-
Q.value && (
|
|
2080
|
+
Q.value && (nA(), l.value && l.value.destroy(), Q.value.close());
|
|
2083
2081
|
}), e({
|
|
2084
2082
|
initAudioPlayer: y,
|
|
2085
|
-
getWssConnectStatus:
|
|
2086
|
-
stopAudioPlay:
|
|
2083
|
+
getWssConnectStatus: z,
|
|
2084
|
+
stopAudioPlay: gA,
|
|
2087
2085
|
startReading: j
|
|
2088
2086
|
}), (d, k) => (Ye(), Ue("div", On, [
|
|
2089
2087
|
zA(PA("video", {
|
|
2090
2088
|
id: "mouth_closed_media_player",
|
|
2091
|
-
src:
|
|
2089
|
+
src: tA.value,
|
|
2092
2090
|
playsinline: "",
|
|
2093
2091
|
muted: "",
|
|
2094
2092
|
loop: "",
|
|
@@ -2108,7 +2106,7 @@ const Rn = "/lxlicence", Sn = {
|
|
|
2108
2106
|
])
|
|
2109
2107
|
]));
|
|
2110
2108
|
}
|
|
2111
|
-
}),
|
|
2109
|
+
}), rA = /* @__PURE__ */ kn(Gn, [["__scopeId", "data-v-2e1d7506"]]), ke = "0.7.3", Oe = () => {
|
|
2112
2110
|
Function(`
|
|
2113
2111
|
window.console && console.log('%c灵犀数字人直播组件 iss-library-digital-video %cV${ke}', 'color: #3164F6;font-weight: 500;font-size: 12px;', 'color: #999;');
|
|
2114
2112
|
`)();
|
|
@@ -2121,10 +2119,10 @@ const Rn = "/lxlicence", Sn = {
|
|
|
2121
2119
|
version: ke
|
|
2122
2120
|
};
|
|
2123
2121
|
};
|
|
2124
|
-
|
|
2125
|
-
A.component(
|
|
2122
|
+
rA.install = (A, e = {}) => {
|
|
2123
|
+
A.component(rA.name, rA), Oe(), ve(e);
|
|
2126
2124
|
};
|
|
2127
|
-
const Tn = [
|
|
2125
|
+
const Tn = [rA], yn = (A, e = { components: [] }, t, n = !0) => {
|
|
2128
2126
|
e = {
|
|
2129
2127
|
components: [],
|
|
2130
2128
|
...e
|
|
@@ -2135,10 +2133,10 @@ const Tn = [oA], yn = (A, e = { components: [] }, t, n = !0) => {
|
|
|
2135
2133
|
}), Oe(), ve(e);
|
|
2136
2134
|
}, to = {
|
|
2137
2135
|
install: yn,
|
|
2138
|
-
CoreDigital:
|
|
2136
|
+
CoreDigital: rA
|
|
2139
2137
|
};
|
|
2140
2138
|
export {
|
|
2141
|
-
|
|
2139
|
+
rA as CoreDigital,
|
|
2142
2140
|
to as default,
|
|
2143
2141
|
yn as install
|
|
2144
2142
|
};
|