@opentiny/agent 0.3.3 → 0.3.4
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/LICENSE +0 -0
- package/README.md +97 -3
- package/index.d.ts +14 -3
- package/index.js +839 -827
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,1087 +1,1098 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _0x42bb3b from "jsonwebtoken";
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
4
4
|
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
|
|
5
5
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
6
6
|
import { JSONRPCMessageSchema, EmptyResultSchema, ElicitResultSchema, CreateMessageResultSchema, ListRootsResultSchema, isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import _0x310cf0 from "cors";
|
|
8
|
+
import _0x5cd98a from "express";
|
|
9
9
|
import { getOAuthProtectedResourceMetadataUrl, createOAuthMetadata, mcpAuthRouter } from "@modelcontextprotocol/sdk/server/auth/router.js";
|
|
10
10
|
import { checkResourceAllowed } from "@modelcontextprotocol/sdk/shared/auth-utils.js";
|
|
11
11
|
import { requireBearerAuth } from "@modelcontextprotocol/sdk/server/auth/middleware/bearerAuth.js";
|
|
12
12
|
import { allowedMethods } from "@modelcontextprotocol/sdk/server/auth/middleware/allowedMethods.js";
|
|
13
13
|
import { InvalidGrantError, InvalidTokenError } from "@modelcontextprotocol/sdk/server/auth/errors.js";
|
|
14
|
-
const
|
|
15
|
-
(function(
|
|
16
|
-
const
|
|
14
|
+
const _0x2891c6 = _0x3dac;
|
|
15
|
+
(function(_0x332e45, _0x27c64c) {
|
|
16
|
+
const _0x1b32d0 = _0x3dac, _0x27f092 = _0x3dac, _0x352d37 = _0x332e45();
|
|
17
17
|
while (!![]) {
|
|
18
18
|
try {
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
else
|
|
22
|
-
} catch (
|
|
23
|
-
|
|
19
|
+
const _0x24b621 = parseInt(_0x1b32d0(490)) / (643 * -11 + 4739 + 2335) + parseInt(_0x27f092(479)) / (7659 + 547 * -1 + -7110) + parseInt(_0x1b32d0(483)) / (-581 * 14 + 1 * -8503 + 16640) + parseInt(_0x27f092(492)) / (1338 * -3 + 6438 + -2420) + -parseInt(_0x27f092(485)) / (-5641 * -1 + -2755 + -2881) + parseInt(_0x1b32d0(484)) / (-31 * 218 + 3019 + -1 * -3745) * (-parseInt(_0x1b32d0(493)) / (-1002 * 1 + 689 + 320)) + -parseInt(_0x1b32d0(489)) / (239 * 7 + 8439 + -10104);
|
|
20
|
+
if (_0x24b621 === _0x27c64c) break;
|
|
21
|
+
else _0x352d37["push"](_0x352d37["shift"]());
|
|
22
|
+
} catch (_0xebda2e) {
|
|
23
|
+
_0x352d37["push"](_0x352d37["shift"]());
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
})(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
})(_0x3533, 3049 * -69 + 709411 + 1 * -57557);
|
|
27
|
+
const SUBPROTOCOL = "mcp";
|
|
28
|
+
function _0x3dac(_0x4d1ee5, _0x42e258) {
|
|
29
|
+
const _0x5de25c = _0x3533();
|
|
30
|
+
return _0x3dac = function(_0x31d554, _0x48d1d2) {
|
|
31
|
+
_0x31d554 = _0x31d554 - (3 * 2846 + 4146 + -12208);
|
|
32
|
+
let _0x4c57f4 = _0x5de25c[_0x31d554];
|
|
33
|
+
return _0x4c57f4;
|
|
34
|
+
}, _0x3dac(_0x4d1ee5, _0x42e258);
|
|
34
35
|
}
|
|
35
|
-
function _0x3d3a() {
|
|
36
|
-
const _0x1753f6 = ["5IPOFFa", "798WVzKmk", "message", "send", "1003048CrcRiX", "toString", "close", "onerror", "FWfnP", "vkfvw", "24638427mIoURR", "1794792xxYZSS", "333176JjQIRT", "2016036NHXzDh", "nmmli", "protocol", "_socket", "mcp", "error", "55536eLxIwF", "6576faqCII"];
|
|
37
|
-
_0x3d3a = function() {
|
|
38
|
-
return _0x1753f6;
|
|
39
|
-
};
|
|
40
|
-
return _0x3d3a();
|
|
41
|
-
}
|
|
42
|
-
const SUBPROTOCOL = _0x57ef6f(502);
|
|
43
36
|
class WebSocketServerTransport {
|
|
44
|
-
constructor(
|
|
45
|
-
|
|
37
|
+
constructor(_0x4f3ce8) {
|
|
38
|
+
const _0x34b022 = _0x3dac;
|
|
39
|
+
this[_0x34b022(488)] = _0x4f3ce8;
|
|
46
40
|
}
|
|
47
41
|
async ["start"]() {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
const _0x56f695 = _0x3dac, _0x4d0111 = _0x3dac, _0x3e06a9 = {};
|
|
43
|
+
_0x3e06a9[_0x56f695(491)] = function(_0x5ba5f7, _0x24bd08) {
|
|
44
|
+
return _0x5ba5f7 !== _0x24bd08;
|
|
45
|
+
}, _0x3e06a9[_0x56f695(480)] = _0x56f695(477), _0x3e06a9["SmXiv"] = "close", _0x3e06a9["hQRmC"] = "message";
|
|
46
|
+
const _0x2ab248 = _0x3e06a9;
|
|
51
47
|
if (!this["_socket"]) return;
|
|
52
|
-
if (this[
|
|
53
|
-
this[
|
|
48
|
+
if (_0x2ab248["JMmdJ"](this["_socket"][_0x4d0111(487)], SUBPROTOCOL)) {
|
|
49
|
+
this["_socket"][_0x56f695(476)](1752 * -1 + 491 * -2 + 3736, "Unsupported websocket subprotocol");
|
|
54
50
|
return;
|
|
55
51
|
}
|
|
56
|
-
this["_socket"]["on"](
|
|
52
|
+
this["_socket"]["on"](_0x2ab248["EKPiV"], (_0x11c63f) => {
|
|
57
53
|
var _a;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}), this["_socket"]["on"]("close", () => {
|
|
54
|
+
(_a = this["onerror"]) == null ? void 0 : _a.call(this, _0x11c63f);
|
|
55
|
+
}), this["_socket"]["on"](_0x2ab248["SmXiv"], () => {
|
|
61
56
|
var _a;
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
const _0x1c1c36 = _0x56f695;
|
|
58
|
+
this[_0x1c1c36(488)] = void 0, (_a = this["onclose"]) == null ? void 0 : _a.call(this);
|
|
59
|
+
}), this["_socket"]["on"](_0x2ab248["hQRmC"], (_0x2d2a5d) => {
|
|
64
60
|
var _a, _b;
|
|
65
|
-
const
|
|
66
|
-
let
|
|
61
|
+
const _0x47d433 = _0x4d0111, _0x500ffa = _0x4d0111;
|
|
62
|
+
let _0x3a3905;
|
|
67
63
|
try {
|
|
68
|
-
|
|
69
|
-
} catch (
|
|
70
|
-
(_a = this[
|
|
64
|
+
_0x3a3905 = JSONRPCMessageSchema[_0x47d433(478)](JSON["parse"](_0x2d2a5d[_0x500ffa(482)]()));
|
|
65
|
+
} catch (_0x3151f4) {
|
|
66
|
+
(_a = this["onerror"]) == null ? void 0 : _a.call(this, _0x3151f4);
|
|
71
67
|
return;
|
|
72
68
|
}
|
|
73
|
-
(_b = this[
|
|
69
|
+
(_b = this[_0x47d433(481)]) == null ? void 0 : _b.call(this, _0x3a3905);
|
|
74
70
|
});
|
|
75
71
|
}
|
|
76
|
-
async [
|
|
72
|
+
async [_0x2891c6(476)]() {
|
|
77
73
|
var _a;
|
|
78
|
-
|
|
74
|
+
const _0x408e37 = _0x2891c6, _0x13d168 = _0x2891c6;
|
|
75
|
+
(_a = this[_0x408e37(488)]) == null ? void 0 : _a[_0x13d168(476)]();
|
|
79
76
|
}
|
|
80
|
-
[
|
|
81
|
-
const
|
|
82
|
-
return
|
|
83
|
-
}, "
|
|
84
|
-
return
|
|
77
|
+
[_0x2891c6(494)](_0x495886) {
|
|
78
|
+
const _0x5683ef = { "YJyZD": function(_0x304fc0, _0xe8bf91) {
|
|
79
|
+
return _0x304fc0(_0xe8bf91);
|
|
80
|
+
}, "TxKcd": "Not connected", "zOrNR": function(_0x4cdc77) {
|
|
81
|
+
return _0x4cdc77();
|
|
85
82
|
} };
|
|
86
|
-
return new Promise((
|
|
83
|
+
return new Promise((_0x1ab727, _0xd1e4bb) => {
|
|
87
84
|
var _a;
|
|
88
|
-
const
|
|
85
|
+
const _0x21b2ff = _0x3dac;
|
|
89
86
|
if (!this["_socket"]) {
|
|
90
|
-
|
|
87
|
+
_0x5683ef["YJyZD"](_0xd1e4bb, new Error(_0x5683ef[_0x21b2ff(486)]));
|
|
91
88
|
return;
|
|
92
89
|
}
|
|
93
|
-
(_a = this[
|
|
90
|
+
(_a = this["_socket"]) == null ? void 0 : _a[_0x21b2ff(494)](JSON[_0x21b2ff(495)](_0x495886)), _0x5683ef["zOrNR"](_0x1ab727);
|
|
94
91
|
});
|
|
95
92
|
}
|
|
96
93
|
}
|
|
97
|
-
function
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
return
|
|
94
|
+
function _0x3533() {
|
|
95
|
+
const _0x44f907 = ["356565GiPzgN", "JMmdJ", "1498940hVnlBx", "4295053dxdaHi", "send", "stringify", "close", "error", "parse", "1239054eqBjwD", "EKPiV", "onmessage", "toString", "2110668CEyjwG", "6FYZHXb", "1542420FAtsvs", "TxKcd", "protocol", "_socket", "5526776XaQyWR"];
|
|
96
|
+
_0x3533 = function() {
|
|
97
|
+
return _0x44f907;
|
|
101
98
|
};
|
|
102
|
-
return
|
|
99
|
+
return _0x3533();
|
|
103
100
|
}
|
|
104
|
-
(function(
|
|
105
|
-
const
|
|
101
|
+
(function(_0x176bdd, _0x56bfdd) {
|
|
102
|
+
const _0x387f6e = _0x1181, _0x46c97b = _0x1181, _0x490dd9 = _0x176bdd();
|
|
106
103
|
while (!![]) {
|
|
107
104
|
try {
|
|
108
|
-
const
|
|
109
|
-
if (
|
|
110
|
-
else
|
|
111
|
-
} catch (
|
|
112
|
-
|
|
105
|
+
const _0x4d5b93 = -parseInt(_0x387f6e(339)) / (8039 + 5219 + -13257) * (-parseInt(_0x387f6e(405)) / (700 * 2 + 1875 * -1 + -53 * -9)) + -parseInt(_0x46c97b(343)) / (5144 + -2040 * 1 + -443 * 7) + -parseInt(_0x387f6e(383)) / (848 * 5 + 6294 + -54 * 195) * (parseInt(_0x46c97b(385)) / (926 + 1994 * 2 + -4909)) + -parseInt(_0x46c97b(337)) / (2041 + -9639 + 7604) * (parseInt(_0x387f6e(420)) / (761 + -4391 + -3637 * -1)) + parseInt(_0x46c97b(361)) / (9 * -579 + -1 * -4637 + -291 * -2) * (parseInt(_0x387f6e(412)) / (1 * 5938 + -7351 + 158 * 9)) + parseInt(_0x46c97b(358)) / (5483 + -5550 + 11 * 7) * (parseInt(_0x387f6e(364)) / (-67 * 1 + 2488 + -2410)) + parseInt(_0x387f6e(330)) / (2500 + -8457 + 5969) * (-parseInt(_0x46c97b(377)) / (-6263 + 8845 + -367 * 7));
|
|
106
|
+
if (_0x4d5b93 === _0x56bfdd) break;
|
|
107
|
+
else _0x490dd9["push"](_0x490dd9["shift"]());
|
|
108
|
+
} catch (_0x568109) {
|
|
109
|
+
_0x490dd9["push"](_0x490dd9["shift"]());
|
|
113
110
|
}
|
|
114
111
|
}
|
|
115
|
-
})(
|
|
116
|
-
|
|
112
|
+
})(_0x19ad, -3 * 487523 + -927748 + 3175987 * 1);
|
|
113
|
+
function _0x19ad() {
|
|
114
|
+
const _0x54a468 = ["removeResponseListener", "QqcZC", "get", "20SKJNGJ", "notifications/cancelled", "complete", "70184euqRDS", "jsonrpc", "addResponseListener", "5603851wxWhAo", "initialize", "EvGJT", "EPDgC", "Tjglr", "awyWl", "resources/subscribe", "xuySB", "_onrequest", "name", "OsntO", "prompts/list", "elicitation/create", "334711pfAseH", "addNotificationListener", "params", "KYLcN", "CevKb", "lwlhr", "6388TimbFA", "ZQTJd", "45BVKBYz", "indexOf", "addRequestListener", "transport", "level", "splice", "send", "completion/complete", "logging/setLevel", "gzXMQ", "_onresponse", "notifications/initialized", "setLoggingLevel", "removeNotificationListener", "handleListener", "roots/list", "MsQKG", "PwoZn", "2.0", "_requestHandlers", "8CMMYQS", "method", "jFgAA", "call", "zgMtg", "resources/list", "callTool", "1575JzqyMP", "length", "push", "listResourceTemplates", "LQlBY", "request", "error", "removeListener", "10661lWHBHG", "originalOnResponse", "result", "JGSLT", "900qmHDum", "clear", "LUzBE", "JqaEZ", "ZgDoK", "clearResponseListener", "tools/list", "2454kjcfpQ", "unsubscribeResource", "341615mqkABV", "AIQzg", "Yjaln", "bsFTc", "1699926JCRyGF", "onerror", "prompts/get", "addListener", "KHwEl", "IIDFo", "function", "eiTfc", "code", "message", "fallbackRequestHandler", "listPrompts"];
|
|
115
|
+
_0x19ad = function() {
|
|
116
|
+
return _0x54a468;
|
|
117
|
+
};
|
|
118
|
+
return _0x19ad();
|
|
119
|
+
}
|
|
120
|
+
const forwardServerRequest = async (_0x1eb6c0, _0x4cef98, _0xb59f9f) => {
|
|
117
121
|
var _a;
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
let
|
|
122
|
-
switch (
|
|
123
|
-
case
|
|
124
|
-
|
|
122
|
+
const _0x186e82 = _0x1181, _0x31ffb1 = _0x1181, _0x1b4ae5 = {};
|
|
123
|
+
_0x1b4ae5[_0x186e82(347)] = _0x186e82(336), _0x1b4ae5[_0x186e82(407)] = "tools/call", _0x1b4ae5[_0x186e82(401)] = _0x31ffb1(410), _0x1b4ae5["KYLcN"] = "resources/read", _0x1b4ae5["DsuFc"] = _0x186e82(370), _0x1b4ae5[_0x186e82(368)] = "resources/unsubscribe", _0x1b4ae5["GYqRq"] = _0x31ffb1(375), _0x1b4ae5["ZgDoK"] = _0x31ffb1(392), _0x1b4ae5[_0x186e82(340)] = _0x186e82(403);
|
|
124
|
+
const _0x5498bb = _0x1b4ae5, { id: _0x45a87a, method: _0xfd1956, params: _0x2448d8 } = _0xb59f9f;
|
|
125
|
+
let _0x1b5fe6 = {};
|
|
126
|
+
switch (_0xfd1956) {
|
|
127
|
+
case _0x5498bb[_0x31ffb1(347)]:
|
|
128
|
+
_0x1b5fe6 = await _0x4cef98["listTools"](_0x2448d8);
|
|
125
129
|
break;
|
|
126
|
-
case
|
|
127
|
-
|
|
130
|
+
case _0x5498bb["jFgAA"]:
|
|
131
|
+
_0x1b5fe6 = await _0x4cef98[_0x186e82(411)](_0x2448d8);
|
|
128
132
|
break;
|
|
129
|
-
case
|
|
130
|
-
|
|
133
|
+
case _0x5498bb[_0x31ffb1(401)]:
|
|
134
|
+
_0x1b5fe6 = await _0x4cef98["listResources"](_0x2448d8);
|
|
131
135
|
break;
|
|
132
|
-
case
|
|
133
|
-
|
|
136
|
+
case "resources/templates/list":
|
|
137
|
+
_0x1b5fe6 = await _0x4cef98[_0x31ffb1(415)](_0x2448d8);
|
|
134
138
|
break;
|
|
135
|
-
case
|
|
136
|
-
|
|
139
|
+
case _0x5498bb[_0x186e82(380)]:
|
|
140
|
+
_0x1b5fe6 = await _0x4cef98["readResource"](_0x2448d8);
|
|
137
141
|
break;
|
|
138
|
-
case "
|
|
139
|
-
|
|
142
|
+
case _0x5498bb["DsuFc"]:
|
|
143
|
+
_0x1b5fe6 = await _0x4cef98["subscribeResource"](_0x2448d8);
|
|
140
144
|
break;
|
|
141
|
-
case "
|
|
142
|
-
|
|
145
|
+
case _0x5498bb["Tjglr"]:
|
|
146
|
+
_0x1b5fe6 = await _0x4cef98[_0x31ffb1(338)](_0x2448d8);
|
|
143
147
|
break;
|
|
144
|
-
case
|
|
145
|
-
|
|
148
|
+
case _0x31ffb1(345):
|
|
149
|
+
_0x1b5fe6 = await _0x4cef98["getPrompt"](_0x2448d8);
|
|
146
150
|
break;
|
|
147
|
-
case
|
|
148
|
-
|
|
151
|
+
case _0x5498bb["GYqRq"]:
|
|
152
|
+
_0x1b5fe6 = await _0x4cef98[_0x31ffb1(354)](_0x2448d8);
|
|
149
153
|
break;
|
|
150
|
-
case
|
|
151
|
-
|
|
154
|
+
case "ping":
|
|
155
|
+
_0x1b5fe6 = await _0x4cef98["ping"]();
|
|
152
156
|
break;
|
|
153
|
-
case
|
|
154
|
-
|
|
157
|
+
case _0x5498bb[_0x186e82(334)]:
|
|
158
|
+
_0x1b5fe6 = await _0x4cef98[_0x31ffb1(360)](_0x2448d8);
|
|
155
159
|
break;
|
|
156
|
-
case
|
|
157
|
-
|
|
160
|
+
case _0x186e82(393):
|
|
161
|
+
_0x1b5fe6 = await _0x4cef98[_0x186e82(397)](_0x2448d8 == null ? void 0 : _0x2448d8[_0x186e82(389)]);
|
|
158
162
|
break;
|
|
159
163
|
}
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
}, forwardClientRequest = async (
|
|
164
|
+
const _0x39df96 = {};
|
|
165
|
+
_0x39df96[_0x186e82(328)] = _0x1b5fe6, _0x39df96[_0x186e82(362)] = _0x5498bb[_0x31ffb1(340)], _0x39df96["id"] = _0x45a87a, await ((_a = _0x1eb6c0 == null ? void 0 : _0x1eb6c0[_0x31ffb1(388)]) == null ? void 0 : _a[_0x186e82(391)](_0x39df96));
|
|
166
|
+
}, forwardClientRequest = async (_0x5664c1, _0x21c65c, _0x31a2df) => {
|
|
163
167
|
var _a;
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
const
|
|
167
|
-
let
|
|
168
|
-
switch (
|
|
169
|
-
case
|
|
170
|
-
const
|
|
171
|
-
|
|
168
|
+
const _0x563101 = _0x1181, _0x1d2a33 = _0x1181, _0xacb82a = {};
|
|
169
|
+
_0xacb82a["IIDFo"] = _0x563101(400), _0xacb82a[_0x563101(369)] = "sampling/createMessage", _0xacb82a["gzXMQ"] = _0x1d2a33(376), _0xacb82a["OsntO"] = "ping", _0xacb82a["xuySB"] = "2.0";
|
|
170
|
+
const _0x121fcc = _0xacb82a, { id: _0x537b65, method: _0xa1b4, params: _0x3f3a25 } = _0x31a2df;
|
|
171
|
+
let _0x509dc6 = {};
|
|
172
|
+
switch (_0xa1b4) {
|
|
173
|
+
case _0x121fcc[_0x563101(348)]:
|
|
174
|
+
const _0x394266 = {};
|
|
175
|
+
_0x394266[_0x1d2a33(406)] = _0xa1b4, _0x394266[_0x1d2a33(379)] = _0x3f3a25, _0x509dc6 = await _0x21c65c["request"](_0x394266, ListRootsResultSchema);
|
|
172
176
|
break;
|
|
173
|
-
case
|
|
174
|
-
const
|
|
175
|
-
|
|
177
|
+
case _0x121fcc[_0x563101(369)]:
|
|
178
|
+
const _0x4c40d6 = {};
|
|
179
|
+
_0x4c40d6[_0x563101(406)] = _0xa1b4, _0x4c40d6[_0x563101(379)] = _0x3f3a25, _0x509dc6 = await _0x21c65c[_0x563101(417)](_0x4c40d6, CreateMessageResultSchema);
|
|
176
180
|
break;
|
|
177
|
-
case
|
|
178
|
-
const
|
|
179
|
-
|
|
181
|
+
case _0x121fcc[_0x1d2a33(394)]:
|
|
182
|
+
const _0x3fc95d = {};
|
|
183
|
+
_0x3fc95d[_0x563101(406)] = _0xa1b4, _0x3fc95d[_0x563101(379)] = _0x3f3a25, _0x509dc6 = await _0x21c65c[_0x1d2a33(417)](_0x3fc95d, ElicitResultSchema);
|
|
180
184
|
break;
|
|
181
|
-
case
|
|
182
|
-
const
|
|
183
|
-
|
|
185
|
+
case _0x121fcc[_0x1d2a33(374)]:
|
|
186
|
+
const _0x272bb7 = {};
|
|
187
|
+
_0x272bb7[_0x563101(406)] = _0xa1b4, _0x509dc6 = await _0x21c65c[_0x563101(417)](_0x272bb7, EmptyResultSchema);
|
|
184
188
|
break;
|
|
185
189
|
}
|
|
186
|
-
const
|
|
187
|
-
return
|
|
190
|
+
const _0x8bb89c = {};
|
|
191
|
+
return _0x8bb89c["result"] = _0x509dc6, _0x8bb89c["jsonrpc"] = _0x121fcc[_0x563101(371)], _0x8bb89c["id"] = _0x537b65, await ((_a = _0x5664c1 == null ? void 0 : _0x5664c1["transport"]) == null ? void 0 : _a[_0x563101(391)](_0x8bb89c)), _0x509dc6;
|
|
188
192
|
};
|
|
189
|
-
const forwardServerOnRequest = (
|
|
190
|
-
const
|
|
191
|
-
return
|
|
192
|
-
}, "
|
|
193
|
-
|
|
193
|
+
const forwardServerOnRequest = (_0xac7dd2, _0x36ea68) => {
|
|
194
|
+
const _0x26efa7 = _0x1181, _0x55bd73 = _0x1181, _0x835fee = { "pVhZK": function(_0x21266f, _0x1aa6cd) {
|
|
195
|
+
return _0x21266f === _0x1aa6cd;
|
|
196
|
+
}, "bsFTc": _0x26efa7(365), "ZQTJd": function(_0x19a6ef, _0x33220f, _0x5c71a5, _0x5d78be) {
|
|
197
|
+
return _0x19a6ef(_0x33220f, _0x5c71a5, _0x5d78be);
|
|
198
|
+
}, "DfdYr": _0x26efa7(403) }, _0x1ba832 = _0xac7dd2["_onrequest"];
|
|
199
|
+
_0xac7dd2[_0x26efa7(372)] = async (_0x1066e9, _0x22ef09) => {
|
|
194
200
|
var _a, _b, _c, _d, _e;
|
|
195
|
-
const
|
|
201
|
+
const _0x4d6f38 = _0x55bd73, _0x2dab97 = _0x55bd73, { id: _0x305ba1, method: _0x508758 } = _0x1066e9;
|
|
196
202
|
try {
|
|
197
|
-
|
|
198
|
-
} catch (
|
|
199
|
-
const { code:
|
|
203
|
+
_0x835fee["pVhZK"](_0x508758, _0x835fee[_0x4d6f38(342)]) ? await _0x1ba832["call"](_0xac7dd2, _0x1066e9, _0x22ef09) : await _0x835fee[_0x2dab97(384)](forwardServerRequest, _0xac7dd2, _0x36ea68, _0x1066e9);
|
|
204
|
+
} catch (_0xf9c543) {
|
|
205
|
+
const { code: _0x22a3ff, message: _0x4526cd, data: _0x4c84d1 } = _0xf9c543;
|
|
200
206
|
try {
|
|
201
|
-
if (
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
} else (_c = (_b =
|
|
207
|
-
} catch (
|
|
208
|
-
(_e = (_d =
|
|
207
|
+
if (_0x22a3ff) {
|
|
208
|
+
const _0x30bfe5 = {};
|
|
209
|
+
_0x30bfe5[_0x4d6f38(351)] = _0x22a3ff, _0x30bfe5["message"] = _0x4526cd, _0x30bfe5["data"] = _0x4c84d1;
|
|
210
|
+
const _0x2826a9 = {};
|
|
211
|
+
_0x2826a9[_0x2dab97(418)] = _0x30bfe5, _0x2826a9[_0x4d6f38(362)] = _0x835fee["DfdYr"], _0x2826a9["id"] = _0x305ba1, await ((_a = _0xac7dd2 == null ? void 0 : _0xac7dd2[_0x2dab97(388)]) == null ? void 0 : _a[_0x2dab97(391)](_0x2826a9));
|
|
212
|
+
} else (_c = (_b = _0xac7dd2 == null ? void 0 : _0xac7dd2[_0x4d6f38(388)]) == null ? void 0 : _b[_0x2dab97(344)]) == null ? void 0 : _c.call(_b, _0xf9c543);
|
|
213
|
+
} catch (_0x40eae9) {
|
|
214
|
+
(_e = (_d = _0xac7dd2 == null ? void 0 : _0xac7dd2["transport"]) == null ? void 0 : _d["onerror"]) == null ? void 0 : _e.call(_d, _0x40eae9);
|
|
209
215
|
}
|
|
210
216
|
}
|
|
211
217
|
};
|
|
212
218
|
};
|
|
213
|
-
const forwardServerOnNotification = (
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
return
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
const _0x21d78a = _0x59b5a2;
|
|
221
|
-
_0x1a1c0a[_0x2118c4(385)] = async (_0xd38b0c) => {
|
|
219
|
+
const forwardServerOnNotification = (_0xb4ba8d, _0xf834ff) => {
|
|
220
|
+
const _0x51c3b7 = _0x1181, _0x5e43ec = _0x1181, _0x4fb04f = {};
|
|
221
|
+
_0x4fb04f[_0x51c3b7(416)] = function(_0x1e14c7, _0x4655ce) {
|
|
222
|
+
return _0x1e14c7 !== _0x4655ce;
|
|
223
|
+
}, _0x4fb04f[_0x51c3b7(341)] = _0x51c3b7(396), _0x4fb04f[_0x51c3b7(381)] = _0x5e43ec(359);
|
|
224
|
+
const _0x2c4e40 = _0x4fb04f;
|
|
225
|
+
_0xb4ba8d["_onnotification"] = async (_0x292553) => {
|
|
222
226
|
var _a, _b;
|
|
223
|
-
const
|
|
224
|
-
if (
|
|
225
|
-
await
|
|
226
|
-
} catch (
|
|
227
|
-
(_b = (_a =
|
|
227
|
+
const _0xeb083 = _0x51c3b7, _0x2fc11f = _0x5e43ec, { method: _0x5a72b5, params: _0x1b931b } = _0x292553;
|
|
228
|
+
if (_0x2c4e40["LQlBY"](_0x5a72b5, _0x2c4e40[_0xeb083(341)]) && (_0x2c4e40[_0x2fc11f(416)](_0x5a72b5, _0x2c4e40[_0x2fc11f(381)]) || (_0x1b931b == null ? void 0 : _0x1b931b["forward"]))) try {
|
|
229
|
+
await _0xf834ff["notification"](_0x292553);
|
|
230
|
+
} catch (_0x181fb6) {
|
|
231
|
+
(_b = (_a = _0xb4ba8d == null ? void 0 : _0xb4ba8d[_0x2fc11f(388)]) == null ? void 0 : _a[_0x2fc11f(344)]) == null ? void 0 : _b.call(_a, _0x181fb6);
|
|
228
232
|
}
|
|
229
233
|
};
|
|
230
234
|
};
|
|
231
|
-
const forwardClientOnRequest = (
|
|
235
|
+
const forwardClientOnRequest = (_0x32659b, _0x4b000c) => async (_0xe2dde8) => {
|
|
232
236
|
var _a, _b, _c, _d, _e;
|
|
233
|
-
const
|
|
234
|
-
return
|
|
235
|
-
} };
|
|
237
|
+
const _0x22b4ad = _0x1181, _0x595874 = _0x1181, _0x5e1322 = { "EPDgC": function(_0xbc7e6a, _0x226d0b, _0x942db, _0xc2757d) {
|
|
238
|
+
return _0xbc7e6a(_0x226d0b, _0x942db, _0xc2757d);
|
|
239
|
+
}, "yXxfl": "2.0" };
|
|
236
240
|
try {
|
|
237
|
-
return await
|
|
238
|
-
} catch (
|
|
239
|
-
const { code:
|
|
241
|
+
return await _0x5e1322[_0x22b4ad(367)](forwardClientRequest, _0x32659b, _0x4b000c, _0xe2dde8);
|
|
242
|
+
} catch (_0x4cfcfa) {
|
|
243
|
+
const { code: _0x18ac33, message: _0x2c8a17, data: _0x1f7994 } = _0x4cfcfa;
|
|
240
244
|
try {
|
|
241
|
-
if (
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
} else (_c = (_b =
|
|
247
|
-
} catch (
|
|
248
|
-
(_e = (_d =
|
|
245
|
+
if (_0x18ac33) {
|
|
246
|
+
const _0x86d84d = {};
|
|
247
|
+
_0x86d84d["code"] = _0x18ac33, _0x86d84d[_0x22b4ad(352)] = _0x2c8a17, _0x86d84d["data"] = _0x1f7994;
|
|
248
|
+
const _0x193c35 = {};
|
|
249
|
+
_0x193c35[_0x595874(418)] = _0x86d84d, _0x193c35[_0x595874(362)] = _0x5e1322["yXxfl"], _0x193c35["id"] = _0xe2dde8["id"], await ((_a = _0x32659b == null ? void 0 : _0x32659b[_0x595874(388)]) == null ? void 0 : _a["send"](_0x193c35));
|
|
250
|
+
} else (_c = (_b = _0x32659b == null ? void 0 : _0x32659b[_0x22b4ad(388)]) == null ? void 0 : _b["onerror"]) == null ? void 0 : _c.call(_b, _0x4cfcfa);
|
|
251
|
+
} catch (_0x15b561) {
|
|
252
|
+
(_e = (_d = _0x32659b == null ? void 0 : _0x32659b[_0x595874(388)]) == null ? void 0 : _d[_0x22b4ad(344)]) == null ? void 0 : _e.call(_d, _0x15b561);
|
|
249
253
|
}
|
|
250
254
|
}
|
|
251
255
|
};
|
|
252
|
-
const forwardClientOnNotification = (
|
|
256
|
+
const forwardClientOnNotification = (_0x372fb8, _0x2de20b) => async (_0x36d5ea) => {
|
|
253
257
|
var _a, _b, _c;
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
return
|
|
257
|
-
},
|
|
258
|
-
return
|
|
259
|
-
},
|
|
260
|
-
const
|
|
261
|
-
if (
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
} catch (
|
|
265
|
-
(_c = (_b =
|
|
258
|
+
const _0x278cea = _0x1181, _0x1310c9 = _0x1181, _0x162b13 = {};
|
|
259
|
+
_0x162b13[_0x278cea(350)] = function(_0x109b35, _0x2ed8c4) {
|
|
260
|
+
return _0x109b35 !== _0x2ed8c4;
|
|
261
|
+
}, _0x162b13["LbsLD"] = "notifications/initialized", _0x162b13[_0x1310c9(409)] = function(_0x1eb0d0, _0x1d1d78) {
|
|
262
|
+
return _0x1eb0d0 !== _0x1d1d78;
|
|
263
|
+
}, _0x162b13[_0x278cea(356)] = _0x278cea(359);
|
|
264
|
+
const _0x369e86 = _0x162b13, { method: _0xcd3b11, params: _0x379407 } = _0x36d5ea;
|
|
265
|
+
if (_0x369e86[_0x278cea(350)](_0xcd3b11, _0x369e86["LbsLD"]) && (_0x369e86[_0x1310c9(409)](_0xcd3b11, _0x369e86[_0x278cea(356)]) || (_0x379407 == null ? void 0 : _0x379407["forward"]))) try {
|
|
266
|
+
const _0x492ea3 = { ..._0x36d5ea };
|
|
267
|
+
_0x492ea3["jsonrpc"] = "2.0", await ((_a = _0x2de20b == null ? void 0 : _0x2de20b[_0x278cea(388)]) == null ? void 0 : _a[_0x278cea(391)](_0x492ea3));
|
|
268
|
+
} catch (_0x1b2458) {
|
|
269
|
+
(_c = (_b = _0x372fb8 == null ? void 0 : _0x372fb8["transport"]) == null ? void 0 : _b[_0x278cea(344)]) == null ? void 0 : _c.call(_b, _0x1b2458);
|
|
266
270
|
}
|
|
267
271
|
};
|
|
268
272
|
const createHandleListener = () => {
|
|
269
|
-
const
|
|
270
|
-
return
|
|
271
|
-
}, "
|
|
272
|
-
return
|
|
273
|
-
}, "
|
|
274
|
-
return
|
|
275
|
-
}, "
|
|
276
|
-
return
|
|
277
|
-
}
|
|
278
|
-
const
|
|
279
|
-
if (
|
|
280
|
-
const
|
|
281
|
-
for (const
|
|
273
|
+
const _0x3d420c = _0x1181, _0x1db963 = _0x1181, _0x67b429 = { "KRzLb": function(_0x47bd85, _0x3f5278, _0x49d5c8) {
|
|
274
|
+
return _0x47bd85(_0x3f5278, _0x49d5c8);
|
|
275
|
+
}, "VuaGF": function(_0x4c6cf1, _0x31b018) {
|
|
276
|
+
return _0x4c6cf1 !== _0x31b018;
|
|
277
|
+
}, "juaWL": function(_0x3f88e3, _0x27fe19) {
|
|
278
|
+
return _0x3f88e3(_0x27fe19);
|
|
279
|
+
}, "LUzBE": function(_0x2f3367, _0x5a57a4) {
|
|
280
|
+
return _0x2f3367 === _0x5a57a4;
|
|
281
|
+
} }, _0x364e0d = [], _0x20263d = (_0x1e2bf8, _0x249ad3) => {
|
|
282
|
+
const _0x52051f = _0x1181;
|
|
283
|
+
if (_0x249ad3) {
|
|
284
|
+
const _0x55ae80 = [];
|
|
285
|
+
for (const _0x5ac8c7 of _0x364e0d) {
|
|
282
286
|
try {
|
|
283
|
-
|
|
287
|
+
_0x55ae80[_0x52051f(414)](_0x67b429["KRzLb"](_0x5ac8c7, _0x1e2bf8, _0x249ad3));
|
|
284
288
|
} catch {
|
|
285
289
|
}
|
|
286
290
|
}
|
|
287
|
-
for (const
|
|
288
|
-
if (
|
|
291
|
+
for (const _0x4b4b76 of _0x55ae80) {
|
|
292
|
+
if (_0x67b429["VuaGF"](_0x4b4b76, null)) return _0x4b4b76;
|
|
289
293
|
}
|
|
290
|
-
} else for (const
|
|
294
|
+
} else for (const _0x108683 of _0x364e0d) {
|
|
291
295
|
try {
|
|
292
|
-
|
|
296
|
+
_0x67b429["juaWL"](_0x108683, _0x1e2bf8);
|
|
293
297
|
} catch {
|
|
294
298
|
}
|
|
295
299
|
}
|
|
296
|
-
},
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
-
},
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
},
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
300
|
+
}, _0x2d9cd8 = (_0x4531d5) => {
|
|
301
|
+
const _0x229534 = _0x1181;
|
|
302
|
+
_0x67b429[_0x229534(332)](typeof _0x4531d5, _0x229534(349)) && !_0x364e0d["includes"](_0x4531d5) && _0x364e0d[_0x229534(414)](_0x4531d5);
|
|
303
|
+
}, _0x9dc975 = (_0x4cfd2b) => {
|
|
304
|
+
const _0x27e710 = _0x1181, _0x58cdca = _0x1181, _0x5cfc9e = _0x364e0d[_0x27e710(386)](_0x4cfd2b);
|
|
305
|
+
_0x5cfc9e !== -1 && _0x364e0d[_0x58cdca(390)](_0x5cfc9e, 1497 + 900 + -2 * 1198);
|
|
306
|
+
}, _0x521014 = () => {
|
|
307
|
+
const _0x3e4310 = _0x1181;
|
|
308
|
+
_0x364e0d[_0x3e4310(413)] = 7203 + -5554 + 1649 * -1;
|
|
309
|
+
}, _0xa35486 = {};
|
|
310
|
+
return _0xa35486[_0x3d420c(399)] = _0x20263d, _0xa35486[_0x1db963(346)] = _0x2d9cd8, _0xa35486[_0x1db963(419)] = _0x9dc975, _0xa35486["clearListener"] = _0x521014, _0xa35486;
|
|
311
|
+
}, setClientListener = (_0x45257f) => {
|
|
312
|
+
const _0x5439a0 = _0x1181, _0x2c7f68 = _0x1181, _0x11a992 = { "lwlhr": function(_0x4c73bd) {
|
|
313
|
+
return _0x4c73bd();
|
|
314
|
+
}, "HSkRw": function(_0x27eeca) {
|
|
315
|
+
return _0x27eeca();
|
|
309
316
|
} };
|
|
310
317
|
{
|
|
311
|
-
const { handleListener:
|
|
312
|
-
|
|
318
|
+
const { handleListener: _0x45d201, addListener: _0x2aadec, removeListener: _0x5520cd, clearListener: _0x4e4a52 } = _0x11a992[_0x5439a0(382)](createHandleListener);
|
|
319
|
+
_0x45257f[_0x5439a0(395)] = _0x45d201, _0x45257f[_0x5439a0(363)] = _0x2aadec, _0x45257f[_0x5439a0(355)] = _0x5520cd, _0x45257f[_0x5439a0(335)] = _0x4e4a52;
|
|
313
320
|
}
|
|
314
321
|
{
|
|
315
|
-
const { handleListener:
|
|
316
|
-
|
|
322
|
+
const { handleListener: _0x125a7c, addListener: _0x287870, removeListener: _0x46d98a, clearListener: _0x5515a6 } = _0x11a992["HSkRw"](createHandleListener);
|
|
323
|
+
_0x45257f[_0x5439a0(353)] = _0x125a7c, _0x45257f[_0x2c7f68(387)] = _0x287870, _0x45257f["removeRequestListener"] = _0x46d98a, _0x45257f["clearRequestListener"] = _0x5515a6;
|
|
317
324
|
}
|
|
318
325
|
{
|
|
319
|
-
const { handleListener:
|
|
320
|
-
|
|
326
|
+
const { handleListener: _0x18b88f, addListener: _0x274f41, removeListener: _0x430102, clearListener: _0x1462dc } = _0x11a992["lwlhr"](createHandleListener);
|
|
327
|
+
_0x45257f["fallbackNotificationHandler"] = _0x18b88f, _0x45257f[_0x2c7f68(378)] = _0x274f41, _0x45257f[_0x2c7f68(398)] = _0x430102, _0x45257f["clearNotificationListener"] = _0x1462dc;
|
|
321
328
|
}
|
|
322
329
|
};
|
|
323
|
-
function
|
|
324
|
-
const
|
|
325
|
-
return
|
|
326
|
-
|
|
327
|
-
let
|
|
328
|
-
return
|
|
329
|
-
},
|
|
330
|
+
function _0x1181(_0x6bedb3, _0xe3189c) {
|
|
331
|
+
const _0x22bc1a = _0x19ad();
|
|
332
|
+
return _0x1181 = function(_0x671652, _0x29a241) {
|
|
333
|
+
_0x671652 = _0x671652 - (-7465 + -5032 + 12825);
|
|
334
|
+
let _0x1bde0e = _0x22bc1a[_0x671652];
|
|
335
|
+
return _0x1bde0e;
|
|
336
|
+
}, _0x1181(_0x6bedb3, _0xe3189c);
|
|
330
337
|
}
|
|
331
|
-
const initClientHandler = (
|
|
332
|
-
const
|
|
333
|
-
return
|
|
334
|
-
}, "
|
|
335
|
-
return
|
|
336
|
-
}, "
|
|
337
|
-
return
|
|
338
|
-
}, "
|
|
339
|
-
return
|
|
340
|
-
}, "
|
|
341
|
-
return
|
|
342
|
-
} },
|
|
343
|
-
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
}),
|
|
347
|
-
const
|
|
348
|
-
|
|
338
|
+
const initClientHandler = (_0x35f090, { beforeInit: _0x2967e8, afterInit: _0x27bcef } = {}) => {
|
|
339
|
+
const _0x4c142e = _0x1181, _0x4daaba = _0x1181, _0x1ecdc4 = { "PwoZn": function(_0x532ea1, _0x2e8b14) {
|
|
340
|
+
return _0x532ea1 === _0x2e8b14;
|
|
341
|
+
}, "JqaEZ": _0x4c142e(349), "RIPWm": function(_0x7f533c, _0x9dbf2b) {
|
|
342
|
+
return _0x7f533c(_0x9dbf2b);
|
|
343
|
+
}, "EvGJT": function(_0x3da6e9, _0xf9a90b) {
|
|
344
|
+
return _0x3da6e9 === _0xf9a90b;
|
|
345
|
+
}, "ARELI": function(_0xc67076) {
|
|
346
|
+
return _0xc67076();
|
|
347
|
+
}, "tGLCP": _0x4daaba(395), "NOoqd": function(_0x4de624, _0x3402d4) {
|
|
348
|
+
return _0x4de624(_0x3402d4);
|
|
349
|
+
} }, _0x5aa9d7 = new Map(_0x35f090["_notificationHandlers"]);
|
|
350
|
+
_0x35f090[_0x4c142e(404)][_0x4c142e(331)](), _0x35f090["_notificationHandlers"][_0x4daaba(331)](), _0x1ecdc4[_0x4c142e(366)](typeof _0x2967e8, _0x1ecdc4["JqaEZ"]) && _0x1ecdc4["ARELI"](_0x2967e8), _0x1ecdc4[_0x4daaba(402)](_0x35f090[_0x4c142e(395)][_0x4daaba(373)], _0x1ecdc4["tGLCP"]) && (_0x35f090["originalOnResponse"] = _0x35f090[_0x4daaba(395)]), _0x1ecdc4["NOoqd"](setClientListener, _0x35f090), _0x35f090["addResponseListener"]((_0x24a8a1) => {
|
|
351
|
+
const _0x4a7898 = _0x4c142e;
|
|
352
|
+
_0x35f090[_0x4a7898(421)][_0x4a7898(408)](_0x35f090, _0x24a8a1);
|
|
353
|
+
}), typeof _0x27bcef === "function" && _0x27bcef(), _0x35f090["addNotificationListener"]((_0x467dad) => {
|
|
354
|
+
const _0x318e0b = _0x4daaba, { method: _0x3f238f } = _0x467dad, _0x5e2a92 = _0x5aa9d7[_0x318e0b(357)](_0x3f238f);
|
|
355
|
+
_0x1ecdc4["PwoZn"](typeof _0x5e2a92, _0x1ecdc4[_0x318e0b(333)]) && _0x1ecdc4["RIPWm"](_0x5e2a92, _0x467dad);
|
|
349
356
|
});
|
|
350
357
|
};
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
return _0x4f4fd3;
|
|
355
|
-
};
|
|
356
|
-
return _0x28b5();
|
|
357
|
-
}
|
|
358
|
-
const _0x36a176 = _0x2e93;
|
|
359
|
-
(function(_0x359d44, _0x24b8f9) {
|
|
360
|
-
const _0x4b5bcb = _0x2e93, _0x8af79e = _0x2e93, _0x5e6754 = _0x359d44();
|
|
358
|
+
const _0x57871e = _0x37cd;
|
|
359
|
+
(function(_0x4a2642, _0x4d53de) {
|
|
360
|
+
const _0x5a383b = _0x37cd, _0x11a9e7 = _0x37cd, _0x67e0b8 = _0x4a2642();
|
|
361
361
|
while (!![]) {
|
|
362
362
|
try {
|
|
363
|
-
const
|
|
364
|
-
if (
|
|
365
|
-
else
|
|
366
|
-
} catch (
|
|
367
|
-
|
|
363
|
+
const _0x459f4d = parseInt(_0x5a383b(323)) / (-1 * -1161 + 37 * -4 + -1012) * (parseInt(_0x5a383b(312)) / (4017 + -1 * -7765 + 62 * -190)) + parseInt(_0x11a9e7(319)) / (-34 * 203 + -3512 + -11 * -947) * (-parseInt(_0x5a383b(318)) / (1843 + 1 * 1880 + 3719 * -1)) + parseInt(_0x5a383b(327)) / (-8284 + -3 * -1387 + 4128) * (-parseInt(_0x11a9e7(313)) / (9217 * -1 + 157 * 1 + 9066)) + -parseInt(_0x5a383b(326)) / (7318 + -2177 * -2 + -5 * 2333) * (-parseInt(_0x11a9e7(309)) / (4427 * -1 + -4169 * 1 + 8604)) + parseInt(_0x5a383b(325)) / (8628 + 6564 + 5061 * -3) * (parseInt(_0x11a9e7(314)) / (-4305 + 11 * 87 + 3358)) + -parseInt(_0x5a383b(317)) / (9927 * 1 + -2802 + -7114) * (parseInt(_0x11a9e7(320)) / (4 * -2090 + 2 * 2826 + 2720)) + -parseInt(_0x5a383b(324)) / (-3484 + 6 * 186 + 2381) * (-parseInt(_0x11a9e7(322)) / (-6467 + 895 + 5586));
|
|
364
|
+
if (_0x459f4d === _0x4d53de) break;
|
|
365
|
+
else _0x67e0b8["push"](_0x67e0b8["shift"]());
|
|
366
|
+
} catch (_0x4b03b5) {
|
|
367
|
+
_0x67e0b8["push"](_0x67e0b8["shift"]());
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
})(
|
|
370
|
+
})(_0x4d6f, -70916 + 484898 + -157620);
|
|
371
371
|
const randomUUID = () => {
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
return
|
|
375
|
-
},
|
|
376
|
-
return
|
|
377
|
-
},
|
|
378
|
-
return
|
|
379
|
-
},
|
|
380
|
-
const
|
|
381
|
-
if (
|
|
382
|
-
return
|
|
383
|
-
const
|
|
384
|
-
return
|
|
372
|
+
const _0x3fd457 = _0x37cd, _0x18b939 = {};
|
|
373
|
+
_0x18b939["iMLeY"] = function(_0xb95b8d, _0x357fb7) {
|
|
374
|
+
return _0xb95b8d & _0x357fb7;
|
|
375
|
+
}, _0x18b939["AfkFc"] = function(_0x5e1b5a, _0x4b4469) {
|
|
376
|
+
return _0x5e1b5a === _0x4b4469;
|
|
377
|
+
}, _0x18b939[_0x3fd457(315)] = function(_0x275556, _0x3086ab) {
|
|
378
|
+
return _0x275556 | _0x3086ab;
|
|
379
|
+
}, _0x18b939["lXWlJ"] = "object", _0x18b939[_0x3fd457(316)] = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
|
|
380
|
+
const _0x360e1c = _0x18b939;
|
|
381
|
+
if (typeof crypto === _0x360e1c["lXWlJ"] && crypto["randomUUID"]) return crypto["randomUUID"]();
|
|
382
|
+
return _0x360e1c["TgEQJ"]["replace"](/[xy]/g, (_0x330643) => {
|
|
383
|
+
const _0x37133f = _0x3fd457, _0xb63864 = _0x360e1c["iMLeY"](crypto["getRandomValues"](new Uint8Array(-9498 + -129 * 38 + 1 * 14401))[6211 + -1441 * 3 + -16 * 118], 1481 * -1 + -1 * 5426 + 1 * 6922), _0x61d527 = _0x360e1c[_0x37133f(328)](_0x330643, "x") ? _0xb63864 : _0x360e1c[_0x37133f(315)](_0x360e1c["iMLeY"](_0xb63864, 355 * -8 + 7520 + 1 * -4677), -5610 + 1 * 1279 + 4339 * 1);
|
|
384
|
+
return _0x61d527["toString"](3137 * 3 + -5379 + -4016);
|
|
385
385
|
});
|
|
386
|
-
}, randomBytes = (
|
|
387
|
-
const
|
|
388
|
-
return crypto[
|
|
389
|
-
},
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
386
|
+
}, randomBytes = (_0x48bdb7) => {
|
|
387
|
+
const _0x26cb3f = _0x37cd, _0x301f84 = _0x37cd, _0x4aab8b = new Uint8Array(_0x48bdb7);
|
|
388
|
+
return crypto[_0x26cb3f(311)](_0x4aab8b), Array["from"](_0x4aab8b, (_0x2ea426) => _0x2ea426[_0x26cb3f(321)](-5686 + -83 * 11 + 6615 * 1)[_0x26cb3f(310)](-8945 * -1 + 5 * 525 + -48 * 241, "0"))[_0x301f84(308)]("");
|
|
389
|
+
}, _0x1a9a7a = {};
|
|
390
|
+
function _0x4d6f() {
|
|
391
|
+
const _0x19f64f = ["88nLAvAi", "padStart", "getRandomValues", "2IeXpGt", "1895970GWXOUI", "830SFAZva", "yGUWS", "TgEQJ", "5224769CnJgiw", "1950968yrcqKg", "3xizYBD", "12OMaoYl", "toString", "46718lIDNiA", "380701tBBDNK", "1235BBideQ", "44217UXxqNh", "273371RNKObV", "5GMHUki", "AfkFc", "randomUUID", "join"];
|
|
392
|
+
_0x4d6f = function() {
|
|
393
|
+
return _0x19f64f;
|
|
394
|
+
};
|
|
395
|
+
return _0x4d6f();
|
|
396
|
+
}
|
|
397
|
+
_0x1a9a7a[_0x57871e(329)] = randomUUID, _0x1a9a7a["randomBytes"] = randomBytes;
|
|
398
|
+
function _0x37cd(_0x4d9d7f, _0x350eae) {
|
|
399
|
+
const _0x53bced = _0x4d6f();
|
|
400
|
+
return _0x37cd = function(_0xe6858f, _0x46a480) {
|
|
401
|
+
_0xe6858f = _0xe6858f - (4 * -230 + -1 * 9874 + -427 * -26);
|
|
402
|
+
let _0x2c5757 = _0x53bced[_0xe6858f];
|
|
403
|
+
return _0x2c5757;
|
|
404
|
+
}, _0x37cd(_0x4d9d7f, _0x350eae);
|
|
398
405
|
}
|
|
399
|
-
const
|
|
400
|
-
(function(
|
|
401
|
-
const
|
|
406
|
+
const _0x41e2e9 = _0x51d3, _0x213126 = _0x51d3;
|
|
407
|
+
(function(_0x1164d4, _0x45d9de) {
|
|
408
|
+
const _0x26ba1f = _0x51d3, _0x4df724 = _0x51d3, _0x3581a6 = _0x1164d4();
|
|
402
409
|
while (!![]) {
|
|
403
410
|
try {
|
|
404
|
-
const
|
|
405
|
-
if (
|
|
406
|
-
else
|
|
407
|
-
} catch (
|
|
408
|
-
|
|
411
|
+
const _0x5574e4 = parseInt(_0x26ba1f(510)) / (2 * 731 + -19 * -373 + -8548 * 1) + parseInt(_0x26ba1f(561)) / (-8123 * 1 + -13 * 667 + 16796) + parseInt(_0x4df724(502)) / (1256 * 1 + 7534 + -2929 * 3) * (-parseInt(_0x4df724(522)) / (-9713 + 3183 + 6534)) + parseInt(_0x26ba1f(530)) / (-4278 + 8021 + -3738) * (parseInt(_0x26ba1f(572)) / (-3 * -1252 + -1837 + -1913)) + parseInt(_0x26ba1f(553)) / (6764 + 1 * 4331 + -11088) + parseInt(_0x26ba1f(559)) / (-8235 + -4855 + 13098) + parseInt(_0x4df724(484)) / (8350 + 1548 + -11 * 899) * (-parseInt(_0x26ba1f(516)) / (-4328 + -595 + 4933));
|
|
412
|
+
if (_0x5574e4 === _0x45d9de) break;
|
|
413
|
+
else _0x3581a6["push"](_0x3581a6["shift"]());
|
|
414
|
+
} catch (_0xaf8042) {
|
|
415
|
+
_0x3581a6["push"](_0x3581a6["shift"]());
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
|
-
})(
|
|
412
|
-
function
|
|
413
|
-
const
|
|
414
|
-
|
|
415
|
-
return
|
|
418
|
+
})(_0x546c, 7 * 47702 + -893118 + -227 * -5534);
|
|
419
|
+
function _0x546c() {
|
|
420
|
+
const _0x5f445d = ["client_id", "saveCodeData", "configuredResource", "access-control-allow-origin", "LYfiu", "yEBSy", "Authorization code was not issued to this client: ", "350TbRoZy", "use", "saveRefreshToken", "saveClient", "resource", "pRrjv", "KMJLb", "Token is invalid", "refreshTokenExpiresIn", "accessTokensStore", "NJOYh", "state", "expiresAt", "MnTVg", "authorize", "Access-Control-Allow-Origin", "getAccessToken", "redirect_uris", "accessTokens", "NtLNZ", "join", "generateAccessToken", "scope", "4256294hjXESV", "getRefreshToken", "refreshTokensStore", "Router", "token", "search", "7147200HrfFEz", "gnlGJ", "689926uXTJYY", "body", "scopes", "rhzvc", "registerClient", "RZFdN", "bearer", "codesStore", "redirect", "Refresh token is invalid or does not belong to this client: ", "access_token", "22662sytYEP", "VBcPV", "randomBytes", "now", "generateAuthorizationCode", "accessTokenExpiresIn", "Bearer", "94518WgSjRK", "split", "exp", "params", "client", "rbfjJ", "refreshTokens", "QSLMV", "href", "getHeader", "deleteCodeData", "clientId", "token_type_hint", "delete", "query", "redirectUri", "Invalid authorization code for this client: ", "generateRefreshToken", "118890VNbZaA", "get", "refresh_token", "/.well-known/oauth-authorization-server", "hwcVG", "json", "MZSsG", "codes", "1046851yvzKrR", "set", "HqYqs", "dYbbc", "clients", "rISOo", "1060oXrpJU", "extra", "getCodeDate", "setHeader", "verifyAccessToken", "getClient", "136GFWgmW"];
|
|
421
|
+
_0x546c = function() {
|
|
422
|
+
return _0x5f445d;
|
|
416
423
|
};
|
|
417
|
-
return
|
|
424
|
+
return _0x546c();
|
|
418
425
|
}
|
|
419
|
-
function
|
|
420
|
-
const
|
|
421
|
-
return
|
|
422
|
-
|
|
423
|
-
let
|
|
424
|
-
return
|
|
425
|
-
},
|
|
426
|
+
function _0x51d3(_0x51b50d, _0x46c74f) {
|
|
427
|
+
const _0x349c99 = _0x546c();
|
|
428
|
+
return _0x51d3 = function(_0x5b339e, _0x261678) {
|
|
429
|
+
_0x5b339e = _0x5b339e - (4093 * -1 + 9184 + -4611);
|
|
430
|
+
let _0x2d5fb8 = _0x349c99[_0x5b339e];
|
|
431
|
+
return _0x2d5fb8;
|
|
432
|
+
}, _0x51d3(_0x51b50d, _0x46c74f);
|
|
426
433
|
}
|
|
427
|
-
const ACCESS_TOKEN_EXPIRES_IN = (-
|
|
428
|
-
const REFRESH_TOKEN_EXPIRES_IN = (
|
|
434
|
+
const ACCESS_TOKEN_EXPIRES_IN = (-1931 + 3112 * -2 + 1 * 8179) * (-5 * -1779 + -9 * -491 + 4418 * -3) * (3389 + -4 * 905 + 3 * 97);
|
|
435
|
+
const REFRESH_TOKEN_EXPIRES_IN = (2899 * -3 + 5905 + 2799) * (8359 + -4353 + -22 * 181) * (-2 * -2425 + 3 * 1095 + -19 * 425) * (-1338 * 7 + -7381 + 16807);
|
|
429
436
|
const generateAuthorizationCodeFunction = () => {
|
|
430
|
-
const
|
|
431
|
-
return
|
|
437
|
+
const _0x17c020 = _0x51d3;
|
|
438
|
+
return _0x1a9a7a[_0x17c020(574)](-6291 + -7516 + 1 * 13831);
|
|
432
439
|
}, generateAccessTokenFunction = () => {
|
|
433
|
-
|
|
434
|
-
return _0x325be1[_0x5e8688(183)](-3597 + 2306 + 21 * 63);
|
|
440
|
+
return _0x1a9a7a["randomBytes"](-7490 + -4299 + 1 * 11821);
|
|
435
441
|
}, generateRefreshTokenFunction = () => {
|
|
436
|
-
return
|
|
442
|
+
return _0x1a9a7a["randomBytes"](-808 * 1 + -9477 + -10333 * -1);
|
|
437
443
|
};
|
|
438
444
|
class MemoryClientsStore {
|
|
439
445
|
constructor() {
|
|
440
|
-
|
|
441
|
-
this[_0x63191d(193)] = /* @__PURE__ */ new Map();
|
|
446
|
+
this["clients"] = /* @__PURE__ */ new Map();
|
|
442
447
|
}
|
|
443
|
-
async [
|
|
444
|
-
const
|
|
445
|
-
return this[
|
|
448
|
+
async [_0x41e2e9(521)](_0x4a3414) {
|
|
449
|
+
const _0x3ca175 = _0x41e2e9;
|
|
450
|
+
return this["clients"][_0x3ca175(503)](_0x4a3414);
|
|
446
451
|
}
|
|
447
|
-
async [
|
|
448
|
-
const
|
|
449
|
-
return this["clients"][
|
|
452
|
+
async [_0x41e2e9(533)](_0x4035d1) {
|
|
453
|
+
const _0x17f788 = _0x213126;
|
|
454
|
+
return this["clients"][_0x17f788(511)](_0x4035d1["client_id"], _0x4035d1), _0x4035d1;
|
|
450
455
|
}
|
|
451
|
-
async [
|
|
452
|
-
const
|
|
453
|
-
return this[
|
|
456
|
+
async ["deleteClient"](_0x301e29) {
|
|
457
|
+
const _0x1e5303 = _0x213126;
|
|
458
|
+
return this[_0x1e5303(514)]["delete"](_0x301e29);
|
|
454
459
|
}
|
|
455
|
-
async [
|
|
456
|
-
|
|
457
|
-
return this[_0x451ada(162)](_0x3b2dcb);
|
|
460
|
+
async [_0x41e2e9(565)](_0x41b149) {
|
|
461
|
+
return this["saveClient"](_0x41b149);
|
|
458
462
|
}
|
|
459
463
|
}
|
|
460
464
|
class MemoryAuthorizationCodeStore {
|
|
461
465
|
constructor() {
|
|
462
466
|
this["codes"] = /* @__PURE__ */ new Map();
|
|
463
467
|
}
|
|
464
|
-
async [
|
|
465
|
-
const
|
|
466
|
-
return this["codes"][
|
|
468
|
+
async [_0x41e2e9(518)](_0x17d56e) {
|
|
469
|
+
const _0x2672a5 = _0x213126;
|
|
470
|
+
return this["codes"][_0x2672a5(503)](_0x17d56e);
|
|
467
471
|
}
|
|
468
|
-
async [
|
|
469
|
-
const
|
|
470
|
-
return this[
|
|
472
|
+
async [_0x213126(524)](_0x288704, _0x403271) {
|
|
473
|
+
const _0x2cc2d6 = _0x213126, _0x40c5b7 = _0x41e2e9;
|
|
474
|
+
return this[_0x2cc2d6(509)][_0x40c5b7(511)](_0x288704, _0x403271), !![];
|
|
471
475
|
}
|
|
472
|
-
async [
|
|
473
|
-
const
|
|
474
|
-
return this["codes"][
|
|
476
|
+
async [_0x213126(494)](_0x2573f0) {
|
|
477
|
+
const _0x1255ff = _0x41e2e9;
|
|
478
|
+
return this["codes"][_0x1255ff(497)](_0x2573f0);
|
|
475
479
|
}
|
|
476
480
|
}
|
|
477
481
|
class MemoryAccessTokensStore {
|
|
478
482
|
constructor() {
|
|
479
|
-
|
|
480
|
-
this[_0x1e38a3(129)] = /* @__PURE__ */ new Map();
|
|
483
|
+
this["accessTokens"] = /* @__PURE__ */ new Map();
|
|
481
484
|
}
|
|
482
|
-
async [
|
|
483
|
-
|
|
484
|
-
return this[_0x59c717(129)][_0x146508(135)](_0x5b9216);
|
|
485
|
+
async [_0x213126(546)](_0x4e2e6d) {
|
|
486
|
+
return this["accessTokens"]["get"](_0x4e2e6d);
|
|
485
487
|
}
|
|
486
|
-
async ["saveAccessToken"](
|
|
487
|
-
|
|
488
|
-
return this[_0xe77978(129)]["set"](_0x607848, _0xaac4f8), !![];
|
|
488
|
+
async ["saveAccessToken"](_0x3dae91, _0x505c58) {
|
|
489
|
+
return this["accessTokens"]["set"](_0x3dae91, _0x505c58), !![];
|
|
489
490
|
}
|
|
490
|
-
async ["revokeAccessToken"](
|
|
491
|
-
const
|
|
492
|
-
return this["
|
|
491
|
+
async ["revokeAccessToken"](_0x5994c4) {
|
|
492
|
+
const _0x5e14ee = _0x213126;
|
|
493
|
+
return this[_0x5e14ee(548)]["delete"](_0x5994c4);
|
|
493
494
|
}
|
|
494
495
|
}
|
|
495
496
|
class MemoryRefreshTokensStore {
|
|
496
497
|
constructor() {
|
|
497
|
-
|
|
498
|
+
const _0x329aad = _0x41e2e9;
|
|
499
|
+
this[_0x329aad(490)] = /* @__PURE__ */ new Map();
|
|
498
500
|
}
|
|
499
|
-
async [
|
|
500
|
-
const
|
|
501
|
-
return this["
|
|
501
|
+
async [_0x213126(554)](_0x353cc6) {
|
|
502
|
+
const _0x4cbb73 = _0x41e2e9;
|
|
503
|
+
return this[_0x4cbb73(490)]["get"](_0x353cc6);
|
|
502
504
|
}
|
|
503
|
-
async [
|
|
504
|
-
const
|
|
505
|
-
return this[
|
|
505
|
+
async [_0x213126(532)](_0x9ee135, _0x3443ee) {
|
|
506
|
+
const _0x530e10 = _0x213126;
|
|
507
|
+
return this["refreshTokens"][_0x530e10(511)](_0x9ee135, _0x3443ee), !![];
|
|
506
508
|
}
|
|
507
|
-
async ["revokeRefreshToken"](
|
|
508
|
-
|
|
509
|
-
return this[_0x16027e(131)][_0x16027e(219)](_0x361705);
|
|
509
|
+
async ["revokeRefreshToken"](_0x5629c1) {
|
|
510
|
+
return this["refreshTokens"]["delete"](_0x5629c1);
|
|
510
511
|
}
|
|
511
512
|
}
|
|
512
513
|
class AuthServerProvider {
|
|
513
|
-
constructor(
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
return
|
|
517
|
-
},
|
|
518
|
-
return
|
|
519
|
-
}, _0x338366["brCoD"] = function(_0x568726, _0x5f11fd) {
|
|
520
|
-
return _0x568726 || _0x5f11fd;
|
|
514
|
+
constructor(_0x52b1ad = {}) {
|
|
515
|
+
const _0x3eba9c = _0x213126, _0x1f8da0 = _0x213126, _0x239d64 = {};
|
|
516
|
+
_0x239d64["KMJLb"] = function(_0x2ed2e7, _0x2716fc) {
|
|
517
|
+
return _0x2ed2e7 || _0x2716fc;
|
|
518
|
+
}, _0x239d64["mfqSi"] = function(_0xceb615, _0xf13f47) {
|
|
519
|
+
return _0xceb615 || _0xf13f47;
|
|
521
520
|
};
|
|
522
|
-
const
|
|
523
|
-
this[
|
|
521
|
+
const _0x4359fc = _0x239d64, { clientsStore: _0x48d91d, codesStore: _0x1eb5f5, accessTokensStore: _0x6876fa, refreshTokensStore: _0x5a3fe2, generateAuthorizationCode: _0xca3e6c, generateAccessToken: _0x9277b, generateRefreshToken: _0x4e64d8, accessTokenExpiresIn: _0x2b2396, refreshTokenExpiresIn: _0x334795 } = _0x52b1ad;
|
|
522
|
+
this["clientsStore"] = _0x48d91d || new MemoryClientsStore(), this[_0x3eba9c(568)] = _0x1eb5f5 || new MemoryAuthorizationCodeStore(), this["accessTokensStore"] = _0x6876fa || new MemoryAccessTokensStore(), this[_0x1f8da0(555)] = _0x5a3fe2 || new MemoryRefreshTokensStore(), this[_0x1f8da0(481)] = _0x4359fc["KMJLb"](_0xca3e6c, generateAuthorizationCodeFunction), this[_0x3eba9c(551)] = _0x4359fc[_0x3eba9c(536)](_0x9277b, generateAccessTokenFunction), this["generateRefreshToken"] = _0x4359fc["KMJLb"](_0x4e64d8, generateRefreshTokenFunction), this[_0x1f8da0(482)] = _0x2b2396 || ACCESS_TOKEN_EXPIRES_IN, this[_0x3eba9c(538)] = _0x4359fc["mfqSi"](_0x334795, REFRESH_TOKEN_EXPIRES_IN);
|
|
524
523
|
}
|
|
525
|
-
async [
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
return
|
|
529
|
-
},
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
const
|
|
537
|
-
|
|
524
|
+
async [_0x41e2e9(544)](_0x28a5d7, _0x1eece5, _0x20517b) {
|
|
525
|
+
const _0x4da09b = _0x41e2e9, _0x4c8d2f = _0x213126, _0x520389 = {};
|
|
526
|
+
_0x520389["gnlGJ"] = function(_0x463dc3, _0x1b8b49) {
|
|
527
|
+
return _0x463dc3 !== _0x1b8b49;
|
|
528
|
+
}, _0x520389["KibBY"] = "state";
|
|
529
|
+
const _0x4ea3f5 = _0x520389, _0x4fba03 = this[_0x4da09b(481)](), _0x2420a6 = {};
|
|
530
|
+
_0x2420a6["code"] = _0x4fba03;
|
|
531
|
+
const _0x51b78c = new URLSearchParams(_0x2420a6);
|
|
532
|
+
_0x4ea3f5[_0x4da09b(560)](_0x1eece5[_0x4c8d2f(541)], void 0) && _0x51b78c["set"](_0x4ea3f5["KibBY"], _0x1eece5["state"]);
|
|
533
|
+
const _0x4a093a = {};
|
|
534
|
+
_0x4a093a[_0x4c8d2f(488)] = _0x28a5d7, _0x4a093a[_0x4c8d2f(487)] = _0x1eece5, await this["codesStore"]["saveCodeData"](_0x4fba03, _0x4a093a);
|
|
535
|
+
const _0x4af24c = new URL(_0x1eece5["redirectUri"] || _0x28a5d7["redirect_uris"][-16 * 367 + 7394 + 2 * -761]);
|
|
536
|
+
_0x4af24c[_0x4c8d2f(558)] = _0x51b78c["toString"](), _0x20517b[_0x4c8d2f(569)](_0x4af24c["toString"]());
|
|
538
537
|
}
|
|
539
|
-
async ["challengeForAuthorizationCode"](
|
|
540
|
-
const
|
|
541
|
-
if (!
|
|
542
|
-
return
|
|
538
|
+
async ["challengeForAuthorizationCode"](_0x5486b9, _0x41cba7) {
|
|
539
|
+
const _0x3ad093 = _0x41e2e9, _0x4ff28c = await this[_0x3ad093(568)]["getCodeDate"](_0x41cba7);
|
|
540
|
+
if (!_0x4ff28c) throw new InvalidGrantError("Invalid authorization code for this client: " + _0x5486b9[_0x3ad093(523)]);
|
|
541
|
+
return _0x4ff28c[_0x3ad093(487)]["codeChallenge"];
|
|
543
542
|
}
|
|
544
|
-
async [
|
|
545
|
-
const
|
|
546
|
-
|
|
547
|
-
return
|
|
548
|
-
},
|
|
549
|
-
return
|
|
550
|
-
},
|
|
551
|
-
return
|
|
543
|
+
async ["exchangeAuthorizationCode"](_0xe7634c, _0x1306a6) {
|
|
544
|
+
const _0x2e62a3 = _0x41e2e9, _0x164d9c = _0x41e2e9, _0x25b42e = {};
|
|
545
|
+
_0x25b42e["TPDdm"] = function(_0x4186f0, _0x3f2dd9) {
|
|
546
|
+
return _0x4186f0 !== _0x3f2dd9;
|
|
547
|
+
}, _0x25b42e["hwcVG"] = function(_0xf114e5, _0x282a69) {
|
|
548
|
+
return _0xf114e5 + _0x282a69;
|
|
549
|
+
}, _0x25b42e["NtLNZ"] = function(_0x4c9b64, _0x29bcf4) {
|
|
550
|
+
return _0x4c9b64 * _0x29bcf4;
|
|
552
551
|
};
|
|
553
|
-
const
|
|
554
|
-
if (!
|
|
555
|
-
if (
|
|
556
|
-
const
|
|
557
|
-
await this[
|
|
558
|
-
const
|
|
559
|
-
|
|
560
|
-
const
|
|
561
|
-
await this[
|
|
562
|
-
const
|
|
563
|
-
|
|
564
|
-
const
|
|
565
|
-
return await this[
|
|
552
|
+
const _0x171cff = _0x25b42e, _0x12d412 = await this[_0x2e62a3(568)]["getCodeDate"](_0x1306a6);
|
|
553
|
+
if (!_0x12d412) throw new InvalidGrantError(_0x164d9c(500) + _0xe7634c["client_id"]);
|
|
554
|
+
if (_0x171cff["TPDdm"](_0x12d412["client"][_0x164d9c(523)], _0xe7634c[_0x164d9c(523)])) throw new InvalidGrantError(_0x164d9c(529) + _0xe7634c["client_id"]);
|
|
555
|
+
const _0x56dbb6 = _0x12d412["params"][_0x164d9c(499)] || _0x12d412["client"][_0x2e62a3(547)][-50 * 16 + -4 * -50 + -40 * -15];
|
|
556
|
+
await this[_0x2e62a3(568)][_0x164d9c(494)](_0x1306a6);
|
|
557
|
+
const _0xd56756 = this[_0x2e62a3(551)](), _0x1479aa = this[_0x2e62a3(501)](), _0x68d8ff = {};
|
|
558
|
+
_0x68d8ff["redirectUri"] = _0x56dbb6;
|
|
559
|
+
const _0x548e78 = { "token": _0xd56756, "clientId": _0xe7634c[_0x2e62a3(523)], "scopes": _0x12d412[_0x2e62a3(487)][_0x164d9c(563)] || [], "expiresAt": _0x171cff["hwcVG"](Date["now"](), this[_0x164d9c(482)] * (377 * 26 + 3260 * 1 + -12062)), "resource": _0x12d412[_0x2e62a3(487)]["resource"], "extra": _0x68d8ff };
|
|
560
|
+
await this[_0x2e62a3(539)]["saveAccessToken"](_0xd56756, _0x548e78);
|
|
561
|
+
const _0x42dbd7 = {};
|
|
562
|
+
_0x42dbd7["isRevoked"] = ![];
|
|
563
|
+
const _0x3fbe89 = { "token": _0x1479aa, "clientId": _0xe7634c["client_id"], "scopes": _0x12d412["params"][_0x2e62a3(563)] || [], "expiresAt": _0x171cff[_0x164d9c(506)](Date[_0x164d9c(480)](), _0x171cff[_0x2e62a3(549)](this["refreshTokenExpiresIn"], -169 * -28 + 1 * -2141 + -1591)), "extra": _0x42dbd7 };
|
|
564
|
+
return await this[_0x164d9c(555)][_0x2e62a3(532)](_0x1479aa, _0x3fbe89), { "access_token": _0xd56756, "refresh_token": _0x1479aa, "token_type": _0x2e62a3(567), "expires_in": this["accessTokenExpiresIn"], "scope": (_0x12d412[_0x2e62a3(487)][_0x164d9c(563)] || [])["join"](" ") };
|
|
566
565
|
}
|
|
567
|
-
async ["exchangeRefreshToken"](
|
|
568
|
-
const
|
|
569
|
-
|
|
570
|
-
return
|
|
571
|
-
},
|
|
572
|
-
return
|
|
573
|
-
},
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
if (
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
await this["refreshTokensStore"][
|
|
581
|
-
const _0x11d08f = this["generateAccessToken"](), _0x341610 = this["generateRefreshToken"](), _0x2f39e5 = { "token": _0x54f7d7, "clientId": _0x275849[_0x21ed17(217)], "scopes": _0x16a8c5[_0x34b86e(164)], "expiresAt": _0x427751[_0x21ed17(125)](Date[_0x21ed17(190)](), this["refreshTokenExpiresIn"] * (-2833 * -1 + 11 * -28 + -61 * 25)) };
|
|
582
|
-
return await this["refreshTokensStore"]["saveRefreshToken"](_0x54f7d7, _0x2f39e5), { "access_token": _0x11d08f, "refresh_token": _0x341610, "token_type": _0x427751[_0x34b86e(212)], "expires_in": this["accessTokenExpiresIn"], "scope": _0x16a8c5["scopes"][_0x21ed17(160)](" ") };
|
|
566
|
+
async ["exchangeRefreshToken"](_0x200485, _0x3f1bf7) {
|
|
567
|
+
const _0x4cb376 = _0x41e2e9, _0x216041 = _0x41e2e9, _0x108810 = {};
|
|
568
|
+
_0x108810[_0x4cb376(508)] = function(_0x2743ba, _0x531785) {
|
|
569
|
+
return _0x2743ba !== _0x531785;
|
|
570
|
+
}, _0x108810["Qryol"] = function(_0x40cde2, _0x502f98) {
|
|
571
|
+
return _0x40cde2 * _0x502f98;
|
|
572
|
+
}, _0x108810[_0x216041(543)] = _0x4cb376(483);
|
|
573
|
+
const _0x4d15a6 = _0x108810, _0x38de8b = await this["refreshTokensStore"][_0x4cb376(554)](_0x3f1bf7);
|
|
574
|
+
if (!_0x38de8b) throw new InvalidGrantError("Refresh token is invalid or has been revoked for this client: " + _0x200485[_0x4cb376(523)]);
|
|
575
|
+
if (_0x38de8b[_0x4cb376(542)] < Date[_0x216041(480)]()) throw new InvalidGrantError("Refresh token has expired for this client: " + _0x200485["client_id"]);
|
|
576
|
+
if (_0x4d15a6["MZSsG"](_0x38de8b["clientId"], _0x200485["client_id"])) throw new InvalidGrantError("Refresh token was not issued to this client: " + _0x200485[_0x216041(523)]);
|
|
577
|
+
await this["refreshTokensStore"]["revokeRefreshToken"](_0x3f1bf7);
|
|
578
|
+
const _0x2a05b7 = this[_0x4cb376(551)](), _0x332e00 = this[_0x4cb376(501)](), _0x10af51 = { "token": _0x3f1bf7, "clientId": _0x200485[_0x216041(523)], "scopes": _0x38de8b["scopes"], "expiresAt": Date[_0x216041(480)]() + _0x4d15a6["Qryol"](this["refreshTokenExpiresIn"], -4 * 1709 + -9572 + 17408) };
|
|
579
|
+
return await this["refreshTokensStore"]["saveRefreshToken"](_0x3f1bf7, _0x10af51), { "access_token": _0x2a05b7, "refresh_token": _0x332e00, "token_type": _0x4d15a6["MnTVg"], "expires_in": this[_0x4cb376(482)], "scope": _0x38de8b[_0x4cb376(563)][_0x216041(550)](" ") };
|
|
583
580
|
}
|
|
584
|
-
async [
|
|
585
|
-
const
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
};
|
|
589
|
-
const _0x31f97a = _0x3d1a11, _0x7f06e4 = await this[_0x5a1d54(192)]["getAccessToken"](_0x5ece9d);
|
|
590
|
-
if (!_0x7f06e4 || !_0x7f06e4[_0x52a1dc(181)]) throw new InvalidTokenError("Token is invalid");
|
|
591
|
-
return { "token": _0x5ece9d, "clientId": _0x7f06e4["clientId"], "scopes": _0x7f06e4["scopes"], "expiresAt": Math[_0x52a1dc(126)](_0x31f97a[_0x5a1d54(133)](_0x7f06e4["expiresAt"], -728 + 7451 + -5723)), "resource": _0x7f06e4["resource"], "extra": _0x7f06e4[_0x52a1dc(157)] };
|
|
581
|
+
async [_0x213126(520)](_0x4ac668) {
|
|
582
|
+
const _0x1e90c9 = _0x213126, _0x2cbf6e = _0x213126, _0x4a422f = await this[_0x1e90c9(539)]["getAccessToken"](_0x4ac668);
|
|
583
|
+
if (!_0x4a422f || !_0x4a422f["expiresAt"]) throw new InvalidTokenError(_0x1e90c9(537));
|
|
584
|
+
return { "token": _0x4ac668, "clientId": _0x4a422f["clientId"], "scopes": _0x4a422f["scopes"], "expiresAt": Math["floor"](_0x4a422f[_0x2cbf6e(542)] / (4735 + 8133 + -6 * 1978)), "resource": _0x4a422f["resource"], "extra": _0x4a422f[_0x1e90c9(517)] };
|
|
592
585
|
}
|
|
593
|
-
async [
|
|
594
|
-
const
|
|
595
|
-
|
|
596
|
-
return
|
|
597
|
-
},
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
await this[
|
|
586
|
+
async ["revokeToken"](_0x4cc77e, _0x2657a1) {
|
|
587
|
+
const _0xf9eb84 = _0x213126, _0x532d81 = _0x41e2e9, _0x549cb0 = {};
|
|
588
|
+
_0x549cb0["sGkHE"] = function(_0x20dc9e, _0x21effd) {
|
|
589
|
+
return _0x20dc9e === _0x21effd;
|
|
590
|
+
}, _0x549cb0["NZKym"] = _0xf9eb84(571), _0x549cb0["HqYqs"] = _0x532d81(504), _0x549cb0[_0x532d81(515)] = function(_0x5c8d3c, _0x35a47b) {
|
|
591
|
+
return _0x5c8d3c !== _0x35a47b;
|
|
592
|
+
};
|
|
593
|
+
const _0x31e7e1 = _0x549cb0;
|
|
594
|
+
if (_0x31e7e1["sGkHE"](_0x2657a1["token_type_hint"], _0x31e7e1["NZKym"])) {
|
|
595
|
+
const _0x4e4762 = await this["accessTokensStore"]["getAccessToken"](_0x2657a1[_0x532d81(557)]);
|
|
596
|
+
if (!_0x4e4762 || _0x4e4762["clientId"] !== _0x4cc77e["client_id"]) throw new InvalidTokenError("Access token is invalid or does not belong to this client: " + _0x4cc77e[_0xf9eb84(523)]);
|
|
597
|
+
await this[_0xf9eb84(539)]["revokeAccessToken"](_0x2657a1["token"]);
|
|
603
598
|
} else {
|
|
604
|
-
if (
|
|
605
|
-
const
|
|
606
|
-
if (!
|
|
607
|
-
await this[
|
|
608
|
-
} else throw new InvalidGrantError("Unsupported token type hint: " +
|
|
599
|
+
if (_0x31e7e1["sGkHE"](_0x2657a1["token_type_hint"], _0x31e7e1[_0xf9eb84(512)])) {
|
|
600
|
+
const _0xcd1e76 = await this[_0xf9eb84(555)][_0x532d81(554)](_0x2657a1["token"]);
|
|
601
|
+
if (!_0xcd1e76 || _0x31e7e1[_0x532d81(515)](_0xcd1e76["clientId"], _0x4cc77e[_0x532d81(523)])) throw new InvalidTokenError(_0x532d81(570) + _0x4cc77e["client_id"]);
|
|
602
|
+
await this[_0x532d81(555)]["revokeRefreshToken"](_0x2657a1["token"]);
|
|
603
|
+
} else throw new InvalidGrantError("Unsupported token type hint: " + _0x2657a1[_0xf9eb84(496)] + " to this client: " + _0x4cc77e[_0x532d81(523)]);
|
|
609
604
|
}
|
|
610
605
|
}
|
|
611
606
|
}
|
|
612
|
-
const createAuthMiddleware = (
|
|
613
|
-
const
|
|
614
|
-
return
|
|
615
|
-
}, "
|
|
616
|
-
return
|
|
617
|
-
} },
|
|
607
|
+
const createAuthMiddleware = (_0x19ddb5, _0x45de00) => {
|
|
608
|
+
const _0x5233a8 = _0x213126, _0x46a672 = { "pRrjv": function(_0x21b1f3, _0x4e0951) {
|
|
609
|
+
return _0x21b1f3(_0x4e0951);
|
|
610
|
+
}, "rhzvc": function(_0x102958, _0x5356f7) {
|
|
611
|
+
return _0x102958(_0x5356f7);
|
|
612
|
+
} }, _0xdd2a59 = async (_0x3006de) => {
|
|
618
613
|
var _a;
|
|
619
|
-
const
|
|
620
|
-
if (!
|
|
621
|
-
const
|
|
622
|
-
|
|
623
|
-
if (!
|
|
624
|
-
return { "token":
|
|
625
|
-
},
|
|
626
|
-
return
|
|
614
|
+
const _0x456b0b = _0x51d3, _0xde420c = _0x51d3, _0x2af921 = await _0x19ddb5["verifyAccessToken"](_0x3006de), _0xa4b0f = { "active": !![], "client_id": _0x2af921[_0x456b0b(495)], "scope": _0x2af921[_0x456b0b(563)]["join"](" "), "exp": _0x2af921[_0x456b0b(542)], "aud": _0x2af921[_0xde420c(534)] };
|
|
615
|
+
if (!_0xa4b0f["aud"]) throw new Error("Resource Indicator (RFC8707) missing");
|
|
616
|
+
const _0x1d833d = {};
|
|
617
|
+
_0x1d833d["requestedResource"] = _0xa4b0f["aud"], _0x1d833d[_0x456b0b(525)] = _0x45de00;
|
|
618
|
+
if (!_0x46a672[_0x456b0b(535)](checkResourceAllowed, _0x1d833d)) throw new Error("Expected resource indicator " + _0x45de00 + ", got: " + _0xa4b0f["aud"]);
|
|
619
|
+
return { "token": _0x3006de, "clientId": _0xa4b0f["client_id"], "scopes": _0xa4b0f[_0xde420c(552)] ? _0xa4b0f["scope"][_0xde420c(485)](" ") : [], "expiresAt": _0xa4b0f[_0xde420c(486)], "redirectUri": (_a = _0x2af921[_0xde420c(517)]) == null ? void 0 : _a["redirectUri"] };
|
|
620
|
+
}, _0x311312 = {};
|
|
621
|
+
return _0x311312["verifyAccessToken"] = _0xdd2a59, _0x46a672[_0x5233a8(564)](requireBearerAuth, { "verifier": _0x311312, "requiredScopes": [], "resourceMetadataUrl": getOAuthProtectedResourceMetadataUrl(new URL(_0x45de00)) });
|
|
627
622
|
};
|
|
628
|
-
const createAuthCallbackRouter = (
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
623
|
+
const createAuthCallbackRouter = (_0x42c312, ..._0x4f84c4) => {
|
|
624
|
+
const _0x296674 = _0x213126, _0x334879 = _0x213126, _0x4b6c4c = {};
|
|
625
|
+
_0x4b6c4c[_0x296674(527)] = function(_0x168cfc, _0x77f061) {
|
|
626
|
+
return _0x168cfc && _0x77f061;
|
|
627
|
+
};
|
|
628
|
+
const _0x59a5b6 = _0x4b6c4c, _0x10e83a = _0x5cd98a[_0x296674(556)](), _0x5cf9bf = /* @__PURE__ */ new Map();
|
|
629
|
+
_0x10e83a[_0x334879(503)](_0x42c312, _0x5cd98a[_0x296674(507)](), (_0x1b45bf, _0x2c5f85) => {
|
|
630
|
+
const _0x202b1d = _0x296674, _0x427b06 = _0x296674, { code: _0x36b89c, state: _0x30815f, error: _0x36491c } = _0x1b45bf[_0x202b1d(498)];
|
|
631
|
+
if (_0x59a5b6[_0x427b06(527)](_0x36b89c, _0x30815f)) _0x5cf9bf[_0x427b06(511)](_0x30815f, _0x36b89c), _0x2c5f85["json"]({});
|
|
632
|
+
else _0x36491c && _0x2c5f85["status"](-1 * 501 + -581 * 3 + 2644)["send"]("OAuth authorization failed: " + _0x36491c);
|
|
634
633
|
});
|
|
635
|
-
const
|
|
636
|
-
const
|
|
637
|
-
if (
|
|
638
|
-
const
|
|
639
|
-
|
|
640
|
-
const
|
|
641
|
-
|
|
642
|
-
} else
|
|
634
|
+
const _0x267a0f = [_0x5cd98a[_0x296674(507)](), ..._0x4f84c4, (_0x654be, _0x2c907d) => {
|
|
635
|
+
const _0x4255dc = _0x334879, _0x29b965 = _0x334879, { state: _0x374377 } = _0x654be[_0x4255dc(562)];
|
|
636
|
+
if (_0x374377 && _0x5cf9bf["has"](_0x374377)) {
|
|
637
|
+
const _0x4c6f44 = _0x5cf9bf[_0x4255dc(503)](_0x374377);
|
|
638
|
+
_0x5cf9bf[_0x29b965(497)](_0x374377);
|
|
639
|
+
const _0x35c2a1 = {};
|
|
640
|
+
_0x35c2a1["code"] = _0x4c6f44, _0x2c907d["json"](_0x35c2a1);
|
|
641
|
+
} else _0x2c907d["status"](4333 + 263 * 31 + -12086)["send"]("No authorization code found for state: " + _0x374377);
|
|
643
642
|
}];
|
|
644
|
-
return
|
|
643
|
+
return _0x10e83a["post"](_0x42c312, ..._0x267a0f), _0x10e83a;
|
|
645
644
|
};
|
|
646
|
-
const metadataHandler = (
|
|
647
|
-
const
|
|
648
|
-
return
|
|
649
|
-
}, "
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
645
|
+
const metadataHandler = (_0x524dad) => {
|
|
646
|
+
const _0xf76a65 = _0x213126, _0x2a8627 = _0x41e2e9, _0x34c2d2 = { "TvEhp": function(_0x19a545) {
|
|
647
|
+
return _0x19a545();
|
|
648
|
+
}, "vrwMC": function(_0x45346b, _0x3a2609) {
|
|
649
|
+
return _0x45346b(_0x3a2609);
|
|
650
|
+
}, "VBcPV": "GET", "yEBSy": "OPTIONS" }, _0x2cdeaf = _0x5cd98a[_0xf76a65(556)]();
|
|
651
|
+
return _0x2cdeaf["use"](_0x34c2d2["TvEhp"](_0x310cf0)), _0x2cdeaf[_0x2a8627(531)](_0x34c2d2["vrwMC"](allowedMethods, [_0x34c2d2[_0xf76a65(573)], _0x34c2d2[_0x2a8627(528)]])), _0x2cdeaf[_0xf76a65(531)]("/", (_0x3776bd, _0xacd5df) => {
|
|
652
|
+
_0xacd5df["status"](2126 * 2 + -8108 * 1 + -12 * -338)["json"](_0x524dad);
|
|
653
|
+
}), _0x2cdeaf;
|
|
654
654
|
};
|
|
655
|
-
const createAuthMetadataRouter = (
|
|
656
|
-
const
|
|
657
|
-
return
|
|
658
|
-
}
|
|
659
|
-
|
|
655
|
+
const createAuthMetadataRouter = (_0x55f315, _0x1cb019, _0x2fdcb0, _0x55df86) => {
|
|
656
|
+
const _0x25f842 = _0x41e2e9, _0x3846e0 = _0x213126, _0x46aeca = { "QSLMV": function(_0xd8f9f1, _0x5df111) {
|
|
657
|
+
return _0xd8f9f1(_0x5df111);
|
|
658
|
+
}, "NJOYh": function(_0x4a8cc2, _0x8ce4b1) {
|
|
659
|
+
return _0x4a8cc2 || _0x8ce4b1;
|
|
660
|
+
}, "dYbbc": function(_0x3cb297, _0x31d423) {
|
|
661
|
+
return _0x3cb297 === _0x31d423;
|
|
662
|
+
}, "RZFdN": _0x25f842(505) }, _0x384df7 = _0x5cd98a[_0x25f842(556)](), _0x38e1e3 = _0x46aeca[_0x3846e0(491)](createOAuthMetadata, { "provider": _0x55f315, "issuerUrl": new URL(_0x46aeca[_0x3846e0(540)](_0x55df86, _0x1cb019)) }), _0xff54b9 = { "resource": new URL(_0x2fdcb0)[_0x3846e0(492)], "authorization_servers": [new URL(_0x1cb019)["href"]] }, _0x47b025 = new URL(_0x2fdcb0)["pathname"];
|
|
663
|
+
return _0x384df7["use"]("/.well-known/oauth-protected-resource" + (_0x46aeca[_0x25f842(513)](_0x47b025, "/") ? "" : _0x47b025), _0x46aeca[_0x3846e0(491)](metadataHandler, _0xff54b9)), _0x384df7["use"](_0x46aeca[_0x25f842(566)], _0x46aeca[_0x3846e0(491)](metadataHandler, _0x38e1e3)), _0x384df7;
|
|
660
664
|
};
|
|
661
|
-
const createAuthRouter = (
|
|
662
|
-
const
|
|
663
|
-
return
|
|
665
|
+
const createAuthRouter = (_0x12bca1) => {
|
|
666
|
+
const _0x2baa3e = { "FHLti": function(_0x2e3a7d, _0x328c77) {
|
|
667
|
+
return _0x2e3a7d(_0x328c77);
|
|
664
668
|
} };
|
|
665
|
-
return
|
|
669
|
+
return _0x2baa3e["FHLti"](mcpAuthRouter, _0x12bca1);
|
|
670
|
+
};
|
|
671
|
+
const lockCors = (_0xbc1c61) => {
|
|
672
|
+
const _0x360019 = _0x213126, _0x27c834 = _0x213126, _0x277cee = { "muxSj": function(_0x51c2e0, _0x43db51) {
|
|
673
|
+
return _0x51c2e0 === _0x43db51;
|
|
674
|
+
}, "eqRUu": _0x360019(526), "FvGsU": _0x27c834(545), "rbfjJ": function(_0x98d564, _0x2b83a7, _0x534a29, _0x4113f6) {
|
|
675
|
+
return _0x98d564(_0x2b83a7, _0x534a29, _0x4113f6);
|
|
676
|
+
} }, _0x1acf55 = _0x310cf0(_0xbc1c61);
|
|
677
|
+
return (_0x518579, _0x4f24fb, _0x4bfa11) => {
|
|
678
|
+
const _0x2499e0 = _0x360019, _0x3152eb = _0x360019, _0x8eac0b = _0x4f24fb[_0x2499e0(519)];
|
|
679
|
+
_0x4f24fb["setHeader"] = function(_0x24a9af, _0x270df6) {
|
|
680
|
+
const _0x175656 = _0x2499e0;
|
|
681
|
+
if (_0x277cee["muxSj"](_0x24a9af["toLowerCase"](), _0x277cee["eqRUu"])) {
|
|
682
|
+
const _0x11e5ab = _0x4f24fb[_0x175656(493)](_0x277cee["FvGsU"]);
|
|
683
|
+
if (_0x11e5ab) return this;
|
|
684
|
+
}
|
|
685
|
+
return _0x8eac0b["apply"](this, [_0x24a9af, _0x270df6]);
|
|
686
|
+
}, _0x277cee[_0x3152eb(489)](_0x1acf55, _0x518579, _0x4f24fb, _0x4bfa11);
|
|
687
|
+
};
|
|
666
688
|
};
|
|
667
|
-
|
|
668
|
-
(
|
|
669
|
-
|
|
689
|
+
function _0x2101(_0x283b22, _0x172b74) {
|
|
690
|
+
const _0xde55ee = _0x4eb4();
|
|
691
|
+
return _0x2101 = function(_0x2845f4, _0x3f5577) {
|
|
692
|
+
_0x2845f4 = _0x2845f4 - (-47 * -194 + 7 * 526 + -1 * 12599);
|
|
693
|
+
let _0x57af8b = _0xde55ee[_0x2845f4];
|
|
694
|
+
return _0x57af8b;
|
|
695
|
+
}, _0x2101(_0x283b22, _0x172b74);
|
|
696
|
+
}
|
|
697
|
+
const _0x301a2 = _0x2101, _0x12c17d = _0x2101;
|
|
698
|
+
(function(_0x364076, _0x495627) {
|
|
699
|
+
const _0x597399 = _0x2101, _0x146110 = _0x2101, _0x21fb80 = _0x364076();
|
|
670
700
|
while (!![]) {
|
|
671
701
|
try {
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
674
|
-
else
|
|
675
|
-
} catch (
|
|
676
|
-
|
|
702
|
+
const _0x2e82be = parseInt(_0x597399(264)) / (-3639 + -1028 + 4668) * (-parseInt(_0x146110(326)) / (-4506 + 6319 + -1811)) + -parseInt(_0x597399(322)) / (-4139 * -2 + 178 * 55 + -5 * 3613) * (-parseInt(_0x146110(215)) / (3422 + 4976 * -1 + -1558 * -1)) + -parseInt(_0x146110(299)) / (7094 + 373 * 5 + -242 * 37) * (parseInt(_0x146110(323)) / (20 * -376 + 470 * -14 + 14106)) + parseInt(_0x597399(218)) / (492 + 1 * 7833 + 1 * -8318) * (parseInt(_0x146110(283)) / (-1546 * 1 + -2697 + 4251)) + parseInt(_0x146110(311)) / (300 + 8357 + -8648) + -parseInt(_0x597399(286)) / (23 * -221 + 1 * 7182 + 1 * -2089) * (parseInt(_0x146110(342)) / (6571 + -5258 + -1 * 1302)) + -parseInt(_0x146110(211)) / (-4 * -577 + -4229 * -1 + -29 * 225) * (parseInt(_0x597399(334)) / (-5984 + 433 * 12 + -1 * -801));
|
|
703
|
+
if (_0x2e82be === _0x495627) break;
|
|
704
|
+
else _0x21fb80["push"](_0x21fb80["shift"]());
|
|
705
|
+
} catch (_0x416b08) {
|
|
706
|
+
_0x21fb80["push"](_0x21fb80["shift"]());
|
|
677
707
|
}
|
|
678
708
|
}
|
|
679
|
-
})(
|
|
680
|
-
function
|
|
681
|
-
const
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
let _0x51b535 = _0x199ffd[_0x446088];
|
|
685
|
-
return _0x51b535;
|
|
686
|
-
}, _0x2d47(_0x5bb66f, _0x400ccc);
|
|
687
|
-
}
|
|
688
|
-
function _0x291b() {
|
|
689
|
-
const _0x14d326 = ["message", "subscribe", "addNotificationListener", "event: close\ndata: \n\n", "listChanged", "8734599AkTAzm", "WDwuj", "shouldClose", "2EdcnDx", "onclose", "error", "xQTaf", "accept", "connect", "details", "end", "tTEpX", "Savqr", "No client found for session ID ", "Method not allowed.", "verify", "auth", "handleRequest", "url", "_notificationHandlers", "handleWebSocket", "length", "json", "mcp-socket-twin-client", "iJYRJ", "mcp-server", "server", "182llvKCz", "NANjm", "value", "completions", "protocolVersion", "qvQdx", "sse-session-id", "ping", "mcp-session-id", "keys", "tLvAF", "164vgPyEd", "handleSseProxy", "jlwsJ", "sQKbx", "tools", "JtlEB", "prompts", "JbNzm", "cyRCJ", "dJnin", "afterInit", "sampling", "WqgNn", "qSNcZ", "code", "DELETE", "bonKW", "44967tFuEYG", "7374560hqUzIE", "body", "set", "5298095GAlGQW", "capabilities", "query", "push", "user", "headersSent", "map", "BkXdQ", "gSfFs", "sessionId", "write", "iMpqN", "ErRDQ", "Oqkqt", "status", "tFxkc", "WuneN", "version", "fulfilled", "logging", "transport", "39302054TcqqMG", "1.0.0", "notifications/initialized", "uuogb", "BDrVA", "includes", "name", "_sessionId", "HjRbb", "elicitation", "Dwtny", "referer", "send", "tIHLW", "193590opGJPI", "token", "x-forwarded-for", "LVmNq", "JGpQa", "user-agent", "forEach", "values", "headers", "wmAfK", "8BoJHMH", "resolve", "WebSocket", "AtduA", "xTmPn", "method", "Allow", "GHsdz", "resources", "jsonrpc", "roots", "fbAOS", "get", "close", "stream-session-id", "http://localhost", "reset", "mcp-sse-proxy-server", "_sseResponse", "POST", "IPRWX", "OLalj", "client", "onerror", "UhSLE", "76516CiRKQp"];
|
|
690
|
-
_0x291b = function() {
|
|
691
|
-
return _0x14d326;
|
|
709
|
+
})(_0x4eb4, -73 * 12766 + 142643 * -1 + 1544570);
|
|
710
|
+
function _0x4eb4() {
|
|
711
|
+
const _0x51abca = ["KFXQU", "tYBNZ", "2.0", "length", "jsonrpc", "auth", "TmlVG", "BGZnq", "ping", "inspectors", "completions", "status", "headersSent", "stringify", "shouldClose", "dgfmu", "verify", "name", "http://localhost", "reset", "logging", "text/event-stream", "ImPVm", "type", "PAfsa", "PlIPJ", "mcp-server", "body", "subscribe", "message", "close", "_webStandardTransport", "set", "CuDLn", "rcexc", "handleStreamInspector", "values", "addNotificationListener", "azSTD", "GET", "removeNotificationListener", "send", "rGwIR", "1051BzFGMo", "_requestHandlers", "XkVIZ", "tools", "Allow", "client", "authorization", "kzfhr", "Bad Request: No valid session ID provided", "once", "CZTzM", "error", "fPZdc", "all", "onerror", "tcQpN", "remoterSessions", "yvXqV", "NhddI", "27064LNxORS", "transport", "roots", "644860XCDCRS", "map", "resolve", "query", "split", "notifications/initialized", "PYRrS", "allSettled", "Method not allowed.", "json", "end", "mcp-sse-twin-client", "handleStreamRequest", "10cKFySR", "yNhxA", "version", "get", "fTIRa", "kggHK", "handlePostMessage", "Invalid or missing session ID", "muQDP", "1.0.0", "No transport found", "user", "7544799fpiVma", "sampling", "referer", "onclose", "Invalid bearer token", "value", "capabilities", "GOskr", "push", "mcp-stream-twin-client", "mcpServer", "1239KXrjKL", "883716DumyzE", "url", "gweEn", "934MCCmjG", "handleWebSocket", "prompts", "LIZsT", "sessionIdGenerator", "headers", "handleSseMessage", "params", "3038867VkUuhS", "SSE", "_notificationHandlers", "Internal server error", "listChanged", "keys", "resources", "method", "33gIgkYQ", "DELETE", "ggQPt", "code", "connect", "handleSseProxy", "handleRequest", "WliyP", "sessionId", "WjQFk", "Qfisp", "fEkjP", "12oWQWOl", "remoters", "HwRPG", "stream-session-id", "4868qGusFh", "BuMZz", "forEach", "707anyqod", "zlCns", "onClientError"];
|
|
712
|
+
_0x4eb4 = function() {
|
|
713
|
+
return _0x51abca;
|
|
692
714
|
};
|
|
693
|
-
return
|
|
715
|
+
return _0x4eb4();
|
|
694
716
|
}
|
|
695
|
-
const auth = ({ secret:
|
|
717
|
+
const auth = ({ secret: _0x1729dd }) => (_0x5cfefe, _0x155b75, _0x473599) => {
|
|
696
718
|
var _a;
|
|
697
|
-
const
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
if (!
|
|
701
|
-
|
|
719
|
+
const _0x3022c7 = _0x2101, _0x304409 = _0x2101, _0x755060 = { "Qfisp": "Missing bearer token", "fPZdc": function(_0x3a6f61) {
|
|
720
|
+
return _0x3a6f61();
|
|
721
|
+
}, "lArCW": _0x3022c7(315) }, _0x22150b = (_a = _0x5cfefe[_0x3022c7(331)][_0x304409(270)]) == null ? void 0 : _a[_0x304409(290)](" ")[-2753 + -134 + 2888];
|
|
722
|
+
if (!_0x22150b) {
|
|
723
|
+
_0x155b75[_0x304409(232)](8650 + 3191 + -11440)["send"](_0x755060[_0x3022c7(209)]);
|
|
702
724
|
return;
|
|
703
725
|
}
|
|
704
726
|
try {
|
|
705
|
-
|
|
706
|
-
} catch (
|
|
707
|
-
const
|
|
708
|
-
|
|
727
|
+
_0x5cfefe["user"] = _0x42bb3b[_0x304409(237)](_0x22150b, _0x1729dd), _0x755060[_0x3022c7(276)](_0x473599);
|
|
728
|
+
} catch (_0x4ad0dd) {
|
|
729
|
+
const _0x200270 = {};
|
|
730
|
+
_0x200270[_0x3022c7(275)] = _0x755060["lArCW"], _0x200270["details"] = _0x4ad0dd[_0x304409(250)], _0x155b75[_0x3022c7(232)](9641 + -2329 + -6909)["json"](_0x200270);
|
|
709
731
|
}
|
|
710
732
|
};
|
|
711
|
-
const jwtAuth = (
|
|
712
|
-
const
|
|
713
|
-
|
|
714
|
-
return
|
|
715
|
-
},
|
|
716
|
-
const
|
|
717
|
-
if (!
|
|
733
|
+
const jwtAuth = (_0x366268, _0x5696aa) => {
|
|
734
|
+
const _0x5585f1 = _0x2101, _0x4922c5 = _0x2101, _0x19c857 = {};
|
|
735
|
+
_0x19c857[_0x5585f1(266)] = function(_0x54f919, _0x3642cd) {
|
|
736
|
+
return _0x54f919 + _0x3642cd;
|
|
737
|
+
}, _0x19c857[_0x4922c5(263)] = _0x4922c5(239), _0x19c857["yvXqV"] = "token", _0x19c857["LIZsT"] = "Missing bearer token", _0x19c857["eJVIE"] = _0x4922c5(315);
|
|
738
|
+
const _0x78ed1a = _0x19c857, _0xa2aa96 = new URL(_0x78ed1a[_0x5585f1(266)](_0x78ed1a[_0x4922c5(263)], _0x366268[_0x5585f1(324)])), _0x42c490 = _0xa2aa96["searchParams"][_0x4922c5(302)](_0x78ed1a[_0x5585f1(281)]);
|
|
739
|
+
if (!_0x42c490) throw new Error(_0x78ed1a[_0x5585f1(329)]);
|
|
718
740
|
try {
|
|
719
|
-
|
|
720
|
-
} catch (
|
|
721
|
-
throw new Error(
|
|
741
|
+
_0x366268[_0x5585f1(310)] = _0x42bb3b[_0x4922c5(237)](_0x42c490, _0x5696aa);
|
|
742
|
+
} catch (_0x5a0ab7) {
|
|
743
|
+
throw new Error(_0x78ed1a["eJVIE"]);
|
|
722
744
|
}
|
|
723
745
|
};
|
|
724
|
-
const getDeviceInfo = (
|
|
725
|
-
const
|
|
726
|
-
return
|
|
727
|
-
}, "
|
|
728
|
-
return
|
|
746
|
+
const getDeviceInfo = (_0x5cbc20) => ({ "ip": _0x5cbc20["headers"]["x-forwarded-for"] || _0x5cbc20["ip"] || "", "userAgent": _0x5cbc20["headers"]["user-agent"] || "", "acceptLanguage": _0x5cbc20[_0x301a2(331)]["accept-language"] || "", "referer": _0x5cbc20["headers"][_0x12c17d(313)] || "" }), forwardProxyServer = (_0x4fdab4, _0x30924e) => {
|
|
747
|
+
const _0x258634 = _0x12c17d, _0x50009e = _0x12c17d, _0x12c075 = { "dgfmu": function(_0x305a6f, _0x23f323, _0x1d92f8) {
|
|
748
|
+
return _0x305a6f(_0x23f323, _0x1d92f8);
|
|
749
|
+
}, "tYBNZ": function(_0x52afec, _0x469ccb, _0x17c074) {
|
|
750
|
+
return _0x52afec(_0x469ccb, _0x17c074);
|
|
729
751
|
} };
|
|
730
|
-
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
|
|
752
|
+
_0x12c075[_0x258634(236)](forwardServerOnRequest, _0x4fdab4, _0x30924e), _0x12c075[_0x50009e(236)](forwardServerOnNotification, _0x4fdab4, _0x30924e);
|
|
753
|
+
const _0x582998 = _0x12c075[_0x258634(222)](forwardClientOnRequest, _0x30924e, _0x4fdab4), _0x34ea47 = forwardClientOnNotification(_0x30924e, _0x4fdab4);
|
|
754
|
+
_0x30924e["addRequestListener"](_0x582998), _0x30924e[_0x258634(258)](_0x34ea47), _0x4fdab4[_0x258634(314)] = () => {
|
|
755
|
+
const _0x33d269 = _0x258634;
|
|
756
|
+
_0x30924e["removeRequestListener"](_0x582998), _0x30924e[_0x33d269(261)](_0x34ea47);
|
|
734
757
|
};
|
|
735
|
-
}, initTwinClientHandler = (
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
const
|
|
742
|
-
|
|
743
|
-
const
|
|
744
|
-
|
|
745
|
-
const
|
|
746
|
-
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
const _0x4e2671 = _0x474c77, _0x2ad1bf = {};
|
|
750
|
-
_0x2ad1bf["name"] = _0x1414b8(502), _0x2ad1bf[_0x1414b8(553)] = "1.0.0", _0x7c249["_requestHandlers"][_0x1028f2(535)]("initialize", (_0x3f7a0d) => ({ "protocolVersion": _0x3f7a0d["params"][_0x1028f2(508)], "capabilities": _0x4e2671, "serverInfo": _0x2ad1bf })), _0x7c249[_0x1414b8(496)]["set"](_0x3fc174["rAXgw"], () => {
|
|
758
|
+
}, initTwinClientHandler = (_0x1b6419, _0x55bdb2) => {
|
|
759
|
+
const _0x32cbe3 = _0x12c17d, _0x73ed6e = _0x301a2, _0x20196b = {};
|
|
760
|
+
_0x20196b[_0x32cbe3(245)] = "initialize", _0x20196b[_0x32cbe3(300)] = _0x73ed6e(291), _0x20196b["Utgwz"] = "event: close\ndata: \n\n";
|
|
761
|
+
const _0x1a9de1 = _0x20196b, _0x281e12 = () => {
|
|
762
|
+
const _0xa79966 = _0x73ed6e, _0x560db8 = _0x32cbe3, _0x9b41bf = {};
|
|
763
|
+
_0x9b41bf["listChanged"] = !![];
|
|
764
|
+
const _0x1627d8 = {};
|
|
765
|
+
_0x1627d8["subscribe"] = !![], _0x1627d8[_0xa79966(338)] = !![];
|
|
766
|
+
const _0x27bff6 = {};
|
|
767
|
+
_0x27bff6[_0xa79966(338)] = !![];
|
|
768
|
+
const _0x46e367 = {};
|
|
769
|
+
_0x46e367[_0x560db8(328)] = _0x9b41bf, _0x46e367["resources"] = _0x1627d8, _0x46e367["tools"] = _0x27bff6, _0x46e367[_0x560db8(231)] = {}, _0x46e367["logging"] = {};
|
|
770
|
+
const _0x1e53c8 = _0x46e367, _0x4d5661 = {};
|
|
771
|
+
_0x4d5661["name"] = _0xa79966(247), _0x4d5661[_0x560db8(301)] = _0x560db8(308), _0x1b6419[_0xa79966(265)]["set"](_0x1a9de1["PAfsa"], (_0xbc442c) => ({ "protocolVersion": _0xbc442c[_0x560db8(333)]["protocolVersion"], "capabilities": _0x1e53c8, "serverInfo": _0x4d5661 })), _0x1b6419[_0xa79966(336)][_0x560db8(253)](_0x1a9de1["yNhxA"], () => {
|
|
751
772
|
});
|
|
752
|
-
},
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
const _0x22437b = _0x4b80bf;
|
|
756
|
-
_0x3fc174[_0x45f094(524)](_0x978026, SSEServerTransport) && (_0x978026[_0x3f0edf(594)] = () => {
|
|
773
|
+
}, _0x2999f5 = () => {
|
|
774
|
+
const _0x4a667a = _0x32cbe3;
|
|
775
|
+
_0x55bdb2 instanceof SSEServerTransport && (_0x55bdb2[_0x4a667a(251)] = () => {
|
|
757
776
|
var _a, _b;
|
|
758
|
-
const
|
|
759
|
-
return (_a =
|
|
777
|
+
const _0x3e81d9 = _0x4a667a, _0x261d11 = _0x4a667a;
|
|
778
|
+
return (_a = _0x55bdb2["_sseResponse"]) == null ? void 0 : _a["write"](_0x1a9de1["Utgwz"])[_0x3e81d9(296)](), _0x55bdb2["_sseResponse"] = void 0, (_b = _0x55bdb2["onclose"]) == null ? void 0 : _b.call(_0x55bdb2), Promise[_0x261d11(288)]();
|
|
760
779
|
});
|
|
761
|
-
},
|
|
762
|
-
|
|
780
|
+
}, _0x1ad533 = {};
|
|
781
|
+
_0x1ad533["beforeInit"] = _0x281e12, _0x1ad533["afterInit"] = _0x2999f5, initClientHandler(_0x1b6419, _0x1ad533);
|
|
763
782
|
};
|
|
764
783
|
const useProxyHandles = () => {
|
|
765
|
-
const
|
|
766
|
-
return
|
|
767
|
-
}, "
|
|
768
|
-
return
|
|
769
|
-
}, "
|
|
770
|
-
return
|
|
771
|
-
}, "
|
|
772
|
-
return
|
|
773
|
-
}, "
|
|
774
|
-
return
|
|
775
|
-
}, "
|
|
776
|
-
return
|
|
777
|
-
}, "
|
|
778
|
-
return
|
|
779
|
-
}, "
|
|
780
|
-
return
|
|
781
|
-
}, "
|
|
782
|
-
return
|
|
783
|
-
}, "
|
|
784
|
-
return
|
|
785
|
-
}, "
|
|
786
|
-
return
|
|
787
|
-
}, "
|
|
788
|
-
return
|
|
789
|
-
}, "
|
|
790
|
-
return
|
|
791
|
-
}, "
|
|
792
|
-
return
|
|
793
|
-
}, "
|
|
794
|
-
return
|
|
795
|
-
}, "
|
|
796
|
-
return
|
|
797
|
-
}, "
|
|
798
|
-
|
|
799
|
-
}, "BDrVA": _0x46ea31(461), "WqgNn": _0x2e1a8d(545), "JbNzm": function(_0x16e03e, _0x53d5c9, _0x4ea158) {
|
|
800
|
-
return _0x16e03e(_0x53d5c9, _0x4ea158);
|
|
801
|
-
}, "uuogb": function(_0x3e6a27, _0x45c05c) {
|
|
802
|
-
return _0x3e6a27 !== _0x45c05c;
|
|
803
|
-
}, "ErRDQ": _0x2e1a8d(554) }, _0x49e752 = {}, _0x284689 = {}, _0x4c5c52 = {}, _0xa3a621 = {};
|
|
804
|
-
let _0xa96593 = () => {
|
|
784
|
+
const _0x2291e6 = _0x12c17d, _0x5639bd = _0x12c17d, _0x5e1a71 = { "CuDLn": _0x2291e6(335), "CZTzM": "close", "WGubu": _0x2291e6(297), "HwRPG": "1.0.0", "kggHK": function(_0x34e87c, _0x1e2fab) {
|
|
785
|
+
return _0x34e87c(_0x1e2fab);
|
|
786
|
+
}, "GNsDw": function(_0x534a1e, _0x95cd27, _0x37e86a) {
|
|
787
|
+
return _0x534a1e(_0x95cd27, _0x37e86a);
|
|
788
|
+
}, "fUOrr": "mcp-sse-proxy-server", "azSTD": function(_0x129fd2, _0x1db0c1) {
|
|
789
|
+
return _0x129fd2 === _0x1db0c1;
|
|
790
|
+
}, "BuMZz": _0x2291e6(260), "zlCns": _0x5639bd(343), "NhddI": function(_0x5650b0, _0x23bfbe, _0x20a4a7) {
|
|
791
|
+
return _0x5650b0(_0x23bfbe, _0x20a4a7);
|
|
792
|
+
}, "OKiBt": "GET, POST, DELETE", "crLLx": "2.0", "WcQJb": _0x5639bd(294), "uahNm": "mcp-session-id", "gptGR": function(_0x452e85, _0x1d4ba5) {
|
|
793
|
+
return _0x452e85 === _0x1d4ba5;
|
|
794
|
+
}, "PlIPJ": _0x2291e6(242), "WjQFk": function(_0x11d4d9, _0x5d7f50) {
|
|
795
|
+
return _0x11d4d9 === _0x5d7f50;
|
|
796
|
+
}, "sSlkJ": function(_0x2e7774) {
|
|
797
|
+
return _0x2e7774();
|
|
798
|
+
}, "fTIRa": function(_0x47b85d, _0x2bb400) {
|
|
799
|
+
return _0x47b85d(_0x2bb400);
|
|
800
|
+
}, "bcUJB": "StreamableHTTP", "fEkjP": _0x2291e6(214), "ZqEaq": _0x2291e6(320), "KFXQU": function(_0x28aa72, _0x328ad1, _0x24276b) {
|
|
801
|
+
return _0x28aa72(_0x328ad1, _0x24276b);
|
|
802
|
+
}, "WliyP": function(_0x6e09e0, _0x311406) {
|
|
803
|
+
return _0x6e09e0(_0x311406);
|
|
804
|
+
}, "tcQpN": _0x2291e6(272), "yCUbW": function(_0x4d5b81, _0x53d7f6, _0x4823f3) {
|
|
805
|
+
return _0x4d5b81(_0x53d7f6, _0x4823f3);
|
|
806
|
+
}, "kzfhr": function(_0x2dce06, _0x3687b9) {
|
|
807
|
+
return _0x2dce06 === _0x3687b9;
|
|
808
|
+
}, "muQDP": function(_0x5a9f29, _0x16b2f2, _0x220bd4) {
|
|
809
|
+
return _0x5a9f29(_0x16b2f2, _0x220bd4);
|
|
810
|
+
}, "ImPVm": "mcp-stream-proxy-server", "cvMUn": function(_0x46d3e0, _0x2c310e, _0x2684e6) {
|
|
811
|
+
return _0x46d3e0(_0x2c310e, _0x2684e6);
|
|
812
|
+
}, "BGZnq": _0x2291e6(337), "gtTgN": function(_0x4e9af7, _0x548bef) {
|
|
813
|
+
return _0x4e9af7(_0x548bef);
|
|
814
|
+
}, "HWXAa": function(_0x57649b, _0x246eb9) {
|
|
815
|
+
return _0x57649b + _0x246eb9;
|
|
816
|
+
}, "gweEn": _0x2291e6(239), "TmlVG": "WebSocket", "PYRrS": "fulfilled" }, _0x243b2b = {}, _0xc92a32 = {}, _0x1a9767 = {}, _0x26b49a = {};
|
|
817
|
+
let _0x11fd3e = () => {
|
|
805
818
|
};
|
|
806
|
-
const
|
|
807
|
-
|
|
819
|
+
const _0x11e558 = (_0x573be7) => {
|
|
820
|
+
_0x11fd3e = _0x573be7;
|
|
808
821
|
};
|
|
809
|
-
let
|
|
822
|
+
let _0x4f384e = () => {
|
|
810
823
|
};
|
|
811
|
-
const
|
|
812
|
-
|
|
813
|
-
},
|
|
814
|
-
const
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
_0x49e752[_0xc7d5bf] = _0x5e557e, _0x310dfa["on"](_0x221f25[_0x28c90e(549)], () => {
|
|
820
|
-
const _0x5288fa = _0x28c90e;
|
|
821
|
-
_0x5e557e[_0x5288fa(594)](), delete _0x49e752[_0xc7d5bf], delete _0x284689[_0xc7d5bf];
|
|
824
|
+
const _0xb1dfd7 = (_0x44f0cc) => {
|
|
825
|
+
_0x4f384e = _0x44f0cc;
|
|
826
|
+
}, _0x539ed2 = async (_0x58908c, _0x3c813b, _0x374bfc) => {
|
|
827
|
+
const _0xcafd25 = _0x5639bd, _0x4ac3b3 = _0x2291e6, _0x553d45 = new SSEServerTransport(_0x374bfc, _0x3c813b), _0x2207df = _0x58908c["headers"]["sse-session-id"];
|
|
828
|
+
_0x2207df && (_0x553d45["_sessionId"] = _0x2207df);
|
|
829
|
+
const _0x2cf749 = _0x553d45["sessionId"];
|
|
830
|
+
_0x243b2b[_0x2cf749] = _0x553d45, _0x58908c["on"](_0x5e1a71[_0xcafd25(274)], () => {
|
|
831
|
+
_0x553d45["close"](), delete _0x243b2b[_0x2cf749], delete _0xc92a32[_0x2cf749];
|
|
822
832
|
});
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
const
|
|
826
|
-
|
|
827
|
-
const
|
|
828
|
-
|
|
829
|
-
const
|
|
830
|
-
|
|
831
|
-
const
|
|
832
|
-
|
|
833
|
-
const
|
|
834
|
-
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
833
|
+
const _0x5e8967 = {};
|
|
834
|
+
_0x5e8967[_0x4ac3b3(338)] = !![];
|
|
835
|
+
const _0x16e855 = {};
|
|
836
|
+
_0x16e855["subscribe"] = !![], _0x16e855[_0x4ac3b3(338)] = !![];
|
|
837
|
+
const _0x1b910e = {};
|
|
838
|
+
_0x1b910e[_0x4ac3b3(338)] = !![];
|
|
839
|
+
const _0x406a51 = {};
|
|
840
|
+
_0x406a51["listChanged"] = !![];
|
|
841
|
+
const _0x169d71 = {};
|
|
842
|
+
_0x169d71[_0x4ac3b3(328)] = _0x5e8967, _0x169d71["resources"] = _0x16e855, _0x169d71["tools"] = _0x1b910e, _0x169d71["completions"] = {}, _0x169d71["logging"] = {}, _0x169d71["roots"] = _0x406a51, _0x169d71[_0x4ac3b3(312)] = {}, _0x169d71["elicitation"] = {};
|
|
843
|
+
const _0x553488 = _0x169d71, _0x382087 = {};
|
|
844
|
+
_0x382087[_0x4ac3b3(238)] = _0x5e1a71["WGubu"], _0x382087[_0xcafd25(301)] = _0x5e1a71[_0x4ac3b3(213)];
|
|
845
|
+
const _0x31c28c = {};
|
|
846
|
+
_0x31c28c[_0x4ac3b3(317)] = _0x553488;
|
|
847
|
+
const _0x4d3d4b = new Client(_0x382087, _0x31c28c);
|
|
848
|
+
_0xc92a32[_0x2cf749] = { "client": _0x4d3d4b, "transport": _0x553d45, "user": _0x58908c[_0xcafd25(226)] || _0x58908c[_0x4ac3b3(310)], "device": _0x5e1a71[_0xcafd25(304)](getDeviceInfo, _0x58908c), "type": _0x5e1a71[_0xcafd25(254)] }, _0x553d45[_0xcafd25(278)] = (_0x23410b) => {
|
|
849
|
+
const _0x5327cb = _0xcafd25, _0x5968dd = {};
|
|
850
|
+
_0x5968dd["client"] = _0x4d3d4b, _0x5968dd[_0x5327cb(284)] = _0x553d45, _0x5968dd[_0x5327cb(275)] = _0x23410b, _0x5968dd["type"] = _0x5e1a71["CuDLn"], _0x11fd3e(_0x5968dd);
|
|
851
|
+
}, _0x5e1a71["GNsDw"](initTwinClientHandler, _0x4d3d4b, _0x553d45), await _0x4d3d4b[_0xcafd25(203)](_0x553d45);
|
|
852
|
+
}, _0x1e95b0 = async (_0x426fc1, _0x53614b, _0x12c7cf) => {
|
|
842
853
|
var _a;
|
|
843
|
-
const
|
|
844
|
-
if (!
|
|
845
|
-
|
|
854
|
+
const _0x4892fb = _0x2291e6, _0x2937be = _0x5639bd, _0x24d812 = _0x426fc1["query"][_0x4892fb(207)], _0x56fffd = (_a = _0xc92a32[_0x24d812]) == null ? void 0 : _a["client"];
|
|
855
|
+
if (!_0x56fffd) {
|
|
856
|
+
_0x53614b["status"](-11 * 505 + -9540 + 1 * 15495)[_0x4892fb(262)]("No client found for session ID " + _0x24d812);
|
|
846
857
|
return;
|
|
847
858
|
}
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
|
|
859
|
+
const _0x17bdb4 = new SSEServerTransport(_0x12c7cf, _0x53614b), _0x5513f9 = _0x17bdb4["sessionId"];
|
|
860
|
+
_0x1a9767[_0x5513f9] = _0x17bdb4, _0x426fc1["on"](_0x5e1a71["CZTzM"], () => {
|
|
861
|
+
_0x17bdb4["close"](), delete _0x1a9767[_0x5513f9], delete _0x26b49a[_0x5513f9];
|
|
851
862
|
});
|
|
852
|
-
const
|
|
853
|
-
|
|
854
|
-
const
|
|
855
|
-
|
|
856
|
-
const
|
|
857
|
-
|
|
858
|
-
const
|
|
859
|
-
|
|
860
|
-
const
|
|
861
|
-
|
|
862
|
-
const
|
|
863
|
-
|
|
864
|
-
const
|
|
865
|
-
|
|
866
|
-
const
|
|
867
|
-
|
|
868
|
-
}, await
|
|
869
|
-
},
|
|
870
|
-
const
|
|
871
|
-
|
|
872
|
-
},
|
|
873
|
-
const
|
|
874
|
-
if (
|
|
875
|
-
else
|
|
876
|
-
},
|
|
877
|
-
const
|
|
878
|
-
|
|
879
|
-
const
|
|
880
|
-
|
|
881
|
-
},
|
|
863
|
+
const _0x19440e = {};
|
|
864
|
+
_0x19440e["listChanged"] = !![];
|
|
865
|
+
const _0xe2c047 = {};
|
|
866
|
+
_0xe2c047[_0x2937be(249)] = !![], _0xe2c047["listChanged"] = !![];
|
|
867
|
+
const _0x339606 = {};
|
|
868
|
+
_0x339606[_0x4892fb(338)] = !![];
|
|
869
|
+
const _0x240e28 = {};
|
|
870
|
+
_0x240e28["prompts"] = _0x19440e, _0x240e28[_0x4892fb(340)] = _0xe2c047, _0x240e28["tools"] = _0x339606, _0x240e28["completions"] = {}, _0x240e28[_0x2937be(241)] = {};
|
|
871
|
+
const _0x1cabf9 = _0x240e28, _0x3cc7c9 = {};
|
|
872
|
+
_0x3cc7c9["name"] = _0x5e1a71["fUOrr"], _0x3cc7c9["version"] = _0x5e1a71["HwRPG"];
|
|
873
|
+
const _0x512484 = {};
|
|
874
|
+
_0x512484["capabilities"] = _0x1cabf9;
|
|
875
|
+
const _0x41a52f = new McpServer(_0x3cc7c9, _0x512484);
|
|
876
|
+
_0x26b49a[_0x5513f9] = { "mcpServer": _0x41a52f, "transport": _0x17bdb4, "client": _0x24d812, "user": _0x426fc1["auth"] || _0x426fc1[_0x4892fb(310)], "device": getDeviceInfo(_0x426fc1), "type": _0x5e1a71[_0x2937be(254)] }, _0x17bdb4["onerror"] = (_0x59da57) => {
|
|
877
|
+
const _0x4368d6 = _0x2937be, _0x1ca485 = _0x2937be, _0x5eadf2 = {};
|
|
878
|
+
_0x5eadf2[_0x4368d6(321)] = _0x41a52f, _0x5eadf2["transport"] = _0x17bdb4, _0x5eadf2[_0x4368d6(269)] = _0x24d812, _0x5eadf2[_0x1ca485(275)] = _0x59da57, _0x5eadf2[_0x4368d6(244)] = _0x4368d6(335), _0x4f384e(_0x5eadf2);
|
|
879
|
+
}, await _0x41a52f[_0x2937be(203)](_0x17bdb4), _0x5e1a71["GNsDw"](forwardProxyServer, _0x41a52f["server"], _0x56fffd);
|
|
880
|
+
}, _0x1a3e04 = async (_0x12f4e9, _0x5904a5) => {
|
|
881
|
+
const _0x4d4fd4 = _0x5639bd, _0x143856 = _0x2291e6, _0x2dce0c = _0x12f4e9[_0x4d4fd4(289)]["sessionId"], _0x43de07 = _0x243b2b[_0x2dce0c] || _0x1a9767[_0x2dce0c];
|
|
882
|
+
_0x43de07 ? await _0x43de07[_0x143856(305)](_0x12f4e9, _0x5904a5) : _0x5904a5["status"](2269 + 1 * -893 + -8 * 122)[_0x4d4fd4(262)](_0x143856(309));
|
|
883
|
+
}, _0x1b46da = async (_0x3ca457, _0x31fa6b) => {
|
|
884
|
+
const _0x5c0afa = _0x5639bd, _0xbbbeee = _0x5639bd;
|
|
885
|
+
if (_0x5e1a71[_0x5c0afa(259)](_0x3ca457[_0xbbbeee(341)], "POST")) await _0x472a74(_0x3ca457, _0x31fa6b);
|
|
886
|
+
else _0x5e1a71["azSTD"](_0x3ca457[_0xbbbeee(341)], _0x5e1a71["BuMZz"]) || _0x5e1a71["azSTD"](_0x3ca457[_0xbbbeee(341)], _0x5e1a71[_0xbbbeee(219)]) ? await _0x5e1a71[_0xbbbeee(282)](_0x12bd53, _0x3ca457, _0x31fa6b) : await _0x5e1a71["kggHK"](_0x388552, _0x31fa6b);
|
|
887
|
+
}, _0x388552 = async (_0xdbb902) => {
|
|
888
|
+
const _0x3c5dfb = _0x5639bd, _0x58b751 = _0x2291e6, _0x1a90dd = {};
|
|
889
|
+
_0x1a90dd[_0x3c5dfb(268)] = _0x5e1a71["OKiBt"];
|
|
890
|
+
const _0x3b4de6 = {};
|
|
891
|
+
_0x3b4de6["jsonrpc"] = _0x5e1a71["crLLx"], _0x3b4de6[_0x58b751(275)] = {}, _0x3b4de6["id"] = null, _0x3b4de6[_0x58b751(275)]["code"] = -32e3, _0x3b4de6[_0x58b751(275)]["message"] = _0x5e1a71["WcQJb"], _0xdbb902["writeHead"](-64 * 94 + 1370 + 5051, _0x1a90dd)["end"](JSON[_0x3c5dfb(234)](_0x3b4de6));
|
|
892
|
+
}, _0x12bd53 = async (_0x459e63, _0x3514b3) => {
|
|
882
893
|
var _a;
|
|
883
|
-
const
|
|
884
|
-
if (
|
|
885
|
-
await
|
|
886
|
-
const
|
|
887
|
-
delete
|
|
894
|
+
const _0x13b891 = _0x5639bd, _0x33ea02 = _0x2291e6, _0x23709e = _0x459e63["headers"][_0x5e1a71["uahNm"]], _0x18372e = _0x243b2b[_0x23709e];
|
|
895
|
+
if (_0x18372e) {
|
|
896
|
+
await _0x18372e[_0x13b891(205)](_0x459e63, _0x3514b3);
|
|
897
|
+
const _0x26bc37 = () => {
|
|
898
|
+
delete _0x243b2b[_0x23709e], delete _0xc92a32[_0x23709e];
|
|
888
899
|
};
|
|
889
|
-
if (
|
|
890
|
-
else
|
|
891
|
-
} else
|
|
892
|
-
},
|
|
893
|
-
const
|
|
900
|
+
if (_0x5e1a71["gptGR"](_0x459e63[_0x13b891(341)], _0x5e1a71[_0x33ea02(216)]) && ((_a = _0x459e63["headers"]["accept"]) == null ? void 0 : _a["includes"](_0x5e1a71[_0x33ea02(246)]))) _0x459e63[_0x13b891(273)](_0x5e1a71[_0x13b891(274)], _0x26bc37);
|
|
901
|
+
else _0x5e1a71[_0x33ea02(208)](_0x459e63[_0x13b891(341)], _0x5e1a71["zlCns"]) && _0x5e1a71["sSlkJ"](_0x26bc37);
|
|
902
|
+
} else _0x3514b3["status"](-550 + 9444 + -62 * 137)["send"]("Invalid or missing session ID");
|
|
903
|
+
}, _0x472a74 = async (_0x2a3ece, _0x5c8bcf) => {
|
|
904
|
+
const _0x3f5b52 = _0x5639bd, _0x5c94db = _0x5639bd;
|
|
894
905
|
try {
|
|
895
|
-
const
|
|
896
|
-
let
|
|
897
|
-
if (
|
|
906
|
+
const _0x52bc9a = _0x2a3ece["headers"]["mcp-session-id"], _0xc7383c = _0x2a3ece[_0x3f5b52(331)][_0x5e1a71[_0x5c94db(210)]];
|
|
907
|
+
let _0x167e59 = _0x243b2b[_0x52bc9a];
|
|
908
|
+
if (_0x167e59) await _0x167e59["handleRequest"](_0x2a3ece, _0x5c8bcf, _0x2a3ece["body"]);
|
|
898
909
|
else {
|
|
899
|
-
if (!
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
const
|
|
905
|
-
|
|
906
|
-
const
|
|
907
|
-
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
const
|
|
911
|
-
|
|
912
|
-
const
|
|
913
|
-
|
|
914
|
-
const
|
|
915
|
-
|
|
916
|
-
const
|
|
917
|
-
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
},
|
|
921
|
-
const
|
|
922
|
-
|
|
923
|
-
}, await
|
|
910
|
+
if (!_0x52bc9a && _0x5e1a71[_0x5c94db(304)](isInitializeRequest, _0x2a3ece[_0x3f5b52(248)])) {
|
|
911
|
+
const _0x455005 = {};
|
|
912
|
+
_0x455005["sessionIdGenerator"] = () => _0xc7383c, _0x167e59 = new StreamableHTTPServerTransport(_0x455005);
|
|
913
|
+
const _0x18772f = {};
|
|
914
|
+
_0x18772f["listChanged"] = !![];
|
|
915
|
+
const _0x693949 = {};
|
|
916
|
+
_0x693949["subscribe"] = !![], _0x693949["listChanged"] = !![];
|
|
917
|
+
const _0x13132b = {};
|
|
918
|
+
_0x13132b["listChanged"] = !![];
|
|
919
|
+
const _0x244ff5 = {};
|
|
920
|
+
_0x244ff5["listChanged"] = !![];
|
|
921
|
+
const _0x27a6f3 = {};
|
|
922
|
+
_0x27a6f3[_0x5c94db(328)] = _0x18772f, _0x27a6f3["resources"] = _0x693949, _0x27a6f3[_0x3f5b52(267)] = _0x13132b, _0x27a6f3["completions"] = {}, _0x27a6f3[_0x5c94db(241)] = {}, _0x27a6f3[_0x3f5b52(285)] = _0x244ff5, _0x27a6f3["sampling"] = {}, _0x27a6f3["elicitation"] = {};
|
|
923
|
+
const _0x13791b = _0x27a6f3, _0x591aee = {};
|
|
924
|
+
_0x591aee["name"] = _0x5e1a71["ZqEaq"], _0x591aee[_0x5c94db(301)] = _0x5e1a71["HwRPG"];
|
|
925
|
+
const _0x54ff00 = {};
|
|
926
|
+
_0x54ff00[_0x3f5b52(317)] = _0x13791b;
|
|
927
|
+
const _0x56bd0b = new Client(_0x591aee, _0x54ff00);
|
|
928
|
+
_0x5e1a71[_0x5c94db(221)](initTwinClientHandler, _0x56bd0b, _0x167e59), _0xc92a32[_0xc7383c] = { "client": _0x56bd0b, "transport": _0x167e59, "user": _0x2a3ece["auth"] || _0x2a3ece["user"], "device": _0x5e1a71[_0x3f5b52(206)](getDeviceInfo, _0x2a3ece), "type": _0x5e1a71["bcUJB"] }, _0x243b2b[_0xc7383c] = _0x167e59, _0x167e59[_0x3f5b52(252)] ? _0x167e59[_0x5c94db(252)][_0x5c94db(207)] = _0xc7383c : _0x167e59[_0x5c94db(207)] = _0xc7383c, _0x167e59[_0x3f5b52(314)] = () => {
|
|
929
|
+
const _0x565331 = _0x167e59["sessionId"];
|
|
930
|
+
_0x565331 && _0x243b2b[_0x565331] && (delete _0x243b2b[_0x565331], delete _0xc92a32[_0x565331]);
|
|
931
|
+
}, _0x167e59[_0x3f5b52(278)] = (_0x45b867) => {
|
|
932
|
+
const _0x2f910f = _0x5c94db;
|
|
933
|
+
_0x5e1a71[_0x2f910f(303)](_0x11fd3e, { "client": _0x56bd0b, "transport": _0x167e59, "error": _0x45b867, "type": _0x5e1a71["bcUJB"] });
|
|
934
|
+
}, await _0x56bd0b["connect"](_0x167e59), await _0x167e59[_0x3f5b52(205)](_0x2a3ece, _0x5c8bcf, _0x2a3ece["body"]);
|
|
924
935
|
} else {
|
|
925
|
-
const
|
|
926
|
-
|
|
936
|
+
const _0x3cca99 = {};
|
|
937
|
+
_0x3cca99[_0x5c94db(225)] = _0x5e1a71["crLLx"], _0x3cca99[_0x3f5b52(275)] = {}, _0x3cca99["id"] = null, _0x3cca99[_0x3f5b52(275)][_0x5c94db(202)] = -(-7746 + 5844 + 33902), _0x3cca99[_0x3f5b52(275)]["message"] = _0x5e1a71[_0x3f5b52(279)], _0x5c8bcf["status"](-7 * 141 + -1 * -7513 + 6 * -1021)["json"](_0x3cca99);
|
|
927
938
|
}
|
|
928
939
|
}
|
|
929
940
|
} catch {
|
|
930
|
-
if (!
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
const
|
|
934
|
-
|
|
941
|
+
if (!_0x5c8bcf[_0x3f5b52(233)]) {
|
|
942
|
+
const _0xb3f9d6 = {};
|
|
943
|
+
_0xb3f9d6[_0x3f5b52(202)] = -32603, _0xb3f9d6["message"] = "Internal server error";
|
|
944
|
+
const _0x33a1bb = {};
|
|
945
|
+
_0x33a1bb["jsonrpc"] = _0x5e1a71["crLLx"], _0x33a1bb[_0x5c94db(275)] = _0xb3f9d6, _0x33a1bb["id"] = null, _0x5c8bcf["status"](-4982 + 5301 + 181)["json"](_0x33a1bb);
|
|
935
946
|
}
|
|
936
947
|
}
|
|
937
|
-
},
|
|
938
|
-
const
|
|
939
|
-
if (
|
|
940
|
-
else
|
|
941
|
-
},
|
|
942
|
-
const
|
|
943
|
-
|
|
944
|
-
},
|
|
948
|
+
}, _0x3124bf = async (_0x377d8c, _0xa696f) => {
|
|
949
|
+
const _0x393684 = _0x2291e6, _0x1cecde = _0x2291e6;
|
|
950
|
+
if (_0x5e1a71[_0x393684(208)](_0x377d8c[_0x1cecde(341)], "POST")) await _0x5e1a71["yCUbW"](_0x3fd852, _0x377d8c, _0xa696f);
|
|
951
|
+
else _0x377d8c["method"] === _0x5e1a71[_0x393684(216)] || _0x5e1a71[_0x1cecde(271)](_0x377d8c["method"], "DELETE") ? await _0x5e1a71[_0x1cecde(307)](_0x2d8648, _0x377d8c, _0xa696f) : await _0x5e1a71[_0x1cecde(206)](_0x388552, _0xa696f);
|
|
952
|
+
}, _0x2d8648 = async (_0x2d1efa, _0x40f46f) => {
|
|
953
|
+
const _0x3fd616 = _0x5639bd, _0x56cd6d = _0x2d1efa["headers"][_0x5e1a71["uahNm"]], _0x2fb01b = _0x1a9767[_0x56cd6d];
|
|
954
|
+
_0x2fb01b ? (await _0x2fb01b["handleRequest"](_0x2d1efa, _0x40f46f), _0x5e1a71[_0x3fd616(259)](_0x2d1efa[_0x3fd616(341)], _0x5e1a71["zlCns"]) && (delete _0x1a9767[_0x56cd6d], delete _0x26b49a[_0x56cd6d])) : _0x40f46f[_0x3fd616(232)](-173 * -23 + -3 * -2749 + -54 * 219)["send"](_0x3fd616(306));
|
|
955
|
+
}, _0x3fd852 = async (_0x54c094, _0x304099) => {
|
|
945
956
|
var _a;
|
|
946
|
-
const
|
|
957
|
+
const _0x698917 = _0x5639bd, _0x16c550 = _0x2291e6;
|
|
947
958
|
try {
|
|
948
|
-
const
|
|
949
|
-
let
|
|
950
|
-
if (
|
|
959
|
+
const _0x47b312 = _0x54c094["headers"][_0x5e1a71["uahNm"]], _0x89ef2d = _0x54c094[_0x698917(289)]["sessionId"];
|
|
960
|
+
let _0x2e94c1 = _0x1a9767[_0x47b312];
|
|
961
|
+
if (_0x2e94c1) await _0x2e94c1["handleRequest"](_0x54c094, _0x304099, _0x54c094["body"]);
|
|
951
962
|
else {
|
|
952
|
-
if (!
|
|
953
|
-
const
|
|
954
|
-
if (!
|
|
955
|
-
|
|
963
|
+
if (!_0x47b312 && _0x5e1a71["fTIRa"](isInitializeRequest, _0x54c094[_0x698917(248)])) {
|
|
964
|
+
const _0x5437a4 = (_a = _0xc92a32[_0x89ef2d]) == null ? void 0 : _a["client"];
|
|
965
|
+
if (!_0x5437a4) {
|
|
966
|
+
_0x304099["status"](-9140 + -7339 * -1 + 71 * 31)["send"]("No client found for session ID " + _0x89ef2d);
|
|
956
967
|
return;
|
|
957
968
|
}
|
|
958
|
-
const
|
|
959
|
-
|
|
960
|
-
const
|
|
961
|
-
|
|
962
|
-
const
|
|
963
|
-
|
|
964
|
-
const
|
|
965
|
-
|
|
966
|
-
const
|
|
967
|
-
|
|
968
|
-
const
|
|
969
|
-
|
|
970
|
-
const
|
|
971
|
-
|
|
972
|
-
const
|
|
973
|
-
|
|
974
|
-
const
|
|
975
|
-
|
|
976
|
-
},
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
}, await
|
|
969
|
+
const _0x3921d8 = _0x1a9a7a["randomUUID"](), _0x17f978 = {};
|
|
970
|
+
_0x17f978[_0x16c550(330)] = () => _0x3921d8, _0x2e94c1 = new StreamableHTTPServerTransport(_0x17f978);
|
|
971
|
+
const _0x4c964b = {};
|
|
972
|
+
_0x4c964b["listChanged"] = !![];
|
|
973
|
+
const _0x13584e = {};
|
|
974
|
+
_0x13584e["subscribe"] = !![], _0x13584e[_0x698917(338)] = !![];
|
|
975
|
+
const _0x3d1790 = {};
|
|
976
|
+
_0x3d1790["listChanged"] = !![];
|
|
977
|
+
const _0x31bc09 = {};
|
|
978
|
+
_0x31bc09["prompts"] = _0x4c964b, _0x31bc09["resources"] = _0x13584e, _0x31bc09["tools"] = _0x3d1790, _0x31bc09[_0x16c550(231)] = {}, _0x31bc09[_0x16c550(241)] = {};
|
|
979
|
+
const _0x594354 = _0x31bc09, _0x36c823 = {};
|
|
980
|
+
_0x36c823[_0x16c550(238)] = _0x5e1a71[_0x698917(243)], _0x36c823[_0x16c550(301)] = _0x5e1a71[_0x698917(213)];
|
|
981
|
+
const _0x377b8a = {};
|
|
982
|
+
_0x377b8a["capabilities"] = _0x594354;
|
|
983
|
+
const _0x3c3ab1 = new McpServer(_0x36c823, _0x377b8a);
|
|
984
|
+
_0x26b49a[_0x3921d8] = { "mcpServer": _0x3c3ab1, "transport": _0x2e94c1, "client": _0x89ef2d, "user": _0x54c094["auth"] || _0x54c094[_0x16c550(310)], "device": _0x5e1a71["WliyP"](getDeviceInfo, _0x54c094), "type": _0x5e1a71["bcUJB"] }, _0x1a9767[_0x3921d8] = _0x2e94c1, _0x2e94c1[_0x698917(252)] ? _0x2e94c1["_webStandardTransport"]["sessionId"] = _0x3921d8 : _0x2e94c1["sessionId"] = _0x3921d8, _0x2e94c1["onclose"] = () => {
|
|
985
|
+
const _0x122b64 = _0x2e94c1["sessionId"];
|
|
986
|
+
_0x122b64 && _0x243b2b[_0x122b64] && (delete _0x1a9767[_0x122b64], delete _0x26b49a[_0x122b64]);
|
|
987
|
+
}, _0x2e94c1["onerror"] = (_0x37ed50) => {
|
|
988
|
+
const _0x52733b = _0x698917, _0x136c12 = _0x16c550, _0x40ee0b = {};
|
|
989
|
+
_0x40ee0b[_0x52733b(321)] = _0x3c3ab1, _0x40ee0b["transport"] = _0x2e94c1, _0x40ee0b["client"] = _0x89ef2d, _0x40ee0b[_0x136c12(275)] = _0x37ed50, _0x40ee0b["type"] = "StreamableHTTP", _0x4f384e(_0x40ee0b);
|
|
990
|
+
}, await _0x3c3ab1[_0x698917(203)](_0x2e94c1), _0x5e1a71["cvMUn"](forwardProxyServer, _0x3c3ab1["server"], _0x5437a4), await _0x2e94c1["handleRequest"](_0x54c094, _0x304099, _0x54c094[_0x16c550(248)]);
|
|
980
991
|
} else {
|
|
981
|
-
const
|
|
982
|
-
|
|
983
|
-
const _0xef886f = {};
|
|
984
|
-
_0xef886f["jsonrpc"] = _0x221f25[_0x565e5a(518)], _0xef886f["error"] = _0x5e3637, _0xef886f["id"] = null, _0x9d0172["status"](-652 + -1424 + 2476)[_0x565e5a(499)](_0xef886f);
|
|
992
|
+
const _0x2c88b4 = {};
|
|
993
|
+
_0x2c88b4["jsonrpc"] = _0x5e1a71["crLLx"], _0x2c88b4[_0x698917(275)] = {}, _0x2c88b4["id"] = null, _0x2c88b4[_0x698917(275)][_0x698917(202)] = -(16937 * -2 + 2531 + -1 * -63343), _0x2c88b4[_0x698917(275)][_0x698917(250)] = _0x5e1a71[_0x16c550(279)], _0x304099[_0x16c550(232)](4640 + 6435 + -1525 * 7)["json"](_0x2c88b4);
|
|
985
994
|
}
|
|
986
995
|
}
|
|
987
996
|
} catch {
|
|
988
|
-
if (!
|
|
989
|
-
const
|
|
990
|
-
|
|
997
|
+
if (!_0x304099["headersSent"]) {
|
|
998
|
+
const _0x46bf82 = {};
|
|
999
|
+
_0x46bf82[_0x698917(202)] = -32603, _0x46bf82[_0x698917(250)] = _0x5e1a71[_0x16c550(228)];
|
|
1000
|
+
const _0x3a1662 = {};
|
|
1001
|
+
_0x3a1662["jsonrpc"] = _0x698917(223), _0x3a1662["error"] = _0x46bf82, _0x3a1662["id"] = null, _0x304099["status"](-2452 + -803 + -1 * -3755)[_0x698917(295)](_0x3a1662);
|
|
991
1002
|
}
|
|
992
1003
|
}
|
|
993
|
-
},
|
|
994
|
-
const
|
|
995
|
-
|
|
996
|
-
const
|
|
997
|
-
|
|
998
|
-
const
|
|
999
|
-
|
|
1000
|
-
const
|
|
1001
|
-
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
const
|
|
1005
|
-
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1010
|
-
delete
|
|
1011
|
-
},
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1014
|
-
}, await
|
|
1015
|
-
},
|
|
1016
|
-
const
|
|
1004
|
+
}, _0x3156fc = async (_0x2f7032, _0x4c0577) => {
|
|
1005
|
+
const _0x310ca7 = _0x2291e6, _0x3c6fe1 = _0x5639bd, _0x48ad44 = new URL(_0x5e1a71["HWXAa"](_0x5e1a71[_0x310ca7(325)], _0x4c0577[_0x310ca7(324)])), _0x1d6b9a = _0x48ad44["searchParams"][_0x310ca7(302)]("sessionId"), _0x5f1da6 = new WebSocketServerTransport(_0x2f7032), _0xeb3ed0 = {};
|
|
1006
|
+
_0xeb3ed0["listChanged"] = !![];
|
|
1007
|
+
const _0x20e0a0 = {};
|
|
1008
|
+
_0x20e0a0[_0x3c6fe1(249)] = !![], _0x20e0a0["listChanged"] = !![];
|
|
1009
|
+
const _0x1da0a6 = {};
|
|
1010
|
+
_0x1da0a6["listChanged"] = !![];
|
|
1011
|
+
const _0x54ebea = {};
|
|
1012
|
+
_0x54ebea[_0x3c6fe1(338)] = !![];
|
|
1013
|
+
const _0x2e5615 = {};
|
|
1014
|
+
_0x2e5615["prompts"] = _0xeb3ed0, _0x2e5615[_0x310ca7(340)] = _0x20e0a0, _0x2e5615[_0x310ca7(267)] = _0x1da0a6, _0x2e5615[_0x3c6fe1(231)] = {}, _0x2e5615["logging"] = {}, _0x2e5615["roots"] = _0x54ebea, _0x2e5615["sampling"] = {}, _0x2e5615["elicitation"] = {};
|
|
1015
|
+
const _0x4bd42d = _0x2e5615, _0x4a67ff = {};
|
|
1016
|
+
_0x4a67ff[_0x3c6fe1(238)] = "mcp-socket-twin-client", _0x4a67ff[_0x3c6fe1(301)] = "1.0.0";
|
|
1017
|
+
const _0x2984f2 = {};
|
|
1018
|
+
_0x2984f2["capabilities"] = _0x4bd42d;
|
|
1019
|
+
const _0x5a2c36 = new Client(_0x4a67ff, _0x2984f2);
|
|
1020
|
+
initTwinClientHandler(_0x5a2c36, _0x5f1da6), _0xc92a32[_0x1d6b9a] = { "client": _0x5a2c36, "transport": _0x5f1da6, "user": _0x4c0577[_0x3c6fe1(310)], "device": _0x5e1a71[_0x310ca7(304)](getDeviceInfo, _0x4c0577), "type": _0x5e1a71[_0x310ca7(227)] }, _0x243b2b[_0x1d6b9a] = _0x5f1da6, _0x5f1da6[_0x3c6fe1(207)] = _0x1d6b9a, _0x5f1da6[_0x3c6fe1(314)] = () => {
|
|
1021
|
+
delete _0x243b2b[_0x1d6b9a], delete _0xc92a32[_0x1d6b9a];
|
|
1022
|
+
}, _0x5f1da6["onerror"] = (_0x46c561) => {
|
|
1023
|
+
const _0x33104b = _0x310ca7, _0x526a22 = _0x3c6fe1, _0x16e60d = {};
|
|
1024
|
+
_0x16e60d["client"] = _0x5a2c36, _0x16e60d[_0x33104b(284)] = _0x5f1da6, _0x16e60d[_0x526a22(275)] = _0x46c561, _0x16e60d[_0x526a22(244)] = "WebSocket", _0x5e1a71["gtTgN"](_0x11fd3e, _0x16e60d);
|
|
1025
|
+
}, await _0x5a2c36["connect"](_0x5f1da6);
|
|
1026
|
+
}, _0x558163 = () => {
|
|
1027
|
+
const _0x36f8ac = _0x2291e6, _0xf4872e = _0x2291e6;
|
|
1017
1028
|
try {
|
|
1018
|
-
Object["values"](
|
|
1029
|
+
Object["values"](_0x243b2b)[_0x36f8ac(217)]((_0x1a7671) => _0x1a7671[_0xf4872e(251)]()), Object[_0xf4872e(257)](_0x1a9767)["forEach"]((_0x56ba51) => _0x56ba51[_0xf4872e(251)]()), Object["values"](_0xc92a32)["forEach"]((_0x3099b5) => _0x3099b5["client"][_0xf4872e(251)]()), Object[_0xf4872e(257)](_0x26b49a)[_0x36f8ac(217)]((_0x189756) => _0x189756[_0x36f8ac(321)][_0xf4872e(251)]());
|
|
1019
1030
|
} catch {
|
|
1020
1031
|
}
|
|
1021
1032
|
try {
|
|
1022
|
-
Object[
|
|
1033
|
+
Object[_0xf4872e(339)](_0x243b2b)["forEach"]((_0x4461f1) => delete _0x243b2b[_0x4461f1]), Object["keys"](_0x1a9767)["forEach"]((_0x18f9be) => delete _0x1a9767[_0x18f9be]), Object["keys"](_0xc92a32)["forEach"]((_0x36abc8) => delete _0xc92a32[_0x36abc8]), Object[_0xf4872e(339)](_0x26b49a)[_0x36f8ac(217)]((_0x2238c1) => delete _0x26b49a[_0x2238c1]);
|
|
1023
1034
|
} catch {
|
|
1024
1035
|
}
|
|
1025
1036
|
return {};
|
|
1026
|
-
},
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1029
|
-
return
|
|
1030
|
-
},
|
|
1031
|
-
|
|
1032
|
-
|
|
1037
|
+
}, _0x4b6109 = async () => {
|
|
1038
|
+
const _0x25b4c1 = _0x5639bd, _0x3cd5e2 = _0x5639bd, _0x408d60 = {};
|
|
1039
|
+
_0x408d60[_0x25b4c1(255)] = function(_0x2199b0, _0x2e6d9e) {
|
|
1040
|
+
return _0x2199b0 !== _0x2e6d9e;
|
|
1041
|
+
}, _0x408d60[_0x25b4c1(318)] = function(_0x3cabfc, _0x1f1f21) {
|
|
1042
|
+
return _0x3cabfc === _0x1f1f21;
|
|
1043
|
+
}, _0x408d60[_0x3cd5e2(201)] = _0x5e1a71["PYRrS"];
|
|
1044
|
+
const _0x33f1f7 = _0x408d60, _0x12aab7 = Object["keys"](_0xc92a32)["map"](async (_0x5a39c4) => {
|
|
1045
|
+
const _0x4b4d03 = _0x3cd5e2, _0x4ff78c = _0x25b4c1, { client: _0x2f3026 } = _0xc92a32[_0x5a39c4];
|
|
1033
1046
|
try {
|
|
1034
|
-
const
|
|
1035
|
-
return { "sessionId":
|
|
1047
|
+
const _0x5be026 = await _0x2f3026["ping"]();
|
|
1048
|
+
return { "sessionId": _0x5a39c4, "shouldClose": Object["keys"](_0x5be026)[_0x4b4d03(224)] !== -2712 + -44 * 39 + 108 * 41 };
|
|
1036
1049
|
} catch {
|
|
1037
|
-
const
|
|
1038
|
-
return
|
|
1050
|
+
const _0x1ea4de = {};
|
|
1051
|
+
return _0x1ea4de[_0x4ff78c(207)] = _0x5a39c4, _0x1ea4de["shouldClose"] = !![], _0x1ea4de;
|
|
1039
1052
|
}
|
|
1040
|
-
}),
|
|
1041
|
-
const
|
|
1053
|
+
}), _0x237578 = Object["keys"](_0x26b49a)[_0x3cd5e2(287)](async (_0x2520d3) => {
|
|
1054
|
+
const _0x28d6f6 = _0x3cd5e2, _0x167100 = _0x3cd5e2, { mcpServer: _0x3de407 } = _0x26b49a[_0x2520d3];
|
|
1042
1055
|
try {
|
|
1043
|
-
const
|
|
1044
|
-
return { "sessionId":
|
|
1056
|
+
const _0xda04f2 = await _0x3de407["server"][_0x28d6f6(229)]();
|
|
1057
|
+
return { "sessionId": _0x2520d3, "shouldClose": _0x33f1f7[_0x28d6f6(255)](Object[_0x167100(339)](_0xda04f2)["length"], 2269 + -183 * 15 + 14 * 34) };
|
|
1045
1058
|
} catch {
|
|
1046
|
-
const
|
|
1047
|
-
return
|
|
1059
|
+
const _0x2ac45f = {};
|
|
1060
|
+
return _0x2ac45f[_0x28d6f6(207)] = _0x2520d3, _0x2ac45f[_0x167100(235)] = !![], _0x2ac45f;
|
|
1048
1061
|
}
|
|
1049
|
-
}), [
|
|
1050
|
-
|
|
1051
|
-
const
|
|
1052
|
-
|
|
1053
|
-
}),
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1062
|
+
}), [_0x20f18d, _0x907351] = await Promise[_0x3cd5e2(277)]([Promise[_0x3cd5e2(293)](_0x12aab7), Promise[_0x25b4c1(293)](_0x237578)]), _0x28db73 = [], _0x42e0d7 = [];
|
|
1063
|
+
_0x20f18d[_0x25b4c1(217)]((_0x4fbe8f) => {
|
|
1064
|
+
const _0x5e2d59 = _0x3cd5e2, _0x5bb210 = _0x25b4c1;
|
|
1065
|
+
_0x33f1f7[_0x5e2d59(318)](_0x4fbe8f["status"], _0x33f1f7[_0x5bb210(201)]) && _0x4fbe8f[_0x5e2d59(316)][_0x5e2d59(235)] && _0x28db73["push"](_0x4fbe8f["value"][_0x5e2d59(207)]);
|
|
1066
|
+
}), _0x907351[_0x25b4c1(217)]((_0x2de243) => {
|
|
1067
|
+
const _0x33cd9c = _0x25b4c1, _0x57c900 = _0x3cd5e2;
|
|
1068
|
+
_0x2de243[_0x33cd9c(232)] === _0x5e1a71[_0x57c900(292)] && _0x2de243[_0x57c900(316)]["shouldClose"] && _0x42e0d7[_0x33cd9c(319)](_0x2de243["value"][_0x57c900(207)]);
|
|
1056
1069
|
});
|
|
1057
|
-
const
|
|
1070
|
+
const _0x674358 = _0x28db73[_0x3cd5e2(287)](async (_0x101662) => {
|
|
1058
1071
|
var _a, _b;
|
|
1059
|
-
const _0x59cf2b = _0x316bbf;
|
|
1060
1072
|
try {
|
|
1061
|
-
(_a =
|
|
1073
|
+
(_a = _0x243b2b[_0x101662]) == null ? void 0 : _a["close"](), (_b = _0xc92a32[_0x101662]) == null ? void 0 : _b["client"]["close"]();
|
|
1062
1074
|
} catch {
|
|
1063
1075
|
}
|
|
1064
1076
|
try {
|
|
1065
|
-
delete
|
|
1077
|
+
delete _0x243b2b[_0x101662], delete _0xc92a32[_0x101662];
|
|
1066
1078
|
} catch {
|
|
1067
1079
|
}
|
|
1068
|
-
}),
|
|
1080
|
+
}), _0x1b0edc = _0x42e0d7["map"](async (_0x347e37) => {
|
|
1069
1081
|
var _a, _b;
|
|
1070
|
-
const _0x5deb25 = _0x316bbf;
|
|
1071
1082
|
try {
|
|
1072
|
-
(_a =
|
|
1083
|
+
(_a = _0x1a9767[_0x347e37]) == null ? void 0 : _a["close"](), (_b = _0x26b49a[_0x347e37]) == null ? void 0 : _b["mcpServer"]["close"]();
|
|
1073
1084
|
} catch {
|
|
1074
1085
|
}
|
|
1075
1086
|
try {
|
|
1076
|
-
delete
|
|
1087
|
+
delete _0x1a9767[_0x347e37], delete _0x26b49a[_0x347e37];
|
|
1077
1088
|
} catch {
|
|
1078
1089
|
}
|
|
1079
1090
|
});
|
|
1080
|
-
await Promise[
|
|
1081
|
-
const
|
|
1082
|
-
return
|
|
1083
|
-
},
|
|
1084
|
-
return
|
|
1091
|
+
await Promise[_0x25b4c1(293)]([..._0x674358, ..._0x1b0edc]);
|
|
1092
|
+
const _0x2b4383 = {};
|
|
1093
|
+
return _0x2b4383["clientSessions"] = _0x28db73, _0x2b4383[_0x3cd5e2(280)] = _0x42e0d7, _0x2b4383;
|
|
1094
|
+
}, _0x57e304 = {};
|
|
1095
|
+
return _0x57e304[_0x5639bd(204)] = _0x539ed2, _0x57e304["handleSseInspector"] = _0x1e95b0, _0x57e304[_0x5639bd(332)] = _0x1a3e04, _0x57e304[_0x2291e6(298)] = _0x1b46da, _0x57e304[_0x5639bd(256)] = _0x3124bf, _0x57e304[_0x2291e6(327)] = _0x3156fc, _0x57e304["clients"] = _0xc92a32, _0x57e304[_0x5639bd(212)] = _0x26b49a, _0x57e304["transports"] = _0x243b2b, _0x57e304[_0x2291e6(230)] = _0x1a9767, _0x57e304[_0x5639bd(240)] = _0x558163, _0x57e304["ping"] = _0x4b6109, _0x57e304[_0x5639bd(220)] = _0x11e558, _0x57e304["onRemoterError"] = _0xb1dfd7, _0x57e304;
|
|
1085
1096
|
};
|
|
1086
1097
|
export {
|
|
1087
1098
|
ACCESS_TOKEN_EXPIRES_IN,
|
|
@@ -1098,5 +1109,6 @@ export {
|
|
|
1098
1109
|
createAuthMiddleware,
|
|
1099
1110
|
createAuthRouter,
|
|
1100
1111
|
jwtAuth,
|
|
1112
|
+
lockCors,
|
|
1101
1113
|
useProxyHandles
|
|
1102
1114
|
};
|