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