@obb871001/api-integration-sdk 1.0.33 → 1.0.34
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 +10 -10
- package/dist/index.js +1286 -403
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -1,77 +1,959 @@
|
|
|
1
|
-
import { useQueries as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { useQueries as rt, QueryClient as tt, QueryClientProvider as nt } from "@tanstack/react-query";
|
|
2
|
+
import ye, { createContext as at, useContext as ut, useCallback as de, useRef as ot, useMemo as Je, useEffect as je } from "react";
|
|
3
|
+
import ct from "axios";
|
|
4
|
+
import { get as Ce } from "lodash";
|
|
5
|
+
import it from "react-dom";
|
|
6
|
+
const wr = at(null), Ar = () => {
|
|
7
|
+
const r = ut(wr);
|
|
8
|
+
if (!r)
|
|
7
9
|
throw new Error("useApiContext must be used within ApiProvider");
|
|
8
|
-
return
|
|
10
|
+
return r;
|
|
9
11
|
};
|
|
10
|
-
function
|
|
11
|
-
baseURL:
|
|
12
|
-
getToken:
|
|
13
|
-
timeoutMs:
|
|
14
|
-
currency:
|
|
15
|
-
lng:
|
|
16
|
-
onError:
|
|
12
|
+
function st({
|
|
13
|
+
baseURL: r,
|
|
14
|
+
getToken: g,
|
|
15
|
+
timeoutMs: O = 15e3,
|
|
16
|
+
currency: y = "TWD",
|
|
17
|
+
lng: v = "tw",
|
|
18
|
+
onError: h
|
|
17
19
|
} = {}) {
|
|
18
|
-
const
|
|
19
|
-
baseURL:
|
|
20
|
-
timeout:
|
|
20
|
+
const E = ct.create({
|
|
21
|
+
baseURL: r,
|
|
22
|
+
timeout: O,
|
|
21
23
|
headers: { "Content-Type": "application/json" }
|
|
22
24
|
});
|
|
23
|
-
return
|
|
24
|
-
if (
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
return
|
|
29
|
-
}),
|
|
30
|
-
(
|
|
31
|
-
(
|
|
32
|
-
),
|
|
25
|
+
return E.interceptors.request.use(async (_) => {
|
|
26
|
+
if (_.headers = _.headers || {}, g) {
|
|
27
|
+
const c = await g();
|
|
28
|
+
c && (_.headers.Authorization = `Bearer ${c}`);
|
|
29
|
+
}
|
|
30
|
+
return _.headers.Currency = y, _.headers["currency-code"] = y, _.headers.lang = v, _;
|
|
31
|
+
}), E.interceptors.response.use(
|
|
32
|
+
(_) => _.data,
|
|
33
|
+
(_) => h ? h(_, { instance: E }) : Promise.reject(_)
|
|
34
|
+
), E;
|
|
33
35
|
}
|
|
34
|
-
const
|
|
35
|
-
const { client:
|
|
36
|
-
async (
|
|
37
|
-
const { mac_address:
|
|
38
|
-
mac_address:
|
|
39
|
-
app_version:
|
|
40
|
-
anydesk_id:
|
|
36
|
+
const lt = () => {
|
|
37
|
+
const { client: r } = Ar(), g = de(
|
|
38
|
+
async (E) => {
|
|
39
|
+
const { mac_address: _ = "", app_version: c = "", anydesk_id: l = "" } = E, { data: o } = await r.post("/cash-register/login", {
|
|
40
|
+
mac_address: _,
|
|
41
|
+
app_version: c,
|
|
42
|
+
anydesk_id: l
|
|
41
43
|
});
|
|
42
|
-
return
|
|
44
|
+
return o;
|
|
43
45
|
},
|
|
44
|
-
[
|
|
45
|
-
),
|
|
46
|
-
const { data:
|
|
47
|
-
return
|
|
48
|
-
}, [
|
|
49
|
-
const { data:
|
|
50
|
-
return
|
|
51
|
-
}, [
|
|
52
|
-
const { data:
|
|
53
|
-
return
|
|
54
|
-
}, [
|
|
46
|
+
[r]
|
|
47
|
+
), O = de(async () => r.get("/member/getMemberInfo"), [r]), y = de(async () => {
|
|
48
|
+
const { data: E } = await r.get("/getGameList");
|
|
49
|
+
return E;
|
|
50
|
+
}, [r]), v = de(async () => {
|
|
51
|
+
const { data: E } = await r.get("/getNowCurrencyExchange");
|
|
52
|
+
return E;
|
|
53
|
+
}, [r]), h = de(async () => {
|
|
54
|
+
const { data: E } = await r.get("/getFavoriteGame");
|
|
55
|
+
return E;
|
|
56
|
+
}, [r]);
|
|
55
57
|
return {
|
|
56
|
-
machineLoginApi:
|
|
57
|
-
userInfoApi:
|
|
58
|
-
userGameListApi:
|
|
59
|
-
userFavoriteGameApi:
|
|
60
|
-
userCurrencyExchangeApi:
|
|
58
|
+
machineLoginApi: g,
|
|
59
|
+
userInfoApi: O,
|
|
60
|
+
userGameListApi: y,
|
|
61
|
+
userFavoriteGameApi: h,
|
|
62
|
+
userCurrencyExchangeApi: v
|
|
61
63
|
};
|
|
62
|
-
},
|
|
63
|
-
const { userInfoApi:
|
|
64
|
+
}, Nt = () => {
|
|
65
|
+
const { getToken: r } = Ar(), { userInfoApi: g } = lt(), O = rt({
|
|
64
66
|
queries: [
|
|
65
67
|
{
|
|
66
68
|
queryKey: ["getMemberInfo"],
|
|
67
|
-
queryFn: async () => await
|
|
69
|
+
queryFn: async () => await g(),
|
|
68
70
|
refetchInterval: 5e4
|
|
69
71
|
}
|
|
70
|
-
]
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
],
|
|
73
|
+
enabled: !!r
|
|
74
|
+
}), { data: y, isFetching: v, error: h } = O[0] || {};
|
|
75
|
+
return { data: y, isFetching: v, error: h };
|
|
73
76
|
};
|
|
74
|
-
|
|
77
|
+
function ft(r) {
|
|
78
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
79
|
+
}
|
|
80
|
+
var Le = {}, F = {}, Ue = {}, ir;
|
|
81
|
+
function V() {
|
|
82
|
+
return ir || (ir = 1, (function(r) {
|
|
83
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.isEventSourceSupported = r.isReactNative = r.ReadyState = r.DEFAULT_HEARTBEAT = r.UNPARSABLE_JSON_OBJECT = r.DEFAULT_RECONNECT_INTERVAL_MS = r.DEFAULT_RECONNECT_LIMIT = r.SOCKET_IO_PING_CODE = r.SOCKET_IO_PATH = r.SOCKET_IO_PING_INTERVAL = r.DEFAULT_EVENT_SOURCE_OPTIONS = r.EMPTY_EVENT_HANDLERS = r.DEFAULT_OPTIONS = void 0;
|
|
84
|
+
var g = 1, O = 1e3 * g;
|
|
85
|
+
r.DEFAULT_OPTIONS = {}, r.EMPTY_EVENT_HANDLERS = {}, r.DEFAULT_EVENT_SOURCE_OPTIONS = {
|
|
86
|
+
withCredentials: !1,
|
|
87
|
+
events: r.EMPTY_EVENT_HANDLERS
|
|
88
|
+
}, r.SOCKET_IO_PING_INTERVAL = 25 * O, r.SOCKET_IO_PATH = "/socket.io/?EIO=3&transport=websocket", r.SOCKET_IO_PING_CODE = "2", r.DEFAULT_RECONNECT_LIMIT = 20, r.DEFAULT_RECONNECT_INTERVAL_MS = 5e3, r.UNPARSABLE_JSON_OBJECT = {}, r.DEFAULT_HEARTBEAT = {
|
|
89
|
+
message: "ping",
|
|
90
|
+
timeout: 6e4,
|
|
91
|
+
interval: 25e3
|
|
92
|
+
};
|
|
93
|
+
var y;
|
|
94
|
+
(function(h) {
|
|
95
|
+
h[h.UNINSTANTIATED = -1] = "UNINSTANTIATED", h[h.CONNECTING = 0] = "CONNECTING", h[h.OPEN = 1] = "OPEN", h[h.CLOSING = 2] = "CLOSING", h[h.CLOSED = 3] = "CLOSED";
|
|
96
|
+
})(y || (r.ReadyState = y = {}));
|
|
97
|
+
var v = function() {
|
|
98
|
+
try {
|
|
99
|
+
return "EventSource" in globalThis;
|
|
100
|
+
} catch {
|
|
101
|
+
return !1;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
r.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", r.isEventSourceSupported = !r.isReactNative && v();
|
|
105
|
+
})(Ue)), Ue;
|
|
106
|
+
}
|
|
107
|
+
var _e = {}, We = {}, sr;
|
|
108
|
+
function Ge() {
|
|
109
|
+
return sr || (sr = 1, (function(r) {
|
|
110
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.resetWebSockets = r.sharedWebSockets = void 0, r.sharedWebSockets = {};
|
|
111
|
+
var g = function(O) {
|
|
112
|
+
if (O && r.sharedWebSockets.hasOwnProperty(O))
|
|
113
|
+
delete r.sharedWebSockets[O];
|
|
114
|
+
else
|
|
115
|
+
for (var y in r.sharedWebSockets)
|
|
116
|
+
r.sharedWebSockets.hasOwnProperty(y) && delete r.sharedWebSockets[y];
|
|
117
|
+
};
|
|
118
|
+
r.resetWebSockets = g;
|
|
119
|
+
})(We)), We;
|
|
120
|
+
}
|
|
121
|
+
var te = {}, B = {}, lr;
|
|
122
|
+
function Ve() {
|
|
123
|
+
if (lr) return B;
|
|
124
|
+
lr = 1, Object.defineProperty(B, "__esModule", { value: !0 }), B.setUpSocketIOPing = B.appendQueryParams = B.parseSocketIOUrl = void 0;
|
|
125
|
+
var r = V(), g = function(v) {
|
|
126
|
+
if (v) {
|
|
127
|
+
var h = /^https|wss/.test(v), E = v.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = E.replace(/\/$/, ""), c = h ? "wss" : "ws";
|
|
128
|
+
return "".concat(c, "://").concat(_).concat(r.SOCKET_IO_PATH);
|
|
129
|
+
} else if (v === "") {
|
|
130
|
+
var h = /^https/.test(window.location.protocol), c = h ? "wss" : "ws", l = window.location.port ? ":".concat(window.location.port) : "";
|
|
131
|
+
return "".concat(c, "://").concat(window.location.hostname).concat(l).concat(r.SOCKET_IO_PATH);
|
|
132
|
+
}
|
|
133
|
+
return v;
|
|
134
|
+
};
|
|
135
|
+
B.parseSocketIOUrl = g;
|
|
136
|
+
var O = function(v, h) {
|
|
137
|
+
h === void 0 && (h = {});
|
|
138
|
+
var E = /\?([\w]+=[\w]+)/, _ = E.test(v), c = "".concat(Object.entries(h).reduce(function(l, o) {
|
|
139
|
+
var a = o[0], i = o[1];
|
|
140
|
+
return l + "".concat(a, "=").concat(i, "&");
|
|
141
|
+
}, "").slice(0, -1));
|
|
142
|
+
return "".concat(v).concat(_ ? "&" : "?").concat(c);
|
|
143
|
+
};
|
|
144
|
+
B.appendQueryParams = O;
|
|
145
|
+
var y = function(v, h) {
|
|
146
|
+
h === void 0 && (h = r.SOCKET_IO_PING_INTERVAL);
|
|
147
|
+
var E = function() {
|
|
148
|
+
return v(r.SOCKET_IO_PING_CODE);
|
|
149
|
+
};
|
|
150
|
+
return window.setInterval(E, h);
|
|
151
|
+
};
|
|
152
|
+
return B.setUpSocketIOPing = y, B;
|
|
153
|
+
}
|
|
154
|
+
var we = {}, fr;
|
|
155
|
+
function Pr() {
|
|
156
|
+
if (fr) return we;
|
|
157
|
+
fr = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.heartbeat = O;
|
|
158
|
+
var r = V();
|
|
159
|
+
function g(y) {
|
|
160
|
+
return Array.isArray(y) ? y.reduce(function(v, h) {
|
|
161
|
+
return v.current > h.current ? v : h;
|
|
162
|
+
}).current : y.current;
|
|
163
|
+
}
|
|
164
|
+
function O(y, v, h) {
|
|
165
|
+
var E = h || {}, _ = E.interval, c = _ === void 0 ? r.DEFAULT_HEARTBEAT.interval : _, l = E.timeout, o = l === void 0 ? r.DEFAULT_HEARTBEAT.timeout : l, a = E.message, i = a === void 0 ? r.DEFAULT_HEARTBEAT.message : a, t = Math.max(100, c / 10), n = Date.now(), f = setInterval(function() {
|
|
166
|
+
var S = Date.now(), u = g(v);
|
|
167
|
+
if (u + o <= S)
|
|
168
|
+
console.warn("Heartbeat timed out, closing connection, last message received ".concat(S - u, "ms ago, last ping sent ").concat(S - n, "ms ago")), y.close();
|
|
169
|
+
else if (u + c <= S && n + c <= S)
|
|
170
|
+
try {
|
|
171
|
+
typeof i == "function" ? y.send(i()) : y.send(i), n = S;
|
|
172
|
+
} catch (d) {
|
|
173
|
+
console.error("Heartbeat failed, closing connection", d instanceof Error ? d.message : d), y.close();
|
|
174
|
+
}
|
|
175
|
+
}, t);
|
|
176
|
+
return y.addEventListener("close", function() {
|
|
177
|
+
clearInterval(f);
|
|
178
|
+
}), function() {
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
return we;
|
|
182
|
+
}
|
|
183
|
+
var Ee = {}, Fe = {}, vr;
|
|
184
|
+
function $e() {
|
|
185
|
+
return vr || (vr = 1, (function(r) {
|
|
186
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.resetSubscribers = r.removeSubscriber = r.addSubscriber = r.hasSubscribers = r.getSubscribers = void 0;
|
|
187
|
+
var g = {}, O = [], y = function(c) {
|
|
188
|
+
return (0, r.hasSubscribers)(c) ? Array.from(g[c]) : O;
|
|
189
|
+
};
|
|
190
|
+
r.getSubscribers = y;
|
|
191
|
+
var v = function(c) {
|
|
192
|
+
var l;
|
|
193
|
+
return ((l = g[c]) === null || l === void 0 ? void 0 : l.size) > 0;
|
|
194
|
+
};
|
|
195
|
+
r.hasSubscribers = v;
|
|
196
|
+
var h = function(c, l) {
|
|
197
|
+
g[c] = g[c] || /* @__PURE__ */ new Set(), g[c].add(l);
|
|
198
|
+
};
|
|
199
|
+
r.addSubscriber = h;
|
|
200
|
+
var E = function(c, l) {
|
|
201
|
+
g[c].delete(l);
|
|
202
|
+
};
|
|
203
|
+
r.removeSubscriber = E;
|
|
204
|
+
var _ = function(c) {
|
|
205
|
+
if (c && g.hasOwnProperty(c))
|
|
206
|
+
delete g[c];
|
|
207
|
+
else
|
|
208
|
+
for (var l in g)
|
|
209
|
+
g.hasOwnProperty(l) && delete g[l];
|
|
210
|
+
};
|
|
211
|
+
r.resetSubscribers = _;
|
|
212
|
+
})(Fe)), Fe;
|
|
213
|
+
}
|
|
214
|
+
var dr;
|
|
215
|
+
function He() {
|
|
216
|
+
if (dr) return Ee;
|
|
217
|
+
dr = 1, Object.defineProperty(Ee, "__esModule", { value: !0 }), Ee.assertIsWebSocket = O, Ee.resetGlobalState = y;
|
|
218
|
+
var r = Ge(), g = $e();
|
|
219
|
+
function O(v, h) {
|
|
220
|
+
if (!h && !(v instanceof WebSocket))
|
|
221
|
+
throw new Error("");
|
|
222
|
+
}
|
|
223
|
+
function y(v) {
|
|
224
|
+
(0, g.resetSubscribers)(v), (0, r.resetWebSockets)(v);
|
|
225
|
+
}
|
|
226
|
+
return Ee;
|
|
227
|
+
}
|
|
228
|
+
var _r;
|
|
229
|
+
function vt() {
|
|
230
|
+
if (_r) return te;
|
|
231
|
+
_r = 1;
|
|
232
|
+
var r = te && te.__assign || function() {
|
|
233
|
+
return r = Object.assign || function(o) {
|
|
234
|
+
for (var a, i = 1, t = arguments.length; i < t; i++) {
|
|
235
|
+
a = arguments[i];
|
|
236
|
+
for (var n in a) Object.prototype.hasOwnProperty.call(a, n) && (o[n] = a[n]);
|
|
237
|
+
}
|
|
238
|
+
return o;
|
|
239
|
+
}, r.apply(this, arguments);
|
|
240
|
+
};
|
|
241
|
+
Object.defineProperty(te, "__esModule", { value: !0 }), te.attachListeners = void 0;
|
|
242
|
+
var g = Ve(), O = Pr(), y = V(), v = He(), h = function(o, a, i, t) {
|
|
243
|
+
o.onmessage = function(n) {
|
|
244
|
+
var f;
|
|
245
|
+
a.current.onMessage && a.current.onMessage(n), typeof t?.current == "number" && (t.current = Date.now()), !(typeof a.current.filter == "function" && a.current.filter(n) !== !0) && (a.current.heartbeat && typeof a.current.heartbeat != "boolean" && ((f = a.current.heartbeat) === null || f === void 0 ? void 0 : f.returnMessage) === n.data || i(n));
|
|
246
|
+
};
|
|
247
|
+
}, E = function(o, a, i, t, n) {
|
|
248
|
+
o.onopen = function(f) {
|
|
249
|
+
if (a.current.onOpen && a.current.onOpen(f), t.current = 0, i(y.ReadyState.OPEN), a.current.heartbeat && o instanceof WebSocket) {
|
|
250
|
+
var S = typeof a.current.heartbeat == "boolean" ? void 0 : a.current.heartbeat;
|
|
251
|
+
n.current = Date.now(), (0, O.heartbeat)(o, n, S);
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
}, _ = function(o, a, i, t, n) {
|
|
255
|
+
if (y.isEventSourceSupported && o instanceof EventSource)
|
|
256
|
+
return function() {
|
|
257
|
+
};
|
|
258
|
+
(0, v.assertIsWebSocket)(o, a.current.skipAssert);
|
|
259
|
+
var f;
|
|
260
|
+
return o.onclose = function(S) {
|
|
261
|
+
var u;
|
|
262
|
+
if (a.current.onClose && a.current.onClose(S), i(y.ReadyState.CLOSED), a.current.shouldReconnect && a.current.shouldReconnect(S)) {
|
|
263
|
+
var d = (u = a.current.reconnectAttempts) !== null && u !== void 0 ? u : y.DEFAULT_RECONNECT_LIMIT;
|
|
264
|
+
if (n.current < d) {
|
|
265
|
+
var A = typeof a.current.reconnectInterval == "function" ? a.current.reconnectInterval(n.current) : a.current.reconnectInterval;
|
|
266
|
+
f = window.setTimeout(function() {
|
|
267
|
+
n.current++, t();
|
|
268
|
+
}, A ?? y.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
269
|
+
} else
|
|
270
|
+
a.current.onReconnectStop && a.current.onReconnectStop(d), console.warn("Max reconnect attempts of ".concat(d, " exceeded"));
|
|
271
|
+
}
|
|
272
|
+
}, function() {
|
|
273
|
+
return f && window.clearTimeout(f);
|
|
274
|
+
};
|
|
275
|
+
}, c = function(o, a, i, t, n) {
|
|
276
|
+
var f;
|
|
277
|
+
return o.onerror = function(S) {
|
|
278
|
+
var u;
|
|
279
|
+
if (a.current.onError && a.current.onError(S), y.isEventSourceSupported && o instanceof EventSource && (a.current.onClose && a.current.onClose(r(r({}, S), { code: 1006, reason: "An error occurred with the EventSource: ".concat(S), wasClean: !1 })), i(y.ReadyState.CLOSED), o.close()), a.current.retryOnError)
|
|
280
|
+
if (n.current < ((u = a.current.reconnectAttempts) !== null && u !== void 0 ? u : y.DEFAULT_RECONNECT_LIMIT)) {
|
|
281
|
+
var d = typeof a.current.reconnectInterval == "function" ? a.current.reconnectInterval(n.current) : a.current.reconnectInterval;
|
|
282
|
+
f = window.setTimeout(function() {
|
|
283
|
+
n.current++, t();
|
|
284
|
+
}, d ?? y.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
285
|
+
} else
|
|
286
|
+
a.current.onReconnectStop && a.current.onReconnectStop(a.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(a.current.reconnectAttempts, " exceeded"));
|
|
287
|
+
}, function() {
|
|
288
|
+
return f && window.clearTimeout(f);
|
|
289
|
+
};
|
|
290
|
+
}, l = function(o, a, i, t, n, f, S) {
|
|
291
|
+
var u = a.setLastMessage, d = a.setReadyState, A, M, T;
|
|
292
|
+
return i.current.fromSocketIO && (A = (0, g.setUpSocketIOPing)(S)), h(o, i, u, f), E(o, i, d, n, f), M = _(o, i, d, t, n), T = c(o, i, d, t, n), function() {
|
|
293
|
+
d(y.ReadyState.CLOSING), M(), T(), o.close(), A && clearInterval(A);
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
return te.attachListeners = l, te;
|
|
297
|
+
}
|
|
298
|
+
var ne = {}, Er;
|
|
299
|
+
function dt() {
|
|
300
|
+
if (Er) return ne;
|
|
301
|
+
Er = 1;
|
|
302
|
+
var r = ne && ne.__assign || function() {
|
|
303
|
+
return r = Object.assign || function(a) {
|
|
304
|
+
for (var i, t = 1, n = arguments.length; t < n; t++) {
|
|
305
|
+
i = arguments[t];
|
|
306
|
+
for (var f in i) Object.prototype.hasOwnProperty.call(i, f) && (a[f] = i[f]);
|
|
307
|
+
}
|
|
308
|
+
return a;
|
|
309
|
+
}, r.apply(this, arguments);
|
|
310
|
+
};
|
|
311
|
+
Object.defineProperty(ne, "__esModule", { value: !0 }), ne.attachSharedListeners = void 0;
|
|
312
|
+
var g = Ge(), O = V(), y = $e(), v = Ve(), h = Pr(), E = function(a, i, t) {
|
|
313
|
+
a.onmessage = function(n) {
|
|
314
|
+
(0, y.getSubscribers)(i).forEach(function(f) {
|
|
315
|
+
var S;
|
|
316
|
+
f.optionsRef.current.onMessage && f.optionsRef.current.onMessage(n), typeof ((S = f?.lastMessageTime) === null || S === void 0 ? void 0 : S.current) == "number" && (f.lastMessageTime.current = Date.now()), !(typeof f.optionsRef.current.filter == "function" && f.optionsRef.current.filter(n) !== !0) && (t && typeof t != "boolean" && t?.returnMessage === n.data || f.setLastMessage(n));
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
}, _ = function(a, i, t) {
|
|
320
|
+
a.onopen = function(n) {
|
|
321
|
+
var f = (0, y.getSubscribers)(i);
|
|
322
|
+
f.forEach(function(S) {
|
|
323
|
+
S.reconnectCount.current = 0, S.optionsRef.current.onOpen && S.optionsRef.current.onOpen(n), S.setReadyState(O.ReadyState.OPEN), t && a instanceof WebSocket && (S.lastMessageTime.current = Date.now());
|
|
324
|
+
}), t && a instanceof WebSocket && (0, h.heartbeat)(a, f.map(function(S) {
|
|
325
|
+
return S.lastMessageTime;
|
|
326
|
+
}), typeof t == "boolean" ? void 0 : t);
|
|
327
|
+
};
|
|
328
|
+
}, c = function(a, i) {
|
|
329
|
+
a instanceof WebSocket && (a.onclose = function(t) {
|
|
330
|
+
(0, y.getSubscribers)(i).forEach(function(n) {
|
|
331
|
+
n.optionsRef.current.onClose && n.optionsRef.current.onClose(t), n.setReadyState(O.ReadyState.CLOSED);
|
|
332
|
+
}), delete g.sharedWebSockets[i], (0, y.getSubscribers)(i).forEach(function(n) {
|
|
333
|
+
var f;
|
|
334
|
+
if (n.optionsRef.current.shouldReconnect && n.optionsRef.current.shouldReconnect(t)) {
|
|
335
|
+
var S = (f = n.optionsRef.current.reconnectAttempts) !== null && f !== void 0 ? f : O.DEFAULT_RECONNECT_LIMIT;
|
|
336
|
+
if (n.reconnectCount.current < S) {
|
|
337
|
+
var u = typeof n.optionsRef.current.reconnectInterval == "function" ? n.optionsRef.current.reconnectInterval(n.reconnectCount.current) : n.optionsRef.current.reconnectInterval;
|
|
338
|
+
setTimeout(function() {
|
|
339
|
+
n.reconnectCount.current++, n.reconnect.current();
|
|
340
|
+
}, u ?? O.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
341
|
+
} else
|
|
342
|
+
n.optionsRef.current.onReconnectStop && n.optionsRef.current.onReconnectStop(n.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(S, " exceeded"));
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
}, l = function(a, i) {
|
|
347
|
+
a.onerror = function(t) {
|
|
348
|
+
(0, y.getSubscribers)(i).forEach(function(n) {
|
|
349
|
+
n.optionsRef.current.onError && n.optionsRef.current.onError(t), O.isEventSourceSupported && a instanceof EventSource && (n.optionsRef.current.onClose && n.optionsRef.current.onClose(r(r({}, t), { code: 1006, reason: "An error occurred with the EventSource: ".concat(t), wasClean: !1 })), n.setReadyState(O.ReadyState.CLOSED));
|
|
350
|
+
}), O.isEventSourceSupported && a instanceof EventSource && a.close();
|
|
351
|
+
};
|
|
352
|
+
}, o = function(a, i, t, n) {
|
|
353
|
+
var f;
|
|
354
|
+
return t.current.fromSocketIO && (f = (0, v.setUpSocketIOPing)(n)), E(a, i, t.current.heartbeat), c(a, i), _(a, i, t.current.heartbeat), l(a, i), function() {
|
|
355
|
+
f && clearInterval(f);
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
return ne.attachSharedListeners = o, ne;
|
|
359
|
+
}
|
|
360
|
+
var Sr;
|
|
361
|
+
function _t() {
|
|
362
|
+
if (Sr) return _e;
|
|
363
|
+
Sr = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.createOrJoinSocket = void 0;
|
|
364
|
+
var r = Ge(), g = V(), O = vt(), y = dt(), v = $e(), h = function(_, c, l, o, a) {
|
|
365
|
+
return function() {
|
|
366
|
+
if ((0, v.removeSubscriber)(_, c), !(0, v.hasSubscribers)(_)) {
|
|
367
|
+
try {
|
|
368
|
+
var i = r.sharedWebSockets[_];
|
|
369
|
+
i instanceof WebSocket && (i.onclose = function(t) {
|
|
370
|
+
l.current.onClose && l.current.onClose(t), o(g.ReadyState.CLOSED);
|
|
371
|
+
}), i.close();
|
|
372
|
+
} catch {
|
|
373
|
+
}
|
|
374
|
+
a && a(), delete r.sharedWebSockets[_];
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
}, E = function(_, c, l, o, a, i, t, n, f) {
|
|
378
|
+
if (!g.isEventSourceSupported && o.current.eventSourceOptions)
|
|
379
|
+
throw g.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
|
|
380
|
+
if (o.current.share) {
|
|
381
|
+
var S = null;
|
|
382
|
+
r.sharedWebSockets[c] === void 0 ? (r.sharedWebSockets[c] = o.current.eventSourceOptions ? new EventSource(c, o.current.eventSourceOptions) : new WebSocket(c, o.current.protocols), _.current = r.sharedWebSockets[c], l(g.ReadyState.CONNECTING), S = (0, y.attachSharedListeners)(r.sharedWebSockets[c], c, o, f)) : (_.current = r.sharedWebSockets[c], l(r.sharedWebSockets[c].readyState));
|
|
383
|
+
var u = {
|
|
384
|
+
setLastMessage: a,
|
|
385
|
+
setReadyState: l,
|
|
386
|
+
optionsRef: o,
|
|
387
|
+
reconnectCount: t,
|
|
388
|
+
lastMessageTime: n,
|
|
389
|
+
reconnect: i
|
|
390
|
+
};
|
|
391
|
+
return (0, v.addSubscriber)(c, u), h(c, u, o, l, S);
|
|
392
|
+
} else {
|
|
393
|
+
if (_.current = o.current.eventSourceOptions ? new EventSource(c, o.current.eventSourceOptions) : new WebSocket(c, o.current.protocols), l(g.ReadyState.CONNECTING), !_.current)
|
|
394
|
+
throw new Error("WebSocket failed to be created");
|
|
395
|
+
return (0, O.attachListeners)(_.current, {
|
|
396
|
+
setLastMessage: a,
|
|
397
|
+
setReadyState: l
|
|
398
|
+
}, o, i.current, t, n, f);
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
return _e.createOrJoinSocket = E, _e;
|
|
402
|
+
}
|
|
403
|
+
var K = {}, hr;
|
|
404
|
+
function Et() {
|
|
405
|
+
return hr || (hr = 1, (function(r) {
|
|
406
|
+
var g = K && K.__awaiter || function(c, l, o, a) {
|
|
407
|
+
function i(t) {
|
|
408
|
+
return t instanceof o ? t : new o(function(n) {
|
|
409
|
+
n(t);
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
return new (o || (o = Promise))(function(t, n) {
|
|
413
|
+
function f(d) {
|
|
414
|
+
try {
|
|
415
|
+
u(a.next(d));
|
|
416
|
+
} catch (A) {
|
|
417
|
+
n(A);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
function S(d) {
|
|
421
|
+
try {
|
|
422
|
+
u(a.throw(d));
|
|
423
|
+
} catch (A) {
|
|
424
|
+
n(A);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
function u(d) {
|
|
428
|
+
d.done ? t(d.value) : i(d.value).then(f, S);
|
|
429
|
+
}
|
|
430
|
+
u((a = a.apply(c, l || [])).next());
|
|
431
|
+
});
|
|
432
|
+
}, O = K && K.__generator || function(c, l) {
|
|
433
|
+
var o = { label: 0, sent: function() {
|
|
434
|
+
if (t[0] & 1) throw t[1];
|
|
435
|
+
return t[1];
|
|
436
|
+
}, trys: [], ops: [] }, a, i, t, n = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
437
|
+
return n.next = f(0), n.throw = f(1), n.return = f(2), typeof Symbol == "function" && (n[Symbol.iterator] = function() {
|
|
438
|
+
return this;
|
|
439
|
+
}), n;
|
|
440
|
+
function f(u) {
|
|
441
|
+
return function(d) {
|
|
442
|
+
return S([u, d]);
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
function S(u) {
|
|
446
|
+
if (a) throw new TypeError("Generator is already executing.");
|
|
447
|
+
for (; n && (n = 0, u[0] && (o = 0)), o; ) try {
|
|
448
|
+
if (a = 1, i && (t = u[0] & 2 ? i.return : u[0] ? i.throw || ((t = i.return) && t.call(i), 0) : i.next) && !(t = t.call(i, u[1])).done) return t;
|
|
449
|
+
switch (i = 0, t && (u = [u[0] & 2, t.value]), u[0]) {
|
|
450
|
+
case 0:
|
|
451
|
+
case 1:
|
|
452
|
+
t = u;
|
|
453
|
+
break;
|
|
454
|
+
case 4:
|
|
455
|
+
return o.label++, { value: u[1], done: !1 };
|
|
456
|
+
case 5:
|
|
457
|
+
o.label++, i = u[1], u = [0];
|
|
458
|
+
continue;
|
|
459
|
+
case 7:
|
|
460
|
+
u = o.ops.pop(), o.trys.pop();
|
|
461
|
+
continue;
|
|
462
|
+
default:
|
|
463
|
+
if (t = o.trys, !(t = t.length > 0 && t[t.length - 1]) && (u[0] === 6 || u[0] === 2)) {
|
|
464
|
+
o = 0;
|
|
465
|
+
continue;
|
|
466
|
+
}
|
|
467
|
+
if (u[0] === 3 && (!t || u[1] > t[0] && u[1] < t[3])) {
|
|
468
|
+
o.label = u[1];
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
if (u[0] === 6 && o.label < t[1]) {
|
|
472
|
+
o.label = t[1], t = u;
|
|
473
|
+
break;
|
|
474
|
+
}
|
|
475
|
+
if (t && o.label < t[2]) {
|
|
476
|
+
o.label = t[2], o.ops.push(u);
|
|
477
|
+
break;
|
|
478
|
+
}
|
|
479
|
+
t[2] && o.ops.pop(), o.trys.pop();
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
482
|
+
u = l.call(c, o);
|
|
483
|
+
} catch (d) {
|
|
484
|
+
u = [6, d], i = 0;
|
|
485
|
+
} finally {
|
|
486
|
+
a = t = 0;
|
|
487
|
+
}
|
|
488
|
+
if (u[0] & 5) throw u[1];
|
|
489
|
+
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
490
|
+
}
|
|
491
|
+
}, y = K && K.__spreadArray || function(c, l, o) {
|
|
492
|
+
if (o || arguments.length === 2) for (var a = 0, i = l.length, t; a < i; a++)
|
|
493
|
+
(t || !(a in l)) && (t || (t = Array.prototype.slice.call(l, 0, a)), t[a] = l[a]);
|
|
494
|
+
return c.concat(t || Array.prototype.slice.call(l));
|
|
495
|
+
};
|
|
496
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.getUrl = void 0;
|
|
497
|
+
var v = Ve(), h = V(), E = function(c) {
|
|
498
|
+
return new Promise(function(l) {
|
|
499
|
+
return window.setTimeout(l, c);
|
|
500
|
+
});
|
|
501
|
+
}, _ = function(c, l) {
|
|
502
|
+
for (var o = [], a = 2; a < arguments.length; a++)
|
|
503
|
+
o[a - 2] = arguments[a];
|
|
504
|
+
return g(void 0, y([c, l], o, !0), void 0, function(i, t, n) {
|
|
505
|
+
var f, S, u, d, A, M, T, w;
|
|
506
|
+
return n === void 0 && (n = 0), O(this, function(k) {
|
|
507
|
+
switch (k.label) {
|
|
508
|
+
case 0:
|
|
509
|
+
if (typeof i != "function") return [3, 10];
|
|
510
|
+
k.label = 1;
|
|
511
|
+
case 1:
|
|
512
|
+
return k.trys.push([1, 3, , 9]), [4, i()];
|
|
513
|
+
case 2:
|
|
514
|
+
return f = k.sent(), [3, 9];
|
|
515
|
+
case 3:
|
|
516
|
+
return k.sent(), t.current.retryOnError ? (S = (M = t.current.reconnectAttempts) !== null && M !== void 0 ? M : h.DEFAULT_RECONNECT_LIMIT, n < S ? (u = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(n) : t.current.reconnectInterval, [4, E(u ?? h.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
|
|
517
|
+
case 4:
|
|
518
|
+
return k.sent(), [2, (0, r.getUrl)(i, t, n + 1)];
|
|
519
|
+
case 5:
|
|
520
|
+
return (w = (T = t.current).onReconnectStop) === null || w === void 0 || w.call(T, n), [2, null];
|
|
521
|
+
case 6:
|
|
522
|
+
return [3, 8];
|
|
523
|
+
case 7:
|
|
524
|
+
return [2, null];
|
|
525
|
+
case 8:
|
|
526
|
+
return [3, 9];
|
|
527
|
+
case 9:
|
|
528
|
+
return [3, 11];
|
|
529
|
+
case 10:
|
|
530
|
+
f = i, k.label = 11;
|
|
531
|
+
case 11:
|
|
532
|
+
return d = t.current.fromSocketIO ? (0, v.parseSocketIOUrl)(f) : f, A = t.current.queryParams ? (0, v.appendQueryParams)(d, t.current.queryParams) : d, [2, A];
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
});
|
|
536
|
+
};
|
|
537
|
+
r.getUrl = _;
|
|
538
|
+
})(K)), K;
|
|
539
|
+
}
|
|
540
|
+
var qe = {}, yr;
|
|
541
|
+
function St() {
|
|
542
|
+
return yr || (yr = 1, (function(r) {
|
|
543
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.websocketWrapper = void 0;
|
|
544
|
+
var g = function(O, y) {
|
|
545
|
+
return new Proxy(O, {
|
|
546
|
+
get: function(v, h) {
|
|
547
|
+
var E = v[h];
|
|
548
|
+
return h === "reconnect" ? y : typeof E == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
|
|
549
|
+
}) : E;
|
|
550
|
+
},
|
|
551
|
+
set: function(v, h, E) {
|
|
552
|
+
return /^on/.test(h) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (v[h] = E, !0);
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
};
|
|
556
|
+
r.websocketWrapper = g, r.default = r.websocketWrapper;
|
|
557
|
+
})(qe)), qe;
|
|
558
|
+
}
|
|
559
|
+
var br;
|
|
560
|
+
function Ye() {
|
|
561
|
+
if (br) return F;
|
|
562
|
+
br = 1;
|
|
563
|
+
var r = F && F.__assign || function() {
|
|
564
|
+
return r = Object.assign || function(i) {
|
|
565
|
+
for (var t, n = 1, f = arguments.length; n < f; n++) {
|
|
566
|
+
t = arguments[n];
|
|
567
|
+
for (var S in t) Object.prototype.hasOwnProperty.call(t, S) && (i[S] = t[S]);
|
|
568
|
+
}
|
|
569
|
+
return i;
|
|
570
|
+
}, r.apply(this, arguments);
|
|
571
|
+
}, g = F && F.__awaiter || function(i, t, n, f) {
|
|
572
|
+
function S(u) {
|
|
573
|
+
return u instanceof n ? u : new n(function(d) {
|
|
574
|
+
d(u);
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
return new (n || (n = Promise))(function(u, d) {
|
|
578
|
+
function A(w) {
|
|
579
|
+
try {
|
|
580
|
+
T(f.next(w));
|
|
581
|
+
} catch (k) {
|
|
582
|
+
d(k);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
function M(w) {
|
|
586
|
+
try {
|
|
587
|
+
T(f.throw(w));
|
|
588
|
+
} catch (k) {
|
|
589
|
+
d(k);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
function T(w) {
|
|
593
|
+
w.done ? u(w.value) : S(w.value).then(A, M);
|
|
594
|
+
}
|
|
595
|
+
T((f = f.apply(i, t || [])).next());
|
|
596
|
+
});
|
|
597
|
+
}, O = F && F.__generator || function(i, t) {
|
|
598
|
+
var n = { label: 0, sent: function() {
|
|
599
|
+
if (u[0] & 1) throw u[1];
|
|
600
|
+
return u[1];
|
|
601
|
+
}, trys: [], ops: [] }, f, S, u, d = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
602
|
+
return d.next = A(0), d.throw = A(1), d.return = A(2), typeof Symbol == "function" && (d[Symbol.iterator] = function() {
|
|
603
|
+
return this;
|
|
604
|
+
}), d;
|
|
605
|
+
function A(T) {
|
|
606
|
+
return function(w) {
|
|
607
|
+
return M([T, w]);
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
function M(T) {
|
|
611
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
612
|
+
for (; d && (d = 0, T[0] && (n = 0)), n; ) try {
|
|
613
|
+
if (f = 1, S && (u = T[0] & 2 ? S.return : T[0] ? S.throw || ((u = S.return) && u.call(S), 0) : S.next) && !(u = u.call(S, T[1])).done) return u;
|
|
614
|
+
switch (S = 0, u && (T = [T[0] & 2, u.value]), T[0]) {
|
|
615
|
+
case 0:
|
|
616
|
+
case 1:
|
|
617
|
+
u = T;
|
|
618
|
+
break;
|
|
619
|
+
case 4:
|
|
620
|
+
return n.label++, { value: T[1], done: !1 };
|
|
621
|
+
case 5:
|
|
622
|
+
n.label++, S = T[1], T = [0];
|
|
623
|
+
continue;
|
|
624
|
+
case 7:
|
|
625
|
+
T = n.ops.pop(), n.trys.pop();
|
|
626
|
+
continue;
|
|
627
|
+
default:
|
|
628
|
+
if (u = n.trys, !(u = u.length > 0 && u[u.length - 1]) && (T[0] === 6 || T[0] === 2)) {
|
|
629
|
+
n = 0;
|
|
630
|
+
continue;
|
|
631
|
+
}
|
|
632
|
+
if (T[0] === 3 && (!u || T[1] > u[0] && T[1] < u[3])) {
|
|
633
|
+
n.label = T[1];
|
|
634
|
+
break;
|
|
635
|
+
}
|
|
636
|
+
if (T[0] === 6 && n.label < u[1]) {
|
|
637
|
+
n.label = u[1], u = T;
|
|
638
|
+
break;
|
|
639
|
+
}
|
|
640
|
+
if (u && n.label < u[2]) {
|
|
641
|
+
n.label = u[2], n.ops.push(T);
|
|
642
|
+
break;
|
|
643
|
+
}
|
|
644
|
+
u[2] && n.ops.pop(), n.trys.pop();
|
|
645
|
+
continue;
|
|
646
|
+
}
|
|
647
|
+
T = t.call(i, n);
|
|
648
|
+
} catch (w) {
|
|
649
|
+
T = [6, w], S = 0;
|
|
650
|
+
} finally {
|
|
651
|
+
f = u = 0;
|
|
652
|
+
}
|
|
653
|
+
if (T[0] & 5) throw T[1];
|
|
654
|
+
return { value: T[0] ? T[1] : void 0, done: !0 };
|
|
655
|
+
}
|
|
656
|
+
}, y = F && F.__importDefault || function(i) {
|
|
657
|
+
return i && i.__esModule ? i : { default: i };
|
|
658
|
+
};
|
|
659
|
+
Object.defineProperty(F, "__esModule", { value: !0 }), F.useWebSocket = void 0;
|
|
660
|
+
var v = ye, h = it, E = V(), _ = _t(), c = Et(), l = y(St()), o = He(), a = function(i, t, n) {
|
|
661
|
+
t === void 0 && (t = E.DEFAULT_OPTIONS), n === void 0 && (n = !0);
|
|
662
|
+
var f = (0, v.useState)(null), S = f[0], u = f[1], d = (0, v.useState)({}), A = d[0], M = d[1], T = (0, v.useMemo)(function() {
|
|
663
|
+
if (!t.disableJson && S)
|
|
664
|
+
try {
|
|
665
|
+
return JSON.parse(S.data);
|
|
666
|
+
} catch {
|
|
667
|
+
return E.UNPARSABLE_JSON_OBJECT;
|
|
668
|
+
}
|
|
669
|
+
return null;
|
|
670
|
+
}, [S, t.disableJson]), w = (0, v.useRef)(null), k = (0, v.useRef)(null), se = (0, v.useRef)(function() {
|
|
671
|
+
}), le = (0, v.useRef)(0), Pe = (0, v.useRef)(Date.now()), be = (0, v.useRef)([]), G = (0, v.useRef)(null), j = (0, v.useRef)(t);
|
|
672
|
+
j.current = t;
|
|
673
|
+
var J = w.current && A[w.current] !== void 0 ? A[w.current] : i !== null && n === !0 ? E.ReadyState.CONNECTING : E.ReadyState.UNINSTANTIATED, X = t.queryParams ? JSON.stringify(t.queryParams) : null, $ = (0, v.useCallback)(function(D, L) {
|
|
674
|
+
var H;
|
|
675
|
+
if (L === void 0 && (L = !0), E.isEventSourceSupported && k.current instanceof EventSource) {
|
|
676
|
+
console.warn("Unable to send a message from an eventSource");
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
((H = k.current) === null || H === void 0 ? void 0 : H.readyState) === E.ReadyState.OPEN ? ((0, o.assertIsWebSocket)(k.current, j.current.skipAssert), k.current.send(D)) : L && be.current.push(D);
|
|
680
|
+
}, []), ge = (0, v.useCallback)(function(D, L) {
|
|
681
|
+
L === void 0 && (L = !0), $(JSON.stringify(D), L);
|
|
682
|
+
}, [$]), Oe = (0, v.useCallback)(function() {
|
|
683
|
+
return j.current.share !== !0 || E.isEventSourceSupported && k.current instanceof EventSource ? k.current : (G.current === null && k.current && ((0, o.assertIsWebSocket)(k.current, j.current.skipAssert), G.current = (0, l.default)(k.current, se)), G.current);
|
|
684
|
+
}, []);
|
|
685
|
+
return (0, v.useEffect)(function() {
|
|
686
|
+
if (i !== null && n === !0) {
|
|
687
|
+
var D, L = !1, H = !0, fe = function() {
|
|
688
|
+
return g(void 0, void 0, void 0, function() {
|
|
689
|
+
var Z, z, pe;
|
|
690
|
+
return O(this, function(ue) {
|
|
691
|
+
switch (ue.label) {
|
|
692
|
+
case 0:
|
|
693
|
+
return Z = w, [4, (0, c.getUrl)(i, j)];
|
|
694
|
+
case 1:
|
|
695
|
+
return Z.current = ue.sent(), w.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), w.current = "ABORTED", (0, h.flushSync)(function() {
|
|
696
|
+
return M(function(Y) {
|
|
697
|
+
return r(r({}, Y), { ABORTED: E.ReadyState.CLOSED });
|
|
698
|
+
});
|
|
699
|
+
}), [
|
|
700
|
+
2
|
|
701
|
+
/*return*/
|
|
702
|
+
]) : (z = function(Y) {
|
|
703
|
+
L || (0, h.flushSync)(function() {
|
|
704
|
+
return u(Y);
|
|
705
|
+
});
|
|
706
|
+
}, pe = function(Y) {
|
|
707
|
+
L || (0, h.flushSync)(function() {
|
|
708
|
+
return M(function(oe) {
|
|
709
|
+
var ee;
|
|
710
|
+
return r(r({}, oe), w.current && (ee = {}, ee[w.current] = Y, ee));
|
|
711
|
+
});
|
|
712
|
+
});
|
|
713
|
+
}, H && (D = (0, _.createOrJoinSocket)(k, w.current, pe, j, z, se, le, Pe, $)), [
|
|
714
|
+
2
|
|
715
|
+
/*return*/
|
|
716
|
+
]);
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
});
|
|
720
|
+
};
|
|
721
|
+
return se.current = function() {
|
|
722
|
+
L || (G.current && (G.current = null), D?.(), fe());
|
|
723
|
+
}, fe(), function() {
|
|
724
|
+
L = !0, H = !1, G.current && (G.current = null), D?.(), u(null);
|
|
725
|
+
};
|
|
726
|
+
} else (i === null || n === !1) && (le.current = 0, M(function(Z) {
|
|
727
|
+
var z;
|
|
728
|
+
return r(r({}, Z), w.current && (z = {}, z[w.current] = E.ReadyState.CLOSED, z));
|
|
729
|
+
}));
|
|
730
|
+
}, [i, n, X, $]), (0, v.useEffect)(function() {
|
|
731
|
+
J === E.ReadyState.OPEN && be.current.splice(0).forEach(function(D) {
|
|
732
|
+
$(D);
|
|
733
|
+
});
|
|
734
|
+
}, [J]), {
|
|
735
|
+
sendMessage: $,
|
|
736
|
+
sendJsonMessage: ge,
|
|
737
|
+
lastMessage: S,
|
|
738
|
+
lastJsonMessage: T,
|
|
739
|
+
readyState: J,
|
|
740
|
+
getWebSocket: Oe
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
return F.useWebSocket = a, F;
|
|
744
|
+
}
|
|
745
|
+
var ae = {}, gr;
|
|
746
|
+
function ht() {
|
|
747
|
+
if (gr) return ae;
|
|
748
|
+
gr = 1;
|
|
749
|
+
var r = ae && ae.__assign || function() {
|
|
750
|
+
return r = Object.assign || function(_) {
|
|
751
|
+
for (var c, l = 1, o = arguments.length; l < o; l++) {
|
|
752
|
+
c = arguments[l];
|
|
753
|
+
for (var a in c) Object.prototype.hasOwnProperty.call(c, a) && (_[a] = c[a]);
|
|
754
|
+
}
|
|
755
|
+
return _;
|
|
756
|
+
}, r.apply(this, arguments);
|
|
757
|
+
};
|
|
758
|
+
Object.defineProperty(ae, "__esModule", { value: !0 }), ae.useSocketIO = void 0;
|
|
759
|
+
var g = ye, O = Ye(), y = V(), v = {
|
|
760
|
+
type: "empty",
|
|
761
|
+
payload: null
|
|
762
|
+
}, h = function(_) {
|
|
763
|
+
if (!_ || !_.data)
|
|
764
|
+
return v;
|
|
765
|
+
var c = _.data.match(/\[.*]/);
|
|
766
|
+
if (!c)
|
|
767
|
+
return v;
|
|
768
|
+
var l = JSON.parse(c);
|
|
769
|
+
return !Array.isArray(l) || !l[1] ? v : {
|
|
770
|
+
type: l[0],
|
|
771
|
+
payload: l[1]
|
|
772
|
+
};
|
|
773
|
+
}, E = function(_, c, l) {
|
|
774
|
+
c === void 0 && (c = y.DEFAULT_OPTIONS), l === void 0 && (l = !0);
|
|
775
|
+
var o = (0, g.useMemo)(function() {
|
|
776
|
+
return r(r({}, c), { fromSocketIO: !0 });
|
|
777
|
+
}, []), a = (0, O.useWebSocket)(_, o, l), i = a.sendMessage, t = a.sendJsonMessage, n = a.lastMessage, f = a.readyState, S = a.getWebSocket, u = (0, g.useMemo)(function() {
|
|
778
|
+
return h(n);
|
|
779
|
+
}, [n]);
|
|
780
|
+
return {
|
|
781
|
+
sendMessage: i,
|
|
782
|
+
sendJsonMessage: t,
|
|
783
|
+
lastMessage: u,
|
|
784
|
+
lastJsonMessage: u,
|
|
785
|
+
readyState: f,
|
|
786
|
+
getWebSocket: S
|
|
787
|
+
};
|
|
788
|
+
};
|
|
789
|
+
return ae.useSocketIO = E, ae;
|
|
790
|
+
}
|
|
791
|
+
var x = {}, Or;
|
|
792
|
+
function yt() {
|
|
793
|
+
if (Or) return x;
|
|
794
|
+
Or = 1;
|
|
795
|
+
var r = x && x.__assign || function() {
|
|
796
|
+
return r = Object.assign || function(E) {
|
|
797
|
+
for (var _, c = 1, l = arguments.length; c < l; c++) {
|
|
798
|
+
_ = arguments[c];
|
|
799
|
+
for (var o in _) Object.prototype.hasOwnProperty.call(_, o) && (E[o] = _[o]);
|
|
800
|
+
}
|
|
801
|
+
return E;
|
|
802
|
+
}, r.apply(this, arguments);
|
|
803
|
+
}, g = x && x.__rest || function(E, _) {
|
|
804
|
+
var c = {};
|
|
805
|
+
for (var l in E) Object.prototype.hasOwnProperty.call(E, l) && _.indexOf(l) < 0 && (c[l] = E[l]);
|
|
806
|
+
if (E != null && typeof Object.getOwnPropertySymbols == "function")
|
|
807
|
+
for (var o = 0, l = Object.getOwnPropertySymbols(E); o < l.length; o++)
|
|
808
|
+
_.indexOf(l[o]) < 0 && Object.prototype.propertyIsEnumerable.call(E, l[o]) && (c[l[o]] = E[l[o]]);
|
|
809
|
+
return c;
|
|
810
|
+
};
|
|
811
|
+
Object.defineProperty(x, "__esModule", { value: !0 }), x.useEventSource = void 0;
|
|
812
|
+
var O = ye, y = Ye(), v = V(), h = function(E, _, c) {
|
|
813
|
+
_ === void 0 && (_ = v.DEFAULT_EVENT_SOURCE_OPTIONS);
|
|
814
|
+
var l = _.withCredentials, o = _.events, a = g(_, ["withCredentials", "events"]);
|
|
815
|
+
c === void 0 && (c = !0);
|
|
816
|
+
var i = r(r({}, a), { eventSourceOptions: {
|
|
817
|
+
withCredentials: l
|
|
818
|
+
} }), t = (0, O.useRef)(v.EMPTY_EVENT_HANDLERS);
|
|
819
|
+
o && (t.current = o);
|
|
820
|
+
var n = (0, y.useWebSocket)(E, i, c), f = n.lastMessage, S = n.readyState, u = n.getWebSocket;
|
|
821
|
+
return (0, O.useEffect)(function() {
|
|
822
|
+
f?.type && Object.entries(t.current).forEach(function(d) {
|
|
823
|
+
var A = d[0], M = d[1];
|
|
824
|
+
A === f.type && M(f);
|
|
825
|
+
});
|
|
826
|
+
}, [f]), {
|
|
827
|
+
lastEvent: f,
|
|
828
|
+
readyState: S,
|
|
829
|
+
getEventSource: u
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
return x.useEventSource = h, x;
|
|
833
|
+
}
|
|
834
|
+
var pr;
|
|
835
|
+
function bt() {
|
|
836
|
+
return pr || (pr = 1, (function(r) {
|
|
837
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.resetGlobalState = r.useEventSource = r.ReadyState = r.useSocketIO = r.default = void 0;
|
|
838
|
+
var g = Ye();
|
|
839
|
+
Object.defineProperty(r, "default", { enumerable: !0, get: function() {
|
|
840
|
+
return g.useWebSocket;
|
|
841
|
+
} });
|
|
842
|
+
var O = ht();
|
|
843
|
+
Object.defineProperty(r, "useSocketIO", { enumerable: !0, get: function() {
|
|
844
|
+
return O.useSocketIO;
|
|
845
|
+
} });
|
|
846
|
+
var y = V();
|
|
847
|
+
Object.defineProperty(r, "ReadyState", { enumerable: !0, get: function() {
|
|
848
|
+
return y.ReadyState;
|
|
849
|
+
} });
|
|
850
|
+
var v = yt();
|
|
851
|
+
Object.defineProperty(r, "useEventSource", { enumerable: !0, get: function() {
|
|
852
|
+
return v.useEventSource;
|
|
853
|
+
} });
|
|
854
|
+
var h = He();
|
|
855
|
+
Object.defineProperty(r, "resetGlobalState", { enumerable: !0, get: function() {
|
|
856
|
+
return h.resetGlobalState;
|
|
857
|
+
} });
|
|
858
|
+
})(Le)), Le;
|
|
859
|
+
}
|
|
860
|
+
var gt = bt();
|
|
861
|
+
const Ot = /* @__PURE__ */ ft(gt), Q = {
|
|
862
|
+
DEPOSIT: "deposit",
|
|
863
|
+
TRANS_CODE: "transCode",
|
|
864
|
+
ERROR: "error",
|
|
865
|
+
UPDATE_MEMBER: "update_member",
|
|
866
|
+
MAINTAIN_NOTICE: "maintain_notice",
|
|
867
|
+
MAINTAIN_NOTICE_MEMBER: "maintain_notice_member",
|
|
868
|
+
RELOAD: "reload",
|
|
869
|
+
TRANSFER_IN_GAME: "transfer_in_game",
|
|
870
|
+
CHECK_REQUEST: "CHECK_RREQUEST"
|
|
871
|
+
}, pt = 3e4, It = ({
|
|
872
|
+
socketUrl: r,
|
|
873
|
+
socketHandlers: g = {},
|
|
874
|
+
options: O = {}
|
|
875
|
+
}) => {
|
|
876
|
+
const y = ot(!1), {
|
|
877
|
+
sendMessage: v,
|
|
878
|
+
sendJsonMessage: h,
|
|
879
|
+
lastMessage: E,
|
|
880
|
+
// lastJsonMessage,
|
|
881
|
+
readyState: _
|
|
882
|
+
// getWebSocket,
|
|
883
|
+
} = Ot(r, {
|
|
884
|
+
queryParams: { key: "wsky" },
|
|
885
|
+
onOpen: () => console.log("連線成功"),
|
|
886
|
+
shouldReconnect: () => y.current === !1,
|
|
887
|
+
reconnectAttempts: 9999,
|
|
888
|
+
reconnectInterval: 1e3,
|
|
889
|
+
...O
|
|
890
|
+
}), c = Je(() => {
|
|
891
|
+
try {
|
|
892
|
+
return JSON.parse(E?.data);
|
|
893
|
+
} catch {
|
|
894
|
+
return null;
|
|
895
|
+
}
|
|
896
|
+
}, [E?.data]);
|
|
897
|
+
return je(() => {
|
|
898
|
+
const l = setInterval(
|
|
899
|
+
() => v("ping"),
|
|
900
|
+
pt
|
|
901
|
+
);
|
|
902
|
+
return () => clearInterval(l);
|
|
903
|
+
}, [v]), je(() => {
|
|
904
|
+
if (!c) return;
|
|
905
|
+
const {
|
|
906
|
+
onDeposit: l,
|
|
907
|
+
onTransCode: o,
|
|
908
|
+
onError: a,
|
|
909
|
+
onUpdateMember: i,
|
|
910
|
+
onMaintainNotice: t,
|
|
911
|
+
onMaintainNoticeMember: n,
|
|
912
|
+
onReload: f,
|
|
913
|
+
onTransferInGame: S
|
|
914
|
+
} = g, u = Ce(c, "type", ""), d = {
|
|
915
|
+
memberInfoUid: Ce(c, "member_info_uid", null),
|
|
916
|
+
data: Ce(c, "data", null),
|
|
917
|
+
memo: Ce(c, "memo", null)
|
|
918
|
+
};
|
|
919
|
+
switch (u) {
|
|
920
|
+
case Q.DEPOSIT:
|
|
921
|
+
l?.(d);
|
|
922
|
+
break;
|
|
923
|
+
case Q.TRANS_CODE:
|
|
924
|
+
o?.(d);
|
|
925
|
+
break;
|
|
926
|
+
case Q.ERROR:
|
|
927
|
+
a?.(d);
|
|
928
|
+
break;
|
|
929
|
+
case Q.UPDATE_MEMBER:
|
|
930
|
+
i?.(d);
|
|
931
|
+
break;
|
|
932
|
+
case Q.MAINTAIN_NOTICE:
|
|
933
|
+
t?.(d);
|
|
934
|
+
break;
|
|
935
|
+
case Q.MAINTAIN_NOTICE_MEMBER:
|
|
936
|
+
n?.(d);
|
|
937
|
+
break;
|
|
938
|
+
case Q.RELOAD:
|
|
939
|
+
f?.(d);
|
|
940
|
+
break;
|
|
941
|
+
case Q.TRANSFER_IN_GAME:
|
|
942
|
+
case Q.CHECK_REQUEST:
|
|
943
|
+
S?.(d);
|
|
944
|
+
break;
|
|
945
|
+
default:
|
|
946
|
+
console.warn("Unknown socket type:", u);
|
|
947
|
+
break;
|
|
948
|
+
}
|
|
949
|
+
}, [g, c]), je(() => () => y.current = !0, []), {
|
|
950
|
+
sendMessage: v,
|
|
951
|
+
sendJsonMessage: h,
|
|
952
|
+
readyState: _
|
|
953
|
+
// WebSocket 連線狀態
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
var Ae = { exports: {} }, Se = {};
|
|
75
957
|
/**
|
|
76
958
|
* @license React
|
|
77
959
|
* react-jsx-runtime.production.min.js
|
|
@@ -81,21 +963,21 @@ var q = { exports: {} }, $ = {};
|
|
|
81
963
|
* This source code is licensed under the MIT license found in the
|
|
82
964
|
* LICENSE file in the root directory of this source tree.
|
|
83
965
|
*/
|
|
84
|
-
var
|
|
85
|
-
function
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
var
|
|
89
|
-
function
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
for (
|
|
93
|
-
if (
|
|
94
|
-
return { $$typeof:
|
|
966
|
+
var Tr;
|
|
967
|
+
function Tt() {
|
|
968
|
+
if (Tr) return Se;
|
|
969
|
+
Tr = 1;
|
|
970
|
+
var r = ye, g = Symbol.for("react.element"), O = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, v = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
971
|
+
function E(_, c, l) {
|
|
972
|
+
var o, a = {}, i = null, t = null;
|
|
973
|
+
l !== void 0 && (i = "" + l), c.key !== void 0 && (i = "" + c.key), c.ref !== void 0 && (t = c.ref);
|
|
974
|
+
for (o in c) y.call(c, o) && !h.hasOwnProperty(o) && (a[o] = c[o]);
|
|
975
|
+
if (_ && _.defaultProps) for (o in c = _.defaultProps, c) a[o] === void 0 && (a[o] = c[o]);
|
|
976
|
+
return { $$typeof: g, type: _, key: i, ref: t, props: a, _owner: v.current };
|
|
95
977
|
}
|
|
96
|
-
return
|
|
978
|
+
return Se.Fragment = O, Se.jsx = E, Se.jsxs = E, Se;
|
|
97
979
|
}
|
|
98
|
-
var
|
|
980
|
+
var he = {};
|
|
99
981
|
/**
|
|
100
982
|
* @license React
|
|
101
983
|
* react-jsx-runtime.development.js
|
|
@@ -105,91 +987,91 @@ var W = {};
|
|
|
105
987
|
* This source code is licensed under the MIT license found in the
|
|
106
988
|
* LICENSE file in the root directory of this source tree.
|
|
107
989
|
*/
|
|
108
|
-
var
|
|
109
|
-
function
|
|
110
|
-
return
|
|
111
|
-
var
|
|
112
|
-
function
|
|
990
|
+
var mr;
|
|
991
|
+
function mt() {
|
|
992
|
+
return mr || (mr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
993
|
+
var r = ye, g = Symbol.for("react.element"), O = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), _ = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), o = Symbol.for("react.suspense_list"), a = Symbol.for("react.memo"), i = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), n = Symbol.iterator, f = "@@iterator";
|
|
994
|
+
function S(e) {
|
|
113
995
|
if (e === null || typeof e != "object")
|
|
114
996
|
return null;
|
|
115
|
-
var
|
|
116
|
-
return typeof
|
|
997
|
+
var s = n && e[n] || e[f];
|
|
998
|
+
return typeof s == "function" ? s : null;
|
|
117
999
|
}
|
|
118
|
-
var
|
|
119
|
-
function
|
|
1000
|
+
var u = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1001
|
+
function d(e) {
|
|
120
1002
|
{
|
|
121
|
-
for (var
|
|
122
|
-
|
|
123
|
-
|
|
1003
|
+
for (var s = arguments.length, b = new Array(s > 1 ? s - 1 : 0), p = 1; p < s; p++)
|
|
1004
|
+
b[p - 1] = arguments[p];
|
|
1005
|
+
A("error", e, b);
|
|
124
1006
|
}
|
|
125
1007
|
}
|
|
126
|
-
function
|
|
1008
|
+
function A(e, s, b) {
|
|
127
1009
|
{
|
|
128
|
-
var
|
|
129
|
-
|
|
130
|
-
var
|
|
131
|
-
return String(
|
|
1010
|
+
var p = u.ReactDebugCurrentFrame, C = p.getStackAddendum();
|
|
1011
|
+
C !== "" && (s += "%s", b = b.concat([C]));
|
|
1012
|
+
var P = b.map(function(R) {
|
|
1013
|
+
return String(R);
|
|
132
1014
|
});
|
|
133
|
-
|
|
1015
|
+
P.unshift("Warning: " + s), Function.prototype.apply.call(console[e], console, P);
|
|
134
1016
|
}
|
|
135
1017
|
}
|
|
136
|
-
var
|
|
137
|
-
|
|
138
|
-
function
|
|
139
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
1018
|
+
var M = !1, T = !1, w = !1, k = !1, se = !1, le;
|
|
1019
|
+
le = Symbol.for("react.module.reference");
|
|
1020
|
+
function Pe(e) {
|
|
1021
|
+
return !!(typeof e == "string" || typeof e == "function" || e === y || e === h || se || e === v || e === l || e === o || k || e === t || M || T || w || typeof e == "object" && e !== null && (e.$$typeof === i || e.$$typeof === a || e.$$typeof === E || e.$$typeof === _ || e.$$typeof === c || // This needs to include all possible module reference object
|
|
140
1022
|
// types supported by any Flight configuration anywhere since
|
|
141
1023
|
// we don't know which Flight build this will end up being used
|
|
142
1024
|
// with.
|
|
143
|
-
e.$$typeof ===
|
|
1025
|
+
e.$$typeof === le || e.getModuleId !== void 0));
|
|
144
1026
|
}
|
|
145
|
-
function
|
|
146
|
-
var
|
|
147
|
-
if (
|
|
148
|
-
return
|
|
149
|
-
var
|
|
150
|
-
return
|
|
1027
|
+
function be(e, s, b) {
|
|
1028
|
+
var p = e.displayName;
|
|
1029
|
+
if (p)
|
|
1030
|
+
return p;
|
|
1031
|
+
var C = s.displayName || s.name || "";
|
|
1032
|
+
return C !== "" ? b + "(" + C + ")" : b;
|
|
151
1033
|
}
|
|
152
|
-
function
|
|
1034
|
+
function G(e) {
|
|
153
1035
|
return e.displayName || "Context";
|
|
154
1036
|
}
|
|
155
|
-
function
|
|
1037
|
+
function j(e) {
|
|
156
1038
|
if (e == null)
|
|
157
1039
|
return null;
|
|
158
|
-
if (typeof e.tag == "number" &&
|
|
1040
|
+
if (typeof e.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
159
1041
|
return e.displayName || e.name || null;
|
|
160
1042
|
if (typeof e == "string")
|
|
161
1043
|
return e;
|
|
162
1044
|
switch (e) {
|
|
163
|
-
case
|
|
1045
|
+
case y:
|
|
164
1046
|
return "Fragment";
|
|
165
|
-
case
|
|
1047
|
+
case O:
|
|
166
1048
|
return "Portal";
|
|
167
|
-
case
|
|
1049
|
+
case h:
|
|
168
1050
|
return "Profiler";
|
|
169
|
-
case
|
|
1051
|
+
case v:
|
|
170
1052
|
return "StrictMode";
|
|
171
|
-
case
|
|
1053
|
+
case l:
|
|
172
1054
|
return "Suspense";
|
|
173
|
-
case
|
|
1055
|
+
case o:
|
|
174
1056
|
return "SuspenseList";
|
|
175
1057
|
}
|
|
176
1058
|
if (typeof e == "object")
|
|
177
1059
|
switch (e.$$typeof) {
|
|
1060
|
+
case _:
|
|
1061
|
+
var s = e;
|
|
1062
|
+
return G(s) + ".Consumer";
|
|
1063
|
+
case E:
|
|
1064
|
+
var b = e;
|
|
1065
|
+
return G(b._context) + ".Provider";
|
|
178
1066
|
case c:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return Me(e, e.render, "ForwardRef");
|
|
186
|
-
case T:
|
|
187
|
-
var n = e.displayName || null;
|
|
188
|
-
return n !== null ? n : O(e.type) || "Memo";
|
|
189
|
-
case P: {
|
|
190
|
-
var o = e, u = o._payload, i = o._init;
|
|
1067
|
+
return be(e, e.render, "ForwardRef");
|
|
1068
|
+
case a:
|
|
1069
|
+
var p = e.displayName || null;
|
|
1070
|
+
return p !== null ? p : j(e.type) || "Memo";
|
|
1071
|
+
case i: {
|
|
1072
|
+
var C = e, P = C._payload, R = C._init;
|
|
191
1073
|
try {
|
|
192
|
-
return
|
|
1074
|
+
return j(R(P));
|
|
193
1075
|
} catch {
|
|
194
1076
|
return null;
|
|
195
1077
|
}
|
|
@@ -197,18 +1079,18 @@ function Tr() {
|
|
|
197
1079
|
}
|
|
198
1080
|
return null;
|
|
199
1081
|
}
|
|
200
|
-
var
|
|
201
|
-
function
|
|
1082
|
+
var J = Object.assign, X = 0, $, ge, Oe, D, L, H, fe;
|
|
1083
|
+
function Z() {
|
|
202
1084
|
}
|
|
203
|
-
|
|
204
|
-
function
|
|
1085
|
+
Z.__reactDisabledLog = !0;
|
|
1086
|
+
function z() {
|
|
205
1087
|
{
|
|
206
|
-
if (
|
|
207
|
-
|
|
1088
|
+
if (X === 0) {
|
|
1089
|
+
$ = console.log, ge = console.info, Oe = console.warn, D = console.error, L = console.group, H = console.groupCollapsed, fe = console.groupEnd;
|
|
208
1090
|
var e = {
|
|
209
1091
|
configurable: !0,
|
|
210
1092
|
enumerable: !0,
|
|
211
|
-
value:
|
|
1093
|
+
value: Z,
|
|
212
1094
|
writable: !0
|
|
213
1095
|
};
|
|
214
1096
|
Object.defineProperties(console, {
|
|
@@ -221,332 +1103,332 @@ function Tr() {
|
|
|
221
1103
|
groupEnd: e
|
|
222
1104
|
});
|
|
223
1105
|
}
|
|
224
|
-
|
|
1106
|
+
X++;
|
|
225
1107
|
}
|
|
226
1108
|
}
|
|
227
|
-
function
|
|
1109
|
+
function pe() {
|
|
228
1110
|
{
|
|
229
|
-
if (
|
|
1111
|
+
if (X--, X === 0) {
|
|
230
1112
|
var e = {
|
|
231
1113
|
configurable: !0,
|
|
232
1114
|
enumerable: !0,
|
|
233
1115
|
writable: !0
|
|
234
1116
|
};
|
|
235
1117
|
Object.defineProperties(console, {
|
|
236
|
-
log:
|
|
237
|
-
value:
|
|
1118
|
+
log: J({}, e, {
|
|
1119
|
+
value: $
|
|
238
1120
|
}),
|
|
239
|
-
info:
|
|
240
|
-
value:
|
|
1121
|
+
info: J({}, e, {
|
|
1122
|
+
value: ge
|
|
241
1123
|
}),
|
|
242
|
-
warn:
|
|
243
|
-
value:
|
|
1124
|
+
warn: J({}, e, {
|
|
1125
|
+
value: Oe
|
|
244
1126
|
}),
|
|
245
|
-
error:
|
|
246
|
-
value:
|
|
1127
|
+
error: J({}, e, {
|
|
1128
|
+
value: D
|
|
247
1129
|
}),
|
|
248
|
-
group:
|
|
249
|
-
value:
|
|
1130
|
+
group: J({}, e, {
|
|
1131
|
+
value: L
|
|
250
1132
|
}),
|
|
251
|
-
groupCollapsed:
|
|
252
|
-
value:
|
|
1133
|
+
groupCollapsed: J({}, e, {
|
|
1134
|
+
value: H
|
|
253
1135
|
}),
|
|
254
|
-
groupEnd:
|
|
255
|
-
value:
|
|
1136
|
+
groupEnd: J({}, e, {
|
|
1137
|
+
value: fe
|
|
256
1138
|
})
|
|
257
1139
|
});
|
|
258
1140
|
}
|
|
259
|
-
|
|
1141
|
+
X < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
260
1142
|
}
|
|
261
1143
|
}
|
|
262
|
-
var
|
|
263
|
-
function
|
|
1144
|
+
var ue = u.ReactCurrentDispatcher, Y;
|
|
1145
|
+
function oe(e, s, b) {
|
|
264
1146
|
{
|
|
265
|
-
if (
|
|
1147
|
+
if (Y === void 0)
|
|
266
1148
|
try {
|
|
267
1149
|
throw Error();
|
|
268
|
-
} catch (
|
|
269
|
-
var
|
|
270
|
-
|
|
1150
|
+
} catch (C) {
|
|
1151
|
+
var p = C.stack.trim().match(/\n( *(at )?)/);
|
|
1152
|
+
Y = p && p[1] || "";
|
|
271
1153
|
}
|
|
272
1154
|
return `
|
|
273
|
-
` +
|
|
1155
|
+
` + Y + e;
|
|
274
1156
|
}
|
|
275
1157
|
}
|
|
276
|
-
var
|
|
1158
|
+
var ee = !1, Te;
|
|
277
1159
|
{
|
|
278
|
-
var
|
|
279
|
-
|
|
1160
|
+
var kr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
1161
|
+
Te = new kr();
|
|
280
1162
|
}
|
|
281
|
-
function
|
|
282
|
-
if (!e ||
|
|
1163
|
+
function Be(e, s) {
|
|
1164
|
+
if (!e || ee)
|
|
283
1165
|
return "";
|
|
284
1166
|
{
|
|
285
|
-
var
|
|
286
|
-
if (
|
|
287
|
-
return
|
|
1167
|
+
var b = Te.get(e);
|
|
1168
|
+
if (b !== void 0)
|
|
1169
|
+
return b;
|
|
288
1170
|
}
|
|
289
|
-
var
|
|
290
|
-
|
|
291
|
-
var
|
|
1171
|
+
var p;
|
|
1172
|
+
ee = !0;
|
|
1173
|
+
var C = Error.prepareStackTrace;
|
|
292
1174
|
Error.prepareStackTrace = void 0;
|
|
293
|
-
var
|
|
294
|
-
|
|
1175
|
+
var P;
|
|
1176
|
+
P = ue.current, ue.current = null, z();
|
|
295
1177
|
try {
|
|
296
|
-
if (
|
|
297
|
-
var
|
|
1178
|
+
if (s) {
|
|
1179
|
+
var R = function() {
|
|
298
1180
|
throw Error();
|
|
299
1181
|
};
|
|
300
|
-
if (Object.defineProperty(
|
|
1182
|
+
if (Object.defineProperty(R.prototype, "props", {
|
|
301
1183
|
set: function() {
|
|
302
1184
|
throw Error();
|
|
303
1185
|
}
|
|
304
1186
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
305
1187
|
try {
|
|
306
|
-
Reflect.construct(
|
|
307
|
-
} catch (
|
|
308
|
-
|
|
1188
|
+
Reflect.construct(R, []);
|
|
1189
|
+
} catch (W) {
|
|
1190
|
+
p = W;
|
|
309
1191
|
}
|
|
310
|
-
Reflect.construct(e, [],
|
|
1192
|
+
Reflect.construct(e, [], R);
|
|
311
1193
|
} else {
|
|
312
1194
|
try {
|
|
313
|
-
|
|
314
|
-
} catch (
|
|
315
|
-
|
|
1195
|
+
R.call();
|
|
1196
|
+
} catch (W) {
|
|
1197
|
+
p = W;
|
|
316
1198
|
}
|
|
317
|
-
e.call(
|
|
1199
|
+
e.call(R.prototype);
|
|
318
1200
|
}
|
|
319
1201
|
} else {
|
|
320
1202
|
try {
|
|
321
1203
|
throw Error();
|
|
322
|
-
} catch (
|
|
323
|
-
|
|
1204
|
+
} catch (W) {
|
|
1205
|
+
p = W;
|
|
324
1206
|
}
|
|
325
1207
|
e();
|
|
326
1208
|
}
|
|
327
|
-
} catch (
|
|
328
|
-
if (
|
|
329
|
-
for (var
|
|
330
|
-
`),
|
|
331
|
-
`),
|
|
332
|
-
|
|
333
|
-
for (;
|
|
334
|
-
if (
|
|
335
|
-
if (
|
|
1209
|
+
} catch (W) {
|
|
1210
|
+
if (W && p && typeof W.stack == "string") {
|
|
1211
|
+
for (var m = W.stack.split(`
|
|
1212
|
+
`), U = p.stack.split(`
|
|
1213
|
+
`), N = m.length - 1, I = U.length - 1; N >= 1 && I >= 0 && m[N] !== U[I]; )
|
|
1214
|
+
I--;
|
|
1215
|
+
for (; N >= 1 && I >= 0; N--, I--)
|
|
1216
|
+
if (m[N] !== U[I]) {
|
|
1217
|
+
if (N !== 1 || I !== 1)
|
|
336
1218
|
do
|
|
337
|
-
if (
|
|
338
|
-
var
|
|
339
|
-
` +
|
|
340
|
-
return e.displayName &&
|
|
1219
|
+
if (N--, I--, I < 0 || m[N] !== U[I]) {
|
|
1220
|
+
var q = `
|
|
1221
|
+
` + m[N].replace(" at new ", " at ");
|
|
1222
|
+
return e.displayName && q.includes("<anonymous>") && (q = q.replace("<anonymous>", e.displayName)), typeof e == "function" && Te.set(e, q), q;
|
|
341
1223
|
}
|
|
342
|
-
while (
|
|
1224
|
+
while (N >= 1 && I >= 0);
|
|
343
1225
|
break;
|
|
344
1226
|
}
|
|
345
1227
|
}
|
|
346
1228
|
} finally {
|
|
347
|
-
|
|
1229
|
+
ee = !1, ue.current = P, pe(), Error.prepareStackTrace = C;
|
|
348
1230
|
}
|
|
349
|
-
var
|
|
350
|
-
return typeof e == "function" &&
|
|
1231
|
+
var ie = e ? e.displayName || e.name : "", re = ie ? oe(ie) : "";
|
|
1232
|
+
return typeof e == "function" && Te.set(e, re), re;
|
|
351
1233
|
}
|
|
352
|
-
function
|
|
353
|
-
return
|
|
1234
|
+
function Nr(e, s, b) {
|
|
1235
|
+
return Be(e, !1);
|
|
354
1236
|
}
|
|
355
|
-
function
|
|
356
|
-
var
|
|
357
|
-
return !!(
|
|
1237
|
+
function Ir(e) {
|
|
1238
|
+
var s = e.prototype;
|
|
1239
|
+
return !!(s && s.isReactComponent);
|
|
358
1240
|
}
|
|
359
|
-
function
|
|
1241
|
+
function me(e, s, b) {
|
|
360
1242
|
if (e == null)
|
|
361
1243
|
return "";
|
|
362
1244
|
if (typeof e == "function")
|
|
363
|
-
return
|
|
1245
|
+
return Be(e, Ir(e));
|
|
364
1246
|
if (typeof e == "string")
|
|
365
|
-
return
|
|
1247
|
+
return oe(e);
|
|
366
1248
|
switch (e) {
|
|
367
|
-
case
|
|
368
|
-
return
|
|
369
|
-
case
|
|
370
|
-
return
|
|
1249
|
+
case l:
|
|
1250
|
+
return oe("Suspense");
|
|
1251
|
+
case o:
|
|
1252
|
+
return oe("SuspenseList");
|
|
371
1253
|
}
|
|
372
1254
|
if (typeof e == "object")
|
|
373
1255
|
switch (e.$$typeof) {
|
|
374
|
-
case
|
|
375
|
-
return
|
|
376
|
-
case
|
|
377
|
-
return
|
|
378
|
-
case
|
|
379
|
-
var
|
|
1256
|
+
case c:
|
|
1257
|
+
return Nr(e.render);
|
|
1258
|
+
case a:
|
|
1259
|
+
return me(e.type, s, b);
|
|
1260
|
+
case i: {
|
|
1261
|
+
var p = e, C = p._payload, P = p._init;
|
|
380
1262
|
try {
|
|
381
|
-
return
|
|
1263
|
+
return me(P(C), s, b);
|
|
382
1264
|
} catch {
|
|
383
1265
|
}
|
|
384
1266
|
}
|
|
385
1267
|
}
|
|
386
1268
|
return "";
|
|
387
1269
|
}
|
|
388
|
-
var
|
|
389
|
-
function
|
|
1270
|
+
var ve = Object.prototype.hasOwnProperty, Ke = {}, xe = u.ReactDebugCurrentFrame;
|
|
1271
|
+
function Re(e) {
|
|
390
1272
|
if (e) {
|
|
391
|
-
var
|
|
392
|
-
|
|
1273
|
+
var s = e._owner, b = me(e.type, e._source, s ? s.type : null);
|
|
1274
|
+
xe.setExtraStackFrame(b);
|
|
393
1275
|
} else
|
|
394
|
-
|
|
1276
|
+
xe.setExtraStackFrame(null);
|
|
395
1277
|
}
|
|
396
|
-
function
|
|
1278
|
+
function Mr(e, s, b, p, C) {
|
|
397
1279
|
{
|
|
398
|
-
var
|
|
399
|
-
for (var
|
|
400
|
-
if (
|
|
401
|
-
var
|
|
1280
|
+
var P = Function.call.bind(ve);
|
|
1281
|
+
for (var R in e)
|
|
1282
|
+
if (P(e, R)) {
|
|
1283
|
+
var m = void 0;
|
|
402
1284
|
try {
|
|
403
|
-
if (typeof e[
|
|
404
|
-
var
|
|
405
|
-
throw
|
|
1285
|
+
if (typeof e[R] != "function") {
|
|
1286
|
+
var U = Error((p || "React class") + ": " + b + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
1287
|
+
throw U.name = "Invariant Violation", U;
|
|
406
1288
|
}
|
|
407
|
-
|
|
408
|
-
} catch (
|
|
409
|
-
|
|
1289
|
+
m = e[R](s, R, p, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1290
|
+
} catch (N) {
|
|
1291
|
+
m = N;
|
|
410
1292
|
}
|
|
411
|
-
|
|
1293
|
+
m && !(m instanceof Error) && (Re(C), d("%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", b, R, typeof m), Re(null)), m instanceof Error && !(m.message in Ke) && (Ke[m.message] = !0, Re(C), d("Failed %s type: %s", b, m.message), Re(null));
|
|
412
1294
|
}
|
|
413
1295
|
}
|
|
414
1296
|
}
|
|
415
|
-
var
|
|
416
|
-
function
|
|
417
|
-
return
|
|
1297
|
+
var Dr = Array.isArray;
|
|
1298
|
+
function ke(e) {
|
|
1299
|
+
return Dr(e);
|
|
418
1300
|
}
|
|
419
|
-
function
|
|
1301
|
+
function jr(e) {
|
|
420
1302
|
{
|
|
421
|
-
var
|
|
422
|
-
return
|
|
1303
|
+
var s = typeof Symbol == "function" && Symbol.toStringTag, b = s && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
1304
|
+
return b;
|
|
423
1305
|
}
|
|
424
1306
|
}
|
|
425
|
-
function
|
|
1307
|
+
function Lr(e) {
|
|
426
1308
|
try {
|
|
427
|
-
return
|
|
1309
|
+
return Qe(e), !1;
|
|
428
1310
|
} catch {
|
|
429
1311
|
return !0;
|
|
430
1312
|
}
|
|
431
1313
|
}
|
|
432
|
-
function
|
|
1314
|
+
function Qe(e) {
|
|
433
1315
|
return "" + e;
|
|
434
1316
|
}
|
|
435
|
-
function
|
|
436
|
-
if (
|
|
437
|
-
return
|
|
1317
|
+
function ze(e) {
|
|
1318
|
+
if (Lr(e))
|
|
1319
|
+
return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", jr(e)), Qe(e);
|
|
438
1320
|
}
|
|
439
|
-
var
|
|
1321
|
+
var Xe = u.ReactCurrentOwner, Ur = {
|
|
440
1322
|
key: !0,
|
|
441
1323
|
ref: !0,
|
|
442
1324
|
__self: !0,
|
|
443
1325
|
__source: !0
|
|
444
|
-
},
|
|
445
|
-
function
|
|
446
|
-
if (
|
|
447
|
-
var
|
|
448
|
-
if (
|
|
1326
|
+
}, Ze, er;
|
|
1327
|
+
function Wr(e) {
|
|
1328
|
+
if (ve.call(e, "ref")) {
|
|
1329
|
+
var s = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
1330
|
+
if (s && s.isReactWarning)
|
|
449
1331
|
return !1;
|
|
450
1332
|
}
|
|
451
1333
|
return e.ref !== void 0;
|
|
452
1334
|
}
|
|
453
|
-
function
|
|
454
|
-
if (
|
|
455
|
-
var
|
|
456
|
-
if (
|
|
1335
|
+
function Fr(e) {
|
|
1336
|
+
if (ve.call(e, "key")) {
|
|
1337
|
+
var s = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
1338
|
+
if (s && s.isReactWarning)
|
|
457
1339
|
return !1;
|
|
458
1340
|
}
|
|
459
1341
|
return e.key !== void 0;
|
|
460
1342
|
}
|
|
461
|
-
function
|
|
462
|
-
typeof e.ref == "string" &&
|
|
1343
|
+
function qr(e, s) {
|
|
1344
|
+
typeof e.ref == "string" && Xe.current;
|
|
463
1345
|
}
|
|
464
|
-
function
|
|
1346
|
+
function Jr(e, s) {
|
|
465
1347
|
{
|
|
466
|
-
var
|
|
467
|
-
|
|
1348
|
+
var b = function() {
|
|
1349
|
+
Ze || (Ze = !0, d("%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)", s));
|
|
468
1350
|
};
|
|
469
|
-
|
|
470
|
-
get:
|
|
1351
|
+
b.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
1352
|
+
get: b,
|
|
471
1353
|
configurable: !0
|
|
472
1354
|
});
|
|
473
1355
|
}
|
|
474
1356
|
}
|
|
475
|
-
function
|
|
1357
|
+
function Gr(e, s) {
|
|
476
1358
|
{
|
|
477
|
-
var
|
|
478
|
-
|
|
1359
|
+
var b = function() {
|
|
1360
|
+
er || (er = !0, d("%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)", s));
|
|
479
1361
|
};
|
|
480
|
-
|
|
481
|
-
get:
|
|
1362
|
+
b.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
1363
|
+
get: b,
|
|
482
1364
|
configurable: !0
|
|
483
1365
|
});
|
|
484
1366
|
}
|
|
485
1367
|
}
|
|
486
|
-
var
|
|
487
|
-
var
|
|
1368
|
+
var Vr = function(e, s, b, p, C, P, R) {
|
|
1369
|
+
var m = {
|
|
488
1370
|
// This tag allows us to uniquely identify this as a React Element
|
|
489
|
-
$$typeof:
|
|
1371
|
+
$$typeof: g,
|
|
490
1372
|
// Built-in properties that belong on the element
|
|
491
1373
|
type: e,
|
|
492
|
-
key:
|
|
493
|
-
ref:
|
|
494
|
-
props:
|
|
1374
|
+
key: s,
|
|
1375
|
+
ref: b,
|
|
1376
|
+
props: R,
|
|
495
1377
|
// Record the component responsible for creating this element.
|
|
496
|
-
_owner:
|
|
1378
|
+
_owner: P
|
|
497
1379
|
};
|
|
498
|
-
return
|
|
1380
|
+
return m._store = {}, Object.defineProperty(m._store, "validated", {
|
|
499
1381
|
configurable: !1,
|
|
500
1382
|
enumerable: !1,
|
|
501
1383
|
writable: !0,
|
|
502
1384
|
value: !1
|
|
503
|
-
}), Object.defineProperty(
|
|
1385
|
+
}), Object.defineProperty(m, "_self", {
|
|
504
1386
|
configurable: !1,
|
|
505
1387
|
enumerable: !1,
|
|
506
1388
|
writable: !1,
|
|
507
|
-
value:
|
|
508
|
-
}), Object.defineProperty(
|
|
1389
|
+
value: p
|
|
1390
|
+
}), Object.defineProperty(m, "_source", {
|
|
509
1391
|
configurable: !1,
|
|
510
1392
|
enumerable: !1,
|
|
511
1393
|
writable: !1,
|
|
512
|
-
value:
|
|
513
|
-
}), Object.freeze && (Object.freeze(
|
|
1394
|
+
value: C
|
|
1395
|
+
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
514
1396
|
};
|
|
515
|
-
function
|
|
1397
|
+
function $r(e, s, b, p, C) {
|
|
516
1398
|
{
|
|
517
|
-
var
|
|
518
|
-
|
|
519
|
-
for (
|
|
520
|
-
|
|
1399
|
+
var P, R = {}, m = null, U = null;
|
|
1400
|
+
b !== void 0 && (ze(b), m = "" + b), Fr(s) && (ze(s.key), m = "" + s.key), Wr(s) && (U = s.ref, qr(s, C));
|
|
1401
|
+
for (P in s)
|
|
1402
|
+
ve.call(s, P) && !Ur.hasOwnProperty(P) && (R[P] = s[P]);
|
|
521
1403
|
if (e && e.defaultProps) {
|
|
522
|
-
var
|
|
523
|
-
for (
|
|
524
|
-
|
|
1404
|
+
var N = e.defaultProps;
|
|
1405
|
+
for (P in N)
|
|
1406
|
+
R[P] === void 0 && (R[P] = N[P]);
|
|
525
1407
|
}
|
|
526
|
-
if (
|
|
527
|
-
var
|
|
528
|
-
|
|
1408
|
+
if (m || U) {
|
|
1409
|
+
var I = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
1410
|
+
m && Jr(R, I), U && Gr(R, I);
|
|
529
1411
|
}
|
|
530
|
-
return
|
|
1412
|
+
return Vr(e, m, U, C, p, Xe.current, R);
|
|
531
1413
|
}
|
|
532
1414
|
}
|
|
533
|
-
var
|
|
534
|
-
function
|
|
1415
|
+
var Ne = u.ReactCurrentOwner, rr = u.ReactDebugCurrentFrame;
|
|
1416
|
+
function ce(e) {
|
|
535
1417
|
if (e) {
|
|
536
|
-
var
|
|
537
|
-
|
|
1418
|
+
var s = e._owner, b = me(e.type, e._source, s ? s.type : null);
|
|
1419
|
+
rr.setExtraStackFrame(b);
|
|
538
1420
|
} else
|
|
539
|
-
|
|
1421
|
+
rr.setExtraStackFrame(null);
|
|
540
1422
|
}
|
|
541
|
-
var
|
|
542
|
-
|
|
543
|
-
function
|
|
544
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
1423
|
+
var Ie;
|
|
1424
|
+
Ie = !1;
|
|
1425
|
+
function Me(e) {
|
|
1426
|
+
return typeof e == "object" && e !== null && e.$$typeof === g;
|
|
545
1427
|
}
|
|
546
|
-
function
|
|
1428
|
+
function tr() {
|
|
547
1429
|
{
|
|
548
|
-
if (
|
|
549
|
-
var e =
|
|
1430
|
+
if (Ne.current) {
|
|
1431
|
+
var e = j(Ne.current.type);
|
|
550
1432
|
if (e)
|
|
551
1433
|
return `
|
|
552
1434
|
|
|
@@ -555,154 +1437,154 @@ Check the render method of \`` + e + "`.";
|
|
|
555
1437
|
return "";
|
|
556
1438
|
}
|
|
557
1439
|
}
|
|
558
|
-
function
|
|
1440
|
+
function Hr(e) {
|
|
559
1441
|
return "";
|
|
560
1442
|
}
|
|
561
|
-
var
|
|
562
|
-
function
|
|
1443
|
+
var nr = {};
|
|
1444
|
+
function Yr(e) {
|
|
563
1445
|
{
|
|
564
|
-
var
|
|
565
|
-
if (!
|
|
566
|
-
var
|
|
567
|
-
|
|
1446
|
+
var s = tr();
|
|
1447
|
+
if (!s) {
|
|
1448
|
+
var b = typeof e == "string" ? e : e.displayName || e.name;
|
|
1449
|
+
b && (s = `
|
|
568
1450
|
|
|
569
|
-
Check the top-level render call using <` +
|
|
1451
|
+
Check the top-level render call using <` + b + ">.");
|
|
570
1452
|
}
|
|
571
|
-
return
|
|
1453
|
+
return s;
|
|
572
1454
|
}
|
|
573
1455
|
}
|
|
574
|
-
function
|
|
1456
|
+
function ar(e, s) {
|
|
575
1457
|
{
|
|
576
1458
|
if (!e._store || e._store.validated || e.key != null)
|
|
577
1459
|
return;
|
|
578
1460
|
e._store.validated = !0;
|
|
579
|
-
var
|
|
580
|
-
if (
|
|
1461
|
+
var b = Yr(s);
|
|
1462
|
+
if (nr[b])
|
|
581
1463
|
return;
|
|
582
|
-
|
|
583
|
-
var
|
|
584
|
-
e && e._owner && e._owner !==
|
|
1464
|
+
nr[b] = !0;
|
|
1465
|
+
var p = "";
|
|
1466
|
+
e && e._owner && e._owner !== Ne.current && (p = " It was passed a child from " + j(e._owner.type) + "."), ce(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, p), ce(null);
|
|
585
1467
|
}
|
|
586
1468
|
}
|
|
587
|
-
function
|
|
1469
|
+
function ur(e, s) {
|
|
588
1470
|
{
|
|
589
1471
|
if (typeof e != "object")
|
|
590
1472
|
return;
|
|
591
|
-
if (
|
|
592
|
-
for (var
|
|
593
|
-
var
|
|
594
|
-
|
|
1473
|
+
if (ke(e))
|
|
1474
|
+
for (var b = 0; b < e.length; b++) {
|
|
1475
|
+
var p = e[b];
|
|
1476
|
+
Me(p) && ar(p, s);
|
|
595
1477
|
}
|
|
596
|
-
else if (
|
|
1478
|
+
else if (Me(e))
|
|
597
1479
|
e._store && (e._store.validated = !0);
|
|
598
1480
|
else if (e) {
|
|
599
|
-
var
|
|
600
|
-
if (typeof
|
|
601
|
-
for (var
|
|
602
|
-
|
|
1481
|
+
var C = S(e);
|
|
1482
|
+
if (typeof C == "function" && C !== e.entries)
|
|
1483
|
+
for (var P = C.call(e), R; !(R = P.next()).done; )
|
|
1484
|
+
Me(R.value) && ar(R.value, s);
|
|
603
1485
|
}
|
|
604
1486
|
}
|
|
605
1487
|
}
|
|
606
|
-
function
|
|
1488
|
+
function Br(e) {
|
|
607
1489
|
{
|
|
608
|
-
var
|
|
609
|
-
if (
|
|
1490
|
+
var s = e.type;
|
|
1491
|
+
if (s == null || typeof s == "string")
|
|
610
1492
|
return;
|
|
611
|
-
var
|
|
612
|
-
if (typeof
|
|
613
|
-
|
|
614
|
-
else if (typeof
|
|
1493
|
+
var b;
|
|
1494
|
+
if (typeof s == "function")
|
|
1495
|
+
b = s.propTypes;
|
|
1496
|
+
else if (typeof s == "object" && (s.$$typeof === c || // Note: Memo only checks outer props here.
|
|
615
1497
|
// Inner props are checked in the reconciler.
|
|
616
|
-
|
|
617
|
-
|
|
1498
|
+
s.$$typeof === a))
|
|
1499
|
+
b = s.propTypes;
|
|
618
1500
|
else
|
|
619
1501
|
return;
|
|
620
|
-
if (
|
|
621
|
-
var
|
|
622
|
-
|
|
623
|
-
} else if (
|
|
624
|
-
|
|
625
|
-
var
|
|
626
|
-
|
|
1502
|
+
if (b) {
|
|
1503
|
+
var p = j(s);
|
|
1504
|
+
Mr(b, e.props, "prop", p, e);
|
|
1505
|
+
} else if (s.PropTypes !== void 0 && !Ie) {
|
|
1506
|
+
Ie = !0;
|
|
1507
|
+
var C = j(s);
|
|
1508
|
+
d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
|
|
627
1509
|
}
|
|
628
|
-
typeof
|
|
1510
|
+
typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
629
1511
|
}
|
|
630
1512
|
}
|
|
631
|
-
function
|
|
1513
|
+
function Kr(e) {
|
|
632
1514
|
{
|
|
633
|
-
for (var
|
|
634
|
-
var
|
|
635
|
-
if (
|
|
636
|
-
|
|
1515
|
+
for (var s = Object.keys(e.props), b = 0; b < s.length; b++) {
|
|
1516
|
+
var p = s[b];
|
|
1517
|
+
if (p !== "children" && p !== "key") {
|
|
1518
|
+
ce(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), ce(null);
|
|
637
1519
|
break;
|
|
638
1520
|
}
|
|
639
1521
|
}
|
|
640
|
-
e.ref !== null && (
|
|
1522
|
+
e.ref !== null && (ce(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), ce(null));
|
|
641
1523
|
}
|
|
642
1524
|
}
|
|
643
|
-
var
|
|
644
|
-
function
|
|
1525
|
+
var or = {};
|
|
1526
|
+
function cr(e, s, b, p, C, P) {
|
|
645
1527
|
{
|
|
646
|
-
var
|
|
647
|
-
if (!
|
|
648
|
-
var
|
|
649
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
650
|
-
var
|
|
651
|
-
|
|
652
|
-
var
|
|
653
|
-
e === null ?
|
|
1528
|
+
var R = Pe(e);
|
|
1529
|
+
if (!R) {
|
|
1530
|
+
var m = "";
|
|
1531
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).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.");
|
|
1532
|
+
var U = Hr();
|
|
1533
|
+
U ? m += U : m += tr();
|
|
1534
|
+
var N;
|
|
1535
|
+
e === null ? N = "null" : ke(e) ? N = "array" : e !== void 0 && e.$$typeof === g ? (N = "<" + (j(e.type) || "Unknown") + " />", m = " Did you accidentally export a JSX literal instead of a component?") : N = typeof e, d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, m);
|
|
654
1536
|
}
|
|
655
|
-
var
|
|
656
|
-
if (
|
|
657
|
-
return
|
|
658
|
-
if (
|
|
659
|
-
var
|
|
660
|
-
if (
|
|
661
|
-
if (
|
|
662
|
-
if (
|
|
663
|
-
for (var
|
|
664
|
-
|
|
665
|
-
Object.freeze && Object.freeze(
|
|
1537
|
+
var I = $r(e, s, b, C, P);
|
|
1538
|
+
if (I == null)
|
|
1539
|
+
return I;
|
|
1540
|
+
if (R) {
|
|
1541
|
+
var q = s.children;
|
|
1542
|
+
if (q !== void 0)
|
|
1543
|
+
if (p)
|
|
1544
|
+
if (ke(q)) {
|
|
1545
|
+
for (var ie = 0; ie < q.length; ie++)
|
|
1546
|
+
ur(q[ie], e);
|
|
1547
|
+
Object.freeze && Object.freeze(q);
|
|
666
1548
|
} else
|
|
667
|
-
|
|
1549
|
+
d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
668
1550
|
else
|
|
669
|
-
|
|
1551
|
+
ur(q, e);
|
|
670
1552
|
}
|
|
671
|
-
if (
|
|
672
|
-
var
|
|
673
|
-
return
|
|
674
|
-
}),
|
|
675
|
-
if (!
|
|
676
|
-
var
|
|
677
|
-
|
|
1553
|
+
if (ve.call(s, "key")) {
|
|
1554
|
+
var re = j(e), W = Object.keys(s).filter(function(et) {
|
|
1555
|
+
return et !== "key";
|
|
1556
|
+
}), De = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
1557
|
+
if (!or[re + De]) {
|
|
1558
|
+
var Zr = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
|
|
1559
|
+
d(`A props object containing a "key" prop is being spread into JSX:
|
|
678
1560
|
let props = %s;
|
|
679
1561
|
<%s {...props} />
|
|
680
1562
|
React keys must be passed directly to JSX without using spread:
|
|
681
1563
|
let props = %s;
|
|
682
|
-
<%s key={someKey} {...props} />`,
|
|
1564
|
+
<%s key={someKey} {...props} />`, De, re, Zr, re), or[re + De] = !0;
|
|
683
1565
|
}
|
|
684
1566
|
}
|
|
685
|
-
return e ===
|
|
1567
|
+
return e === y ? Kr(I) : Br(I), I;
|
|
686
1568
|
}
|
|
687
1569
|
}
|
|
688
|
-
function
|
|
689
|
-
return
|
|
1570
|
+
function xr(e, s, b) {
|
|
1571
|
+
return cr(e, s, b, !0);
|
|
690
1572
|
}
|
|
691
|
-
function
|
|
692
|
-
return
|
|
1573
|
+
function Qr(e, s, b) {
|
|
1574
|
+
return cr(e, s, b, !1);
|
|
693
1575
|
}
|
|
694
|
-
var
|
|
695
|
-
|
|
696
|
-
})()),
|
|
1576
|
+
var zr = Qr, Xr = xr;
|
|
1577
|
+
he.Fragment = y, he.jsx = zr, he.jsxs = Xr;
|
|
1578
|
+
})()), he;
|
|
697
1579
|
}
|
|
698
|
-
var
|
|
699
|
-
function
|
|
700
|
-
return
|
|
1580
|
+
var Rr;
|
|
1581
|
+
function Rt() {
|
|
1582
|
+
return Rr || (Rr = 1, process.env.NODE_ENV === "production" ? Ae.exports = Tt() : Ae.exports = mt()), Ae.exports;
|
|
701
1583
|
}
|
|
702
|
-
var
|
|
703
|
-
function
|
|
704
|
-
const
|
|
705
|
-
() => new
|
|
1584
|
+
var Cr = Rt();
|
|
1585
|
+
function Mt({ children: r, ...g }) {
|
|
1586
|
+
const O = Je(() => st(g), [g]), v = Je(
|
|
1587
|
+
() => new tt({
|
|
706
1588
|
defaultOptions: {
|
|
707
1589
|
queries: {
|
|
708
1590
|
refetchOnWindowFocus: !1,
|
|
@@ -712,11 +1594,12 @@ function jr({ children: s, ...p }) {
|
|
|
712
1594
|
}),
|
|
713
1595
|
[]
|
|
714
1596
|
);
|
|
715
|
-
return /* @__PURE__ */
|
|
1597
|
+
return /* @__PURE__ */ Cr.jsx(nt, { client: v, children: /* @__PURE__ */ Cr.jsx(wr.Provider, { value: { client: O, ...g }, children: r }) });
|
|
716
1598
|
}
|
|
717
1599
|
export {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
1600
|
+
wr as ApiCtx,
|
|
1601
|
+
Mt as ApiProvider,
|
|
1602
|
+
Ar as useApiContext,
|
|
1603
|
+
It as useClientWebSocket,
|
|
1604
|
+
Nt as usePeriodicDataUpdater
|
|
722
1605
|
};
|