@realsee/live 0.6.14 → 0.6.15

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.
Files changed (50) hide show
  1. package/dist/index.cjs.js +9 -9
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.es.js +621 -472
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/live/controller.d.ts +28 -0
  7. package/dist/rtc/VRWebViewRTC.d.ts +84 -9
  8. package/dist/typings/live/GetVoiceSign.d.ts +33 -5
  9. package/dist/typings/live/LiveConnectOptions.d.ts +17 -0
  10. package/dist/typings/live/LiveMsg.d.ts +14 -0
  11. package/dist/typings/rtc/eventType.d.ts +22 -7
  12. package/dist/typings/rtc/joinedInfo.d.ts +5 -1
  13. package/dist/typings/rtc/protocol.d.ts +4 -0
  14. package/dist/utils/RobustWebSocket.d.ts +3 -0
  15. package/docs/assets/search.js +1 -1
  16. package/docs/classes/Live.html +812 -0
  17. package/docs/classes/VRWebViewRTC.html +212 -21
  18. package/docs/enums/Command.html +24 -8
  19. package/docs/enums/MicroStatus.html +8 -4
  20. package/docs/enums/RTCJoinedInfoCodeEnum.html +11 -2
  21. package/docs/functions/_clearLiveInstanceIfNeed.html +98 -0
  22. package/docs/functions/createLive.html +8 -4
  23. package/docs/functions/createLiveReact.html +12 -8
  24. package/docs/functions/parseLiveMsg.html +7 -3
  25. package/docs/functions/parseWSClsErr.html +6 -2
  26. package/docs/index.html +6 -2
  27. package/docs/interfaces/RTCJoinedInfo.html +6 -6
  28. package/docs/interfaces/RTCProtocol.html +16 -4
  29. package/docs/modules.html +11 -3
  30. package/docs/types/BuiltinMsg.html +6 -2
  31. package/docs/types/EventType.html +6 -2
  32. package/docs/types/GetVoiceSign.html +12 -27
  33. package/docs/types/GetVoiceSignParams.html +111 -0
  34. package/docs/types/GetVoiceSignReturnType.html +115 -0
  35. package/docs/types/KeyframeTypes.html +6 -2
  36. package/docs/types/LiveBuiltInData.html +117 -0
  37. package/docs/types/LiveConnectOptions.html +22 -6
  38. package/docs/types/LiveEventType.html +6 -2
  39. package/docs/types/LiveMsg.html +7 -3
  40. package/docs/types/LiveProviderPropTypes.html +8 -4
  41. package/docs/types/RTCActionReactCallback.html +6 -2
  42. package/docs/types/RTCEventType.html +58 -3
  43. package/docs/types/ReqLiveMsg.html +6 -2
  44. package/docs/types/RoomInfo.html +6 -2
  45. package/docs/types/UserInfo.html +6 -2
  46. package/docs/types/UserInfoExt.html +6 -2
  47. package/docs/types/UserVolume.html +6 -2
  48. package/docs/types/WebSocketError.html +6 -2
  49. package/package.json +1 -1
  50. package/docs/interfaces/GetVoiceSignReturnType.html +0 -90
package/dist/index.es.js CHANGED
@@ -1,24 +1,24 @@
1
- var Vt = Object.defineProperty;
2
- var $t = (r, o, e) => o in r ? Vt(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
1
+ var Dt = Object.defineProperty;
2
+ var $t = (r, o, e) => o in r ? Dt(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
3
3
  var s = (r, o, e) => ($t(r, typeof o != "symbol" ? o + "" : o, e), e);
4
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];
5
+ import je from "trtc-js-sdk";
6
+ import { ConsoleLogger as Ut, LogLevel as Wt, DefaultDeviceController as Ft, MeetingSessionConfiguration as Bt, DefaultMeetingSession as Kt, DefaultModality as rt, MeetingSessionStatusCode as qt } from "amazon-chime-sdk-js";
7
+ import M, { createContext as Gt } from "react";
8
+ const ue = Symbol("$$REALSEE_LIVE_EVENT$$");
9
+ function Ee(r) {
10
+ return r[ue] || (r[ue] = {}), r[ue];
11
11
  }
12
12
  function Yt(r) {
13
- r[ce] || delete r[ce];
13
+ r[ue] || delete r[ue];
14
14
  }
15
- class ue {
15
+ class le {
16
16
  /**
17
17
  * 判断是否注册了事件
18
18
  * @param name 事件类型
19
19
  */
20
20
  hasListener(o) {
21
- const e = pe(this);
21
+ const e = Ee(this);
22
22
  return e && e[o] && e[o].length > 0;
23
23
  }
24
24
  /**
@@ -31,7 +31,7 @@ class ue {
31
31
  * @template C 回调函数函数上下文
32
32
  */
33
33
  on(o, e, i) {
34
- const n = pe(this);
34
+ const n = Ee(this);
35
35
  return n[o] || (n[o] = []), n[o].push([e, i || !1]), () => this.off(o, e);
36
36
  }
37
37
  /**
@@ -59,7 +59,7 @@ class ue {
59
59
  Yt(this);
60
60
  return;
61
61
  }
62
- const i = pe(this);
62
+ const i = Ee(this);
63
63
  if (i[o] || (i[o] = []), e === void 0) {
64
64
  i[o].length = 0;
65
65
  return;
@@ -78,22 +78,22 @@ class ue {
78
78
  */
79
79
  emit(o, ...e) {
80
80
  let i = !1;
81
- const c = pe(this)[o] || [];
82
- for (let u of c.slice()) {
83
- const [d, g = !1] = u, v = d(...e);
84
- g && this.off(o, d), v === !1 && (i = !0);
81
+ const a = Ee(this)[o] || [];
82
+ for (let u of a.slice()) {
83
+ const [d, g = !1] = u, _ = d(...e);
84
+ g && this.off(o, d), _ === !1 && (i = !0);
85
85
  }
86
86
  return i;
87
87
  }
88
88
  }
89
- class Me extends ue {
89
+ class Me extends le {
90
90
  }
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(), o = 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 `[${o}-${e}-${i} ${n}:${c}:${u}.${d}]`;
95
- }, be = (r, o = []) => {
96
- switch (o.unshift(`Realsee Live ${Ht()} <${r}> `), r) {
91
+ var Q = /* @__PURE__ */ ((r) => (r.RealseeBrowserRTC = "RealseeBrowserRTC", r.RealseeVRWebViewRTC = "RealseeVRWebViewRTC", r.RealseeBrowserChimeRTC = "RealseeBrowserChimeRTC", r))(Q || {}), lt = /* @__PURE__ */ ((r) => (r.RealseeXTRTC = "trtc", r.RealseeXChimeRTC = "chime", r))(lt || {});
92
+ const Jt = () => {
93
+ const r = new Date(), o = r.getFullYear(), e = (r.getMonth() + 1).toString().padStart(2, "0"), i = r.getDate().toString().padStart(2, "0"), n = r.getHours().toString().padStart(2, "0"), a = r.getMinutes().toString().padStart(2, "0"), u = r.getSeconds().toString().padStart(2, "0"), d = r.getMilliseconds();
94
+ return `[${o}-${e}-${i} ${n}:${a}:${u}.${d}]`;
95
+ }, Se = (r, o = []) => {
96
+ switch (o.unshift(`Realsee Live ${Jt()} <${r}> `), r) {
97
97
  case "INFO":
98
98
  return console.info(...o);
99
99
  case "ERROR":
@@ -103,8 +103,8 @@ const Ht = () => {
103
103
  default:
104
104
  return console.log(...o);
105
105
  }
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,
106
+ }, Ht = (...r) => Se("LOG", r), zt = (...r) => Se("INFO", r), Xt = (...r) => Se("ERROR", r), Zt = (...r) => Se("WARN", r), Qt = {
107
+ log: Ht,
108
108
  info: zt,
109
109
  error: Xt,
110
110
  warn: Zt
@@ -112,10 +112,10 @@ const Ht = () => {
112
112
  function X() {
113
113
  return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
114
114
  }
115
- function Ee() {
115
+ function ye() {
116
116
  return (X() + X() + "-" + X() + "-4" + X().substr(0, 3) + "-" + X() + "-" + X() + X() + X()).toLowerCase();
117
117
  }
118
- class rt extends Me {
118
+ class it extends Me {
119
119
  constructor(e) {
120
120
  super();
121
121
  s(this, "type", Q.RealseeBrowserRTC);
@@ -126,30 +126,30 @@ class rt extends Me {
126
126
  throw new Error("方法 getVoiceSign 未实现");
127
127
  });
128
128
  s(this, "_autoPlayConfirm");
129
- s(this, "checkRequirement", () => Ne.checkSystemRequirements());
129
+ s(this, "checkRequirement", () => je.checkSystemRequirements());
130
130
  s(this, "$dom", document.createElement("div"));
131
131
  s(this, "_trtc", {
132
132
  client: null,
133
133
  stream: null
134
134
  });
135
135
  s(this, "join", async (e) => {
136
- var c;
136
+ var a;
137
137
  this.emit("joinWillStart");
138
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 = Ne.createClient({
143
+ this._trtc.client = je.createClient({
144
144
  mode: "rtc",
145
145
  ...i,
146
146
  enableAutoPlayDialog: typeof this._autoPlayConfirm != "function"
147
- }), (c = this._trtc.client) == null || c.enableAudioVolumeEvaluation(), this._registerRtcEvent();
147
+ }), (a = this._trtc.client) == null || a.enableAudioVolumeEvaluation(), this._registerRtcEvent();
148
148
  let n = await new Promise((u) => {
149
149
  var d;
150
150
  (d = this._trtc.client) == null || d.join({ roomId: Number(e.voiceId) }).then(() => u(!0)).catch(() => u(!1));
151
151
  });
152
- return this.joined = n, n ? (this._trtc.stream = Ne.createStream({
152
+ return this.joined = n, n ? (this._trtc.stream = je.createStream({
153
153
  userId: i.userId,
154
154
  audio: !0,
155
155
  video: !1
@@ -169,19 +169,19 @@ class rt extends Me {
169
169
  s(this, "_handleStreamSubscribed", (e) => {
170
170
  const i = e.stream;
171
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) => {
172
+ const a = `rs-rtc-remote_stream-${i.getId()}`, u = document.createElement("div");
173
+ u.id = a, this.$dom.appendChild(u), typeof this._autoPlayConfirm == "function" ? (i.play(a).catch((d) => {
174
174
  }), i.on("error", (d) => {
175
175
  if (d.getCode() === 16451) {
176
- const v = () => i.resume();
177
- this._autoPlayConfirm({ onConfirm: v });
176
+ const _ = () => i.resume();
177
+ this._autoPlayConfirm({ onConfirm: _ });
178
178
  }
179
- })) : i.play(c);
179
+ })) : i.play(a);
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-${Ee()}`, this.$dom.style.display = "none", document.body.appendChild(this.$dom);
184
+ this.$dom.id = `rs-rtc-${ye()}`, this.$dom.style.display = "none", document.body.appendChild(this.$dom);
185
185
  }
186
186
  quit() {
187
187
  return new Promise(async (e) => {
@@ -202,16 +202,16 @@ class rt extends Me {
202
202
  });
203
203
  }
204
204
  toggleMicro(e) {
205
- var i, n, c, u;
205
+ var i, n, a, u;
206
206
  return Promise.resolve(
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
207
+ (e ? (n = (i = this._trtc) == null ? void 0 : i.stream) == null ? void 0 : n.unmuteAudio() : (u = (a = this._trtc) == null ? void 0 : a.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, i, n, c;
214
+ var e, i, n, a;
215
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(
@@ -221,10 +221,10 @@ class rt extends Me {
221
221
  audioVolume: g
222
222
  }))
223
223
  )
224
- ), (c = this._trtc.client) == null || c.on("error", (u) => this.emit("error", u));
224
+ ), (a = this._trtc.client) == null || a.on("error", (u) => this.emit("error", u));
225
225
  }
226
226
  }
227
- class it extends Me {
227
+ class nt extends Me {
228
228
  constructor(e) {
229
229
  super();
230
230
  s(this, "type", Q.RealseeBrowserChimeRTC);
@@ -250,7 +250,7 @@ class it extends Me {
250
250
  * 对audio标签初始化
251
251
  */
252
252
  s(this, "_initDom", () => {
253
- this.$audio.id = `rs-rtc-${Ee()}`, this.$dom.id = `rs-rtc-${Ee()}`, this.$dom.appendChild(this.$audio), document.body.appendChild(this.$dom);
253
+ this.$audio.id = `rs-rtc-${ye()}`, this.$dom.id = `rs-rtc-${ye()}`, this.$dom.appendChild(this.$audio), document.body.appendChild(this.$dom);
254
254
  });
255
255
  /**
256
256
  * 初始化事件监听器
@@ -289,8 +289,8 @@ class it extends Me {
289
289
  const i = () => this.$audio.play().then(() => {
290
290
  }).catch((n) => {
291
291
  if (O.error("播放远端流失败!", n), typeof this._autoPlayConfirm == "function") {
292
- const c = () => i();
293
- this._autoPlayConfirm({ onConfirm: c });
292
+ const a = () => i();
293
+ this._autoPlayConfirm({ onConfirm: a });
294
294
  }
295
295
  });
296
296
  i();
@@ -304,12 +304,12 @@ class it extends Me {
304
304
  * 注册rtc事件
305
305
  */
306
306
  s(this, "_registerRtcEvent", () => {
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) || "";
307
+ var i, n, a, u, d, g;
308
+ const e = ((a = (n = (i = this.meetingSession) == null ? void 0 : i.configuration) == null ? void 0 : n.credentials) == null ? void 0 : a.attendeeId) || "";
309
309
  if (e) {
310
- const v = /* @__PURE__ */ new Map(), E = () => {
310
+ const _ = /* @__PURE__ */ new Map(), E = () => {
311
311
  const y = [];
312
- return v.forEach((I, _) => {
312
+ return _.forEach((I, m) => {
313
313
  y.push({
314
314
  userId: I.userId,
315
315
  volume: I.muted || I.signalStrength === 0 || !Boolean(I.volume) ? 0 : I.volume
@@ -317,17 +317,17 @@ class it extends Me {
317
317
  }), y;
318
318
  };
319
319
  (u = this.meetingSession) == null || u.audioVideo.realtimeSubscribeToAttendeeIdPresence(
320
- (y, I, _) => {
321
- var V;
320
+ (y, I, m) => {
321
+ var D;
322
322
  if (!I) {
323
- v.delete(y), this.emit("userVolumes", E());
323
+ _.delete(y), this.emit("userVolumes", E());
324
324
  return;
325
325
  }
326
- (V = this.meetingSession) == null || V.audioVideo.realtimeSubscribeToVolumeIndicator(
326
+ (D = this.meetingSession) == null || D.audioVideo.realtimeSubscribeToVolumeIndicator(
327
327
  y,
328
- (C, k, U, P) => {
329
- new tt(C).base() === C && (v.set(C, {
330
- userId: _ || C,
328
+ (w, k, U, P) => {
329
+ new rt(w).base() === w && (_.set(w, {
330
+ userId: m || w,
331
331
  volume: k,
332
332
  muted: U,
333
333
  signalStrength: P
@@ -337,13 +337,13 @@ class it extends Me {
337
337
  }
338
338
  ), (d = this.meetingSession) == null || d.audioVideo.realtimeSubscribeToVolumeIndicator(
339
339
  e,
340
- (y, I, _, V) => {
341
- new tt(y).base() === y && V !== null && V !== 1 && this.emit("weakNetwork");
340
+ (y, I, m, D) => {
341
+ new rt(y).base() === y && D !== null && D !== 1 && this.emit("weakNetwork");
342
342
  }
343
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 Ut("WebRTCLogger", e.logLevel || Ft.INFO), this.deviceController = new Bt(this.logger), this.initObservers();
346
+ this._getVoiceSign = e.getVoiceSign, this._autoPlayConfirm = e.autoPlayConfirm, this._initDom(), this.logger = new Ut("WebRTCLogger", e.logLevel || Wt.INFO), this.deviceController = new Ft(this.logger), this.initObservers();
347
347
  }
348
348
  /**
349
349
  * 加入语音会议
@@ -352,17 +352,17 @@ class it extends Me {
352
352
  */
353
353
  async join(e) {
354
354
  return new Promise(async (i, n) => {
355
- var c, u;
355
+ var a, u;
356
356
  this.emit("joinWillStart");
357
357
  try {
358
- const { sdkAppId: d, userId: g, roomId: v, userSig: E } = await this._getVoiceSign({
358
+ const { sdkAppId: d, userId: g, roomId: _, userSig: E } = await this._getVoiceSign({
359
359
  ...e,
360
360
  roomId: e.roomId || 0
361
361
  });
362
362
  this.userId = g;
363
363
  const { attendence: y, vendor_wrapper: I } = JSON.parse(
364
364
  decodeURIComponent(E)
365
- ), _ = new Wt(
365
+ ), m = new Bt(
366
366
  {
367
367
  Meeting: I
368
368
  },
@@ -374,34 +374,34 @@ class it extends Me {
374
374
  }
375
375
  }
376
376
  );
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 = {
377
+ this.meetingSession = new Kt(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 D = {
379
379
  audioVideoDidStart: () => {
380
- var C;
381
- (C = this.meetingSession) == null || C.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), i(!0);
380
+ var w;
381
+ (w = this.meetingSession) == null || w.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), i(!0);
382
382
  },
383
383
  audioVideoDidStop: () => {
384
384
  this.joined = !1, i(!1);
385
385
  }
386
386
  };
387
- this.meetingSession.audioVideo.addObserver(V), this.audioMixObserver && this.meetingSession.audioVideo.addAudioMixObserver(this.audioMixObserver), this.meetingSession.audioVideo.setDeviceLabelTrigger(
387
+ this.meetingSession.audioVideo.addObserver(D), 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 C = await this.meetingSession.audioVideo.listAudioInputDevices();
392
- O.info("audioInputDevices ===>", C);
393
- const k = ((c = C[0]) == null ? void 0 : c.deviceId) || "default";
391
+ const w = await this.meetingSession.audioVideo.listAudioInputDevices();
392
+ O.info("audioInputDevices ===>", w);
393
+ const k = ((a = w[0]) == null ? void 0 : a.deviceId) || "default";
394
394
  await this.meetingSession.audioVideo.startAudioInput(k);
395
- } catch (C) {
396
- O.error(`设置语音输入设备失败:${C.message}`);
395
+ } catch (w) {
396
+ O.error(`设置语音输入设备失败:${w.message}`);
397
397
  }
398
398
  try {
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";
399
+ const w = await this.meetingSession.audioVideo.listAudioOutputDevices();
400
+ O.info("audioOutputDevices ===>", w);
401
+ const k = ((u = w[0]) == null ? void 0 : u.deviceId) || "default";
402
402
  await this.meetingSession.audioVideo.chooseAudioOutput(k);
403
- } catch (C) {
404
- O.error(`设置语音输出设备失败:${C.message}`);
403
+ } catch (w) {
404
+ O.error(`设置语音输出设备失败:${w.message}`);
405
405
  }
406
406
  this.meetingSession.audioVideo.start();
407
407
  } catch (d) {
@@ -411,16 +411,16 @@ class it extends Me {
411
411
  }
412
412
  quit() {
413
413
  return this.joined ? new Promise((e, i) => {
414
- var c, u;
414
+ var a, u;
415
415
  this.joined = !1;
416
416
  const n = {
417
417
  audioVideoDidStop: async (d) => {
418
- var v;
418
+ var _;
419
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));
420
+ (_ = this.meetingSession) == null || _.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
- (c = this.meetingSession) == null || c.audioVideo.addObserver(n), (u = this.meetingSession) == null || u.audioVideo.stop();
423
+ (a = this.meetingSession) == null || a.audioVideo.addObserver(n), (u = this.meetingSession) == null || u.audioVideo.stop();
424
424
  }) : Promise.resolve(!0);
425
425
  }
426
426
  async detectMicro() {
@@ -434,8 +434,8 @@ class it extends Me {
434
434
  });
435
435
  }
436
436
  async toggleMicro(e) {
437
- var n, c, u;
438
- e ? (n = this.meetingSession) == null || n.audioVideo.realtimeUnmuteLocalAudio() : (c = this.meetingSession) == null || c.audioVideo.realtimeMuteLocalAudio();
437
+ var n, a, u;
438
+ e ? (n = this.meetingSession) == null || n.audioVideo.realtimeUnmuteLocalAudio() : (a = this.meetingSession) == null || a.audioVideo.realtimeMuteLocalAudio();
439
439
  const i = (u = this.meetingSession) == null ? void 0 : u.audioVideo.realtimeIsLocalAudioMuted();
440
440
  return i !== void 0 ? e !== i : !1;
441
441
  }
@@ -443,56 +443,205 @@ class it extends Me {
443
443
  throw new Error("Method not implemented.");
444
444
  }
445
445
  }
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 {
446
+ var ne = /* @__PURE__ */ ((r) => (r[r.Success = 0] = "Success", r[r.Failure = 1] = "Failure", r[r.ReJoin = 2] = "ReJoin", r[r.NoMicroPermission = 3] = "NoMicroPermission", r[r.Unknown = 500] = "Unknown", r))(ne || {});
447
+ class st extends Me {
448
448
  constructor({ jsBridge: e, getVoiceSign: i }) {
449
449
  super();
450
450
  s(this, "type", Q.RealseeVRWebViewRTC);
451
451
  s(this, "joined", !1);
452
452
  s(this, "micro", !1);
453
453
  s(this, "voiceId", "");
454
+ /**
455
+ * 保留加入房间参数,用于重连
456
+ */
457
+ s(this, "_joinOptions", null);
454
458
  s(this, "options");
455
- this.options = { jsBridge: e, getVoiceSign: i }, this.jsBridge.webViewType !== "WxMiniProgramWebView" && this.jsBridge.callAndListen("live/userVolumes", (n) => {
456
- this.emit("userVolumes", n);
457
- }), this.jsBridge.callAndListen("live/weakNetwork", (n) => {
458
- n && this.emit("weakNetwork");
459
+ /**
460
+ * 处理用户音量
461
+ * @param userVolumes
462
+ */
463
+ s(this, "handleUserVolumes", (e) => {
464
+ this.emit("userVolumes", e);
465
+ });
466
+ /**
467
+ * 处理弱网络情况
468
+ * @param weakNetwork
469
+ */
470
+ s(this, "handleWeakNetwork", (e) => {
471
+ e && this.emit("weakNetwork");
472
+ });
473
+ /**
474
+ * 加入语音房间
475
+ * @param options
476
+ * @returns
477
+ */
478
+ s(this, "join", async (e) => {
479
+ this._joinOptions = e, this.emit("joinWillStart");
480
+ const { sdkAppId: i, userId: n, userSig: a } = await this.getVoiceSignOrEmitError(
481
+ e
482
+ );
483
+ return !i || !n || !a ? !1 : (this.type = e.type, this.jsBridge.webViewType === "WxMiniProgramWebView" ? this.handleWxMiniProgramWebViewJoin({
484
+ sdkAppId: i,
485
+ userId: n,
486
+ userSig: a,
487
+ voiceId: e.voiceId
488
+ }) : this.handleAppWebViewJoin({
489
+ sdkAppId: i,
490
+ userId: n,
491
+ userSig: a,
492
+ voiceId: e.voiceId
493
+ }));
494
+ });
495
+ /**
496
+ * 重连
497
+ * @returns
498
+ */
499
+ s(this, "reJoin", async () => this._joinOptions ? this.join({
500
+ voiceId: this._joinOptions.voiceId,
501
+ userId: this._joinOptions.userId,
502
+ roomId: this._joinOptions.roomId,
503
+ type: this._joinOptions.type
504
+ }) : (this.emitErrorAndSetJoinedFalse("重连失败:未找到加入房间参数。"), !1));
505
+ /**
506
+ * 获取 rtc 签名
507
+ * @param params
508
+ * @returns
509
+ */
510
+ s(this, "getVoiceSignOrEmitError", async (e) => {
511
+ try {
512
+ return await this.options.getVoiceSign(e);
513
+ } catch (i) {
514
+ return this.emitErrorAndSetJoinedFalse("加入房间失败:rtc 签名请求异常"), {};
515
+ }
516
+ });
517
+ /**
518
+ * 处理小程序的加入房间
519
+ * @param options
520
+ * @returns
521
+ */
522
+ s(this, "handleWxMiniProgramWebViewJoin", async (e) => {
523
+ const [i, n] = await this.joinRoomOrEmitError(e);
524
+ return n ? !1 : this.handleJoinResult(i);
525
+ });
526
+ /**
527
+ * 处理App WebView的加入房间
528
+ * @param options
529
+ * @returns
530
+ */
531
+ s(this, "handleAppWebViewJoin", (e) => new Promise((i) => {
532
+ this.off("inner.rtc.success");
533
+ const n = (a) => {
534
+ this.off("inner.rtc.fail", n), this.off("inner.rtc.success", n), i(this.handleJoinResult(a));
535
+ };
536
+ this.once("inner.rtc.fail", n), this.once("inner.rtc.success", n);
537
+ try {
538
+ const { sdkAppId: a, userId: u, userSig: d, voiceId: g } = e;
539
+ this.jsBridge.callAndListen(
540
+ `live/join?sdkAppID=${a}&userID=${u}&roomID=${g}&userSig=${d}`,
541
+ (_) => {
542
+ _ === !0 ? this.emit("inner.rtc.success", _) : typeof _ == "object" ? _.code === ne.Success || _.code === ne.ReJoin ? this.emit("inner.rtc.success", _) : this.emit("inner.rtc.fail", _) : this.emit("inner.rtc.fail", _);
543
+ }
544
+ );
545
+ } catch (a) {
546
+ i(
547
+ this.handleJoinResult({
548
+ message: a.message,
549
+ code: ne.Unknown
550
+ })
551
+ );
552
+ }
553
+ }));
554
+ /**
555
+ * 加入语音房间,给小程序使用
556
+ * @param param0
557
+ * @returns
558
+ */
559
+ s(this, "joinRoomOrEmitError", async ({
560
+ sdkAppId: e,
561
+ userId: i,
562
+ voiceId: n,
563
+ userSig: a
564
+ }) => {
565
+ try {
566
+ return await this.jsBridge.callAndBackfeed(
567
+ `live/join?sdkAppID=${e}&userID=${i}&roomID=${Number(
568
+ n
569
+ )}&userSig=${a}`
570
+ );
571
+ } catch (u) {
572
+ return this.emitErrorAndSetJoinedFalse("加入房间失败:" + u.message), [null, u];
573
+ }
574
+ });
575
+ /**
576
+ * 处理加入语音房间结果
577
+ * @param res
578
+ * @returns
579
+ */
580
+ s(this, "handleJoinResult", (e) => {
581
+ switch (!0) {
582
+ case e === !0:
583
+ case (typeof e == "object" && e.code === ne.Success):
584
+ case (typeof e == "object" && e.code === ne.ReJoin): {
585
+ this.emit("joined"), this.joined = !0;
586
+ break;
587
+ }
588
+ default: {
589
+ this.joined = !1;
590
+ const i = typeof e == "object" ? e.message : "加入房间失败:未知异常。";
591
+ this.emit("error", new Error(i, { cause: e }));
592
+ }
593
+ }
594
+ return this.joined;
595
+ });
596
+ /**
597
+ * 将错误信息发送出去,并将 joined 置为 false
598
+ * @param message
599
+ */
600
+ s(this, "emitErrorAndSetJoinedFalse", (e) => {
601
+ this.emit("error", new Error(e)), this.joined = !1;
602
+ });
603
+ /**
604
+ * 退出房间
605
+ * @returns
606
+ */
607
+ s(this, "quit", async () => {
608
+ const [e, i] = await this.jsBridge.callAndBackfeed(
609
+ "live/quit"
610
+ );
611
+ return e === null && this.emit("error", i || new Error("退出房间失败:未知异常。")), this.joined = !1, !!e;
612
+ });
613
+ /**
614
+ * 监测麦克风权限
615
+ * @returns
616
+ */
617
+ s(this, "detectMicro", async () => {
618
+ const [e, i] = await this.jsBridge.detectMicro();
619
+ return e === null ? (this.emit("error", i || new Error("麦克风监测异常!")), !1) : e;
620
+ });
621
+ /**
622
+ * 修改麦克风状态
623
+ * @param flag
624
+ * @returns
625
+ */
626
+ s(this, "toggleMicro", async (e) => {
627
+ const [i, n] = await this.jsBridge.callAndBackfeed(
628
+ `live/toggleMicro?flag=${Boolean(e) ? 1 : 0}`
629
+ );
630
+ return i === null ? (this.emit("error", n || new Error("麦克风监测异常!")), !1) : (this.micro = i, i);
459
631
  });
632
+ /**
633
+ * 震动
634
+ */
635
+ s(this, "shock", () => {
636
+ this.jsBridge.shock(1);
637
+ });
638
+ this.options = { jsBridge: e, getVoiceSign: i }, this.jsBridge.webViewType !== "WxMiniProgramWebView" && this.jsBridge.callAndListen("live/userVolumes", this.handleUserVolumes), this.jsBridge.callAndListen("live/weakNetwork", this.handleWeakNetwork), this.on("inner.rtc.fail", this.handleJoinResult);
460
639
  }
461
640
  get jsBridge() {
462
641
  return this.options.jsBridge;
463
642
  }
464
- async join(e) {
465
- try {
466
- this.emit("joinWillStart");
467
- const { sdkAppId: i, userId: n, userSig: c } = await this.options.getVoiceSign(e);
468
- if (!(Boolean(i) && Boolean(n) && Boolean(c)))
469
- return this.emit("error", new Error("加入房间失败:rtc 签名请求异常")), this.joined = !1, this.joined;
470
- this.type = e.type;
471
- const [u, d] = await this.jsBridge.callAndBackfeed(
472
- `live/join?sdkAppID=${i}&userID=${n}&roomID=${Number(e.voiceId)}&userSig=${c}`
473
- );
474
- return u === !0 ? (this.emit("joined"), this.joined = !0) : u ? u.code === lt.Success ? (this.emit("joined"), this.joined = !0) : (this.emit("error", u), this.joined = !1) : (this.emit("error", d || new Error("加入房间失败:未知异常。")), this.joined = !1), this.joined;
475
- } catch (i) {
476
- return this.emit("error", new Error("加入房间失败:" + i.message)), this.joined = !1, this.joined;
477
- }
478
- }
479
- async quit() {
480
- const [e, i] = await this.jsBridge.callAndBackfeed("live/quit");
481
- return e === null && this.emit("error", i || new Error("退出房间失败:未知异常。")), this.joined = !1, !!e;
482
- }
483
- async detectMicro() {
484
- const [e, i] = await this.jsBridge.detectMicro();
485
- return e === null ? (this.emit("error", i || new Error("麦克风监测异常!")), !1) : e;
486
- }
487
- async toggleMicro(e) {
488
- const [i, n] = await this.jsBridge.callAndBackfeed(`live/toggleMicro?flag=${e ? 1 : 0}`);
489
- return i === null ? (this.emit("error", n || new Error("麦克风监测异常!")), !1) : (this.micro = i, i);
490
- }
491
- shock() {
492
- this.jsBridge.shock(1);
493
- }
494
643
  }
495
- 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 || {});
644
+ 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 || {}), J = /* @__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))(J || {}), Z = /* @__PURE__ */ ((r) => (r.OPEN = "OPEN", r.CLOSE = "CLOSE", r))(Z || {});
496
645
  function Nr(r) {
497
646
  try {
498
647
  const o = JSON.parse(r), e = {
@@ -513,7 +662,7 @@ function Nr(r) {
513
662
  return !1;
514
663
  }
515
664
  }
516
- 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 || {});
665
+ 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 || {}), Ae = /* @__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))(Ae || {}), 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 || {});
517
666
  function nr(r) {
518
667
  switch (r) {
519
668
  case 1e3:
@@ -546,28 +695,28 @@ var ft = {};
546
695
  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";
547
696
  })(o = r.LogLevel || (r.LogLevel = {})), r.default = o;
548
697
  })(ft);
549
- const st = /* @__PURE__ */ sr(ft);
698
+ const ot = /* @__PURE__ */ sr(ft);
550
699
  function or(r, o = {}) {
551
700
  const e = r.indexOf("?") !== -1, i = Object.keys(o).reduce(
552
- (n, c, u) => `${n}${u === 0 && !e ? "?" : "&"}${c}=${o[c]}`,
701
+ (n, a, u) => `${n}${u === 0 && !e ? "?" : "&"}${a}=${o[a]}`,
553
702
  ""
554
703
  );
555
704
  return r + i;
556
705
  }
557
- 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);
558
- function ye(r) {
706
+ const fe = globalThis.navigator.userAgent, ar = /android/gi.test(fe), cr = /iPhone|iPad\s+OS/gi.test(fe), ur = /MicroMessenger/gi.test(fe) && /miniProgram/gi.test(fe), lr = /realsee/gi.test(fe);
707
+ function be(r) {
559
708
  return Object.prototype.toString.call(r) === "[object Object]";
560
709
  }
561
- function Se(r, o) {
710
+ function we(r, o) {
562
711
  return r === o ? !0 : typeof r != typeof o ? !1 : !!(Number.isNaN(r) && Number.isNaN(o));
563
712
  }
564
713
  function fr(r, o) {
565
714
  const e = Object.getOwnPropertyNames(r), i = Object.getOwnPropertyNames(o);
566
715
  if (e.length !== i.length)
567
716
  return !1;
568
- for (let n = 0, c = e.length; n < c; n++) {
717
+ for (let n = 0, a = e.length; n < a; n++) {
569
718
  const u = e[n];
570
- if (!Se(r[u], o[u]))
719
+ if (!we(r[u], o[u]))
571
720
  return !1;
572
721
  }
573
722
  return !0;
@@ -576,15 +725,15 @@ function dr(r, o) {
576
725
  if (r.length !== o.length)
577
726
  return !1;
578
727
  for (let e = 0, i = r.length; e < i; e++)
579
- if (!Se(r[e], o[e]))
728
+ if (!we(r[e], o[e]))
580
729
  return !1;
581
730
  return !0;
582
731
  }
583
732
  function hr(r, o) {
584
- return Se(r, o) ? !0 : ye(r) && ye(o) ? fr(r, o) : Array.isArray(r) && Array.isArray(o) ? dr(r, o) : !1;
733
+ return we(r, o) ? !0 : be(r) && be(o) ? fr(r, o) : Array.isArray(r) && Array.isArray(o) ? dr(r, o) : !1;
585
734
  }
586
735
  function De(r, o) {
587
- return Se(r, o) ? !0 : ye(r) && ye(o) ? gr(r, o) : Array.isArray(r) && Array.isArray(o) ? _r(r, o) : !1;
736
+ return we(r, o) ? !0 : be(r) && be(o) ? gr(r, o) : Array.isArray(r) && Array.isArray(o) ? _r(r, o) : !1;
588
737
  }
589
738
  function _r(r, o) {
590
739
  if (r.length !== o.length)
@@ -598,23 +747,23 @@ function gr(r, o) {
598
747
  const e = Object.getOwnPropertyNames(r), i = Object.getOwnPropertyNames(o);
599
748
  if (e.length !== i.length)
600
749
  return !1;
601
- for (let n = 0, c = e.length; n < c; n++) {
750
+ for (let n = 0, a = e.length; n < a; n++) {
602
751
  const u = e[n];
603
752
  if (!De(r[u], o[u]))
604
753
  return !1;
605
754
  }
606
755
  return !0;
607
756
  }
608
- function ot(r, o, e = { deep: !1 }) {
757
+ function at(r, o, e = { deep: !1 }) {
609
758
  return e.deep ? De(r, o) : hr(r, o);
610
759
  }
611
- class mr extends ue {
760
+ class mr extends le {
612
761
  constructor(e) {
613
762
  super();
614
763
  s(this, "_realWebSocket");
615
764
  s(this, "_url");
616
765
  s(this, "_protocols");
617
- s(this, "_readyState", Le.NOTINITIALIZED);
766
+ s(this, "_readyState", Ae.NOTINITIALIZED);
618
767
  s(this, "_options", {
619
768
  timeout: 1e4,
620
769
  shouldReconnect: (e, i) => {
@@ -637,7 +786,7 @@ class mr extends ue {
637
786
  * 做一个健康检查
638
787
  */
639
788
  s(this, "_healthCheck", async () => {
640
- this._realWebSocket && this._realWebSocket.readyState !== this._readyState && (this._readyState = this._realWebSocket.readyState, this._readyState === Le.CLOSING && this.emit("closing")), await new Promise((e) => setTimeout(e, 2e3)), this._heathCheckTimer = requestAnimationFrame(this._healthCheck);
789
+ this._realWebSocket && this._realWebSocket.readyState !== this._readyState && (this._readyState = this._realWebSocket.readyState, this._readyState === Ae.CLOSING && this.emit("closing")), await new Promise((e) => setTimeout(e, 2e3)), this._heathCheckTimer = requestAnimationFrame(this._healthCheck);
641
790
  });
642
791
  /**
643
792
  * 清理超时计时器
@@ -701,8 +850,8 @@ class mr extends ue {
701
850
  * @returns
702
851
  */
703
852
  s(this, "send", (e) => {
704
- var i, n, c;
705
- ((i = this._realWebSocket) == null ? void 0 : i.readyState) === ((n = this._realWebSocket) == null ? void 0 : n.OPEN) && ((c = this._realWebSocket) == null || c.send(e));
853
+ var i, n, a;
854
+ ((i = this._realWebSocket) == null ? void 0 : i.readyState) === ((n = this._realWebSocket) == null ? void 0 : n.OPEN) && ((a = this._realWebSocket) == null || a.send(e));
706
855
  });
707
856
  /**
708
857
  * 关闭连接
@@ -725,7 +874,7 @@ class mr extends ue {
725
874
  * 创建ws连接
726
875
  */
727
876
  s(this, "_createWebSocket", () => {
728
- var n, c, u;
877
+ var n, a, u;
729
878
  const e = typeof this._url == "string" ? this._url : (n = this._url) == null ? void 0 : n.call(this, this);
730
879
  if (!e)
731
880
  return;
@@ -746,21 +895,21 @@ class mr extends ue {
746
895
  })
747
896
  );
748
897
  };
749
- this._connectTimeout = setTimeout(i, (c = this._options) == null ? void 0 : c.timeout), this._dispatchWebSocketEvent(), (u = this._options) != null && u.ignoreConnectivityEvents || this._attachConnectivityEvents();
898
+ this._connectTimeout = setTimeout(i, (a = this._options) == null ? void 0 : a.timeout), this._dispatchWebSocketEvent(), (u = this._options) != null && u.ignoreConnectivityEvents || this._attachConnectivityEvents();
750
899
  });
751
900
  /**
752
901
  * 断开ws事件
753
902
  */
754
903
  s(this, "_removeWebSocketEvent", () => {
755
- var e, i, n, c;
756
- (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);
904
+ var e, i, n, a;
905
+ (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), (a = this._realWebSocket) == null || a.removeEventListener("message", this._webSocketMessageHandler);
757
906
  });
758
907
  /**
759
908
  * 分发ws事件
760
909
  */
761
910
  s(this, "_dispatchWebSocketEvent", () => {
762
- var e, i, n, c;
763
- (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);
911
+ var e, i, n, a;
912
+ (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), (a = this._realWebSocket) == null || a.addEventListener("message", this._webSocketMessageHandler);
764
913
  });
765
914
  /**
766
915
  * ws连接事件
@@ -813,12 +962,12 @@ class mr extends ue {
813
962
  * @returns
814
963
  */
815
964
  _reconnect(e) {
816
- var n, c, u, d;
965
+ var n, a, u, d;
817
966
  if (!((n = this._options) != null && n.should1000Reconnect) && e.code === 1e3 || this._explicitlyClosed) {
818
967
  this._attempts = 0;
819
968
  return;
820
969
  }
821
- if (this._connectivityEventsAttached && ((c = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : c.onLine) === !1) {
970
+ if (this._connectivityEventsAttached && ((a = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : a.onLine) === !1) {
822
971
  this._reconnectWhenOnlineAgain = !0;
823
972
  return;
824
973
  }
@@ -826,7 +975,7 @@ class mr extends ue {
826
975
  typeof i == "number" && (this._pendingReconnect = setTimeout(this._createWebSocket, i));
827
976
  }
828
977
  }
829
- class vr extends ue {
978
+ class vr extends le {
830
979
  constructor() {
831
980
  super();
832
981
  /**
@@ -857,9 +1006,7 @@ class vr extends ue {
857
1006
  * @param event
858
1007
  */
859
1008
  s(this, "_handleCloseEvent", (e) => {
860
- O.info(
861
- `live room closed bacause of ${e.code}-${e.reason || nr(e.code)}`
862
- ), this.state = x.CLOSED;
1009
+ O.info(`live room closed bacause of ${e.code}-${e.reason || nr(e.code)}`), this.state = x.CLOSED;
863
1010
  });
864
1011
  /**
865
1012
  * 处理房间正在关闭事件(这个时候可能是断网了)
@@ -872,8 +1019,8 @@ class vr extends ue {
872
1019
  * 连接中
873
1020
  * @param event
874
1021
  */
875
- s(this, "_handleConnectingEvent", () => {
876
- O.info("live room is connecting"), this.state = x.CONNECTING;
1022
+ s(this, "_handleConnectingEvent", (e) => {
1023
+ O.info("live room is connecting"), this.state = x.CONNECTING, e.detail.reconnects > 0 && this.emit("reconnecting", e.detail);
877
1024
  });
878
1025
  /**
879
1026
  * 连接发送异常
@@ -956,9 +1103,9 @@ class vr extends ue {
956
1103
  this._ws && (this._ws._explicitlyClosed = !0);
957
1104
  }
958
1105
  }
959
- const pr = (r) => Promise.reject("unimplemented method GetVoiceSign"), je = (r, o = {}, e = []) => ({
1106
+ const pr = (r) => Promise.reject("unimplemented method GetVoiceSign"), Le = (r, o = {}, e = []) => ({
960
1107
  command: r,
961
- front_request_id: Ee(),
1108
+ front_request_id: ye(),
962
1109
  data: {
963
1110
  ...o,
964
1111
  to_user_ids: Array.isArray(e) ? e : [e]
@@ -967,7 +1114,7 @@ const pr = (r) => Promise.reject("unimplemented method GetVoiceSign"), je = (r,
967
1114
  var r, o;
968
1115
  window != null && window.__Realsee_Live__ && ((o = (r = window == null ? void 0 : window.__Realsee_Live__) == null ? void 0 : r.dispose) == null || o.call(r), window.__Realsee_Live__ = null);
969
1116
  };
970
- class yr extends ue {
1117
+ class yr extends le {
971
1118
  constructor(e) {
972
1119
  var i;
973
1120
  super();
@@ -978,7 +1125,7 @@ class yr extends ue {
978
1125
  /**
979
1126
  * 帧数据监听
980
1127
  */
981
- s(this, "keyframes", new ue());
1128
+ s(this, "keyframes", new le());
982
1129
  /**
983
1130
  * 内置的一些数据
984
1131
  */
@@ -1004,11 +1151,11 @@ class yr extends ue {
1004
1151
  ...this._buildInData.keyframes,
1005
1152
  [e]: i
1006
1153
  };
1007
- const n = je(K.KeyframeSync, this.snapshot);
1154
+ const n = Le(K.KeyframeSync, this.snapshot);
1008
1155
  try {
1009
1156
  return this._controller.sendMessage(n), !0;
1010
- } catch (c) {
1011
- return O.error(c), !1;
1157
+ } catch (a) {
1158
+ return O.error(a), !1;
1012
1159
  }
1013
1160
  });
1014
1161
  /**
@@ -1038,30 +1185,30 @@ class yr extends ue {
1038
1185
  * @param liveMsg
1039
1186
  */
1040
1187
  s(this, "_handleMessage", async (e) => {
1041
- var i, n, c, u, d;
1188
+ var i, n, a, u, d;
1042
1189
  if (typeof e == "object") {
1043
- const { command: g, data: v = {}, frontRequestId: E, code: y, message: I } = e;
1190
+ const { command: g, data: _ = {}, frontRequestId: E, code: y, message: I } = e;
1044
1191
  if (y === "SUCCESS")
1045
1192
  switch (g) {
1046
1193
  case K.SelfUserInfo: {
1047
- const _ = v;
1048
- ot(this.selfInfo, _, { deep: !0 }) || (this._buildInData.selfInfo = _, this.emit("selfInfoUpdate", this._buildInData.selfInfo, E));
1194
+ const m = _;
1195
+ at(this.selfInfo, m, { deep: !0 }) || (this._buildInData.selfInfo = m, this.emit("selfInfoUpdate", this._buildInData.selfInfo, E));
1049
1196
  break;
1050
1197
  }
1051
1198
  case K.RoomInfo: {
1052
- const _ = v;
1053
- this._buildInData.roomInfo = Object.assign({}, _), this.emit("readyKeyframeSync", _.last_frame || {});
1199
+ const m = _;
1200
+ this._buildInData.roomInfo = Object.assign({}, m), this.emit("readyKeyframeSync", m.last_frame || {});
1054
1201
  break;
1055
1202
  }
1056
1203
  case K.RTCInfo: {
1057
- const { voice_id: _, type: V } = v;
1058
- if (this._buildInData.rtcInfo = { voiceId: _, type: V }, (i = this.$RTC) != null && i.joined)
1204
+ const { voice_id: m, type: D } = _;
1205
+ if (this._buildInData.rtcInfo = { voiceId: m, type: D }, (i = this.$RTC) != null && i.joined)
1059
1206
  O.warn("已加入语音房间,无需重复加入!");
1060
1207
  else if (await ((u = this.$RTC) == null ? void 0 : u.join({
1061
- voiceId: _,
1208
+ voiceId: m,
1062
1209
  userId: ((n = this.selfInfo) == null ? void 0 : n.id) || "",
1063
- roomId: (c = this.roomInfo) == null ? void 0 : c.info.room_code,
1064
- type: V
1210
+ roomId: (a = this.roomInfo) == null ? void 0 : a.info.room_code,
1211
+ type: D
1065
1212
  }))) {
1066
1213
  const k = (d = this._options.initialMicroStatus) != null ? d : Z.OPEN;
1067
1214
  await this.toggleMicro(k === Z.OPEN);
@@ -1070,36 +1217,36 @@ class yr extends ue {
1070
1217
  break;
1071
1218
  }
1072
1219
  case K.UserList: {
1073
- const _ = v;
1074
- this._buildInData.userList = _, this.emit("userListUpdate", this.userList, E);
1220
+ const m = _;
1221
+ this._buildInData.userList = m, this.emit("userListUpdate", this.userList, E);
1075
1222
  break;
1076
1223
  }
1077
1224
  case K.CustomEvent: {
1078
- const _ = v;
1079
- this.emit("broadcast", _, E);
1225
+ const m = _;
1226
+ this.emit("broadcast", m, E);
1080
1227
  break;
1081
1228
  }
1082
1229
  case K.KeyframeSync: {
1083
- const _ = v, V = Object.keys(_).reduce(
1084
- (C, k) => {
1085
- if (ot(_[k], this._buildInData.keyframes[k], {
1230
+ const m = _, D = Object.keys(m).reduce(
1231
+ (w, k) => {
1232
+ if (at(m[k], this._buildInData.keyframes[k], {
1086
1233
  deep: !0
1087
1234
  }))
1088
- return C;
1089
- const U = [_[k], this._buildInData.keyframes[k], E], P = k;
1235
+ return w;
1236
+ const U = [m[k], this._buildInData.keyframes[k], E], P = k;
1090
1237
  return this.keyframes.emit(
1091
1238
  P,
1092
1239
  ...U
1093
- ), this._buildInData.keyframes[k] = _[k], C[k] = _[k], C;
1240
+ ), this._buildInData.keyframes[k] = m[k], w[k] = m[k], w;
1094
1241
  },
1095
1242
  {}
1096
1243
  );
1097
- this.emit("keyframes", V, E);
1244
+ this.emit("keyframes", D, E);
1098
1245
  break;
1099
1246
  }
1100
1247
  case K.BuiltinMsg: {
1101
- const _ = v;
1102
- 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(_.data.status === Z.OPEN), _.event_type === q.RoomChange && _.action === H.RoomClose && await this._exit();
1248
+ const m = _;
1249
+ 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 === J.UserMicroStatus && await this.toggleMicro(m.data.status === Z.OPEN), m.event_type === q.RoomChange && m.action === J.RoomClose && await this._exit();
1103
1250
  break;
1104
1251
  }
1105
1252
  case K.UserKickOut: {
@@ -1125,8 +1272,8 @@ class yr extends ue {
1125
1272
  * @returns
1126
1273
  */
1127
1274
  s(this, "connect", async (e = {}) => {
1128
- var u, d, g, v;
1129
- 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")
1275
+ var u, d, g, _;
1276
+ 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 = (_ = e.rtcMicStatus) != null ? _ : this._options.initialMicroStatus, !/^ws(s):\/\//.test(this._options.url) || typeof this._options.getTicket != "function")
1130
1277
  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");
1131
1278
  const { force: i = !1 } = e;
1132
1279
  if (this._options.rtc && !await this._options.rtc.detectMicro())
@@ -1142,11 +1289,11 @@ class yr extends ue {
1142
1289
  else
1143
1290
  return new Error("已有Live实例正在连接中,请勿重复连接!");
1144
1291
  this._clearLiveData();
1145
- const c = or(this._options.url, {
1292
+ const a = or(this._options.url, {
1146
1293
  ticket: await this._options.getTicket(),
1147
1294
  force: Number(!!i)
1148
1295
  });
1149
- return this._controller.open(c), !0;
1296
+ return this._controller.open(a), !0;
1150
1297
  });
1151
1298
  /**
1152
1299
  * 退出带看
@@ -1164,7 +1311,7 @@ class yr extends ue {
1164
1311
  });
1165
1312
  /**
1166
1313
  * 退出带看
1167
- * @returns
1314
+ * @returns
1168
1315
  */
1169
1316
  s(this, "exit", async () => this.close());
1170
1317
  /**
@@ -1181,7 +1328,7 @@ class yr extends ue {
1181
1328
  } catch (i) {
1182
1329
  O.warn(i);
1183
1330
  }
1184
- await this.updateStatus(q.RoomChange, H.RoomClose, {});
1331
+ await this.updateStatus(q.RoomChange, J.RoomClose, {});
1185
1332
  });
1186
1333
  /**
1187
1334
  * 销毁带看
@@ -1193,16 +1340,16 @@ class yr extends ue {
1193
1340
  * @param userInfo
1194
1341
  * @returns
1195
1342
  */
1196
- s(this, "setSelfInfo", async (e) => await this.updateStatus(q.UserChange, H.UserInfo, e));
1343
+ s(this, "setSelfInfo", async (e) => await this.updateStatus(q.UserChange, J.UserInfo, e));
1197
1344
  // 仅用于用户自己的麦克风控制
1198
1345
  s(this, "toggleMicro", async (e) => {
1199
- var n, c, u;
1200
- if (!((c = (n = this.selfInfo) == null ? void 0 : n.permission) != null && c.control_own_micro))
1346
+ var n, a, u;
1347
+ if (!((a = (n = this.selfInfo) == null ? void 0 : n.permission) != null && a.control_own_micro))
1201
1348
  return !1;
1202
1349
  const i = await ((u = this.$RTC) == null ? void 0 : u.toggleMicro(e));
1203
1350
  return i && await this.updateStatus(
1204
1351
  q.UserChange,
1205
- H.UserMicroStatus,
1352
+ J.UserMicroStatus,
1206
1353
  {
1207
1354
  status: e ? Z.OPEN : Z.CLOSE
1208
1355
  },
@@ -1216,10 +1363,10 @@ class yr extends ue {
1216
1363
  * @returns
1217
1364
  */
1218
1365
  s(this, "forbidMicro", async (e, i) => {
1219
- var n, c;
1220
- 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(
1366
+ var n, a;
1367
+ return typeof this._options.canForbidUserMicro == "function" && !this._options.canForbidUserMicro(i) || !((a = (n = this.selfInfo) == null ? void 0 : n.permission) != null && a.control_other_micro) ? !1 : await this.updateStatus(
1221
1368
  q.UserChange,
1222
- H.UserMicroStatus,
1369
+ J.UserMicroStatus,
1223
1370
  {
1224
1371
  status: e
1225
1372
  },
@@ -1233,10 +1380,10 @@ class yr extends ue {
1233
1380
  * @returns
1234
1381
  */
1235
1382
  s(this, "forbidSync", async (e, i) => {
1236
- var n, c;
1237
- 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(
1383
+ var n, a;
1384
+ return typeof this._options.canForbidUserSync == "function" && !this._options.canForbidUserSync(i) || !((a = (n = this.selfInfo) == null ? void 0 : n.permission) != null && a.control_other_sync) ? !1 : await this.updateStatus(
1238
1385
  q.UserChange,
1239
- H.UserPermission,
1386
+ J.UserPermission,
1240
1387
  { sync_frame: e },
1241
1388
  i
1242
1389
  );
@@ -1250,7 +1397,7 @@ class yr extends ue {
1250
1397
  var i, n;
1251
1398
  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(
1252
1399
  q.UserChange,
1253
- H.UserStatus,
1400
+ J.UserStatus,
1254
1401
  {
1255
1402
  status: "KICK_OUT"
1256
1403
  },
@@ -1269,7 +1416,7 @@ class yr extends ue {
1269
1416
  switch (e.getVoiceSign || O.error("GetVoiceSign method must be passed when using built-in RTC instances"), e.rtcType) {
1270
1417
  case Q.RealseeVRWebViewRTC: {
1271
1418
  if (this._options.jsBridge)
1272
- return new nt({
1419
+ return new st({
1273
1420
  jsBridge: this._options.jsBridge,
1274
1421
  getVoiceSign: this._options.getVoiceSign
1275
1422
  });
@@ -1277,12 +1424,12 @@ class yr extends ue {
1277
1424
  return;
1278
1425
  }
1279
1426
  case Q.RealseeBrowserChimeRTC:
1280
- return new it({
1427
+ return new nt({
1281
1428
  getVoiceSign: this._options.getVoiceSign,
1282
- logLevel: e.__debug__ ? st.DEBUG : st.INFO
1429
+ logLevel: e.__debug__ ? ot.DEBUG : ot.INFO
1283
1430
  });
1284
1431
  case Q.RealseeBrowserRTC:
1285
- return this._options.autoPlayConfirm || O.error("autoPlayConfirm method must be passed when using built-in RealseeBrowserRTC instances"), new rt({
1432
+ return this._options.autoPlayConfirm || O.error("autoPlayConfirm method must be passed when using built-in RealseeBrowserRTC instances"), new it({
1286
1433
  getVoiceSign: this._options.getVoiceSign,
1287
1434
  autoPlayConfirm: this._options.autoPlayConfirm
1288
1435
  });
@@ -1293,12 +1440,12 @@ class yr extends ue {
1293
1440
  }
1294
1441
  if (e.useBuiltInRTC) {
1295
1442
  if (e.getVoiceSign || O.error("GetVoiceSign method must be passed when using built-in RTC instances"), this._options.jsBridge)
1296
- return lr && (ar || cr) || ur ? new nt({
1443
+ return lr && (ar || cr) || ur ? new st({
1297
1444
  jsBridge: this._options.jsBridge,
1298
1445
  getVoiceSign: this._options.getVoiceSign
1299
- }) : e.builtInRTCType === ut.RealseeXChimeRTC ? new it({
1446
+ }) : e.builtInRTCType === lt.RealseeXChimeRTC ? new nt({
1300
1447
  getVoiceSign: this._options.getVoiceSign
1301
- }) : new rt({
1448
+ }) : new it({
1302
1449
  getVoiceSign: this._options.getVoiceSign,
1303
1450
  autoPlayConfirm: this._options.autoPlayConfirm
1304
1451
  });
@@ -1374,10 +1521,10 @@ class yr extends ue {
1374
1521
  * @param toUserIds
1375
1522
  * @returns
1376
1523
  */
1377
- async updateStatus(e, i, n, c) {
1524
+ async updateStatus(e, i, n, a) {
1378
1525
  if (this.state !== x.OPEN)
1379
1526
  return !1;
1380
- const u = Object.assign({ event_type: e, action: i }, { data: n }), d = je(K.BuiltinMsg, u, c);
1527
+ const u = Object.assign({ event_type: e, action: i }, { data: n }), d = Le(K.BuiltinMsg, u, a);
1381
1528
  try {
1382
1529
  return this._controller.sendMessage(d), !0;
1383
1530
  } catch (g) {
@@ -1392,11 +1539,11 @@ class yr extends ue {
1392
1539
  * @returns
1393
1540
  */
1394
1541
  broadcast(e, i, n) {
1395
- return this.state !== x.OPEN ? !1 : new Promise((c, u) => {
1396
- const d = je(K.CustomEvent, e, i), g = d.front_request_id, v = n ? setTimeout(() => {
1542
+ return this.state !== x.OPEN ? !1 : new Promise((a, u) => {
1543
+ const d = Le(K.CustomEvent, e, i), g = d.front_request_id, _ = n ? setTimeout(() => {
1397
1544
  u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", E);
1398
1545
  }, n) : void 0, E = (y, I) => {
1399
- I === g && (v && clearTimeout(v), this.off("broadcast", E), c(y));
1546
+ I === g && (_ && clearTimeout(_), this.off("broadcast", E), a(y));
1400
1547
  };
1401
1548
  this.on("broadcast", E);
1402
1549
  try {
@@ -1408,14 +1555,14 @@ class yr extends ue {
1408
1555
  }
1409
1556
  }
1410
1557
  const br = (r) => (Er(), new yr(r));
1411
- var Ae = {}, Sr = {
1558
+ var Ve = {}, Sr = {
1412
1559
  get exports() {
1413
- return Ae;
1560
+ return Ve;
1414
1561
  },
1415
1562
  set exports(r) {
1416
- Ae = r;
1563
+ Ve = r;
1417
1564
  }
1418
- }, oe = {};
1565
+ }, ae = {};
1419
1566
  /**
1420
1567
  * @license React
1421
1568
  * react-jsx-runtime.production.min.js
@@ -1425,25 +1572,25 @@ var Ae = {}, Sr = {
1425
1572
  * This source code is licensed under the MIT license found in the
1426
1573
  * LICENSE file in the root directory of this source tree.
1427
1574
  */
1428
- var at;
1429
- function Cr() {
1430
- if (at)
1431
- return oe;
1432
- at = 1;
1433
- var r = D, o = 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 };
1434
- function u(d, g, v) {
1435
- var E, y = {}, I = null, _ = null;
1436
- v !== void 0 && (I = "" + v), g.key !== void 0 && (I = "" + g.key), g.ref !== void 0 && (_ = g.ref);
1575
+ var ct;
1576
+ function wr() {
1577
+ if (ct)
1578
+ return ae;
1579
+ ct = 1;
1580
+ var r = M, o = 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, a = { key: !0, ref: !0, __self: !0, __source: !0 };
1581
+ function u(d, g, _) {
1582
+ var E, y = {}, I = null, m = null;
1583
+ _ !== void 0 && (I = "" + _), g.key !== void 0 && (I = "" + g.key), g.ref !== void 0 && (m = g.ref);
1437
1584
  for (E in g)
1438
- i.call(g, E) && !c.hasOwnProperty(E) && (y[E] = g[E]);
1585
+ i.call(g, E) && !a.hasOwnProperty(E) && (y[E] = g[E]);
1439
1586
  if (d && d.defaultProps)
1440
1587
  for (E in g = d.defaultProps, g)
1441
1588
  y[E] === void 0 && (y[E] = g[E]);
1442
- return { $$typeof: o, type: d, key: I, ref: _, props: y, _owner: n.current };
1589
+ return { $$typeof: o, type: d, key: I, ref: m, props: y, _owner: n.current };
1443
1590
  }
1444
- return oe.Fragment = e, oe.jsx = u, oe.jsxs = u, oe;
1591
+ return ae.Fragment = e, ae.jsx = u, ae.jsxs = u, ae;
1445
1592
  }
1446
- var ae = {};
1593
+ var ce = {};
1447
1594
  /**
1448
1595
  * @license React
1449
1596
  * react-jsx-runtime.development.js
@@ -1453,51 +1600,51 @@ var ae = {};
1453
1600
  * This source code is licensed under the MIT license found in the
1454
1601
  * LICENSE file in the root directory of this source tree.
1455
1602
  */
1456
- var ct;
1457
- function wr() {
1458
- return ct || (ct = 1, process.env.NODE_ENV !== "production" && function() {
1459
- var r = D, o = 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";
1603
+ var ut;
1604
+ function Cr() {
1605
+ return ut || (ut = 1, process.env.NODE_ENV !== "production" && function() {
1606
+ var r = M, o = Symbol.for("react.element"), e = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), D = Symbol.iterator, w = "@@iterator";
1460
1607
  function k(t) {
1461
1608
  if (t === null || typeof t != "object")
1462
1609
  return null;
1463
- var a = V && t[V] || t[C];
1464
- return typeof a == "function" ? a : null;
1610
+ var c = D && t[D] || t[w];
1611
+ return typeof c == "function" ? c : null;
1465
1612
  }
1466
1613
  var U = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1467
1614
  function P(t) {
1468
1615
  {
1469
- for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), h = 1; h < a; h++)
1616
+ for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), h = 1; h < c; h++)
1470
1617
  l[h - 1] = arguments[h];
1471
- fe("error", t, l);
1618
+ de("error", t, l);
1472
1619
  }
1473
1620
  }
1474
- function fe(t, a, l) {
1621
+ function de(t, c, l) {
1475
1622
  {
1476
1623
  var h = U.ReactDebugCurrentFrame, b = h.getStackAddendum();
1477
- b !== "" && (a += "%s", l = l.concat([b]));
1624
+ b !== "" && (c += "%s", l = l.concat([b]));
1478
1625
  var R = l.map(function(p) {
1479
1626
  return String(p);
1480
1627
  });
1481
- R.unshift("Warning: " + a), Function.prototype.apply.call(console[t], console, R);
1628
+ R.unshift("Warning: " + c), Function.prototype.apply.call(console[t], console, R);
1482
1629
  }
1483
1630
  }
1484
- var f = !1, w = !1, A = !1, S = !1, N = !1, M;
1485
- M = Symbol.for("react.module.reference");
1486
- function F(t) {
1487
- 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
1631
+ var f = !1, C = !1, A = !1, S = !1, N = !1, V;
1632
+ V = Symbol.for("react.module.reference");
1633
+ function W(t) {
1634
+ return !!(typeof t == "string" || typeof t == "function" || t === i || t === a || N || t === n || t === _ || t === E || S || t === m || f || C || 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
1488
1635
  // types supported by any Flight configuration anywhere since
1489
1636
  // we don't know which Flight build this will end up being used
1490
1637
  // with.
1491
- t.$$typeof === M || t.getModuleId !== void 0));
1638
+ t.$$typeof === V || t.getModuleId !== void 0));
1492
1639
  }
1493
- function J(t, a, l) {
1640
+ function H(t, c, l) {
1494
1641
  var h = t.displayName;
1495
1642
  if (h)
1496
1643
  return h;
1497
- var b = a.displayName || a.name || "";
1644
+ var b = c.displayName || c.name || "";
1498
1645
  return b !== "" ? l + "(" + b + ")" : l;
1499
1646
  }
1500
- function ne(t) {
1647
+ function se(t) {
1501
1648
  return t.displayName || "Context";
1502
1649
  }
1503
1650
  function G(t) {
@@ -1512,11 +1659,11 @@ function wr() {
1512
1659
  return "Fragment";
1513
1660
  case e:
1514
1661
  return "Portal";
1515
- case c:
1662
+ case a:
1516
1663
  return "Profiler";
1517
1664
  case n:
1518
1665
  return "StrictMode";
1519
- case v:
1666
+ case _:
1520
1667
  return "Suspense";
1521
1668
  case E:
1522
1669
  return "SuspenseList";
@@ -1524,13 +1671,13 @@ function wr() {
1524
1671
  if (typeof t == "object")
1525
1672
  switch (t.$$typeof) {
1526
1673
  case d:
1527
- var a = t;
1528
- return ne(a) + ".Consumer";
1674
+ var c = t;
1675
+ return se(c) + ".Consumer";
1529
1676
  case u:
1530
1677
  var l = t;
1531
- return ne(l._context) + ".Provider";
1678
+ return se(l._context) + ".Provider";
1532
1679
  case g:
1533
- return J(t, t.render, "ForwardRef");
1680
+ return H(t, t.render, "ForwardRef");
1534
1681
  case y:
1535
1682
  var h = t.displayName || null;
1536
1683
  return h !== null ? h : G(t.type) || "Memo";
@@ -1538,25 +1685,25 @@ function wr() {
1538
1685
  var b = t, R = b._payload, p = b._init;
1539
1686
  try {
1540
1687
  return G(p(R));
1541
- } catch (m) {
1688
+ } catch (v) {
1542
1689
  return null;
1543
1690
  }
1544
1691
  }
1545
1692
  }
1546
1693
  return null;
1547
1694
  }
1548
- var z = Object.assign, ee = 0, T, B, te, de, Ve, $e, xe;
1549
- function Ue() {
1695
+ var z = Object.assign, ee = 0, T, F, te, he, $e, xe, Ue;
1696
+ function We() {
1550
1697
  }
1551
- Ue.__reactDisabledLog = !0;
1698
+ We.__reactDisabledLog = !0;
1552
1699
  function dt() {
1553
1700
  {
1554
1701
  if (ee === 0) {
1555
- T = console.log, B = console.info, te = console.warn, de = console.error, Ve = console.group, $e = console.groupCollapsed, xe = console.groupEnd;
1702
+ T = console.log, F = console.info, te = console.warn, he = console.error, $e = console.group, xe = console.groupCollapsed, Ue = console.groupEnd;
1556
1703
  var t = {
1557
1704
  configurable: !0,
1558
1705
  enumerable: !0,
1559
- value: Ue,
1706
+ value: We,
1560
1707
  writable: !0
1561
1708
  };
1562
1709
  Object.defineProperties(console, {
@@ -1585,63 +1732,63 @@ function wr() {
1585
1732
  value: T
1586
1733
  }),
1587
1734
  info: z({}, t, {
1588
- value: B
1735
+ value: F
1589
1736
  }),
1590
1737
  warn: z({}, t, {
1591
1738
  value: te
1592
1739
  }),
1593
1740
  error: z({}, t, {
1594
- value: de
1741
+ value: he
1595
1742
  }),
1596
1743
  group: z({}, t, {
1597
- value: Ve
1744
+ value: $e
1598
1745
  }),
1599
1746
  groupCollapsed: z({}, t, {
1600
- value: $e
1747
+ value: xe
1601
1748
  }),
1602
1749
  groupEnd: z({}, t, {
1603
- value: xe
1750
+ value: Ue
1604
1751
  })
1605
1752
  });
1606
1753
  }
1607
1754
  ee < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1608
1755
  }
1609
1756
  }
1610
- var Ce = U.ReactCurrentDispatcher, we;
1611
- function he(t, a, l) {
1757
+ var Ce = U.ReactCurrentDispatcher, Re;
1758
+ function _e(t, c, l) {
1612
1759
  {
1613
- if (we === void 0)
1760
+ if (Re === void 0)
1614
1761
  try {
1615
1762
  throw Error();
1616
1763
  } catch (b) {
1617
1764
  var h = b.stack.trim().match(/\n( *(at )?)/);
1618
- we = h && h[1] || "";
1765
+ Re = h && h[1] || "";
1619
1766
  }
1620
1767
  return `
1621
- ` + we + t;
1768
+ ` + Re + t;
1622
1769
  }
1623
1770
  }
1624
- var Re = !1, _e;
1771
+ var Oe = !1, ge;
1625
1772
  {
1626
1773
  var _t = typeof WeakMap == "function" ? WeakMap : Map;
1627
- _e = new _t();
1774
+ ge = new _t();
1628
1775
  }
1629
- function Fe(t, a) {
1630
- if (!t || Re)
1776
+ function Fe(t, c) {
1777
+ if (!t || Oe)
1631
1778
  return "";
1632
1779
  {
1633
- var l = _e.get(t);
1780
+ var l = ge.get(t);
1634
1781
  if (l !== void 0)
1635
1782
  return l;
1636
1783
  }
1637
1784
  var h;
1638
- Re = !0;
1785
+ Oe = !0;
1639
1786
  var b = Error.prepareStackTrace;
1640
1787
  Error.prepareStackTrace = void 0;
1641
1788
  var R;
1642
1789
  R = Ce.current, Ce.current = null, dt();
1643
1790
  try {
1644
- if (a) {
1791
+ if (c) {
1645
1792
  var p = function() {
1646
1793
  throw Error();
1647
1794
  };
@@ -1674,149 +1821,149 @@ function wr() {
1674
1821
  }
1675
1822
  } catch (Y) {
1676
1823
  if (Y && h && typeof Y.stack == "string") {
1677
- for (var m = Y.stack.split(`
1824
+ for (var v = Y.stack.split(`
1678
1825
  `), $ = h.stack.split(`
1679
- `), j = m.length - 1, L = $.length - 1; j >= 1 && L >= 0 && m[j] !== $[L]; )
1826
+ `), j = v.length - 1, L = $.length - 1; j >= 1 && L >= 0 && v[j] !== $[L]; )
1680
1827
  L--;
1681
1828
  for (; j >= 1 && L >= 0; j--, L--)
1682
- if (m[j] !== $[L]) {
1829
+ if (v[j] !== $[L]) {
1683
1830
  if (j !== 1 || L !== 1)
1684
1831
  do
1685
- if (j--, L--, L < 0 || m[j] !== $[L]) {
1686
- var W = `
1687
- ` + m[j].replace(" at new ", " at ");
1688
- return t.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", t.displayName)), typeof t == "function" && _e.set(t, W), W;
1832
+ if (j--, L--, L < 0 || v[j] !== $[L]) {
1833
+ var B = `
1834
+ ` + v[j].replace(" at new ", " at ");
1835
+ return t.displayName && B.includes("<anonymous>") && (B = B.replace("<anonymous>", t.displayName)), typeof t == "function" && ge.set(t, B), B;
1689
1836
  }
1690
1837
  while (j >= 1 && L >= 0);
1691
1838
  break;
1692
1839
  }
1693
1840
  }
1694
1841
  } finally {
1695
- Re = !1, Ce.current = R, ht(), Error.prepareStackTrace = b;
1842
+ Oe = !1, Ce.current = R, ht(), Error.prepareStackTrace = b;
1696
1843
  }
1697
- var ie = t ? t.displayName || t.name : "", et = ie ? he(ie) : "";
1698
- return typeof t == "function" && _e.set(t, et), et;
1844
+ var ie = t ? t.displayName || t.name : "", tt = ie ? _e(ie) : "";
1845
+ return typeof t == "function" && ge.set(t, tt), tt;
1699
1846
  }
1700
- function gt(t, a, l) {
1847
+ function gt(t, c, l) {
1701
1848
  return Fe(t, !1);
1702
1849
  }
1703
1850
  function mt(t) {
1704
- var a = t.prototype;
1705
- return !!(a && a.isReactComponent);
1851
+ var c = t.prototype;
1852
+ return !!(c && c.isReactComponent);
1706
1853
  }
1707
- function ge(t, a, l) {
1854
+ function me(t, c, l) {
1708
1855
  if (t == null)
1709
1856
  return "";
1710
1857
  if (typeof t == "function")
1711
1858
  return Fe(t, mt(t));
1712
1859
  if (typeof t == "string")
1713
- return he(t);
1860
+ return _e(t);
1714
1861
  switch (t) {
1715
- case v:
1716
- return he("Suspense");
1862
+ case _:
1863
+ return _e("Suspense");
1717
1864
  case E:
1718
- return he("SuspenseList");
1865
+ return _e("SuspenseList");
1719
1866
  }
1720
1867
  if (typeof t == "object")
1721
1868
  switch (t.$$typeof) {
1722
1869
  case g:
1723
1870
  return gt(t.render);
1724
1871
  case y:
1725
- return ge(t.type, a, l);
1872
+ return me(t.type, c, l);
1726
1873
  case I: {
1727
1874
  var h = t, b = h._payload, R = h._init;
1728
1875
  try {
1729
- return ge(R(b), a, l);
1876
+ return me(R(b), c, l);
1730
1877
  } catch (p) {
1731
1878
  }
1732
1879
  }
1733
1880
  }
1734
1881
  return "";
1735
1882
  }
1736
- var me = Object.prototype.hasOwnProperty, Be = {}, We = U.ReactDebugCurrentFrame;
1737
- function ve(t) {
1883
+ var ve = Object.prototype.hasOwnProperty, Be = {}, Ke = U.ReactDebugCurrentFrame;
1884
+ function pe(t) {
1738
1885
  if (t) {
1739
- var a = t._owner, l = ge(t.type, t._source, a ? a.type : null);
1740
- We.setExtraStackFrame(l);
1886
+ var c = t._owner, l = me(t.type, t._source, c ? c.type : null);
1887
+ Ke.setExtraStackFrame(l);
1741
1888
  } else
1742
- We.setExtraStackFrame(null);
1889
+ Ke.setExtraStackFrame(null);
1743
1890
  }
1744
- function vt(t, a, l, h, b) {
1891
+ function vt(t, c, l, h, b) {
1745
1892
  {
1746
- var R = Function.call.bind(me);
1893
+ var R = Function.call.bind(ve);
1747
1894
  for (var p in t)
1748
1895
  if (R(t, p)) {
1749
- var m = void 0;
1896
+ var v = void 0;
1750
1897
  try {
1751
1898
  if (typeof t[p] != "function") {
1752
1899
  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`.");
1753
1900
  throw $.name = "Invariant Violation", $;
1754
1901
  }
1755
- m = t[p](a, p, h, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1902
+ v = t[p](c, p, h, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1756
1903
  } catch (j) {
1757
- m = j;
1904
+ v = j;
1758
1905
  }
1759
- 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));
1906
+ v && !(v instanceof Error) && (pe(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 v), pe(null)), v instanceof Error && !(v.message in Be) && (Be[v.message] = !0, pe(b), P("Failed %s type: %s", l, v.message), pe(null));
1760
1907
  }
1761
1908
  }
1762
1909
  }
1763
1910
  var pt = Array.isArray;
1764
- function Oe(t) {
1911
+ function Ie(t) {
1765
1912
  return pt(t);
1766
1913
  }
1767
1914
  function Et(t) {
1768
1915
  {
1769
- var a = typeof Symbol == "function" && Symbol.toStringTag, l = a && t[Symbol.toStringTag] || t.constructor.name || "Object";
1916
+ var c = typeof Symbol == "function" && Symbol.toStringTag, l = c && t[Symbol.toStringTag] || t.constructor.name || "Object";
1770
1917
  return l;
1771
1918
  }
1772
1919
  }
1773
1920
  function yt(t) {
1774
1921
  try {
1775
- return Ke(t), !1;
1776
- } catch (a) {
1922
+ return qe(t), !1;
1923
+ } catch (c) {
1777
1924
  return !0;
1778
1925
  }
1779
1926
  }
1780
- function Ke(t) {
1927
+ function qe(t) {
1781
1928
  return "" + t;
1782
1929
  }
1783
- function qe(t) {
1930
+ function Ge(t) {
1784
1931
  if (yt(t))
1785
- 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);
1932
+ 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)), qe(t);
1786
1933
  }
1787
- var se = U.ReactCurrentOwner, bt = {
1934
+ var oe = U.ReactCurrentOwner, bt = {
1788
1935
  key: !0,
1789
1936
  ref: !0,
1790
1937
  __self: !0,
1791
1938
  __source: !0
1792
- }, Ge, Ye, Ie;
1793
- Ie = {};
1939
+ }, Ye, Je, Te;
1940
+ Te = {};
1794
1941
  function St(t) {
1795
- if (me.call(t, "ref")) {
1796
- var a = Object.getOwnPropertyDescriptor(t, "ref").get;
1797
- if (a && a.isReactWarning)
1942
+ if (ve.call(t, "ref")) {
1943
+ var c = Object.getOwnPropertyDescriptor(t, "ref").get;
1944
+ if (c && c.isReactWarning)
1798
1945
  return !1;
1799
1946
  }
1800
1947
  return t.ref !== void 0;
1801
1948
  }
1802
- function Ct(t) {
1803
- if (me.call(t, "key")) {
1804
- var a = Object.getOwnPropertyDescriptor(t, "key").get;
1805
- if (a && a.isReactWarning)
1949
+ function wt(t) {
1950
+ if (ve.call(t, "key")) {
1951
+ var c = Object.getOwnPropertyDescriptor(t, "key").get;
1952
+ if (c && c.isReactWarning)
1806
1953
  return !1;
1807
1954
  }
1808
1955
  return t.key !== void 0;
1809
1956
  }
1810
- function wt(t, a) {
1811
- if (typeof t.ref == "string" && se.current && a && se.current.stateNode !== a) {
1812
- var l = G(se.current.type);
1813
- 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);
1957
+ function Ct(t, c) {
1958
+ if (typeof t.ref == "string" && oe.current && c && oe.current.stateNode !== c) {
1959
+ var l = G(oe.current.type);
1960
+ Te[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(oe.current.type), t.ref), Te[l] = !0);
1814
1961
  }
1815
1962
  }
1816
- function Rt(t, a) {
1963
+ function Rt(t, c) {
1817
1964
  {
1818
1965
  var l = function() {
1819
- 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));
1966
+ Ye || (Ye = !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)", c));
1820
1967
  };
1821
1968
  l.isReactWarning = !0, Object.defineProperty(t, "key", {
1822
1969
  get: l,
@@ -1824,10 +1971,10 @@ function wr() {
1824
1971
  });
1825
1972
  }
1826
1973
  }
1827
- function Ot(t, a) {
1974
+ function Ot(t, c) {
1828
1975
  {
1829
1976
  var l = function() {
1830
- 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));
1977
+ Je || (Je = !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)", c));
1831
1978
  };
1832
1979
  l.isReactWarning = !0, Object.defineProperty(t, "ref", {
1833
1980
  get: l,
@@ -1835,70 +1982,70 @@ function wr() {
1835
1982
  });
1836
1983
  }
1837
1984
  }
1838
- var It = function(t, a, l, h, b, R, p) {
1839
- var m = {
1985
+ var It = function(t, c, l, h, b, R, p) {
1986
+ var v = {
1840
1987
  // This tag allows us to uniquely identify this as a React Element
1841
1988
  $$typeof: o,
1842
1989
  // Built-in properties that belong on the element
1843
1990
  type: t,
1844
- key: a,
1991
+ key: c,
1845
1992
  ref: l,
1846
1993
  props: p,
1847
1994
  // Record the component responsible for creating this element.
1848
1995
  _owner: R
1849
1996
  };
1850
- return m._store = {}, Object.defineProperty(m._store, "validated", {
1997
+ return v._store = {}, Object.defineProperty(v._store, "validated", {
1851
1998
  configurable: !1,
1852
1999
  enumerable: !1,
1853
2000
  writable: !0,
1854
2001
  value: !1
1855
- }), Object.defineProperty(m, "_self", {
2002
+ }), Object.defineProperty(v, "_self", {
1856
2003
  configurable: !1,
1857
2004
  enumerable: !1,
1858
2005
  writable: !1,
1859
2006
  value: h
1860
- }), Object.defineProperty(m, "_source", {
2007
+ }), Object.defineProperty(v, "_source", {
1861
2008
  configurable: !1,
1862
2009
  enumerable: !1,
1863
2010
  writable: !1,
1864
2011
  value: b
1865
- }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
2012
+ }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
1866
2013
  };
1867
- function Tt(t, a, l, h, b) {
2014
+ function Tt(t, c, l, h, b) {
1868
2015
  {
1869
- var R, p = {}, m = null, $ = null;
1870
- l !== void 0 && (qe(l), m = "" + l), Ct(a) && (qe(a.key), m = "" + a.key), St(a) && ($ = a.ref, wt(a, b));
1871
- for (R in a)
1872
- me.call(a, R) && !bt.hasOwnProperty(R) && (p[R] = a[R]);
2016
+ var R, p = {}, v = null, $ = null;
2017
+ l !== void 0 && (Ge(l), v = "" + l), wt(c) && (Ge(c.key), v = "" + c.key), St(c) && ($ = c.ref, Ct(c, b));
2018
+ for (R in c)
2019
+ ve.call(c, R) && !bt.hasOwnProperty(R) && (p[R] = c[R]);
1873
2020
  if (t && t.defaultProps) {
1874
2021
  var j = t.defaultProps;
1875
2022
  for (R in j)
1876
2023
  p[R] === void 0 && (p[R] = j[R]);
1877
2024
  }
1878
- if (m || $) {
2025
+ if (v || $) {
1879
2026
  var L = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
1880
- m && Rt(p, L), $ && Ot(p, L);
2027
+ v && Rt(p, L), $ && Ot(p, L);
1881
2028
  }
1882
- return It(t, m, $, b, h, se.current, p);
2029
+ return It(t, v, $, b, h, oe.current, p);
1883
2030
  }
1884
2031
  }
1885
- var Te = U.ReactCurrentOwner, He = U.ReactDebugCurrentFrame;
2032
+ var ke = U.ReactCurrentOwner, He = U.ReactDebugCurrentFrame;
1886
2033
  function re(t) {
1887
2034
  if (t) {
1888
- var a = t._owner, l = ge(t.type, t._source, a ? a.type : null);
2035
+ var c = t._owner, l = me(t.type, t._source, c ? c.type : null);
1889
2036
  He.setExtraStackFrame(l);
1890
2037
  } else
1891
2038
  He.setExtraStackFrame(null);
1892
2039
  }
1893
- var ke;
1894
- ke = !1;
1895
- function Pe(t) {
2040
+ var Pe;
2041
+ Pe = !1;
2042
+ function Ne(t) {
1896
2043
  return typeof t == "object" && t !== null && t.$$typeof === o;
1897
2044
  }
1898
- function Je() {
2045
+ function ze() {
1899
2046
  {
1900
- if (Te.current) {
1901
- var t = G(Te.current.type);
2047
+ if (ke.current) {
2048
+ var t = G(ke.current.type);
1902
2049
  if (t)
1903
2050
  return `
1904
2051
 
@@ -1910,88 +2057,88 @@ Check the render method of \`` + t + "`.";
1910
2057
  function kt(t) {
1911
2058
  {
1912
2059
  if (t !== void 0) {
1913
- var a = t.fileName.replace(/^.*[\\\/]/, ""), l = t.lineNumber;
2060
+ var c = t.fileName.replace(/^.*[\\\/]/, ""), l = t.lineNumber;
1914
2061
  return `
1915
2062
 
1916
- Check your code at ` + a + ":" + l + ".";
2063
+ Check your code at ` + c + ":" + l + ".";
1917
2064
  }
1918
2065
  return "";
1919
2066
  }
1920
2067
  }
1921
- var ze = {};
2068
+ var Xe = {};
1922
2069
  function Pt(t) {
1923
2070
  {
1924
- var a = Je();
1925
- if (!a) {
2071
+ var c = ze();
2072
+ if (!c) {
1926
2073
  var l = typeof t == "string" ? t : t.displayName || t.name;
1927
- l && (a = `
2074
+ l && (c = `
1928
2075
 
1929
2076
  Check the top-level render call using <` + l + ">.");
1930
2077
  }
1931
- return a;
2078
+ return c;
1932
2079
  }
1933
2080
  }
1934
- function Xe(t, a) {
2081
+ function Ze(t, c) {
1935
2082
  {
1936
2083
  if (!t._store || t._store.validated || t.key != null)
1937
2084
  return;
1938
2085
  t._store.validated = !0;
1939
- var l = Pt(a);
1940
- if (ze[l])
2086
+ var l = Pt(c);
2087
+ if (Xe[l])
1941
2088
  return;
1942
- ze[l] = !0;
2089
+ Xe[l] = !0;
1943
2090
  var h = "";
1944
- 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);
2091
+ t && t._owner && t._owner !== ke.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);
1945
2092
  }
1946
2093
  }
1947
- function Ze(t, a) {
2094
+ function Qe(t, c) {
1948
2095
  {
1949
2096
  if (typeof t != "object")
1950
2097
  return;
1951
- if (Oe(t))
2098
+ if (Ie(t))
1952
2099
  for (var l = 0; l < t.length; l++) {
1953
2100
  var h = t[l];
1954
- Pe(h) && Xe(h, a);
2101
+ Ne(h) && Ze(h, c);
1955
2102
  }
1956
- else if (Pe(t))
2103
+ else if (Ne(t))
1957
2104
  t._store && (t._store.validated = !0);
1958
2105
  else if (t) {
1959
2106
  var b = k(t);
1960
2107
  if (typeof b == "function" && b !== t.entries)
1961
2108
  for (var R = b.call(t), p; !(p = R.next()).done; )
1962
- Pe(p.value) && Xe(p.value, a);
2109
+ Ne(p.value) && Ze(p.value, c);
1963
2110
  }
1964
2111
  }
1965
2112
  }
1966
2113
  function Nt(t) {
1967
2114
  {
1968
- var a = t.type;
1969
- if (a == null || typeof a == "string")
2115
+ var c = t.type;
2116
+ if (c == null || typeof c == "string")
1970
2117
  return;
1971
2118
  var l;
1972
- if (typeof a == "function")
1973
- l = a.propTypes;
1974
- else if (typeof a == "object" && (a.$$typeof === g || // Note: Memo only checks outer props here.
2119
+ if (typeof c == "function")
2120
+ l = c.propTypes;
2121
+ else if (typeof c == "object" && (c.$$typeof === g || // Note: Memo only checks outer props here.
1975
2122
  // Inner props are checked in the reconciler.
1976
- a.$$typeof === y))
1977
- l = a.propTypes;
2123
+ c.$$typeof === y))
2124
+ l = c.propTypes;
1978
2125
  else
1979
2126
  return;
1980
2127
  if (l) {
1981
- var h = G(a);
2128
+ var h = G(c);
1982
2129
  vt(l, t.props, "prop", h, t);
1983
- } else if (a.PropTypes !== void 0 && !ke) {
1984
- ke = !0;
1985
- var b = G(a);
2130
+ } else if (c.PropTypes !== void 0 && !Pe) {
2131
+ Pe = !0;
2132
+ var b = G(c);
1986
2133
  P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
1987
2134
  }
1988
- typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2135
+ typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1989
2136
  }
1990
2137
  }
1991
2138
  function jt(t) {
1992
2139
  {
1993
- for (var a = Object.keys(t.props), l = 0; l < a.length; l++) {
1994
- var h = a[l];
2140
+ for (var c = Object.keys(t.props), l = 0; l < c.length; l++) {
2141
+ var h = c[l];
1995
2142
  if (h !== "children" && h !== "key") {
1996
2143
  re(t), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), re(null);
1997
2144
  break;
@@ -2000,140 +2147,140 @@ Check the top-level render call using <` + l + ">.");
2000
2147
  t.ref !== null && (re(t), P("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
2001
2148
  }
2002
2149
  }
2003
- function Qe(t, a, l, h, b, R) {
2150
+ function et(t, c, l, h, b, R) {
2004
2151
  {
2005
- var p = F(t);
2152
+ var p = W(t);
2006
2153
  if (!p) {
2007
- var m = "";
2008
- (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.");
2154
+ var v = "";
2155
+ (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2009
2156
  var $ = kt(b);
2010
- $ ? m += $ : m += Je();
2157
+ $ ? v += $ : v += ze();
2011
2158
  var j;
2012
- t === null ? j = "null" : Oe(t) ? j = "array" : t !== void 0 && t.$$typeof === o ? (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);
2159
+ t === null ? j = "null" : Ie(t) ? j = "array" : t !== void 0 && t.$$typeof === o ? (j = "<" + (G(t.type) || "Unknown") + " />", v = " 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, v);
2013
2160
  }
2014
- var L = Tt(t, a, l, b, R);
2161
+ var L = Tt(t, c, l, b, R);
2015
2162
  if (L == null)
2016
2163
  return L;
2017
2164
  if (p) {
2018
- var W = a.children;
2019
- if (W !== void 0)
2165
+ var B = c.children;
2166
+ if (B !== void 0)
2020
2167
  if (h)
2021
- if (Oe(W)) {
2022
- for (var ie = 0; ie < W.length; ie++)
2023
- Ze(W[ie], t);
2024
- Object.freeze && Object.freeze(W);
2168
+ if (Ie(B)) {
2169
+ for (var ie = 0; ie < B.length; ie++)
2170
+ Qe(B[ie], t);
2171
+ Object.freeze && Object.freeze(B);
2025
2172
  } else
2026
2173
  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.");
2027
2174
  else
2028
- Ze(W, t);
2175
+ Qe(B, t);
2029
2176
  }
2030
2177
  return t === i ? jt(L) : Nt(L), L;
2031
2178
  }
2032
2179
  }
2033
- function Lt(t, a, l) {
2034
- return Qe(t, a, l, !0);
2180
+ function Lt(t, c, l) {
2181
+ return et(t, c, l, !0);
2035
2182
  }
2036
- function At(t, a, l) {
2037
- return Qe(t, a, l, !1);
2183
+ function At(t, c, l) {
2184
+ return et(t, c, l, !1);
2038
2185
  }
2039
- var Mt = At, Dt = Lt;
2040
- ae.Fragment = i, ae.jsx = Mt, ae.jsxs = Dt;
2041
- }()), ae;
2186
+ var Vt = At, Mt = Lt;
2187
+ ce.Fragment = i, ce.jsx = Vt, ce.jsxs = Mt;
2188
+ }()), ce;
2042
2189
  }
2043
2190
  (function(r) {
2044
- process.env.NODE_ENV === "production" ? r.exports = Cr() : r.exports = wr();
2191
+ process.env.NODE_ENV === "production" ? r.exports = wr() : r.exports = Cr();
2045
2192
  })(Sr);
2046
- const Rr = Ae.jsx;
2193
+ const Rr = Ve.jsx;
2047
2194
  function jr(r) {
2048
- const o = Gt(null), e = br(r), i = e.jsBridge, n = (f) => /* @__PURE__ */ Rr(o.Provider, { value: e, children: f.children }), c = () => {
2049
- const f = D.useContext(o);
2195
+ const o = Gt(null), e = br(r), i = e.jsBridge, n = (f) => /* @__PURE__ */ Rr(o.Provider, { value: e, children: f.children }), a = () => {
2196
+ const f = M.useContext(o);
2050
2197
  if (!f)
2051
2198
  throw new Error("LiveProvider never found.");
2052
2199
  return f;
2053
- }, u = () => e, d = () => e.$RTC, g = () => d(), v = () => async (f) => await e.connect(f);
2054
- function E(f, w, A = []) {
2055
- const S = c(), N = [S, name, ...A], M = () => S.keyframes.off(f, w);
2056
- return D.useEffect(() => (S.keyframes.on(f, w), M), N), M;
2200
+ }, u = () => e, d = () => e.$RTC, g = () => d(), _ = () => async (f) => await e.connect(f);
2201
+ function E(f, C, A = []) {
2202
+ const S = a(), N = [S, name, ...A], V = () => S.keyframes.off(f, C);
2203
+ return M.useEffect(() => (S.keyframes.on(f, C), V), N), V;
2057
2204
  }
2058
2205
  function y() {
2059
- const f = c();
2206
+ const f = a();
2060
2207
  return {
2061
2208
  connect: async (T) => await f.connect(T),
2062
- broadcast: async (T, B, te = 0) => await f.broadcast(T, B, te),
2209
+ broadcast: async (T, F, te = 0) => await f.broadcast(T, F, te),
2063
2210
  exit: async () => await f.exit(),
2064
2211
  kick: async (T) => await f.kick(T),
2065
2212
  toggleMicro: (T) => f.toggleMicro(T),
2066
- forbidMicro: async (T, B = []) => await f.forbidMicro(T, B),
2067
- forbidSync: (T, B = []) => f.forbidSync(T, B),
2068
- sendKeyframe: (T, B) => f.sendKeyframe(T, B),
2213
+ forbidMicro: async (T, F = []) => await f.forbidMicro(T, F),
2214
+ forbidSync: (T, F = []) => f.forbidSync(T, F),
2215
+ sendKeyframe: (T, F) => f.sendKeyframe(T, F),
2069
2216
  getFramesByKey: (T) => f.getFramesByKey(T),
2070
2217
  setSelfInfo: (T) => f.setSelfInfo(T),
2071
- updateStatus: (T, B, te, de) => f.updateStatus(T, B, te, de)
2218
+ updateStatus: (T, F, te, he) => f.updateStatus(T, F, te, he)
2072
2219
  };
2073
2220
  }
2074
2221
  function I(f) {
2075
- const w = c(), [A, S] = D.useState(w.getFramesByKey(f));
2076
- D.useEffect(() => {
2077
- const M = (ne) => S(ne), F = f, J = M;
2078
- return w.keyframes.on(F, J), () => w.keyframes.off(F, J);
2079
- }, [w]);
2080
- const N = D.useCallback(
2081
- (M) => w.sendKeyframe(f, M),
2082
- [w]
2222
+ const C = a(), [A, S] = M.useState(C.getFramesByKey(f));
2223
+ M.useEffect(() => {
2224
+ const V = (se) => S(se), W = f, H = V;
2225
+ return C.keyframes.on(W, H), () => C.keyframes.off(W, H);
2226
+ }, [C]);
2227
+ const N = M.useCallback(
2228
+ (V) => C.sendKeyframe(f, V),
2229
+ [C]
2083
2230
  );
2084
2231
  return [A, N];
2085
2232
  }
2086
- function _(f, w, A = []) {
2087
- const S = c(), N = () => S.off(f, w), M = [S, f, ...A];
2088
- return D.useEffect(() => (S.on(f, w), N), M), N;
2233
+ function m(f, C, A = []) {
2234
+ const S = a(), N = () => S.off(f, C), V = [S, f, ...A];
2235
+ return M.useEffect(() => (S.on(f, C), N), V), N;
2089
2236
  }
2090
- function V() {
2091
- const f = c(), [w, A] = D.useState(f.state);
2092
- return D.useEffect(() => {
2237
+ function D() {
2238
+ const f = a(), [C, A] = M.useState(f.state);
2239
+ return M.useEffect(() => {
2093
2240
  const S = (N) => A(N);
2094
2241
  return f.on("stateChange", S), () => f.off("stateChange", S);
2095
- }, [f]), w;
2242
+ }, [f]), C;
2096
2243
  }
2097
- function C() {
2098
- const f = c();
2244
+ function w() {
2245
+ const f = a();
2099
2246
  return {
2100
- join: (F) => f.$RTC.join(F),
2247
+ join: (W) => f.$RTC.join(W),
2101
2248
  quit: () => f.$RTC.quit(),
2102
2249
  shock: () => {
2103
- var F, J;
2104
- return (J = (F = f.$RTC).shock) == null ? void 0 : J.call(F);
2250
+ var W, H;
2251
+ return (H = (W = f.$RTC).shock) == null ? void 0 : H.call(W);
2105
2252
  },
2106
- toggleMicro: (F) => f.$RTC.toggleMicro(F),
2253
+ toggleMicro: (W) => f.$RTC.toggleMicro(W),
2107
2254
  detectMicro: () => f.$RTC.detectMicro()
2108
2255
  };
2109
2256
  }
2110
- function k(f, w, A = []) {
2111
- const S = c(), N = () => S.$RTC.off(f, w), M = [S, f, ...A];
2112
- return D.useEffect(() => (S.$RTC.on(f, w), N), M), N;
2257
+ function k(f, C, A = []) {
2258
+ const S = a(), N = () => S.$RTC.off(f, C), V = [S, f, ...A];
2259
+ return M.useEffect(() => (S.$RTC.on(f, C), N), V), N;
2113
2260
  }
2114
2261
  function U() {
2115
- const f = c(), [w, A] = D.useState(
2262
+ const f = a(), [C, A] = M.useState(
2116
2263
  f.selfInfo || {}
2117
- ), S = (M) => A(M);
2118
- D.useEffect(() => (f.on("selfInfoUpdate", S), () => f.off("selfInfoUpdate", S)), [f]);
2119
- const N = D.useCallback(
2120
- async (M) => await f.setSelfInfo(M),
2264
+ ), S = (V) => A(V);
2265
+ M.useEffect(() => (f.on("selfInfoUpdate", S), () => f.off("selfInfoUpdate", S)), [f]);
2266
+ const N = M.useCallback(
2267
+ async (V) => await f.setSelfInfo(V),
2121
2268
  [f]
2122
2269
  );
2123
- return [w, N];
2270
+ return [C, N];
2124
2271
  }
2125
2272
  function P() {
2126
- const f = c(), [w, A] = D.useState(
2273
+ const f = a(), [C, A] = M.useState(
2127
2274
  f.snapshot
2128
2275
  );
2129
- return D.useEffect(() => {
2276
+ return M.useEffect(() => {
2130
2277
  const S = (N) => A(N);
2131
2278
  return f.on("keyframes", S), () => f.off("keyframes", S);
2132
- }), w;
2279
+ }), C;
2133
2280
  }
2134
- function fe() {
2135
- const f = c(), [w, A] = D.useState(f.userList), S = (N) => A(N);
2136
- return D.useEffect(() => (f.on("userListUpdate", S), () => f.off("userListUpdate", S)), [f]), w;
2281
+ function de() {
2282
+ const f = a(), [C, A] = M.useState(f.userList), S = (N) => A(N);
2283
+ return M.useEffect(() => (f.on("userListUpdate", S), () => f.off("userListUpdate", S)), [f]), C;
2137
2284
  }
2138
2285
  return {
2139
2286
  live: e,
@@ -2141,37 +2288,39 @@ function jr(r) {
2141
2288
  LiveProvider: n,
2142
2289
  unsafe__useLiveInstance: u,
2143
2290
  unsafe__useRTCInstance: g,
2144
- useConnect: v,
2291
+ useConnect: _,
2145
2292
  useKeyframe: I,
2146
2293
  useKeyframeUpdateCallback: E,
2147
2294
  useLiveAction: y,
2148
- useLiveEventCallback: _,
2149
- useLiveState: V,
2150
- useRTCAction: C,
2295
+ useLiveEventCallback: m,
2296
+ useLiveState: D,
2297
+ useRTCAction: w,
2151
2298
  useRTCEventCallback: k,
2152
2299
  useSelfInfo: U,
2153
2300
  useKeyframesSnapshot: P,
2154
- useUserList: fe
2301
+ useUserList: de
2155
2302
  };
2156
2303
  }
2157
2304
  export {
2158
- rt as BrowserRTC,
2159
- it as BrowserRTC4Chime,
2160
- ut as BuiltInRTCType,
2161
- H as BuiltinActionType,
2305
+ it as BrowserRTC,
2306
+ nt as BrowserRTC4Chime,
2307
+ lt as BuiltInRTCType,
2308
+ J as BuiltinActionType,
2162
2309
  q as BuiltinEventType,
2163
2310
  K as Command,
2164
2311
  Me as CoreRTC,
2312
+ yr as Live,
2165
2313
  x as LiveState,
2166
2314
  tr as MemUserStatus,
2167
2315
  Z as MicroStatus,
2168
- lt as RTCJoinedInfoCodeEnum,
2316
+ ne as RTCJoinedInfoCodeEnum,
2169
2317
  Q as RTCType,
2170
2318
  er as UserStatus,
2171
- nt as VRWebViewRTC,
2319
+ st as VRWebViewRTC,
2172
2320
  ir as WebSocketCloseError,
2173
2321
  rr as WebSocketErrorType,
2174
- Le as WebSocketState,
2322
+ Ae as WebSocketState,
2323
+ Er as _clearLiveInstanceIfNeed,
2175
2324
  br as createLive,
2176
2325
  jr as createLiveReact,
2177
2326
  Nr as parseLiveMsg,