chaimi-keep-mcp 3.5.0-beta.2 → 3.5.0-beta.21

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/oauth.js CHANGED
@@ -1,562 +1 @@
1
- /**
2
- * OAuth Device Flow 管理器
3
- * 实现 OAuth 2.0 Device Authorization Grant
4
- * 支持双模式:URL Scheme(浏览器环境)/ 纯 Device Flow(CLI环境)
5
- */
6
-
7
- const fetch = require('node-fetch');
8
- const { exec } = require('child_process');
9
- const util = require('util');
10
- const execPromise = util.promisify(exec);
11
- const crypto = require('crypto');
12
-
13
- class OAuthManager {
14
- constructor(config) {
15
- this.mcpOAuthUrl = config.mcpOAuthUrl;
16
- this.tokenStorage = config.tokenStorage;
17
- this.onQrCode = config.onQrCode;
18
- this.onTokenReady = config.onTokenReady;
19
- this.preferUrlScheme = config.preferUrlScheme !== false;
20
- }
21
-
22
- async detectEnvironment() {
23
- if (process.env.DISPLAY) {
24
- return { supportsBrowser: true, platform: 'linux-gui' };
25
- }
26
-
27
- if (process.platform === 'darwin') {
28
- return { supportsBrowser: true, platform: 'macos' };
29
- }
30
-
31
- if (process.platform === 'win32') {
32
- return { supportsBrowser: true, platform: 'windows' };
33
- }
34
-
35
- if (process.env.BROWSER) {
36
- return { supportsBrowser: true, platform: 'custom' };
37
- }
38
-
39
- return { supportsBrowser: false, platform: 'cli' };
40
- }
41
-
42
- async startAuthFlow() {
43
- try {
44
- const env = await this.detectEnvironment();
45
- const useUrlScheme = this.preferUrlScheme && env.supportsBrowser;
46
- const deviceCodeRes = await this.requestDeviceCode(useUrlScheme);
47
-
48
- await this.saveAuthState({
49
- deviceCode: deviceCodeRes.deviceCode,
50
- userCode: deviceCodeRes.userCode,
51
- timestamp: Date.now(),
52
- status: 'pending'
53
- });
54
-
55
- if (useUrlScheme && deviceCodeRes.urlScheme) {
56
- await this.authorizeWithUrlScheme(deviceCodeRes);
57
- } else {
58
- await this.authorizeWithDeviceFlow(deviceCodeRes);
59
- }
60
-
61
- // 3. 轮询获取 Token
62
- // 注意:使用 console.error,避免污染 stdout(MCP 协议通信使用 stdout)
63
- console.error('');
64
- console.error('⏳ 等待用户授权,请勿关闭窗口...');
65
- console.error(' (请在手机微信中完成授权操作)');
66
- console.error('');
67
- const token = await this.pollForToken(
68
- deviceCodeRes.deviceCode,
69
- deviceCodeRes.interval * 1000 || 5000
70
- );
71
-
72
- await this.tokenStorage.save(token);
73
-
74
- if (this.onTokenReady) {
75
- this.onTokenReady(token);
76
- }
77
-
78
- return token;
79
- } catch (err) {
80
- throw err;
81
- }
82
- }
83
-
84
- async authorizeWithUrlScheme(deviceCodeRes) {
85
- const isMobile = this.detectMobileEnvironment();
86
-
87
- if (isMobile) {
88
- const url = deviceCodeRes.urlScheme || deviceCodeRes.verificationUriFull;
89
-
90
- try {
91
- await this.openBrowser(url);
92
- } catch (err) {
93
- }
94
- } else {
95
- const qrCodeUrl = `https://mcp.chaihuo.com/auth?deviceCode=${deviceCodeRes.deviceCode}&userCode=${deviceCodeRes.userCode}`;
96
-
97
- if (this.onQrCode) {
98
- await this.onQrCode({
99
- userCode: deviceCodeRes.userCode,
100
- verificationUri: deviceCodeRes.verificationUri,
101
- deviceCode: deviceCodeRes.deviceCode,
102
- qrCodeUrl: qrCodeUrl,
103
- isPC: true
104
- });
105
- }
106
- }
107
- }
108
-
109
- detectMobileEnvironment() {
110
- const userAgent = process.env.USER_AGENT || '';
111
- if (/iPhone|iPad|iPod|Android|Mobile/i.test(userAgent)) {
112
- return true;
113
- }
114
-
115
- if (process.env.TERM_PROGRAM === 'Apple_Terminal' && process.platform === 'darwin') {
116
- return false;
117
- }
118
-
119
- return false;
120
- }
121
-
122
- async authorizeWithDeviceFlow(deviceCodeRes) {
123
- if (this.onQrCode) {
124
- await this.onQrCode({
125
- userCode: deviceCodeRes.userCode,
126
- verificationUri: deviceCodeRes.verificationUri,
127
- deviceCode: deviceCodeRes.deviceCode
128
- });
129
- }
130
- }
131
-
132
- async openBrowser(url) {
133
- const platform = process.platform;
134
- let command;
135
-
136
- if (platform === 'darwin') {
137
- command = `open "${url}"`;
138
- } else if (platform === 'win32') {
139
- command = `start "" "${url}"`;
140
- } else if (platform === 'linux') {
141
- command = `xdg-open "${url}"`;
142
- } else {
143
- throw new Error('不支持的平台');
144
- }
145
-
146
- await execPromise(command);
147
- }
148
-
149
- async requestDeviceCode(useUrlScheme = false) {
150
- const response = await fetch(this.mcpOAuthUrl, {
151
- method: 'POST',
152
- headers: {
153
- 'Content-Type': 'application/json'
154
- },
155
- body: JSON.stringify({
156
- tool: 'deviceCode',
157
- params: {
158
- clientId: 'chaihuo-mcp-client',
159
- useUrlScheme: useUrlScheme
160
- }
161
- })
162
- });
163
-
164
- const result = await response.json();
165
-
166
- if (!result.success) {
167
- throw new Error(`获取设备码失败: ${result.error}`);
168
- }
169
-
170
- return result.data;
171
- }
172
-
173
- // 单次轮询(用于后台轮询)
174
- async pollForTokenOnce(deviceCode) {
175
- try {
176
- const response = await fetch(this.mcpOAuthUrl, {
177
- method: 'POST',
178
- headers: {
179
- 'Content-Type': 'application/json'
180
- },
181
- body: JSON.stringify({
182
- tool: 'deviceToken',
183
- params: {
184
- deviceCode
185
- }
186
- })
187
- });
188
-
189
- const result = await response.json();
190
-
191
- if (result.success) {
192
- return {
193
- accessToken: result.data.accessToken,
194
- refreshToken: result.data.refreshToken,
195
- expiresIn: result.data.expiresIn,
196
- tokenType: result.data.tokenType,
197
- expiresAt: Date.now() + result.data.expiresIn * 1000
198
- };
199
- }
200
-
201
- if (result.error === 'authorization_pending') {
202
- return null; // 还未授权,返回 null
203
- }
204
-
205
- if (result.error === 'expired_token') {
206
- throw new Error('设备码已过期,请重新授权');
207
- }
208
-
209
- if (result.error === 'invalid_device_code') {
210
- throw new Error('无效的设备码');
211
- }
212
-
213
- throw new Error(`获取 Token 失败: ${result.error}`);
214
- } catch (err) {
215
- throw err;
216
- }
217
- }
218
-
219
- async pollForToken(deviceCode, interval) {
220
- const maxAttempts = 60;
221
- let attempts = 0;
222
-
223
- while (attempts < maxAttempts) {
224
- attempts++;
225
-
226
- await this.delay(interval);
227
-
228
- try {
229
- const token = await this.pollForTokenOnce(deviceCode);
230
- if (token) {
231
- return token;
232
- }
233
- // 未授权,继续轮询
234
- } catch (err) {
235
- if (err.message.includes('expired') || err.message.includes('invalid')) {
236
- throw err;
237
- }
238
- // 其他错误,继续轮询
239
- }
240
- }
241
-
242
- throw new Error('授权超时,请重新尝试');
243
- }
244
-
245
- async refreshToken() {
246
- const currentToken = await this.tokenStorage.load();
247
-
248
- if (!currentToken || !currentToken.refreshToken) {
249
- throw new Error('没有可用的 Refresh Token,需要重新授权');
250
- }
251
-
252
- try {
253
- const response = await fetch(this.mcpOAuthUrl, {
254
- method: 'POST',
255
- headers: {
256
- 'Content-Type': 'application/json'
257
- },
258
- body: JSON.stringify({
259
- tool: 'refreshToken',
260
- params: {
261
- refreshToken: currentToken.refreshToken
262
- }
263
- })
264
- });
265
-
266
- const result = await response.json();
267
-
268
- if (!result.success) {
269
- if (result.error === 'refresh_token_expired') {
270
- throw new Error('Refresh Token 已过期,需要重新授权');
271
- }
272
- throw new Error(`刷新 Token 失败: ${result.error}`);
273
- }
274
-
275
- const newToken = {
276
- accessToken: result.data.accessToken,
277
- refreshToken: result.data.refreshToken,
278
- expiresIn: result.data.expiresIn,
279
- tokenType: result.data.tokenType,
280
- expiresAt: Date.now() + result.data.expiresIn * 1000
281
- };
282
-
283
- await this.tokenStorage.save(newToken);
284
-
285
- return newToken;
286
- } catch (err) {
287
- throw err;
288
- }
289
- }
290
-
291
- async getValidToken() {
292
- const token = await this.tokenStorage.load();
293
-
294
- if (!token) {
295
- throw new Error('没有存储的 Token,请先授权');
296
- }
297
-
298
- const refreshThreshold = 5 * 60 * 1000;
299
- if (Date.now() + refreshThreshold > token.expiresAt) {
300
- return await this.refreshToken();
301
- }
302
-
303
- return token;
304
- }
305
-
306
- delay(ms) {
307
- return new Promise(resolve => setTimeout(resolve, ms));
308
- }
309
-
310
- async saveAuthState(state) {
311
- try {
312
- const fs = require('fs').promises;
313
- const path = require('path');
314
- const os = require('os');
315
- // 使用新的配置路径 ~/.chaimi-keep/
316
- const stateFile = path.join(os.homedir(), '.chaimi-keep', 'auth-state.json');
317
-
318
- const dir = path.dirname(stateFile);
319
- await fs.mkdir(dir, { recursive: true });
320
- // 设置目录权限 0700
321
- await fs.chmod(dir, 0o700).catch(() => {});
322
-
323
- await fs.writeFile(
324
- stateFile,
325
- JSON.stringify(state, null, 2),
326
- { mode: 0o600 }
327
- );
328
- } catch (err) {
329
- }
330
- }
331
-
332
- async loadAuthState() {
333
- try {
334
- const fs = require('fs').promises;
335
- const path = require('path');
336
- const os = require('os');
337
- // 使用新的配置路径 ~/.chaimi-keep/
338
- const stateFile = path.join(os.homedir(), '.chaimi-keep', 'auth-state.json');
339
-
340
- const data = await fs.readFile(stateFile, 'utf8');
341
- return JSON.parse(data);
342
- } catch (err) {
343
- if (err.code === 'ENOENT') {
344
- return null;
345
- }
346
- return null;
347
- }
348
- }
349
-
350
- async clearAuthState() {
351
- try {
352
- const fs = require('fs').promises;
353
- const path = require('path');
354
- const os = require('os');
355
- // 使用新的配置路径 ~/.chaimi-keep/
356
- const stateFile = path.join(os.homedir(), '.chaimi-keep', 'auth-state.json');
357
- await fs.unlink(stateFile);
358
- } catch (err) {
359
- }
360
- }
361
-
362
- isAuthStateExpired(state, maxAge = 30 * 60 * 1000) {
363
- // 优先检查 expiresAt(如果存在)
364
- if (state && state.expiresAt) {
365
- return Date.now() > state.expiresAt;
366
- }
367
- // 兼容旧版本,检查 timestamp
368
- if (!state || !state.timestamp) return true;
369
- return Date.now() - state.timestamp > maxAge;
370
- }
371
- }
372
-
373
- class TokenStorage {
374
- async save(token) {
375
- throw new Error('TokenStorage.save 必须被子类实现');
376
- }
377
-
378
- async load() {
379
- throw new Error('TokenStorage.load 必须被子类实现');
380
- }
381
-
382
- async clear() {
383
- throw new Error('TokenStorage.clear 必须被子类实现');
384
- }
385
- }
386
-
387
- // 生成机器唯一标识(用于加密密钥)
388
- function getMachineId() {
389
- const os = require('os');
390
- const interfaces = os.networkInterfaces();
391
- let macAddress = '';
392
-
393
- // 获取第一个非本地 MAC 地址
394
- for (const name of Object.keys(interfaces)) {
395
- for (const iface of interfaces[name]) {
396
- if (iface.mac && iface.mac !== '00:00:00:00:00:00') {
397
- macAddress = iface.mac;
398
- break;
399
- }
400
- }
401
- if (macAddress) break;
402
- }
403
-
404
- // 结合主机名和平台信息生成密钥
405
- const keyMaterial = `${macAddress}-${os.hostname()}-${os.platform()}`;
406
- return crypto.createHash('sha256').update(keyMaterial).digest('hex').substring(0, 32);
407
- }
408
-
409
- // 加密 Token
410
- function encryptToken(token, key) {
411
- const iv = crypto.randomBytes(16);
412
- const cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(key), iv);
413
- let encrypted = cipher.update(JSON.stringify(token), 'utf8', 'hex');
414
- encrypted += cipher.final('hex');
415
- return iv.toString('hex') + ':' + encrypted;
416
- }
417
-
418
- // 解密 Token
419
- function decryptToken(encryptedData, key) {
420
- const parts = encryptedData.split(':');
421
- const iv = Buffer.from(parts[0], 'hex');
422
- const encrypted = parts[1];
423
- const decipher = crypto.createDecipheriv('aes-256-cbc', Buffer.from(key), iv);
424
- let decrypted = decipher.update(encrypted, 'hex', 'utf8');
425
- decrypted += decipher.final('utf8');
426
- return JSON.parse(decrypted);
427
- }
428
-
429
- class FileTokenStorage extends TokenStorage {
430
- constructor(filePath) {
431
- super();
432
- this.filePath = filePath;
433
- this.fs = require('fs').promises;
434
- this.path = require('path');
435
- this.key = getMachineId();
436
- }
437
-
438
- async save(token) {
439
- const dir = this.path.dirname(this.filePath);
440
- await this.fs.mkdir(dir, { recursive: true });
441
-
442
- // 加密 Token 后保存
443
- const encrypted = encryptToken(token, this.key);
444
- const data = {
445
- version: '2.0',
446
- encrypted: encrypted,
447
- algorithm: 'aes-256-cbc',
448
- updatedAt: new Date().toISOString()
449
- };
450
-
451
- // 修复:正确使用 fs.writeFile 参数
452
- await this.fs.writeFile(
453
- this.filePath,
454
- JSON.stringify(data, null, 2),
455
- 'utf8'
456
- );
457
-
458
- // 设置文件权限
459
- await this.fs.chmod(this.filePath, 0o600);
460
- }
461
-
462
- async load() {
463
- try {
464
- const data = await this.fs.readFile(this.filePath, 'utf8');
465
- const parsed = JSON.parse(data);
466
-
467
- // 向后兼容:检测旧版明文格式
468
- if (!parsed.version || parsed.version === '1.0') {
469
- console.error('检测到旧版 Token 格式,自动升级...');
470
- // 返回明文数据,但下次保存时会自动加密
471
- return {
472
- accessToken: parsed.accessToken,
473
- refreshToken: parsed.refreshToken,
474
- expiresAt: parsed.expiresAt,
475
- expiresIn: parsed.expiresIn,
476
- tokenType: parsed.tokenType
477
- };
478
- }
479
-
480
- // 新版加密格式,解密后返回
481
- return decryptToken(parsed.encrypted, this.key);
482
- } catch (err) {
483
- if (err.code === 'ENOENT') {
484
- return null;
485
- }
486
- throw err;
487
- }
488
- }
489
-
490
- async clear() {
491
- try {
492
- await this.fs.unlink(this.filePath);
493
- } catch (err) {
494
- if (err.code !== 'ENOENT') {
495
- throw err;
496
- }
497
- }
498
- }
499
-
500
- // 【新增】保存 Agent 名称(不修改授权流程,仅用于记账回复)
501
- async saveAgentName(agentName) {
502
- try {
503
- const agentNamePath = this.path.join(this.path.dirname(this.filePath), 'agent-name.json');
504
- const data = {
505
- agentName: agentName || '柴米AI助手',
506
- updatedAt: new Date().toISOString()
507
- };
508
- // 使用 JSON.stringify 并转义处理,确保中文正常显示(不转义为 \uXXXX)
509
- const jsonStr = JSON.stringify(data, null, 2)
510
- .replace(/\\u[\dA-F]{4}/gi, (match) =>
511
- String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16)));
512
- await this.fs.writeFile(agentNamePath, jsonStr, 'utf8');
513
- console.error('✅ Agent 名称已保存:', agentNamePath);
514
- } catch (err) {
515
- console.error('❌ 保存 Agent 名称失败:', err.message);
516
- }
517
- }
518
-
519
- // 【新增】读取 Agent 名称
520
- async loadAgentName() {
521
- try {
522
- const agentNamePath = this.path.join(this.path.dirname(this.filePath), 'agent-name.json');
523
- const data = await this.fs.readFile(agentNamePath, 'utf8');
524
- const parsed = JSON.parse(data);
525
- return parsed.agentName || '柴米AI助手';
526
- } catch (err) {
527
- return '柴米AI助手';
528
- }
529
- }
530
-
531
- // 【新增】保存 deviceCode
532
- async saveDeviceCode(deviceCode) {
533
- try {
534
- const deviceCodePath = this.path.join(this.path.dirname(this.filePath), 'device-code.json');
535
- const data = {
536
- deviceCode,
537
- updatedAt: new Date().toISOString()
538
- };
539
- await this.fs.writeFile(deviceCodePath, JSON.stringify(data, null, 2), 'utf8');
540
- } catch (err) {
541
- // 忽略错误
542
- }
543
- }
544
-
545
- // 【新增】读取 deviceCode
546
- async loadDeviceCode() {
547
- try {
548
- const deviceCodePath = this.path.join(this.path.dirname(this.filePath), 'device-code.json');
549
- const data = await this.fs.readFile(deviceCodePath, 'utf8');
550
- const parsed = JSON.parse(data);
551
- return parsed.deviceCode;
552
- } catch (err) {
553
- return null;
554
- }
555
- }
556
- }
557
-
558
- module.exports = {
559
- OAuthManager,
560
- TokenStorage,
561
- FileTokenStorage
562
- };
1
+ const _0x3ebd0c=_0x12e2;(function(_0x3211dd,_0x3e93a3){const _0xe6a9af=_0x12e2,_0x2d8bd1=_0x3211dd();while(!![]){try{const _0x586c57=parseInt(_0xe6a9af(0x2cb))/0x1*(-parseInt(_0xe6a9af(0x261))/0x2)+-parseInt(_0xe6a9af(0x1bb))/0x3+-parseInt(_0xe6a9af(0x28b))/0x4*(-parseInt(_0xe6a9af(0x2cf))/0x5)+-parseInt(_0xe6a9af(0x209))/0x6+parseInt(_0xe6a9af(0x248))/0x7+parseInt(_0xe6a9af(0x2e4))/0x8*(parseInt(_0xe6a9af(0x2bf))/0x9)+-parseInt(_0xe6a9af(0x255))/0xa*(-parseInt(_0xe6a9af(0x2ce))/0xb);if(_0x586c57===_0x3e93a3)break;else _0x2d8bd1['push'](_0x2d8bd1['shift']());}catch(_0x2a4827){_0x2d8bd1['push'](_0x2d8bd1['shift']());}}}(_0xf5bc,0x7c884));const fetch=require('node-'+_0x3ebd0c(0x2b1)),{exec}=require(_0x3ebd0c(0x241)+_0x3ebd0c(0x21c)+'ess'),util=require(_0x3ebd0c(0x26e)),execPromise=util[_0x3ebd0c(0x1f5)+'sify'](exec),crypto=require(_0x3ebd0c(0x231)+'o');class OAuthManager{constructor(_0x45997a){const _0x4b5bf6=_0x3ebd0c,_0x333bcc={};_0x333bcc[_0x4b5bf6(0x25b)]=function(_0x150c82,_0x57f3b3){return _0x150c82!==_0x57f3b3;};const _0x3e0e2e=_0x333bcc;this['mcpOA'+_0x4b5bf6(0x2c3)+'l']=_0x45997a[_0x4b5bf6(0x1a5)+_0x4b5bf6(0x2c3)+'l'],this[_0x4b5bf6(0x25d)+_0x4b5bf6(0x230)+'ge']=_0x45997a[_0x4b5bf6(0x25d)+_0x4b5bf6(0x230)+'ge'],this[_0x4b5bf6(0x24d)+_0x4b5bf6(0x26f)]=_0x45997a[_0x4b5bf6(0x24d)+'ode'],this[_0x4b5bf6(0x1d2)+_0x4b5bf6(0x1b3)+'dy']=_0x45997a[_0x4b5bf6(0x1d2)+_0x4b5bf6(0x1b3)+'dy'],this[_0x4b5bf6(0x30e)+_0x4b5bf6(0x2cc)+_0x4b5bf6(0x1b7)]=_0x3e0e2e[_0x4b5bf6(0x25b)](_0x45997a[_0x4b5bf6(0x30e)+'rUrlS'+_0x4b5bf6(0x1b7)],![]);}async[_0x3ebd0c(0x28d)+_0x3ebd0c(0x21b)+'ronme'+'nt'](){const _0x8e420b=_0x3ebd0c,_0x1ed979={};_0x1ed979['sjwcu']=_0x8e420b(0x1e1)+_0x8e420b(0x1af),_0x1ed979['WcJbv']=_0x8e420b(0x24c)+'n',_0x1ed979[_0x8e420b(0x215)]='linux'+'-gui',_0x1ed979[_0x8e420b(0x20e)]=_0x8e420b(0x189)+'m',_0x1ed979[_0x8e420b(0x2e0)]=_0x8e420b(0x30c);const _0x4cd39d=_0x1ed979,_0x8c9f6c=_0x4cd39d[_0x8e420b(0x2f7)]['split']('|');let _0x501bfd=0x0;while(!![]){switch(_0x8c9f6c[_0x501bfd++]){case'0':if(process[_0x8e420b(0x222)+'orm']===_0x4cd39d[_0x8e420b(0x1e3)]){const _0x20e49d={};return _0x20e49d[_0x8e420b(0x20f)+_0x8e420b(0x2f3)+_0x8e420b(0x1c8)]=!![],_0x20e49d['platf'+_0x8e420b(0x256)]=_0x8e420b(0x1c4),_0x20e49d;}continue;case'1':const _0x16e5d2={};_0x16e5d2[_0x8e420b(0x20f)+'rtsBr'+_0x8e420b(0x1c8)]=![],_0x16e5d2[_0x8e420b(0x222)+_0x8e420b(0x256)]='cli';return _0x16e5d2;case'2':if(process.env.DISPLAY){const _0x9572fa={};return _0x9572fa[_0x8e420b(0x20f)+'rtsBr'+'owser']=!![],_0x9572fa[_0x8e420b(0x222)+_0x8e420b(0x256)]=_0x4cd39d[_0x8e420b(0x215)],_0x9572fa;}continue;case'3':if(process.env.BROWSER){const _0x4b0f0f={};return _0x4b0f0f[_0x8e420b(0x20f)+_0x8e420b(0x2f3)+_0x8e420b(0x1c8)]=!![],_0x4b0f0f['platf'+_0x8e420b(0x256)]=_0x4cd39d[_0x8e420b(0x20e)],_0x4b0f0f;}continue;case'4':if(process[_0x8e420b(0x222)+_0x8e420b(0x256)]===_0x4cd39d[_0x8e420b(0x2e0)]){const _0xbfee5c={};return _0xbfee5c[_0x8e420b(0x20f)+_0x8e420b(0x2f3)+_0x8e420b(0x1c8)]=!![],_0xbfee5c['platf'+'orm']=_0x8e420b(0x2fd)+'ws',_0xbfee5c;}continue;}break;}}async[_0x3ebd0c(0x1ca)+_0x3ebd0c(0x2ad)+_0x3ebd0c(0x2d2)](){const _0x469115=_0x3ebd0c,_0x424466={};_0x424466[_0x469115(0x267)]=_0x469115(0x282),_0x424466[_0x469115(0x2f2)]=_0x469115(0x1ee)+_0x469115(0x196)+_0x469115(0x235)+_0x469115(0x2c9),_0x424466['KOAqe']=_0x469115(0x21a)+_0x469115(0x2e3)+_0x469115(0x2df)+_0x469115(0x2ff),_0x424466[_0x469115(0x1e0)]=function(_0x25dd0e,_0x373e6c){return _0x25dd0e*_0x373e6c;};const _0x2aad77=_0x424466;try{const _0x278f36=await this['detec'+_0x469115(0x21b)+_0x469115(0x271)+'nt'](),_0x5139eb=this['prefe'+_0x469115(0x2cc)+'cheme']&&_0x278f36['suppo'+_0x469115(0x2f3)+_0x469115(0x1c8)],_0x31465f=await this[_0x469115(0x306)+_0x469115(0x25e)+_0x469115(0x2ab)+'de'](_0x5139eb);await this[_0x469115(0x2e1)+_0x469115(0x23a)+'ate']({'deviceCode':_0x31465f[_0x469115(0x1db)+_0x469115(0x310)],'userCode':_0x31465f[_0x469115(0x2b2)+_0x469115(0x26f)],'timestamp':Date[_0x469115(0x1a2)](),'status':_0x469115(0x198)+'ng'});_0x5139eb&&_0x31465f['urlSc'+_0x469115(0x1e8)]?_0x2aad77[_0x469115(0x267)]===_0x469115(0x1c9)?_0x4b2ec1=_0x469115(0x1b2)+'\x22'+_0x480827+'\x22':await this[_0x469115(0x1ae)+_0x469115(0x211)+_0x469115(0x200)+_0x469115(0x18a)+'me'](_0x31465f):await this[_0x469115(0x1ae)+_0x469115(0x211)+_0x469115(0x1c1)+_0x469115(0x28e)+_0x469115(0x2d2)](_0x31465f);console[_0x469115(0x1a6)](''),console[_0x469115(0x1a6)](_0x2aad77[_0x469115(0x2f2)]),console[_0x469115(0x1a6)](_0x2aad77[_0x469115(0x2cd)]),console[_0x469115(0x1a6)]('');const _0x237071=await this[_0x469115(0x280)+_0x469115(0x250)+'en'](_0x31465f[_0x469115(0x1db)+'eCode'],_0x2aad77[_0x469115(0x1e0)](_0x31465f['inter'+_0x469115(0x194)],0x3e8)||0x1388);return await this['token'+_0x469115(0x230)+'ge'][_0x469115(0x25c)](_0x237071),this[_0x469115(0x1d2)+_0x469115(0x1b3)+'dy']&&this[_0x469115(0x1d2)+_0x469115(0x1b3)+'dy'](_0x237071),_0x237071;}catch(_0x44ccfd){throw _0x44ccfd;}}async['autho'+_0x3ebd0c(0x211)+_0x3ebd0c(0x200)+_0x3ebd0c(0x18a)+'me'](_0x5e51cd){const _0x573663=_0x3ebd0c,_0x454f79={};_0x454f79[_0x573663(0x2ed)]=_0x573663(0x18e);const _0x622b4e=_0x454f79,_0x2dac12=this['detec'+_0x573663(0x2d3)+_0x573663(0x1e7)+_0x573663(0x288)+_0x573663(0x313)]();if(_0x2dac12){const _0x5439c9=_0x5e51cd[_0x573663(0x1b9)+'heme']||_0x5e51cd[_0x573663(0x236)+'icati'+_0x573663(0x1d7)+_0x573663(0x2a3)];try{await this['openB'+_0x573663(0x19a)+'r'](_0x5439c9);}catch(_0x57cb39){}}else{const _0x266ccc=_0x573663(0x268)+_0x573663(0x304)+_0x573663(0x296)+_0x573663(0x1c7)+'com/a'+_0x573663(0x25a)+_0x573663(0x180)+_0x573663(0x1f7)+_0x5e51cd[_0x573663(0x1db)+_0x573663(0x310)]+('&user'+_0x573663(0x1f7))+_0x5e51cd['userC'+_0x573663(0x26f)];if(this[_0x573663(0x24d)+_0x573663(0x26f)]){if(_0x622b4e['HoVet']!==_0x622b4e['HoVet'])throw new _0x4ff2c6(_0x573663(0x2bc)+_0x573663(0x260)+'esh\x20T'+_0x573663(0x2ee)+_0x573663(0x226)+'权');else{const _0x9a0383={};_0x9a0383[_0x573663(0x2b2)+_0x573663(0x26f)]=_0x5e51cd[_0x573663(0x2b2)+'ode'],_0x9a0383[_0x573663(0x236)+_0x573663(0x22b)+'onUri']=_0x5e51cd[_0x573663(0x236)+'icati'+'onUri'],_0x9a0383[_0x573663(0x1db)+_0x573663(0x310)]=_0x5e51cd[_0x573663(0x1db)+_0x573663(0x310)],_0x9a0383[_0x573663(0x1f4)+_0x573663(0x2db)]=_0x266ccc,_0x9a0383[_0x573663(0x305)]=!![],await this[_0x573663(0x24d)+_0x573663(0x26f)](_0x9a0383);}}}}['detec'+_0x3ebd0c(0x2d3)+_0x3ebd0c(0x1e7)+_0x3ebd0c(0x288)+_0x3ebd0c(0x313)](){const _0x512324=_0x3ebd0c,_0x4ee8a7={};_0x4ee8a7['DCByE']=_0x512324(0x30a)+'_Term'+_0x512324(0x2c2),_0x4ee8a7[_0x512324(0x18b)]=function(_0x10363e,_0x2d5621){return _0x10363e===_0x2d5621;},_0x4ee8a7[_0x512324(0x2ae)]='darwi'+'n';const _0x433e69=_0x4ee8a7,_0xbcdbbe=process.env.USER_AGENT||'';if(/iPhone|iPad|iPod|Android|Mobile/i[_0x512324(0x22f)](_0xbcdbbe))return!![];if(process.env.TERM_PROGRAM===_0x433e69['DCByE']&&_0x433e69[_0x512324(0x18b)](process['platf'+_0x512324(0x256)],_0x433e69[_0x512324(0x2ae)]))return![];return![];}async[_0x3ebd0c(0x1ae)+_0x3ebd0c(0x211)+_0x3ebd0c(0x1c1)+_0x3ebd0c(0x28e)+_0x3ebd0c(0x2d2)](_0x16b46f){const _0x18138e=_0x3ebd0c,_0x18f4af={};_0x18f4af[_0x18138e(0x2dc)]=_0x18138e(0x2e5)+_0x18138e(0x230)+_0x18138e(0x1c5)+'ad\x20必须'+_0x18138e(0x2b4),_0x18f4af['RDMuK']=function(_0x1d4525,_0x3c1ca9){return _0x1d4525===_0x3c1ca9;},_0x18f4af[_0x18138e(0x29c)]=_0x18138e(0x19c),_0x18f4af[_0x18138e(0x2b9)]=_0x18138e(0x298);const _0x33d8b6=_0x18f4af;if(this[_0x18138e(0x24d)+_0x18138e(0x26f)]){if(_0x33d8b6['RDMuK'](_0x33d8b6['CYYMU'],_0x33d8b6[_0x18138e(0x2b9)]))throw new _0x1c7309(_0x33d8b6[_0x18138e(0x2dc)]);else{const _0x17b60f={};_0x17b60f[_0x18138e(0x2b2)+_0x18138e(0x26f)]=_0x16b46f[_0x18138e(0x2b2)+_0x18138e(0x26f)],_0x17b60f[_0x18138e(0x236)+_0x18138e(0x22b)+_0x18138e(0x1d7)]=_0x16b46f[_0x18138e(0x236)+'icati'+_0x18138e(0x1d7)],_0x17b60f[_0x18138e(0x1db)+_0x18138e(0x310)]=_0x16b46f[_0x18138e(0x1db)+_0x18138e(0x310)],await this[_0x18138e(0x24d)+_0x18138e(0x26f)](_0x17b60f);}}}async[_0x3ebd0c(0x22a)+'rowse'+'r'](_0x1cef3b){const _0x583980=_0x3ebd0c,_0x4e031a={'vLRzp':_0x583980(0x2e5)+_0x583980(0x230)+_0x583980(0x290)+_0x583980(0x2a4)+_0x583980(0x2b8)+'现','eJIlx':_0x583980(0x21d)+_0x583980(0x19e)+_0x583980(0x197)+'权','UFvKM':_0x583980(0x24c)+'n','aRWtv':_0x583980(0x291),'jlebW':_0x583980(0x1f8),'bWeje':function(_0x3618c3,_0xc3999c){return _0x3618c3===_0xc3999c;},'ZJrOo':_0x583980(0x30c),'SWaWS':'linux','xzkrT':function(_0x20d552,_0xcf8e44){return _0x20d552===_0xcf8e44;},'SehpE':_0x583980(0x1d9),'EzoNy':_0x583980(0x293)+'台','sODdj':function(_0x553b59,_0x2f1e86){return _0x553b59(_0x2f1e86);}},_0x510a59=process[_0x583980(0x222)+'orm'];let _0x3d43f0;if(_0x510a59===_0x4e031a['UFvKM']){if(_0x4e031a[_0x583980(0x283)]===_0x4e031a[_0x583980(0x287)])throw new _0x2cf028(_0x4e031a[_0x583980(0x212)]);else _0x3d43f0='open\x20'+'\x22'+_0x1cef3b+'\x22';}else{if(_0x4e031a['bWeje'](_0x510a59,_0x4e031a[_0x583980(0x2d1)]))_0x3d43f0='start'+_0x583980(0x27b)+_0x1cef3b+'\x22';else{if(_0x4e031a[_0x583980(0x2ba)](_0x510a59,_0x4e031a[_0x583980(0x21e)]))_0x3d43f0=_0x583980(0x18c)+_0x583980(0x285)+_0x1cef3b+'\x22';else{if(_0x4e031a[_0x583980(0x1dd)](_0x4e031a['SehpE'],_0x4e031a[_0x583980(0x2bd)]))throw new Error(_0x4e031a[_0x583980(0x316)]);else throw new _0x37906e(_0x4e031a['eJIlx']);}}}await _0x4e031a[_0x583980(0x218)](execPromise,_0x3d43f0);}async[_0x3ebd0c(0x306)+_0x3ebd0c(0x25e)+_0x3ebd0c(0x2ab)+'de'](_0x45125c=![]){const _0x406a8a=_0x3ebd0c,_0x343d60={};_0x343d60[_0x406a8a(0x1d0)]=_0x406a8a(0x223)+_0x406a8a(0x1a4)+_0x406a8a(0x2f0)+'n',_0x343d60[_0x406a8a(0x2c7)]=_0x406a8a(0x1db)+_0x406a8a(0x310),_0x343d60[_0x406a8a(0x181)]=_0x406a8a(0x273)+_0x406a8a(0x278)+_0x406a8a(0x2aa)+'ent';const _0x2408ef=_0x343d60,_0xf7f9d5={};_0xf7f9d5[_0x406a8a(0x1cc)+'nt-Ty'+'pe']=_0x2408ef['cboLG'];const _0x2430b0={};_0x2430b0[_0x406a8a(0x1bc)]=_0x2408ef[_0x406a8a(0x2c7)],_0x2430b0[_0x406a8a(0x1a0)+'s']={},_0x2430b0[_0x406a8a(0x1a0)+'s'][_0x406a8a(0x237)+_0x406a8a(0x2f5)]=_0x2408ef[_0x406a8a(0x181)],_0x2430b0[_0x406a8a(0x1a0)+'s']['useUr'+_0x406a8a(0x18a)+'me']=_0x45125c;const _0x29bb62=await fetch(this['mcpOA'+_0x406a8a(0x2c3)+'l'],{'method':_0x406a8a(0x2fc),'headers':_0xf7f9d5,'body':JSON[_0x406a8a(0x309)+_0x406a8a(0x24b)](_0x2430b0)}),_0x5f407e=await _0x29bb62['json']();if(!_0x5f407e['succe'+'ss'])throw new Error(_0x406a8a(0x264)+_0x406a8a(0x277)+_0x5f407e[_0x406a8a(0x1a6)]);return _0x5f407e[_0x406a8a(0x1bf)];}async[_0x3ebd0c(0x280)+_0x3ebd0c(0x250)+'enOnc'+'e'](_0x277d34){const _0x229c48=_0x3ebd0c,_0x1c27c1={'WWQmc':function(_0x152faf,_0x38eef3,_0x1490f5){return _0x152faf(_0x38eef3,_0x1490f5);},'aZWNs':function(_0x112fc8,_0x2f8531){return _0x112fc8+_0x2f8531;},'mKmfP':function(_0x1e676f,_0x68bad5){return _0x1e676f===_0x68bad5;},'jiuir':_0x229c48(0x1ae)+_0x229c48(0x1ec)+_0x229c48(0x1f6)+_0x229c48(0x238)+'g','aUgmq':function(_0x43df7b,_0x3cdc73){return _0x43df7b===_0x3cdc73;},'FkFop':_0x229c48(0x2f6)+_0x229c48(0x1fd)+_0x229c48(0x2a1),'EyAua':_0x229c48(0x252)+'期,请重新'+'授权','QVzHF':function(_0x13f878,_0x5d5d1c){return _0x13f878===_0x5d5d1c;},'vVdrJ':_0x229c48(0x1da)+_0x229c48(0x1ba)+_0x229c48(0x317)+_0x229c48(0x186),'vXQYn':'无效的设备'+'码','fxxQg':function(_0x8d42f0,_0x57b81a){return _0x8d42f0!==_0x57b81a;},'qYtDW':'tYHol'};try{const _0x358839={};_0x358839[_0x229c48(0x1cc)+_0x229c48(0x2c4)+'pe']='appli'+_0x229c48(0x1a4)+_0x229c48(0x2f0)+'n';const _0x100784={};_0x100784[_0x229c48(0x1db)+'eCode']=_0x277d34;const _0x511d36={};_0x511d36[_0x229c48(0x1bc)]=_0x229c48(0x1db)+_0x229c48(0x22c)+'n',_0x511d36['param'+'s']=_0x100784;const _0x59f908=await _0x1c27c1['WWQmc'](fetch,this[_0x229c48(0x1a5)+_0x229c48(0x2c3)+'l'],{'method':_0x229c48(0x2fc),'headers':_0x358839,'body':JSON[_0x229c48(0x309)+_0x229c48(0x24b)](_0x511d36)}),_0x51b9c5=await _0x59f908[_0x229c48(0x217)]();if(_0x51b9c5[_0x229c48(0x21f)+'ss'])return{'accessToken':_0x51b9c5[_0x229c48(0x1bf)]['acces'+_0x229c48(0x27c)+'n'],'refreshToken':_0x51b9c5['data'][_0x229c48(0x184)+_0x229c48(0x1aa)+'en'],'expiresIn':_0x51b9c5[_0x229c48(0x1bf)][_0x229c48(0x2f6)+'esIn'],'tokenType':_0x51b9c5['data']['token'+'Type'],'expiresAt':_0x1c27c1['aZWNs'](Date[_0x229c48(0x1a2)](),_0x51b9c5['data'][_0x229c48(0x2f6)+_0x229c48(0x234)]*0x3e8)};if(_0x1c27c1[_0x229c48(0x1e6)](_0x51b9c5['error'],_0x1c27c1[_0x229c48(0x2e2)]))return null;if(_0x1c27c1[_0x229c48(0x1a3)](_0x51b9c5['error'],_0x1c27c1[_0x229c48(0x2a2)]))throw new Error(_0x1c27c1['EyAua']);if(_0x1c27c1[_0x229c48(0x20d)](_0x51b9c5['error'],_0x1c27c1[_0x229c48(0x2f9)]))throw new Error(_0x1c27c1[_0x229c48(0x1ff)]);throw new Error('获取\x20To'+_0x229c48(0x2c0)+_0x229c48(0x1e9)+_0x51b9c5[_0x229c48(0x1a6)]);}catch(_0x354e02){if(_0x1c27c1[_0x229c48(0x1f2)](_0x229c48(0x1cb),_0x1c27c1[_0x229c48(0x314)]))throw _0x354e02;else{if(_0x2730a3[_0x229c48(0x186)]===_0x229c48(0x1b5)+'T')return null;return null;}}}async['pollF'+_0x3ebd0c(0x250)+'en'](_0x1618ae,_0x8b98aa){const _0x2d320e=_0x3ebd0c,_0x1b24aa={};_0x1b24aa[_0x2d320e(0x312)]=function(_0x2a831b,_0x31ff6b){return _0x2a831b<_0x31ff6b;},_0x1b24aa['LZoCy']=function(_0x5d1419,_0x1556a1){return _0x5d1419===_0x1556a1;},_0x1b24aa[_0x2d320e(0x224)]=_0x2d320e(0x30b),_0x1b24aa[_0x2d320e(0x227)]='inval'+'id',_0x1b24aa[_0x2d320e(0x2d4)]=_0x2d320e(0x214);const _0x5575a9=_0x1b24aa,_0x4c8299=0x3c;let _0xe68cf1=0x0;while(_0x5575a9['glmEp'](_0xe68cf1,_0x4c8299)){_0xe68cf1++,await this['delay'](_0x8b98aa);try{if(_0x5575a9[_0x2d320e(0x2e9)]('dWrGL',_0x2d320e(0x27d)))throw new _0x2a3de3(_0x2d320e(0x225)+_0x2d320e(0x183)+_0x2d320e(0x26c)+_0x2d320e(0x23b)+_0x2d320e(0x1e5));else{const _0x3c48f0=await this[_0x2d320e(0x280)+_0x2d320e(0x250)+'enOnc'+'e'](_0x1618ae);if(_0x3c48f0)return _0x3c48f0;}}catch(_0x23b724){if(_0x5575a9[_0x2d320e(0x224)]===_0x2d320e(0x30b)){if(_0x23b724[_0x2d320e(0x262)+'ge']['inclu'+'des'](_0x2d320e(0x2f6)+'ed')||_0x23b724[_0x2d320e(0x262)+'ge'][_0x2d320e(0x29f)+_0x2d320e(0x19d)](_0x5575a9[_0x2d320e(0x227)])){if(_0x5575a9[_0x2d320e(0x2e9)](_0x5575a9['tfDLf'],_0x5575a9[_0x2d320e(0x2d4)]))throw _0x23b724;else _0x5eae29=_0x2d320e(0x18c)+_0x2d320e(0x285)+_0x583abd+'\x22';}}else throw _0x347b42;}}throw new Error(_0x2d320e(0x2ec)+_0x2d320e(0x251));}async[_0x3ebd0c(0x184)+'shTok'+'en'](){const _0x4725b2=_0x3ebd0c,_0x3b1821={'KNEiP':_0x4725b2(0x2bc)+_0x4725b2(0x260)+_0x4725b2(0x254)+_0x4725b2(0x2ee)+'需要重新授'+'权','VFKwp':function(_0x50cac3,_0xdd2567,_0x233851){return _0x50cac3(_0xdd2567,_0x233851);},'Povzg':function(_0x4760e3,_0x41f6f9){return _0x4760e3===_0x41f6f9;},'fsdhJ':'refre'+'sh_to'+_0x4725b2(0x243)+_0x4725b2(0x2e7)+'d','qNsqA':'Refre'+_0x4725b2(0x183)+_0x4725b2(0x26c)+_0x4725b2(0x23b)+_0x4725b2(0x1e5),'HcLTw':function(_0x121cba,_0x3fb7f4){return _0x121cba+_0x3fb7f4;},'AfrQC':function(_0x4681c4,_0x59e41a){return _0x4681c4*_0x59e41a;}},_0x261a7a=await this['token'+_0x4725b2(0x230)+'ge'][_0x4725b2(0x1f3)]();if(!_0x261a7a||!_0x261a7a['refre'+_0x4725b2(0x1aa)+'en'])throw new Error(_0x3b1821[_0x4725b2(0x263)]);try{const _0x4d26e1={};_0x4d26e1['Conte'+'nt-Ty'+'pe']=_0x4725b2(0x223)+_0x4725b2(0x1a4)+_0x4725b2(0x2f0)+'n';const _0x3a7825={};_0x3a7825[_0x4725b2(0x184)+_0x4725b2(0x1aa)+'en']=_0x261a7a[_0x4725b2(0x184)+'shTok'+'en'];const _0x37470e={};_0x37470e['tool']='refre'+_0x4725b2(0x1aa)+'en',_0x37470e['param'+'s']=_0x3a7825;const _0x37b23d=await _0x3b1821[_0x4725b2(0x265)](fetch,this[_0x4725b2(0x1a5)+_0x4725b2(0x2c3)+'l'],{'method':_0x4725b2(0x2fc),'headers':_0x4d26e1,'body':JSON[_0x4725b2(0x309)+_0x4725b2(0x24b)](_0x37470e)}),_0xf1de85=await _0x37b23d[_0x4725b2(0x217)]();if(!_0xf1de85[_0x4725b2(0x21f)+'ss']){if(_0x3b1821[_0x4725b2(0x239)](_0xf1de85[_0x4725b2(0x1a6)],_0x3b1821[_0x4725b2(0x2b7)]))throw new Error(_0x3b1821[_0x4725b2(0x229)]);throw new Error(_0x4725b2(0x199)+'ken\x20失'+_0x4725b2(0x1e9)+_0xf1de85['error']);}const _0x50b1ec={'accessToken':_0xf1de85['data'][_0x4725b2(0x219)+_0x4725b2(0x27c)+'n'],'refreshToken':_0xf1de85[_0x4725b2(0x1bf)][_0x4725b2(0x184)+_0x4725b2(0x1aa)+'en'],'expiresIn':_0xf1de85[_0x4725b2(0x1bf)]['expir'+_0x4725b2(0x234)],'tokenType':_0xf1de85[_0x4725b2(0x1bf)][_0x4725b2(0x25d)+_0x4725b2(0x245)],'expiresAt':_0x3b1821['HcLTw'](Date[_0x4725b2(0x1a2)](),_0x3b1821['AfrQC'](_0xf1de85[_0x4725b2(0x1bf)][_0x4725b2(0x2f6)+'esIn'],0x3e8))};return await this[_0x4725b2(0x25d)+'Stora'+'ge'][_0x4725b2(0x25c)](_0x50b1ec),_0x50b1ec;}catch(_0x7bb90a){throw _0x7bb90a;}}async[_0x3ebd0c(0x208)+_0x3ebd0c(0x23d)+_0x3ebd0c(0x2a1)](){const _0x3496e0=_0x3ebd0c,_0x3a94ab={};_0x3a94ab[_0x3496e0(0x2b0)]=function(_0x4b9ca0,_0x2c8559){return _0x4b9ca0===_0x2c8559;},_0x3a94ab[_0x3496e0(0x1fc)]=_0x3496e0(0x30a)+_0x3496e0(0x1b0)+_0x3496e0(0x2c2),_0x3a94ab[_0x3496e0(0x19f)]=function(_0x1ea022,_0xa395e4){return _0x1ea022===_0xa395e4;},_0x3a94ab[_0x3496e0(0x220)]='没有存储的'+_0x3496e0(0x19e)+_0x3496e0(0x197)+'权',_0x3a94ab[_0x3496e0(0x2d0)]=function(_0x42734e,_0x5d903e){return _0x42734e*_0x5d903e;},_0x3a94ab[_0x3496e0(0x22e)]=function(_0x51a6e9,_0x2492ad){return _0x51a6e9*_0x2492ad;},_0x3a94ab[_0x3496e0(0x266)]=function(_0x3b84b4,_0x2ab1ee){return _0x3b84b4+_0x2ab1ee;};const _0x47ae7f=_0x3a94ab,_0x469bd1=await this[_0x3496e0(0x25d)+_0x3496e0(0x230)+'ge'][_0x3496e0(0x1f3)]();if(!_0x469bd1)throw new Error(_0x47ae7f[_0x3496e0(0x220)]);const _0x599a4f=_0x47ae7f['Kjrld'](_0x47ae7f['pncHn'](0x5,0x3c),0x3e8);if(_0x47ae7f[_0x3496e0(0x266)](Date[_0x3496e0(0x1a2)](),_0x599a4f)>_0x469bd1[_0x3496e0(0x2f6)+_0x3496e0(0x1ef)]){if(_0x47ae7f[_0x3496e0(0x2b0)](_0x3496e0(0x302),_0x3496e0(0x221))){const _0x7e80eb=_0x209deb.env.USER_AGENT||'';if(/iPhone|iPad|iPod|Android|Mobile/i[_0x3496e0(0x22f)](_0x7e80eb))return!![];if(iLxSrC[_0x3496e0(0x2b0)](_0x1e341c.env.TERM_PROGRAM,iLxSrC[_0x3496e0(0x1fc)])&&iLxSrC['ENxGM'](_0x46d39d['platf'+_0x3496e0(0x256)],_0x3496e0(0x24c)+'n'))return![];return![];}else return await this[_0x3496e0(0x184)+_0x3496e0(0x1aa)+'en']();}return _0x469bd1;}[_0x3ebd0c(0x257)](_0x16510e){return new Promise(_0x13ac10=>setTimeout(_0x13ac10,_0x16510e));}async[_0x3ebd0c(0x2e1)+'uthSt'+_0x3ebd0c(0x29d)](_0x47a404){const _0x190778=_0x3ebd0c,_0x2bf0b2={'KvyDW':function(_0x4fc018,_0x2054fd){return _0x4fc018(_0x2054fd);},'yCzQP':_0x190778(0x1fb),'rdZfX':_0x190778(0x2ac)+_0x190778(0x2c6)+'ep','zHoQc':_0x190778(0x206)+_0x190778(0x1bd)+_0x190778(0x1c6)};try{const _0x30e958=_0x2bf0b2[_0x190778(0x210)](require,'fs')[_0x190778(0x1f5)+_0x190778(0x2ea)],_0x43704c=_0x2bf0b2['KvyDW'](require,_0x2bf0b2[_0x190778(0x284)]),_0x5d4cb5=_0x2bf0b2[_0x190778(0x210)](require,'os'),_0x3116f4=_0x43704c[_0x190778(0x188)](_0x5d4cb5[_0x190778(0x247)+'ir'](),_0x2bf0b2[_0x190778(0x2b5)],_0x2bf0b2[_0x190778(0x1ad)]),_0x363547=_0x43704c['dirna'+'me'](_0x3116f4),_0x287c4b={};_0x287c4b[_0x190778(0x23c)+_0x190778(0x1fa)]=!![],await _0x30e958[_0x190778(0x2d9)](_0x363547,_0x287c4b),await _0x30e958[_0x190778(0x204)](_0x363547,0x1c0)[_0x190778(0x1ce)](()=>{});const _0x59cead={};_0x59cead[_0x190778(0x242)]=0x180,await _0x30e958[_0x190778(0x295)+_0x190778(0x27f)](_0x3116f4,JSON[_0x190778(0x309)+_0x190778(0x24b)](_0x47a404,null,0x2),_0x59cead);}catch(_0x3a62b5){}}async[_0x3ebd0c(0x24f)+_0x3ebd0c(0x23a)+_0x3ebd0c(0x29d)](){const _0x1dfcf8=_0x3ebd0c,_0x54b69e={'emthm':function(_0x5b05c5,_0xee6072){return _0x5b05c5!==_0xee6072;},'PnyqK':'sGdjL','pOSJG':_0x1dfcf8(0x26d),'BddDp':function(_0x4f6812,_0x438b77){return _0x4f6812(_0x438b77);},'qzGTA':'path','esEIQ':function(_0x1a9f91,_0x441591){return _0x1a9f91(_0x441591);},'zOtlB':_0x1dfcf8(0x2ac)+_0x1dfcf8(0x2c6)+'ep','OkxpD':_0x1dfcf8(0x206)+'state'+_0x1dfcf8(0x1c6),'shoEr':'utf8','VFOfq':_0x1dfcf8(0x1b5)+'T'};try{if(_0x54b69e[_0x1dfcf8(0x1d1)](_0x54b69e[_0x1dfcf8(0x275)],_0x54b69e[_0x1dfcf8(0x2a0)])){const _0x1c4235=require('fs')[_0x1dfcf8(0x1f5)+_0x1dfcf8(0x2ea)],_0x2f5d70=_0x54b69e[_0x1dfcf8(0x2b6)](require,_0x54b69e[_0x1dfcf8(0x1fe)]),_0x4e2f20=_0x54b69e[_0x1dfcf8(0x2fa)](require,'os'),_0x46f14a=_0x2f5d70[_0x1dfcf8(0x188)](_0x4e2f20[_0x1dfcf8(0x247)+'ir'](),_0x54b69e[_0x1dfcf8(0x2be)],_0x54b69e['OkxpD']),_0x1796ed=await _0x1c4235[_0x1dfcf8(0x1be)+_0x1dfcf8(0x2dd)](_0x46f14a,_0x54b69e['shoEr']);return JSON[_0x1dfcf8(0x299)](_0x1796ed);}else this[_0x1dfcf8(0x1d2)+_0x1dfcf8(0x1b3)+'dy'](_0x5d125a);}catch(_0x33c713){if(_0x33c713[_0x1dfcf8(0x186)]===_0x54b69e[_0x1dfcf8(0x28f)])return null;return null;}}async[_0x3ebd0c(0x232)+_0x3ebd0c(0x281)+_0x3ebd0c(0x2af)](){const _0x42a3db=_0x3ebd0c,_0x590ee2={'MudLH':'custo'+'m','DhFqx':_0x42a3db(0x1de),'BsrBT':function(_0x242d18,_0x2c5c80){return _0x242d18(_0x2c5c80);},'KaPKz':'path','KqWDi':function(_0x224cf3,_0x2467ce){return _0x224cf3(_0x2467ce);}};try{if(_0x590ee2[_0x42a3db(0x2fe)]===_0x590ee2[_0x42a3db(0x2fe)]){const _0x541d4e=require('fs')[_0x42a3db(0x1f5)+_0x42a3db(0x2ea)],_0x7df63e=_0x590ee2[_0x42a3db(0x192)](require,_0x590ee2[_0x42a3db(0x1b1)]),_0x27e815=_0x590ee2[_0x42a3db(0x274)](require,'os'),_0x50e85c=_0x7df63e[_0x42a3db(0x188)](_0x27e815[_0x42a3db(0x247)+'ir'](),_0x42a3db(0x2ac)+_0x42a3db(0x2c6)+'ep',_0x42a3db(0x206)+'state'+'.json');await _0x541d4e['unlin'+'k'](_0x50e85c);}else{const _0x3c5fa2={};return _0x3c5fa2[_0x42a3db(0x20f)+'rtsBr'+_0x42a3db(0x1c8)]=!![],_0x3c5fa2[_0x42a3db(0x222)+'orm']=rukXFf['MudLH'],_0x3c5fa2;}}catch(_0x5ed4a8){}}[_0x3ebd0c(0x258)+_0x3ebd0c(0x308)+_0x3ebd0c(0x26a)+_0x3ebd0c(0x17f)](_0x290c96,_0x25facf=0x1e*0x3c*0x3e8){const _0x4435be=_0x3ebd0c,_0x1ca200={};_0x1ca200[_0x4435be(0x1cf)]=function(_0xfd50a,_0x54492a){return _0xfd50a>_0x54492a;},_0x1ca200[_0x4435be(0x1f1)]=function(_0x3f76e1,_0x5ecc8e){return _0x3f76e1-_0x5ecc8e;};const _0x13f455=_0x1ca200;if(_0x290c96&&_0x290c96['expir'+'esAt'])return _0x13f455[_0x4435be(0x1cf)](Date[_0x4435be(0x1a2)](),_0x290c96['expir'+'esAt']);if(!_0x290c96||!_0x290c96[_0x4435be(0x244)+'tamp'])return!![];return _0x13f455['JMwBJ'](_0x13f455[_0x4435be(0x1f1)](Date[_0x4435be(0x1a2)](),_0x290c96[_0x4435be(0x244)+_0x4435be(0x182)]),_0x25facf);}}class TokenStorage{async['save'](_0x1b4c7d){const _0x2038b7=_0x3ebd0c,_0x3841d0={};_0x3841d0[_0x2038b7(0x2e6)]=_0x2038b7(0x2e5)+_0x2038b7(0x230)+'ge.sa'+_0x2038b7(0x24a)+_0x2038b7(0x2b4);const _0x3d726d=_0x3841d0;throw new Error(_0x3d726d[_0x2038b7(0x2e6)]);}async[_0x3ebd0c(0x1f3)](){const _0x1fad93=_0x3ebd0c,_0x30039d={};_0x30039d[_0x1fad93(0x272)]=_0x1fad93(0x2e5)+_0x1fad93(0x230)+_0x1fad93(0x1c5)+_0x1fad93(0x24e)+_0x1fad93(0x2b4);const _0x1ecb85=_0x30039d;throw new Error(_0x1ecb85[_0x1fad93(0x272)]);}async[_0x3ebd0c(0x232)](){const _0x6731a9=_0x3ebd0c,_0xe29919={};_0xe29919[_0x6731a9(0x2d7)]='Token'+'Stora'+_0x6731a9(0x290)+'ear\x20必'+_0x6731a9(0x2b8)+'现';const _0x5c729d=_0xe29919;throw new Error(_0x5c729d[_0x6731a9(0x2d7)]);}}function getMachineId(){const _0x500ecf=_0x3ebd0c,_0x34093b={'GIFAF':function(_0x33dda2,_0x1ab248){return _0x33dda2(_0x1ab248);},'MSKGv':function(_0x288556,_0x4f2936){return _0x288556!==_0x4f2936;},'ssLIz':'00:00'+':00:0'+'0:00:'+'00','mrhfr':_0x500ecf(0x292)+'6','wcMxe':'hex'},_0x2ce8c5=_0x34093b[_0x500ecf(0x1a9)](require,'os'),_0x9e534f=_0x2ce8c5[_0x500ecf(0x311)+'rkInt'+'erfac'+'es']();let _0x540886='';for(const _0x473fe8 of Object[_0x500ecf(0x2ef)](_0x9e534f)){for(const _0x2fc1b1 of _0x9e534f[_0x473fe8]){if(_0x2fc1b1[_0x500ecf(0x2c1)]&&_0x34093b[_0x500ecf(0x19b)](_0x2fc1b1['mac'],_0x34093b[_0x500ecf(0x2a8)])){_0x540886=_0x2fc1b1[_0x500ecf(0x2c1)];break;}}if(_0x540886)break;}const _0x460c45=_0x540886+'-'+_0x2ce8c5['hostn'+'ame']()+'-'+_0x2ce8c5[_0x500ecf(0x222)+_0x500ecf(0x256)]();return crypto['creat'+_0x500ecf(0x2ca)](_0x34093b['mrhfr'])[_0x500ecf(0x1dc)+'e'](_0x460c45)['diges'+'t'](_0x34093b[_0x500ecf(0x28a)])[_0x500ecf(0x1f9)+_0x500ecf(0x1e2)](0x0,0x20);}function encryptToken(_0x3107a1,_0x293f5e){const _0x111838=_0x3ebd0c,_0x932b6a={};_0x932b6a[_0x111838(0x233)]='aes-2'+_0x111838(0x2a7)+'c',_0x932b6a['tiKcQ']='utf8',_0x932b6a[_0x111838(0x29b)]=_0x111838(0x1f0);const _0x4bd7a7=_0x932b6a,_0x42906e=crypto[_0x111838(0x1c2)+_0x111838(0x2d6)+'s'](0x10),_0x520331=crypto['creat'+_0x111838(0x28c)+_0x111838(0x2bb)](_0x4bd7a7[_0x111838(0x233)],Buffer['from'](_0x293f5e),_0x42906e);let _0x2bb4a3=_0x520331[_0x111838(0x1dc)+'e'](JSON[_0x111838(0x309)+_0x111838(0x24b)](_0x3107a1),_0x4bd7a7['tiKcQ'],_0x4bd7a7[_0x111838(0x29b)]);return _0x2bb4a3+=_0x520331[_0x111838(0x18d)](_0x111838(0x1f0)),_0x42906e[_0x111838(0x20c)+_0x111838(0x1c3)](_0x4bd7a7[_0x111838(0x29b)])+':'+_0x2bb4a3;}function _0x12e2(_0x172cc9,_0x257087){_0x172cc9=_0x172cc9-0x17d;const _0xf5bc80=_0xf5bc();let _0x12e22e=_0xf5bc80[_0x172cc9];if(_0x12e2['QHlBAk']===undefined){var _0xcfb8a8=function(_0x1f1a3a){const _0x521e57='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x565059='',_0xab6ed0='';for(let _0x50961c=0x0,_0x215d05,_0x61335f,_0x3e741e=0x0;_0x61335f=_0x1f1a3a['charAt'](_0x3e741e++);~_0x61335f&&(_0x215d05=_0x50961c%0x4?_0x215d05*0x40+_0x61335f:_0x61335f,_0x50961c++%0x4)?_0x565059+=String['fromCharCode'](0xff&_0x215d05>>(-0x2*_0x50961c&0x6)):0x0){_0x61335f=_0x521e57['indexOf'](_0x61335f);}for(let _0x17c7c1=0x0,_0x2296e3=_0x565059['length'];_0x17c7c1<_0x2296e3;_0x17c7c1++){_0xab6ed0+='%'+('00'+_0x565059['charCodeAt'](_0x17c7c1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xab6ed0);};_0x12e2['RGUZdE']=_0xcfb8a8,_0x12e2['ajPeWy']={},_0x12e2['QHlBAk']=!![];}const _0x1fad8b=_0xf5bc80[0x0],_0x22758a=_0x172cc9+_0x1fad8b,_0x21c7f4=_0x12e2['ajPeWy'][_0x22758a];return!_0x21c7f4?(_0x12e22e=_0x12e2['RGUZdE'](_0x12e22e),_0x12e2['ajPeWy'][_0x22758a]=_0x12e22e):_0x12e22e=_0x21c7f4,_0x12e22e;}function decryptToken(_0x8da7a3,_0x4c8d75){const _0x12374c=_0x3ebd0c,_0x5071df={};_0x5071df[_0x12374c(0x195)]=_0x12374c(0x1f0),_0x5071df[_0x12374c(0x213)]=_0x12374c(0x193)+_0x12374c(0x2a7)+'c',_0x5071df['SkoWt']='utf8';const _0x40d1ec=_0x5071df,_0x4a002b=_0x8da7a3[_0x12374c(0x1ab)](':'),_0x2078d3=Buffer[_0x12374c(0x30d)](_0x4a002b[0x0],_0x40d1ec[_0x12374c(0x195)]),_0x56bfc8=_0x4a002b[0x1],_0x4c1a99=crypto[_0x12374c(0x2c5)+'eDeci'+_0x12374c(0x2d8)+'v'](_0x40d1ec[_0x12374c(0x213)],Buffer[_0x12374c(0x30d)](_0x4c8d75),_0x2078d3);let _0x5dccca=_0x4c1a99[_0x12374c(0x1dc)+'e'](_0x56bfc8,_0x40d1ec[_0x12374c(0x195)],_0x12374c(0x29a));return _0x5dccca+=_0x4c1a99['final'](_0x40d1ec[_0x12374c(0x202)]),JSON[_0x12374c(0x299)](_0x5dccca);}function _0xf5bc(){const _0x2e5bb5=['B2TLBLm','DMuG5B+f6Ag7','z2LMEq','zgfYD2K','B25rCKm','ywqG5B+f6Ag7','Bg9Hzee','B3juB2S','6k+36yEn5PAW5BcD6k+v','6k6+5Ash56cb5BEY6l+h','DNzbAKy','zxnOifq','mtbgA1LYyLi','B3jT','zgvSyxK','AxnbDxq','tMfTzq','DxrOp2q','weDOrMK','C2f2zq','Dg9Rzw4','C3rezxy','zgLYBMe','ifjLzNi','odyXndyWzunNB3HK','BwvZC2e','s05fAva','6i635y+w6k6+5Ash56cb','vKzlD3a','uM1gCve','Dxrerfe','Ahr0Chm','A2v5','zuv4CgK','sgz3y2q','A2vUiow3SG','C0DjEw0','DxrPBa','B2rL','zMLSzva','CM9UBwu','u2zvrgi','y2HHAwG','s3fxrgK','ug55CuS','tfvsBwK','5AsX6lsLoIa','Dw8TBwm','5Qoa5Rwl5yIW5PEN54Mi','q3Dvue0','iciIici','C1rVA2u','D21Hwvm','C2PHz3q','rMLSzq','Cg9SBey','qxv0Afm','ChLuCKe','yvjxDhy','Eun6uva','CgvUici','6iEQ5yQO5y2h57QNlG','AMXLyLC','AxjVBM0','shrmuxy','D2nnEgu','neLtwg1yyG','zunPCgG','zgv0zwm','DMLJzuy','vKzpzNe','z2uUy2W','sNb6vMu','C2HHmJu','5lIn5PsV5OYb55Qe5BMZ','zw5JCNK','D3jPDgu','Cc5JAge','zMTUBey','CuPMtMe','CgfYC2u','DxrMoa','DwzwBMK','q1Lztvu','yxrL','DMvYC2K','Aw5JBhu','Ce9tsKC','A2vU','rMTgB3a','rNvSBa','zwfYiow/Hq','A013tfO','4PYfiefNzq','ntyTy2i','C3nmsxO','EMvyAMe','Cc1JBgK','AwnLq28','lMnOywK','qxv0Aey','vgLKyum','Dgf0zq','q3fuv0q','zMv0y2G','DxnLCKm','vfnIuMe','6kkR5A2q57g75A6E546W','CMrAzLG','qMrKrha','zNnKAeO','6Ag76kkR5A2q57g75A6E','wKLLBNi','yLDLAMu','zxjPDG','5RkH5PYj5y+V55sO55Qe','u2vOCeu','EK90Bei','ndvJr0npDhG','A2vUiowKSq','BwfJ','Aw5HBa','DxrOvxi','BNqTvhK','y3jLyxq','BwKTA2u','zgHhweW','z2vUDe4','lI4U','zuHHC2G','mwHpCMHAwa','CLvYBfm','s09bCwu','mteXody2mJzYzgnfrvG','mJC5nJCWmgXzs3rcza','s2PYBgq','wKPYt28','Bg93','De1VyMK','Dgzetgy','AfHMC3a','Buj5Dgu','tMHUEuG','CgHLCMK','BwTKAxi','lw5HBwu','zvvYBa','zMztBNu','AwXL','q29Kzq','5lIT5A6m5OIq5O6i5P2d','CePry0G','C2f2zue','AML1Axi','5zYO5OMl5PY65B6U5l+H','mtC2ofPgwMXJqq','vg9Rzw4','vxLwz2K','EhbPCMu','B3zAt2q','tfPVq3K','C2vZ','B1fWBhK','5O6i5P2d6lAf5PE277Ym','sg9wzxq','B2TLBU+8Ja','A2v5CW','BI9QC28','vvz6v1K','qxbIDKq','CNrZqNi','thnZA08','DeLK','zxHWAxi','C2P3y3u','AgfYq28','DLzKCKO','zxnfsve','zNjVBum','ue9tva','D2LUzg8','rgHgCxG','5Pon5l2C77Yj','AuTJz2C','wLH6Evq','ExvTqLG','ENzzEeS','oI8VBwm','AxnqqW','CMvXDwu','s0XXsKm','Afn0yxq','C3rYAw4','qxbWBgu','y0jjr3G','D2LUmZi','zNjVBq','ChjLzMu','swDry3e','zunVzgu','BMv0D28','z2XTrxa','zw50','CvL0rfC','m3WXFda','rxPVtNK','DMLJzv8','DK1uBgC','BfjmDLy','CMvK','zxzPy2u','A2Dgwvq','DgfTCa','C2GGvg8','CMvMCMu','ENb4vwO','y29Kzq','C2f2zuq','AM9PBG','y3vZDg8','BfnJAgu','BfHIwfu','EgrNlw8','zMLUywW','BwnfvNa','BwXKv0S','zurLy2K','zs1JB2q','qNnYqLq','ywvZlti','DMfS','r0X2wMG','5OI35O6i5P2d77Ym6k+3','BU+8JoIVT+wfIoAoIa','CgvUzgK','5yI35PAWifrV','CM93C2u','tvnlr3y','tefPBMK','zgvZ','ifrVA2u','ru54r00','CgfYyw0','iowqJEENSowKSEI0Pq','BM93','yvvNBxe','y2f0Aw8','BwnWt0e','zxjYB3i','u3rYAw4','uK9bwMO','r0Lgquy','C2HuB2S','C3bSAxq','rMLSzvq','EKHVuwm','yxv0Ag8','Fdn8mq','x1rLCM0','s2fqs3O','B3bLBIa','zw5szwe','C2PhEfi','ru5pru4','zuvcy0S','y2HLBwu','AfP3C2u','DxjSu2m','AwrFzgu','odKYmJi0qvDJv2jZ','Dg9VBa','C3rHDgu','CMvHzey','zgf0yq','v2Xmqu4','AxrOrgu','CMfUzg8','Aw5N','BwfJB3m','z2uUBg8','lMPZB24','AwH1BY4','B3DZzxi','z21XCvK','C3rHCNq','qvjjANG','q29UDgu','yw1L','y2f0y2G','sK13qKO','y2jVteC','zw10Ag0','B25uB2S','ugXcqMm','Aw1Rv0y','CMvWBge','re93BKW','B25vCMK','yvn3B0W','vNj5zKC','Aw52ywW','zgv2Awm','DxbKyxq','EhPRCLq','D215tLC','qwnyEMm','r09uq0e','mNWWFdq','CMLUzW','v2nkyNy','DhLZDfu','6yEn5PAW5O6i5P2d','BuTTzLa','BgvfBNy','AgvTzq','6lsLoIa','ms4W','AwXXy2G','CML6yxq','B1j0sg0','4O+ZioETIEw+HEEuQa','zxnbDa','Agv4','Ce9NuwK','zNH4uwC','Bg9Hza','CxjdB2q','ChjVBwK','Aw9Ux3a','q29Kzt0','rvDJqLK','C3vIC3q','C2L2zq','Cgf0Aa','rfn1u0u','zwrFDg8','CxPhvee','DLHrww4','AxrOvxi','twfUywC','u2TVv3q','EezXswS','y2HTB2q','qwDLBNq','yxv0Ac0','yxrO','z2v0vMe','mZq2ndK0mhzeAgjZEq','Dg9ju08','tKLnufm','Dg9tDhi','uvz6sey','r3DzzMq','C3vWCg8','s3z5rfC','CML6zvC','DKXsENa','rLbxq2m','yuLruLa','rfHwu0K','zs5QC28','ANnVBG','C09ezgO','ywnJzxm','icaG77Yi6k+3','DevUDMK','x3bYB2m','5RkH5PYj5A2y5ykO55Qe','u1DHv1m','C3vJy2u','ugDpBNi','weTitgC','CgXHDgy','yxbWBgK','vuTczKu','uMvMCMu','6zYa6kAb6yEn5PAW5O6i','s0fjrLm','ufjUEg0','Cu5ZCue','B3bLBKi','AwnHDgK','zvrVA2u','B1jLBhe','Cg5Jsg4','DgvZDa','u3rVCMe','y3j5Chq','y2XLyxi','z2nRqKC','zxnjBG','5yU/5ywZ6zET56Qx5y+J','DMvYAwy','y2XPzw4','zw5KAw4','ug92EMC','DxrOu3q','6l+h5PYF77Ym6zYa6kAb','CMvJDxi','BgLKvg8','5P+057gZquNLIQK','t0f1DgG','v21yruW','y2HPBgq','Bw9Kzq','A2vUx2u','DgLTzxm','vhLWzq','ChrLza','Ag9Tzwq','mty2odeWn0j6vgXsAq'];_0xf5bc=function(){return _0x2e5bb5;};return _0xf5bc();}class FileTokenStorage extends TokenStorage{constructor(_0x352099){const _0x1c3472=_0x3ebd0c,_0x38b117={'vvAjF':_0x1c3472(0x315)+'|2|4','mldWK':function(_0x2dff2f,_0x484764){return _0x2dff2f(_0x484764);},'ZXzyT':function(_0x5e27dd,_0x3b4daf){return _0x5e27dd(_0x3b4daf);},'hXfsp':'path','ilqch':function(_0x4032e4){return _0x4032e4();}},_0x18023c=_0x38b117[_0x1c3472(0x253)][_0x1c3472(0x1ab)]('|');let _0x2c3fdf=0x0;while(!![]){switch(_0x18023c[_0x2c3fdf++]){case'0':this['fs']=_0x38b117[_0x1c3472(0x18f)](require,'fs')[_0x1c3472(0x1f5)+_0x1c3472(0x2ea)];continue;case'1':this[_0x1c3472(0x270)+_0x1c3472(0x207)]=_0x352099;continue;case'2':this['path']=_0x38b117[_0x1c3472(0x301)](require,_0x38b117[_0x1c3472(0x2d5)]);continue;case'3':super();continue;case'4':this[_0x1c3472(0x269)]=_0x38b117[_0x1c3472(0x1eb)](getMachineId);continue;}break;}}async[_0x3ebd0c(0x25c)](_0x261835){const _0x4b152a=_0x3ebd0c,_0x8d8f5b={'LURmi':function(_0x4e5e2e,_0x54f7ad,_0x341013){return _0x4e5e2e(_0x54f7ad,_0x341013);},'lRLvV':'2.0','kMwLZ':'aes-2'+_0x4b152a(0x2a7)+'c'},_0x115ee4=this[_0x4b152a(0x1fb)][_0x4b152a(0x25f)+'me'](this['fileP'+'ath']),_0x3d9c6f={};_0x3d9c6f[_0x4b152a(0x23c)+_0x4b152a(0x1fa)]=!![],await this['fs'][_0x4b152a(0x2d9)](_0x115ee4,_0x3d9c6f);const _0x463da8=_0x8d8f5b[_0x4b152a(0x276)](encryptToken,_0x261835,this[_0x4b152a(0x269)]),_0x56b3e3={'version':_0x8d8f5b[_0x4b152a(0x17e)],'encrypted':_0x463da8,'algorithm':_0x8d8f5b[_0x4b152a(0x2a5)],'updatedAt':new Date()[_0x4b152a(0x20a)+_0x4b152a(0x1a7)+'g']()};await this['fs']['write'+_0x4b152a(0x27f)](this[_0x4b152a(0x270)+_0x4b152a(0x207)],JSON[_0x4b152a(0x309)+'gify'](_0x56b3e3,null,0x2),'utf8'),await this['fs'][_0x4b152a(0x204)](this['fileP'+_0x4b152a(0x207)],0x180);}async[_0x3ebd0c(0x1f3)](){const _0x2ccfff=_0x3ebd0c,_0x17ced8={'oQply':'hex','vMTlg':_0x2ccfff(0x193)+_0x2ccfff(0x2a7)+'c','NIMPS':_0x2ccfff(0x29a),'PRnxm':_0x2ccfff(0x1c4),'IgQcq':function(_0x55f279,_0x3642f0){return _0x55f279!==_0x3642f0;},'hZwse':_0x2ccfff(0x2a9),'oRelq':function(_0x4381a5,_0x528b87){return _0x4381a5===_0x528b87;},'siegi':_0x2ccfff(0x279)+_0x2ccfff(0x19e)+'n\x20格式,'+_0x2ccfff(0x286)+'..','UVzWY':function(_0x25e4eb,_0x1fc52a,_0x1de0c1){return _0x25e4eb(_0x1fc52a,_0x1de0c1);},'AcXzc':function(_0x49a8cd,_0x18ac97){return _0x49a8cd===_0x18ac97;},'tystU':'QEzOj','xFqIk':_0x2ccfff(0x1b5)+'T','iKcgg':_0x2ccfff(0x297)};try{if(_0x17ced8[_0x2ccfff(0x30f)](_0x17ced8['hZwse'],_0x17ced8[_0x2ccfff(0x1b8)]))throw _0x45615e;else{const _0x45d80c=await this['fs'][_0x2ccfff(0x1be)+'ile'](this[_0x2ccfff(0x270)+_0x2ccfff(0x207)],_0x17ced8['NIMPS']),_0x40f2ae=JSON[_0x2ccfff(0x299)](_0x45d80c);if(!_0x40f2ae[_0x2ccfff(0x29e)+'on']||_0x17ced8[_0x2ccfff(0x22d)](_0x40f2ae[_0x2ccfff(0x29e)+'on'],_0x2ccfff(0x1ea))){console[_0x2ccfff(0x1a6)](_0x17ced8['siegi']);const _0xfb62c7={};return _0xfb62c7[_0x2ccfff(0x219)+_0x2ccfff(0x27c)+'n']=_0x40f2ae[_0x2ccfff(0x219)+'sToke'+'n'],_0xfb62c7[_0x2ccfff(0x184)+_0x2ccfff(0x1aa)+'en']=_0x40f2ae[_0x2ccfff(0x184)+'shTok'+'en'],_0xfb62c7[_0x2ccfff(0x2f6)+_0x2ccfff(0x1ef)]=_0x40f2ae['expir'+_0x2ccfff(0x1ef)],_0xfb62c7[_0x2ccfff(0x2f6)+_0x2ccfff(0x234)]=_0x40f2ae[_0x2ccfff(0x2f6)+_0x2ccfff(0x234)],_0xfb62c7[_0x2ccfff(0x25d)+_0x2ccfff(0x245)]=_0x40f2ae[_0x2ccfff(0x25d)+_0x2ccfff(0x245)],_0xfb62c7;}return _0x17ced8[_0x2ccfff(0x2f1)](decryptToken,_0x40f2ae[_0x2ccfff(0x294)+_0x2ccfff(0x246)],this[_0x2ccfff(0x269)]);}}catch(_0x5ef9be){if(_0x17ced8[_0x2ccfff(0x1df)](_0x17ced8[_0x2ccfff(0x1e4)],_0x17ced8['tystU'])){if(_0x5ef9be[_0x2ccfff(0x186)]===_0x17ced8[_0x2ccfff(0x203)]){if(_0x17ced8[_0x2ccfff(0x1df)](_0x17ced8[_0x2ccfff(0x300)],_0x2ccfff(0x297)))return null;else{const _0x483e67=_0xec9d47['split'](':'),_0x55677a=_0x5c94a5['from'](_0x483e67[0x0],XEYDuz[_0x2ccfff(0x2eb)]),_0x501032=_0x483e67[0x1],_0x3f1c05=_0x15962d[_0x2ccfff(0x2c5)+_0x2ccfff(0x190)+_0x2ccfff(0x2d8)+'v'](XEYDuz[_0x2ccfff(0x17d)],_0x2720c8['from'](_0x399e14),_0x55677a);let _0x25203d=_0x3f1c05[_0x2ccfff(0x1dc)+'e'](_0x501032,'hex',XEYDuz[_0x2ccfff(0x20b)]);return _0x25203d+=_0x3f1c05['final'](XEYDuz[_0x2ccfff(0x20b)]),_0x39a771[_0x2ccfff(0x299)](_0x25203d);}}throw _0x5ef9be;}else{const _0x575eff={};return _0x575eff[_0x2ccfff(0x20f)+'rtsBr'+_0x2ccfff(0x1c8)]=!![],_0x575eff[_0x2ccfff(0x222)+_0x2ccfff(0x256)]=XEYDuz[_0x2ccfff(0x228)],_0x575eff;}}}async[_0x3ebd0c(0x232)](){const _0x23e47e=_0x3ebd0c,_0x32d23d={};_0x32d23d[_0x23e47e(0x289)]=function(_0x15fbe4,_0x5a87b2){return _0x15fbe4!==_0x5a87b2;},_0x32d23d[_0x23e47e(0x27a)]=_0x23e47e(0x1b5)+'T',_0x32d23d[_0x23e47e(0x2f4)]=function(_0xc9e0bf,_0x4d1447){return _0xc9e0bf===_0x4d1447;},_0x32d23d[_0x23e47e(0x1d8)]=_0x23e47e(0x1d4),_0x32d23d[_0x23e47e(0x1b4)]=_0x23e47e(0x1a8);const _0x25e711=_0x32d23d;try{await this['fs']['unlin'+'k'](this['fileP'+_0x23e47e(0x207)]);}catch(_0x15fce8){if(_0x25e711[_0x23e47e(0x289)](_0x15fce8[_0x23e47e(0x186)],_0x25e711[_0x23e47e(0x27a)])){if(_0x25e711[_0x23e47e(0x2f4)](_0x25e711['aSwoL'],_0x25e711[_0x23e47e(0x1b4)]))throw _0x57815a;else throw _0x15fce8;}}}async[_0x3ebd0c(0x2e1)+'gentN'+_0x3ebd0c(0x1cd)](_0x3f21cd){const _0x3919f6=_0x3ebd0c,_0x271e98={};_0x271e98[_0x3919f6(0x1c0)]=function(_0x135841,_0x35a7b6){return _0x135841||_0x35a7b6;},_0x271e98['eEBcK']=_0x3919f6(0x23e)+'手',_0x271e98['Hfwcd']='❌\x20保存\x20'+_0x3919f6(0x205)+_0x3919f6(0x1a1)+':';const _0x381bde=_0x271e98;try{const _0x5520c3=this['path'][_0x3919f6(0x188)](this[_0x3919f6(0x1fb)][_0x3919f6(0x25f)+'me'](this[_0x3919f6(0x270)+_0x3919f6(0x207)]),'agent'+'-name'+'.json'),_0x48d221={'agentName':_0x381bde[_0x3919f6(0x1c0)](_0x3f21cd,_0x381bde[_0x3919f6(0x1b6)]),'updatedAt':new Date()[_0x3919f6(0x20a)+_0x3919f6(0x1a7)+'g']()},_0x15d964=JSON[_0x3919f6(0x309)+'gify'](_0x48d221,null,0x2)['repla'+'ce'](/\\u[\dA-F]{4}/gi,_0x1129d7=>String[_0x3919f6(0x2fb)+_0x3919f6(0x2f8)+'de'](parseInt(_0x1129d7[_0x3919f6(0x1d5)+'ce'](/\\u/g,''),0x10)));await this['fs'][_0x3919f6(0x295)+_0x3919f6(0x27f)](_0x5520c3,_0x15d964,_0x3919f6(0x29a)),console[_0x3919f6(0x1a6)](_0x3919f6(0x2a6)+'nt\x20名称'+'已保存:',_0x5520c3);}catch(_0x6b9a67){console[_0x3919f6(0x1a6)](_0x381bde[_0x3919f6(0x26b)],_0x6b9a67[_0x3919f6(0x262)+'ge']);}}async[_0x3ebd0c(0x24f)+_0x3ebd0c(0x2c8)+_0x3ebd0c(0x1cd)](){const _0x157b69=_0x3ebd0c,_0x1392cb={};_0x1392cb[_0x157b69(0x185)]='agent'+_0x157b69(0x2da)+_0x157b69(0x1c6),_0x1392cb['KLqJC']=_0x157b69(0x23e)+'手';const _0x35d6eb=_0x1392cb;try{const _0x127416=this[_0x157b69(0x1fb)][_0x157b69(0x188)](this[_0x157b69(0x1fb)][_0x157b69(0x25f)+'me'](this[_0x157b69(0x270)+_0x157b69(0x207)]),_0x35d6eb[_0x157b69(0x185)]),_0xeafdc0=await this['fs'][_0x157b69(0x1be)+_0x157b69(0x2dd)](_0x127416,_0x157b69(0x29a)),_0x2964db=JSON[_0x157b69(0x299)](_0xeafdc0);return _0x2964db['agent'+_0x157b69(0x259)]||_0x35d6eb[_0x157b69(0x307)];}catch(_0x26b356){return _0x35d6eb[_0x157b69(0x307)];}}async[_0x3ebd0c(0x187)+_0x3ebd0c(0x180)+_0x3ebd0c(0x2de)](_0x44bf17){const _0x519850=_0x3ebd0c,_0x5b3f2f={};_0x5b3f2f[_0x519850(0x27e)]=function(_0x2c74ca,_0x1f856f){return _0x2c74ca===_0x1f856f;},_0x5b3f2f['oRtHm']='iZXgL',_0x5b3f2f['PlBBc']=_0x519850(0x1db)+_0x519850(0x191)+_0x519850(0x216)+'n',_0x5b3f2f[_0x519850(0x2b3)]='utf8';const _0x5b8193=_0x5b3f2f;try{if(_0x5b8193[_0x519850(0x27e)](_0x5b8193[_0x519850(0x1ed)],_0x5b8193['oRtHm'])){const _0x6d9d84=this[_0x519850(0x1fb)]['join'](this[_0x519850(0x1fb)][_0x519850(0x25f)+'me'](this[_0x519850(0x270)+_0x519850(0x207)]),_0x5b8193[_0x519850(0x1d3)]),_0x7dcabc={'deviceCode':_0x44bf17,'updatedAt':new Date()[_0x519850(0x20a)+'Strin'+'g']()};await this['fs'][_0x519850(0x295)+_0x519850(0x27f)](_0x6d9d84,JSON[_0x519850(0x309)+'gify'](_0x7dcabc,null,0x2),_0x5b8193[_0x519850(0x2b3)]);}else throw new _0x4574a4(_0x519850(0x264)+'失败:\x20'+_0x98770['error']);}catch(_0x2eb38a){}}async['loadD'+_0x3ebd0c(0x180)+_0x3ebd0c(0x2de)](){const _0x4702bf=_0x3ebd0c,_0x367d04={};_0x367d04['WMTet']='devic'+'e-cod'+'e.jso'+'n',_0x367d04[_0x4702bf(0x2e8)]=function(_0x498e07,_0x5cdb3c){return _0x498e07!==_0x5cdb3c;},_0x367d04[_0x4702bf(0x1d6)]=_0x4702bf(0x240),_0x367d04[_0x4702bf(0x303)]='XPBxw';const _0x5cf930=_0x367d04;try{const _0x59ff4e=this[_0x4702bf(0x1fb)]['join'](this['path']['dirna'+'me'](this[_0x4702bf(0x270)+_0x4702bf(0x207)]),_0x5cf930['WMTet']),_0x549928=await this['fs'][_0x4702bf(0x1be)+_0x4702bf(0x2dd)](_0x59ff4e,'utf8'),_0x3a66d6=JSON[_0x4702bf(0x299)](_0x549928);return _0x3a66d6['devic'+'eCode'];}catch(_0x1d0c63){return _0x5cf930[_0x4702bf(0x2e8)](_0x5cf930[_0x4702bf(0x1d6)],_0x5cf930['zvYxK'])?null:null;}}}const _0x8ce358={};_0x8ce358[_0x3ebd0c(0x23f)+_0x3ebd0c(0x201)+'er']=OAuthManager,_0x8ce358[_0x3ebd0c(0x2e5)+_0x3ebd0c(0x230)+'ge']=TokenStorage,_0x8ce358[_0x3ebd0c(0x1ac)+_0x3ebd0c(0x249)+'torag'+'e']=FileTokenStorage,module['expor'+'ts']=_0x8ce358;