@pepperdash/mobile-control-react-app-core 1.22.9-client-id-qp.2 → 1.22.9
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var w2 = Object.defineProperty;
|
|
2
2
|
var m2 = (e, t, o) => t in e ? w2(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
3
|
var q = (e, t, o) => m2(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
-
import
|
|
4
|
+
import x3, { AxiosError as p2 } from "axios";
|
|
5
5
|
import { useDispatch as M2, useSelector as x2, Provider as Z2 } from "react-redux";
|
|
6
|
-
import { createSelector as M, createSlice as
|
|
7
|
-
import
|
|
6
|
+
import { createSelector as M, createSlice as a1, combineReducers as S2, configureStore as j2 } from "@reduxjs/toolkit";
|
|
7
|
+
import Z3, { createContext as C2, useEffect as x1, useCallback as c1, useContext as b2, useRef as M1, useMemo as n1, useState as z, useLayoutEffect as S3 } from "react";
|
|
8
8
|
import { useNavigate as y2, useRouteError as I2, isRouteErrorResponse as R2 } from "react-router-dom";
|
|
9
|
-
import * as
|
|
9
|
+
import * as j3 from "lodash";
|
|
10
10
|
const W1 = M2.withTypes(), m = x2.withTypes(), Z1 = (e) => e.appConfig, E2 = M(
|
|
11
11
|
Z1,
|
|
12
12
|
(e) => e.config
|
|
@@ -19,13 +19,13 @@ const W1 = M2.withTypes(), m = x2.withTypes(), Z1 = (e) => e.appConfig, E2 = M(
|
|
|
19
19
|
), _2 = M(
|
|
20
20
|
Z1,
|
|
21
21
|
(e) => e.config.partnerMetadata
|
|
22
|
-
), X8 = () => m(E2), Q8 = () => m(T2), N8 = () => m(D2), e6 = () => m(_2),
|
|
23
|
-
|
|
22
|
+
), X8 = () => m(E2), Q8 = () => m(T2), N8 = () => m(D2), e6 = () => m(_2), C3 = (e) => e.devices, b3 = M(
|
|
23
|
+
C3,
|
|
24
24
|
(e) => e
|
|
25
25
|
), P2 = (e) => M(
|
|
26
|
-
|
|
26
|
+
C3,
|
|
27
27
|
(t) => t[e] ? t[e] : void 0
|
|
28
|
-
), t6 = () => m(
|
|
28
|
+
), t6 = () => m(b3);
|
|
29
29
|
function _(e) {
|
|
30
30
|
return m(P2(e));
|
|
31
31
|
}
|
|
@@ -134,7 +134,7 @@ const A = (e) => e.rooms, L2 = (e) => M(
|
|
|
134
134
|
), ee = M(
|
|
135
135
|
[
|
|
136
136
|
(e, t) => t,
|
|
137
|
-
() =>
|
|
137
|
+
() => b3,
|
|
138
138
|
(e, t) => {
|
|
139
139
|
var o, c;
|
|
140
140
|
return (c = (o = e.rooms[t]) == null ? void 0 : o.configuration) == null ? void 0 : c.destinations;
|
|
@@ -191,19 +191,19 @@ const s6 = S1, c6 = (e) => m(
|
|
|
191
191
|
), de = M(
|
|
192
192
|
G,
|
|
193
193
|
(e) => e.touchpanelKey !== ""
|
|
194
|
-
),
|
|
194
|
+
), y3 = M(
|
|
195
195
|
G,
|
|
196
196
|
(e) => e.roomData.deviceInterfaceSupport
|
|
197
|
-
),
|
|
198
|
-
|
|
197
|
+
), I3 = (e) => M(
|
|
198
|
+
y3,
|
|
199
199
|
(t) => {
|
|
200
200
|
var o;
|
|
201
201
|
return ((o = t == null ? void 0 : t[e]) == null ? void 0 : o.interfaces) ?? [];
|
|
202
202
|
}
|
|
203
203
|
), ve = (e, t) => M(
|
|
204
|
-
|
|
204
|
+
I3(e),
|
|
205
205
|
(o) => o.includes(t)
|
|
206
|
-
),
|
|
206
|
+
), R3 = () => m(oe), Z6 = () => m(se), S6 = () => m(ce), j6 = () => m(re), C6 = () => m(le), b6 = () => m(ie), y6 = () => m(ae), I6 = () => m(ue), R6 = () => m(de), E6 = () => m(y3), T6 = (e) => m(I3(e)), D6 = (e, t) => m(ve(e, t)), N = (e) => e.ui, V1 = (e) => M(N, (t) => t.modalVisibility[e]), he = (e) => M(N, (t) => {
|
|
207
207
|
const o = t.popoverVisibility[e];
|
|
208
208
|
if (o)
|
|
209
209
|
return Object.keys(o).find((c) => o[c]);
|
|
@@ -225,7 +225,7 @@ const s6 = S1, c6 = (e) => m(
|
|
|
225
225
|
},
|
|
226
226
|
popoverVisibility: {},
|
|
227
227
|
syncState: []
|
|
228
|
-
},
|
|
228
|
+
}, E3 = a1({
|
|
229
229
|
name: "ui",
|
|
230
230
|
initialState: Se,
|
|
231
231
|
reducers: {
|
|
@@ -271,7 +271,7 @@ const s6 = S1, c6 = (e) => m(
|
|
|
271
271
|
e.syncState = [];
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
}),
|
|
274
|
+
}), W = E3.actions, je = E3.reducer, Ce = {
|
|
275
275
|
config: {
|
|
276
276
|
enableDev: !1,
|
|
277
277
|
apiPath: "",
|
|
@@ -281,7 +281,7 @@ const s6 = S1, c6 = (e) => m(
|
|
|
281
281
|
loginMode: "",
|
|
282
282
|
modes: {}
|
|
283
283
|
}
|
|
284
|
-
},
|
|
284
|
+
}, T3 = a1({
|
|
285
285
|
name: "appConfig",
|
|
286
286
|
initialState: Ce,
|
|
287
287
|
reducers: {
|
|
@@ -289,18 +289,18 @@ const s6 = S1, c6 = (e) => m(
|
|
|
289
289
|
e.config = t.payload;
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
}),
|
|
292
|
+
}), D3 = T3.actions, be = T3.reducer, h3 = {}, B1 = a1({
|
|
293
293
|
name: "devices",
|
|
294
|
-
initialState:
|
|
294
|
+
initialState: h3,
|
|
295
295
|
reducers: {
|
|
296
296
|
setDeviceState(e, t) {
|
|
297
297
|
const o = t.payload.type, c = o.slice(o.lastIndexOf("/") + 1);
|
|
298
298
|
if (!c) return;
|
|
299
|
-
const r = t.payload.content, l = e[c] ?? {}, v =
|
|
299
|
+
const r = t.payload.content, l = e[c] ?? {}, v = j3.merge(l, r);
|
|
300
300
|
e[c] = v;
|
|
301
301
|
},
|
|
302
302
|
clearDevices() {
|
|
303
|
-
return
|
|
303
|
+
return h3;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
}), f1 = {
|
|
@@ -315,25 +315,25 @@ class Ie {
|
|
|
315
315
|
q(this, "expiry", "current-uuid-expires");
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
const
|
|
318
|
+
const g3 = new Ie();
|
|
319
319
|
function Re(e) {
|
|
320
320
|
return sessionStorage.getItem(e) || "";
|
|
321
321
|
}
|
|
322
322
|
function Ee(e, t) {
|
|
323
323
|
sessionStorage.setItem(e, t);
|
|
324
324
|
}
|
|
325
|
-
const
|
|
325
|
+
const f3 = {}, k1 = a1({
|
|
326
326
|
name: "rooms",
|
|
327
|
-
initialState:
|
|
327
|
+
initialState: f3,
|
|
328
328
|
reducers: {
|
|
329
329
|
setRoomState(e, t) {
|
|
330
330
|
const o = t.payload.type, c = o.slice(o.lastIndexOf("/") + 1);
|
|
331
331
|
if (!c) return;
|
|
332
|
-
const r = t.payload.content, l = e[c] ?? {}, v =
|
|
332
|
+
const r = t.payload.content, l = e[c] ?? {}, v = j3.merge(l, r);
|
|
333
333
|
e[c] = v;
|
|
334
334
|
},
|
|
335
335
|
clearRooms() {
|
|
336
|
-
return
|
|
336
|
+
return f3;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
}), w1 = {
|
|
@@ -370,7 +370,7 @@ const g3 = {}, k1 = u1({
|
|
|
370
370
|
userCode: "",
|
|
371
371
|
qrUrl: ""
|
|
372
372
|
}
|
|
373
|
-
},
|
|
373
|
+
}, _3 = a1({
|
|
374
374
|
name: "runtimeConfig",
|
|
375
375
|
initialState: De,
|
|
376
376
|
reducers: {
|
|
@@ -405,16 +405,16 @@ const g3 = {}, k1 = u1({
|
|
|
405
405
|
e.touchpanelKey = t.payload;
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
}), U =
|
|
409
|
-
type:
|
|
408
|
+
}), U = _3.actions, _e = _3.reducer, L1 = x3.create(), P3 = "websocket/connect", L3 = "websocket/disconnect", $3 = "websocket/sendMessage", A3 = "websocket/addEventHandler", B3 = "websocket/removeEventHandler", k3 = "websocket/reconnect", O3 = () => ({ type: P3 }), k6 = () => ({ type: L3 }), Pe = (e, t) => ({
|
|
409
|
+
type: $3,
|
|
410
410
|
payload: { messageType: e, content: t }
|
|
411
411
|
}), Le = (e, t, o) => ({
|
|
412
|
-
type:
|
|
412
|
+
type: A3,
|
|
413
413
|
payload: { eventType: e, key: t, callback: o }
|
|
414
414
|
}), $e = (e, t) => ({
|
|
415
|
-
type:
|
|
415
|
+
type: B3,
|
|
416
416
|
payload: { eventType: e, key: t }
|
|
417
|
-
}), Ae = () => ({ type:
|
|
417
|
+
}), Ae = () => ({ type: k3 }), Be = () => {
|
|
418
418
|
const e = {
|
|
419
419
|
client: null,
|
|
420
420
|
token: null,
|
|
@@ -425,13 +425,13 @@ const g3 = {}, k1 = u1({
|
|
|
425
425
|
try {
|
|
426
426
|
const Z = location.pathname.split("/").filter((b) => b.length > 0);
|
|
427
427
|
Z.length >= 5 ? Z.length = 5 : Z.length = 2;
|
|
428
|
-
const
|
|
428
|
+
const j = `/${Z.join("/")}`, C = await L1.get(
|
|
429
429
|
"/_local-config/_config.local.json",
|
|
430
|
-
{ baseURL:
|
|
430
|
+
{ baseURL: j }
|
|
431
431
|
);
|
|
432
|
-
if (
|
|
433
|
-
const b =
|
|
434
|
-
a(
|
|
432
|
+
if (C.status === 200 && C.data) {
|
|
433
|
+
const b = C.data.apiPath;
|
|
434
|
+
a(D3.setAppConfig(C.data));
|
|
435
435
|
const x = await L1.get(
|
|
436
436
|
`${b}/version`
|
|
437
437
|
);
|
|
@@ -441,29 +441,29 @@ const g3 = {}, k1 = u1({
|
|
|
441
441
|
console.error("Error getting config", Z);
|
|
442
442
|
}
|
|
443
443
|
return !0;
|
|
444
|
-
}, o = async (a, Z,
|
|
444
|
+
}, o = async (a, Z, j) => {
|
|
445
445
|
try {
|
|
446
|
-
const
|
|
446
|
+
const C = await L1.get(
|
|
447
447
|
`${a}/ui/joinroom?token=${Z}`
|
|
448
448
|
);
|
|
449
|
-
return
|
|
450
|
-
} catch (
|
|
451
|
-
return console.log(
|
|
452
|
-
|
|
449
|
+
return C.status === 200 && C.data ? (j(U.setRoomData(C.data)), !0) : !1;
|
|
450
|
+
} catch (C) {
|
|
451
|
+
return console.log(C), C instanceof p2 && C.response && C.response.status === 498 ? (console.error("Invalid token. Unable to join room"), j(
|
|
452
|
+
W.setErrorMessage(
|
|
453
453
|
`Token ${Z} is invalid. Unable to join room`
|
|
454
454
|
)
|
|
455
|
-
),
|
|
455
|
+
), !1) : (console.error("Error getting room data", C), C instanceof Error ? j(W.setErrorMessage(C.message)) : j(W.setErrorMessage("Error getting room data")), !1);
|
|
456
456
|
}
|
|
457
457
|
}, c = (a) => {
|
|
458
458
|
e.reconnectTimer && (clearTimeout(e.reconnectTimer), e.reconnectTimer = null), console.log("WebSocket middleware: Starting reconnection loop..."), e.reconnectTimer = setTimeout(() => {
|
|
459
|
-
e.waitingToReconnect = !1, e.reconnectTimer = null, console.log("WebSocket middleware: Attempting automatic reconnection..."), a(
|
|
459
|
+
e.waitingToReconnect = !1, e.reconnectTimer = null, console.log("WebSocket middleware: Attempting automatic reconnection..."), a(O3());
|
|
460
460
|
}, 5e3);
|
|
461
461
|
}, r = () => {
|
|
462
462
|
e.reconnectTimer && (console.log("WebSocket middleware: Stopping reconnection loop"), clearTimeout(e.reconnectTimer), e.reconnectTimer = null);
|
|
463
463
|
}, l = (a) => {
|
|
464
|
-
a(
|
|
464
|
+
a(W.setShowReconnect(!0)), a(U.setWebsocketIsConnected(!1)), a(f1.clearDevices()), a(w1.clearRooms()), a(W.clearAllModals()), a(W.clearSyncState());
|
|
465
465
|
}, v = (a, Z) => {
|
|
466
|
-
const
|
|
466
|
+
const j = a(), C = Z ?? j.runtimeConfig.roomData.roomKey, { clientId: b } = j.runtimeConfig.roomData, x = j.runtimeConfig.websocket.isConnected;
|
|
467
467
|
if (!Z || !x || !b) {
|
|
468
468
|
console.log("WebSocket middleware: Cannot request room status", {
|
|
469
469
|
hasRoomKey: !!Z,
|
|
@@ -474,19 +474,19 @@ const g3 = {}, k1 = u1({
|
|
|
474
474
|
}
|
|
475
475
|
console.log("WebSocket middleware: Requesting status from room:", Z), e.client && x && e.client.send(
|
|
476
476
|
JSON.stringify({
|
|
477
|
-
type: `/room/${
|
|
477
|
+
type: `/room/${C}/status`,
|
|
478
478
|
clientId: b,
|
|
479
479
|
content: null
|
|
480
480
|
})
|
|
481
481
|
);
|
|
482
482
|
}, f = async (a, Z) => {
|
|
483
483
|
console.log("WebSocket middleware: Attempting to connect...");
|
|
484
|
-
const
|
|
485
|
-
if (!
|
|
484
|
+
const j = Z(), { apiPath: C } = j.appConfig.config, { serverIsRunningOnProcessorHardware: b, roomData: x } = j.runtimeConfig;
|
|
485
|
+
if (!C || !e.token) {
|
|
486
486
|
console.log(
|
|
487
487
|
"WebSocket middleware: Cannot connect - missing requirements",
|
|
488
488
|
{
|
|
489
|
-
hasApiPath: !!
|
|
489
|
+
hasApiPath: !!C,
|
|
490
490
|
hasToken: !!e.token
|
|
491
491
|
}
|
|
492
492
|
);
|
|
@@ -504,50 +504,49 @@ const g3 = {}, k1 = u1({
|
|
|
504
504
|
}
|
|
505
505
|
e.waitingToReconnect = !0;
|
|
506
506
|
try {
|
|
507
|
-
|
|
508
|
-
if (!x) {
|
|
507
|
+
if (!await o(C, e.token, a)) {
|
|
509
508
|
console.log(
|
|
510
509
|
"WebSocket middleware: Failed to get room data, will retry..."
|
|
511
510
|
), c(a);
|
|
512
511
|
return;
|
|
513
512
|
}
|
|
514
513
|
console.log("WebSocket middleware: Connecting to websocket");
|
|
515
|
-
const C1 = `${
|
|
516
|
-
e.client = K, K.onopen = (
|
|
517
|
-
console.log("WebSocket middleware: Connected",
|
|
514
|
+
const C1 = `${C.replace("http", "ws")}/ui/join/${e.token}?clientId=${x.clientId}`, K = new WebSocket(C1);
|
|
515
|
+
e.client = K, K.onopen = (k) => {
|
|
516
|
+
console.log("WebSocket middleware: Connected", k.type, k.target), e.waitingToReconnect = !1, r(), setTimeout(() => {
|
|
518
517
|
e.client === K && K.readyState === WebSocket.OPEN && a(U.setWebsocketIsConnected(!0));
|
|
519
518
|
}, 100);
|
|
520
|
-
}, K.onerror = (
|
|
521
|
-
console.error("WebSocket middleware: Error",
|
|
522
|
-
}, K.onclose = (
|
|
519
|
+
}, K.onerror = (k) => {
|
|
520
|
+
console.error("WebSocket middleware: Error", k), l(a);
|
|
521
|
+
}, K.onclose = (k) => {
|
|
523
522
|
var D;
|
|
524
523
|
if (console.log(
|
|
525
524
|
"WebSocket middleware: Disconnected",
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
),
|
|
525
|
+
k.reason,
|
|
526
|
+
k.code
|
|
527
|
+
), k.code === 4100) {
|
|
529
528
|
console.log("WebSocket middleware: Closed by client (cleanup)"), r(), l(a);
|
|
530
529
|
return;
|
|
531
530
|
}
|
|
532
|
-
if (e.waitingToReconnect = !0,
|
|
531
|
+
if (e.waitingToReconnect = !0, k.code === 4e3) {
|
|
533
532
|
console.log("WebSocket middleware: User code changed"), r(), a(
|
|
534
533
|
U.setUserCode({ userCode: "", qrUrl: "" })
|
|
535
534
|
), a(
|
|
536
|
-
|
|
535
|
+
W.setErrorMessage(
|
|
537
536
|
"User code changed. Click reconnect to enter the new code"
|
|
538
537
|
)
|
|
539
538
|
), l(a);
|
|
540
539
|
return;
|
|
541
540
|
}
|
|
542
|
-
if (
|
|
541
|
+
if (k.code === 4002) {
|
|
543
542
|
console.log("WebSocket middleware: Room combination changed"), r(), a(
|
|
544
|
-
|
|
543
|
+
W.setErrorMessage(
|
|
545
544
|
"Room combination changed. Click Reconnect to re-join the room"
|
|
546
545
|
)
|
|
547
546
|
), l(a);
|
|
548
547
|
return;
|
|
549
548
|
}
|
|
550
|
-
if (
|
|
549
|
+
if (k.code === 4001)
|
|
551
550
|
if (!!((D = Z().runtimeConfig) != null && D.touchpanelKey))
|
|
552
551
|
console.log(
|
|
553
552
|
"WebSocket middleware: Code 4001 received with touchpanel key present, will auto-reconnect"
|
|
@@ -560,7 +559,7 @@ const g3 = {}, k1 = u1({
|
|
|
560
559
|
console.log(
|
|
561
560
|
"WebSocket middleware: Processor disconnected (no touchpanel key, not on processor hardware)"
|
|
562
561
|
), r(), a(
|
|
563
|
-
|
|
562
|
+
W.setErrorMessage(
|
|
564
563
|
"Processor has disconnected. Click Reconnect to continue."
|
|
565
564
|
)
|
|
566
565
|
), l(a);
|
|
@@ -575,13 +574,13 @@ const g3 = {}, k1 = u1({
|
|
|
575
574
|
return;
|
|
576
575
|
}
|
|
577
576
|
e.client = null, console.log("WebSocket middleware: Clearing state on disconnect"), a(
|
|
578
|
-
|
|
577
|
+
W.setErrorMessage(
|
|
579
578
|
"Connection lost. Attempting to reconnect..."
|
|
580
579
|
)
|
|
581
|
-
), a(U.setWebsocketIsConnected(!1)), a(f1.clearDevices()), a(w1.clearRooms()), a(
|
|
582
|
-
}, K.onmessage = (
|
|
580
|
+
), a(U.setWebsocketIsConnected(!1)), a(f1.clearDevices()), a(w1.clearRooms()), a(W.clearAllModals()), a(W.clearSyncState()), c(a);
|
|
581
|
+
}, K.onmessage = (k) => {
|
|
583
582
|
try {
|
|
584
|
-
const D = JSON.parse(
|
|
583
|
+
const D = JSON.parse(k.data);
|
|
585
584
|
if (D.type === "close") {
|
|
586
585
|
K.close(4001, D.content);
|
|
587
586
|
return;
|
|
@@ -596,7 +595,7 @@ const g3 = {}, k1 = u1({
|
|
|
596
595
|
);
|
|
597
596
|
break;
|
|
598
597
|
case "/system/roomKey":
|
|
599
|
-
a(w1.clearRooms()), a(f1.clearDevices()), a(
|
|
598
|
+
a(w1.clearRooms()), a(f1.clearDevices()), a(W.clearSyncState()), a(
|
|
600
599
|
U.setCurrentRoomKey(
|
|
601
600
|
D.content
|
|
602
601
|
)
|
|
@@ -611,10 +610,10 @@ const g3 = {}, k1 = u1({
|
|
|
611
610
|
window.location.reload();
|
|
612
611
|
break;
|
|
613
612
|
case "/system/deviceInterfaces": {
|
|
614
|
-
const
|
|
613
|
+
const Y = D.content;
|
|
615
614
|
a(
|
|
616
615
|
U.setDeviceInterfaces(
|
|
617
|
-
|
|
616
|
+
Y.deviceInterfaces
|
|
618
617
|
)
|
|
619
618
|
);
|
|
620
619
|
break;
|
|
@@ -627,13 +626,13 @@ const g3 = {}, k1 = u1({
|
|
|
627
626
|
break;
|
|
628
627
|
}
|
|
629
628
|
else if (D.type.startsWith("/event/")) {
|
|
630
|
-
const
|
|
631
|
-
|
|
629
|
+
const Y = e.eventHandlers[D.type];
|
|
630
|
+
Y || console.log(
|
|
632
631
|
"WebSocket middleware: No handlers found for event type",
|
|
633
632
|
D.type
|
|
634
|
-
),
|
|
633
|
+
), Y && Object.values(Y).forEach((u1) => {
|
|
635
634
|
try {
|
|
636
|
-
|
|
635
|
+
u1(D);
|
|
637
636
|
} catch (b1) {
|
|
638
637
|
console.error(
|
|
639
638
|
"WebSocket middleware: Event handler error",
|
|
@@ -646,18 +645,18 @@ const g3 = {}, k1 = u1({
|
|
|
646
645
|
console.error("WebSocket middleware: Message handling error", D);
|
|
647
646
|
}
|
|
648
647
|
}, e.waitingToReconnect = !1;
|
|
649
|
-
} catch (
|
|
650
|
-
console.error("WebSocket middleware: Connection error",
|
|
648
|
+
} catch (B) {
|
|
649
|
+
console.error("WebSocket middleware: Connection error", B), e.waitingToReconnect = !1, e.client = null;
|
|
651
650
|
}
|
|
652
651
|
}, h = () => {
|
|
653
652
|
e.client && (console.log("WebSocket middleware: Disconnecting"), r(), e.client.close(4100, "Client requested disconnect"), e.client = null);
|
|
654
|
-
}, w = (a, Z,
|
|
655
|
-
const
|
|
653
|
+
}, w = (a, Z, j) => {
|
|
654
|
+
const C = j(), b = C.runtimeConfig.websocket.isConnected, x = C.runtimeConfig.roomData.clientId;
|
|
656
655
|
e.client && b ? e.client.send(
|
|
657
656
|
JSON.stringify({ type: a, clientId: x, content: Z })
|
|
658
657
|
) : console.warn("WebSocket middleware: Cannot send message - not connected");
|
|
659
|
-
}, d = (a, Z,
|
|
660
|
-
e.eventHandlers[a] || (e.eventHandlers[a] = {}), e.eventHandlers[a][Z] =
|
|
658
|
+
}, d = (a, Z, j) => {
|
|
659
|
+
e.eventHandlers[a] || (e.eventHandlers[a] = {}), e.eventHandlers[a][Z] = j, console.log("WebSocket middleware: Event handler added", a, Z);
|
|
661
660
|
}, P = (a, Z) => {
|
|
662
661
|
e.eventHandlers[a] && (delete e.eventHandlers[a][Z], console.log(
|
|
663
662
|
"WebSocket middleware: Event handler removed",
|
|
@@ -665,59 +664,59 @@ const g3 = {}, k1 = u1({
|
|
|
665
664
|
Z
|
|
666
665
|
));
|
|
667
666
|
}, H = (a) => {
|
|
668
|
-
const Z = a(), { gatewayAppPath:
|
|
669
|
-
window.location.href = x ? `${
|
|
667
|
+
const Z = a(), { gatewayAppPath: j } = Z.appConfig.config, C = Z.runtimeConfig.roomData.roomKey, b = Z.runtimeConfig.roomData.systemUuid, x = Z.runtimeConfig.roomData.userCode, B = `${j}?uuid=${b}&roomKey=${C}`;
|
|
668
|
+
window.location.href = x ? `${B}&Code=${x}` : B;
|
|
670
669
|
};
|
|
671
|
-
return (a) => (Z) => (
|
|
672
|
-
const
|
|
673
|
-
if (!
|
|
674
|
-
return
|
|
675
|
-
const b =
|
|
670
|
+
return (a) => (Z) => (j) => {
|
|
671
|
+
const C = Z(j);
|
|
672
|
+
if (!j || typeof j != "object" || !("type" in j))
|
|
673
|
+
return C;
|
|
674
|
+
const b = j;
|
|
676
675
|
return (async () => {
|
|
677
676
|
switch (b.type) {
|
|
678
|
-
case
|
|
679
|
-
let
|
|
680
|
-
|
|
677
|
+
case P3: {
|
|
678
|
+
let B = new URLSearchParams(window.location.search).get("token");
|
|
679
|
+
B ? (console.log("WebSocket middleware: Saving token"), Ee(g3.uuid, B)) : (B = Re(g3.uuid), console.log("WebSocket middleware: Loading token")), e.token = B, await t(a.dispatch), await f(a.dispatch, a.getState);
|
|
681
680
|
break;
|
|
682
681
|
}
|
|
683
|
-
case
|
|
682
|
+
case L3:
|
|
684
683
|
h();
|
|
685
684
|
break;
|
|
686
|
-
case
|
|
685
|
+
case $3:
|
|
687
686
|
w(
|
|
688
687
|
b.payload.messageType,
|
|
689
688
|
b.payload.content,
|
|
690
689
|
a.getState
|
|
691
690
|
);
|
|
692
691
|
break;
|
|
693
|
-
case
|
|
692
|
+
case A3:
|
|
694
693
|
d(
|
|
695
694
|
b.payload.eventType,
|
|
696
695
|
b.payload.key,
|
|
697
696
|
b.payload.callback
|
|
698
697
|
);
|
|
699
698
|
break;
|
|
700
|
-
case
|
|
699
|
+
case B3:
|
|
701
700
|
P(
|
|
702
701
|
b.payload.eventType,
|
|
703
702
|
b.payload.key
|
|
704
703
|
);
|
|
705
704
|
break;
|
|
706
|
-
case
|
|
705
|
+
case k3:
|
|
707
706
|
H(a.getState);
|
|
708
707
|
break;
|
|
709
708
|
default:
|
|
710
|
-
if (
|
|
711
|
-
|
|
709
|
+
if (j.type === U.setWebsocketIsConnected.type)
|
|
710
|
+
j.payload === !0 && (console.log(
|
|
712
711
|
"[WebSocket Middleware] Connection established, requesting room status..."
|
|
713
712
|
), setTimeout(() => v(a.getState), 100));
|
|
714
|
-
else if (
|
|
715
|
-
const x = a.getState(),
|
|
716
|
-
x.runtimeConfig.websocket.isConnected && (
|
|
713
|
+
else if (j.type === U.setRoomData.type) {
|
|
714
|
+
const x = a.getState(), B = j.payload;
|
|
715
|
+
x.runtimeConfig.websocket.isConnected && (B != null && B.clientId) && (console.log(
|
|
717
716
|
"[WebSocket Middleware] Room data received, requesting room status..."
|
|
718
717
|
), setTimeout(() => v(a.getState), 100));
|
|
719
|
-
} else if (
|
|
720
|
-
const x =
|
|
718
|
+
} else if (j.type === U.setCurrentRoomKey.type) {
|
|
719
|
+
const x = j.payload;
|
|
721
720
|
x && (console.log(
|
|
722
721
|
"[WebSocket Middleware] Room changed to:",
|
|
723
722
|
x,
|
|
@@ -728,7 +727,7 @@ const g3 = {}, k1 = u1({
|
|
|
728
727
|
}
|
|
729
728
|
})().catch((x) => {
|
|
730
729
|
console.error("WebSocket middleware: Error handling action", x);
|
|
731
|
-
}),
|
|
730
|
+
}), C;
|
|
732
731
|
};
|
|
733
732
|
}, ke = S2({
|
|
734
733
|
appConfig: be,
|
|
@@ -744,21 +743,21 @@ const g3 = {}, k1 = u1({
|
|
|
744
743
|
ignoredActions: ["websocket/addEventHandler"]
|
|
745
744
|
}
|
|
746
745
|
}).concat(Be())
|
|
747
|
-
}),
|
|
746
|
+
}), w3 = x3.create();
|
|
748
747
|
function O6() {
|
|
749
748
|
const e = W1();
|
|
750
749
|
return async () => {
|
|
751
750
|
try {
|
|
752
751
|
const t = location.pathname.split("/").filter((r) => r.length > 0);
|
|
753
752
|
t.length >= 5 ? t.length = 5 : t.length = 2;
|
|
754
|
-
const o = `/${t.join("/")}`, c = await
|
|
753
|
+
const o = `/${t.join("/")}`, c = await w3.get(
|
|
755
754
|
"/_local-config/_config.local.json",
|
|
756
755
|
{ baseURL: o }
|
|
757
756
|
);
|
|
758
757
|
if (c.status == 200 && c.data) {
|
|
759
758
|
const r = c.data.apiPath;
|
|
760
|
-
e(
|
|
761
|
-
const l = await
|
|
759
|
+
e(D3.setAppConfig(c.data));
|
|
760
|
+
const l = await w3.get(
|
|
762
761
|
`${r}/version`
|
|
763
762
|
);
|
|
764
763
|
l.status == 200 && l.data && e(U.setRuntimeConfig(l.data));
|
|
@@ -769,7 +768,7 @@ function O6() {
|
|
|
769
768
|
return !0;
|
|
770
769
|
};
|
|
771
770
|
}
|
|
772
|
-
var m1 = { exports: {} },
|
|
771
|
+
var m1 = { exports: {} }, r1 = {};
|
|
773
772
|
/**
|
|
774
773
|
* @license React
|
|
775
774
|
* react-jsx-runtime.production.min.js
|
|
@@ -779,11 +778,11 @@ var m1 = { exports: {} }, l1 = {};
|
|
|
779
778
|
* This source code is licensed under the MIT license found in the
|
|
780
779
|
* LICENSE file in the root directory of this source tree.
|
|
781
780
|
*/
|
|
782
|
-
var
|
|
781
|
+
var m3;
|
|
783
782
|
function We() {
|
|
784
|
-
if (
|
|
785
|
-
|
|
786
|
-
var e =
|
|
783
|
+
if (m3) return r1;
|
|
784
|
+
m3 = 1;
|
|
785
|
+
var e = Z3, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
787
786
|
function v(f, h, w) {
|
|
788
787
|
var d, P = {}, H = null, a = null;
|
|
789
788
|
w !== void 0 && (H = "" + w), h.key !== void 0 && (H = "" + h.key), h.ref !== void 0 && (a = h.ref);
|
|
@@ -791,9 +790,9 @@ function We() {
|
|
|
791
790
|
if (f && f.defaultProps) for (d in h = f.defaultProps, h) P[d] === void 0 && (P[d] = h[d]);
|
|
792
791
|
return { $$typeof: t, type: f, key: H, ref: a, props: P, _owner: r.current };
|
|
793
792
|
}
|
|
794
|
-
return
|
|
793
|
+
return r1.Fragment = o, r1.jsx = v, r1.jsxs = v, r1;
|
|
795
794
|
}
|
|
796
|
-
var
|
|
795
|
+
var l1 = {};
|
|
797
796
|
/**
|
|
798
797
|
* @license React
|
|
799
798
|
* react-jsx-runtime.development.js
|
|
@@ -803,14 +802,14 @@ var i1 = {};
|
|
|
803
802
|
* This source code is licensed under the MIT license found in the
|
|
804
803
|
* LICENSE file in the root directory of this source tree.
|
|
805
804
|
*/
|
|
806
|
-
var
|
|
805
|
+
var p3;
|
|
807
806
|
function Ve() {
|
|
808
|
-
return
|
|
809
|
-
var e =
|
|
810
|
-
function
|
|
807
|
+
return p3 || (p3 = 1, process.env.NODE_ENV !== "production" && function() {
|
|
808
|
+
var e = Z3, t = Symbol.for("react.element"), o = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), f = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), a = Symbol.for("react.offscreen"), Z = Symbol.iterator, j = "@@iterator";
|
|
809
|
+
function C(s) {
|
|
811
810
|
if (s === null || typeof s != "object")
|
|
812
811
|
return null;
|
|
813
|
-
var i = Z && s[Z] || s[
|
|
812
|
+
var i = Z && s[Z] || s[j];
|
|
814
813
|
return typeof i == "function" ? i : null;
|
|
815
814
|
}
|
|
816
815
|
var b = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -818,10 +817,10 @@ function Ve() {
|
|
|
818
817
|
{
|
|
819
818
|
for (var i = arguments.length, u = new Array(i > 1 ? i - 1 : 0), p = 1; p < i; p++)
|
|
820
819
|
u[p - 1] = arguments[p];
|
|
821
|
-
|
|
820
|
+
B("error", s, u);
|
|
822
821
|
}
|
|
823
822
|
}
|
|
824
|
-
function
|
|
823
|
+
function B(s, i, u) {
|
|
825
824
|
{
|
|
826
825
|
var p = b.ReactDebugCurrentFrame, E = p.getStackAddendum();
|
|
827
826
|
E !== "" && (i += "%s", u = u.concat([E]));
|
|
@@ -831,23 +830,23 @@ function Ve() {
|
|
|
831
830
|
T.unshift("Warning: " + i), Function.prototype.apply.call(console[s], console, T);
|
|
832
831
|
}
|
|
833
832
|
}
|
|
834
|
-
var
|
|
835
|
-
|
|
836
|
-
function
|
|
837
|
-
return !!(typeof s == "string" || typeof s == "function" || s === c || s === l ||
|
|
833
|
+
var U1 = !1, C1 = !1, K = !1, k = !1, D = !1, Y;
|
|
834
|
+
Y = Symbol.for("react.module.reference");
|
|
835
|
+
function u1(s) {
|
|
836
|
+
return !!(typeof s == "string" || typeof s == "function" || s === c || s === l || D || s === r || s === w || s === d || k || s === a || U1 || C1 || K || typeof s == "object" && s !== null && (s.$$typeof === H || s.$$typeof === P || s.$$typeof === v || s.$$typeof === f || s.$$typeof === h || // This needs to include all possible module reference object
|
|
838
837
|
// types supported by any Flight configuration anywhere since
|
|
839
838
|
// we don't know which Flight build this will end up being used
|
|
840
839
|
// with.
|
|
841
|
-
s.$$typeof ===
|
|
840
|
+
s.$$typeof === Y || s.getModuleId !== void 0));
|
|
842
841
|
}
|
|
843
|
-
function
|
|
842
|
+
function b1(s, i, u) {
|
|
844
843
|
var p = s.displayName;
|
|
845
844
|
if (p)
|
|
846
845
|
return p;
|
|
847
846
|
var E = i.displayName || i.name || "";
|
|
848
847
|
return E !== "" ? u + "(" + E + ")" : u;
|
|
849
848
|
}
|
|
850
|
-
function
|
|
849
|
+
function H1(s) {
|
|
851
850
|
return s.displayName || "Context";
|
|
852
851
|
}
|
|
853
852
|
function J(s) {
|
|
@@ -875,12 +874,12 @@ function Ve() {
|
|
|
875
874
|
switch (s.$$typeof) {
|
|
876
875
|
case f:
|
|
877
876
|
var i = s;
|
|
878
|
-
return
|
|
877
|
+
return H1(i) + ".Consumer";
|
|
879
878
|
case v:
|
|
880
879
|
var u = s;
|
|
881
|
-
return
|
|
880
|
+
return H1(u._context) + ".Provider";
|
|
882
881
|
case h:
|
|
883
|
-
return
|
|
882
|
+
return b1(s, s.render, "ForwardRef");
|
|
884
883
|
case P:
|
|
885
884
|
var p = s.displayName || null;
|
|
886
885
|
return p !== null ? p : J(s.type) || "Memo";
|
|
@@ -895,18 +894,18 @@ function Ve() {
|
|
|
895
894
|
}
|
|
896
895
|
return null;
|
|
897
896
|
}
|
|
898
|
-
var X = Object.assign,
|
|
899
|
-
function
|
|
897
|
+
var X = Object.assign, o1 = 0, F1, K1, q1, G1, Y1, z1, J1;
|
|
898
|
+
function X1() {
|
|
900
899
|
}
|
|
901
|
-
|
|
900
|
+
X1.__reactDisabledLog = !0;
|
|
902
901
|
function H3() {
|
|
903
902
|
{
|
|
904
|
-
if (
|
|
905
|
-
|
|
903
|
+
if (o1 === 0) {
|
|
904
|
+
F1 = console.log, K1 = console.info, q1 = console.warn, G1 = console.error, Y1 = console.group, z1 = console.groupCollapsed, J1 = console.groupEnd;
|
|
906
905
|
var s = {
|
|
907
906
|
configurable: !0,
|
|
908
907
|
enumerable: !0,
|
|
909
|
-
value:
|
|
908
|
+
value: X1,
|
|
910
909
|
writable: !0
|
|
911
910
|
};
|
|
912
911
|
Object.defineProperties(console, {
|
|
@@ -919,12 +918,12 @@ function Ve() {
|
|
|
919
918
|
groupEnd: s
|
|
920
919
|
});
|
|
921
920
|
}
|
|
922
|
-
|
|
921
|
+
o1++;
|
|
923
922
|
}
|
|
924
923
|
}
|
|
925
924
|
function F3() {
|
|
926
925
|
{
|
|
927
|
-
if (
|
|
926
|
+
if (o1--, o1 === 0) {
|
|
928
927
|
var s = {
|
|
929
928
|
configurable: !0,
|
|
930
929
|
enumerable: !0,
|
|
@@ -932,29 +931,29 @@ function Ve() {
|
|
|
932
931
|
};
|
|
933
932
|
Object.defineProperties(console, {
|
|
934
933
|
log: X({}, s, {
|
|
935
|
-
value:
|
|
934
|
+
value: F1
|
|
936
935
|
}),
|
|
937
936
|
info: X({}, s, {
|
|
938
|
-
value:
|
|
937
|
+
value: K1
|
|
939
938
|
}),
|
|
940
939
|
warn: X({}, s, {
|
|
941
|
-
value:
|
|
940
|
+
value: q1
|
|
942
941
|
}),
|
|
943
942
|
error: X({}, s, {
|
|
944
|
-
value:
|
|
943
|
+
value: G1
|
|
945
944
|
}),
|
|
946
945
|
group: X({}, s, {
|
|
947
|
-
value:
|
|
946
|
+
value: Y1
|
|
948
947
|
}),
|
|
949
948
|
groupCollapsed: X({}, s, {
|
|
950
|
-
value:
|
|
949
|
+
value: z1
|
|
951
950
|
}),
|
|
952
951
|
groupEnd: X({}, s, {
|
|
953
|
-
value:
|
|
952
|
+
value: J1
|
|
954
953
|
})
|
|
955
954
|
});
|
|
956
955
|
}
|
|
957
|
-
|
|
956
|
+
o1 < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
958
957
|
}
|
|
959
958
|
}
|
|
960
959
|
var y1 = b.ReactCurrentDispatcher, I1;
|
|
@@ -976,7 +975,7 @@ function Ve() {
|
|
|
976
975
|
var K3 = typeof WeakMap == "function" ? WeakMap : Map;
|
|
977
976
|
v1 = new K3();
|
|
978
977
|
}
|
|
979
|
-
function
|
|
978
|
+
function Q1(s, i) {
|
|
980
979
|
if (!s || R1)
|
|
981
980
|
return "";
|
|
982
981
|
{
|
|
@@ -1024,17 +1023,17 @@ function Ve() {
|
|
|
1024
1023
|
}
|
|
1025
1024
|
} catch (V) {
|
|
1026
1025
|
if (V && p && typeof V.stack == "string") {
|
|
1027
|
-
for (var
|
|
1028
|
-
`),
|
|
1029
|
-
`), L =
|
|
1026
|
+
for (var S = V.stack.split(`
|
|
1027
|
+
`), O = p.stack.split(`
|
|
1028
|
+
`), L = S.length - 1, $ = O.length - 1; L >= 1 && $ >= 0 && S[L] !== O[$]; )
|
|
1030
1029
|
$--;
|
|
1031
1030
|
for (; L >= 1 && $ >= 0; L--, $--)
|
|
1032
|
-
if (
|
|
1031
|
+
if (S[L] !== O[$]) {
|
|
1033
1032
|
if (L !== 1 || $ !== 1)
|
|
1034
1033
|
do
|
|
1035
|
-
if (L--, $--, $ < 0 ||
|
|
1034
|
+
if (L--, $--, $ < 0 || S[L] !== O[$]) {
|
|
1036
1035
|
var F = `
|
|
1037
|
-
` +
|
|
1036
|
+
` + S[L].replace(" at new ", " at ");
|
|
1038
1037
|
return s.displayName && F.includes("<anonymous>") && (F = F.replace("<anonymous>", s.displayName)), typeof s == "function" && v1.set(s, F), F;
|
|
1039
1038
|
}
|
|
1040
1039
|
while (L >= 1 && $ >= 0);
|
|
@@ -1048,7 +1047,7 @@ function Ve() {
|
|
|
1048
1047
|
return typeof s == "function" && v1.set(s, Q), Q;
|
|
1049
1048
|
}
|
|
1050
1049
|
function q3(s, i, u) {
|
|
1051
|
-
return
|
|
1050
|
+
return Q1(s, !1);
|
|
1052
1051
|
}
|
|
1053
1052
|
function G3(s) {
|
|
1054
1053
|
var i = s.prototype;
|
|
@@ -1058,7 +1057,7 @@ function Ve() {
|
|
|
1058
1057
|
if (s == null)
|
|
1059
1058
|
return "";
|
|
1060
1059
|
if (typeof s == "function")
|
|
1061
|
-
return
|
|
1060
|
+
return Q1(s, G3(s));
|
|
1062
1061
|
if (typeof s == "string")
|
|
1063
1062
|
return d1(s);
|
|
1064
1063
|
switch (s) {
|
|
@@ -1083,30 +1082,30 @@ function Ve() {
|
|
|
1083
1082
|
}
|
|
1084
1083
|
return "";
|
|
1085
1084
|
}
|
|
1086
|
-
var
|
|
1085
|
+
var s1 = Object.prototype.hasOwnProperty, N1 = {}, e3 = b.ReactDebugCurrentFrame;
|
|
1087
1086
|
function g1(s) {
|
|
1088
1087
|
if (s) {
|
|
1089
1088
|
var i = s._owner, u = h1(s.type, s._source, i ? i.type : null);
|
|
1090
|
-
|
|
1089
|
+
e3.setExtraStackFrame(u);
|
|
1091
1090
|
} else
|
|
1092
|
-
|
|
1091
|
+
e3.setExtraStackFrame(null);
|
|
1093
1092
|
}
|
|
1094
1093
|
function Y3(s, i, u, p, E) {
|
|
1095
1094
|
{
|
|
1096
|
-
var T = Function.call.bind(
|
|
1095
|
+
var T = Function.call.bind(s1);
|
|
1097
1096
|
for (var y in s)
|
|
1098
1097
|
if (T(s, y)) {
|
|
1099
|
-
var
|
|
1098
|
+
var S = void 0;
|
|
1100
1099
|
try {
|
|
1101
1100
|
if (typeof s[y] != "function") {
|
|
1102
|
-
var
|
|
1103
|
-
throw
|
|
1101
|
+
var O = Error((p || "React class") + ": " + u + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
1102
|
+
throw O.name = "Invariant Violation", O;
|
|
1104
1103
|
}
|
|
1105
|
-
|
|
1104
|
+
S = s[y](i, y, p, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1106
1105
|
} catch (L) {
|
|
1107
|
-
|
|
1106
|
+
S = L;
|
|
1108
1107
|
}
|
|
1109
|
-
|
|
1108
|
+
S && !(S instanceof Error) && (g1(E), x("%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).", p || "React class", u, y, typeof S), g1(null)), S instanceof Error && !(S.message in N1) && (N1[S.message] = !0, g1(E), x("Failed %s type: %s", u, S.message), g1(null));
|
|
1110
1109
|
}
|
|
1111
1110
|
}
|
|
1112
1111
|
}
|
|
@@ -1122,26 +1121,26 @@ function Ve() {
|
|
|
1122
1121
|
}
|
|
1123
1122
|
function X3(s) {
|
|
1124
1123
|
try {
|
|
1125
|
-
return
|
|
1124
|
+
return t3(s), !1;
|
|
1126
1125
|
} catch {
|
|
1127
1126
|
return !0;
|
|
1128
1127
|
}
|
|
1129
1128
|
}
|
|
1130
|
-
function
|
|
1129
|
+
function t3(s) {
|
|
1131
1130
|
return "" + s;
|
|
1132
1131
|
}
|
|
1133
|
-
function
|
|
1132
|
+
function n3(s) {
|
|
1134
1133
|
if (X3(s))
|
|
1135
|
-
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", J3(s)),
|
|
1134
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", J3(s)), t3(s);
|
|
1136
1135
|
}
|
|
1137
|
-
var
|
|
1136
|
+
var o3 = b.ReactCurrentOwner, Q3 = {
|
|
1138
1137
|
key: !0,
|
|
1139
1138
|
ref: !0,
|
|
1140
1139
|
__self: !0,
|
|
1141
1140
|
__source: !0
|
|
1142
|
-
},
|
|
1141
|
+
}, s3, c3;
|
|
1143
1142
|
function N3(s) {
|
|
1144
|
-
if (
|
|
1143
|
+
if (s1.call(s, "ref")) {
|
|
1145
1144
|
var i = Object.getOwnPropertyDescriptor(s, "ref").get;
|
|
1146
1145
|
if (i && i.isReactWarning)
|
|
1147
1146
|
return !1;
|
|
@@ -1149,7 +1148,7 @@ function Ve() {
|
|
|
1149
1148
|
return s.ref !== void 0;
|
|
1150
1149
|
}
|
|
1151
1150
|
function e2(s) {
|
|
1152
|
-
if (
|
|
1151
|
+
if (s1.call(s, "key")) {
|
|
1153
1152
|
var i = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
1154
1153
|
if (i && i.isReactWarning)
|
|
1155
1154
|
return !1;
|
|
@@ -1157,12 +1156,12 @@ function Ve() {
|
|
|
1157
1156
|
return s.key !== void 0;
|
|
1158
1157
|
}
|
|
1159
1158
|
function t2(s, i) {
|
|
1160
|
-
typeof s.ref == "string" &&
|
|
1159
|
+
typeof s.ref == "string" && o3.current;
|
|
1161
1160
|
}
|
|
1162
1161
|
function n2(s, i) {
|
|
1163
1162
|
{
|
|
1164
1163
|
var u = function() {
|
|
1165
|
-
|
|
1164
|
+
s3 || (s3 = !0, x("%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)", i));
|
|
1166
1165
|
};
|
|
1167
1166
|
u.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
1168
1167
|
get: u,
|
|
@@ -1173,7 +1172,7 @@ function Ve() {
|
|
|
1173
1172
|
function o2(s, i) {
|
|
1174
1173
|
{
|
|
1175
1174
|
var u = function() {
|
|
1176
|
-
|
|
1175
|
+
c3 || (c3 = !0, x("%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)", i));
|
|
1177
1176
|
};
|
|
1178
1177
|
u.isReactWarning = !0, Object.defineProperty(s, "ref", {
|
|
1179
1178
|
get: u,
|
|
@@ -1182,7 +1181,7 @@ function Ve() {
|
|
|
1182
1181
|
}
|
|
1183
1182
|
}
|
|
1184
1183
|
var s2 = function(s, i, u, p, E, T, y) {
|
|
1185
|
-
var
|
|
1184
|
+
var S = {
|
|
1186
1185
|
// This tag allows us to uniquely identify this as a React Element
|
|
1187
1186
|
$$typeof: t,
|
|
1188
1187
|
// Built-in properties that belong on the element
|
|
@@ -1193,55 +1192,55 @@ function Ve() {
|
|
|
1193
1192
|
// Record the component responsible for creating this element.
|
|
1194
1193
|
_owner: T
|
|
1195
1194
|
};
|
|
1196
|
-
return
|
|
1195
|
+
return S._store = {}, Object.defineProperty(S._store, "validated", {
|
|
1197
1196
|
configurable: !1,
|
|
1198
1197
|
enumerable: !1,
|
|
1199
1198
|
writable: !0,
|
|
1200
1199
|
value: !1
|
|
1201
|
-
}), Object.defineProperty(
|
|
1200
|
+
}), Object.defineProperty(S, "_self", {
|
|
1202
1201
|
configurable: !1,
|
|
1203
1202
|
enumerable: !1,
|
|
1204
1203
|
writable: !1,
|
|
1205
1204
|
value: p
|
|
1206
|
-
}), Object.defineProperty(
|
|
1205
|
+
}), Object.defineProperty(S, "_source", {
|
|
1207
1206
|
configurable: !1,
|
|
1208
1207
|
enumerable: !1,
|
|
1209
1208
|
writable: !1,
|
|
1210
1209
|
value: E
|
|
1211
|
-
}), Object.freeze && (Object.freeze(
|
|
1210
|
+
}), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
|
|
1212
1211
|
};
|
|
1213
1212
|
function c2(s, i, u, p, E) {
|
|
1214
1213
|
{
|
|
1215
|
-
var T, y = {},
|
|
1216
|
-
u !== void 0 && (
|
|
1214
|
+
var T, y = {}, S = null, O = null;
|
|
1215
|
+
u !== void 0 && (n3(u), S = "" + u), e2(i) && (n3(i.key), S = "" + i.key), N3(i) && (O = i.ref, t2(i, E));
|
|
1217
1216
|
for (T in i)
|
|
1218
|
-
|
|
1217
|
+
s1.call(i, T) && !Q3.hasOwnProperty(T) && (y[T] = i[T]);
|
|
1219
1218
|
if (s && s.defaultProps) {
|
|
1220
1219
|
var L = s.defaultProps;
|
|
1221
1220
|
for (T in L)
|
|
1222
1221
|
y[T] === void 0 && (y[T] = L[T]);
|
|
1223
1222
|
}
|
|
1224
|
-
if (
|
|
1223
|
+
if (S || O) {
|
|
1225
1224
|
var $ = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
|
|
1226
|
-
|
|
1225
|
+
S && n2(y, $), O && o2(y, $);
|
|
1227
1226
|
}
|
|
1228
|
-
return s2(s,
|
|
1227
|
+
return s2(s, S, O, E, p, o3.current, y);
|
|
1229
1228
|
}
|
|
1230
1229
|
}
|
|
1231
|
-
var T1 = b.ReactCurrentOwner,
|
|
1230
|
+
var T1 = b.ReactCurrentOwner, r3 = b.ReactDebugCurrentFrame;
|
|
1232
1231
|
function e1(s) {
|
|
1233
1232
|
if (s) {
|
|
1234
1233
|
var i = s._owner, u = h1(s.type, s._source, i ? i.type : null);
|
|
1235
|
-
|
|
1234
|
+
r3.setExtraStackFrame(u);
|
|
1236
1235
|
} else
|
|
1237
|
-
|
|
1236
|
+
r3.setExtraStackFrame(null);
|
|
1238
1237
|
}
|
|
1239
1238
|
var D1;
|
|
1240
1239
|
D1 = !1;
|
|
1241
1240
|
function _1(s) {
|
|
1242
1241
|
return typeof s == "object" && s !== null && s.$$typeof === t;
|
|
1243
1242
|
}
|
|
1244
|
-
function
|
|
1243
|
+
function l3() {
|
|
1245
1244
|
{
|
|
1246
1245
|
if (T1.current) {
|
|
1247
1246
|
var s = J(T1.current.type);
|
|
@@ -1256,10 +1255,10 @@ Check the render method of \`` + s + "`.";
|
|
|
1256
1255
|
function r2(s) {
|
|
1257
1256
|
return "";
|
|
1258
1257
|
}
|
|
1259
|
-
var
|
|
1258
|
+
var i3 = {};
|
|
1260
1259
|
function l2(s) {
|
|
1261
1260
|
{
|
|
1262
|
-
var i =
|
|
1261
|
+
var i = l3();
|
|
1263
1262
|
if (!i) {
|
|
1264
1263
|
var u = typeof s == "string" ? s : s.displayName || s.name;
|
|
1265
1264
|
u && (i = `
|
|
@@ -1269,35 +1268,35 @@ Check the top-level render call using <` + u + ">.");
|
|
|
1269
1268
|
return i;
|
|
1270
1269
|
}
|
|
1271
1270
|
}
|
|
1272
|
-
function
|
|
1271
|
+
function a3(s, i) {
|
|
1273
1272
|
{
|
|
1274
1273
|
if (!s._store || s._store.validated || s.key != null)
|
|
1275
1274
|
return;
|
|
1276
1275
|
s._store.validated = !0;
|
|
1277
1276
|
var u = l2(i);
|
|
1278
|
-
if (
|
|
1277
|
+
if (i3[u])
|
|
1279
1278
|
return;
|
|
1280
|
-
|
|
1279
|
+
i3[u] = !0;
|
|
1281
1280
|
var p = "";
|
|
1282
1281
|
s && s._owner && s._owner !== T1.current && (p = " It was passed a child from " + J(s._owner.type) + "."), e1(s), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, p), e1(null);
|
|
1283
1282
|
}
|
|
1284
1283
|
}
|
|
1285
|
-
function
|
|
1284
|
+
function u3(s, i) {
|
|
1286
1285
|
{
|
|
1287
1286
|
if (typeof s != "object")
|
|
1288
1287
|
return;
|
|
1289
1288
|
if (E1(s))
|
|
1290
1289
|
for (var u = 0; u < s.length; u++) {
|
|
1291
1290
|
var p = s[u];
|
|
1292
|
-
_1(p) &&
|
|
1291
|
+
_1(p) && a3(p, i);
|
|
1293
1292
|
}
|
|
1294
1293
|
else if (_1(s))
|
|
1295
1294
|
s._store && (s._store.validated = !0);
|
|
1296
1295
|
else if (s) {
|
|
1297
|
-
var E =
|
|
1296
|
+
var E = C(s);
|
|
1298
1297
|
if (typeof E == "function" && E !== s.entries)
|
|
1299
1298
|
for (var T = E.call(s), y; !(y = T.next()).done; )
|
|
1300
|
-
_1(y.value) &&
|
|
1299
|
+
_1(y.value) && a3(y.value, i);
|
|
1301
1300
|
}
|
|
1302
1301
|
}
|
|
1303
1302
|
}
|
|
@@ -1338,17 +1337,17 @@ Check the top-level render call using <` + u + ">.");
|
|
|
1338
1337
|
s.ref !== null && (e1(s), x("Invalid attribute `ref` supplied to `React.Fragment`."), e1(null));
|
|
1339
1338
|
}
|
|
1340
1339
|
}
|
|
1341
|
-
var
|
|
1342
|
-
function
|
|
1340
|
+
var d3 = {};
|
|
1341
|
+
function v3(s, i, u, p, E, T) {
|
|
1343
1342
|
{
|
|
1344
|
-
var y =
|
|
1343
|
+
var y = u1(s);
|
|
1345
1344
|
if (!y) {
|
|
1346
|
-
var
|
|
1347
|
-
(s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (
|
|
1348
|
-
var
|
|
1349
|
-
|
|
1345
|
+
var S = "";
|
|
1346
|
+
(s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (S += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
1347
|
+
var O = r2();
|
|
1348
|
+
O ? S += O : S += l3();
|
|
1350
1349
|
var L;
|
|
1351
|
-
s === null ? L = "null" : E1(s) ? L = "array" : s !== void 0 && s.$$typeof === t ? (L = "<" + (J(s.type) || "Unknown") + " />",
|
|
1350
|
+
s === null ? L = "null" : E1(s) ? L = "array" : s !== void 0 && s.$$typeof === t ? (L = "<" + (J(s.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : L = typeof s, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, S);
|
|
1352
1351
|
}
|
|
1353
1352
|
var $ = c2(s, i, u, E, T);
|
|
1354
1353
|
if ($ == null)
|
|
@@ -1359,49 +1358,49 @@ Check the top-level render call using <` + u + ">.");
|
|
|
1359
1358
|
if (p)
|
|
1360
1359
|
if (E1(F)) {
|
|
1361
1360
|
for (var t1 = 0; t1 < F.length; t1++)
|
|
1362
|
-
|
|
1361
|
+
u3(F[t1], s);
|
|
1363
1362
|
Object.freeze && Object.freeze(F);
|
|
1364
1363
|
} else
|
|
1365
1364
|
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
1366
1365
|
else
|
|
1367
|
-
|
|
1366
|
+
u3(F, s);
|
|
1368
1367
|
}
|
|
1369
|
-
if (
|
|
1368
|
+
if (s1.call(i, "key")) {
|
|
1370
1369
|
var Q = J(s), V = Object.keys(i).filter(function(f2) {
|
|
1371
1370
|
return f2 !== "key";
|
|
1372
1371
|
}), P1 = V.length > 0 ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
1373
|
-
if (!
|
|
1372
|
+
if (!d3[Q + P1]) {
|
|
1374
1373
|
var g2 = V.length > 0 ? "{" + V.join(": ..., ") + ": ...}" : "{}";
|
|
1375
1374
|
x(`A props object containing a "key" prop is being spread into JSX:
|
|
1376
1375
|
let props = %s;
|
|
1377
1376
|
<%s {...props} />
|
|
1378
1377
|
React keys must be passed directly to JSX without using spread:
|
|
1379
1378
|
let props = %s;
|
|
1380
|
-
<%s key={someKey} {...props} />`, P1, Q, g2, Q),
|
|
1379
|
+
<%s key={someKey} {...props} />`, P1, Q, g2, Q), d3[Q + P1] = !0;
|
|
1381
1380
|
}
|
|
1382
1381
|
}
|
|
1383
1382
|
return s === c ? a2($) : i2($), $;
|
|
1384
1383
|
}
|
|
1385
1384
|
}
|
|
1386
1385
|
function u2(s, i, u) {
|
|
1387
|
-
return
|
|
1386
|
+
return v3(s, i, u, !0);
|
|
1388
1387
|
}
|
|
1389
1388
|
function d2(s, i, u) {
|
|
1390
|
-
return
|
|
1389
|
+
return v3(s, i, u, !1);
|
|
1391
1390
|
}
|
|
1392
1391
|
var v2 = d2, h2 = u2;
|
|
1393
|
-
|
|
1394
|
-
}()),
|
|
1392
|
+
l1.Fragment = c, l1.jsx = v2, l1.jsxs = h2;
|
|
1393
|
+
}()), l1;
|
|
1395
1394
|
}
|
|
1396
|
-
var
|
|
1395
|
+
var M3;
|
|
1397
1396
|
function Ue() {
|
|
1398
|
-
return
|
|
1397
|
+
return M3 || (M3 = 1, process.env.NODE_ENV === "production" ? m1.exports = We() : m1.exports = Ve()), m1.exports;
|
|
1399
1398
|
}
|
|
1400
1399
|
var n = Ue();
|
|
1401
1400
|
const He = "_mwfit_ppa3l_1", Fe = {
|
|
1402
1401
|
mwfit: He
|
|
1403
1402
|
}, Ke = () => {
|
|
1404
|
-
const { reconnect: e } = R(), t =
|
|
1403
|
+
const { reconnect: e } = R(), t = R3(), o = Me(), c = xe();
|
|
1405
1404
|
return /* @__PURE__ */ n.jsxs("div", { className: "vh-100 d-flex flex-column flex-grow-1 justify-content-center align-items-center gap-5 ", children: [
|
|
1406
1405
|
/* @__PURE__ */ n.jsxs("div", { className: `${Fe.mwfit} mx-auto text-center`, children: [
|
|
1407
1406
|
t === void 0 ? /* @__PURE__ */ n.jsx("h2", { children: "Connecting..." }) : /* @__PURE__ */ n.jsx("h2", { children: "Disconnected" }),
|
|
@@ -1409,42 +1408,42 @@ const He = "_mwfit_ppa3l_1", Fe = {
|
|
|
1409
1408
|
] }),
|
|
1410
1409
|
c && /* @__PURE__ */ n.jsx("button", { className: "btn btn-secondary btn-lg", onPointerDown: e, children: "Reconnect" })
|
|
1411
1410
|
] });
|
|
1412
|
-
},
|
|
1411
|
+
}, W3 = C2({
|
|
1413
1412
|
sendMessage: () => null,
|
|
1414
1413
|
sendSimpleMessage: () => null,
|
|
1415
1414
|
addEventHandler: () => null,
|
|
1416
1415
|
removeEventHandler: () => null,
|
|
1417
1416
|
reconnect: () => null
|
|
1418
1417
|
}), qe = ({ children: e }) => {
|
|
1419
|
-
const t = W1(), o =
|
|
1418
|
+
const t = W1(), o = R3();
|
|
1420
1419
|
x1(() => {
|
|
1421
|
-
t(
|
|
1420
|
+
t(O3());
|
|
1422
1421
|
}, [t]);
|
|
1423
|
-
const c =
|
|
1422
|
+
const c = c1(
|
|
1424
1423
|
(h, w) => {
|
|
1425
1424
|
t(Pe(h, w));
|
|
1426
1425
|
},
|
|
1427
1426
|
[t]
|
|
1428
|
-
), r =
|
|
1427
|
+
), r = c1(
|
|
1429
1428
|
(h, w) => {
|
|
1430
1429
|
c(h, { value: w });
|
|
1431
1430
|
},
|
|
1432
1431
|
[c]
|
|
1433
|
-
), l =
|
|
1432
|
+
), l = c1(
|
|
1434
1433
|
(h, w, d) => {
|
|
1435
1434
|
t(Le(h, w, d));
|
|
1436
1435
|
},
|
|
1437
1436
|
[t]
|
|
1438
|
-
), v =
|
|
1437
|
+
), v = c1(
|
|
1439
1438
|
(h, w) => {
|
|
1440
1439
|
t($e(h, w));
|
|
1441
1440
|
},
|
|
1442
1441
|
[t]
|
|
1443
|
-
), f =
|
|
1442
|
+
), f = c1(() => {
|
|
1444
1443
|
t(Ae());
|
|
1445
1444
|
}, [t]);
|
|
1446
1445
|
return /* @__PURE__ */ n.jsx(
|
|
1447
|
-
|
|
1446
|
+
W3.Provider,
|
|
1448
1447
|
{
|
|
1449
1448
|
value: {
|
|
1450
1449
|
sendMessage: c,
|
|
@@ -1458,7 +1457,7 @@ const He = "_mwfit_ppa3l_1", Fe = {
|
|
|
1458
1457
|
);
|
|
1459
1458
|
}, W6 = ({ children: e }) => /* @__PURE__ */ n.jsx(Z2, { store: Oe, children: /* @__PURE__ */ n.jsx(qe, { children: e }) });
|
|
1460
1459
|
function R() {
|
|
1461
|
-
return b2(
|
|
1460
|
+
return b2(W3);
|
|
1462
1461
|
}
|
|
1463
1462
|
function Ge({
|
|
1464
1463
|
onPress: e,
|
|
@@ -1512,7 +1511,7 @@ function V6(e) {
|
|
|
1512
1511
|
muteToggle: () => t(`${e}/muteToggle`, null)
|
|
1513
1512
|
}), [e, t, o, c]);
|
|
1514
1513
|
}
|
|
1515
|
-
function
|
|
1514
|
+
function V3(e, t) {
|
|
1516
1515
|
const { sendMessage: o, sendSimpleMessage: c } = R(), r = j1(e);
|
|
1517
1516
|
return n1(() => {
|
|
1518
1517
|
if (!r) {
|
|
@@ -1557,9 +1556,9 @@ function Ye(e) {
|
|
|
1557
1556
|
if (t)
|
|
1558
1557
|
return t.volume;
|
|
1559
1558
|
}, [t]);
|
|
1560
|
-
return
|
|
1559
|
+
return V3(o, c);
|
|
1561
1560
|
}
|
|
1562
|
-
function
|
|
1561
|
+
function U3(e) {
|
|
1563
1562
|
const { sendMessage: t } = R();
|
|
1564
1563
|
return { powerOn: () => {
|
|
1565
1564
|
t(`/device/${e}/powerOn`, null);
|
|
@@ -1587,7 +1586,7 @@ function ze(e) {
|
|
|
1587
1586
|
return o ? { levelControls: o.levelControls, setDefaultChannelLevels: c, getFullStatus: r } : void 0;
|
|
1588
1587
|
}
|
|
1589
1588
|
function H6(e) {
|
|
1590
|
-
const t = _(e), o =
|
|
1589
|
+
const t = _(e), o = U3(e), c = O1(e), r = O1(e), l = Ye(e), v = ze(e);
|
|
1591
1590
|
if (t)
|
|
1592
1591
|
return {
|
|
1593
1592
|
avrState: t,
|
|
@@ -1599,7 +1598,7 @@ function H6(e) {
|
|
|
1599
1598
|
};
|
|
1600
1599
|
}
|
|
1601
1600
|
const F6 = ({ className: e }) => {
|
|
1602
|
-
const [t, o] =
|
|
1601
|
+
const [t, o] = z();
|
|
1603
1602
|
return x1(() => {
|
|
1604
1603
|
setInterval(() => {
|
|
1605
1604
|
const c = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", { hour12: !0, hour: "numeric", minute: "numeric" });
|
|
@@ -1864,7 +1863,7 @@ function St(e) {
|
|
|
1864
1863
|
} : void 0;
|
|
1865
1864
|
}
|
|
1866
1865
|
function jt(e) {
|
|
1867
|
-
const t = _(e), o =
|
|
1866
|
+
const t = _(e), o = U3(e), c = O1(e);
|
|
1868
1867
|
if (!t) return;
|
|
1869
1868
|
const r = (t.powerState || t.isWarming) && !t.isCooling, l = (!t.powerState || t.isCooling) && !t.isWarming;
|
|
1870
1869
|
return {
|
|
@@ -1914,8 +1913,8 @@ const bt = ({
|
|
|
1914
1913
|
}, [r, t, o]), r;
|
|
1915
1914
|
};
|
|
1916
1915
|
function yt(e, t) {
|
|
1917
|
-
const [o, c] =
|
|
1918
|
-
return
|
|
1916
|
+
const [o, c] = z(!1), [r, l] = z(!1);
|
|
1917
|
+
return S3(() => {
|
|
1919
1918
|
const { current: v } = e, f = () => {
|
|
1920
1919
|
const h = v && v.scrollHeight > v.clientHeight, w = v && v.scrollWidth > v.clientWidth;
|
|
1921
1920
|
l(h ?? !1), c(w ?? !1), t && t(h ?? !1, w ?? !1);
|
|
@@ -1929,18 +1928,18 @@ function It(e, t) {
|
|
|
1929
1928
|
}
|
|
1930
1929
|
function Rt(e, t) {
|
|
1931
1930
|
const o = te(e, t), c = `/room/${e}/volumes/${t}`;
|
|
1932
|
-
return
|
|
1931
|
+
return V3(c, o);
|
|
1933
1932
|
}
|
|
1934
1933
|
function Et(e) {
|
|
1935
1934
|
var f, h;
|
|
1936
|
-
const [t, o] =
|
|
1935
|
+
const [t, o] = z(((f = e == null ? void 0 : e.current) == null ? void 0 : f.scrollLeft) ?? 0), [c, r] = z(((h = e == null ? void 0 : e.current) == null ? void 0 : h.scrollTop) ?? 0), l = (w) => {
|
|
1937
1936
|
const { current: d } = e;
|
|
1938
1937
|
d && (console.log(d.scrollLeft), d.scrollLeft += w, console.log(d.scrollLeft));
|
|
1939
1938
|
}, v = (w) => {
|
|
1940
1939
|
const { current: d } = e;
|
|
1941
1940
|
d && (console.log(d.scrollTop), d.scrollTop += w, console.log(d.scrollTop));
|
|
1942
1941
|
};
|
|
1943
|
-
return
|
|
1942
|
+
return S3(() => {
|
|
1944
1943
|
const { current: w } = e, d = () => {
|
|
1945
1944
|
o((w == null ? void 0 : w.scrollLeft) ?? 0), r((w == null ? void 0 : w.scrollTop) ?? 0);
|
|
1946
1945
|
};
|
|
@@ -1950,9 +1949,9 @@ function Et(e) {
|
|
|
1950
1949
|
function Tt(e) {
|
|
1951
1950
|
const t = W1();
|
|
1952
1951
|
return [() => {
|
|
1953
|
-
t(
|
|
1952
|
+
t(W.addSyncState(e));
|
|
1954
1953
|
}, () => {
|
|
1955
|
-
t(
|
|
1954
|
+
t(W.removeSyncState(e));
|
|
1956
1955
|
}, Ze(e)];
|
|
1957
1956
|
}
|
|
1958
1957
|
function Dt() {
|
|
@@ -1967,7 +1966,7 @@ function Dt() {
|
|
|
1967
1966
|
};
|
|
1968
1967
|
}
|
|
1969
1968
|
function _t() {
|
|
1970
|
-
const [e, t] =
|
|
1969
|
+
const [e, t] = z(), [o, c] = z();
|
|
1971
1970
|
function r() {
|
|
1972
1971
|
t((/* @__PURE__ */ new Date()).toLocaleDateString("en-US", { dateStyle: "long" }));
|
|
1973
1972
|
const l = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", { hour12: !0, hour: "numeric", minute: "numeric" });
|
|
@@ -1982,7 +1981,7 @@ function _t() {
|
|
|
1982
1981
|
}, []), { date: e, time: o };
|
|
1983
1982
|
}
|
|
1984
1983
|
const Pt = () => {
|
|
1985
|
-
const [e, t] =
|
|
1984
|
+
const [e, t] = z(!1), o = y2(), c = I2();
|
|
1986
1985
|
let r;
|
|
1987
1986
|
return R2(c) ? r = c.statusText : c instanceof Error ? r = c.message : typeof c == "string" ? r = c : (console.error(c), r = "Unknown error"), /* @__PURE__ */ n.jsxs("div", { className: "d-flex flex-column align-items-center gap-5", children: [
|
|
1988
1987
|
/* @__PURE__ */ n.jsx("div", { className: "m-2 p-2 bg-danger rounded d-flex align-items-center", children: /* @__PURE__ */ n.jsx("span", { className: "fs-5 text-white", children: "We are sorry. Something went wrong." }) }),
|
|
@@ -2023,12 +2022,12 @@ const Pt = () => {
|
|
|
2023
2022
|
onPointerLeave: P,
|
|
2024
2023
|
...H
|
|
2025
2024
|
}) => {
|
|
2026
|
-
const [a, Z] =
|
|
2025
|
+
const [a, Z] = z(!1), j = !v && f ? h : "", C = !v && (a || f);
|
|
2027
2026
|
return /* @__PURE__ */ n.jsxs(
|
|
2028
2027
|
"button",
|
|
2029
2028
|
{
|
|
2030
2029
|
type: "button",
|
|
2031
|
-
className: `${$1.iconbtn} ${o ? $1.iconbtnvert : ""} ${c} ${
|
|
2030
|
+
className: `${$1.iconbtn} ${o ? $1.iconbtnvert : ""} ${c} ${j}`,
|
|
2032
2031
|
...H,
|
|
2033
2032
|
disabled: v,
|
|
2034
2033
|
onPointerDown: (b) => {
|
|
@@ -2045,7 +2044,7 @@ const Pt = () => {
|
|
|
2045
2044
|
e,
|
|
2046
2045
|
{
|
|
2047
2046
|
className: `${r || $1.iconsm}`,
|
|
2048
|
-
active:
|
|
2047
|
+
active: C,
|
|
2049
2048
|
disabled: v
|
|
2050
2049
|
}
|
|
2051
2050
|
),
|
|
@@ -3708,17 +3707,17 @@ function $t({
|
|
|
3708
3707
|
const c = t[e] ?? null;
|
|
3709
3708
|
return c || console.error(`Icon ${e} not found in dictionary`), /* @__PURE__ */ n.jsx(Ne, { multiIcon: c, ...o });
|
|
3710
3709
|
}
|
|
3711
|
-
const P8 = "_grid_1cmpp_1", L8 = "_header_1cmpp_11", $8 = "_content_1cmpp_17", A8 = "_footer_1cmpp_23", B8 = "_volume_1cmpp_29",
|
|
3710
|
+
const P8 = "_grid_1cmpp_1", L8 = "_header_1cmpp_11", $8 = "_content_1cmpp_17", A8 = "_footer_1cmpp_23", B8 = "_volume_1cmpp_29", i1 = {
|
|
3712
3711
|
grid: P8,
|
|
3713
3712
|
header: L8,
|
|
3714
3713
|
content: $8,
|
|
3715
3714
|
footer: A8,
|
|
3716
3715
|
volume: B8
|
|
3717
|
-
}, At = ({ header: e, footer: t, content: o, volume: c, showVolume: r }) => /* @__PURE__ */ n.jsxs("div", { className:
|
|
3718
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
3719
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
3720
|
-
r && /* @__PURE__ */ n.jsx("div", { className:
|
|
3721
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
3716
|
+
}, At = ({ header: e, footer: t, content: o, volume: c, showVolume: r }) => /* @__PURE__ */ n.jsxs("div", { className: i1.grid, children: [
|
|
3717
|
+
/* @__PURE__ */ n.jsx("div", { className: i1.header, children: e }),
|
|
3718
|
+
/* @__PURE__ */ n.jsx("div", { className: i1.content, children: o }),
|
|
3719
|
+
r && /* @__PURE__ */ n.jsx("div", { className: i1.volume, children: c }),
|
|
3720
|
+
/* @__PURE__ */ n.jsx("div", { className: i1.footer, children: t })
|
|
3722
3721
|
] }), k8 = "_grid_11w5q_1", O8 = "_header_11w5q_11", W8 = "_content_11w5q_17", p1 = {
|
|
3723
3722
|
grid: k8,
|
|
3724
3723
|
header: O8,
|
|
@@ -3800,32 +3799,32 @@ export {
|
|
|
3800
3799
|
Ot as ShareState,
|
|
3801
3800
|
Bt as TechLayout,
|
|
3802
3801
|
kt as TechPinLayout,
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3802
|
+
A3 as WS_ADD_EVENT_HANDLER,
|
|
3803
|
+
P3 as WS_CONNECT,
|
|
3804
|
+
L3 as WS_DISCONNECT,
|
|
3805
|
+
k3 as WS_RECONNECT,
|
|
3806
|
+
B3 as WS_REMOVE_EVENT_HANDLER,
|
|
3807
|
+
$3 as WS_SEND_MESSAGE,
|
|
3808
|
+
W3 as WebsocketContext,
|
|
3809
|
+
D3 as appConfigActions,
|
|
3811
3810
|
Be as createWebSocketMiddleware,
|
|
3812
3811
|
f1 as devicesActions,
|
|
3813
3812
|
Wt as getBaseLocation,
|
|
3814
|
-
|
|
3813
|
+
w3 as httpClient,
|
|
3815
3814
|
_8 as iconsDictionary,
|
|
3816
3815
|
Ut as roomOffSourceKey,
|
|
3817
3816
|
w1 as roomsActions,
|
|
3818
3817
|
U as runtimeConfigActions,
|
|
3819
|
-
|
|
3818
|
+
b3 as selectAllDevices,
|
|
3820
3819
|
T2 as selectApiPath,
|
|
3821
3820
|
E2 as selectAppConfig,
|
|
3822
3821
|
ce as selectClientId,
|
|
3823
3822
|
he as selectCurrentPopoverIdForGroup,
|
|
3824
3823
|
P2 as selectDeviceByKey,
|
|
3825
|
-
|
|
3824
|
+
y3 as selectDeviceInterfaceSupport,
|
|
3826
3825
|
ve as selectDeviceSupportsInterface,
|
|
3827
3826
|
fe as selectError,
|
|
3828
|
-
|
|
3827
|
+
I3 as selectInterfacesForDevice,
|
|
3829
3828
|
pe as selectIsSyncStateValuePresent,
|
|
3830
3829
|
de as selectIsTouchpanel,
|
|
3831
3830
|
D2 as selectLogoPath,
|
|
@@ -3863,7 +3862,7 @@ export {
|
|
|
3863
3862
|
oe as selectWsIsConnected,
|
|
3864
3863
|
N2 as selectZoomRoomControllerKey,
|
|
3865
3864
|
Oe as store,
|
|
3866
|
-
|
|
3865
|
+
W as uiActions,
|
|
3867
3866
|
je as uiReducer,
|
|
3868
3867
|
Q8 as useApiPath,
|
|
3869
3868
|
X8 as useAppConfig,
|
|
@@ -3891,7 +3890,7 @@ export {
|
|
|
3891
3890
|
M6 as useGetRoomDisplayStates,
|
|
3892
3891
|
x6 as useGetZoomRoomControllerKey,
|
|
3893
3892
|
j1 as useIBasicVolume,
|
|
3894
|
-
|
|
3893
|
+
V3 as useIBasicVolumeWithFeedback,
|
|
3895
3894
|
G6 as useIChannel,
|
|
3896
3895
|
Y6 as useIColor,
|
|
3897
3896
|
z6 as useICommunicationMonitor,
|
|
@@ -3901,7 +3900,7 @@ export {
|
|
|
3901
3900
|
et as useIDvr,
|
|
3902
3901
|
tt as useIEssentialsRoomCombiner,
|
|
3903
3902
|
nt as useIHasCameras,
|
|
3904
|
-
|
|
3903
|
+
U3 as useIHasPowerControl,
|
|
3905
3904
|
O1 as useIHasSelectableItems,
|
|
3906
3905
|
ot as useIHumiditySensor,
|
|
3907
3906
|
st as useILevelControls,
|
|
@@ -3969,9 +3968,9 @@ export {
|
|
|
3969
3968
|
jt as useTwoWayDisplayBase,
|
|
3970
3969
|
C6 as useUserCode,
|
|
3971
3970
|
R as useWebsocketContext,
|
|
3972
|
-
|
|
3971
|
+
R3 as useWsIsConnected,
|
|
3973
3972
|
Le as wsAddEventHandler,
|
|
3974
|
-
|
|
3973
|
+
O3 as wsConnect,
|
|
3975
3974
|
k6 as wsDisconnect,
|
|
3976
3975
|
Ae as wsReconnect,
|
|
3977
3976
|
$e as wsRemoveEventHandler,
|