quickvo-player 0.2.5 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -117,8 +117,8 @@ class O {
117
117
  y(this, "inputStream", new MediaStream()), y(this, "outputStream", new MediaStream()), y(this, "inputGain", 1), y(this, "enhanceGain", 1), y(this, "bgsGain", 1), y(this, "bgmGain", 1), y(this, "outputGain", 1), y(this, "mixAudioMap", /* @__PURE__ */ new Map()), y(this, "audioContext", new AudioContext()), y(this, "sourceNode"), y(this, "inputGainNode"), y(this, "enhanceGainNode"), y(this, "bgsGainNode"), y(this, "bgmGainNode"), y(this, "analyserNode"), y(this, "analyserArrayData"), y(this, "outputGainNode"), y(this, "destinationNode"), y(this, "filterStream", (u) => u), y(this, "stop", () => {
118
118
  {
119
119
  const u = this.inputStream.getTracks();
120
- for (const r of u)
121
- r.stop(), this.inputStream.removeTrack(r);
120
+ for (const n of u)
121
+ n.stop(), this.inputStream.removeTrack(n);
122
122
  }
123
123
  }), y(this, "getStream", () => this.filterStream(this.outputStream)), y(this, "setMute", (u = !0) => {
124
124
  u ? this.analyserNode.disconnect(this.outputGainNode) : this.analyserNode.connect(this.outputGainNode);
@@ -133,47 +133,47 @@ class O {
133
133
  }), y(this, "setOutputGain", (u) => {
134
134
  this.outputGain = u, this.outputGainNode.gain.setValueAtTime(this.outputGain, this.audioContext.currentTime);
135
135
  }), y(this, "getVolume", () => {
136
- const { analyserNode: u, analyserArrayData: r } = this;
137
- u.getByteFrequencyData(r);
138
- let n = 0;
139
- for (let i = 0; i < r.length; i++)
140
- n += r[i];
141
- return Math.ceil(n / r.length);
142
- }), y(this, "mixAudio", (u, r = "bgm") => new Promise(async (n, i) => {
136
+ const { analyserNode: u, analyserArrayData: n } = this;
137
+ u.getByteFrequencyData(n);
138
+ let r = 0;
139
+ for (let i = 0; i < n.length; i++)
140
+ r += n[i];
141
+ return Math.ceil(r / n.length);
142
+ }), y(this, "mixAudio", (u, n = "bgm") => new Promise(async (r, i) => {
143
143
  try {
144
144
  {
145
- const s = this.mixAudioMap.get(r);
145
+ const s = this.mixAudioMap.get(n);
146
146
  s && s.stop();
147
147
  }
148
- const t = r === "bgs" ? this.bgsGainNode : this.bgmGainNode, e = this.audioContext.createBufferSource();
149
- this.mixAudioMap.set(r, e), e.buffer = u, e.connect(t), e.onended = () => {
150
- e.disconnect(t), this.mixAudioMap.delete(r), n(!0);
148
+ const t = n === "bgs" ? this.bgsGainNode : this.bgmGainNode, e = this.audioContext.createBufferSource();
149
+ this.mixAudioMap.set(n, e), e.buffer = u, e.connect(t), e.onended = () => {
150
+ e.disconnect(t), this.mixAudioMap.delete(n), r(!0);
151
151
  }, e.start(0);
152
152
  } catch (t) {
153
153
  i(t);
154
154
  }
155
155
  })), y(this, "mixAudioStop", (u) => {
156
- const r = this.mixAudioMap.get(u);
157
- r == null || r.stop();
158
- }), y(this, "changeMix", (u, r) => {
159
- const n = u === "bgs" ? this.bgsGainNode : this.bgmGainNode;
160
- r ? n.connect(this.destinationNode) : n.disconnect(this.destinationNode);
156
+ const n = this.mixAudioMap.get(u);
157
+ n == null || n.stop();
158
+ }), y(this, "changeMix", (u, n) => {
159
+ const r = u === "bgs" ? this.bgsGainNode : this.bgmGainNode;
160
+ n ? r.connect(this.destinationNode) : r.disconnect(this.destinationNode);
161
161
  }), a && (this.audioContext = a), this.inputStream = o, this.sourceNode = this.audioContext.createMediaStreamSource(this.inputStream), this.inputGainNode = this.audioContext.createGain(), this.inputGainNode.gain.setValueAtTime(this.inputGain, this.audioContext.currentTime), this.enhanceGainNode = this.audioContext.createGain(), this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain, this.audioContext.currentTime), this.bgsGainNode = this.audioContext.createGain(), this.bgsGainNode.gain.setValueAtTime(this.bgsGain, this.audioContext.currentTime), this.bgmGainNode = this.audioContext.createGain(), this.bgmGainNode.gain.setValueAtTime(this.bgmGain, this.audioContext.currentTime), this.analyserNode = this.audioContext.createAnalyser(), this.analyserNode.fftSize = 512, this.analyserArrayData = new Uint8Array(this.analyserNode.frequencyBinCount), this.outputGainNode = this.audioContext.createGain(), this.outputGainNode.gain.setValueAtTime(this.outputGain, this.audioContext.currentTime), this.destinationNode = this.audioContext.createMediaStreamDestination(), this.outputStream = this.destinationNode.stream;
162
162
  {
163
- const { sourceNode: u, inputGainNode: r, enhanceGainNode: n, bgsGainNode: i, bgmGainNode: t, analyserNode: e, outputGainNode: s, destinationNode: l } = this;
164
- u.connect(r), r.connect(n), n.connect(e), i.connect(e), t.connect(e), n.connect(l), i.connect(l), t.connect(l), e.connect(s), s.connect(this.audioContext.destination);
163
+ const { sourceNode: u, inputGainNode: n, enhanceGainNode: r, bgsGainNode: i, bgmGainNode: t, analyserNode: e, outputGainNode: s, destinationNode: l } = this;
164
+ u.connect(n), n.connect(r), r.connect(e), i.connect(e), t.connect(e), r.connect(l), i.connect(l), t.connect(l), e.connect(s), s.connect(this.audioContext.destination);
165
165
  }
166
166
  this.setMute(!0), this.audioContext.resume();
167
167
  }
168
168
  }
169
169
  const E = async (h, o) => {
170
170
  try {
171
- const { format: a, numberOfChannels: u, numberOfFrames: r, sampleRate: n } = o, i = h.createBuffer(u, r, n);
171
+ const { format: a, numberOfChannels: u, numberOfFrames: n, sampleRate: r } = o, i = h.createBuffer(u, n, r);
172
172
  for (let t = 0; t < u; t++) {
173
173
  const e = o.allocationSize({ planeIndex: t }), s = new Uint8Array(e);
174
174
  o.copyTo(s, { planeIndex: t });
175
175
  const l = new DataView(s.buffer), c = i.getChannelData(t);
176
- for (let d = 0; d < r; d++) {
176
+ for (let d = 0; d < n; d++) {
177
177
  let p;
178
178
  switch (a) {
179
179
  case "s16":
@@ -222,15 +222,15 @@ class W {
222
222
  const { audioData: a, playbackRate: u = 1 } = o;
223
223
  try {
224
224
  if (!this.audioContext || !this.destination) return;
225
- let r = await E(this.audioContext, a);
226
- if (!r) return;
227
- const n = this.audioContext.createBufferSource();
228
- n.buffer = r, n.playbackRate.value = u;
225
+ let n = await E(this.audioContext, a);
226
+ if (!n) return;
227
+ const r = this.audioContext.createBufferSource();
228
+ r.buffer = n, r.playbackRate.value = u;
229
229
  const i = -1200 * Math.log2(u);
230
- n.detune.value = i, n.connect(this.destination);
231
- const t = Math.max(this.nextStartTime, this.audioContext.currentTime), e = r.duration / u;
232
- this.nextStartTime = t + e, n.start(t), this.pendingSources.push(n), n.onended = () => {
233
- this.pendingSources = this.pendingSources.filter((s) => s !== n);
230
+ r.detune.value = i, r.connect(this.destination);
231
+ const t = Math.max(this.nextStartTime, this.audioContext.currentTime), e = n.duration / u;
232
+ this.nextStartTime = t + e, r.start(t), this.pendingSources.push(r), r.onended = () => {
233
+ this.pendingSources = this.pendingSources.filter((s) => s !== r);
234
234
  }, this.audioContext.state === "suspended" && await this.audioContext.resume();
235
235
  } finally {
236
236
  a.close();
@@ -298,51 +298,50 @@ class $ {
298
298
  * @param timeout 超时时间 ms
299
299
  * @returns
300
300
  */
301
- m(this, "add", (o, a = () => !1, u = 0) => new Promise((r) => {
301
+ m(this, "add", (o, a = () => !1, u = 0) => new Promise((n) => {
302
302
  var t, e;
303
- if (a()) return r(!0);
303
+ if (a()) return n(!0);
304
304
  this.resolvesMap.has(o) || this.resolvesMap.set(o, /* @__PURE__ */ new Map()), this.index++;
305
- const n = `${this.index}`;
305
+ const r = `${this.index}`;
306
306
  if (u = Math.max(0, u), u === 0) {
307
- (t = this.resolvesMap.get(o)) == null || t.set(n, { resolve: r, timer: 0 });
307
+ (t = this.resolvesMap.get(o)) == null || t.set(r, { resolve: n, timer: 0 });
308
308
  return;
309
309
  }
310
310
  const i = window.setTimeout(() => {
311
311
  this.emit(o);
312
312
  }, u);
313
- (e = this.resolvesMap.get(o)) == null || e.set(n, { resolve: r, timer: i });
313
+ (e = this.resolvesMap.get(o)) == null || e.set(r, { resolve: n, timer: i });
314
314
  }));
315
315
  m(this, "emit", async (o) => {
316
316
  const a = this.resolvesMap.get(o);
317
317
  if (!a) return;
318
318
  const u = [...a.keys()];
319
- for (const r of u) {
320
- const n = a.get(r);
321
- n && (clearTimeout(n.timer), n.resolve(), a.delete(r));
319
+ for (const n of u) {
320
+ const r = a.get(n);
321
+ r && (clearTimeout(r.timer), r.resolve(), a.delete(n));
322
322
  }
323
323
  });
324
324
  }
325
325
  }
326
326
  const Y = (h) => {
327
327
  const o = new DataView(h.buffer);
328
- let a = 0, u, r, n;
328
+ let a = 0, u, n, r;
329
329
  u = o.getUint32(a, !1), a += 4;
330
330
  {
331
331
  const i = o.getUint8(a), t = i >> 7 & 1, e = i >> 5 & 3, s = i & 31;
332
- r = { forbidden_zero_bit: t, nal_ref_idc: e, nal_unit_type: s }, a += 1;
332
+ n = { forbidden_zero_bit: t, nal_ref_idc: e, nal_unit_type: s }, a += 1;
333
333
  }
334
334
  {
335
335
  const i = u - 1;
336
- n = new Uint8Array(o.buffer.slice(a, a + i));
336
+ r = new Uint8Array(o.buffer.slice(a, a + i));
337
337
  }
338
- return { size: u, header: r, data: n };
338
+ return { size: u, header: n, data: r };
339
339
  };
340
340
  var P, U;
341
341
  class x {
342
342
  constructor(o = {}) {
343
343
  J(this, P, {
344
- timeout: 5 * 1e3,
345
- check: !1
344
+ timeout: 5 * 1e3
346
345
  });
347
346
  J(this, U);
348
347
  /**
@@ -350,34 +349,34 @@ class x {
350
349
  * @param input string | URL | Request
351
350
  * @param init RequestInit
352
351
  */
353
- m(this, "check", (o, a) => new Promise(async (u, r) => {
352
+ m(this, "check", (o, a) => new Promise(async (u, n) => {
354
353
  var i;
355
354
  this.stop(), H(this, U, new AbortController());
356
- const n = window.setTimeout(() => {
355
+ const r = window.setTimeout(() => {
357
356
  var t;
358
- (t = I(this, U)) == null || t.abort("Timeout."), r({ status: "timeout", reason: "" });
357
+ (t = I(this, U)) == null || t.abort("Timeout."), n({ status: "timeout", reason: "" });
359
358
  }, I(this, P).timeout);
360
359
  try {
361
360
  const t = await fetch(o, { ...a, method: "HEAD", signal: (i = I(this, U)) == null ? void 0 : i.signal });
362
- t.status === 200 ? u({ status: "successed", reason: "" }) : r({ status: "failed", reason: `${t.status}` });
361
+ t.status === 200 ? u({ status: "successed", reason: "" }) : n({ status: "failed", reason: `${t.status}` });
363
362
  } catch (t) {
364
- r({ status: "error", reason: t.message });
363
+ n({ status: "error", reason: t.message });
365
364
  }
366
- clearTimeout(n);
365
+ clearTimeout(r);
367
366
  }));
368
367
  /**
369
368
  *
370
369
  * @param input string | URL | Request
371
370
  * @param init RequestInit
372
371
  */
373
- m(this, "request", async (o, a) => new Promise(async (u, r) => {
374
- var n;
372
+ m(this, "request", async (o, a) => new Promise(async (u, n) => {
373
+ var r;
375
374
  try {
376
- I(this, P).check && await this.check(o, a), H(this, U, new AbortController());
377
- const i = await fetch(o, { ...a, signal: (n = I(this, U)) == null ? void 0 : n.signal });
375
+ await this.check(o, a), H(this, U, new AbortController());
376
+ const i = await fetch(o, { ...a, signal: (r = I(this, U)) == null ? void 0 : r.signal });
378
377
  u(i);
379
378
  } catch (i) {
380
- this.stop(), r(i);
379
+ this.stop(), n(i);
381
380
  }
382
381
  }));
383
382
  /**
@@ -398,6 +397,7 @@ class et {
398
397
  frameTrack: !1
399
398
  });
400
399
  m(this, "prFetch", new x());
400
+ m(this, "getSegmentsFetch", new x());
401
401
  m(this, "prResolves", new $());
402
402
  m(this, "url", "");
403
403
  m(this, "demuxerWorker");
@@ -414,7 +414,7 @@ class et {
414
414
  * @param url : string
415
415
  */
416
416
  m(this, "start", async (o) => {
417
- this.stop(), this.url = o;
417
+ await this.stop(), this.url = o;
418
418
  const a = q(o);
419
419
  if (a === "unknown") throw new Error("This address cannot be parsed.");
420
420
  switch (this.init(a), a) {
@@ -430,16 +430,16 @@ class et {
430
430
  * 停止
431
431
  */
432
432
  m(this, "stop", async () => {
433
- var a, u, r, n, i;
433
+ var a, u, n, r, i;
434
434
  try {
435
- clearInterval(this.hls.getSegmentsTimer), this.prFetch.stop();
435
+ this.url = "", clearInterval(this.hls.getSegmentsTimer), this.prFetch.stop(), this.getSegmentsFetch.stop();
436
436
  } catch (t) {
437
437
  console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: error", t);
438
438
  }
439
- (a = this.demuxerWorker) == null || a.destroy(), (u = this.decoderWorker) == null || u.destroy(), (r = this.renderWorker) == null || r.destroy();
439
+ (a = this.demuxerWorker) == null || a.destroy(), (u = this.decoderWorker) == null || u.destroy(), (n = this.renderWorker) == null || n.destroy();
440
440
  const o = [...this.cutRenders.keys()];
441
441
  for (const t of o)
442
- (n = this.cutRenders.get(t)) == null || n.worker.destroy(), this.cutRenders.delete(t);
442
+ (r = this.cutRenders.get(t)) == null || r.worker.destroy(), this.cutRenders.delete(t);
443
443
  M(this.stream), (i = this.audioPlayer) == null || i.destroy();
444
444
  });
445
445
  /**
@@ -526,20 +526,20 @@ class et {
526
526
  }, this.demuxerWorker.on.info = (a) => {
527
527
  this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: info", a), this.on.demuxer.info && this.on.demuxer.info(a);
528
528
  }, this.demuxerWorker.on.config = (a) => {
529
- var r, n;
529
+ var n, r;
530
530
  this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: config", a), this.on.demuxer.config && this.on.demuxer.config(a);
531
531
  const { kind: u } = a;
532
532
  switch (u) {
533
533
  case "audio":
534
534
  {
535
535
  const { codec: i, sampleRate: t, numberOfChannels: e } = a;
536
- (r = this.decoderWorker) == null || r.initAudio({ codec: i, sampleRate: t, numberOfChannels: e });
536
+ (n = this.decoderWorker) == null || n.initAudio({ codec: i, sampleRate: t, numberOfChannels: e });
537
537
  }
538
538
  break;
539
539
  case "video":
540
540
  {
541
541
  const { codec: i, description: t } = a;
542
- (n = this.decoderWorker) == null || n.initVideo({ codec: i, description: t });
542
+ (r = this.decoderWorker) == null || r.initVideo({ codec: i, description: t });
543
543
  }
544
544
  break;
545
545
  }
@@ -549,14 +549,14 @@ class et {
549
549
  switch (u) {
550
550
  case "audio":
551
551
  {
552
- const { type: r, dts: n, data: i } = a, t = n * 1e3;
553
- this.decoderWorker.push({ kind: u, init: { type: r, timestamp: t, data: i } });
552
+ const { type: n, dts: r, data: i } = a, t = r * 1e3;
553
+ this.decoderWorker.push({ kind: u, init: { type: n, timestamp: t, data: i } });
554
554
  }
555
555
  break;
556
556
  case "video":
557
557
  {
558
- const { type: r, dts: n, data: i, nalus: t = [] } = a, e = n * 1e3;
559
- this.decoderWorker.push({ kind: u, init: { type: r, timestamp: e, data: i }, nalus: t });
558
+ const { type: n, dts: r, data: i, nalus: t = [] } = a, e = r * 1e3;
559
+ this.decoderWorker.push({ kind: u, init: { type: n, timestamp: e, data: i }, nalus: t });
560
560
  }
561
561
  break;
562
562
  }
@@ -569,23 +569,23 @@ class et {
569
569
  this.decoderWorker = new N(), this.decoderWorker.init(o);
570
570
  const { frameTrack: a = !1 } = this.option;
571
571
  this.decoderWorker.setFrameTrack(a), this.decoderWorker.on.audio.decode = (u) => {
572
- var r;
573
- (r = this.audioPlayer) == null || r.push(u), this.on.decoder.audio && this.on.decoder.audio(u);
572
+ var n;
573
+ (n = this.audioPlayer) == null || n.push(u), this.on.decoder.audio && this.on.decoder.audio(u);
574
574
  }, this.decoderWorker.on.audio.error = (u) => {
575
575
  this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: audio.error ", u), this.on.error && this.on.error(u);
576
576
  }, this.decoderWorker.on.video.decode = async (u) => {
577
- var n, i;
578
- (n = this.renderWorker) == null || n.push(u);
579
- const r = [...this.cutRenders.keys()];
580
- for (const t of r)
577
+ var r, i;
578
+ (r = this.renderWorker) == null || r.push(u);
579
+ const n = [...this.cutRenders.keys()];
580
+ for (const t of n)
581
581
  (i = this.cutRenders.get(t)) == null || i.worker.push(u);
582
582
  this.on.decoder.video && this.on.decoder.video(u), u.bitmap.close();
583
583
  }, this.decoderWorker.on.video.error = (u) => {
584
- this.stop(), this.on.error && this.on.error(u);
584
+ this.on.error && this.on.error(u);
585
585
  }, this.decoderWorker.on.nalus = async (u) => {
586
- for (const r of u) {
587
- if (r.byteLength <= 4) continue;
588
- const { header: n, data: i } = Y(r), { nal_unit_type: t } = n;
586
+ for (const n of u) {
587
+ if (n.byteLength <= 4) continue;
588
+ const { header: r, data: i } = Y(n), { nal_unit_type: t } = r;
589
589
  t === 6 && this.on.decoder.sei && this.on.decoder.sei(i);
590
590
  }
591
591
  }, this.decoderWorker.on.analysis = (u) => {
@@ -604,12 +604,12 @@ class et {
604
604
  var o, a;
605
605
  try {
606
606
  let u = await this.prFetch.request(this.url);
607
- if (u.status !== 200 && (await new Promise((n) => setTimeout(() => n(!0), 500)), u = await this.prFetch.request(this.url)), u.status !== 200 && (await new Promise((n) => setTimeout(() => n(!0), 500)), u = await this.prFetch.request(this.url)), u.status !== 200) throw new Error("request is error.");
608
- const r = (o = u.body) == null ? void 0 : o.getReader();
609
- if (!r) throw new Error("reader is error.");
607
+ if (u.status !== 200 && (await new Promise((r) => setTimeout(() => r(!0), 500)), u = await this.prFetch.request(this.url)), u.status !== 200 && (await new Promise((r) => setTimeout(() => r(!0), 500)), u = await this.prFetch.request(this.url)), u.status !== 200) throw new Error("request is error.");
608
+ const n = (o = u.body) == null ? void 0 : o.getReader();
609
+ if (!n) throw new Error("reader is error.");
610
610
  for (; ; ) {
611
- const { done: n, value: i } = await r.read();
612
- if (i && ((a = this.demuxerWorker) == null || a.push(i)), n) break;
611
+ const { done: r, value: i } = await n.read();
612
+ if (i && ((a = this.demuxerWorker) == null || a.push(i)), r || this.url === "") break;
613
613
  }
614
614
  } catch (u) {
615
615
  if ((u == null ? void 0 : u.name) !== "AbortError") throw Error(u);
@@ -625,34 +625,33 @@ class et {
625
625
  parse: async (o) => {
626
626
  const a = new TextDecoder("utf-8").decode(o).split(`
627
627
  `).map((e) => e.replace("\r", "")), u = this.url.substring(0, this.url.lastIndexOf("/") + 1);
628
- let r = 4, n = 0, i = !1;
628
+ let n = 4, r = 0, i = !1;
629
629
  const t = [];
630
630
  for (const e of a)
631
- e.startsWith("#EXTINF:") ? r = parseFloat(e.split(":")[1].split(",")[0]) : e.startsWith("#EXT-X-TARGETDURATION:") ? n = parseInt(e.split(":")[1]) : e.startsWith("#EXT-X-ENDLIST") ? i = !1 : e.startsWith("#EXT-X-MEDIA-SEQUENCE:") ? i = !0 : e.includes(".ts") && !e.startsWith("#") && t.push({
631
+ e.startsWith("#EXTINF:") ? n = parseFloat(e.split(":")[1].split(",")[0]) : e.startsWith("#EXT-X-TARGETDURATION:") ? r = parseInt(e.split(":")[1]) : e.startsWith("#EXT-X-ENDLIST") ? i = !1 : e.startsWith("#EXT-X-MEDIA-SEQUENCE:") ? i = !0 : e.includes(".ts") && !e.startsWith("#") && t.push({
632
632
  url: e.startsWith("http") ? e : u + e,
633
- duration: r,
633
+ duration: n,
634
634
  isLive: i
635
635
  });
636
- return { baseUrl: u, targetDuration: n, isLive: i, segments: t };
636
+ return { baseUrl: u, targetDuration: r, isLive: i, segments: t };
637
637
  },
638
638
  getSegments: async () => {
639
639
  var o;
640
640
  try {
641
- const a = new x();
642
- let u = await a.request(this.url);
643
- if (u.status !== 200 && (await new Promise((n) => setTimeout(() => n(!0), 500)), u = await a.request(this.url)), u.status !== 200 && (await new Promise((n) => setTimeout(() => n(!0), 500)), u = await a.request(this.url)), u.status !== 200) throw new Error("request is error.");
644
- const r = (o = u.body) == null ? void 0 : o.getReader();
645
- if (!r) throw new Error("reader is error.");
641
+ let a = await this.getSegmentsFetch.request(this.url);
642
+ if (a.status !== 200 && (await new Promise((n) => setTimeout(() => n(!0), 500)), a = await this.getSegmentsFetch.request(this.url)), a.status !== 200 && (await new Promise((n) => setTimeout(() => n(!0), 500)), a = await this.getSegmentsFetch.request(this.url)), a.status !== 200) throw new Error("request is error.");
643
+ const u = (o = a.body) == null ? void 0 : o.getReader();
644
+ if (!u) throw new Error("reader is error.");
646
645
  for (; ; ) {
647
- const { done: n, value: i } = await r.read();
648
- if (i) {
649
- const t = await this.hls.parse(i), { segments: e = [], isLive: s = !1 } = t;
650
- this.hls.isLive = s, s === !1 && (this.option.frameTrack = !1);
651
- let l = Array.from(e, (d) => d.url);
652
- const c = l.findIndex((d) => d === this.hls.url);
653
- c !== -1 && (l = l.slice(c + 1)), this.hls.urls = l;
646
+ const { done: n, value: r } = await u.read();
647
+ if (r) {
648
+ const i = await this.hls.parse(r), { segments: t = [], isLive: e = !1 } = i;
649
+ this.hls.isLive = e, e === !1 && (this.option.frameTrack = !1);
650
+ let s = Array.from(t, (c) => c.url);
651
+ const l = s.findIndex((c) => c === this.hls.url);
652
+ l !== -1 && (s = s.slice(l + 1)), this.hls.urls = s;
654
653
  }
655
- if (n) break;
654
+ if (n || this.url === "") break;
656
655
  }
657
656
  } catch (a) {
658
657
  this.on.error && this.on.error(a);
@@ -662,20 +661,20 @@ class et {
662
661
  var o, a, u;
663
662
  try {
664
663
  for (await this.hls.getSegments(), this.hls.getSegmentsTimer = window.setInterval(this.hls.getSegments, 500), this.hls.isLive === !1 && (clearInterval(this.hls.getSegmentsTimer), (o = this.decoderWorker) == null ? void 0 : o.setFrameTrack(!1)); ; ) {
665
- const r = this.hls.urls.shift();
666
- if (r) {
667
- this.hls.url = r;
668
- const n = (a = (await this.prFetch.request(r)).body) == null ? void 0 : a.getReader();
669
- if (!n) throw new Error("segment reader is error.");
664
+ const n = this.hls.urls.shift();
665
+ if (n) {
666
+ this.hls.url = n;
667
+ const r = (a = (await this.prFetch.request(n)).body) == null ? void 0 : a.getReader();
668
+ if (!r) throw new Error("segment reader is error.");
670
669
  for (; ; ) {
671
- const { done: i, value: t } = await n.read();
672
- if (t && ((u = this.demuxerWorker) == null || u.push(t)), i) break;
670
+ const { done: i, value: t } = await r.read();
671
+ if (t && ((u = this.demuxerWorker) == null || u.push(t)), i || this.url === "") break;
673
672
  }
674
673
  } else
675
- await new Promise((n) => setTimeout(() => n(!0), 300));
674
+ await new Promise((r) => setTimeout(() => r(!0), 300));
676
675
  }
677
- } catch (r) {
678
- if ((r == null ? void 0 : r.name) !== "AbortError") throw Error(r);
676
+ } catch (n) {
677
+ if ((n == null ? void 0 : n.name) !== "AbortError") throw Error(n);
679
678
  }
680
679
  }
681
680
  });
@@ -688,10 +687,10 @@ function requireAspromise() {
688
687
  if (hasRequiredAspromise) return aspromise;
689
688
  hasRequiredAspromise = 1, aspromise = h;
690
689
  function h(o, a) {
691
- for (var u = new Array(arguments.length - 1), r = 0, n = 2, i = !0; n < arguments.length; )
692
- u[r++] = arguments[n++];
690
+ for (var u = new Array(arguments.length - 1), n = 0, r = 2, i = !0; r < arguments.length; )
691
+ u[n++] = arguments[r++];
693
692
  return new Promise(function(e, s) {
694
- u[r] = function(c) {
693
+ u[n] = function(c) {
695
694
  if (i)
696
695
  if (i = !1, c)
697
696
  s(c);
@@ -722,8 +721,8 @@ function requireBase64() {
722
721
  ++s;
723
722
  return Math.ceil(t.length * 3) / 4 - s;
724
723
  };
725
- for (var a = new Array(64), u = new Array(123), r = 0; r < 64; )
726
- u[a[r] = r < 26 ? r + 65 : r < 52 ? r + 71 : r < 62 ? r - 4 : r - 59 | 43] = r++;
724
+ for (var a = new Array(64), u = new Array(123), n = 0; n < 64; )
725
+ u[a[n] = n < 26 ? n + 65 : n < 52 ? n + 71 : n < 62 ? n - 4 : n - 59 | 43] = n++;
727
726
  o.encode = function(t, e, s) {
728
727
  for (var l = null, c = [], d = 0, p = 0, f; e < s; ) {
729
728
  var w = t[e++];
@@ -742,14 +741,14 @@ function requireBase64() {
742
741
  }
743
742
  return p && (c[d++] = a[f], c[d++] = 61, p === 1 && (c[d++] = 61)), l ? (d && l.push(String.fromCharCode.apply(String, c.slice(0, d))), l.join("")) : String.fromCharCode.apply(String, c.slice(0, d));
744
743
  };
745
- var n = "invalid encoding";
744
+ var r = "invalid encoding";
746
745
  o.decode = function(t, e, s) {
747
746
  for (var l = s, c = 0, d, p = 0; p < t.length; ) {
748
747
  var f = t.charCodeAt(p++);
749
748
  if (f === 61 && c > 1)
750
749
  break;
751
750
  if ((f = u[f]) === void 0)
752
- throw Error(n);
751
+ throw Error(r);
753
752
  switch (c) {
754
753
  case 0:
755
754
  d = f, c = 1;
@@ -766,7 +765,7 @@ function requireBase64() {
766
765
  }
767
766
  }
768
767
  if (c === 1)
769
- throw Error(n);
768
+ throw Error(r);
770
769
  return s - l;
771
770
  }, o.test = function(t) {
772
771
  return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t);
@@ -780,10 +779,10 @@ function requireEventemitter() {
780
779
  function h() {
781
780
  this._listeners = {};
782
781
  }
783
- return h.prototype.on = function(a, u, r) {
782
+ return h.prototype.on = function(a, u, n) {
784
783
  return (this._listeners[a] || (this._listeners[a] = [])).push({
785
784
  fn: u,
786
- ctx: r || this
785
+ ctx: n || this
787
786
  }), this;
788
787
  }, h.prototype.off = function(a, u) {
789
788
  if (a === void 0)
@@ -791,16 +790,16 @@ function requireEventemitter() {
791
790
  else if (u === void 0)
792
791
  this._listeners[a] = [];
793
792
  else
794
- for (var r = this._listeners[a], n = 0; n < r.length; )
795
- r[n].fn === u ? r.splice(n, 1) : ++n;
793
+ for (var n = this._listeners[a], r = 0; r < n.length; )
794
+ n[r].fn === u ? n.splice(r, 1) : ++r;
796
795
  return this;
797
796
  }, h.prototype.emit = function(a) {
798
797
  var u = this._listeners[a];
799
798
  if (u) {
800
- for (var r = [], n = 1; n < arguments.length; )
801
- r.push(arguments[n++]);
802
- for (n = 0; n < u.length; )
803
- u[n].fn.apply(u[n++].ctx, r);
799
+ for (var n = [], r = 1; r < arguments.length; )
800
+ n.push(arguments[r++]);
801
+ for (r = 0; r < u.length; )
802
+ u[r].fn.apply(u[r++].ctx, n);
804
803
  }
805
804
  return this;
806
805
  }, eventemitter;
@@ -809,7 +808,7 @@ var float, hasRequiredFloat;
809
808
  function requireFloat() {
810
809
  if (hasRequiredFloat) return float;
811
810
  hasRequiredFloat = 1, float = h(h);
812
- function h(n) {
811
+ function h(r) {
813
812
  return typeof Float32Array < "u" ? function() {
814
813
  var i = new Float32Array([-0]), t = new Uint8Array(i.buffer), e = t[3] === 128;
815
814
  function s(p, f, w) {
@@ -818,14 +817,14 @@ function requireFloat() {
818
817
  function l(p, f, w) {
819
818
  i[0] = p, f[w] = t[3], f[w + 1] = t[2], f[w + 2] = t[1], f[w + 3] = t[0];
820
819
  }
821
- n.writeFloatLE = e ? s : l, n.writeFloatBE = e ? l : s;
820
+ r.writeFloatLE = e ? s : l, r.writeFloatBE = e ? l : s;
822
821
  function c(p, f) {
823
822
  return t[0] = p[f], t[1] = p[f + 1], t[2] = p[f + 2], t[3] = p[f + 3], i[0];
824
823
  }
825
824
  function d(p, f) {
826
825
  return t[3] = p[f], t[2] = p[f + 1], t[1] = p[f + 2], t[0] = p[f + 3], i[0];
827
826
  }
828
- n.readFloatLE = e ? c : d, n.readFloatBE = e ? d : c;
827
+ r.readFloatLE = e ? c : d, r.readFloatBE = e ? d : c;
829
828
  }() : function() {
830
829
  function i(e, s, l, c) {
831
830
  var d = s < 0 ? 1 : 0;
@@ -848,12 +847,12 @@ function requireFloat() {
848
847
  e((d << 31 | p + 127 << 23 | f) >>> 0, l, c);
849
848
  }
850
849
  }
851
- n.writeFloatLE = i.bind(null, o), n.writeFloatBE = i.bind(null, a);
850
+ r.writeFloatLE = i.bind(null, o), r.writeFloatBE = i.bind(null, a);
852
851
  function t(e, s, l) {
853
852
  var c = e(s, l), d = (c >> 31) * 2 + 1, p = c >>> 23 & 255, f = c & 8388607;
854
853
  return p === 255 ? f ? NaN : d * (1 / 0) : p === 0 ? d * 1401298464324817e-60 * f : d * Math.pow(2, p - 150) * (f + 8388608);
855
854
  }
856
- n.readFloatLE = t.bind(null, u), n.readFloatBE = t.bind(null, r);
855
+ r.readFloatLE = t.bind(null, u), r.readFloatBE = t.bind(null, n);
857
856
  }(), typeof Float64Array < "u" ? function() {
858
857
  var i = new Float64Array([-0]), t = new Uint8Array(i.buffer), e = t[7] === 128;
859
858
  function s(p, f, w) {
@@ -862,14 +861,14 @@ function requireFloat() {
862
861
  function l(p, f, w) {
863
862
  i[0] = p, f[w] = t[7], f[w + 1] = t[6], f[w + 2] = t[5], f[w + 3] = t[4], f[w + 4] = t[3], f[w + 5] = t[2], f[w + 6] = t[1], f[w + 7] = t[0];
864
863
  }
865
- n.writeDoubleLE = e ? s : l, n.writeDoubleBE = e ? l : s;
864
+ r.writeDoubleLE = e ? s : l, r.writeDoubleBE = e ? l : s;
866
865
  function c(p, f) {
867
866
  return t[0] = p[f], t[1] = p[f + 1], t[2] = p[f + 2], t[3] = p[f + 3], t[4] = p[f + 4], t[5] = p[f + 5], t[6] = p[f + 6], t[7] = p[f + 7], i[0];
868
867
  }
869
868
  function d(p, f) {
870
869
  return t[7] = p[f], t[6] = p[f + 1], t[5] = p[f + 2], t[4] = p[f + 3], t[3] = p[f + 4], t[2] = p[f + 5], t[1] = p[f + 6], t[0] = p[f + 7], i[0];
871
870
  }
872
- n.readDoubleLE = e ? c : d, n.readDoubleBE = e ? d : c;
871
+ r.readDoubleLE = e ? c : d, r.readDoubleBE = e ? d : c;
873
872
  }() : function() {
874
873
  function i(e, s, l, c, d, p) {
875
874
  var f = c < 0 ? 1 : 0;
@@ -895,25 +894,25 @@ function requireFloat() {
895
894
  }
896
895
  }
897
896
  }
898
- n.writeDoubleLE = i.bind(null, o, 0, 4), n.writeDoubleBE = i.bind(null, a, 4, 0);
897
+ r.writeDoubleLE = i.bind(null, o, 0, 4), r.writeDoubleBE = i.bind(null, a, 4, 0);
899
898
  function t(e, s, l, c, d) {
900
899
  var p = e(c, d + s), f = e(c, d + l), w = (f >> 31) * 2 + 1, b = f >>> 20 & 2047, g = 4294967296 * (f & 1048575) + p;
901
900
  return b === 2047 ? g ? NaN : w * (1 / 0) : b === 0 ? w * 5e-324 * g : w * Math.pow(2, b - 1075) * (g + 4503599627370496);
902
901
  }
903
- n.readDoubleLE = t.bind(null, u, 0, 4), n.readDoubleBE = t.bind(null, r, 4, 0);
904
- }(), n;
902
+ r.readDoubleLE = t.bind(null, u, 0, 4), r.readDoubleBE = t.bind(null, n, 4, 0);
903
+ }(), r;
905
904
  }
906
- function o(n, i, t) {
907
- i[t] = n & 255, i[t + 1] = n >>> 8 & 255, i[t + 2] = n >>> 16 & 255, i[t + 3] = n >>> 24;
905
+ function o(r, i, t) {
906
+ i[t] = r & 255, i[t + 1] = r >>> 8 & 255, i[t + 2] = r >>> 16 & 255, i[t + 3] = r >>> 24;
908
907
  }
909
- function a(n, i, t) {
910
- i[t] = n >>> 24, i[t + 1] = n >>> 16 & 255, i[t + 2] = n >>> 8 & 255, i[t + 3] = n & 255;
908
+ function a(r, i, t) {
909
+ i[t] = r >>> 24, i[t + 1] = r >>> 16 & 255, i[t + 2] = r >>> 8 & 255, i[t + 3] = r & 255;
911
910
  }
912
- function u(n, i) {
913
- return (n[i] | n[i + 1] << 8 | n[i + 2] << 16 | n[i + 3] << 24) >>> 0;
911
+ function u(r, i) {
912
+ return (r[i] | r[i + 1] << 8 | r[i + 2] << 16 | r[i + 3] << 24) >>> 0;
914
913
  }
915
- function r(n, i) {
916
- return (n[i] << 24 | n[i + 1] << 16 | n[i + 2] << 8 | n[i + 3]) >>> 0;
914
+ function n(r, i) {
915
+ return (r[i] << 24 | r[i + 1] << 16 | r[i + 2] << 8 | r[i + 3]) >>> 0;
917
916
  }
918
917
  return float;
919
918
  }
@@ -937,20 +936,20 @@ function requireUtf8() {
937
936
  return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(h) {
938
937
  var o = h;
939
938
  o.length = function(u) {
940
- for (var r = 0, n = 0, i = 0; i < u.length; ++i)
941
- n = u.charCodeAt(i), n < 128 ? r += 1 : n < 2048 ? r += 2 : (n & 64512) === 55296 && (u.charCodeAt(i + 1) & 64512) === 56320 ? (++i, r += 4) : r += 3;
942
- return r;
943
- }, o.read = function(u, r, n) {
944
- var i = n - r;
939
+ for (var n = 0, r = 0, i = 0; i < u.length; ++i)
940
+ r = u.charCodeAt(i), r < 128 ? n += 1 : r < 2048 ? n += 2 : (r & 64512) === 55296 && (u.charCodeAt(i + 1) & 64512) === 56320 ? (++i, n += 4) : n += 3;
941
+ return n;
942
+ }, o.read = function(u, n, r) {
943
+ var i = r - n;
945
944
  if (i < 1)
946
945
  return "";
947
- for (var t = null, e = [], s = 0, l; r < n; )
948
- l = u[r++], l < 128 ? e[s++] = l : l > 191 && l < 224 ? e[s++] = (l & 31) << 6 | u[r++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (u[r++] & 63) << 12 | (u[r++] & 63) << 6 | u[r++] & 63) - 65536, e[s++] = 55296 + (l >> 10), e[s++] = 56320 + (l & 1023)) : e[s++] = (l & 15) << 12 | (u[r++] & 63) << 6 | u[r++] & 63, s > 8191 && ((t || (t = [])).push(String.fromCharCode.apply(String, e)), s = 0);
946
+ for (var t = null, e = [], s = 0, l; n < r; )
947
+ l = u[n++], l < 128 ? e[s++] = l : l > 191 && l < 224 ? e[s++] = (l & 31) << 6 | u[n++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (u[n++] & 63) << 12 | (u[n++] & 63) << 6 | u[n++] & 63) - 65536, e[s++] = 55296 + (l >> 10), e[s++] = 56320 + (l & 1023)) : e[s++] = (l & 15) << 12 | (u[n++] & 63) << 6 | u[n++] & 63, s > 8191 && ((t || (t = [])).push(String.fromCharCode.apply(String, e)), s = 0);
949
948
  return t ? (s && t.push(String.fromCharCode.apply(String, e.slice(0, s))), t.join("")) : String.fromCharCode.apply(String, e.slice(0, s));
950
- }, o.write = function(u, r, n) {
951
- for (var i = n, t, e, s = 0; s < u.length; ++s)
952
- t = u.charCodeAt(s), t < 128 ? r[n++] = t : t < 2048 ? (r[n++] = t >> 6 | 192, r[n++] = t & 63 | 128) : (t & 64512) === 55296 && ((e = u.charCodeAt(s + 1)) & 64512) === 56320 ? (t = 65536 + ((t & 1023) << 10) + (e & 1023), ++s, r[n++] = t >> 18 | 240, r[n++] = t >> 12 & 63 | 128, r[n++] = t >> 6 & 63 | 128, r[n++] = t & 63 | 128) : (r[n++] = t >> 12 | 224, r[n++] = t >> 6 & 63 | 128, r[n++] = t & 63 | 128);
953
- return n - i;
949
+ }, o.write = function(u, n, r) {
950
+ for (var i = r, t, e, s = 0; s < u.length; ++s)
951
+ t = u.charCodeAt(s), t < 128 ? n[r++] = t : t < 2048 ? (n[r++] = t >> 6 | 192, n[r++] = t & 63 | 128) : (t & 64512) === 55296 && ((e = u.charCodeAt(s + 1)) & 64512) === 56320 ? (t = 65536 + ((t & 1023) << 10) + (e & 1023), ++s, n[r++] = t >> 18 | 240, n[r++] = t >> 12 & 63 | 128, n[r++] = t >> 6 & 63 | 128, n[r++] = t & 63 | 128) : (n[r++] = t >> 12 | 224, n[r++] = t >> 6 & 63 | 128, n[r++] = t & 63 | 128);
952
+ return r - i;
954
953
  };
955
954
  }(utf8)), utf8;
956
955
  }
@@ -959,11 +958,11 @@ function requirePool() {
959
958
  if (hasRequiredPool) return pool_1;
960
959
  hasRequiredPool = 1, pool_1 = h;
961
960
  function h(o, a, u) {
962
- var r = u || 8192, n = r >>> 1, i = null, t = r;
961
+ var n = u || 8192, r = n >>> 1, i = null, t = n;
963
962
  return function(s) {
964
- if (s < 1 || s > n)
963
+ if (s < 1 || s > r)
965
964
  return o(s);
966
- t + s > r && (i = o(r), t = 0);
965
+ t + s > n && (i = o(n), t = 0);
967
966
  var l = a.call(i, t, t += s);
968
967
  return t & 7 && (t = (t | 7) + 1), l;
969
968
  };
@@ -975,8 +974,8 @@ function requireLongbits() {
975
974
  if (hasRequiredLongbits) return longbits;
976
975
  hasRequiredLongbits = 1, longbits = o;
977
976
  var h = requireMinimal$1();
978
- function o(n, i) {
979
- this.lo = n >>> 0, this.hi = i >>> 0;
977
+ function o(r, i) {
978
+ this.lo = r >>> 0, this.hi = i >>> 0;
980
979
  }
981
980
  var a = o.zero = new o(0, 0);
982
981
  a.toNumber = function() {
@@ -1012,11 +1011,11 @@ function requireLongbits() {
1012
1011
  }, o.prototype.toLong = function(i) {
1013
1012
  return h.Long ? new h.Long(this.lo | 0, this.hi | 0, !!i) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!i };
1014
1013
  };
1015
- var r = String.prototype.charCodeAt;
1014
+ var n = String.prototype.charCodeAt;
1016
1015
  return o.fromHash = function(i) {
1017
1016
  return i === u ? a : new o(
1018
- (r.call(i, 0) | r.call(i, 1) << 8 | r.call(i, 2) << 16 | r.call(i, 3) << 24) >>> 0,
1019
- (r.call(i, 4) | r.call(i, 5) << 8 | r.call(i, 6) << 16 | r.call(i, 7) << 24) >>> 0
1017
+ (n.call(i, 0) | n.call(i, 1) << 8 | n.call(i, 2) << 16 | n.call(i, 3) << 24) >>> 0,
1018
+ (n.call(i, 4) | n.call(i, 5) << 8 | n.call(i, 6) << 16 | n.call(i, 7) << 24) >>> 0
1020
1019
  );
1021
1020
  }, o.prototype.toHash = function() {
1022
1021
  return String.fromCharCode(
@@ -1051,68 +1050,68 @@ function requireMinimal$1() {
1051
1050
  /* istanbul ignore next */
1052
1051
  {}
1053
1052
  ), o.isInteger = Number.isInteger || /* istanbul ignore next */
1054
- function(n) {
1055
- return typeof n == "number" && isFinite(n) && Math.floor(n) === n;
1056
- }, o.isString = function(n) {
1057
- return typeof n == "string" || n instanceof String;
1058
- }, o.isObject = function(n) {
1059
- return n && typeof n == "object";
1053
+ function(r) {
1054
+ return typeof r == "number" && isFinite(r) && Math.floor(r) === r;
1055
+ }, o.isString = function(r) {
1056
+ return typeof r == "string" || r instanceof String;
1057
+ }, o.isObject = function(r) {
1058
+ return r && typeof r == "object";
1060
1059
  }, o.isset = /**
1061
1060
  * Checks if a property on a message is considered to be present.
1062
1061
  * @param {Object} obj Plain object or message instance
1063
1062
  * @param {string} prop Property name
1064
1063
  * @returns {boolean} `true` if considered to be present, otherwise `false`
1065
1064
  */
1066
- o.isSet = function(n, i) {
1067
- var t = n[i];
1068
- return t != null && n.hasOwnProperty(i) ? typeof t != "object" || (Array.isArray(t) ? t.length : Object.keys(t).length) > 0 : !1;
1065
+ o.isSet = function(r, i) {
1066
+ var t = r[i];
1067
+ return t != null && r.hasOwnProperty(i) ? typeof t != "object" || (Array.isArray(t) ? t.length : Object.keys(t).length) > 0 : !1;
1069
1068
  }, o.Buffer = function() {
1070
1069
  try {
1071
- var r = o.inquire("buffer").Buffer;
1072
- return r.prototype.utf8Write ? r : (
1070
+ var n = o.inquire("buffer").Buffer;
1071
+ return n.prototype.utf8Write ? n : (
1073
1072
  /* istanbul ignore next */
1074
1073
  null
1075
1074
  );
1076
1075
  } catch {
1077
1076
  return null;
1078
1077
  }
1079
- }(), o._Buffer_from = null, o._Buffer_allocUnsafe = null, o.newBuffer = function(n) {
1080
- return typeof n == "number" ? o.Buffer ? o._Buffer_allocUnsafe(n) : new o.Array(n) : o.Buffer ? o._Buffer_from(n) : typeof Uint8Array > "u" ? n : new Uint8Array(n);
1078
+ }(), o._Buffer_from = null, o._Buffer_allocUnsafe = null, o.newBuffer = function(r) {
1079
+ return typeof r == "number" ? o.Buffer ? o._Buffer_allocUnsafe(r) : new o.Array(r) : o.Buffer ? o._Buffer_from(r) : typeof Uint8Array > "u" ? r : new Uint8Array(r);
1081
1080
  }, o.Array = typeof Uint8Array < "u" ? Uint8Array : Array, o.Long = /* istanbul ignore next */
1082
1081
  o.global.dcodeIO && /* istanbul ignore next */
1083
1082
  o.global.dcodeIO.Long || /* istanbul ignore next */
1084
- o.global.Long || o.inquire("long"), o.key2Re = /^true|false|0|1$/, o.key32Re = /^-?(?:0|[1-9][0-9]*)$/, o.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, o.longToHash = function(n) {
1085
- return n ? o.LongBits.from(n).toHash() : o.LongBits.zeroHash;
1086
- }, o.longFromHash = function(n, i) {
1087
- var t = o.LongBits.fromHash(n);
1083
+ o.global.Long || o.inquire("long"), o.key2Re = /^true|false|0|1$/, o.key32Re = /^-?(?:0|[1-9][0-9]*)$/, o.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, o.longToHash = function(r) {
1084
+ return r ? o.LongBits.from(r).toHash() : o.LongBits.zeroHash;
1085
+ }, o.longFromHash = function(r, i) {
1086
+ var t = o.LongBits.fromHash(r);
1088
1087
  return o.Long ? o.Long.fromBits(t.lo, t.hi, i) : t.toNumber(!!i);
1089
1088
  };
1090
- function a(r, n, i) {
1091
- for (var t = Object.keys(n), e = 0; e < t.length; ++e)
1092
- (r[t[e]] === void 0 || !i) && (r[t[e]] = n[t[e]]);
1093
- return r;
1089
+ function a(n, r, i) {
1090
+ for (var t = Object.keys(r), e = 0; e < t.length; ++e)
1091
+ (n[t[e]] === void 0 || !i) && (n[t[e]] = r[t[e]]);
1092
+ return n;
1094
1093
  }
1095
- o.merge = a, o.lcFirst = function(n) {
1096
- return n.charAt(0).toLowerCase() + n.substring(1);
1094
+ o.merge = a, o.lcFirst = function(r) {
1095
+ return r.charAt(0).toLowerCase() + r.substring(1);
1097
1096
  };
1098
- function u(r) {
1099
- function n(i, t) {
1100
- if (!(this instanceof n))
1101
- return new n(i, t);
1097
+ function u(n) {
1098
+ function r(i, t) {
1099
+ if (!(this instanceof r))
1100
+ return new r(i, t);
1102
1101
  Object.defineProperty(this, "message", { get: function() {
1103
1102
  return i;
1104
- } }), Error.captureStackTrace ? Error.captureStackTrace(this, n) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), t && a(this, t);
1103
+ } }), Error.captureStackTrace ? Error.captureStackTrace(this, r) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), t && a(this, t);
1105
1104
  }
1106
- return n.prototype = Object.create(Error.prototype, {
1105
+ return r.prototype = Object.create(Error.prototype, {
1107
1106
  constructor: {
1108
- value: n,
1107
+ value: r,
1109
1108
  writable: !0,
1110
1109
  enumerable: !1,
1111
1110
  configurable: !0
1112
1111
  },
1113
1112
  name: {
1114
1113
  get: function() {
1115
- return r;
1114
+ return n;
1116
1115
  },
1117
1116
  set: void 0,
1118
1117
  enumerable: !1,
@@ -1130,20 +1129,20 @@ function requireMinimal$1() {
1130
1129
  enumerable: !1,
1131
1130
  configurable: !0
1132
1131
  }
1133
- }), n;
1132
+ }), r;
1134
1133
  }
1135
- o.newError = u, o.ProtocolError = u("ProtocolError"), o.oneOfGetter = function(n) {
1136
- for (var i = {}, t = 0; t < n.length; ++t)
1137
- i[n[t]] = 1;
1134
+ o.newError = u, o.ProtocolError = u("ProtocolError"), o.oneOfGetter = function(r) {
1135
+ for (var i = {}, t = 0; t < r.length; ++t)
1136
+ i[r[t]] = 1;
1138
1137
  return function() {
1139
1138
  for (var e = Object.keys(this), s = e.length - 1; s > -1; --s)
1140
1139
  if (i[e[s]] === 1 && this[e[s]] !== void 0 && this[e[s]] !== null)
1141
1140
  return e[s];
1142
1141
  };
1143
- }, o.oneOfSetter = function(n) {
1142
+ }, o.oneOfSetter = function(r) {
1144
1143
  return function(i) {
1145
- for (var t = 0; t < n.length; ++t)
1146
- n[t] !== i && delete this[n[t]];
1144
+ for (var t = 0; t < r.length; ++t)
1145
+ r[t] !== i && delete this[r[t]];
1147
1146
  };
1148
1147
  }, o.toJSONOptions = {
1149
1148
  longs: String,
@@ -1151,17 +1150,17 @@ function requireMinimal$1() {
1151
1150
  bytes: String,
1152
1151
  json: !0
1153
1152
  }, o._configure = function() {
1154
- var r = o.Buffer;
1155
- if (!r) {
1153
+ var n = o.Buffer;
1154
+ if (!n) {
1156
1155
  o._Buffer_from = o._Buffer_allocUnsafe = null;
1157
1156
  return;
1158
1157
  }
1159
- o._Buffer_from = r.from !== Uint8Array.from && r.from || /* istanbul ignore next */
1158
+ o._Buffer_from = n.from !== Uint8Array.from && n.from || /* istanbul ignore next */
1160
1159
  function(i, t) {
1161
- return new r(i, t);
1162
- }, o._Buffer_allocUnsafe = r.allocUnsafe || /* istanbul ignore next */
1160
+ return new n(i, t);
1161
+ }, o._Buffer_allocUnsafe = n.allocUnsafe || /* istanbul ignore next */
1163
1162
  function(i) {
1164
- return new r(i);
1163
+ return new n(i);
1165
1164
  };
1166
1165
  };
1167
1166
  }(minimal$1)), minimal$1;
@@ -1170,8 +1169,8 @@ var writer, hasRequiredWriter;
1170
1169
  function requireWriter() {
1171
1170
  if (hasRequiredWriter) return writer;
1172
1171
  hasRequiredWriter = 1, writer = e;
1173
- var h = requireMinimal$1(), o, a = h.LongBits, u = h.base64, r = h.utf8;
1174
- function n(b, g, k) {
1172
+ var h = requireMinimal$1(), o, a = h.LongBits, u = h.base64, n = h.utf8;
1173
+ function r(b, g, k) {
1175
1174
  this.fn = b, this.len = g, this.next = void 0, this.val = k;
1176
1175
  }
1177
1176
  function i() {
@@ -1180,7 +1179,7 @@ function requireWriter() {
1180
1179
  this.head = b.head, this.tail = b.tail, this.len = b.len, this.next = b.states;
1181
1180
  }
1182
1181
  function e() {
1183
- this.len = 0, this.head = new n(i, 0, 0), this.tail = this.head, this.states = null;
1182
+ this.len = 0, this.head = new r(i, 0, 0), this.tail = this.head, this.states = null;
1184
1183
  }
1185
1184
  var s = function() {
1186
1185
  return h.Buffer ? function() {
@@ -1194,7 +1193,7 @@ function requireWriter() {
1194
1193
  e.create = s(), e.alloc = function(g) {
1195
1194
  return new h.Array(g);
1196
1195
  }, h.Array !== Array && (e.alloc = h.pool(e.alloc, h.Array.prototype.subarray)), e.prototype._push = function(g, k, T) {
1197
- return this.tail = this.tail.next = new n(g, k, T), this.len += k, this;
1196
+ return this.tail = this.tail.next = new r(g, k, T), this.len += k, this;
1198
1197
  };
1199
1198
  function l(b, g, k) {
1200
1199
  g[k] = b & 255;
@@ -1207,7 +1206,7 @@ function requireWriter() {
1207
1206
  function d(b, g) {
1208
1207
  this.len = b, this.next = void 0, this.val = g;
1209
1208
  }
1210
- d.prototype = Object.create(n.prototype), d.prototype.fn = c, e.prototype.uint32 = function(g) {
1209
+ d.prototype = Object.create(r.prototype), d.prototype.fn = c, e.prototype.uint32 = function(g) {
1211
1210
  return this.len += (this.tail = this.tail.next = new d(
1212
1211
  (g = g >>> 0) < 128 ? 1 : g < 16384 ? 2 : g < 2097152 ? 3 : g < 268435456 ? 4 : 5,
1213
1212
  g
@@ -1262,12 +1261,12 @@ function requireWriter() {
1262
1261
  }
1263
1262
  return this.uint32(k)._push(w, k, g);
1264
1263
  }, e.prototype.string = function(g) {
1265
- var k = r.length(g);
1266
- return k ? this.uint32(k)._push(r.write, k, g) : this._push(l, 1, 0);
1264
+ var k = n.length(g);
1265
+ return k ? this.uint32(k)._push(n.write, k, g) : this._push(l, 1, 0);
1267
1266
  }, e.prototype.fork = function() {
1268
- return this.states = new t(this), this.head = this.tail = new n(i, 0, 0), this.len = 0, this;
1267
+ return this.states = new t(this), this.head = this.tail = new r(i, 0, 0), this.len = 0, this;
1269
1268
  }, e.prototype.reset = function() {
1270
- return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new n(i, 0, 0), this.len = 0), this;
1269
+ return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new r(i, 0, 0), this.len = 0), this;
1271
1270
  }, e.prototype.ldelim = function() {
1272
1271
  var g = this.head, k = this.tail, T = this.len;
1273
1272
  return this.reset().uint32(T), T && (this.tail.next = g.next, this.tail = k, this.len += T), this;
@@ -1290,65 +1289,65 @@ function requireWriter_buffer() {
1290
1289
  h.call(this);
1291
1290
  }
1292
1291
  a._configure = function() {
1293
- a.alloc = o._Buffer_allocUnsafe, a.writeBytesBuffer = o.Buffer && o.Buffer.prototype instanceof Uint8Array && o.Buffer.prototype.set.name === "set" ? function(n, i, t) {
1294
- i.set(n, t);
1295
- } : function(n, i, t) {
1296
- if (n.copy)
1297
- n.copy(i, t, 0, n.length);
1298
- else for (var e = 0; e < n.length; )
1299
- i[t++] = n[e++];
1292
+ a.alloc = o._Buffer_allocUnsafe, a.writeBytesBuffer = o.Buffer && o.Buffer.prototype instanceof Uint8Array && o.Buffer.prototype.set.name === "set" ? function(r, i, t) {
1293
+ i.set(r, t);
1294
+ } : function(r, i, t) {
1295
+ if (r.copy)
1296
+ r.copy(i, t, 0, r.length);
1297
+ else for (var e = 0; e < r.length; )
1298
+ i[t++] = r[e++];
1300
1299
  };
1301
- }, a.prototype.bytes = function(n) {
1302
- o.isString(n) && (n = o._Buffer_from(n, "base64"));
1303
- var i = n.length >>> 0;
1304
- return this.uint32(i), i && this._push(a.writeBytesBuffer, i, n), this;
1300
+ }, a.prototype.bytes = function(r) {
1301
+ o.isString(r) && (r = o._Buffer_from(r, "base64"));
1302
+ var i = r.length >>> 0;
1303
+ return this.uint32(i), i && this._push(a.writeBytesBuffer, i, r), this;
1305
1304
  };
1306
- function u(r, n, i) {
1307
- r.length < 40 ? o.utf8.write(r, n, i) : n.utf8Write ? n.utf8Write(r, i) : n.write(r, i);
1305
+ function u(n, r, i) {
1306
+ n.length < 40 ? o.utf8.write(n, r, i) : r.utf8Write ? r.utf8Write(n, i) : r.write(n, i);
1308
1307
  }
1309
- return a.prototype.string = function(n) {
1310
- var i = o.Buffer.byteLength(n);
1311
- return this.uint32(i), i && this._push(u, i, n), this;
1308
+ return a.prototype.string = function(r) {
1309
+ var i = o.Buffer.byteLength(r);
1310
+ return this.uint32(i), i && this._push(u, i, r), this;
1312
1311
  }, a._configure(), writer_buffer;
1313
1312
  }
1314
1313
  var reader, hasRequiredReader;
1315
1314
  function requireReader() {
1316
1315
  if (hasRequiredReader) return reader;
1317
- hasRequiredReader = 1, reader = n;
1316
+ hasRequiredReader = 1, reader = r;
1318
1317
  var h = requireMinimal$1(), o, a = h.LongBits, u = h.utf8;
1319
- function r(c, d) {
1318
+ function n(c, d) {
1320
1319
  return RangeError("index out of range: " + c.pos + " + " + (d || 1) + " > " + c.len);
1321
1320
  }
1322
- function n(c) {
1321
+ function r(c) {
1323
1322
  this.buf = c, this.pos = 0, this.len = c.length;
1324
1323
  }
1325
1324
  var i = typeof Uint8Array < "u" ? function(d) {
1326
1325
  if (d instanceof Uint8Array || Array.isArray(d))
1327
- return new n(d);
1326
+ return new r(d);
1328
1327
  throw Error("illegal buffer");
1329
1328
  } : function(d) {
1330
1329
  if (Array.isArray(d))
1331
- return new n(d);
1330
+ return new r(d);
1332
1331
  throw Error("illegal buffer");
1333
1332
  }, t = function() {
1334
1333
  return h.Buffer ? function(p) {
1335
- return (n.create = function(w) {
1334
+ return (r.create = function(w) {
1336
1335
  return h.Buffer.isBuffer(w) ? new o(w) : i(w);
1337
1336
  })(p);
1338
1337
  } : i;
1339
1338
  };
1340
- n.create = t(), n.prototype._slice = h.Array.prototype.subarray || /* istanbul ignore next */
1341
- h.Array.prototype.slice, n.prototype.uint32 = /* @__PURE__ */ function() {
1339
+ r.create = t(), r.prototype._slice = h.Array.prototype.subarray || /* istanbul ignore next */
1340
+ h.Array.prototype.slice, r.prototype.uint32 = /* @__PURE__ */ function() {
1342
1341
  var d = 4294967295;
1343
1342
  return function() {
1344
1343
  if (d = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (d = (d | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (d = (d | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (d = (d | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (d = (d | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return d;
1345
1344
  if ((this.pos += 5) > this.len)
1346
- throw this.pos = this.len, r(this, 10);
1345
+ throw this.pos = this.len, n(this, 10);
1347
1346
  return d;
1348
1347
  };
1349
- }(), n.prototype.int32 = function() {
1348
+ }(), r.prototype.int32 = function() {
1350
1349
  return this.uint32() | 0;
1351
- }, n.prototype.sint32 = function() {
1350
+ }, r.prototype.sint32 = function() {
1352
1351
  var d = this.uint32();
1353
1352
  return d >>> 1 ^ -(d & 1) | 0;
1354
1353
  };
@@ -1364,7 +1363,7 @@ function requireReader() {
1364
1363
  } else {
1365
1364
  for (; d < 3; ++d) {
1366
1365
  if (this.pos >= this.len)
1367
- throw r(this);
1366
+ throw n(this);
1368
1367
  if (c.lo = (c.lo | (this.buf[this.pos] & 127) << d * 7) >>> 0, this.buf[this.pos++] < 128)
1369
1368
  return c;
1370
1369
  }
@@ -1377,46 +1376,46 @@ function requireReader() {
1377
1376
  } else
1378
1377
  for (; d < 5; ++d) {
1379
1378
  if (this.pos >= this.len)
1380
- throw r(this);
1379
+ throw n(this);
1381
1380
  if (c.hi = (c.hi | (this.buf[this.pos] & 127) << d * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
1382
1381
  return c;
1383
1382
  }
1384
1383
  throw Error("invalid varint encoding");
1385
1384
  }
1386
- n.prototype.bool = function() {
1385
+ r.prototype.bool = function() {
1387
1386
  return this.uint32() !== 0;
1388
1387
  };
1389
1388
  function s(c, d) {
1390
1389
  return (c[d - 4] | c[d - 3] << 8 | c[d - 2] << 16 | c[d - 1] << 24) >>> 0;
1391
1390
  }
1392
- n.prototype.fixed32 = function() {
1391
+ r.prototype.fixed32 = function() {
1393
1392
  if (this.pos + 4 > this.len)
1394
- throw r(this, 4);
1393
+ throw n(this, 4);
1395
1394
  return s(this.buf, this.pos += 4);
1396
- }, n.prototype.sfixed32 = function() {
1395
+ }, r.prototype.sfixed32 = function() {
1397
1396
  if (this.pos + 4 > this.len)
1398
- throw r(this, 4);
1397
+ throw n(this, 4);
1399
1398
  return s(this.buf, this.pos += 4) | 0;
1400
1399
  };
1401
1400
  function l() {
1402
1401
  if (this.pos + 8 > this.len)
1403
- throw r(this, 8);
1402
+ throw n(this, 8);
1404
1403
  return new a(s(this.buf, this.pos += 4), s(this.buf, this.pos += 4));
1405
1404
  }
1406
- return n.prototype.float = function() {
1405
+ return r.prototype.float = function() {
1407
1406
  if (this.pos + 4 > this.len)
1408
- throw r(this, 4);
1407
+ throw n(this, 4);
1409
1408
  var d = h.float.readFloatLE(this.buf, this.pos);
1410
1409
  return this.pos += 4, d;
1411
- }, n.prototype.double = function() {
1410
+ }, r.prototype.double = function() {
1412
1411
  if (this.pos + 8 > this.len)
1413
- throw r(this, 4);
1412
+ throw n(this, 4);
1414
1413
  var d = h.float.readDoubleLE(this.buf, this.pos);
1415
1414
  return this.pos += 8, d;
1416
- }, n.prototype.bytes = function() {
1415
+ }, r.prototype.bytes = function() {
1417
1416
  var d = this.uint32(), p = this.pos, f = this.pos + d;
1418
1417
  if (f > this.len)
1419
- throw r(this, d);
1418
+ throw n(this, d);
1420
1419
  if (this.pos += d, Array.isArray(this.buf))
1421
1420
  return this.buf.slice(p, f);
1422
1421
  if (p === f) {
@@ -1424,21 +1423,21 @@ function requireReader() {
1424
1423
  return w ? w.alloc(0) : new this.buf.constructor(0);
1425
1424
  }
1426
1425
  return this._slice.call(this.buf, p, f);
1427
- }, n.prototype.string = function() {
1426
+ }, r.prototype.string = function() {
1428
1427
  var d = this.bytes();
1429
1428
  return u.read(d, 0, d.length);
1430
- }, n.prototype.skip = function(d) {
1429
+ }, r.prototype.skip = function(d) {
1431
1430
  if (typeof d == "number") {
1432
1431
  if (this.pos + d > this.len)
1433
- throw r(this, d);
1432
+ throw n(this, d);
1434
1433
  this.pos += d;
1435
1434
  } else
1436
1435
  do
1437
1436
  if (this.pos >= this.len)
1438
- throw r(this);
1437
+ throw n(this);
1439
1438
  while (this.buf[this.pos++] & 128);
1440
1439
  return this;
1441
- }, n.prototype.skipType = function(c) {
1440
+ }, r.prototype.skipType = function(c) {
1442
1441
  switch (c) {
1443
1442
  case 0:
1444
1443
  this.skip();
@@ -1461,13 +1460,13 @@ function requireReader() {
1461
1460
  throw Error("invalid wire type " + c + " at offset " + this.pos);
1462
1461
  }
1463
1462
  return this;
1464
- }, n._configure = function(c) {
1465
- o = c, n.create = t(), o._configure();
1463
+ }, r._configure = function(c) {
1464
+ o = c, r.create = t(), o._configure();
1466
1465
  var d = h.Long ? "toLong" : (
1467
1466
  /* istanbul ignore next */
1468
1467
  "toNumber"
1469
1468
  );
1470
- h.merge(n.prototype, {
1469
+ h.merge(r.prototype, {
1471
1470
  int64: function() {
1472
1471
  return e.call(this)[d](!1);
1473
1472
  },
@@ -1499,8 +1498,8 @@ function requireReader_buffer() {
1499
1498
  return a._configure = function() {
1500
1499
  o.Buffer && (a.prototype._slice = o.Buffer.prototype.slice);
1501
1500
  }, a.prototype.string = function() {
1502
- var r = this.uint32();
1503
- return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + r, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + r, this.len));
1501
+ var n = this.uint32();
1502
+ return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + n, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + n, this.len));
1504
1503
  }, a._configure(), reader_buffer;
1505
1504
  }
1506
1505
  var rpc = {}, service, hasRequiredService;
@@ -1509,17 +1508,17 @@ function requireService() {
1509
1508
  hasRequiredService = 1, service = o;
1510
1509
  var h = requireMinimal$1();
1511
1510
  (o.prototype = Object.create(h.EventEmitter.prototype)).constructor = o;
1512
- function o(a, u, r) {
1511
+ function o(a, u, n) {
1513
1512
  if (typeof a != "function")
1514
1513
  throw TypeError("rpcImpl must be a function");
1515
- h.EventEmitter.call(this), this.rpcImpl = a, this.requestDelimited = !!u, this.responseDelimited = !!r;
1514
+ h.EventEmitter.call(this), this.rpcImpl = a, this.requestDelimited = !!u, this.responseDelimited = !!n;
1516
1515
  }
1517
- return o.prototype.rpcCall = function a(u, r, n, i, t) {
1516
+ return o.prototype.rpcCall = function a(u, n, r, i, t) {
1518
1517
  if (!i)
1519
1518
  throw TypeError("request must be specified");
1520
1519
  var e = this;
1521
1520
  if (!t)
1522
- return h.asPromise(a, e, u, r, n, i);
1521
+ return h.asPromise(a, e, u, n, r, i);
1523
1522
  if (!e.rpcImpl) {
1524
1523
  setTimeout(function() {
1525
1524
  t(Error("already ended"));
@@ -1529,7 +1528,7 @@ function requireService() {
1529
1528
  try {
1530
1529
  return e.rpcImpl(
1531
1530
  u,
1532
- r[e.requestDelimited ? "encodeDelimited" : "encode"](i).finish(),
1531
+ n[e.requestDelimited ? "encodeDelimited" : "encode"](i).finish(),
1533
1532
  function(l, c) {
1534
1533
  if (l)
1535
1534
  return e.emit("error", l, u), t(l);
@@ -1540,9 +1539,9 @@ function requireService() {
1540
1539
  );
1541
1540
  return;
1542
1541
  }
1543
- if (!(c instanceof n))
1542
+ if (!(c instanceof r))
1544
1543
  try {
1545
- c = n[e.responseDelimited ? "decodeDelimited" : "decode"](c);
1544
+ c = r[e.responseDelimited ? "decodeDelimited" : "decode"](c);
1546
1545
  } catch (d) {
1547
1546
  return e.emit("error", d, u), t(d);
1548
1547
  }
@@ -1595,12 +1594,12 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1595
1594
  return a.proto = function() {
1596
1595
  const u = {};
1597
1596
  return u.SeiData = function() {
1598
- function r(n) {
1599
- if (n) for (let i = Object.keys(n), t = 0; t < i.length; ++t) n[i[t]] != null && (this[i[t]] = n[i[t]]);
1597
+ function n(r) {
1598
+ if (r) for (let i = Object.keys(r), t = 0; t < i.length; ++t) r[i[t]] != null && (this[i[t]] = r[i[t]]);
1600
1599
  }
1601
- return r.prototype.event = 0, r.prototype.data = $util.newBuffer([]), r.prototype.compress = !1, r.prototype.version = 0, r.create = function(i) {
1602
- return new r(i);
1603
- }, r.encode = function(i, t) {
1600
+ return n.prototype.event = 0, n.prototype.data = $util.newBuffer([]), n.prototype.compress = !1, n.prototype.version = 0, n.create = function(i) {
1601
+ return new n(i);
1602
+ }, n.encode = function(i, t) {
1604
1603
  return t || (t = $Writer.create()), i.event != null && Object.hasOwnProperty.call(i, "event") && t.uint32(
1605
1604
  /* id 1, wireType 0 =*/
1606
1605
  8
@@ -1614,9 +1613,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1614
1613
  /* id 4, wireType 0 =*/
1615
1614
  32
1616
1615
  ).int32(i.version), t;
1617
- }, r.encodeDelimited = function(i, t) {
1616
+ }, n.encodeDelimited = function(i, t) {
1618
1617
  return this.encode(i, t).ldelim();
1619
- }, r.decode = function(i, t, e) {
1618
+ }, n.decode = function(i, t, e) {
1620
1619
  i instanceof $Reader || (i = $Reader.create(i));
1621
1620
  let s = t === void 0 ? i.len : i.pos + t, l = new $root.com.quick.voice.proto.SeiData();
1622
1621
  for (; i.pos < s; ) {
@@ -1645,9 +1644,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1645
1644
  }
1646
1645
  }
1647
1646
  return l;
1648
- }, r.decodeDelimited = function(i) {
1647
+ }, n.decodeDelimited = function(i) {
1649
1648
  return i instanceof $Reader || (i = new $Reader(i)), this.decode(i, i.uint32());
1650
- }, r.verify = function(i) {
1649
+ }, n.verify = function(i) {
1651
1650
  if (typeof i != "object" || i === null) return "object expected";
1652
1651
  if (i.event != null && i.hasOwnProperty("event"))
1653
1652
  switch (i.event) {
@@ -1658,7 +1657,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1658
1657
  break;
1659
1658
  }
1660
1659
  return i.data != null && i.hasOwnProperty("data") && !(i.data && typeof i.data.length == "number" || $util.isString(i.data)) ? "data: buffer expected" : i.compress != null && i.hasOwnProperty("compress") && typeof i.compress != "boolean" ? "compress: boolean expected" : i.version != null && i.hasOwnProperty("version") && !$util.isInteger(i.version) ? "version: integer expected" : null;
1661
- }, r.fromObject = function(i) {
1660
+ }, n.fromObject = function(i) {
1662
1661
  if (i instanceof $root.com.quick.voice.proto.SeiData) return i;
1663
1662
  let t = new $root.com.quick.voice.proto.SeiData();
1664
1663
  switch (i.event) {
@@ -1678,30 +1677,30 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1678
1677
  break;
1679
1678
  }
1680
1679
  return i.data != null && (typeof i.data == "string" ? $util.base64.decode(i.data, t.data = $util.newBuffer($util.base64.length(i.data)), 0) : i.data.length >= 0 && (t.data = i.data)), i.compress != null && (t.compress = !!i.compress), i.version != null && (t.version = i.version | 0), t;
1681
- }, r.toObject = function(i, t) {
1680
+ }, n.toObject = function(i, t) {
1682
1681
  t || (t = {});
1683
1682
  let e = {};
1684
1683
  return t.defaults && (e.event = t.enums === String ? "Layout" : 0, t.bytes === String ? e.data = "" : (e.data = [], t.bytes !== Array && (e.data = $util.newBuffer(e.data))), e.compress = !1, e.version = 0), i.event != null && i.hasOwnProperty("event") && (e.event = t.enums === String ? $root.com.quick.voice.proto.EventType[i.event] === void 0 ? i.event : $root.com.quick.voice.proto.EventType[i.event] : i.event), i.data != null && i.hasOwnProperty("data") && (e.data = t.bytes === String ? $util.base64.encode(i.data, 0, i.data.length) : t.bytes === Array ? Array.prototype.slice.call(i.data) : i.data), i.compress != null && i.hasOwnProperty("compress") && (e.compress = i.compress), i.version != null && i.hasOwnProperty("version") && (e.version = i.version), e;
1685
- }, r.prototype.toJSON = function() {
1684
+ }, n.prototype.toJSON = function() {
1686
1685
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
1687
- }, r.getTypeUrl = function(i) {
1686
+ }, n.getTypeUrl = function(i) {
1688
1687
  return i === void 0 && (i = "type.googleapis.com"), i + "/com.quick.voice.proto.SeiData";
1689
- }, r;
1688
+ }, n;
1690
1689
  }(), u.EventType = function() {
1691
- const r = {}, n = Object.create(r);
1692
- return n[r[0] = "Layout"] = 0, n[r[1] = "Custom"] = 1, n;
1690
+ const n = {}, r = Object.create(n);
1691
+ return r[n[0] = "Layout"] = 0, r[n[1] = "Custom"] = 1, r;
1693
1692
  }(), u.LayoutData = function() {
1694
- function r(i) {
1693
+ function n(i) {
1695
1694
  if (this.userMap = {}, i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
1696
1695
  }
1697
- r.prototype.roomId = "", r.prototype.type = 0, r.prototype.userMap = $util.emptyObject, r.prototype.globalCustom = null;
1698
- let n;
1699
- return Object.defineProperty(r.prototype, "_globalCustom", {
1700
- get: $util.oneOfGetter(n = ["globalCustom"]),
1701
- set: $util.oneOfSetter(n)
1702
- }), r.create = function(t) {
1703
- return new r(t);
1704
- }, r.encode = function(t, e) {
1696
+ n.prototype.roomId = "", n.prototype.type = 0, n.prototype.userMap = $util.emptyObject, n.prototype.globalCustom = null;
1697
+ let r;
1698
+ return Object.defineProperty(n.prototype, "_globalCustom", {
1699
+ get: $util.oneOfGetter(r = ["globalCustom"]),
1700
+ set: $util.oneOfSetter(r)
1701
+ }), n.create = function(t) {
1702
+ return new n(t);
1703
+ }, n.encode = function(t, e) {
1705
1704
  if (e || (e = $Writer.create()), t.roomId != null && Object.hasOwnProperty.call(t, "roomId") && e.uint32(
1706
1705
  /* id 1, wireType 2 =*/
1707
1706
  10
@@ -1724,9 +1723,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1724
1723
  /* id 4, wireType 2 =*/
1725
1724
  34
1726
1725
  ).fork()).ldelim(), e;
1727
- }, r.encodeDelimited = function(t, e) {
1726
+ }, n.encodeDelimited = function(t, e) {
1728
1727
  return this.encode(t, e).ldelim();
1729
- }, r.decode = function(t, e, s) {
1728
+ }, n.decode = function(t, e, s) {
1730
1729
  t instanceof $Reader || (t = $Reader.create(t));
1731
1730
  let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.LayoutData(), d, p;
1732
1731
  for (; t.pos < l; ) {
@@ -1771,9 +1770,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1771
1770
  }
1772
1771
  }
1773
1772
  return c;
1774
- }, r.decodeDelimited = function(t) {
1773
+ }, n.decodeDelimited = function(t) {
1775
1774
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
1776
- }, r.verify = function(t) {
1775
+ }, n.verify = function(t) {
1777
1776
  if (typeof t != "object" || t === null) return "object expected";
1778
1777
  if (t.roomId != null && t.hasOwnProperty("roomId") && !$util.isString(t.roomId)) return "roomId: string expected";
1779
1778
  if (t.type != null && t.hasOwnProperty("type"))
@@ -1798,7 +1797,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1798
1797
  if (e) return "globalCustom." + e;
1799
1798
  }
1800
1799
  return null;
1801
- }, r.fromObject = function(t) {
1800
+ }, n.fromObject = function(t) {
1802
1801
  if (t instanceof $root.com.quick.voice.proto.LayoutData) return t;
1803
1802
  let e = new $root.com.quick.voice.proto.LayoutData();
1804
1803
  switch (t.roomId != null && (e.roomId = String(t.roomId)), t.type) {
@@ -1834,7 +1833,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1834
1833
  e.globalCustom = $root.com.quick.voice.proto.CustomInfo.fromObject(t.globalCustom);
1835
1834
  }
1836
1835
  return e;
1837
- }, r.toObject = function(t, e) {
1836
+ }, n.toObject = function(t, e) {
1838
1837
  e || (e = {});
1839
1838
  let s = {};
1840
1839
  (e.objects || e.defaults) && (s.userMap = {}), e.defaults && (s.roomId = "", s.type = e.enums === String ? "AudioAndVideo" : 0), t.roomId != null && t.hasOwnProperty("roomId") && (s.roomId = t.roomId), t.type != null && t.hasOwnProperty("type") && (s.type = e.enums === String ? $root.com.quick.voice.proto.LayoutType[t.type] === void 0 ? t.type : $root.com.quick.voice.proto.LayoutType[t.type] : t.type);
@@ -1844,23 +1843,23 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1844
1843
  for (let c = 0; c < l.length; ++c) s.userMap[l[c]] = $root.com.quick.voice.proto.UserInfo.toObject(t.userMap[l[c]], e);
1845
1844
  }
1846
1845
  return t.globalCustom != null && t.hasOwnProperty("globalCustom") && (s.globalCustom = $root.com.quick.voice.proto.CustomInfo.toObject(t.globalCustom, e), e.oneofs && (s._globalCustom = "globalCustom")), s;
1847
- }, r.prototype.toJSON = function() {
1846
+ }, n.prototype.toJSON = function() {
1848
1847
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
1849
- }, r.getTypeUrl = function(t) {
1848
+ }, n.getTypeUrl = function(t) {
1850
1849
  return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.LayoutData";
1851
- }, r;
1850
+ }, n;
1852
1851
  }(), u.UserInfo = function() {
1853
- function r(i) {
1852
+ function n(i) {
1854
1853
  if (this.audios = [], this.videos = [], i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
1855
1854
  }
1856
- r.prototype.id = "", r.prototype.audios = $util.emptyArray, r.prototype.videos = $util.emptyArray, r.prototype.custom = null;
1857
- let n;
1858
- return Object.defineProperty(r.prototype, "_custom", {
1859
- get: $util.oneOfGetter(n = ["custom"]),
1860
- set: $util.oneOfSetter(n)
1861
- }), r.create = function(t) {
1862
- return new r(t);
1863
- }, r.encode = function(t, e) {
1855
+ n.prototype.id = "", n.prototype.audios = $util.emptyArray, n.prototype.videos = $util.emptyArray, n.prototype.custom = null;
1856
+ let r;
1857
+ return Object.defineProperty(n.prototype, "_custom", {
1858
+ get: $util.oneOfGetter(r = ["custom"]),
1859
+ set: $util.oneOfSetter(r)
1860
+ }), n.create = function(t) {
1861
+ return new n(t);
1862
+ }, n.encode = function(t, e) {
1864
1863
  if (e || (e = $Writer.create()), t.id != null && Object.hasOwnProperty.call(t, "id") && e.uint32(
1865
1864
  /* id 1, wireType 2 =*/
1866
1865
  10
@@ -1876,9 +1875,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1876
1875
  /* id 4, wireType 2 =*/
1877
1876
  34
1878
1877
  ).fork()).ldelim(), e;
1879
- }, r.encodeDelimited = function(t, e) {
1878
+ }, n.encodeDelimited = function(t, e) {
1880
1879
  return this.encode(t, e).ldelim();
1881
- }, r.decode = function(t, e, s) {
1880
+ }, n.decode = function(t, e, s) {
1882
1881
  t instanceof $Reader || (t = $Reader.create(t));
1883
1882
  let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.UserInfo();
1884
1883
  for (; t.pos < l; ) {
@@ -1907,9 +1906,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1907
1906
  }
1908
1907
  }
1909
1908
  return c;
1910
- }, r.decodeDelimited = function(t) {
1909
+ }, n.decodeDelimited = function(t) {
1911
1910
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
1912
- }, r.verify = function(t) {
1911
+ }, n.verify = function(t) {
1913
1912
  if (typeof t != "object" || t === null) return "object expected";
1914
1913
  if (t.id != null && t.hasOwnProperty("id") && !$util.isString(t.id)) return "id: string expected";
1915
1914
  if (t.audios != null && t.hasOwnProperty("audios")) {
@@ -1931,7 +1930,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1931
1930
  if (e) return "custom." + e;
1932
1931
  }
1933
1932
  return null;
1934
- }, r.fromObject = function(t) {
1933
+ }, n.fromObject = function(t) {
1935
1934
  if (t instanceof $root.com.quick.voice.proto.UserInfo) return t;
1936
1935
  let e = new $root.com.quick.voice.proto.UserInfo();
1937
1936
  if (t.id != null && (e.id = String(t.id)), t.audios) {
@@ -1955,7 +1954,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1955
1954
  e.custom = $root.com.quick.voice.proto.CustomInfo.fromObject(t.custom);
1956
1955
  }
1957
1956
  return e;
1958
- }, r.toObject = function(t, e) {
1957
+ }, n.toObject = function(t, e) {
1959
1958
  e || (e = {});
1960
1959
  let s = {};
1961
1960
  if ((e.arrays || e.defaults) && (s.audios = [], s.videos = []), e.defaults && (s.id = ""), t.id != null && t.hasOwnProperty("id") && (s.id = t.id), t.audios && t.audios.length) {
@@ -1967,23 +1966,23 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1967
1966
  for (let l = 0; l < t.videos.length; ++l) s.videos[l] = $root.com.quick.voice.proto.VideoInfo.toObject(t.videos[l], e);
1968
1967
  }
1969
1968
  return t.custom != null && t.hasOwnProperty("custom") && (s.custom = $root.com.quick.voice.proto.CustomInfo.toObject(t.custom, e), e.oneofs && (s._custom = "custom")), s;
1970
- }, r.prototype.toJSON = function() {
1969
+ }, n.prototype.toJSON = function() {
1971
1970
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
1972
- }, r.getTypeUrl = function(t) {
1971
+ }, n.getTypeUrl = function(t) {
1973
1972
  return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.UserInfo";
1974
- }, r;
1973
+ }, n;
1975
1974
  }(), u.AudioInfo = function() {
1976
- function r(i) {
1975
+ function n(i) {
1977
1976
  if (i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
1978
1977
  }
1979
- r.prototype.type = 0, r.prototype.isEnable = !1, r.prototype.isMute = !1, r.prototype.volume = 0, r.prototype.updateTime = null;
1980
- let n;
1981
- return Object.defineProperty(r.prototype, "_updateTime", {
1982
- get: $util.oneOfGetter(n = ["updateTime"]),
1983
- set: $util.oneOfSetter(n)
1984
- }), r.create = function(t) {
1985
- return new r(t);
1986
- }, r.encode = function(t, e) {
1978
+ n.prototype.type = 0, n.prototype.isEnable = !1, n.prototype.isMute = !1, n.prototype.volume = 0, n.prototype.updateTime = null;
1979
+ let r;
1980
+ return Object.defineProperty(n.prototype, "_updateTime", {
1981
+ get: $util.oneOfGetter(r = ["updateTime"]),
1982
+ set: $util.oneOfSetter(r)
1983
+ }), n.create = function(t) {
1984
+ return new n(t);
1985
+ }, n.encode = function(t, e) {
1987
1986
  return e || (e = $Writer.create()), t.type != null && Object.hasOwnProperty.call(t, "type") && e.uint32(
1988
1987
  /* id 1, wireType 0 =*/
1989
1988
  8
@@ -2000,9 +1999,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2000
1999
  /* id 5, wireType 0 =*/
2001
2000
  40
2002
2001
  ).int64(t.updateTime), e;
2003
- }, r.encodeDelimited = function(t, e) {
2002
+ }, n.encodeDelimited = function(t, e) {
2004
2003
  return this.encode(t, e).ldelim();
2005
- }, r.decode = function(t, e, s) {
2004
+ }, n.decode = function(t, e, s) {
2006
2005
  t instanceof $Reader || (t = $Reader.create(t));
2007
2006
  let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.AudioInfo();
2008
2007
  for (; t.pos < l; ) {
@@ -2035,9 +2034,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2035
2034
  }
2036
2035
  }
2037
2036
  return c;
2038
- }, r.decodeDelimited = function(t) {
2037
+ }, n.decodeDelimited = function(t) {
2039
2038
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
2040
- }, r.verify = function(t) {
2039
+ }, n.verify = function(t) {
2041
2040
  if (typeof t != "object" || t === null) return "object expected";
2042
2041
  if (t.type != null && t.hasOwnProperty("type"))
2043
2042
  switch (t.type) {
@@ -2048,7 +2047,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2048
2047
  break;
2049
2048
  }
2050
2049
  return t.isEnable != null && t.hasOwnProperty("isEnable") && typeof t.isEnable != "boolean" ? "isEnable: boolean expected" : t.isMute != null && t.hasOwnProperty("isMute") && typeof t.isMute != "boolean" ? "isMute: boolean expected" : t.volume != null && t.hasOwnProperty("volume") && typeof t.volume != "number" ? "volume: number expected" : t.updateTime != null && t.hasOwnProperty("updateTime") && !$util.isInteger(t.updateTime) && !(t.updateTime && $util.isInteger(t.updateTime.low) && $util.isInteger(t.updateTime.high)) ? "updateTime: integer|Long expected" : null;
2051
- }, r.fromObject = function(t) {
2050
+ }, n.fromObject = function(t) {
2052
2051
  if (t instanceof $root.com.quick.voice.proto.AudioInfo) return t;
2053
2052
  let e = new $root.com.quick.voice.proto.AudioInfo();
2054
2053
  switch (t.type) {
@@ -2068,27 +2067,27 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2068
2067
  break;
2069
2068
  }
2070
2069
  return t.isEnable != null && (e.isEnable = !!t.isEnable), t.isMute != null && (e.isMute = !!t.isMute), t.volume != null && (e.volume = Number(t.volume)), t.updateTime != null && ($util.Long ? (e.updateTime = $util.Long.fromValue(t.updateTime)).unsigned = !1 : typeof t.updateTime == "string" ? e.updateTime = parseInt(t.updateTime, 10) : typeof t.updateTime == "number" ? e.updateTime = t.updateTime : typeof t.updateTime == "object" && (e.updateTime = new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber())), e;
2071
- }, r.toObject = function(t, e) {
2070
+ }, n.toObject = function(t, e) {
2072
2071
  e || (e = {});
2073
2072
  let s = {};
2074
2073
  return e.defaults && (s.type = e.enums === String ? "Microphone" : 0, s.isEnable = !1, s.isMute = !1, s.volume = 0), t.type != null && t.hasOwnProperty("type") && (s.type = e.enums === String ? $root.com.quick.voice.proto.AudioType[t.type] === void 0 ? t.type : $root.com.quick.voice.proto.AudioType[t.type] : t.type), t.isEnable != null && t.hasOwnProperty("isEnable") && (s.isEnable = t.isEnable), t.isMute != null && t.hasOwnProperty("isMute") && (s.isMute = t.isMute), t.volume != null && t.hasOwnProperty("volume") && (s.volume = e.json && !isFinite(t.volume) ? String(t.volume) : t.volume), t.updateTime != null && t.hasOwnProperty("updateTime") && (typeof t.updateTime == "number" ? s.updateTime = e.longs === String ? String(t.updateTime) : t.updateTime : s.updateTime = e.longs === String ? $util.Long.prototype.toString.call(t.updateTime) : e.longs === Number ? new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber() : t.updateTime, e.oneofs && (s._updateTime = "updateTime")), s;
2075
- }, r.prototype.toJSON = function() {
2074
+ }, n.prototype.toJSON = function() {
2076
2075
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
2077
- }, r.getTypeUrl = function(t) {
2076
+ }, n.getTypeUrl = function(t) {
2078
2077
  return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.AudioInfo";
2079
- }, r;
2078
+ }, n;
2080
2079
  }(), u.VideoInfo = function() {
2081
- function r(i) {
2080
+ function n(i) {
2082
2081
  if (i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
2083
2082
  }
2084
- r.prototype.type = 0, r.prototype.isEnable = !1, r.prototype.isMute = !1, r.prototype.width = 0, r.prototype.height = 0, r.prototype.x = 0, r.prototype.y = 0, r.prototype.updateTime = null;
2085
- let n;
2086
- return Object.defineProperty(r.prototype, "_updateTime", {
2087
- get: $util.oneOfGetter(n = ["updateTime"]),
2088
- set: $util.oneOfSetter(n)
2089
- }), r.create = function(t) {
2090
- return new r(t);
2091
- }, r.encode = function(t, e) {
2083
+ n.prototype.type = 0, n.prototype.isEnable = !1, n.prototype.isMute = !1, n.prototype.width = 0, n.prototype.height = 0, n.prototype.x = 0, n.prototype.y = 0, n.prototype.updateTime = null;
2084
+ let r;
2085
+ return Object.defineProperty(n.prototype, "_updateTime", {
2086
+ get: $util.oneOfGetter(r = ["updateTime"]),
2087
+ set: $util.oneOfSetter(r)
2088
+ }), n.create = function(t) {
2089
+ return new n(t);
2090
+ }, n.encode = function(t, e) {
2092
2091
  return e || (e = $Writer.create()), t.type != null && Object.hasOwnProperty.call(t, "type") && e.uint32(
2093
2092
  /* id 1, wireType 0 =*/
2094
2093
  8
@@ -2114,9 +2113,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2114
2113
  /* id 8, wireType 0 =*/
2115
2114
  64
2116
2115
  ).int64(t.updateTime), e;
2117
- }, r.encodeDelimited = function(t, e) {
2116
+ }, n.encodeDelimited = function(t, e) {
2118
2117
  return this.encode(t, e).ldelim();
2119
- }, r.decode = function(t, e, s) {
2118
+ }, n.decode = function(t, e, s) {
2120
2119
  t instanceof $Reader || (t = $Reader.create(t));
2121
2120
  let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.VideoInfo();
2122
2121
  for (; t.pos < l; ) {
@@ -2161,9 +2160,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2161
2160
  }
2162
2161
  }
2163
2162
  return c;
2164
- }, r.decodeDelimited = function(t) {
2163
+ }, n.decodeDelimited = function(t) {
2165
2164
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
2166
- }, r.verify = function(t) {
2165
+ }, n.verify = function(t) {
2167
2166
  if (typeof t != "object" || t === null) return "object expected";
2168
2167
  if (t.type != null && t.hasOwnProperty("type"))
2169
2168
  switch (t.type) {
@@ -2174,7 +2173,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2174
2173
  break;
2175
2174
  }
2176
2175
  return t.isEnable != null && t.hasOwnProperty("isEnable") && typeof t.isEnable != "boolean" ? "isEnable: boolean expected" : t.isMute != null && t.hasOwnProperty("isMute") && typeof t.isMute != "boolean" ? "isMute: boolean expected" : t.width != null && t.hasOwnProperty("width") && !$util.isInteger(t.width) ? "width: integer expected" : t.height != null && t.hasOwnProperty("height") && !$util.isInteger(t.height) ? "height: integer expected" : t.x != null && t.hasOwnProperty("x") && !$util.isInteger(t.x) ? "x: integer expected" : t.y != null && t.hasOwnProperty("y") && !$util.isInteger(t.y) ? "y: integer expected" : t.updateTime != null && t.hasOwnProperty("updateTime") && !$util.isInteger(t.updateTime) && !(t.updateTime && $util.isInteger(t.updateTime.low) && $util.isInteger(t.updateTime.high)) ? "updateTime: integer|Long expected" : null;
2177
- }, r.fromObject = function(t) {
2176
+ }, n.fromObject = function(t) {
2178
2177
  if (t instanceof $root.com.quick.voice.proto.VideoInfo) return t;
2179
2178
  let e = new $root.com.quick.voice.proto.VideoInfo();
2180
2179
  switch (t.type) {
@@ -2194,27 +2193,27 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2194
2193
  break;
2195
2194
  }
2196
2195
  return t.isEnable != null && (e.isEnable = !!t.isEnable), t.isMute != null && (e.isMute = !!t.isMute), t.width != null && (e.width = t.width | 0), t.height != null && (e.height = t.height | 0), t.x != null && (e.x = t.x | 0), t.y != null && (e.y = t.y | 0), t.updateTime != null && ($util.Long ? (e.updateTime = $util.Long.fromValue(t.updateTime)).unsigned = !1 : typeof t.updateTime == "string" ? e.updateTime = parseInt(t.updateTime, 10) : typeof t.updateTime == "number" ? e.updateTime = t.updateTime : typeof t.updateTime == "object" && (e.updateTime = new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber())), e;
2197
- }, r.toObject = function(t, e) {
2196
+ }, n.toObject = function(t, e) {
2198
2197
  e || (e = {});
2199
2198
  let s = {};
2200
2199
  return e.defaults && (s.type = e.enums === String ? "Camera" : 0, s.isEnable = !1, s.isMute = !1, s.width = 0, s.height = 0, s.x = 0, s.y = 0), t.type != null && t.hasOwnProperty("type") && (s.type = e.enums === String ? $root.com.quick.voice.proto.VideoType[t.type] === void 0 ? t.type : $root.com.quick.voice.proto.VideoType[t.type] : t.type), t.isEnable != null && t.hasOwnProperty("isEnable") && (s.isEnable = t.isEnable), t.isMute != null && t.hasOwnProperty("isMute") && (s.isMute = t.isMute), t.width != null && t.hasOwnProperty("width") && (s.width = t.width), t.height != null && t.hasOwnProperty("height") && (s.height = t.height), t.x != null && t.hasOwnProperty("x") && (s.x = t.x), t.y != null && t.hasOwnProperty("y") && (s.y = t.y), t.updateTime != null && t.hasOwnProperty("updateTime") && (typeof t.updateTime == "number" ? s.updateTime = e.longs === String ? String(t.updateTime) : t.updateTime : s.updateTime = e.longs === String ? $util.Long.prototype.toString.call(t.updateTime) : e.longs === Number ? new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber() : t.updateTime, e.oneofs && (s._updateTime = "updateTime")), s;
2201
- }, r.prototype.toJSON = function() {
2200
+ }, n.prototype.toJSON = function() {
2202
2201
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
2203
- }, r.getTypeUrl = function(t) {
2202
+ }, n.getTypeUrl = function(t) {
2204
2203
  return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.VideoInfo";
2205
- }, r;
2204
+ }, n;
2206
2205
  }(), u.CustomInfo = function() {
2207
- function r(i) {
2206
+ function n(i) {
2208
2207
  if (this.customKeyMap = {}, i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
2209
2208
  }
2210
- r.prototype.roomId = "", r.prototype.customKeyMap = $util.emptyObject, r.prototype.updateTime = null;
2211
- let n;
2212
- return Object.defineProperty(r.prototype, "_updateTime", {
2213
- get: $util.oneOfGetter(n = ["updateTime"]),
2214
- set: $util.oneOfSetter(n)
2215
- }), r.create = function(t) {
2216
- return new r(t);
2217
- }, r.encode = function(t, e) {
2209
+ n.prototype.roomId = "", n.prototype.customKeyMap = $util.emptyObject, n.prototype.updateTime = null;
2210
+ let r;
2211
+ return Object.defineProperty(n.prototype, "_updateTime", {
2212
+ get: $util.oneOfGetter(r = ["updateTime"]),
2213
+ set: $util.oneOfSetter(r)
2214
+ }), n.create = function(t) {
2215
+ return new n(t);
2216
+ }, n.encode = function(t, e) {
2218
2217
  if (e || (e = $Writer.create()), t.roomId != null && Object.hasOwnProperty.call(t, "roomId") && e.uint32(
2219
2218
  /* id 1, wireType 2 =*/
2220
2219
  10
@@ -2232,9 +2231,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2232
2231
  /* id 3, wireType 0 =*/
2233
2232
  24
2234
2233
  ).int64(t.updateTime), e;
2235
- }, r.encodeDelimited = function(t, e) {
2234
+ }, n.encodeDelimited = function(t, e) {
2236
2235
  return this.encode(t, e).ldelim();
2237
- }, r.decode = function(t, e, s) {
2236
+ }, n.decode = function(t, e, s) {
2238
2237
  t instanceof $Reader || (t = $Reader.create(t));
2239
2238
  let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.CustomInfo(), d, p;
2240
2239
  for (; t.pos < l; ) {
@@ -2275,9 +2274,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2275
2274
  }
2276
2275
  }
2277
2276
  return c;
2278
- }, r.decodeDelimited = function(t) {
2277
+ }, n.decodeDelimited = function(t) {
2279
2278
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
2280
- }, r.verify = function(t) {
2279
+ }, n.verify = function(t) {
2281
2280
  if (typeof t != "object" || t === null) return "object expected";
2282
2281
  if (t.roomId != null && t.hasOwnProperty("roomId") && !$util.isString(t.roomId)) return "roomId: string expected";
2283
2282
  if (t.customKeyMap != null && t.hasOwnProperty("customKeyMap")) {
@@ -2286,7 +2285,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2286
2285
  for (let s = 0; s < e.length; ++s) if (!$util.isString(t.customKeyMap[e[s]])) return "customKeyMap: string{k:string} expected";
2287
2286
  }
2288
2287
  return t.updateTime != null && t.hasOwnProperty("updateTime") && !$util.isInteger(t.updateTime) && !(t.updateTime && $util.isInteger(t.updateTime.low) && $util.isInteger(t.updateTime.high)) ? "updateTime: integer|Long expected" : null;
2289
- }, r.fromObject = function(t) {
2288
+ }, n.fromObject = function(t) {
2290
2289
  if (t instanceof $root.com.quick.voice.proto.CustomInfo) return t;
2291
2290
  let e = new $root.com.quick.voice.proto.CustomInfo();
2292
2291
  if (t.roomId != null && (e.roomId = String(t.roomId)), t.customKeyMap) {
@@ -2295,7 +2294,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2295
2294
  for (let s = Object.keys(t.customKeyMap), l = 0; l < s.length; ++l) e.customKeyMap[s[l]] = String(t.customKeyMap[s[l]]);
2296
2295
  }
2297
2296
  return t.updateTime != null && ($util.Long ? (e.updateTime = $util.Long.fromValue(t.updateTime)).unsigned = !1 : typeof t.updateTime == "string" ? e.updateTime = parseInt(t.updateTime, 10) : typeof t.updateTime == "number" ? e.updateTime = t.updateTime : typeof t.updateTime == "object" && (e.updateTime = new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber())), e;
2298
- }, r.toObject = function(t, e) {
2297
+ }, n.toObject = function(t, e) {
2299
2298
  e || (e = {});
2300
2299
  let s = {};
2301
2300
  (e.objects || e.defaults) && (s.customKeyMap = {}), e.defaults && (s.roomId = ""), t.roomId != null && t.hasOwnProperty("roomId") && (s.roomId = t.roomId);
@@ -2305,20 +2304,20 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2305
2304
  for (let c = 0; c < l.length; ++c) s.customKeyMap[l[c]] = t.customKeyMap[l[c]];
2306
2305
  }
2307
2306
  return t.updateTime != null && t.hasOwnProperty("updateTime") && (typeof t.updateTime == "number" ? s.updateTime = e.longs === String ? String(t.updateTime) : t.updateTime : s.updateTime = e.longs === String ? $util.Long.prototype.toString.call(t.updateTime) : e.longs === Number ? new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber() : t.updateTime, e.oneofs && (s._updateTime = "updateTime")), s;
2308
- }, r.prototype.toJSON = function() {
2307
+ }, n.prototype.toJSON = function() {
2309
2308
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
2310
- }, r.getTypeUrl = function(t) {
2309
+ }, n.getTypeUrl = function(t) {
2311
2310
  return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.CustomInfo";
2312
- }, r;
2311
+ }, n;
2313
2312
  }(), u.LayoutType = function() {
2314
- const r = {}, n = Object.create(r);
2315
- return n[r[0] = "AudioAndVideo"] = 0, n[r[1] = "OnlyAudio"] = 1, n[r[2] = "OnlyVideo"] = 2, n;
2313
+ const n = {}, r = Object.create(n);
2314
+ return r[n[0] = "AudioAndVideo"] = 0, r[n[1] = "OnlyAudio"] = 1, r[n[2] = "OnlyVideo"] = 2, r;
2316
2315
  }(), u.AudioType = function() {
2317
- const r = {}, n = Object.create(r);
2318
- return n[r[0] = "Microphone"] = 0, n[r[1] = "SystemVoice"] = 1, n;
2316
+ const n = {}, r = Object.create(n);
2317
+ return r[n[0] = "Microphone"] = 0, r[n[1] = "SystemVoice"] = 1, r;
2319
2318
  }(), u.VideoType = function() {
2320
- const r = {}, n = Object.create(r);
2321
- return n[r[0] = "Camera"] = 0, n[r[1] = "Screen"] = 1, n;
2319
+ const n = {}, r = Object.create(n);
2320
+ return r[n[0] = "Camera"] = 0, r[n[1] = "Screen"] = 1, r;
2322
2321
  }(), u;
2323
2322
  }(), a;
2324
2323
  }(), o;
@@ -2357,9 +2356,9 @@ class RoomUser {
2357
2356
  });
2358
2357
  m(this, "init", (o) => {
2359
2358
  var t, e, s, l;
2360
- const { id: a, audios: u = [], videos: r = [] } = o;
2359
+ const { id: a, audios: u = [], videos: n = [] } = o;
2361
2360
  this.userId = a;
2362
- const n = this.getUpdateTimeKey();
2361
+ const r = this.getUpdateTimeKey();
2363
2362
  this.mc_audio && (this.mc_audio.remove = !0), this.mc_video && (this.mc_video.remove = !0), this.ss_audio && (this.ss_audio.remove = !0), this.ss_video && (this.ss_video.remove = !0);
2364
2363
  for (const c of u) {
2365
2364
  const { type: d = 0, isEnable: p = !1, isMute: f = !1, updateTime: w, volume: b = 0 } = c;
@@ -2378,7 +2377,7 @@ class RoomUser {
2378
2377
  break;
2379
2378
  }
2380
2379
  }
2381
- for (const c of r) {
2380
+ for (const c of n) {
2382
2381
  const { type: d = 0, isEnable: p, isMute: f, updateTime: w, width: b, height: g, x: k, y: T } = c;
2383
2382
  switch (d) {
2384
2383
  case 0:
@@ -2397,7 +2396,7 @@ class RoomUser {
2397
2396
  }
2398
2397
  (t = this.mc_audio) != null && t.remove && (this.mc_audio = void 0), (e = this.mc_video) != null && e.remove && (this.mc_video = void 0), (s = this.ss_audio) != null && s.remove && (this.ss_audio = void 0), (l = this.ss_video) != null && l.remove && (this.ss_video = void 0);
2399
2398
  const i = this.getUpdateTimeKey();
2400
- n !== i && (this.updateTime = (/* @__PURE__ */ new Date()).getTime());
2399
+ r !== i && (this.updateTime = (/* @__PURE__ */ new Date()).getTime());
2401
2400
  });
2402
2401
  m(this, "destroy", () => {
2403
2402
  var o, a;
@@ -2408,16 +2407,16 @@ class RoomUser {
2408
2407
  const parseSEI = (h) => {
2409
2408
  let o = 0, a = 0;
2410
2409
  for (; ; ) {
2411
- const r = h[o];
2412
- if (a = a + r, o = o + 1, r !== 255) break;
2410
+ const n = h[o];
2411
+ if (a = a + n, o = o + 1, n !== 255) break;
2413
2412
  }
2414
2413
  let u = 0;
2415
2414
  for (; ; ) {
2416
- const r = h[o];
2417
- if (u = u + r, o = o + 1, r !== 255) break;
2415
+ const n = h[o];
2416
+ if (u = u + n, o = o + 1, n !== 255) break;
2418
2417
  }
2419
2418
  if (a === 5) {
2420
- const r = h.slice(o, o + 16), i = Array.from(r, (f) => f.toString(16).padStart(2, "0")).join("");
2419
+ const n = h.slice(o, o + 16), i = Array.from(n, (f) => f.toString(16).padStart(2, "0")).join("");
2421
2420
  o = o + 16;
2422
2421
  const t = u - 16, e = h.slice(o, o + t), s = com.quick.voice.proto.SeiData.decode(e), { event: l = 0 } = s, c = s.data;
2423
2422
  let d;
@@ -2467,44 +2466,44 @@ class QuickVoPlayer {
2467
2466
  return Array.from(o, (u) => u.updateTime).join("_");
2468
2467
  });
2469
2468
  m(this, "checkAndCreateUser", (o, a) => {
2470
- var u, r;
2469
+ var u, n;
2471
2470
  if (this.usersMap.has(o)) {
2472
- const n = this.usersMap.get(o);
2473
- if (n == null || n.init(a), n != null && n.mc_video) {
2474
- const { sx: i, sy: t, sw: e, sh: s } = n.mc_video;
2475
- (u = n == null ? void 0 : n.mc_video.worker) == null || u.setCut({ sx: i, sy: t, sw: e, sh: s });
2471
+ const r = this.usersMap.get(o);
2472
+ if (r == null || r.init(a), r != null && r.mc_video) {
2473
+ const { sx: i, sy: t, sw: e, sh: s } = r.mc_video;
2474
+ (u = r == null ? void 0 : r.mc_video.worker) == null || u.setCut({ sx: i, sy: t, sw: e, sh: s });
2476
2475
  }
2477
- if (n != null && n.ss_video) {
2478
- const { sx: i, sy: t, sw: e, sh: s } = n.ss_video;
2479
- (r = n == null ? void 0 : n.ss_video.worker) == null || r.setCut({ sx: i, sy: t, sw: e, sh: s });
2476
+ if (r != null && r.ss_video) {
2477
+ const { sx: i, sy: t, sw: e, sh: s } = r.ss_video;
2478
+ (n = r == null ? void 0 : r.ss_video.worker) == null || n.setCut({ sx: i, sy: t, sw: e, sh: s });
2480
2479
  }
2481
2480
  } else {
2482
- const n = new RoomUser();
2483
- if (this.usersMap.set(o, n), n.init(a), n) {
2484
- if (n.mc_video) {
2485
- const { sx: i, sy: t, sw: e, sh: s } = n.mc_video, l = `${n.userId}_mc_video`, { worker: c, stream: d, destroy: p } = this.prPlayer.cut.create(l, { sx: i, sy: t, sw: e, sh: s });
2486
- n.mc_video.worker = c, this.displayMode === "original" && c.setPause(!0), n.mc_video.stream = d, n.mc_video.destroy = () => {
2487
- p(), this.prPlayer.cut.remove(l), this.usersMap.delete(n.userId);
2481
+ const r = new RoomUser();
2482
+ if (this.usersMap.set(o, r), r.init(a), r) {
2483
+ if (r.mc_video) {
2484
+ const { sx: i, sy: t, sw: e, sh: s } = r.mc_video, l = `${r.userId}_mc_video`, { worker: c, stream: d, destroy: p } = this.prPlayer.cut.create(l, { sx: i, sy: t, sw: e, sh: s });
2485
+ r.mc_video.worker = c, this.displayMode === "original" && c.setPause(!0), r.mc_video.stream = d, r.mc_video.destroy = () => {
2486
+ p(), this.prPlayer.cut.remove(l), this.usersMap.delete(r.userId);
2488
2487
  };
2489
2488
  }
2490
- if (n.ss_video) {
2491
- const { sx: i, sy: t, sw: e, sh: s } = n.ss_video, l = `${n.userId}_ss_video`, { worker: c, stream: d, destroy: p } = this.prPlayer.cut.create(l, { sx: i, sy: t, sw: e, sh: s });
2492
- n.ss_video.worker = c, this.displayMode === "original" && c.setPause(!0), n.ss_video.stream = d, n.ss_video.destroy = () => {
2493
- p(), this.prPlayer.cut.remove(l), this.usersMap.delete(n.userId);
2489
+ if (r.ss_video) {
2490
+ const { sx: i, sy: t, sw: e, sh: s } = r.ss_video, l = `${r.userId}_ss_video`, { worker: c, stream: d, destroy: p } = this.prPlayer.cut.create(l, { sx: i, sy: t, sw: e, sh: s });
2491
+ r.ss_video.worker = c, this.displayMode === "original" && c.setPause(!0), r.ss_video.stream = d, r.ss_video.destroy = () => {
2492
+ p(), this.prPlayer.cut.remove(l), this.usersMap.delete(r.userId);
2494
2493
  };
2495
2494
  }
2496
2495
  }
2497
2496
  }
2498
2497
  });
2499
2498
  m(this, "setDisplayMode", (o) => {
2500
- var a, u, r, n, i, t, e, s;
2499
+ var a, u, n, r, i, t, e, s;
2501
2500
  switch (this.displayMode = o, o) {
2502
2501
  case "original":
2503
2502
  {
2504
2503
  this.prPlayer.setPause(!1);
2505
2504
  const l = [...this.usersMap.values()];
2506
2505
  for (const c of l)
2507
- (u = (a = c.mc_video) == null ? void 0 : a.worker) == null || u.setPause(!0), (n = (r = c.ss_video) == null ? void 0 : r.worker) == null || n.setPause(!0);
2506
+ (u = (a = c.mc_video) == null ? void 0 : a.worker) == null || u.setPause(!0), (r = (n = c.ss_video) == null ? void 0 : n.worker) == null || r.setPause(!0);
2508
2507
  }
2509
2508
  break;
2510
2509
  case "cut":
@@ -2524,12 +2523,12 @@ class QuickVoPlayer {
2524
2523
  try {
2525
2524
  const a = parseSEI(o);
2526
2525
  if (!a) return;
2527
- const { event: u, data: r } = a;
2526
+ const { event: u, data: n } = a;
2528
2527
  switch (u) {
2529
2528
  case 0:
2530
2529
  {
2531
- const { roomId: n, userMap: i } = r;
2532
- if (n !== this.room.roomId) return;
2530
+ const { roomId: r, userMap: i } = n;
2531
+ if (r !== this.room.roomId) return;
2533
2532
  const t = this.getAllUseUpdateKey(), e = Object.keys(i);
2534
2533
  {
2535
2534
  const l = [...this.usersMap.values()];
@@ -2549,8 +2548,8 @@ class QuickVoPlayer {
2549
2548
  break;
2550
2549
  case 1:
2551
2550
  {
2552
- const { roomId: n, updateTime: i } = r, { author: t, version: e } = r.customKeyMap;
2553
- this.room.roomId = n, this.room.updateTime = i, this.room.author = t, this.room.version = e;
2551
+ const { roomId: r, updateTime: i } = n, { author: t, version: e } = n.customKeyMap;
2552
+ this.room.roomId = r, this.room.updateTime = i, this.room.author = t, this.room.version = e;
2554
2553
  }
2555
2554
  break;
2556
2555
  }