@2api-store/activate 0.7.0 → 0.9.0
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/README.md +34 -1
- package/dist/activate.mjs +1 -1
- package/dist/lib/api.mjs +1 -1
- package/dist/lib/backup.mjs +1 -1
- package/dist/lib/cmds.mjs +1 -1
- package/dist/lib/detect.mjs +1 -1
- package/dist/lib/device.mjs +1 -1
- package/dist/lib/diagnose.mjs +1 -0
- package/dist/lib/install.mjs +1 -1
- package/dist/lib/platforms.mjs +1 -1
- package/dist/lib/pow.mjs +1 -1
- package/dist/lib/prompt.mjs +1 -1
- package/dist/lib/render.mjs +1 -1
- package/dist/lib/ui.mjs +1 -1
- package/dist/lib/write.mjs +1 -1
- package/dist/package.json +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ npx @2api-store/activate
|
|
|
27
27
|
|
|
28
28
|
## 子命令
|
|
29
29
|
|
|
30
|
-
除了默认激活流程,还提供
|
|
30
|
+
除了默认激活流程,还提供 5 个子命令用于后续维护:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
npx @2api-store/activate <subcommand> [options]
|
|
@@ -38,6 +38,7 @@ npx @2api-store/activate <subcommand> [options]
|
|
|
38
38
|
| `restore` | 从备份恢复:扫描 `~/.codex/`、`~/.claude/`、`~/.gemini/` 下的 `.bak.*` 文件,选择一个恢复(覆盖当前) |
|
|
39
39
|
| `reset` | 恢复官方默认:删除 2api.store 写入的配置文件(`~/.codex/config.toml`、`~/.codex/auth.json`、`~/.claude/settings.json`、`~/.gemini/settings.json`),并尝试从最新备份恢复。**破坏性操作,需确认** |
|
|
40
40
|
| `refresh-groups` | 查看可用分组:`GET /cli/groups` → 彩色表格展示。只读,不改 key/配置 |
|
|
41
|
+
| `diagnose` | 一键诊断连接并生成日志压缩包:环境收集 + 渠道 HTTP 实测(真实小请求)+ 已装 CLI 实测,zip 已脱敏,发给客服排障 |
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
### restore — 从备份恢复
|
|
@@ -82,6 +83,38 @@ npx @2api-store/activate refresh-groups
|
|
|
82
83
|
- 只读,不改 key/配置
|
|
83
84
|
- 如需切组:已有 API Key 走管理后台,或重新激活(兑换码可重选分组)
|
|
84
85
|
|
|
86
|
+
### diagnose — 连接诊断与日志收集
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npx @2api-store/activate diagnose # 一键诊断(执行前有确认)
|
|
90
|
+
npx @2api-store/activate diagnose --yes # 免确认(客服远程指导可直接贴这条命令)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
连接不通 / 时快时慢 / 想让客服排查时使用。自动完成:凭据发现(按序扫 `~/.codex/auth.json` → `~/.claude/settings.json` → `~/.gemini/settings.json`,找不到会提示输入)→ 环境快照(OS / Node / 已装 CLI / 配置文件元信息 / 代理环境变量)→ 拉后端诊断矩阵(不可用时走内置兜底)→ 对每个测试模型发真实小请求实测 → 已装 CLI 非交互实测(各 30s 超时)→ 脱敏打包 zip + 打印摘要表。
|
|
94
|
+
|
|
95
|
+
| 参数 | 说明 |
|
|
96
|
+
|------|------|
|
|
97
|
+
| `--yes, -y` | 免确认直接执行(真实小请求,正常计费) |
|
|
98
|
+
| `--model <m1,m2>` | 覆盖测试模型(逗号分隔;默认用后端下发矩阵 / 内置兜底) |
|
|
99
|
+
| `--skip-cli-tests` | 只测 HTTP,不运行本地 CLI |
|
|
100
|
+
| `--out <dir>` | 诊断包输出目录(默认当前目录) |
|
|
101
|
+
| `--api-base <url>` | 覆盖 API 端点(同其他子命令) |
|
|
102
|
+
|
|
103
|
+
**zip 包内文件**(顶层目录 `tokenshop-diagnose-<时间戳>/`):
|
|
104
|
+
|
|
105
|
+
| 文件 | 内容 |
|
|
106
|
+
|------|------|
|
|
107
|
+
| `summary.json` | 环境 + 测试结果汇总(客服先看这个) |
|
|
108
|
+
| `env.json` | OS / Node 版本 / 已装 CLI / 配置文件元信息 / 代理环境变量 |
|
|
109
|
+
| `http-tests.jsonl` | 每个模型一行:request_id / 状态码 / ttfb / 总延迟 / 错误 / 响应片段 |
|
|
110
|
+
| `cli-tests.jsonl` | 每个已装 CLI 一行:命令 / 退出码 / 耗时 / 是否超时 / stdout+stderr(截断 10KB) |
|
|
111
|
+
| `configs/` | 本地配置文件的**脱敏副本**(不存在的文件跳过) |
|
|
112
|
+
| `README.txt` | 给客服的说明(含 request_id 对账用法) |
|
|
113
|
+
|
|
114
|
+
**隐私说明**:包内所有密钥全程掩码(`sk-…尾6` 形态,绝不落明文);Bearer 凭证、邮箱、代理 URL 内嵌的账号密码均自动脱敏;`configs/` 是脱敏副本,本地原始配置文件不会被修改。
|
|
115
|
+
|
|
116
|
+
**计费提示**:HTTP 实测会对每个测试模型发送**真实计费**的小请求(`max_tokens=1`,每模型约几分钱)。每条 HTTP 记录的 `request_id` 取自响应头 `X-Request-Id`,客服凭它可在生产后台 usage_logs / 网关日志中精确对账该次请求。
|
|
117
|
+
|
|
85
118
|
## 命令行选项
|
|
86
119
|
|
|
87
120
|
```
|
package/dist/activate.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const _0x58a7dd=_0x5701;(function(_0x10edb9,_0x545c6a){const _0x4130f2=_0x5701,_0x1f0ad2=_0x10edb9();while(!![]){try{const _0x571c1a=-parseInt(_0x4130f2(0xe9))/0x1+parseInt(_0x4130f2(0x133))/0x2+-parseInt(_0x4130f2(0xe3))/0x3+-parseInt(_0x4130f2(0x9d))/0x4*(parseInt(_0x4130f2(0x12e))/0x5)+-parseInt(_0x4130f2(0x175))/0x6+-parseInt(_0x4130f2(0xfb))/0x7*(-parseInt(_0x4130f2(0xb1))/0x8)+parseInt(_0x4130f2(0x130))/0x9;if(_0x571c1a===_0x545c6a)break;else _0x1f0ad2['push'](_0x1f0ad2['shift']());}catch(_0x2c1a07){_0x1f0ad2['push'](_0x1f0ad2['shift']());}}}(_0x2229,0x25d79),(process['removeAllListeners'](_0x58a7dd(0x96)),process[_0x58a7dd(0xdf)][_0x58a7dd(0x16f)]='1'));import{detectAll as _0x103be4}from'./lib/detect.mjs';import{cliActivate as _0x466535,listGroups as _0x4f50b6,verifyApiKey as _0x4ae18c,probeModels as _0x4f257e}from'./lib/api.mjs';import{renderContent as _0x3b1af8,expandPath as _0x2533f6,listModels as _0x54e5a6}from'./lib/render.mjs';import{backupFile as _0x329013}from'./lib/backup.mjs';import{writeFileWithPermission as _0x156b24,PermissionDeniedError as _0x201849}from'./lib/write.mjs';import{ask as _0x5e4d8b,askSecret as _0x133bf8,multiSelect as _0x4c7c18,select as _0x51256f,confirm as _0x473d56,closePrompt as _0x344df9}from'./lib/prompt.mjs';import{banner as _0x4d68ce,ok as _0x8590fc,fail as _0x1741b1,warn as _0x341987,info as _0x20c68f,step as _0xbc579a,guide as _0x25d5ab,plain as _0x20fe6c,chalk as _0x381be6}from'./lib/ui.mjs';import{getCliMeta as _0x38d96c,isDefaultSelected as _0x1c2215}from'./lib/platforms.mjs';import{ensureInstalled as _0x1ebe17}from'./lib/install.mjs';function _0x2229(){const _0x107a8a=['wRxEX','warning','LfZxV','\x20·\x20node\x20v','邮箱格式不正确','test','tIall','jkQhi','5820IZOcRW','dNpyJ','NemoP','backup','sHkZo','检查\x20CLI\x20安装状态','XJGYy','gemini','\x20/\x20','模式:','(配置仍会写入,但请手动安装后使用)','QDYeU','installed','meta','备份失败:','需手动执行的\x20shell\x20命令:','stack','──\x20','join','已写入','8QbiVyM','green','dZAzJ','YJTTp','detectBin','NQLfe','激活失败:','FyTRh','qJXrj','includes','\x20无可自动安装的\x20npm\x20包,请手动安装后重跑(配置仍会写入)','请输入\x20API\x20Key(sk-...)或兑换码','未选择分组','--api-base','windows','Vrccr','ODpVT','dry-run','group','bRchL','lmpWz','CRnmP','API\x20Key','https://2api.store','TUubR','push','环境:','usage','sXaip','HHouk','\x20项(见上方输出)','NrHcY','files','平台过滤:','KjrFF','\x20\x20\x20\x20...(共\x20','trim','其他(手动输入模型\x20ID)','iFfzy','error','EKPCT','MdNip','redeem','zWbaG','then','kGkCw','env','新账号:','选择绑定的分组','replace','378561krnrOS','mode','msYwn','is_new','available','log','219560DAYQro','path','olYwM','ydPJQ','unknown','IIweJ','isWindows','pLkDt','PowerShell','configs','help','user','\x20异常:','filter','skipped','reason','写入失败:','\x20个文件','1619415RTLoPQ','请求激活服务','pDJyS','NUrXJ','(仍会写入配置;如需更换请重跑激活选择其他模型)','PJgrH','key','\x20平台,ID\x20','message','Linux','apiBase','vdUZm','api_key','(跳过模型可用性探测:服务端暂不支持或网络不可达)','未检测到\x20codex/claude/gemini/grok/opencode(可在后续步骤按需自动安装)','\x20\x20内容预览:','platform','LMDuZ','hwVfu','string','vKRMN','ceXTR','选择默认模型','client_type','ItACd','toLowerCase','Vxjqn','all','NfOSo','version','未选择任何\x20CLI,退出。','email','dim','模型可用性探测:','备份并写入配置','jRUDI','\x20(未装)','LlZIh','未检测到\x20','可能是分组不匹配或账号临时不可用,使用时会报\x20404/429','display_name','WWCyU','--help','imhqO','(命令\x20','get','keys','建议换用:','\x20已创建,请查收邮件获取初始密码,登录后尽快修改。','OsCRb','base_url','895udoSLN','lEegQ','3385476fKCrEC','\x20\x20备份:','displayName','344982KeazMG','验证\x20API\x20Key','pHonl','\x20安装(','vLvbp','sk-','验证未通过:','WNQzO','qCNjg','(ID\x20','openai','BjNws','选择\x20CLI','服务端未返回模型列表,{{defaultModel}}\x20将留空','/antigravity','shell-only','\x20\x20目标:','(跳过此文件避免无备份覆盖)','claude','已跳过\x20','\x20安装失败:','--dry-run','split','\x20\x20\x20\x20','dvyMq','SClCK','argv','forEach','name','WTLwN','JrKXL','Windows','unix','凭据格式无法识别(应为\x20sk-\x20前缀的\x20API\x20Key\x20或兑换码)','anthropic','\x20\x20[试运行]\x20不真实写入','ouXrU','UJaVz','LSXqV','服务端未返回适配当前系统的配置模板','action','installPackage','iLKoH','UVzPl','\x20行)','fgZJe','OCdLo','\x20个文件(未真实写入)','未知错误','gray','nZwbj','SaOlK','Yquxx','兑换码','./package.json','UtvpH','dxbZQ','\x20\x20[shell\x20命令,请手动执行]','slice','failed','NODE_NO_WARNINGS','选择默认模型(最新优先)','\x20\x20-\x20','xsUqu','written','zGnAb','112842Hbdjau','label','XsIBc','ACTIVATE_API_BASE','macOS','获取可用分组','backup-failed','ohunn','\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate','statusCode','\x20──','(独立\x20CLI)','exit','\x20个模型当前无可用账号(标注\x20⚠,可能是分组不匹配或账号临时不可用)','hGFmC','fnykl','\x20已安装','激活报告','node','nksKY','dryRun','model','zhGis','toPaS','\x0a\x0a环境变量:\x0a\x20\x20ACTIVATE_API_BASE\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(同\x20--api-base)\x0a\x0a示例:\x0a\x20\x20npx\x20@2api-store/activate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20默认激活\x0a\x20\x20npx\x20@2api-store/activate\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20试运行\x0a\x20\x20npx\x20@2api-store/activate\x20--platform\x20openai\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20只激活\x20openai\x0a\x20\x20npx\x20@2api-store/activate\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20从备份恢复\x0a\x20\x20npx\x20@2api-store/activate\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20恢复官方默认\x0a\x20\x20npx\x20@2api-store/activate\x20refresh-groups\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20查看可用分组\x0a\x20\x20ACTIVATE_API_BASE=http://127.0.0.1:5566\x20npx\x20@2api-store/activate\x0a\x0a退出码:\x0a\x20\x200\x20\x20成功\x0a\x20\x201\x20\x20输入错误\x20/\x20网络失败\x20/\x20致命错误\x0a\x20\x202\x20\x20部分文件权限不足(请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)\x0a\x20\x203\x20\x20其他写入失败\x0a','cli','\x20当前无可用账号','supported','hpoZt','--version','config','JzxXE','hELHA','vBEou','NtBSn','zPqcz','BZVdH','输入模型\x20ID(如\x20gpt-5.6-terra)','\x20\x20HTTP\x20','map','models','add','os_type','hnSOi','xslnc','LKyvu','\x20安装(配置仍会写入,但请手动安装后使用)','length','--platform','Terminal','clientType','iaRtg','permission-denied','NmuwZ','【试运行模式\x20--dry-run】不会真写文件、不会真装\x20CLI','\x20安装成功','CAxpW','KLagj','ogxWr','部分文件权限不足,请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑:','备份位置:','startsWith','未输入凭据','未查询到可用分组。请联系管理员开通分组后再激活。'];_0x2229=function(){return _0x107a8a;};return _0x2229();}import{SUBCOMMANDS as _0x4cc630,SUBCOMMAND_NAMES as _0x1980a6,SUB_HELP as _0x2a9365}from'./lib/cmds.mjs';import{createRequire as _0x96721}from'node:module';function _0x5701(_0x4158a2,_0x3e66f1){_0x4158a2=_0x4158a2-0x6e;const _0x22296b=_0x2229();let _0x5701cf=_0x22296b[_0x4158a2];return _0x5701cf;}const L=_0x96721(import.meta.url)(_0x58a7dd(0x169))[_0x58a7dd(0x118)],E=_0x58a7dd(0xc8);(async function(){const _0x775733=_0x58a7dd,_0x4c2269={'dvyMq':function(_0x45b0c2,_0x22bf77){return _0x45b0c2<_0x22bf77;},'XsIBc':function(_0x51c01e,_0x1ec2ab){return _0x51c01e===_0x1ec2ab;},'nZwbj':function(_0x17ac26,_0x34bda7){return _0x17ac26===_0x34bda7;},'LKyvu':_0x775733(0x85),'KLagj':function(_0x2ee785,_0x3e77bb){return _0x2ee785===_0x3e77bb;},'zWbaG':_0x775733(0x72),'WWCyU':function(_0x5d0e76,_0x333a8c){return _0x5d0e76==_0x333a8c;},'bRchL':_0x775733(0x10e),'IIweJ':_0x775733(0x13d),'HHouk':_0x775733(0x145),'CRnmP':_0x775733(0x155),'MdNip':_0x775733(0xa4),'NrHcY':function(_0x37e6cd){return _0x37e6cd();},'TUubR':_0x775733(0x104),'XtSvq':_0x775733(0x152),'fnykl':function(_0x509434,_0x23e581){return _0x509434(_0x23e581);},'kGkCw':function(_0x1415ee,_0x4e6edd){return _0x1415ee>_0x4e6edd;},'NmuwZ':function(_0x232e04,_0x4de39e){return _0x232e04(_0x4de39e);},'ceXTR':function(_0x2b1454,_0xedd16c){return _0x2b1454(_0xedd16c);},'DmikK':_0x775733(0x109),'hnSOi':function(_0x44dac0,_0x49070c){return _0x44dac0(_0x49070c);},'LfZxV':_0x775733(0x8b),'UtvpH':function(_0x2c0cea,_0x3f379c){return _0x2c0cea(_0x3f379c);},'ouXrU':_0x775733(0xbc),'zGnAb':function(_0x38e545,_0xd49a70){return _0x38e545(_0xd49a70);},'toPaS':_0x775733(0x93),'WTLwN':_0x775733(0x101),'ODpVT':_0x775733(0xdb),'DSKTb':'empty','NQLfe':function(_0x31b002,_0x3dcb39){return _0x31b002===_0x3dcb39;},'iFfzy':function(_0x4ffb00,_0x5cd206){return _0x4ffb00(_0x5cd206);},'NfOSo':_0x775733(0x154),'UVzPl':_0x775733(0x168),'wtsSK':function(_0x36c72b,_0x210e64){return _0x36c72b===_0x210e64;},'dZAzJ':function(_0x365a99,_0x3c6612){return _0x365a99(_0x3c6612);},'OsCRb':'请输入邮箱(用于兑换码绑定\x20/\x20新账号创建)','hELHA':_0x775733(0x99),'qEPtI':_0x775733(0x17a),'hwVfu':function(_0x51963a,_0xbf3681){return _0x51963a===_0xbf3681;},'CAxpW':function(_0x205462,_0x52a7eb){return _0x205462(_0x52a7eb);},'dxbZQ':_0x775733(0x94),'CuGRY':function(_0x15adb3,_0x514146,_0x46d1ae,_0x2bb509){return _0x15adb3(_0x514146,_0x46d1ae,_0x2bb509);},'QDYeU':_0x775733(0xe1),'xslnc':_0x775733(0xbd),'YJTTp':_0x775733(0xfc),'ItACd':function(_0x5a2e14,_0x3b0e5c){return _0x5a2e14(_0x3b0e5c);},'NUrXJ':function(_0x47abea,_0x3e0eaf){return _0x47abea(_0x3e0eaf);},'imhqO':function(_0x4c5363,_0x4d5fcf){return _0x4c5363===_0x4d5fcf;},'ydPJQ':_0x775733(0x15a),'zPqcz':function(_0x21469a,_0x478ed5){return _0x21469a(_0x478ed5);},'fgZJe':function(_0x58435f,_0x18f4ed){return _0x58435f(_0x18f4ed);},'icAJg':_0x775733(0x180),'sXaip':function(_0x1ad8c4,_0x2d7220){return _0x1ad8c4(_0x2d7220);},'OjvBh':_0x775733(0x119),'gtldB':_0x775733(0xa2),'vKRMN':function(_0x3b2344,_0x1040f8){return _0x3b2344(_0x1040f8);},'esrQe':function(_0xd4993e,_0xf49541){return _0xd4993e(_0xf49541);},'AdVYK':function(_0x3c79df,_0xd243a0,_0x26b0d5){return _0x3c79df(_0xd243a0,_0x26b0d5);},'kpPiy':'user-declined','jRUDI':_0x775733(0x163),'LlZIh':function(_0x5c1ecc,_0x367666){return _0x5c1ecc(_0x367666);},'JBudQ':function(_0xb7c85,_0xc7debf){return _0xb7c85(_0xc7debf);},'vdUZm':_0x775733(0x170),'olYwM':_0x775733(0x138),'GCSQo':function(_0xd89670,_0x3a886d){return _0xd89670(_0x3a886d);},'qCNjg':_0x775733(0x108),'NemoP':function(_0x20041d,_0x2cf8b6){return _0x20041d(_0x2cf8b6);},'OczOe':_0x775733(0xd6),'WNQzO':function(_0x3acb86,_0x1291c2,_0x541329,_0x16652f){return _0x3acb86(_0x1291c2,_0x541329,_0x16652f);},'CHAha':_0x775733(0x111),'EKPCT':function(_0x3d6b14,_0x34c842){return _0x3d6b14(_0x34c842);},'ohunn':_0x775733(0x7a),'PJgrH':function(_0x1bfd27,_0x112cd4){return _0x1bfd27(_0x112cd4);},'FyTRh':function(_0x1ef046,_0x4f077b){return _0x1ef046===_0x4f077b;},'BjNws':function(_0x20d110,_0x5b64d0){return _0x20d110(_0x5b64d0);},'wUXlu':_0x775733(0x122),'msYwn':function(_0x592012,_0x4bbf86){return _0x592012>_0x4bbf86;},'lEegQ':function(_0x386f2d,_0x10f238){return _0x386f2d(_0x10f238);},'pHonl':_0x775733(0xff),'hGFmC':_0x775733(0x140),'lmpWz':function(_0x269785,_0x3aad4b){return _0x269785(_0x3aad4b);},'Vxjqn':_0x775733(0x11d),'UJaVz':function(_0x11f323,_0x3b2231){return _0x11f323(_0x3b2231);},'pDJyS':_0x775733(0x86),'Vrccr':function(_0x445bd9,_0x78ce4b){return _0x445bd9===_0x78ce4b;},'Dndwq':_0x775733(0xf1),'pLkDt':function(_0x437b40,_0x4ca5fc,_0x2f4bd3){return _0x437b40(_0x4ca5fc,_0x2f4bd3);},'XJGYy':function(_0x302040,_0x2cbe0e,_0x32daf0){return _0x302040(_0x2cbe0e,_0x32daf0);},'NtBSn':_0x775733(0x16c),'jkQhi':function(_0x41b260,_0x39f0a6){return _0x41b260(_0x39f0a6);},'LSXqV':_0x775733(0x142),'BZVdH':_0x775733(0x10a),'nksKY':_0x775733(0xc2),'diyIn':function(_0x1d88ee,_0x514f61){return _0x1d88ee(_0x514f61);},'tZGNo':_0x775733(0x17b),'hpoZt':function(_0x5964b3,_0xaf6776,_0x4551df,_0x39c288){return _0x5964b3(_0xaf6776,_0x4551df,_0x39c288);},'tIall':_0x775733(0xb0),'xsUqu':_0x775733(0x173),'vLvbp':_0x775733(0x89),'iLKoH':function(_0x4877cd){return _0x4877cd();},'dNpyJ':function(_0x104a48,_0x1ec3a2){return _0x104a48(_0x1ec3a2);},'LMDuZ':_0x775733(0x134),'JrKXL':function(_0x5d4a2b,_0x328a6e){return _0x5d4a2b(_0x328a6e);},'ogxWr':'请求\x20GET\x20/v1/models…','wppoC':'API\x20Key\x20验证通过(GET\x20/v1/models\x20→\x20200)','sHkZo':function(_0x2aaa62,_0x5d2be3){return _0x2aaa62(_0x5d2be3);},'Yquxx':function(_0x384970,_0xbbfa96){return _0x384970>_0xbbfa96;},'KjrFF':_0x775733(0x91),'JzxXE':function(_0x4f90ec,_0x25f4b8){return _0x4f90ec(_0x25f4b8);},'SClCK':function(_0x460ce2,_0xb1dc68){return _0x460ce2(_0xb1dc68);},'vBEou':_0x775733(0x90),'slZKj':function(_0x1ee36b,_0xc7542f){return _0x1ee36b(_0xc7542f);},'wRxEX':_0x775733(0x17d),'OCdLo':function(_0x435b3b,_0x306562){return _0x435b3b>_0x306562;}},_0x48e42d=process['argv'][0x2];if(_0x48e42d&&!_0x48e42d[_0x775733(0x92)]('-')&&_0x1980a6['has'](_0x48e42d)){const _0x3b3e2c=process['argv'][_0x775733(0x16d)](0x3),_0x2086a5=_0x4cc630[_0x48e42d];try{return await _0x2086a5['handler'](_0x3b3e2c)||0x0;}catch(_0x3b2e82){return _0x1741b1('子命令\x20'+_0x48e42d+_0x775733(0xf5)+(_0x3b2e82?.[_0x775733(0x103)]||_0x3b2e82)),_0x3b2e82?.[_0x775733(0xad)]&&console[_0x775733(0xd8)](_0x3b2e82['stack']),0x1;}}const _0x1a4c22=function(_0x201828){const _0x453cd3=_0x775733,_0x3be76c={'dryRun':!0x1,'platform':null,'_':[]};for(let _0x33193b=0x0;_0x4c2269[_0x453cd3(0x14b)](_0x33193b,_0x201828[_0x453cd3(0x84)]);_0x33193b++){const _0x338f37=_0x201828[_0x33193b];if(_0x4c2269[_0x453cd3(0x177)](_0x453cd3(0x148),_0x338f37)||'-n'===_0x338f37)_0x3be76c[_0x453cd3(0x189)]=!0x0;else{if(_0x4c2269[_0x453cd3(0x165)](_0x4c2269[_0x453cd3(0x82)],_0x338f37)||_0x4c2269[_0x453cd3(0x177)]('-p',_0x338f37))_0x3be76c[_0x453cd3(0x10b)]=_0x201828[++_0x33193b];else{if(_0x4c2269[_0x453cd3(0x165)](_0x453cd3(0xbe),_0x338f37))_0x3be76c[_0x453cd3(0x105)]=_0x201828[++_0x33193b];else{if(_0x4c2269[_0x453cd3(0x177)](_0x453cd3(0x125),_0x338f37)||'-h'===_0x338f37)_0x3be76c[_0x453cd3(0xf3)]=!0x0;else{if(_0x4c2269[_0x453cd3(0x8e)](_0x4c2269[_0x453cd3(0xdc)],_0x338f37)||_0x4c2269[_0x453cd3(0x177)]('-v',_0x338f37))_0x3be76c['version']=!0x0;else{if(_0x338f37['startsWith']('--')&&_0x338f37[_0x453cd3(0xba)]('=')){const [_0x579c39,_0x2e4186]=_0x338f37['slice'](0x2)[_0x453cd3(0x149)](/=(.*)/,0x2);_0x3be76c[_0x579c39]=_0x2e4186;}else _0x338f37[_0x453cd3(0x92)]('--')?_0x3be76c[_0x338f37[_0x453cd3(0xe2)](/^--/,'')]=_0x201828[++_0x33193b]:_0x3be76c['_']['push'](_0x338f37);}}}}}}return _0x3be76c;}(process[_0x775733(0x14d)]['slice'](0x2));if(_0x1a4c22[_0x775733(0xf3)])return console['log'](('\x0a@2api-store/activate\x20v'+L+'\x20—\x20TokenShop\x20CLI\x20一键激活\x0a\x0a用法:\x0a\x20\x20npx\x20@2api-store/activate\x20[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20默认激活流程\x0a\x20\x20npx\x20@2api-store/activate\x20<subcommand>\x20[options]\x20\x20\x20运行子命令\x0a\x0a选项(默认激活流程):\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20不真写配置/不真装\x20CLI,只展示将做什么\x0a\x20\x20--platform\x20<name>\x20\x20\x20\x20\x20\x20只激活指定平台(openai/anthropic/gemini/grok/antigravity)\x0a\x20\x20--api-base\x20<url>\x20\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(默认\x20$ACTIVATE_API_BASE\x20或\x20'+E+')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示版本\x0a\x0a'+_0x2a9365+_0x775733(0x18d))[_0x775733(0xd5)]()),0x0;if(_0x1a4c22[_0x775733(0x118)])return console['log'](L),0x0;_0x4c2269[_0x775733(0xd0)](_0x4d68ce);const _0x34bad3=_0x4c2269[_0x775733(0xd0)](_0x103be4),_0x46cb8f=_0x34bad3['os']['isMac']?_0x775733(0x179):_0x34bad3['os']['isLinux']?_0x4c2269[_0x775733(0xc9)]:_0x34bad3['os'][_0x775733(0xef)]?_0x4c2269['XtSvq']:_0x34bad3['os'][_0x775733(0x10b)];if(_0x20c68f(_0x775733(0xcb)+_0x46cb8f+_0x775733(0x98)+_0x34bad3['node']['version']),!_0x34bad3[_0x775733(0x187)][_0x775733(0x70)])return _0x4c2269[_0x775733(0x184)](_0x1741b1,'需要\x20node\x20>=\x2018,当前\x20'+_0x34bad3[_0x775733(0x187)][_0x775733(0x118)]),0x1;const _0x130aa3=Object[_0x775733(0x129)](_0x34bad3[_0x775733(0xa9)]),_0x32232f=_0x130aa3[_0x775733(0x7c)](_0x37ea6a=>{const _0x322f52=_0x775733,_0xe529ac=_0x34bad3[_0x322f52(0xa9)][_0x37ea6a]?.[_0x322f52(0x118)];return _0xe529ac?_0x37ea6a+'@'+_0xe529ac:_0x37ea6a;});_0x4c2269[_0x775733(0xde)](_0x130aa3[_0x775733(0x84)],0x0)?_0x4c2269['NmuwZ'](_0x8590fc,'已检测到\x20CLI:'+_0x32232f[_0x775733(0xaf)](',\x20')):_0x4c2269[_0x775733(0x110)](_0x20c68f,_0x4c2269['DmikK']);const _0x171fa7=_0x1a4c22[_0x775733(0x105)]||process['env'][_0x775733(0x178)]||E;_0x4c2269[_0x775733(0x8a)](_0x20c68f,'API\x20端点:'+_0x171fa7),_0x1a4c22[_0x775733(0x189)]&&_0x4c2269[_0x775733(0x80)](_0x341987,_0x4c2269[_0x775733(0x97)]),_0x1a4c22['platform']&&_0x4c2269['UtvpH'](_0x20c68f,_0x775733(0xd2)+_0x1a4c22[_0x775733(0x10b)]),console[_0x775733(0xe8)]();const _0xb70271=(await _0x133bf8(_0x4c2269[_0x775733(0x157)]))['trim']();if(!_0xb70271)return _0x4c2269[_0x775733(0x174)](_0x1741b1,_0x4c2269[_0x775733(0x18c)]),0x1;const _0x37eab4=(_0x5d2387=_0xb70271)?_0x5d2387[_0x775733(0x92)](_0x775733(0x138))?_0x4c2269[_0x775733(0x150)]:/^[a-zA-Z0-9]{16,64}$/[_0x775733(0x9a)](_0x5d2387)?_0x4c2269[_0x775733(0xc1)]:_0x775733(0xed):_0x4c2269['DSKTb'];var _0x5d2387;if(_0x4c2269[_0x775733(0xb6)]('unknown',_0x37eab4))return _0x4c2269[_0x775733(0xd7)](_0x1741b1,_0x4c2269[_0x775733(0x117)]),0x1;_0x20c68f('识别为:'+(_0x775733(0x101)===_0x37eab4?_0x775733(0xc7):_0x4c2269[_0x775733(0x15e)])+'模式');let _0x3b6022,_0x2f25cb='',_0xf0adfa=null;if(_0x4c2269['wtsSK']('redeem',_0x37eab4)){if(_0x2f25cb=(await _0x4c2269[_0x775733(0xb3)](_0x5e4d8b,_0x4c2269[_0x775733(0x12c)]))['trim'](),!_0x2f25cb||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/[_0x775733(0x9a)](_0x2f25cb))return _0x4c2269[_0x775733(0x8a)](_0x1741b1,_0x4c2269[_0x775733(0x75)]),0x1;_0xbc579a(_0x4c2269['qEPtI']);const _0x44afbe=await _0x4f50b6({'apiBase':_0x171fa7});if(_0x4c2269[_0x775733(0x10d)](0x0,_0x44afbe[_0x775733(0x84)]))return _0x4c2269[_0x775733(0x8d)](_0x1741b1,_0x4c2269[_0x775733(0x16b)]),0x1;const _0x6244b1=_0x44afbe[_0x775733(0x7c)](_0x4faa01=>({'label':''+_0x4faa01['name'],'value':_0x4faa01['id']})),_0x162f49=await _0x4c2269['CuGRY'](_0x51256f,_0x4c2269[_0x775733(0xa8)],_0x6244b1,{'defaultIndex':0x0});if(_0xf0adfa=_0x44afbe[_0x162f49]?.['id'],!_0xf0adfa)return _0x4c2269[_0x775733(0x80)](_0x1741b1,_0x4c2269[_0x775733(0x81)]),0x1;_0x8590fc('已选分组:'+_0x44afbe[_0x162f49][_0x775733(0x14f)]+_0x775733(0x13c)+_0xf0adfa+')'),console[_0x775733(0xe8)]();}_0xbc579a(_0x4c2269[_0x775733(0xb4)]);try{_0x3b6022=await _0x4c2269[_0x775733(0x16a)](_0x466535,{'credential':_0xb70271,'email':_0x2f25cb,'platform':_0x1a4c22[_0x775733(0x10b)],'groupId':_0xf0adfa,'apiBase':_0x171fa7});}catch(_0x4967e9){return _0x1741b1(_0x775733(0xb7)+_0x4967e9[_0x775733(0x103)]),_0x4967e9['statusCode']&&_0x4c2269[_0x775733(0x113)](_0x1741b1,_0x775733(0x7b)+_0x4967e9[_0x775733(0x17e)]),0x1;}_0x3b6022[_0x775733(0xc3)]?.['name']&&_0x20c68f('你的\x20key\x20所属分组:'+_0x3b6022['group'][_0x775733(0x14f)]+'('+(_0x3b6022[_0x775733(0xc3)]['platform']||'未知')+_0x775733(0x102)+_0x3b6022[_0x775733(0xc3)]['id']+')'),_0x4c2269[_0x775733(0xfe)](_0x8590fc,_0x775733(0xa6)+_0x3b6022[_0x775733(0xe4)]+(_0x3b6022['user']?.[_0x775733(0xe6)]?'(新用户已创建)':'')),_0x3b6022[_0x775733(0xf4)]?.[_0x775733(0xe6)]&&_0x3b6022[_0x775733(0xf4)]?.[_0x775733(0x11a)]&&(_0x4c2269['dZAzJ'](_0x20c68f,_0x775733(0xe0)+_0x3b6022[_0x775733(0xf4)][_0x775733(0x11a)]),_0x3b6022['user']['message']&&_0x4c2269[_0x775733(0x80)](_0x20c68f,_0x3b6022[_0x775733(0xf4)]['message'])),console['log']();const _0x1ef5e1=function(_0x4dc98c){const _0x42e779=_0x775733,_0x1f910e=new Set();for(const _0x3a3e92 of _0x4dc98c||[]){const _0x5f3705=(_0x4c2269[_0x42e779(0x124)](_0x4c2269[_0x42e779(0xc4)],typeof _0x3a3e92)?_0x3a3e92:_0x3a3e92?.['id']||'')[_0x42e779(0x114)]();/^(gpt|o1|o3|codex|glm|minimax|deepseek)/[_0x42e779(0x9a)](_0x5f3705)?_0x1f910e[_0x42e779(0x7e)](_0x4c2269[_0x42e779(0xee)]):_0x5f3705['startsWith'](_0x4c2269[_0x42e779(0xce)])?_0x1f910e[_0x42e779(0x7e)](_0x4c2269[_0x42e779(0xc6)]):_0x5f3705[_0x42e779(0x92)](_0x42e779(0xa4))?_0x1f910e[_0x42e779(0x7e)](_0x4c2269[_0x42e779(0xda)]):_0x5f3705[_0x42e779(0x92)]('grok')&&_0x1f910e[_0x42e779(0x7e)]('grok');}return[..._0x1f910e];}(_0x3b6022[_0x775733(0x7d)]||[]);_0x1a4c22[_0x775733(0x10b)]&&!_0x1ef5e1[_0x775733(0xba)](_0x1a4c22['platform'])&&_0x1ef5e1['push'](_0x1a4c22['platform']);const _0x103444=(_0x3b6022[_0x775733(0xf2)]||[])[_0x775733(0xf6)](_0x5501d3=>!!_0x5501d3&&(!(_0x1ef5e1[_0x775733(0x84)]>0x0&&!_0x1ef5e1[_0x775733(0xba)](_0x5501d3[_0x775733(0x10b)]))&&((!_0x1a4c22['platform']||_0x5501d3[_0x775733(0x10b)]===_0x1a4c22['platform'])&&(_0x34bad3['os'][_0x775733(0xef)]?_0x775733(0xbf)===_0x5501d3['os_type']||_0x775733(0x116)===_0x5501d3[_0x775733(0x7f)]:_0x775733(0x153)===_0x5501d3['os_type']||_0x775733(0x116)===_0x5501d3['os_type']))));if(_0x4c2269[_0x775733(0x126)](0x0,_0x103444[_0x775733(0x84)]))return _0x1741b1(_0x4c2269[_0x775733(0xec)]),0x1;const _0x5cbda8=new Set(),_0x3aa9ab=[];for(const _0x1c939a of _0x103444){const _0x4f328d=_0x1c939a['platform']+'/'+_0x1c939a['client_type'];if(_0x5cbda8['has'](_0x4f328d))continue;_0x5cbda8['add'](_0x4f328d);const _0x3f451c=_0x4c2269[_0x775733(0x78)](_0x38d96c,_0x1c939a[_0x775733(0x112)]),_0x3a2662=_0x1c939a[_0x775733(0x123)]||_0x1c939a[_0x775733(0x132)]||_0x3f451c?.[_0x775733(0x14f)]||_0x1c939a[_0x775733(0x10b)]+'\x20'+_0x1c939a[_0x775733(0x112)],_0x529fdb=_0x34bad3[_0x775733(0xa9)][_0x1c939a[_0x775733(0x112)]]?.[_0x775733(0xea)]||_0x3f451c&&_0x34bad3['installed'][_0x3f451c['detectBin']]?.[_0x775733(0xea)],_0xc9cf4e=_0x4c2269[_0x775733(0x160)](_0x1c2215,_0x1c939a[_0x775733(0x112)])?'':_0x4c2269['icAJg'],_0x39fcac=_0x529fdb?_0x381be6[_0x775733(0xb2)](_0x3a2662):_0x381be6[_0x775733(0x164)](_0x3a2662+_0x775733(0x11f));_0x3aa9ab['push']({'label':_0x39fcac+'\x20'+_0x381be6[_0x775733(0x11b)]('['+_0x1c939a[_0x775733(0x10b)]+'/'+_0x1c939a[_0x775733(0x112)]+']')+_0xc9cf4e,'config':_0x1c939a,'clientType':_0x1c939a[_0x775733(0x112)],'meta':_0x3f451c,'alreadyInstalled':!!_0x529fdb});}const _0xcb2a01=_0x3aa9ab[_0x775733(0x7c)]((_0x5f3ebf,_0x255fa9)=>({'item':_0x5f3ebf,'i':_0x255fa9}))['filter'](({item:_0x123630})=>_0x1c2215(_0x123630['clientType']))[_0x775733(0x7c)](({i:_0x4a9a8d})=>_0x4a9a8d);_0x4c2269['sXaip'](_0xbc579a,_0x775733(0x13f));const _0x27fd5a=await _0x4c7c18('选择要激活的\x20CLI(绿色=已装,灰色=未装;默认选主\x20CLI,独立\x20CLI\x20默认不选)',_0x3aa9ab,{'defaultSelected':_0xcb2a01});if(_0x4c2269[_0x775733(0x165)](0x0,_0x27fd5a['length']))return _0x20fe6c(_0x4c2269['OjvBh']),0x0;const _0x17f846=_0x27fd5a[_0x775733(0x7c)](_0x21c05d=>_0x3aa9ab[_0x21c05d]);if(console['log'](),!_0x1a4c22[_0x775733(0x189)]){_0x4c2269[_0x775733(0x110)](_0xbc579a,_0x4c2269['gtldB']);for(const _0x30a03d of _0x17f846){if(_0x30a03d['alreadyInstalled']){const _0x562f21=_0x34bad3[_0x775733(0xa9)][_0x30a03d[_0x775733(0x87)]]?.[_0x775733(0x118)]||_0x34bad3[_0x775733(0xa9)][_0x30a03d[_0x775733(0xaa)]?.[_0x775733(0xb5)]]?.['version'];_0x4c2269[_0x775733(0xcd)](_0x8590fc,(_0x30a03d[_0x775733(0xaa)]?.['name']||_0x30a03d[_0x775733(0x87)])+_0x775733(0x185)+(_0x562f21?'(v'+_0x562f21+')':''));continue;}if(!_0x30a03d[_0x775733(0xaa)]||!_0x30a03d['meta'][_0x775733(0x15c)]){_0x4c2269[_0x775733(0x10f)](_0x341987,_0x30a03d[_0x775733(0x87)]+_0x775733(0xbb));continue;}_0x4c2269['esrQe'](_0x20c68f,_0x775733(0x121)+_0x30a03d[_0x775733(0xaa)][_0x775733(0x14f)]+_0x775733(0x127)+_0x30a03d['meta']['detectBin']+')');const _0x2ae23e=await _0x4c2269['AdVYK'](_0x1ebe17,_0x30a03d[_0x775733(0xaa)],{'dryRun':_0x1a4c22[_0x775733(0x189)]});_0x2ae23e[_0x775733(0xa9)]?_0x8590fc(_0x30a03d[_0x775733(0xaa)][_0x775733(0x14f)]+_0x775733(0x8c)+(_0x2ae23e[_0x775733(0x118)]?'(v'+_0x2ae23e[_0x775733(0x118)]+')':'')):_0x2ae23e['skipped']&&_0x4c2269[_0x775733(0xb6)](_0x4c2269['kpPiy'],_0x2ae23e[_0x775733(0xf8)])?_0x341987('已跳过\x20'+_0x30a03d[_0x775733(0xaa)][_0x775733(0x14f)]+_0x775733(0x83)):_0x2ae23e[_0x775733(0xf7)]?_0x4c2269[_0x775733(0xfe)](_0x20c68f,_0x775733(0x146)+_0x30a03d['meta'][_0x775733(0x14f)]+_0x775733(0x136)+_0x2ae23e[_0x775733(0xf8)]+')'):_0x4c2269[_0x775733(0x10f)](_0x1741b1,_0x30a03d[_0x775733(0xaa)][_0x775733(0x14f)]+_0x775733(0x147)+(_0x2ae23e[_0x775733(0xd8)]||_0x4c2269[_0x775733(0x11e)])+_0x775733(0xa7));}console[_0x775733(0xe8)]();}const _0x356d36=_0x4c2269[_0x775733(0x120)](_0x54e5a6,_0x3b6022[_0x775733(0x7d)]||[]);let _0x5f08e2='';if(_0x356d36[_0x775733(0x84)]>0x0){_0x4c2269['JBudQ'](_0xbc579a,_0x4c2269[_0x775733(0x106)]);let _0x4bdac9=null;if(_0xb70271[_0x775733(0x92)](_0x4c2269[_0x775733(0xeb)]))try{const _0x25dfab=await _0x4c2269['GCSQo'](_0x4f257e,{'credential':_0xb70271,'apiBase':_0x171fa7});_0x25dfab&&Array['isArray'](_0x25dfab[_0x775733(0x7d)])&&(_0x4bdac9=new Map(_0x25dfab[_0x775733(0x7d)][_0x775733(0x7c)](_0x41eece=>[_0x41eece[_0x775733(0x18a)],!!_0x41eece[_0x775733(0xe7)]])));}catch{_0x4c2269[_0x775733(0x174)](_0x20c68f,_0x4c2269[_0x775733(0x13b)]);}let _0x3e0a56=_0x356d36;if(_0x4bdac9){_0x3e0a56=[..._0x356d36[_0x775733(0xf6)](_0xd97e79=>!0x1!==_0x4bdac9[_0x775733(0x128)](_0xd97e79['id'])),..._0x356d36[_0x775733(0xf6)](_0x14c469=>!0x1===_0x4bdac9['get'](_0x14c469['id']))];const _0x1c37ae=_0x3e0a56[_0x775733(0xf6)](_0x1dc2c6=>!0x1===_0x4bdac9[_0x775733(0x128)](_0x1dc2c6['id']))[_0x775733(0x84)];_0x1c37ae>0x0&&_0x4c2269[_0x775733(0x9f)](_0x20c68f,'⚠\x20'+_0x1c37ae+_0x775733(0x182));}const _0x6d5c65=0xa,_0x47958e=_0x3e0a56[_0x775733(0x16d)](0x0,_0x6d5c65),_0x4c3e24=_0x4c2269[_0x775733(0xde)](_0x3e0a56['length'],_0x6d5c65),_0x3ec72e=_0x1497b9=>_0x4bdac9?!0x1===_0x4bdac9[_0x775733(0x128)](_0x1497b9['id'])?'⚠\x20':'✓\x20':'',_0x208cb9=[..._0x47958e[_0x775733(0x7c)](_0x325e70=>({'label':''+_0x3ec72e(_0x325e70)+_0x325e70[_0x775733(0x176)]+'\x20('+_0x325e70['id']+')'})),..._0x4c3e24?[{'label':_0x381be6['dim'](_0x4c2269['OczOe'])}]:[]],_0x449edc=await _0x4c2269[_0x775733(0x13a)](_0x51256f,_0x4c2269['CHAha'],_0x208cb9,{'defaultIndex':0x0});if(_0x4c3e24&&_0x449edc===_0x47958e['length']?(_0x5f08e2=(await _0x4c2269[_0x775733(0xd9)](_0x5e4d8b,_0x4c2269[_0x775733(0x17c)]))[_0x775733(0xd5)](),_0x5f08e2||(_0x5f08e2=_0x47958e[0x0]['id'])):_0x5f08e2=_0x47958e[_0x449edc]['id'],_0x4c2269[_0x775733(0x100)](_0x8590fc,'已选默认模型:'+_0x5f08e2),_0x4bdac9&&_0x4c2269[_0x775733(0xb8)](!0x1,_0x4bdac9[_0x775733(0x128)](_0x5f08e2))){const _0x3982fa=_0x3e0a56['filter'](_0x185b91=>!0x1!==_0x4bdac9[_0x775733(0x128)](_0x185b91['id']))['slice'](0x0,0x3)[_0x775733(0x7c)](_0x12ac73=>_0x12ac73['id']);_0x341987(_0x775733(0x11c)+_0x5f08e2+_0x775733(0x6f)),_0x4c2269[_0x775733(0x13e)](_0x341987,_0x4c2269['wUXlu']),_0x4c2269[_0x775733(0xe5)](_0x3982fa[_0x775733(0x84)],0x0)&&_0x4c2269['EKPCT'](_0x341987,_0x775733(0x12a)+_0x3982fa[_0x775733(0xaf)](_0x775733(0xa5))),_0x4c2269[_0x775733(0x12f)](_0x341987,_0x4c2269[_0x775733(0x135)]);}}else _0x341987(_0x4c2269[_0x775733(0x183)]);console[_0x775733(0xe8)]();const _0x37eb7f=_0x3b6022['base_url']||'',_0x55c789=_0x3b6022['base_url_beta']||_0x37eb7f,_0x52d64b={'apiKey':_0x3b6022['api_key']||'','baseUrl':_0x37eb7f,'apiBase':_0x37eb7f,'apiBaseBeta':_0x55c789,'antigravityApiBase':_0x37eb7f+_0x775733(0x141),'antigravityApiBaseBeta':_0x55c789+_0x775733(0x141),'defaultModel':_0x5f08e2};_0x4c2269[_0x775733(0xc5)](_0xbc579a,_0x4c2269[_0x775733(0x115)]);const _0x1dedab=[];let _0x127a94=null;for(const _0x1c958e of _0x17f846){const _0x5414df=_0x1c958e['config'][_0x775733(0x123)]||_0x1c958e[_0x775733(0x73)][_0x775733(0x132)]||_0x1c958e[_0x775733(0xaa)]?.['name']||_0x1c958e[_0x775733(0x87)];_0x4c2269[_0x775733(0x158)](_0x20fe6c,_0x775733(0xae)+_0x5414df+_0x775733(0x17f));const _0x36b3bb=_0x1c958e[_0x775733(0x73)][_0x775733(0xd1)]||[];for(const _0x4aa90f of _0x36b3bb){const _0x337930=_0x4aa90f['path']||'',_0x2a57fa=_0x4c2269[_0x775733(0xfd)]===_0x337930||_0x4c2269[_0x775733(0xc0)](_0x4c2269['Dndwq'],_0x337930),_0x5dedaa=_0x2a57fa?_0x337930:_0x4c2269[_0x775733(0xf0)](_0x2533f6,_0x337930,{'isWindows':_0x34bad3['os'][_0x775733(0xef)]}),_0x23d326=_0x4c2269[_0x775733(0xa3)](_0x3b1af8,_0x4aa90f['content']||'',_0x52d64b);if(_0x2a57fa){_0x4c2269[_0x775733(0x78)](_0x20fe6c,_0x4c2269[_0x775733(0x77)]),_0x4c2269['jkQhi'](_0x20fe6c,_0x23d326[_0x775733(0x149)]('\x0a')[_0x775733(0x7c)](_0x3d3a1d=>_0x775733(0x14a)+_0x3d3a1d)['join']('\x0a')),_0x1dedab['push']({'cli':_0x5414df,'path':_0x337930,'action':_0x4c2269[_0x775733(0x159)]});continue;}if(_0x20fe6c(_0x775733(0x143)+_0x5dedaa),_0x1a4c22[_0x775733(0x189)]){_0x4c2269[_0x775733(0x9c)](_0x341987,_0x775733(0x156));const _0x4167c7=_0x23d326['split']('\x0a'),_0x22fe75=_0x4167c7[_0x775733(0x16d)](0x0,0x8)[_0x775733(0xaf)]('\x0a');_0x20fe6c(_0x4c2269[_0x775733(0x79)]),_0x20fe6c(_0x22fe75['split']('\x0a')['map'](_0x43c34d=>'\x20\x20\x20\x20'+_0x43c34d)[_0x775733(0xaf)]('\x0a')),_0x4167c7[_0x775733(0x84)]>0x8&&_0x4c2269[_0x775733(0x120)](_0x20fe6c,_0x775733(0xd4)+_0x4167c7[_0x775733(0x84)]+_0x775733(0x15f)),_0x1dedab['push']({'cli':_0x5414df,'path':_0x5dedaa,'action':_0x4c2269[_0x775733(0x188)]}),console['log']();continue;}let _0x38271a=null;try{_0x38271a=_0x329013(_0x5dedaa),_0x38271a&&_0x4c2269[_0x775733(0xc5)](_0x20fe6c,_0x775733(0x131)+_0x38271a);}catch(_0x386dc9){_0x4c2269['diyIn'](_0x1741b1,_0x775733(0xab)+_0x386dc9[_0x775733(0x103)]+_0x775733(0x144)),_0x1dedab[_0x775733(0xca)]({'cli':_0x5414df,'path':_0x5dedaa,'action':_0x4c2269['tZGNo'],'error':_0x386dc9[_0x775733(0x103)]});continue;}try{_0x4c2269[_0x775733(0x71)](_0x156b24,_0x5dedaa,_0x23d326,{'isWindows':_0x34bad3['os'][_0x775733(0xef)]}),_0x4c2269['vKRMN'](_0x8590fc,_0x4c2269[_0x775733(0x9b)]),_0x1dedab['push']({'cli':_0x5414df,'path':_0x5dedaa,'action':_0x4c2269[_0x775733(0x172)],'backup':_0x38271a});}catch(_0x1a970e){_0x1a970e instanceof _0x201849?(_0x127a94||(_0x127a94=_0x1a970e),_0x1741b1(_0x1a970e[_0x775733(0x103)]),_0x1dedab[_0x775733(0xca)]({'cli':_0x5414df,'path':_0x5dedaa,'action':_0x4c2269[_0x775733(0x137)],'error':_0x1a970e['message']})):(_0x4c2269[_0x775733(0x113)](_0x1741b1,_0x775733(0xf9)+_0x1a970e['message']),_0x1dedab['push']({'cli':_0x5414df,'path':_0x5dedaa,'action':_0x775733(0x16e),'error':_0x1a970e[_0x775733(0x103)]}));}}console[_0x775733(0xe8)]();}if(_0x4c2269[_0x775733(0x15d)](_0x344df9),!_0x1a4c22[_0x775733(0x189)]&&_0x3b6022[_0x775733(0x107)]&&_0x3b6022[_0x775733(0x12d)]){_0x4c2269[_0x775733(0x9e)](_0xbc579a,_0x4c2269[_0x775733(0x10c)]),_0x4c2269[_0x775733(0x151)](_0x20c68f,_0x4c2269[_0x775733(0x8f)]);const _0x212836=await _0x4ae18c({'apiKey':_0x3b6022['api_key'],'baseUrl':_0x3b6022[_0x775733(0x12d)]});_0x212836['ok']?_0x4c2269[_0x775733(0x12f)](_0x8590fc,_0x4c2269['wppoC']):_0x341987(_0x775733(0x139)+(_0x212836[_0x775733(0xd8)]||'HTTP\x20'+_0x212836[_0x775733(0x17e)])+'(配置已写入,请手动检查)'),console[_0x775733(0xe8)]();}_0xbc579a(_0x775733(0x186));const _0x3fa72a=_0x1dedab[_0x775733(0xf6)](_0x48ca88=>'written'===_0x48ca88['action']),_0x45abf=_0x1dedab[_0x775733(0xf6)](_0x137d5b=>_0x775733(0x16e)===_0x137d5b[_0x775733(0x15b)]||_0x775733(0x89)===_0x137d5b['action']||_0x775733(0x17b)===_0x137d5b[_0x775733(0x15b)]),_0x34868d=_0x1dedab[_0x775733(0xf6)](_0x3ff27b=>_0x775733(0x142)===_0x3ff27b[_0x775733(0x15b)]),_0x2f1570=_0x1dedab[_0x775733(0xf6)](_0x17061a=>_0x775733(0xc2)===_0x17061a[_0x775733(0x15b)]);_0x1a4c22[_0x775733(0x189)]?_0x4c2269['CAxpW'](_0x20fe6c,'[试运行]\x20将写入\x20'+_0x2f1570[_0x775733(0x84)]+_0x775733(0x162)):_0x8590fc('已写入\x20'+_0x3fa72a[_0x775733(0x84)]+_0x775733(0xfa)),_0x4c2269[_0x775733(0xe5)](_0x34868d[_0x775733(0x84)],0x0)&&_0x4c2269[_0x775733(0xa1)](_0x20c68f,_0x775733(0xac)+_0x34868d[_0x775733(0x84)]+_0x775733(0xcf)),_0x45abf[_0x775733(0x84)]>0x0&&(_0x4c2269[_0x775733(0x174)](_0x341987,'失败\x20'+_0x45abf[_0x775733(0x84)]+'\x20项:'),_0x45abf[_0x775733(0x14e)](_0x21b870=>_0x341987(_0x775733(0x171)+_0x21b870[_0x775733(0x6e)]+'\x20'+_0x21b870[_0x775733(0xea)])));const _0x25f3e3=_0x1dedab[_0x775733(0xf6)](_0x5ee866=>_0x5ee866['backup'])[_0x775733(0x7c)](_0x2ce34d=>_0x2ce34d[_0x775733(0xa0)]);if(_0x4c2269[_0x775733(0x167)](_0x25f3e3['length'],0x0)&&(_0x20c68f(_0x4c2269[_0x775733(0xd3)]),_0x25f3e3[_0x775733(0x14e)](_0x3ce8ba=>_0x20fe6c('\x20\x20-\x20'+_0x3ce8ba))),_0x3b6022[_0x775733(0xf4)]?.[_0x775733(0xe6)]&&(console[_0x775733(0xe8)](),_0x4c2269[_0x775733(0x74)](_0x20c68f,'📧\x20新账号\x20'+(_0x3b6022[_0x775733(0xf4)][_0x775733(0x11a)]||'')+_0x775733(0x12b))),!_0x1a4c22[_0x775733(0x189)]){const _0x9b3e66=_0x17f846['map'](_0x2aa566=>_0x2aa566[_0x775733(0xaa)])[_0x775733(0xf6)](Boolean)[_0x775733(0x7c)](_0xee89b8=>({'name':_0xee89b8[_0x775733(0x14f)],'startCmd':_0xee89b8['startCmd'],'usage':_0xee89b8[_0x775733(0xcc)]}));_0x4c2269[_0x775733(0x14c)](_0x25d5ab,_0x9b3e66);}return _0x127a94?(console[_0x775733(0xe8)](),_0x1741b1(_0x4c2269[_0x775733(0x76)]),_0x4c2269['slZKj'](_0x1741b1,_0x4c2269[_0x775733(0x95)]),0x2):_0x4c2269[_0x775733(0x161)](_0x45abf['length'],0x0)?0x3:0x0;}()[_0x58a7dd(0xdd)](_0x346d8c=>{const _0x54ccfc=_0x58a7dd,_0x337537={'zhGis':function(_0x4a5016){return _0x4a5016();},'iaRtg':function(_0x1665cb,_0x3658e9){return _0x1665cb||_0x3658e9;}};_0x337537[_0x54ccfc(0x18b)](_0x344df9),process['exit'](_0x337537[_0x54ccfc(0x88)](_0x346d8c,0x0));})['catch'](_0x56556e=>{const _0x37d26f=_0x58a7dd,_0x28a980={'SaOlK':function(_0xa166b4,_0x3f844a){return _0xa166b4(_0x3f844a);},'qJXrj':function(_0x56ae37){return _0x56ae37();}};_0x28a980[_0x37d26f(0x166)](_0x1741b1,'未捕获错误:'+(_0x56556e?.[_0x37d26f(0x103)]||_0x56556e)),_0x56556e?.['stack']&&console['error'](_0x56556e[_0x37d26f(0xad)]),_0x28a980[_0x37d26f(0xb9)](_0x344df9),process[_0x37d26f(0x181)](0x1);}));
|
|
2
|
+
const _0x555c3c=_0x4596;(function(_0x5d4593,_0x4753c0){const _0x2d7cdb=_0x4596,_0x11f687=_0x5d4593();while(!![]){try{const _0x5943ae=parseInt(_0x2d7cdb(0x15c))/0x1*(parseInt(_0x2d7cdb(0x16f))/0x2)+parseInt(_0x2d7cdb(0xd6))/0x3*(parseInt(_0x2d7cdb(0x188))/0x4)+-parseInt(_0x2d7cdb(0xf4))/0x5*(-parseInt(_0x2d7cdb(0x185))/0x6)+-parseInt(_0x2d7cdb(0x11b))/0x7+-parseInt(_0x2d7cdb(0x1a4))/0x8*(parseInt(_0x2d7cdb(0x108))/0x9)+parseInt(_0x2d7cdb(0x14c))/0xa+parseInt(_0x2d7cdb(0x161))/0xb*(-parseInt(_0x2d7cdb(0xc0))/0xc);if(_0x5943ae===_0x4753c0)break;else _0x11f687['push'](_0x11f687['shift']());}catch(_0x6165d4){_0x11f687['push'](_0x11f687['shift']());}}}(_0x15f3,0x658bb),(process[_0x555c3c(0x184)]('warning'),process[_0x555c3c(0x15e)][_0x555c3c(0x19e)]='1'));import{detectAll as _0x2e0c71}from'./lib/detect.mjs';import{cliActivate as _0x3ef6bd,listGroups as _0x5c034f,verifyApiKey as _0xb8c8d6,probeModels as _0x2cd6b2}from'./lib/api.mjs';import{renderContent as _0x419609,applyModelContextWindow as _0x473488,expandPath as _0x5dc617,listModels as _0x4aa2d9}from'./lib/render.mjs';import{backupFile as _0xe7c99d}from'./lib/backup.mjs';import{writeFileWithPermission as _0x5750a4,PermissionDeniedError as _0x3df89c}from'./lib/write.mjs';import{ask as _0x230957,askSecret as _0x100a46,multiSelect as _0x5ee037,select as _0x6d853b,confirm as _0xd42002,closePrompt as _0x2e4f4f}from'./lib/prompt.mjs';import{banner as _0x554935,ok as _0x395e12,fail as _0x5991cd,warn as _0x9e8fca,info as _0x448b62,step as _0xe5dfaf,guide as _0x1eb83e,plain as _0x5deab1,chalk as _0x14bb6c}from'./lib/ui.mjs';import{getCliMeta as _0xf4ccd6,isDefaultSelected as _0x5af743}from'./lib/platforms.mjs';import{ensureInstalled as _0x50c911}from'./lib/install.mjs';import{SUBCOMMANDS as _0x24b48c,SUBCOMMAND_NAMES as _0x4de880,SUB_HELP as _0x1c986d}from'./lib/cmds.mjs';import{createRequire as _0x1b0cf3}from'node:module';const E=_0x1b0cf3(import.meta.url)(_0x555c3c(0x132))[_0x555c3c(0x177)],S=_0x555c3c(0xe3);function _0x4596(_0x1ce437,_0xeef878){_0x1ce437=_0x1ce437-0xba;const _0x15f3dc=_0x15f3();let _0x459612=_0x15f3dc[_0x1ce437];return _0x459612;}function _0x15f3(){const _0x462eaf=['ANqeP','11XmhHKT','map','env','openai','then','10379798MMvVdv','Windows','LHFRP','replace','服务端未返回适配当前系统的配置模板','exit','client_type','key','激活报告','dYMHx','uVerb','wZvGY','action','installPackage','91540ADnjBq','\x20安装成功','ZjDCZ','API\x20端点:','已选分组:','(命令\x20','RsntF','is_new','version','写入失败:','需要\x20node\x20>=\x2018,当前\x20','base_url','mode','backup-failed','HHYFc','ZBGqk','AYweu','qJkpA','wfzRx','UJqpX','HTTP\x20','removeAllListeners','1417020aXIOTH','MztXY','AjIHj','2428yGGALL','SWxmN','\x20—\x20TokenShop\x20CLI\x20一键激活\x0a\x0a用法:\x0a\x20\x20npx\x20@2api-store/activate\x20[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20默认激活流程\x0a\x20\x20npx\x20@2api-store/activate\x20<subcommand>\x20[options]\x20\x20\x20运行子命令\x0a\x0a选项(默认激活流程):\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20不真写配置/不真装\x20CLI,只展示将做什么\x0a\x20\x20--platform\x20<name>\x20\x20\x20\x20\x20\x20只激活指定平台(openai/anthropic/gemini/grok/antigravity)\x0a\x20\x20--api-base\x20<url>\x20\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(默认\x20$ACTIVATE_API_BASE\x20或\x20','has','未查询到可用分组。请联系管理员开通分组后再激活。','未捕获错误:','base_url_beta','user','meta','get','trim','模型可用性探测:','KsJpN','log','服务端未返回模型列表,{{defaultModel}}\x20将留空','需手动执行的\x20shell\x20命令:','未选择分组','ckxkB','bdYBX','(仍会写入配置;如需更换请重跑激活选择其他模型)','jxYZX','\x20\x20备份:','NODE_NO_WARNINGS','BpPXC','验证未通过:','configs','备份并写入配置','已检测到\x20CLI:','5975512IBIOij','RxQQY','catch','\x0a\x0a环境变量:\x0a\x20\x20ACTIVATE_API_BASE\x20\x20\x20\x20\x20\x20覆盖\x20API\x20端点(同\x20--api-base)\x0a\x0a示例:\x0a\x20\x20npx\x20@2api-store/activate\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20默认激活\x0a\x20\x20npx\x20@2api-store/activate\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20试运行\x0a\x20\x20npx\x20@2api-store/activate\x20--platform\x20openai\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20只激活\x20openai\x0a\x20\x20npx\x20@2api-store/activate\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20从备份恢复\x0a\x20\x20npx\x20@2api-store/activate\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20恢复官方默认\x0a\x20\x20npx\x20@2api-store/activate\x20refresh-groups\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20查看可用分组\x0a\x20\x20ACTIVATE_API_BASE=http://127.0.0.1:5566\x20npx\x20@2api-store/activate\x0a\x0a退出码:\x0a\x20\x200\x20\x20成功\x0a\x20\x201\x20\x20输入错误\x20/\x20网络失败\x20/\x20致命错误\x0a\x20\x202\x20\x20部分文件权限不足(请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)\x0a\x20\x203\x20\x20其他写入失败\x0a','hpxTn','test','\x20\x20目标:','content','miKyU','error','oEWiX','输入模型\x20ID(如\x20gpt-5.6-terra)','model_context_windows','其他(手动输入模型\x20ID)','(跳过此文件避免无备份覆盖)','Woxjv','部分文件权限不足,请按提示用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑:','YNkgR','检查\x20CLI\x20安装状态','(跳过模型可用性探测:服务端暂不支持或网络不可达)','\x20\x20-\x20','dim','yoTkX','qrPNf','RUpfE','\x20\x20\x20\x20','激活失败:','startsWith','\x20/\x20','unknown','alreadyInstalled','HeyMb','installed','模式:','ZEHIf','detectBin','已写入','statusCode','SdtQr','Pydzb','backup','node','(ID\x20','已跳过\x20','DIwjD','\x20\x20[试运行]\x20不真实写入','all','凭据格式无法识别(应为\x20sk-\x20前缀的\x20API\x20Key\x20或兑换码)','--version','keys','ejUrU','reason','\x20个文件(未真实写入)','stack','请输入\x20API\x20Key(sk-...)或兑换码','12KYZQjp','windows','display_name','gray','macOS','LBYQw','includes','建议换用:','请求激活服务','选择\x20CLI','\x20个文件','\x20\x20[shell\x20命令,请手动执行]','环境:','邮箱格式不正确','apiBase','GEWDb','available','选择默认模型(最新优先)','models','可能是分组不匹配或账号临时不可用,使用时会报\x20404/429','RGQmY','\x20已创建,请查收邮件获取初始密码,登录后尽快修改。','2529llTXTd','afmDO','handler','IBlOZ','jMIuU','gnvcE','shell-only','──\x20','\x20──','length','dDJDX','ygMZd','YXkat','https://2api.store','zPexZ','TbCEG','slice','dryRun','isLinux','Linux','isArray','push','未检测到\x20codex/claude/gemini/grok/opencode(可在后续步骤按需自动安装)','uUhDI','选择绑定的分组','supported','PowerShell','请求\x20GET\x20/v1/models…','获取可用分组','sk-','15kgQtuI','\x20\x20HTTP\x20','\x20行)','UeLZj','YSRdF','EAgkt','[试运行]\x20将写入\x20','PCumJ','OpoKJ','message','VKYJL','IFgeK','email','已写入\x20','name','XBrnn','OmwNn','IQGcf','join','clientType','9aAEGzR','NChRj','fxLxY','xznvU','displayName','api_key','API\x20Key','gemini','Terminal','\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate','aJglP','未检测到\x20','未输入凭据','wFSxR','qrdQd','ATjAn','备份失败:','/antigravity','dry-run','2373175uqypWj','请输入邮箱(用于兑换码绑定\x20/\x20新账号创建)','平台过滤:','model','pwcpn','未知错误','兑换码','string','PBdGX','config','skipped','failed','argv','dhroO','MJFIW','path','green','vnptA','tTWTZ','unix','cbgKF','\x20(未装)','redeem','./package.json','empty','新账号:','KIKMt','\x20\x20内容预览:','group','permission-denied','vFapx','fbiHe','EJSec','ESOvl','\x20·\x20node\x20v','--dry-run','kBejX',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示帮助\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示版本\x0a\x0a','AXYte','\x20平台,ID\x20','选择默认模型','未选择任何\x20CLI,退出。','KjoQs','isWindows','WdqQp','filter','\x20安装(','claude','备份位置:','7218320EYAGWK','usage','ytsKZ','eYUKw','add','xHfyC','你的\x20key\x20所属分组:','CcQFv','split','Ibuiq','os_type','\x20已安装','platform','utxXx','forEach'];_0x15f3=function(){return _0x462eaf;};return _0x15f3();}(async function(){const _0x9ef14c=_0x555c3c,_0x4f349a={'TEceq':function(_0x3625ac,_0x296900){return _0x3625ac<_0x296900;},'oEWiX':function(_0x5d62f1,_0x5813c1){return _0x5d62f1===_0x5813c1;},'wVWmH':_0x9ef14c(0x13e),'PCumJ':function(_0x5e24a7,_0x1fd698){return _0x5e24a7===_0x1fd698;},'SWxmN':function(_0x1cf2b2,_0x31b318){return _0x1cf2b2===_0x31b318;},'dhroO':'--platform','oCJuf':'--api-base','Ibuiq':function(_0x4fd4e5,_0x4f8fec){return _0x4fd4e5===_0x4f8fec;},'NICuR':'--help','bdYBX':function(_0x5a2639,_0x518b6c){return _0x5a2639===_0x518b6c;},'utxXx':_0x9ef14c(0x1d4),'vjUXU':function(_0x3cbe3b,_0x7645f9){return _0x3cbe3b==_0x7645f9;},'FPMkC':_0x9ef14c(0x15f),'uUhDI':'anthropic','wfzRx':_0x9ef14c(0x10f),'IFgeK':'grok','RxQQY':function(_0x5485f7){return _0x5485f7();},'TbCEG':function(_0x24b575){return _0x24b575();},'sPptW':_0x9ef14c(0xc4),'XBrnn':function(_0x1b96ec,_0x1cbd2b){return _0x1b96ec(_0x1cbd2b);},'gnvcE':function(_0x2b4527,_0x74fbf4){return _0x2b4527>_0x74fbf4;},'YNkgR':function(_0x3b9aa2,_0x4c6921){return _0x3b9aa2(_0x4c6921);},'KIKMt':_0x9ef14c(0xec),'EJSec':function(_0x302a58,_0x9e3465){return _0x302a58(_0x9e3465);},'ZEHIf':'【试运行模式\x20--dry-run】不会真写文件、不会真装\x20CLI','fbiHe':_0x9ef14c(0xbf),'OpoKJ':_0x9ef14c(0x114),'UJqpX':_0x9ef14c(0xf3),'aJglP':_0x9ef14c(0x168),'tTWTZ':_0x9ef14c(0x131),'YSRdF':_0x9ef14c(0x1c1),'rYykv':_0x9ef14c(0x133),'KsJpN':function(_0x1b1a71,_0x253939){return _0x1b1a71===_0x253939;},'AjIHj':_0x9ef14c(0x1d3),'Pgwvm':_0x9ef14c(0x121),'dYMHx':function(_0x292ace,_0x578c4b){return _0x292ace===_0x578c4b;},'WdqQp':function(_0x19fed2,_0x2673b9){return _0x19fed2(_0x2673b9);},'uALEz':_0x9ef14c(0x11c),'MztXY':_0x9ef14c(0xcd),'DIwjD':function(_0x281037,_0x141e86){return _0x281037(_0x141e86);},'NChRj':function(_0x39b35b,_0x1f84f9){return _0x39b35b(_0x1f84f9);},'ejUrU':_0x9ef14c(0x18c),'hpxTn':function(_0x491227,_0x113b54,_0x50d19b,_0x4693bc){return _0x491227(_0x113b54,_0x50d19b,_0x4693bc);},'PBdGX':_0x9ef14c(0xee),'SKblu':function(_0x1dbca2,_0x172967){return _0x1dbca2(_0x172967);},'bbasA':_0x9ef14c(0x198),'bNhxc':function(_0x60d627,_0x10aaa4){return _0x60d627(_0x10aaa4);},'MJFIW':function(_0x541185,_0x592d80){return _0x541185(_0x592d80);},'LBYQw':_0x9ef14c(0xc8),'OmwNn':function(_0x45bac4,_0x1c8566){return _0x45bac4(_0x1c8566);},'ZjDCZ':'(新用户已创建)','VKYJL':function(_0x37936a,_0x3042ef){return _0x37936a(_0x3042ef);},'Pydzb':function(_0x22f313,_0x47f8df){return _0x22f313(_0x47f8df);},'yCXnC':_0x9ef14c(0x165),'eYUKw':function(_0x2f0f85,_0x193d7a){return _0x2f0f85(_0x193d7a);},'vnptA':'(独立\x20CLI)','ytsKZ':function(_0x5d0fcc,_0x38c756){return _0x5d0fcc(_0x38c756);},'IBlOZ':'选择要激活的\x20CLI(绿色=已装,灰色=未装;默认选主\x20CLI,独立\x20CLI\x20默认不选)','qJkpA':function(_0x43ee9e,_0x1bc830){return _0x43ee9e(_0x1bc830);},'AYweu':_0x9ef14c(0x144),'RGQmY':_0x9ef14c(0x1b6),'RsntF':function(_0x1e9cc6,_0x42f170){return _0x1e9cc6(_0x42f170);},'pwcpn':function(_0x573d61,_0x5555e3,_0x367a64){return _0x573d61(_0x5555e3,_0x367a64);},'uVerb':'user-declined','LHFRP':function(_0x442d45,_0x956616){return _0x442d45(_0x956616);},'miKyU':_0x9ef14c(0x120),'xHfyC':function(_0x2b4b3f,_0x2e9d40){return _0x2b4b3f(_0x2e9d40);},'RUpfE':_0x9ef14c(0xd1),'qrPNf':function(_0x5a9375,_0x158b51){return _0x5a9375>_0x158b51;},'AXYte':function(_0x933fd7,_0x4b73db){return _0x933fd7>_0x4b73db;},'CcQFv':_0x9ef14c(0x1b1),'GEWDb':function(_0x2de600,_0x27722b,_0x537c3c,_0x1689f8){return _0x2de600(_0x27722b,_0x537c3c,_0x1689f8);},'HHYFc':_0x9ef14c(0x143),'kBejX':function(_0x4d7c81,_0xbc75d){return _0x4d7c81(_0xbc75d);},'EAgkt':_0x9ef14c(0xd3),'YXkat':function(_0x55e7c2,_0x294a6b){return _0x55e7c2>_0x294a6b;},'IQGcf':_0x9ef14c(0x1c0),'ZBGqk':function(_0x147d0c,_0x3a8893){return _0x147d0c(_0x3a8893);},'ESOvl':_0x9ef14c(0x19b),'yoTkX':_0x9ef14c(0x196),'HeyMb':_0x9ef14c(0x1a2),'zPexZ':function(_0x7dcfd6,_0x1bd87e){return _0x7dcfd6===_0x1bd87e;},'afmDO':function(_0x360342,_0x30969a){return _0x360342===_0x30969a;},'ANqeP':function(_0x5936e5,_0x2115c6){return _0x5936e5(_0x2115c6);},'jxYZX':function(_0x2d87dc,_0x771557){return _0x2d87dc(_0x771557);},'qrdQd':_0x9ef14c(0x1d1),'ATjAn':function(_0x13c3f0,_0x85fb0c){return _0x13c3f0(_0x85fb0c);},'bGPma':_0x9ef14c(0x17c),'jMIuU':'written','ckxkB':function(_0x4e1498,_0x1a6960){return _0x4e1498 instanceof _0x1a6960;},'BpPXC':_0x9ef14c(0x138),'fxLxY':function(_0x33f7f0,_0x1836a5){return _0x33f7f0(_0x1836a5);},'wZvGY':_0x9ef14c(0x126),'Woxjv':function(_0x5be7ee){return _0x5be7ee();},'cbgKF':_0x9ef14c(0xf1),'vFapx':function(_0x41c6a2,_0x1ec18a){return _0x41c6a2(_0x1ec18a);},'rCMBG':'API\x20Key\x20验证通过(GET\x20/v1/models\x20→\x20200)','KjoQs':function(_0x597c1f,_0x3c519d){return _0x597c1f>_0x3c519d;},'UeLZj':_0x9ef14c(0x14b),'dDJDX':function(_0x3dfe01,_0x3614a9){return _0x3dfe01(_0x3614a9);},'SdtQr':function(_0x4e0c3e,_0x10f58b){return _0x4e0c3e(_0x10f58b);},'wFSxR':_0x9ef14c(0x1b4),'ElPtj':function(_0x33b4e2,_0x8d5e9d){return _0x33b4e2(_0x8d5e9d);}},_0x50b66a=process['argv'][0x2];if(_0x50b66a&&!_0x50b66a['startsWith']('-')&&_0x4de880[_0x9ef14c(0x18b)](_0x50b66a)){const _0x2a2d15=process[_0x9ef14c(0x127)][_0x9ef14c(0xe6)](0x3),_0x13a9a0=_0x24b48c[_0x50b66a];try{return await _0x13a9a0[_0x9ef14c(0xd8)](_0x2a2d15)||0x0;}catch(_0x4539a8){return _0x5991cd('子命令\x20'+_0x50b66a+'\x20异常:'+(_0x4539a8?.[_0x9ef14c(0xfd)]||_0x4539a8)),_0x4539a8?.[_0x9ef14c(0xbe)]&&console['error'](_0x4539a8['stack']),0x1;}}const _0x237f41=function(_0x15942f){const _0x2350ec=_0x9ef14c,_0x30ec9c={'dryRun':!0x1,'platform':null,'_':[]};for(let _0x2e7da7=0x0;_0x4f349a['TEceq'](_0x2e7da7,_0x15942f['length']);_0x2e7da7++){const _0x1b6897=_0x15942f[_0x2e7da7];if(_0x4f349a[_0x2350ec(0x1ae)](_0x4f349a['wVWmH'],_0x1b6897)||_0x4f349a[_0x2350ec(0xfb)]('-n',_0x1b6897))_0x30ec9c[_0x2350ec(0xe7)]=!0x0;else{if(_0x4f349a[_0x2350ec(0x189)](_0x4f349a[_0x2350ec(0x128)],_0x1b6897)||'-p'===_0x1b6897)_0x30ec9c[_0x2350ec(0x158)]=_0x15942f[++_0x2e7da7];else{if(_0x4f349a[_0x2350ec(0xfb)](_0x4f349a['oCJuf'],_0x1b6897))_0x30ec9c[_0x2350ec(0xce)]=_0x15942f[++_0x2e7da7];else{if(_0x4f349a[_0x2350ec(0x155)](_0x4f349a['NICuR'],_0x1b6897)||_0x4f349a[_0x2350ec(0x19a)]('-h',_0x1b6897))_0x30ec9c['help']=!0x0;else{if(_0x4f349a[_0x2350ec(0x155)](_0x4f349a[_0x2350ec(0x159)],_0x1b6897)||_0x4f349a[_0x2350ec(0x19a)]('-v',_0x1b6897))_0x30ec9c[_0x2350ec(0x177)]=!0x0;else{if(_0x1b6897[_0x2350ec(0x1bf)]('--')&&_0x1b6897[_0x2350ec(0xc6)]('=')){const [_0x50373f,_0x192999]=_0x1b6897[_0x2350ec(0xe6)](0x2)['split'](/=(.*)/,0x2);_0x30ec9c[_0x50373f]=_0x192999;}else _0x1b6897[_0x2350ec(0x1bf)]('--')?_0x30ec9c[_0x1b6897[_0x2350ec(0x164)](/^--/,'')]=_0x15942f[++_0x2e7da7]:_0x30ec9c['_'][_0x2350ec(0xeb)](_0x1b6897);}}}}}}return _0x30ec9c;}(process['argv']['slice'](0x2));if(_0x237f41['help'])return console[_0x9ef14c(0x195)](('\x0a@2api-store/activate\x20v'+E+_0x9ef14c(0x18a)+S+_0x9ef14c(0x140)+_0x1c986d+_0x9ef14c(0x1a7))[_0x9ef14c(0x192)]()),0x0;if(_0x237f41['version'])return console[_0x9ef14c(0x195)](E),0x0;_0x4f349a[_0x9ef14c(0x1a5)](_0x554935);const _0x5c4e46=_0x4f349a[_0x9ef14c(0xe5)](_0x2e0c71),_0x9bd56d=_0x5c4e46['os']['isMac']?_0x4f349a['sPptW']:_0x5c4e46['os'][_0x9ef14c(0xe8)]?_0x9ef14c(0xe9):_0x5c4e46['os'][_0x9ef14c(0x146)]?_0x9ef14c(0x162):_0x5c4e46['os'][_0x9ef14c(0x158)];if(_0x4f349a[_0x9ef14c(0x103)](_0x448b62,_0x9ef14c(0xcc)+_0x9bd56d+_0x9ef14c(0x13d)+_0x5c4e46[_0x9ef14c(0x1cd)][_0x9ef14c(0x177)]),!_0x5c4e46[_0x9ef14c(0x1cd)][_0x9ef14c(0xef)])return _0x4f349a[_0x9ef14c(0x103)](_0x5991cd,_0x9ef14c(0x179)+_0x5c4e46[_0x9ef14c(0x1cd)][_0x9ef14c(0x177)]),0x1;const _0x494d47=Object[_0x9ef14c(0xba)](_0x5c4e46[_0x9ef14c(0x1c4)]),_0x2a9103=_0x494d47[_0x9ef14c(0x15d)](_0x3eb974=>{const _0xa70abb=_0x9ef14c,_0x4d0272=_0x5c4e46[_0xa70abb(0x1c4)][_0x3eb974]?.[_0xa70abb(0x177)];return _0x4d0272?_0x3eb974+'@'+_0x4d0272:_0x3eb974;});_0x4f349a['gnvcE'](_0x494d47[_0x9ef14c(0xdf)],0x0)?_0x4f349a[_0x9ef14c(0x1b5)](_0x395e12,_0x9ef14c(0x1a3)+_0x2a9103[_0x9ef14c(0x106)](',\x20')):_0x4f349a['YNkgR'](_0x448b62,_0x4f349a[_0x9ef14c(0x135)]);const _0x5255b9=_0x237f41['apiBase']||process[_0x9ef14c(0x15e)]['ACTIVATE_API_BASE']||S;_0x4f349a[_0x9ef14c(0x13b)](_0x448b62,_0x9ef14c(0x172)+_0x5255b9),_0x237f41['dryRun']&&_0x4f349a['XBrnn'](_0x9e8fca,_0x4f349a[_0x9ef14c(0x1c6)]),_0x237f41[_0x9ef14c(0x158)]&&_0x4f349a[_0x9ef14c(0x103)](_0x448b62,_0x9ef14c(0x11d)+_0x237f41[_0x9ef14c(0x158)]),console[_0x9ef14c(0x195)]();const _0x487b34=(await _0x100a46(_0x4f349a[_0x9ef14c(0x13a)]))[_0x9ef14c(0x192)]();if(!_0x487b34)return _0x5991cd(_0x4f349a[_0x9ef14c(0xfc)]),0x1;const _0x3ce68e=(_0xecefef=_0x487b34)?_0xecefef[_0x9ef14c(0x1bf)](_0x4f349a[_0x9ef14c(0x182)])?_0x4f349a[_0x9ef14c(0x112)]:/^[a-zA-Z0-9]{16,64}$/[_0x9ef14c(0x1a9)](_0xecefef)?_0x4f349a[_0x9ef14c(0x12d)]:_0x4f349a[_0x9ef14c(0xf8)]:_0x4f349a['rYykv'];var _0xecefef;if(_0x4f349a[_0x9ef14c(0x194)](_0x4f349a[_0x9ef14c(0xf8)],_0x3ce68e))return _0x4f349a[_0x9ef14c(0x103)](_0x5991cd,_0x4f349a[_0x9ef14c(0x187)]),0x1;_0x4f349a['YNkgR'](_0x448b62,'识别为:'+(_0x4f349a['Ibuiq'](_0x9ef14c(0x168),_0x3ce68e)?_0x9ef14c(0x10e):_0x4f349a['Pgwvm'])+'模式');let _0x24451f,_0x349c0a='',_0x30536d=null;if(_0x4f349a[_0x9ef14c(0x16a)](_0x4f349a[_0x9ef14c(0x12d)],_0x3ce68e)){if(_0x349c0a=(await _0x4f349a[_0x9ef14c(0x147)](_0x230957,_0x4f349a['uALEz']))['trim'](),!_0x349c0a||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/[_0x9ef14c(0x1a9)](_0x349c0a))return _0x4f349a[_0x9ef14c(0x147)](_0x5991cd,_0x4f349a[_0x9ef14c(0x186)]),0x1;_0x4f349a[_0x9ef14c(0x1d0)](_0xe5dfaf,_0x9ef14c(0xf2));const _0x48208d=await _0x5c034f({'apiBase':_0x5255b9});if(_0x4f349a[_0x9ef14c(0x1ae)](0x0,_0x48208d['length']))return _0x4f349a[_0x9ef14c(0x109)](_0x5991cd,_0x4f349a[_0x9ef14c(0xbb)]),0x1;const _0x2ae3bb=_0x48208d[_0x9ef14c(0x15d)](_0x33fab5=>({'label':''+_0x33fab5[_0x9ef14c(0x102)],'value':_0x33fab5['id']})),_0x120f3e=await _0x4f349a['hpxTn'](_0x6d853b,_0x4f349a[_0x9ef14c(0x123)],_0x2ae3bb,{'defaultIndex':0x0});if(_0x30536d=_0x48208d[_0x120f3e]?.['id'],!_0x30536d)return _0x4f349a['SKblu'](_0x5991cd,_0x4f349a['bbasA']),0x1;_0x4f349a['bNhxc'](_0x395e12,_0x9ef14c(0x173)+_0x48208d[_0x120f3e][_0x9ef14c(0x102)]+_0x9ef14c(0x1ce)+_0x30536d+')'),console['log']();}_0x4f349a[_0x9ef14c(0x129)](_0xe5dfaf,_0x4f349a[_0x9ef14c(0xc5)]);try{_0x24451f=await _0x4f349a['SKblu'](_0x3ef6bd,{'credential':_0x487b34,'email':_0x349c0a,'platform':_0x237f41[_0x9ef14c(0x158)],'groupId':_0x30536d,'apiBase':_0x5255b9});}catch(_0x54bbe6){return _0x4f349a['YNkgR'](_0x5991cd,_0x9ef14c(0x1be)+_0x54bbe6[_0x9ef14c(0xfd)]),_0x54bbe6[_0x9ef14c(0x1c9)]&&_0x4f349a['bNhxc'](_0x5991cd,_0x9ef14c(0xf5)+_0x54bbe6[_0x9ef14c(0x1c9)]),0x1;}_0x24451f[_0x9ef14c(0x137)]?.[_0x9ef14c(0x102)]&&_0x4f349a[_0x9ef14c(0x129)](_0x448b62,_0x9ef14c(0x152)+_0x24451f['group']['name']+'('+(_0x24451f[_0x9ef14c(0x137)][_0x9ef14c(0x158)]||'未知')+_0x9ef14c(0x142)+_0x24451f[_0x9ef14c(0x137)]['id']+')'),_0x4f349a[_0x9ef14c(0x104)](_0x395e12,_0x9ef14c(0x1c5)+_0x24451f[_0x9ef14c(0x17b)]+(_0x24451f[_0x9ef14c(0x18f)]?.[_0x9ef14c(0x176)]?_0x4f349a[_0x9ef14c(0x171)]:'')),_0x24451f[_0x9ef14c(0x18f)]?.['is_new']&&_0x24451f[_0x9ef14c(0x18f)]?.[_0x9ef14c(0x100)]&&(_0x448b62(_0x9ef14c(0x134)+_0x24451f[_0x9ef14c(0x18f)][_0x9ef14c(0x100)]),_0x24451f[_0x9ef14c(0x18f)][_0x9ef14c(0xfd)]&&_0x4f349a[_0x9ef14c(0xfe)](_0x448b62,_0x24451f[_0x9ef14c(0x18f)]['message'])),console[_0x9ef14c(0x195)]();const _0x4ae2bf=function(_0x36d3ff){const _0x20b064=_0x9ef14c,_0x4e41d4=new Set();for(const _0x5c9b9c of _0x36d3ff||[]){const _0x44a5ab=(_0x4f349a['vjUXU'](_0x20b064(0x122),typeof _0x5c9b9c)?_0x5c9b9c:_0x5c9b9c?.['id']||'')['toLowerCase']();/^(gpt|o1|o3|codex|glm|minimax|deepseek)/[_0x20b064(0x1a9)](_0x44a5ab)?_0x4e41d4[_0x20b064(0x150)](_0x4f349a['FPMkC']):_0x44a5ab[_0x20b064(0x1bf)](_0x20b064(0x14a))?_0x4e41d4[_0x20b064(0x150)](_0x4f349a[_0x20b064(0xed)]):_0x44a5ab[_0x20b064(0x1bf)]('gemini')?_0x4e41d4[_0x20b064(0x150)](_0x4f349a[_0x20b064(0x181)]):_0x44a5ab[_0x20b064(0x1bf)](_0x4f349a[_0x20b064(0xff)])&&_0x4e41d4[_0x20b064(0x150)](_0x4f349a[_0x20b064(0xff)]);}return[..._0x4e41d4];}(_0x24451f['models']||[]);_0x237f41[_0x9ef14c(0x158)]&&!_0x4ae2bf[_0x9ef14c(0xc6)](_0x237f41[_0x9ef14c(0x158)])&&_0x4ae2bf[_0x9ef14c(0xeb)](_0x237f41[_0x9ef14c(0x158)]);const _0x40b276=(_0x24451f[_0x9ef14c(0x1a1)]||[])[_0x9ef14c(0x148)](_0xd64c74=>!!_0xd64c74&&(!(_0x4ae2bf['length']>0x0&&!_0x4ae2bf['includes'](_0xd64c74[_0x9ef14c(0x158)]))&&((!_0x237f41['platform']||_0xd64c74['platform']===_0x237f41[_0x9ef14c(0x158)])&&(_0x5c4e46['os'][_0x9ef14c(0x146)]?_0x9ef14c(0xc1)===_0xd64c74['os_type']||_0x9ef14c(0x1d2)===_0xd64c74[_0x9ef14c(0x156)]:_0x9ef14c(0x12e)===_0xd64c74[_0x9ef14c(0x156)]||_0x9ef14c(0x1d2)===_0xd64c74[_0x9ef14c(0x156)]))));if(0x0===_0x40b276[_0x9ef14c(0xdf)])return _0x4f349a[_0x9ef14c(0x1cb)](_0x5991cd,_0x4f349a['yCXnC']),0x1;const _0xf67f67=new Set(),_0x1ac88e=[];for(const _0x549890 of _0x40b276){const _0x39563d=_0x549890[_0x9ef14c(0x158)]+'/'+_0x549890['client_type'];if(_0xf67f67[_0x9ef14c(0x18b)](_0x39563d))continue;_0xf67f67['add'](_0x39563d);const _0x4050f4=_0xf4ccd6(_0x549890[_0x9ef14c(0x167)]),_0x175947=_0x549890[_0x9ef14c(0xc2)]||_0x549890[_0x9ef14c(0x10c)]||_0x4050f4?.[_0x9ef14c(0x102)]||_0x549890['platform']+'\x20'+_0x549890[_0x9ef14c(0x167)],_0x473dea=_0x5c4e46['installed'][_0x549890['client_type']]?.[_0x9ef14c(0x12a)]||_0x4050f4&&_0x5c4e46['installed'][_0x4050f4[_0x9ef14c(0x1c7)]]?.[_0x9ef14c(0x12a)],_0x2293eb=_0x4f349a[_0x9ef14c(0x14f)](_0x5af743,_0x549890[_0x9ef14c(0x167)])?'':_0x4f349a[_0x9ef14c(0x12c)],_0x153d67=_0x473dea?_0x14bb6c[_0x9ef14c(0x12b)](_0x175947):_0x14bb6c[_0x9ef14c(0xc3)](_0x175947+_0x9ef14c(0x130));_0x1ac88e[_0x9ef14c(0xeb)]({'label':_0x153d67+'\x20'+_0x14bb6c['dim']('['+_0x549890['platform']+'/'+_0x549890[_0x9ef14c(0x167)]+']')+_0x2293eb,'config':_0x549890,'clientType':_0x549890[_0x9ef14c(0x167)],'meta':_0x4050f4,'alreadyInstalled':!!_0x473dea});}const _0x5e76a7=_0x1ac88e['map']((_0x535b9d,_0xe7ed2b)=>({'item':_0x535b9d,'i':_0xe7ed2b}))[_0x9ef14c(0x148)](({item:_0x1be118})=>_0x5af743(_0x1be118['clientType']))[_0x9ef14c(0x15d)](({i:_0x14872d})=>_0x14872d);_0x4f349a[_0x9ef14c(0x14e)](_0xe5dfaf,_0x9ef14c(0xc9));const _0x5bd906=await _0x4f349a['hpxTn'](_0x5ee037,_0x4f349a[_0x9ef14c(0xd9)],_0x1ac88e,{'defaultSelected':_0x5e76a7});if(0x0===_0x5bd906['length'])return _0x4f349a[_0x9ef14c(0x180)](_0x5deab1,_0x4f349a[_0x9ef14c(0x17f)]),0x0;const _0x3cc355=_0x5bd906[_0x9ef14c(0x15d)](_0x5d1340=>_0x1ac88e[_0x5d1340]);if(console[_0x9ef14c(0x195)](),!_0x237f41['dryRun']){_0x4f349a['MJFIW'](_0xe5dfaf,_0x4f349a[_0x9ef14c(0xd4)]);for(const _0x3fc221 of _0x3cc355){if(_0x3fc221[_0x9ef14c(0x1c2)]){const _0x2f2f29=_0x5c4e46[_0x9ef14c(0x1c4)][_0x3fc221[_0x9ef14c(0x107)]]?.[_0x9ef14c(0x177)]||_0x5c4e46[_0x9ef14c(0x1c4)][_0x3fc221['meta']?.[_0x9ef14c(0x1c7)]]?.[_0x9ef14c(0x177)];_0x395e12((_0x3fc221[_0x9ef14c(0x190)]?.['name']||_0x3fc221[_0x9ef14c(0x107)])+_0x9ef14c(0x157)+(_0x2f2f29?'(v'+_0x2f2f29+')':''));continue;}if(!_0x3fc221[_0x9ef14c(0x190)]||!_0x3fc221[_0x9ef14c(0x190)][_0x9ef14c(0x16e)]){_0x4f349a[_0x9ef14c(0x175)](_0x9e8fca,_0x3fc221[_0x9ef14c(0x107)]+'\x20无可自动安装的\x20npm\x20包,请手动安装后重跑(配置仍会写入)');continue;}_0x448b62(_0x9ef14c(0x113)+_0x3fc221['meta'][_0x9ef14c(0x102)]+_0x9ef14c(0x174)+_0x3fc221[_0x9ef14c(0x190)][_0x9ef14c(0x1c7)]+')');const _0x47710c=await _0x4f349a[_0x9ef14c(0x11f)](_0x50c911,_0x3fc221[_0x9ef14c(0x190)],{'dryRun':_0x237f41[_0x9ef14c(0xe7)]});_0x47710c[_0x9ef14c(0x1c4)]?_0x4f349a[_0x9ef14c(0x129)](_0x395e12,_0x3fc221[_0x9ef14c(0x190)][_0x9ef14c(0x102)]+_0x9ef14c(0x170)+(_0x47710c[_0x9ef14c(0x177)]?'(v'+_0x47710c[_0x9ef14c(0x177)]+')':'')):_0x47710c[_0x9ef14c(0x125)]&&_0x4f349a['SWxmN'](_0x4f349a[_0x9ef14c(0x16b)],_0x47710c[_0x9ef14c(0xbc)])?_0x4f349a[_0x9ef14c(0x163)](_0x9e8fca,_0x9ef14c(0x1cf)+_0x3fc221[_0x9ef14c(0x190)][_0x9ef14c(0x102)]+'\x20安装(配置仍会写入,但请手动安装后使用)'):_0x47710c[_0x9ef14c(0x125)]?_0x448b62('已跳过\x20'+_0x3fc221[_0x9ef14c(0x190)][_0x9ef14c(0x102)]+_0x9ef14c(0x149)+_0x47710c[_0x9ef14c(0xbc)]+')'):_0x5991cd(_0x3fc221['meta'][_0x9ef14c(0x102)]+'\x20安装失败:'+(_0x47710c[_0x9ef14c(0x1ad)]||_0x4f349a[_0x9ef14c(0x1ac)])+'(配置仍会写入,但请手动安装后使用)');}console[_0x9ef14c(0x195)]();}const _0x23208d=_0x4aa2d9(_0x24451f[_0x9ef14c(0xd2)]||[]);let _0x2ea435='';if(_0x4f349a[_0x9ef14c(0xdb)](_0x23208d[_0x9ef14c(0xdf)],0x0)){_0x4f349a[_0x9ef14c(0x151)](_0xe5dfaf,_0x4f349a[_0x9ef14c(0x1bc)]);let _0x4230a3=null;if(_0x487b34[_0x9ef14c(0x1bf)](_0x4f349a[_0x9ef14c(0x182)]))try{const _0x12d749=await _0x4f349a['qJkpA'](_0x2cd6b2,{'credential':_0x487b34,'apiBase':_0x5255b9});_0x12d749&&Array[_0x9ef14c(0xea)](_0x12d749[_0x9ef14c(0xd2)])&&(_0x4230a3=new Map(_0x12d749[_0x9ef14c(0xd2)]['map'](_0x9f1308=>[_0x9f1308[_0x9ef14c(0x11e)],!!_0x9f1308[_0x9ef14c(0xd0)]])));}catch{_0x448b62(_0x9ef14c(0x1b7));}let _0x2101ad=_0x23208d;if(_0x4230a3){_0x2101ad=[..._0x23208d['filter'](_0x415c34=>!0x1!==_0x4230a3[_0x9ef14c(0x191)](_0x415c34['id'])),..._0x23208d['filter'](_0x4f8189=>!0x1===_0x4230a3['get'](_0x4f8189['id']))];const _0x346562=_0x2101ad[_0x9ef14c(0x148)](_0x4781a6=>!0x1===_0x4230a3[_0x9ef14c(0x191)](_0x4781a6['id']))[_0x9ef14c(0xdf)];_0x4f349a[_0x9ef14c(0x1bb)](_0x346562,0x0)&&_0x4f349a['NChRj'](_0x448b62,'⚠\x20'+_0x346562+'\x20个模型当前无可用账号(标注\x20⚠,可能是分组不匹配或账号临时不可用)');}const _0x1b6a0e=0xa,_0x2cf939=_0x2101ad[_0x9ef14c(0xe6)](0x0,_0x1b6a0e),_0x14ced4=_0x4f349a[_0x9ef14c(0x141)](_0x2101ad[_0x9ef14c(0xdf)],_0x1b6a0e),_0xf33e60=_0x7cb92=>_0x4230a3?!0x1===_0x4230a3['get'](_0x7cb92['id'])?'⚠\x20':'✓\x20':'',_0x33a7ce=[..._0x2cf939['map'](_0x3d2aba=>({'label':''+_0xf33e60(_0x3d2aba)+_0x3d2aba['label']+'\x20('+_0x3d2aba['id']+')'})),..._0x14ced4?[{'label':_0x14bb6c[_0x9ef14c(0x1b9)](_0x4f349a[_0x9ef14c(0x153)])}]:[]],_0x16b278=await _0x4f349a[_0x9ef14c(0xcf)](_0x6d853b,_0x4f349a[_0x9ef14c(0x17d)],_0x33a7ce,{'defaultIndex':0x0});if(_0x14ced4&&_0x4f349a[_0x9ef14c(0xfb)](_0x16b278,_0x2cf939['length'])?(_0x2ea435=(await _0x4f349a[_0x9ef14c(0x103)](_0x230957,_0x9ef14c(0x1af)))[_0x9ef14c(0x192)](),_0x2ea435||(_0x2ea435=_0x2cf939[0x0]['id'])):_0x2ea435=_0x2cf939[_0x16b278]['id'],_0x4f349a[_0x9ef14c(0x13f)](_0x395e12,'已选默认模型:'+_0x2ea435),_0x4230a3&&!0x1===_0x4230a3[_0x9ef14c(0x191)](_0x2ea435)){const _0x1ee1fb=_0x2101ad['filter'](_0x16b4b4=>!0x1!==_0x4230a3['get'](_0x16b4b4['id']))['slice'](0x0,0x3)['map'](_0x5a7876=>_0x5a7876['id']);_0x4f349a[_0x9ef14c(0x1b5)](_0x9e8fca,_0x9ef14c(0x193)+_0x2ea435+'\x20当前无可用账号'),_0x4f349a['EJSec'](_0x9e8fca,_0x4f349a[_0x9ef14c(0xf9)]),_0x4f349a[_0x9ef14c(0xe2)](_0x1ee1fb['length'],0x0)&&_0x4f349a['ytsKZ'](_0x9e8fca,_0x9ef14c(0xc7)+_0x1ee1fb['join'](_0x4f349a[_0x9ef14c(0x105)])),_0x4f349a[_0x9ef14c(0x17e)](_0x9e8fca,_0x4f349a[_0x9ef14c(0x13c)]);}}else _0x4f349a[_0x9ef14c(0x14e)](_0x9e8fca,_0x4f349a[_0x9ef14c(0x1ba)]);console['log']();const _0x511357=_0x24451f[_0x9ef14c(0x17a)]||'',_0x57bebb=_0x24451f[_0x9ef14c(0x18e)]||_0x511357,_0x34aaaf={'apiKey':_0x24451f[_0x9ef14c(0x10d)]||'','baseUrl':_0x511357,'apiBase':_0x511357,'apiBaseBeta':_0x57bebb,'antigravityApiBase':_0x511357+_0x9ef14c(0x119),'antigravityApiBaseBeta':_0x57bebb+_0x9ef14c(0x119),'defaultModel':_0x2ea435};_0xe5dfaf(_0x4f349a[_0x9ef14c(0x1c3)]);const _0x4e9a34=[];let _0x5dffb6=null;for(const _0x52d86b of _0x3cc355){const _0x32a4b5=_0x52d86b[_0x9ef14c(0x124)][_0x9ef14c(0xc2)]||_0x52d86b[_0x9ef14c(0x124)][_0x9ef14c(0x10c)]||_0x52d86b[_0x9ef14c(0x190)]?.[_0x9ef14c(0x102)]||_0x52d86b[_0x9ef14c(0x107)];_0x5deab1(_0x9ef14c(0xdd)+_0x32a4b5+_0x9ef14c(0xde));const _0x446f1d=_0x52d86b[_0x9ef14c(0x124)]['files']||[];for(const _0x4391b8 of _0x446f1d){const _0x5533af=_0x4391b8['path']||'',_0x199fd4=_0x4f349a[_0x9ef14c(0xe4)](_0x9ef14c(0x110),_0x5533af)||_0x4f349a[_0x9ef14c(0xd7)](_0x9ef14c(0xf0),_0x5533af),_0x3b90e8=_0x199fd4?_0x5533af:_0x5dc617(_0x5533af,{'isWindows':_0x5c4e46['os']['isWindows']}),_0x53ce8b=_0x4f349a[_0x9ef14c(0xcf)](_0x473488,_0x4f349a[_0x9ef14c(0x11f)](_0x419609,_0x4391b8[_0x9ef14c(0x1ab)]||'',_0x34aaaf),_0x24451f[_0x9ef14c(0x1b0)],_0x2ea435);if(_0x199fd4){_0x5deab1(_0x9ef14c(0xcb)),_0x4f349a['XBrnn'](_0x5deab1,_0x53ce8b[_0x9ef14c(0x154)]('\x0a')[_0x9ef14c(0x15d)](_0x1f3036=>_0x9ef14c(0x1bd)+_0x1f3036)[_0x9ef14c(0x106)]('\x0a')),_0x4e9a34[_0x9ef14c(0xeb)]({'cli':_0x32a4b5,'path':_0x5533af,'action':_0x9ef14c(0xdc)});continue;}if(_0x4f349a[_0x9ef14c(0x15b)](_0x5deab1,_0x9ef14c(0x1aa)+_0x3b90e8),_0x237f41[_0x9ef14c(0xe7)]){_0x4f349a['jxYZX'](_0x9e8fca,_0x4f349a[_0x9ef14c(0x116)]);const _0x7f5b69=_0x53ce8b[_0x9ef14c(0x154)]('\x0a'),_0x232676=_0x7f5b69['slice'](0x0,0x8)[_0x9ef14c(0x106)]('\x0a');_0x4f349a[_0x9ef14c(0x13f)](_0x5deab1,_0x9ef14c(0x136)),_0x4f349a[_0x9ef14c(0x117)](_0x5deab1,_0x232676[_0x9ef14c(0x154)]('\x0a')[_0x9ef14c(0x15d)](_0x187f09=>_0x9ef14c(0x1bd)+_0x187f09)[_0x9ef14c(0x106)]('\x0a')),_0x7f5b69[_0x9ef14c(0xdf)]>0x8&&_0x5deab1('\x20\x20\x20\x20...(共\x20'+_0x7f5b69[_0x9ef14c(0xdf)]+_0x9ef14c(0xf6)),_0x4e9a34[_0x9ef14c(0xeb)]({'cli':_0x32a4b5,'path':_0x3b90e8,'action':_0x9ef14c(0x11a)}),console['log']();continue;}let _0x11718a=null;try{_0x11718a=_0x4f349a[_0x9ef14c(0x175)](_0xe7c99d,_0x3b90e8),_0x11718a&&_0x5deab1(_0x9ef14c(0x19d)+_0x11718a);}catch(_0x36004a){_0x5991cd(_0x9ef14c(0x118)+_0x36004a['message']+_0x9ef14c(0x1b2)),_0x4e9a34[_0x9ef14c(0xeb)]({'cli':_0x32a4b5,'path':_0x3b90e8,'action':_0x4f349a['bGPma'],'error':_0x36004a[_0x9ef14c(0xfd)]});continue;}try{_0x4f349a[_0x9ef14c(0x1a8)](_0x5750a4,_0x3b90e8,_0x53ce8b,{'isWindows':_0x5c4e46['os'][_0x9ef14c(0x146)]}),_0x395e12(_0x9ef14c(0x1c8)),_0x4e9a34['push']({'cli':_0x32a4b5,'path':_0x3b90e8,'action':_0x4f349a[_0x9ef14c(0xda)],'backup':_0x11718a});}catch(_0x4a839d){_0x4f349a[_0x9ef14c(0x199)](_0x4a839d,_0x3df89c)?(_0x5dffb6||(_0x5dffb6=_0x4a839d),_0x4f349a[_0x9ef14c(0x117)](_0x5991cd,_0x4a839d[_0x9ef14c(0xfd)]),_0x4e9a34['push']({'cli':_0x32a4b5,'path':_0x3b90e8,'action':_0x4f349a[_0x9ef14c(0x19f)],'error':_0x4a839d['message']})):(_0x4f349a[_0x9ef14c(0x10a)](_0x5991cd,_0x9ef14c(0x178)+_0x4a839d[_0x9ef14c(0xfd)]),_0x4e9a34[_0x9ef14c(0xeb)]({'cli':_0x32a4b5,'path':_0x3b90e8,'action':_0x4f349a[_0x9ef14c(0x16c)],'error':_0x4a839d['message']}));}}console[_0x9ef14c(0x195)]();}if(_0x4f349a[_0x9ef14c(0x1b3)](_0x2e4f4f),!_0x237f41['dryRun']&&_0x24451f[_0x9ef14c(0x10d)]&&_0x24451f[_0x9ef14c(0x17a)]){_0xe5dfaf('验证\x20API\x20Key'),_0x4f349a[_0x9ef14c(0x14e)](_0x448b62,_0x4f349a[_0x9ef14c(0x12f)]);const _0x39fbb0=await _0x4f349a[_0x9ef14c(0x139)](_0xb8c8d6,{'apiKey':_0x24451f['api_key'],'baseUrl':_0x24451f['base_url']});_0x39fbb0['ok']?_0x395e12(_0x4f349a['rCMBG']):_0x9e8fca(_0x9ef14c(0x1a0)+(_0x39fbb0['error']||_0x9ef14c(0x183)+_0x39fbb0[_0x9ef14c(0x1c9)])+'(配置已写入,请手动检查)'),console[_0x9ef14c(0x195)]();}_0xe5dfaf(_0x9ef14c(0x169));const _0x496cbf=_0x4e9a34[_0x9ef14c(0x148)](_0x3e62bd=>'written'===_0x3e62bd[_0x9ef14c(0x16d)]),_0xb5e87e=_0x4e9a34['filter'](_0x2403be=>_0x9ef14c(0x126)===_0x2403be[_0x9ef14c(0x16d)]||_0x9ef14c(0x138)===_0x2403be[_0x9ef14c(0x16d)]||_0x9ef14c(0x17c)===_0x2403be['action']),_0x1b7af0=_0x4e9a34[_0x9ef14c(0x148)](_0xe0e32b=>_0x9ef14c(0xdc)===_0xe0e32b[_0x9ef14c(0x16d)]),_0x23c3bb=_0x4e9a34[_0x9ef14c(0x148)](_0x4c2eae=>_0x9ef14c(0x11a)===_0x4c2eae[_0x9ef14c(0x16d)]);_0x237f41[_0x9ef14c(0xe7)]?_0x5deab1(_0x9ef14c(0xfa)+_0x23c3bb[_0x9ef14c(0xdf)]+_0x9ef14c(0xbd)):_0x395e12(_0x9ef14c(0x101)+_0x496cbf[_0x9ef14c(0xdf)]+_0x9ef14c(0xca)),_0x4f349a[_0x9ef14c(0x141)](_0x1b7af0['length'],0x0)&&_0x448b62(_0x9ef14c(0x197)+_0x1b7af0[_0x9ef14c(0xdf)]+'\x20项(见上方输出)'),_0x4f349a['KjoQs'](_0xb5e87e[_0x9ef14c(0xdf)],0x0)&&(_0x9e8fca('失败\x20'+_0xb5e87e[_0x9ef14c(0xdf)]+'\x20项:'),_0xb5e87e[_0x9ef14c(0x15a)](_0x5db272=>_0x9e8fca(_0x9ef14c(0x1b8)+_0x5db272['cli']+'\x20'+_0x5db272['path'])));const _0x52be55=_0x4e9a34[_0x9ef14c(0x148)](_0x3ae193=>_0x3ae193[_0x9ef14c(0x1cc)])['map'](_0xc5643f=>_0xc5643f[_0x9ef14c(0x1cc)]);if(_0x4f349a[_0x9ef14c(0x141)](_0x52be55[_0x9ef14c(0xdf)],0x0)&&(_0x4f349a[_0x9ef14c(0x180)](_0x448b62,_0x4f349a[_0x9ef14c(0xf7)]),_0x52be55[_0x9ef14c(0x15a)](_0x3524c5=>_0x5deab1('\x20\x20-\x20'+_0x3524c5))),_0x24451f[_0x9ef14c(0x18f)]?.['is_new']&&(console['log'](),_0x4f349a[_0x9ef14c(0xe0)](_0x448b62,'📧\x20新账号\x20'+(_0x24451f[_0x9ef14c(0x18f)][_0x9ef14c(0x100)]||'')+_0x9ef14c(0xd5))),!_0x237f41[_0x9ef14c(0xe7)]){const _0x7c6afa=_0x3cc355[_0x9ef14c(0x15d)](_0x443934=>_0x443934[_0x9ef14c(0x190)])[_0x9ef14c(0x148)](Boolean)[_0x9ef14c(0x15d)](_0x223d57=>({'name':_0x223d57[_0x9ef14c(0x102)],'startCmd':_0x223d57['startCmd'],'usage':_0x223d57[_0x9ef14c(0x14d)]}));_0x4f349a[_0x9ef14c(0x19c)](_0x1eb83e,_0x7c6afa);}return _0x5dffb6?(console[_0x9ef14c(0x195)](),_0x4f349a[_0x9ef14c(0x1ca)](_0x5991cd,_0x4f349a[_0x9ef14c(0x115)]),_0x4f349a['ElPtj'](_0x5991cd,_0x9ef14c(0x111)),0x2):_0x4f349a[_0x9ef14c(0x145)](_0xb5e87e[_0x9ef14c(0xdf)],0x0)?0x3:0x0;}()[_0x555c3c(0x160)](_0x436b10=>{const _0x49b59c=_0x555c3c,_0x2603f7={'ZpACE':function(_0x397939){return _0x397939();},'ygMZd':function(_0x987c21,_0x216ab7){return _0x987c21||_0x216ab7;}};_0x2603f7['ZpACE'](_0x2e4f4f),process[_0x49b59c(0x166)](_0x2603f7[_0x49b59c(0xe1)](_0x436b10,0x0));})[_0x555c3c(0x1a6)](_0x3dd747=>{const _0x594cc3=_0x555c3c,_0xee789b={'xznvU':function(_0x2d04d5){return _0x2d04d5();}};_0x5991cd(_0x594cc3(0x18d)+(_0x3dd747?.[_0x594cc3(0xfd)]||_0x3dd747)),_0x3dd747?.[_0x594cc3(0xbe)]&&console[_0x594cc3(0x1ad)](_0x3dd747[_0x594cc3(0xbe)]),_0xee789b[_0x594cc3(0x10b)](_0x2e4f4f),process['exit'](0x1);}));
|
package/dist/lib/api.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1a20d6=_0xaced;(function(_0x3733fb,_0x2a794c){const _0x81809=_0xaced,_0x4aed4b=_0x3733fb();while(!![]){try{const _0x695e6=-parseInt(_0x81809(0x14b))/0x1+parseInt(_0x81809(0x10a))/0x2*(-parseInt(_0x81809(0x107))/0x3)+parseInt(_0x81809(0xeb))/0x4*(parseInt(_0x81809(0x14f))/0x5)+parseInt(_0x81809(0xe6))/0x6*(parseInt(_0x81809(0x117))/0x7)+parseInt(_0x81809(0x102))/0x8+-parseInt(_0x81809(0x131))/0x9+parseInt(_0x81809(0x122))/0xa*(parseInt(_0x81809(0x109))/0xb);if(_0x695e6===_0x2a794c)break;else _0x4aed4b['push'](_0x4aed4b['shift']());}catch(_0x4a84db){_0x4aed4b['push'](_0x4aed4b['shift']());}}}(_0x3d37,0x78d76));import _0x2c76e4 from'node:https';import _0x95ff1a from'node:http';function _0x3d37(){const _0x1f56de=['33rCnhMl','411258pIIgTE','请求超时(','TgNBc','body','vqRyA','CLvhN','statusCode','KgGgq','TWsHh','parse','NkKgX','Dxgcx','YRebu','228501DVCoBN','destroy','无效的\x20apiBase:','GET','VdhMJ','write','href','byteLength','HTTP\x20','application/json','NQvxF','3357280XjhliX','toString','ZRXAc','tVuFb','otXXI','POST','NNKrl','cXdwP','验证请求超时(15s)','sRZqe','data','pbvHW','STnCC','DSEhQ','Pmtnx','5773491BnPjEq','message','FFgYB','NlGwu','rKKqw','/api/v1/cli/activate','TUFNE','AKWML','vaOph','jhOOT','KLZxw','utf8','GNBRZ','/v1/models','ssePk','WiXTS','@2api-store/activate/0.1.0','EGPbA','uWxSa','groups','/api/v1/cli/probe-models','s)—\x20','QZLsT','isArray','cyrTR','IVmri','391719xLdXyG','lcjjk','vlLSs','NDvHJ','224360UpZkhv','zaXDv','end','Dfevg','joldY','PoW\x20challenge\x20获取失败:','error','raw','6klKBvL','响应非\x20JSON(HTTP\x20','xvfdt','timeout','cRNdQ','68hbXDcv','push','请求超时(30s)—\x20','stringify','/api/v1/cli/groups','vpXtW','mrHCS','paxyc','响应非\x20JSON','xikea','Ivukj','slice','https:','JAsxp','EQMCI','KoRuj','vfHzp','NVCRF','yczLh','WhlUD','qIAwo','Bearer\x20','ACxOx','4384392iqlbgI','protocol','无效的\x20baseUrl:','mvqax','request','12IMbqzX','KAkkF'];_0x3d37=function(){return _0x1f56de;};return _0x3d37();}function _0xaced(_0x528f2b,_0x80a5d1){_0x528f2b=_0x528f2b-0xe2;const _0x3d378d=_0x3d37();let _0xacedd7=_0x3d378d[_0x528f2b];return _0xacedd7;}import{getDeviceId as _0x48f6ba}from'./device.mjs';import{getChallenge as _0x1866b3,solvePoW as _0x58064e}from'./pow.mjs';const n=_0x1a20d6(0x141),a=0x7530;function i(_0x1f6945,_0x5e35e0={}){return{'User-Agent':n,'X-Device-Id':_0x1f6945,..._0x5e35e0};}export async function cliActivate({credential:_0x2ded55,email:_0x296f62,platform:_0x4e6352,groupId:_0x461bcb,apiBase:_0x4afb14}){const _0x540f23=_0x1a20d6,_0x5a0e12={'WhlUD':'utf8','WiXTS':function(_0xeb6684,_0x346940){return _0xeb6684(_0x346940);},'KLZxw':function(_0x54ae49,_0x1d2b03){return _0x54ae49>=_0x1d2b03;},'eaqes':function(_0x4617be,_0x58edc4){return _0x4617be==_0x58edc4;},'mrHCS':'object','jhOOT':_0x540f23(0x12c),'NlGwu':function(_0x2bbe2d,_0x5052a2){return _0x2bbe2d===_0x5052a2;},'vfHzp':_0x540f23(0xf7),'ypVtZ':function(_0x78575,_0x4a138b,_0x24239d){return _0x78575(_0x4a138b,_0x24239d);},'bHxxU':_0x540f23(0xe9),'cwgXB':_0x540f23(0xe4),'vpXtW':function(_0x400b15){return _0x400b15();},'AKWML':function(_0x33b410,_0x303f1d,_0x50b552){return _0x33b410(_0x303f1d,_0x50b552);}},_0x393e5d=_0x5a0e12[_0x540f23(0xf0)](_0x48f6ba);let _0x3f86a2,_0x2ded59;try{const {challenge:_0x59d201,difficulty:_0x24ab39}=await _0x5a0e12['WiXTS'](_0x1866b3,{'apiBase':_0x4afb14,'deviceId':_0x393e5d});_0x3f86a2=_0x59d201,_0x2ded59=_0x5a0e12[_0x540f23(0x138)](_0x58064e,_0x59d201,_0x24ab39);}catch(_0x3f1f96){throw new Error(_0x540f23(0xe3)+_0x3f1f96[_0x540f23(0x132)]);}return new Promise((_0x384544,_0x18fc64)=>{const _0xb5f3e9=_0x540f23;let _0x4b3e3b;try{_0x4b3e3b=new URL(_0xb5f3e9(0x136),_0x4afb14);}catch(_0x2a9635){return void _0x5a0e12[_0xb5f3e9(0x140)](_0x18fc64,new Error(_0xb5f3e9(0x119)+_0x4afb14+'('+_0x2a9635['message']+')'));}const _0x68fe20=_0x5a0e12[_0xb5f3e9(0x134)](_0x5a0e12[_0xb5f3e9(0xfb)],_0x4b3e3b[_0xb5f3e9(0x103)])?_0x2c76e4:_0x95ff1a,_0x23e563={'credential':_0x2ded55,..._0x296f62?{'email':_0x296f62}:{},..._0x4e6352?{'platform':_0x4e6352}:{},..._0x461bcb?{'group_id':_0x461bcb}:{}},_0x540c25=JSON[_0xb5f3e9(0xee)](_0x23e563),_0x39f3f0=_0x68fe20['request'](_0x4b3e3b,{'method':_0xb5f3e9(0x127),'headers':_0x5a0e12['ypVtZ'](i,_0x393e5d,{'Content-Type':'application/json','Content-Length':Buffer[_0xb5f3e9(0x11e)](_0x540c25),'X-PoW-Challenge':_0x3f86a2,'X-PoW-Nonce':_0x2ded59}),'timeout':a},_0x12996a=>{const _0x37a9e5=_0xb5f3e9,_0x19e1fe={'qIAwo':_0x5a0e12[_0x37a9e5(0xfe)],'lcjjk':function(_0x15ebbf,_0xf9e1a){const _0x1bca28=_0x37a9e5;return _0x5a0e12[_0x1bca28(0x140)](_0x15ebbf,_0xf9e1a);},'YRebu':function(_0x1b813c,_0x1aebf0){const _0x4fa7a7=_0x37a9e5;return _0x5a0e12[_0x4fa7a7(0x13b)](_0x1b813c,_0x1aebf0);},'yczLh':function(_0x2e5cc2,_0x680209){return _0x2e5cc2(_0x680209);},'KgGgq':function(_0x43a3d2,_0x9d8bc4){return _0x5a0e12['eaqes'](_0x43a3d2,_0x9d8bc4);},'NNKrl':_0x5a0e12[_0x37a9e5(0xf1)],'mvqax':function(_0x43f71b,_0x3e3dbd){return _0x43f71b(_0x3e3dbd);}},_0x23981a=[];_0x12996a['on'](_0x5a0e12[_0x37a9e5(0x13a)],_0x45ef5f=>_0x23981a['push'](_0x45ef5f)),_0x12996a['on'](_0x37a9e5(0x151),()=>{const _0x443e7a=_0x37a9e5,_0x3fc565=Buffer['concat'](_0x23981a)[_0x443e7a(0x123)](_0x19e1fe[_0x443e7a(0xff)]);let _0x4a239a;try{_0x4a239a=_0x3fc565?JSON[_0x443e7a(0x113)](_0x3fc565):{};}catch{const _0x37bf45=new Error(_0x443e7a(0xe7)+_0x12996a[_0x443e7a(0x110)]+'):'+_0x3fc565[_0x443e7a(0xf6)](0x0,0xc8));return _0x37bf45[_0x443e7a(0x110)]=_0x12996a[_0x443e7a(0x110)],_0x37bf45[_0x443e7a(0xe5)]=_0x3fc565,void _0x19e1fe[_0x443e7a(0x14c)](_0x18fc64,_0x37bf45);}if(_0x19e1fe[_0x443e7a(0x116)](_0x12996a[_0x443e7a(0x110)],0xc8)&&_0x12996a[_0x443e7a(0x110)]<0x12c)_0x19e1fe[_0x443e7a(0xfd)](_0x384544,_0x4a239a);else{const _0x3cf8b4=_0x4a239a?.[_0x443e7a(0xe4)],_0x2a5931=(_0x3cf8b4&&_0x19e1fe[_0x443e7a(0x111)](_0x19e1fe[_0x443e7a(0x128)],typeof _0x3cf8b4)?_0x3cf8b4['message']:_0x3cf8b4)||_0x4a239a?.[_0x443e7a(0x132)]||_0x443e7a(0x11f)+_0x12996a['statusCode'],_0x39900a=new Error(_0x2a5931);_0x39900a[_0x443e7a(0x110)]=_0x12996a[_0x443e7a(0x110)],_0x39900a[_0x443e7a(0x10d)]=_0x4a239a,_0x19e1fe[_0x443e7a(0x105)](_0x18fc64,_0x39900a);}});});_0x39f3f0['on'](_0x5a0e12['bHxxU'],()=>{const _0x9692b9=_0xb5f3e9;_0x39f3f0[_0x9692b9(0x118)](new Error(_0x9692b9(0xed)+_0x4b3e3b[_0x9692b9(0x11d)]));}),_0x39f3f0['on'](_0x5a0e12['cwgXB'],_0x18fc64),_0x39f3f0[_0xb5f3e9(0x11c)](_0x540c25),_0x39f3f0[_0xb5f3e9(0x151)]();});}export function probeModels({credential:_0x4514a2,apiBase:_0x32a651,timeoutMs:_0x1e73f9=0x2710}){const _0x4e9fd6=_0x1a20d6,_0x4bb8fd={'sRZqe':_0x4e9fd6(0x13c),'cRNdQ':function(_0x20fdc2,_0x3bb880){return _0x20fdc2<_0x3bb880;},'cyrTR':function(_0x40709a,_0x52601d){return _0x40709a>=_0x52601d;},'NkKgX':function(_0x3f7df0,_0x4c2765){return _0x3f7df0(_0x4c2765);},'tVuFb':_0x4e9fd6(0xf3),'lDFPa':_0x4e9fd6(0x151),'Ivukj':function(_0xf2d9eb,_0x37e248){return _0xf2d9eb/_0x37e248;},'vaOph':_0x4e9fd6(0x145),'ssePk':function(_0x318ce5,_0x48132c){return _0x318ce5===_0x48132c;},'CLvhN':_0x4e9fd6(0xf7),'paxyc':_0x4e9fd6(0x120),'uWxSa':'timeout','tMnDW':_0x4e9fd6(0xe4)},_0x4f16eb=_0x48f6ba();return new Promise((_0x59d7c5,_0x42e96e)=>{const _0x59d61d=_0x4e9fd6,_0x41d20a={'NVCRF':_0x4bb8fd[_0x59d61d(0x12b)],'AUpUX':function(_0x502855,_0x328815){const _0x5efd16=_0x59d61d;return _0x4bb8fd[_0x5efd16(0xea)](_0x502855,_0x328815);},'joldY':function(_0x1279f3,_0x44301d){const _0x31d743=_0x59d61d;return _0x4bb8fd[_0x31d743(0x149)](_0x1279f3,_0x44301d);},'VdhMJ':function(_0x1424f7,_0x469161){const _0x4c30a1=_0x59d61d;return _0x4bb8fd[_0x4c30a1(0x114)](_0x1424f7,_0x469161);},'STnCC':function(_0x2a0ee7,_0x21799b){const _0x464e92=_0x59d61d;return _0x4bb8fd[_0x464e92(0x114)](_0x2a0ee7,_0x21799b);},'Dxgcx':_0x4bb8fd[_0x59d61d(0x125)],'EQMCI':_0x59d61d(0x12c),'GdXQV':_0x4bb8fd['lDFPa'],'cqFKT':function(_0xf8565c,_0x50838b){const _0x3b7e15=_0x59d61d;return _0x4bb8fd[_0x3b7e15(0xf5)](_0xf8565c,_0x50838b);}};let _0x17dce4;try{_0x17dce4=new URL(_0x4bb8fd[_0x59d61d(0x139)],_0x32a651);}catch(_0x411315){return void _0x4bb8fd[_0x59d61d(0x114)](_0x42e96e,new Error('无效的\x20apiBase:'+_0x32a651+'('+_0x411315['message']+')'));}const _0x4605f7=_0x4bb8fd[_0x59d61d(0x13f)](_0x4bb8fd[_0x59d61d(0x10f)],_0x17dce4['protocol'])?_0x2c76e4:_0x95ff1a,_0x3c2f6d=JSON[_0x59d61d(0xee)]({'credential':_0x4514a2}),_0x3afc99=_0x4605f7[_0x59d61d(0x106)](_0x17dce4,{'method':_0x59d61d(0x127),'headers':i(_0x4f16eb,{'Content-Type':_0x4bb8fd[_0x59d61d(0xf2)],'Content-Length':Buffer['byteLength'](_0x3c2f6d)}),'timeout':_0x1e73f9},_0x5ae3d3=>{const _0x34bfb8=_0x59d61d,_0x314a62=[];_0x5ae3d3['on'](_0x41d20a[_0x34bfb8(0xf9)],_0x313a44=>_0x314a62['push'](_0x313a44)),_0x5ae3d3['on'](_0x41d20a['GdXQV'],()=>{const _0x1a6813=_0x34bfb8,_0x9e6a0c=Buffer['concat'](_0x314a62)['toString'](_0x41d20a[_0x1a6813(0xfc)]);if(_0x41d20a['AUpUX'](_0x5ae3d3[_0x1a6813(0x110)],0xc8)||_0x41d20a[_0x1a6813(0xe2)](_0x5ae3d3[_0x1a6813(0x110)],0x12c)){const _0x100398=new Error(_0x1a6813(0x11f)+_0x5ae3d3[_0x1a6813(0x110)]);return _0x100398[_0x1a6813(0x110)]=_0x5ae3d3[_0x1a6813(0x110)],void _0x41d20a[_0x1a6813(0x11b)](_0x42e96e,_0x100398);}try{_0x41d20a[_0x1a6813(0x12e)](_0x59d7c5,_0x9e6a0c?JSON[_0x1a6813(0x113)](_0x9e6a0c):{});}catch{_0x41d20a[_0x1a6813(0x11b)](_0x42e96e,new Error(_0x41d20a[_0x1a6813(0x115)]));}});});_0x3afc99['on'](_0x4bb8fd[_0x59d61d(0x143)],()=>{const _0x5497a0=_0x59d61d;_0x3afc99['destroy'](new Error(_0x5497a0(0x10b)+_0x41d20a['cqFKT'](_0x1e73f9,0x3e8)+_0x5497a0(0x146)+_0x17dce4[_0x5497a0(0x11d)]));}),_0x3afc99['on'](_0x4bb8fd['tMnDW'],_0x42e96e),_0x3afc99[_0x59d61d(0x11c)](_0x3c2f6d),_0x3afc99[_0x59d61d(0x151)]();});}export function listGroups({apiBase:_0xfe6966}){const _0x1d0a20=_0x1a20d6,_0x474bb6={'rKKqw':function(_0x5a31e4,_0x692ff){return _0x5a31e4(_0x692ff);},'EGPbA':function(_0x56d059,_0xe6a2af){return _0x56d059<_0xe6a2af;},'Pmtnx':_0x1d0a20(0x12c),'ZRXAc':_0x1d0a20(0x151),'pbvHW':function(_0x55956f,_0x5eb454){return _0x55956f(_0x5eb454);},'pBEMX':function(_0x24fd6e,_0x3921dc){return _0x24fd6e===_0x3921dc;},'JAsxp':function(_0x4aed5a){return _0x4aed5a();},'KAkkF':_0x1d0a20(0x11a),'Eeobk':function(_0x4a5cc2,_0x546e75,_0x2d1ca7){return _0x4a5cc2(_0x546e75,_0x2d1ca7);},'cXdwP':_0x1d0a20(0x120),'GNBRZ':_0x1d0a20(0xe9)};return new Promise((_0x5d1578,_0x31fc8a)=>{const _0x43b92e=_0x1d0a20;let _0x381942;try{_0x381942=new URL(_0x43b92e(0xef),_0xfe6966);}catch(_0x406a34){return void _0x474bb6[_0x43b92e(0x12d)](_0x31fc8a,new Error(_0x43b92e(0x119)+_0xfe6966+'('+_0x406a34['message']+')'));}const _0xe98bc6=_0x474bb6['pBEMX'](_0x43b92e(0xf7),_0x381942[_0x43b92e(0x103)])?_0x2c76e4:_0x95ff1a,_0xfb6441=_0x474bb6[_0x43b92e(0xf8)](_0x48f6ba),_0x1bfb95=_0xe98bc6['request'](_0x381942,{'method':_0x474bb6[_0x43b92e(0x108)],'headers':_0x474bb6['Eeobk'](i,_0xfb6441,{'Accept':_0x474bb6[_0x43b92e(0x129)]}),'timeout':a},_0x36780d=>{const _0x4bb2ea=_0x43b92e,_0xcd22aa={'zaXDv':_0x4bb2ea(0x13c),'ACxOx':function(_0x5a5593,_0x501918){const _0x181f56=_0x4bb2ea;return _0x474bb6[_0x181f56(0x135)](_0x5a5593,_0x501918);},'NDvHJ':function(_0x5a73d1,_0x5d85e1){return _0x5a73d1>=_0x5d85e1;},'UNPoV':function(_0x7c8d43,_0x28eaa3){const _0x4b08fc=_0x4bb2ea;return _0x474bb6[_0x4b08fc(0x142)](_0x7c8d43,_0x28eaa3);}},_0x3707b3=[];_0x36780d['on'](_0x474bb6[_0x4bb2ea(0x130)],_0x390f9c=>_0x3707b3[_0x4bb2ea(0xec)](_0x390f9c)),_0x36780d['on'](_0x474bb6[_0x4bb2ea(0x124)],()=>{const _0x3f17e2=_0x4bb2ea,_0x8d392=Buffer['concat'](_0x3707b3)['toString'](_0xcd22aa[_0x3f17e2(0x150)]);let _0x895ff5;try{_0x895ff5=_0x8d392?JSON[_0x3f17e2(0x113)](_0x8d392):{};}catch{return void _0xcd22aa[_0x3f17e2(0x101)](_0x5d1578,[]);}if(_0xcd22aa[_0x3f17e2(0x14e)](_0x36780d['statusCode'],0xc8)&&_0xcd22aa['UNPoV'](_0x36780d[_0x3f17e2(0x110)],0x12c)){const _0x232d92=Array[_0x3f17e2(0x148)](_0x895ff5)?_0x895ff5:_0x895ff5?.[_0x3f17e2(0x144)];_0xcd22aa[_0x3f17e2(0x101)](_0x5d1578,Array[_0x3f17e2(0x148)](_0x232d92)?_0x232d92:[]);}else _0xcd22aa[_0x3f17e2(0x101)](_0x5d1578,[]);});});_0x1bfb95['on'](_0x474bb6[_0x43b92e(0x13d)],()=>{const _0x282216=_0x43b92e;_0x1bfb95[_0x282216(0x118)](new Error(_0x282216(0xed)+_0x381942[_0x282216(0x11d)]));}),_0x1bfb95['on'](_0x43b92e(0xe4),_0x43f4d3=>{_0x5d1578([]);}),_0x1bfb95['end']();});}export function verifyApiKey({apiKey:_0x18fbce,baseUrl:_0x25859c}){const _0x1b6352=_0x1a20d6,_0x47e58f={'NQvxF':function(_0x116e18,_0x3b9b7d){return _0x116e18(_0x3b9b7d);},'otXXI':_0x1b6352(0x12a),'QZLsT':function(_0x3037aa,_0x523bae){return _0x3037aa>=_0x523bae;},'TgNBc':function(_0x792e27,_0x454a40){return _0x792e27<_0x454a40;},'Dfevg':function(_0x182572,_0x122bcb){return _0x182572(_0x122bcb);},'DSEhQ':'data','IVmri':_0x1b6352(0x13e),'KoRuj':function(_0x2ebaa0,_0x5ced7b){return _0x2ebaa0(_0x5ced7b);},'fQrWj':function(_0x40a92d,_0x274156){return _0x40a92d===_0x274156;},'vlLSs':_0x1b6352(0xf7),'TKWWM':_0x1b6352(0x11a),'TUFNE':_0x1b6352(0xe9),'TWsHh':_0x1b6352(0xe4)};return new Promise(_0x17ccb2=>{const _0x4bf370=_0x1b6352,_0x5233a1={'xikea':function(_0x33265c,_0xfb28a9){const _0x5edad3=_0xaced;return _0x47e58f[_0x5edad3(0x147)](_0x33265c,_0xfb28a9);},'FFgYB':function(_0x4c1a95,_0x10bef7){const _0x1336bc=_0xaced;return _0x47e58f[_0x1336bc(0x10c)](_0x4c1a95,_0x10bef7);},'xvfdt':function(_0x456d63,_0x32304e){const _0x1d9595=_0xaced;return _0x47e58f[_0x1d9595(0x152)](_0x456d63,_0x32304e);},'vqRyA':_0x47e58f[_0x4bf370(0x12f)]};let _0x2535ec;try{_0x2535ec=new URL(_0x47e58f[_0x4bf370(0x14a)],_0x25859c);}catch{return void _0x47e58f[_0x4bf370(0xfa)](_0x17ccb2,{'ok':!0x1,'error':_0x4bf370(0x104)+_0x25859c});}const _0x33f370=(_0x47e58f['fQrWj'](_0x47e58f[_0x4bf370(0x14d)],_0x2535ec[_0x4bf370(0x103)])?_0x2c76e4:_0x95ff1a)[_0x4bf370(0x106)](_0x2535ec,{'method':_0x47e58f['TKWWM'],'headers':{'Authorization':_0x4bf370(0x100)+_0x18fbce,'User-Agent':n},'timeout':0x3a98},_0x54a870=>{const _0x42f1a5=_0x4bf370,_0x544060=[];_0x54a870['on'](_0x5233a1[_0x42f1a5(0x10e)],_0x4fb130=>_0x544060[_0x42f1a5(0xec)](_0x4fb130)),_0x54a870['on'](_0x42f1a5(0x151),()=>{const _0x123ba6=_0x42f1a5,_0x3929da=_0x5233a1[_0x123ba6(0xf4)](_0x54a870[_0x123ba6(0x110)],0xc8)&&_0x5233a1[_0x123ba6(0x133)](_0x54a870[_0x123ba6(0x110)],0x12c);_0x5233a1[_0x123ba6(0xe8)](_0x17ccb2,{'ok':_0x3929da,'statusCode':_0x54a870['statusCode']});});});_0x33f370['on'](_0x47e58f[_0x4bf370(0x137)],()=>{const _0x1fb863=_0x4bf370;_0x33f370[_0x1fb863(0x118)](),_0x47e58f[_0x1fb863(0x121)](_0x17ccb2,{'ok':!0x1,'error':_0x47e58f[_0x1fb863(0x126)]});}),_0x33f370['on'](_0x47e58f[_0x4bf370(0x112)],_0x4b2660=>_0x17ccb2({'ok':!0x1,'error':_0x4b2660[_0x4bf370(0x132)]})),_0x33f370[_0x4bf370(0x151)]();});}
|
|
1
|
+
const _0x2c8d86=_0x5cc7;(function(_0x32d2f6,_0x26d88b){const _0x366a54=_0x5cc7,_0x8f5d0d=_0x32d2f6();while(!![]){try{const _0x33c824=-parseInt(_0x366a54(0x1e6))/0x1*(-parseInt(_0x366a54(0x225))/0x2)+-parseInt(_0x366a54(0x238))/0x3+-parseInt(_0x366a54(0x1fa))/0x4+-parseInt(_0x366a54(0x1df))/0x5+-parseInt(_0x366a54(0x20c))/0x6*(parseInt(_0x366a54(0x240))/0x7)+parseInt(_0x366a54(0x1e7))/0x8+parseInt(_0x366a54(0x204))/0x9;if(_0x33c824===_0x26d88b)break;else _0x8f5d0d['push'](_0x8f5d0d['shift']());}catch(_0x34d8a0){_0x8f5d0d['push'](_0x8f5d0d['shift']());}}}(_0x27fc,0x4f534));import _0x44c0b2 from'node:https';function _0x27fc(){const _0xdcb4d3=['GET','AlnLt','href','1619472yyiaNS','data','jNbhg','body','DIrMg','push','gOxCu','QmyNZ','28WSbBYa','ReLtU','PoW\x20challenge\x20获取失败:','响应非\x20JSON','kjcAQ','LrECw','application/json','无效的\x20apiBase:','pojQZ','Bearer\x20','olySg','HTTP\x20','oJQeS','992500emuefW','KRjUX','stringify','zuewk','error','zjAgF','toString','450782csOWpV','1266824uubOBV','XWXmY','request','/api/v1/cli/activate','请求超时(30s)—\x20','ozYjI','object','concat','hOumW','EEOrp','uSjTG','pfLjp','end','utf8','验证请求超时(15s)','dhnly','message','BTfIl','响应非\x20JSON(HTTP\x20','1294832zsmasC','../package.json','slice','raw','otVNi','https:','isArray','OsSgu','ODvqr','/v1/models','8447229xRSYtX','ssvdu','/api/v1/cli/groups','write','请求超时(','tOPnx','VmiRH','bZaiV','241152ljUJMH','RsHCF','eHWit','fLSJr','aVVOl','eQkBl','statusCode','hMuFZ','CSFgE','OBzCm','Nmhtv','qLyDl','@2api-store/activate/','Jmoru','无效的\x20baseUrl:','DmVXR','vviQG','wFhYo','OWUZl','aIExD','EyRIU','pfvjv','parse','NBFEu','dWMDy','2pKPuPQ','gjmaL','NLOHH','groups','/api/v1/cli/probe-models','timeout','destroy','byteLength','qFcHi','POST','DXCnJ','chjRq','jiBkk','gLIwO','wIufD','protocol'];_0x27fc=function(){return _0xdcb4d3;};return _0x27fc();}import _0x5a7517 from'node:http';import{createRequire as _0x164dcb}from'node:module';import{getDeviceId as _0xd847b6}from'./device.mjs';import{getChallenge as _0x41977a,solvePoW as _0x5c2e0f}from'./pow.mjs';const a=_0x164dcb(import.meta.url)(_0x2c8d86(0x1fb))['version'],i=_0x2c8d86(0x218)+a,c=0x7530;function u(_0x5d3a32,_0x503b71={}){return{'User-Agent':i,'X-Device-Id':_0x5d3a32,..._0x503b71};}export async function cliActivate({credential:_0x5cab54,email:_0x227728,platform:_0x3b87d6,groupId:_0x391f30,apiBase:_0x59ef61}){const _0x56fe8a=_0x2c8d86,_0x38aa28={'EoOlC':_0x56fe8a(0x1f4),'KRjUX':function(_0x49a1aa,_0x38e2d0){return _0x49a1aa>=_0x38e2d0;},'DXCnJ':function(_0x4fd0e6,_0x38fe16){return _0x4fd0e6<_0x38fe16;},'jiBkk':_0x56fe8a(0x1ed),'Nmhtv':_0x56fe8a(0x239),'NLOHH':_0x56fe8a(0x1f3),'wIufD':_0x56fe8a(0x1ea),'pEpIw':function(_0x53c274,_0x2a9dac){return _0x53c274(_0x2a9dac);},'CSFgE':function(_0x27d714,_0x2859e2){return _0x27d714===_0x2859e2;},'ssvdu':'POST','zuewk':function(_0x5ea939,_0x5aa75c,_0x258388){return _0x5ea939(_0x5aa75c,_0x258388);},'aVVOl':'application/json','RsHCF':'timeout','hOumW':_0x56fe8a(0x1e3),'dWMDy':function(_0x5c4dc9){return _0x5c4dc9();}},_0x30fd1c=_0x38aa28[_0x56fe8a(0x224)](_0xd847b6);let _0x5c1528,_0x11fe87;try{const {challenge:_0x263f20,difficulty:_0x42b663}=await _0x38aa28['pEpIw'](_0x41977a,{'apiBase':_0x59ef61,'deviceId':_0x30fd1c});_0x5c1528=_0x263f20,_0x11fe87=_0x38aa28[_0x56fe8a(0x1e2)](_0x5c2e0f,_0x263f20,_0x42b663);}catch(_0x4264db){throw new Error(_0x56fe8a(0x1d4)+_0x4264db[_0x56fe8a(0x1f7)]);}return new Promise((_0x4ddaee,_0x4157b4)=>{const _0xa78991=_0x56fe8a;let _0x4836c4;try{_0x4836c4=new URL(_0x38aa28[_0xa78991(0x233)],_0x59ef61);}catch(_0x2fa2f3){return void _0x38aa28['pEpIw'](_0x4157b4,new Error(_0xa78991(0x1d9)+_0x59ef61+'('+_0x2fa2f3['message']+')'));}const _0x3a23b1=_0x38aa28[_0xa78991(0x214)](_0xa78991(0x1ff),_0x4836c4[_0xa78991(0x234)])?_0x44c0b2:_0x5a7517,_0x2413fb={'credential':_0x5cab54,'cli_version':a,..._0x227728?{'email':_0x227728}:{},..._0x3b87d6?{'platform':_0x3b87d6}:{},..._0x391f30?{'group_id':_0x391f30}:{}},_0x4e8548=JSON[_0xa78991(0x1e1)](_0x2413fb),_0x2acec5=_0x3a23b1[_0xa78991(0x1e9)](_0x4836c4,{'method':_0x38aa28[_0xa78991(0x205)],'headers':_0x38aa28['zuewk'](u,_0x30fd1c,{'Content-Type':_0x38aa28[_0xa78991(0x210)],'Content-Length':Buffer[_0xa78991(0x22c)](_0x4e8548),'X-PoW-Challenge':_0x5c1528,'X-PoW-Nonce':_0x11fe87}),'timeout':c},_0x30b588=>{const _0x5afa88=_0xa78991,_0x11a709={'tOPnx':_0x38aa28['EoOlC'],'zrhVh':function(_0x139569,_0x458820){const _0x1c2317=_0x5cc7;return _0x38aa28[_0x1c2317(0x1e0)](_0x139569,_0x458820);},'AlnLt':function(_0x3e7910,_0x283a89){const _0x26003a=_0x5cc7;return _0x38aa28[_0x26003a(0x22f)](_0x3e7910,_0x283a89);},'FrqPK':function(_0x567845,_0x3d66b9){return _0x567845(_0x3d66b9);},'EEOrp':function(_0x16f50a,_0x45b463){return _0x16f50a==_0x45b463;},'XWXmY':_0x38aa28[_0x5afa88(0x231)]},_0x2b664e=[];_0x30b588['on'](_0x38aa28[_0x5afa88(0x216)],_0x59737c=>_0x2b664e[_0x5afa88(0x23d)](_0x59737c)),_0x30b588['on'](_0x38aa28[_0x5afa88(0x227)],()=>{const _0x2b1fa4=_0x5afa88,_0x4da074=Buffer['concat'](_0x2b664e)['toString'](_0x11a709[_0x2b1fa4(0x209)]);let _0x111491;try{_0x111491=_0x4da074?JSON['parse'](_0x4da074):{};}catch{const _0x1a84c5=new Error(_0x2b1fa4(0x1f9)+_0x30b588[_0x2b1fa4(0x212)]+'):'+_0x4da074[_0x2b1fa4(0x1fc)](0x0,0xc8));return _0x1a84c5[_0x2b1fa4(0x212)]=_0x30b588[_0x2b1fa4(0x212)],_0x1a84c5[_0x2b1fa4(0x1fd)]=_0x4da074,void _0x4157b4(_0x1a84c5);}if(_0x11a709['zrhVh'](_0x30b588[_0x2b1fa4(0x212)],0xc8)&&_0x11a709[_0x2b1fa4(0x236)](_0x30b588[_0x2b1fa4(0x212)],0x12c))_0x11a709['FrqPK'](_0x4ddaee,_0x111491);else{const _0x1ed09a=_0x111491?.[_0x2b1fa4(0x1e3)],_0x5c1ac9=(_0x1ed09a&&_0x11a709[_0x2b1fa4(0x1f0)](_0x11a709[_0x2b1fa4(0x1e8)],typeof _0x1ed09a)?_0x1ed09a['message']:_0x1ed09a)||_0x111491?.['message']||_0x2b1fa4(0x1dd)+_0x30b588[_0x2b1fa4(0x212)],_0x1df72e=new Error(_0x5c1ac9);_0x1df72e[_0x2b1fa4(0x212)]=_0x30b588[_0x2b1fa4(0x212)],_0x1df72e[_0x2b1fa4(0x23b)]=_0x111491,_0x4157b4(_0x1df72e);}});});_0x2acec5['on'](_0x38aa28[_0xa78991(0x20d)],()=>{const _0x26e62b=_0xa78991;_0x2acec5[_0x26e62b(0x22b)](new Error(_0x26e62b(0x1eb)+_0x4836c4[_0x26e62b(0x237)]));}),_0x2acec5['on'](_0x38aa28[_0xa78991(0x1ef)],_0x4157b4),_0x2acec5[_0xa78991(0x207)](_0x4e8548),_0x2acec5[_0xa78991(0x1f3)]();});}export function probeModels({credential:_0x35aacf,apiBase:_0x18af03,timeoutMs:_0x23f430=0x2710}){const _0x172bcf=_0x2c8d86,_0x3184eb={'uSjTG':_0x172bcf(0x1f4),'xlTRm':function(_0x46d49f,_0x38961d){return _0x46d49f(_0x38961d);},'otVNi':_0x172bcf(0x1d5),'eQkBl':_0x172bcf(0x239),'qLyDl':function(_0x227ad4,_0xde8823){return _0x227ad4/_0xde8823;},'bZaiV':_0x172bcf(0x229),'BTfIl':function(_0x3a0a8b,_0x401d66){return _0x3a0a8b(_0x401d66);},'UUMWS':_0x172bcf(0x1ff),'xqzcy':_0x172bcf(0x22e),'eyCAh':function(_0x52abdb,_0x324f7c,_0x4b078a){return _0x52abdb(_0x324f7c,_0x4b078a);},'yoJkm':'application/json','zhfYI':'timeout','vviQG':'error','gOlGq':function(_0x555aa2){return _0x555aa2();}},_0x3775f6=_0x3184eb['gOlGq'](_0xd847b6);return new Promise((_0x3193a4,_0x34f0e5)=>{const _0x36fcc2=_0x172bcf,_0x5ebc35={'fLSJr':_0x3184eb[_0x36fcc2(0x1f1)],'wFhYo':function(_0x4fdd6e,_0x952075){return _0x3184eb['xlTRm'](_0x4fdd6e,_0x952075);},'gGxqh':_0x3184eb[_0x36fcc2(0x1fe)],'kvKvt':_0x3184eb[_0x36fcc2(0x211)],'gLIwO':function(_0x5d53d2,_0x569655){const _0x2a98c3=_0x36fcc2;return _0x3184eb[_0x2a98c3(0x217)](_0x5d53d2,_0x569655);}};let _0x262389;try{_0x262389=new URL(_0x3184eb[_0x36fcc2(0x20b)],_0x18af03);}catch(_0x251e9f){return void _0x3184eb[_0x36fcc2(0x1f8)](_0x34f0e5,new Error('无效的\x20apiBase:'+_0x18af03+'('+_0x251e9f[_0x36fcc2(0x1f7)]+')'));}const _0x499609=_0x3184eb['UUMWS']===_0x262389['protocol']?_0x44c0b2:_0x5a7517,_0x1d9061=JSON[_0x36fcc2(0x1e1)]({'credential':_0x35aacf}),_0x495590=_0x499609['request'](_0x262389,{'method':_0x3184eb['xqzcy'],'headers':_0x3184eb['eyCAh'](u,_0x3775f6,{'Content-Type':_0x3184eb['yoJkm'],'Content-Length':Buffer[_0x36fcc2(0x22c)](_0x1d9061)}),'timeout':_0x23f430},_0x56fb48=>{const _0x1359ba=_0x36fcc2,_0x3e3128={'LrECw':_0x5ebc35[_0x1359ba(0x20f)],'uXbrB':function(_0x8bc0f1,_0x5c4b2f){return _0x8bc0f1(_0x5c4b2f);},'aIExD':function(_0x4b06ed,_0x1db459){const _0x49ad44=_0x1359ba;return _0x5ebc35[_0x49ad44(0x21d)](_0x4b06ed,_0x1db459);},'oJQeS':_0x5ebc35['gGxqh']},_0x482697=[];_0x56fb48['on'](_0x5ebc35['kvKvt'],_0x128ac3=>_0x482697[_0x1359ba(0x23d)](_0x128ac3)),_0x56fb48['on'](_0x1359ba(0x1f3),()=>{const _0x40062b=_0x1359ba,_0x2a8825=Buffer[_0x40062b(0x1ee)](_0x482697)['toString'](_0x3e3128[_0x40062b(0x1d7)]);if(_0x56fb48[_0x40062b(0x212)]<0xc8||_0x56fb48[_0x40062b(0x212)]>=0x12c){const _0x579ddc=new Error(_0x40062b(0x1dd)+_0x56fb48['statusCode']);return _0x579ddc['statusCode']=_0x56fb48[_0x40062b(0x212)],void _0x3e3128['uXbrB'](_0x34f0e5,_0x579ddc);}try{_0x3e3128[_0x40062b(0x21f)](_0x3193a4,_0x2a8825?JSON[_0x40062b(0x222)](_0x2a8825):{});}catch{_0x3e3128['uXbrB'](_0x34f0e5,new Error(_0x3e3128[_0x40062b(0x1de)]));}});});_0x495590['on'](_0x3184eb['zhfYI'],()=>{const _0x8de8f8=_0x36fcc2;_0x495590[_0x8de8f8(0x22b)](new Error(_0x8de8f8(0x208)+_0x5ebc35[_0x8de8f8(0x232)](_0x23f430,0x3e8)+'s)—\x20'+_0x262389[_0x8de8f8(0x237)]));}),_0x495590['on'](_0x3184eb[_0x36fcc2(0x21c)],_0x34f0e5),_0x495590['write'](_0x1d9061),_0x495590[_0x36fcc2(0x1f3)]();});}function _0x5cc7(_0x3f19b8,_0x396727){_0x3f19b8=_0x3f19b8-0x1d3;const _0x27fc3a=_0x27fc();let _0x5cc798=_0x27fc3a[_0x3f19b8];return _0x5cc798;}export function listGroups({apiBase:_0x1f6048}){const _0x3cb7bb=_0x2c8d86,_0x50c539={'ODvqr':_0x3cb7bb(0x239),'qFcHi':_0x3cb7bb(0x1f3),'olySg':function(_0x11a8f1,_0x17cb47){return _0x11a8f1(_0x17cb47);},'zjAgF':_0x3cb7bb(0x1f4),'hMuFZ':function(_0x3b23d9,_0x681eb2){return _0x3b23d9>=_0x681eb2;},'DIrMg':function(_0x2bf06d,_0x340db1){return _0x2bf06d<_0x340db1;},'kjcAQ':function(_0x171e06,_0x1d3ee3){return _0x171e06(_0x1d3ee3);},'QmyNZ':_0x3cb7bb(0x206),'eHWit':function(_0x237a0b,_0x10a1ca){return _0x237a0b===_0x10a1ca;},'VmiRH':function(_0x31c2cf){return _0x31c2cf();},'gjmaL':function(_0x59cad3,_0x46a9aa,_0xbc6d42){return _0x59cad3(_0x46a9aa,_0xbc6d42);},'DmVXR':_0x3cb7bb(0x1d8),'gOxCu':_0x3cb7bb(0x22a),'Jmoru':_0x3cb7bb(0x1e3)};return new Promise((_0x46a499,_0x544271)=>{const _0x4198b6=_0x3cb7bb,_0x160d8a={'pojQZ':_0x50c539[_0x4198b6(0x1e4)],'jNbhg':function(_0x51aadd,_0x52abec){return _0x51aadd(_0x52abec);},'eYnJF':function(_0x20a3cb,_0x18db70){const _0x5d67e1=_0x4198b6;return _0x50c539[_0x5d67e1(0x213)](_0x20a3cb,_0x18db70);},'OsSgu':function(_0x23ca93,_0x3f3604){const _0x404956=_0x4198b6;return _0x50c539[_0x404956(0x23c)](_0x23ca93,_0x3f3604);},'pfLjp':function(_0x4dcb73,_0x542f65){const _0x31b533=_0x4198b6;return _0x50c539[_0x31b533(0x1d6)](_0x4dcb73,_0x542f65);}};let _0x3b98d3;try{_0x3b98d3=new URL(_0x50c539[_0x4198b6(0x23f)],_0x1f6048);}catch(_0x119efd){return void _0x50c539['kjcAQ'](_0x544271,new Error(_0x4198b6(0x1d9)+_0x1f6048+'('+_0x119efd['message']+')'));}const _0x3da445=_0x50c539[_0x4198b6(0x20e)](_0x4198b6(0x1ff),_0x3b98d3[_0x4198b6(0x234)])?_0x44c0b2:_0x5a7517,_0x4113ad=_0x50c539[_0x4198b6(0x20a)](_0xd847b6),_0xdd18ae=_0x3da445[_0x4198b6(0x1e9)](_0x3b98d3,{'method':_0x4198b6(0x235),'headers':_0x50c539[_0x4198b6(0x226)](u,_0x4113ad,{'Accept':_0x50c539[_0x4198b6(0x21b)]}),'timeout':c},_0x34c50e=>{const _0x1881de=_0x4198b6,_0x48c6de=[];_0x34c50e['on'](_0x50c539[_0x1881de(0x202)],_0x53f075=>_0x48c6de[_0x1881de(0x23d)](_0x53f075)),_0x34c50e['on'](_0x50c539[_0x1881de(0x22d)],()=>{const _0x3c266e=_0x1881de,_0x52ab15=Buffer['concat'](_0x48c6de)[_0x3c266e(0x1e5)](_0x160d8a[_0x3c266e(0x1da)]);let _0x571b02;try{_0x571b02=_0x52ab15?JSON[_0x3c266e(0x222)](_0x52ab15):{};}catch{return void _0x160d8a[_0x3c266e(0x23a)](_0x46a499,[]);}if(_0x160d8a['eYnJF'](_0x34c50e[_0x3c266e(0x212)],0xc8)&&_0x160d8a[_0x3c266e(0x201)](_0x34c50e[_0x3c266e(0x212)],0x12c)){const _0x2c7fb6=Array[_0x3c266e(0x200)](_0x571b02)?_0x571b02:_0x571b02?.[_0x3c266e(0x228)];_0x160d8a[_0x3c266e(0x23a)](_0x46a499,Array[_0x3c266e(0x200)](_0x2c7fb6)?_0x2c7fb6:[]);}else _0x160d8a[_0x3c266e(0x1f2)](_0x46a499,[]);});});_0xdd18ae['on'](_0x50c539[_0x4198b6(0x23e)],()=>{const _0x1be2b2=_0x4198b6;_0xdd18ae[_0x1be2b2(0x22b)](new Error(_0x1be2b2(0x1eb)+_0x3b98d3[_0x1be2b2(0x237)]));}),_0xdd18ae['on'](_0x50c539[_0x4198b6(0x219)],_0x54fe7e=>{const _0x54b502=_0x4198b6;_0x50c539[_0x54b502(0x1dc)](_0x46a499,[]);}),_0xdd18ae['end']();});}export function verifyApiKey({apiKey:_0x5bde59,baseUrl:_0x2b052d}){const _0x429a2a=_0x2c8d86,_0x5ef78d={'zVSIH':function(_0x1f2de1,_0x425e96){return _0x1f2de1<_0x425e96;},'NBFEu':function(_0x301307,_0x211faa){return _0x301307(_0x211faa);},'CJbWW':'data','ReLtU':function(_0x373e73,_0x1ad418){return _0x373e73(_0x1ad418);},'OWUZl':_0x429a2a(0x235),'YrPsY':_0x429a2a(0x22a),'OBzCm':_0x429a2a(0x1e3)};return new Promise(_0x7aacaa=>{const _0x16bcb0=_0x429a2a,_0x45d76c={'GsHlG':function(_0x158175,_0x3e57c9){return _0x5ef78d['zVSIH'](_0x158175,_0x3e57c9);},'dhnly':function(_0x3a7cf8,_0x50859a){const _0x41115f=_0x5cc7;return _0x5ef78d[_0x41115f(0x223)](_0x3a7cf8,_0x50859a);},'chjRq':_0x5ef78d['CJbWW'],'EyRIU':_0x16bcb0(0x1f3)};let _0x3b0948;try{_0x3b0948=new URL(_0x16bcb0(0x203),_0x2b052d);}catch{return void _0x5ef78d[_0x16bcb0(0x1d3)](_0x7aacaa,{'ok':!0x1,'error':_0x16bcb0(0x21a)+_0x2b052d});}const _0xaed5fd=(_0x16bcb0(0x1ff)===_0x3b0948[_0x16bcb0(0x234)]?_0x44c0b2:_0x5a7517)[_0x16bcb0(0x1e9)](_0x3b0948,{'method':_0x5ef78d[_0x16bcb0(0x21e)],'headers':{'Authorization':_0x16bcb0(0x1db)+_0x5bde59,'User-Agent':i},'timeout':0x3a98},_0x1eab55=>{const _0x201a17=_0x16bcb0,_0x38f02e={'pfvjv':function(_0xc8a20b,_0x513d79){return _0x45d76c['GsHlG'](_0xc8a20b,_0x513d79);},'ozYjI':function(_0x5af90a,_0x49c86b){const _0x98463d=_0x5cc7;return _0x45d76c[_0x98463d(0x1f6)](_0x5af90a,_0x49c86b);}},_0x399d11=[];_0x1eab55['on'](_0x45d76c[_0x201a17(0x230)],_0x28c666=>_0x399d11['push'](_0x28c666)),_0x1eab55['on'](_0x45d76c[_0x201a17(0x220)],()=>{const _0xe9a35=_0x201a17,_0x132e3e=_0x1eab55[_0xe9a35(0x212)]>=0xc8&&_0x38f02e[_0xe9a35(0x221)](_0x1eab55[_0xe9a35(0x212)],0x12c);_0x38f02e[_0xe9a35(0x1ec)](_0x7aacaa,{'ok':_0x132e3e,'statusCode':_0x1eab55[_0xe9a35(0x212)]});});});_0xaed5fd['on'](_0x5ef78d['YrPsY'],()=>{const _0x6e1bf6=_0x16bcb0;_0xaed5fd[_0x6e1bf6(0x22b)](),_0x7aacaa({'ok':!0x1,'error':_0x6e1bf6(0x1f5)});}),_0xaed5fd['on'](_0x5ef78d[_0x16bcb0(0x215)],_0x3cc721=>_0x7aacaa({'ok':!0x1,'error':_0x3cc721[_0x16bcb0(0x1f7)]})),_0xaed5fd['end']();});}
|
package/dist/lib/backup.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x149223,_0x560b4f){const _0x4eee2d=_0x2398,_0x36ae74=_0x149223();while(!![]){try{const _0xb7908a=-parseInt(_0x4eee2d(0x1bf))/0x1*(-parseInt(_0x4eee2d(0x1c5))/0x2)+parseInt(_0x4eee2d(0x1b8))/0x3*(-parseInt(_0x4eee2d(0x1d1))/0x4)+-parseInt(_0x4eee2d(0x1cb))/0x5*(parseInt(_0x4eee2d(0x1be))/0x6)+-parseInt(_0x4eee2d(0x1ba))/0x7*(-parseInt(_0x4eee2d(0x1bc))/0x8)+-parseInt(_0x4eee2d(0x1c8))/0x9+parseInt(_0x4eee2d(0x1b9))/0xa+parseInt(_0x4eee2d(0x1c3))/0xb;if(_0xb7908a===_0x560b4f)break;else _0x36ae74['push'](_0x36ae74['shift']());}catch(_0x44ccf4){_0x36ae74['push'](_0x36ae74['shift']());}}}(_0x2100,0xac2a1));import _0x349b66 from'node:fs';import _0x51d603 from'node:path';export function backupFile(_0x3d6cc4){const _0x5dc1a8=_0x2398;let _0x33a3bc=!0x1;try{_0x33a3bc=_0x349b66[_0x5dc1a8(0x1c6)](_0x3d6cc4);}catch{return null;}if(!_0x33a3bc)return null;const _0x42bfb=_0x3d6cc4+_0x5dc1a8(0x1ce)+new Date()[_0x5dc1a8(0x1c7)]()[_0x5dc1a8(0x1bd)](/[:.]/g,'-');return _0x349b66[_0x5dc1a8(0x1d0)](_0x3d6cc4,_0x42bfb),_0x42bfb;}export function listBackups(_0x10bd87){const _0x4e0ff1=_0x2398,_0x412e34=[];for(const _0x335302 of _0x10bd87){if(!_0x335302)continue;let _0x4ba91d;try{_0x4ba91d=_0x349b66[_0x4e0ff1(0x1c1)](_0x335302,{'withFileTypes':!0x0});}catch{continue;}for(const _0x50829b of _0x4ba91d){if(!_0x50829b[_0x4e0ff1(0x1d3)]())continue;const _0x1de100=_0x50829b[_0x4e0ff1(0x1ca)]['match'](/^(.+)\.bak\.[\dTZ:-]+$/);if(!_0x1de100)continue;const _0x442850=_0x1de100[0x1],_0x5aca95=_0x51d603[_0x4e0ff1(0x1cd)](_0x335302,_0x50829b['name']),_0x3f8e30=_0x51d603[_0x4e0ff1(0x1cd)](_0x335302,_0x442850);try{const _0x517fb8=_0x349b66[_0x4e0ff1(0x1c2)](_0x5aca95);_0x412e34[_0x4e0ff1(0x1c9)]({'bakPath':_0x5aca95,'origPath':_0x3f8e30,'mtime':_0x517fb8[_0x4e0ff1(0x1c0)],'dir':_0x335302,'file':_0x50829b[_0x4e0ff1(0x1ca)],'origName':_0x442850,'size':_0x517fb8[_0x4e0ff1(0x1bb)]});}catch{}}}return _0x412e34[_0x4e0ff1(0x1d2)]((_0x3a0611,_0x52f37c)=>_0x52f37c['mtime']-_0x3a0611[_0x4e0ff1(0x1cc)]),_0x412e34;}function _0x2100(){const _0x337129=['size','857912YOueCt','replace','1494HNsbFg','218934JortEX','mtimeMs','readdirSync','statSync','14533189gACWxZ','dirname','6Shmyss','existsSync','toISOString','12662721VDmPJa','push','name','8425GoWYjs','mtime','join','.bak.','备份文件不存在:','copyFileSync','8oGfxvE','sort','isFile','mkdirSync','411267MOTWyn','7206570iYWlzc','7QdaJez'];_0x2100=function(){return _0x337129;};return _0x2100();}function _0x2398(_0x20006a,_0x1895b8){_0x20006a=_0x20006a-0x1b7;const _0x2100c1=_0x2100();let _0x2398d5=_0x2100c1[_0x20006a];return _0x2398d5;}export function restoreBackup(_0x15750b,_0x201f77){const _0x440c72=_0x2398;if(!_0x349b66[_0x440c72(0x1c6)](_0x15750b))throw new Error(_0x440c72(0x1cf)+_0x15750b);const _0x520962=_0x51d603[_0x440c72(0x1c4)](_0x201f77);try{_0x349b66[_0x440c72(0x1b7)](_0x520962,{'recursive':!0x0});}catch{}return _0x349b66[_0x440c72(0x1d0)](_0x15750b,_0x201f77),_0x201f77;}
|
package/dist/lib/cmds.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2387cf=_0x96b3;(function(_0x123131,_0x65fc40){const _0xc7f9cc=_0x96b3,_0x4201de=_0x123131();while(!![]){try{const _0x3def45=-parseInt(_0xc7f9cc(0x231))/0x1*(parseInt(_0xc7f9cc(0x205))/0x2)+parseInt(_0xc7f9cc(0x26f))/0x3+parseInt(_0xc7f9cc(0x191))/0x4*(parseInt(_0xc7f9cc(0x277))/0x5)+-parseInt(_0xc7f9cc(0x256))/0x6+parseInt(_0xc7f9cc(0x271))/0x7*(parseInt(_0xc7f9cc(0x1dd))/0x8)+-parseInt(_0xc7f9cc(0x1ac))/0x9*(parseInt(_0xc7f9cc(0x1bf))/0xa)+parseInt(_0xc7f9cc(0x1ff))/0xb*(-parseInt(_0xc7f9cc(0x1c4))/0xc);if(_0x3def45===_0x65fc40)break;else _0x4201de['push'](_0x4201de['shift']());}catch(_0x56e10f){_0x4201de['push'](_0x4201de['shift']());}}}(_0x3239,0xa0efe));import _0x100529 from'node:fs';import _0xa951bf from'node:path';import _0x645c34 from'node:os';import{backupFile as _0x5a479f,listBackups as _0x858bf4,restoreBackup as _0x1cfc43}from'./backup.mjs';function _0x3239(){const _0x1c782c=['需要\x20node\x20>=\x2018,当前\x20','EZLeo','27AUqoos','%userprofile%\x5c.gemini','--api-base','length','message','vHEEg','mtime','扫描备份文件','apiBase','cWEgD','jwsNd','\x20\x20•\x20已有\x20API\x20Key\x20绑组:登录管理后台修改,或重新激活(npx\x20@2api-store/activate)','定位\x202api.store\x20写入的配置','dirname','existsSync','发现\x20','unlinkSync','YChkh','将执行:','694460nVhiCC','xsnmZ','raSrT','map','JwNiz','21097140HeYGmc','help','supported','srsjE','已删除\x20','bSPBl','HTTnW','toISOString','【试运行模式\x20--dry-run】不会真实删除/恢复文件','trim','jTAFl','oVSKw','find','--help','euOEg','sxsbT','确认\x20reset\x20吗?','nvBRK','\x20个文件','如需从备份恢复,请运行:npx\x20@2api-store/activate\x20restore','\x0a子命令:\x0a\x20\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20从备份恢复(扫描\x20~/.codex\x20/\x20~/.claude\x20/\x20~/.gemini\x20下的\x20.bak.*\x20文件)\x0a\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20恢复官方默认(删\x202api.store\x20写入的配置,并从最新备份恢复)\x0a\x20\x20refresh-groups\x20\x20\x20刷新分组列表(只展示,不改\x20key/配置)\x0a\x0a所有子命令都支持\x20--api-base\x20<url>\x20覆盖端点,restore/reset\x20支持\x20--dry-run。\x0a','VSrwy','npx\x20@2api-store/activate\x20refresh-groups\x20[options]\x0a\x0a','isWindows','GyKIB','932744KJGGhW','Zsqal','选择时间点(回车=最新)','yellow','copyFileSync','KBeES','SPMZc','values','eAmcs','TdZqY','WsEsY','YweVE','code','EACCES','node','未发现\x202api.store\x20写入的配置文件(可能已\x20reset\x20或从未激活过)','Claude\x20Code','eSEzG','kaLGy','\x20←\x20','QwfzP','已删除:','\x20个文件):','basename','includes','%userprofile%\x5c.codex\x5cconfig.toml','NPrmp','\x20\x20-\x20删除\x20','huNQN','XXdon','KVVvA','PZvPy','getDate','get','11AasxtV','replace','\x20\x20说明','VLoTz','origPath','将恢复\x20','22JLMPOT','(请用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)','%userprofile%\x5c.codex','⚠️\x20这是破坏性操作:将删除上述配置文件并尝试从备份恢复。','bbrNU','CLtrU','ZAJcB','version','删除失败\x20','恢复失败:','%userprofile%\x5c.claude','--dry-run','name','共恢复\x20','【试运行模式\x20--dry-run】不会真实恢复文件','vvzsj','dim','选择恢复时间点(','WYxah','\x20个备份文件(reset\x20后将尝试恢复每个配置的最新备份)','svDRF','rYbjC','bsCCQ','sXhxE','(本命令仅展示分组,不修改\x20API\x20Key\x20或配置文件)','OsCeh','\x20\x20•\x20使用兑换码:重新激活时选目标分组即可','ZcwKQ','ILJiv','sVkzz','未找到任何备份文件(reset\x20后这些文件将直接删除,无备份可恢复)','KnCbX','tyybT','push','env','rOTRJ','keys','选择要恢复的应用','HFDha','relative','\x20\x20✓\x20','HOME','获取可用分组','xgLvy','84201WqqUUY','SMZWc','未选择时间点','log','DrhPs','安全备份位置(如需撤销\x20reset,手动恢复这些文件):','npx\x20@2api-store/activate\x20reset\x20[options]\x0a\x0a','readFileSync','fCgvg','(文件已删除,未恢复)','OkRTY','ACTIVATE_API_BASE','eNhgr','match','Codex\x20CLI','已安全备份\x20','syAAD','MavGK','euBSI','WHZHz','从最新备份恢复','找到\x20','PHzLs','\x20个备份文件','http','~/.codex/config.toml','SbbMG','查询到\x20','sort','~/.gemini','repeat','\x20个可用分组','tigPy','~/.gemini/settings.json','green','Rwhjo','VkyZl','447636fmKFhR','FuXSu','可能原因:服务端未配置分组\x20/\x20网络错误\x20/\x20端点错误','bold','getSeconds','确认操作','padEnd','KlvMm','查看可用分组(不改配置)','已恢复:','getMinutes','qylmi','getMonth','join','slice','max','filter','当前端点:','sDLnA','dryRun','\x20→\x20','LUfVs','~/.codex/auth.json','AgqCS','utf8','3814929YdOqru','sk-…','63GHgNbW','inpLf','将处理以下文件:','(跳过删除此文件避免误伤)','key:…','FUCof','5xxmekL','恢复官方默认(删\x202api.store\x20配置并从备份恢复)','~/.claude','dir','dDLsR','forEach','获取分组失败:','从备份恢复\x20','HapCR','API\x20端点:','yEtxK','\x20\x20-\x20','扫描目录:','\x20个\x202api.store\x20配置文件','Gemini\x20CLI','split','5221872SFdjHb','bakPath','pqNiy','HCerC','pMXxR','%userprofile%\x5c.codex\x5cauth.json','iokHX','权限不足,无法删除\x20','VldAd','%userprofile%\x5c.gemini\x5csettings.json','\x20个备份)','HxoyR','vxDjO','FHYep','YawrJ','getFullYear','startsWith','下一步:如需重新激活,运行\x20npx\x20@2api-store/activate','https://2api.store','npx\x20@2api-store/activate\x20restore\x20[options]\x0a\x0a','恢复失败\x20','未选择应用','安全备份:','Ktzsd','安全备份当前文件'];_0x3239=function(){return _0x1c782c;};return _0x3239();}import{cliActivate as _0x3c0cf0,listGroups as _0x6f2bb3}from'./api.mjs';import{writeFileWithPermission as _0x81bc2a,PermissionDeniedError as _0x573ec5}from'./write.mjs';import{renderContent as _0x56a275,expandPath as _0x14b2da,listModels as _0x392556}from'./render.mjs';function _0x96b3(_0x57f3d1,_0x28bb8a){_0x57f3d1=_0x57f3d1-0x184;const _0x323946=_0x3239();let _0x96b355=_0x323946[_0x57f3d1];return _0x96b355;}import{getCliMeta as _0x456a27,isDefaultSelected as _0x292343}from'./platforms.mjs';import{detectAll as _0x548ac6}from'./detect.mjs';import{ask as _0x397b76,askSecret as _0x122007,multiSelect as _0xf11e32,select as _0xe7de86,confirm as _0x5643be,closePrompt as _0x520f1d}from'./prompt.mjs';import{banner as _0x4d3a88,ok as _0x137d84,fail as _0x6ceb8b,warn as _0x4883b3,info as _0x4c4cdd,step as _0x20e702,plain as _0x2cc838,guide as _0x1d9a2b,chalk as _0x4bd2fa}from'./ui.mjs';const v=[_0x2387cf(0x24a),_0x2387cf(0x26c),'~/.claude/settings.json',_0x2387cf(0x252)],C=[_0x2387cf(0x1f6),_0x2387cf(0x196),'%userprofile%\x5c.claude\x5csettings.json',_0x2387cf(0x19a)],T=['~/.codex',_0x2387cf(0x279),_0x2387cf(0x24e)],M=[_0x2387cf(0x207),_0x2387cf(0x20f),_0x2387cf(0x1ad)];function R(_0x23fb35){const _0x19afcb=_0x2387cf,_0x21297a={'KBeES':function(_0x54703e,_0x4e9d7d){return _0x54703e<_0x4e9d7d;},'euOEg':function(_0xff5af4,_0x48074b){return _0xff5af4===_0x48074b;},'qylmi':function(_0x16c05a,_0x1df14c){return _0x16c05a===_0x1df14c;},'BCNVr':_0x19afcb(0x1d1),'Zsqal':function(_0x1208a1,_0x47202a){return _0x1208a1===_0x47202a;}},_0x5c73dd={'dryRun':!0x1,'_':[]};for(let _0x308dc1=0x0;_0x21297a[_0x19afcb(0x1e2)](_0x308dc1,_0x23fb35['length']);_0x308dc1++){const _0x411c3f=_0x23fb35[_0x308dc1];if(_0x21297a[_0x19afcb(0x1d2)](_0x19afcb(0x210),_0x411c3f)||_0x21297a[_0x19afcb(0x261)]('-n',_0x411c3f))_0x5c73dd[_0x19afcb(0x269)]=!0x0;else{if(_0x19afcb(0x1ae)===_0x411c3f)_0x5c73dd['apiBase']=_0x23fb35[++_0x308dc1];else{if(_0x21297a[_0x19afcb(0x261)](_0x21297a['BCNVr'],_0x411c3f)||_0x21297a[_0x19afcb(0x1de)]('-h',_0x411c3f))_0x5c73dd[_0x19afcb(0x1c5)]=!0x0;else{if(_0x411c3f[_0x19afcb(0x1a1)]('--')&&_0x411c3f[_0x19afcb(0x1f5)]('=')){const [_0x1878ff,_0x54bdf9]=_0x411c3f[_0x19afcb(0x264)](0x2)[_0x19afcb(0x190)](/=(.*)/,0x2);_0x5c73dd[_0x1878ff]=_0x54bdf9;}else _0x411c3f['startsWith']('--')?_0x5c73dd[_0x411c3f[_0x19afcb(0x200)](/^--/,'')]=_0x23fb35[++_0x308dc1]:_0x5c73dd['_'][_0x19afcb(0x226)](_0x411c3f);}}}}return _0x5c73dd;}function N(_0x4ecec0,_0x2f46d2){return _0x14b2da(_0x4ecec0,{'isWindows':_0x2f46d2});}function K(_0x1ac1ff){return(_0x1ac1ff?M:T)['map'](_0x3260da=>N(_0x3260da,_0x1ac1ff));}const H=_0x2387cf(0x1d8)[_0x2387cf(0x1cd)]();export const SUBCOMMANDS={'restore':{'handler':async function(_0x2e15ad){const _0x3abae6=_0x2387cf,_0x1a3e02={'jTAFl':function(_0x1917c1,_0x23ed54){return _0x1917c1(_0x23ed54);},'srsjE':'dummy','ZaRbI':function(_0x158cd6,_0x14f730){return _0x158cd6+_0x14f730;},'ILJiv':function(_0x4e46d4,_0x2170f1){return _0x4e46d4(_0x2170f1);},'TdZqY':function(_0x441e53,_0x320266){return _0x441e53(_0x320266);},'pqNiy':_0x3abae6(0x26e),'QwfzP':function(_0x53ed38,_0x4c572a){return _0x53ed38>_0x4c572a;},'VkyZl':'\x20|\x20','PZvPy':function(_0x591bf7,_0x23302c){return _0x591bf7(_0x23302c);},'CLtrU':function(_0x1964e2){return _0x1964e2();},'euBSI':function(_0x331904){return _0x331904();},'syAAD':function(_0x4aaa7b,_0x4388a3){return _0x4aaa7b(_0x4388a3);},'oPcEE':_0x3abae6(0x1b3),'OkRTY':_0x3abae6(0x213),'KnCbX':function(_0x58411c,_0x337d95){return _0x58411c(_0x337d95);},'xsnmZ':function(_0x5117ef,_0x51ba83){return _0x5117ef(_0x51ba83);},'FuXSu':function(_0xc12b2e,_0x17324d){return _0xc12b2e===_0x17324d;},'HbVsK':'未找到任何备份文件(.bak.*)','iokHX':'提示:只有运行过\x20npx\x20@2api-store/activate\x20后才会产生备份文件','tZHIP':_0x3abae6(0x23f),'gZRLI':_0x3abae6(0x1ed),'bSPBl':_0x3abae6(0x18f),'oVSKw':function(_0x45baac,_0x42968d){return _0x45baac(_0x42968d);},'jwsNd':'无可恢复的备份','fydEZ':_0x3abae6(0x22a),'vvzsj':function(_0x1dc676,_0x103861,_0x2a15b0,_0x32ce51){return _0x1dc676(_0x103861,_0x2a15b0,_0x32ce51);},'sDLnA':'选择应用(回车=第一个)','Ktzsd':function(_0xe2eb7f,_0x11cbeb){return _0xe2eb7f>=_0x11cbeb;},'vHEEg':_0x3abae6(0x1a6),'eNhgr':function(_0xcd503d,_0x45ca86){return _0xcd503d(_0x45ca86);},'ZcwKQ':function(_0x145c87,_0x3d3032,_0x408417,_0x1b6224){return _0x145c87(_0x3d3032,_0x408417,_0x1b6224);},'FHYep':function(_0x4000b6,_0x436733){return _0x4000b6<_0x436733;},'BgZNk':_0x3abae6(0x233),'VSrwy':function(_0x385931,_0x561e9e){return _0x385931(_0x561e9e);},'SMZWc':function(_0x24d38f,_0x12b0a0,_0x3634dd){return _0x24d38f(_0x12b0a0,_0x3634dd);},'nvBRK':function(_0x257eed,_0x2d81f9){return _0x257eed(_0x2d81f9);},'LycWG':function(_0x3aefb8,_0x4ad9f7){return _0x3aefb8(_0x4ad9f7);}},_0x33bc20=_0x1a3e02[_0x3abae6(0x1fc)](R,_0x2e15ad);if(_0x33bc20['help'])return console['log'](_0x3abae6(0x1a4)+H),0x0;_0x1a3e02[_0x3abae6(0x20a)](_0x4d3a88);const _0x298fe3=_0x1a3e02[_0x3abae6(0x243)](_0x548ac6);if(!_0x298fe3['node']['supported'])return _0x6ceb8b(_0x3abae6(0x1aa)+_0x298fe3['node'][_0x3abae6(0x20c)]),0x1;_0x1a3e02[_0x3abae6(0x241)](_0x20e702,_0x1a3e02['oPcEE']);const _0x4f8009=_0x1a3e02[_0x3abae6(0x1ce)](K,_0x298fe3['os']['isWindows']);_0x33bc20['dryRun']&&_0x4883b3(_0x1a3e02[_0x3abae6(0x23b)]),_0x1a3e02[_0x3abae6(0x224)](_0x4c4cdd,_0x3abae6(0x18d)+_0x4f8009[_0x3abae6(0x263)](',\x20'));const _0x9d19a4=_0x1a3e02[_0x3abae6(0x1c0)](_0x858bf4,_0x4f8009);if(_0x1a3e02[_0x3abae6(0x257)](0x0,_0x9d19a4[_0x3abae6(0x1af)]))return _0x1a3e02['PZvPy'](_0x4c4cdd,_0x1a3e02['HbVsK']),_0x4c4cdd(_0x1a3e02[_0x3abae6(0x197)]),0x0;_0x1a3e02[_0x3abae6(0x224)](_0x137d84,_0x3abae6(0x246)+_0x9d19a4[_0x3abae6(0x1af)]+_0x3abae6(0x248));const _0x5ddcaa={'.codex':_0x1a3e02['tZHIP'],'.claude':_0x1a3e02['gZRLI'],'.gemini':_0x1a3e02[_0x3abae6(0x1c9)]};function _0x48c9a8(_0x3bb787){const _0x17a292=_0x3abae6,_0x58c24a=process[_0x17a292(0x227)][_0x17a292(0x22e)]||process[_0x17a292(0x227)]['USERPROFILE']||'',_0x37c3c5=_0xa951bf[_0x17a292(0x22c)](_0x58c24a,_0x3bb787)[_0x17a292(0x200)](/\\/g,'/')['split']('/')[0x0];return _0x5ddcaa[_0x37c3c5]||_0x37c3c5;}function _0x152da7(_0x220709){const _0x3662c4=_0x3abae6;return process[_0x3662c4(0x227)][_0x3662c4(0x22e)]||process[_0x3662c4(0x227)]['USERPROFILE'],_0xa951bf[_0x3662c4(0x1b9)](_0x220709);}const _0x38cde1={};for(const _0xc5ea37 of _0x9d19a4){const _0x178740=_0x1a3e02[_0x3abae6(0x1cf)](_0x152da7,_0xc5ea37['origPath']);_0x38cde1[_0x178740]||(_0x38cde1[_0x178740]=[]),_0x38cde1[_0x178740][_0x3abae6(0x226)](_0xc5ea37);}const _0x10c0a7=Object[_0x3abae6(0x229)](_0x38cde1);if(_0x1a3e02[_0x3abae6(0x257)](0x0,_0x10c0a7[_0x3abae6(0x1af)]))return _0x4c4cdd(_0x1a3e02[_0x3abae6(0x1b6)]),0x0;console[_0x3abae6(0x234)](),_0x1a3e02['oVSKw'](_0x20e702,_0x1a3e02['fydEZ']);const _0x5ca5a5=_0x10c0a7[_0x3abae6(0x1c2)](_0x1defca=>{const _0x31abf5=_0x3abae6,_0x497523=_0x1a3e02[_0x31abf5(0x1ce)](_0x48c9a8,_0xa951bf['join'](_0x1defca,_0x1a3e02['srsjE'])),_0x48c59b=_0x38cde1[_0x1defca][_0x31abf5(0x1af)];return{'label':_0x4bd2fa['cyan'](_0x497523)+'('+_0x48c59b+_0x31abf5(0x19b),'dir':_0x1defca};}),_0x3c85d3=await _0x1a3e02[_0x3abae6(0x214)](_0xe7de86,_0x1a3e02[_0x3abae6(0x268)],_0x5ca5a5,{'defaultIndex':0x0});if(_0x3c85d3<0x0||_0x1a3e02[_0x3abae6(0x1a8)](_0x3c85d3,_0x5ca5a5[_0x3abae6(0x1af)]))return _0x6ceb8b(_0x1a3e02[_0x3abae6(0x1b1)]),0x1;const _0x1762ed=_0x5ca5a5[_0x3c85d3][_0x3abae6(0x184)],_0x4a6932=_0x48c9a8(_0xa951bf[_0x3abae6(0x263)](_0x1762ed,_0x1a3e02[_0x3abae6(0x1c7)])),_0x4e1a01=_0x38cde1[_0x1762ed][_0x3abae6(0x24d)]((_0x16bdf7,_0x163ba4)=>_0x163ba4['mtime']-_0x16bdf7[_0x3abae6(0x1b2)]),_0x1a1d6e={},_0x5a463e=[];for(const _0x26c178 of _0x4e1a01){const _0x5e22ab=_0xa951bf[_0x3abae6(0x1f4)](_0x26c178[_0x3abae6(0x192)])[_0x3abae6(0x23e)](/\.bak\.(.+)$/),_0x3f52c1=(_0x5e22ab?_0x5e22ab[0x1]:'')['replace'](/-\d{3}Z$/,'Z');_0x1a1d6e[_0x3f52c1]||(_0x1a1d6e[_0x3f52c1]=[],_0x5a463e[_0x3abae6(0x226)](_0x3f52c1)),_0x1a1d6e[_0x3f52c1]['push'](_0x26c178);}for(const _0x153172 of _0x5a463e){const _0x55ce31=_0x1a1d6e[_0x153172],_0x1e0c99={};for(const _0x4a83cd of _0x55ce31)(!_0x1e0c99[_0x4a83cd[_0x3abae6(0x203)]]||_0x4a83cd[_0x3abae6(0x1b2)]>_0x1e0c99[_0x4a83cd[_0x3abae6(0x203)]]['mtime'])&&(_0x1e0c99[_0x4a83cd['origPath']]=_0x4a83cd);_0x1a1d6e[_0x153172]=Object[_0x3abae6(0x1e4)](_0x1e0c99)[_0x3abae6(0x24d)]((_0x341813,_0x27bf67)=>_0x27bf67[_0x3abae6(0x1b2)]-_0x341813[_0x3abae6(0x1b2)]);}console[_0x3abae6(0x234)](),_0x1a3e02[_0x3abae6(0x23d)](_0x20e702,_0x3abae6(0x216)+_0x4a6932+')');const _0x108d12=_0x5a463e[_0x3abae6(0x1c2)](_0x3b70f1=>{const _0x3bf26d=_0x3abae6,_0x5d042c={'MGARr':function(_0x1fa6e5,_0x3ca220){return _0x1fa6e5(_0x3ca220);},'WHZHz':function(_0x90e4d5,_0x11e7d0){return _0x1a3e02['ZaRbI'](_0x90e4d5,_0x11e7d0);},'sVkzz':function(_0x102158,_0x3980fd){return _0x102158(_0x3980fd);},'tSsUq':function(_0xf4871e,_0x640415){const _0x5e3d80=_0x96b3;return _0x1a3e02[_0x5e3d80(0x221)](_0xf4871e,_0x640415);},'MavGK':function(_0x4a3443,_0x309c66){const _0x14f761=_0x96b3;return _0x1a3e02[_0x14f761(0x1e6)](_0x4a3443,_0x309c66);}},_0x4fb96e=_0x1a1d6e[_0x3b70f1],_0x1ae551=_0x4fb96e['map'](_0x5edddc=>_0xa951bf[_0x3bf26d(0x1f4)](_0x5edddc[_0x3bf26d(0x203)]))[_0x3bf26d(0x263)](',\x20'),_0x30d8c4=function(_0x4a61c7){const _0x23f7a1=_0x3bf26d;try{const _0x4236c7=new Date(_0x4a61c7),_0x3d98e2=_0x1b20b8=>String(_0x1b20b8)['padStart'](0x2,'0');return _0x4236c7[_0x23f7a1(0x1a0)]()+'-'+_0x5d042c['MGARr'](_0x3d98e2,_0x5d042c[_0x23f7a1(0x244)](_0x4236c7[_0x23f7a1(0x262)](),0x1))+'-'+_0x5d042c[_0x23f7a1(0x222)](_0x3d98e2,_0x4236c7[_0x23f7a1(0x1fd)]())+'\x20'+_0x5d042c['tSsUq'](_0x3d98e2,_0x4236c7['getHours']())+':'+_0x3d98e2(_0x4236c7[_0x23f7a1(0x260)]())+':'+_0x5d042c[_0x23f7a1(0x242)](_0x3d98e2,_0x4236c7[_0x23f7a1(0x25a)]());}catch{return new Date(_0x4a61c7)[_0x23f7a1(0x1cb)]();}}(_0x4fb96e[0x0][_0x3bf26d(0x1b2)]),_0x31a857=[];for(const _0x4b8f63 of _0x4fb96e)try{const _0xe8539f=_0x100529[_0x3bf26d(0x238)](_0x4b8f63['bakPath'],_0x1a3e02[_0x3bf26d(0x193)]);if(!_0x31a857[_0x3bf26d(0x1d0)](_0x4ab5b3=>_0x4ab5b3['includes']('…'))){const _0x3dd0de=_0xe8539f['match'](/sk-([a-zA-Z0-9]{10,})/);if(_0x3dd0de)_0x31a857[_0x3bf26d(0x226)](_0x3bf26d(0x270)+_0x3dd0de[0x1][_0x3bf26d(0x264)](-0x6));else{const _0x20cbf1=_0xe8539f[_0x3bf26d(0x23e)](/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/);if(_0x20cbf1)_0x31a857['push'](_0x3bf26d(0x275)+_0x20cbf1[0x1]['slice'](-0x6));else{const _0x4f24a1=_0xe8539f[_0x3bf26d(0x23e)](/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/);_0x4f24a1&&_0x31a857['push']('key:…'+_0x4f24a1[0x2][_0x3bf26d(0x264)](-0x6));}}}if(!_0x31a857[_0x3bf26d(0x1d0)](_0x4cc6df=>_0x4cc6df[_0x3bf26d(0x1a1)](_0x3bf26d(0x249)))){const _0x165315=_0xe8539f[_0x3bf26d(0x23e)](/(https?:\/\/[^\s"'`}]+)/);_0x165315&&_0x31a857[_0x3bf26d(0x226)](_0x165315[0x1][_0x3bf26d(0x200)](/\/+$/,''));}if(!_0x31a857[_0x3bf26d(0x1d0)](_0x42cfa3=>_0x42cfa3[_0x3bf26d(0x1a1)]('model'))){const _0x3cb9e6=_0xe8539f[_0x3bf26d(0x23e)](/(?:^|\n)\s*model\s*[=:]\s*["']?([a-zA-Z0-9][\w.-]+)/);_0x3cb9e6&&_0x31a857['push']('model:'+_0x3cb9e6[0x1]);}}catch{}const _0x364439=_0x1a3e02[_0x3bf26d(0x1f1)](_0x31a857[_0x3bf26d(0x1af)],0x0)?'\x20'+_0x4bd2fa['yellow'](_0x31a857['join'](_0x1a3e02[_0x3bf26d(0x255)])):'';return{'label':_0x4bd2fa[_0x3bf26d(0x215)](_0x30d8c4)+'('+_0x4fb96e['length']+'\x20文件:'+_0x1ae551+')'+_0x364439,'ts':_0x3b70f1,'group':_0x4fb96e};}),_0x23a2fe=await _0x1a3e02[_0x3abae6(0x220)](_0xe7de86,_0x3abae6(0x1df),_0x108d12,{'defaultIndex':0x0});if(_0x1a3e02[_0x3abae6(0x19e)](_0x23a2fe,0x0)||_0x23a2fe>=_0x108d12[_0x3abae6(0x1af)])return _0x6ceb8b(_0x1a3e02['BgZNk']),0x1;const _0x40338c=_0x108d12[_0x23a2fe]['group'];console[_0x3abae6(0x234)](),_0x4c4cdd(_0x3abae6(0x204)+_0x4a6932+'('+_0x40338c['length']+_0x3abae6(0x1f3));for(const _0x4bbcf7 of _0x40338c)_0x4c4cdd('\x20\x20'+_0xa951bf['basename'](_0x4bbcf7[_0x3abae6(0x203)])+_0x3abae6(0x1f0)+_0xa951bf[_0x3abae6(0x1f4)](_0x4bbcf7[_0x3abae6(0x192)]));if(_0x33bc20[_0x3abae6(0x269)])return _0x1a3e02[_0x3abae6(0x1d9)](_0x4883b3,'[试运行]\x20不真实恢复'),0x0;let _0x5c0277=0x0;for(const _0x548769 of _0x40338c){if(_0x100529[_0x3abae6(0x1ba)](_0x548769[_0x3abae6(0x203)]))try{const _0xdbfca9=_0x1a3e02['VSrwy'](_0x5a479f,_0x548769[_0x3abae6(0x203)]);_0xdbfca9&&_0x1a3e02['eNhgr'](_0x4c4cdd,_0x3abae6(0x1a7)+_0xa951bf[_0x3abae6(0x1f4)](_0x548769['origPath'])+_0x3abae6(0x26a)+_0xa951bf[_0x3abae6(0x1f4)](_0xdbfca9));}catch{}try{_0x1a3e02[_0x3abae6(0x232)](_0x1cfc43,_0x548769[_0x3abae6(0x192)],_0x548769[_0x3abae6(0x203)]),_0x1a3e02[_0x3abae6(0x221)](_0x137d84,_0x3abae6(0x25f)+_0x548769[_0x3abae6(0x203)]),_0x5c0277++;}catch(_0x4e49c2){_0x1a3e02[_0x3abae6(0x1d5)](_0x6ceb8b,_0x3abae6(0x20e)+_0x548769['origPath']+'('+_0x4e49c2[_0x3abae6(0x1b0)]+')');}}return _0x1a3e02['LycWG'](_0x4c4cdd,_0x3abae6(0x212)+_0x5c0277+_0x3abae6(0x1d6)),_0x1a3e02[_0x3abae6(0x1f1)](_0x5c0277,0x0)?0x0:0x3;},'description':'从备份恢复配置'},'reset':{'handler':async function(_0x532cc6){const _0xdc6c3b=_0x2387cf,_0x5c1020={'KVVvA':function(_0x2588f1,_0x389f45){return _0x2588f1(_0x389f45);},'EZLeo':function(_0x548c32){return _0x548c32();},'svDRF':function(_0x462b15,_0x313923){return _0x462b15(_0x313923);},'BrfTG':_0xdc6c3b(0x1b8),'LUfVs':function(_0x41e45e,_0x1764e8){return _0x41e45e===_0x1764e8;},'tyybT':_0xdc6c3b(0x1ec),'VldAd':function(_0x145f30,_0x153c6e){return _0x145f30(_0x153c6e);},'raSrT':function(_0x8f2aa5,_0x34e264){return _0x8f2aa5(_0x34e264);},'QzQgs':_0xdc6c3b(0x273),'HapCR':function(_0x14badd,_0x3c3f6e){return _0x14badd(_0x3c3f6e);},'PHzLs':function(_0x232374,_0x4ad8cb){return _0x232374>_0x4ad8cb;},'OsCeh':function(_0x2c7b0d,_0x211a16){return _0x2c7b0d(_0x211a16);},'VLoTz':function(_0x745e7a,_0x263a8e){return _0x745e7a(_0x263a8e);},'ZAJcB':_0xdc6c3b(0x223),'KlvMm':function(_0x1e0936,_0x3b0fc2){return _0x1e0936(_0x3b0fc2);},'HFDha':_0xdc6c3b(0x25b),'Rwhjo':function(_0x532de8,_0x447798){return _0x532de8(_0x447798);},'SPMZc':_0xdc6c3b(0x208),'fCgvg':function(_0x9e9206,_0xd8efb1){return _0x9e9206(_0xd8efb1);},'vxDjO':'\x20\x20\x20删除前会再备份一次(.bak.reset.<时间戳>),可手动恢复。','NPrmp':function(_0x522430,_0xc1ddf4,_0xce3f71){return _0x522430(_0xc1ddf4,_0xce3f71);},'JwNiz':_0xdc6c3b(0x1d4),'inpLf':function(_0x1451d2,_0x151424){return _0x1451d2(_0x151424);},'PYUAZ':_0xdc6c3b(0x1cc),'sXhxE':function(_0x22da50,_0x537bef){return _0x22da50(_0x537bef);},'eSEzG':'并从最新备份恢复:','DrhPs':function(_0x5dc87d,_0xc42962){return _0x5dc87d>_0xc42962;},'lAXgN':function(_0x302876,_0x136050){return _0x302876(_0x136050);},'HxoyR':function(_0x107b49,_0x4c2b7f){return _0x107b49(_0x4c2b7f);},'yEtxK':_0xdc6c3b(0x1a9),'bsCCQ':function(_0x4badb5,_0x3cd8f5){return _0x4badb5(_0x3cd8f5);},'XXdon':function(_0x592d8a,_0x3a1e3c){return _0x592d8a(_0x3a1e3c);},'WsEsY':'删除\x202api.store\x20配置','huNQN':function(_0xaeaf6d,_0x43cdeb){return _0xaeaf6d===_0x43cdeb;},'EAwVk':_0xdc6c3b(0x1ea),'HTTnW':'EROFS','GyKIB':_0xdc6c3b(0x245),'tigPy':function(_0x4dcd5c,_0x42f6b1){return _0x4dcd5c>_0x42f6b1;},'rYbjC':function(_0x58b321,_0x25d859){return _0x58b321(_0x25d859);},'YawrJ':function(_0x3bd4b0,_0x1f94a7){return _0x3bd4b0(_0x1f94a7);},'dDLsR':function(_0x5fe2cb,_0x265ee9){return _0x5fe2cb(_0x265ee9);},'RMsgI':'reset\x20报告','eAmcs':function(_0x4ea479,_0x11ec94){return _0x4ea479>_0x11ec94;},'YlBgr':_0xdc6c3b(0x236),'WYxah':function(_0x5e6551,_0x4ef4ee){return _0x5e6551>_0x4ef4ee;}},_0xde93f=_0x5c1020[_0xdc6c3b(0x1fb)](R,_0x532cc6);if(_0xde93f[_0xdc6c3b(0x1c5)])return console['log'](_0xdc6c3b(0x237)+H),0x0;_0x4d3a88();const _0x442109=_0x5c1020[_0xdc6c3b(0x1ab)](_0x548ac6);if(!_0x442109[_0xdc6c3b(0x1eb)]['supported'])return _0x5c1020[_0xdc6c3b(0x219)](_0x6ceb8b,_0xdc6c3b(0x1aa)+_0x442109[_0xdc6c3b(0x1eb)]['version']),0x1;var _0xf07023;_0x5c1020[_0xdc6c3b(0x219)](_0x20e702,_0x5c1020['BrfTG']);const _0x1260fe=((_0xf07023=_0x442109['os'][_0xdc6c3b(0x1db)])?C:v)['map'](_0x4e5630=>N(_0x4e5630,_0xf07023))[_0xdc6c3b(0x266)](_0x6999f9=>{try{return _0x100529['existsSync'](_0x6999f9);}catch{return!0x1;}});if(_0x5c1020[_0xdc6c3b(0x26b)](0x0,_0x1260fe[_0xdc6c3b(0x1af)]))return _0x4883b3(_0x5c1020[_0xdc6c3b(0x225)]),_0x5c1020[_0xdc6c3b(0x199)](_0x4c4cdd,_0xdc6c3b(0x1d7)),0x0;_0x5c1020[_0xdc6c3b(0x1c1)](_0x4c4cdd,_0x5c1020['QzQgs']),_0x1260fe['forEach'](_0x213502=>_0x2cc838(_0xdc6c3b(0x18c)+_0x4bd2fa[_0xdc6c3b(0x1e0)](_0x213502))),console[_0xdc6c3b(0x234)]();const _0x2cfc79=_0x5c1020[_0xdc6c3b(0x189)](K,_0x442109['os'][_0xdc6c3b(0x1db)]),_0x1f3378=_0x5c1020[_0xdc6c3b(0x1c1)](_0x858bf4,_0x2cfc79),_0x34c761=_0x5c1020[_0xdc6c3b(0x247)](_0x1f3378[_0xdc6c3b(0x1af)],0x0);if(_0x34c761?_0x5c1020[_0xdc6c3b(0x21e)](_0x137d84,_0xdc6c3b(0x1bb)+_0x1f3378[_0xdc6c3b(0x1af)]+_0xdc6c3b(0x218)):_0x5c1020[_0xdc6c3b(0x202)](_0x4883b3,_0x5c1020[_0xdc6c3b(0x20b)]),console[_0xdc6c3b(0x234)](),_0x5c1020[_0xdc6c3b(0x25d)](_0x20e702,_0x5c1020[_0xdc6c3b(0x22b)]),_0x5c1020[_0xdc6c3b(0x254)](_0x4883b3,_0x5c1020[_0xdc6c3b(0x1e3)]),_0x5c1020['fCgvg'](_0x4883b3,_0x5c1020[_0xdc6c3b(0x19d)]),!await _0x5c1020[_0xdc6c3b(0x1f7)](_0x5643be,_0x5c1020[_0xdc6c3b(0x1c3)],{'defaultValue':!0x1}))return _0x5c1020[_0xdc6c3b(0x272)](_0x2cc838,'已取消'),0x0;if(console[_0xdc6c3b(0x234)](),_0xde93f['dryRun'])return _0x4883b3(_0x5c1020['PYUAZ']),_0x4c4cdd(_0xdc6c3b(0x1be)),_0x1260fe[_0xdc6c3b(0x186)](_0x236473=>_0x2cc838(_0xdc6c3b(0x1f8)+_0x236473)),_0x34c761&&(_0x5c1020[_0xdc6c3b(0x21c)](_0x4c4cdd,_0x5c1020[_0xdc6c3b(0x1ee)]),_0x1f3378[_0xdc6c3b(0x264)](0x0,0x5)[_0xdc6c3b(0x186)](_0x152437=>_0x2cc838('\x20\x20-\x20'+_0x152437['bakPath']+_0xdc6c3b(0x26a)+_0x152437[_0xdc6c3b(0x203)])),_0x5c1020[_0xdc6c3b(0x235)](_0x1f3378[_0xdc6c3b(0x1af)],0x5)&&_0x5c1020['lAXgN'](_0x2cc838,'\x20\x20...(共\x20'+_0x1f3378['length']+_0xdc6c3b(0x19b))),0x0;_0x5c1020[_0xdc6c3b(0x19c)](_0x20e702,_0x5c1020[_0xdc6c3b(0x18b)]);const _0x5bbaeb=[];for(const _0x43272a of _0x1260fe)try{const _0x1ed98a=_0x43272a+'.bak.reset.'+new Date()[_0xdc6c3b(0x1cb)]()[_0xdc6c3b(0x200)](/[:.]/g,'-');_0x100529[_0xdc6c3b(0x1e1)](_0x43272a,_0x1ed98a),_0x5bbaeb[_0xdc6c3b(0x226)](_0x1ed98a),_0x5c1020[_0xdc6c3b(0x239)](_0x2cc838,_0xdc6c3b(0x22d)+_0x43272a+_0xdc6c3b(0x26a)+_0x1ed98a);}catch(_0x18d606){_0x5c1020[_0xdc6c3b(0x21b)](_0x6ceb8b,'安全备份失败\x20'+_0x43272a+':'+_0x18d606[_0xdc6c3b(0x1b0)]+_0xdc6c3b(0x274));}_0x5bbaeb[_0xdc6c3b(0x1af)]>0x0&&_0x5c1020[_0xdc6c3b(0x1fa)](_0x137d84,_0xdc6c3b(0x240)+_0x5bbaeb[_0xdc6c3b(0x1af)]+_0xdc6c3b(0x1d6)),console[_0xdc6c3b(0x234)](),_0x5c1020['HapCR'](_0x20e702,_0x5c1020[_0xdc6c3b(0x1e7)]);const _0x2156dd=[];for(const _0x2b953b of _0x1260fe)try{_0x100529[_0xdc6c3b(0x1bc)](_0x2b953b),_0x137d84(_0xdc6c3b(0x1f2)+_0x2b953b),_0x2156dd[_0xdc6c3b(0x226)](_0x2b953b);}catch(_0x1306fe){_0x5c1020['huNQN'](_0x5c1020['EAwVk'],_0x1306fe['code'])||_0x5c1020[_0xdc6c3b(0x1f9)]('EPERM',_0x1306fe[_0xdc6c3b(0x1e9)])||_0x5c1020[_0xdc6c3b(0x1f9)](_0x5c1020[_0xdc6c3b(0x1ca)],_0x1306fe[_0xdc6c3b(0x1e9)])?_0x6ceb8b(_0xdc6c3b(0x198)+_0x2b953b+_0xdc6c3b(0x206)):_0x5c1020[_0xdc6c3b(0x1c1)](_0x6ceb8b,_0xdc6c3b(0x20d)+_0x2b953b+':'+_0x1306fe[_0xdc6c3b(0x1b0)]);}if(console[_0xdc6c3b(0x234)](),_0x34c761){_0x20e702(_0x5c1020[_0xdc6c3b(0x1dc)]);const _0x4f4dd6=new Map();for(const _0x453d6c of _0x1f3378){const _0x456450=_0x4f4dd6[_0xdc6c3b(0x1fe)](_0x453d6c[_0xdc6c3b(0x203)]);(!_0x456450||_0x5c1020[_0xdc6c3b(0x251)](_0x453d6c[_0xdc6c3b(0x1b2)],_0x456450[_0xdc6c3b(0x1b2)]))&&_0x4f4dd6['set'](_0x453d6c[_0xdc6c3b(0x203)],_0x453d6c);}let _0x4dfe16=0x0;for(const [_0x58cba1,_0x1f03a2]of _0x4f4dd6)try{_0x1cfc43(_0x1f03a2[_0xdc6c3b(0x192)],_0x58cba1),_0x5c1020['VldAd'](_0x137d84,_0xdc6c3b(0x25f)+_0x1f03a2['bakPath']+_0xdc6c3b(0x26a)+_0x58cba1),_0x4dfe16++;}catch(_0x190893){_0x5c1020[_0xdc6c3b(0x21a)](_0x4883b3,_0xdc6c3b(0x1a5)+_0x58cba1+':'+_0x190893['message']+_0xdc6c3b(0x23a));}_0x5c1020[_0xdc6c3b(0x251)](_0x4dfe16,0x0)&&_0x5c1020[_0xdc6c3b(0x19f)](_0x4c4cdd,_0xdc6c3b(0x188)+_0x4dfe16+_0xdc6c3b(0x1d6)),console[_0xdc6c3b(0x234)]();}return _0x5c1020[_0xdc6c3b(0x185)](_0x20e702,_0x5c1020['RMsgI']),_0x5c1020[_0xdc6c3b(0x189)](_0x137d84,_0xdc6c3b(0x1c8)+_0x2156dd[_0xdc6c3b(0x1af)]+_0xdc6c3b(0x18e)),_0x5c1020[_0xdc6c3b(0x1e5)](_0x5bbaeb['length'],0x0)&&(_0x4c4cdd(_0x5c1020['YlBgr']),_0x5bbaeb[_0xdc6c3b(0x186)](_0x4d8ccd=>_0x2cc838(_0xdc6c3b(0x18c)+_0x4d8ccd))),_0x5c1020[_0xdc6c3b(0x19f)](_0x4c4cdd,_0xdc6c3b(0x1a2)),_0x5c1020[_0xdc6c3b(0x217)](_0x2156dd[_0xdc6c3b(0x1af)],0x0)?0x0:0x1;},'description':_0x2387cf(0x278)},'refresh-groups':{'handler':async function(_0x32d6bb){const _0x5d27f9=_0x2387cf,_0x209566={'cWEgD':function(_0x26d40e,_0x191660){return _0x26d40e(_0x191660);},'SbbMG':function(_0xe1953d,_0x496c15){return _0xe1953d(_0x496c15);},'AgqCS':_0x5d27f9(0x1a3),'HCerC':_0x5d27f9(0x22f),'FUCof':function(_0x46d3c1,_0x11ddd0){return _0x46d3c1(_0x11ddd0);},'bbrNU':function(_0x358ae7,_0x14f969){return _0x358ae7(_0x14f969);},'rOTRJ':function(_0x10c439,_0x283555){return _0x10c439(_0x283555);},'VszIT':function(_0x55e690,_0x40afe7){return _0x55e690(_0x40afe7);},'YChkh':function(_0x386e82,_0x3b3a4d){return _0x386e82(_0x3b3a4d);},'iOphq':function(_0x242793,_0x494c5d){return _0x242793+_0x494c5d;},'pMXxR':function(_0x4f9f18,_0x1e4ec3){return _0x4f9f18(_0x1e4ec3);},'xgLvy':_0x5d27f9(0x1b7),'sxsbT':function(_0x2cd1f3,_0x150938){return _0x2cd1f3(_0x150938);},'YweVE':_0x5d27f9(0x21f),'kaLGy':function(_0x91e3b8,_0x58be7e){return _0x91e3b8(_0x58be7e);},'pAOes':_0x5d27f9(0x21d)},_0x5dcb75=R(_0x32d6bb);if(_0x5dcb75[_0x5d27f9(0x1c5)])return console['log'](_0x5d27f9(0x1da)+H),0x0;_0x4d3a88();const _0x407b94=_0x548ac6();if(!_0x407b94[_0x5d27f9(0x1eb)][_0x5d27f9(0x1c6)])return _0x209566[_0x5d27f9(0x24b)](_0x6ceb8b,_0x5d27f9(0x1aa)+_0x407b94[_0x5d27f9(0x1eb)][_0x5d27f9(0x20c)]),0x1;const _0x406407=_0x5dcb75[_0x5d27f9(0x1b4)]||process[_0x5d27f9(0x227)][_0x5d27f9(0x23c)]||_0x209566[_0x5d27f9(0x26d)];_0x209566[_0x5d27f9(0x24b)](_0x4c4cdd,_0x5d27f9(0x18a)+_0x406407),console['log'](),_0x209566['cWEgD'](_0x20e702,_0x209566[_0x5d27f9(0x194)]);let _0x1aac13=[];try{_0x1aac13=await _0x209566[_0x5d27f9(0x276)](_0x6f2bb3,{'apiBase':_0x406407});}catch(_0x38268d){return _0x209566[_0x5d27f9(0x209)](_0x6ceb8b,_0x5d27f9(0x187)+_0x38268d[_0x5d27f9(0x1b0)]),0x1;}if(0x0===_0x1aac13['length'])return _0x209566[_0x5d27f9(0x1b5)](_0x4883b3,'未查询到可用分组'),_0x209566[_0x5d27f9(0x276)](_0x4c4cdd,_0x5d27f9(0x258)),_0x209566[_0x5d27f9(0x1b5)](_0x4c4cdd,_0x5d27f9(0x267)+_0x406407+'(可通过\x20--api-base\x20或\x20ACTIVATE_API_BASE\x20覆盖)'),0x0;_0x209566[_0x5d27f9(0x228)](_0x137d84,_0x5d27f9(0x24c)+_0x1aac13['length']+_0x5d27f9(0x250)),console[_0x5d27f9(0x234)](),_0x209566['VszIT'](_0x20e702,'分组列表');const _0x286fdb=Math[_0x5d27f9(0x265)](0x4,..._0x1aac13[_0x5d27f9(0x1c2)](_0x35287a=>String(_0x35287a['id']??'')[_0x5d27f9(0x1af)])),_0x547d7f=Math[_0x5d27f9(0x265)](0x6,..._0x1aac13[_0x5d27f9(0x1c2)](_0x419368=>String(_0x419368[_0x5d27f9(0x211)]??'')[_0x5d27f9(0x1af)])),_0x3963b5='\x20\x20'+'ID'[_0x5d27f9(0x25c)](_0x286fdb)+'\x20\x20'+'名称'['padEnd'](_0x547d7f)+_0x5d27f9(0x201);return _0x209566[_0x5d27f9(0x1bd)](_0x2cc838,_0x4bd2fa[_0x5d27f9(0x259)]['cyan'](_0x3963b5)),_0x209566[_0x5d27f9(0x1b5)](_0x2cc838,_0x4bd2fa['dim']('\x20\x20'+'─'[_0x5d27f9(0x24f)](_0x209566['iOphq'](_0x286fdb,_0x547d7f)+0xf))),_0x1aac13[_0x5d27f9(0x186)]((_0x39a9ee,_0x2c92db)=>{const _0x3a4a76=_0x5d27f9,_0x1be8b2=_0x209566[_0x3a4a76(0x1b5)](String,_0x39a9ee['id']??'')['padEnd'](_0x286fdb),_0x1391d7=_0x209566[_0x3a4a76(0x1b5)](String,_0x39a9ee[_0x3a4a76(0x211)]??'')[_0x3a4a76(0x25c)](_0x547d7f),_0x49c64c='\x20\x20'+_0x4bd2fa[_0x3a4a76(0x1e0)](_0x1be8b2)+'\x20\x20'+_0x4bd2fa[_0x3a4a76(0x253)](_0x1391d7);_0x209566[_0x3a4a76(0x1b5)](_0x2cc838,_0x49c64c);}),console[_0x5d27f9(0x234)](),_0x209566[_0x5d27f9(0x1bd)](_0x4c4cdd,'💡\x20如需切换分组:'),_0x209566[_0x5d27f9(0x195)](_0x2cc838,_0x209566[_0x5d27f9(0x230)]),_0x209566[_0x5d27f9(0x1d3)](_0x2cc838,_0x209566[_0x5d27f9(0x1e8)]),_0x209566[_0x5d27f9(0x1ef)](_0x4c4cdd,_0x209566['pAOes']),0x0;},'description':_0x2387cf(0x25e)}};export const SUBCOMMAND_NAMES=new Set(Object[_0x2387cf(0x229)](SUBCOMMANDS));export{H as SUB_HELP};
|
|
1
|
+
const _0x31b175=_0x2beb;(function(_0x374214,_0x30fd28){const _0xcbeb60=_0x2beb,_0x752100=_0x374214();while(!![]){try{const _0x2ca718=parseInt(_0xcbeb60(0x1cf))/0x1*(-parseInt(_0xcbeb60(0x167))/0x2)+parseInt(_0xcbeb60(0xed))/0x3*(-parseInt(_0xcbeb60(0x164))/0x4)+parseInt(_0xcbeb60(0xcb))/0x5*(parseInt(_0xcbeb60(0x1ac))/0x6)+parseInt(_0xcbeb60(0x1e8))/0x7*(-parseInt(_0xcbeb60(0x1ef))/0x8)+-parseInt(_0xcbeb60(0x1dc))/0x9*(parseInt(_0xcbeb60(0x1f3))/0xa)+parseInt(_0xcbeb60(0x15e))/0xb+parseInt(_0xcbeb60(0x114))/0xc;if(_0x2ca718===_0x30fd28)break;else _0x752100['push'](_0x752100['shift']());}catch(_0x1cacc3){_0x752100['push'](_0x752100['shift']());}}}(_0x34f5,0x28e7d));import _0x311276 from'node:fs';import _0x29d5cc from'node:path';import _0x15d443 from'node:os';import{unzipSync as _0x133dcd}from'fflate';import{backupFile as _0x1a958b,listBackups as _0x14ade9,restoreBackup as _0x3e8bf6}from'./backup.mjs';function _0x2beb(_0x3d5cd7,_0x231ba5){_0x3d5cd7=_0x3d5cd7-0xcb;const _0x34f57a=_0x34f5();let _0x2beba3=_0x34f57a[_0x3d5cd7];return _0x2beba3;}import{cliActivate as _0x428a38,listGroups as _0x3c446f}from'./api.mjs';import{writeFileWithPermission as _0x4ba249,PermissionDeniedError as _0x1f54eb}from'./write.mjs';import{renderContent as _0x2c34c8,expandPath as _0x4b527b,listModels as _0x415d50}from'./render.mjs';import{getCliMeta as _0x376212,isDefaultSelected as _0x4c1a07}from'./platforms.mjs';import{detectAll as _0x36c605}from'./detect.mjs';import{runDiagnose as _0x362806}from'./diagnose.mjs';import{ask as _0x3b6eb9,askSecret as _0xac1445,multiSelect as _0x3cc652,select as _0x3d0c95,confirm as _0x363530,closePrompt as _0x14124d}from'./prompt.mjs';import{banner as _0x209370,ok as _0x3ec7d7,fail as _0x11f69a,warn as _0x39bee0,info as _0x5a353d,step as _0x45c391,plain as _0x334721,guide as _0x1b59ca,chalk as _0x53d9b0}from'./ui.mjs';const C=_0x31b175(0xec),R=[_0x31b175(0x19b),_0x31b175(0xd6),'~/.claude/settings.json','~/.gemini/settings.json'],M=[_0x31b175(0x176),'%userprofile%\x5c.codex\x5cauth.json',_0x31b175(0x1bc),'%userprofile%\x5c.gemini\x5csettings.json'],N=[_0x31b175(0xea),_0x31b175(0x1d2),_0x31b175(0x19f)],B=[_0x31b175(0x18b),'%userprofile%\x5c.claude',_0x31b175(0x1f1)],H=new Set([_0x31b175(0x1b6),_0x31b175(0x11a)]);function K(_0x4c463a){const _0x4668a6=_0x31b175;return _0x4c463a[_0x4668a6(0x179)](/-([a-z])/g,(_0xe24259,_0x490113)=>_0x490113['toUpperCase']());}function U(_0x4eaa44){const _0x3e7297=_0x31b175,_0x27cd41={'pDwfC':function(_0x3ede4c,_0x2a8495){return _0x3ede4c===_0x2a8495;},'BXqcF':_0x3e7297(0x17b),'EwDyc':function(_0x391871,_0x556441){return _0x391871===_0x556441;},'iUsQC':_0x3e7297(0x16f),'Ccezz':function(_0x29d7eb,_0x4a64b3){return _0x29d7eb===_0x4a64b3;},'WTHJK':_0x3e7297(0x182),'QcGFa':function(_0x270bc6,_0xca85d1){return _0x270bc6===_0xca85d1;},'XqnjQ':function(_0x4a6c16,_0x454a28){return _0x4a6c16(_0x454a28);},'bRQbJ':function(_0x227644,_0x5d9b7c){return _0x227644(_0x5d9b7c);}},_0x151eae={'dryRun':!0x1,'_':[]};for(let _0x290ac4=0x0;_0x290ac4<_0x4eaa44[_0x3e7297(0x14e)];_0x290ac4++){const _0x2bdfe9=_0x4eaa44[_0x290ac4];if(_0x27cd41[_0x3e7297(0xd3)](_0x27cd41[_0x3e7297(0x1c1)],_0x2bdfe9)||'-n'===_0x2bdfe9)_0x151eae[_0x3e7297(0x1e7)]=!0x0;else{if(_0x27cd41[_0x3e7297(0xf5)](_0x3e7297(0x14c),_0x2bdfe9)||'-y'===_0x2bdfe9)_0x151eae[_0x3e7297(0x144)]=!0x0;else{if(_0x27cd41['EwDyc'](_0x27cd41['iUsQC'],_0x2bdfe9))_0x151eae[_0x3e7297(0x173)]=_0x4eaa44[++_0x290ac4];else{if(_0x27cd41[_0x3e7297(0x1a9)](_0x27cd41[_0x3e7297(0x1df)],_0x2bdfe9)||_0x27cd41['QcGFa']('-h',_0x2bdfe9))_0x151eae['help']=!0x0;else{if(_0x2bdfe9[_0x3e7297(0x12e)]('--')&&_0x2bdfe9[_0x3e7297(0x119)]('=')){const [_0x1a2902,_0x51a843]=_0x2bdfe9[_0x3e7297(0x149)](0x2)[_0x3e7297(0x1d0)](/=(.*)/,0x2);H[_0x3e7297(0x1cd)](_0x1a2902)?_0x151eae[_0x27cd41[_0x3e7297(0x123)](K,_0x1a2902)]=!0x0:_0x151eae[_0x1a2902]=_0x51a843;}else{if(_0x2bdfe9['startsWith']('--')){const _0x1a332d=_0x2bdfe9[_0x3e7297(0x179)](/^--/,'');H[_0x3e7297(0x1cd)](_0x1a332d)?_0x151eae[_0x27cd41[_0x3e7297(0x11f)](K,_0x1a332d)]=!0x0:_0x151eae[_0x1a332d]=_0x4eaa44[++_0x290ac4];}else _0x151eae['_'][_0x3e7297(0x18c)](_0x2bdfe9);}}}}}}return _0x151eae;}function D(_0x1f031e,_0x2e63ae){return _0x4b527b(_0x1f031e,{'isWindows':_0x2e63ae});}function W(_0x5861f4){const _0xe74da4=_0x31b175;return(_0x5861f4?B:N)[_0xe74da4(0x1a3)](_0x13c663=>D(_0x13c663,_0x5861f4));}const z=_0x31b175(0x14b)[_0x31b175(0x1c3)]();function F(_0x1a7599){const _0x3587db=_0x31b175,_0x2ac8ad={'aYmNJ':function(_0x4c775e,_0x2ae711){return _0x4c775e>=_0x2ae711;},'SNwMr':function(_0xe1f4d9,_0x42cae4){return _0xe1f4d9<_0x42cae4;},'LnYFJ':function(_0x7c54fc,_0x506cb9){return _0x7c54fc!=_0x506cb9;},'DDLid':function(_0x241dbc,_0x3124a){return _0x241dbc>_0x3124a;},'qNaoJ':_0x3587db(0x16e),'sJmIb':'fail'};return _0x2ac8ad['aYmNJ'](_0x1a7599[_0x3587db(0x18f)],0xc8)&&_0x2ac8ad[_0x3587db(0xcf)](_0x1a7599[_0x3587db(0x18f)],0x12c)?_0x2ac8ad[_0x3587db(0x183)](null,_0x1a7599[_0x3587db(0x1e6)])&&_0x2ac8ad[_0x3587db(0x10f)](_0x1a7599[_0x3587db(0x1e6)],0x2710)?_0x2ac8ad['qNaoJ']:'ok':_0x2ac8ad[_0x3587db(0x171)];}function Y({zipPath:_0x489b41,summary:_0x357c53}){const _0x351f48=_0x31b175,_0x5376b2={'XUolt':function(_0x2bdf26,_0x4d7f3c){return _0x2bdf26(_0x4d7f3c);},'mqKAM':_0x351f48(0xfd),'rLfAa':function(_0x5696c9,_0xf8adc9){return _0x5696c9>_0xf8adc9;},'xFXEa':function(_0x4d8f29,_0x8c2ab4){return _0x4d8f29===_0x8c2ab4;},'deKcL':_0x351f48(0x16e),'hzsCe':function(_0x180251,_0x15a40d){return _0x180251(_0x15a40d);},'weKeP':_0x351f48(0x158),'TDykD':function(_0x13e25c,_0x2c7de9){return _0x13e25c(_0x2c7de9);},'UdczC':_0x351f48(0x13e),'zJxQc':function(_0xfd7d56,_0x4ea80a){return _0xfd7d56!=_0x4ea80a;}};console[_0x351f48(0x148)](),_0x5376b2[_0x351f48(0x12f)](_0x45c391,_0x5376b2[_0x351f48(0xf7)]);const _0x43bc3b=Array[_0x351f48(0x141)](_0x357c53[_0x351f48(0xd0)])?_0x357c53['http_tests']:[];if(_0x5376b2['rLfAa'](_0x43bc3b[_0x351f48(0x14e)],0x0)){const _0x407236=Math[_0x351f48(0x15f)](0x6,..._0x43bc3b[_0x351f48(0x1a3)](_0x23321c=>String(_0x23321c['model'])[_0x351f48(0x14e)])),_0x3dd72f=Math[_0x351f48(0x15f)](0x6,..._0x43bc3b[_0x351f48(0x1a3)](_0x47491d=>String(_0x47491d[_0x351f48(0x1a4)]??'-')[_0x351f48(0x14e)]));_0x5376b2['XUolt'](_0x334721,_0x53d9b0[_0x351f48(0x15b)]['cyan']('\x20\x20'+'模型'[_0x351f48(0x1a7)](_0x407236)+'\x20\x20'+'判定'[_0x351f48(0x1a7)](_0x3dd72f)+'\x20\x20'+'状态'[_0x351f48(0x1a7)](0x6)+'\x20\x20'+_0x351f48(0xdc)['padEnd'](0x12)+_0x351f48(0x133)));for(const _0x40018d of _0x43bc3b){const _0x1f48e2=_0x5376b2[_0x351f48(0x12f)](F,_0x40018d),_0x2e3874=_0x5376b2['XUolt'](String,_0x40018d[_0x351f48(0x1a4)]??'-')['padEnd'](_0x3dd72f),_0x4a99e7='ok'===_0x1f48e2?_0x53d9b0[_0x351f48(0x190)](_0x2e3874):_0x5376b2[_0x351f48(0x174)](_0x5376b2['deKcL'],_0x1f48e2)?_0x53d9b0[_0x351f48(0x1f5)](_0x2e3874):_0x53d9b0[_0x351f48(0x1c2)](_0x2e3874),_0x3871b0=(_0x40018d[_0x351f48(0x1e6)]??'-')+_0x351f48(0x1ba)+(_0x40018d['total_ms']??'-')+'ms';_0x334721('\x20\x20'+_0x5376b2[_0x351f48(0x1b0)](String,_0x40018d['model'])[_0x351f48(0x1a7)](_0x407236)+'\x20\x20'+_0x4a99e7+'\x20\x20'+String(_0x40018d[_0x351f48(0x18f)]??_0x5376b2[_0x351f48(0x132)])[_0x351f48(0x1a7)](0x6)+'\x20\x20'+_0x3871b0[_0x351f48(0x1a7)](0x12)+'\x20\x20'+(_0x40018d[_0x351f48(0x1bb)]??'-'));}}else _0x5376b2[_0x351f48(0xe0)](_0x5a353d,_0x5376b2[_0x351f48(0x194)]);const _0x5856f7=Array[_0x351f48(0x141)](_0x357c53[_0x351f48(0x181)])?_0x357c53[_0x351f48(0x181)]:[];if(_0x5376b2[_0x351f48(0xf0)](_0x5856f7[_0x351f48(0x14e)],0x0)){const _0x510095=function(_0x2be8c9){const _0x536afb=_0x351f48,_0x3d54cc={};try{const _0x242537=_0x5376b2['XUolt'](_0x133dcd,new Uint8Array(_0x311276[_0x536afb(0xf2)](_0x2be8c9))),_0x7514a4=Object['keys'](_0x242537)[_0x536afb(0xd9)](_0x58f8e4=>_0x58f8e4[_0x536afb(0x11b)](_0x536afb(0x1e5)));if(!_0x7514a4)return _0x3d54cc;for(const _0x29e6ec of Buffer[_0x536afb(0x163)](_0x242537[_0x7514a4])[_0x536afb(0x113)](_0x536afb(0x155))[_0x536afb(0x1d0)]('\x0a'))if(_0x29e6ec[_0x536afb(0x1c3)]())try{const _0x36cfb1=JSON['parse'](_0x29e6ec);_0x36cfb1&&_0x36cfb1['cli']&&(_0x3d54cc[_0x36cfb1[_0x536afb(0xfe)]]=_0x36cfb1[_0x536afb(0x104)]);}catch{}}catch{}return _0x3d54cc;}(_0x489b41),_0x5ca680=Math[_0x351f48(0x15f)](0x6,..._0x5856f7[_0x351f48(0x1a3)](_0x571dd5=>String(_0x571dd5[_0x351f48(0xfe)])[_0x351f48(0x14e)]));for(const _0x203629 of _0x5856f7){const _0x396f28=_0x5376b2[_0x351f48(0x12f)](String,_0x203629[_0x351f48(0x1a4)]??'-'),_0x4fca72='ok'===_0x396f28?_0x53d9b0[_0x351f48(0x190)](_0x396f28):_0x53d9b0[_0x351f48(0x1c2)](_0x396f28),_0x20f15e=_0x5376b2[_0x351f48(0x165)](null,_0x510095[_0x203629[_0x351f48(0xfe)]])?_0x510095[_0x203629[_0x351f48(0xfe)]]+'ms':'-';_0x5376b2[_0x351f48(0x1b0)](_0x334721,'\x20\x20'+String(_0x203629['cli'])[_0x351f48(0x1a7)](_0x5ca680)+'\x20\x20'+_0x4fca72[_0x351f48(0x1a7)](0x6)+_0x351f48(0x116)+(_0x203629[_0x351f48(0x103)]??_0x5376b2[_0x351f48(0x132)])+'\x20\x20'+_0x20f15e);}}}export const SUBCOMMANDS={'restore':{'handler':async function(_0x50a669){const _0x8634b=_0x31b175,_0x1f3f27={'CjcRY':function(_0x2ffddf,_0x1fa895){return _0x2ffddf(_0x1fa895);},'lISPz':_0x8634b(0x189),'VEYDZ':function(_0x205fbc,_0x561fd5){return _0x205fbc(_0x561fd5);},'mHweH':function(_0x4fbff0,_0x1e86e8){return _0x4fbff0+_0x1e86e8;},'vzOaF':function(_0x5eaac9,_0x2987ef){return _0x5eaac9(_0x2987ef);},'yVfga':_0x8634b(0x155),'iiYCy':function(_0x498a76,_0x58b3ba){return _0x498a76>_0x58b3ba;},'iYzCA':_0x8634b(0x191),'Tnofz':function(_0x557481,_0x1d696f){return _0x557481(_0x1d696f);},'rBqzY':function(_0x32b4c5){return _0x32b4c5();},'fQdBx':_0x8634b(0xd4),'eZrkm':function(_0xe79c20,_0xf9a383){return _0xe79c20(_0xf9a383);},'vDGXJ':_0x8634b(0x126),'NNOmo':function(_0x5af00c,_0x127f53){return _0x5af00c(_0x127f53);},'vqIeO':function(_0x196af9,_0x1a3001){return _0x196af9===_0x1a3001;},'bTupP':_0x8634b(0x137),'XTRwX':function(_0x2cdeab,_0x3b07cd){return _0x2cdeab(_0x3b07cd);},'boTEm':_0x8634b(0x1c6),'gZLsi':_0x8634b(0x1bd),'cZjPJ':_0x8634b(0x1e4),'VaNOz':'Gemini\x20CLI','nyZML':_0x8634b(0xe6),'icglD':_0x8634b(0xfc),'cinPb':function(_0x9421ef,_0x11229f,_0x394885,_0x1b0035){return _0x9421ef(_0x11229f,_0x394885,_0x1b0035);},'lfXUC':_0x8634b(0x1cb),'kyEIh':function(_0x2446ff,_0x5ee667){return _0x2446ff>_0x5ee667;},'SZUQl':function(_0x4cc2ce,_0x1d71a8){return _0x4cc2ce(_0x1d71a8);},'AMfoa':function(_0x234c50,_0x3ad463){return _0x234c50<_0x3ad463;},'HRQGr':function(_0x709ad,_0x55c70a){return _0x709ad>=_0x55c70a;},'OoEDb':_0x8634b(0x106),'FVRkV':function(_0x50cb8f,_0x5f08b4){return _0x50cb8f(_0x5f08b4);},'cvqfM':function(_0x1d342f,_0x5c3d42){return _0x1d342f(_0x5c3d42);},'qBhNI':function(_0x2972e3,_0x345416){return _0x2972e3(_0x345416);},'Hnixy':function(_0x351275,_0x88f73f,_0x1d99e8){return _0x351275(_0x88f73f,_0x1d99e8);},'yUOvD':function(_0x165138,_0x315de6){return _0x165138(_0x315de6);}},_0x50ae4c=_0x1f3f27['Tnofz'](U,_0x50a669);if(_0x50ae4c['help'])return console['log']('npx\x20@2api-store/activate\x20restore\x20[options]\x0a\x0a'+z),0x0;_0x209370();const _0x2b6d64=_0x1f3f27[_0x8634b(0x1d7)](_0x36c605);if(!_0x2b6d64[_0x8634b(0x1c4)][_0x8634b(0x1b5)])return _0x11f69a(_0x8634b(0xdd)+_0x2b6d64[_0x8634b(0x1c4)][_0x8634b(0x145)]),0x1;_0x1f3f27['Tnofz'](_0x45c391,_0x1f3f27[_0x8634b(0x1a1)]);const _0x3367af=_0x1f3f27[_0x8634b(0xf4)](W,_0x2b6d64['os']['isWindows']);_0x50ae4c['dryRun']&&_0x39bee0(_0x1f3f27[_0x8634b(0xd1)]),_0x5a353d(_0x8634b(0x1a5)+_0x3367af['join'](',\x20'));const _0x15d611=_0x1f3f27[_0x8634b(0x192)](_0x14ade9,_0x3367af);if(_0x1f3f27[_0x8634b(0xd8)](0x0,_0x15d611['length']))return _0x1f3f27['CjcRY'](_0x5a353d,_0x1f3f27[_0x8634b(0xe4)]),_0x1f3f27[_0x8634b(0x150)](_0x5a353d,_0x1f3f27[_0x8634b(0xce)]),0x0;_0x3ec7d7(_0x8634b(0xcc)+_0x15d611[_0x8634b(0x14e)]+_0x8634b(0x118));const _0x46d5e8={'.codex':_0x1f3f27['gZLsi'],'.claude':_0x1f3f27[_0x8634b(0x19a)],'.gemini':_0x1f3f27[_0x8634b(0x1d4)]};function _0x2328eb(_0x106575){const _0xfddf1c=_0x8634b,_0x1f359a=process['env'][_0xfddf1c(0x1a8)]||process['env'][_0xfddf1c(0xd2)]||'',_0x20ea63=_0x29d5cc[_0xfddf1c(0x1ce)](_0x1f359a,_0x106575)[_0xfddf1c(0x179)](/\\/g,'/')[_0xfddf1c(0x1d0)]('/')[0x0];return _0x46d5e8[_0x20ea63]||_0x20ea63;}function _0x370ea3(_0x550807){const _0x115148=_0x8634b;return process['env'][_0x115148(0x1a8)]||process[_0x115148(0x17a)]['USERPROFILE'],_0x29d5cc[_0x115148(0x1e1)](_0x550807);}const _0x34f075={};for(const _0x49ebe of _0x15d611){const _0x38100d=_0x1f3f27['CjcRY'](_0x370ea3,_0x49ebe['origPath']);_0x34f075[_0x38100d]||(_0x34f075[_0x38100d]=[]),_0x34f075[_0x38100d][_0x8634b(0x18c)](_0x49ebe);}const _0x451bc1=Object[_0x8634b(0xef)](_0x34f075);if(_0x1f3f27[_0x8634b(0xd8)](0x0,_0x451bc1[_0x8634b(0x14e)]))return _0x1f3f27[_0x8634b(0xdf)](_0x5a353d,_0x1f3f27[_0x8634b(0x1af)]),0x0;console[_0x8634b(0x148)](),_0x45c391(_0x1f3f27[_0x8634b(0xfb)]);const _0x14ab55=_0x451bc1[_0x8634b(0x1a3)](_0x15834e=>{const _0x574a57=_0x8634b,_0x12b09c=_0x1f3f27['CjcRY'](_0x2328eb,_0x29d5cc['join'](_0x15834e,_0x1f3f27[_0x574a57(0xf6)])),_0x993ae2=_0x34f075[_0x15834e][_0x574a57(0x14e)];return{'label':_0x53d9b0['cyan'](_0x12b09c)+'('+_0x993ae2+_0x574a57(0x14f),'dir':_0x15834e};}),_0x2280f3=await _0x1f3f27[_0x8634b(0x1f2)](_0x3d0c95,'选择应用(回车=第一个)',_0x14ab55,{'defaultIndex':0x0});if(_0x2280f3<0x0||_0x2280f3>=_0x14ab55[_0x8634b(0x14e)])return _0x1f3f27['VEYDZ'](_0x11f69a,_0x1f3f27[_0x8634b(0x143)]),0x1;const _0x101f6e=_0x14ab55[_0x2280f3]['dir'],_0x4c15df=_0x1f3f27['vzOaF'](_0x2328eb,_0x29d5cc[_0x8634b(0x186)](_0x101f6e,_0x1f3f27[_0x8634b(0xf6)])),_0x2acc55=_0x34f075[_0x101f6e][_0x8634b(0x15c)]((_0x5e576e,_0x2022d0)=>_0x2022d0[_0x8634b(0x1cc)]-_0x5e576e[_0x8634b(0x1cc)]),_0x494c85={},_0x440254=[];for(const _0x4d54a2 of _0x2acc55){const _0xca185=_0x29d5cc['basename'](_0x4d54a2[_0x8634b(0x156)])[_0x8634b(0x18a)](/\.bak\.(.+)$/),_0x565669=(_0xca185?_0xca185[0x1]:'')[_0x8634b(0x179)](/-\d{3}Z$/,'Z');_0x494c85[_0x565669]||(_0x494c85[_0x565669]=[],_0x440254[_0x8634b(0x18c)](_0x565669)),_0x494c85[_0x565669][_0x8634b(0x18c)](_0x4d54a2);}for(const _0x21ca2f of _0x440254){const _0x28c6d4=_0x494c85[_0x21ca2f],_0x51aac6={};for(const _0x53de06 of _0x28c6d4)(!_0x51aac6[_0x53de06['origPath']]||_0x1f3f27[_0x8634b(0x195)](_0x53de06[_0x8634b(0x1cc)],_0x51aac6[_0x53de06['origPath']]['mtime']))&&(_0x51aac6[_0x53de06['origPath']]=_0x53de06);_0x494c85[_0x21ca2f]=Object[_0x8634b(0x1e9)](_0x51aac6)[_0x8634b(0x15c)]((_0x1f44e8,_0x3c3801)=>_0x3c3801[_0x8634b(0x1cc)]-_0x1f44e8['mtime']);}console[_0x8634b(0x148)](),_0x1f3f27['SZUQl'](_0x45c391,'选择恢复时间点('+_0x4c15df+')');const _0xc12186=_0x440254[_0x8634b(0x1a3)](_0x7a9021=>{const _0xccdfe9=_0x8634b,_0x312e68=_0x494c85[_0x7a9021],_0x3d23a3=_0x312e68[_0xccdfe9(0x1a3)](_0x545e46=>_0x29d5cc[_0xccdfe9(0x111)](_0x545e46[_0xccdfe9(0x152)]))[_0xccdfe9(0x186)](',\x20'),_0x1b3c12=function(_0x55327b){const _0x358501=_0xccdfe9;try{const _0x20d223=new Date(_0x55327b),_0x25c150=_0x3c04e6=>String(_0x3c04e6)['padStart'](0x2,'0');return _0x20d223[_0x358501(0xe5)]()+'-'+_0x1f3f27[_0x358501(0x134)](_0x25c150,_0x1f3f27[_0x358501(0x1e3)](_0x20d223[_0x358501(0x169)](),0x1))+'-'+_0x1f3f27[_0x358501(0x134)](_0x25c150,_0x20d223['getDate']())+'\x20'+_0x25c150(_0x20d223[_0x358501(0x13d)]())+':'+_0x1f3f27[_0x358501(0xdf)](_0x25c150,_0x20d223[_0x358501(0xf3)]())+':'+_0x1f3f27['vzOaF'](_0x25c150,_0x20d223[_0x358501(0x129)]());}catch{return new Date(_0x55327b)[_0x358501(0x10e)]();}}(_0x312e68[0x0][_0xccdfe9(0x1cc)]),_0x5a360a=[];for(const _0xdfd3d8 of _0x312e68)try{const _0x1847e5=_0x311276['readFileSync'](_0xdfd3d8[_0xccdfe9(0x156)],_0x1f3f27[_0xccdfe9(0x138)]);if(!_0x5a360a['find'](_0x4a5949=>_0x4a5949[_0xccdfe9(0x119)]('…'))){const _0x18590a=_0x1847e5[_0xccdfe9(0x18a)](/sk-([a-zA-Z0-9]{10,})/);if(_0x18590a)_0x5a360a[_0xccdfe9(0x18c)](_0xccdfe9(0x157)+_0x18590a[0x1][_0xccdfe9(0x149)](-0x6));else{const _0x50f2bd=_0x1847e5['match'](/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/);if(_0x50f2bd)_0x5a360a[_0xccdfe9(0x18c)](_0xccdfe9(0x184)+_0x50f2bd[0x1][_0xccdfe9(0x149)](-0x6));else{const _0x1b6e8=_0x1847e5['match'](/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/);_0x1b6e8&&_0x5a360a[_0xccdfe9(0x18c)](_0xccdfe9(0x184)+_0x1b6e8[0x2][_0xccdfe9(0x149)](-0x6));}}}if(!_0x5a360a['find'](_0x5a090e=>_0x5a090e[_0xccdfe9(0x12e)]('http'))){const _0x409b58=_0x1847e5['match'](/(https?:\/\/[^\s"'`}]+)/);_0x409b58&&_0x5a360a[_0xccdfe9(0x18c)](_0x409b58[0x1][_0xccdfe9(0x179)](/\/+$/,''));}if(!_0x5a360a[_0xccdfe9(0xd9)](_0x1d5081=>_0x1d5081[_0xccdfe9(0x12e)]('model'))){const _0x569b06=_0x1847e5[_0xccdfe9(0x18a)](/(?:^|\n)\s*model\s*[=:]\s*["']?([a-zA-Z0-9][\w.-]+)/);_0x569b06&&_0x5a360a[_0xccdfe9(0x18c)](_0xccdfe9(0x10a)+_0x569b06[0x1]);}}catch{}const _0x57fc82=_0x1f3f27[_0xccdfe9(0x1d9)](_0x5a360a[_0xccdfe9(0x14e)],0x0)?'\x20'+_0x53d9b0[_0xccdfe9(0x1f5)](_0x5a360a[_0xccdfe9(0x186)](_0x1f3f27['iYzCA'])):'';return{'label':_0x53d9b0[_0xccdfe9(0x1de)](_0x1b3c12)+'('+_0x312e68[_0xccdfe9(0x14e)]+_0xccdfe9(0x12d)+_0x3d23a3+')'+_0x57fc82,'ts':_0x7a9021,'group':_0x312e68};}),_0x140d24=await _0x3d0c95(_0x8634b(0x1b3),_0xc12186,{'defaultIndex':0x0});if(_0x1f3f27['AMfoa'](_0x140d24,0x0)||_0x1f3f27[_0x8634b(0x1b8)](_0x140d24,_0xc12186[_0x8634b(0x14e)]))return _0x1f3f27['VEYDZ'](_0x11f69a,_0x1f3f27[_0x8634b(0x1b4)]),0x1;const _0x3769ce=_0xc12186[_0x140d24][_0x8634b(0x13a)];console['log'](),_0x1f3f27['FVRkV'](_0x5a353d,_0x8634b(0x139)+_0x4c15df+'('+_0x3769ce[_0x8634b(0x14e)]+_0x8634b(0x11e));for(const _0x5d59c5 of _0x3769ce)_0x5a353d('\x20\x20'+_0x29d5cc['basename'](_0x5d59c5[_0x8634b(0x152)])+_0x8634b(0x1f4)+_0x29d5cc['basename'](_0x5d59c5[_0x8634b(0x156)]));if(_0x50ae4c[_0x8634b(0x1e7)])return _0x1f3f27[_0x8634b(0xe7)](_0x39bee0,_0x8634b(0x1ab)),0x0;let _0x14aee9=0x0;for(const _0x5a3ffd of _0x3769ce){if(_0x311276[_0x8634b(0x1d6)](_0x5a3ffd['origPath']))try{const _0x32486c=_0x1f3f27[_0x8634b(0x13f)](_0x1a958b,_0x5a3ffd[_0x8634b(0x152)]);_0x32486c&&_0x5a353d(_0x8634b(0x1a0)+_0x29d5cc[_0x8634b(0x111)](_0x5a3ffd[_0x8634b(0x152)])+_0x8634b(0x1bf)+_0x29d5cc['basename'](_0x32486c));}catch{}try{_0x1f3f27[_0x8634b(0x159)](_0x3e8bf6,_0x5a3ffd[_0x8634b(0x156)],_0x5a3ffd['origPath']),_0x1f3f27[_0x8634b(0x14a)](_0x3ec7d7,_0x8634b(0x107)+_0x5a3ffd[_0x8634b(0x152)]),_0x14aee9++;}catch(_0x1494a9){_0x1f3f27[_0x8634b(0xe7)](_0x11f69a,_0x8634b(0x1ec)+_0x5a3ffd['origPath']+'('+_0x1494a9[_0x8634b(0x160)]+')');}}return _0x5a353d('共恢复\x20'+_0x14aee9+_0x8634b(0x1db)),_0x1f3f27[_0x8634b(0x1d9)](_0x14aee9,0x0)?0x0:0x3;},'description':_0x31b175(0x1ca)},'reset':{'handler':async function(_0x383560){const _0x31a570=_0x31b175,_0x27b016={'EyQQJ':function(_0x784772){return _0x784772();},'neEeJ':function(_0x310ab5,_0x2a71c7){return _0x310ab5(_0x2a71c7);},'VcwQH':_0x31a570(0xe8),'WqAeJ':_0x31a570(0xee),'oahPi':function(_0x27b364,_0x370bc4){return _0x27b364(_0x370bc4);},'OnhVJ':_0x31a570(0x13b),'bNUww':_0x31a570(0x19c),'FuCAe':function(_0x429521,_0x37bf51){return _0x429521(_0x37bf51);},'CDPnn':function(_0x91f7ba,_0x427cc4){return _0x91f7ba>_0x427cc4;},'xihor':function(_0xacf13d,_0x1973de){return _0xacf13d(_0x1973de);},'wZfIy':_0x31a570(0x193),'nWifB':function(_0x33bafe,_0x2ff3ff){return _0x33bafe(_0x2ff3ff);},'BDXeo':_0x31a570(0x1ed),'nZhkB':function(_0x19565b,_0x5b1ebc){return _0x19565b(_0x5b1ebc);},'jepWg':'\x20\x20\x20删除前会再备份一次(.bak.reset.<时间戳>),可手动恢复。','jNZTO':function(_0x230b9b,_0x41d4af,_0x2b0ac3){return _0x230b9b(_0x41d4af,_0x2b0ac3);},'uRYbs':_0x31a570(0x128),'IoCWM':'【试运行模式\x20--dry-run】不会真实删除/恢复文件','ONqfb':function(_0xcddcef,_0xb7f33){return _0xcddcef(_0xb7f33);},'qGWYb':_0x31a570(0x168),'hUhkA':'并从最新备份恢复:','Sjseo':function(_0x5cf825,_0x4f161a){return _0x5cf825(_0x4f161a);},'yiHeH':function(_0x1b3a0d,_0x2572af){return _0x1b3a0d(_0x2572af);},'poRAZ':function(_0xc9a5ec,_0x280e85){return _0xc9a5ec(_0x280e85);},'kRYdu':_0x31a570(0x125),'nBHEA':function(_0x4a7357,_0x28d550){return _0x4a7357===_0x28d550;},'yWfai':_0x31a570(0x101),'fHSAb':_0x31a570(0xf8),'Suycv':function(_0x24b7de,_0x2d8b8d){return _0x24b7de===_0x2d8b8d;},'ZpXZe':function(_0x501ad6,_0x284bb9){return _0x501ad6(_0x284bb9);},'yOhAB':_0x31a570(0x196),'gzSqD':function(_0x17cbdb,_0x875cb5){return _0x17cbdb(_0x875cb5);},'quQwj':function(_0x281e0d,_0x569b08){return _0x281e0d(_0x569b08);},'PKpzc':_0x31a570(0x1ee),'lQmzI':function(_0x237f10,_0x2cbbf9){return _0x237f10(_0x2cbbf9);},'BEJCo':_0x31a570(0x130)},_0x1ae91e=U(_0x383560);if(_0x1ae91e[_0x31a570(0x19d)])return console['log']('npx\x20@2api-store/activate\x20reset\x20[options]\x0a\x0a'+z),0x0;_0x209370();const _0x431aa4=_0x27b016[_0x31a570(0xe9)](_0x36c605);if(!_0x431aa4[_0x31a570(0x1c4)][_0x31a570(0x1b5)])return _0x27b016[_0x31a570(0xf9)](_0x11f69a,_0x31a570(0xdd)+_0x431aa4[_0x31a570(0x1c4)]['version']),0x1;var _0x3e03e3;_0x45c391(_0x27b016[_0x31a570(0x185)]);const _0x5d050b=((_0x3e03e3=_0x431aa4['os'][_0x31a570(0x1d8)])?M:R)['map'](_0x2ce64c=>D(_0x2ce64c,_0x3e03e3))[_0x31a570(0x14d)](_0x52d55b=>{try{return _0x311276['existsSync'](_0x52d55b);}catch{return!0x1;}});if(0x0===_0x5d050b[_0x31a570(0x14e)])return _0x27b016[_0x31a570(0xf9)](_0x39bee0,_0x27b016[_0x31a570(0x1c5)]),_0x27b016[_0x31a570(0x1b1)](_0x5a353d,_0x27b016[_0x31a570(0xcd)]),0x0;_0x27b016[_0x31a570(0xf9)](_0x5a353d,_0x27b016[_0x31a570(0x188)]),_0x5d050b[_0x31a570(0x1d1)](_0x56c6c3=>_0x334721(_0x31a570(0x115)+_0x53d9b0[_0x31a570(0x1f5)](_0x56c6c3))),console['log']();const _0x4e8910=_0x27b016[_0x31a570(0xf9)](W,_0x431aa4['os'][_0x31a570(0x1d8)]),_0x56a9bf=_0x27b016[_0x31a570(0x10b)](_0x14ade9,_0x4e8910),_0x2fd88d=_0x27b016['CDPnn'](_0x56a9bf['length'],0x0);if(_0x2fd88d?_0x27b016[_0x31a570(0xf9)](_0x3ec7d7,'发现\x20'+_0x56a9bf[_0x31a570(0x14e)]+_0x31a570(0x122)):_0x27b016[_0x31a570(0x16b)](_0x39bee0,_0x27b016[_0x31a570(0x1aa)]),console[_0x31a570(0x148)](),_0x27b016[_0x31a570(0x16b)](_0x45c391,_0x31a570(0xe1)),_0x27b016[_0x31a570(0x1ea)](_0x39bee0,_0x27b016[_0x31a570(0x1e0)]),_0x27b016['nZhkB'](_0x39bee0,_0x27b016[_0x31a570(0x147)]),!await _0x27b016[_0x31a570(0x1c7)](_0x363530,_0x31a570(0x1ae),{'defaultValue':!0x1}))return _0x334721(_0x27b016[_0x31a570(0x131)]),0x0;if(console[_0x31a570(0x148)](),_0x1ae91e['dryRun'])return _0x39bee0(_0x27b016[_0x31a570(0x135)]),_0x27b016[_0x31a570(0x100)](_0x5a353d,_0x27b016['qGWYb']),_0x5d050b[_0x31a570(0x1d1)](_0x54114b=>_0x334721(_0x31a570(0x10d)+_0x54114b)),_0x2fd88d&&(_0x27b016[_0x31a570(0x1ea)](_0x5a353d,_0x27b016[_0x31a570(0x172)]),_0x56a9bf['slice'](0x0,0x5)['forEach'](_0x57b4ee=>_0x334721(_0x31a570(0x115)+_0x57b4ee[_0x31a570(0x156)]+_0x31a570(0x1bf)+_0x57b4ee['origPath'])),_0x56a9bf[_0x31a570(0x14e)]>0x5&&_0x27b016[_0x31a570(0x16b)](_0x334721,_0x31a570(0x124)+_0x56a9bf[_0x31a570(0x14e)]+'\x20个备份)')),0x0;_0x45c391(_0x31a570(0x161));const _0x3a2c4b=[];for(const _0x372fbd of _0x5d050b)try{const _0x4c3232=_0x372fbd+_0x31a570(0x1ad)+new Date()[_0x31a570(0x10e)]()[_0x31a570(0x179)](/[:.]/g,'-');_0x311276[_0x31a570(0x18d)](_0x372fbd,_0x4c3232),_0x3a2c4b[_0x31a570(0x18c)](_0x4c3232),_0x27b016['Sjseo'](_0x334721,_0x31a570(0x15a)+_0x372fbd+'\x20→\x20'+_0x4c3232);}catch(_0x59b53b){_0x11f69a(_0x31a570(0xfa)+_0x372fbd+':'+_0x59b53b[_0x31a570(0x160)]+_0x31a570(0x1a6));}_0x27b016[_0x31a570(0x109)](_0x3a2c4b['length'],0x0)&&_0x27b016[_0x31a570(0x12c)](_0x3ec7d7,_0x31a570(0x17d)+_0x3a2c4b[_0x31a570(0x14e)]+_0x31a570(0x1db)),console[_0x31a570(0x148)](),_0x27b016[_0x31a570(0x11d)](_0x45c391,_0x27b016[_0x31a570(0x110)]);const _0x4c7b45=[];for(const _0x186145 of _0x5d050b)try{_0x311276[_0x31a570(0xf1)](_0x186145),_0x27b016[_0x31a570(0x1b1)](_0x3ec7d7,_0x31a570(0x151)+_0x186145),_0x4c7b45['push'](_0x186145);}catch(_0x12884b){_0x27b016[_0x31a570(0x120)](_0x27b016[_0x31a570(0xda)],_0x12884b[_0x31a570(0x17e)])||_0x27b016[_0x31a570(0x120)](_0x27b016[_0x31a570(0xd5)],_0x12884b[_0x31a570(0x17e)])||_0x27b016[_0x31a570(0x142)]('EROFS',_0x12884b['code'])?_0x27b016[_0x31a570(0x1b1)](_0x11f69a,'权限不足,无法删除\x20'+_0x186145+_0x31a570(0x16d)):_0x27b016[_0x31a570(0x1d5)](_0x11f69a,_0x31a570(0x175)+_0x186145+':'+_0x12884b[_0x31a570(0x160)]);}if(console['log'](),_0x2fd88d){_0x27b016[_0x31a570(0x16b)](_0x45c391,_0x27b016['yOhAB']);const _0x597831=new Map();for(const _0x525d91 of _0x56a9bf){const _0x21f964=_0x597831[_0x31a570(0x112)](_0x525d91[_0x31a570(0x152)]);(!_0x21f964||_0x27b016['CDPnn'](_0x525d91[_0x31a570(0x1cc)],_0x21f964[_0x31a570(0x1cc)]))&&_0x597831['set'](_0x525d91[_0x31a570(0x152)],_0x525d91);}let _0x4ed093=0x0;for(const [_0x45e817,_0xed774]of _0x597831)try{_0x27b016[_0x31a570(0x1c7)](_0x3e8bf6,_0xed774[_0x31a570(0x156)],_0x45e817),_0x27b016['gzSqD'](_0x3ec7d7,'已恢复:'+_0xed774['bakPath']+_0x31a570(0x1bf)+_0x45e817),_0x4ed093++;}catch(_0x27c867){_0x27b016[_0x31a570(0x1c8)](_0x39bee0,_0x31a570(0xd7)+_0x45e817+':'+_0x27c867[_0x31a570(0x160)]+_0x31a570(0x1b7));}_0x27b016[_0x31a570(0x109)](_0x4ed093,0x0)&&_0x27b016[_0x31a570(0x197)](_0x5a353d,_0x31a570(0x102)+_0x4ed093+_0x31a570(0x1db)),console[_0x31a570(0x148)]();}return _0x45c391(_0x27b016['PKpzc']),_0x27b016[_0x31a570(0x177)](_0x3ec7d7,_0x31a570(0x198)+_0x4c7b45[_0x31a570(0x14e)]+_0x31a570(0x1c9)),_0x27b016[_0x31a570(0x109)](_0x3a2c4b[_0x31a570(0x14e)],0x0)&&(_0x27b016[_0x31a570(0x16b)](_0x5a353d,_0x27b016[_0x31a570(0x140)]),_0x3a2c4b[_0x31a570(0x1d1)](_0x224a99=>_0x334721(_0x31a570(0x115)+_0x224a99))),_0x27b016[_0x31a570(0x1ea)](_0x5a353d,'下一步:如需重新激活,运行\x20npx\x20@2api-store/activate'),_0x4c7b45['length']>0x0?0x0:0x1;},'description':_0x31b175(0x1e2)},'refresh-groups':{'handler':async function(_0x29412f){const _0x36a964=_0x31b175,_0x379f86={'MIIxD':function(_0x4a586a,_0x3d5417){return _0x4a586a(_0x3d5417);},'NxyJw':function(_0x3ba754,_0x47dc08){return _0x3ba754(_0x47dc08);},'FgCPB':function(_0x15370f,_0xd775db){return _0x15370f(_0xd775db);},'qGrsm':function(_0x4d8fb9,_0x362895){return _0x4d8fb9(_0x362895);},'eAncJ':function(_0xfbb95a){return _0xfbb95a();},'LViKk':function(_0x3b4606,_0x46cdd9){return _0x3b4606(_0x46cdd9);},'KzYzu':function(_0x408b0c,_0x365a2d){return _0x408b0c(_0x365a2d);},'KmFFG':_0x36a964(0x16c),'bCoos':function(_0x3e7ba5,_0x32ee2e){return _0x3e7ba5(_0x32ee2e);},'VxDlV':function(_0x3fb999,_0x274bf6){return _0x3fb999(_0x274bf6);},'HCaXp':function(_0x39d5c7,_0x2c2238){return _0x39d5c7===_0x2c2238;},'cDHLa':_0x36a964(0x15d),'qOwHC':function(_0x478bd,_0x5b16ae){return _0x478bd(_0x5b16ae);},'uMpRH':_0x36a964(0x108),'GOVJL':function(_0x277c04,_0x1de95e){return _0x277c04(_0x1de95e);},'orTMk':'分组列表','QmTbV':function(_0x4ef59d,_0x4dc905){return _0x4ef59d+_0x4dc905;},'YTmml':function(_0xb95290,_0x5c0eb2){return _0xb95290+_0x5c0eb2;},'nuUwN':function(_0x437350,_0x1328c0){return _0x437350(_0x1328c0);},'iTepj':function(_0x48e546,_0x549191){return _0x48e546(_0x549191);},'GcPWB':_0x36a964(0x187)},_0x241a76=_0x379f86['qGrsm'](U,_0x29412f);if(_0x241a76[_0x36a964(0x19d)])return console[_0x36a964(0x148)](_0x36a964(0x1b2)+z),0x0;_0x379f86['eAncJ'](_0x209370);const _0x56b6da=_0x379f86['eAncJ'](_0x36c605);if(!_0x56b6da[_0x36a964(0x1c4)][_0x36a964(0x1b5)])return _0x11f69a(_0x36a964(0xdd)+_0x56b6da['node'][_0x36a964(0x145)]),0x1;const _0xa4c287=_0x241a76['apiBase']||process[_0x36a964(0x17a)][_0x36a964(0x12a)]||C;_0x379f86[_0x36a964(0x162)](_0x5a353d,_0x36a964(0x1a2)+_0xa4c287),console[_0x36a964(0x148)](),_0x379f86[_0x36a964(0x1c0)](_0x45c391,_0x379f86['KmFFG']);let _0x22db37=[];try{_0x22db37=await _0x379f86['bCoos'](_0x3c446f,{'apiBase':_0xa4c287});}catch(_0x229039){return _0x379f86['VxDlV'](_0x11f69a,'获取分组失败:'+_0x229039[_0x36a964(0x160)]),0x1;}if(_0x379f86[_0x36a964(0x1dd)](0x0,_0x22db37[_0x36a964(0x14e)]))return _0x39bee0(_0x379f86['cDHLa']),_0x379f86['qOwHC'](_0x5a353d,_0x379f86[_0x36a964(0x16a)]),_0x379f86['VxDlV'](_0x5a353d,_0x36a964(0x19e)+_0xa4c287+'(可通过\x20--api-base\x20或\x20ACTIVATE_API_BASE\x20覆盖)'),0x0;_0x379f86['VxDlV'](_0x3ec7d7,'查询到\x20'+_0x22db37[_0x36a964(0x14e)]+'\x20个可用分组'),console[_0x36a964(0x148)](),_0x379f86[_0x36a964(0x146)](_0x45c391,_0x379f86[_0x36a964(0x1da)]);const _0x185137=Math[_0x36a964(0x15f)](0x4,..._0x22db37[_0x36a964(0x1a3)](_0x213682=>String(_0x213682['id']??'')[_0x36a964(0x14e)])),_0x2bf816=Math[_0x36a964(0x15f)](0x6,..._0x22db37['map'](_0x260828=>String(_0x260828[_0x36a964(0x1f0)]??'')[_0x36a964(0x14e)])),_0x327939='\x20\x20'+'ID'['padEnd'](_0x185137)+'\x20\x20'+'名称'[_0x36a964(0x1a7)](_0x2bf816)+_0x36a964(0x13c);return _0x334721(_0x53d9b0[_0x36a964(0x15b)][_0x36a964(0x180)](_0x327939)),_0x379f86['VxDlV'](_0x334721,_0x53d9b0[_0x36a964(0x1de)](_0x379f86[_0x36a964(0x1be)]('\x20\x20','─'[_0x36a964(0x105)](_0x379f86[_0x36a964(0x121)](_0x379f86[_0x36a964(0x121)](_0x185137,_0x2bf816),0xf))))),_0x22db37[_0x36a964(0x1d1)]((_0xeea5cb,_0x4e2822)=>{const _0x4f9814=_0x36a964,_0x405ef6=_0x379f86[_0x4f9814(0xe2)](String,_0xeea5cb['id']??'')[_0x4f9814(0x1a7)](_0x185137),_0x171a1a=_0x379f86[_0x4f9814(0x1eb)](String,_0xeea5cb[_0x4f9814(0x1f0)]??'')['padEnd'](_0x2bf816),_0x3ddb39='\x20\x20'+_0x53d9b0[_0x4f9814(0x1f5)](_0x405ef6)+'\x20\x20'+_0x53d9b0[_0x4f9814(0x190)](_0x171a1a);_0x379f86[_0x4f9814(0x117)](_0x334721,_0x3ddb39);}),console[_0x36a964(0x148)](),_0x379f86[_0x36a964(0x136)](_0x5a353d,_0x36a964(0x127)),_0x379f86[_0x36a964(0x170)](_0x334721,_0x379f86['GcPWB']),_0x379f86[_0x36a964(0x1eb)](_0x334721,_0x36a964(0xff)),_0x379f86[_0x36a964(0x1c0)](_0x5a353d,_0x36a964(0x18e)),0x0;},'description':_0x31b175(0x199)},'diagnose':{'handler':async function(_0x42bab5){const _0x258c0b=_0x31b175,_0x3a0a5c={'eEiBm':function(_0x13bba3,_0x2710b3){return _0x13bba3(_0x2710b3);},'nmjbu':function(_0x32124e){return _0x32124e();},'jYgOc':_0x258c0b(0x1d3),'KhVuc':function(_0x420398,_0x3381fe){return _0x420398===_0x3381fe;},'QvFUI':_0x258c0b(0x17c),'TFeNV':function(_0x469633,_0x444a56){return _0x469633(_0x444a56);},'YUWBB':_0x258c0b(0xde)},_0x1bb1d4=_0x3a0a5c['eEiBm'](U,_0x42bab5);if(_0x1bb1d4['help'])return console[_0x258c0b(0x148)](_0x258c0b(0x166)+z),0x0;_0x3a0a5c[_0x258c0b(0x10c)](_0x209370);const _0x5d19a3=_0x3a0a5c[_0x258c0b(0x10c)](_0x36c605);if(!_0x5d19a3[_0x258c0b(0x1c4)]['supported'])return _0x11f69a('需要\x20node\x20>=\x2018,当前\x20'+_0x5d19a3[_0x258c0b(0x1c4)][_0x258c0b(0x145)]),0x1;const _0x4a99fa=_0x1bb1d4[_0x258c0b(0x173)]||process[_0x258c0b(0x17a)]['ACTIVATE_API_BASE']||C;_0x3a0a5c[_0x258c0b(0x17f)](_0x5a353d,'API\x20端点:'+_0x4a99fa);const _0x598a82={'yes':!0x0===_0x1bb1d4[_0x258c0b(0x144)],'models':_0x3a0a5c[_0x258c0b(0x1b9)]==typeof _0x1bb1d4[_0x258c0b(0x153)]?_0x1bb1d4[_0x258c0b(0x153)]:void 0x0,'skipCliTests':_0x3a0a5c[_0x258c0b(0x178)](!0x0,_0x1bb1d4[_0x258c0b(0x12b)]),'outDir':_0x1bb1d4[_0x258c0b(0xeb)]};let _0x596d9a;_0x598a82[_0x258c0b(0x144)]||_0x5a353d(_0x3a0a5c[_0x258c0b(0xdb)]);try{_0x596d9a=await _0x3a0a5c[_0x258c0b(0x17f)](_0x362806,{'apiBase':_0x4a99fa,'opts':_0x598a82,'ui':{'banner':_0x209370,'ok':_0x3ec7d7,'fail':_0x11f69a,'warn':_0x39bee0,'info':_0x5a353d,'step':_0x45c391,'plain':_0x334721,'guide':_0x1b59ca,'chalk':_0x53d9b0}});}catch(_0x3405f1){return _0x11f69a(_0x258c0b(0x11c)+(_0x3405f1?.[_0x258c0b(0x160)]||_0x3405f1)),0x1;}return Y(_0x596d9a),_0x3ec7d7('诊断包已生成:'+_0x596d9a['zipPath']),_0x3a0a5c[_0x258c0b(0xe3)](_0x5a353d,_0x3a0a5c['YUWBB']),0x0;},'description':_0x31b175(0x154)}};export const SUBCOMMAND_NAMES=new Set(Object[_0x31b175(0xef)](SUBCOMMANDS));function _0x34f5(){const _0x4c3609=['\x20\x20request_id','VEYDZ','IoCWM','nuUwN','未找到任何备份文件(.bak.*)','yVfga','将恢复\x20','group','如需从备份恢复,请运行:npx\x20@2api-store/activate\x20restore','\x20\x20说明','getHours','无\x20HTTP\x20测试记录','qBhNI','BEJCo','isArray','Suycv','lfXUC','yes','version','GOVJL','jepWg','log','slice','yUOvD','\x0a子命令:\x0a\x20\x20restore\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20从备份恢复(扫描\x20~/.codex\x20/\x20~/.claude\x20/\x20~/.gemini\x20下的\x20.bak.*\x20文件)\x0a\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20恢复官方默认(删\x202api.store\x20写入的配置,并从最新备份恢复)\x0a\x20\x20refresh-groups\x20\x20\x20刷新分组列表(只展示,不改\x20key/配置)\x0a\x20\x20diagnose\x20\x20\x20\x20\x20\x20\x20\x20\x20诊断连接并生成日志压缩包(环境收集+渠道实测+CLI实测,发给客服排障)\x0a\x0a所有子命令都支持\x20--api-base\x20<url>\x20覆盖端点,restore/reset\x20支持\x20--dry-run。\x0a','--yes','filter','length','\x20个备份)','XTRwX','已删除:','origPath','model','诊断连接并生成日志压缩包(发给客服排障)','utf8','bakPath','sk-…','ERR','Hnixy','\x20\x20✓\x20','bold','sort','未查询到可用分组','1377684ionVND','max','message','安全备份当前文件','LViKk','from','88xVuxti','zJxQc','npx\x20@2api-store/activate\x20diagnose\x20[options]\x0a\x0a','184802upzlfU','将执行:','getMonth','uMpRH','xihor','获取可用分组','(请用\x20sudo\x20/\x20管理员\x20PowerShell\x20重跑)','slow','--api-base','iTepj','sJmIb','hUhkA','apiBase','xFXEa','删除失败\x20','%userprofile%\x5c.codex\x5cconfig.toml','lQmzI','KhVuc','replace','env','--dry-run','将对每个测试模型发送真实计费的小请求(max_tokens=1,每模型约几分钱),用于连通性实测','已安全备份\x20','code','eEiBm','cyan','cli_tests','--help','LnYFJ','key:…','VcwQH','join','\x20\x20•\x20已有\x20API\x20Key\x20绑组:登录管理后台修改,或重新激活(npx\x20@2api-store/activate)','bNUww','dummy','match','%userprofile%\x5c.codex','push','copyFileSync','(本命令仅展示分组,不修改\x20API\x20Key\x20或配置文件)','status','green','\x20|\x20','NNOmo','未找到任何备份文件(reset\x20后这些文件将直接删除,无备份可恢复)','UdczC','kyEIh','从最新备份恢复','gzSqD','已删除\x20','查看可用分组(不改配置)','cZjPJ','~/.codex/config.toml','将处理以下文件:','help','当前端点:','~/.gemini','安全备份:','fQdBx','API\x20端点:','map','verdict','扫描目录:','(跳过删除此文件避免误伤)','padEnd','HOME','Ccezz','wZfIy','[试运行]\x20不真实恢复','3204LAYQTM','.bak.reset.','确认\x20reset\x20吗?','nyZML','hzsCe','oahPi','npx\x20@2api-store/activate\x20refresh-groups\x20[options]\x0a\x0a','选择时间点(回车=最新)','OoEDb','supported','dry-run','(文件已删除,未恢复)','HRQGr','jYgOc','ms/','request_id','%userprofile%\x5c.claude\x5csettings.json','Codex\x20CLI','QmTbV','\x20→\x20','KzYzu','BXqcF','red','trim','node','WqAeJ','提示:只有运行过\x20npx\x20@2api-store/activate\x20后才会产生备份文件','jNZTO','quQwj','\x20个\x202api.store\x20配置文件','从备份恢复配置','未选择应用','mtime','has','relative','2lEFxGz','split','forEach','~/.claude','string','VaNOz','ZpXZe','existsSync','rBqzY','isWindows','iiYCy','orTMk','\x20个文件','161442TnyqIP','HCaXp','dim','WTHJK','BDXeo','dirname','恢复官方默认(删\x202api.store\x20配置并从备份恢复)','mHweH','Claude\x20Code','/cli-tests.jsonl','ttfb_ms','dryRun','14kyasbv','values','nWifB','NxyJw','恢复失败:','⚠️\x20这是破坏性操作:将删除上述配置文件并尝试从备份恢复。','reset\x20报告','724232lDXZtA','name','%userprofile%\x5c.gemini','cinPb','90OkvthB','\x20←\x20','yellow','570UPUwIg','找到\x20','OnhVJ','boTEm','SNwMr','http_tests','vDGXJ','USERPROFILE','pDwfC','扫描备份文件','fHSAb','~/.codex/auth.json','恢复失败\x20','vqIeO','find','yWfai','QvFUI','ttfb/总延迟','需要\x20node\x20>=\x2018,当前\x20','请把\x20zip\x20压缩包发给客服排障(包内已脱敏,不含明文\x20key)','vzOaF','TDykD','确认操作','MIIxD','TFeNV','bTupP','getFullYear','无可恢复的备份','cvqfM','定位\x202api.store\x20写入的配置','EyQQJ','~/.codex','out','https://2api.store','20868SIAQRW','未发现\x202api.store\x20写入的配置文件(可能已\x20reset\x20或从未激活过)','keys','rLfAa','unlinkSync','readFileSync','getMinutes','eZrkm','EwDyc','lISPz','mqKAM','EPERM','neEeJ','安全备份失败\x20','icglD','选择要恢复的应用','诊断摘要','cli','\x20\x20•\x20使用兑换码:重新激活时选目标分组即可','ONqfb','EACCES','从备份恢复\x20','exit_code','duration_ms','repeat','未选择时间点','已恢复:','可能原因:服务端未配置分组\x20/\x20网络错误\x20/\x20端点错误','CDPnn','model:','FuCAe','nmjbu','\x20\x20-\x20删除\x20','toISOString','DDLid','kRYdu','basename','get','toString','7941156waTOQC','\x20\x20-\x20','\x20\x20exit\x20','FgCPB','\x20个备份文件','includes','skip-cli-tests','endsWith','诊断失败:','poRAZ','\x20个文件):','bRQbJ','nBHEA','YTmml','\x20个备份文件(reset\x20后将尝试恢复每个配置的最新备份)','XqnjQ','\x20\x20...(共\x20','删除\x202api.store\x20配置','【试运行模式\x20--dry-run】不会真实恢复文件','💡\x20如需切换分组:','已取消','getSeconds','ACTIVATE_API_BASE','skipCliTests','yiHeH','\x20文件:','startsWith','XUolt','安全备份位置(如需撤销\x20reset,手动恢复这些文件):','uRYbs','weKeP'];_0x34f5=function(){return _0x4c3609;};return _0x34f5();}export{z as SUB_HELP};
|
package/dist/lib/detect.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4a7d98=_0xfafb;(function(_0x150230,_0x2896fa){const _0x32a2ea=_0xfafb,_0x23ea8c=_0x150230();while(!![]){try{const _0xa911ca=parseInt(_0x32a2ea(0x18f))/0x1*(-parseInt(_0x32a2ea(0x174))/0x2)+parseInt(_0x32a2ea(0x181))/0x3+parseInt(_0x32a2ea(0x176))/0x4+parseInt(_0x32a2ea(0x16b))/0x5+parseInt(_0x32a2ea(0x182))/0x6+parseInt(_0x32a2ea(0x168))/0x7*(-parseInt(_0x32a2ea(0x193))/0x8)+-parseInt(_0x32a2ea(0x190))/0x9*(parseInt(_0x32a2ea(0x183))/0xa);if(_0xa911ca===_0x2896fa)break;else _0x23ea8c['push'](_0x23ea8c['shift']());}catch(_0x50f2c8){_0x23ea8c['push'](_0x23ea8c['shift']());}}}(_0x39cb,0xb3298));function _0xfafb(_0x120c59,_0x183ebf){_0x120c59=_0x120c59-0x166;const _0x39cb22=_0x39cb();let _0xfafbde=_0x39cb22[_0x120c59];return _0xfafbde;}import{spawnSync as _0x267027}from'node:child_process';export function detectOS(){const _0x1413b8=_0xfafb,_0x4827d2={'hgWxz':function(_0x2e21b9,_0x34ede4){return _0x2e21b9===_0x34ede4;},'hNnrn':function(_0x5d0610,_0x3af898){return _0x5d0610===_0x3af898;},'SHmaK':_0x1413b8(0x177),'VWoDe':'linux','UsoIF':_0x1413b8(0x178),'CrNMn':_0x1413b8(0x166)},_0xd7fd18=process[_0x1413b8(0x17b)],_0x29654c=_0x4827d2[_0x1413b8(0x169)](_0x1413b8(0x18e),_0xd7fd18);return{'platform':_0xd7fd18,'isWindows':_0x29654c,'isMac':_0x4827d2['hNnrn'](_0x4827d2[_0x1413b8(0x17e)],_0xd7fd18),'isLinux':_0x4827d2['hNnrn'](_0x4827d2[_0x1413b8(0x18d)],_0xd7fd18),'osType':_0x29654c?_0x4827d2[_0x1413b8(0x171)]:_0x4827d2[_0x1413b8(0x16a)]};}export function detectNode(){const _0x47931a=_0xfafb,_0x30cdb2={'hPxfg':function(_0x11d626,_0x1beaa4,_0x500399){return _0x11d626(_0x1beaa4,_0x500399);},'pjCTS':function(_0x513688,_0x427e5e){return _0x513688>=_0x427e5e;}},_0x540c66=process['versions']['node'],_0x1fe0a4=_0x30cdb2['hPxfg'](parseInt,_0x540c66[_0x47931a(0x189)]('.')[0x0],0xa);return{'version':_0x540c66,'major':_0x1fe0a4,'supported':_0x30cdb2['pjCTS'](_0x1fe0a4,0x12)};}const e=[_0x4a7d98(0x16f),_0x4a7d98(0x194),'gemini','grok',_0x4a7d98(0x187)];function n(_0x4dd04e,_0xb06c83){const _0x3d1924=_0x4a7d98,_0x4e24c6={'QgtTO':'where','RYYuL':'which','SSDxA':function(_0x499a40,_0x1f136d,_0x3a0cb4,_0xc9159d){return _0x499a40(_0x1f136d,_0x3a0cb4,_0xc9159d);},'xbrnx':_0x3d1924(0x170),'bYnhV':'ignore','fUDDb':function(_0x27985c,_0x163d36){return _0x27985c===_0x163d36;}},_0x11a871=_0xb06c83?_0x4e24c6[_0x3d1924(0x18a)]:_0x4e24c6[_0x3d1924(0x186)];try{const _0x4efc3a=_0x4e24c6[_0x3d1924(0x17d)](_0x267027,_0x11a871,[_0x4dd04e],{'encoding':_0x4e24c6['xbrnx'],'stdio':[_0x4e24c6[_0x3d1924(0x179)],'pipe',_0x4e24c6[_0x3d1924(0x179)]],'timeout':0xbb8});if(_0x4e24c6[_0x3d1924(0x18c)](0x0,_0x4efc3a[_0x3d1924(0x175)])&&_0x4efc3a[_0x3d1924(0x17f)])return _0x4efc3a[_0x3d1924(0x17f)][_0x3d1924(0x17a)]()[_0x3d1924(0x189)](/\r?\n/)[0x0]||null;}catch{}return null;}function o(_0x923a7,_0x4db2e4){const _0x532456=_0x4a7d98,_0x29cbe4={'DueXu':_0x532456(0x17c),'HgwlO':function(_0x32de84,_0x2e8551,_0x11f73c,_0x4826f5){return _0x32de84(_0x2e8551,_0x11f73c,_0x4826f5);},'oZEWl':'--version','jYukK':_0x532456(0x170),'sUpMk':_0x532456(0x16c),'EikRa':_0x532456(0x185),'TRhOq':function(_0x49f998,_0x11fb38){return _0x49f998===_0x11fb38;}};try{const _0x4c7574=_0x4db2e4?process[_0x532456(0x188)][_0x532456(0x16e)]||_0x29cbe4[_0x532456(0x18b)]:_0x923a7,_0x44ac28=_0x29cbe4[_0x532456(0x184)](_0x267027,_0x4c7574,_0x4db2e4?['/c',_0x923a7,'--version']:[_0x29cbe4[_0x532456(0x16d)]],{'encoding':_0x29cbe4[_0x532456(0x173)],'stdio':[_0x29cbe4['sUpMk'],_0x29cbe4[_0x532456(0x195)],_0x29cbe4[_0x532456(0x195)]],'timeout':0x1388});if(_0x29cbe4[_0x532456(0x180)](0x0,_0x44ac28[_0x532456(0x175)])&&_0x44ac28[_0x532456(0x17f)]){const _0x33e7be=_0x44ac28[_0x532456(0x17f)]['trim']()['split'](/\r?\n/)[0x0],_0x33fdbc=_0x33e7be['match'](/(\d+\.\d+(?:\.\d+)?(?:[-.\w]*)?)/);return _0x33fdbc?_0x33fdbc[0x1]:_0x33e7be['slice'](0x0,0x28);}}catch{}return null;}export function detectInstalled(_0x4a29d1){const _0x4c8914=_0x4a7d98,_0x51e251={'qiSlR':function(_0xed75de,_0x4d8e77,_0x3cb942){return _0xed75de(_0x4d8e77,_0x3cb942);}},_0x1dba76=detectOS(),_0x3be8ff=_0x51e251[_0x4c8914(0x172)](n,_0x4a29d1,_0x1dba76[_0x4c8914(0x192)]);if(!_0x3be8ff)return{'installed':!0x1,'path':null,'version':null};return{'installed':!0x0,'path':_0x3be8ff,'version':_0x51e251[_0x4c8914(0x172)](o,_0x4a29d1,_0x1dba76[_0x4c8914(0x192)])};}function _0x39cb(){const _0x37b03c=['fUDDb','VWoDe','win32','2NwMMim','9wzNUIN','kidhz','isWindows','7720iZvqoE','claude','EikRa','unix','QbTma','7189khMsiM','hgWxz','CrNMn','4105585bdimTR','ignore','oZEWl','COMSPEC','codex','utf8','UsoIF','qiSlR','jYukK','452668lDnNgB','status','3171684HlHDDj','darwin','windows','bYnhV','trim','platform','cmd.exe','SSDxA','SHmaK','stdout','TRhOq','1277409uSdyxJ','6698874CAZiyU','9787490xgZzyD','HgwlO','pipe','RYYuL','opencode','env','split','QgtTO','DueXu'];_0x39cb=function(){return _0x37b03c;};return _0x39cb();}export function detectInstalledCLIs(_0x7ac90e){const _0x1e1166=_0x4a7d98,_0xf89bc8={'QbTma':function(_0x309184,_0x218fe2,_0x5e5340){return _0x309184(_0x218fe2,_0x5e5340);},'kidhz':function(_0x1790a6,_0x3b0165,_0x4ce684){return _0x1790a6(_0x3b0165,_0x4ce684);}},_0x482dff={};for(const _0x5436d6 of e){const _0x4b56e1=_0xf89bc8[_0x1e1166(0x167)](n,_0x5436d6,_0x7ac90e);_0x4b56e1&&(_0x482dff[_0x5436d6]={'path':_0x4b56e1,'version':_0xf89bc8[_0x1e1166(0x191)](o,_0x5436d6,_0x7ac90e)});}return _0x482dff;}export function detectAll(){const _0x196b5b=_0x4a7d98,_0xd67041={'qFvhM':function(_0x482393){return _0x482393();}},_0x4eee3c=_0xd67041['qFvhM'](detectOS);return{'os':_0x4eee3c,'node':detectNode(),'installed':detectInstalledCLIs(_0x4eee3c[_0x196b5b(0x192)])};}
|
package/dist/lib/device.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x51b91b=_0x2e76;function _0x2e76(_0x413df1,_0x45bb8f){_0x413df1=_0x413df1-0x191;const _0x483cbf=_0x483c();let _0x2e76c8=_0x483cbf[_0x413df1];return _0x2e76c8;}(function(_0x41ece0,_0x233d43){const _0x49fc38=_0x2e76,_0x4564ab=_0x41ece0();while(!![]){try{const _0x558a31=-parseInt(_0x49fc38(0x1a1))/0x1*(parseInt(_0x49fc38(0x1ba))/0x2)+-parseInt(_0x49fc38(0x195))/0x3*(-parseInt(_0x49fc38(0x1ab))/0x4)+-parseInt(_0x49fc38(0x1b8))/0x5*(parseInt(_0x49fc38(0x1b1))/0x6)+parseInt(_0x49fc38(0x1bb))/0x7*(parseInt(_0x49fc38(0x1ac))/0x8)+-parseInt(_0x49fc38(0x1a2))/0x9*(parseInt(_0x49fc38(0x1bc))/0xa)+-parseInt(_0x49fc38(0x1af))/0xb+parseInt(_0x49fc38(0x19b))/0xc;if(_0x558a31===_0x233d43)break;else _0x4564ab['push'](_0x4564ab['shift']());}catch(_0x25119a){_0x4564ab['push'](_0x4564ab['shift']());}}}(_0x483c,0x26ddc));import _0x6cb115 from'node:crypto';import _0x4c3428 from'node:fs';import _0x2e3952 from'node:path';import _0x5d77a4 from'node:os';import{execSync as _0x12a63d}from'node:child_process';const c=_0x2e3952[_0x51b91b(0x1a5)](_0x5d77a4[_0x51b91b(0x19d)](),_0x51b91b(0x19c)),n=_0x2e3952['join'](c,_0x51b91b(0x1aa)),a=/^[0-9a-f]{64}$/;function s(){const _0x2961fc=_0x51b91b,_0x417d28={'QlwAG':_0x2961fc(0x199),'kubOU':function(_0x341423,_0x26aab6,_0x61771b){return _0x341423(_0x26aab6,_0x61771b);},'HHyny':_0x2961fc(0x1ae),'YkNXP':_0x2961fc(0x1a3),'HZAAu':_0x2961fc(0x1b9),'IgTsW':'utf8','gtknm':'hex','HzcyX':_0x2961fc(0x193)},_0x5e1455=(function(){const _0x36b3d5=_0x2961fc;try{switch(process[_0x36b3d5(0x1b4)]){case _0x417d28['QlwAG']:{const _0xf730f0=_0x417d28[_0x36b3d5(0x1a0)](_0x12a63d,_0x417d28[_0x36b3d5(0x1ad)],{'encoding':_0x36b3d5(0x191)}),_0x49c8e1=/IOPlatformUUID"\s*=\s*"([^"]+)"/['exec'](_0xf730f0);if(_0x49c8e1&&_0x49c8e1[0x1])return _0x49c8e1[0x1][_0x36b3d5(0x1b7)]();break;}case'linux':for(const _0x24074 of[_0x36b3d5(0x1a9),'/var/lib/dbus/machine-id'])try{const _0x55e528=_0x4c3428[_0x36b3d5(0x1a6)](_0x24074,_0x36b3d5(0x191))[_0x36b3d5(0x1b7)]();if(_0x55e528)return _0x55e528;}catch{}break;case _0x417d28[_0x36b3d5(0x1a7)]:{const _0x4bcaa5=_0x417d28[_0x36b3d5(0x1a0)](_0x12a63d,_0x417d28['HZAAu'],{'encoding':_0x417d28[_0x36b3d5(0x19f)]}),_0x5bae6d=/MachineGuid\s+REG_SZ\s+([0-9a-fA-F-]+)/['exec'](_0x4bcaa5);if(_0x5bae6d&&_0x5bae6d[0x1])return _0x5bae6d[0x1][_0x36b3d5(0x1b7)]()[_0x36b3d5(0x19e)]();break;}}}catch{}return _0x6cb115[_0x36b3d5(0x1b3)](0x20)[_0x36b3d5(0x192)](_0x417d28[_0x36b3d5(0x1b6)]);}());return _0x6cb115[_0x2961fc(0x1a8)](_0x417d28[_0x2961fc(0x1b0)],_0x2961fc(0x194))[_0x2961fc(0x1b5)](_0x5e1455)[_0x2961fc(0x198)](_0x2961fc(0x1b2));}function _0x483c(){const _0x59f74e=['homedir','toLowerCase','IgTsW','kubOU','3009inGESc','9CWqULM','win32','mkdirSync','join','readFileSync','YkNXP','createHmac','/etc/machine-id','device-id','73844elOwUu','8aobpZT','HHyny','ioreg\x20-rd1\x20-c\x20IOPlatformExpertDevice','2711390jirWRS','HzcyX','900066xMBjTh','hex','randomBytes','platform','update','gtknm','trim','5RNCeXo','reg\x20query\x20HKLM\x5cSOFTWARE\x5cMicrosoft\x5cCryptography\x20/v\x20MachineGuid','148hYDGfY','989499anGJGm','2846590WSGnru','utf8','toString','sha256','2api-store-activate','45SQfCDN','XNStu','writeFileSync','digest','darwin','dygfF','7737000RnpukO','.2api'];_0x483c=function(){return _0x59f74e;};return _0x483c();}export function getDeviceId(){const _0x22bd80=_0x51b91b,_0x963a9d={'dygfF':_0x22bd80(0x191),'XNStu':function(_0x2a8809){return _0x2a8809();}};try{const _0x145698=_0x4c3428[_0x22bd80(0x1a6)](n,_0x963a9d[_0x22bd80(0x19a)])[_0x22bd80(0x1b7)]();if(a['test'](_0x145698))return _0x145698;}catch{}const _0xe421be=_0x963a9d[_0x22bd80(0x196)](s);try{_0x4c3428[_0x22bd80(0x1a4)](c,{'recursive':!0x0,'mode':0x1c0}),_0x4c3428[_0x22bd80(0x197)](n,_0xe421be,{'encoding':_0x963a9d['dygfF'],'mode':0x180});}catch{}return _0xe421be;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x86a60=_0x4e82;(function(_0x177abd,_0x3f79fe){const _0x511f76=_0x4e82,_0x21de4f=_0x177abd();while(!![]){try{const _0x1c4759=parseInt(_0x511f76(0x1c3))/0x1*(-parseInt(_0x511f76(0xf6))/0x2)+parseInt(_0x511f76(0xac))/0x3*(-parseInt(_0x511f76(0x17f))/0x4)+-parseInt(_0x511f76(0x14c))/0x5*(parseInt(_0x511f76(0xbf))/0x6)+parseInt(_0x511f76(0xd9))/0x7+parseInt(_0x511f76(0x178))/0x8*(parseInt(_0x511f76(0xd3))/0x9)+parseInt(_0x511f76(0x172))/0xa*(parseInt(_0x511f76(0x198))/0xb)+parseInt(_0x511f76(0x1c7))/0xc;if(_0x1c4759===_0x3f79fe)break;else _0x21de4f['push'](_0x21de4f['shift']());}catch(_0x135893){_0x21de4f['push'](_0x21de4f['shift']());}}}(_0xc6e6,0xb5539));import _0x4189a9 from'node:fs';import _0x58f3ca from'node:path';import _0x5dfb7e from'node:https';import _0x413a06 from'node:http';import{spawn as _0x1b75c7,spawnSync as _0x20fca5}from'node:child_process';import{createRequire as _0x42006d}from'node:module';function _0x4e82(_0x46716d,_0x58c6bb){_0x46716d=_0x46716d-0xac;const _0xc6e6c3=_0xc6e6();let _0x4e82cf=_0xc6e6c3[_0x46716d];return _0x4e82cf;}import{zipSync as _0x2caba9,strToU8 as _0x420e62}from'fflate';import{detectAll as _0x5e9cee}from'./detect.mjs';import{getDeviceId as _0x45f65a}from'./device.mjs';import{expandPath as _0x1d040f}from'./render.mjs';import{askSecret as _0x1b6f0e,confirm as _0x283573}from'./prompt.mjs';import*as _0x586ac3 from'./ui.mjs';const _=_0x42006d(import.meta.url)(_0x86a60(0xe2))['version'],g='@2api-store/activate/'+_,h=[{'label':'~/.codex/auth.json','win':'%userprofile%\x5c.codex\x5cauth.json'},{'label':'~/.claude/settings.json','win':'%userprofile%\x5c.claude\x5csettings.json'},{'label':_0x86a60(0x183),'win':'%userprofile%\x5c.gemini\x5csettings.json'}],$=[_0x86a60(0x1a1),_0x86a60(0x171),_0x86a60(0x202),_0x86a60(0xad),_0x86a60(0x115)],y={'claude':['-p','hi'],'codex':['exec','hi'],'gemini':['-p','hi'],'grok':['-p','hi'],'opencode':[_0x86a60(0x1b9),'hi']},w=0x2800,A={'ok':_0x86a60(0x10c),'slow':'缓慢(2xx\x20但首字节延迟超过\x2010s)','fail':_0x86a60(0x10b)},k=/sk-([a-zA-Z0-9]{10,})/,x=/(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["']([a-zA-Z0-9._-]{10,})["']/,I=/export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?)([a-zA-Z0-9._-]{10,})/,T=/(?:base_url|api_base_url|api_base|apiBase|ANTHROPIC_BASE_URL|BASE_URL)["':\s=]+["']?(https?:\/\/[^\s"'`]+)/i,b=/https?:\/\/[^\s"'`}]+/;function v(){const _0x4d7011=_0x86a60,_0x56c49a={'KMcHt':'win32'};return _0x56c49a[_0x4d7011(0x12f)]===process[_0x4d7011(0xf2)];}function P(_0x3119f6){const _0x2d133d=_0x86a60,_0x29e75b={'pAnYX':function(_0x2c429b,_0x33b32c,_0x1e2819){return _0x2c429b(_0x33b32c,_0x1e2819);},'jgtvx':function(_0x3b0f88){return _0x3b0f88();},'NoTmQ':function(_0x5f169d){return _0x5f169d();}};return _0x29e75b[_0x2d133d(0x1a3)](_0x1d040f,_0x29e75b['jgtvx'](v)?_0x3119f6['win']:_0x3119f6[_0x2d133d(0x1d8)],{'isWindows':_0x29e75b['NoTmQ'](v)});}function S(_0x513c1d){const _0x2ca4cf=_0x86a60,_0x530fa4={'bYIMr':function(_0x58e602,_0x44a429){return _0x58e602<=_0x44a429;},'aqgzh':_0x2ca4cf(0x132)};return _0x513c1d?/^sk-[A-Za-z0-9_-]{20,}$/['test'](_0x513c1d)?_0x2ca4cf(0x16e)+_0x513c1d[_0x2ca4cf(0x139)](-0x6):_0x530fa4[_0x2ca4cf(0xff)](_0x513c1d[_0x2ca4cf(0xf0)],0x8)?_0x530fa4[_0x2ca4cf(0x20a)]:_0x2ca4cf(0x1bb)+_0x513c1d[_0x2ca4cf(0x139)](-0x6):null;}function j(_0x571d42){const _0x382c9d=_0x86a60,_0x945f69={'hfDyV':function(_0x400460,_0x333b7f){return _0x400460==_0x333b7f;},'pSoxu':_0x382c9d(0x1f5)};return _0x945f69[_0x382c9d(0x195)](_0x945f69['pSoxu'],typeof _0x571d42)?_0x571d42['replace'](/:\/\/[^@/\s]+@/,_0x382c9d(0x142)):_0x571d42;}export function redact(_0x3f3346){const _0x27559e=_0x86a60,_0x5e0222={'fpxZw':function(_0x253cc5,_0x79b70){return _0x253cc5!=_0x79b70;},'dnUrj':_0x27559e(0x1f5),'VjUNS':function(_0x3922ac,_0x13a511){return _0x3922ac===_0x13a511;}};if(_0x5e0222[_0x27559e(0x1d9)](_0x5e0222[_0x27559e(0x165)],typeof _0x3f3346)||_0x5e0222[_0x27559e(0x13a)]('',_0x3f3346))return _0x3f3346;let _0xc9feda=_0x3f3346;return _0xc9feda=_0xc9feda['replace'](/sk-[A-Za-z0-9_-]{20,}/g,_0x2c8f37=>_0x27559e(0x16e)+_0x2c8f37['slice'](-0x6)),_0xc9feda=_0xc9feda['replace'](/[Bb]earer\s+\S+/g,_0x27559e(0xb0)),_0xc9feda=_0xc9feda[_0x27559e(0x1c9)](/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,_0x3d5d79=>{const _0x28c989=_0x27559e,_0x5bb07f=_0x3d5d79[_0x28c989(0x146)]('@');return _0x3d5d79[0x0]+_0x28c989(0x132)+_0x3d5d79[_0x28c989(0x139)](_0x5bb07f);}),_0xc9feda;}function O(_0x3f66c8){const _0x30386f=_0x86a60,_0x4e1095={'RPGjV':function(_0x3d6afe,_0x58f108){return _0x3d6afe(_0x58f108);}};let _0x27cdae=_0x4e1095[_0x30386f(0x1cd)](redact,_0x3f66c8);return _0x27cdae=_0x27cdae[_0x30386f(0x1c9)](/((?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)["':\s]+["'])([a-zA-Z0-9._-]{10,})(["'])/gi,(_0x21feaf,_0x412555,_0x1af686,_0x327095)=>''+_0x412555+S(_0x1af686)+_0x327095),_0x27cdae=_0x27cdae[_0x30386f(0x1c9)](/(export\s+(?:API_KEY|AUTH_TOKEN|OPENAI_API_KEY|ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN)=(["']?))([a-zA-Z0-9._-]{10,})/gi,(_0x8bea88,_0x5070c7)=>_0x5070c7+_0x30386f(0x132)),_0x27cdae;}function C(_0x53adb7){const _0x256e1d=_0x86a60,_0x5271d3=_0x53adb7['match'](k);if(_0x5271d3)return _0x256e1d(0xe4)+_0x5271d3[0x1];const _0x4e18dc=_0x53adb7[_0x256e1d(0xb4)](x);if(_0x4e18dc)return _0x4e18dc[0x1];const _0x2f051a=_0x53adb7[_0x256e1d(0xb4)](I);return _0x2f051a?_0x2f051a[0x2]:null;}function E(_0x48472f,_0x5897f5){const _0x3c0516=_0x86a60,_0x495410=_0x48472f[_0x3c0516(0xb4)](T);if(_0x495410)return _0x495410[0x1][_0x3c0516(0x1c9)](/\/+$/,'');const _0x497652=_0x48472f[_0x3c0516(0xb4)](b);return _0x497652?_0x497652[0x1][_0x3c0516(0x1c9)](/\/+$/,''):_0x5897f5;}function N(_0x34cfab,_0x46cb9b,_0x5c7ab4,_0x38ea60){const _0x2fb8a1=_0x86a60,_0x2e90ba={'WNBpt':function(_0x3c707d,_0x14dc50){return _0x3c707d(_0x14dc50);},'EgNse':function(_0x390e18,_0x5503c8){return _0x390e18>=_0x5503c8;},'SEiAL':function(_0x28c2a2,_0x2d7fd5){return _0x28c2a2<=_0x2d7fd5;}},_0x48f300=_0x2e90ba['WNBpt'](Number,_0x34cfab);return Number[_0x2fb8a1(0x158)](_0x48f300)&&_0x2e90ba[_0x2fb8a1(0x1be)](_0x48f300,_0x5c7ab4)&&_0x2e90ba['SEiAL'](_0x48f300,_0x38ea60)?Math[_0x2fb8a1(0x1e2)](_0x48f300):_0x46cb9b;}function K(_0x6c20fe){const _0x3f76b8=_0x86a60,_0x367c9d={'WcwdZ':_0x3f76b8(0x1d0),'pGjdE':_0x3f76b8(0xf4),'QmKfe':function(_0x4285fc,_0x506e2f){return _0x4285fc===_0x506e2f;},'sVivM':function(_0x4123a2,_0x50e0e4){return _0x4123a2==_0x50e0e4;},'Lowzl':_0x3f76b8(0xcc),'bxdjH':function(_0xa8af43,_0x44b3ec,_0x20aa73,_0x63c743,_0x230592){return _0xa8af43(_0x44b3ec,_0x20aa73,_0x63c743,_0x230592);},'EbTwE':function(_0xf21b8,_0x5976b1){return _0xf21b8>=_0x5976b1;},'bEEVC':function(_0x4e596d,_0x3e0acd){return _0x4e596d(_0x3e0acd);},'PfoXS':function(_0x4304ca){return _0x4304ca();},'ceVBG':_0x3f76b8(0x1eb),'ptLTD':_0x3f76b8(0xd0),'HlmPu':_0x3f76b8(0x1b7),'LpiZo':_0x3f76b8(0xaf),'tIFFN':_0x3f76b8(0x15a),'CBRvQ':'gemini-2.5-pro','abhlI':_0x3f76b8(0x110)},_0x2bd3cb={'profile_version':_0x367c9d[_0x3f76b8(0x180)],'models':[_0x367c9d[_0x3f76b8(0x145)],_0x367c9d[_0x3f76b8(0xcd)],_0x367c9d[_0x3f76b8(0xc5)]],'timeout_ms':0x7530,'max_tokens':0x1,'concurrency':0x2,'hints':{...A},'source':_0x367c9d[_0x3f76b8(0x106)]};return new Promise(_0x2e1043=>{const _0x18d368=_0x3f76b8,_0x3b06f5={'qsoBI':function(_0x549e26,_0x6cbe33){const _0x128b2a=_0x4e82;return _0x367c9d[_0x128b2a(0x167)](_0x549e26,_0x6cbe33);},'PjVVe':function(_0x237314,_0x3cb48d){return _0x367c9d['sVivM'](_0x237314,_0x3cb48d);},'XQpVe':_0x367c9d[_0x18d368(0x1df)],'QAHpm':function(_0x168e21,_0x558d53,_0x181024,_0x2b0da0,_0x24a20f){return _0x367c9d['bxdjH'](_0x168e21,_0x558d53,_0x181024,_0x2b0da0,_0x24a20f);},'wLQCh':function(_0x5da606,_0x12a14c){return _0x5da606<_0x12a14c;},'YGPVn':function(_0x43cc0e,_0x243255){const _0x506587=_0x18d368;return _0x367c9d[_0x506587(0x1ae)](_0x43cc0e,_0x243255);},'WJTxi':function(_0x4b3fae,_0x55223b){const _0x4651ef=_0x18d368;return _0x367c9d[_0x4651ef(0x141)](_0x4b3fae,_0x55223b);},'pAjDQ':_0x18d368(0x207),'qeWco':function(_0x8fafa8,_0x4f7f68){return _0x367c9d['bEEVC'](_0x8fafa8,_0x4f7f68);}};let _0x8eaeaf;try{_0x8eaeaf=new URL(_0x18d368(0x1c1),_0x6c20fe);}catch{return void _0x2e1043(_0x2bd3cb);}const _0x4c3898=(_0x18d368(0x177)===_0x8eaeaf[_0x18d368(0xe6)]?_0x5dfb7e:_0x413a06)[_0x18d368(0x1fe)](_0x8eaeaf,{'method':_0x18d368(0x1ff),'headers':{'User-Agent':g,'X-Device-Id':_0x367c9d['PfoXS'](_0x45f65a),'Accept':_0x367c9d[_0x18d368(0x109)]},'timeout':0x2710},_0x34110f=>{const _0x1f3a15=_0x18d368,_0x140d68=[];_0x34110f['on'](_0x367c9d['WcwdZ'],_0x573a14=>_0x140d68['push'](_0x573a14)),_0x34110f['on'](_0x367c9d[_0x1f3a15(0x169)],()=>{const _0x389a25=_0x1f3a15,_0x3ae487={'hSHFn':function(_0x5b9ed8,_0x301660){const _0x1b58ea=_0x4e82;return _0x3b06f5[_0x1b58ea(0xc0)](_0x5b9ed8,_0x301660);},'ehsBF':function(_0x398e16,_0x42d973){return _0x3b06f5['PjVVe'](_0x398e16,_0x42d973);},'bfcoP':_0x3b06f5['XQpVe'],'RgCNK':function(_0x1969a1,_0xbd9e13,_0x57d74e,_0x563f28,_0x66f93b){const _0x24ea13=_0x4e82;return _0x3b06f5[_0x24ea13(0x194)](_0x1969a1,_0xbd9e13,_0x57d74e,_0x563f28,_0x66f93b);},'LNcMI':function(_0x5714f2,_0x370858,_0x2903f3,_0x289bd5,_0x5ca348){return _0x5714f2(_0x370858,_0x2903f3,_0x289bd5,_0x5ca348);}};if(_0x3b06f5[_0x389a25(0x1d7)](_0x34110f[_0x389a25(0x15f)],0xc8)||_0x3b06f5[_0x389a25(0x108)](_0x34110f[_0x389a25(0x15f)],0x12c))_0x3b06f5[_0x389a25(0xd8)](_0x2e1043,_0x2bd3cb);else try{const _0x4de18e=Buffer['concat'](_0x140d68)['toString'](_0x3b06f5['pAjDQ']);_0x3b06f5[_0x389a25(0x1c0)](_0x2e1043,function(_0x4a4499,_0x32a559){const _0x547c5a=_0x389a25,_0x300a6a=Array['isArray'](_0x4a4499[_0x547c5a(0xb9)])?_0x4a4499[_0x547c5a(0xb9)][_0x547c5a(0x1b8)](_0x3bef6c=>_0x547c5a(0x1f5)==typeof _0x3bef6c&&_0x3bef6c[_0x547c5a(0x1cc)]()):[];if(_0x3ae487[_0x547c5a(0x148)](0x0,_0x300a6a['length']))return _0x32a559;const _0x54889f=_0x4a4499['hints']&&_0x3ae487[_0x547c5a(0x1ce)](_0x3ae487[_0x547c5a(0x107)],typeof _0x4a4499['hints'])&&!Array[_0x547c5a(0xb5)](_0x4a4499[_0x547c5a(0x120)])?{..._0x32a559['hints'],..._0x4a4499[_0x547c5a(0x120)]}:{..._0x32a559[_0x547c5a(0x120)]};return{'profile_version':_0x4a4499['profile_version']??null,'models':_0x300a6a,'timeout_ms':_0x3ae487[_0x547c5a(0x14e)](N,_0x4a4499[_0x547c5a(0x143)],_0x32a559[_0x547c5a(0x143)],0x3e8,0x1d4c0),'max_tokens':_0x3ae487['RgCNK'](N,_0x4a4499['max_tokens'],_0x32a559[_0x547c5a(0xca)],0x1,0x40),'concurrency':_0x3ae487[_0x547c5a(0xe3)](N,_0x4a4499[_0x547c5a(0x134)],_0x32a559['concurrency'],0x1,0x8),'hints':_0x54889f,'source':_0x547c5a(0x1af)};}(_0x4de18e?JSON['parse'](_0x4de18e):{},_0x2bd3cb));}catch{_0x3b06f5[_0x389a25(0x1c0)](_0x2e1043,_0x2bd3cb);}});});_0x4c3898['on'](_0x18d368(0x1e3),()=>_0x4c3898[_0x18d368(0x179)](new Error(_0x18d368(0x1e3)))),_0x4c3898['on'](_0x367c9d['ptLTD'],()=>_0x2e1043(_0x2bd3cb)),_0x4c3898[_0x18d368(0xf4)]();});}function L({baseUrl:_0x44a5ee,apiKey:_0x1e7051,model:_0x1a4b30,maxTokens:_0x5d1ce9,timeoutMs:_0x2de7b2,deviceId:_0xda1eda}){const _0x14adda=_0x86a60,_0x329fbc={'IfvRe':function(_0x3d03c0,_0x2d3147){return _0x3d03c0(_0x2d3147);},'GFgqd':_0x14adda(0x16d),'CMRnw':'data','davUN':'end','Bjauw':function(_0x31c0e9,_0x39e017){return _0x31c0e9-_0x39e017;},'mxJGq':'/v1/chat/completions','ZQUTd':function(_0x3636bc,_0x28ec13){return _0x3636bc-_0x28ec13;},'uIYFh':function(_0x3b2be8,_0x31ce3e){return _0x3b2be8===_0x31ce3e;},'iJMQx':_0x14adda(0x201),'UbUwR':_0x14adda(0x17c),'GEThS':_0x14adda(0x1eb),'nBCUU':_0x14adda(0x1e3)};return new Promise(_0x4cc4cc=>{const _0x1f44d2=_0x14adda,_0x35b744={'oqsxM':function(_0x2618a1,_0x288368){return _0x329fbc['IfvRe'](_0x2618a1,_0x288368);},'PGlxF':_0x329fbc[_0x1f44d2(0x129)],'HorKu':_0x329fbc[_0x1f44d2(0x209)],'tAXbf':_0x329fbc['davUN'],'khsRN':function(_0x4e9be3,_0x53e44c){const _0x162a3f=_0x1f44d2;return _0x329fbc[_0x162a3f(0xb6)](_0x4e9be3,_0x53e44c);}},_0x597a9b=Date['now']();let _0xa4b96e,_0x24dcad=null;try{_0xa4b96e=new URL(_0x329fbc[_0x1f44d2(0x1b4)],_0x44a5ee);}catch{return void _0x4cc4cc({'request_id':null,'status':null,'ttfb_ms':null,'total_ms':_0x329fbc[_0x1f44d2(0x1a0)](Date[_0x1f44d2(0xeb)](),_0x597a9b),'error':_0x1f44d2(0x14a)+_0x44a5ee,'response_preview':''});}const _0xb05202=_0x329fbc['uIYFh'](_0x1f44d2(0x177),_0xa4b96e[_0x1f44d2(0xe6)])?_0x5dfb7e:_0x413a06,_0x486b8f=JSON['stringify']({'model':_0x1a4b30,'messages':[{'role':_0x329fbc[_0x1f44d2(0x1e5)],'content':'hi'}],'max_tokens':_0x5d1ce9,'stream':!0x1}),_0x94b933=_0xb05202[_0x1f44d2(0x1fe)](_0xa4b96e,{'method':_0x329fbc[_0x1f44d2(0xed)],'headers':{'Authorization':_0x1f44d2(0x1d5)+_0x1e7051,'User-Agent':g,'X-Device-Id':_0xda1eda,'Content-Type':_0x329fbc[_0x1f44d2(0x104)],'Content-Length':Buffer[_0x1f44d2(0x13d)](_0x486b8f)},'timeout':_0x2de7b2},_0x16e328=>{const _0x111d40=_0x1f44d2,_0x42554e={'EPfKq':function(_0x3c81d9,_0x47c8e9){return _0x35b744['oqsxM'](_0x3c81d9,_0x47c8e9);},'EfPSv':_0x35b744[_0x111d40(0xef)],'tNjyh':function(_0x126419,_0x56bcc7){return _0x126419-_0x56bcc7;}};_0x24dcad=Date[_0x111d40(0xeb)]()-_0x597a9b;const _0x4e8348=[];let _0x5e4c66=0x0;_0x16e328['on'](_0x35b744[_0x111d40(0x191)],_0x5e0dbc=>{const _0x3da0a8=_0x111d40;_0x5e4c66+=_0x5e0dbc[_0x3da0a8(0xf0)],_0x5e4c66<=0x40000&&_0x4e8348['push'](_0x5e0dbc);}),_0x16e328['on'](_0x35b744[_0x111d40(0x156)],()=>{const _0x5e8aad=_0x111d40,_0x194747=Buffer[_0x5e8aad(0x17b)](_0x4e8348)[_0x5e8aad(0x1a8)](_0x5e8aad(0x207));_0x42554e[_0x5e8aad(0x1f8)](_0x4cc4cc,{'request_id':_0x16e328['headers'][_0x42554e['EfPSv']]||null,'status':_0x16e328[_0x5e8aad(0x15f)],'ttfb_ms':_0x24dcad,'total_ms':_0x42554e[_0x5e8aad(0x14f)](Date[_0x5e8aad(0xeb)](),_0x597a9b),'error':null,'response_preview':_0x194747[_0x5e8aad(0x139)](0x0,0x1f4)});});});_0x94b933['on'](_0x329fbc['nBCUU'],()=>{const _0x4936c2=_0x1f44d2;_0x94b933['destroy'](new Error(_0x4936c2(0x1ee)+_0x2de7b2/0x3e8+'s)—\x20'+_0xa4b96e['href']));}),_0x94b933['on']('error',_0x47da59=>{const _0x12f3d3=_0x1f44d2;_0x35b744['oqsxM'](_0x4cc4cc,{'request_id':null,'status':null,'ttfb_ms':_0x24dcad,'total_ms':_0x35b744[_0x12f3d3(0x1f7)](Date['now'](),_0x597a9b),'error':_0x47da59[_0x12f3d3(0xde)],'response_preview':''});}),_0x94b933['end'](_0x486b8f);});}function z(_0x5c654f){const _0xb3f90a=_0x86a60,_0x32eb2a={'tNPWJ':function(_0x567b5a,_0x4ce9a3){return _0x567b5a>=_0x4ce9a3;},'vxbKj':function(_0x4612e7,_0x3145d9){return _0x4612e7<_0x3145d9;},'crxeh':function(_0x4b8504,_0x23e090){return _0x4b8504!=_0x23e090;},'QAOsG':function(_0x47b7bd,_0x17b19e){return _0x47b7bd>_0x17b19e;},'tFbbb':'fail'};return _0x32eb2a[_0xb3f90a(0x1ad)](_0x5c654f[_0xb3f90a(0x18f)],0xc8)&&_0x32eb2a[_0xb3f90a(0x168)](_0x5c654f[_0xb3f90a(0x18f)],0x12c)?_0x32eb2a[_0xb3f90a(0x117)](null,_0x5c654f['ttfb_ms'])&&_0x32eb2a[_0xb3f90a(0x1b3)](_0x5c654f[_0xb3f90a(0x1b1)],0x2710)?'slow':'ok':_0x32eb2a[_0xb3f90a(0x10a)];}function R(_0x282d97,_0x5a73a4){const _0x44fa87=_0x86a60,_0x152807={'picqe':function(_0x743676,_0x602c33){return _0x743676-_0x602c33;},'lfQKA':function(_0x55454e,_0x4e1f9b){return _0x55454e(_0x4e1f9b);},'pYmZu':function(_0x1a67aa){return _0x1a67aa();},'DjxqB':function(_0x2e5c5e,_0x17d163,_0x4553d9,_0x428adf){return _0x2e5c5e(_0x17d163,_0x4553d9,_0x428adf);},'ZRKtv':_0x44fa87(0x12b),'UrEzj':_0x44fa87(0xf1),'hTeJc':function(_0x2571ae,_0x2b4bc5){return _0x2571ae<_0x2b4bc5;},'ntIUr':'utf8','fdzvq':_0x44fa87(0x1f1),'hgFIP':function(_0x79d246,_0xaf74a0,_0x5d57b1,_0x24de5c){return _0x79d246(_0xaf74a0,_0x5d57b1,_0x24de5c);},'jEGzZ':_0x44fa87(0x105),'DRERq':function(_0x14aeb6,_0x2690ac,_0x403d39){return _0x14aeb6(_0x2690ac,_0x403d39);},'NnBZG':_0x44fa87(0x1d0),'qbdjT':_0x44fa87(0xd0)};return new Promise(_0x491b54=>{const _0x5df4c0=_0x44fa87,_0x5ef074=[_0x282d97,..._0x5a73a4[_0x5df4c0(0x19c)](_0x104a7d=>/\s/[_0x5df4c0(0xee)](_0x104a7d)?JSON[_0x5df4c0(0x20d)](_0x104a7d):_0x104a7d)][_0x5df4c0(0x181)]('\x20'),_0x315aed=Date[_0x5df4c0(0xeb)]();let _0x48dad2='',_0x3c5d05='',_0x3c0301=!0x1,_0x27aa89=!0x1;const _0x1f00dc=_0x1b6ecf=>{const _0x3c0410=_0x5df4c0;_0x27aa89||(_0x27aa89=!0x0,clearTimeout(_0x314d53),_0x491b54({'cli':_0x282d97,'cmd':_0x5ef074,'exit_code':_0x1b6ecf,'duration_ms':_0x152807[_0x3c0410(0x11c)](Date[_0x3c0410(0xeb)](),_0x315aed),'timed_out':_0x3c0301,'stdout':_0x152807[_0x3c0410(0x182)](redact,_0x48dad2[_0x3c0410(0x139)](0x0,w)),'stderr':_0x152807[_0x3c0410(0x182)](redact,_0x3c5d05[_0x3c0410(0x139)](0x0,w))}));};let _0x8324ba;try{const _0x4c9c99=_0x152807[_0x5df4c0(0x1ac)](v)?process['env']['COMSPEC']||_0x152807['fdzvq']:_0x282d97,_0x2b0921=_0x152807['pYmZu'](v)?['/c',_0x282d97,..._0x5a73a4]:_0x5a73a4;_0x8324ba=_0x152807['hgFIP'](_0x1b75c7,_0x4c9c99,_0x2b0921,{'stdio':[_0x152807[_0x5df4c0(0x199)],_0x152807[_0x5df4c0(0xba)],_0x5df4c0(0x105)],'env':process[_0x5df4c0(0x176)]});}catch(_0x473633){return _0x3c5d05=_0x5df4c0(0x1d3)+_0x473633['message'],void _0x1f00dc(null);}const _0x314d53=_0x152807[_0x5df4c0(0x1f4)](setTimeout,()=>{const _0x19c16b=_0x5df4c0,_0x2761d2={'lapRH':function(_0x27ec51){return _0x152807['pYmZu'](_0x27ec51);},'yIDTG':function(_0x248cb3,_0x473bb9,_0x591dd5,_0x4dce77){const _0x4b78ba=_0x4e82;return _0x152807[_0x4b78ba(0x16a)](_0x248cb3,_0x473bb9,_0x591dd5,_0x4dce77);},'DnNzj':_0x152807[_0x19c16b(0x199)],'bwWQh':_0x152807[_0x19c16b(0xdb)]};_0x3c0301=!0x0,function(_0x5a151b){const _0x464a83=_0x19c16b;if(_0x5a151b&&!_0x5a151b[_0x464a83(0x1f2)]){if(_0x2761d2[_0x464a83(0x17e)](v)&&_0x5a151b['pid'])try{return void _0x2761d2[_0x464a83(0x12a)](_0x20fca5,_0x464a83(0x1d1),[_0x464a83(0x188),String(_0x5a151b[_0x464a83(0x150)]),'/T','/F'],{'stdio':_0x2761d2[_0x464a83(0x1de)]});}catch{}try{_0x5a151b[_0x464a83(0x140)](_0x2761d2[_0x464a83(0xc7)]);}catch{}}}(_0x8324ba);},0x7530);_0x8324ba['stdout']&&_0x8324ba[_0x5df4c0(0xbb)]['on'](_0x5df4c0(0x1d0),_0x33d39b=>{const _0x4a8f1a=_0x5df4c0;_0x48dad2[_0x4a8f1a(0xf0)]<0x5000&&(_0x48dad2+=_0x33d39b[_0x4a8f1a(0x1a8)](_0x4a8f1a(0x207)));}),_0x8324ba[_0x5df4c0(0x19b)]&&_0x8324ba[_0x5df4c0(0x19b)]['on'](_0x152807[_0x5df4c0(0x1b0)],_0x57c46f=>{const _0x372252=_0x5df4c0;_0x152807['hTeJc'](_0x3c5d05['length'],0x5000)&&(_0x3c5d05+=_0x57c46f[_0x372252(0x1a8)](_0x152807['ntIUr']));}),_0x8324ba['on'](_0x152807['qbdjT'],_0x421b68=>{const _0x1de06f=_0x5df4c0;_0x3c5d05+=_0x1de06f(0xb3)+_0x421b68[_0x1de06f(0xde)],_0x152807[_0x1de06f(0x182)](_0x1f00dc,null);}),_0x8324ba['on'](_0x5df4c0(0x1cf),_0x59b4d3=>_0x1f00dc(_0x59b4d3));});}const H=[{'label':_0x86a60(0x1b6),'win':'%userprofile%\x5c.codex\x5cauth.json'},{'label':_0x86a60(0xfa),'win':_0x86a60(0x15e)},{'label':_0x86a60(0x1a4),'win':'%userprofile%\x5c.claude\x5csettings.json'}];function U(_0x44c9bc){const _0x4587b2=_0x86a60,_0x9262ac={'WcoJF':'utf8'};try{return _0x4189a9[_0x4587b2(0x1e9)](_0x44c9bc,_0x9262ac['WcoJF']);}catch{return null;}}function _0xc6e6(){const _0x5551b8=['GEThS','pipe','abhlI','bfcoP','YGPVn','ceVBG','tFbbb','失败(非\x202xx\x20或请求出错)','正常(HTTP\x202xx)','FiaFj','体检:未发现配置异常','getHours','fallback','\x20退出码\x20','duration_ms','诊断包写入失败(','outDir','opencode','rScGj','crxeh','toISOString','version','all','SmRhb','picqe','CLI\x20实测(','tokenshop-diagnose-','tool_version','hints','~/.codex/config.toml\x20缺少\x20model_context_window:Codex\x20会按内置\x20272k\x20窗口频繁压缩会话;重跑\x20activate\x20可写入真实模型窗口修复','readdirSync','\x20项。请把\x20zip\x20发给客服排障。','\x20指向\x20','tzJen','CLI\x20运行日志尾部收集:未发现候选日志目录,跳过','statSync','rel','GFgqd','yIDTG','ignore','Yuibx','model','\x20→\x20','KMcHt','cwd','toLowerCase','***','info','concurrency','http_tests','\x0a工具版本:','XdYsx','codex_context_window_missing','slice','VjUNS','OS\x20','rLfyh','byteLength','third_party_switcher','isDirectory','kill','bEEVC','://***@','timeout_ms','KBrQr','LpiZo','indexOf','xZDVY','hSHFn','content','无效的\x20baseUrl:','nIEYh','935120BYATTR','HTTP_PROXY','RgCNK','tNjyh','pid','NO_PROXY','\x20的\x20','yes','baseUrl','CLI\x20运行日志尾部收集:','tAXbf','getMinutes','isFinite','YqgDe','claude-sonnet-4-5','~/.codex/log','RIZOS','pXHYx','%userprofile%\x5c.codex\x5cconfig.toml','statusCode','split','GAvyV','OoaZk','credential','mtimeMs','dnUrj','后端下发矩阵:','QmKfe','vxbKj','pGjdE','DjxqB','%userprofile%\x5c.claude\x5clogs','\x0a凭据来源:','x-request-id','sk-…','izJRa','manual-input','codex','20JfzVmY','installed_clis','zip_path','\x0aAPI\x20地址:','env','https:','104cvOHyz','destroy','name','concat','POST','%userprofile%\x5c.gemini\x5ctmp','lapRH','4STHMjS','HlmPu','join','lfQKA','~/.gemini/settings.json','ALL_PROXY','iGutu','nTtIo','内置兜底(后端诊断配置不可用)','/pid','用户取消诊断','\x20/\x20ttfb\x20','timed_out','step','closeSync','未发现已安装的可测\x20CLI,跳过\x20CLI\x20实测','status','/cli-tests.jsonl','HorKu','ms\x20/\x20','source','QAHpm','hfDyV','from','\x20项(通过\x20','311399ZdqJjx','ZRKtv','%userprofile%\x5c.codex\x5clog','stderr','map','YXvaJ','mtime','key_redacted','ZQUTd','claude','IzclQ','pAnYX','~/.claude/settings.json','keys','后端下发','getMonth','toString','%userprofile%\x5c.opencode\x5clog','config_source','AFuMI','pYmZu','tNPWJ','EbTwE','server','NnBZG','ttfb_ms','host','QAOsG','mxJGq','size','~/.codex/auth.json','builtin','filter','run','\x20/\x20已装\x20CLI\x20','***…','/env.json',',并运行已装\x20CLI\x20实测','EgNse','xwwuC','qeWco','/api/v1/cli/diagnose-config','(key\x20已脱敏:','1PqHzpK','环境快照','OGPXF','KcjCL','25405776UjLIQz','未提供\x20API\x20Key,诊断中止','replace','*/logs/*','max','trim','RPGjV','ehsBF','close','data','taskkill','response_preview','spawn\x20失败:','运行\x20','Bearer\x20','fail','wLQCh','label','fpxZw','key','warn','检测到第三方切换器痕迹(','getSeconds','DnNzj','Lowzl','.zip','WKRzB','floor','timeout','writeFileSync','iJMQx','generated_at','rMylO','UqBTt','readFileSync','skipCliTests','application/json','\x20个模型各发起\x201\x20个真实小请求(max_tokens=','\x20个,各\x2030s\x20超时)','请求超时(','\x20/\x20node\x20','\x0a\x0a一、包内文件\x0a-\x20summary.json\x20\x20\x20\x20\x20环境\x20+\x20测试结果汇总(请先看这个)\x0a-\x20env.json\x20\x20\x20\x20\x20\x20\x20\x20\x20操作系统\x20/\x20Node\x20版本\x20/\x20已装\x20CLI\x20/\x20配置文件元信息\x20/\x20代理环境变量\x0a-\x20http-tests.jsonl\x20每个模型一行:模型\x20/\x20request_id\x20/\x20状态码\x20/\x20首字节延迟(ttfb_ms)\x20/\x20总延迟(total_ms)\x20/\x20错误\x20/\x20响应片段\x0a-\x20cli-tests.jsonl\x20\x20每个已装\x20CLI\x20一行:命令\x20/\x20退出码\x20/\x20耗时\x20/\x20是否超时\x20/\x20stdout+stderr(截断\x2010KB)\x0a-\x20configs/\x20\x20\x20\x20\x20\x20\x20\x20\x20本地配置文件脱敏副本(key\x20已掩码,不存在的文件跳过)\x0a-\x20logs/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20CLI\x20运行日志尾部(探测式收集:目录存在才收,每\x20CLI\x20最多\x203\x20个最新文件、每文件尾部\x2064KB,已脱敏)\x0a\x0a二、request_id\x20的用法\x0ahttp-tests.jsonl\x20每条记录的\x20request_id\x20对应服务端网关该次请求的标识(响应头\x20X-Request-Id)。\x0a客服凭\x20request_id\x20可在生产后台\x20usage_logs\x20/\x20网关日志中精确对账:该请求走了哪个账号、\x0a哪个模型、计费多少、错误详情。本次共测\x20','cmd.exe','killed','\x20模型\x20/\x20超时\x20','DRERq','string','\x20/\x20缓慢\x20','khsRN','EPfKq','total_ms','swWse','HTTPS_PROXY','已按参数跳过\x20CLI\x20实测','sDBjZ','request','GET','dhnfE','user','gemini','~/.grok/log','诊断包已生成:','s\x20/\x20并发\x20','拉取诊断配置','utf8','KLihI','CMRnw','aqgzh','WpMpH','KzkYn','stringify','sort','3839058iwmRru','grok','exists','gpt-5.5','Bearer\x20***','YlgNE','alloc','\x0aspawn\x20error:\x20','match','isArray','Bjauw','xkIyN','padStart','models','jEGzZ','stdout','openSync','\x5c$&','sIqex','18cIAFxc','qsoBI','SsFEl','将对\x20','FqOIr','~/.cc-switch','CBRvQ','\x20退出码\x200\x20/\x20','bwWQh','凭据发现','/http-tests.jsonl','max_tokens','Wgdyz','object','tIFFN',');cli-activate\x20优先级更高,重新激活即可覆盖','使用手动输入的凭据(','error','rNRrk','cli','637542tjSEBs','code','.redacted','dnSLI','ebdYc','WJTxi','858585khePBv','full','UrEzj','isFile','exit_code','message','vzbzT','yxKSl','OhuUI','../package.json','LNcMI','sk-','/configs/','protocol','file','未在\x20~/.codex/auth.json\x20/\x20~/.claude/settings.json\x20/\x20~/.gemini/settings.json\x20中发现\x20API\x20Key','request_id','mkdirSync','now','。继续?','UbUwR','test','PGlxF','length','SIGKILL','platform','pattern','end','EwmHs','1267688wIzbZy','node',')\x0a配置来源:','pNEQz','~/.codex/config.toml','qpYZK','LHwvI','api_base','/README.txt','bYIMr','push','[^/]*','QZbQF','打包诊断\x20zip'];_0xc6e6=function(){return _0x5551b8;};return _0xc6e6();}function D(_0x131a81){const _0x256e71=_0x86a60;try{return _0x4189a9[_0x256e71(0x127)](_0x131a81)[_0x256e71(0x13f)]();}catch{return!0x1;}}function B(_0x578377){const _0x35a345=_0x86a60;try{return new URL(_0x578377)[_0x35a345(0x1b2)]||null;}catch{return null;}}const Y=[{'cli':_0x86a60(0x171),'label':_0x86a60(0x15b),'win':_0x86a60(0x19a),'pattern':'*.log'},{'cli':'opencode','label':'~/.opencode/log','win':_0x86a60(0x1a9),'pattern':'*'},{'cli':_0x86a60(0x202),'label':'~/.gemini/tmp','win':_0x86a60(0x17d),'pattern':_0x86a60(0x1ca)},{'cli':'grok','label':_0x86a60(0x203),'win':'%userprofile%\x5c.grok\x5clog','pattern':'*'},{'cli':'claude','label':'~/.claude/logs','win':_0x86a60(0x16b),'pattern':'**'}];function q(_0x569ccd){const _0x51330d=_0x86a60,_0x40f425=_0x101545=>_0x101545[_0x51330d(0x1c9)](/[.*+?^${}()|[\]\\]/g,_0x51330d(0xbd)),_0x29a4f6=_0x569ccd[_0x51330d(0x160)]('**')['map'](_0x2aa2d0=>_0x2aa2d0[_0x51330d(0x160)]('*')[_0x51330d(0x19c)](_0x40f425)[_0x51330d(0x181)](_0x51330d(0x101)))['join']('.*');return new RegExp('^'+_0x29a4f6+'$');}function M(_0x22ef29,_0x1a6fa5='',_0x2f4f77=0x0,_0x41c200=[],_0x24c283={'n':0x0}){const _0x3efe9e=_0x86a60,_0x395c36={'zFDFw':function(_0x38f499,_0x5215cb){return _0x38f499>_0x5215cb;},'ebdYc':function(_0x17213f,_0x1b5490){return _0x17213f>=_0x1b5490;},'vzbzT':function(_0x5e9cb0,_0x14fa87){return _0x5e9cb0+_0x14fa87;}};if(_0x395c36['zFDFw'](_0x2f4f77,0x4)||_0x395c36[_0x3efe9e(0xd7)](_0x24c283['n'],0x1f4))return _0x41c200;let _0x1ab05f;try{_0x1ab05f=_0x4189a9[_0x3efe9e(0x122)](_0x58f3ca[_0x3efe9e(0x181)](_0x22ef29,_0x1a6fa5),{'withFileTypes':!0x0});}catch{return _0x41c200;}for(const _0xc4de2e of _0x1ab05f){if(++_0x24c283['n']>=0x1f4)return _0x41c200;const _0x1e662a=_0x1a6fa5?_0x1a6fa5+'/'+_0xc4de2e[_0x3efe9e(0x17a)]:_0xc4de2e[_0x3efe9e(0x17a)];_0xc4de2e[_0x3efe9e(0x13f)]()?M(_0x22ef29,_0x1e662a,_0x395c36[_0x3efe9e(0xdf)](_0x2f4f77,0x1),_0x41c200,_0x24c283):_0xc4de2e[_0x3efe9e(0xdc)]()&&_0x41c200[_0x3efe9e(0x100)](_0x1e662a);}return _0x41c200;}function Z(_0x2f85c7,_0x5fdb08){const _0x2ece00=_0x86a60,_0x3b46fe={'SmRhb':function(_0x26d142,_0x2f737a){return _0x26d142-_0x2f737a;},'RIZOS':_0x2ece00(0x207)};let _0xdc447c;try{const _0x28550b=_0x4189a9[_0x2ece00(0x127)](_0x2f85c7)[_0x2ece00(0x1b5)];_0xdc447c=_0x4189a9[_0x2ece00(0xbc)](_0x2f85c7,'r');const _0x51309b=Math['min'](_0x28550b,_0x5fdb08),_0x1d3982=Buffer[_0x2ece00(0xb2)](_0x51309b);return _0x4189a9['readSync'](_0xdc447c,_0x1d3982,0x0,_0x51309b,_0x3b46fe[_0x2ece00(0x11b)](_0x28550b,_0x51309b)),_0x1d3982['toString'](_0x3b46fe[_0x2ece00(0x15c)]);}catch{return null;}finally{if(void 0x0!==_0xdc447c)try{_0x4189a9[_0x2ece00(0x18d)](_0xdc447c);}catch{}}}function F(_0x46bfea){const _0x59b1ff=_0x86a60,_0x5cc4b3=_0x46bfea[_0x59b1ff(0xb4)](/~\/\.([^/]+)\/(.+)$/);return _0x5cc4b3?_0x5cc4b3[0x1]+'_'+_0x5cc4b3[0x2]:_0x46bfea[_0x59b1ff(0x1c9)](/[~\\/]/g,'_');}function J({summary:_0x4db9fe,modelCount:_0x570c3d}){const _0x7651d4=_0x86a60,_0x391d46={'ZXAwh':function(_0x148e86,_0x1fdbcb){return _0x148e86===_0x1fdbcb;},'mloXY':_0x7651d4(0x1af),'WpMpH':_0x7651d4(0x187)};return'TokenShop\x20诊断包说明\x0a====================\x0a\x0a生成时间:'+_0x4db9fe[_0x7651d4(0x1e6)]+_0x7651d4(0x136)+_0x4db9fe[_0x7651d4(0x11f)]+_0x7651d4(0x175)+_0x4db9fe[_0x7651d4(0xfd)]+_0x7651d4(0x16c)+_0x4db9fe['credential'][_0x7651d4(0x193)]+_0x7651d4(0x1c2)+_0x4db9fe[_0x7651d4(0x163)][_0x7651d4(0x19f)]+_0x7651d4(0xf8)+(_0x391d46['ZXAwh'](_0x391d46['mloXY'],_0x4db9fe[_0x7651d4(0x1aa)])?_0x7651d4(0x1a6):_0x391d46[_0x7651d4(0x20b)])+_0x7651d4(0x1f0)+_0x570c3d+'\x20个模型(max_tokens\x20极小,计费可忽略)。\x0a\x0a三、隐私说明\x0a包内所有密钥(sk-…)、Bearer\x20凭证、邮箱、代理内嵌账号均已自动脱敏;\x0aconfigs/\x20为脱敏副本,本地原始配置文件未被修改。\x0a\x0a四、联系方式\x0a客服/QQ/邮箱:__________(由客服填写)\x0a';}function X(_0x120238){const _0x119169=_0x86a60,_0xadf0da={'yxKSl':function(_0x3c3d0c,_0x5b1b55){return _0x3c3d0c>_0x5b1b55;},'FiaFj':function(_0x2f7142,_0x26f645){return _0x2f7142+_0x26f645;}};return _0xadf0da[_0x119169(0xe0)](_0x120238[_0x119169(0xf0)],0x0)?_0xadf0da[_0x119169(0x10d)](_0x120238[_0x119169(0x181)]('\x0a'),'\x0a'):'';}function G(_0x124841,_0x4df092){const _0x2fd5f0=_0x86a60;return _0x58f3ca['join'](_0x4df092||process[_0x2fd5f0(0x130)](),_0x2fd5f0(0x11e)+_0x124841+_0x2fd5f0(0x1e0));}export async function runDiagnose({apiBase:_0x23f674,opts:_0xf5d12d={},ui:_0x4a4ae7={}}){const _0x510208=_0x86a60,_0x24bb5d={'FqOIr':function(_0x301e54,_0x30b865){return _0x301e54(_0x30b865);},'EwmHs':function(_0x5e55ab,_0x1721d6,_0x3a4c89){return _0x5e55ab(_0x1721d6,_0x3a4c89);},'qpYZK':function(_0x5c6ea6){return _0x5c6ea6();},'YqgDe':function(_0x341669,_0x728bfc){return _0x341669(_0x728bfc);},'KBrQr':function(_0x4168a9,_0x3cb661){return _0x4168a9+_0x3cb661;},'tIBJA':function(_0x30418d,_0x312eab){return _0x30418d&_0x312eab;},'pNEQz':_0x510208(0x14d),'OoaZk':_0x510208(0x184),'OhuUI':function(_0x242d0b,_0x43ac5d){return _0x242d0b(_0x43ac5d);},'xZDVY':function(_0x19230d,_0x3dde52){return _0x19230d(_0x3dde52);},'KcjCL':_0x510208(0x1db),'QZbQF':function(_0x5a4f9e,_0x2b28ff){return _0x5a4f9e(_0x2b28ff);},'dhnfE':_0x510208(0xc4),'nIEYh':'%userprofile%\x5c.cc-switch','IzclQ':'~/.cc-switch\x20目录存在','KzkYn':function(_0x21de79,_0x15be34){return _0x21de79(_0x15be34);},'mhxcz':function(_0x2a46a8,_0xde94ba){return _0x2a46a8(_0xde94ba);},'XdYsx':function(_0x4413bd,_0x3ccc29){return _0x4413bd(_0x3ccc29);},'rMylO':function(_0x5c7e16,_0x4a8af4){return _0x5c7e16==_0x4a8af4;},'sDBjZ':function(_0x19fdad,_0x35633c){return _0x19fdad(_0x35633c);},'YKpZG':function(_0x571106,_0x52566d,_0x3d718c){return _0x571106(_0x52566d,_0x3d718c);},'rNRrk':function(_0x3b1752,_0x31eddd){return _0x3b1752&&_0x31eddd;},'GAvyV':function(_0x11eaca,_0x12c56d){return _0x11eaca!==_0x12c56d;},'swWse':_0x510208(0x13e),'VQNxK':_0x510208(0x1f5),'HThEH':function(_0x5ce9e2,_0x19dd17){return _0x5ce9e2<_0x19dd17;},'nTtIo':function(_0x221072,_0x335902){return _0x221072(_0x335902);},'hfgrc':function(_0x290d83,_0x384e6f){return _0x290d83+_0x384e6f;},'gSqBs':function(_0x353c55,_0x3a1036){return _0x353c55(_0x3a1036);},'SsFEl':function(_0x329b7f,_0x2f650f){return _0x329b7f(_0x2f650f);},'izJRa':function(_0x2e970e,_0x5e3f0d){return _0x2e970e(_0x5e3f0d);},'cnNRI':function(_0x42617a,_0x525544){return _0x42617a!=_0x525544;},'Wgdyz':function(_0x2a8f3f,_0x3140ec){return _0x2a8f3f(_0x3140ec);},'xkIyN':function(_0x2f2f35,_0x3263cc){return _0x2f2f35(_0x3263cc);},'iGutu':function(_0x105ea2,_0x2aad65){return _0x105ea2(_0x2aad65);},'Omjdj':function(_0x38e003,_0x48d6f0){return _0x38e003(_0x48d6f0);},'DhxTY':function(_0x4bad09,_0x114782){return _0x4bad09(_0x114782);},'pTqBK':_0x510208(0xc8),'YlgNE':_0x510208(0xe8),'xohnR':function(_0xb715c,_0x42fb46){return _0xb715c(_0x42fb46);},'zPSQP':'请输入\x20API\x20Key(仅用于本次诊断,包内不落明文)','KLihI':_0x510208(0x1c8),'UqBTt':_0x510208(0x170),'LHwvI':_0x510208(0x1c4),'rLfyh':function(_0x31f433,_0x151e87){return _0x31f433>_0x151e87;},'YXvaJ':_0x510208(0x10e),'AFuMI':function(_0x600b81,_0x5d3fe7){return _0x600b81===_0x5d3fe7;},'Yuibx':function(_0x1160b0,_0x30e4d8){return _0x1160b0/_0x30e4d8;},'dnSLI':'后端诊断配置不可用(404/超时/非法),使用内置兜底矩阵','sIqex':function(_0x29c8ce,_0x4ec099){return _0x29c8ce+_0x4ec099;},'DPxGS':_0x510208(0x1bd),'pXHYx':_0x510208(0x189),'rScGj':function(_0x18c933){return _0x18c933();},'wZGfU':'ERR','xwwuC':'slow','tzJen':function(_0x51ab52,_0x5646b9){return _0x51ab52===_0x5646b9;},'WKRzB':_0x510208(0x18e),'KHFDE':_0x510208(0x126),'OGPXF':_0x510208(0x207),'DXFoF':function(_0xe55c09,_0x7b9340){return _0xe55c09-_0x7b9340;}},_0x2a135b={..._0x586ac3,..._0x4a4ae7},_0x5594c4={'yes':!0x1,'models':void 0x0,'skipCliTests':!0x1,'outDir':void 0x0,..._0xf5d12d};_0x2a135b['step'](_0x24bb5d['pTqBK']);let _0x7c04a3=function(_0x39fb71){const _0x16d559=_0x510208;for(const _0x4bd10e of h){const _0x485712=P(_0x4bd10e);let _0x29a79d;try{_0x29a79d=_0x4189a9[_0x16d559(0x1e9)](_0x485712,'utf8');}catch{continue;}const _0x62c5ac=_0x24bb5d[_0x16d559(0xc3)](C,_0x29a79d);if(_0x62c5ac)return{'key':_0x62c5ac,'baseUrl':_0x24bb5d[_0x16d559(0xf5)](E,_0x29a79d,_0x39fb71),'source':_0x4bd10e[_0x16d559(0x1d8)]};}return null;}(_0x23f674);if(_0x7c04a3)_0x2a135b['ok']('发现凭据:'+_0x7c04a3[_0x510208(0x193)]+'('+_0x24bb5d[_0x510208(0x16f)](S,_0x7c04a3[_0x510208(0x1da)])+_0x510208(0x12e)+_0x7c04a3['baseUrl']+')');else{_0x2a135b[_0x510208(0x1db)](_0x24bb5d[_0x510208(0xb1)]);const _0x23b8fe=(await _0x24bb5d['xohnR'](_0x1b6f0e,_0x24bb5d['zPSQP']))[_0x510208(0x1cc)]();if(!_0x23b8fe)throw new Error(_0x24bb5d[_0x510208(0x208)]);_0x7c04a3={'key':_0x23b8fe,'baseUrl':_0x23f674,'source':_0x24bb5d[_0x510208(0x1e8)]},_0x2a135b['ok'](_0x510208(0xcf)+S(_0x23b8fe)+_0x510208(0x12e)+_0x7c04a3[_0x510208(0x154)]+')');}_0x2a135b[_0x510208(0x18c)](_0x24bb5d[_0x510208(0xfc)]);const _0x3ef6e6=(function(){const _0x2c65c1=_0x510208,_0xc2fc3c=_0x24bb5d[_0x2c65c1(0xfb)](_0x5e9cee),_0xdd6b0={};for(const _0x2b8dff of h){const _0x2a6c7c=_0x24bb5d[_0x2c65c1(0x159)](P,_0x2b8dff),_0x126770={'path':_0x2a6c7c,'exists':!0x1};try{const _0x329b50=_0x4189a9[_0x2c65c1(0x127)](_0x2a6c7c);_0x126770[_0x2c65c1(0xae)]=!0x0,_0x126770[_0x2c65c1(0x1b5)]=_0x329b50[_0x2c65c1(0x1b5)],_0x126770[_0x2c65c1(0x19e)]=_0x329b50['mtime'][_0x2c65c1(0x118)](),_0x126770['mode']=_0x24bb5d[_0x2c65c1(0x144)]('0',_0x24bb5d['tIBJA'](0x1ff,_0x329b50['mode'])[_0x2c65c1(0x1a8)](0x8));}catch{}_0xdd6b0[_0x2b8dff[_0x2c65c1(0x1d8)]]=_0x126770;}const _0x1dcdc0={};for(const _0x5f4998 of[_0x24bb5d[_0x2c65c1(0xf9)],_0x2c65c1(0x1fb),_0x24bb5d[_0x2c65c1(0x162)],_0x2c65c1(0x151)]){const _0x40f079=process['env'][_0x5f4998]??process[_0x2c65c1(0x176)][_0x5f4998[_0x2c65c1(0x131)]()]??null;_0x1dcdc0[_0x5f4998]=_0x24bb5d['OhuUI'](j,_0x40f079);}return{'os':_0xc2fc3c['os'],'node':_0xc2fc3c[_0x2c65c1(0xf7)],'installed_clis':_0xc2fc3c['installed'],'config_files':_0xdd6b0,'proxy_env':_0x1dcdc0};}());_0x2a135b[_0x510208(0x133)](_0x510208(0x13b)+_0x3ef6e6['os'][_0x510208(0xf2)]+_0x510208(0x1ef)+_0x3ef6e6[_0x510208(0xf7)][_0x510208(0x119)]+_0x510208(0x1ba)+Object[_0x510208(0x1a5)](_0x3ef6e6[_0x510208(0x173)])[_0x510208(0xf0)]+'\x20个');const _0x132703=function(_0x301f2a){const _0x380498=_0x510208,_0x3ef855=[],_0x29b730=U(_0x24bb5d[_0x380498(0x147)](P,H[0x1]));null==_0x29b730||/^\s*model_context_window\s*=/m['test'](_0x29b730)||_0x3ef855[_0x380498(0x100)]({'code':_0x380498(0x138),'level':_0x24bb5d['KcjCL'],'message':_0x380498(0x121)});const _0x328c21=[];_0x24bb5d[_0x380498(0x159)](D,_0x24bb5d[_0x380498(0x102)](P,{'label':_0x24bb5d[_0x380498(0x200)],'win':_0x24bb5d[_0x380498(0x14b)]}))&&_0x328c21[_0x380498(0x100)](_0x24bb5d[_0x380498(0x1a2)]);const _0x4197b0=_0x24bb5d[_0x380498(0x20c)](B,_0x301f2a);for(const _0x497350 of H){const _0x4c5b51=_0x24bb5d['mhxcz'](U,_0x24bb5d[_0x380498(0x137)](P,_0x497350));if(_0x24bb5d[_0x380498(0x1e7)](null,_0x4c5b51))continue;const _0x314d85=_0x24bb5d['sDBjZ'](B,_0x24bb5d['YKpZG'](E,_0x4c5b51,''));_0x24bb5d[_0x380498(0xd1)](_0x314d85,_0x4197b0)&&_0x24bb5d[_0x380498(0x161)](_0x314d85,_0x4197b0)&&_0x328c21['push'](_0x497350[_0x380498(0x1d8)]+_0x380498(0x124)+_0x314d85);}return _0x328c21[_0x380498(0xf0)]>0x0&&_0x3ef855[_0x380498(0x100)]({'code':_0x24bb5d[_0x380498(0x1fa)],'level':_0x24bb5d[_0x380498(0x1c6)],'message':_0x380498(0x1dc)+_0x328c21[_0x380498(0x181)](';')+_0x380498(0xce)}),_0x3ef855;}(_0x23f674);if(_0x24bb5d[_0x510208(0x13c)](_0x132703[_0x510208(0xf0)],0x0)){for(const _0x5b2c22 of _0x132703)_0x2a135b[_0x510208(0x1db)]('体检:'+_0x5b2c22[_0x510208(0xde)]);}else _0x2a135b['ok'](_0x24bb5d[_0x510208(0x19d)]);_0x2a135b[_0x510208(0x18c)](_0x510208(0x206));const _0x54928a=await _0x24bb5d[_0x510208(0x20c)](K,_0x23f674);_0x24bb5d[_0x510208(0x1ab)](_0x510208(0x1af),_0x54928a[_0x510208(0x193)])?_0x2a135b['ok'](_0x510208(0x166)+_0x54928a[_0x510208(0xb9)][_0x510208(0xf0)]+_0x510208(0x1f3)+_0x24bb5d[_0x510208(0x12c)](_0x54928a['timeout_ms'],0x3e8)+_0x510208(0x205)+_0x54928a[_0x510208(0x134)]):_0x2a135b[_0x510208(0x1db)](_0x24bb5d[_0x510208(0xd6)]);const _0x449a48=function(_0x4dedb4,_0x2948b6){const _0x5d423c=_0x510208;let _0x425a7c=_0x4dedb4;return _0x24bb5d[_0x5d423c(0x1e7)](_0x24bb5d['VQNxK'],typeof _0x425a7c)&&(_0x425a7c=_0x425a7c[_0x5d423c(0x160)](',')),Array[_0x5d423c(0xb5)](_0x425a7c)&&(_0x425a7c=_0x425a7c[_0x5d423c(0x19c)](_0xb16ba9=>String(_0xb16ba9)[_0x5d423c(0x1cc)]())['filter'](Boolean),_0x425a7c[_0x5d423c(0xf0)]>0x0)?[...new Set(_0x425a7c)]:_0x2948b6;}(_0x5594c4[_0x510208(0xb9)],_0x54928a[_0x510208(0xb9)]);if(!_0x5594c4[_0x510208(0x153)]){if(!await _0x283573(_0x24bb5d[_0x510208(0xbe)](_0x510208(0xc2)+_0x7c04a3['baseUrl']+_0x510208(0x152)+_0x449a48[_0x510208(0xf0)]+_0x510208(0x1ec)+_0x54928a[_0x510208(0xca)]+',正常计费)',_0x5594c4[_0x510208(0x1ea)]?'':_0x24bb5d['DPxGS'])+_0x510208(0xec)))throw new Error(_0x24bb5d[_0x510208(0x15d)]);}_0x2a135b[_0x510208(0x18c)]('HTTP\x20直测('+_0x449a48[_0x510208(0xf0)]+'\x20个模型,并发\x20'+_0x54928a[_0x510208(0x134)]+')');const _0x2ae818=await async function({cred:_0x2b5691,models:_0x3d149f,cfg:_0x3a16da,deviceId:_0x51b3ca}){const _0x589c0c=_0x510208,_0xecb903={'gwlDD':function(_0x599114,_0x240e57){return _0x599114(_0x240e57);}},_0x419caf=Math[_0x589c0c(0x1cb)](0x1,_0x3a16da['concurrency']),_0x50f325=[];for(let _0x3310b2=0x0;_0x24bb5d['HThEH'](_0x3310b2,_0x3d149f[_0x589c0c(0xf0)]);_0x3310b2+=_0x419caf){const _0x5da377=_0x3d149f[_0x589c0c(0x139)](_0x3310b2,_0x3310b2+_0x419caf),_0x281bc4=await Promise[_0x589c0c(0x11a)](_0x5da377['map'](async _0x573af8=>{const _0x18ebba=_0x589c0c,_0x5bf15c=await _0xecb903['gwlDD'](L,{'baseUrl':_0x2b5691[_0x18ebba(0x154)],'apiKey':_0x2b5691[_0x18ebba(0x1da)],'model':_0x573af8,'maxTokens':_0x3a16da[_0x18ebba(0xca)],'timeoutMs':_0x3a16da[_0x18ebba(0x143)],'deviceId':_0x51b3ca});return{'model':_0x573af8,..._0x5bf15c,'code':_0xecb903['gwlDD'](z,_0x5bf15c)};}));_0x50f325[_0x589c0c(0x100)](..._0x281bc4);}return _0x50f325;}({'cred':_0x7c04a3,'models':_0x449a48,'cfg':_0x54928a,'deviceId':_0x24bb5d[_0x510208(0x116)](_0x45f65a)});for(const _0x275cac of _0x2ae818){const _0x4d962f=_0x275cac[_0x510208(0x12d)]+'\x20—\x20HTTP\x20'+(_0x275cac[_0x510208(0x18f)]??_0x24bb5d['wZGfU'])+_0x510208(0x18a)+(_0x275cac['ttfb_ms']??'-')+_0x510208(0x192)+_0x54928a[_0x510208(0x120)][_0x275cac['code']];_0x24bb5d[_0x510208(0x1ab)]('ok',_0x275cac['code'])?_0x2a135b['ok'](_0x4d962f):_0x24bb5d[_0x510208(0x1ab)](_0x24bb5d[_0x510208(0x1bf)],_0x275cac['code'])?_0x2a135b[_0x510208(0x1db)](_0x4d962f):_0x2a135b[_0x510208(0x1d6)](_0x4d962f);}const _0x3ae9ac=[];if(_0x5594c4['skipCliTests'])_0x2a135b[_0x510208(0x133)](_0x510208(0x1fc));else{const _0x31a7fc=$[_0x510208(0x1b8)](_0x10e5fc=>_0x3ef6e6[_0x510208(0x173)][_0x10e5fc]);if(_0x24bb5d[_0x510208(0x125)](0x0,_0x31a7fc[_0x510208(0xf0)]))_0x2a135b[_0x510208(0x1db)](_0x24bb5d[_0x510208(0x1e1)]);else{_0x2a135b['step'](_0x510208(0x11d)+_0x31a7fc[_0x510208(0xf0)]+_0x510208(0x1ed));for(const _0x10a698 of _0x31a7fc){_0x2a135b[_0x510208(0x133)](_0x510208(0x1d4)+_0x10a698+'\x20'+y[_0x10a698][_0x510208(0x181)]('\x20')+'\x20…');const _0x34af0d=await R(_0x10a698,y[_0x10a698]);_0x3ae9ac['push'](_0x34af0d),_0x34af0d[_0x510208(0x18b)]?_0x2a135b[_0x510208(0x1db)](_0x10a698+'\x20超时(30s)已终止'):_0x24bb5d['AFuMI'](0x0,_0x34af0d[_0x510208(0xdd)])?_0x2a135b['ok'](_0x10a698+_0x510208(0xc6)+_0x34af0d[_0x510208(0x112)]+'ms'):_0x2a135b[_0x510208(0x1d6)](_0x10a698+_0x510208(0x111)+(_0x34af0d['exit_code']??'ERR')+'\x20/\x20'+_0x34af0d[_0x510208(0x112)]+'ms');}}}_0x2a135b['step'](_0x510208(0x103));const _0x41e035=(function(){const _0x336ab1=_0x510208,_0x2aa4f8=new Date(),_0x314cee=_0xedbcf6=>String(_0xedbcf6)[_0x336ab1(0xb8)](0x2,'0');return''+_0x2aa4f8['getFullYear']()+_0x24bb5d[_0x336ab1(0x186)](_0x314cee,_0x24bb5d['hfgrc'](_0x2aa4f8[_0x336ab1(0x1a7)](),0x1))+_0x24bb5d[_0x336ab1(0x147)](_0x314cee,_0x2aa4f8['getDate']())+'T'+_0x24bb5d[_0x336ab1(0x1fd)](_0x314cee,_0x2aa4f8[_0x336ab1(0x10f)]())+_0x24bb5d[_0x336ab1(0x102)](_0x314cee,_0x2aa4f8[_0x336ab1(0x157)]())+_0x314cee(_0x2aa4f8[_0x336ab1(0x1dd)]());}()),_0x1ee621=(function(){const _0xbfc33b=_0x510208,_0x256cdc=[];for(const _0x4da2db of Y){const _0x29cbad=P(_0x4da2db);if(!_0x24bb5d['gSqBs'](D,_0x29cbad))continue;const _0x32fd12=_0x24bb5d[_0xbfc33b(0xc1)](q,_0x4da2db[_0xbfc33b(0xf3)]),_0x3fe8b1=_0x24bb5d[_0xbfc33b(0x16f)](M,_0x29cbad)['filter'](_0xbcce60=>_0x32fd12[_0xbfc33b(0xee)](_0xbcce60))[_0xbfc33b(0x19c)](_0x2790d9=>{const _0x3c0e14=_0xbfc33b,_0x483438=_0x58f3ca[_0x3c0e14(0x181)](_0x29cbad,_0x2790d9);let _0x111584=0x0;try{_0x111584=_0x4189a9['statSync'](_0x483438)[_0x3c0e14(0x164)];}catch{return null;}return{'rel':_0x2790d9,'full':_0x483438,'mtimeMs':_0x111584};})[_0xbfc33b(0x1b8)](Boolean)[_0xbfc33b(0x20e)]((_0x4c40f1,_0x4a9e0c)=>_0x4a9e0c[_0xbfc33b(0x164)]-_0x4c40f1[_0xbfc33b(0x164)]);for(const _0xbb1813 of _0x3fe8b1['slice'](0x0,0x3)){const _0x598837=Z(_0xbb1813[_0xbfc33b(0xda)],0x10000);_0x24bb5d['cnNRI'](null,_0x598837)&&_0x256cdc['push']({'cli':_0x4da2db['cli'],'file':_0xbb1813[_0xbfc33b(0x128)],'name':_0x4da2db[_0xbfc33b(0xd2)]+'/'+_0xbb1813[_0xbfc33b(0x128)],'content':redact(_0x598837),'size':_0x598837[_0xbfc33b(0xf0)]});}}return _0x256cdc;}());_0x2a135b[_0x510208(0x133)](_0x24bb5d[_0x510208(0x13c)](_0x1ee621[_0x510208(0xf0)],0x0)?_0x510208(0x155)+_0x1ee621[_0x510208(0xf0)]+'\x20个文件(每文件尾部\x2064KB,已脱敏)':_0x24bb5d['KHFDE']);const _0x16fd36=_0x2ae818[_0x510208(0x19c)](_0x5b2dd0=>JSON[_0x510208(0x20d)]({'model':_0x5b2dd0[_0x510208(0x12d)],'request_id':_0x5b2dd0[_0x510208(0xe9)]??null,'status':_0x5b2dd0[_0x510208(0x18f)]??null,'ttfb_ms':_0x5b2dd0[_0x510208(0x1b1)]??null,'total_ms':_0x5b2dd0[_0x510208(0x1f9)]??null,'error':_0x5b2dd0[_0x510208(0xd0)]?redact(_0x5b2dd0[_0x510208(0xd0)]):null,'response_preview':_0x5b2dd0[_0x510208(0x1d2)]?redact(_0x5b2dd0['response_preview']):''})),_0x244237=_0x3ae9ac[_0x510208(0x19c)](_0x39c69d=>JSON[_0x510208(0x20d)](_0x39c69d)),_0x2a7e47=[];for(const _0x5a19bf of h){let _0x4ecb48;try{_0x4ecb48=_0x4189a9[_0x510208(0x1e9)](_0x24bb5d[_0x510208(0x185)](P,_0x5a19bf),_0x24bb5d[_0x510208(0x1c5)]);}catch{continue;}_0x2a7e47[_0x510208(0x100)]({'name':F(_0x5a19bf[_0x510208(0x1d8)])+_0x510208(0xd5),'content':O(_0x4ecb48)});}const _0x1bad69={'tool_version':_,'generated_at':new Date()[_0x510208(0x118)](),'api_base':_0x23f674,'credential':{'source':_0x7c04a3['source'],'key_redacted':_0x24bb5d[_0x510208(0xe1)](S,_0x7c04a3[_0x510208(0x1da)])},'config_source':_0x54928a[_0x510208(0x193)],'http_tests':_0x2ae818[_0x510208(0x19c)](_0x21ba56=>({'model':_0x21ba56[_0x510208(0x12d)],'status':_0x21ba56['status']??null,'verdict':_0x54928a[_0x510208(0x120)][_0x21ba56[_0x510208(0xd4)]],'ttfb_ms':_0x21ba56['ttfb_ms']??null,'total_ms':_0x21ba56[_0x510208(0x1f9)]??null,'request_id':_0x21ba56[_0x510208(0xe9)]??null})),'cli_tests':_0x3ae9ac[_0x510208(0x19c)](_0x17c935=>({'cli':_0x17c935[_0x510208(0xd2)],'exit_code':_0x17c935[_0x510208(0xdd)],'verdict':0x0!==_0x17c935[_0x510208(0xdd)]||_0x17c935[_0x510208(0x18b)]?_0x510208(0x1d6):'ok'})),'findings':_0x132703,'log_files':_0x1ee621[_0x510208(0x19c)](_0x3e9c38=>({'cli':_0x3e9c38[_0x510208(0xd2)],'file':_0x3e9c38[_0x510208(0xe7)],'size':_0x3e9c38[_0x510208(0x1b5)]})),'zip_path':''},_0xf738e7={'generated_at':_0x1bad69[_0x510208(0x1e6)],'tool_version':_,..._0x3ef6e6},_0x3156d7=function({stamp:_0x54acd0,summary:_0x1468a1,envJson:_0x36c913,httpLines:_0x3cf4d2,cliLines:_0x1dde13,configCopies:_0x2c7ea2,logTails:_0x5cde02,outDir:_0x3a784f}){const _0x2469f2=_0x510208,_0x27de38=_0x2469f2(0x11e)+_0x54acd0,_0xda12ba=_0x27de38+_0x2469f2(0x1e0),_0x122087={[_0x27de38+'/summary.json']:_0x420e62(JSON['stringify'](_0x1468a1,null,0x2)),[_0x27de38+_0x2469f2(0x1bc)]:_0x24bb5d[_0x2469f2(0xc1)](_0x420e62,JSON[_0x2469f2(0x20d)](_0x36c913,null,0x2)),[_0x27de38+_0x2469f2(0xc9)]:_0x24bb5d[_0x2469f2(0x186)](_0x420e62,_0x24bb5d[_0x2469f2(0xcb)](X,_0x3cf4d2)),[_0x27de38+_0x2469f2(0x190)]:_0x24bb5d[_0x2469f2(0xb7)](_0x420e62,_0x24bb5d['iGutu'](X,_0x1dde13)),[_0x27de38+_0x2469f2(0xfe)]:_0x24bb5d['Omjdj'](_0x420e62,_0x24bb5d[_0x2469f2(0x186)](J,{'summary':_0x1468a1,'modelCount':_0x1468a1[_0x2469f2(0x135)][_0x2469f2(0xf0)]}))};for(const _0x203145 of _0x2c7ea2)_0x122087[_0x27de38+_0x2469f2(0xe5)+_0x203145['name']]=_0x420e62(_0x203145[_0x2469f2(0x149)]);for(const _0x2aa623 of _0x5cde02)_0x122087[_0x27de38+'/logs/'+_0x2aa623[_0x2469f2(0x17a)]]=_0x24bb5d['DhxTY'](_0x420e62,_0x2aa623[_0x2469f2(0x149)]);const _0x21bf58=_0x3a784f||process['cwd'](),_0x705a13=_0x58f3ca['join'](_0x21bf58,_0xda12ba);try{_0x4189a9[_0x2469f2(0xea)](_0x21bf58,{'recursive':!0x0}),_0x4189a9[_0x2469f2(0x1e4)](_0x705a13,Buffer[_0x2469f2(0x196)](_0x2caba9(_0x122087)));}catch(_0x5c0b47){throw new Error(_0x2469f2(0x113)+_0x705a13+'):'+_0x5c0b47['message']);}return _0x705a13;}({'stamp':_0x41e035,'summary':{..._0x1bad69,'zip_path':G(_0x41e035,_0x5594c4[_0x510208(0x114)])},'envJson':_0xf738e7,'httpLines':_0x16fd36,'cliLines':_0x244237,'configCopies':_0x2a7e47,'logTails':_0x1ee621,'outDir':_0x5594c4[_0x510208(0x114)]});_0x1bad69[_0x510208(0x174)]=_0x3156d7;const _0x5eaa72=_0x2ae818['filter'](_0x82ea14=>'ok'===_0x82ea14[_0x510208(0xd4)])[_0x510208(0xf0)],_0x5d6a7=_0x2ae818[_0x510208(0x1b8)](_0x189b7f=>'fail'===_0x189b7f['code'])[_0x510208(0xf0)];return _0x2a135b['ok'](_0x510208(0x204)+_0x3156d7),_0x2a135b[_0x510208(0x133)]('HTTP\x20直测\x20'+_0x2ae818[_0x510208(0xf0)]+_0x510208(0x197)+_0x5eaa72+_0x510208(0x1f6)+_0x24bb5d['DXFoF'](_0x24bb5d['DXFoF'](_0x2ae818['length'],_0x5eaa72),_0x5d6a7)+'\x20/\x20失败\x20'+_0x5d6a7+');CLI\x20实测\x20'+_0x3ae9ac['length']+_0x510208(0x123)),{'zipPath':_0x3156d7,'summary':_0x1bad69};}
|
package/dist/lib/install.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x111f(){const _0x4f124d=['npm\x20install\x20-g\x20','message','error','3766kpJlPy','installed','SjDzL','1692785SxKPBU','npm\x20exit\x20','CjTPh','install','platform','dry-run','log','win32','name','env','\x20\x20[试运行]\x20将运行:','(命令\x20','未检测到\x20','version','eAgOI','JoUpd','installCmd','9DNeSnR','no-install-package','278042kmCcSq','installPackage','COMSPEC','1463736nglyfg','18prcPmV','1vWOWbM','sTdch','14576dWTWYL','9326470GGWTwg','status','21492768KSnjAJ','oxxlo','),是否现在安装?\x0a\x20\x20运行:','npm','dryRun','(不真实安装)','NpZBw','66572UFMGjT'];_0x111f=function(){return _0x4f124d;};return _0x111f();}(function(_0x4169ab,_0x230f11){const _0x253a78=_0x144f,_0x494b8f=_0x4169ab();while(!![]){try{const _0x36d6d9=parseInt(_0x253a78(0x18d))/0x1*(parseInt(_0x253a78(0x188))/0x2)+-parseInt(_0x253a78(0x18b))/0x3+parseInt(_0x253a78(0x199))/0x4+parseInt(_0x253a78(0x1a0))/0x5*(-parseInt(_0x253a78(0x18c))/0x6)+-parseInt(_0x253a78(0x19d))/0x7*(parseInt(_0x253a78(0x18f))/0x8)+parseInt(_0x253a78(0x186))/0x9*(parseInt(_0x253a78(0x190))/0xa)+parseInt(_0x253a78(0x192))/0xb;if(_0x36d6d9===_0x230f11)break;else _0x494b8f['push'](_0x494b8f['shift']());}catch(_0x58de2f){_0x494b8f['push'](_0x494b8f['shift']());}}}(_0x111f,0x8852c));import{spawnSync as _0x388690}from'node:child_process';import{detectInstalled as _0x975fc8}from'./detect.mjs';import{confirm as _0x39d075}from'./prompt.mjs';export function installCLI(_0x303737,_0x1139aa={}){const _0x153350=_0x144f,_0xb71568={'KFmdR':_0x153350(0x187),'NpZBw':'dry-run','cZkFe':_0x153350(0x17c),'JoUpd':_0x153350(0x195),'SjDzL':'install','KhcMw':'inherit','oxxlo':function(_0x90cf95,_0x18f2b7){return _0x90cf95===_0x18f2b7;}};if(!_0x303737||!_0x303737['installPackage'])return{'ok':!0x1,'skipped':!0x0,'reason':_0xb71568['KFmdR']};const _0x3acf05=_0x303737['installPackage'],_0x3c487f='npm\x20install\x20-g\x20'+_0x3acf05;if(_0x1139aa[_0x153350(0x196)])return console[_0x153350(0x1a6)](_0x153350(0x17f)+_0x3c487f+_0x153350(0x197)),{'ok':!0x0,'skipped':!0x0,'reason':_0xb71568[_0x153350(0x198)]};console[_0x153350(0x1a6)]('\x20\x20正在执行:'+_0x3c487f+'…');try{const _0x1031e7=_0xb71568['cZkFe']===process[_0x153350(0x1a4)],_0x21badd=_0x1031e7?process[_0x153350(0x17e)][_0x153350(0x18a)]||'cmd.exe':_0xb71568[_0x153350(0x184)],_0x20e94a=_0x388690(_0x21badd,_0x1031e7?['/c',_0x153350(0x195),_0xb71568[_0x153350(0x19f)],'-g',_0x3acf05]:[_0x153350(0x1a3),'-g',_0x3acf05],{'stdio':_0xb71568['KhcMw']});return _0x20e94a[_0x153350(0x19c)]?{'ok':!0x1,'error':_0x20e94a[_0x153350(0x19c)][_0x153350(0x19b)]}:_0xb71568[_0x153350(0x193)](0x0,_0x20e94a['status'])?{'ok':!0x0}:{'ok':!0x1,'error':_0x153350(0x1a1)+_0x20e94a[_0x153350(0x191)]};}catch(_0x5a484a){return{'ok':!0x1,'error':_0x5a484a[_0x153350(0x19b)]};}}function _0x144f(_0x1950b7,_0x61a8b5){_0x1950b7=_0x1950b7-0x17c;const _0x111ff5=_0x111f();let _0x144ff6=_0x111ff5[_0x1950b7];return _0x144ff6;}export async function ensureInstalled(_0x3f4a46,_0x34c9d9={}){const _0x2345bd=_0x144f,_0x17ed9e={'sTdch':'no-meta','CRDwq':function(_0xdb9f72,_0x363cd3){return _0xdb9f72(_0x363cd3);},'frURO':_0x2345bd(0x1a5),'eAgOI':function(_0xd95648,_0x260669){return _0xd95648===_0x260669;},'CjTPh':function(_0x1de896,_0xe85644,_0x329d8c){return _0x1de896(_0xe85644,_0x329d8c);}};if(!_0x3f4a46||!_0x3f4a46[_0x2345bd(0x189)])return{'installed':!0x1,'skipped':!0x0,'reason':_0x17ed9e[_0x2345bd(0x18e)]};const _0x59da5a=_0x3f4a46['detectBin']||_0x3f4a46[_0x2345bd(0x189)]['split']('/')['pop'](),_0x41bbce=_0x17ed9e['CRDwq'](_0x975fc8,_0x59da5a);if(_0x41bbce[_0x2345bd(0x19e)])return{'installed':!0x0,'version':_0x41bbce[_0x2345bd(0x182)]};const {dryRun:_0x144b7c,autoInstall:_0x5da1e3}=_0x34c9d9;if(_0x144b7c)return{'installed':!0x1,'skipped':!0x0,'reason':installCLI(_0x3f4a46,{'dryRun':!0x0})['reason']||_0x17ed9e['frURO']};let _0x54c0a7=_0x17ed9e[_0x2345bd(0x183)](!0x0,_0x5da1e3);if(_0x54c0a7||(_0x54c0a7=await _0x17ed9e[_0x2345bd(0x1a2)](_0x39d075,_0x2345bd(0x181)+(_0x3f4a46[_0x2345bd(0x17d)]||_0x59da5a)+_0x2345bd(0x180)+_0x59da5a+_0x2345bd(0x194)+(_0x3f4a46[_0x2345bd(0x185)]||_0x2345bd(0x19a)+_0x3f4a46[_0x2345bd(0x189)]),{'defaultValue':!0x0})),!_0x54c0a7)return{'installed':!0x1,'skipped':!0x0,'reason':'user-declined'};const _0x74edef=_0x17ed9e[_0x2345bd(0x1a2)](installCLI,_0x3f4a46,{'dryRun':!0x1});if(_0x74edef['ok']){const _0x496203=_0x975fc8(_0x59da5a);return{'installed':_0x496203[_0x2345bd(0x19e)],'version':_0x496203[_0x2345bd(0x182)],'justInstalled':!0x0};}return{'installed':!0x1,'error':_0x74edef['error']};}
|
package/dist/lib/platforms.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x1dbcd1=_0x4eb4;(function(_0x5ec5f7,_0x47a886){const _0x1b46c1=_0x4eb4,_0x183441=_0x5ec5f7();while(!![]){try{const _0x1c27e0=-parseInt(_0x1b46c1(0x180))/0x1*(parseInt(_0x1b46c1(0x194))/0x2)+parseInt(_0x1b46c1(0x17f))/0x3+-parseInt(_0x1b46c1(0x177))/0x4*(parseInt(_0x1b46c1(0x181))/0x5)+-parseInt(_0x1b46c1(0x197))/0x6*(parseInt(_0x1b46c1(0x17c))/0x7)+-parseInt(_0x1b46c1(0x195))/0x8+-parseInt(_0x1b46c1(0x187))/0x9+parseInt(_0x1b46c1(0x192))/0xa;if(_0x1c27e0===_0x47a886)break;else _0x183441['push'](_0x183441['shift']());}catch(_0x26187b){_0x183441['push'](_0x183441['shift']());}}}(_0x504a,0x29aa5));export const CLI_META={'codex':{'name':_0x1dbcd1(0x18c),'installPackage':'@openai/codex','installCmd':_0x1dbcd1(0x171),'startCmd':_0x1dbcd1(0x199),'detectBin':_0x1dbcd1(0x199),'configFiles':[_0x1dbcd1(0x183),'~/.codex/auth.json'],'usage':[_0x1dbcd1(0x17d),_0x1dbcd1(0x184),_0x1dbcd1(0x198),_0x1dbcd1(0x189),_0x1dbcd1(0x196),_0x1dbcd1(0x175)][_0x1dbcd1(0x17e)]('\x0a'),'isPrimary':!0x0},'codex-ws':{'name':_0x1dbcd1(0x18e),'installPackage':_0x1dbcd1(0x178),'installCmd':_0x1dbcd1(0x171),'startCmd':_0x1dbcd1(0x199),'detectBin':_0x1dbcd1(0x199),'configFiles':[_0x1dbcd1(0x183),_0x1dbcd1(0x19b)],'usage':[_0x1dbcd1(0x174),_0x1dbcd1(0x184),_0x1dbcd1(0x198),_0x1dbcd1(0x189),_0x1dbcd1(0x196)][_0x1dbcd1(0x17e)]('\x0a'),'isPrimary':!0x1},'claude':{'name':_0x1dbcd1(0x185),'installPackage':_0x1dbcd1(0x193),'installCmd':'npm\x20install\x20-g\x20@anthropic-ai/claude-code','startCmd':_0x1dbcd1(0x179),'detectBin':_0x1dbcd1(0x179),'configFiles':[_0x1dbcd1(0x19a),'~/.claude.json'],'usage':['常用命令:',_0x1dbcd1(0x19d),_0x1dbcd1(0x17a),_0x1dbcd1(0x18a),_0x1dbcd1(0x182),_0x1dbcd1(0x173),'\x20\x20claude\x20--model\x20sonnet\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20指定模型(sonnet/opus/haiku/fable)','\x20\x20claude\x20mcp\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20管理\x20MCP\x20服务器','\x20\x20claude\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20诊断安装/配置',_0x1dbcd1(0x18f),_0x1dbcd1(0x172),_0x1dbcd1(0x18d),_0x1dbcd1(0x19e)]['join']('\x0a'),'isPrimary':!0x0},'gemini-cli':{'name':_0x1dbcd1(0x18b),'installPackage':_0x1dbcd1(0x176),'installCmd':_0x1dbcd1(0x191),'startCmd':'gemini','detectBin':_0x1dbcd1(0x16d),'configFiles':[_0x1dbcd1(0x17b)],'usage':_0x1dbcd1(0x16f),'isPrimary':!0x0},'opencode':{'name':_0x1dbcd1(0x186),'installPackage':'opencode-ai','installCmd':'npm\x20install\x20-g\x20opencode-ai','startCmd':'opencode','detectBin':_0x1dbcd1(0x188),'configFiles':[_0x1dbcd1(0x16e),_0x1dbcd1(0x170)],'usage':_0x1dbcd1(0x190),'isPrimary':!0x1}};function _0x504a(){const _0x4320f6=['gemini','~/.config/opencode/opencode.json','运行\x20`gemini`\x20开始;`gemini\x20--help`\x20查看选项;在项目根放\x20GEMINI.md\x20让\x20Gemini\x20了解你的代码库','opencode.json','npm\x20install\x20-g\x20@openai/codex','权限模式(Shift+Tab\x20切换):default\x20/\x20acceptEdits\x20/\x20plan\x20/\x20auto\x20/\x20bypassPermissions','\x20\x20claude\x20-r\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20恢复历史会话(选择器)','权限模式(WebSocket\x20模式由服务端配置激活,默认每步确认):','项目根放\x20AGENTS.md\x20让\x20Codex\x20了解你的代码库','@google/gemini-cli','109108fzRaZb','@openai/codex','claude','\x20\x20claude\x20\x22你的问题\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20带初始问题启动','~/.gemini/settings.json','695345ljeEcl','权限模式(默认每步确认):','join','466056dsKNIH','23201IcggKp','5eWHKgn','\x20\x20claude\x20-c\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20继续最近会话','~/.codex/config.toml','\x20\x20codex\x20--full-auto\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20全自动(sandbox\x20内自动批准,推荐)','Claude\x20Code','OpenCode','3032478HIAofV','opencode','\x20\x20codex\x20--sandbox\x20read-only\x20--ask-for-approval\x20never\x20只读(最安全)','\x20\x20claude\x20-p\x20\x22问题\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20非交互模式(输出后退出,适合脚本)','Gemini\x20CLI','Codex\x20CLI','\x20\x20claude\x20--dangerously-skip-permissions\x20\x20\x20\x20\x20\x20\x20\x20跳过所有权限提示(=bypassPermissions,谨慎用)','Codex\x20CLI\x20(WebSocket)','\x20\x20claude\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20更新到最新版','运行\x20`opencode`\x20开始;`opencode\x20--help`\x20查看选项;在项目根放\x20AGENTS.md\x20让\x20OpenCode\x20了解你的代码库','npm\x20install\x20-g\x20@google/gemini-cli','10182470TJaLDu','@anthropic-ai/claude-code','26gKBwby','1902168UsfOwy','\x20\x20codex\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20查看所有选项','6ZotcOd','\x20\x20codex\x20--yolo\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20全跳过(无\x20sandbox\x20无\x20approval,仅信任仓库)','codex','~/.claude/','~/.codex/auth.json','isPrimary','\x20\x20claude\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20交互模式','项目根放\x20CLAUDE.md\x20让\x20Claude\x20了解你的代码库'];_0x504a=function(){return _0x4320f6;};return _0x504a();}export function getCliMeta(_0x2eb680){return CLI_META[_0x2eb680]||null;}function _0x4eb4(_0x4b3e5e,_0x89cc82){_0x4b3e5e=_0x4b3e5e-0x16d;const _0x504aa5=_0x504a();let _0x4eb427=_0x504aa5[_0x4b3e5e];return _0x4eb427;}export function isDefaultSelected(_0x38b80e){const _0x5b714d=_0x1dbcd1,_0x5815b6=CLI_META[_0x38b80e];return!_0x5815b6||_0x5815b6[_0x5b714d(0x19c)];}
|
package/dist/lib/pow.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c4a97,_0x1bbcc1){const _0x444186=_0x1975,_0x52361a=_0x5c4a97();while(!![]){try{const _0x5624dd=-parseInt(_0x444186(0xb2))/0x1+-parseInt(_0x444186(0x8a))/0x2+parseInt(_0x444186(0x97))/0x3+parseInt(_0x444186(0xb9))/0x4+parseInt(_0x444186(0xb3))/0x5*(parseInt(_0x444186(0x9b))/0x6)+parseInt(_0x444186(0x8e))/0x7+-parseInt(_0x444186(0x8c))/0x8;if(_0x5624dd===_0x1bbcc1)break;else _0x52361a['push'](_0x52361a['shift']());}catch(_0xb6cd1f){_0x52361a['push'](_0x52361a['shift']());}}}(_0x333d,0x85b12));import _0x30da8d from'node:https';import _0x1eeced from'node:http';function _0x1975(_0x3c81c1,_0x5a3eb6){_0x3c81c1=_0x3c81c1-0x83;const _0x333d70=_0x333d();let _0x1975a5=_0x333d70[_0x3c81c1];return _0x1975a5;}function _0x333d(){const _0x43b13f=['/api/v1/cli/pow/challenge','850270UDxpjv','25OSkLdW','concat','VmqWs','statusCode','difficulty','YiXHE','2587024obIPev','HTTP\x20','message','startsWith','HusDo','zeUWX','request','href','OAmLa','KqkWB','parse','693330kKRqfb','nRqOB','10753024fnnEwP','challenge','7324352RuzlMW','DTVAm','cIjNb','error','dfrxJ','object','slice','body','haTai','2496804SrNKop','end','bUMfj','PoW\x20challenge\x20请求超时(30s)—\x20','675966XiTwle','GET','destroy','expires_at','sha256','OpjTA','BiFTh','update','PoW\x20challenge\x20响应非\x20JSON(HTTP\x20','LugYW','bHqRI','PBckC','raw','gsTTN','protocol','TAeyB','hex','createHash','无效的\x20apiBase:','push','ohkvA','vZAiV'];_0x333d=function(){return _0x43b13f;};return _0x333d();}import _0x2d32f9 from'node:crypto';export function getChallenge({apiBase:_0x154efc,deviceId:_0x148679}){const _0x3319b3=_0x1975,_0x3db59c={'nRqOB':function(_0x3afa67,_0x3f979c){return _0x3afa67(_0x3f979c);},'DTVAm':function(_0x2e56a3,_0x4c3182){return _0x2e56a3>=_0x4c3182;},'bHqRI':function(_0x151c41,_0x39a8a0){return _0x151c41<_0x39a8a0;},'TAeyB':_0x3319b3(0x93),'BiFTh':'data','haTai':_0x3319b3(0x98),'hmDIw':_0x3319b3(0xb1),'dfrxJ':function(_0x461d56,_0x59f55f){return _0x461d56===_0x59f55f;},'bUMfj':_0x3319b3(0x9c),'cIjNb':'application/json','gsTTN':'timeout','KqkWB':_0x3319b3(0x91)};return new Promise((_0x1c5476,_0x1c8dc5)=>{const _0x38a79c=_0x3319b3,_0x2f0883={'gHWms':'utf8','OAmLa':function(_0x128c85,_0x1ed71a){return _0x3db59c['nRqOB'](_0x128c85,_0x1ed71a);},'OpjTA':function(_0x206ac0,_0x2b15c4){const _0x1e47bb=_0x1975;return _0x3db59c[_0x1e47bb(0x8f)](_0x206ac0,_0x2b15c4);},'LugYW':function(_0x307cd9,_0xa050df){const _0x267c27=_0x1975;return _0x3db59c[_0x267c27(0xa5)](_0x307cd9,_0xa050df);},'PBckC':function(_0x210d09,_0x27c0c8){return _0x210d09(_0x27c0c8);},'zeUWX':_0x3db59c[_0x38a79c(0xaa)],'vZAiV':function(_0x215d1d,_0x45840e){const _0x357ef7=_0x38a79c;return _0x3db59c[_0x357ef7(0x8b)](_0x215d1d,_0x45840e);},'YiXHE':_0x3db59c[_0x38a79c(0xa1)],'ohkvA':_0x3db59c[_0x38a79c(0x96)]};let _0x7d4aac;try{_0x7d4aac=new URL(_0x3db59c['hmDIw'],_0x154efc);}catch(_0x4ca3ce){return void _0x3db59c[_0x38a79c(0x8b)](_0x1c8dc5,new Error(_0x38a79c(0xad)+_0x154efc+'('+_0x4ca3ce['message']+')'));}const _0x4ae6bb=(_0x3db59c[_0x38a79c(0x92)]('https:',_0x7d4aac[_0x38a79c(0xa9)])?_0x30da8d:_0x1eeced)[_0x38a79c(0x85)](_0x7d4aac,{'method':_0x3db59c[_0x38a79c(0x99)],'headers':{'X-Device-Id':_0x148679,'Accept':_0x3db59c[_0x38a79c(0x90)]},'timeout':0x7530},_0x37579b=>{const _0x47e8cc=_0x38a79c,_0x360e7f=[];_0x37579b['on'](_0x2f0883[_0x47e8cc(0xb8)],_0x4f4c91=>_0x360e7f[_0x47e8cc(0xae)](_0x4f4c91)),_0x37579b['on'](_0x2f0883[_0x47e8cc(0xaf)],()=>{const _0x4f0b7f=_0x47e8cc,_0x50f508=Buffer[_0x4f0b7f(0xb4)](_0x360e7f)['toString'](_0x2f0883['gHWms']);let _0x3b671e;try{_0x3b671e=_0x50f508?JSON[_0x4f0b7f(0x89)](_0x50f508):{};}catch{const _0x500f61=new Error(_0x4f0b7f(0xa3)+_0x37579b['statusCode']+'):'+_0x50f508[_0x4f0b7f(0x94)](0x0,0xc8));return _0x500f61[_0x4f0b7f(0xb6)]=_0x37579b[_0x4f0b7f(0xb6)],_0x500f61[_0x4f0b7f(0xa7)]=_0x50f508,void _0x2f0883[_0x4f0b7f(0x87)](_0x1c8dc5,_0x500f61);}if(_0x2f0883[_0x4f0b7f(0xa0)](_0x37579b[_0x4f0b7f(0xb6)],0xc8)&&_0x2f0883[_0x4f0b7f(0xa4)](_0x37579b[_0x4f0b7f(0xb6)],0x12c))_0x2f0883[_0x4f0b7f(0xa6)](_0x1c5476,{'challenge':_0x3b671e[_0x4f0b7f(0x8d)],'difficulty':_0x3b671e[_0x4f0b7f(0xb7)],'expiresAt':_0x3b671e[_0x4f0b7f(0x9e)]||_0x3b671e['expiresAt']});else{const _0x64de76=_0x3b671e?.['error'],_0xe5fe93=(_0x64de76&&_0x2f0883[_0x4f0b7f(0x84)]==typeof _0x64de76?_0x64de76[_0x4f0b7f(0xbb)]:_0x64de76)||_0x3b671e?.['message']||_0x4f0b7f(0xba)+_0x37579b[_0x4f0b7f(0xb6)],_0xb12a08=new Error(_0xe5fe93);_0xb12a08[_0x4f0b7f(0xb6)]=_0x37579b[_0x4f0b7f(0xb6)],_0xb12a08[_0x4f0b7f(0x95)]=_0x3b671e,_0x2f0883[_0x4f0b7f(0xb0)](_0x1c8dc5,_0xb12a08);}});});_0x4ae6bb['on'](_0x3db59c[_0x38a79c(0xa8)],()=>{const _0x377845=_0x38a79c;_0x4ae6bb[_0x377845(0x9d)](new Error(_0x377845(0x9a)+_0x7d4aac[_0x377845(0x86)]));}),_0x4ae6bb['on'](_0x3db59c[_0x38a79c(0x88)],_0x1c8dc5),_0x4ae6bb['end']();});}export function solvePoW(_0x3aee23,_0x2de9bd){const _0x427526=_0x1975,_0x7d02f8={'HusDo':_0x427526(0xab),'VmqWs':function(_0x455dce,_0x8e6230){return _0x455dce(_0x8e6230);}},_0x591758='0'['repeat'](_0x2de9bd);let _0x4e0504=0x0;for(;;){if(_0x2d32f9[_0x427526(0xac)](_0x427526(0x9f))[_0x427526(0xa2)](_0x3aee23+':'+_0x4e0504)['digest'](_0x7d02f8[_0x427526(0x83)])[_0x427526(0xbc)](_0x591758))return _0x7d02f8[_0x427526(0xb5)](String,_0x4e0504);_0x4e0504++;}}
|
package/dist/lib/prompt.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c7459,_0x5b943e){const _0x1ec6a6=_0xb632,_0x4bd109=_0x3c7459();while(!![]){try{const _0x517abb=parseInt(_0x1ec6a6(0x122))/0x1+parseInt(_0x1ec6a6(0xe9))/0x2*(-parseInt(_0x1ec6a6(0x11d))/0x3)+-parseInt(_0x1ec6a6(0xef))/0x4+-parseInt(_0x1ec6a6(0xf9))/0x5*(parseInt(_0x1ec6a6(0x109))/0x6)+parseInt(_0x1ec6a6(0xfb))/0x7*(parseInt(_0x1ec6a6(0x121))/0x8)+-parseInt(_0x1ec6a6(0x120))/0x9+parseInt(_0x1ec6a6(0xed))/0xa;if(_0x517abb===_0x5b943e)break;else _0x4bd109['push'](_0x4bd109['shift']());}catch(_0x3287d9){_0x4bd109['push'](_0x4bd109['shift']());}}}(_0x33de,0xc4a6c));import _0x23a74a from'node:readline';let t=null;async function n(){const _0x5659d8={'tXeAP':'@inquirer/prompts'};return t||(t=await import(_0x5659d8['tXeAP'])),t;}let a=null,s=null,o=null;function r(){const _0x35058a=_0xb632;return!0x0===process[_0x35058a(0xf7)][_0x35058a(0x103)];}export function closePrompt(){a&&!a['closed']&&a['close'](),a=null;}function _0x33de(){const _0x299ca8=['destroyed','filter','44608160wEXZYV','Hawsv','4909124VGHRio','label','tolPv','BBmKN','length','select','\x20\x20[','push','stdin','xAytf','11325OHFIJY','iwRYx','65569wJMIBl','RcAfX','bZGHq','\x20\x20(输入序号,逗号/空格分隔;回车=默认;a=全选;n=全不选)','none','yes','password','toLowerCase','isTTY','input','\x20(默认)','rnwEU','kpmwo','WAfiU','3930aAmciD','log','BcZEc','Y/n','includes','kvbQo','stdout','VrXeg','write','all','yyXYi','dAgAC','vplUM','data','miSvM','emPTF','forEach','pop','trim','hCzpk','3koFsav','vAgbx','split','13051629oACLoF','688zQWsvC','1276897RXljNU','wJuRU','map','setEncoding','txFDn','pQSNP','shift','utf8','OPSbX','end','wgIPa','3153508GWtwjw','pDImy'];_0x33de=function(){return _0x299ca8;};return _0x33de();}function _0xb632(_0x5573c4,_0x5d80c1){_0x5573c4=_0x5573c4-0xe0;const _0x33ded2=_0x33de();let _0xb632ba=_0x33ded2[_0x5573c4];return _0xb632ba;}export async function ask(_0x3e9f4f,{defaultValue:_0x565e0b}={}){const _0x3e51c4=_0xb632,_0xdefb0d={'dAgAC':function(_0x498e7a,_0x262840){return _0x498e7a>_0x262840;},'VrXeg':function(_0x38bd74,_0x19a9db){return _0x38bd74===_0x19a9db;},'YNPBX':function(_0x3a4cf2,_0x14fad2){return _0x3a4cf2-_0x14fad2;},'BBmKN':function(_0x342ead){return _0x342ead();},'iwRYx':_0x3e51c4(0xe5),'wgIPa':_0x3e51c4(0x116),'tolPv':function(_0x568278){return _0x568278();},'emPTF':function(_0x2497b5,_0x26c70d){return _0x2497b5??_0x26c70d;},'RcAfX':function(_0x41767d,_0x597b84){return _0x41767d??_0x597b84;},'ocZHj':function(_0x4fee2,_0x28301e){return _0x4fee2??_0x28301e;}},_0x4d5e11=_0x565e0b?'\x20['+_0x565e0b+']':'';if(r()){const _0x5f28aa=await _0xdefb0d[_0x3e51c4(0xf1)](n);return await _0x5f28aa[_0x3e51c4(0x104)]({'message':''+_0x3e9f4f+_0x4d5e11,'default':_0xdefb0d[_0x3e51c4(0x118)](_0x565e0b,'')})||_0xdefb0d[_0x3e51c4(0xfc)](_0x565e0b,'');}await(s||(s=[],o=new Promise(_0xfb8608=>{const _0x26d182=_0x3e51c4;let _0xb7990f='';process['stdin'][_0x26d182(0xe1)](_0xdefb0d[_0x26d182(0xfa)]),process[_0x26d182(0xf7)]['on'](_0xdefb0d[_0x26d182(0xe8)],_0x17e5ce=>{_0xb7990f+=_0x17e5ce;}),process[_0x26d182(0xf7)]['on'](_0x26d182(0xe7),()=>{const _0x324361=_0x26d182,_0x43fe74=_0xb7990f[_0x324361(0x11f)](/\r?\n/);_0xdefb0d[_0x324361(0x114)](_0x43fe74[_0x324361(0xf3)],0x0)&&_0xdefb0d[_0x324361(0x110)]('',_0x43fe74[_0xdefb0d['YNPBX'](_0x43fe74['length'],0x1)])&&_0x43fe74[_0x324361(0x11a)](),s[_0x324361(0xf6)](..._0x43fe74),_0xdefb0d[_0x324361(0xf2)](_0xfb8608);}),process['stdin'][_0x26d182(0xeb)]&&_0xdefb0d[_0x26d182(0xf2)](_0xfb8608);})),o);const _0x3d63a8=s[_0x3e51c4(0xe4)]()??'';return process[_0x3e51c4(0x10f)][_0x3e51c4(0x111)](''+_0x3e9f4f+_0x4d5e11+':\x20'+_0x3d63a8+'\x0a'),_0x3d63a8[_0x3e51c4(0x11b)]()||_0xdefb0d['ocZHj'](_0x565e0b,'');}export async function askSecret(_0x3ed258){const _0x147b49=_0xb632,_0x562a67={'xAytf':function(_0x2eee71){return _0x2eee71();},'Hawsv':function(_0x1880fe){return _0x1880fe();},'hCzpk':function(_0x1dc680,_0x21dcfb){return _0x1dc680(_0x21dcfb);}};if(_0x562a67[_0x147b49(0xf8)](r))return(await _0x562a67[_0x147b49(0xee)](n))[_0x147b49(0x101)]({'message':_0x3ed258,'mask':'*'});return _0x562a67[_0x147b49(0x11c)](ask,_0x3ed258);}export async function multiSelect(_0x10f7df,_0x4324bc,{defaultSelected:_0x560cc1=[]}={}){const _0x4ebb63=_0xb632,_0x11c2d0={'OPSbX':function(_0x14f0d3,_0x3d2e2c){return _0x14f0d3+_0x3d2e2c;},'UlLXL':function(_0x1aff67){return _0x1aff67();},'Tiaxd':function(_0x3f6e84){return _0x3f6e84();},'WAfiU':_0x4ebb63(0xfe),'kpmwo':function(_0x286480,_0x3925a4,_0x1594ec){return _0x286480(_0x3925a4,_0x1594ec);},'zyykw':_0x4ebb63(0x112),'BcZEc':function(_0x2b5407,_0xf3421){return _0x2b5407===_0xf3421;},'pDImy':function(_0x19c1ca,_0x34aac2){return _0x19c1ca===_0x34aac2;}};if(0x0===_0x4324bc[_0x4ebb63(0xf3)])return[];if(_0x11c2d0['UlLXL'](r)){const _0x1c1df8=await _0x11c2d0['Tiaxd'](n),_0x181300=_0x4324bc[_0x4ebb63(0xe0)]((_0x3f7389,_0x4a592b)=>({'name':_0x3f7389[_0x4ebb63(0xf0)],'value':_0x4a592b,'checked':_0x560cc1[_0x4ebb63(0x10d)](_0x4a592b)}));return await _0x1c1df8['checkbox']({'message':_0x10f7df,'choices':_0x181300,'loop':!0x1,'required':!0x1});}console[_0x4ebb63(0x10a)](_0x10f7df),_0x4324bc[_0x4ebb63(0x119)]((_0x26f918,_0x6c1523)=>{const _0xfd6f43=_0x4ebb63,_0x34408c=_0x560cc1[_0xfd6f43(0x10d)](_0x6c1523);console[_0xfd6f43(0x10a)](_0xfd6f43(0xf5)+(_0x34408c?'x':'\x20')+']\x20'+_0x11c2d0[_0xfd6f43(0xe6)](_0x6c1523,0x1)+'.\x20'+_0x26f918[_0xfd6f43(0xf0)]);}),console[_0x4ebb63(0x10a)](_0x11c2d0[_0x4ebb63(0x108)]);const _0x25960d=_0x560cc1[_0x4ebb63(0xe0)](_0xda17ce=>_0xda17ce+0x1)['join'](','),_0x2470b9=await _0x11c2d0[_0x4ebb63(0x107)](ask,'选择',{'defaultValue':_0x25960d}),_0x12193e=_0x2470b9['trim']()['toLowerCase']();if('a'===_0x12193e||_0x11c2d0['zyykw']===_0x12193e)return _0x4324bc[_0x4ebb63(0xe0)]((_0x592f83,_0x4785bc)=>_0x4785bc);if(_0x11c2d0[_0x4ebb63(0x10b)]('n',_0x12193e)||_0x11c2d0[_0x4ebb63(0xea)](_0x4ebb63(0xff),_0x12193e))return[];const _0x390f98=_0x2470b9['split'](/[,\s]+/)[_0x4ebb63(0xe0)](_0xa0d2ad=>parseInt(_0xa0d2ad,0xa))[_0x4ebb63(0xec)](_0x512cda=>!isNaN(_0x512cda)&&_0x512cda>=0x1&&_0x512cda<=_0x4324bc['length'])[_0x4ebb63(0xe0)](_0x49d9a6=>_0x49d9a6-0x1);return[...new Set(_0x390f98)];}export async function select(_0x6fd961,_0x2f4eed,{defaultIndex:_0x6dfea9=0x0}={}){const _0x4e3480=_0xb632,_0x39f784={'pQSNP':function(_0x453844,_0x171cbe){return _0x453844+_0x171cbe;},'miSvM':function(_0xad5475,_0x451bce){return _0xad5475===_0x451bce;},'txFDn':function(_0x29ac62){return _0x29ac62();},'VQhnr':'选择序号','vAgbx':function(_0x2f12c2,_0x1aa303){return _0x2f12c2(_0x1aa303);},'oDfLL':function(_0x2a767d,_0x1dbe2b){return _0x2a767d+_0x1dbe2b;},'bZGHq':function(_0x475580,_0x3e3dcc,_0x5977ec){return _0x475580(_0x3e3dcc,_0x5977ec);},'yyXYi':function(_0x4be7fe,_0x306176){return _0x4be7fe<_0x306176;},'rnwEU':function(_0x3bfe09,_0x2e8ea6){return _0x3bfe09>_0x2e8ea6;}};if(_0x39f784['miSvM'](0x0,_0x2f4eed[_0x4e3480(0xf3)]))return-0x1;if(_0x39f784[_0x4e3480(0x117)](0x1,_0x2f4eed[_0x4e3480(0xf3)]))return 0x0;if(r()){const _0x443a06=await _0x39f784[_0x4e3480(0xe2)](n),_0x377094=_0x2f4eed['map']((_0x61f736,_0x192e4a)=>({'name':_0x61f736[_0x4e3480(0xf0)],'value':_0x192e4a}));return _0x443a06[_0x4e3480(0xf4)]({'message':_0x6fd961,'choices':_0x377094,'default':_0x6dfea9,'loop':!0x1});}console[_0x4e3480(0x10a)](_0x6fd961),_0x2f4eed[_0x4e3480(0x119)]((_0x1a7987,_0x4cebdb)=>{const _0x346c02=_0x4e3480,_0x28fac9=_0x4cebdb===_0x6dfea9?_0x346c02(0x105):'';console[_0x346c02(0x10a)]('\x20\x20'+_0x39f784[_0x346c02(0xe3)](_0x4cebdb,0x1)+'.\x20'+_0x1a7987[_0x346c02(0xf0)]+_0x28fac9);});const _0x134a63=await ask(_0x39f784['VQhnr'],{'defaultValue':_0x39f784[_0x4e3480(0x11e)](String,_0x39f784['oDfLL'](_0x6dfea9,0x1))}),_0x49bf89=_0x39f784[_0x4e3480(0xfd)](parseInt,_0x134a63,0xa);return _0x39f784['vAgbx'](isNaN,_0x49bf89)||_0x39f784[_0x4e3480(0x113)](_0x49bf89,0x1)||_0x39f784[_0x4e3480(0x106)](_0x49bf89,_0x2f4eed[_0x4e3480(0xf3)])?_0x6dfea9:_0x49bf89-0x1;}export async function confirm(_0x129947,{defaultValue:_0x4e64db=!0x0}={}){const _0x2e20b1=_0xb632,_0x58ef20={'kvbQo':function(_0x1324b7){return _0x1324b7();},'vplUM':'y/N','wJuRU':function(_0x3aeb14,_0x40aa99){return _0x3aeb14===_0x40aa99;},'wCgWD':_0x2e20b1(0x100)};if(_0x58ef20[_0x2e20b1(0x10e)](r))return(await _0x58ef20[_0x2e20b1(0x10e)](n))['confirm']({'message':_0x129947,'default':_0x4e64db});const _0x56a11e=_0x4e64db?_0x2e20b1(0x10c):_0x58ef20[_0x2e20b1(0x115)],_0x562976=(await ask(_0x129947+'\x20('+_0x56a11e+')',{'defaultValue':_0x4e64db?'y':'n'}))[_0x2e20b1(0x11b)]()[_0x2e20b1(0x102)]();return _0x562976?_0x58ef20['wJuRU']('y',_0x562976)||_0x58ef20[_0x2e20b1(0x123)](_0x58ef20['wCgWD'],_0x562976):_0x4e64db;}
|
package/dist/lib/render.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x5c47a4=_0x5079;(function(_0x443fea,_0xe571fa){const _0x33f2e1=_0x5079,_0x257811=_0x443fea();while(!![]){try{const _0x2d5dcc=parseInt(_0x33f2e1(0x211))/0x1*(parseInt(_0x33f2e1(0x204))/0x2)+-parseInt(_0x33f2e1(0x20d))/0x3*(parseInt(_0x33f2e1(0x1f9))/0x4)+parseInt(_0x33f2e1(0x212))/0x5+-parseInt(_0x33f2e1(0x20b))/0x6*(parseInt(_0x33f2e1(0x20a))/0x7)+-parseInt(_0x33f2e1(0x21c))/0x8*(parseInt(_0x33f2e1(0x1ee))/0x9)+-parseInt(_0x33f2e1(0x21b))/0xa*(parseInt(_0x33f2e1(0x203))/0xb)+parseInt(_0x33f2e1(0x1fc))/0xc*(parseInt(_0x33f2e1(0x213))/0xd);if(_0x2d5dcc===_0xe571fa)break;else _0x257811['push'](_0x257811['shift']());}catch(_0x16f4b0){_0x257811['push'](_0x257811['shift']());}}}(_0x3c92,0xb4feb));function _0x3c92(){const _0x463ade=['192VCapWw','AOrEA','antigravityApiBaseBeta','isInteger','match','isArray','env','39666hULOyb','396158uXHbTm','auto_compact','map','LIEgF','LveCo','WzAZT','357DFdYSI','123540gmRgFY','object','792237XZfcWv','defaultModel','sort','includes','5XQHpvM','1892905dkYrsm','2152735wFNaWL','join','length','ZoqxF','veFGj','keWCm','filter','apiBaseBeta','3550EKiIZb','8KfmWJp','IUKIW','slice','split','ZsBub','6145578ugMEAF','toLowerCase','bTpPT','qGPNl','RymHQ','USERPROFILE','context','startsWith','baseUrl','vhlDn','apiKey','4KrUeNl','antigravityApiBase','replace'];_0x3c92=function(){return _0x463ade;};return _0x3c92();}export const PLACEHOLDERS=[_0x5c47a4(0x1f8),_0x5c47a4(0x1f6),'apiBase',_0x5c47a4(0x21a),_0x5c47a4(0x1fa),_0x5c47a4(0x1fe),_0x5c47a4(0x20e)];export function renderContent(_0x582e5a,_0x5618b7){const _0x5a99ce=_0x5c47a4,_0x1da060={'AOrEA':function(_0x1c1604,_0x2a3b20){return _0x1c1604(_0x2a3b20);}};if(!_0x582e5a)return'';let _0xea8480=_0x582e5a;for(const _0x4ed9e6 of PLACEHOLDERS){const _0x1de084=_0x5618b7[_0x4ed9e6];null!=_0x1de084&&(_0xea8480=_0xea8480[_0x5a99ce(0x1ec)]('{{'+_0x4ed9e6+'}}')[_0x5a99ce(0x214)](_0x1da060[_0x5a99ce(0x1fd)](String,_0x1de084)));}return _0xea8480;}const t='{{modelContextWindow}}',e='{{autoCompactTokenLimit}}';export function applyModelContextWindow(_0x30000d,_0x483304,_0x3a3933){const _0x5948aa=_0x5c47a4,_0x3ca424={'bTpPT':function(_0x59449f,_0x1f835b){return _0x59449f==_0x1f835b;},'vhlDn':function(_0x3ad5d5,_0x1fcca7){return _0x3ad5d5(_0x1fcca7);},'veFGj':function(_0x23bc07,_0x12f948){return _0x23bc07>_0x12f948;},'yGBzZ':function(_0x281c73,_0x1aea88){return _0x281c73>=_0x1aea88;},'qGPNl':function(_0x20ec18,_0x1c79f9){return _0x20ec18(_0x1c79f9);}};if(!_0x30000d)return'';if(!_0x30000d[_0x5948aa(0x210)](t)&&!_0x30000d[_0x5948aa(0x210)](e))return _0x30000d;const _0x17b384=_0x483304&&_0x3ca424[_0x5948aa(0x1f0)](_0x5948aa(0x20c),typeof _0x483304)?_0x483304[_0x3a3933]:null,_0x145082=_0x17b384?_0x3ca424[_0x5948aa(0x1f7)](Number,_0x17b384[_0x5948aa(0x1f4)]):NaN,_0x39334d=_0x17b384?Number(_0x17b384[_0x5948aa(0x205)]):NaN;return Number[_0x5948aa(0x1ff)](_0x145082)&&_0x3ca424[_0x5948aa(0x217)](_0x145082,0x0)&&Number[_0x5948aa(0x1ff)](_0x39334d)&&_0x3ca424['yGBzZ'](_0x39334d,0x0)?_0x30000d[_0x5948aa(0x1ec)](t)[_0x5948aa(0x214)](_0x3ca424['vhlDn'](String,_0x145082))[_0x5948aa(0x1ec)](e)[_0x5948aa(0x214)](_0x3ca424[_0x5948aa(0x1f1)](String,_0x39334d)):_0x30000d['split']('\x0a')[_0x5948aa(0x219)](_0xaeb3c7=>!_0xaeb3c7[_0x5948aa(0x210)](t)&&!_0xaeb3c7[_0x5948aa(0x210)](e))[_0x5948aa(0x214)]('\x0a');}export function expandPath(_0x4de5a4,{isWindows:_0x4af54f}={}){const _0x280dd5=_0x5c47a4,_0x5bcea8={'WzAZT':function(_0x271b9c,_0x8b7349){return _0x271b9c===_0x8b7349;},'oEpzY':function(_0x215419,_0x12036f){return _0x215419+_0x12036f;}};if(!_0x4de5a4)return _0x4de5a4;if(_0x4af54f){const _0x2e88da=process[_0x280dd5(0x202)][_0x280dd5(0x1f3)]||'';return _0x4de5a4[_0x280dd5(0x1fb)](/^%userprofile%/i,_0x2e88da)[_0x280dd5(0x1fb)](/^~/,_0x2e88da);}const _0x12cc22=process[_0x280dd5(0x202)]['HOME']||'';return _0x5bcea8[_0x280dd5(0x209)]('~',_0x4de5a4)?_0x12cc22:_0x4de5a4[_0x280dd5(0x1f5)]('~/')?_0x5bcea8['oEpzY'](_0x12cc22,_0x4de5a4[_0x280dd5(0x1eb)](0x1)):_0x4de5a4;}function n(_0xfc86d4){const _0x1a003a=_0x5c47a4,_0x4486d4={'ZsBub':function(_0x24ffa8,_0x20d355){return _0x24ffa8(_0x20d355);},'LIEgF':function(_0x2729fe,_0x22095c){return _0x2729fe||_0x22095c;},'ZoqxF':function(_0x5dea2f,_0x52f735,_0x3b3de2){return _0x5dea2f(_0x52f735,_0x3b3de2);}},_0x3ac91d=_0x4486d4[_0x1a003a(0x1ed)](String,_0x4486d4[_0x1a003a(0x207)](_0xfc86d4,''))[_0x1a003a(0x1ef)]()[_0x1a003a(0x200)](/(\d+)\.(\d+)/);return _0x3ac91d?[parseInt(_0x3ac91d[0x1],0xa),_0x4486d4[_0x1a003a(0x216)](parseInt,_0x3ac91d[0x2],0xa)]:[0x0,0x0];}function _0x5079(_0x4ea198,_0x11321f){_0x4ea198=_0x4ea198-0x1ea;const _0x3c92f8=_0x3c92();let _0x5079d5=_0x3c92f8[_0x4ea198];return _0x5079d5;}export function listModels(_0x5f219e){const _0x2b072c=_0x5c47a4,_0x34c736={'keWCm':function(_0x41ae31,_0x39dc08){return _0x41ae31==_0x39dc08;},'LveCo':function(_0x21d233,_0x3cb3aa){return _0x21d233(_0x3cb3aa);},'IUKIW':function(_0x20511e,_0x3b3423){return _0x20511e-_0x3b3423;},'RymHQ':function(_0x39a745,_0x310f61){return _0x39a745===_0x310f61;}};if(!Array[_0x2b072c(0x201)](_0x5f219e)||_0x34c736[_0x2b072c(0x1f2)](0x0,_0x5f219e[_0x2b072c(0x215)]))return[];const _0x2754a0=_0x5f219e[_0x2b072c(0x206)]((_0xbdfc49,_0x3a5eb3)=>{const _0x4170bc=_0x2b072c;if(_0x34c736[_0x4170bc(0x218)]('string',typeof _0xbdfc49))return{'index':_0x3a5eb3,'id':_0xbdfc49,'label':_0xbdfc49,'raw':_0xbdfc49};const _0x2a4054=_0xbdfc49['id']||_0xbdfc49['name']||_0x34c736[_0x4170bc(0x208)](String,_0xbdfc49);return{'index':_0x3a5eb3,'id':_0x2a4054,'label':_0xbdfc49['name']||_0xbdfc49['id']||_0x2a4054,'raw':_0xbdfc49};});return _0x2754a0[_0x2b072c(0x20f)]((_0x19bb1b,_0x3aff74)=>{const _0x782f5c=_0x2b072c,_0x377965=_0x34c736[_0x782f5c(0x208)](n,_0x19bb1b['id']),_0x58af75=_0x34c736[_0x782f5c(0x208)](n,_0x3aff74['id']);return _0x58af75[0x0]-_0x377965[0x0]||_0x34c736[_0x782f5c(0x1ea)](_0x58af75[0x1],_0x377965[0x1])||String(_0x19bb1b['id'])['localeCompare'](_0x34c736[_0x782f5c(0x208)](String,_0x3aff74['id']));}),_0x2754a0;}
|
package/dist/lib/ui.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1dfcce=_0x3c14;(function(_0xb4406d,_0x10417f){const _0x28301b=_0x3c14,_0x3bb8a5=_0xb4406d();while(!![]){try{const _0x5095da=-parseInt(_0x28301b(0xbe))/0x1+-parseInt(_0x28301b(0xc3))/0x2+parseInt(_0x28301b(0xb2))/0x3*(-parseInt(_0x28301b(0xac))/0x4)+parseInt(_0x28301b(0xc0))/0x5+parseInt(_0x28301b(0xab))/0x6+-parseInt(_0x28301b(0xc2))/0x7+parseInt(_0x28301b(0xb8))/0x8;if(_0x5095da===_0x10417f)break;else _0x3bb8a5['push'](_0x3bb8a5['shift']());}catch(_0x2a565b){_0x3bb8a5['push'](_0x3bb8a5['shift']());}}}(_0x444a,0x7bf63));function _0x3c14(_0x30ce63,_0x374ff3){_0x30ce63=_0x30ce63-0xab;const _0x444a8b=_0x444a();let _0x3c14e9=_0x444a8b[_0x30ce63];return _0x3c14e9;}import _0x2bdcd7 from'chalk';function _0x444a(){const _0x4dbab1=['2055582egnEHG','260200DajLKy','dim','warn','yellow','usage','\x20\x20____\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20_\x20\x20\x20\x20\x20\x20\x20_\x0a\x20|___\x20\x5c\x20__\x20_\x20_\x20__\x20(_)\x20\x20___|\x20|_\x20___\x20\x20_\x20__\x20___\x0a\x20\x20\x20__)\x20/\x20_`\x20|\x20\x27_\x20\x5c|\x20|\x20/\x20__|\x20__/\x20_\x20\x5c|\x20\x27__/\x20_\x20\x5c\x0a\x20\x20/\x20__/\x20(_|\x20|\x20|_)\x20|\x20|_\x5c__\x20\x5c\x20||\x20(_)\x20|\x20|\x20|\x20\x20__/\x0a\x20|_____\x5c__,_|\x20.__/|_(_)___/\x5c__\x5c___/|_|\x20\x20\x5c___|\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20|_|\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20v','24FPQoRN','trimEnd','log','green','version','name','19032992jJVcHL','bold','length','启动\x20/\x20使用指南','\x20\x20\x20\x20启动:','blue','647283xJeZOF','\x20\x20▶\x20','70485wMYWAx','error','4091556tWQolo','951760hQsHSv'];_0x444a=function(){return _0x4dbab1;};return _0x444a();}import{createRequire as _0x2d1b8a}from'node:module';const n=_0x1dfcce(0xb1)+_0x2d1b8a(import.meta.url)('../package.json')[_0x1dfcce(0xb6)];export function banner(){const _0x411793=_0x1dfcce;console[_0x411793(0xb4)](_0x2bdcd7['bold']['cyan'](n['replace'](/^\n/,'')[_0x411793(0xb3)]()));}export function ok(_0x28e5e8){const _0x3e9380=_0x1dfcce;console[_0x3e9380(0xb4)](_0x2bdcd7[_0x3e9380(0xb5)]('✓\x20'+_0x28e5e8));}export function fail(_0x2904f5){const _0x56eb02=_0x1dfcce;console[_0x56eb02(0xc1)](_0x2bdcd7['red']('✗\x20'+_0x2904f5));}export function warn(_0x116941){const _0xa4d0b7=_0x1dfcce;console[_0xa4d0b7(0xae)](_0x2bdcd7[_0xa4d0b7(0xaf)]('⚠\x20'+_0x116941));}export function info(_0x3c784c){const _0x42fdb9=_0x1dfcce;console[_0x42fdb9(0xb4)](_0x2bdcd7[_0x42fdb9(0xbd)]('ℹ\x20'+_0x3c784c));}export function step(_0x58c4df){const _0x58d272=_0x1dfcce;console[_0x58d272(0xb4)](),console[_0x58d272(0xb4)](_0x2bdcd7[_0x58d272(0xb9)]['cyan']('■\x20'+_0x58c4df));}export function guide(_0x3ea464){const _0x95f659=_0x1dfcce,_0x2a40ae={'ZgKmy':_0x95f659(0xbb)};if(_0x3ea464&&0x0!==_0x3ea464[_0x95f659(0xba)]){step(_0x2a40ae['ZgKmy']);for(const _0x4b54b8 of _0x3ea464){const _0x5bfc57=_0x2bdcd7[_0x95f659(0xb9)]['green'](_0x95f659(0xbf)+_0x4b54b8[_0x95f659(0xb7)]),_0x1cb186=_0x2bdcd7[_0x95f659(0xb5)](_0x95f659(0xbc)+_0x4b54b8['startCmd']),_0x167c96=_0x2bdcd7[_0x95f659(0xad)](_0x4b54b8[_0x95f659(0xb0)]||'');console['log'](_0x5bfc57),console['log'](_0x1cb186),_0x167c96&&console[_0x95f659(0xb4)](_0x167c96),console[_0x95f659(0xb4)]();}}}export function plain(_0x40b819){const _0x2921ad=_0x1dfcce;console[_0x2921ad(0xb4)](_0x40b819);}export{_0x2bdcd7 as chalk};
|
package/dist/lib/write.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x22f604=_0x4a07;(function(_0x5f0396,_0x2a15fb){const _0x3fdc60=_0x4a07,_0x118f0e=_0x5f0396();while(!![]){try{const _0x28fe9d=-parseInt(_0x3fdc60(0x10f))/0x1*(parseInt(_0x3fdc60(0x10a))/0x2)+parseInt(_0x3fdc60(0x101))/0x3*(parseInt(_0x3fdc60(0x11d))/0x4)+parseInt(_0x3fdc60(0x117))/0x5*(parseInt(_0x3fdc60(0x111))/0x6)+parseInt(_0x3fdc60(0x116))/0x7+-parseInt(_0x3fdc60(0x10b))/0x8+parseInt(_0x3fdc60(0x112))/0x9+-parseInt(_0x3fdc60(0x115))/0xa;if(_0x28fe9d===_0x2a15fb)break;else _0x118f0e['push'](_0x118f0e['shift']());}catch(_0x4642a6){_0x118f0e['push'](_0x118f0e['shift']());}}}(_0x1096,0x293c9));function _0x4a07(_0x4ed579,_0x166259){_0x4ed579=_0x4ed579-0x100;const _0x109634=_0x1096();let _0x4a0713=_0x109634[_0x4ed579];return _0x4a0713;}function _0x1096(){const _0x4f58b0=['1646316FtuQZT','writeFileSync','GbaGA','508180FySeqd','1455097aXGDue','637365yBjTOI','EACCES','mkdirSync','PermissionDeniedError','请用\x20sudo\x20重跑:\x0a\x20\x20\x20\x20sudo\x20npx\x20-y\x20@2api-store/activate','请用「管理员\x20PowerShell」重跑:\x0a\x20\x20\x20\x20Start-Process\x20powershell\x20-Verb\x20RunAs\x20-ArgumentList\x20\x22npx,-y,@2api-store/activate\x22','84FOKOLn','lFYee','603TmwLBn','EPERM','写入失败:','has','utf8','message','path','name','EROFS','382374WlXPLv','892632FKljyI','code','SIOeN','dirname','1hjMSDf',')\x0a\x20\x20','6IyoaEv'];_0x1096=function(){return _0x4f58b0;};return _0x1096();}import _0x14749c from'node:fs';import _0x31b14d from'node:path';const o=new Set([_0x22f604(0x118),_0x22f604(0x102),_0x22f604(0x109)]);export class PermissionDeniedError extends Error{constructor(_0x59964d,_0x53886c,_0x58de3d){const _0x5407a1=_0x22f604,_0x52b94f={'SIOeN':_0x5407a1(0x11c),'lFYee':_0x5407a1(0x11b),'oQhYl':_0x5407a1(0x11a)},_0x3a2bb5=_0x58de3d?_0x52b94f[_0x5407a1(0x10d)]:_0x52b94f[_0x5407a1(0x100)];super(_0x5407a1(0x103)+_0x59964d+'('+(_0x53886c[_0x5407a1(0x10c)]||_0x53886c[_0x5407a1(0x106)])+_0x5407a1(0x110)+_0x3a2bb5),this[_0x5407a1(0x108)]=_0x52b94f['oQhYl'],this[_0x5407a1(0x10c)]=_0x53886c['code'],this[_0x5407a1(0x107)]=_0x59964d,this['cause']=_0x53886c;}}export function writeFileWithPermission(_0x5a5beb,_0x3187b5,{isWindows:_0x1fc610=!0x1}={}){const _0x27e91c=_0x22f604,_0x6c7032={'GbaGA':_0x27e91c(0x105)},_0x4f576e=_0x31b14d[_0x27e91c(0x10e)](_0x5a5beb);try{_0x14749c[_0x27e91c(0x119)](_0x4f576e,{'recursive':!0x0});}catch(_0x261dbf){if(o[_0x27e91c(0x104)](_0x261dbf['code']))throw new PermissionDeniedError(_0x5a5beb,_0x261dbf,_0x1fc610);throw _0x261dbf;}try{_0x14749c[_0x27e91c(0x113)](_0x5a5beb,_0x3187b5,{'encoding':_0x6c7032[_0x27e91c(0x114)],'mode':0x180});}catch(_0x2a88dc){if(o[_0x27e91c(0x104)](_0x2a88dc[_0x27e91c(0x10c)]))throw new PermissionDeniedError(_0x5a5beb,_0x2a88dc,_0x1fc610);throw _0x2a88dc;}return _0x5a5beb;}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2api-store/activate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "TokenShop CLI 一键激活:配置本地 codex/claude/gemini/grok/opencode 指向 2api.store 中转(彩色输出 + 自动安装 CLI)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"author": "TokenShop",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@inquirer/prompts": "^7.0.0",
|
|
37
|
-
"chalk": "^5.4.0"
|
|
37
|
+
"chalk": "^5.4.0",
|
|
38
|
+
"fflate": "^0.8.3"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"javascript-obfuscator": "^4.1.0",
|