@realsee/live 0.6.4 → 0.6.5

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.es.js CHANGED
@@ -1,24 +1,24 @@
1
- var At = Object.defineProperty;
2
- var Dt = (t, s, e) => s in t ? At(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
3
- var o = (t, s, e) => (Dt(t, typeof s != "symbol" ? s + "" : s, e), e);
4
- import Mt from "@realsee/jsbridge-x";
5
- import ke from "trtc-js-sdk";
6
- import { ConsoleLogger as Vt, LogLevel as $t, DefaultDeviceController as xt, MeetingSessionConfiguration as Ut, DefaultMeetingSession as Bt, DefaultModality as et, MeetingSessionStatusCode as Wt } from "amazon-chime-sdk-js";
7
- import V, { createContext as Ft } from "react";
8
- const oe = Symbol("$$REALSEE_LIVE_EVENT$$");
9
- function ge(t) {
10
- return t[oe] || (t[oe] = {}), t[oe];
1
+ var Vt = Object.defineProperty;
2
+ var $t = (r, s, e) => s in r ? Vt(r, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[s] = e;
3
+ var o = (r, s, e) => ($t(r, typeof s != "symbol" ? s + "" : s, e), e);
4
+ import xt from "@realsee/jsbridge-x";
5
+ import Ne from "trtc-js-sdk";
6
+ import { ConsoleLogger as Ut, LogLevel as Ft, DefaultDeviceController as Bt, MeetingSessionConfiguration as Wt, DefaultMeetingSession as Kt, DefaultModality as tt, MeetingSessionStatusCode as qt } from "amazon-chime-sdk-js";
7
+ import D, { createContext as Gt } from "react";
8
+ const ce = Symbol("$$REALSEE_LIVE_EVENT$$");
9
+ function pe(r) {
10
+ return r[ce] || (r[ce] = {}), r[ce];
11
11
  }
12
- function qt(t) {
13
- t[oe] || delete t[oe];
12
+ function Yt(r) {
13
+ r[ce] || delete r[ce];
14
14
  }
15
- class ae {
15
+ class ue {
16
16
  /**
17
17
  * 判断是否注册了事件
18
18
  * @param name 事件类型
19
19
  */
20
20
  hasListener(s) {
21
- const e = ge(this);
21
+ const e = pe(this);
22
22
  return e && e[s] && e[s].length > 0;
23
23
  }
24
24
  /**
@@ -30,9 +30,9 @@ class ae {
30
30
  * @template K 预设的监听事件名称
31
31
  * @template C 回调函数函数上下文
32
32
  */
33
- on(s, e, n) {
34
- const i = ge(this);
35
- return i[s] || (i[s] = []), i[s].push([e, n || !1]), () => this.off(s, e);
33
+ on(s, e, i) {
34
+ const n = pe(this);
35
+ return n[s] || (n[s] = []), n[s].push([e, i || !1]), () => this.off(s, e);
36
36
  }
37
37
  /**
38
38
  * 注册事件(是否只执行一次)
@@ -56,18 +56,18 @@ class ae {
56
56
  */
57
57
  off(s, e) {
58
58
  if (s === void 0) {
59
- qt(this);
59
+ Yt(this);
60
60
  return;
61
61
  }
62
- const n = ge(this);
63
- if (n[s] || (n[s] = []), e === void 0) {
64
- n[s].length = 0;
62
+ const i = pe(this);
63
+ if (i[s] || (i[s] = []), e === void 0) {
64
+ i[s].length = 0;
65
65
  return;
66
66
  }
67
- let i = 0;
68
- for (; i < n[s].length && n[s][i][0] !== e; i++)
67
+ let n = 0;
68
+ for (; n < i[s].length && i[s][n][0] !== e; n++)
69
69
  ;
70
- i < n[s].length && n[s].splice(i, 1);
70
+ n < i[s].length && i[s].splice(n, 1);
71
71
  }
72
72
  /**
73
73
  * 触发事件
@@ -77,23 +77,23 @@ class ae {
77
77
  * @template K 预设的监听事件名称
78
78
  */
79
79
  emit(s, ...e) {
80
- let n = !1;
81
- const a = ge(this)[s] || [];
82
- for (let u of a.slice()) {
83
- const [f, _ = !1] = u, g = f(...e);
84
- _ && this.off(s, f), g === !1 && (n = !0);
80
+ let i = !1;
81
+ const c = pe(this)[s] || [];
82
+ for (let u of c.slice()) {
83
+ const [d, g = !1] = u, v = d(...e);
84
+ g && this.off(s, d), v === !1 && (i = !0);
85
85
  }
86
- return n;
86
+ return i;
87
87
  }
88
88
  }
89
- class De extends ae {
89
+ class Me extends ue {
90
90
  }
91
- var Q = /* @__PURE__ */ ((t) => (t.RealseeBrowserRTC = "RealseeBrowserRTC", t.RealseeVRWebViewRTC = "RealseeVRWebViewRTC", t.RealseeBrowserChimeRTC = "RealseeBrowserChimeRTC", t))(Q || {}), ut = /* @__PURE__ */ ((t) => (t.RealseeXTRTC = "trtc", t.RealseeXChimeRTC = "chime", t))(ut || {});
92
- const Kt = () => {
93
- const t = new Date(), s = t.getFullYear(), e = (t.getMonth() + 1).toString().padStart(2, "0"), n = t.getDate().toString().padStart(2, "0"), i = t.getHours().toString().padStart(2, "0"), a = t.getMinutes().toString().padStart(2, "0"), u = t.getSeconds().toString().padStart(2, "0"), f = t.getMilliseconds();
94
- return `[${s}-${e}-${n} ${i}:${a}:${u}.${f}]`;
95
- }, pe = (t, s = []) => {
96
- switch (s.unshift(`Realsee Live ${Kt()} <${t}> `), t) {
91
+ var Q = /* @__PURE__ */ ((r) => (r.RealseeBrowserRTC = "RealseeBrowserRTC", r.RealseeVRWebViewRTC = "RealseeVRWebViewRTC", r.RealseeBrowserChimeRTC = "RealseeBrowserChimeRTC", r))(Q || {}), ut = /* @__PURE__ */ ((r) => (r.RealseeXTRTC = "trtc", r.RealseeXChimeRTC = "chime", r))(ut || {});
92
+ const Ht = () => {
93
+ const r = new Date(), s = r.getFullYear(), e = (r.getMonth() + 1).toString().padStart(2, "0"), i = r.getDate().toString().padStart(2, "0"), n = r.getHours().toString().padStart(2, "0"), c = r.getMinutes().toString().padStart(2, "0"), u = r.getSeconds().toString().padStart(2, "0"), d = r.getMilliseconds();
94
+ return `[${s}-${e}-${i} ${n}:${c}:${u}.${d}]`;
95
+ }, be = (r, s = []) => {
96
+ switch (s.unshift(`Realsee Live ${Ht()} <${r}> `), r) {
97
97
  case "INFO":
98
98
  return console.info(...s);
99
99
  case "ERROR":
@@ -103,19 +103,19 @@ const Kt = () => {
103
103
  default:
104
104
  return console.log(...s);
105
105
  }
106
- }, Yt = (...t) => pe("LOG", t), Gt = (...t) => pe("INFO", t), Ht = (...t) => pe("ERROR", t), Jt = (...t) => pe("WARN", t), zt = {
107
- log: Yt,
108
- info: Gt,
109
- error: Ht,
110
- warn: Jt
111
- }, T = zt;
106
+ }, Jt = (...r) => be("LOG", r), zt = (...r) => be("INFO", r), Xt = (...r) => be("ERROR", r), Zt = (...r) => be("WARN", r), Qt = {
107
+ log: Jt,
108
+ info: zt,
109
+ error: Xt,
110
+ warn: Zt
111
+ }, O = Qt;
112
112
  function X() {
113
113
  return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
114
114
  }
115
- function me() {
115
+ function Ee() {
116
116
  return (X() + X() + "-" + X() + "-4" + X().substr(0, 3) + "-" + X() + "-" + X() + X() + X()).toLowerCase();
117
117
  }
118
- class tt extends De {
118
+ class rt extends Me {
119
119
  constructor(e) {
120
120
  super();
121
121
  o(this, "type", Q.RealseeBrowserRTC);
@@ -126,105 +126,105 @@ class tt extends De {
126
126
  throw new Error("方法 getVoiceSign 未实现");
127
127
  });
128
128
  o(this, "_autoPlayConfirm");
129
- o(this, "checkRequirement", () => ke.checkSystemRequirements());
129
+ o(this, "checkRequirement", () => Ne.checkSystemRequirements());
130
130
  o(this, "$dom", document.createElement("div"));
131
131
  o(this, "_trtc", {
132
132
  client: null,
133
133
  stream: null
134
134
  });
135
135
  o(this, "join", async (e) => {
136
- var a;
136
+ var c;
137
137
  this.emit("joinWillStart");
138
- const n = await this._getVoiceSign({
138
+ const i = await this._getVoiceSign({
139
139
  voiceId: e.voiceId,
140
140
  roomId: e.roomId,
141
141
  userId: e.userId
142
142
  });
143
- this._trtc.client = ke.createClient({
143
+ this._trtc.client = Ne.createClient({
144
144
  mode: "rtc",
145
- ...n,
145
+ ...i,
146
146
  enableAutoPlayDialog: typeof this._autoPlayConfirm != "function"
147
- }), (a = this._trtc.client) == null || a.enableAudioVolumeEvaluation(), this._registerRtcEvent();
148
- let i = await new Promise((u) => {
149
- var f;
150
- (f = this._trtc.client) == null || f.join({ roomId: Number(e.voiceId) }).then(() => u(!0)).catch(() => u(!1));
147
+ }), (c = this._trtc.client) == null || c.enableAudioVolumeEvaluation(), this._registerRtcEvent();
148
+ let n = await new Promise((u) => {
149
+ var d;
150
+ (d = this._trtc.client) == null || d.join({ roomId: Number(e.voiceId) }).then(() => u(!0)).catch(() => u(!1));
151
151
  });
152
- return this.joined = i, i ? (this._trtc.stream = ke.createStream({
153
- userId: n.userId,
152
+ return this.joined = n, n ? (this._trtc.stream = Ne.createStream({
153
+ userId: i.userId,
154
154
  audio: !0,
155
155
  video: !1
156
- }), i = await new Promise((u) => {
157
- var f;
158
- (f = this._trtc.stream) == null || f.initialize().then(() => u(!0)).catch(() => u(!1));
159
- }), i = await new Promise((u) => {
160
- var f;
161
- (f = this._trtc.client) == null || f.publish(this._trtc.stream).then(() => u(!0)).catch(() => u(!1));
162
- }), this.joined = i, this.joined && this.emit("joined"), i) : !1;
156
+ }), n = await new Promise((u) => {
157
+ var d;
158
+ (d = this._trtc.stream) == null || d.initialize().then(() => u(!0)).catch(() => u(!1));
159
+ }), n = await new Promise((u) => {
160
+ var d;
161
+ (d = this._trtc.client) == null || d.publish(this._trtc.stream).then(() => u(!0)).catch(() => u(!1));
162
+ }), this.joined = n, this.joined && this.emit("joined"), n) : !1;
163
163
  });
164
164
  o(this, "_handleStreamAdded", (e) => {
165
- var i;
166
- const n = e.stream;
167
- console.log("远端流增加: " + n.getId()), (i = this._trtc.client) == null || i.subscribe(n);
165
+ var n;
166
+ const i = e.stream;
167
+ console.log("远端流增加: " + i.getId()), (n = this._trtc.client) == null || n.subscribe(i);
168
168
  });
169
169
  o(this, "_handleStreamSubscribed", (e) => {
170
- const n = e.stream;
171
- console.log("远端流订阅成功:" + n.getId());
172
- const a = `rs-rtc-remote_stream-${n.getId()}`, u = document.createElement("div");
173
- u.id = a, this.$dom.appendChild(u), typeof this._autoPlayConfirm == "function" ? (n.play(a).catch((f) => {
174
- }), n.on("error", (f) => {
175
- if (f.getCode() === 16451) {
176
- const g = () => n.resume();
177
- this._autoPlayConfirm({ onConfirm: g });
170
+ const i = e.stream;
171
+ console.log("远端流订阅成功:" + i.getId());
172
+ const c = `rs-rtc-remote_stream-${i.getId()}`, u = document.createElement("div");
173
+ u.id = c, this.$dom.appendChild(u), typeof this._autoPlayConfirm == "function" ? (i.play(c).catch((d) => {
174
+ }), i.on("error", (d) => {
175
+ if (d.getCode() === 16451) {
176
+ const v = () => i.resume();
177
+ this._autoPlayConfirm({ onConfirm: v });
178
178
  }
179
- })) : n.play(a);
179
+ })) : i.play(c);
180
180
  });
181
181
  this._getVoiceSign = e.getVoiceSign, this._autoPlayConfirm = e.autoPlayConfirm, this._initParentDom();
182
182
  }
183
183
  _initParentDom() {
184
- this.$dom.id = `rs-rtc-${me()}`, this.$dom.style.display = "none", document.body.appendChild(this.$dom);
184
+ this.$dom.id = `rs-rtc-${Ee()}`, this.$dom.style.display = "none", document.body.appendChild(this.$dom);
185
185
  }
186
186
  quit() {
187
187
  return new Promise(async (e) => {
188
- var n, i;
189
- this.joined = !1, this._trtc.stream && (await ((n = this._trtc.client) == null ? void 0 : n.unpublish(this._trtc.stream)), this._trtc.stream.stop(), this._trtc.stream.close(), this._trtc.stream = null), (i = this._trtc.client) == null || i.leave().then(() => this._trtc.client = null).then(() => e(!0)).catch(() => e(!1)), e(!0);
188
+ var i, n;
189
+ this.joined = !1, this._trtc.stream && (await ((i = this._trtc.client) == null ? void 0 : i.unpublish(this._trtc.stream)), this._trtc.stream.stop(), this._trtc.stream.close(), this._trtc.stream = null), (n = this._trtc.client) == null || n.leave().then(() => this._trtc.client = null).then(() => e(!0)).catch(() => e(!1)), e(!0);
190
190
  });
191
191
  }
192
192
  detectMicro() {
193
193
  return new Promise((e) => {
194
- const n = { audio: !0, video: !1 };
194
+ const i = { audio: !0, video: !1 };
195
195
  try {
196
- navigator.mediaDevices.getUserMedia(n).then(() => e(!0)).catch((i) => {
197
- T.error(i.message), e(!1);
196
+ navigator.mediaDevices.getUserMedia(i).then(() => e(!0)).catch((n) => {
197
+ O.error(n.message), e(!1);
198
198
  });
199
- } catch (i) {
200
- console.error(i), e(!1);
199
+ } catch (n) {
200
+ console.error(n), e(!1);
201
201
  }
202
202
  });
203
203
  }
204
204
  toggleMicro(e) {
205
- var n, i, a, u;
205
+ var i, n, c, u;
206
206
  return Promise.resolve(
207
- (e ? (i = (n = this._trtc) == null ? void 0 : n.stream) == null ? void 0 : i.unmuteAudio() : (u = (a = this._trtc) == null ? void 0 : a.stream) == null ? void 0 : u.muteAudio()) || !1
207
+ (e ? (n = (i = this._trtc) == null ? void 0 : i.stream) == null ? void 0 : n.unmuteAudio() : (u = (c = this._trtc) == null ? void 0 : c.stream) == null ? void 0 : u.muteAudio()) || !1
208
208
  );
209
209
  }
210
210
  shock() {
211
211
  throw new Error("Method not implemented.");
212
212
  }
213
213
  _registerRtcEvent() {
214
- var e, n, i, a;
215
- (e = this._trtc.client) == null || e.on("stream-added", this._handleStreamAdded), (n = this._trtc.client) == null || n.on("stream-subscribed", this._handleStreamSubscribed), (i = this._trtc.client) == null || i.on(
214
+ var e, i, n, c;
215
+ (e = this._trtc.client) == null || e.on("stream-added", this._handleStreamAdded), (i = this._trtc.client) == null || i.on("stream-subscribed", this._handleStreamSubscribed), (n = this._trtc.client) == null || n.on(
216
216
  "audio-volume",
217
217
  (u) => this.emit(
218
218
  "userVolumes",
219
- u.result.map(({ userId: f, audioVolume: _ }) => ({
220
- userId: f,
221
- audioVolume: _
219
+ u.result.map(({ userId: d, audioVolume: g }) => ({
220
+ userId: d,
221
+ audioVolume: g
222
222
  }))
223
223
  )
224
- ), (a = this._trtc.client) == null || a.on("error", (u) => this.emit("error", u));
224
+ ), (c = this._trtc.client) == null || c.on("error", (u) => this.emit("error", u));
225
225
  }
226
226
  }
227
- class rt extends De {
227
+ class it extends Me {
228
228
  constructor(e) {
229
229
  super();
230
230
  o(this, "type", Q.RealseeBrowserChimeRTC);
@@ -250,7 +250,7 @@ class rt extends De {
250
250
  * 对audio标签初始化
251
251
  */
252
252
  o(this, "_initDom", () => {
253
- this.$audio.id = `rs-rtc-${me()}`, this.$dom.id = `rs-rtc-${me()}`, this.$dom.appendChild(this.$audio), document.body.appendChild(this.$dom);
253
+ this.$audio.id = `rs-rtc-${Ee()}`, this.$dom.id = `rs-rtc-${Ee()}`, this.$dom.appendChild(this.$audio), document.body.appendChild(this.$dom);
254
254
  });
255
255
  /**
256
256
  * 初始化事件监听器
@@ -258,20 +258,20 @@ class rt extends De {
258
258
  o(this, "initObservers", () => {
259
259
  this.deviceChangeObserver = {
260
260
  audioInputsChanged: (e) => {
261
- this.logger.info(`audioInputsChanged ${typeof e}`), e == null || e.forEach((n) => {
262
- this.logger.info(`Device ID: ${n.deviceId} Microphone: ${n.label}`);
261
+ this.logger.info(`audioInputsChanged ${typeof e}`), e == null || e.forEach((i) => {
262
+ this.logger.info(`Device ID: ${i.deviceId} Microphone: ${i.label}`);
263
263
  });
264
264
  },
265
265
  audioOutputsChanged: (e) => {
266
- this.logger.info(`audioOutputsChanged ${typeof e}`), e == null || e.forEach((n) => {
267
- this.logger.info(`Device ID: ${n.deviceId} Speaker: ${n.label}`);
266
+ this.logger.info(`audioOutputsChanged ${typeof e}`), e == null || e.forEach((i) => {
267
+ this.logger.info(`Device ID: ${i.deviceId} Speaker: ${i.label}`);
268
268
  });
269
269
  },
270
270
  // videoInputsChanged: (freshVideoInputDeviceList: any) => {
271
271
  // this.logger.info(`Video inputs updated: ${freshVideoInputDeviceList}`);
272
272
  // },
273
- audioInputMuteStateChanged: (e, n) => {
274
- this.logger.info(`Device ${e.toString()} ${n ? "is muted in hardware" : "is not muted"}`);
273
+ audioInputMuteStateChanged: (e, i) => {
274
+ this.logger.info(`Device ${e.toString()} ${i ? "is muted in hardware" : "is not muted"}`);
275
275
  }
276
276
  }, this.audioVideoObserver = {
277
277
  audioVideoDidStart: () => {
@@ -286,14 +286,14 @@ class rt extends De {
286
286
  }, this.audioMixObserver = {
287
287
  meetingAudioStreamBecameActive: (e) => {
288
288
  if (this.$audio.paused) {
289
- const n = () => this.$audio.play().then(() => {
290
- }).catch((i) => {
291
- if (T.error("播放远端流失败!", i), typeof this._autoPlayConfirm == "function") {
292
- const a = () => n();
293
- this._autoPlayConfirm({ onConfirm: a });
289
+ const i = () => this.$audio.play().then(() => {
290
+ }).catch((n) => {
291
+ if (O.error("播放远端流失败!", n), typeof this._autoPlayConfirm == "function") {
292
+ const c = () => i();
293
+ this._autoPlayConfirm({ onConfirm: c });
294
294
  }
295
295
  });
296
- n();
296
+ i();
297
297
  }
298
298
  },
299
299
  meetingAudioStreamBecameInactive: (e) => {
@@ -304,46 +304,46 @@ class rt extends De {
304
304
  * 注册rtc事件
305
305
  */
306
306
  o(this, "_registerRtcEvent", () => {
307
- var n, i, a, u, f, _;
308
- const e = ((a = (i = (n = this.meetingSession) == null ? void 0 : n.configuration) == null ? void 0 : i.credentials) == null ? void 0 : a.attendeeId) || "";
307
+ var i, n, c, u, d, g;
308
+ const e = ((c = (n = (i = this.meetingSession) == null ? void 0 : i.configuration) == null ? void 0 : n.credentials) == null ? void 0 : c.attendeeId) || "";
309
309
  if (e) {
310
- const g = /* @__PURE__ */ new Map(), v = () => {
311
- const p = [];
312
- return g.forEach((S, m) => {
313
- p.push({
314
- userId: S.userId,
315
- volume: S.muted || S.signalStrength === 0 || !Boolean(S.volume) ? 0 : S.volume
310
+ const v = /* @__PURE__ */ new Map(), E = () => {
311
+ const y = [];
312
+ return v.forEach((I, _) => {
313
+ y.push({
314
+ userId: I.userId,
315
+ volume: I.muted || I.signalStrength === 0 || !Boolean(I.volume) ? 0 : I.volume
316
316
  });
317
- }), p;
317
+ }), y;
318
318
  };
319
319
  (u = this.meetingSession) == null || u.audioVideo.realtimeSubscribeToAttendeeIdPresence(
320
- (p, S, m) => {
321
- var A;
322
- if (!S) {
323
- g.delete(p), this.emit("userVolumes", v());
320
+ (y, I, _) => {
321
+ var V;
322
+ if (!I) {
323
+ v.delete(y), this.emit("userVolumes", E());
324
324
  return;
325
325
  }
326
- (A = this.meetingSession) == null || A.audioVideo.realtimeSubscribeToVolumeIndicator(
327
- p,
328
- (w, P, H, J) => {
329
- new et(w).base() === w && (g.set(w, {
330
- userId: m || w,
331
- volume: P,
332
- muted: H,
333
- signalStrength: J
334
- }), this.emit("userVolumes", v()));
326
+ (V = this.meetingSession) == null || V.audioVideo.realtimeSubscribeToVolumeIndicator(
327
+ y,
328
+ (C, k, U, P) => {
329
+ new tt(C).base() === C && (v.set(C, {
330
+ userId: _ || C,
331
+ volume: k,
332
+ muted: U,
333
+ signalStrength: P
334
+ }), this.emit("userVolumes", E()));
335
335
  }
336
336
  );
337
337
  }
338
- ), (f = this.meetingSession) == null || f.audioVideo.realtimeSubscribeToVolumeIndicator(
338
+ ), (d = this.meetingSession) == null || d.audioVideo.realtimeSubscribeToVolumeIndicator(
339
339
  e,
340
- (p, S, m, A) => {
341
- new et(p).base() === p && A !== null && A !== 1 && this.emit("weakNetwork");
340
+ (y, I, _, V) => {
341
+ new tt(y).base() === y && V !== null && V !== 1 && this.emit("weakNetwork");
342
342
  }
343
- ), (_ = this.meetingSession) == null || _.audioVideo.realtimeSubscribeToFatalError((p) => this.emit("error", p));
343
+ ), (g = this.meetingSession) == null || g.audioVideo.realtimeSubscribeToFatalError((y) => this.emit("error", y));
344
344
  }
345
345
  });
346
- this._getVoiceSign = e.getVoiceSign, this._autoPlayConfirm = e.autoPlayConfirm, this._initDom(), this.logger = new Vt("WebRTCLogger", e.logLevel || $t.INFO), this.deviceController = new xt(this.logger), this.initObservers();
346
+ this._getVoiceSign = e.getVoiceSign, this._autoPlayConfirm = e.autoPlayConfirm, this._initDom(), this.logger = new Ut("WebRTCLogger", e.logLevel || Ft.INFO), this.deviceController = new Bt(this.logger), this.initObservers();
347
347
  }
348
348
  /**
349
349
  * 加入语音会议
@@ -351,114 +351,114 @@ class rt extends De {
351
351
  * @returns
352
352
  */
353
353
  async join(e) {
354
- return new Promise(async (n, i) => {
355
- var a, u;
354
+ return new Promise(async (i, n) => {
355
+ var c, u;
356
356
  this.emit("joinWillStart");
357
357
  try {
358
- const { sdkAppId: f, userId: _, roomId: g, userSig: v } = await this._getVoiceSign({
358
+ const { sdkAppId: d, userId: g, roomId: v, userSig: E } = await this._getVoiceSign({
359
359
  ...e,
360
360
  roomId: e.roomId || 0
361
361
  });
362
- this.userId = _;
363
- const { attendence: p, vendor_wrapper: S } = JSON.parse(
364
- decodeURIComponent(v)
365
- ), m = new Ut(
362
+ this.userId = g;
363
+ const { attendence: y, vendor_wrapper: I } = JSON.parse(
364
+ decodeURIComponent(E)
365
+ ), _ = new Wt(
366
366
  {
367
- Meeting: S
367
+ Meeting: I
368
368
  },
369
369
  {
370
370
  Attendee: {
371
- ExternalUserId: p.external_user_id,
372
- AttendeeId: p.attendee_id,
373
- JoinToken: p.join_token
371
+ ExternalUserId: y.external_user_id,
372
+ AttendeeId: y.attendee_id,
373
+ JoinToken: y.join_token
374
374
  }
375
375
  }
376
376
  );
377
- this.meetingSession = new Bt(m, this.logger, this.deviceController), this._registerRtcEvent(), this.meetingSession.audioVideo.addDeviceChangeObserver(this.deviceChangeObserver), this.meetingSession.audioVideo.addObserver(this.audioVideoObserver), this.meetingSession.audioVideo.bindAudioElement(this.$audio);
378
- const A = {
377
+ this.meetingSession = new Kt(_, this.logger, this.deviceController), this._registerRtcEvent(), this.meetingSession.audioVideo.addDeviceChangeObserver(this.deviceChangeObserver), this.meetingSession.audioVideo.addObserver(this.audioVideoObserver), this.meetingSession.audioVideo.bindAudioElement(this.$audio);
378
+ const V = {
379
379
  audioVideoDidStart: () => {
380
- var w;
381
- (w = this.meetingSession) == null || w.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), n(!0);
380
+ var C;
381
+ (C = this.meetingSession) == null || C.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), i(!0);
382
382
  },
383
383
  audioVideoDidStop: () => {
384
- this.joined = !1, n(!1);
384
+ this.joined = !1, i(!1);
385
385
  }
386
386
  };
387
- this.meetingSession.audioVideo.addObserver(A), this.audioMixObserver && this.meetingSession.audioVideo.addAudioMixObserver(this.audioMixObserver), this.meetingSession.audioVideo.setDeviceLabelTrigger(
387
+ this.meetingSession.audioVideo.addObserver(V), this.audioMixObserver && this.meetingSession.audioVideo.addAudioMixObserver(this.audioMixObserver), this.meetingSession.audioVideo.setDeviceLabelTrigger(
388
388
  async () => await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 })
389
389
  );
390
390
  try {
391
- const w = await this.meetingSession.audioVideo.listAudioInputDevices();
392
- T.info("audioInputDevices ===>", w);
393
- const P = ((a = w[0]) == null ? void 0 : a.deviceId) || "default";
394
- await this.meetingSession.audioVideo.startAudioInput(P);
395
- } catch (w) {
396
- T.error(`设置语音输入设备失败:${w.message}`);
391
+ const C = await this.meetingSession.audioVideo.listAudioInputDevices();
392
+ O.info("audioInputDevices ===>", C);
393
+ const k = ((c = C[0]) == null ? void 0 : c.deviceId) || "default";
394
+ await this.meetingSession.audioVideo.startAudioInput(k);
395
+ } catch (C) {
396
+ O.error(`设置语音输入设备失败:${C.message}`);
397
397
  }
398
398
  try {
399
- const w = await this.meetingSession.audioVideo.listAudioOutputDevices();
400
- T.info("audioOutputDevices ===>", w);
401
- const P = ((u = w[0]) == null ? void 0 : u.deviceId) || "default";
402
- await this.meetingSession.audioVideo.chooseAudioOutput(P);
403
- } catch (w) {
404
- T.error(`设置语音输出设备失败:${w.message}`);
399
+ const C = await this.meetingSession.audioVideo.listAudioOutputDevices();
400
+ O.info("audioOutputDevices ===>", C);
401
+ const k = ((u = C[0]) == null ? void 0 : u.deviceId) || "default";
402
+ await this.meetingSession.audioVideo.chooseAudioOutput(k);
403
+ } catch (C) {
404
+ O.error(`设置语音输出设备失败:${C.message}`);
405
405
  }
406
406
  this.meetingSession.audioVideo.start();
407
- } catch (f) {
408
- this.emit("error", f), this.logger.error(f.message), n(!1);
407
+ } catch (d) {
408
+ this.emit("error", d), this.logger.error(d.message), i(!1);
409
409
  }
410
410
  });
411
411
  }
412
412
  quit() {
413
- return this.joined ? new Promise((e, n) => {
414
- var a, u;
413
+ return this.joined ? new Promise((e, i) => {
414
+ var c, u;
415
415
  this.joined = !1;
416
- const i = {
417
- audioVideoDidStop: async (f) => {
418
- var g;
419
- const _ = f.statusCode();
420
- (g = this.meetingSession) == null || g.deviceController.destroy(), _ === Wt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(`Stopped with a session status code: ${_}`), e(!0));
416
+ const n = {
417
+ audioVideoDidStop: async (d) => {
418
+ var v;
419
+ const g = d.statusCode();
420
+ (v = this.meetingSession) == null || v.deviceController.destroy(), g === qt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(`Stopped with a session status code: ${g}`), e(!0));
421
421
  }
422
422
  };
423
- (a = this.meetingSession) == null || a.audioVideo.addObserver(i), (u = this.meetingSession) == null || u.audioVideo.stop();
423
+ (c = this.meetingSession) == null || c.audioVideo.addObserver(n), (u = this.meetingSession) == null || u.audioVideo.stop();
424
424
  }) : Promise.resolve(!0);
425
425
  }
426
426
  async detectMicro() {
427
427
  return new Promise((e) => {
428
- const n = { audio: !0, video: !1 };
428
+ const i = { audio: !0, video: !1 };
429
429
  try {
430
- navigator.mediaDevices.getUserMedia(n).then(() => e(!0)).catch(() => e(!1));
431
- } catch (i) {
432
- this.logger.error(i.message), e(!1);
430
+ navigator.mediaDevices.getUserMedia(i).then(() => e(!0)).catch(() => e(!1));
431
+ } catch (n) {
432
+ this.logger.error(n.message), e(!1);
433
433
  }
434
434
  });
435
435
  }
436
436
  async toggleMicro(e) {
437
- var i, a, u;
438
- e ? (i = this.meetingSession) == null || i.audioVideo.realtimeUnmuteLocalAudio() : (a = this.meetingSession) == null || a.audioVideo.realtimeMuteLocalAudio();
439
- const n = (u = this.meetingSession) == null ? void 0 : u.audioVideo.realtimeIsLocalAudioMuted();
440
- return n !== void 0 ? e !== n : !1;
437
+ var n, c, u;
438
+ e ? (n = this.meetingSession) == null || n.audioVideo.realtimeUnmuteLocalAudio() : (c = this.meetingSession) == null || c.audioVideo.realtimeMuteLocalAudio();
439
+ const i = (u = this.meetingSession) == null ? void 0 : u.audioVideo.realtimeIsLocalAudioMuted();
440
+ return i !== void 0 ? e !== i : !1;
441
441
  }
442
442
  shock() {
443
443
  throw new Error("Method not implemented.");
444
444
  }
445
445
  }
446
- var lt = /* @__PURE__ */ ((t) => (t[t.Success = 0] = "Success", t[t.Failure = 1] = "Failure", t[t.ReJoin = 2] = "ReJoin", t[t.NoMicroPermission = 3] = "NoMicroPermission", t))(lt || {});
447
- class nt extends De {
448
- constructor({ jsBridge: e, getVoiceSign: n }) {
446
+ var lt = /* @__PURE__ */ ((r) => (r[r.Success = 0] = "Success", r[r.Failure = 1] = "Failure", r[r.ReJoin = 2] = "ReJoin", r[r.NoMicroPermission = 3] = "NoMicroPermission", r))(lt || {});
447
+ class nt extends Me {
448
+ constructor({ jsBridge: e, getVoiceSign: i }) {
449
449
  super();
450
450
  o(this, "type", Q.RealseeVRWebViewRTC);
451
451
  o(this, "joined", !1);
452
452
  o(this, "micro", !1);
453
453
  o(this, "voiceId", "");
454
454
  o(this, "options");
455
- this.options = { jsBridge: e, getVoiceSign: n }, this.jsBridge.webViewType !== "WxMiniProgramWebView" && this.jsBridge.callAndListen(
455
+ this.options = { jsBridge: e, getVoiceSign: i }, this.jsBridge.webViewType !== "WxMiniProgramWebView" && this.jsBridge.callAndListen(
456
456
  "live/userVolumes",
457
- (i) => {
458
- this.emit("userVolumes", i);
457
+ (n) => {
458
+ this.emit("userVolumes", n);
459
459
  }
460
- ), this.jsBridge.callAndListen("live/weakNetwork", (i) => {
461
- i && this.emit("weakNetwork");
460
+ ), this.jsBridge.callAndListen("live/weakNetwork", (n) => {
461
+ n && this.emit("weakNetwork");
462
462
  });
463
463
  }
464
464
  get jsBridge() {
@@ -467,49 +467,49 @@ class nt extends De {
467
467
  async join(e) {
468
468
  try {
469
469
  this.emit("joinWillStart");
470
- const { sdkAppId: n, userId: i, userSig: a } = await this.options.getVoiceSign(
470
+ const { sdkAppId: i, userId: n, userSig: c } = await this.options.getVoiceSign(
471
471
  e
472
472
  );
473
- if (!(Boolean(n) && Boolean(i) && Boolean(a)))
473
+ if (!(Boolean(i) && Boolean(n) && Boolean(c)))
474
474
  return this.emit("error", new Error("加入房间失败:rtc 签名请求异常")), this.joined = !1, this.joined;
475
475
  this.type = e.type;
476
- const [u, f] = await this.jsBridge.callAndBackfeed(
477
- `live/join?sdkAppID=${n}&userID=${i}&roomID=${Number(
476
+ const [u, d] = await this.jsBridge.callAndBackfeed(
477
+ `live/join?sdkAppID=${i}&userID=${n}&roomID=${Number(
478
478
  e.voiceId
479
- )}&userSig=${a}`
479
+ )}&userSig=${c}`
480
480
  );
481
481
  return u ? u.code === lt.Success ? (this.emit("joined"), this.joined = !0) : (this.emit("error", u), this.joined = !1) : (this.emit(
482
482
  "error",
483
- f || new Error("加入房间失败:未知异常。")
483
+ d || new Error("加入房间失败:未知异常。")
484
484
  ), this.joined = !1), this.joined;
485
- } catch (n) {
486
- return this.emit("error", new Error("加入房间失败:" + n.message)), this.joined = !1, this.joined;
485
+ } catch (i) {
486
+ return this.emit("error", new Error("加入房间失败:" + i.message)), this.joined = !1, this.joined;
487
487
  }
488
488
  }
489
489
  async quit() {
490
- const [e, n] = await this.jsBridge.callAndBackfeed(
490
+ const [e, i] = await this.jsBridge.callAndBackfeed(
491
491
  "live/quit"
492
492
  );
493
- return e === null && this.emit("error", n || new Error("退出房间失败:未知异常。")), this.joined = !1, !!e;
493
+ return e === null && this.emit("error", i || new Error("退出房间失败:未知异常。")), this.joined = !1, !!e;
494
494
  }
495
495
  async detectMicro() {
496
- const [e, n] = await this.jsBridge.detectMicro();
497
- return e === null ? (this.emit("error", n || new Error("麦克风监测异常!")), !1) : e;
496
+ const [e, i] = await this.jsBridge.detectMicro();
497
+ return e === null ? (this.emit("error", i || new Error("麦克风监测异常!")), !1) : e;
498
498
  }
499
499
  async toggleMicro(e) {
500
- const [n, i] = await this.jsBridge.callAndBackfeed(
500
+ const [i, n] = await this.jsBridge.callAndBackfeed(
501
501
  `live/toggleMicro?flag=${e ? 1 : 0}`
502
502
  );
503
- return n === null ? (this.emit("error", i || new Error("麦克风监测异常!")), !1) : (this.micro = n, n);
503
+ return i === null ? (this.emit("error", n || new Error("麦克风监测异常!")), !1) : (this.micro = i, i);
504
504
  }
505
505
  shock() {
506
506
  this.jsBridge.shock(1);
507
507
  }
508
508
  }
509
- var W = /* @__PURE__ */ ((t) => (t.SelfUserInfo = "SELF_USER_INFO", t.RoomInfo = "ROOM_INFO", t.RTCInfo = "RTC_INFO", t.UserList = "USER_LIST", t.BuiltinMsg = "BUILTIN_MSG", t.CustomEvent = "CUSTOM_EVENT", t.KeyframeSync = "KEYFRAME_SYNC", t.UserKickOut = "USER_KICK_OUT", t))(W || {}), q = /* @__PURE__ */ ((t) => (t.UserChange = "user_change", t.RoomChange = "room_change", t))(q || {}), G = /* @__PURE__ */ ((t) => (t.UserMicroStatus = "change_micro_status", t.UserMicroStatusSync = "sync_micro_status", t.UserPermission = "change_permission", t.UserStatus = "change_status", t.UserInfo = "change_info", t.RoomClose = "close", t))(G || {}), Z = /* @__PURE__ */ ((t) => (t.OPEN = "OPEN", t.CLOSE = "CLOSE", t))(Z || {});
510
- function Tr(t) {
509
+ var K = /* @__PURE__ */ ((r) => (r.SelfUserInfo = "SELF_USER_INFO", r.RoomInfo = "ROOM_INFO", r.RTCInfo = "RTC_INFO", r.UserList = "USER_LIST", r.BuiltinMsg = "BUILTIN_MSG", r.CustomEvent = "CUSTOM_EVENT", r.KeyframeSync = "KEYFRAME_SYNC", r.UserKickOut = "USER_KICK_OUT", r))(K || {}), q = /* @__PURE__ */ ((r) => (r.UserChange = "user_change", r.RoomChange = "room_change", r))(q || {}), H = /* @__PURE__ */ ((r) => (r.UserMicroStatus = "change_micro_status", r.UserMicroStatusSync = "sync_micro_status", r.UserPermission = "change_permission", r.UserStatus = "change_status", r.UserInfo = "change_info", r.RoomClose = "close", r))(H || {}), Z = /* @__PURE__ */ ((r) => (r.OPEN = "OPEN", r.CLOSE = "CLOSE", r))(Z || {});
510
+ function Nr(r) {
511
511
  try {
512
- const s = JSON.parse(t), e = {
512
+ const s = JSON.parse(r), e = {
513
513
  code: s.code,
514
514
  message: s.message,
515
515
  command: s.command,
@@ -519,17 +519,17 @@ function Tr(t) {
519
519
  frontRequestId: s.front_request_id,
520
520
  triggerUserID: s.trigger_user_id,
521
521
  data: s.data || {}
522
- }, n = Object.keys(e).filter(
523
- (i) => e[i] === void 0
522
+ }, i = Object.keys(e).filter(
523
+ (n) => e[n] === void 0
524
524
  );
525
- return n.length > 0 && console.warn(`推送数据格式异常:${n.join(" ")} 值不存在!`), e;
525
+ return i.length > 0 && console.warn(`推送数据格式异常:${i.join(" ")} 值不存在!`), e;
526
526
  } catch (s) {
527
527
  return !1;
528
528
  }
529
529
  }
530
- var x = /* @__PURE__ */ ((t) => (t[t.NOTINITIALIZED = -1] = "NOTINITIALIZED", t[t.CONNECTING = 0] = "CONNECTING", t[t.OPEN = 1] = "OPEN", t[t.CLOSED = 3] = "CLOSED", t))(x || {}), Xt = /* @__PURE__ */ ((t) => (t[t.Normal = 0] = "Normal", t[t.Removed = 1] = "Removed", t[t.Replaced = 2] = "Replaced", t))(Xt || {}), Zt = /* @__PURE__ */ ((t) => (t.WAIT_ENTER = "WAIT_ENTER", t.ONLINE = "ONLINE", t.LEAVE = "LEAVE", t.KICK_OUT = "KICK_OUT", t.BE_REPLACE = "BE_REPLACE", t.EXCEPTION = "EXCEPTION", t))(Zt || {}), Le = /* @__PURE__ */ ((t) => (t[t.NOTINITIALIZED = -1] = "NOTINITIALIZED", t[t.CONNECTING = 0] = "CONNECTING", t[t.OPEN = 1] = "OPEN", t[t.CLOSING = 2] = "CLOSING", t[t.CLOSED = 3] = "CLOSED", t))(Le || {}), Qt = /* @__PURE__ */ ((t) => (t.Error = "Error", t.Close = "Close", t.MicroAuth = "MicroAuth", t.DuplicateConnect = "DuplicateConnect", t.IllegalURL = "IllegalURL", t.Unknown = "Unknown", t.IllegalArgs = "IllegalArgs", t))(Qt || {}), er = /* @__PURE__ */ ((t) => (t.Err_1000 = "CLOSE_NORMAL", t.Err_1001 = "CLOSE_GOING_AWAY", t.Err_1002 = "CLOSE_PROTOCOL_ERROR", t.Err_1003 = "CLOSE_UNSUPPORTED", t.Err_1006 = "CLOSE_ABNORMAL", t.Err_1007 = "Unsupported Data", t.Err_1008 = "Policy Violation", t.Err_1009 = "CLOSE_TOO_LARGE", t.Err_unknown = "unknown", t))(er || {});
531
- function tr(t) {
532
- switch (t) {
530
+ var x = /* @__PURE__ */ ((r) => (r[r.NOTINITIALIZED = -1] = "NOTINITIALIZED", r[r.CONNECTING = 0] = "CONNECTING", r[r.OPEN = 1] = "OPEN", r[r.CLOSED = 3] = "CLOSED", r))(x || {}), er = /* @__PURE__ */ ((r) => (r[r.Normal = 0] = "Normal", r[r.Removed = 1] = "Removed", r[r.Replaced = 2] = "Replaced", r))(er || {}), tr = /* @__PURE__ */ ((r) => (r.WAIT_ENTER = "WAIT_ENTER", r.ONLINE = "ONLINE", r.LEAVE = "LEAVE", r.KICK_OUT = "KICK_OUT", r.BE_REPLACE = "BE_REPLACE", r.EXCEPTION = "EXCEPTION", r))(tr || {}), Le = /* @__PURE__ */ ((r) => (r[r.NOTINITIALIZED = -1] = "NOTINITIALIZED", r[r.CONNECTING = 0] = "CONNECTING", r[r.OPEN = 1] = "OPEN", r[r.CLOSING = 2] = "CLOSING", r[r.CLOSED = 3] = "CLOSED", r))(Le || {}), rr = /* @__PURE__ */ ((r) => (r.Error = "Error", r.Close = "Close", r.MicroAuth = "MicroAuth", r.DuplicateConnect = "DuplicateConnect", r.IllegalURL = "IllegalURL", r.Unknown = "Unknown", r.IllegalArgs = "IllegalArgs", r))(rr || {}), ir = /* @__PURE__ */ ((r) => (r.Err_1000 = "CLOSE_NORMAL", r.Err_1001 = "CLOSE_GOING_AWAY", r.Err_1002 = "CLOSE_PROTOCOL_ERROR", r.Err_1003 = "CLOSE_UNSUPPORTED", r.Err_1006 = "CLOSE_ABNORMAL", r.Err_1007 = "Unsupported Data", r.Err_1008 = "Policy Violation", r.Err_1009 = "CLOSE_TOO_LARGE", r.Err_unknown = "unknown", r))(ir || {});
531
+ function nr(r) {
532
+ switch (r) {
533
533
  case 1e3:
534
534
  return "CLOSE_NORMAL";
535
535
  case 1001:
@@ -549,80 +549,80 @@ function tr(t) {
549
549
  }
550
550
  return "unknown";
551
551
  }
552
- function rr(t) {
553
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
552
+ function sr(r) {
553
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
554
554
  }
555
555
  var ft = {};
556
- (function(t) {
557
- Object.defineProperty(t, "__esModule", { value: !0 }), t.LogLevel = void 0;
556
+ (function(r) {
557
+ Object.defineProperty(r, "__esModule", { value: !0 }), r.LogLevel = void 0;
558
558
  var s;
559
559
  (function(e) {
560
560
  e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e[e.OFF = 4] = "OFF";
561
- })(s = t.LogLevel || (t.LogLevel = {})), t.default = s;
561
+ })(s = r.LogLevel || (r.LogLevel = {})), r.default = s;
562
562
  })(ft);
563
- const it = /* @__PURE__ */ rr(ft);
564
- function nr(t, s = {}) {
565
- const e = t.indexOf("?") !== -1, n = Object.keys(s).reduce(
566
- (i, a, u) => `${i}${u === 0 && !e ? "?" : "&"}${a}=${s[a]}`,
563
+ const st = /* @__PURE__ */ sr(ft);
564
+ function or(r, s = {}) {
565
+ const e = r.indexOf("?") !== -1, i = Object.keys(s).reduce(
566
+ (n, c, u) => `${n}${u === 0 && !e ? "?" : "&"}${c}=${s[c]}`,
567
567
  ""
568
568
  );
569
- return t + n;
569
+ return r + i;
570
570
  }
571
- const ce = globalThis.navigator.userAgent, ir = /android/gi.test(ce), sr = /iPhone|iPad\s+OS/gi.test(ce), or = /MicroMessenger/gi.test(ce) && /miniProgram/gi.test(ce), ar = /realsee/gi.test(ce);
572
- function ve(t) {
573
- return Object.prototype.toString.call(t) === "[object Object]";
571
+ const le = globalThis.navigator.userAgent, ar = /android/gi.test(le), cr = /iPhone|iPad\s+OS/gi.test(le), ur = /MicroMessenger/gi.test(le) && /miniProgram/gi.test(le), lr = /realsee/gi.test(le);
572
+ function ye(r) {
573
+ return Object.prototype.toString.call(r) === "[object Object]";
574
574
  }
575
- function Ee(t, s) {
576
- return t === s ? !0 : typeof t != typeof s ? !1 : !!(Number.isNaN(t) && Number.isNaN(s));
575
+ function Se(r, s) {
576
+ return r === s ? !0 : typeof r != typeof s ? !1 : !!(Number.isNaN(r) && Number.isNaN(s));
577
577
  }
578
- function cr(t, s) {
579
- const e = Object.getOwnPropertyNames(t), n = Object.getOwnPropertyNames(s);
580
- if (e.length !== n.length)
578
+ function fr(r, s) {
579
+ const e = Object.getOwnPropertyNames(r), i = Object.getOwnPropertyNames(s);
580
+ if (e.length !== i.length)
581
581
  return !1;
582
- for (let i = 0, a = e.length; i < a; i++) {
583
- const u = e[i];
584
- if (!Ee(t[u], s[u]))
582
+ for (let n = 0, c = e.length; n < c; n++) {
583
+ const u = e[n];
584
+ if (!Se(r[u], s[u]))
585
585
  return !1;
586
586
  }
587
587
  return !0;
588
588
  }
589
- function ur(t, s) {
590
- if (t.length !== s.length)
589
+ function dr(r, s) {
590
+ if (r.length !== s.length)
591
591
  return !1;
592
- for (let e = 0, n = t.length; e < n; e++)
593
- if (!Ee(t[e], s[e]))
592
+ for (let e = 0, i = r.length; e < i; e++)
593
+ if (!Se(r[e], s[e]))
594
594
  return !1;
595
595
  return !0;
596
596
  }
597
- function lr(t, s) {
598
- return Ee(t, s) ? !0 : ve(t) && ve(s) ? cr(t, s) : Array.isArray(t) && Array.isArray(s) ? ur(t, s) : !1;
597
+ function hr(r, s) {
598
+ return Se(r, s) ? !0 : ye(r) && ye(s) ? fr(r, s) : Array.isArray(r) && Array.isArray(s) ? dr(r, s) : !1;
599
599
  }
600
- function Me(t, s) {
601
- return Ee(t, s) ? !0 : ve(t) && ve(s) ? dr(t, s) : Array.isArray(t) && Array.isArray(s) ? fr(t, s) : !1;
600
+ function De(r, s) {
601
+ return Se(r, s) ? !0 : ye(r) && ye(s) ? gr(r, s) : Array.isArray(r) && Array.isArray(s) ? _r(r, s) : !1;
602
602
  }
603
- function fr(t, s) {
604
- if (t.length !== s.length)
603
+ function _r(r, s) {
604
+ if (r.length !== s.length)
605
605
  return !1;
606
- for (let e = 0, n = t.length; e < n; e++)
607
- if (!Me(t[e], s[e]))
606
+ for (let e = 0, i = r.length; e < i; e++)
607
+ if (!De(r[e], s[e]))
608
608
  return !1;
609
609
  return !0;
610
610
  }
611
- function dr(t, s) {
612
- const e = Object.getOwnPropertyNames(t), n = Object.getOwnPropertyNames(s);
613
- if (e.length !== n.length)
611
+ function gr(r, s) {
612
+ const e = Object.getOwnPropertyNames(r), i = Object.getOwnPropertyNames(s);
613
+ if (e.length !== i.length)
614
614
  return !1;
615
- for (let i = 0, a = e.length; i < a; i++) {
616
- const u = e[i];
617
- if (!Me(t[u], s[u]))
615
+ for (let n = 0, c = e.length; n < c; n++) {
616
+ const u = e[n];
617
+ if (!De(r[u], s[u]))
618
618
  return !1;
619
619
  }
620
620
  return !0;
621
621
  }
622
- function st(t, s, e = { deep: !1 }) {
623
- return e.deep ? Me(t, s) : lr(t, s);
622
+ function ot(r, s, e = { deep: !1 }) {
623
+ return e.deep ? De(r, s) : hr(r, s);
624
624
  }
625
- class hr extends ae {
625
+ class mr extends ue {
626
626
  constructor(e) {
627
627
  super();
628
628
  o(this, "_realWebSocket");
@@ -631,9 +631,9 @@ class hr extends ae {
631
631
  o(this, "_readyState", Le.NOTINITIALIZED);
632
632
  o(this, "_options", {
633
633
  timeout: 1e4,
634
- shouldReconnect: (e, n) => {
634
+ shouldReconnect: (e, i) => {
635
635
  if (!(e.code === 1008 || e.code === 1011))
636
- return [0, 3e3, 1e4][n.attempts];
636
+ return [0, 3e3, 1e4][i.attempts % 3];
637
637
  },
638
638
  should1000Reconnect: !1,
639
639
  ignoreConnectivityEvents: !1,
@@ -709,8 +709,8 @@ class hr extends ae {
709
709
  * @returns
710
710
  */
711
711
  o(this, "send", (e) => {
712
- var n, i, a;
713
- ((n = this._realWebSocket) == null ? void 0 : n.readyState) === ((i = this._realWebSocket) == null ? void 0 : i.OPEN) && ((a = this._realWebSocket) == null || a.send(e));
712
+ var i, n, c;
713
+ ((i = this._realWebSocket) == null ? void 0 : i.readyState) === ((n = this._realWebSocket) == null ? void 0 : n.OPEN) && ((c = this._realWebSocket) == null || c.send(e));
714
714
  });
715
715
  /**
716
716
  * 关闭连接
@@ -718,23 +718,23 @@ class hr extends ae {
718
718
  * @param reason 原因
719
719
  * @returns
720
720
  */
721
- o(this, "close", (e, n) => {
722
- var i;
723
- return typeof e != "number" && (n = e, e = 1e3), this._clearPendingReconnectIfNeeded(), this._reconnectWhenOnlineAgain = !1, this._explicitlyClosed = !0, this._detachConnectivityEvents(), (i = this._realWebSocket) == null ? void 0 : i.close(e, n);
721
+ o(this, "close", (e, i) => {
722
+ var n;
723
+ return typeof e != "number" && (i = e, e = 1e3), this._clearPendingReconnectIfNeeded(), this._reconnectWhenOnlineAgain = !1, this._explicitlyClosed = !0, this._detachConnectivityEvents(), (n = this._realWebSocket) == null ? void 0 : n.close(e, i);
724
724
  });
725
725
  /**
726
726
  * 进行ws连接
727
727
  */
728
728
  o(this, "open", (e) => {
729
- var n, i;
730
- e && (this._url = e), ((n = this._realWebSocket) == null ? void 0 : n.readyState) !== WebSocket.OPEN && ((i = this._realWebSocket) == null ? void 0 : i.readyState) !== WebSocket.CONNECTING && (this._clearPendingReconnectIfNeeded(), this._reconnectWhenOnlineAgain = !1, this._explicitlyClosed = !1, this._createWebSocket());
729
+ var i, n;
730
+ e && (this._url = e), ((i = this._realWebSocket) == null ? void 0 : i.readyState) !== WebSocket.OPEN && ((n = this._realWebSocket) == null ? void 0 : n.readyState) !== WebSocket.CONNECTING && (this._clearPendingReconnectIfNeeded(), this._reconnectWhenOnlineAgain = !1, this._explicitlyClosed = !1, this._createWebSocket());
731
731
  });
732
732
  /**
733
733
  * 创建ws连接
734
734
  */
735
735
  o(this, "_createWebSocket", () => {
736
- var i, a, u;
737
- const e = typeof this._url == "string" ? this._url : (i = this._url) == null ? void 0 : i.call(this, this);
736
+ var n, c, u;
737
+ const e = typeof this._url == "string" ? this._url : (n = this._url) == null ? void 0 : n.call(this, this);
738
738
  if (!e)
739
739
  return;
740
740
  this._pendingReconnect = void 0, this._removeWebSocketEvent(), this._realWebSocket = new WebSocket(e, this._protocols || void 0), this._attempts = this._attempts + 1, this.emit(
@@ -743,7 +743,7 @@ class hr extends ae {
743
743
  detail: { attempts: this._attempts, reconnects: this._reconnects }
744
744
  })
745
745
  );
746
- const n = () => {
746
+ const i = () => {
747
747
  this._connectTimeout = void 0, this._detachConnectivityEvents(), this.emit(
748
748
  "timeout",
749
749
  new CustomEvent("connecting", {
@@ -754,36 +754,21 @@ class hr extends ae {
754
754
  })
755
755
  );
756
756
  };
757
- this._connectTimeout = setTimeout(n, (a = this._options) == null ? void 0 : a.timeout), this._dispatchWebSocketEvent(), (u = this._options) != null && u.ignoreConnectivityEvents || this._attachConnectivityEvents();
757
+ this._connectTimeout = setTimeout(i, (c = this._options) == null ? void 0 : c.timeout), this._dispatchWebSocketEvent(), (u = this._options) != null && u.ignoreConnectivityEvents || this._attachConnectivityEvents();
758
758
  });
759
759
  /**
760
760
  * 断开ws事件
761
761
  */
762
762
  o(this, "_removeWebSocketEvent", () => {
763
- var e, n, i, a;
764
- (e = this._realWebSocket) == null || e.removeEventListener(
765
- "open",
766
- this._webSocketOpenHandler
767
- ), (n = this._realWebSocket) == null || n.removeEventListener(
768
- "close",
769
- this._webSocketCloseHandler
770
- ), (i = this._realWebSocket) == null || i.removeEventListener(
771
- "error",
772
- this._webSocketErrorHandler
773
- ), (a = this._realWebSocket) == null || a.removeEventListener(
774
- "message",
775
- this._webSocketMessageHandler
776
- );
763
+ var e, i, n, c;
764
+ (e = this._realWebSocket) == null || e.removeEventListener("open", this._webSocketOpenHandler), (i = this._realWebSocket) == null || i.removeEventListener("close", this._webSocketCloseHandler), (n = this._realWebSocket) == null || n.removeEventListener("error", this._webSocketErrorHandler), (c = this._realWebSocket) == null || c.removeEventListener("message", this._webSocketMessageHandler);
777
765
  });
778
766
  /**
779
767
  * 分发ws事件
780
768
  */
781
769
  o(this, "_dispatchWebSocketEvent", () => {
782
- var e, n, i, a;
783
- (e = this._realWebSocket) == null || e.addEventListener("open", this._webSocketOpenHandler), (n = this._realWebSocket) == null || n.addEventListener("close", this._webSocketCloseHandler), (i = this._realWebSocket) == null || i.addEventListener("error", this._webSocketErrorHandler), (a = this._realWebSocket) == null || a.addEventListener(
784
- "message",
785
- this._webSocketMessageHandler
786
- );
770
+ var e, i, n, c;
771
+ (e = this._realWebSocket) == null || e.addEventListener("open", this._webSocketOpenHandler), (i = this._realWebSocket) == null || i.addEventListener("close", this._webSocketCloseHandler), (n = this._realWebSocket) == null || n.addEventListener("error", this._webSocketErrorHandler), (c = this._realWebSocket) == null || c.addEventListener("message", this._webSocketMessageHandler);
787
772
  });
788
773
  /**
789
774
  * ws连接事件
@@ -791,11 +776,8 @@ class hr extends ae {
791
776
  */
792
777
  o(this, "_webSocketOpenHandler", (e) => {
793
778
  this._connectTimeout && (clearTimeout(this._connectTimeout), this._connectTimeout = void 0);
794
- const n = ++this._reconnects, i = this._attempts;
795
- return this._attempts = 0, this._reconnectWhenOnlineAgain = !1, this._startHealthCheck(), this.emit(
796
- "open",
797
- Object.assign(e, { detail: { reconnects: n, attempts: i } })
798
- );
779
+ const i = ++this._reconnects, n = this._attempts;
780
+ return this._attempts = 0, this._reconnectWhenOnlineAgain = !1, this._startHealthCheck(), this.emit("open", Object.assign(e, { detail: { reconnects: i, attempts: n } }));
799
781
  });
800
782
  /**
801
783
  * ws 关闭事件
@@ -808,10 +790,7 @@ class hr extends ae {
808
790
  * @param event
809
791
  * @returns
810
792
  */
811
- o(this, "_webSocketErrorHandler", (e) => this.emit(
812
- "error",
813
- new CustomEvent("error", { detail: { error: e } })
814
- ));
793
+ o(this, "_webSocketErrorHandler", (e) => this.emit("error", new CustomEvent("error", { detail: { error: e } })));
815
794
  /**
816
795
  * ws消息
817
796
  * @param event
@@ -827,16 +806,14 @@ class hr extends ae {
827
806
  if (!e)
828
807
  return;
829
808
  this._url = e.url, this._protocols = e.protocols;
830
- const n = Object.assign(this._options, e.robustOptions || {});
831
- if (typeof (n == null ? void 0 : n.timeout) != "number")
832
- throw new Error(
833
- "timeout must be the number of milliseconds to timeout a connection attempt"
834
- );
835
- if (typeof (n == null ? void 0 : n.shouldReconnect) != "function")
809
+ const i = Object.assign(this._options, e.robustOptions || {});
810
+ if (typeof (i == null ? void 0 : i.timeout) != "number")
811
+ throw new Error("timeout must be the number of milliseconds to timeout a connection attempt");
812
+ if (typeof (i == null ? void 0 : i.shouldReconnect) != "function")
836
813
  throw new Error(
837
814
  "shouldReconnect must be a function that returns the number of milliseconds to wait for a reconnect attempt, or null or undefined to not reconnect."
838
815
  );
839
- this._options = n, this._options.automaticOpen && this._createWebSocket();
816
+ this._options = i, this._options.automaticOpen && this._createWebSocket();
840
817
  }
841
818
  /**
842
819
  * 进行重连
@@ -844,26 +821,26 @@ class hr extends ae {
844
821
  * @returns
845
822
  */
846
823
  _reconnect(e) {
847
- var i, a, u, f;
848
- if (!((i = this._options) != null && i.should1000Reconnect) && e.code === 1e3 || this._explicitlyClosed) {
824
+ var n, c, u, d;
825
+ if (!((n = this._options) != null && n.should1000Reconnect) && e.code === 1e3 || this._explicitlyClosed) {
849
826
  this._attempts = 0;
850
827
  return;
851
828
  }
852
- if (((a = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : a.onLine) === !1) {
829
+ if (((c = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : c.onLine) === !1) {
853
830
  this._reconnectWhenOnlineAgain = !0;
854
831
  return;
855
832
  }
856
- const n = (f = (u = this._options) == null ? void 0 : u.shouldReconnect) == null ? void 0 : f.call(u, e, this);
857
- typeof n == "number" && (this._pendingReconnect = setTimeout(this._createWebSocket, n));
833
+ const i = (d = (u = this._options) == null ? void 0 : u.shouldReconnect) == null ? void 0 : d.call(u, e, this);
834
+ typeof i == "number" && (this._pendingReconnect = setTimeout(this._createWebSocket, i));
858
835
  }
859
836
  }
860
- class _r extends ae {
837
+ class vr extends ue {
861
838
  constructor() {
862
839
  super();
863
840
  /**
864
841
  * ws代理器
865
842
  */
866
- o(this, "_ws", new hr({
843
+ o(this, "_ws", new mr({
867
844
  url: "",
868
845
  robustOptions: { timeout: 18e4 }
869
846
  }));
@@ -888,8 +865,8 @@ class _r extends ae {
888
865
  * @param event
889
866
  */
890
867
  o(this, "_handleCloseEvent", (e) => {
891
- T.info(
892
- `live room closed bacause of ${e.code}-${e.reason || tr(e.code)}`
868
+ O.info(
869
+ `live room closed bacause of ${e.code}-${e.reason || nr(e.code)}`
893
870
  ), this.state = x.CLOSED;
894
871
  });
895
872
  /**
@@ -897,49 +874,49 @@ class _r extends ae {
897
874
  */
898
875
  o(this, "_handleClosingEvent", () => {
899
876
  var e;
900
- T.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = x.CLOSED;
877
+ O.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = x.CLOSED;
901
878
  });
902
879
  /**
903
880
  * 连接中
904
881
  * @param event
905
882
  */
906
883
  o(this, "_handleConnectingEvent", () => {
907
- T.info("live room is connecting"), this.state = x.CONNECTING;
884
+ O.info("live room is connecting"), this.state = x.CONNECTING;
908
885
  });
909
886
  /**
910
887
  * 连接发送异常
911
888
  * @param event
912
889
  */
913
890
  o(this, "_handleErrorEvent", (e) => {
914
- T.error("live room error", e), this.state = x.CLOSED;
891
+ O.error("live room error", e), this.state = x.CLOSED;
915
892
  });
916
893
  /**
917
894
  * 接收到消息
918
895
  * @param event
919
896
  */
920
897
  o(this, "_handleMessageEvent", (e) => {
921
- let n = (() => {
898
+ let i = (() => {
922
899
  try {
923
900
  return JSON.parse(e.data);
924
- } catch (i) {
901
+ } catch (n) {
925
902
  return e.data;
926
903
  }
927
904
  })();
928
- this.emit("message", n);
905
+ this.emit("message", i);
929
906
  });
930
907
  /**
931
908
  * 连接建立成功
932
909
  * @param event
933
910
  */
934
911
  o(this, "_handleOpenEvent", (e) => {
935
- T.info("live room open", e.detail), this.state = x.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
912
+ O.info("live room open", e.detail), this.state = x.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
936
913
  });
937
914
  /**
938
915
  * 处理超时
939
916
  * @param event
940
917
  */
941
918
  o(this, "_handleTimeoutEvent", (e) => {
942
- T.error("live room connect timeout!", e.detail), this.state = x.CLOSED;
919
+ O.error("live room connect timeout!", e.detail), this.state = x.CLOSED;
943
920
  });
944
921
  /**
945
922
  * 释放资源,释放之后需要重新实例化
@@ -957,14 +934,14 @@ class _r extends ae {
957
934
  * @param code
958
935
  * @param reason
959
936
  */
960
- o(this, "close", (e, n) => new Promise((i) => {
961
- this._ws.once("close", () => i(!0)), this._ws.close(e, n);
937
+ o(this, "close", (e, i) => new Promise((n) => {
938
+ this._ws.once("close", () => n(!0)), this._ws.close(e, i);
962
939
  }));
963
940
  this._addWebSocketEventListeners();
964
941
  }
965
942
  set state(e) {
966
- const n = JSON.parse(JSON.stringify(this._state));
967
- this._state = e, this.emit("stateChange", this.state, n);
943
+ const i = JSON.parse(JSON.stringify(this._state));
944
+ this._state = e, this.emit("stateChange", this.state, i);
968
945
  }
969
946
  get state() {
970
947
  return this._state;
@@ -981,20 +958,20 @@ class _r extends ae {
981
958
  throw new Error("live has not yet been initialized!");
982
959
  }
983
960
  }
984
- const gr = (t) => Promise.reject("unimplemented method GetVoiceSign"), Pe = (t, s = {}, e = []) => ({
985
- command: t,
986
- front_request_id: me(),
961
+ const pr = (r) => Promise.reject("unimplemented method GetVoiceSign"), je = (r, s = {}, e = []) => ({
962
+ command: r,
963
+ front_request_id: Ee(),
987
964
  data: {
988
965
  ...s,
989
966
  to_user_ids: Array.isArray(e) ? e : [e]
990
967
  }
991
- }), mr = () => {
992
- var t, s;
993
- window != null && window.__Realsee_Live__ && ((s = (t = window == null ? void 0 : window.__Realsee_Live__) == null ? void 0 : t.dispose) == null || s.call(t), window.__Realsee_Live__ = null);
968
+ }), Er = () => {
969
+ var r, s;
970
+ window != null && window.__Realsee_Live__ && ((s = (r = window == null ? void 0 : window.__Realsee_Live__) == null ? void 0 : r.dispose) == null || s.call(r), window.__Realsee_Live__ = null);
994
971
  };
995
- class vr extends ae {
972
+ class yr extends ue {
996
973
  constructor(e) {
997
- var n;
974
+ var i;
998
975
  super();
999
976
  /**
1000
977
  * 带看的配置
@@ -1003,7 +980,7 @@ class vr extends ae {
1003
980
  /**
1004
981
  * 帧数据监听
1005
982
  */
1006
- o(this, "keyframes", new ae());
983
+ o(this, "keyframes", new ue());
1007
984
  /**
1008
985
  * 内置的一些数据
1009
986
  */
@@ -1022,24 +999,24 @@ class vr extends ae {
1022
999
  * @param frame 帧数据本体
1023
1000
  * @returns
1024
1001
  */
1025
- o(this, "sendKeyframe", (e, n) => {
1002
+ o(this, "sendKeyframe", (e, i) => {
1026
1003
  if (this.state !== x.OPEN)
1027
1004
  return !1;
1028
1005
  this._buildInData.keyframes = {
1029
1006
  ...this._buildInData.keyframes,
1030
- [e]: n
1007
+ [e]: i
1031
1008
  };
1032
- const i = Pe(W.KeyframeSync, this.snapshot);
1009
+ const n = je(K.KeyframeSync, this.snapshot);
1033
1010
  try {
1034
- return this._controller.sendMessage(i), !0;
1035
- } catch (a) {
1036
- return T.error(a), !1;
1011
+ return this._controller.sendMessage(n), !0;
1012
+ } catch (c) {
1013
+ return O.error(c), !1;
1037
1014
  }
1038
1015
  });
1039
1016
  /**
1040
1017
  * 带看控制器
1041
1018
  */
1042
- o(this, "_controller", new _r());
1019
+ o(this, "_controller", new vr());
1043
1020
  /**
1044
1021
  * 添加带看控制的事件监听
1045
1022
  */
@@ -1057,101 +1034,101 @@ class vr extends ae {
1057
1034
  * @param state
1058
1035
  * @returns
1059
1036
  */
1060
- o(this, "_handleStateChange", (e, n) => this.emit("stateChange", e, n));
1037
+ o(this, "_handleStateChange", (e, i) => this.emit("stateChange", e, i));
1061
1038
  /**
1062
1039
  * 消息接收
1063
1040
  * @param liveMsg
1064
1041
  */
1065
1042
  o(this, "_handleMessage", async (e) => {
1066
- var n, i, a, u, f;
1043
+ var i, n, c, u, d;
1067
1044
  if (typeof e == "object") {
1068
- const { command: _, data: g = {}, frontRequestId: v, code: p, message: S } = e;
1069
- if (p === "SUCCESS")
1070
- switch (_) {
1071
- case W.SelfUserInfo: {
1072
- const m = g;
1073
- st(this.selfInfo, m, { deep: !0 }) || (this._buildInData.selfInfo = m, this.emit(
1045
+ const { command: g, data: v = {}, frontRequestId: E, code: y, message: I } = e;
1046
+ if (y === "SUCCESS")
1047
+ switch (g) {
1048
+ case K.SelfUserInfo: {
1049
+ const _ = v;
1050
+ ot(this.selfInfo, _, { deep: !0 }) || (this._buildInData.selfInfo = _, this.emit(
1074
1051
  "selfInfoUpdate",
1075
1052
  this._buildInData.selfInfo,
1076
- v
1053
+ E
1077
1054
  ));
1078
1055
  break;
1079
1056
  }
1080
- case W.RoomInfo: {
1081
- const m = g;
1082
- this._buildInData.roomInfo = Object.assign({}, m), this.emit(
1057
+ case K.RoomInfo: {
1058
+ const _ = v;
1059
+ this._buildInData.roomInfo = Object.assign({}, _), this.emit(
1083
1060
  "readyKeyframeSync",
1084
- m.last_frame || {}
1061
+ _.last_frame || {}
1085
1062
  );
1086
1063
  break;
1087
1064
  }
1088
- case W.RTCInfo: {
1089
- const { voice_id: m, type: A } = g;
1090
- if (this._buildInData.rtcInfo = { voiceId: m, type: A }, (n = this.$RTC) != null && n.joined)
1091
- T.warn("已加入语音房间,无需重复加入!");
1065
+ case K.RTCInfo: {
1066
+ const { voice_id: _, type: V } = v;
1067
+ if (this._buildInData.rtcInfo = { voiceId: _, type: V }, (i = this.$RTC) != null && i.joined)
1068
+ O.warn("已加入语音房间,无需重复加入!");
1092
1069
  else if (await ((u = this.$RTC) == null ? void 0 : u.join({
1093
- voiceId: m,
1094
- userId: ((i = this.selfInfo) == null ? void 0 : i.id) || "",
1095
- roomId: (a = this.roomInfo) == null ? void 0 : a.info.room_code,
1096
- type: A
1070
+ voiceId: _,
1071
+ userId: ((n = this.selfInfo) == null ? void 0 : n.id) || "",
1072
+ roomId: (c = this.roomInfo) == null ? void 0 : c.info.room_code,
1073
+ type: V
1097
1074
  }))) {
1098
- const P = (f = this._options.initialMicroStatus) != null ? f : Z.OPEN;
1099
- await this.toggleMicro(P === Z.OPEN);
1075
+ const k = (d = this._options.initialMicroStatus) != null ? d : Z.OPEN;
1076
+ await this.toggleMicro(k === Z.OPEN);
1100
1077
  } else
1101
- T.error("加入语音房间失败");
1078
+ O.error("加入语音房间失败");
1102
1079
  break;
1103
1080
  }
1104
- case W.UserList: {
1105
- const m = g;
1106
- this._buildInData.userList = m, this.emit("userListUpdate", this.userList, v);
1081
+ case K.UserList: {
1082
+ const _ = v;
1083
+ this._buildInData.userList = _, this.emit("userListUpdate", this.userList, E);
1107
1084
  break;
1108
1085
  }
1109
- case W.CustomEvent: {
1110
- const m = g;
1111
- this.emit("broadcast", m, v);
1086
+ case K.CustomEvent: {
1087
+ const _ = v;
1088
+ this.emit("broadcast", _, E);
1112
1089
  break;
1113
1090
  }
1114
- case W.KeyframeSync: {
1115
- const m = g, A = Object.keys(
1116
- m
1091
+ case K.KeyframeSync: {
1092
+ const _ = v, V = Object.keys(
1093
+ _
1117
1094
  ).reduce(
1118
- (w, P) => {
1119
- if (st(
1120
- m[P],
1121
- this._buildInData.keyframes[P],
1095
+ (C, k) => {
1096
+ if (ot(
1097
+ _[k],
1098
+ this._buildInData.keyframes[k],
1122
1099
  {
1123
1100
  deep: !0
1124
1101
  }
1125
1102
  ))
1126
- return w;
1127
- const H = [
1128
- m[P],
1129
- this._buildInData.keyframes[P],
1130
- v
1131
- ], J = P;
1103
+ return C;
1104
+ const U = [
1105
+ _[k],
1106
+ this._buildInData.keyframes[k],
1107
+ E
1108
+ ], P = k;
1132
1109
  return this.keyframes.emit(
1133
- J,
1134
- ...H
1135
- ), this._buildInData.keyframes[P] = m[P], w[P] = m[P], w;
1110
+ P,
1111
+ ...U
1112
+ ), this._buildInData.keyframes[k] = _[k], C[k] = _[k], C;
1136
1113
  },
1137
1114
  {}
1138
1115
  );
1139
- this.emit("keyframes", A, v);
1116
+ this.emit("keyframes", V, E);
1140
1117
  break;
1141
1118
  }
1142
- case W.BuiltinMsg: {
1143
- const m = g;
1144
- this.emit("builtinEvent", m), m.event_type === q.UserChange && this.emit("userChange", m), m.event_type === q.RoomChange && this.emit("roomChange", m), m.event_type === q.UserChange && m.action === G.UserMicroStatus && await this.toggleMicro(
1145
- m.data.status === Z.OPEN
1146
- ), m.event_type === q.RoomChange && m.action === G.RoomClose && await this.exit();
1119
+ case K.BuiltinMsg: {
1120
+ const _ = v;
1121
+ this.emit("builtinEvent", _), _.event_type === q.UserChange && this.emit("userChange", _), _.event_type === q.RoomChange && this.emit("roomChange", _), _.event_type === q.UserChange && _.action === H.UserMicroStatus && await this.toggleMicro(
1122
+ _.data.status === Z.OPEN
1123
+ ), _.event_type === q.RoomChange && _.action === H.RoomClose && await this.exit();
1147
1124
  break;
1148
1125
  }
1149
- case W.UserKickOut: {
1126
+ case K.UserKickOut: {
1150
1127
  this.emit("kickOut");
1151
1128
  break;
1152
1129
  }
1153
1130
  default:
1154
- console.warn("unknown command: ", _);
1131
+ console.warn("unknown command: ", g);
1155
1132
  }
1156
1133
  else
1157
1134
  this.emit("error", e);
@@ -1169,28 +1146,28 @@ class vr extends ae {
1169
1146
  * @returns
1170
1147
  */
1171
1148
  o(this, "connect", async (e = {}) => {
1172
- var u, f, _, g;
1173
- if (this._options.url = (f = (u = e.url) != null ? u : this._options.url) != null ? f : "", this._options.getTicket = (_ = e.getTicket) != null ? _ : this._options.getTicket, this._options.initialMicroStatus = (g = e.rtcMicStatus) != null ? g : this._options.initialMicroStatus, !/^ws(s):\/\//.test(this._options.url) || typeof this._options.getTicket != "function")
1149
+ var u, d, g, v;
1150
+ if (this._options.url = (d = (u = e.url) != null ? u : this._options.url) != null ? d : "", this._options.getTicket = (g = e.getTicket) != null ? g : this._options.getTicket, this._options.initialMicroStatus = (v = e.rtcMicStatus) != null ? v : this._options.initialMicroStatus, !/^ws(s):\/\//.test(this._options.url) || typeof this._options.getTicket != "function")
1174
1151
  return /^ws(s):\/\//.test(this._options.url) ? typeof this._options.getTicket != "function" ? new Error("getTicket muse be function") : !1 : new Error("Illegal realsee live room link");
1175
- const { force: n = !1 } = e;
1152
+ const { force: i = !1 } = e;
1176
1153
  if (this._options.rtc && !await this._options.rtc.detectMicro())
1177
1154
  return new Error("Failed to obtain microphone authorization");
1178
- const i = this.state;
1179
- if (i === x.CONNECTING || i === x.OPEN)
1180
- if (n)
1155
+ const n = this.state;
1156
+ if (n === x.CONNECTING || n === x.OPEN)
1157
+ if (i)
1181
1158
  try {
1182
1159
  await this._controller.close("force close by connect");
1183
- } catch (v) {
1184
- console.warn(v);
1160
+ } catch (E) {
1161
+ console.warn(E);
1185
1162
  }
1186
1163
  else
1187
1164
  return new Error("已有Live实例正在连接中,请勿重复连接!");
1188
1165
  this._clearLiveData();
1189
- const a = nr(this._options.url, {
1166
+ const c = or(this._options.url, {
1190
1167
  ticket: await this._options.getTicket(),
1191
- force: Number(!!n)
1168
+ force: Number(!!i)
1192
1169
  });
1193
- return this._controller.open(a), !0;
1170
+ return this._controller.open(c), !0;
1194
1171
  });
1195
1172
  /**
1196
1173
  * 退出带看
@@ -1202,8 +1179,8 @@ class vr extends ae {
1202
1179
  return !0;
1203
1180
  try {
1204
1181
  await ((e = this.$RTC) == null ? void 0 : e.quit());
1205
- } catch (n) {
1206
- T.warn(n);
1182
+ } catch (i) {
1183
+ O.warn(i);
1207
1184
  }
1208
1185
  return await this._controller.close();
1209
1186
  });
@@ -1214,11 +1191,11 @@ class vr extends ae {
1214
1191
  * @returns
1215
1192
  */
1216
1193
  o(this, "close", async () => {
1217
- var e, n;
1218
- if ((n = (e = this.selfInfo) == null ? void 0 : e.permission) != null && n.close_live_room)
1194
+ var e, i;
1195
+ if ((i = (e = this.selfInfo) == null ? void 0 : e.permission) != null && i.close_live_room)
1219
1196
  return await this.updateStatus(
1220
1197
  q.RoomChange,
1221
- G.RoomClose,
1198
+ H.RoomClose,
1222
1199
  {}
1223
1200
  );
1224
1201
  });
@@ -1234,23 +1211,23 @@ class vr extends ae {
1234
1211
  */
1235
1212
  o(this, "setSelfInfo", async (e) => await this.updateStatus(
1236
1213
  q.UserChange,
1237
- G.UserInfo,
1214
+ H.UserInfo,
1238
1215
  e
1239
1216
  ));
1240
1217
  // 仅用于用户自己的麦克风控制
1241
1218
  o(this, "toggleMicro", async (e) => {
1242
- var i, a, u;
1243
- if (!((a = (i = this.selfInfo) == null ? void 0 : i.permission) != null && a.control_own_micro))
1219
+ var n, c, u;
1220
+ if (!((c = (n = this.selfInfo) == null ? void 0 : n.permission) != null && c.control_own_micro))
1244
1221
  return !1;
1245
- const n = await ((u = this.$RTC) == null ? void 0 : u.toggleMicro(e));
1246
- return n && await this.updateStatus(
1222
+ const i = await ((u = this.$RTC) == null ? void 0 : u.toggleMicro(e));
1223
+ return i && await this.updateStatus(
1247
1224
  q.UserChange,
1248
- G.UserMicroStatus,
1225
+ H.UserMicroStatus,
1249
1226
  {
1250
1227
  status: e ? Z.OPEN : Z.CLOSE
1251
1228
  },
1252
1229
  []
1253
- ), n;
1230
+ ), i;
1254
1231
  });
1255
1232
  /**
1256
1233
  * 控制别人的麦
@@ -1258,15 +1235,15 @@ class vr extends ae {
1258
1235
  * @param toUserIds
1259
1236
  * @returns
1260
1237
  */
1261
- o(this, "forbidMicro", async (e, n) => {
1262
- var i, a;
1263
- return typeof this._options.canForbidUserMicro == "function" && !this._options.canForbidUserMicro(n) || !((a = (i = this.selfInfo) == null ? void 0 : i.permission) != null && a.control_other_micro) ? !1 : await this.updateStatus(
1238
+ o(this, "forbidMicro", async (e, i) => {
1239
+ var n, c;
1240
+ return typeof this._options.canForbidUserMicro == "function" && !this._options.canForbidUserMicro(i) || !((c = (n = this.selfInfo) == null ? void 0 : n.permission) != null && c.control_other_micro) ? !1 : await this.updateStatus(
1264
1241
  q.UserChange,
1265
- G.UserMicroStatus,
1242
+ H.UserMicroStatus,
1266
1243
  {
1267
1244
  status: e
1268
1245
  },
1269
- n
1246
+ i
1270
1247
  );
1271
1248
  });
1272
1249
  /**
@@ -1275,13 +1252,13 @@ class vr extends ae {
1275
1252
  * @param toUserIds
1276
1253
  * @returns
1277
1254
  */
1278
- o(this, "forbidSync", async (e, n) => {
1279
- var i, a;
1280
- return typeof this._options.canForbidUserSync == "function" && !this._options.canForbidUserSync(n) || !((a = (i = this.selfInfo) == null ? void 0 : i.permission) != null && a.control_other_sync) ? !1 : await this.updateStatus(
1255
+ o(this, "forbidSync", async (e, i) => {
1256
+ var n, c;
1257
+ return typeof this._options.canForbidUserSync == "function" && !this._options.canForbidUserSync(i) || !((c = (n = this.selfInfo) == null ? void 0 : n.permission) != null && c.control_other_sync) ? !1 : await this.updateStatus(
1281
1258
  q.UserChange,
1282
- G.UserPermission,
1259
+ H.UserPermission,
1283
1260
  { sync_frame: e },
1284
- n
1261
+ i
1285
1262
  );
1286
1263
  });
1287
1264
  /**
@@ -1290,10 +1267,10 @@ class vr extends ae {
1290
1267
  * @returns
1291
1268
  */
1292
1269
  o(this, "kick", async (e) => {
1293
- var n, i;
1294
- return typeof this._options.canForbidUserKick == "function" && !this._options.canForbidUserKick(e) || !((i = (n = this.selfInfo) == null ? void 0 : n.permission) != null && i.change_other_status) ? !1 : await this.updateStatus(
1270
+ var i, n;
1271
+ return typeof this._options.canForbidUserKick == "function" && !this._options.canForbidUserKick(e) || !((n = (i = this.selfInfo) == null ? void 0 : i.permission) != null && n.change_other_status) ? !1 : await this.updateStatus(
1295
1272
  q.UserChange,
1296
- G.UserStatus,
1273
+ H.UserStatus,
1297
1274
  {
1298
1275
  status: "KICK_OUT"
1299
1276
  },
@@ -1307,12 +1284,12 @@ class vr extends ae {
1307
1284
  if (e.jsBridge)
1308
1285
  return e.jsBridge;
1309
1286
  if (e.useBuiltInJsBridge)
1310
- return new Mt();
1311
- })(), this._options.getVoiceSign = (n = e.getVoiceSign) != null ? n : gr, this._options.autoPlayConfirm = e.autoPlayConfirm, this._options.rtc = (() => {
1287
+ return new xt();
1288
+ })(), this._options.getVoiceSign = (i = e.getVoiceSign) != null ? i : pr, this._options.autoPlayConfirm = e.autoPlayConfirm, this._options.rtc = (() => {
1312
1289
  if (e.rtc)
1313
1290
  return e.rtc;
1314
1291
  if (e.rtcType)
1315
- switch (e.getVoiceSign || T.error(
1292
+ switch (e.getVoiceSign || O.error(
1316
1293
  "GetVoiceSign method must be passed when using built-in RTC instances"
1317
1294
  ), e.rtcType) {
1318
1295
  case Q.RealseeVRWebViewRTC: {
@@ -1321,47 +1298,47 @@ class vr extends ae {
1321
1298
  jsBridge: this._options.jsBridge,
1322
1299
  getVoiceSign: this._options.getVoiceSign
1323
1300
  });
1324
- T.error(
1301
+ O.error(
1325
1302
  "JsBridge instance must be passed when using built-in VRWebViewRTC instances"
1326
1303
  );
1327
1304
  return;
1328
1305
  }
1329
1306
  case Q.RealseeBrowserChimeRTC:
1330
- return new rt({
1307
+ return new it({
1331
1308
  getVoiceSign: this._options.getVoiceSign,
1332
- logLevel: e.__debug__ ? it.DEBUG : it.INFO
1309
+ logLevel: e.__debug__ ? st.DEBUG : st.INFO
1333
1310
  });
1334
1311
  case Q.RealseeBrowserRTC:
1335
- return this._options.autoPlayConfirm || T.error(
1312
+ return this._options.autoPlayConfirm || O.error(
1336
1313
  "autoPlayConfirm method must be passed when using built-in RealseeBrowserRTC instances"
1337
- ), new tt({
1314
+ ), new rt({
1338
1315
  getVoiceSign: this._options.getVoiceSign,
1339
1316
  autoPlayConfirm: this._options.autoPlayConfirm
1340
1317
  });
1341
1318
  default: {
1342
- T.error("unknown built-in RTC type");
1319
+ O.error("unknown built-in RTC type");
1343
1320
  return;
1344
1321
  }
1345
1322
  }
1346
1323
  if (e.useBuiltInRTC) {
1347
- if (e.getVoiceSign || T.error(
1324
+ if (e.getVoiceSign || O.error(
1348
1325
  "GetVoiceSign method must be passed when using built-in RTC instances"
1349
1326
  ), this._options.jsBridge)
1350
- return ar && (ir || sr) || or ? new nt({
1327
+ return lr && (ar || cr) || ur ? new nt({
1351
1328
  jsBridge: this._options.jsBridge,
1352
1329
  getVoiceSign: this._options.getVoiceSign
1353
- }) : e.builtInRTCType === ut.RealseeXChimeRTC ? new rt({
1330
+ }) : e.builtInRTCType === ut.RealseeXChimeRTC ? new it({
1354
1331
  getVoiceSign: this._options.getVoiceSign
1355
- }) : new tt({
1332
+ }) : new rt({
1356
1333
  getVoiceSign: this._options.getVoiceSign,
1357
1334
  autoPlayConfirm: this._options.autoPlayConfirm
1358
1335
  });
1359
- T.error(
1336
+ O.error(
1360
1337
  "jsBridge instance must be passed when using built-in RTC instances"
1361
1338
  );
1362
1339
  return;
1363
1340
  }
1364
- })(), this._options.rtc || T.warn("unused rtc"), this._options.url && this._options.getTicket && this.connect(), this._options.__debug__ && Object.assign(window, { $liveController: this._controller, $live: this });
1341
+ })(), this._options.rtc || O.warn("unused rtc"), this._options.url && this._options.getTicket && this.connect(), this._options.__debug__ && Object.assign(window, { $liveController: this._controller, $live: this });
1365
1342
  }
1366
1343
  get options() {
1367
1344
  return Object.freeze(this._options || {});
@@ -1430,17 +1407,17 @@ class vr extends ae {
1430
1407
  * @param toUserIds
1431
1408
  * @returns
1432
1409
  */
1433
- async updateStatus(e, n, i, a) {
1410
+ async updateStatus(e, i, n, c) {
1434
1411
  if (this.state !== x.OPEN)
1435
1412
  return !1;
1436
1413
  const u = Object.assign(
1437
- { event_type: e, action: n },
1438
- { data: i }
1439
- ), f = Pe(W.BuiltinMsg, u, a);
1414
+ { event_type: e, action: i },
1415
+ { data: n }
1416
+ ), d = je(K.BuiltinMsg, u, c);
1440
1417
  try {
1441
- return this._controller.sendMessage(f), !0;
1442
- } catch (_) {
1443
- return T.error(_), !1;
1418
+ return this._controller.sendMessage(d), !0;
1419
+ } catch (g) {
1420
+ return O.error(g), !1;
1444
1421
  }
1445
1422
  }
1446
1423
  /**
@@ -1450,88 +1427,37 @@ class vr extends ae {
1450
1427
  * @param timeout
1451
1428
  * @returns
1452
1429
  */
1453
- broadcast(e, n, i) {
1454
- return this.state !== x.OPEN ? !1 : new Promise((a, u) => {
1455
- const f = Pe(
1456
- W.CustomEvent,
1430
+ broadcast(e, i, n) {
1431
+ return this.state !== x.OPEN ? !1 : new Promise((c, u) => {
1432
+ const d = je(
1433
+ K.CustomEvent,
1457
1434
  e,
1458
- n
1459
- ), _ = f.front_request_id, g = i ? setTimeout(() => {
1460
- u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", v);
1461
- }, i) : void 0, v = (p, S) => {
1462
- S === _ && (g && clearTimeout(g), this.off("broadcast", v), a(p));
1435
+ i
1436
+ ), g = d.front_request_id, v = n ? setTimeout(() => {
1437
+ u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", E);
1438
+ }, n) : void 0, E = (y, I) => {
1439
+ I === g && (v && clearTimeout(v), this.off("broadcast", E), c(y));
1463
1440
  };
1464
- this.on("broadcast", v);
1441
+ this.on("broadcast", E);
1465
1442
  try {
1466
- this._controller.sendMessage(f);
1467
- } catch (p) {
1468
- u(p);
1443
+ this._controller.sendMessage(d);
1444
+ } catch (y) {
1445
+ u(y);
1469
1446
  }
1470
1447
  });
1471
1448
  }
1472
1449
  }
1473
- const pr = (t) => (mr(), new vr(t));
1474
- var Ae = {}, Er = {
1450
+ const br = (r) => (Er(), new yr(r));
1451
+ var Ae = {}, Sr = {
1475
1452
  get exports() {
1476
1453
  return Ae;
1477
1454
  },
1478
- set exports(t) {
1479
- Ae = t;
1480
- }
1481
- }, ie = {};
1482
- /*
1483
- object-assign
1484
- (c) Sindre Sorhus
1485
- @license MIT
1486
- */
1487
- var je, ot;
1488
- function dt() {
1489
- if (ot)
1490
- return je;
1491
- ot = 1;
1492
- var t = Object.getOwnPropertySymbols, s = Object.prototype.hasOwnProperty, e = Object.prototype.propertyIsEnumerable;
1493
- function n(a) {
1494
- if (a == null)
1495
- throw new TypeError("Object.assign cannot be called with null or undefined");
1496
- return Object(a);
1497
- }
1498
- function i() {
1499
- try {
1500
- if (!Object.assign)
1501
- return !1;
1502
- var a = new String("abc");
1503
- if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
1504
- return !1;
1505
- for (var u = {}, f = 0; f < 10; f++)
1506
- u["_" + String.fromCharCode(f)] = f;
1507
- var _ = Object.getOwnPropertyNames(u).map(function(v) {
1508
- return u[v];
1509
- });
1510
- if (_.join("") !== "0123456789")
1511
- return !1;
1512
- var g = {};
1513
- return "abcdefghijklmnopqrst".split("").forEach(function(v) {
1514
- g[v] = v;
1515
- }), Object.keys(Object.assign({}, g)).join("") === "abcdefghijklmnopqrst";
1516
- } catch (v) {
1517
- return !1;
1518
- }
1455
+ set exports(r) {
1456
+ Ae = r;
1519
1457
  }
1520
- return je = i() ? Object.assign : function(a, u) {
1521
- for (var f, _ = n(a), g, v = 1; v < arguments.length; v++) {
1522
- f = Object(arguments[v]);
1523
- for (var p in f)
1524
- s.call(f, p) && (_[p] = f[p]);
1525
- if (t) {
1526
- g = t(f);
1527
- for (var S = 0; S < g.length; S++)
1528
- e.call(f, g[S]) && (_[g[S]] = f[g[S]]);
1529
- }
1530
- }
1531
- return _;
1532
- }, je;
1533
- }
1534
- /** @license React v17.0.2
1458
+ }, oe = {};
1459
+ /**
1460
+ * @license React
1535
1461
  * react-jsx-runtime.production.min.js
1536
1462
  *
1537
1463
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1540,30 +1466,26 @@ function dt() {
1540
1466
  * LICENSE file in the root directory of this source tree.
1541
1467
  */
1542
1468
  var at;
1543
- function br() {
1469
+ function Cr() {
1544
1470
  if (at)
1545
- return ie;
1546
- at = 1, dt();
1547
- var t = V, s = 60103;
1548
- if (ie.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
1549
- var e = Symbol.for;
1550
- s = e("react.element"), ie.Fragment = e("react.fragment");
1551
- }
1552
- var n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = Object.prototype.hasOwnProperty, a = { key: !0, ref: !0, __self: !0, __source: !0 };
1553
- function u(f, _, g) {
1554
- var v, p = {}, S = null, m = null;
1555
- g !== void 0 && (S = "" + g), _.key !== void 0 && (S = "" + _.key), _.ref !== void 0 && (m = _.ref);
1556
- for (v in _)
1557
- i.call(_, v) && !a.hasOwnProperty(v) && (p[v] = _[v]);
1558
- if (f && f.defaultProps)
1559
- for (v in _ = f.defaultProps, _)
1560
- p[v] === void 0 && (p[v] = _[v]);
1561
- return { $$typeof: s, type: f, key: S, ref: m, props: p, _owner: n.current };
1562
- }
1563
- return ie.jsx = u, ie.jsxs = u, ie;
1471
+ return oe;
1472
+ at = 1;
1473
+ var r = D, s = Symbol.for("react.element"), e = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, n = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
1474
+ function u(d, g, v) {
1475
+ var E, y = {}, I = null, _ = null;
1476
+ v !== void 0 && (I = "" + v), g.key !== void 0 && (I = "" + g.key), g.ref !== void 0 && (_ = g.ref);
1477
+ for (E in g)
1478
+ i.call(g, E) && !c.hasOwnProperty(E) && (y[E] = g[E]);
1479
+ if (d && d.defaultProps)
1480
+ for (E in g = d.defaultProps, g)
1481
+ y[E] === void 0 && (y[E] = g[E]);
1482
+ return { $$typeof: s, type: d, key: I, ref: _, props: y, _owner: n.current };
1483
+ }
1484
+ return oe.Fragment = e, oe.jsx = u, oe.jsxs = u, oe;
1564
1485
  }
1565
- var Ne = {};
1566
- /** @license React v17.0.2
1486
+ var ae = {};
1487
+ /**
1488
+ * @license React
1567
1489
  * react-jsx-runtime.development.js
1568
1490
  *
1569
1491
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1572,706 +1494,726 @@ var Ne = {};
1572
1494
  * LICENSE file in the root directory of this source tree.
1573
1495
  */
1574
1496
  var ct;
1575
- function yr() {
1576
- return ct || (ct = 1, function(t) {
1577
- process.env.NODE_ENV !== "production" && function() {
1578
- var s = V, e = dt(), n = 60103, i = 60106;
1579
- t.Fragment = 60107;
1580
- var a = 60108, u = 60114, f = 60109, _ = 60110, g = 60112, v = 60113, p = 60120, S = 60115, m = 60116, A = 60121, w = 60122, P = 60117, H = 60129, J = 60131;
1581
- if (typeof Symbol == "function" && Symbol.for) {
1582
- var k = Symbol.for;
1583
- n = k("react.element"), i = k("react.portal"), t.Fragment = k("react.fragment"), a = k("react.strict_mode"), u = k("react.profiler"), f = k("react.provider"), _ = k("react.context"), g = k("react.forward_ref"), v = k("react.suspense"), p = k("react.suspense_list"), S = k("react.memo"), m = k("react.lazy"), A = k("react.block"), w = k("react.server.block"), P = k("react.fundamental"), k("react.scope"), k("react.opaque.id"), H = k("react.debug_trace_mode"), k("react.offscreen"), J = k("react.legacy_hidden");
1584
- }
1585
- var d = typeof Symbol == "function" && Symbol.iterator, O = "@@iterator";
1586
- function D(r) {
1587
- if (r === null || typeof r != "object")
1588
- return null;
1589
- var c = d && r[d] || r[O];
1590
- return typeof c == "function" ? c : null;
1591
- }
1592
- var b = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1593
- function y(r) {
1594
- {
1595
- for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), h = 1; h < c; h++)
1596
- l[h - 1] = arguments[h];
1597
- M("error", r, l);
1598
- }
1599
- }
1600
- function M(r, c, l) {
1601
- {
1602
- var h = b.ReactDebugCurrentFrame, R = h.getStackAddendum();
1603
- R !== "" && (c += "%s", l = l.concat([R]));
1604
- var I = l.map(function(C) {
1605
- return "" + C;
1606
- });
1607
- I.unshift("Warning: " + c), Function.prototype.apply.call(console[r], console, I);
1608
- }
1609
- }
1610
- var U = !1;
1611
- function z(r) {
1612
- return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r === H || r === a || r === v || r === p || r === J || U || typeof r == "object" && r !== null && (r.$$typeof === m || r.$$typeof === S || r.$$typeof === f || r.$$typeof === _ || r.$$typeof === g || r.$$typeof === P || r.$$typeof === A || r[0] === w));
1497
+ function wr() {
1498
+ return ct || (ct = 1, process.env.NODE_ENV !== "production" && function() {
1499
+ var r = D, s = Symbol.for("react.element"), e = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), V = Symbol.iterator, C = "@@iterator";
1500
+ function k(t) {
1501
+ if (t === null || typeof t != "object")
1502
+ return null;
1503
+ var a = V && t[V] || t[C];
1504
+ return typeof a == "function" ? a : null;
1505
+ }
1506
+ var U = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1507
+ function P(t) {
1508
+ {
1509
+ for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), h = 1; h < a; h++)
1510
+ l[h - 1] = arguments[h];
1511
+ fe("error", t, l);
1613
1512
  }
1614
- function ue(r, c, l) {
1615
- var h = c.displayName || c.name || "";
1616
- return r.displayName || (h !== "" ? l + "(" + h + ")" : l);
1513
+ }
1514
+ function fe(t, a, l) {
1515
+ {
1516
+ var h = U.ReactDebugCurrentFrame, b = h.getStackAddendum();
1517
+ b !== "" && (a += "%s", l = l.concat([b]));
1518
+ var R = l.map(function(p) {
1519
+ return String(p);
1520
+ });
1521
+ R.unshift("Warning: " + a), Function.prototype.apply.call(console[t], console, R);
1617
1522
  }
1618
- function be(r) {
1619
- return r.displayName || "Context";
1523
+ }
1524
+ var f = !1, w = !1, A = !1, S = !1, N = !1, M;
1525
+ M = Symbol.for("react.module.reference");
1526
+ function F(t) {
1527
+ return !!(typeof t == "string" || typeof t == "function" || t === i || t === c || N || t === n || t === v || t === E || S || t === _ || f || w || A || typeof t == "object" && t !== null && (t.$$typeof === I || t.$$typeof === y || t.$$typeof === u || t.$$typeof === d || t.$$typeof === g || // This needs to include all possible module reference object
1528
+ // types supported by any Flight configuration anywhere since
1529
+ // we don't know which Flight build this will end up being used
1530
+ // with.
1531
+ t.$$typeof === M || t.getModuleId !== void 0));
1532
+ }
1533
+ function J(t, a, l) {
1534
+ var h = t.displayName;
1535
+ if (h)
1536
+ return h;
1537
+ var b = a.displayName || a.name || "";
1538
+ return b !== "" ? l + "(" + b + ")" : l;
1539
+ }
1540
+ function ne(t) {
1541
+ return t.displayName || "Context";
1542
+ }
1543
+ function G(t) {
1544
+ if (t == null)
1545
+ return null;
1546
+ if (typeof t.tag == "number" && P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
1547
+ return t.displayName || t.name || null;
1548
+ if (typeof t == "string")
1549
+ return t;
1550
+ switch (t) {
1551
+ case i:
1552
+ return "Fragment";
1553
+ case e:
1554
+ return "Portal";
1555
+ case c:
1556
+ return "Profiler";
1557
+ case n:
1558
+ return "StrictMode";
1559
+ case v:
1560
+ return "Suspense";
1561
+ case E:
1562
+ return "SuspenseList";
1620
1563
  }
1621
- function F(r) {
1622
- if (r == null)
1623
- return null;
1624
- if (typeof r.tag == "number" && y("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof r == "function")
1625
- return r.displayName || r.name || null;
1626
- if (typeof r == "string")
1627
- return r;
1628
- switch (r) {
1629
- case t.Fragment:
1630
- return "Fragment";
1631
- case i:
1632
- return "Portal";
1564
+ if (typeof t == "object")
1565
+ switch (t.$$typeof) {
1566
+ case d:
1567
+ var a = t;
1568
+ return ne(a) + ".Consumer";
1633
1569
  case u:
1634
- return "Profiler";
1635
- case a:
1636
- return "StrictMode";
1637
- case v:
1638
- return "Suspense";
1639
- case p:
1640
- return "SuspenseList";
1641
- }
1642
- if (typeof r == "object")
1643
- switch (r.$$typeof) {
1644
- case _:
1645
- var c = r;
1646
- return be(c) + ".Consumer";
1647
- case f:
1648
- var l = r;
1649
- return be(l._context) + ".Provider";
1650
- case g:
1651
- return ue(r, r.render, "ForwardRef");
1652
- case S:
1653
- return F(r.type);
1654
- case A:
1655
- return F(r._render);
1656
- case m: {
1657
- var h = r, R = h._payload, I = h._init;
1658
- try {
1659
- return F(I(R));
1660
- } catch (C) {
1661
- return null;
1662
- }
1570
+ var l = t;
1571
+ return ne(l._context) + ".Provider";
1572
+ case g:
1573
+ return J(t, t.render, "ForwardRef");
1574
+ case y:
1575
+ var h = t.displayName || null;
1576
+ return h !== null ? h : G(t.type) || "Memo";
1577
+ case I: {
1578
+ var b = t, R = b._payload, p = b._init;
1579
+ try {
1580
+ return G(p(R));
1581
+ } catch (m) {
1582
+ return null;
1663
1583
  }
1664
1584
  }
1665
- return null;
1666
- }
1667
- var ee = 0, j, B, te, le, Ve, $e, xe;
1668
- function Ue() {
1669
- }
1670
- Ue.__reactDisabledLog = !0;
1671
- function ht() {
1672
- {
1673
- if (ee === 0) {
1674
- j = console.log, B = console.info, te = console.warn, le = console.error, Ve = console.group, $e = console.groupCollapsed, xe = console.groupEnd;
1675
- var r = {
1676
- configurable: !0,
1677
- enumerable: !0,
1678
- value: Ue,
1679
- writable: !0
1680
- };
1681
- Object.defineProperties(console, {
1682
- info: r,
1683
- log: r,
1684
- warn: r,
1685
- error: r,
1686
- group: r,
1687
- groupCollapsed: r,
1688
- groupEnd: r
1689
- });
1690
- }
1691
- ee++;
1692
1585
  }
1693
- }
1694
- function _t() {
1695
- {
1696
- if (ee--, ee === 0) {
1697
- var r = {
1698
- configurable: !0,
1699
- enumerable: !0,
1700
- writable: !0
1701
- };
1702
- Object.defineProperties(console, {
1703
- log: e({}, r, {
1704
- value: j
1705
- }),
1706
- info: e({}, r, {
1707
- value: B
1708
- }),
1709
- warn: e({}, r, {
1710
- value: te
1711
- }),
1712
- error: e({}, r, {
1713
- value: le
1714
- }),
1715
- group: e({}, r, {
1716
- value: Ve
1717
- }),
1718
- groupCollapsed: e({}, r, {
1719
- value: $e
1720
- }),
1721
- groupEnd: e({}, r, {
1722
- value: xe
1723
- })
1724
- });
1725
- }
1726
- ee < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1586
+ return null;
1587
+ }
1588
+ var z = Object.assign, ee = 0, T, B, te, de, Ve, $e, xe;
1589
+ function Ue() {
1590
+ }
1591
+ Ue.__reactDisabledLog = !0;
1592
+ function dt() {
1593
+ {
1594
+ if (ee === 0) {
1595
+ T = console.log, B = console.info, te = console.warn, de = console.error, Ve = console.group, $e = console.groupCollapsed, xe = console.groupEnd;
1596
+ var t = {
1597
+ configurable: !0,
1598
+ enumerable: !0,
1599
+ value: Ue,
1600
+ writable: !0
1601
+ };
1602
+ Object.defineProperties(console, {
1603
+ info: t,
1604
+ log: t,
1605
+ warn: t,
1606
+ error: t,
1607
+ group: t,
1608
+ groupCollapsed: t,
1609
+ groupEnd: t
1610
+ });
1727
1611
  }
1612
+ ee++;
1728
1613
  }
1729
- var ye = b.ReactCurrentDispatcher, Ce;
1730
- function fe(r, c, l) {
1731
- {
1732
- if (Ce === void 0)
1733
- try {
1734
- throw Error();
1735
- } catch (R) {
1736
- var h = R.stack.trim().match(/\n( *(at )?)/);
1737
- Ce = h && h[1] || "";
1738
- }
1739
- return `
1740
- ` + Ce + r;
1614
+ }
1615
+ function ht() {
1616
+ {
1617
+ if (ee--, ee === 0) {
1618
+ var t = {
1619
+ configurable: !0,
1620
+ enumerable: !0,
1621
+ writable: !0
1622
+ };
1623
+ Object.defineProperties(console, {
1624
+ log: z({}, t, {
1625
+ value: T
1626
+ }),
1627
+ info: z({}, t, {
1628
+ value: B
1629
+ }),
1630
+ warn: z({}, t, {
1631
+ value: te
1632
+ }),
1633
+ error: z({}, t, {
1634
+ value: de
1635
+ }),
1636
+ group: z({}, t, {
1637
+ value: Ve
1638
+ }),
1639
+ groupCollapsed: z({}, t, {
1640
+ value: $e
1641
+ }),
1642
+ groupEnd: z({}, t, {
1643
+ value: xe
1644
+ })
1645
+ });
1741
1646
  }
1647
+ ee < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1742
1648
  }
1743
- var Se = !1, de;
1649
+ }
1650
+ var Ce = U.ReactCurrentDispatcher, we;
1651
+ function he(t, a, l) {
1744
1652
  {
1745
- var gt = typeof WeakMap == "function" ? WeakMap : Map;
1746
- de = new gt();
1653
+ if (we === void 0)
1654
+ try {
1655
+ throw Error();
1656
+ } catch (b) {
1657
+ var h = b.stack.trim().match(/\n( *(at )?)/);
1658
+ we = h && h[1] || "";
1659
+ }
1660
+ return `
1661
+ ` + we + t;
1747
1662
  }
1748
- function Be(r, c) {
1749
- if (!r || Se)
1750
- return "";
1751
- {
1752
- var l = de.get(r);
1753
- if (l !== void 0)
1754
- return l;
1755
- }
1756
- var h;
1757
- Se = !0;
1758
- var R = Error.prepareStackTrace;
1759
- Error.prepareStackTrace = void 0;
1760
- var I;
1761
- I = ye.current, ye.current = null, ht();
1762
- try {
1763
- if (c) {
1764
- var C = function() {
1663
+ }
1664
+ var Re = !1, _e;
1665
+ {
1666
+ var _t = typeof WeakMap == "function" ? WeakMap : Map;
1667
+ _e = new _t();
1668
+ }
1669
+ function Fe(t, a) {
1670
+ if (!t || Re)
1671
+ return "";
1672
+ {
1673
+ var l = _e.get(t);
1674
+ if (l !== void 0)
1675
+ return l;
1676
+ }
1677
+ var h;
1678
+ Re = !0;
1679
+ var b = Error.prepareStackTrace;
1680
+ Error.prepareStackTrace = void 0;
1681
+ var R;
1682
+ R = Ce.current, Ce.current = null, dt();
1683
+ try {
1684
+ if (a) {
1685
+ var p = function() {
1686
+ throw Error();
1687
+ };
1688
+ if (Object.defineProperty(p.prototype, "props", {
1689
+ set: function() {
1765
1690
  throw Error();
1766
- };
1767
- if (Object.defineProperty(C.prototype, "props", {
1768
- set: function() {
1769
- throw Error();
1770
- }
1771
- }), typeof Reflect == "object" && Reflect.construct) {
1772
- try {
1773
- Reflect.construct(C, []);
1774
- } catch (Y) {
1775
- h = Y;
1776
- }
1777
- Reflect.construct(r, [], C);
1778
- } else {
1779
- try {
1780
- C.call();
1781
- } catch (Y) {
1782
- h = Y;
1783
- }
1784
- r.call(C.prototype);
1785
1691
  }
1692
+ }), typeof Reflect == "object" && Reflect.construct) {
1693
+ try {
1694
+ Reflect.construct(p, []);
1695
+ } catch (Y) {
1696
+ h = Y;
1697
+ }
1698
+ Reflect.construct(t, [], p);
1786
1699
  } else {
1787
1700
  try {
1788
- throw Error();
1701
+ p.call();
1789
1702
  } catch (Y) {
1790
1703
  h = Y;
1791
1704
  }
1792
- r();
1705
+ t.call(p.prototype);
1793
1706
  }
1794
- } catch (Y) {
1795
- if (Y && h && typeof Y.stack == "string") {
1796
- for (var E = Y.stack.split(`
1797
- `), $ = h.stack.split(`
1798
- `), N = E.length - 1, L = $.length - 1; N >= 1 && L >= 0 && E[N] !== $[L]; )
1799
- L--;
1800
- for (; N >= 1 && L >= 0; N--, L--)
1801
- if (E[N] !== $[L]) {
1802
- if (N !== 1 || L !== 1)
1803
- do
1804
- if (N--, L--, L < 0 || E[N] !== $[L]) {
1805
- var K = `
1806
- ` + E[N].replace(" at new ", " at ");
1807
- return typeof r == "function" && de.set(r, K), K;
1808
- }
1809
- while (N >= 1 && L >= 0);
1810
- break;
1811
- }
1707
+ } else {
1708
+ try {
1709
+ throw Error();
1710
+ } catch (Y) {
1711
+ h = Y;
1812
1712
  }
1813
- } finally {
1814
- Se = !1, ye.current = I, _t(), Error.prepareStackTrace = R;
1713
+ t();
1815
1714
  }
1816
- var ne = r ? r.displayName || r.name : "", Qe = ne ? fe(ne) : "";
1817
- return typeof r == "function" && de.set(r, Qe), Qe;
1818
- }
1819
- function We(r, c, l) {
1820
- return Be(r, !1);
1715
+ } catch (Y) {
1716
+ if (Y && h && typeof Y.stack == "string") {
1717
+ for (var m = Y.stack.split(`
1718
+ `), $ = h.stack.split(`
1719
+ `), j = m.length - 1, L = $.length - 1; j >= 1 && L >= 0 && m[j] !== $[L]; )
1720
+ L--;
1721
+ for (; j >= 1 && L >= 0; j--, L--)
1722
+ if (m[j] !== $[L]) {
1723
+ if (j !== 1 || L !== 1)
1724
+ do
1725
+ if (j--, L--, L < 0 || m[j] !== $[L]) {
1726
+ var W = `
1727
+ ` + m[j].replace(" at new ", " at ");
1728
+ return t.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", t.displayName)), typeof t == "function" && _e.set(t, W), W;
1729
+ }
1730
+ while (j >= 1 && L >= 0);
1731
+ break;
1732
+ }
1733
+ }
1734
+ } finally {
1735
+ Re = !1, Ce.current = R, ht(), Error.prepareStackTrace = b;
1821
1736
  }
1822
- function mt(r) {
1823
- var c = r.prototype;
1824
- return !!(c && c.isReactComponent);
1737
+ var ie = t ? t.displayName || t.name : "", et = ie ? he(ie) : "";
1738
+ return typeof t == "function" && _e.set(t, et), et;
1739
+ }
1740
+ function gt(t, a, l) {
1741
+ return Fe(t, !1);
1742
+ }
1743
+ function mt(t) {
1744
+ var a = t.prototype;
1745
+ return !!(a && a.isReactComponent);
1746
+ }
1747
+ function ge(t, a, l) {
1748
+ if (t == null)
1749
+ return "";
1750
+ if (typeof t == "function")
1751
+ return Fe(t, mt(t));
1752
+ if (typeof t == "string")
1753
+ return he(t);
1754
+ switch (t) {
1755
+ case v:
1756
+ return he("Suspense");
1757
+ case E:
1758
+ return he("SuspenseList");
1825
1759
  }
1826
- function he(r, c, l) {
1827
- if (r == null)
1828
- return "";
1829
- if (typeof r == "function")
1830
- return Be(r, mt(r));
1831
- if (typeof r == "string")
1832
- return fe(r);
1833
- switch (r) {
1834
- case v:
1835
- return fe("Suspense");
1836
- case p:
1837
- return fe("SuspenseList");
1760
+ if (typeof t == "object")
1761
+ switch (t.$$typeof) {
1762
+ case g:
1763
+ return gt(t.render);
1764
+ case y:
1765
+ return ge(t.type, a, l);
1766
+ case I: {
1767
+ var h = t, b = h._payload, R = h._init;
1768
+ try {
1769
+ return ge(R(b), a, l);
1770
+ } catch (p) {
1771
+ }
1772
+ }
1838
1773
  }
1839
- if (typeof r == "object")
1840
- switch (r.$$typeof) {
1841
- case g:
1842
- return We(r.render);
1843
- case S:
1844
- return he(r.type, c, l);
1845
- case A:
1846
- return We(r._render);
1847
- case m: {
1848
- var h = r, R = h._payload, I = h._init;
1849
- try {
1850
- return he(I(R), c, l);
1851
- } catch (C) {
1774
+ return "";
1775
+ }
1776
+ var me = Object.prototype.hasOwnProperty, Be = {}, We = U.ReactDebugCurrentFrame;
1777
+ function ve(t) {
1778
+ if (t) {
1779
+ var a = t._owner, l = ge(t.type, t._source, a ? a.type : null);
1780
+ We.setExtraStackFrame(l);
1781
+ } else
1782
+ We.setExtraStackFrame(null);
1783
+ }
1784
+ function vt(t, a, l, h, b) {
1785
+ {
1786
+ var R = Function.call.bind(me);
1787
+ for (var p in t)
1788
+ if (R(t, p)) {
1789
+ var m = void 0;
1790
+ try {
1791
+ if (typeof t[p] != "function") {
1792
+ var $ = Error((h || "React class") + ": " + l + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1793
+ throw $.name = "Invariant Violation", $;
1852
1794
  }
1795
+ m = t[p](a, p, h, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1796
+ } catch (j) {
1797
+ m = j;
1853
1798
  }
1799
+ m && !(m instanceof Error) && (ve(b), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", l, p, typeof m), ve(null)), m instanceof Error && !(m.message in Be) && (Be[m.message] = !0, ve(b), P("Failed %s type: %s", l, m.message), ve(null));
1854
1800
  }
1855
- return "";
1856
1801
  }
1857
- var Fe = {}, qe = b.ReactDebugCurrentFrame;
1858
- function _e(r) {
1859
- if (r) {
1860
- var c = r._owner, l = he(r.type, r._source, c ? c.type : null);
1861
- qe.setExtraStackFrame(l);
1862
- } else
1863
- qe.setExtraStackFrame(null);
1864
- }
1865
- function vt(r, c, l, h, R) {
1866
- {
1867
- var I = Function.call.bind(Object.prototype.hasOwnProperty);
1868
- for (var C in r)
1869
- if (I(r, C)) {
1870
- var E = void 0;
1871
- try {
1872
- if (typeof r[C] != "function") {
1873
- var $ = Error((h || "React class") + ": " + l + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1874
- throw $.name = "Invariant Violation", $;
1875
- }
1876
- E = r[C](c, C, h, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1877
- } catch (N) {
1878
- E = N;
1879
- }
1880
- E && !(E instanceof Error) && (_e(R), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", l, C, typeof E), _e(null)), E instanceof Error && !(E.message in Fe) && (Fe[E.message] = !0, _e(R), y("Failed %s type: %s", l, E.message), _e(null));
1881
- }
1882
- }
1802
+ }
1803
+ var pt = Array.isArray;
1804
+ function Oe(t) {
1805
+ return pt(t);
1806
+ }
1807
+ function Et(t) {
1808
+ {
1809
+ var a = typeof Symbol == "function" && Symbol.toStringTag, l = a && t[Symbol.toStringTag] || t.constructor.name || "Object";
1810
+ return l;
1883
1811
  }
1884
- var se = b.ReactCurrentOwner, we = Object.prototype.hasOwnProperty, pt = {
1885
- key: !0,
1886
- ref: !0,
1887
- __self: !0,
1888
- __source: !0
1889
- }, Ke, Ye, Oe;
1890
- Oe = {};
1891
- function Et(r) {
1892
- if (we.call(r, "ref")) {
1893
- var c = Object.getOwnPropertyDescriptor(r, "ref").get;
1894
- if (c && c.isReactWarning)
1895
- return !1;
1896
- }
1897
- return r.ref !== void 0;
1812
+ }
1813
+ function yt(t) {
1814
+ try {
1815
+ return Ke(t), !1;
1816
+ } catch (a) {
1817
+ return !0;
1898
1818
  }
1899
- function bt(r) {
1900
- if (we.call(r, "key")) {
1901
- var c = Object.getOwnPropertyDescriptor(r, "key").get;
1902
- if (c && c.isReactWarning)
1903
- return !1;
1904
- }
1905
- return r.key !== void 0;
1819
+ }
1820
+ function Ke(t) {
1821
+ return "" + t;
1822
+ }
1823
+ function qe(t) {
1824
+ if (yt(t))
1825
+ return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Et(t)), Ke(t);
1826
+ }
1827
+ var se = U.ReactCurrentOwner, bt = {
1828
+ key: !0,
1829
+ ref: !0,
1830
+ __self: !0,
1831
+ __source: !0
1832
+ }, Ge, Ye, Ie;
1833
+ Ie = {};
1834
+ function St(t) {
1835
+ if (me.call(t, "ref")) {
1836
+ var a = Object.getOwnPropertyDescriptor(t, "ref").get;
1837
+ if (a && a.isReactWarning)
1838
+ return !1;
1906
1839
  }
1907
- function yt(r, c) {
1908
- if (typeof r.ref == "string" && se.current && c && se.current.stateNode !== c) {
1909
- var l = F(se.current.type);
1910
- Oe[l] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', F(se.current.type), r.ref), Oe[l] = !0);
1911
- }
1840
+ return t.ref !== void 0;
1841
+ }
1842
+ function Ct(t) {
1843
+ if (me.call(t, "key")) {
1844
+ var a = Object.getOwnPropertyDescriptor(t, "key").get;
1845
+ if (a && a.isReactWarning)
1846
+ return !1;
1912
1847
  }
1913
- function Ct(r, c) {
1914
- {
1915
- var l = function() {
1916
- Ke || (Ke = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
1917
- };
1918
- l.isReactWarning = !0, Object.defineProperty(r, "key", {
1919
- get: l,
1920
- configurable: !0
1921
- });
1922
- }
1848
+ return t.key !== void 0;
1849
+ }
1850
+ function wt(t, a) {
1851
+ if (typeof t.ref == "string" && se.current && a && se.current.stateNode !== a) {
1852
+ var l = G(se.current.type);
1853
+ Ie[l] || (P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', G(se.current.type), t.ref), Ie[l] = !0);
1923
1854
  }
1924
- function St(r, c) {
1925
- {
1926
- var l = function() {
1927
- Ye || (Ye = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
1928
- };
1929
- l.isReactWarning = !0, Object.defineProperty(r, "ref", {
1930
- get: l,
1931
- configurable: !0
1932
- });
1933
- }
1855
+ }
1856
+ function Rt(t, a) {
1857
+ {
1858
+ var l = function() {
1859
+ Ge || (Ge = !0, P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
1860
+ };
1861
+ l.isReactWarning = !0, Object.defineProperty(t, "key", {
1862
+ get: l,
1863
+ configurable: !0
1864
+ });
1934
1865
  }
1935
- var wt = function(r, c, l, h, R, I, C) {
1936
- var E = {
1937
- // This tag allows us to uniquely identify this as a React Element
1938
- $$typeof: n,
1939
- // Built-in properties that belong on the element
1940
- type: r,
1941
- key: c,
1942
- ref: l,
1943
- props: C,
1944
- // Record the component responsible for creating this element.
1945
- _owner: I
1866
+ }
1867
+ function Ot(t, a) {
1868
+ {
1869
+ var l = function() {
1870
+ Ye || (Ye = !0, P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
1946
1871
  };
1947
- return E._store = {}, Object.defineProperty(E._store, "validated", {
1948
- configurable: !1,
1949
- enumerable: !1,
1950
- writable: !0,
1951
- value: !1
1952
- }), Object.defineProperty(E, "_self", {
1953
- configurable: !1,
1954
- enumerable: !1,
1955
- writable: !1,
1956
- value: h
1957
- }), Object.defineProperty(E, "_source", {
1958
- configurable: !1,
1959
- enumerable: !1,
1960
- writable: !1,
1961
- value: R
1962
- }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
1872
+ l.isReactWarning = !0, Object.defineProperty(t, "ref", {
1873
+ get: l,
1874
+ configurable: !0
1875
+ });
1876
+ }
1877
+ }
1878
+ var It = function(t, a, l, h, b, R, p) {
1879
+ var m = {
1880
+ // This tag allows us to uniquely identify this as a React Element
1881
+ $$typeof: s,
1882
+ // Built-in properties that belong on the element
1883
+ type: t,
1884
+ key: a,
1885
+ ref: l,
1886
+ props: p,
1887
+ // Record the component responsible for creating this element.
1888
+ _owner: R
1963
1889
  };
1964
- function Ot(r, c, l, h, R) {
1965
- {
1966
- var I, C = {}, E = null, $ = null;
1967
- l !== void 0 && (E = "" + l), bt(c) && (E = "" + c.key), Et(c) && ($ = c.ref, yt(c, R));
1968
- for (I in c)
1969
- we.call(c, I) && !pt.hasOwnProperty(I) && (C[I] = c[I]);
1970
- if (r && r.defaultProps) {
1971
- var N = r.defaultProps;
1972
- for (I in N)
1973
- C[I] === void 0 && (C[I] = N[I]);
1974
- }
1975
- if (E || $) {
1976
- var L = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1977
- E && Ct(C, L), $ && St(C, L);
1978
- }
1979
- return wt(r, E, $, R, h, se.current, C);
1890
+ return m._store = {}, Object.defineProperty(m._store, "validated", {
1891
+ configurable: !1,
1892
+ enumerable: !1,
1893
+ writable: !0,
1894
+ value: !1
1895
+ }), Object.defineProperty(m, "_self", {
1896
+ configurable: !1,
1897
+ enumerable: !1,
1898
+ writable: !1,
1899
+ value: h
1900
+ }), Object.defineProperty(m, "_source", {
1901
+ configurable: !1,
1902
+ enumerable: !1,
1903
+ writable: !1,
1904
+ value: b
1905
+ }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
1906
+ };
1907
+ function Tt(t, a, l, h, b) {
1908
+ {
1909
+ var R, p = {}, m = null, $ = null;
1910
+ l !== void 0 && (qe(l), m = "" + l), Ct(a) && (qe(a.key), m = "" + a.key), St(a) && ($ = a.ref, wt(a, b));
1911
+ for (R in a)
1912
+ me.call(a, R) && !bt.hasOwnProperty(R) && (p[R] = a[R]);
1913
+ if (t && t.defaultProps) {
1914
+ var j = t.defaultProps;
1915
+ for (R in j)
1916
+ p[R] === void 0 && (p[R] = j[R]);
1980
1917
  }
1918
+ if (m || $) {
1919
+ var L = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
1920
+ m && Rt(p, L), $ && Ot(p, L);
1921
+ }
1922
+ return It(t, m, $, b, h, se.current, p);
1981
1923
  }
1982
- var Re = b.ReactCurrentOwner, Ge = b.ReactDebugCurrentFrame;
1983
- function re(r) {
1984
- if (r) {
1985
- var c = r._owner, l = he(r.type, r._source, c ? c.type : null);
1986
- Ge.setExtraStackFrame(l);
1987
- } else
1988
- Ge.setExtraStackFrame(null);
1989
- }
1990
- var Ie;
1991
- Ie = !1;
1992
- function Te(r) {
1993
- return typeof r == "object" && r !== null && r.$$typeof === n;
1994
- }
1995
- function He() {
1996
- {
1997
- if (Re.current) {
1998
- var r = F(Re.current.type);
1999
- if (r)
2000
- return `
1924
+ }
1925
+ var Te = U.ReactCurrentOwner, He = U.ReactDebugCurrentFrame;
1926
+ function re(t) {
1927
+ if (t) {
1928
+ var a = t._owner, l = ge(t.type, t._source, a ? a.type : null);
1929
+ He.setExtraStackFrame(l);
1930
+ } else
1931
+ He.setExtraStackFrame(null);
1932
+ }
1933
+ var ke;
1934
+ ke = !1;
1935
+ function Pe(t) {
1936
+ return typeof t == "object" && t !== null && t.$$typeof === s;
1937
+ }
1938
+ function Je() {
1939
+ {
1940
+ if (Te.current) {
1941
+ var t = G(Te.current.type);
1942
+ if (t)
1943
+ return `
2001
1944
 
2002
- Check the render method of \`` + r + "`.";
2003
- }
2004
- return "";
1945
+ Check the render method of \`` + t + "`.";
2005
1946
  }
1947
+ return "";
2006
1948
  }
2007
- function Rt(r) {
2008
- {
2009
- if (r !== void 0) {
2010
- var c = r.fileName.replace(/^.*[\\\/]/, ""), l = r.lineNumber;
2011
- return `
1949
+ }
1950
+ function kt(t) {
1951
+ {
1952
+ if (t !== void 0) {
1953
+ var a = t.fileName.replace(/^.*[\\\/]/, ""), l = t.lineNumber;
1954
+ return `
2012
1955
 
2013
- Check your code at ` + c + ":" + l + ".";
2014
- }
2015
- return "";
1956
+ Check your code at ` + a + ":" + l + ".";
2016
1957
  }
1958
+ return "";
2017
1959
  }
2018
- var Je = {};
2019
- function It(r) {
2020
- {
2021
- var c = He();
2022
- if (!c) {
2023
- var l = typeof r == "string" ? r : r.displayName || r.name;
2024
- l && (c = `
1960
+ }
1961
+ var ze = {};
1962
+ function Pt(t) {
1963
+ {
1964
+ var a = Je();
1965
+ if (!a) {
1966
+ var l = typeof t == "string" ? t : t.displayName || t.name;
1967
+ l && (a = `
2025
1968
 
2026
1969
  Check the top-level render call using <` + l + ">.");
2027
- }
2028
- return c;
2029
1970
  }
1971
+ return a;
2030
1972
  }
2031
- function ze(r, c) {
2032
- {
2033
- if (!r._store || r._store.validated || r.key != null)
2034
- return;
2035
- r._store.validated = !0;
2036
- var l = It(c);
2037
- if (Je[l])
2038
- return;
2039
- Je[l] = !0;
2040
- var h = "";
2041
- r && r._owner && r._owner !== Re.current && (h = " It was passed a child from " + F(r._owner.type) + "."), re(r), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, h), re(null);
2042
- }
1973
+ }
1974
+ function Xe(t, a) {
1975
+ {
1976
+ if (!t._store || t._store.validated || t.key != null)
1977
+ return;
1978
+ t._store.validated = !0;
1979
+ var l = Pt(a);
1980
+ if (ze[l])
1981
+ return;
1982
+ ze[l] = !0;
1983
+ var h = "";
1984
+ t && t._owner && t._owner !== Te.current && (h = " It was passed a child from " + G(t._owner.type) + "."), re(t), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, h), re(null);
2043
1985
  }
2044
- function Xe(r, c) {
2045
- {
2046
- if (typeof r != "object")
2047
- return;
2048
- if (Array.isArray(r))
2049
- for (var l = 0; l < r.length; l++) {
2050
- var h = r[l];
2051
- Te(h) && ze(h, c);
2052
- }
2053
- else if (Te(r))
2054
- r._store && (r._store.validated = !0);
2055
- else if (r) {
2056
- var R = D(r);
2057
- if (typeof R == "function" && R !== r.entries)
2058
- for (var I = R.call(r), C; !(C = I.next()).done; )
2059
- Te(C.value) && ze(C.value, c);
1986
+ }
1987
+ function Ze(t, a) {
1988
+ {
1989
+ if (typeof t != "object")
1990
+ return;
1991
+ if (Oe(t))
1992
+ for (var l = 0; l < t.length; l++) {
1993
+ var h = t[l];
1994
+ Pe(h) && Xe(h, a);
2060
1995
  }
1996
+ else if (Pe(t))
1997
+ t._store && (t._store.validated = !0);
1998
+ else if (t) {
1999
+ var b = k(t);
2000
+ if (typeof b == "function" && b !== t.entries)
2001
+ for (var R = b.call(t), p; !(p = R.next()).done; )
2002
+ Pe(p.value) && Xe(p.value, a);
2061
2003
  }
2062
2004
  }
2063
- function Tt(r) {
2064
- {
2065
- var c = r.type;
2066
- if (c == null || typeof c == "string")
2067
- return;
2068
- var l;
2069
- if (typeof c == "function")
2070
- l = c.propTypes;
2071
- else if (typeof c == "object" && (c.$$typeof === g || // Note: Memo only checks outer props here.
2072
- // Inner props are checked in the reconciler.
2073
- c.$$typeof === S))
2074
- l = c.propTypes;
2075
- else
2076
- return;
2077
- if (l) {
2078
- var h = F(c);
2079
- vt(l, r.props, "prop", h, r);
2080
- } else if (c.PropTypes !== void 0 && !Ie) {
2081
- Ie = !0;
2082
- var R = F(c);
2083
- y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", R || "Unknown");
2084
- }
2085
- typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2005
+ }
2006
+ function Nt(t) {
2007
+ {
2008
+ var a = t.type;
2009
+ if (a == null || typeof a == "string")
2010
+ return;
2011
+ var l;
2012
+ if (typeof a == "function")
2013
+ l = a.propTypes;
2014
+ else if (typeof a == "object" && (a.$$typeof === g || // Note: Memo only checks outer props here.
2015
+ // Inner props are checked in the reconciler.
2016
+ a.$$typeof === y))
2017
+ l = a.propTypes;
2018
+ else
2019
+ return;
2020
+ if (l) {
2021
+ var h = G(a);
2022
+ vt(l, t.props, "prop", h, t);
2023
+ } else if (a.PropTypes !== void 0 && !ke) {
2024
+ ke = !0;
2025
+ var b = G(a);
2026
+ P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
2086
2027
  }
2028
+ typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2087
2029
  }
2088
- function kt(r) {
2089
- {
2090
- for (var c = Object.keys(r.props), l = 0; l < c.length; l++) {
2091
- var h = c[l];
2092
- if (h !== "children" && h !== "key") {
2093
- re(r), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), re(null);
2094
- break;
2095
- }
2030
+ }
2031
+ function jt(t) {
2032
+ {
2033
+ for (var a = Object.keys(t.props), l = 0; l < a.length; l++) {
2034
+ var h = a[l];
2035
+ if (h !== "children" && h !== "key") {
2036
+ re(t), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), re(null);
2037
+ break;
2096
2038
  }
2097
- r.ref !== null && (re(r), y("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
2098
2039
  }
2040
+ t.ref !== null && (re(t), P("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
2099
2041
  }
2100
- function Ze(r, c, l, h, R, I) {
2101
- {
2102
- var C = z(r);
2103
- if (!C) {
2104
- var E = "";
2105
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (E += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2106
- var $ = Rt(R);
2107
- $ ? E += $ : E += He();
2108
- var N;
2109
- r === null ? N = "null" : Array.isArray(r) ? N = "array" : r !== void 0 && r.$$typeof === n ? (N = "<" + (F(r.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : N = typeof r, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, E);
2110
- }
2111
- var L = Ot(r, c, l, R, I);
2112
- if (L == null)
2113
- return L;
2114
- if (C) {
2115
- var K = c.children;
2116
- if (K !== void 0)
2117
- if (h)
2118
- if (Array.isArray(K)) {
2119
- for (var ne = 0; ne < K.length; ne++)
2120
- Xe(K[ne], r);
2121
- Object.freeze && Object.freeze(K);
2122
- } else
2123
- y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2124
- else
2125
- Xe(K, r);
2126
- }
2127
- return r === t.Fragment ? kt(L) : Tt(L), L;
2042
+ }
2043
+ function Qe(t, a, l, h, b, R) {
2044
+ {
2045
+ var p = F(t);
2046
+ if (!p) {
2047
+ var m = "";
2048
+ (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (m += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2049
+ var $ = kt(b);
2050
+ $ ? m += $ : m += Je();
2051
+ var j;
2052
+ t === null ? j = "null" : Oe(t) ? j = "array" : t !== void 0 && t.$$typeof === s ? (j = "<" + (G(t.type) || "Unknown") + " />", m = " Did you accidentally export a JSX literal instead of a component?") : j = typeof t, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", j, m);
2128
2053
  }
2054
+ var L = Tt(t, a, l, b, R);
2055
+ if (L == null)
2056
+ return L;
2057
+ if (p) {
2058
+ var W = a.children;
2059
+ if (W !== void 0)
2060
+ if (h)
2061
+ if (Oe(W)) {
2062
+ for (var ie = 0; ie < W.length; ie++)
2063
+ Ze(W[ie], t);
2064
+ Object.freeze && Object.freeze(W);
2065
+ } else
2066
+ P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2067
+ else
2068
+ Ze(W, t);
2069
+ }
2070
+ return t === i ? jt(L) : Nt(L), L;
2129
2071
  }
2130
- function Pt(r, c, l) {
2131
- return Ze(r, c, l, !0);
2132
- }
2133
- function jt(r, c, l) {
2134
- return Ze(r, c, l, !1);
2135
- }
2136
- var Nt = jt, Lt = Pt;
2137
- t.jsx = Nt, t.jsxs = Lt;
2138
- }();
2139
- }(Ne)), Ne;
2072
+ }
2073
+ function Lt(t, a, l) {
2074
+ return Qe(t, a, l, !0);
2075
+ }
2076
+ function At(t, a, l) {
2077
+ return Qe(t, a, l, !1);
2078
+ }
2079
+ var Mt = At, Dt = Lt;
2080
+ ae.Fragment = i, ae.jsx = Mt, ae.jsxs = Dt;
2081
+ }()), ae;
2140
2082
  }
2141
- (function(t) {
2142
- process.env.NODE_ENV === "production" ? t.exports = br() : t.exports = yr();
2143
- })(Er);
2144
- const Cr = Ae.jsx;
2145
- function kr(t) {
2146
- const s = Ft(null), e = pr(t), n = e.jsBridge, i = (d) => /* @__PURE__ */ Cr(s.Provider, { value: e, children: d.children }), a = () => {
2147
- const d = V.useContext(s);
2148
- if (!d)
2083
+ (function(r) {
2084
+ process.env.NODE_ENV === "production" ? r.exports = Cr() : r.exports = wr();
2085
+ })(Sr);
2086
+ const Rr = Ae.jsx;
2087
+ function jr(r) {
2088
+ const s = Gt(null), e = br(r), i = e.jsBridge, n = (f) => /* @__PURE__ */ Rr(s.Provider, { value: e, children: f.children }), c = () => {
2089
+ const f = D.useContext(s);
2090
+ if (!f)
2149
2091
  throw new Error("LiveProvider never found.");
2150
- return d;
2151
- }, u = () => e, f = () => e.$RTC, _ = () => f(), g = () => async (d) => await e.connect(d);
2152
- function v(d, O, D = []) {
2153
- const b = a(), y = [b, name, ...D], M = () => b.keyframes.off(d, O);
2154
- return V.useEffect(() => (b.keyframes.on(d, O), M), y), M;
2155
- }
2156
- function p() {
2157
- const d = a();
2092
+ return f;
2093
+ }, u = () => e, d = () => e.$RTC, g = () => d(), v = () => async (f) => await e.connect(f);
2094
+ function E(f, w, A = []) {
2095
+ const S = c(), N = [S, name, ...A], M = () => S.keyframes.off(f, w);
2096
+ return D.useEffect(() => (S.keyframes.on(f, w), M), N), M;
2097
+ }
2098
+ function y() {
2099
+ const f = c();
2158
2100
  return {
2159
- connect: async (j) => await d.connect(j),
2160
- broadcast: async (j, B, te = 0) => await d.broadcast(j, B, te),
2161
- exit: async () => await d.exit(),
2162
- kick: async (j) => await d.kick(j),
2163
- toggleMicro: (j) => d.toggleMicro(j),
2164
- forbidMicro: async (j, B = []) => await d.forbidMicro(j, B),
2165
- forbidSync: (j, B = []) => d.forbidSync(j, B),
2166
- sendKeyframe: (j, B) => d.sendKeyframe(j, B),
2167
- getFramesByKey: (j) => d.getFramesByKey(j),
2168
- setSelfInfo: (j) => d.setSelfInfo(j),
2169
- updateStatus: (j, B, te, le) => d.updateStatus(j, B, te, le)
2101
+ connect: async (T) => await f.connect(T),
2102
+ broadcast: async (T, B, te = 0) => await f.broadcast(T, B, te),
2103
+ exit: async () => await f.exit(),
2104
+ kick: async (T) => await f.kick(T),
2105
+ toggleMicro: (T) => f.toggleMicro(T),
2106
+ forbidMicro: async (T, B = []) => await f.forbidMicro(T, B),
2107
+ forbidSync: (T, B = []) => f.forbidSync(T, B),
2108
+ sendKeyframe: (T, B) => f.sendKeyframe(T, B),
2109
+ getFramesByKey: (T) => f.getFramesByKey(T),
2110
+ setSelfInfo: (T) => f.setSelfInfo(T),
2111
+ updateStatus: (T, B, te, de) => f.updateStatus(T, B, te, de)
2170
2112
  };
2171
2113
  }
2172
- function S(d) {
2173
- const O = a(), [D, b] = V.useState(O.getFramesByKey(d));
2174
- V.useEffect(() => {
2175
- const M = (ue) => b(ue), U = d, z = M;
2176
- return O.keyframes.on(U, z), () => O.keyframes.off(U, z);
2177
- }, [O]);
2178
- const y = V.useCallback(
2179
- (M) => O.sendKeyframe(d, M),
2180
- [O]
2114
+ function I(f) {
2115
+ const w = c(), [A, S] = D.useState(w.getFramesByKey(f));
2116
+ D.useEffect(() => {
2117
+ const M = (ne) => S(ne), F = f, J = M;
2118
+ return w.keyframes.on(F, J), () => w.keyframes.off(F, J);
2119
+ }, [w]);
2120
+ const N = D.useCallback(
2121
+ (M) => w.sendKeyframe(f, M),
2122
+ [w]
2181
2123
  );
2182
- return [D, y];
2124
+ return [A, N];
2183
2125
  }
2184
- function m(d, O, D = []) {
2185
- const b = a(), y = () => b.off(d, O), M = [b, d, ...D];
2186
- return V.useEffect(() => (b.on(d, O), y), M), y;
2126
+ function _(f, w, A = []) {
2127
+ const S = c(), N = () => S.off(f, w), M = [S, f, ...A];
2128
+ return D.useEffect(() => (S.on(f, w), N), M), N;
2187
2129
  }
2188
- function A() {
2189
- const d = a(), [O, D] = V.useState(d.state);
2190
- return V.useEffect(() => {
2191
- const b = (y) => D(y);
2192
- return d.on("stateChange", b), () => d.off("stateChange", b);
2193
- }, [d]), O;
2130
+ function V() {
2131
+ const f = c(), [w, A] = D.useState(f.state);
2132
+ return D.useEffect(() => {
2133
+ const S = (N) => A(N);
2134
+ return f.on("stateChange", S), () => f.off("stateChange", S);
2135
+ }, [f]), w;
2194
2136
  }
2195
- function w() {
2196
- const d = a();
2137
+ function C() {
2138
+ const f = c();
2197
2139
  return {
2198
- join: (U) => d.$RTC.join(U),
2199
- quit: () => d.$RTC.quit(),
2140
+ join: (F) => f.$RTC.join(F),
2141
+ quit: () => f.$RTC.quit(),
2200
2142
  shock: () => {
2201
- var U, z;
2202
- return (z = (U = d.$RTC).shock) == null ? void 0 : z.call(U);
2143
+ var F, J;
2144
+ return (J = (F = f.$RTC).shock) == null ? void 0 : J.call(F);
2203
2145
  },
2204
- toggleMicro: (U) => d.$RTC.toggleMicro(U),
2205
- detectMicro: () => d.$RTC.detectMicro()
2146
+ toggleMicro: (F) => f.$RTC.toggleMicro(F),
2147
+ detectMicro: () => f.$RTC.detectMicro()
2206
2148
  };
2207
2149
  }
2208
- function P(d, O, D = []) {
2209
- const b = a(), y = () => b.$RTC.off(d, O), M = [b, d, ...D];
2210
- return V.useEffect(() => (b.$RTC.on(d, O), y), M), y;
2211
- }
2212
- function H() {
2213
- const d = a(), [O, D] = V.useState(
2214
- d.selfInfo || {}
2215
- ), b = (M) => D(M);
2216
- V.useEffect(() => (d.on("selfInfoUpdate", b), () => d.off("selfInfoUpdate", b)), [d]);
2217
- const y = V.useCallback(
2218
- async (M) => await d.setSelfInfo(M),
2219
- [d]
2150
+ function k(f, w, A = []) {
2151
+ const S = c(), N = () => S.$RTC.off(f, w), M = [S, f, ...A];
2152
+ return D.useEffect(() => (S.$RTC.on(f, w), N), M), N;
2153
+ }
2154
+ function U() {
2155
+ const f = c(), [w, A] = D.useState(
2156
+ f.selfInfo || {}
2157
+ ), S = (M) => A(M);
2158
+ D.useEffect(() => (f.on("selfInfoUpdate", S), () => f.off("selfInfoUpdate", S)), [f]);
2159
+ const N = D.useCallback(
2160
+ async (M) => await f.setSelfInfo(M),
2161
+ [f]
2220
2162
  );
2221
- return [O, y];
2163
+ return [w, N];
2222
2164
  }
2223
- function J() {
2224
- const d = a(), [O, D] = V.useState(
2225
- d.snapshot
2165
+ function P() {
2166
+ const f = c(), [w, A] = D.useState(
2167
+ f.snapshot
2226
2168
  );
2227
- return V.useEffect(() => {
2228
- const b = (y) => D(y);
2229
- return d.on("keyframes", b), () => d.off("keyframes", b);
2230
- }), O;
2169
+ return D.useEffect(() => {
2170
+ const S = (N) => A(N);
2171
+ return f.on("keyframes", S), () => f.off("keyframes", S);
2172
+ }), w;
2231
2173
  }
2232
- function k() {
2233
- const d = a(), [O, D] = V.useState(d.userList), b = (y) => D(y);
2234
- return V.useEffect(() => (d.on("userListUpdate", b), () => d.off("userListUpdate", b)), [d]), O;
2174
+ function fe() {
2175
+ const f = c(), [w, A] = D.useState(f.userList), S = (N) => A(N);
2176
+ return D.useEffect(() => (f.on("userListUpdate", S), () => f.off("userListUpdate", S)), [f]), w;
2235
2177
  }
2236
2178
  return {
2237
2179
  live: e,
2238
- jsBridge: n,
2239
- LiveProvider: i,
2180
+ jsBridge: i,
2181
+ LiveProvider: n,
2240
2182
  unsafe__useLiveInstance: u,
2241
- unsafe__useRTCInstance: _,
2242
- useConnect: g,
2243
- useKeyframe: S,
2244
- useKeyframeUpdateCallback: v,
2245
- useLiveAction: p,
2246
- useLiveEventCallback: m,
2247
- useLiveState: A,
2248
- useRTCAction: w,
2249
- useRTCEventCallback: P,
2250
- useSelfInfo: H,
2251
- useKeyframesSnapshot: J,
2252
- useUserList: k
2183
+ unsafe__useRTCInstance: g,
2184
+ useConnect: v,
2185
+ useKeyframe: I,
2186
+ useKeyframeUpdateCallback: E,
2187
+ useLiveAction: y,
2188
+ useLiveEventCallback: _,
2189
+ useLiveState: V,
2190
+ useRTCAction: C,
2191
+ useRTCEventCallback: k,
2192
+ useSelfInfo: U,
2193
+ useKeyframesSnapshot: P,
2194
+ useUserList: fe
2253
2195
  };
2254
2196
  }
2255
2197
  export {
2256
- tt as BrowserRTC,
2257
- rt as BrowserRTC4Chime,
2198
+ rt as BrowserRTC,
2199
+ it as BrowserRTC4Chime,
2258
2200
  ut as BuiltInRTCType,
2259
- G as BuiltinActionType,
2201
+ H as BuiltinActionType,
2260
2202
  q as BuiltinEventType,
2261
- W as Command,
2262
- De as CoreRTC,
2203
+ K as Command,
2204
+ Me as CoreRTC,
2263
2205
  x as LiveState,
2264
- Zt as MemUserStatus,
2206
+ tr as MemUserStatus,
2265
2207
  Z as MicroStatus,
2266
2208
  lt as RTCJoinedInfoCodeEnum,
2267
2209
  Q as RTCType,
2268
- Xt as UserStatus,
2210
+ er as UserStatus,
2269
2211
  nt as VRWebViewRTC,
2270
- er as WebSocketCloseError,
2271
- Qt as WebSocketErrorType,
2212
+ ir as WebSocketCloseError,
2213
+ rr as WebSocketErrorType,
2272
2214
  Le as WebSocketState,
2273
- pr as createLive,
2274
- kr as createLiveReact,
2275
- Tr as parseLiveMsg,
2276
- tr as parseWSClsErr
2215
+ br as createLive,
2216
+ jr as createLiveReact,
2217
+ Nr as parseLiveMsg,
2218
+ nr as parseWSClsErr
2277
2219
  };