virtual-human-cf 1.4.0 → 1.5.0

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.
@@ -1,5 +1,5 @@
1
- import { defineComponent as Ze, ref as Q, watch as ne, onMounted as Ye, onUnmounted as et, openBlock as Fe, createBlock as At, Transition as Tt, withCtx as Ct, createElementBlock as Pt, normalizeStyle as xt, normalizeClass as _t, createElementVNode as ve, createCommentVNode as Nt, renderSlot as Ut } from "vue";
2
- const kt = ["src", "muted"], Ft = /* @__PURE__ */ Ze({
1
+ import { defineComponent as Ye, ref as Q, watch as ne, onMounted as et, onUnmounted as tt, openBlock as ve, createBlock as Tt, Transition as Ct, withCtx as Pt, createElementBlock as xt, normalizeStyle as _t, normalizeClass as Nt, createElementVNode as Be, createCommentVNode as Ut, renderSlot as kt } from "vue";
2
+ const Ft = ["src", "muted"], vt = /* @__PURE__ */ Ye({
3
3
  __name: "VirtualHumanPersona",
4
4
  props: {
5
5
  // 视频源URL
@@ -89,23 +89,23 @@ const kt = ["src", "muted"], Ft = /* @__PURE__ */ Ze({
89
89
  }, w = () => {
90
90
  r("update:isPlaying", !1), r("ended");
91
91
  };
92
- return Ye(() => {
92
+ return et(() => {
93
93
  n.isPlaying && s.value && s.value.play().catch((g) => console.error("Video play failed:", g)), n.screenClientId && n.wsUrl && d();
94
- }), et(() => {
94
+ }), tt(() => {
95
95
  o.value && o.value.close();
96
- }), (g, c) => (Fe(), At(Tt, { name: "fade" }, {
97
- default: Ct(() => [
98
- e.visible ? (Fe(), Pt("div", {
96
+ }), (g, c) => (ve(), Tt(Ct, { name: "fade" }, {
97
+ default: Pt(() => [
98
+ e.visible ? (ve(), xt("div", {
99
99
  key: 0,
100
- class: _t(["virtual-human-container", { "is-dark": e.isDark }]),
101
- style: xt(e.styles)
100
+ class: Nt(["virtual-human-container", { "is-dark": e.isDark }]),
101
+ style: _t(e.styles)
102
102
  }, [
103
- ve("div", {
103
+ Be("div", {
104
104
  class: "video-wrapper",
105
105
  ref_key: "wrapperRef",
106
106
  ref: i
107
107
  }, [
108
- ve("video", {
108
+ Be("video", {
109
109
  ref_key: "videoRef",
110
110
  ref: s,
111
111
  src: e.videoSrc,
@@ -118,42 +118,42 @@ const kt = ["src", "muted"], Ft = /* @__PURE__ */ Ze({
118
118
  onPlay: u,
119
119
  onPause: m,
120
120
  onEnded: w
121
- }, null, 40, kt)
121
+ }, null, 40, Ft)
122
122
  ], 512)
123
- ], 6)) : Nt("", !0)
123
+ ], 6)) : Ut("", !0)
124
124
  ]),
125
125
  _: 1
126
126
  }));
127
127
  }
128
- }), vt = (e, t) => {
128
+ }), Bt = (e, t) => {
129
129
  const n = e.__vccOpts || e;
130
130
  for (const [r, s] of t)
131
131
  n[r] = s;
132
132
  return n;
133
- }, Bt = /* @__PURE__ */ vt(Ft, [["__scopeId", "data-v-02ec3645"]]);
134
- function tt(e, t) {
133
+ }, It = /* @__PURE__ */ Bt(vt, [["__scopeId", "data-v-02ec3645"]]);
134
+ function nt(e, t) {
135
135
  return function() {
136
136
  return e.apply(t, arguments);
137
137
  };
138
138
  }
139
- const { toString: It } = Object.prototype, { getPrototypeOf: xe } = Object, { iterator: he, toStringTag: nt } = Symbol, me = /* @__PURE__ */ ((e) => (t) => {
140
- const n = It.call(t);
139
+ const { toString: Lt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: ye, toStringTag: rt } = Symbol, be = /* @__PURE__ */ ((e) => (t) => {
140
+ const n = Lt.call(t);
141
141
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
142
- })(/* @__PURE__ */ Object.create(null)), I = (e) => (e = e.toLowerCase(), (t) => me(t) === e), ye = (e) => (t) => typeof t === e, { isArray: Y } = Array, Z = ye("undefined");
142
+ })(/* @__PURE__ */ Object.create(null)), B = (e) => (e = e.toLowerCase(), (t) => be(t) === e), we = (e) => (t) => typeof t === e, { isArray: Y } = Array, Z = we("undefined");
143
143
  function re(e) {
144
144
  return e !== null && !Z(e) && e.constructor !== null && !Z(e.constructor) && N(e.constructor.isBuffer) && e.constructor.isBuffer(e);
145
145
  }
146
- const rt = I("ArrayBuffer");
147
- function Lt(e) {
146
+ const st = B("ArrayBuffer");
147
+ function Dt(e) {
148
148
  let t;
149
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && rt(e.buffer), t;
149
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && st(e.buffer), t;
150
150
  }
151
- const Dt = ye("string"), N = ye("function"), st = ye("number"), se = (e) => e !== null && typeof e == "object", jt = (e) => e === !0 || e === !1, ue = (e) => {
152
- if (me(e) !== "object")
151
+ const jt = we("string"), N = we("function"), ot = we("number"), se = (e) => e !== null && typeof e == "object", Ht = (e) => e === !0 || e === !1, de = (e) => {
152
+ if (be(e) !== "object")
153
153
  return !1;
154
- const t = xe(e);
155
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(nt in e) && !(he in e);
156
- }, Ht = (e) => {
154
+ const t = _e(e);
155
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(rt in e) && !(ye in e);
156
+ }, qt = (e) => {
157
157
  if (!se(e) || re(e))
158
158
  return !1;
159
159
  try {
@@ -161,20 +161,20 @@ const Dt = ye("string"), N = ye("function"), st = ye("number"), se = (e) => e !=
161
161
  } catch {
162
162
  return !1;
163
163
  }
164
- }, qt = I("Date"), Mt = I("File"), $t = (e) => !!(e && typeof e.uri < "u"), Vt = (e) => e && typeof e.getParts < "u", zt = I("Blob"), Wt = I("FileList"), Jt = (e) => se(e) && N(e.pipe);
165
- function Kt() {
164
+ }, Mt = B("Date"), $t = B("File"), Vt = (e) => !!(e && typeof e.uri < "u"), zt = (e) => e && typeof e.getParts < "u", Wt = B("Blob"), Jt = B("FileList"), Kt = (e) => se(e) && N(e.pipe);
165
+ function Xt() {
166
166
  return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
167
167
  }
168
- const Be = Kt(), Ie = typeof Be.FormData < "u" ? Be.FormData : void 0, Xt = (e) => {
168
+ const Ie = Xt(), Le = typeof Ie.FormData < "u" ? Ie.FormData : void 0, Gt = (e) => {
169
169
  let t;
170
- return e && (Ie && e instanceof Ie || N(e.append) && ((t = me(e)) === "formdata" || // detect form-data instance
170
+ return e && (Le && e instanceof Le || N(e.append) && ((t = be(e)) === "formdata" || // detect form-data instance
171
171
  t === "object" && N(e.toString) && e.toString() === "[object FormData]"));
172
- }, Gt = I("URLSearchParams"), [Qt, Zt, Yt, en] = [
172
+ }, Qt = B("URLSearchParams"), [Zt, Yt, en, tn] = [
173
173
  "ReadableStream",
174
174
  "Request",
175
175
  "Response",
176
176
  "Headers"
177
- ].map(I), tn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
177
+ ].map(B), nn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
178
178
  function oe(e, t, { allOwnKeys: n = !1 } = {}) {
179
179
  if (e === null || typeof e > "u")
180
180
  return;
@@ -191,7 +191,7 @@ function oe(e, t, { allOwnKeys: n = !1 } = {}) {
191
191
  a = i[r], t.call(null, e[a], a, e);
192
192
  }
193
193
  }
194
- function ot(e, t) {
194
+ function it(e, t) {
195
195
  if (re(e))
196
196
  return null;
197
197
  t = t.toLowerCase();
@@ -202,23 +202,23 @@ function ot(e, t) {
202
202
  return s;
203
203
  return null;
204
204
  }
205
- const W = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, it = (e) => !Z(e) && e !== W;
206
- function Ae() {
207
- const { caseless: e, skipUndefined: t } = it(this) && this || {}, n = {}, r = (s, i) => {
205
+ const W = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, at = (e) => !Z(e) && e !== W;
206
+ function Te() {
207
+ const { caseless: e, skipUndefined: t } = at(this) && this || {}, n = {}, r = (s, i) => {
208
208
  if (i === "__proto__" || i === "constructor" || i === "prototype")
209
209
  return;
210
- const o = e && ot(n, i) || i;
211
- ue(n[o]) && ue(s) ? n[o] = Ae(n[o], s) : ue(s) ? n[o] = Ae({}, s) : Y(s) ? n[o] = s.slice() : (!t || !Z(s)) && (n[o] = s);
210
+ const o = e && it(n, i) || i;
211
+ de(n[o]) && de(s) ? n[o] = Te(n[o], s) : de(s) ? n[o] = Te({}, s) : Y(s) ? n[o] = s.slice() : (!t || !Z(s)) && (n[o] = s);
212
212
  };
213
213
  for (let s = 0, i = arguments.length; s < i; s++)
214
214
  arguments[s] && oe(arguments[s], r);
215
215
  return n;
216
216
  }
217
- const nn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
217
+ const rn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
218
218
  t,
219
219
  (s, i) => {
220
220
  n && N(s) ? Object.defineProperty(e, i, {
221
- value: tt(s, n),
221
+ value: nt(s, n),
222
222
  writable: !0,
223
223
  enumerable: !0,
224
224
  configurable: !0
@@ -230,7 +230,7 @@ const nn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
230
230
  });
231
231
  },
232
232
  { allOwnKeys: r }
233
- ), e), rn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), sn = (e, t, n, r) => {
233
+ ), e), sn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), on = (e, t, n, r) => {
234
234
  e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
235
235
  value: e,
236
236
  writable: !0,
@@ -239,52 +239,52 @@ const nn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
239
239
  }), Object.defineProperty(e, "super", {
240
240
  value: t.prototype
241
241
  }), n && Object.assign(e.prototype, n);
242
- }, on = (e, t, n, r) => {
242
+ }, an = (e, t, n, r) => {
243
243
  let s, i, o;
244
244
  const a = {};
245
245
  if (t = t || {}, e == null) return t;
246
246
  do {
247
247
  for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
248
248
  o = s[i], (!r || r(o, e, t)) && !a[o] && (t[o] = e[o], a[o] = !0);
249
- e = n !== !1 && xe(e);
249
+ e = n !== !1 && _e(e);
250
250
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
251
251
  return t;
252
- }, an = (e, t, n) => {
252
+ }, ln = (e, t, n) => {
253
253
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
254
254
  const r = e.indexOf(t, n);
255
255
  return r !== -1 && r === n;
256
- }, ln = (e) => {
256
+ }, cn = (e) => {
257
257
  if (!e) return null;
258
258
  if (Y(e)) return e;
259
259
  let t = e.length;
260
- if (!st(t)) return null;
260
+ if (!ot(t)) return null;
261
261
  const n = new Array(t);
262
262
  for (; t-- > 0; )
263
263
  n[t] = e[t];
264
264
  return n;
265
- }, cn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && xe(Uint8Array)), un = (e, t) => {
266
- const r = (e && e[he]).call(e);
265
+ }, un = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), fn = (e, t) => {
266
+ const r = (e && e[ye]).call(e);
267
267
  let s;
268
268
  for (; (s = r.next()) && !s.done; ) {
269
269
  const i = s.value;
270
270
  t.call(e, i[0], i[1]);
271
271
  }
272
- }, fn = (e, t) => {
272
+ }, dn = (e, t) => {
273
273
  let n;
274
274
  const r = [];
275
275
  for (; (n = e.exec(t)) !== null; )
276
276
  r.push(n);
277
277
  return r;
278
- }, dn = I("HTMLFormElement"), pn = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
278
+ }, pn = B("HTMLFormElement"), hn = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
279
279
  return r.toUpperCase() + s;
280
- }), Le = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), hn = I("RegExp"), at = (e, t) => {
280
+ }), De = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), mn = B("RegExp"), lt = (e, t) => {
281
281
  const n = Object.getOwnPropertyDescriptors(e), r = {};
282
282
  oe(n, (s, i) => {
283
283
  let o;
284
284
  (o = t(s, i, e)) !== !1 && (r[i] = o || s);
285
285
  }), Object.defineProperties(e, r);
286
- }, mn = (e) => {
287
- at(e, (t, n) => {
286
+ }, yn = (e) => {
287
+ lt(e, (t, n) => {
288
288
  if (N(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
289
289
  return !1;
290
290
  const r = e[n];
@@ -298,19 +298,19 @@ const nn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
298
298
  });
299
299
  }
300
300
  });
301
- }, yn = (e, t) => {
301
+ }, bn = (e, t) => {
302
302
  const n = {}, r = (s) => {
303
303
  s.forEach((i) => {
304
304
  n[i] = !0;
305
305
  });
306
306
  };
307
307
  return Y(e) ? r(e) : r(String(e).split(t)), n;
308
- }, bn = () => {
309
- }, wn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
310
- function gn(e) {
311
- return !!(e && N(e.append) && e[nt] === "FormData" && e[he]);
308
+ }, wn = () => {
309
+ }, gn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
310
+ function En(e) {
311
+ return !!(e && N(e.append) && e[rt] === "FormData" && e[ye]);
312
312
  }
313
- const En = (e) => {
313
+ const Rn = (e) => {
314
314
  const t = new Array(10), n = (r, s) => {
315
315
  if (se(r)) {
316
316
  if (t.indexOf(r) >= 0)
@@ -329,7 +329,7 @@ const En = (e) => {
329
329
  return r;
330
330
  };
331
331
  return n(e, 0);
332
- }, Rn = I("AsyncFunction"), Sn = (e) => e && (se(e) || N(e)) && N(e.then) && N(e.catch), lt = ((e, t) => e ? setImmediate : t ? ((n, r) => (W.addEventListener(
332
+ }, Sn = B("AsyncFunction"), On = (e) => e && (se(e) || N(e)) && N(e.then) && N(e.catch), ct = ((e, t) => e ? setImmediate : t ? ((n, r) => (W.addEventListener(
333
333
  "message",
334
334
  ({ source: s, data: i }) => {
335
335
  s === W && i === n && r.length && r.shift()();
@@ -337,71 +337,71 @@ const En = (e) => {
337
337
  !1
338
338
  ), (s) => {
339
339
  r.push(s), W.postMessage(n, "*");
340
- }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", N(W.postMessage)), On = typeof queueMicrotask < "u" ? queueMicrotask.bind(W) : typeof process < "u" && process.nextTick || lt, An = (e) => e != null && N(e[he]), l = {
340
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", N(W.postMessage)), An = typeof queueMicrotask < "u" ? queueMicrotask.bind(W) : typeof process < "u" && process.nextTick || ct, Tn = (e) => e != null && N(e[ye]), l = {
341
341
  isArray: Y,
342
- isArrayBuffer: rt,
342
+ isArrayBuffer: st,
343
343
  isBuffer: re,
344
- isFormData: Xt,
345
- isArrayBufferView: Lt,
346
- isString: Dt,
347
- isNumber: st,
348
- isBoolean: jt,
344
+ isFormData: Gt,
345
+ isArrayBufferView: Dt,
346
+ isString: jt,
347
+ isNumber: ot,
348
+ isBoolean: Ht,
349
349
  isObject: se,
350
- isPlainObject: ue,
351
- isEmptyObject: Ht,
352
- isReadableStream: Qt,
353
- isRequest: Zt,
354
- isResponse: Yt,
355
- isHeaders: en,
350
+ isPlainObject: de,
351
+ isEmptyObject: qt,
352
+ isReadableStream: Zt,
353
+ isRequest: Yt,
354
+ isResponse: en,
355
+ isHeaders: tn,
356
356
  isUndefined: Z,
357
- isDate: qt,
358
- isFile: Mt,
359
- isReactNativeBlob: $t,
360
- isReactNative: Vt,
361
- isBlob: zt,
362
- isRegExp: hn,
357
+ isDate: Mt,
358
+ isFile: $t,
359
+ isReactNativeBlob: Vt,
360
+ isReactNative: zt,
361
+ isBlob: Wt,
362
+ isRegExp: mn,
363
363
  isFunction: N,
364
- isStream: Jt,
365
- isURLSearchParams: Gt,
366
- isTypedArray: cn,
367
- isFileList: Wt,
364
+ isStream: Kt,
365
+ isURLSearchParams: Qt,
366
+ isTypedArray: un,
367
+ isFileList: Jt,
368
368
  forEach: oe,
369
- merge: Ae,
370
- extend: nn,
371
- trim: tn,
372
- stripBOM: rn,
373
- inherits: sn,
374
- toFlatObject: on,
375
- kindOf: me,
376
- kindOfTest: I,
377
- endsWith: an,
378
- toArray: ln,
379
- forEachEntry: un,
380
- matchAll: fn,
381
- isHTMLForm: dn,
382
- hasOwnProperty: Le,
383
- hasOwnProp: Le,
369
+ merge: Te,
370
+ extend: rn,
371
+ trim: nn,
372
+ stripBOM: sn,
373
+ inherits: on,
374
+ toFlatObject: an,
375
+ kindOf: be,
376
+ kindOfTest: B,
377
+ endsWith: ln,
378
+ toArray: cn,
379
+ forEachEntry: fn,
380
+ matchAll: dn,
381
+ isHTMLForm: pn,
382
+ hasOwnProperty: De,
383
+ hasOwnProp: De,
384
384
  // an alias to avoid ESLint no-prototype-builtins detection
385
- reduceDescriptors: at,
386
- freezeMethods: mn,
387
- toObjectSet: yn,
388
- toCamelCase: pn,
389
- noop: bn,
390
- toFiniteNumber: wn,
391
- findKey: ot,
385
+ reduceDescriptors: lt,
386
+ freezeMethods: yn,
387
+ toObjectSet: bn,
388
+ toCamelCase: hn,
389
+ noop: wn,
390
+ toFiniteNumber: gn,
391
+ findKey: it,
392
392
  global: W,
393
- isContextDefined: it,
394
- isSpecCompliantForm: gn,
395
- toJSONObject: En,
396
- isAsyncFn: Rn,
397
- isThenable: Sn,
398
- setImmediate: lt,
399
- asap: On,
400
- isIterable: An
393
+ isContextDefined: at,
394
+ isSpecCompliantForm: En,
395
+ toJSONObject: Rn,
396
+ isAsyncFn: Sn,
397
+ isThenable: On,
398
+ setImmediate: ct,
399
+ asap: An,
400
+ isIterable: Tn
401
401
  };
402
- let y = class ct extends Error {
402
+ let b = class ut extends Error {
403
403
  static from(t, n, r, s, i, o) {
404
- const a = new ct(t.message, n || t.code, r, s, i);
404
+ const a = new ut(t.message, n || t.code, r, s, i);
405
405
  return a.cause = t, a.name = t.name, t.status != null && a.status == null && (a.status = t.status), o && Object.assign(a, o), a;
406
406
  }
407
407
  /**
@@ -443,37 +443,37 @@ let y = class ct extends Error {
443
443
  };
444
444
  }
445
445
  };
446
- y.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
447
- y.ERR_BAD_OPTION = "ERR_BAD_OPTION";
448
- y.ECONNABORTED = "ECONNABORTED";
449
- y.ETIMEDOUT = "ETIMEDOUT";
450
- y.ERR_NETWORK = "ERR_NETWORK";
451
- y.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
452
- y.ERR_DEPRECATED = "ERR_DEPRECATED";
453
- y.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
454
- y.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
455
- y.ERR_CANCELED = "ERR_CANCELED";
456
- y.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
457
- y.ERR_INVALID_URL = "ERR_INVALID_URL";
458
- const Tn = null;
459
- function Te(e) {
446
+ b.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
447
+ b.ERR_BAD_OPTION = "ERR_BAD_OPTION";
448
+ b.ECONNABORTED = "ECONNABORTED";
449
+ b.ETIMEDOUT = "ETIMEDOUT";
450
+ b.ERR_NETWORK = "ERR_NETWORK";
451
+ b.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
452
+ b.ERR_DEPRECATED = "ERR_DEPRECATED";
453
+ b.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
454
+ b.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
455
+ b.ERR_CANCELED = "ERR_CANCELED";
456
+ b.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
457
+ b.ERR_INVALID_URL = "ERR_INVALID_URL";
458
+ const Cn = null;
459
+ function Ce(e) {
460
460
  return l.isPlainObject(e) || l.isArray(e);
461
461
  }
462
- function ut(e) {
462
+ function ft(e) {
463
463
  return l.endsWith(e, "[]") ? e.slice(0, -2) : e;
464
464
  }
465
- function ge(e, t, n) {
465
+ function Re(e, t, n) {
466
466
  return e ? e.concat(t).map(function(s, i) {
467
- return s = ut(s), !n && i ? "[" + s + "]" : s;
467
+ return s = ft(s), !n && i ? "[" + s + "]" : s;
468
468
  }).join(n ? "." : "") : t;
469
469
  }
470
- function Cn(e) {
471
- return l.isArray(e) && !e.some(Te);
470
+ function Pn(e) {
471
+ return l.isArray(e) && !e.some(Ce);
472
472
  }
473
- const Pn = l.toFlatObject(l, {}, null, function(t) {
473
+ const xn = l.toFlatObject(l, {}, null, function(t) {
474
474
  return /^is[A-Z]/.test(t);
475
475
  });
476
- function be(e, t, n) {
476
+ function ge(e, t, n) {
477
477
  if (!l.isObject(e))
478
478
  throw new TypeError("target must be an object");
479
479
  t = t || new FormData(), n = l.toFlatObject(
@@ -498,38 +498,38 @@ function be(e, t, n) {
498
498
  if (l.isBoolean(c))
499
499
  return c.toString();
500
500
  if (!d && l.isBlob(c))
501
- throw new y("Blob is not supported. Use a Buffer instead.");
501
+ throw new b("Blob is not supported. Use a Buffer instead.");
502
502
  return l.isArrayBuffer(c) || l.isTypedArray(c) ? d && typeof Blob == "function" ? new Blob([c]) : Buffer.from(c) : c;
503
503
  }
504
504
  function u(c, p, h) {
505
- let S = c;
505
+ let R = c;
506
506
  if (l.isReactNative(t) && l.isReactNativeBlob(c))
507
- return t.append(ge(h, p, i), f(c)), !1;
507
+ return t.append(Re(h, p, i), f(c)), !1;
508
508
  if (c && !h && typeof c == "object") {
509
509
  if (l.endsWith(p, "{}"))
510
510
  p = r ? p : p.slice(0, -2), c = JSON.stringify(c);
511
- else if (l.isArray(c) && Cn(c) || (l.isFileList(c) || l.endsWith(p, "[]")) && (S = l.toArray(c)))
512
- return p = ut(p), S.forEach(function(O, T) {
513
- !(l.isUndefined(O) || O === null) && t.append(
511
+ else if (l.isArray(c) && Pn(c) || (l.isFileList(c) || l.endsWith(p, "[]")) && (R = l.toArray(c)))
512
+ return p = ft(p), R.forEach(function(A, T) {
513
+ !(l.isUndefined(A) || A === null) && t.append(
514
514
  // eslint-disable-next-line no-nested-ternary
515
- o === !0 ? ge([p], T, i) : o === null ? p : p + "[]",
516
- f(O)
515
+ o === !0 ? Re([p], T, i) : o === null ? p : p + "[]",
516
+ f(A)
517
517
  );
518
518
  }), !1;
519
519
  }
520
- return Te(c) ? !0 : (t.append(ge(h, p, i), f(c)), !1);
520
+ return Ce(c) ? !0 : (t.append(Re(h, p, i), f(c)), !1);
521
521
  }
522
- const m = [], w = Object.assign(Pn, {
522
+ const m = [], w = Object.assign(xn, {
523
523
  defaultVisitor: u,
524
524
  convertValue: f,
525
- isVisitable: Te
525
+ isVisitable: Ce
526
526
  });
527
527
  function g(c, p) {
528
528
  if (!l.isUndefined(c)) {
529
529
  if (m.indexOf(c) !== -1)
530
530
  throw Error("Circular reference detected in " + p.join("."));
531
- m.push(c), l.forEach(c, function(S, k) {
532
- (!(l.isUndefined(S) || S === null) && s.call(t, S, l.isString(k) ? k.trim() : k, p, w)) === !0 && g(S, p ? p.concat(k) : [k]);
531
+ m.push(c), l.forEach(c, function(R, k) {
532
+ (!(l.isUndefined(R) || R === null) && s.call(t, R, l.isString(k) ? k.trim() : k, p, w)) === !0 && g(R, p ? p.concat(k) : [k]);
533
533
  }), m.pop();
534
534
  }
535
535
  }
@@ -537,7 +537,7 @@ function be(e, t, n) {
537
537
  throw new TypeError("data must be an object");
538
538
  return g(e), t;
539
539
  }
540
- function De(e) {
540
+ function je(e) {
541
541
  const t = {
542
542
  "!": "%21",
543
543
  "'": "%27",
@@ -551,38 +551,38 @@ function De(e) {
551
551
  return t[r];
552
552
  });
553
553
  }
554
- function _e(e, t) {
555
- this._pairs = [], e && be(e, this, t);
554
+ function Ne(e, t) {
555
+ this._pairs = [], e && ge(e, this, t);
556
556
  }
557
- const ft = _e.prototype;
558
- ft.append = function(t, n) {
557
+ const dt = Ne.prototype;
558
+ dt.append = function(t, n) {
559
559
  this._pairs.push([t, n]);
560
560
  };
561
- ft.toString = function(t) {
561
+ dt.toString = function(t) {
562
562
  const n = t ? function(r) {
563
- return t.call(this, r, De);
564
- } : De;
563
+ return t.call(this, r, je);
564
+ } : je;
565
565
  return this._pairs.map(function(s) {
566
566
  return n(s[0]) + "=" + n(s[1]);
567
567
  }, "").join("&");
568
568
  };
569
- function xn(e) {
569
+ function _n(e) {
570
570
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
571
571
  }
572
- function dt(e, t, n) {
572
+ function pt(e, t, n) {
573
573
  if (!t)
574
574
  return e;
575
- const r = n && n.encode || xn, s = l.isFunction(n) ? {
575
+ const r = n && n.encode || _n, s = l.isFunction(n) ? {
576
576
  serialize: n
577
577
  } : n, i = s && s.serialize;
578
578
  let o;
579
- if (i ? o = i(t, s) : o = l.isURLSearchParams(t) ? t.toString() : new _e(t, s).toString(r), o) {
579
+ if (i ? o = i(t, s) : o = l.isURLSearchParams(t) ? t.toString() : new Ne(t, s).toString(r), o) {
580
580
  const a = e.indexOf("#");
581
581
  a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
582
582
  }
583
583
  return e;
584
584
  }
585
- class je {
585
+ class He {
586
586
  constructor() {
587
587
  this.handlers = [];
588
588
  }
@@ -637,43 +637,43 @@ class je {
637
637
  });
638
638
  }
639
639
  }
640
- const Ne = {
640
+ const Ue = {
641
641
  silentJSONParsing: !0,
642
642
  forcedJSONParsing: !0,
643
643
  clarifyTimeoutError: !1,
644
644
  legacyInterceptorReqResOrdering: !0
645
- }, _n = typeof URLSearchParams < "u" ? URLSearchParams : _e, Nn = typeof FormData < "u" ? FormData : null, Un = typeof Blob < "u" ? Blob : null, kn = {
645
+ }, Nn = typeof URLSearchParams < "u" ? URLSearchParams : Ne, Un = typeof FormData < "u" ? FormData : null, kn = typeof Blob < "u" ? Blob : null, Fn = {
646
646
  isBrowser: !0,
647
647
  classes: {
648
- URLSearchParams: _n,
649
- FormData: Nn,
650
- Blob: Un
648
+ URLSearchParams: Nn,
649
+ FormData: Un,
650
+ Blob: kn
651
651
  },
652
652
  protocols: ["http", "https", "file", "blob", "url", "data"]
653
- }, Ue = typeof window < "u" && typeof document < "u", Ce = typeof navigator == "object" && navigator || void 0, Fn = Ue && (!Ce || ["ReactNative", "NativeScript", "NS"].indexOf(Ce.product) < 0), vn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
654
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Bn = Ue && window.location.href || "http://localhost", In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
653
+ }, ke = typeof window < "u" && typeof document < "u", Pe = typeof navigator == "object" && navigator || void 0, vn = ke && (!Pe || ["ReactNative", "NativeScript", "NS"].indexOf(Pe.product) < 0), Bn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
654
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", In = ke && window.location.href || "http://localhost", Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
655
655
  __proto__: null,
656
- hasBrowserEnv: Ue,
657
- hasStandardBrowserEnv: Fn,
658
- hasStandardBrowserWebWorkerEnv: vn,
659
- navigator: Ce,
660
- origin: Bn
661
- }, Symbol.toStringTag, { value: "Module" })), x = {
662
- ...In,
663
- ...kn
656
+ hasBrowserEnv: ke,
657
+ hasStandardBrowserEnv: vn,
658
+ hasStandardBrowserWebWorkerEnv: Bn,
659
+ navigator: Pe,
660
+ origin: In
661
+ }, Symbol.toStringTag, { value: "Module" })), P = {
662
+ ...Ln,
663
+ ...Fn
664
664
  };
665
- function Ln(e, t) {
666
- return be(e, new x.classes.URLSearchParams(), {
665
+ function Dn(e, t) {
666
+ return ge(e, new P.classes.URLSearchParams(), {
667
667
  visitor: function(n, r, s, i) {
668
- return x.isNode && l.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
668
+ return P.isNode && l.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
669
669
  },
670
670
  ...t
671
671
  });
672
672
  }
673
- function Dn(e) {
673
+ function jn(e) {
674
674
  return l.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
675
675
  }
676
- function jn(e) {
676
+ function Hn(e) {
677
677
  const t = {}, n = Object.keys(e);
678
678
  let r;
679
679
  const s = n.length;
@@ -682,22 +682,22 @@ function jn(e) {
682
682
  i = n[r], t[i] = e[i];
683
683
  return t;
684
684
  }
685
- function pt(e) {
685
+ function ht(e) {
686
686
  function t(n, r, s, i) {
687
687
  let o = n[i++];
688
688
  if (o === "__proto__") return !0;
689
689
  const a = Number.isFinite(+o), d = i >= n.length;
690
- return o = !o && l.isArray(s) ? s.length : o, d ? (l.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !l.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && l.isArray(s[o]) && (s[o] = jn(s[o])), !a);
690
+ return o = !o && l.isArray(s) ? s.length : o, d ? (l.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !l.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && l.isArray(s[o]) && (s[o] = Hn(s[o])), !a);
691
691
  }
692
692
  if (l.isFormData(e) && l.isFunction(e.entries)) {
693
693
  const n = {};
694
694
  return l.forEachEntry(e, (r, s) => {
695
- t(Dn(r), s, n, 0);
695
+ t(jn(r), s, n, 0);
696
696
  }), n;
697
697
  }
698
698
  return null;
699
699
  }
700
- function Hn(e, t, n) {
700
+ function qn(e, t, n) {
701
701
  if (l.isString(e))
702
702
  try {
703
703
  return (t || JSON.parse)(e), l.trim(e);
@@ -708,13 +708,13 @@ function Hn(e, t, n) {
708
708
  return (n || JSON.stringify)(e);
709
709
  }
710
710
  const ie = {
711
- transitional: Ne,
711
+ transitional: Ue,
712
712
  adapter: ["xhr", "http", "fetch"],
713
713
  transformRequest: [
714
714
  function(t, n) {
715
715
  const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = l.isObject(t);
716
716
  if (i && l.isHTMLForm(t) && (t = new FormData(t)), l.isFormData(t))
717
- return s ? JSON.stringify(pt(t)) : t;
717
+ return s ? JSON.stringify(ht(t)) : t;
718
718
  if (l.isArrayBuffer(t) || l.isBuffer(t) || l.isStream(t) || l.isFile(t) || l.isBlob(t) || l.isReadableStream(t))
719
719
  return t;
720
720
  if (l.isArrayBufferView(t))
@@ -724,17 +724,17 @@ const ie = {
724
724
  let a;
725
725
  if (i) {
726
726
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
727
- return Ln(t, this.formSerializer).toString();
727
+ return Dn(t, this.formSerializer).toString();
728
728
  if ((a = l.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
729
729
  const d = this.env && this.env.FormData;
730
- return be(
730
+ return ge(
731
731
  a ? { "files[]": t } : t,
732
732
  d && new d(),
733
733
  this.formSerializer
734
734
  );
735
735
  }
736
736
  }
737
- return i || s ? (n.setContentType("application/json", !1), Hn(t)) : t;
737
+ return i || s ? (n.setContentType("application/json", !1), qn(t)) : t;
738
738
  }
739
739
  ],
740
740
  transformResponse: [
@@ -748,7 +748,7 @@ const ie = {
748
748
  return JSON.parse(t, this.parseReviver);
749
749
  } catch (a) {
750
750
  if (o)
751
- throw a.name === "SyntaxError" ? y.from(a, y.ERR_BAD_RESPONSE, this, null, this.response) : a;
751
+ throw a.name === "SyntaxError" ? b.from(a, b.ERR_BAD_RESPONSE, this, null, this.response) : a;
752
752
  }
753
753
  }
754
754
  return t;
@@ -764,8 +764,8 @@ const ie = {
764
764
  maxContentLength: -1,
765
765
  maxBodyLength: -1,
766
766
  env: {
767
- FormData: x.classes.FormData,
768
- Blob: x.classes.Blob
767
+ FormData: P.classes.FormData,
768
+ Blob: P.classes.Blob
769
769
  },
770
770
  validateStatus: function(t) {
771
771
  return t >= 200 && t < 300;
@@ -780,7 +780,7 @@ const ie = {
780
780
  l.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
781
781
  ie.headers[e] = {};
782
782
  });
783
- const qn = l.toObjectSet([
783
+ const Mn = l.toObjectSet([
784
784
  "age",
785
785
  "authorization",
786
786
  "content-length",
@@ -798,29 +798,29 @@ const qn = l.toObjectSet([
798
798
  "referer",
799
799
  "retry-after",
800
800
  "user-agent"
801
- ]), Mn = (e) => {
801
+ ]), $n = (e) => {
802
802
  const t = {};
803
803
  let n, r, s;
804
804
  return e && e.split(`
805
805
  `).forEach(function(o) {
806
- s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && qn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
806
+ s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Mn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
807
807
  }), t;
808
- }, He = Symbol("internals");
808
+ }, qe = Symbol("internals");
809
809
  function te(e) {
810
810
  return e && String(e).trim().toLowerCase();
811
811
  }
812
- function fe(e) {
813
- return e === !1 || e == null ? e : l.isArray(e) ? e.map(fe) : String(e).replace(/[\r\n]+$/, "");
812
+ function pe(e) {
813
+ return e === !1 || e == null ? e : l.isArray(e) ? e.map(pe) : String(e).replace(/[\r\n]+$/, "");
814
814
  }
815
- function $n(e) {
815
+ function Vn(e) {
816
816
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
817
817
  let r;
818
818
  for (; r = n.exec(e); )
819
819
  t[r[1]] = r[2];
820
820
  return t;
821
821
  }
822
- const Vn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
823
- function Ee(e, t, n, r, s) {
822
+ const zn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
823
+ function Se(e, t, n, r, s) {
824
824
  if (l.isFunction(r))
825
825
  return r.call(this, t, n);
826
826
  if (s && (t = n), !!l.isString(t)) {
@@ -830,10 +830,10 @@ function Ee(e, t, n, r, s) {
830
830
  return r.test(t);
831
831
  }
832
832
  }
833
- function zn(e) {
833
+ function Wn(e) {
834
834
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
835
835
  }
836
- function Wn(e, t) {
836
+ function Jn(e, t) {
837
837
  const n = l.toCamelCase(" " + t);
838
838
  ["get", "set", "has"].forEach((r) => {
839
839
  Object.defineProperty(e, r + n, {
@@ -855,13 +855,13 @@ let U = class {
855
855
  if (!u)
856
856
  throw new Error("header name must be a non-empty string");
857
857
  const m = l.findKey(s, u);
858
- (!m || s[m] === void 0 || f === !0 || f === void 0 && s[m] !== !1) && (s[m || d] = fe(a));
858
+ (!m || s[m] === void 0 || f === !0 || f === void 0 && s[m] !== !1) && (s[m || d] = pe(a));
859
859
  }
860
860
  const o = (a, d) => l.forEach(a, (f, u) => i(f, u, d));
861
861
  if (l.isPlainObject(t) || t instanceof this.constructor)
862
862
  o(t, n);
863
- else if (l.isString(t) && (t = t.trim()) && !Vn(t))
864
- o(Mn(t), n);
863
+ else if (l.isString(t) && (t = t.trim()) && !zn(t))
864
+ o($n(t), n);
865
865
  else if (l.isObject(t) && l.isIterable(t)) {
866
866
  let a = {}, d, f;
867
867
  for (const u of t) {
@@ -882,7 +882,7 @@ let U = class {
882
882
  if (!n)
883
883
  return s;
884
884
  if (n === !0)
885
- return $n(s);
885
+ return Vn(s);
886
886
  if (l.isFunction(n))
887
887
  return n.call(this, s, r);
888
888
  if (l.isRegExp(n))
@@ -894,7 +894,7 @@ let U = class {
894
894
  has(t, n) {
895
895
  if (t = te(t), t) {
896
896
  const r = l.findKey(this, t);
897
- return !!(r && this[r] !== void 0 && (!n || Ee(this, this[r], r, n)));
897
+ return !!(r && this[r] !== void 0 && (!n || Se(this, this[r], r, n)));
898
898
  }
899
899
  return !1;
900
900
  }
@@ -904,7 +904,7 @@ let U = class {
904
904
  function i(o) {
905
905
  if (o = te(o), o) {
906
906
  const a = l.findKey(r, o);
907
- a && (!n || Ee(r, r[a], a, n)) && (delete r[a], s = !0);
907
+ a && (!n || Se(r, r[a], a, n)) && (delete r[a], s = !0);
908
908
  }
909
909
  }
910
910
  return l.isArray(t) ? t.forEach(i) : i(t), s;
@@ -914,7 +914,7 @@ let U = class {
914
914
  let r = n.length, s = !1;
915
915
  for (; r--; ) {
916
916
  const i = n[r];
917
- (!t || Ee(this, this[i], i, t, !0)) && (delete this[i], s = !0);
917
+ (!t || Se(this, this[i], i, t, !0)) && (delete this[i], s = !0);
918
918
  }
919
919
  return s;
920
920
  }
@@ -923,11 +923,11 @@ let U = class {
923
923
  return l.forEach(this, (s, i) => {
924
924
  const o = l.findKey(r, i);
925
925
  if (o) {
926
- n[o] = fe(s), delete n[i];
926
+ n[o] = pe(s), delete n[i];
927
927
  return;
928
928
  }
929
- const a = t ? zn(i) : String(i).trim();
930
- a !== i && delete n[i], n[a] = fe(s), r[a] = !0;
929
+ const a = t ? Wn(i) : String(i).trim();
930
+ a !== i && delete n[i], n[a] = pe(s), r[a] = !0;
931
931
  }), this;
932
932
  }
933
933
  concat(...t) {
@@ -960,12 +960,12 @@ let U = class {
960
960
  return n.forEach((s) => r.set(s)), r;
961
961
  }
962
962
  static accessor(t) {
963
- const r = (this[He] = this[He] = {
963
+ const r = (this[qe] = this[qe] = {
964
964
  accessors: {}
965
965
  }).accessors, s = this.prototype;
966
966
  function i(o) {
967
967
  const a = te(o);
968
- r[a] || (Wn(s, o), r[a] = !0);
968
+ r[a] || (Jn(s, o), r[a] = !0);
969
969
  }
970
970
  return l.isArray(t) ? t.forEach(i) : i(t), this;
971
971
  }
@@ -988,17 +988,17 @@ l.reduceDescriptors(U.prototype, ({ value: e }, t) => {
988
988
  };
989
989
  });
990
990
  l.freezeMethods(U);
991
- function Re(e, t) {
991
+ function Oe(e, t) {
992
992
  const n = this || ie, r = t || n, s = U.from(r.headers);
993
993
  let i = r.data;
994
994
  return l.forEach(e, function(a) {
995
995
  i = a.call(n, i, s.normalize(), t ? t.status : void 0);
996
996
  }), s.normalize(), i;
997
997
  }
998
- function ht(e) {
998
+ function mt(e) {
999
999
  return !!(e && e.__CANCEL__);
1000
1000
  }
1001
- let ae = class extends y {
1001
+ let ae = class extends b {
1002
1002
  /**
1003
1003
  * A `CanceledError` is an object that is thrown when an operation is canceled.
1004
1004
  *
@@ -1009,26 +1009,26 @@ let ae = class extends y {
1009
1009
  * @returns {CanceledError} The created error.
1010
1010
  */
1011
1011
  constructor(t, n, r) {
1012
- super(t ?? "canceled", y.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
1012
+ super(t ?? "canceled", b.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
1013
1013
  }
1014
1014
  };
1015
- function mt(e, t, n) {
1015
+ function yt(e, t, n) {
1016
1016
  const r = n.config.validateStatus;
1017
1017
  !n.status || !r || r(n.status) ? e(n) : t(
1018
- new y(
1018
+ new b(
1019
1019
  "Request failed with status code " + n.status,
1020
- [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1020
+ [b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1021
1021
  n.config,
1022
1022
  n.request,
1023
1023
  n
1024
1024
  )
1025
1025
  );
1026
1026
  }
1027
- function Jn(e) {
1027
+ function Kn(e) {
1028
1028
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1029
1029
  return t && t[1] || "";
1030
1030
  }
1031
- function Kn(e, t) {
1031
+ function Xn(e, t) {
1032
1032
  e = e || 10;
1033
1033
  const n = new Array(e), r = new Array(e);
1034
1034
  let s = 0, i = 0, o;
@@ -1044,7 +1044,7 @@ function Kn(e, t) {
1044
1044
  return g ? Math.round(w * 1e3 / g) : void 0;
1045
1045
  };
1046
1046
  }
1047
- function Xn(e, t) {
1047
+ function Gn(e, t) {
1048
1048
  let n = 0, r = 1e3 / t, s, i;
1049
1049
  const o = (f, u = Date.now()) => {
1050
1050
  n = u, s = null, i && (clearTimeout(i), i = null), e(...f);
@@ -1056,10 +1056,10 @@ function Xn(e, t) {
1056
1056
  }, r - m)));
1057
1057
  }, () => s && o(s)];
1058
1058
  }
1059
- const pe = (e, t, n = 3) => {
1059
+ const me = (e, t, n = 3) => {
1060
1060
  let r = 0;
1061
- const s = Kn(50, 250);
1062
- return Xn((i) => {
1061
+ const s = Xn(50, 250);
1062
+ return Gn((i) => {
1063
1063
  const o = i.loaded, a = i.lengthComputable ? i.total : void 0, d = o - r, f = s(d), u = o <= a;
1064
1064
  r = o;
1065
1065
  const m = {
@@ -1075,7 +1075,7 @@ const pe = (e, t, n = 3) => {
1075
1075
  };
1076
1076
  e(m);
1077
1077
  }, n);
1078
- }, qe = (e, t) => {
1078
+ }, Me = (e, t) => {
1079
1079
  const n = e != null;
1080
1080
  return [
1081
1081
  (r) => t[0]({
@@ -1085,10 +1085,10 @@ const pe = (e, t, n = 3) => {
1085
1085
  }),
1086
1086
  t[1]
1087
1087
  ];
1088
- }, Me = (e) => (...t) => l.asap(() => e(...t)), Gn = x.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, x.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1089
- new URL(x.origin),
1090
- x.navigator && /(msie|trident)/i.test(x.navigator.userAgent)
1091
- ) : () => !0, Qn = x.hasStandardBrowserEnv ? (
1088
+ }, $e = (e) => (...t) => l.asap(() => e(...t)), Qn = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, P.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1089
+ new URL(P.origin),
1090
+ P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
1091
+ ) : () => !0, Zn = P.hasStandardBrowserEnv ? (
1092
1092
  // Standard browser envs support document.cookie
1093
1093
  {
1094
1094
  write(e, t, n, r, s, i, o) {
@@ -1117,17 +1117,17 @@ const pe = (e, t, n = 3) => {
1117
1117
  }
1118
1118
  }
1119
1119
  );
1120
- function Zn(e) {
1120
+ function Yn(e) {
1121
1121
  return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1122
1122
  }
1123
- function Yn(e, t) {
1123
+ function er(e, t) {
1124
1124
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1125
1125
  }
1126
- function yt(e, t, n) {
1127
- let r = !Zn(t);
1128
- return e && (r || n == !1) ? Yn(e, t) : t;
1126
+ function bt(e, t, n) {
1127
+ let r = !Yn(t);
1128
+ return e && (r || n == !1) ? er(e, t) : t;
1129
1129
  }
1130
- const $e = (e) => e instanceof U ? { ...e } : e;
1130
+ const Ve = (e) => e instanceof U ? { ...e } : e;
1131
1131
  function K(e, t) {
1132
1132
  t = t || {};
1133
1133
  const n = {};
@@ -1185,7 +1185,7 @@ function K(e, t) {
1185
1185
  socketPath: o,
1186
1186
  responseEncoding: o,
1187
1187
  validateStatus: a,
1188
- headers: (f, u, m) => s($e(f), $e(u), m, !0)
1188
+ headers: (f, u, m) => s(Ve(f), Ve(u), m, !0)
1189
1189
  };
1190
1190
  return l.forEach(Object.keys({ ...e, ...t }), function(u) {
1191
1191
  if (u === "__proto__" || u === "constructor" || u === "prototype") return;
@@ -1193,11 +1193,11 @@ function K(e, t) {
1193
1193
  l.isUndefined(w) && m !== a || (n[u] = w);
1194
1194
  }), n;
1195
1195
  }
1196
- const bt = (e) => {
1196
+ const wt = (e) => {
1197
1197
  const t = K({}, e);
1198
1198
  let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: a } = t;
1199
- if (t.headers = o = U.from(o), t.url = dt(
1200
- yt(t.baseURL, t.url, t.allowAbsoluteUrls),
1199
+ if (t.headers = o = U.from(o), t.url = pt(
1200
+ bt(t.baseURL, t.url, t.allowAbsoluteUrls),
1201
1201
  e.params,
1202
1202
  e.paramsSerializer
1203
1203
  ), a && o.set(
@@ -1206,7 +1206,7 @@ const bt = (e) => {
1206
1206
  (a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : "")
1207
1207
  )
1208
1208
  ), l.isFormData(n)) {
1209
- if (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv)
1209
+ if (P.hasStandardBrowserEnv || P.hasStandardBrowserWebWorkerEnv)
1210
1210
  o.setContentType(void 0);
1211
1211
  else if (l.isFunction(n.getHeaders)) {
1212
1212
  const d = n.getHeaders(), f = ["content-type", "content-length"];
@@ -1215,14 +1215,14 @@ const bt = (e) => {
1215
1215
  });
1216
1216
  }
1217
1217
  }
1218
- if (x.hasStandardBrowserEnv && (r && l.isFunction(r) && (r = r(t)), r || r !== !1 && Gn(t.url))) {
1219
- const d = s && i && Qn.read(i);
1218
+ if (P.hasStandardBrowserEnv && (r && l.isFunction(r) && (r = r(t)), r || r !== !1 && Qn(t.url))) {
1219
+ const d = s && i && Zn.read(i);
1220
1220
  d && o.set(s, d);
1221
1221
  }
1222
1222
  return t;
1223
- }, er = typeof XMLHttpRequest < "u", tr = er && function(e) {
1223
+ }, tr = typeof XMLHttpRequest < "u", nr = tr && function(e) {
1224
1224
  return new Promise(function(n, r) {
1225
- const s = bt(e);
1225
+ const s = wt(e);
1226
1226
  let i = s.data;
1227
1227
  const o = U.from(s.headers).normalize();
1228
1228
  let { responseType: a, onUploadProgress: d, onDownloadProgress: f } = s, u, m, w, g, c;
@@ -1231,58 +1231,58 @@ const bt = (e) => {
1231
1231
  }
1232
1232
  let h = new XMLHttpRequest();
1233
1233
  h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1234
- function S() {
1234
+ function R() {
1235
1235
  if (!h)
1236
1236
  return;
1237
- const O = U.from(
1237
+ const A = U.from(
1238
1238
  "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1239
1239
  ), _ = {
1240
1240
  data: !a || a === "text" || a === "json" ? h.responseText : h.response,
1241
1241
  status: h.status,
1242
1242
  statusText: h.statusText,
1243
- headers: O,
1243
+ headers: A,
1244
1244
  config: e,
1245
1245
  request: h
1246
1246
  };
1247
- mt(
1248
- function(C) {
1249
- n(C), p();
1247
+ yt(
1248
+ function(x) {
1249
+ n(x), p();
1250
1250
  },
1251
- function(C) {
1252
- r(C), p();
1251
+ function(x) {
1252
+ r(x), p();
1253
1253
  },
1254
1254
  _
1255
1255
  ), h = null;
1256
1256
  }
1257
- "onloadend" in h ? h.onloadend = S : h.onreadystatechange = function() {
1258
- !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(S);
1257
+ "onloadend" in h ? h.onloadend = R : h.onreadystatechange = function() {
1258
+ !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(R);
1259
1259
  }, h.onabort = function() {
1260
- h && (r(new y("Request aborted", y.ECONNABORTED, e, h)), h = null);
1260
+ h && (r(new b("Request aborted", b.ECONNABORTED, e, h)), h = null);
1261
1261
  }, h.onerror = function(T) {
1262
- const _ = T && T.message ? T.message : "Network Error", L = new y(_, y.ERR_NETWORK, e, h);
1263
- L.event = T || null, r(L), h = null;
1262
+ const _ = T && T.message ? T.message : "Network Error", I = new b(_, b.ERR_NETWORK, e, h);
1263
+ I.event = T || null, r(I), h = null;
1264
1264
  }, h.ontimeout = function() {
1265
1265
  let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1266
- const _ = s.transitional || Ne;
1266
+ const _ = s.transitional || Ue;
1267
1267
  s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(
1268
- new y(
1268
+ new b(
1269
1269
  T,
1270
- _.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1270
+ _.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
1271
1271
  e,
1272
1272
  h
1273
1273
  )
1274
1274
  ), h = null;
1275
1275
  }, i === void 0 && o.setContentType(null), "setRequestHeader" in h && l.forEach(o.toJSON(), function(T, _) {
1276
1276
  h.setRequestHeader(_, T);
1277
- }), l.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), a && a !== "json" && (h.responseType = s.responseType), f && ([w, c] = pe(f, !0), h.addEventListener("progress", w)), d && h.upload && ([m, g] = pe(d), h.upload.addEventListener("progress", m), h.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (u = (O) => {
1278
- h && (r(!O || O.type ? new ae(null, e, h) : O), h.abort(), h = null);
1277
+ }), l.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), a && a !== "json" && (h.responseType = s.responseType), f && ([w, c] = me(f, !0), h.addEventListener("progress", w)), d && h.upload && ([m, g] = me(d), h.upload.addEventListener("progress", m), h.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (u = (A) => {
1278
+ h && (r(!A || A.type ? new ae(null, e, h) : A), h.abort(), h = null);
1279
1279
  }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1280
- const k = Jn(s.url);
1281
- if (k && x.protocols.indexOf(k) === -1) {
1280
+ const k = Kn(s.url);
1281
+ if (k && P.protocols.indexOf(k) === -1) {
1282
1282
  r(
1283
- new y(
1283
+ new b(
1284
1284
  "Unsupported protocol " + k + ":",
1285
- y.ERR_BAD_REQUEST,
1285
+ b.ERR_BAD_REQUEST,
1286
1286
  e
1287
1287
  )
1288
1288
  );
@@ -1290,7 +1290,7 @@ const bt = (e) => {
1290
1290
  }
1291
1291
  h.send(i || null);
1292
1292
  });
1293
- }, nr = (e, t) => {
1293
+ }, rr = (e, t) => {
1294
1294
  const { length: n } = e = e ? e.filter(Boolean) : [];
1295
1295
  if (t || n) {
1296
1296
  let r = new AbortController(), s;
@@ -1299,12 +1299,12 @@ const bt = (e) => {
1299
1299
  s = !0, a();
1300
1300
  const u = f instanceof Error ? f : this.reason;
1301
1301
  r.abort(
1302
- u instanceof y ? u : new ae(u instanceof Error ? u.message : u)
1302
+ u instanceof b ? u : new ae(u instanceof Error ? u.message : u)
1303
1303
  );
1304
1304
  }
1305
1305
  };
1306
1306
  let o = t && setTimeout(() => {
1307
- o = null, i(new y(`timeout of ${t}ms exceeded`, y.ETIMEDOUT));
1307
+ o = null, i(new b(`timeout of ${t}ms exceeded`, b.ETIMEDOUT));
1308
1308
  }, t);
1309
1309
  const a = () => {
1310
1310
  e && (o && clearTimeout(o), o = null, e.forEach((f) => {
@@ -1315,7 +1315,7 @@ const bt = (e) => {
1315
1315
  const { signal: d } = r;
1316
1316
  return d.unsubscribe = () => l.asap(a), d;
1317
1317
  }
1318
- }, rr = function* (e, t) {
1318
+ }, sr = function* (e, t) {
1319
1319
  let n = e.byteLength;
1320
1320
  if (n < t) {
1321
1321
  yield e;
@@ -1324,10 +1324,10 @@ const bt = (e) => {
1324
1324
  let r = 0, s;
1325
1325
  for (; r < n; )
1326
1326
  s = r + t, yield e.slice(r, s), r = s;
1327
- }, sr = async function* (e, t) {
1328
- for await (const n of or(e))
1329
- yield* rr(n, t);
1330
- }, or = async function* (e) {
1327
+ }, or = async function* (e, t) {
1328
+ for await (const n of ir(e))
1329
+ yield* sr(n, t);
1330
+ }, ir = async function* (e) {
1331
1331
  if (e[Symbol.asyncIterator]) {
1332
1332
  yield* e;
1333
1333
  return;
@@ -1343,8 +1343,8 @@ const bt = (e) => {
1343
1343
  } finally {
1344
1344
  await t.cancel();
1345
1345
  }
1346
- }, Ve = (e, t, n, r) => {
1347
- const s = sr(e, t);
1346
+ }, ze = (e, t, n, r) => {
1347
+ const s = or(e, t);
1348
1348
  let i = 0, o, a = (d) => {
1349
1349
  o || (o = !0, r && r(d));
1350
1350
  };
@@ -1375,29 +1375,29 @@ const bt = (e) => {
1375
1375
  highWaterMark: 2
1376
1376
  }
1377
1377
  );
1378
- }, ze = 64 * 1024, { isFunction: ce } = l, ir = (({ Request: e, Response: t }) => ({
1378
+ }, We = 64 * 1024, { isFunction: ue } = l, ar = (({ Request: e, Response: t }) => ({
1379
1379
  Request: e,
1380
1380
  Response: t
1381
- }))(l.global), { ReadableStream: We, TextEncoder: Je } = l.global, Ke = (e, ...t) => {
1381
+ }))(l.global), { ReadableStream: Je, TextEncoder: Ke } = l.global, Xe = (e, ...t) => {
1382
1382
  try {
1383
1383
  return !!e(...t);
1384
1384
  } catch {
1385
1385
  return !1;
1386
1386
  }
1387
- }, ar = (e) => {
1387
+ }, lr = (e) => {
1388
1388
  e = l.merge.call(
1389
1389
  {
1390
1390
  skipUndefined: !0
1391
1391
  },
1392
- ir,
1392
+ ar,
1393
1393
  e
1394
1394
  );
1395
- const { fetch: t, Request: n, Response: r } = e, s = t ? ce(t) : typeof fetch == "function", i = ce(n), o = ce(r);
1395
+ const { fetch: t, Request: n, Response: r } = e, s = t ? ue(t) : typeof fetch == "function", i = ue(n), o = ue(r);
1396
1396
  if (!s)
1397
1397
  return !1;
1398
- const a = s && ce(We), d = s && (typeof Je == "function" ? /* @__PURE__ */ ((c) => (p) => c.encode(p))(new Je()) : async (c) => new Uint8Array(await new n(c).arrayBuffer())), f = i && a && Ke(() => {
1398
+ const a = s && ue(Je), d = s && (typeof Ke == "function" ? /* @__PURE__ */ ((c) => (p) => c.encode(p))(new Ke()) : async (c) => new Uint8Array(await new n(c).arrayBuffer())), f = i && a && Xe(() => {
1399
1399
  let c = !1;
1400
- const p = new We(), h = new n(x.origin, {
1400
+ const p = new Je(), h = new n(P.origin, {
1401
1401
  body: p,
1402
1402
  method: "POST",
1403
1403
  get duplex() {
@@ -1405,17 +1405,17 @@ const bt = (e) => {
1405
1405
  }
1406
1406
  }).headers.has("Content-Type");
1407
1407
  return p.cancel(), c && !h;
1408
- }), u = o && a && Ke(() => l.isReadableStream(new r("").body)), m = {
1408
+ }), u = o && a && Xe(() => l.isReadableStream(new r("").body)), m = {
1409
1409
  stream: u && ((c) => c.body)
1410
1410
  };
1411
1411
  s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((c) => {
1412
1412
  !m[c] && (m[c] = (p, h) => {
1413
- let S = p && p[c];
1414
- if (S)
1415
- return S.call(p);
1416
- throw new y(
1413
+ let R = p && p[c];
1414
+ if (R)
1415
+ return R.call(p);
1416
+ throw new b(
1417
1417
  `Response type '${c}' is not supported`,
1418
- y.ERR_NOT_SUPPORT,
1418
+ b.ERR_NOT_SUPPORT,
1419
1419
  h
1420
1420
  );
1421
1421
  });
@@ -1426,7 +1426,7 @@ const bt = (e) => {
1426
1426
  if (l.isBlob(c))
1427
1427
  return c.size;
1428
1428
  if (l.isSpecCompliantForm(c))
1429
- return (await new n(x.origin, {
1429
+ return (await new n(P.origin, {
1430
1430
  method: "POST",
1431
1431
  body: c
1432
1432
  }).arrayBuffer()).byteLength;
@@ -1442,117 +1442,117 @@ const bt = (e) => {
1442
1442
  let {
1443
1443
  url: p,
1444
1444
  method: h,
1445
- data: S,
1445
+ data: R,
1446
1446
  signal: k,
1447
- cancelToken: O,
1447
+ cancelToken: A,
1448
1448
  timeout: T,
1449
1449
  onDownloadProgress: _,
1450
- onUploadProgress: L,
1451
- responseType: C,
1452
- headers: z,
1453
- withCredentials: X = "same-origin",
1454
- fetchOptions: ee
1455
- } = bt(c), le = t || fetch;
1456
- C = C ? (C + "").toLowerCase() : "text";
1457
- let G = nr(
1458
- [k, O && O.toAbortSignal()],
1450
+ onUploadProgress: I,
1451
+ responseType: x,
1452
+ headers: q,
1453
+ withCredentials: M = "same-origin",
1454
+ fetchOptions: le
1455
+ } = wt(c), ee = t || fetch;
1456
+ x = x ? (x + "").toLowerCase() : "text";
1457
+ let X = rr(
1458
+ [k, A && A.toAbortSignal()],
1459
1459
  T
1460
- ), H = null;
1461
- const q = G && G.unsubscribe && (() => {
1462
- G.unsubscribe();
1460
+ ), $ = null;
1461
+ const v = X && X.unsubscribe && (() => {
1462
+ X.unsubscribe();
1463
1463
  });
1464
- let b;
1464
+ let ce;
1465
1465
  try {
1466
- if (L && f && h !== "get" && h !== "head" && (b = await g(z, S)) !== 0) {
1467
- let F = new n(p, {
1466
+ if (I && f && h !== "get" && h !== "head" && (ce = await g(q, R)) !== 0) {
1467
+ let C = new n(p, {
1468
1468
  method: "POST",
1469
- body: S,
1469
+ body: R,
1470
1470
  duplex: "half"
1471
- }), j;
1472
- if (l.isFormData(S) && (j = F.headers.get("content-type")) && z.setContentType(j), F.body) {
1473
- const [$, V] = qe(
1474
- b,
1475
- pe(Me(L))
1471
+ }), D;
1472
+ if (l.isFormData(R) && (D = C.headers.get("content-type")) && q.setContentType(D), C.body) {
1473
+ const [z, j] = Me(
1474
+ ce,
1475
+ me($e(I))
1476
1476
  );
1477
- S = Ve(F.body, ze, $, V);
1477
+ R = ze(C.body, We, z, j);
1478
1478
  }
1479
1479
  }
1480
- l.isString(X) || (X = X ? "include" : "omit");
1481
- const E = i && "credentials" in n.prototype, R = {
1482
- ...ee,
1483
- signal: G,
1480
+ l.isString(M) || (M = M ? "include" : "omit");
1481
+ const y = i && "credentials" in n.prototype, S = {
1482
+ ...le,
1483
+ signal: X,
1484
1484
  method: h.toUpperCase(),
1485
- headers: z.normalize().toJSON(),
1486
- body: S,
1485
+ headers: q.normalize().toJSON(),
1486
+ body: R,
1487
1487
  duplex: "half",
1488
- credentials: E ? X : void 0
1488
+ credentials: y ? M : void 0
1489
1489
  };
1490
- H = i && new n(p, R);
1491
- let P = await (i ? le(H, ee) : le(p, R));
1492
- const M = u && (C === "stream" || C === "response");
1493
- if (u && (_ || M && q)) {
1494
- const F = {};
1495
- ["status", "statusText", "headers"].forEach((v) => {
1496
- F[v] = P[v];
1490
+ $ = i && new n(p, S);
1491
+ let E = await (i ? ee($, le) : ee(p, S));
1492
+ const L = u && (x === "stream" || x === "response");
1493
+ if (u && (_ || L && v)) {
1494
+ const C = {};
1495
+ ["status", "statusText", "headers"].forEach((G) => {
1496
+ C[G] = E[G];
1497
1497
  });
1498
- const j = l.toFiniteNumber(P.headers.get("content-length")), [$, V] = _ && qe(
1499
- j,
1500
- pe(Me(_), !0)
1498
+ const D = l.toFiniteNumber(E.headers.get("content-length")), [z, j] = _ && Me(
1499
+ D,
1500
+ me($e(_), !0)
1501
1501
  ) || [];
1502
- P = new r(
1503
- Ve(P.body, ze, $, () => {
1504
- V && V(), q && q();
1502
+ E = new r(
1503
+ ze(E.body, We, z, () => {
1504
+ j && j(), v && v();
1505
1505
  }),
1506
- F
1506
+ C
1507
1507
  );
1508
1508
  }
1509
- C = C || "text";
1510
- let D = await m[l.findKey(m, C) || "text"](
1511
- P,
1509
+ x = x || "text";
1510
+ let V = await m[l.findKey(m, x) || "text"](
1511
+ E,
1512
1512
  c
1513
1513
  );
1514
- return !M && q && q(), await new Promise((F, j) => {
1515
- mt(F, j, {
1516
- data: D,
1517
- headers: U.from(P.headers),
1518
- status: P.status,
1519
- statusText: P.statusText,
1514
+ return !L && v && v(), await new Promise((C, D) => {
1515
+ yt(C, D, {
1516
+ data: V,
1517
+ headers: U.from(E.headers),
1518
+ status: E.status,
1519
+ statusText: E.statusText,
1520
1520
  config: c,
1521
- request: H
1521
+ request: $
1522
1522
  });
1523
1523
  });
1524
- } catch (E) {
1525
- throw q && q(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
1526
- new y(
1524
+ } catch (y) {
1525
+ throw v && v(), y && y.name === "TypeError" && /Load failed|fetch/i.test(y.message) ? Object.assign(
1526
+ new b(
1527
1527
  "Network Error",
1528
- y.ERR_NETWORK,
1528
+ b.ERR_NETWORK,
1529
1529
  c,
1530
- H,
1531
- E && E.response
1530
+ $,
1531
+ y && y.response
1532
1532
  ),
1533
1533
  {
1534
- cause: E.cause || E
1534
+ cause: y.cause || y
1535
1535
  }
1536
- ) : y.from(E, E && E.code, c, H, E && E.response);
1536
+ ) : b.from(y, y && y.code, c, $, y && y.response);
1537
1537
  }
1538
1538
  };
1539
- }, lr = /* @__PURE__ */ new Map(), wt = (e) => {
1539
+ }, cr = /* @__PURE__ */ new Map(), gt = (e) => {
1540
1540
  let t = e && e.env || {};
1541
1541
  const { fetch: n, Request: r, Response: s } = t, i = [r, s, n];
1542
- let o = i.length, a = o, d, f, u = lr;
1542
+ let o = i.length, a = o, d, f, u = cr;
1543
1543
  for (; a--; )
1544
- d = i[a], f = u.get(d), f === void 0 && u.set(d, f = a ? /* @__PURE__ */ new Map() : ar(t)), u = f;
1544
+ d = i[a], f = u.get(d), f === void 0 && u.set(d, f = a ? /* @__PURE__ */ new Map() : lr(t)), u = f;
1545
1545
  return f;
1546
1546
  };
1547
- wt();
1548
- const ke = {
1549
- http: Tn,
1550
- xhr: tr,
1547
+ gt();
1548
+ const Fe = {
1549
+ http: Cn,
1550
+ xhr: nr,
1551
1551
  fetch: {
1552
- get: wt
1552
+ get: gt
1553
1553
  }
1554
1554
  };
1555
- l.forEach(ke, (e, t) => {
1555
+ l.forEach(Fe, (e, t) => {
1556
1556
  if (e) {
1557
1557
  try {
1558
1558
  Object.defineProperty(e, "name", { value: t });
@@ -1561,8 +1561,8 @@ l.forEach(ke, (e, t) => {
1561
1561
  Object.defineProperty(e, "adapterName", { value: t });
1562
1562
  }
1563
1563
  });
1564
- const Xe = (e) => `- ${e}`, cr = (e) => l.isFunction(e) || e === null || e === !1;
1565
- function ur(e, t) {
1564
+ const Ge = (e) => `- ${e}`, ur = (e) => l.isFunction(e) || e === null || e === !1;
1565
+ function fr(e, t) {
1566
1566
  e = l.isArray(e) ? e : [e];
1567
1567
  const { length: n } = e;
1568
1568
  let r, s;
@@ -1570,8 +1570,8 @@ function ur(e, t) {
1570
1570
  for (let o = 0; o < n; o++) {
1571
1571
  r = e[o];
1572
1572
  let a;
1573
- if (s = r, !cr(r) && (s = ke[(a = String(r)).toLowerCase()], s === void 0))
1574
- throw new y(`Unknown adapter '${a}'`);
1573
+ if (s = r, !ur(r) && (s = Fe[(a = String(r)).toLowerCase()], s === void 0))
1574
+ throw new b(`Unknown adapter '${a}'`);
1575
1575
  if (s && (l.isFunction(s) || (s = s.get(t))))
1576
1576
  break;
1577
1577
  i[a || "#" + o] = s;
@@ -1581,38 +1581,38 @@ function ur(e, t) {
1581
1581
  ([d, f]) => `adapter ${d} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1582
1582
  );
1583
1583
  let a = n ? o.length > 1 ? `since :
1584
- ` + o.map(Xe).join(`
1585
- `) : " " + Xe(o[0]) : "as no adapter specified";
1586
- throw new y(
1584
+ ` + o.map(Ge).join(`
1585
+ `) : " " + Ge(o[0]) : "as no adapter specified";
1586
+ throw new b(
1587
1587
  "There is no suitable adapter to dispatch the request " + a,
1588
1588
  "ERR_NOT_SUPPORT"
1589
1589
  );
1590
1590
  }
1591
1591
  return s;
1592
1592
  }
1593
- const gt = {
1593
+ const Et = {
1594
1594
  /**
1595
1595
  * Resolve an adapter from a list of adapter names or functions.
1596
1596
  * @type {Function}
1597
1597
  */
1598
- getAdapter: ur,
1598
+ getAdapter: fr,
1599
1599
  /**
1600
1600
  * Exposes all known adapters
1601
1601
  * @type {Object<string, Function|Object>}
1602
1602
  */
1603
- adapters: ke
1603
+ adapters: Fe
1604
1604
  };
1605
- function Se(e) {
1605
+ function Ae(e) {
1606
1606
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1607
1607
  throw new ae(null, e);
1608
1608
  }
1609
- function Ge(e) {
1610
- return Se(e), e.headers = U.from(e.headers), e.data = Re.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), gt.getAdapter(e.adapter || ie.adapter, e)(e).then(
1609
+ function Qe(e) {
1610
+ return Ae(e), e.headers = U.from(e.headers), e.data = Oe.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Et.getAdapter(e.adapter || ie.adapter, e)(e).then(
1611
1611
  function(r) {
1612
- return Se(e), r.data = Re.call(e, e.transformResponse, r), r.headers = U.from(r.headers), r;
1612
+ return Ae(e), r.data = Oe.call(e, e.transformResponse, r), r.headers = U.from(r.headers), r;
1613
1613
  },
1614
1614
  function(r) {
1615
- return ht(r) || (Se(e), r && r.response && (r.response.data = Re.call(
1615
+ return mt(r) || (Ae(e), r && r.response && (r.response.data = Oe.call(
1616
1616
  e,
1617
1617
  e.transformResponse,
1618
1618
  r.response
@@ -1620,24 +1620,24 @@ function Ge(e) {
1620
1620
  }
1621
1621
  );
1622
1622
  }
1623
- const Et = "1.14.0", we = {};
1623
+ const Rt = "1.14.0", Ee = {};
1624
1624
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1625
- we[e] = function(r) {
1625
+ Ee[e] = function(r) {
1626
1626
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1627
1627
  };
1628
1628
  });
1629
- const Qe = {};
1630
- we.transitional = function(t, n, r) {
1629
+ const Ze = {};
1630
+ Ee.transitional = function(t, n, r) {
1631
1631
  function s(i, o) {
1632
- return "[Axios v" + Et + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1632
+ return "[Axios v" + Rt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1633
1633
  }
1634
1634
  return (i, o, a) => {
1635
1635
  if (t === !1)
1636
- throw new y(
1636
+ throw new b(
1637
1637
  s(o, " has been removed" + (n ? " in " + n : "")),
1638
- y.ERR_DEPRECATED
1638
+ b.ERR_DEPRECATED
1639
1639
  );
1640
- return n && !Qe[o] && (Qe[o] = !0, console.warn(
1640
+ return n && !Ze[o] && (Ze[o] = !0, console.warn(
1641
1641
  s(
1642
1642
  o,
1643
1643
  " has been deprecated since v" + n + " and will be removed in the near future"
@@ -1645,12 +1645,12 @@ we.transitional = function(t, n, r) {
1645
1645
  )), t ? t(i, o, a) : !0;
1646
1646
  };
1647
1647
  };
1648
- we.spelling = function(t) {
1648
+ Ee.spelling = function(t) {
1649
1649
  return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1650
1650
  };
1651
- function fr(e, t, n) {
1651
+ function dr(e, t, n) {
1652
1652
  if (typeof e != "object")
1653
- throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1653
+ throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
1654
1654
  const r = Object.keys(e);
1655
1655
  let s = r.length;
1656
1656
  for (; s-- > 0; ) {
@@ -1658,25 +1658,25 @@ function fr(e, t, n) {
1658
1658
  if (o) {
1659
1659
  const a = e[i], d = a === void 0 || o(a, i, e);
1660
1660
  if (d !== !0)
1661
- throw new y(
1661
+ throw new b(
1662
1662
  "option " + i + " must be " + d,
1663
- y.ERR_BAD_OPTION_VALUE
1663
+ b.ERR_BAD_OPTION_VALUE
1664
1664
  );
1665
1665
  continue;
1666
1666
  }
1667
1667
  if (n !== !0)
1668
- throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
1668
+ throw new b("Unknown option " + i, b.ERR_BAD_OPTION);
1669
1669
  }
1670
1670
  }
1671
- const de = {
1672
- assertOptions: fr,
1673
- validators: we
1674
- }, B = de.validators;
1671
+ const he = {
1672
+ assertOptions: dr,
1673
+ validators: Ee
1674
+ }, F = he.validators;
1675
1675
  let J = class {
1676
1676
  constructor(t) {
1677
1677
  this.defaults = t || {}, this.interceptors = {
1678
- request: new je(),
1679
- response: new je()
1678
+ request: new He(),
1679
+ response: new He()
1680
1680
  };
1681
1681
  }
1682
1682
  /**
@@ -1707,29 +1707,29 @@ let J = class {
1707
1707
  _request(t, n) {
1708
1708
  typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = K(this.defaults, n);
1709
1709
  const { transitional: r, paramsSerializer: s, headers: i } = n;
1710
- r !== void 0 && de.assertOptions(
1710
+ r !== void 0 && he.assertOptions(
1711
1711
  r,
1712
1712
  {
1713
- silentJSONParsing: B.transitional(B.boolean),
1714
- forcedJSONParsing: B.transitional(B.boolean),
1715
- clarifyTimeoutError: B.transitional(B.boolean),
1716
- legacyInterceptorReqResOrdering: B.transitional(B.boolean)
1713
+ silentJSONParsing: F.transitional(F.boolean),
1714
+ forcedJSONParsing: F.transitional(F.boolean),
1715
+ clarifyTimeoutError: F.transitional(F.boolean),
1716
+ legacyInterceptorReqResOrdering: F.transitional(F.boolean)
1717
1717
  },
1718
1718
  !1
1719
1719
  ), s != null && (l.isFunction(s) ? n.paramsSerializer = {
1720
1720
  serialize: s
1721
- } : de.assertOptions(
1721
+ } : he.assertOptions(
1722
1722
  s,
1723
1723
  {
1724
- encode: B.function,
1725
- serialize: B.function
1724
+ encode: F.function,
1725
+ serialize: F.function
1726
1726
  },
1727
1727
  !0
1728
- )), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), de.assertOptions(
1728
+ )), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), he.assertOptions(
1729
1729
  n,
1730
1730
  {
1731
- baseUrl: B.spelling("baseURL"),
1732
- withXsrfToken: B.spelling("withXSRFToken")
1731
+ baseUrl: F.spelling("baseURL"),
1732
+ withXsrfToken: F.spelling("withXSRFToken")
1733
1733
  },
1734
1734
  !0
1735
1735
  ), n.method = (n.method || this.defaults.method || "get").toLowerCase();
@@ -1743,7 +1743,7 @@ let J = class {
1743
1743
  if (typeof p.runWhen == "function" && p.runWhen(n) === !1)
1744
1744
  return;
1745
1745
  d = d && p.synchronous;
1746
- const h = n.transitional || Ne;
1746
+ const h = n.transitional || Ue;
1747
1747
  h && h.legacyInterceptorReqResOrdering ? a.unshift(p.fulfilled, p.rejected) : a.push(p.fulfilled, p.rejected);
1748
1748
  });
1749
1749
  const f = [];
@@ -1752,7 +1752,7 @@ let J = class {
1752
1752
  });
1753
1753
  let u, m = 0, w;
1754
1754
  if (!d) {
1755
- const c = [Ge.bind(this), void 0];
1755
+ const c = [Qe.bind(this), void 0];
1756
1756
  for (c.unshift(...a), c.push(...f), w = c.length, u = Promise.resolve(n); m < w; )
1757
1757
  u = u.then(c[m++], c[m++]);
1758
1758
  return u;
@@ -1769,7 +1769,7 @@ let J = class {
1769
1769
  }
1770
1770
  }
1771
1771
  try {
1772
- u = Ge.call(this, g);
1772
+ u = Qe.call(this, g);
1773
1773
  } catch (c) {
1774
1774
  return Promise.reject(c);
1775
1775
  }
@@ -1779,8 +1779,8 @@ let J = class {
1779
1779
  }
1780
1780
  getUri(t) {
1781
1781
  t = K(this.defaults, t);
1782
- const n = yt(t.baseURL, t.url, t.allowAbsoluteUrls);
1783
- return dt(n, t.params, t.paramsSerializer);
1782
+ const n = bt(t.baseURL, t.url, t.allowAbsoluteUrls);
1783
+ return pt(n, t.params, t.paramsSerializer);
1784
1784
  }
1785
1785
  };
1786
1786
  l.forEach(["delete", "get", "head", "options"], function(t) {
@@ -1811,7 +1811,7 @@ l.forEach(["post", "put", "patch"], function(t) {
1811
1811
  }
1812
1812
  J.prototype[t] = n(), J.prototype[t + "Form"] = n(!0);
1813
1813
  });
1814
- let dr = class Rt {
1814
+ let pr = class St {
1815
1815
  constructor(t) {
1816
1816
  if (typeof t != "function")
1817
1817
  throw new TypeError("executor must be a function.");
@@ -1877,22 +1877,22 @@ let dr = class Rt {
1877
1877
  static source() {
1878
1878
  let t;
1879
1879
  return {
1880
- token: new Rt(function(s) {
1880
+ token: new St(function(s) {
1881
1881
  t = s;
1882
1882
  }),
1883
1883
  cancel: t
1884
1884
  };
1885
1885
  }
1886
1886
  };
1887
- function pr(e) {
1887
+ function hr(e) {
1888
1888
  return function(n) {
1889
1889
  return e.apply(null, n);
1890
1890
  };
1891
1891
  }
1892
- function hr(e) {
1892
+ function mr(e) {
1893
1893
  return l.isObject(e) && e.isAxiosError === !0;
1894
1894
  }
1895
- const Pe = {
1895
+ const xe = {
1896
1896
  Continue: 100,
1897
1897
  SwitchingProtocols: 101,
1898
1898
  Processing: 102,
@@ -1963,68 +1963,68 @@ const Pe = {
1963
1963
  SslHandshakeFailed: 525,
1964
1964
  InvalidSslCertificate: 526
1965
1965
  };
1966
- Object.entries(Pe).forEach(([e, t]) => {
1967
- Pe[t] = e;
1966
+ Object.entries(xe).forEach(([e, t]) => {
1967
+ xe[t] = e;
1968
1968
  });
1969
- function St(e) {
1970
- const t = new J(e), n = tt(J.prototype.request, t);
1969
+ function Ot(e) {
1970
+ const t = new J(e), n = nt(J.prototype.request, t);
1971
1971
  return l.extend(n, J.prototype, t, { allOwnKeys: !0 }), l.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1972
- return St(K(e, s));
1972
+ return Ot(K(e, s));
1973
1973
  }, n;
1974
1974
  }
1975
- const A = St(ie);
1976
- A.Axios = J;
1977
- A.CanceledError = ae;
1978
- A.CancelToken = dr;
1979
- A.isCancel = ht;
1980
- A.VERSION = Et;
1981
- A.toFormData = be;
1982
- A.AxiosError = y;
1983
- A.Cancel = A.CanceledError;
1984
- A.all = function(t) {
1975
+ const O = Ot(ie);
1976
+ O.Axios = J;
1977
+ O.CanceledError = ae;
1978
+ O.CancelToken = pr;
1979
+ O.isCancel = mt;
1980
+ O.VERSION = Rt;
1981
+ O.toFormData = ge;
1982
+ O.AxiosError = b;
1983
+ O.Cancel = O.CanceledError;
1984
+ O.all = function(t) {
1985
1985
  return Promise.all(t);
1986
1986
  };
1987
- A.spread = pr;
1988
- A.isAxiosError = hr;
1989
- A.mergeConfig = K;
1990
- A.AxiosHeaders = U;
1991
- A.formToJSON = (e) => pt(l.isHTMLForm(e) ? new FormData(e) : e);
1992
- A.getAdapter = gt.getAdapter;
1993
- A.HttpStatusCode = Pe;
1994
- A.default = A;
1987
+ O.spread = hr;
1988
+ O.isAxiosError = mr;
1989
+ O.mergeConfig = K;
1990
+ O.AxiosHeaders = U;
1991
+ O.formToJSON = (e) => ht(l.isHTMLForm(e) ? new FormData(e) : e);
1992
+ O.getAdapter = Et.getAdapter;
1993
+ O.HttpStatusCode = xe;
1994
+ O.default = O;
1995
1995
  const {
1996
- Axios: Rr,
1997
- AxiosError: Sr,
1998
- CanceledError: Or,
1999
- isCancel: Ar,
2000
- CancelToken: Tr,
2001
- VERSION: Cr,
2002
- all: Pr,
2003
- Cancel: xr,
2004
- isAxiosError: _r,
2005
- spread: Nr,
2006
- toFormData: Ur,
2007
- AxiosHeaders: kr,
2008
- HttpStatusCode: Fr,
2009
- formToJSON: vr,
2010
- getAdapter: Br,
2011
- mergeConfig: Ir
2012
- } = A, Ot = A.create({
1996
+ Axios: Sr,
1997
+ AxiosError: Or,
1998
+ CanceledError: Ar,
1999
+ isCancel: Tr,
2000
+ CancelToken: Cr,
2001
+ VERSION: Pr,
2002
+ all: xr,
2003
+ Cancel: _r,
2004
+ isAxiosError: Nr,
2005
+ spread: Ur,
2006
+ toFormData: kr,
2007
+ AxiosHeaders: Fr,
2008
+ HttpStatusCode: vr,
2009
+ formToJSON: Br,
2010
+ getAdapter: Ir,
2011
+ mergeConfig: Lr
2012
+ } = O, At = O.create({
2013
2013
  baseURL: "http://t1.lingganai.cyou:90",
2014
2014
  // Assuming backend runs on 8080
2015
2015
  timeout: 1e4
2016
2016
  });
2017
- Ot.interceptors.response.use(
2017
+ At.interceptors.response.use(
2018
2018
  (e) => {
2019
2019
  const t = e.data;
2020
2020
  return t.code === 200 ? t.data : Promise.reject(new Error(t.message || "Error"));
2021
2021
  },
2022
2022
  (e) => Promise.reject(e)
2023
2023
  );
2024
- const Oe = (e, t) => Ot.post("/api/screen/control", {
2024
+ const fe = (e, t) => At.post("/api/screen/control", {
2025
2025
  screenClientId: e,
2026
2026
  action: t
2027
- }), mr = /* @__PURE__ */ Ze({
2027
+ }), yr = /* @__PURE__ */ Ye({
2028
2028
  __name: "VirtualHumanEventAdapter",
2029
2029
  props: {
2030
2030
  // 屏幕客户端ID
@@ -2045,156 +2045,157 @@ const Oe = (e, t) => Ot.post("/api/screen/control", {
2045
2045
  const w = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
2046
2046
  let p = null;
2047
2047
  t({
2048
- pause: () => o.value ? Oe(r.screenClientId, "pause").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1),
2049
- resume: () => o.value ? Oe(r.screenClientId, "resume").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1),
2050
- stop: () => o.value ? Oe(r.screenClientId, "stop").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1)
2048
+ play: () => o.value ? fe(r.screenClientId, "play").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1),
2049
+ pause: () => o.value ? fe(r.screenClientId, "pause").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1),
2050
+ resume: () => o.value ? fe(r.screenClientId, "resume").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1),
2051
+ stop: () => o.value ? fe(r.screenClientId, "stop").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1)
2051
2052
  });
2052
- const O = (b) => {
2053
- if (typeof b == "number" && Number.isFinite(b)) return b;
2054
- if (typeof b == "string" && b.trim() !== "") {
2055
- const E = Number(b);
2056
- if (Number.isFinite(E)) return E;
2053
+ const T = (y) => {
2054
+ if (typeof y == "number" && Number.isFinite(y)) return y;
2055
+ if (typeof y == "string" && y.trim() !== "") {
2056
+ const S = Number(y);
2057
+ if (Number.isFinite(S)) return S;
2057
2058
  }
2058
2059
  return null;
2059
- }, T = () => {
2060
- p !== null && (window.clearInterval(p), p = null);
2061
2060
  }, _ = () => {
2062
- T(), w.clear(), g.clear(), c.clear();
2063
- }, L = () => {
2064
- for (const [b] of w)
2065
- if (!g.has(b) && c.has(b)) return !0;
2061
+ p !== null && (window.clearInterval(p), p = null);
2062
+ }, I = () => {
2063
+ _(), w.clear(), g.clear(), c.clear();
2064
+ }, x = () => {
2065
+ for (const [y] of w)
2066
+ if (!g.has(y) && c.has(y)) return !0;
2066
2067
  return !1;
2067
- }, C = () => {
2068
+ }, q = () => {
2068
2069
  if (!(!a || a.state !== "running")) {
2069
- for (const [b, E] of c) {
2070
- if (g.has(b)) continue;
2071
- const R = w.get(b);
2072
- R && a.currentTime + 5e-3 >= E && (g.add(b), w.delete(b), s("eventNotifaction", R));
2070
+ for (const [y, S] of c) {
2071
+ if (g.has(y)) continue;
2072
+ const E = w.get(y);
2073
+ E && a.currentTime + 5e-3 >= S && (g.add(y), w.delete(y), s("eventNotifaction", E));
2073
2074
  }
2074
- L() || T();
2075
+ x() || _();
2075
2076
  }
2076
- }, z = () => {
2077
- p === null && L() && (p = window.setInterval(() => {
2078
- C();
2077
+ }, M = () => {
2078
+ p === null && x() && (p = window.setInterval(() => {
2079
+ q();
2079
2080
  }, 30));
2080
- }, X = () => {
2081
+ }, le = () => {
2081
2082
  a || (a = new (window.AudioContext || window.webkitAudioContext)({
2082
2083
  sampleRate: 24e3
2083
2084
  })), a.state === "suspended" && !m && a.resume();
2084
2085
  }, ee = () => {
2085
2086
  f && u === 0 && (s("playComplete", r.screenClientId), f = !1);
2086
- }, le = (b, E) => {
2087
- if (X(), !!a)
2087
+ }, X = (y, S) => {
2088
+ if (le(), !!a)
2088
2089
  try {
2089
- const R = window.atob(b), P = R.length, M = new Uint8Array(P);
2090
- for (let v = 0; v < P; v++)
2091
- M[v] = R.charCodeAt(v);
2092
- const D = new Int16Array(M.buffer), F = new Float32Array(D.length);
2093
- for (let v = 0; v < D.length; v++)
2094
- F[v] = D[v] / 32768;
2095
- const j = a.createBuffer(1, F.length, 24e3);
2096
- j.getChannelData(0).set(F);
2097
- const $ = a.createBufferSource();
2098
- $.buffer = j, $.connect(a.destination);
2099
- const V = d < a.currentTime ? a.currentTime : d;
2100
- E !== null && !c.has(E) && (c.set(E, V), C(), z()), $.start(V), d = V + j.duration, u++, $.onended = () => {
2090
+ const E = window.atob(y), L = E.length, V = new Uint8Array(L);
2091
+ for (let H = 0; H < L; H++)
2092
+ V[H] = E.charCodeAt(H);
2093
+ const C = new Int16Array(V.buffer), D = new Float32Array(C.length);
2094
+ for (let H = 0; H < C.length; H++)
2095
+ D[H] = C[H] / 32768;
2096
+ const z = a.createBuffer(1, D.length, 24e3);
2097
+ z.getChannelData(0).set(D);
2098
+ const j = a.createBufferSource();
2099
+ j.buffer = z, j.connect(a.destination);
2100
+ const G = d < a.currentTime ? a.currentTime : d;
2101
+ S !== null && !c.has(S) && (c.set(S, G), q(), M()), j.start(G), d = G + z.duration, u++, j.onended = () => {
2101
2102
  u--, ee();
2102
2103
  };
2103
- } catch (R) {
2104
- console.error("[VirtualHumanEventAdapter] Failed to decode and play audio:", R);
2104
+ } catch (E) {
2105
+ console.error("[VirtualHumanEventAdapter] Failed to decode and play audio:", E);
2105
2106
  }
2106
- }, G = (b) => {
2107
- switch (b) {
2107
+ }, $ = (y) => {
2108
+ switch (y) {
2108
2109
  case "play":
2109
- _(), f = !1, u = 0, d = 0, m = !1, a && a.state === "suspended" && a.resume();
2110
+ I(), f = !1, u = 0, d = 0, m = !1, a && a.state === "suspended" && a.resume();
2110
2111
  break;
2111
2112
  case "resume":
2112
- m = !1, a && a.state === "suspended" && a.resume(), C(), z();
2113
+ m = !1, a && a.state === "suspended" && a.resume(), q(), M();
2113
2114
  break;
2114
2115
  case "pause":
2115
2116
  m = !0, a && a.state === "running" && a.suspend();
2116
2117
  break;
2117
2118
  case "stop":
2118
- _(), m = !1, a && (a.close(), a = null), d = 0, f = !1, u = 0;
2119
+ I(), m = !1, a && (a.close(), a = null), d = 0, f = !1, u = 0;
2119
2120
  break;
2120
2121
  case "tts_complete":
2121
2122
  f = !0, ee();
2122
2123
  break;
2123
2124
  default:
2124
- console.warn(`[VirtualHumanEventAdapter] Unknown control action: ${b}`);
2125
+ console.warn(`[VirtualHumanEventAdapter] Unknown control action: ${y}`);
2125
2126
  }
2126
- }, H = () => {
2127
+ }, v = () => {
2127
2128
  i.value && i.value.close();
2128
2129
  try {
2129
- const b = new URL(r.wsUrl);
2130
- b.searchParams.append("sessionId", r.screenClientId + "-event"), i.value = new WebSocket(b.toString()), i.value.onopen = () => {
2130
+ const y = new URL(r.wsUrl);
2131
+ y.searchParams.append("sessionId", r.screenClientId + "-event"), i.value = new WebSocket(y.toString()), i.value.onopen = () => {
2131
2132
  o.value = !0, s("connected"), console.log(`[VirtualHumanEventAdapter] Connected to ${r.wsUrl} for session ${r.screenClientId}-event`);
2132
- }, i.value.onmessage = (E) => {
2133
+ }, i.value.onmessage = (S) => {
2133
2134
  try {
2134
- const R = JSON.parse(E.data);
2135
- q(R);
2136
- } catch (R) {
2137
- console.error("[VirtualHumanEventAdapter] Failed to parse message:", E.data, R);
2135
+ const E = JSON.parse(S.data);
2136
+ ce(E);
2137
+ } catch (E) {
2138
+ console.error("[VirtualHumanEventAdapter] Failed to parse message:", S.data, E);
2138
2139
  }
2139
- }, i.value.onerror = (E) => {
2140
- console.error("[VirtualHumanEventAdapter] WebSocket error:", E), s("error", E);
2140
+ }, i.value.onerror = (S) => {
2141
+ console.error("[VirtualHumanEventAdapter] WebSocket error:", S), s("error", S);
2141
2142
  }, i.value.onclose = () => {
2142
2143
  o.value = !1, console.log("[VirtualHumanEventAdapter] WebSocket disconnected");
2143
2144
  };
2144
- } catch (b) {
2145
- console.error("[VirtualHumanEventAdapter] Failed to initialize WebSocket:", b), s("error", b);
2145
+ } catch (y) {
2146
+ console.error("[VirtualHumanEventAdapter] Failed to initialize WebSocket:", y), s("error", y);
2146
2147
  }
2147
- }, q = (b) => {
2148
- const { type: E, payload: R, action: P } = b;
2149
- switch (E) {
2148
+ }, ce = (y) => {
2149
+ const { type: S, payload: E, action: L } = y;
2150
+ switch (S) {
2150
2151
  case "audio":
2151
- const M = (R == null ? void 0 : R.data) || b.data;
2152
- if (M) {
2153
- const D = O((R == null ? void 0 : R.index) ?? b.index);
2154
- le(M, D);
2152
+ const V = (E == null ? void 0 : E.data) || y.data;
2153
+ if (V) {
2154
+ const C = T((E == null ? void 0 : E.index) ?? y.index);
2155
+ X(V, C);
2155
2156
  }
2156
2157
  break;
2157
2158
  case "send_event":
2158
- if (b.event) {
2159
- console.log("adapter send_event:", b);
2160
- const D = O(b.index);
2161
- if (D === null) {
2162
- s("eventNotifaction", b);
2159
+ if (y.event) {
2160
+ console.log("adapter send_event:", y);
2161
+ const C = T(y.index);
2162
+ if (C === null) {
2163
+ s("eventNotifaction", y);
2163
2164
  break;
2164
2165
  }
2165
- w.set(D, b), C(), z();
2166
+ w.set(C, y), q(), M();
2166
2167
  }
2167
2168
  break;
2168
2169
  case "control":
2169
- P && (console.log("adapter control:", P), s("controlEvent", P), G(P));
2170
+ L && (console.log("adapter control:", L), s("controlEvent", L), $(L));
2170
2171
  break;
2171
2172
  case "end":
2172
- console.log("adapter end:", R), s("end", R);
2173
+ console.log("adapter end:", E), s("end", E);
2173
2174
  break;
2174
2175
  case "pause":
2175
- console.log("adapter pause:", R), s("pause", R);
2176
+ console.log("adapter pause:", E), s("pause", E);
2176
2177
  break;
2177
2178
  default:
2178
- console.warn(`[VirtualHumanEventAdapter] Unknown message type: ${E}`);
2179
+ console.warn(`[VirtualHumanEventAdapter] Unknown message type: ${S}`);
2179
2180
  }
2180
2181
  };
2181
2182
  return ne(() => r.screenClientId, () => {
2182
- r.screenClientId && r.wsUrl && H();
2183
+ r.screenClientId && r.wsUrl && v();
2183
2184
  }), ne(() => r.wsUrl, () => {
2184
- r.screenClientId && r.wsUrl && H();
2185
- }), Ye(() => {
2186
- r.screenClientId && r.wsUrl && H();
2185
+ r.screenClientId && r.wsUrl && v();
2187
2186
  }), et(() => {
2187
+ r.screenClientId && r.wsUrl && v();
2188
+ }), tt(() => {
2188
2189
  i.value && i.value.close(), a && a.close();
2189
- }), (b, E) => Ut(b.$slots, "default");
2190
+ }), (y, S) => kt(y.$slots, "default");
2190
2191
  }
2191
- }), yr = (e) => {
2192
- e.component("VirtualHumanPersona", Bt), e.component("VirtualHumanEventAdapter", mr);
2193
- }, Lr = {
2194
- install: yr
2192
+ }), br = (e) => {
2193
+ e.component("VirtualHumanPersona", It), e.component("VirtualHumanEventAdapter", yr);
2194
+ }, Dr = {
2195
+ install: br
2195
2196
  };
2196
2197
  export {
2197
- mr as VirtualHumanEventAdapter,
2198
- Bt as VirtualHumanPersona,
2199
- Lr as default
2198
+ yr as VirtualHumanEventAdapter,
2199
+ It as VirtualHumanPersona,
2200
+ Dr as default
2200
2201
  };