quickvo-player 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ class N {
53
53
  };
54
54
  }
55
55
  }
56
- const S = `(function(){"use strict";class n{audioDecoderConfig;audioDecoder;videoDecoderConfig;videoDecoder;hasKeyFrame=!1;baseTime=0;pendingChunks=[];isProcessing=!1;decodeTimer=0;frameTrack=!1;minFrameTrackCacheNum=20;decodingSpeed=40;decodingSpeedRatio=1;maxDecodingSpeedRatio=2;nextRenderTime;on={audio:{},video:{}};constructor(){this.baseTime=new Date().getTime()-performance.now(),this.initDecodeInterval()}init=e=>{const{decodingSpeed:i,frameTrack:d,minFrameTrackCacheNum:o}=e;i!==void 0&&(this.decodingSpeed=i),d!==void 0&&(this.frameTrack=d),o!==void 0&&(this.minFrameTrackCacheNum=o)};setFrameTrack=e=>{this.frameTrack=e,this.frameTrack===!1&&(this.decodingSpeedRatio=1)};initDecodeInterval=()=>{let e=this.decodingSpeed/this.decodingSpeedRatio;const i=this.baseTime+performance.now();if(this.nextRenderTime){const d=i-this.nextRenderTime;e-=d}this.nextRenderTime=i+e,this.decodeTimer=setTimeout(()=>{this.decode(),this.initDecodeInterval()},e)};decode=()=>{if(this.isProcessing!==!0){for(this.isProcessing=!0;;){const e=this.pendingChunks.shift();if(this.frameTrack){const o=this.pendingChunks.length;if(o>=this.minFrameTrackCacheNum){const r=Math.min(1+(o-this.minFrameTrackCacheNum)/100,this.maxDecodingSpeedRatio);this.decodingSpeedRatio=Number(r.toFixed(1))}else this.decodingSpeedRatio=1}if(!e)break;const{type:i,init:d}=e;switch(i){case"audio":this.decodeAudio(d);break;case"video":this.decodeVideo(d);break}if(i==="video")break}this.isProcessing=!1}};decodeAudio=e=>{if(!this.audioDecoder)return;const i=new EncodedAudioChunk(e);this.audioDecoder.decode(i)};decodeVideo=e=>{if(this.videoDecoder&&(e.type==="key"&&(this.hasKeyFrame=!0),this.hasKeyFrame)){const i=new EncodedVideoChunk(e);this.videoDecoder.decode(i)}};destroy=()=>{this.audio.destroy(),this.video.destroy(),clearInterval(this.decodeTimer)};audio={init:e=>{this.audio.destroy(),this.audioDecoderConfig={...e},this.audioDecoder=new AudioDecoder({output:i=>{this.on.audio.decode&&this.on.audio.decode(i)},error:i=>{this.on.audio.error&&this.on.audio.error(i)}}),this.audioDecoder.configure(this.audioDecoderConfig)},push:e=>{this.pendingChunks.push({type:"audio",init:e})},flush:()=>{this.audioDecoder?.flush()},destroy:()=>{this.audioDecoderConfig=void 0,this.audioDecoder?.close(),this.audioDecoder=void 0}};video={init:e=>{this.video.destroy(),this.videoDecoderConfig={...e},this.videoDecoder=new VideoDecoder({output:async i=>{const d=i.timestamp+this.baseTime*1e3,o=await createImageBitmap(i);i.close(),o.width>0&&o.height>0?this.on.video.decode&&this.on.video.decode({timestamp:d,bitmap:o}):o.close()},error:i=>{this.on.video.error&&this.on.video.error(i)}}),this.videoDecoder.configure(this.videoDecoderConfig)},push:e=>{this.pendingChunks.push({type:"video",init:e})},flush:()=>{this.videoDecoder?.flush()},destroy:()=>{this.videoDecoderConfig=void 0,this.videoDecoder?.close(),this.videoDecoder=void 0,this.hasKeyFrame=!1}}}const s=new n;s.on.audio.decode=t=>postMessage({type:"audio",action:"onDecode",data:t}),s.on.audio.error=t=>postMessage({type:"audio",action:"onError",data:t}),s.on.video.decode=t=>postMessage({type:"video",action:"onDecode",data:t}),s.on.video.error=t=>postMessage({type:"video",action:"onError",data:t}),onmessage=t=>{const{type:e,action:i,data:d}=t.data;if(e){const o=s[e][i];o&&o(d)}else{const o=s[i];o&&o(d)}}})();
56
+ const S = `(function(){"use strict";class n{audioDecoderConfig;audioDecoder;videoDecoderConfig;videoDecoder;hasKeyFrame=!1;baseTime=0;pendingChunks=[];isProcessing=!1;decodeTimer=0;frameTrack=!1;minFrameTrackCacheNum=20;decodingSpeed=40;decodingSpeedRatio=1;maxDecodingSpeedRatio=2;nextRenderTime;on={audio:{},video:{}};constructor(){this.baseTime=new Date().getTime()-performance.now(),this.initDecodeInterval()}init=e=>{const{decodingSpeed:i,frameTrack:d,minFrameTrackCacheNum:o}=e;i!==void 0&&(this.decodingSpeed=i),d!==void 0&&(this.frameTrack=d),o!==void 0&&(this.minFrameTrackCacheNum=o)};setFrameTrack=e=>{this.frameTrack=e,this.frameTrack===!1&&(this.decodingSpeedRatio=1)};initDecodeInterval=()=>{let e=this.decodingSpeed/this.decodingSpeedRatio;const i=this.baseTime+performance.now();if(this.nextRenderTime){const d=i-this.nextRenderTime;e-=d}this.nextRenderTime=i+e,this.decodeTimer=setTimeout(()=>{this.decode(),this.initDecodeInterval()},e)};decode=()=>{if(this.isProcessing!==!0){for(this.isProcessing=!0;;){const e=this.pendingChunks.shift();if(this.frameTrack){const o=this.pendingChunks.length;if(o>=this.minFrameTrackCacheNum){const r=Math.min(1+(o-this.minFrameTrackCacheNum)/100,this.maxDecodingSpeedRatio);this.decodingSpeedRatio=Number(r.toFixed(1))}else this.decodingSpeedRatio=1}if(!e)break;const{type:i,init:d}=e;switch(i){case"audio":this.decodeAudio(d);break;case"video":this.decodeVideo(d);break}if(i==="video")break}this.isProcessing=!1}};decodeAudio=e=>{if(!this.audioDecoder)return;const i=new EncodedAudioChunk(e);this.audioDecoder.decode(i)};decodeVideo=e=>{if(this.videoDecoder&&(e.type==="key"&&(this.hasKeyFrame=!0),this.hasKeyFrame)){const i=new EncodedVideoChunk(e);this.videoDecoder.decode(i)}};destroy=()=>{this.audio.destroy(),this.video.destroy(),clearInterval(this.decodeTimer)};audio={init:e=>{this.audio.destroy(),this.audioDecoderConfig={...e},this.audioDecoder=new AudioDecoder({output:i=>{const d=this.decodingSpeedRatio;this.on.audio.decode&&this.on.audio.decode({audioData:i,playbackRate:d})},error:i=>{this.on.audio.error&&this.on.audio.error(i)}}),this.audioDecoder.configure(this.audioDecoderConfig)},push:e=>{this.pendingChunks.push({type:"audio",init:e})},flush:()=>{this.audioDecoder?.flush()},destroy:()=>{this.audioDecoderConfig=void 0,this.audioDecoder?.close(),this.audioDecoder=void 0}};video={init:e=>{this.video.destroy(),this.videoDecoderConfig={...e},this.videoDecoder=new VideoDecoder({output:async i=>{const d=i.timestamp+this.baseTime*1e3,o=await createImageBitmap(i);i.close(),o.width>0&&o.height>0?this.on.video.decode&&this.on.video.decode({timestamp:d,bitmap:o}):o.close()},error:i=>{this.on.video.error&&this.on.video.error(i)}}),this.videoDecoder.configure(this.videoDecoderConfig)},push:e=>{this.pendingChunks.push({type:"video",init:e})},flush:()=>{this.videoDecoder?.flush()},destroy:()=>{this.videoDecoderConfig=void 0,this.videoDecoder?.close(),this.videoDecoder=void 0,this.hasKeyFrame=!1}}}const s=new n;s.on.audio.decode=t=>postMessage({type:"audio",action:"onDecode",data:t}),s.on.audio.error=t=>postMessage({type:"audio",action:"onError",data:t}),s.on.video.decode=t=>postMessage({type:"video",action:"onDecode",data:t}),s.on.video.error=t=>postMessage({type:"video",action:"onError",data:t}),onmessage=t=>{const{type:e,action:i,data:d}=t.data;if(e){const o=s[e][i];o&&o(d)}else{const o=s[i];o&&o(d)}}})();
57
57
  `, v = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", S], { type: "text/javascript;charset=utf-8" });
58
58
  function F(h) {
59
59
  let o;
@@ -100,13 +100,13 @@ class B {
100
100
  this.worker.postMessage({ action: "destroy" }), this.worker.terminate();
101
101
  });
102
102
  this.worker.onmessage = (o) => {
103
- const { type: a, action: u, data: n } = o.data;
103
+ const { type: a, action: u, data: r } = o.data;
104
104
  switch (a) {
105
105
  case "audio":
106
- u === "onDecode" && this.on.audio.decode && this.on.audio.decode(n), u === "onError" && this.on.audio.error && this.on.audio.error(n);
106
+ u === "onDecode" && this.on.audio.decode && this.on.audio.decode(r), u === "onError" && this.on.audio.error && this.on.audio.error(r);
107
107
  break;
108
108
  case "video":
109
- u === "onDecode" && this.on.video.decode && this.on.video.decode(n), u === "onError" && this.on.video.error && this.on.video.error(n);
109
+ u === "onDecode" && this.on.video.decode && this.on.video.decode(r), u === "onError" && this.on.video.error && this.on.video.error(r);
110
110
  break;
111
111
  }
112
112
  };
@@ -118,8 +118,8 @@ class O {
118
118
  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", () => {
119
119
  {
120
120
  const u = this.inputStream.getTracks();
121
- for (const n of u)
122
- n.stop(), this.inputStream.removeTrack(n);
121
+ for (const r of u)
122
+ r.stop(), this.inputStream.removeTrack(r);
123
123
  }
124
124
  }), y(this, "getStream", () => this.filterStream(this.outputStream)), y(this, "setMute", (u = !0) => {
125
125
  u ? this.analyserNode.disconnect(this.outputGainNode) : this.analyserNode.connect(this.outputGainNode);
@@ -134,47 +134,47 @@ class O {
134
134
  }), y(this, "setOutputGain", (u) => {
135
135
  this.outputGain = u, this.outputGainNode.gain.setValueAtTime(this.outputGain, this.audioContext.currentTime);
136
136
  }), y(this, "getVolume", () => {
137
- const { analyserNode: u, analyserArrayData: n } = this;
138
- u.getByteFrequencyData(n);
139
- let r = 0;
140
- for (let i = 0; i < n.length; i++)
141
- r += n[i];
142
- return Math.ceil(r / n.length);
143
- }), y(this, "mixAudio", (u, n = "bgm") => new Promise(async (r, i) => {
137
+ const { analyserNode: u, analyserArrayData: r } = this;
138
+ u.getByteFrequencyData(r);
139
+ let n = 0;
140
+ for (let i = 0; i < r.length; i++)
141
+ n += r[i];
142
+ return Math.ceil(n / r.length);
143
+ }), y(this, "mixAudio", (u, r = "bgm") => new Promise(async (n, i) => {
144
144
  try {
145
145
  {
146
- const s = this.mixAudioMap.get(n);
146
+ const s = this.mixAudioMap.get(r);
147
147
  s && s.stop();
148
148
  }
149
- const t = n === "bgs" ? this.bgsGainNode : this.bgmGainNode, e = this.audioContext.createBufferSource();
150
- this.mixAudioMap.set(n, e), e.buffer = u, e.connect(t), e.onended = () => {
151
- e.disconnect(t), this.mixAudioMap.delete(n), r(!0);
149
+ const t = r === "bgs" ? this.bgsGainNode : this.bgmGainNode, e = this.audioContext.createBufferSource();
150
+ this.mixAudioMap.set(r, e), e.buffer = u, e.connect(t), e.onended = () => {
151
+ e.disconnect(t), this.mixAudioMap.delete(r), n(!0);
152
152
  }, e.start(0);
153
153
  } catch (t) {
154
154
  i(t);
155
155
  }
156
156
  })), y(this, "mixAudioStop", (u) => {
157
- const n = this.mixAudioMap.get(u);
158
- n == null || n.stop();
159
- }), y(this, "changeMix", (u, n) => {
160
- const r = u === "bgs" ? this.bgsGainNode : this.bgmGainNode;
161
- n ? r.connect(this.destinationNode) : r.disconnect(this.destinationNode);
157
+ const r = this.mixAudioMap.get(u);
158
+ r == null || r.stop();
159
+ }), y(this, "changeMix", (u, r) => {
160
+ const n = u === "bgs" ? this.bgsGainNode : this.bgmGainNode;
161
+ r ? n.connect(this.destinationNode) : n.disconnect(this.destinationNode);
162
162
  }), 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;
163
163
  {
164
- const { sourceNode: u, inputGainNode: n, enhanceGainNode: r, bgsGainNode: i, bgmGainNode: t, analyserNode: e, outputGainNode: s, destinationNode: l } = this;
165
- 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);
164
+ const { sourceNode: u, inputGainNode: r, enhanceGainNode: n, bgsGainNode: i, bgmGainNode: t, analyserNode: e, outputGainNode: s, destinationNode: l } = this;
165
+ 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);
166
166
  }
167
167
  this.setMute(!0), this.audioContext.resume();
168
168
  }
169
169
  }
170
170
  const V = async (h, o) => {
171
171
  try {
172
- const { format: a, numberOfChannels: u, numberOfFrames: n, sampleRate: r } = o, i = h.createBuffer(u, n, r);
172
+ const { format: a, numberOfChannels: u, numberOfFrames: r, sampleRate: n } = o, i = h.createBuffer(u, r, n);
173
173
  for (let t = 0; t < u; t++) {
174
174
  const e = o.allocationSize({ planeIndex: t }), s = new Uint8Array(e);
175
175
  o.copyTo(s, { planeIndex: t });
176
176
  const l = new DataView(s.buffer), c = i.getChannelData(t);
177
- for (let d = 0; d < n; d++) {
177
+ for (let d = 0; d < r; d++) {
178
178
  let p;
179
179
  switch (a) {
180
180
  case "s16":
@@ -220,18 +220,19 @@ class W {
220
220
  });
221
221
  }
222
222
  async push(o) {
223
+ const { audioData: a, playbackRate: u = 1 } = o;
223
224
  try {
224
225
  if (!this.audioContext || !this.destination) return;
225
- const a = await V(this.audioContext, o);
226
- if (!a) return;
227
- const u = this.audioContext.createBufferSource();
228
- u.buffer = a, u.connect(this.destination);
229
- const n = Math.max(this.nextStartTime, this.audioContext.currentTime);
230
- this.nextStartTime = n + a.duration, u.start(n), this.pendingSources.push(u), u.onended = () => {
231
- this.pendingSources = this.pendingSources.filter((r) => r !== u);
226
+ const r = await V(this.audioContext, a);
227
+ if (!r) return;
228
+ const n = this.audioContext.createBufferSource();
229
+ n.buffer = r, n.playbackRate.value = u, n.connect(this.destination);
230
+ const i = Math.max(this.nextStartTime, this.audioContext.currentTime), t = r.duration / u;
231
+ this.nextStartTime = i + t, n.start(i), this.pendingSources.push(n), n.onended = () => {
232
+ this.pendingSources = this.pendingSources.filter((e) => e !== n);
232
233
  }, this.audioContext.state === "suspended" && await this.audioContext.resume();
233
234
  } finally {
234
- o.close();
235
+ a.close();
235
236
  }
236
237
  }
237
238
  destroy() {
@@ -296,44 +297,44 @@ class $ {
296
297
  * @param timeout 超时时间 ms
297
298
  * @returns
298
299
  */
299
- m(this, "add", (o, a = () => !1, u = 0) => new Promise((n) => {
300
+ m(this, "add", (o, a = () => !1, u = 0) => new Promise((r) => {
300
301
  var t, e;
301
- if (a()) return n(!0);
302
+ if (a()) return r(!0);
302
303
  this.resolvesMap.has(o) || this.resolvesMap.set(o, /* @__PURE__ */ new Map()), this.index++;
303
- const r = `${this.index}`;
304
+ const n = `${this.index}`;
304
305
  if (u = Math.max(0, u), u === 0) {
305
- (t = this.resolvesMap.get(o)) == null || t.set(r, { resolve: n, timer: 0 });
306
+ (t = this.resolvesMap.get(o)) == null || t.set(n, { resolve: r, timer: 0 });
306
307
  return;
307
308
  }
308
309
  const i = window.setTimeout(() => {
309
310
  this.emit(o);
310
311
  }, u);
311
- (e = this.resolvesMap.get(o)) == null || e.set(r, { resolve: n, timer: i });
312
+ (e = this.resolvesMap.get(o)) == null || e.set(n, { resolve: r, timer: i });
312
313
  }));
313
314
  m(this, "emit", async (o) => {
314
315
  const a = this.resolvesMap.get(o);
315
316
  if (!a) return;
316
317
  const u = [...a.keys()];
317
- for (const n of u) {
318
- const r = a.get(n);
319
- r && (clearTimeout(r.timer), r.resolve(), a.delete(n));
318
+ for (const r of u) {
319
+ const n = a.get(r);
320
+ n && (clearTimeout(n.timer), n.resolve(), a.delete(r));
320
321
  }
321
322
  });
322
323
  }
323
324
  }
324
325
  const Y = (h) => {
325
326
  const o = new DataView(h.buffer);
326
- let a = 0, u, n, r;
327
+ let a = 0, u, r, n;
327
328
  u = o.getUint32(a, !1), a += 4;
328
329
  {
329
330
  const i = o.getUint8(a), t = i >> 7 & 1, e = i >> 5 & 3, s = i & 31;
330
- n = { forbidden_zero_bit: t, nal_ref_idc: e, nal_unit_type: s }, a += 1;
331
+ r = { forbidden_zero_bit: t, nal_ref_idc: e, nal_unit_type: s }, a += 1;
331
332
  }
332
333
  {
333
334
  const i = u - 1;
334
- r = new Uint8Array(o.buffer.slice(a, a + i));
335
+ n = new Uint8Array(o.buffer.slice(a, a + i));
335
336
  }
336
- return { size: u, header: n, data: r };
337
+ return { size: u, header: r, data: n };
337
338
  };
338
339
  var R, U;
339
340
  class C {
@@ -348,34 +349,34 @@ class C {
348
349
  * @param input string | URL | Request
349
350
  * @param init RequestInit
350
351
  */
351
- m(this, "check", (o, a) => new Promise(async (u, n) => {
352
+ m(this, "check", (o, a) => new Promise(async (u, r) => {
352
353
  var i;
353
354
  this.stop(), H(this, U, new AbortController());
354
- const r = window.setTimeout(() => {
355
+ const n = window.setTimeout(() => {
355
356
  var t;
356
- (t = I(this, U)) == null || t.abort("Timeout."), n({ status: "timeout", reason: "" });
357
+ (t = I(this, U)) == null || t.abort("Timeout."), r({ status: "timeout", reason: "" });
357
358
  }, I(this, R).timeout);
358
359
  try {
359
360
  const t = await fetch(o, { ...a, method: "HEAD", signal: (i = I(this, U)) == null ? void 0 : i.signal });
360
- t.status === 200 ? u({ status: "successed", reason: "" }) : n({ status: "failed", reason: `${t.status}` });
361
+ t.status === 200 ? u({ status: "successed", reason: "" }) : r({ status: "failed", reason: `${t.status}` });
361
362
  } catch (t) {
362
- n({ status: "error", reason: t.message });
363
+ r({ status: "error", reason: t.message });
363
364
  }
364
- clearTimeout(r);
365
+ clearTimeout(n);
365
366
  }));
366
367
  /**
367
368
  *
368
369
  * @param input string | URL | Request
369
370
  * @param init RequestInit
370
371
  */
371
- m(this, "request", async (o, a) => new Promise(async (u, n) => {
372
- var r;
372
+ m(this, "request", async (o, a) => new Promise(async (u, r) => {
373
+ var n;
373
374
  try {
374
375
  I(this, R).check && await this.check(o, a), H(this, U, new AbortController());
375
- const i = await fetch(o, { ...a, signal: (r = I(this, U)) == null ? void 0 : r.signal });
376
+ const i = await fetch(o, { ...a, signal: (n = I(this, U)) == null ? void 0 : n.signal });
376
377
  u(i);
377
378
  } catch (i) {
378
- this.stop(), n(i);
379
+ this.stop(), r(i);
379
380
  }
380
381
  }));
381
382
  /**
@@ -434,13 +435,13 @@ class et {
434
435
  * 停止
435
436
  */
436
437
  m(this, "stop", async () => {
437
- var o, a, u, n;
438
+ var o, a, u, r;
438
439
  try {
439
440
  clearInterval(this.hls.getSegmentsTimer), this.prFetch.stop();
440
- } catch (r) {
441
- console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: error", r);
441
+ } catch (n) {
442
+ console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: error", n);
442
443
  }
443
- (o = this.demuxerWorker) == null || o.destroy(), (a = this.decoderWorker) == null || a.destroy(), (u = this.renderWorker) == null || u.destroy(), P(this.stream), (n = this.audioPlayer) == null || n.destroy();
444
+ (o = this.demuxerWorker) == null || o.destroy(), (a = this.decoderWorker) == null || a.destroy(), (u = this.renderWorker) == null || u.destroy(), P(this.stream), (r = this.audioPlayer) == null || r.destroy();
444
445
  });
445
446
  /**
446
447
  * 获取媒体流
@@ -487,25 +488,25 @@ class et {
487
488
  this.demuxerWorker = new N(), this.demuxerWorker.init(o), this.demuxerWorker.on.debug = (a) => {
488
489
  this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: debug", a);
489
490
  }, this.demuxerWorker.on.info = (a) => {
490
- var r;
491
+ var n;
491
492
  this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: info", a);
492
- const { framerate: u = 25 } = a, n = 1e3 / u;
493
- (r = this.decoderWorker) == null || r.init({ decodingSpeed: n }), this.on.demuxer.info && this.on.demuxer.info(a);
493
+ const { framerate: u = 25 } = a, r = 1e3 / u;
494
+ (n = this.decoderWorker) == null || n.init({ decodingSpeed: r }), this.on.demuxer.info && this.on.demuxer.info(a);
494
495
  }, this.demuxerWorker.on.config = (a) => {
495
- var n, r;
496
+ var r, n;
496
497
  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);
497
498
  const { kind: u } = a;
498
499
  switch (u) {
499
500
  case "audio":
500
501
  {
501
502
  const { codec: i, sampleRate: t, numberOfChannels: e } = a;
502
- (n = this.decoderWorker) == null || n.audio.init({ codec: i, sampleRate: t, numberOfChannels: e });
503
+ (r = this.decoderWorker) == null || r.audio.init({ codec: i, sampleRate: t, numberOfChannels: e });
503
504
  }
504
505
  break;
505
506
  case "video":
506
507
  {
507
508
  const { codec: i, description: t } = a;
508
- (r = this.decoderWorker) == null || r.video.init({ codec: i, description: t });
509
+ (n = this.decoderWorker) == null || n.video.init({ codec: i, description: t });
509
510
  }
510
511
  break;
511
512
  }
@@ -515,14 +516,14 @@ class et {
515
516
  switch (u) {
516
517
  case "audio":
517
518
  {
518
- const { type: n, dts: r, data: i } = a, t = r * 1;
519
- this.decoderWorker.audio.push({ type: n, timestamp: t, data: i });
519
+ const { type: r, dts: n, data: i } = a, t = n * 1;
520
+ this.decoderWorker.audio.push({ type: r, timestamp: t, data: i });
520
521
  }
521
522
  break;
522
523
  case "video":
523
524
  {
524
- const { type: n, dts: r, data: i, nalus: t = [] } = a, e = r * 1e3;
525
- this.decoderWorker.video.push({ type: n, timestamp: e, data: i });
525
+ const { type: r, dts: n, data: i, nalus: t = [] } = a, e = n * 1e3;
526
+ this.decoderWorker.video.push({ type: r, timestamp: e, data: i });
526
527
  for (const s of t) {
527
528
  if (s.byteLength <= 4) continue;
528
529
  const { header: l, data: c } = Y(s), { nal_unit_type: d } = l;
@@ -543,11 +544,11 @@ class et {
543
544
  }, this.decoderWorker.on.audio.error = (o) => {
544
545
  this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: audio.error ", o), this.on.error && this.on.error(o);
545
546
  }, this.decoderWorker.on.video.decode = async (o) => {
546
- var u, n;
547
+ var u, r;
547
548
  (u = this.renderWorker) == null || u.push(o);
548
549
  const a = [...this.cutRenders.keys()];
549
- for (const r of a)
550
- (n = this.cutRenders.get(r)) == null || n.worker.push(o);
550
+ for (const n of a)
551
+ (r = this.cutRenders.get(n)) == null || r.worker.push(o);
551
552
  this.on.decoder.video && this.on.decoder.video(o), o.bitmap.close();
552
553
  }, this.decoderWorker.on.video.error = (o) => {
553
554
  this.stop(), this.on.error && this.on.error(o);
@@ -596,12 +597,12 @@ class et {
596
597
  var o, a;
597
598
  try {
598
599
  let u = await this.prFetch.request(this.url);
599
- 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.");
600
- const n = (o = u.body) == null ? void 0 : o.getReader();
601
- if (!n) throw new Error("reader is error.");
600
+ 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.");
601
+ const r = (o = u.body) == null ? void 0 : o.getReader();
602
+ if (!r) throw new Error("reader is error.");
602
603
  for (; ; ) {
603
- const { done: r, value: i } = await n.read();
604
- if (i && ((a = this.demuxerWorker) == null || a.push(i)), r) break;
604
+ const { done: n, value: i } = await r.read();
605
+ if (i && ((a = this.demuxerWorker) == null || a.push(i)), n) break;
605
606
  }
606
607
  } catch (u) {
607
608
  if ((u == null ? void 0 : u.name) !== "AbortError") throw Error(u);
@@ -617,26 +618,26 @@ class et {
617
618
  parse: async (o) => {
618
619
  const a = new TextDecoder("utf-8").decode(o).split(`
619
620
  `).map((e) => e.replace("\r", "")), u = this.url.substring(0, this.url.lastIndexOf("/") + 1);
620
- let n = 4, r = 0, i = !1;
621
+ let r = 4, n = 0, i = !1;
621
622
  const t = [];
622
623
  for (const e of a)
623
- 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({
624
+ 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({
624
625
  url: e.startsWith("http") ? e : u + e,
625
- duration: n,
626
+ duration: r,
626
627
  isLive: i
627
628
  });
628
- return { baseUrl: u, targetDuration: r, isLive: i, segments: t };
629
+ return { baseUrl: u, targetDuration: n, isLive: i, segments: t };
629
630
  },
630
631
  getSegments: async () => {
631
632
  var o;
632
633
  try {
633
634
  const a = new C();
634
635
  let u = await a.request(this.url);
635
- if (u.status !== 200 && (await new Promise((r) => setTimeout(() => r(!0), 500)), u = await a.request(this.url)), u.status !== 200 && (await new Promise((r) => setTimeout(() => r(!0), 500)), u = await a.request(this.url)), u.status !== 200) throw new Error("request is error.");
636
- const n = (o = u.body) == null ? void 0 : o.getReader();
637
- if (!n) throw new Error("reader is error.");
636
+ 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.");
637
+ const r = (o = u.body) == null ? void 0 : o.getReader();
638
+ if (!r) throw new Error("reader is error.");
638
639
  for (; ; ) {
639
- const { done: r, value: i } = await n.read();
640
+ const { done: n, value: i } = await r.read();
640
641
  if (i) {
641
642
  const t = await this.hls.parse(i), { segments: e = [], isLive: s = !1 } = t;
642
643
  this.hls.isLive = s, s === !1 && (this.option.frameTrack = !1);
@@ -644,7 +645,7 @@ class et {
644
645
  const c = l.findIndex((d) => d === this.hls.url);
645
646
  c !== -1 && (l = l.slice(c + 1)), this.hls.urls = l;
646
647
  }
647
- if (r) break;
648
+ if (n) break;
648
649
  }
649
650
  } catch (a) {
650
651
  this.on.error && this.on.error(a);
@@ -654,20 +655,20 @@ class et {
654
655
  var o, a, u;
655
656
  try {
656
657
  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)); ; ) {
657
- const n = this.hls.urls.shift();
658
- if (n) {
659
- this.hls.url = n;
660
- const r = (a = (await this.prFetch.request(n)).body) == null ? void 0 : a.getReader();
661
- if (!r) throw new Error("segment reader is error.");
658
+ const r = this.hls.urls.shift();
659
+ if (r) {
660
+ this.hls.url = r;
661
+ const n = (a = (await this.prFetch.request(r)).body) == null ? void 0 : a.getReader();
662
+ if (!n) throw new Error("segment reader is error.");
662
663
  for (; ; ) {
663
- const { done: i, value: t } = await r.read();
664
+ const { done: i, value: t } = await n.read();
664
665
  if (t && ((u = this.demuxerWorker) == null || u.push(t)), i) break;
665
666
  }
666
667
  } else
667
- await new Promise((r) => setTimeout(() => r(!0), 300));
668
+ await new Promise((n) => setTimeout(() => n(!0), 300));
668
669
  }
669
- } catch (n) {
670
- if ((n == null ? void 0 : n.name) !== "AbortError") throw Error(n);
670
+ } catch (r) {
671
+ if ((r == null ? void 0 : r.name) !== "AbortError") throw Error(r);
671
672
  }
672
673
  }
673
674
  });
@@ -680,10 +681,10 @@ function requireAspromise() {
680
681
  if (hasRequiredAspromise) return aspromise;
681
682
  hasRequiredAspromise = 1, aspromise = h;
682
683
  function h(o, a) {
683
- for (var u = new Array(arguments.length - 1), n = 0, r = 2, i = !0; r < arguments.length; )
684
- u[n++] = arguments[r++];
684
+ for (var u = new Array(arguments.length - 1), r = 0, n = 2, i = !0; n < arguments.length; )
685
+ u[r++] = arguments[n++];
685
686
  return new Promise(function(e, s) {
686
- u[n] = function(c) {
687
+ u[r] = function(c) {
687
688
  if (i)
688
689
  if (i = !1, c)
689
690
  s(c);
@@ -714,8 +715,8 @@ function requireBase64() {
714
715
  ++s;
715
716
  return Math.ceil(t.length * 3) / 4 - s;
716
717
  };
717
- for (var a = new Array(64), u = new Array(123), n = 0; n < 64; )
718
- u[a[n] = n < 26 ? n + 65 : n < 52 ? n + 71 : n < 62 ? n - 4 : n - 59 | 43] = n++;
718
+ for (var a = new Array(64), u = new Array(123), r = 0; r < 64; )
719
+ u[a[r] = r < 26 ? r + 65 : r < 52 ? r + 71 : r < 62 ? r - 4 : r - 59 | 43] = r++;
719
720
  o.encode = function(t, e, s) {
720
721
  for (var l = null, c = [], d = 0, p = 0, f; e < s; ) {
721
722
  var w = t[e++];
@@ -734,14 +735,14 @@ function requireBase64() {
734
735
  }
735
736
  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));
736
737
  };
737
- var r = "invalid encoding";
738
+ var n = "invalid encoding";
738
739
  o.decode = function(t, e, s) {
739
740
  for (var l = s, c = 0, d, p = 0; p < t.length; ) {
740
741
  var f = t.charCodeAt(p++);
741
742
  if (f === 61 && c > 1)
742
743
  break;
743
744
  if ((f = u[f]) === void 0)
744
- throw Error(r);
745
+ throw Error(n);
745
746
  switch (c) {
746
747
  case 0:
747
748
  d = f, c = 1;
@@ -758,7 +759,7 @@ function requireBase64() {
758
759
  }
759
760
  }
760
761
  if (c === 1)
761
- throw Error(r);
762
+ throw Error(n);
762
763
  return s - l;
763
764
  }, o.test = function(t) {
764
765
  return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t);
@@ -772,10 +773,10 @@ function requireEventemitter() {
772
773
  function h() {
773
774
  this._listeners = {};
774
775
  }
775
- return h.prototype.on = function(a, u, n) {
776
+ return h.prototype.on = function(a, u, r) {
776
777
  return (this._listeners[a] || (this._listeners[a] = [])).push({
777
778
  fn: u,
778
- ctx: n || this
779
+ ctx: r || this
779
780
  }), this;
780
781
  }, h.prototype.off = function(a, u) {
781
782
  if (a === void 0)
@@ -783,16 +784,16 @@ function requireEventemitter() {
783
784
  else if (u === void 0)
784
785
  this._listeners[a] = [];
785
786
  else
786
- for (var n = this._listeners[a], r = 0; r < n.length; )
787
- n[r].fn === u ? n.splice(r, 1) : ++r;
787
+ for (var r = this._listeners[a], n = 0; n < r.length; )
788
+ r[n].fn === u ? r.splice(n, 1) : ++n;
788
789
  return this;
789
790
  }, h.prototype.emit = function(a) {
790
791
  var u = this._listeners[a];
791
792
  if (u) {
792
- for (var n = [], r = 1; r < arguments.length; )
793
- n.push(arguments[r++]);
794
- for (r = 0; r < u.length; )
795
- u[r].fn.apply(u[r++].ctx, n);
793
+ for (var r = [], n = 1; n < arguments.length; )
794
+ r.push(arguments[n++]);
795
+ for (n = 0; n < u.length; )
796
+ u[n].fn.apply(u[n++].ctx, r);
796
797
  }
797
798
  return this;
798
799
  }, eventemitter;
@@ -801,7 +802,7 @@ var float, hasRequiredFloat;
801
802
  function requireFloat() {
802
803
  if (hasRequiredFloat) return float;
803
804
  hasRequiredFloat = 1, float = h(h);
804
- function h(r) {
805
+ function h(n) {
805
806
  return typeof Float32Array < "u" ? function() {
806
807
  var i = new Float32Array([-0]), t = new Uint8Array(i.buffer), e = t[3] === 128;
807
808
  function s(p, f, w) {
@@ -810,14 +811,14 @@ function requireFloat() {
810
811
  function l(p, f, w) {
811
812
  i[0] = p, f[w] = t[3], f[w + 1] = t[2], f[w + 2] = t[1], f[w + 3] = t[0];
812
813
  }
813
- r.writeFloatLE = e ? s : l, r.writeFloatBE = e ? l : s;
814
+ n.writeFloatLE = e ? s : l, n.writeFloatBE = e ? l : s;
814
815
  function c(p, f) {
815
816
  return t[0] = p[f], t[1] = p[f + 1], t[2] = p[f + 2], t[3] = p[f + 3], i[0];
816
817
  }
817
818
  function d(p, f) {
818
819
  return t[3] = p[f], t[2] = p[f + 1], t[1] = p[f + 2], t[0] = p[f + 3], i[0];
819
820
  }
820
- r.readFloatLE = e ? c : d, r.readFloatBE = e ? d : c;
821
+ n.readFloatLE = e ? c : d, n.readFloatBE = e ? d : c;
821
822
  }() : function() {
822
823
  function i(e, s, l, c) {
823
824
  var d = s < 0 ? 1 : 0;
@@ -840,12 +841,12 @@ function requireFloat() {
840
841
  e((d << 31 | p + 127 << 23 | f) >>> 0, l, c);
841
842
  }
842
843
  }
843
- r.writeFloatLE = i.bind(null, o), r.writeFloatBE = i.bind(null, a);
844
+ n.writeFloatLE = i.bind(null, o), n.writeFloatBE = i.bind(null, a);
844
845
  function t(e, s, l) {
845
846
  var c = e(s, l), d = (c >> 31) * 2 + 1, p = c >>> 23 & 255, f = c & 8388607;
846
847
  return p === 255 ? f ? NaN : d * (1 / 0) : p === 0 ? d * 1401298464324817e-60 * f : d * Math.pow(2, p - 150) * (f + 8388608);
847
848
  }
848
- r.readFloatLE = t.bind(null, u), r.readFloatBE = t.bind(null, n);
849
+ n.readFloatLE = t.bind(null, u), n.readFloatBE = t.bind(null, r);
849
850
  }(), typeof Float64Array < "u" ? function() {
850
851
  var i = new Float64Array([-0]), t = new Uint8Array(i.buffer), e = t[7] === 128;
851
852
  function s(p, f, w) {
@@ -854,14 +855,14 @@ function requireFloat() {
854
855
  function l(p, f, w) {
855
856
  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];
856
857
  }
857
- r.writeDoubleLE = e ? s : l, r.writeDoubleBE = e ? l : s;
858
+ n.writeDoubleLE = e ? s : l, n.writeDoubleBE = e ? l : s;
858
859
  function c(p, f) {
859
860
  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];
860
861
  }
861
862
  function d(p, f) {
862
863
  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];
863
864
  }
864
- r.readDoubleLE = e ? c : d, r.readDoubleBE = e ? d : c;
865
+ n.readDoubleLE = e ? c : d, n.readDoubleBE = e ? d : c;
865
866
  }() : function() {
866
867
  function i(e, s, l, c, d, p) {
867
868
  var f = c < 0 ? 1 : 0;
@@ -887,25 +888,25 @@ function requireFloat() {
887
888
  }
888
889
  }
889
890
  }
890
- r.writeDoubleLE = i.bind(null, o, 0, 4), r.writeDoubleBE = i.bind(null, a, 4, 0);
891
+ n.writeDoubleLE = i.bind(null, o, 0, 4), n.writeDoubleBE = i.bind(null, a, 4, 0);
891
892
  function t(e, s, l, c, d) {
892
893
  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;
893
894
  return b === 2047 ? g ? NaN : w * (1 / 0) : b === 0 ? w * 5e-324 * g : w * Math.pow(2, b - 1075) * (g + 4503599627370496);
894
895
  }
895
- r.readDoubleLE = t.bind(null, u, 0, 4), r.readDoubleBE = t.bind(null, n, 4, 0);
896
- }(), r;
896
+ n.readDoubleLE = t.bind(null, u, 0, 4), n.readDoubleBE = t.bind(null, r, 4, 0);
897
+ }(), n;
897
898
  }
898
- function o(r, i, t) {
899
- i[t] = r & 255, i[t + 1] = r >>> 8 & 255, i[t + 2] = r >>> 16 & 255, i[t + 3] = r >>> 24;
899
+ function o(n, i, t) {
900
+ i[t] = n & 255, i[t + 1] = n >>> 8 & 255, i[t + 2] = n >>> 16 & 255, i[t + 3] = n >>> 24;
900
901
  }
901
- function a(r, i, t) {
902
- i[t] = r >>> 24, i[t + 1] = r >>> 16 & 255, i[t + 2] = r >>> 8 & 255, i[t + 3] = r & 255;
902
+ function a(n, i, t) {
903
+ i[t] = n >>> 24, i[t + 1] = n >>> 16 & 255, i[t + 2] = n >>> 8 & 255, i[t + 3] = n & 255;
903
904
  }
904
- function u(r, i) {
905
- return (r[i] | r[i + 1] << 8 | r[i + 2] << 16 | r[i + 3] << 24) >>> 0;
905
+ function u(n, i) {
906
+ return (n[i] | n[i + 1] << 8 | n[i + 2] << 16 | n[i + 3] << 24) >>> 0;
906
907
  }
907
- function n(r, i) {
908
- return (r[i] << 24 | r[i + 1] << 16 | r[i + 2] << 8 | r[i + 3]) >>> 0;
908
+ function r(n, i) {
909
+ return (n[i] << 24 | n[i + 1] << 16 | n[i + 2] << 8 | n[i + 3]) >>> 0;
909
910
  }
910
911
  return float;
911
912
  }
@@ -929,20 +930,20 @@ function requireUtf8() {
929
930
  return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(h) {
930
931
  var o = h;
931
932
  o.length = function(u) {
932
- for (var n = 0, r = 0, i = 0; i < u.length; ++i)
933
- 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;
934
- return n;
935
- }, o.read = function(u, n, r) {
936
- var i = r - n;
933
+ for (var r = 0, n = 0, i = 0; i < u.length; ++i)
934
+ 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;
935
+ return r;
936
+ }, o.read = function(u, r, n) {
937
+ var i = n - r;
937
938
  if (i < 1)
938
939
  return "";
939
- for (var t = null, e = [], s = 0, l; n < r; )
940
- 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);
940
+ for (var t = null, e = [], s = 0, l; r < n; )
941
+ 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);
941
942
  return t ? (s && t.push(String.fromCharCode.apply(String, e.slice(0, s))), t.join("")) : String.fromCharCode.apply(String, e.slice(0, s));
942
- }, o.write = function(u, n, r) {
943
- for (var i = r, t, e, s = 0; s < u.length; ++s)
944
- 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);
945
- return r - i;
943
+ }, o.write = function(u, r, n) {
944
+ for (var i = n, t, e, s = 0; s < u.length; ++s)
945
+ 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);
946
+ return n - i;
946
947
  };
947
948
  }(utf8)), utf8;
948
949
  }
@@ -951,11 +952,11 @@ function requirePool() {
951
952
  if (hasRequiredPool) return pool_1;
952
953
  hasRequiredPool = 1, pool_1 = h;
953
954
  function h(o, a, u) {
954
- var n = u || 8192, r = n >>> 1, i = null, t = n;
955
+ var r = u || 8192, n = r >>> 1, i = null, t = r;
955
956
  return function(s) {
956
- if (s < 1 || s > r)
957
+ if (s < 1 || s > n)
957
958
  return o(s);
958
- t + s > n && (i = o(n), t = 0);
959
+ t + s > r && (i = o(r), t = 0);
959
960
  var l = a.call(i, t, t += s);
960
961
  return t & 7 && (t = (t | 7) + 1), l;
961
962
  };
@@ -967,8 +968,8 @@ function requireLongbits() {
967
968
  if (hasRequiredLongbits) return longbits;
968
969
  hasRequiredLongbits = 1, longbits = o;
969
970
  var h = requireMinimal$1();
970
- function o(r, i) {
971
- this.lo = r >>> 0, this.hi = i >>> 0;
971
+ function o(n, i) {
972
+ this.lo = n >>> 0, this.hi = i >>> 0;
972
973
  }
973
974
  var a = o.zero = new o(0, 0);
974
975
  a.toNumber = function() {
@@ -1004,11 +1005,11 @@ function requireLongbits() {
1004
1005
  }, o.prototype.toLong = function(i) {
1005
1006
  return h.Long ? new h.Long(this.lo | 0, this.hi | 0, !!i) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!i };
1006
1007
  };
1007
- var n = String.prototype.charCodeAt;
1008
+ var r = String.prototype.charCodeAt;
1008
1009
  return o.fromHash = function(i) {
1009
1010
  return i === u ? a : new o(
1010
- (n.call(i, 0) | n.call(i, 1) << 8 | n.call(i, 2) << 16 | n.call(i, 3) << 24) >>> 0,
1011
- (n.call(i, 4) | n.call(i, 5) << 8 | n.call(i, 6) << 16 | n.call(i, 7) << 24) >>> 0
1011
+ (r.call(i, 0) | r.call(i, 1) << 8 | r.call(i, 2) << 16 | r.call(i, 3) << 24) >>> 0,
1012
+ (r.call(i, 4) | r.call(i, 5) << 8 | r.call(i, 6) << 16 | r.call(i, 7) << 24) >>> 0
1012
1013
  );
1013
1014
  }, o.prototype.toHash = function() {
1014
1015
  return String.fromCharCode(
@@ -1043,68 +1044,68 @@ function requireMinimal$1() {
1043
1044
  /* istanbul ignore next */
1044
1045
  {}
1045
1046
  ), o.isInteger = Number.isInteger || /* istanbul ignore next */
1046
- function(r) {
1047
- return typeof r == "number" && isFinite(r) && Math.floor(r) === r;
1048
- }, o.isString = function(r) {
1049
- return typeof r == "string" || r instanceof String;
1050
- }, o.isObject = function(r) {
1051
- return r && typeof r == "object";
1047
+ function(n) {
1048
+ return typeof n == "number" && isFinite(n) && Math.floor(n) === n;
1049
+ }, o.isString = function(n) {
1050
+ return typeof n == "string" || n instanceof String;
1051
+ }, o.isObject = function(n) {
1052
+ return n && typeof n == "object";
1052
1053
  }, o.isset = /**
1053
1054
  * Checks if a property on a message is considered to be present.
1054
1055
  * @param {Object} obj Plain object or message instance
1055
1056
  * @param {string} prop Property name
1056
1057
  * @returns {boolean} `true` if considered to be present, otherwise `false`
1057
1058
  */
1058
- o.isSet = function(r, i) {
1059
- var t = r[i];
1060
- return t != null && r.hasOwnProperty(i) ? typeof t != "object" || (Array.isArray(t) ? t.length : Object.keys(t).length) > 0 : !1;
1059
+ o.isSet = function(n, i) {
1060
+ var t = n[i];
1061
+ return t != null && n.hasOwnProperty(i) ? typeof t != "object" || (Array.isArray(t) ? t.length : Object.keys(t).length) > 0 : !1;
1061
1062
  }, o.Buffer = function() {
1062
1063
  try {
1063
- var n = o.inquire("buffer").Buffer;
1064
- return n.prototype.utf8Write ? n : (
1064
+ var r = o.inquire("buffer").Buffer;
1065
+ return r.prototype.utf8Write ? r : (
1065
1066
  /* istanbul ignore next */
1066
1067
  null
1067
1068
  );
1068
1069
  } catch {
1069
1070
  return null;
1070
1071
  }
1071
- }(), o._Buffer_from = null, o._Buffer_allocUnsafe = null, o.newBuffer = function(r) {
1072
- 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);
1072
+ }(), o._Buffer_from = null, o._Buffer_allocUnsafe = null, o.newBuffer = function(n) {
1073
+ 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);
1073
1074
  }, o.Array = typeof Uint8Array < "u" ? Uint8Array : Array, o.Long = /* istanbul ignore next */
1074
1075
  o.global.dcodeIO && /* istanbul ignore next */
1075
1076
  o.global.dcodeIO.Long || /* istanbul ignore next */
1076
- 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) {
1077
- return r ? o.LongBits.from(r).toHash() : o.LongBits.zeroHash;
1078
- }, o.longFromHash = function(r, i) {
1079
- var t = o.LongBits.fromHash(r);
1077
+ 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) {
1078
+ return n ? o.LongBits.from(n).toHash() : o.LongBits.zeroHash;
1079
+ }, o.longFromHash = function(n, i) {
1080
+ var t = o.LongBits.fromHash(n);
1080
1081
  return o.Long ? o.Long.fromBits(t.lo, t.hi, i) : t.toNumber(!!i);
1081
1082
  };
1082
- function a(n, r, i) {
1083
- for (var t = Object.keys(r), e = 0; e < t.length; ++e)
1084
- (n[t[e]] === void 0 || !i) && (n[t[e]] = r[t[e]]);
1085
- return n;
1083
+ function a(r, n, i) {
1084
+ for (var t = Object.keys(n), e = 0; e < t.length; ++e)
1085
+ (r[t[e]] === void 0 || !i) && (r[t[e]] = n[t[e]]);
1086
+ return r;
1086
1087
  }
1087
- o.merge = a, o.lcFirst = function(r) {
1088
- return r.charAt(0).toLowerCase() + r.substring(1);
1088
+ o.merge = a, o.lcFirst = function(n) {
1089
+ return n.charAt(0).toLowerCase() + n.substring(1);
1089
1090
  };
1090
- function u(n) {
1091
- function r(i, t) {
1092
- if (!(this instanceof r))
1093
- return new r(i, t);
1091
+ function u(r) {
1092
+ function n(i, t) {
1093
+ if (!(this instanceof n))
1094
+ return new n(i, t);
1094
1095
  Object.defineProperty(this, "message", { get: function() {
1095
1096
  return i;
1096
- } }), Error.captureStackTrace ? Error.captureStackTrace(this, r) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), t && a(this, t);
1097
+ } }), Error.captureStackTrace ? Error.captureStackTrace(this, n) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), t && a(this, t);
1097
1098
  }
1098
- return r.prototype = Object.create(Error.prototype, {
1099
+ return n.prototype = Object.create(Error.prototype, {
1099
1100
  constructor: {
1100
- value: r,
1101
+ value: n,
1101
1102
  writable: !0,
1102
1103
  enumerable: !1,
1103
1104
  configurable: !0
1104
1105
  },
1105
1106
  name: {
1106
1107
  get: function() {
1107
- return n;
1108
+ return r;
1108
1109
  },
1109
1110
  set: void 0,
1110
1111
  enumerable: !1,
@@ -1122,20 +1123,20 @@ function requireMinimal$1() {
1122
1123
  enumerable: !1,
1123
1124
  configurable: !0
1124
1125
  }
1125
- }), r;
1126
+ }), n;
1126
1127
  }
1127
- o.newError = u, o.ProtocolError = u("ProtocolError"), o.oneOfGetter = function(r) {
1128
- for (var i = {}, t = 0; t < r.length; ++t)
1129
- i[r[t]] = 1;
1128
+ o.newError = u, o.ProtocolError = u("ProtocolError"), o.oneOfGetter = function(n) {
1129
+ for (var i = {}, t = 0; t < n.length; ++t)
1130
+ i[n[t]] = 1;
1130
1131
  return function() {
1131
1132
  for (var e = Object.keys(this), s = e.length - 1; s > -1; --s)
1132
1133
  if (i[e[s]] === 1 && this[e[s]] !== void 0 && this[e[s]] !== null)
1133
1134
  return e[s];
1134
1135
  };
1135
- }, o.oneOfSetter = function(r) {
1136
+ }, o.oneOfSetter = function(n) {
1136
1137
  return function(i) {
1137
- for (var t = 0; t < r.length; ++t)
1138
- r[t] !== i && delete this[r[t]];
1138
+ for (var t = 0; t < n.length; ++t)
1139
+ n[t] !== i && delete this[n[t]];
1139
1140
  };
1140
1141
  }, o.toJSONOptions = {
1141
1142
  longs: String,
@@ -1143,17 +1144,17 @@ function requireMinimal$1() {
1143
1144
  bytes: String,
1144
1145
  json: !0
1145
1146
  }, o._configure = function() {
1146
- var n = o.Buffer;
1147
- if (!n) {
1147
+ var r = o.Buffer;
1148
+ if (!r) {
1148
1149
  o._Buffer_from = o._Buffer_allocUnsafe = null;
1149
1150
  return;
1150
1151
  }
1151
- o._Buffer_from = n.from !== Uint8Array.from && n.from || /* istanbul ignore next */
1152
+ o._Buffer_from = r.from !== Uint8Array.from && r.from || /* istanbul ignore next */
1152
1153
  function(i, t) {
1153
- return new n(i, t);
1154
- }, o._Buffer_allocUnsafe = n.allocUnsafe || /* istanbul ignore next */
1154
+ return new r(i, t);
1155
+ }, o._Buffer_allocUnsafe = r.allocUnsafe || /* istanbul ignore next */
1155
1156
  function(i) {
1156
- return new n(i);
1157
+ return new r(i);
1157
1158
  };
1158
1159
  };
1159
1160
  }(minimal$1)), minimal$1;
@@ -1162,8 +1163,8 @@ var writer, hasRequiredWriter;
1162
1163
  function requireWriter() {
1163
1164
  if (hasRequiredWriter) return writer;
1164
1165
  hasRequiredWriter = 1, writer = e;
1165
- var h = requireMinimal$1(), o, a = h.LongBits, u = h.base64, n = h.utf8;
1166
- function r(b, g, k) {
1166
+ var h = requireMinimal$1(), o, a = h.LongBits, u = h.base64, r = h.utf8;
1167
+ function n(b, g, k) {
1167
1168
  this.fn = b, this.len = g, this.next = void 0, this.val = k;
1168
1169
  }
1169
1170
  function i() {
@@ -1172,7 +1173,7 @@ function requireWriter() {
1172
1173
  this.head = b.head, this.tail = b.tail, this.len = b.len, this.next = b.states;
1173
1174
  }
1174
1175
  function e() {
1175
- this.len = 0, this.head = new r(i, 0, 0), this.tail = this.head, this.states = null;
1176
+ this.len = 0, this.head = new n(i, 0, 0), this.tail = this.head, this.states = null;
1176
1177
  }
1177
1178
  var s = function() {
1178
1179
  return h.Buffer ? function() {
@@ -1186,7 +1187,7 @@ function requireWriter() {
1186
1187
  e.create = s(), e.alloc = function(g) {
1187
1188
  return new h.Array(g);
1188
1189
  }, h.Array !== Array && (e.alloc = h.pool(e.alloc, h.Array.prototype.subarray)), e.prototype._push = function(g, k, _) {
1189
- return this.tail = this.tail.next = new r(g, k, _), this.len += k, this;
1190
+ return this.tail = this.tail.next = new n(g, k, _), this.len += k, this;
1190
1191
  };
1191
1192
  function l(b, g, k) {
1192
1193
  g[k] = b & 255;
@@ -1199,7 +1200,7 @@ function requireWriter() {
1199
1200
  function d(b, g) {
1200
1201
  this.len = b, this.next = void 0, this.val = g;
1201
1202
  }
1202
- d.prototype = Object.create(r.prototype), d.prototype.fn = c, e.prototype.uint32 = function(g) {
1203
+ d.prototype = Object.create(n.prototype), d.prototype.fn = c, e.prototype.uint32 = function(g) {
1203
1204
  return this.len += (this.tail = this.tail.next = new d(
1204
1205
  (g = g >>> 0) < 128 ? 1 : g < 16384 ? 2 : g < 2097152 ? 3 : g < 268435456 ? 4 : 5,
1205
1206
  g
@@ -1254,12 +1255,12 @@ function requireWriter() {
1254
1255
  }
1255
1256
  return this.uint32(k)._push(w, k, g);
1256
1257
  }, e.prototype.string = function(g) {
1257
- var k = n.length(g);
1258
- return k ? this.uint32(k)._push(n.write, k, g) : this._push(l, 1, 0);
1258
+ var k = r.length(g);
1259
+ return k ? this.uint32(k)._push(r.write, k, g) : this._push(l, 1, 0);
1259
1260
  }, e.prototype.fork = function() {
1260
- return this.states = new t(this), this.head = this.tail = new r(i, 0, 0), this.len = 0, this;
1261
+ return this.states = new t(this), this.head = this.tail = new n(i, 0, 0), this.len = 0, this;
1261
1262
  }, e.prototype.reset = function() {
1262
- 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;
1263
+ 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;
1263
1264
  }, e.prototype.ldelim = function() {
1264
1265
  var g = this.head, k = this.tail, _ = this.len;
1265
1266
  return this.reset().uint32(_), _ && (this.tail.next = g.next, this.tail = k, this.len += _), this;
@@ -1282,65 +1283,65 @@ function requireWriter_buffer() {
1282
1283
  h.call(this);
1283
1284
  }
1284
1285
  a._configure = function() {
1285
- a.alloc = o._Buffer_allocUnsafe, a.writeBytesBuffer = o.Buffer && o.Buffer.prototype instanceof Uint8Array && o.Buffer.prototype.set.name === "set" ? function(r, i, t) {
1286
- i.set(r, t);
1287
- } : function(r, i, t) {
1288
- if (r.copy)
1289
- r.copy(i, t, 0, r.length);
1290
- else for (var e = 0; e < r.length; )
1291
- i[t++] = r[e++];
1286
+ a.alloc = o._Buffer_allocUnsafe, a.writeBytesBuffer = o.Buffer && o.Buffer.prototype instanceof Uint8Array && o.Buffer.prototype.set.name === "set" ? function(n, i, t) {
1287
+ i.set(n, t);
1288
+ } : function(n, i, t) {
1289
+ if (n.copy)
1290
+ n.copy(i, t, 0, n.length);
1291
+ else for (var e = 0; e < n.length; )
1292
+ i[t++] = n[e++];
1292
1293
  };
1293
- }, a.prototype.bytes = function(r) {
1294
- o.isString(r) && (r = o._Buffer_from(r, "base64"));
1295
- var i = r.length >>> 0;
1296
- return this.uint32(i), i && this._push(a.writeBytesBuffer, i, r), this;
1294
+ }, a.prototype.bytes = function(n) {
1295
+ o.isString(n) && (n = o._Buffer_from(n, "base64"));
1296
+ var i = n.length >>> 0;
1297
+ return this.uint32(i), i && this._push(a.writeBytesBuffer, i, n), this;
1297
1298
  };
1298
- function u(n, r, i) {
1299
- n.length < 40 ? o.utf8.write(n, r, i) : r.utf8Write ? r.utf8Write(n, i) : r.write(n, i);
1299
+ function u(r, n, i) {
1300
+ r.length < 40 ? o.utf8.write(r, n, i) : n.utf8Write ? n.utf8Write(r, i) : n.write(r, i);
1300
1301
  }
1301
- return a.prototype.string = function(r) {
1302
- var i = o.Buffer.byteLength(r);
1303
- return this.uint32(i), i && this._push(u, i, r), this;
1302
+ return a.prototype.string = function(n) {
1303
+ var i = o.Buffer.byteLength(n);
1304
+ return this.uint32(i), i && this._push(u, i, n), this;
1304
1305
  }, a._configure(), writer_buffer;
1305
1306
  }
1306
1307
  var reader, hasRequiredReader;
1307
1308
  function requireReader() {
1308
1309
  if (hasRequiredReader) return reader;
1309
- hasRequiredReader = 1, reader = r;
1310
+ hasRequiredReader = 1, reader = n;
1310
1311
  var h = requireMinimal$1(), o, a = h.LongBits, u = h.utf8;
1311
- function n(c, d) {
1312
+ function r(c, d) {
1312
1313
  return RangeError("index out of range: " + c.pos + " + " + (d || 1) + " > " + c.len);
1313
1314
  }
1314
- function r(c) {
1315
+ function n(c) {
1315
1316
  this.buf = c, this.pos = 0, this.len = c.length;
1316
1317
  }
1317
1318
  var i = typeof Uint8Array < "u" ? function(d) {
1318
1319
  if (d instanceof Uint8Array || Array.isArray(d))
1319
- return new r(d);
1320
+ return new n(d);
1320
1321
  throw Error("illegal buffer");
1321
1322
  } : function(d) {
1322
1323
  if (Array.isArray(d))
1323
- return new r(d);
1324
+ return new n(d);
1324
1325
  throw Error("illegal buffer");
1325
1326
  }, t = function() {
1326
1327
  return h.Buffer ? function(p) {
1327
- return (r.create = function(w) {
1328
+ return (n.create = function(w) {
1328
1329
  return h.Buffer.isBuffer(w) ? new o(w) : i(w);
1329
1330
  })(p);
1330
1331
  } : i;
1331
1332
  };
1332
- r.create = t(), r.prototype._slice = h.Array.prototype.subarray || /* istanbul ignore next */
1333
- h.Array.prototype.slice, r.prototype.uint32 = /* @__PURE__ */ function() {
1333
+ n.create = t(), n.prototype._slice = h.Array.prototype.subarray || /* istanbul ignore next */
1334
+ h.Array.prototype.slice, n.prototype.uint32 = /* @__PURE__ */ function() {
1334
1335
  var d = 4294967295;
1335
1336
  return function() {
1336
1337
  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;
1337
1338
  if ((this.pos += 5) > this.len)
1338
- throw this.pos = this.len, n(this, 10);
1339
+ throw this.pos = this.len, r(this, 10);
1339
1340
  return d;
1340
1341
  };
1341
- }(), r.prototype.int32 = function() {
1342
+ }(), n.prototype.int32 = function() {
1342
1343
  return this.uint32() | 0;
1343
- }, r.prototype.sint32 = function() {
1344
+ }, n.prototype.sint32 = function() {
1344
1345
  var d = this.uint32();
1345
1346
  return d >>> 1 ^ -(d & 1) | 0;
1346
1347
  };
@@ -1356,7 +1357,7 @@ function requireReader() {
1356
1357
  } else {
1357
1358
  for (; d < 3; ++d) {
1358
1359
  if (this.pos >= this.len)
1359
- throw n(this);
1360
+ throw r(this);
1360
1361
  if (c.lo = (c.lo | (this.buf[this.pos] & 127) << d * 7) >>> 0, this.buf[this.pos++] < 128)
1361
1362
  return c;
1362
1363
  }
@@ -1369,46 +1370,46 @@ function requireReader() {
1369
1370
  } else
1370
1371
  for (; d < 5; ++d) {
1371
1372
  if (this.pos >= this.len)
1372
- throw n(this);
1373
+ throw r(this);
1373
1374
  if (c.hi = (c.hi | (this.buf[this.pos] & 127) << d * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
1374
1375
  return c;
1375
1376
  }
1376
1377
  throw Error("invalid varint encoding");
1377
1378
  }
1378
- r.prototype.bool = function() {
1379
+ n.prototype.bool = function() {
1379
1380
  return this.uint32() !== 0;
1380
1381
  };
1381
1382
  function s(c, d) {
1382
1383
  return (c[d - 4] | c[d - 3] << 8 | c[d - 2] << 16 | c[d - 1] << 24) >>> 0;
1383
1384
  }
1384
- r.prototype.fixed32 = function() {
1385
+ n.prototype.fixed32 = function() {
1385
1386
  if (this.pos + 4 > this.len)
1386
- throw n(this, 4);
1387
+ throw r(this, 4);
1387
1388
  return s(this.buf, this.pos += 4);
1388
- }, r.prototype.sfixed32 = function() {
1389
+ }, n.prototype.sfixed32 = function() {
1389
1390
  if (this.pos + 4 > this.len)
1390
- throw n(this, 4);
1391
+ throw r(this, 4);
1391
1392
  return s(this.buf, this.pos += 4) | 0;
1392
1393
  };
1393
1394
  function l() {
1394
1395
  if (this.pos + 8 > this.len)
1395
- throw n(this, 8);
1396
+ throw r(this, 8);
1396
1397
  return new a(s(this.buf, this.pos += 4), s(this.buf, this.pos += 4));
1397
1398
  }
1398
- return r.prototype.float = function() {
1399
+ return n.prototype.float = function() {
1399
1400
  if (this.pos + 4 > this.len)
1400
- throw n(this, 4);
1401
+ throw r(this, 4);
1401
1402
  var d = h.float.readFloatLE(this.buf, this.pos);
1402
1403
  return this.pos += 4, d;
1403
- }, r.prototype.double = function() {
1404
+ }, n.prototype.double = function() {
1404
1405
  if (this.pos + 8 > this.len)
1405
- throw n(this, 4);
1406
+ throw r(this, 4);
1406
1407
  var d = h.float.readDoubleLE(this.buf, this.pos);
1407
1408
  return this.pos += 8, d;
1408
- }, r.prototype.bytes = function() {
1409
+ }, n.prototype.bytes = function() {
1409
1410
  var d = this.uint32(), p = this.pos, f = this.pos + d;
1410
1411
  if (f > this.len)
1411
- throw n(this, d);
1412
+ throw r(this, d);
1412
1413
  if (this.pos += d, Array.isArray(this.buf))
1413
1414
  return this.buf.slice(p, f);
1414
1415
  if (p === f) {
@@ -1416,21 +1417,21 @@ function requireReader() {
1416
1417
  return w ? w.alloc(0) : new this.buf.constructor(0);
1417
1418
  }
1418
1419
  return this._slice.call(this.buf, p, f);
1419
- }, r.prototype.string = function() {
1420
+ }, n.prototype.string = function() {
1420
1421
  var d = this.bytes();
1421
1422
  return u.read(d, 0, d.length);
1422
- }, r.prototype.skip = function(d) {
1423
+ }, n.prototype.skip = function(d) {
1423
1424
  if (typeof d == "number") {
1424
1425
  if (this.pos + d > this.len)
1425
- throw n(this, d);
1426
+ throw r(this, d);
1426
1427
  this.pos += d;
1427
1428
  } else
1428
1429
  do
1429
1430
  if (this.pos >= this.len)
1430
- throw n(this);
1431
+ throw r(this);
1431
1432
  while (this.buf[this.pos++] & 128);
1432
1433
  return this;
1433
- }, r.prototype.skipType = function(c) {
1434
+ }, n.prototype.skipType = function(c) {
1434
1435
  switch (c) {
1435
1436
  case 0:
1436
1437
  this.skip();
@@ -1453,13 +1454,13 @@ function requireReader() {
1453
1454
  throw Error("invalid wire type " + c + " at offset " + this.pos);
1454
1455
  }
1455
1456
  return this;
1456
- }, r._configure = function(c) {
1457
- o = c, r.create = t(), o._configure();
1457
+ }, n._configure = function(c) {
1458
+ o = c, n.create = t(), o._configure();
1458
1459
  var d = h.Long ? "toLong" : (
1459
1460
  /* istanbul ignore next */
1460
1461
  "toNumber"
1461
1462
  );
1462
- h.merge(r.prototype, {
1463
+ h.merge(n.prototype, {
1463
1464
  int64: function() {
1464
1465
  return e.call(this)[d](!1);
1465
1466
  },
@@ -1491,8 +1492,8 @@ function requireReader_buffer() {
1491
1492
  return a._configure = function() {
1492
1493
  o.Buffer && (a.prototype._slice = o.Buffer.prototype.slice);
1493
1494
  }, a.prototype.string = function() {
1494
- var n = this.uint32();
1495
- 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));
1495
+ var r = this.uint32();
1496
+ 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));
1496
1497
  }, a._configure(), reader_buffer;
1497
1498
  }
1498
1499
  var rpc = {}, service, hasRequiredService;
@@ -1501,17 +1502,17 @@ function requireService() {
1501
1502
  hasRequiredService = 1, service = o;
1502
1503
  var h = requireMinimal$1();
1503
1504
  (o.prototype = Object.create(h.EventEmitter.prototype)).constructor = o;
1504
- function o(a, u, n) {
1505
+ function o(a, u, r) {
1505
1506
  if (typeof a != "function")
1506
1507
  throw TypeError("rpcImpl must be a function");
1507
- h.EventEmitter.call(this), this.rpcImpl = a, this.requestDelimited = !!u, this.responseDelimited = !!n;
1508
+ h.EventEmitter.call(this), this.rpcImpl = a, this.requestDelimited = !!u, this.responseDelimited = !!r;
1508
1509
  }
1509
- return o.prototype.rpcCall = function a(u, n, r, i, t) {
1510
+ return o.prototype.rpcCall = function a(u, r, n, i, t) {
1510
1511
  if (!i)
1511
1512
  throw TypeError("request must be specified");
1512
1513
  var e = this;
1513
1514
  if (!t)
1514
- return h.asPromise(a, e, u, n, r, i);
1515
+ return h.asPromise(a, e, u, r, n, i);
1515
1516
  if (!e.rpcImpl) {
1516
1517
  setTimeout(function() {
1517
1518
  t(Error("already ended"));
@@ -1521,7 +1522,7 @@ function requireService() {
1521
1522
  try {
1522
1523
  return e.rpcImpl(
1523
1524
  u,
1524
- n[e.requestDelimited ? "encodeDelimited" : "encode"](i).finish(),
1525
+ r[e.requestDelimited ? "encodeDelimited" : "encode"](i).finish(),
1525
1526
  function(l, c) {
1526
1527
  if (l)
1527
1528
  return e.emit("error", l, u), t(l);
@@ -1532,9 +1533,9 @@ function requireService() {
1532
1533
  );
1533
1534
  return;
1534
1535
  }
1535
- if (!(c instanceof r))
1536
+ if (!(c instanceof n))
1536
1537
  try {
1537
- c = r[e.responseDelimited ? "decodeDelimited" : "decode"](c);
1538
+ c = n[e.responseDelimited ? "decodeDelimited" : "decode"](c);
1538
1539
  } catch (d) {
1539
1540
  return e.emit("error", d, u), t(d);
1540
1541
  }
@@ -1587,12 +1588,12 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1587
1588
  return a.proto = function() {
1588
1589
  const u = {};
1589
1590
  return u.SeiData = function() {
1590
- function n(r) {
1591
- if (r) for (let i = Object.keys(r), t = 0; t < i.length; ++t) r[i[t]] != null && (this[i[t]] = r[i[t]]);
1591
+ function r(n) {
1592
+ if (n) for (let i = Object.keys(n), t = 0; t < i.length; ++t) n[i[t]] != null && (this[i[t]] = n[i[t]]);
1592
1593
  }
1593
- return n.prototype.event = 0, n.prototype.data = $util.newBuffer([]), n.prototype.compress = !1, n.prototype.version = 0, n.create = function(i) {
1594
- return new n(i);
1595
- }, n.encode = function(i, t) {
1594
+ return r.prototype.event = 0, r.prototype.data = $util.newBuffer([]), r.prototype.compress = !1, r.prototype.version = 0, r.create = function(i) {
1595
+ return new r(i);
1596
+ }, r.encode = function(i, t) {
1596
1597
  return t || (t = $Writer.create()), i.event != null && Object.hasOwnProperty.call(i, "event") && t.uint32(
1597
1598
  /* id 1, wireType 0 =*/
1598
1599
  8
@@ -1606,9 +1607,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1606
1607
  /* id 4, wireType 0 =*/
1607
1608
  32
1608
1609
  ).int32(i.version), t;
1609
- }, n.encodeDelimited = function(i, t) {
1610
+ }, r.encodeDelimited = function(i, t) {
1610
1611
  return this.encode(i, t).ldelim();
1611
- }, n.decode = function(i, t, e) {
1612
+ }, r.decode = function(i, t, e) {
1612
1613
  i instanceof $Reader || (i = $Reader.create(i));
1613
1614
  let s = t === void 0 ? i.len : i.pos + t, l = new $root.com.quick.voice.proto.SeiData();
1614
1615
  for (; i.pos < s; ) {
@@ -1637,9 +1638,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1637
1638
  }
1638
1639
  }
1639
1640
  return l;
1640
- }, n.decodeDelimited = function(i) {
1641
+ }, r.decodeDelimited = function(i) {
1641
1642
  return i instanceof $Reader || (i = new $Reader(i)), this.decode(i, i.uint32());
1642
- }, n.verify = function(i) {
1643
+ }, r.verify = function(i) {
1643
1644
  if (typeof i != "object" || i === null) return "object expected";
1644
1645
  if (i.event != null && i.hasOwnProperty("event"))
1645
1646
  switch (i.event) {
@@ -1650,7 +1651,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1650
1651
  break;
1651
1652
  }
1652
1653
  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;
1653
- }, n.fromObject = function(i) {
1654
+ }, r.fromObject = function(i) {
1654
1655
  if (i instanceof $root.com.quick.voice.proto.SeiData) return i;
1655
1656
  let t = new $root.com.quick.voice.proto.SeiData();
1656
1657
  switch (i.event) {
@@ -1670,30 +1671,30 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1670
1671
  break;
1671
1672
  }
1672
1673
  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;
1673
- }, n.toObject = function(i, t) {
1674
+ }, r.toObject = function(i, t) {
1674
1675
  t || (t = {});
1675
1676
  let e = {};
1676
1677
  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;
1677
- }, n.prototype.toJSON = function() {
1678
+ }, r.prototype.toJSON = function() {
1678
1679
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
1679
- }, n.getTypeUrl = function(i) {
1680
+ }, r.getTypeUrl = function(i) {
1680
1681
  return i === void 0 && (i = "type.googleapis.com"), i + "/com.quick.voice.proto.SeiData";
1681
- }, n;
1682
+ }, r;
1682
1683
  }(), u.EventType = function() {
1683
- const n = {}, r = Object.create(n);
1684
- return r[n[0] = "Layout"] = 0, r[n[1] = "Custom"] = 1, r;
1684
+ const r = {}, n = Object.create(r);
1685
+ return n[r[0] = "Layout"] = 0, n[r[1] = "Custom"] = 1, n;
1685
1686
  }(), u.LayoutData = function() {
1686
- function n(i) {
1687
+ function r(i) {
1687
1688
  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]]);
1688
1689
  }
1689
- n.prototype.roomId = "", n.prototype.type = 0, n.prototype.userMap = $util.emptyObject, n.prototype.globalCustom = null;
1690
- let r;
1691
- return Object.defineProperty(n.prototype, "_globalCustom", {
1692
- get: $util.oneOfGetter(r = ["globalCustom"]),
1693
- set: $util.oneOfSetter(r)
1694
- }), n.create = function(t) {
1695
- return new n(t);
1696
- }, n.encode = function(t, e) {
1690
+ r.prototype.roomId = "", r.prototype.type = 0, r.prototype.userMap = $util.emptyObject, r.prototype.globalCustom = null;
1691
+ let n;
1692
+ return Object.defineProperty(r.prototype, "_globalCustom", {
1693
+ get: $util.oneOfGetter(n = ["globalCustom"]),
1694
+ set: $util.oneOfSetter(n)
1695
+ }), r.create = function(t) {
1696
+ return new r(t);
1697
+ }, r.encode = function(t, e) {
1697
1698
  if (e || (e = $Writer.create()), t.roomId != null && Object.hasOwnProperty.call(t, "roomId") && e.uint32(
1698
1699
  /* id 1, wireType 2 =*/
1699
1700
  10
@@ -1716,9 +1717,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1716
1717
  /* id 4, wireType 2 =*/
1717
1718
  34
1718
1719
  ).fork()).ldelim(), e;
1719
- }, n.encodeDelimited = function(t, e) {
1720
+ }, r.encodeDelimited = function(t, e) {
1720
1721
  return this.encode(t, e).ldelim();
1721
- }, n.decode = function(t, e, s) {
1722
+ }, r.decode = function(t, e, s) {
1722
1723
  t instanceof $Reader || (t = $Reader.create(t));
1723
1724
  let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.LayoutData(), d, p;
1724
1725
  for (; t.pos < l; ) {
@@ -1763,9 +1764,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1763
1764
  }
1764
1765
  }
1765
1766
  return c;
1766
- }, n.decodeDelimited = function(t) {
1767
+ }, r.decodeDelimited = function(t) {
1767
1768
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
1768
- }, n.verify = function(t) {
1769
+ }, r.verify = function(t) {
1769
1770
  if (typeof t != "object" || t === null) return "object expected";
1770
1771
  if (t.roomId != null && t.hasOwnProperty("roomId") && !$util.isString(t.roomId)) return "roomId: string expected";
1771
1772
  if (t.type != null && t.hasOwnProperty("type"))
@@ -1790,7 +1791,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1790
1791
  if (e) return "globalCustom." + e;
1791
1792
  }
1792
1793
  return null;
1793
- }, n.fromObject = function(t) {
1794
+ }, r.fromObject = function(t) {
1794
1795
  if (t instanceof $root.com.quick.voice.proto.LayoutData) return t;
1795
1796
  let e = new $root.com.quick.voice.proto.LayoutData();
1796
1797
  switch (t.roomId != null && (e.roomId = String(t.roomId)), t.type) {
@@ -1826,7 +1827,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1826
1827
  e.globalCustom = $root.com.quick.voice.proto.CustomInfo.fromObject(t.globalCustom);
1827
1828
  }
1828
1829
  return e;
1829
- }, n.toObject = function(t, e) {
1830
+ }, r.toObject = function(t, e) {
1830
1831
  e || (e = {});
1831
1832
  let s = {};
1832
1833
  (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);
@@ -1836,23 +1837,23 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1836
1837
  for (let c = 0; c < l.length; ++c) s.userMap[l[c]] = $root.com.quick.voice.proto.UserInfo.toObject(t.userMap[l[c]], e);
1837
1838
  }
1838
1839
  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;
1839
- }, n.prototype.toJSON = function() {
1840
+ }, r.prototype.toJSON = function() {
1840
1841
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
1841
- }, n.getTypeUrl = function(t) {
1842
+ }, r.getTypeUrl = function(t) {
1842
1843
  return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.LayoutData";
1843
- }, n;
1844
+ }, r;
1844
1845
  }(), u.UserInfo = function() {
1845
- function n(i) {
1846
+ function r(i) {
1846
1847
  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]]);
1847
1848
  }
1848
- n.prototype.id = "", n.prototype.audios = $util.emptyArray, n.prototype.videos = $util.emptyArray, n.prototype.custom = null;
1849
- let r;
1850
- return Object.defineProperty(n.prototype, "_custom", {
1851
- get: $util.oneOfGetter(r = ["custom"]),
1852
- set: $util.oneOfSetter(r)
1853
- }), n.create = function(t) {
1854
- return new n(t);
1855
- }, n.encode = function(t, e) {
1849
+ r.prototype.id = "", r.prototype.audios = $util.emptyArray, r.prototype.videos = $util.emptyArray, r.prototype.custom = null;
1850
+ let n;
1851
+ return Object.defineProperty(r.prototype, "_custom", {
1852
+ get: $util.oneOfGetter(n = ["custom"]),
1853
+ set: $util.oneOfSetter(n)
1854
+ }), r.create = function(t) {
1855
+ return new r(t);
1856
+ }, r.encode = function(t, e) {
1856
1857
  if (e || (e = $Writer.create()), t.id != null && Object.hasOwnProperty.call(t, "id") && e.uint32(
1857
1858
  /* id 1, wireType 2 =*/
1858
1859
  10
@@ -1868,9 +1869,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1868
1869
  /* id 4, wireType 2 =*/
1869
1870
  34
1870
1871
  ).fork()).ldelim(), e;
1871
- }, n.encodeDelimited = function(t, e) {
1872
+ }, r.encodeDelimited = function(t, e) {
1872
1873
  return this.encode(t, e).ldelim();
1873
- }, n.decode = function(t, e, s) {
1874
+ }, r.decode = function(t, e, s) {
1874
1875
  t instanceof $Reader || (t = $Reader.create(t));
1875
1876
  let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.UserInfo();
1876
1877
  for (; t.pos < l; ) {
@@ -1899,9 +1900,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1899
1900
  }
1900
1901
  }
1901
1902
  return c;
1902
- }, n.decodeDelimited = function(t) {
1903
+ }, r.decodeDelimited = function(t) {
1903
1904
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
1904
- }, n.verify = function(t) {
1905
+ }, r.verify = function(t) {
1905
1906
  if (typeof t != "object" || t === null) return "object expected";
1906
1907
  if (t.id != null && t.hasOwnProperty("id") && !$util.isString(t.id)) return "id: string expected";
1907
1908
  if (t.audios != null && t.hasOwnProperty("audios")) {
@@ -1923,7 +1924,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1923
1924
  if (e) return "custom." + e;
1924
1925
  }
1925
1926
  return null;
1926
- }, n.fromObject = function(t) {
1927
+ }, r.fromObject = function(t) {
1927
1928
  if (t instanceof $root.com.quick.voice.proto.UserInfo) return t;
1928
1929
  let e = new $root.com.quick.voice.proto.UserInfo();
1929
1930
  if (t.id != null && (e.id = String(t.id)), t.audios) {
@@ -1947,7 +1948,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1947
1948
  e.custom = $root.com.quick.voice.proto.CustomInfo.fromObject(t.custom);
1948
1949
  }
1949
1950
  return e;
1950
- }, n.toObject = function(t, e) {
1951
+ }, r.toObject = function(t, e) {
1951
1952
  e || (e = {});
1952
1953
  let s = {};
1953
1954
  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) {
@@ -1959,23 +1960,23 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1959
1960
  for (let l = 0; l < t.videos.length; ++l) s.videos[l] = $root.com.quick.voice.proto.VideoInfo.toObject(t.videos[l], e);
1960
1961
  }
1961
1962
  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;
1962
- }, n.prototype.toJSON = function() {
1963
+ }, r.prototype.toJSON = function() {
1963
1964
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
1964
- }, n.getTypeUrl = function(t) {
1965
+ }, r.getTypeUrl = function(t) {
1965
1966
  return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.UserInfo";
1966
- }, n;
1967
+ }, r;
1967
1968
  }(), u.AudioInfo = function() {
1968
- function n(i) {
1969
+ function r(i) {
1969
1970
  if (i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
1970
1971
  }
1971
- n.prototype.type = 0, n.prototype.isEnable = !1, n.prototype.isMute = !1, n.prototype.volume = 0, n.prototype.updateTime = null;
1972
- let r;
1973
- return Object.defineProperty(n.prototype, "_updateTime", {
1974
- get: $util.oneOfGetter(r = ["updateTime"]),
1975
- set: $util.oneOfSetter(r)
1976
- }), n.create = function(t) {
1977
- return new n(t);
1978
- }, n.encode = function(t, e) {
1972
+ r.prototype.type = 0, r.prototype.isEnable = !1, r.prototype.isMute = !1, r.prototype.volume = 0, r.prototype.updateTime = null;
1973
+ let n;
1974
+ return Object.defineProperty(r.prototype, "_updateTime", {
1975
+ get: $util.oneOfGetter(n = ["updateTime"]),
1976
+ set: $util.oneOfSetter(n)
1977
+ }), r.create = function(t) {
1978
+ return new r(t);
1979
+ }, r.encode = function(t, e) {
1979
1980
  return e || (e = $Writer.create()), t.type != null && Object.hasOwnProperty.call(t, "type") && e.uint32(
1980
1981
  /* id 1, wireType 0 =*/
1981
1982
  8
@@ -1992,9 +1993,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1992
1993
  /* id 5, wireType 0 =*/
1993
1994
  40
1994
1995
  ).int64(t.updateTime), e;
1995
- }, n.encodeDelimited = function(t, e) {
1996
+ }, r.encodeDelimited = function(t, e) {
1996
1997
  return this.encode(t, e).ldelim();
1997
- }, n.decode = function(t, e, s) {
1998
+ }, r.decode = function(t, e, s) {
1998
1999
  t instanceof $Reader || (t = $Reader.create(t));
1999
2000
  let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.AudioInfo();
2000
2001
  for (; t.pos < l; ) {
@@ -2027,9 +2028,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2027
2028
  }
2028
2029
  }
2029
2030
  return c;
2030
- }, n.decodeDelimited = function(t) {
2031
+ }, r.decodeDelimited = function(t) {
2031
2032
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
2032
- }, n.verify = function(t) {
2033
+ }, r.verify = function(t) {
2033
2034
  if (typeof t != "object" || t === null) return "object expected";
2034
2035
  if (t.type != null && t.hasOwnProperty("type"))
2035
2036
  switch (t.type) {
@@ -2040,7 +2041,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2040
2041
  break;
2041
2042
  }
2042
2043
  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;
2043
- }, n.fromObject = function(t) {
2044
+ }, r.fromObject = function(t) {
2044
2045
  if (t instanceof $root.com.quick.voice.proto.AudioInfo) return t;
2045
2046
  let e = new $root.com.quick.voice.proto.AudioInfo();
2046
2047
  switch (t.type) {
@@ -2060,27 +2061,27 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2060
2061
  break;
2061
2062
  }
2062
2063
  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;
2063
- }, n.toObject = function(t, e) {
2064
+ }, r.toObject = function(t, e) {
2064
2065
  e || (e = {});
2065
2066
  let s = {};
2066
2067
  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;
2067
- }, n.prototype.toJSON = function() {
2068
+ }, r.prototype.toJSON = function() {
2068
2069
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
2069
- }, n.getTypeUrl = function(t) {
2070
+ }, r.getTypeUrl = function(t) {
2070
2071
  return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.AudioInfo";
2071
- }, n;
2072
+ }, r;
2072
2073
  }(), u.VideoInfo = function() {
2073
- function n(i) {
2074
+ function r(i) {
2074
2075
  if (i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
2075
2076
  }
2076
- 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;
2077
- let r;
2078
- return Object.defineProperty(n.prototype, "_updateTime", {
2079
- get: $util.oneOfGetter(r = ["updateTime"]),
2080
- set: $util.oneOfSetter(r)
2081
- }), n.create = function(t) {
2082
- return new n(t);
2083
- }, n.encode = function(t, e) {
2077
+ 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;
2078
+ let n;
2079
+ return Object.defineProperty(r.prototype, "_updateTime", {
2080
+ get: $util.oneOfGetter(n = ["updateTime"]),
2081
+ set: $util.oneOfSetter(n)
2082
+ }), r.create = function(t) {
2083
+ return new r(t);
2084
+ }, r.encode = function(t, e) {
2084
2085
  return e || (e = $Writer.create()), t.type != null && Object.hasOwnProperty.call(t, "type") && e.uint32(
2085
2086
  /* id 1, wireType 0 =*/
2086
2087
  8
@@ -2106,9 +2107,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2106
2107
  /* id 8, wireType 0 =*/
2107
2108
  64
2108
2109
  ).int64(t.updateTime), e;
2109
- }, n.encodeDelimited = function(t, e) {
2110
+ }, r.encodeDelimited = function(t, e) {
2110
2111
  return this.encode(t, e).ldelim();
2111
- }, n.decode = function(t, e, s) {
2112
+ }, r.decode = function(t, e, s) {
2112
2113
  t instanceof $Reader || (t = $Reader.create(t));
2113
2114
  let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.VideoInfo();
2114
2115
  for (; t.pos < l; ) {
@@ -2153,9 +2154,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2153
2154
  }
2154
2155
  }
2155
2156
  return c;
2156
- }, n.decodeDelimited = function(t) {
2157
+ }, r.decodeDelimited = function(t) {
2157
2158
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
2158
- }, n.verify = function(t) {
2159
+ }, r.verify = function(t) {
2159
2160
  if (typeof t != "object" || t === null) return "object expected";
2160
2161
  if (t.type != null && t.hasOwnProperty("type"))
2161
2162
  switch (t.type) {
@@ -2166,7 +2167,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2166
2167
  break;
2167
2168
  }
2168
2169
  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;
2169
- }, n.fromObject = function(t) {
2170
+ }, r.fromObject = function(t) {
2170
2171
  if (t instanceof $root.com.quick.voice.proto.VideoInfo) return t;
2171
2172
  let e = new $root.com.quick.voice.proto.VideoInfo();
2172
2173
  switch (t.type) {
@@ -2186,27 +2187,27 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2186
2187
  break;
2187
2188
  }
2188
2189
  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;
2189
- }, n.toObject = function(t, e) {
2190
+ }, r.toObject = function(t, e) {
2190
2191
  e || (e = {});
2191
2192
  let s = {};
2192
2193
  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;
2193
- }, n.prototype.toJSON = function() {
2194
+ }, r.prototype.toJSON = function() {
2194
2195
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
2195
- }, n.getTypeUrl = function(t) {
2196
+ }, r.getTypeUrl = function(t) {
2196
2197
  return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.VideoInfo";
2197
- }, n;
2198
+ }, r;
2198
2199
  }(), u.CustomInfo = function() {
2199
- function n(i) {
2200
+ function r(i) {
2200
2201
  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]]);
2201
2202
  }
2202
- n.prototype.roomId = "", n.prototype.customKeyMap = $util.emptyObject, n.prototype.updateTime = null;
2203
- let r;
2204
- return Object.defineProperty(n.prototype, "_updateTime", {
2205
- get: $util.oneOfGetter(r = ["updateTime"]),
2206
- set: $util.oneOfSetter(r)
2207
- }), n.create = function(t) {
2208
- return new n(t);
2209
- }, n.encode = function(t, e) {
2203
+ r.prototype.roomId = "", r.prototype.customKeyMap = $util.emptyObject, r.prototype.updateTime = null;
2204
+ let n;
2205
+ return Object.defineProperty(r.prototype, "_updateTime", {
2206
+ get: $util.oneOfGetter(n = ["updateTime"]),
2207
+ set: $util.oneOfSetter(n)
2208
+ }), r.create = function(t) {
2209
+ return new r(t);
2210
+ }, r.encode = function(t, e) {
2210
2211
  if (e || (e = $Writer.create()), t.roomId != null && Object.hasOwnProperty.call(t, "roomId") && e.uint32(
2211
2212
  /* id 1, wireType 2 =*/
2212
2213
  10
@@ -2224,9 +2225,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2224
2225
  /* id 3, wireType 0 =*/
2225
2226
  24
2226
2227
  ).int64(t.updateTime), e;
2227
- }, n.encodeDelimited = function(t, e) {
2228
+ }, r.encodeDelimited = function(t, e) {
2228
2229
  return this.encode(t, e).ldelim();
2229
- }, n.decode = function(t, e, s) {
2230
+ }, r.decode = function(t, e, s) {
2230
2231
  t instanceof $Reader || (t = $Reader.create(t));
2231
2232
  let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.CustomInfo(), d, p;
2232
2233
  for (; t.pos < l; ) {
@@ -2267,9 +2268,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2267
2268
  }
2268
2269
  }
2269
2270
  return c;
2270
- }, n.decodeDelimited = function(t) {
2271
+ }, r.decodeDelimited = function(t) {
2271
2272
  return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
2272
- }, n.verify = function(t) {
2273
+ }, r.verify = function(t) {
2273
2274
  if (typeof t != "object" || t === null) return "object expected";
2274
2275
  if (t.roomId != null && t.hasOwnProperty("roomId") && !$util.isString(t.roomId)) return "roomId: string expected";
2275
2276
  if (t.customKeyMap != null && t.hasOwnProperty("customKeyMap")) {
@@ -2278,7 +2279,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2278
2279
  for (let s = 0; s < e.length; ++s) if (!$util.isString(t.customKeyMap[e[s]])) return "customKeyMap: string{k:string} expected";
2279
2280
  }
2280
2281
  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;
2281
- }, n.fromObject = function(t) {
2282
+ }, r.fromObject = function(t) {
2282
2283
  if (t instanceof $root.com.quick.voice.proto.CustomInfo) return t;
2283
2284
  let e = new $root.com.quick.voice.proto.CustomInfo();
2284
2285
  if (t.roomId != null && (e.roomId = String(t.roomId)), t.customKeyMap) {
@@ -2287,7 +2288,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2287
2288
  for (let s = Object.keys(t.customKeyMap), l = 0; l < s.length; ++l) e.customKeyMap[s[l]] = String(t.customKeyMap[s[l]]);
2288
2289
  }
2289
2290
  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;
2290
- }, n.toObject = function(t, e) {
2291
+ }, r.toObject = function(t, e) {
2291
2292
  e || (e = {});
2292
2293
  let s = {};
2293
2294
  (e.objects || e.defaults) && (s.customKeyMap = {}), e.defaults && (s.roomId = ""), t.roomId != null && t.hasOwnProperty("roomId") && (s.roomId = t.roomId);
@@ -2297,20 +2298,20 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2297
2298
  for (let c = 0; c < l.length; ++c) s.customKeyMap[l[c]] = t.customKeyMap[l[c]];
2298
2299
  }
2299
2300
  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;
2300
- }, n.prototype.toJSON = function() {
2301
+ }, r.prototype.toJSON = function() {
2301
2302
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
2302
- }, n.getTypeUrl = function(t) {
2303
+ }, r.getTypeUrl = function(t) {
2303
2304
  return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.CustomInfo";
2304
- }, n;
2305
+ }, r;
2305
2306
  }(), u.LayoutType = function() {
2306
- const n = {}, r = Object.create(n);
2307
- return r[n[0] = "AudioAndVideo"] = 0, r[n[1] = "OnlyAudio"] = 1, r[n[2] = "OnlyVideo"] = 2, r;
2307
+ const r = {}, n = Object.create(r);
2308
+ return n[r[0] = "AudioAndVideo"] = 0, n[r[1] = "OnlyAudio"] = 1, n[r[2] = "OnlyVideo"] = 2, n;
2308
2309
  }(), u.AudioType = function() {
2309
- const n = {}, r = Object.create(n);
2310
- return r[n[0] = "Microphone"] = 0, r[n[1] = "SystemVoice"] = 1, r;
2310
+ const r = {}, n = Object.create(r);
2311
+ return n[r[0] = "Microphone"] = 0, n[r[1] = "SystemVoice"] = 1, n;
2311
2312
  }(), u.VideoType = function() {
2312
- const n = {}, r = Object.create(n);
2313
- return r[n[0] = "Camera"] = 0, r[n[1] = "Screen"] = 1, r;
2313
+ const r = {}, n = Object.create(r);
2314
+ return n[r[0] = "Camera"] = 0, n[r[1] = "Screen"] = 1, n;
2314
2315
  }(), u;
2315
2316
  }(), a;
2316
2317
  }(), o;
@@ -2349,9 +2350,9 @@ class RoomUser {
2349
2350
  });
2350
2351
  m(this, "init", (o) => {
2351
2352
  var t, e, s, l;
2352
- const { id: a, audios: u = [], videos: n = [] } = o;
2353
+ const { id: a, audios: u = [], videos: r = [] } = o;
2353
2354
  this.userId = a;
2354
- const r = this.getUpdateTimeKey();
2355
+ const n = this.getUpdateTimeKey();
2355
2356
  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);
2356
2357
  for (const c of u) {
2357
2358
  const { type: d = 0, isEnable: p = !1, isMute: f = !1, updateTime: w, volume: b = 0 } = c;
@@ -2370,7 +2371,7 @@ class RoomUser {
2370
2371
  break;
2371
2372
  }
2372
2373
  }
2373
- for (const c of n) {
2374
+ for (const c of r) {
2374
2375
  const { type: d = 0, isEnable: p, isMute: f, updateTime: w, width: b, height: g, x: k, y: _ } = c;
2375
2376
  switch (d) {
2376
2377
  case 0:
@@ -2389,7 +2390,7 @@ class RoomUser {
2389
2390
  }
2390
2391
  (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);
2391
2392
  const i = this.getUpdateTimeKey();
2392
- r !== i && (this.updateTime = (/* @__PURE__ */ new Date()).getTime());
2393
+ n !== i && (this.updateTime = (/* @__PURE__ */ new Date()).getTime());
2393
2394
  });
2394
2395
  m(this, "destroy", () => {
2395
2396
  var o, a;
@@ -2400,16 +2401,16 @@ class RoomUser {
2400
2401
  const parseSEI = (h) => {
2401
2402
  let o = 0, a = 0;
2402
2403
  for (; ; ) {
2403
- const n = h[o];
2404
- if (a = a + n, o = o + 1, n !== 255) break;
2404
+ const r = h[o];
2405
+ if (a = a + r, o = o + 1, r !== 255) break;
2405
2406
  }
2406
2407
  let u = 0;
2407
2408
  for (; ; ) {
2408
- const n = h[o];
2409
- if (u = u + n, o = o + 1, n !== 255) break;
2409
+ const r = h[o];
2410
+ if (u = u + r, o = o + 1, r !== 255) break;
2410
2411
  }
2411
2412
  if (a === 5) {
2412
- const n = h.slice(o, o + 16), i = Array.from(n, (f) => f.toString(16).padStart(2, "0")).join("");
2413
+ const r = h.slice(o, o + 16), i = Array.from(r, (f) => f.toString(16).padStart(2, "0")).join("");
2413
2414
  o = o + 16;
2414
2415
  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;
2415
2416
  let d;
@@ -2459,30 +2460,30 @@ class QuickVoPlayer {
2459
2460
  return Array.from(o, (u) => u.updateTime).join("_");
2460
2461
  });
2461
2462
  m(this, "checkAndCreateUser", (o, a) => {
2462
- var u, n;
2463
+ var u, r;
2463
2464
  if (this.usersMap.has(o)) {
2464
- const r = this.usersMap.get(o);
2465
- if (r == null || r.init(a), r != null && r.mc_video) {
2466
- const { sx: i, sy: t, sw: e, sh: s } = r.mc_video;
2467
- (u = r == null ? void 0 : r.mc_video.worker) == null || u.setCut({ sx: i, sy: t, sw: e, sh: s });
2465
+ const n = this.usersMap.get(o);
2466
+ if (n == null || n.init(a), n != null && n.mc_video) {
2467
+ const { sx: i, sy: t, sw: e, sh: s } = n.mc_video;
2468
+ (u = n == null ? void 0 : n.mc_video.worker) == null || u.setCut({ sx: i, sy: t, sw: e, sh: s });
2468
2469
  }
2469
- if (r != null && r.ss_video) {
2470
- const { sx: i, sy: t, sw: e, sh: s } = r.ss_video;
2471
- (n = r == null ? void 0 : r.ss_video.worker) == null || n.setCut({ sx: i, sy: t, sw: e, sh: s });
2470
+ if (n != null && n.ss_video) {
2471
+ const { sx: i, sy: t, sw: e, sh: s } = n.ss_video;
2472
+ (r = n == null ? void 0 : n.ss_video.worker) == null || r.setCut({ sx: i, sy: t, sw: e, sh: s });
2472
2473
  }
2473
2474
  } else {
2474
- const r = new RoomUser();
2475
- if (this.usersMap.set(o, r), r.init(a), r) {
2476
- if (r.mc_video) {
2477
- 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 });
2478
- r.mc_video.worker = c, this.displayMode === "original" && c.setPause(!0), r.mc_video.stream = d, r.mc_video.destroy = () => {
2479
- p(), this.prPlayer.cut.remove(l), this.usersMap.delete(r.userId);
2475
+ const n = new RoomUser();
2476
+ if (this.usersMap.set(o, n), n.init(a), n) {
2477
+ if (n.mc_video) {
2478
+ 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 });
2479
+ n.mc_video.worker = c, this.displayMode === "original" && c.setPause(!0), n.mc_video.stream = d, n.mc_video.destroy = () => {
2480
+ p(), this.prPlayer.cut.remove(l), this.usersMap.delete(n.userId);
2480
2481
  };
2481
2482
  }
2482
- if (r.ss_video) {
2483
- 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 });
2484
- r.ss_video.worker = c, this.displayMode === "original" && c.setPause(!0), r.ss_video.stream = d, r.ss_video.destroy = () => {
2485
- p(), this.prPlayer.cut.remove(l), this.usersMap.delete(r.userId);
2483
+ if (n.ss_video) {
2484
+ 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 });
2485
+ n.ss_video.worker = c, this.displayMode === "original" && c.setPause(!0), n.ss_video.stream = d, n.ss_video.destroy = () => {
2486
+ p(), this.prPlayer.cut.remove(l), this.usersMap.delete(n.userId);
2486
2487
  };
2487
2488
  }
2488
2489
  }
@@ -2495,12 +2496,12 @@ class QuickVoPlayer {
2495
2496
  try {
2496
2497
  const a = parseSEI(o);
2497
2498
  if (!a) return;
2498
- const { event: u, data: n } = a;
2499
+ const { event: u, data: r } = a;
2499
2500
  switch (u) {
2500
2501
  case 0:
2501
2502
  {
2502
- const { roomId: r, userMap: i } = n;
2503
- if (r !== this.room.roomId) return;
2503
+ const { roomId: n, userMap: i } = r;
2504
+ if (n !== this.room.roomId) return;
2504
2505
  const t = this.getAllUseUpdateKey(), e = Object.keys(i);
2505
2506
  {
2506
2507
  const l = [...this.usersMap.values()];
@@ -2520,8 +2521,8 @@ class QuickVoPlayer {
2520
2521
  break;
2521
2522
  case 1:
2522
2523
  {
2523
- const { roomId: r, updateTime: i } = n, { author: t, version: e } = n.customKeyMap;
2524
- this.room.roomId = r, this.room.updateTime = i, this.room.author = t, this.room.version = e;
2524
+ const { roomId: n, updateTime: i } = r, { author: t, version: e } = r.customKeyMap;
2525
+ this.room.roomId = n, this.room.updateTime = i, this.room.author = t, this.room.version = e;
2525
2526
  }
2526
2527
  break;
2527
2528
  }
@@ -2530,14 +2531,14 @@ class QuickVoPlayer {
2530
2531
  }
2531
2532
  });
2532
2533
  m(this, "setDisplayMode", (o) => {
2533
- var a, u, n, r, i, t, e, s;
2534
+ var a, u, r, n, i, t, e, s;
2534
2535
  switch (this.displayMode = o, o) {
2535
2536
  case "original":
2536
2537
  {
2537
2538
  this.prPlayer.setPause(!1);
2538
2539
  const l = [...this.usersMap.values()];
2539
2540
  for (const c of l)
2540
- (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);
2541
+ (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);
2541
2542
  }
2542
2543
  break;
2543
2544
  case "cut":