@lovrabet/cli 1.3.0 → 1.3.2-beta.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.
Files changed (80) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/ai-setup/AISetupUI.js +1 -1
  5. package/lib/ai-setup/config.js +1 -1
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli-flags.js +1 -0
  31. package/lib/cli.js +1 -1
  32. package/lib/cmd/build-watch.js +1 -1
  33. package/lib/cmd/build.js +1 -1
  34. package/lib/cmd/logs.js +1 -1
  35. package/lib/cmd/preview.js +1 -1
  36. package/lib/cmd/start.js +1 -1
  37. package/lib/config/config-help.js +1 -1
  38. package/lib/config/main.js +1 -1
  39. package/lib/constant/domain.js +1 -1
  40. package/lib/constant/env.js +1 -1
  41. package/lib/create-app/enhanced-guided-create.js +1 -1
  42. package/lib/create-app/format-elapsed.js +1 -1
  43. package/lib/create-app/main.js +1 -1
  44. package/lib/create-app/non-interactive.js +1 -1
  45. package/lib/create-app/task-finished.js +1 -1
  46. package/lib/create-app/task-loading.js +1 -1
  47. package/lib/create-app/task-running.js +1 -1
  48. package/lib/create-app/task-time.js +1 -1
  49. package/lib/create-app/use-copy-project-template.js +1 -1
  50. package/lib/create-app/use-format-code.js +1 -1
  51. package/lib/create-app/use-install-dependencies.js +1 -1
  52. package/lib/help.js +1 -1
  53. package/lib/init/main.js +1 -1
  54. package/lib/mcp/McpInstallUI.js +1 -1
  55. package/lib/mcp/claude.js +1 -1
  56. package/lib/mcp/cursor.js +1 -1
  57. package/lib/mcp/main.js +1 -1
  58. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  59. package/lib/mcp/mcp-installer.js +1 -1
  60. package/lib/skills/SkillInstallUI.js +1 -1
  61. package/lib/skills/main.js +1 -1
  62. package/lib/skills/skill-install-non-interactive.js +1 -1
  63. package/lib/skills/skill-installer.js +1 -1
  64. package/lib/ui/IDESelector.js +1 -1
  65. package/lib/ui/useIDESelection.js +1 -1
  66. package/lib/utils/ai_config.js +1 -1
  67. package/lib/utils/cdn-config.js +1 -1
  68. package/lib/utils/check-sdk-version.js +1 -1
  69. package/lib/utils/cli-version-check.js +1 -1
  70. package/lib/utils/config.js +1 -1
  71. package/lib/utils/copy-directory.js +1 -1
  72. package/lib/utils/file-utils.js +1 -1
  73. package/lib/utils/guides-cdn.js +1 -1
  74. package/lib/utils/http-client.js +1 -1
  75. package/lib/utils/logger.js +1 -1
  76. package/lib/utils/router-updater.js +1 -1
  77. package/lib/utils/rules-cdn.js +1 -1
  78. package/lib/utils/sleep.js +1 -1
  79. package/lib/utils/template-replacer.js +1 -1
  80. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x1ef83c,_0x658f4e){const _0x29f85d=a11_0x2499,_0x42230c=_0x1ef83c();while(!![]){try{const _0x2f7c51=-parseInt(_0x29f85d(0x1d2))/0x1+parseInt(_0x29f85d(0x1d0))/0x2*(parseInt(_0x29f85d(0x1b9))/0x3)+-parseInt(_0x29f85d(0x1c9))/0x4+-parseInt(_0x29f85d(0x1c0))/0x5+parseInt(_0x29f85d(0x1cd))/0x6+-parseInt(_0x29f85d(0x1b4))/0x7*(parseInt(_0x29f85d(0x1be))/0x8)+parseInt(_0x29f85d(0x1c8))/0x9*(parseInt(_0x29f85d(0x1b8))/0xa);if(_0x2f7c51===_0x658f4e)break;else _0x42230c['push'](_0x42230c['shift']());}catch(_0x472335){_0x42230c['push'](_0x42230c['shift']());}}}(a11_0x165a,0xc72c7));function a11_0x2499(_0x5a36d0,_0x30bf3c){_0x5a36d0=_0x5a36d0-0x1b1;const _0x165a75=a11_0x165a();let _0x249950=_0x165a75[_0x5a36d0];return _0x249950;}import{readConfig}from'../utils/config.js';import{initEnv}from'../constant/env.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';export async function pullApiSilent(_0x403bbb,_0x4260cf,_0x3a46ad,_0x499e16){const _0x31913d=a11_0x2499;let _0x5467de;try{const _0x3e314c=_0x4260cf?.[_0x31913d(0x1cc)]()||'';if(_0x3e314c){const _0x518add=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0x518add[_0x31913d(0x1c2)](_0x3e314c))return console[_0x31913d(0x1b6)](_0x31913d(0x1c7)),![];}_0x3a46ad&&(_0x5467de=process['cwd'](),process[_0x31913d(0x1c5)](_0x3a46ad));const _0x2b2ec2=readConfig(),_0x53f7b3=typeof _0x2b2ec2[_0x31913d(0x1d3)]===_0x31913d(0x1c1)?_0x2b2ec2[_0x31913d(0x1d3)]:undefined,_0x5f3700=_0x499e16||_0x53f7b3||_0x31913d(0x1bf);initEnv(_0x5f3700),console[_0x31913d(0x1d1)]('*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20'+_0x5f3700+')');const {configArray:_0x27b735}=await fetchModelList(_0x403bbb),_0x5bed24=_0x3e314c?_0x3e314c+_0x31913d(0x1cf):_0x31913d(0x1bc),_0x113666=_0x3e314c?_0x3e314c+_0x31913d(0x1c4):_0x31913d(0x1b3);console[_0x31913d(0x1d1)](_0x31913d(0x1ce)),console[_0x31913d(0x1d1)]('\x20\x20\x20•\x20'+_0x5bed24+'.ts\x20-\x20模型配置文件'),console['log']('\x20\x20\x20•\x20'+_0x113666+_0x31913d(0x1b5)),console[_0x31913d(0x1d1)](_0x31913d(0x1b1)+_0x27b735[_0x31913d(0x1c6)]+_0x31913d(0x1c3));const _0x1fce1e=await generateApiFile(_0x27b735,_0x3e314c,_0x403bbb,!![],_0x5f3700);return console['log']('√\x20成功拉取\x20'+_0x27b735[_0x31913d(0x1c6)]+_0x31913d(0x1d4)+_0x1fce1e[_0x31913d(0x1b2)]+_0x31913d(0x1bb)),_0x3a46ad&&logger[_0x31913d(0x1ba)](_0x31913d(0x1cb),_0x31913d(0x1bd)+_0x403bbb,{'projectPath':_0x3a46ad,'appCode':_0x403bbb,'datasetCount':_0x27b735[_0x31913d(0x1c6)],'filePrefix':_0x3e314c}),!![];}catch(_0x53f46c){const _0x16f81a=_0x53f46c instanceof Error?_0x53f46c['message']:String(_0x53f46c);return console['error'](_0x31913d(0x1b7),_0x16f81a),_0x3a46ad&&logger[_0x31913d(0x1b6)](_0x31913d(0x1cb),_0x31913d(0x1ca)+_0x16f81a,{'appCode':_0x403bbb,'projectPath':_0x3a46ad}),![];}finally{_0x5467de&&process[_0x31913d(0x1c5)](_0x5467de);}}function a11_0x165a(){const _0x9e106=['\x20个模型','api','API\x20配置拉取成功:\x20','9496IWRAQx','online','1427335ylfEeF','string','test','\x20个数据集...','-client','chdir','length','×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。','72ORpsoz','1244052DpLVjZ','API\x20配置拉取异常:\x20','create-api-pull','trim','9340092mTeRpv','*\x20开始生成\x20API\x20配置文件:','-api','58PPEbKA','log','432218vbnEeL','env','\x20个数据集,生成\x20','*\x20正在处理\x20','modelCount','client','5838gVpvzw','.ts\x20-\x20客户端实例文件','error','×\x20API\x20配置拉取异常:','330190faezor','104859OfiDHz','info'];a11_0x165a=function(){return _0x9e106;};return a11_0x165a();}
1
+ (function(_0x4e97a5,_0x5f21b9){const _0x23895a=a11_0x5c49,_0x312572=_0x4e97a5();while(!![]){try{const _0x1b876c=parseInt(_0x23895a(0xfd))/0x1+-parseInt(_0x23895a(0xf3))/0x2+-parseInt(_0x23895a(0xe8))/0x3*(parseInt(_0x23895a(0xec))/0x4)+-parseInt(_0x23895a(0xe0))/0x5+-parseInt(_0x23895a(0xf1))/0x6*(-parseInt(_0x23895a(0xdc))/0x7)+parseInt(_0x23895a(0xde))/0x8*(-parseInt(_0x23895a(0xe3))/0x9)+parseInt(_0x23895a(0xf7))/0xa;if(_0x1b876c===_0x5f21b9)break;else _0x312572['push'](_0x312572['shift']());}catch(_0x351928){_0x312572['push'](_0x312572['shift']());}}}(a11_0x3daa,0x50e4b));import{readConfig}from'../utils/config.js';import{initEnv}from'../constant/env.js';function a11_0x5c49(_0x30acb6,_0x4e15c4){_0x30acb6=_0x30acb6-0xdc;const _0x3daa8f=a11_0x3daa();let _0x5c49d2=_0x3daa8f[_0x30acb6];return _0x5c49d2;}import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';function a11_0x3daa(){const _0x1bacc3=['*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','online','4WzdiGQ','message','API\x20配置拉取成功:\x20','\x20个数据集,生成\x20','env','18rJSObY','\x20个数据集...','1316814wDZnPQ','test','log','error','23068500FOqyXc','√\x20成功拉取\x20','length','\x20\x20\x20•\x20','-api','chdir','460789bWomKq','179032RsMqEn','API\x20配置拉取异常:\x20','8rndjUa','string','3012120PCeWeU','trim','*\x20正在处理\x20','5654862AmbPCg','modelCount','*\x20开始生成\x20API\x20配置文件:','api','create-api-pull','1871637VSlGBR','cwd'];a11_0x3daa=function(){return _0x1bacc3;};return a11_0x3daa();}export async function pullApiSilent(_0xb42dd8,_0x57c57a,_0x9fb716,_0x5107b0){const _0x59fdd9=a11_0x5c49;let _0x5c31c8;try{const _0x5ac851=_0x57c57a?.[_0x59fdd9(0xe1)]()||'';if(_0x5ac851){const _0xe336e5=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0xe336e5[_0x59fdd9(0xf4)](_0x5ac851))return console[_0x59fdd9(0xf6)]('×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。'),![];}_0x9fb716&&(_0x5c31c8=process[_0x59fdd9(0xe9)](),process[_0x59fdd9(0xfc)](_0x9fb716));const _0x5ba326=readConfig(),_0x2dc36e=typeof _0x5ba326[_0x59fdd9(0xf0)]===_0x59fdd9(0xdf)?_0x5ba326[_0x59fdd9(0xf0)]:undefined,_0x40894d=_0x5107b0||_0x2dc36e||_0x59fdd9(0xeb);initEnv(_0x40894d),console[_0x59fdd9(0xf5)](_0x59fdd9(0xea)+_0x40894d+')');const {configArray:_0x368f1f}=await fetchModelList(_0xb42dd8),_0x5e22d2=_0x5ac851?_0x5ac851+_0x59fdd9(0xfb):_0x59fdd9(0xe6),_0x1b0928=_0x5ac851?_0x5ac851+'-client':'client';console[_0x59fdd9(0xf5)](_0x59fdd9(0xe5)),console[_0x59fdd9(0xf5)](_0x59fdd9(0xfa)+_0x5e22d2+'.ts\x20-\x20模型配置文件'),console[_0x59fdd9(0xf5)](_0x59fdd9(0xfa)+_0x1b0928+'.ts\x20-\x20客户端实例文件'),console['log'](_0x59fdd9(0xe2)+_0x368f1f['length']+_0x59fdd9(0xf2));const _0x118ae5=await generateApiFile(_0x368f1f,_0x5ac851,_0xb42dd8,!![],_0x40894d);return console[_0x59fdd9(0xf5)](_0x59fdd9(0xf8)+_0x368f1f[_0x59fdd9(0xf9)]+_0x59fdd9(0xef)+_0x118ae5[_0x59fdd9(0xe4)]+'\x20个模型'),_0x9fb716&&logger['info'](_0x59fdd9(0xe7),_0x59fdd9(0xee)+_0xb42dd8,{'projectPath':_0x9fb716,'appCode':_0xb42dd8,'datasetCount':_0x368f1f['length'],'filePrefix':_0x5ac851}),!![];}catch(_0x5d38e0){const _0x5b6080=_0x5d38e0 instanceof Error?_0x5d38e0[_0x59fdd9(0xed)]:String(_0x5d38e0);return console[_0x59fdd9(0xf6)]('×\x20API\x20配置拉取异常:',_0x5b6080),_0x9fb716&&logger[_0x59fdd9(0xf6)](_0x59fdd9(0xe7),_0x59fdd9(0xdd)+_0x5b6080,{'appCode':_0xb42dd8,'projectPath':_0x9fb716}),![];}finally{_0x5c31c8&&process['chdir'](_0x5c31c8);}}
@@ -1 +1 @@
1
- (function(_0xfcb02c,_0x2c9a0d){const _0x413d1c=a12_0x205b,_0x20e813=_0xfcb02c();while(!![]){try{const _0xbd0c77=parseInt(_0x413d1c(0xf3))/0x1+-parseInt(_0x413d1c(0xf6))/0x2*(-parseInt(_0x413d1c(0xe9))/0x3)+-parseInt(_0x413d1c(0xea))/0x4+parseInt(_0x413d1c(0x11c))/0x5*(parseInt(_0x413d1c(0xf9))/0x6)+parseInt(_0x413d1c(0x10a))/0x7*(parseInt(_0x413d1c(0x10d))/0x8)+parseInt(_0x413d1c(0xf8))/0x9*(-parseInt(_0x413d1c(0xec))/0xa)+-parseInt(_0x413d1c(0xe4))/0xb*(parseInt(_0x413d1c(0xe6))/0xc);if(_0xbd0c77===_0x2c9a0d)break;else _0x20e813['push'](_0x20e813['shift']());}catch(_0x33a646){_0x20e813['push'](_0x20e813['shift']());}}}(a12_0xa1da,0xb4ea3));function a12_0xa1da(){const _0x2e5501=['cyan','\x20命令重新登录','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','已选择菜单','CSS\x20链接无法访问','15DPkFuF','has','add','message','slice','*\x20正在创建菜单...','red','[\x20]','map','upArrow','Lovrabet平台','gray','selecting','*\x20CSS\x20链接:\x20','creating','join','170995ciBCAQ','√\x20菜单创建完成','1884vFWzwx','请输入有效的\x20JS\x20https\x20链接','online','6UgWKXz','4182764ZbxHJv','*\x20同步菜单到\x20Lovrabet\x20平台','30ZHtIEV','yellow','fill','catch','创建菜单失败','\x20输入项目的\x20CSS\x20资源链接(https://...)','label','1142473cBujGZ','\x20正在获取线上菜单列表...','path','940854dwAtbs','菜单名称','549351muHmAP','2904546sxkLzQ','done','green','trim','请至少选择一个菜单','backspace','repeat','size','delete','*\x20JS\x20链接:\x20','includes','*\x20请选择要同步的菜单:','return','input-js','blue','dots','length','45360ZapGkc','test','local','1080QImOqL','CSS\x20链接','提示:使用\x20','column','[✓]','downArrow','filter','JS\x20链接','max','input-css'];a12_0xa1da=function(){return _0x2e5501;};return a12_0xa1da();}import{jsx as a12_0x28b941,jsxs as a12_0x24358c,Fragment as a12_0x3fdcea}from'react/jsx-runtime';function a12_0x205b(_0x4f82ca,_0x4489aa){_0x4f82ca=_0x4f82ca-0xd6;const _0xa1da6=a12_0xa1da();let _0x205b35=_0xa1da6[_0x4f82ca];return _0x205b35;}import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a12_0x3d6c72 from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';import{getLocalPages}from'./get-local-pages.js';import{createMenus}from'./create-menu.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a12_0x28b941(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x2cb44e=a12_0x205b,{exit:_0x5072e8}=useApp(),{loading:_0x360552,menuList:_0x1502d8,error:_0x538593}=useGetOnlineMenuList(),_0xd1abec=getLocalPages(),_0x270cb0=_0x1502d8[_0x2cb44e(0xdc)](_0x3e7a07=>_0x3e7a07['path']),_0x1df74b=[_0x2cb44e(0xf7),..._0xd1abec['map'](_0x39e2ef=>_0x39e2ef['label'])],_0x243ffc=getStringWidth(getMaxWidth(_0x1df74b,0x4)),_0x5bbe2b=getStringWidth(getMaxWidth(['菜单名称'])),[_0x45f135,_0x561698]=useState(_0x2cb44e(0xe0)),[_0x7dcc67,_0x4ea52d]=useState(new Set()),[_0x23dfeb,_0x50d6b8]=useState(0x0),[_0x102954,_0x433758]=useState(''),[_0x419722,_0x1a7ae3]=useState(''),[_0x39972d,_0x2d0a32]=useState(''),[_0x1360d8,_0x597138]=useState(''),[_0x3cf115,_0xe59bad]=useState([]),_0x480a8b=_0xd1abec[_0x2cb44e(0xdc)](_0x47e9ed=>({'label':_0x47e9ed[_0x2cb44e(0xf2)],'path':_0x47e9ed['path'],'local':!![],'online':_0x270cb0[_0x2cb44e(0x103)](_0x47e9ed['path'])})),_0x303bcc=_0xd1abec[_0x2cb44e(0x113)](_0x12e87d=>{const _0x28be4f=_0x2cb44e;return!_0x270cb0['includes'](_0x12e87d[_0x28be4f(0xf5)]);});useEffect(()=>{const _0x164236=_0x2cb44e;if(!_0x360552&&_0xd1abec[_0x164236(0x109)]>0x0&&_0x7dcc67[_0x164236(0x100)]===0x0){const _0x2efb07=new Set(_0xd1abec['map']((_0x2c9afd,_0x881e68)=>({'page':_0x2c9afd,'index':_0x881e68}))['filter'](({page:_0x26fc59})=>!_0x270cb0[_0x164236(0x103)](_0x26fc59['path']))[_0x164236(0xdc)](({index:_0x47663a})=>_0x47663a));_0x4ea52d(_0x2efb07);}},[_0x360552,_0xd1abec[_0x2cb44e(0x109)],_0x270cb0[_0x2cb44e(0x109)]]),useInput(async(_0x4ad4b8,_0x176cf3)=>{const _0x4f5bb6=_0x2cb44e;if(_0x45f135==='selecting'){if(_0x176cf3[_0x4f5bb6(0xdd)]){_0x50d6b8(_0xb7ada0=>_0xb7ada0>0x0?_0xb7ada0-0x1:_0xd1abec[_0x4f5bb6(0x109)]-0x1);return;}if(_0x176cf3[_0x4f5bb6(0x112)]){_0x50d6b8(_0x2ae23c=>_0x2ae23c<_0xd1abec[_0x4f5bb6(0x109)]-0x1?_0x2ae23c+0x1:0x0);return;}if(_0x4ad4b8==='\x20'){_0x4ea52d(_0x4c0128=>{const _0x37867a=new Set(_0x4c0128);return _0x37867a['has'](_0x23dfeb)?_0x37867a['delete'](_0x23dfeb):_0x37867a['add'](_0x23dfeb),_0x37867a;});return;}if(_0x4ad4b8==='a'||_0x4ad4b8==='A'){const _0x35d736=new Set(_0xd1abec['map']((_0x1cdbd6,_0x48659f)=>_0x48659f));_0x4ea52d(_0x35d736);return;}if(_0x4ad4b8==='i'||_0x4ad4b8==='I'||_0x4ad4b8==='r'||_0x4ad4b8==='R'){_0x4ea52d(_0x894f74=>{const _0x286cb3=_0x4f5bb6,_0xd3d641=new Set();for(let _0x173327=0x0;_0x173327<_0xd1abec[_0x286cb3(0x109)];_0x173327++){!_0x894f74[_0x286cb3(0x11d)](_0x173327)&&_0xd3d641[_0x286cb3(0xd6)](_0x173327);}return _0xd3d641;});return;}if(_0x4ad4b8==='q'||_0x4ad4b8==='Q'){_0x5072e8();return;}if(_0x176cf3[_0x4f5bb6(0x105)]){if(_0x7dcc67[_0x4f5bb6(0x100)]===0x0){_0x597138(_0x4f5bb6(0xfd));return;}const _0x236ec7=_0xd1abec[_0x4f5bb6(0x113)]((_0x22c0f7,_0x17351c)=>_0x7dcc67[_0x4f5bb6(0x11d)](_0x17351c)),_0x545c1c=_0x236ec7['map'](_0x265274=>_0x265274[_0x4f5bb6(0xf2)])[_0x4f5bb6(0xe3)](',\x20');_0xe59bad([{'label':_0x4f5bb6(0x11a),'value':_0x7dcc67[_0x4f5bb6(0x100)]+'\x20个'}]),_0x597138(''),_0x561698(_0x4f5bb6(0x106));return;}return;}if(_0x45f135===_0x4f5bb6(0x106)){if(_0x176cf3['return']){const _0x1f0740=_0x39972d[_0x4f5bb6(0xfc)]();if(_0x1f0740==='')return;if(!isValidJsHttpsUrl(_0x1f0740)){_0x597138(_0x4f5bb6(0xe7));return;}if(!await isUrlReachable(_0x1f0740)){_0x597138('JS\x20链接无法访问');return;}_0x433758(_0x1f0740),_0xe59bad(_0x65b37c=>[..._0x65b37c,{'label':_0x4f5bb6(0x114),'value':_0x1f0740}]),_0x2d0a32(''),_0x597138(''),_0x561698(_0x4f5bb6(0x116));return;}if(_0x176cf3[_0x4f5bb6(0xfe)]||_0x176cf3['delete']){_0x2d0a32(_0x4488b5=>_0x4488b5[_0x4f5bb6(0xd8)](0x0,-0x1)),_0x597138('');return;}_0x2d0a32(_0x19987c=>_0x19987c+_0x4ad4b8);return;}if(_0x45f135==='input-css'){if(_0x176cf3[_0x4f5bb6(0x105)]){const _0x3af9d9=_0x39972d[_0x4f5bb6(0xfc)]();if(_0x3af9d9==='')return;if(!isValidCssHttpsUrl(_0x3af9d9)){_0x597138('请输入有效的\x20CSS\x20https\x20链接');return;}if(!await isUrlReachable(_0x3af9d9)){_0x597138(_0x4f5bb6(0x11b));return;}_0x1a7ae3(_0x3af9d9),_0xe59bad(_0x4b225b=>[..._0x4b225b,{'label':_0x4f5bb6(0x10e),'value':_0x3af9d9}]),_0x2d0a32(''),_0x597138(''),_0x561698(_0x4f5bb6(0xe2));const _0xcb76d8=_0xd1abec[_0x4f5bb6(0x113)]((_0x345a41,_0x4e4192)=>_0x7dcc67[_0x4f5bb6(0x11d)](_0x4e4192));createMenus(_0xcb76d8,[_0x102954,_0x3af9d9])['then'](()=>{const _0x1f32e3=_0x4f5bb6;_0x561698(_0x1f32e3(0xfa)),setTimeout(()=>{_0x5072e8();},0x3e8);})[_0x4f5bb6(0xef)](_0x576d28=>{const _0x5d40dd=_0x4f5bb6;_0x597138(_0x576d28[_0x5d40dd(0xd7)]||_0x5d40dd(0xf0)),_0x561698(_0x5d40dd(0xe0));});return;}if(_0x176cf3[_0x4f5bb6(0xfe)]||_0x176cf3[_0x4f5bb6(0x101)]){_0x2d0a32(_0x13aac1=>_0x13aac1[_0x4f5bb6(0xd8)](0x0,-0x1)),_0x597138('');return;}_0x2d0a32(_0x22f12f=>_0x22f12f+_0x4ad4b8);return;}});if(_0x360552)return a12_0x24358c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x28b941(Text,{'children':'\x20\x20'}),a12_0x28b941(a12_0x3d6c72,{'type':_0x2cb44e(0x108)}),a12_0x28b941(Text,{'children':_0x2cb44e(0xf4)})]});if(_0x538593)return a12_0x24358c(Box,{'flexDirection':_0x2cb44e(0x110),'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x24358c(Text,{'color':'red','children':['✗\x20',_0x538593]}),a12_0x24358c(Box,{'marginTop':0x1,'children':[a12_0x28b941(Text,{'color':_0x2cb44e(0xdf),'children':_0x2cb44e(0x10f)}),a12_0x28b941(Text,{'color':_0x2cb44e(0x117),'children':'lovrabet\x20auth'}),a12_0x28b941(Text,{'color':_0x2cb44e(0xdf),'children':_0x2cb44e(0x118)})]})]});if(_0xd1abec[_0x2cb44e(0x109)]===0x0)return a12_0x28b941(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x28b941(Text,{'color':_0x2cb44e(0xed),'children':'!\x20未找到本地页面,请先创建页面'})});return a12_0x24358c(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[_0x45f135===_0x2cb44e(0xe0)&&a12_0x24358c(a12_0x3fdcea,{'children':[a12_0x24358c(Box,{'children':[a12_0x24358c(Text,{'bold':!![],'children':['\x20\x20','菜单名称',getRemainingSpaces(_0x243ffc,_0x2cb44e(0xf7))]}),a12_0x24358c(Text,{'bold':!![],'children':['本地',getRemainingSpaces(_0x5bbe2b,_0x2cb44e(0xf7))]}),a12_0x24358c(Text,{'bold':!![],'children':[_0x2cb44e(0xde),getRemainingSpaces(_0x5bbe2b,_0x2cb44e(0xf7))]})]}),_0x480a8b[_0x2cb44e(0xdc)](_0x4950e3=>a12_0x24358c(Box,{'children':[a12_0x24358c(Text,{'children':['\x20\x20',_0x4950e3[_0x2cb44e(0xf2)],getRemainingSpaces(_0x243ffc,_0x4950e3[_0x2cb44e(0xf2)])]}),a12_0x24358c(Text,{'color':_0x2cb44e(0xfb),'children':[_0x4950e3[_0x2cb44e(0x10c)]?'✓':'✗',getRemainingSpaces(_0x5bbe2b,'✓')]}),a12_0x24358c(Text,{'color':_0x4950e3[_0x2cb44e(0xe8)]?_0x2cb44e(0xfb):'red','children':[_0x4950e3[_0x2cb44e(0xe8)]?'✓':'✗',getRemainingSpaces(_0x5bbe2b,'✓')]})]},_0x4950e3[_0x2cb44e(0xf5)]))]}),_0x45f135===_0x2cb44e(0xe0)&&_0x3cf115['length']===0x0&&a12_0x28b941(Box,{'marginTop':0x1,'children':a12_0x28b941(Text,{'color':_0x2cb44e(0x117),'children':_0x2cb44e(0xeb)})}),_0x3cf115['map']((_0x410fb9,_0x314112)=>a12_0x24358c(Box,{'children':[a12_0x24358c(Text,{'color':_0x2cb44e(0xfb),'children':['√\x20',_0x410fb9[_0x2cb44e(0xf2)],':\x20']}),a12_0x28b941(Text,{'color':_0x2cb44e(0x117),'children':_0x410fb9['value']})]},_0x314112)),_0x1360d8&&_0x45f135===_0x2cb44e(0xe0)&&a12_0x28b941(Box,{'marginTop':0x1,'children':a12_0x24358c(Text,{'color':_0x2cb44e(0xda),'children':['✗\x20',_0x1360d8]})}),_0x45f135===_0x2cb44e(0xe0)&&a12_0x28b941(a12_0x3fdcea,{'children':a12_0x24358c(Box,{'marginTop':_0x3cf115[_0x2cb44e(0x109)]>0x0||_0x1360d8?0x1:0x0,'flexDirection':_0x2cb44e(0x110),'children':[a12_0x28b941(Text,{'bold':!![],'children':_0x2cb44e(0x104)}),_0xd1abec[_0x2cb44e(0xdc)]((_0x439dc9,_0x5a48cc)=>{const _0x1ed8b7=_0x2cb44e,_0x4224e6=_0x23dfeb===_0x5a48cc,_0x3775ba=_0x7dcc67[_0x1ed8b7(0x11d)](_0x5a48cc),_0x250452=_0x270cb0[_0x1ed8b7(0x103)](_0x439dc9[_0x1ed8b7(0xf5)]),_0x43c66c=_0x250452?'更新':'新建';return a12_0x28b941(Box,{'children':a12_0x24358c(Text,{'backgroundColor':_0x4224e6?_0x1ed8b7(0x107):undefined,'color':_0x4224e6?'white':undefined,'children':['\x20\x20',_0x3775ba?_0x1ed8b7(0x111):_0x1ed8b7(0xdb),'\x20',_0x439dc9['label']]})},_0x439dc9[_0x1ed8b7(0xf5)]);}),a12_0x28b941(Box,{'marginTop':0x1,'children':a12_0x24358c(Text,{'color':_0x2cb44e(0xdf),'children':['\x20',_0x2cb44e(0x119)]})})]})}),_0x45f135===_0x2cb44e(0x106)&&a12_0x24358c(a12_0x3fdcea,{'children':[a12_0x24358c(Box,{'children':[a12_0x28b941(Text,{'children':_0x2cb44e(0x102)}),a12_0x28b941(Text,{'color':_0x2cb44e(0xfb),'children':_0x39972d}),_0x1360d8&&a12_0x24358c(Text,{'color':_0x2cb44e(0xda),'children':['\x20←\x20',_0x1360d8]})]}),!_0x1360d8&&a12_0x28b941(Box,{'children':a12_0x28b941(Text,{'color':_0x2cb44e(0xdf),'children':'\x20输入项目的\x20JS\x20资源链接(https://...)'})})]}),_0x45f135===_0x2cb44e(0x116)&&a12_0x24358c(a12_0x3fdcea,{'children':[a12_0x24358c(Box,{'children':[a12_0x28b941(Text,{'children':_0x2cb44e(0xe1)}),a12_0x28b941(Text,{'color':_0x2cb44e(0xfb),'children':_0x39972d}),_0x1360d8&&a12_0x24358c(Text,{'color':_0x2cb44e(0xda),'children':['\x20←\x20',_0x1360d8]})]}),!_0x1360d8&&a12_0x28b941(Box,{'children':a12_0x28b941(Text,{'color':_0x2cb44e(0xdf),'children':_0x2cb44e(0xf1)})})]}),_0x45f135==='creating'&&a12_0x28b941(Box,{'children':a12_0x28b941(Text,{'children':_0x2cb44e(0xd9)})}),_0x45f135===_0x2cb44e(0xfa)&&a12_0x28b941(Box,{'children':a12_0x28b941(Text,{'color':'green','children':_0x2cb44e(0xe5)})})]});}function getStringWidth(_0x38a8fb){const _0x18f442=a12_0x205b;let _0x9a8147=0x0;for(const _0x31d4dc of _0x38a8fb){/[\u4e00-\u9fa5]/[_0x18f442(0x10b)](_0x31d4dc)?_0x9a8147+=0x2:_0x9a8147+=0x1;}return _0x9a8147;}function getRemainingSpaces(_0x5a7886,_0x35b873){const _0x51ff54=a12_0x205b,_0x4be94f=getStringWidth(_0x35b873);return Array(Math[_0x51ff54(0x115)](0x0,_0x5a7886-_0x4be94f))[_0x51ff54(0xee)]('\x20')['join']('');}function getMaxWidth(_0x42b15a,_0x4cc56d=0x2){const _0x41132e=a12_0x205b;let _0xd28a65='',_0x362ade=0x0;for(const _0x3997f6 of _0x42b15a){const _0x4ac37b=getStringWidth(_0x3997f6);_0x4ac37b>_0x362ade&&(_0x362ade=_0x4ac37b,_0xd28a65=_0x3997f6);}return _0xd28a65+'\x20'[_0x41132e(0xff)](_0x4cc56d);}
1
+ (function(_0x5d8ebd,_0x14c31b){const _0x497ad1=a12_0x2e53,_0x34ee38=_0x5d8ebd();while(!![]){try{const _0x59035f=-parseInt(_0x497ad1(0x103))/0x1*(-parseInt(_0x497ad1(0xf0))/0x2)+parseInt(_0x497ad1(0xea))/0x3+parseInt(_0x497ad1(0xe3))/0x4*(parseInt(_0x497ad1(0xff))/0x5)+-parseInt(_0x497ad1(0xd7))/0x6+-parseInt(_0x497ad1(0xfc))/0x7*(-parseInt(_0x497ad1(0xca))/0x8)+-parseInt(_0x497ad1(0xfb))/0x9+-parseInt(_0x497ad1(0xdf))/0xa;if(_0x59035f===_0x14c31b)break;else _0x34ee38['push'](_0x34ee38['shift']());}catch(_0x208a4f){_0x34ee38['push'](_0x34ee38['shift']());}}}(a12_0x52fb,0xc84c5));import{jsx as a12_0x3f3357,jsxs as a12_0x5c7ba1,Fragment as a12_0x2be73b}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';function a12_0x52fb(){const _0x59d0ba=['*\x20CSS\x20链接:\x20','请输入有效的\x20JS\x20https\x20链接','trim','creating','13248342MlNinT','35WeYueI','delete','blue','5gDxvnJ','column','yellow','!\x20未找到本地页面,请先创建页面','5lsEsfa','add','backspace','max','JS\x20链接','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','done','has','upArrow','downArrow','\x20命令重新登录','CSS\x20链接无法访问','input-css','length','join','red','642888AHdJcw','size','请至少选择一个菜单','[\x20]','\x20输入项目的\x20JS\x20资源链接(https://...)','\x20正在获取线上菜单列表...','green','请输入有效的\x20CSS\x20https\x20链接','slice','*\x20同步菜单到\x20Lovrabet\x20平台','value','return','菜单名称','3369822erKBDp','cyan','then','map','JS\x20链接无法访问','√\x20菜单创建完成','local','\x20←\x20','7874570JogqEO','includes','catch','online','1872308GhYUZh','lovrabet\x20auth','filter','fill','path','selecting','*\x20正在创建菜单...','3790968oxxTVl','label','input-js','repeat','test','*\x20JS\x20链接:\x20','603206vsVYVt','\x20输入项目的\x20CSS\x20资源链接(https://...)','创建菜单失败','message','gray','white','已选择菜单'];a12_0x52fb=function(){return _0x59d0ba;};return a12_0x52fb();}import{useEffect,useState}from'react';import a12_0x202c94 from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';import{getLocalPages}from'./get-local-pages.js';import{createMenus}from'./create-menu.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a12_0x3f3357(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x121af4=a12_0x2e53,{exit:_0x112782}=useApp(),{loading:_0x2189c3,menuList:_0x163127,error:_0x3d0946}=useGetOnlineMenuList(),_0x4af717=getLocalPages(),_0x152e51=_0x163127[_0x121af4(0xda)](_0x172f59=>_0x172f59['path']),_0x510526=[_0x121af4(0xd6),..._0x4af717[_0x121af4(0xda)](_0x5b9c8b=>_0x5b9c8b[_0x121af4(0xeb)])],_0x5c65af=getStringWidth(getMaxWidth(_0x510526,0x4)),_0x5a3f33=getStringWidth(getMaxWidth([_0x121af4(0xd6)])),[_0x355caf,_0x4b1af1]=useState(_0x121af4(0xe8)),[_0x500329,_0x54c107]=useState(new Set()),[_0x5c7bdd,_0x43bb41]=useState(0x0),[_0x125cb0,_0x5b86ec]=useState(''),[_0x515aff,_0x5ebc77]=useState(''),[_0x22e5f4,_0x49922b]=useState(''),[_0x3256d9,_0x27bde4]=useState(''),[_0x3af769,_0x2decc3]=useState([]),_0x11d011=_0x4af717[_0x121af4(0xda)](_0x379df4=>({'label':_0x379df4[_0x121af4(0xeb)],'path':_0x379df4[_0x121af4(0xe7)],'local':!![],'online':_0x152e51[_0x121af4(0xe0)](_0x379df4[_0x121af4(0xe7)])})),_0x424e52=_0x4af717[_0x121af4(0xe5)](_0x13775c=>{const _0xa64549=_0x121af4;return!_0x152e51[_0xa64549(0xe0)](_0x13775c['path']);});useEffect(()=>{const _0x1928ff=_0x121af4;if(!_0x2189c3&&_0x4af717[_0x1928ff(0xc7)]>0x0&&_0x500329[_0x1928ff(0xcb)]===0x0){const _0x2a1c06=new Set(_0x4af717[_0x1928ff(0xda)]((_0x1c8073,_0x7093b8)=>({'page':_0x1c8073,'index':_0x7093b8}))[_0x1928ff(0xe5)](({page:_0x4d263e})=>!_0x152e51['includes'](_0x4d263e[_0x1928ff(0xe7)]))[_0x1928ff(0xda)](({index:_0x3d1869})=>_0x3d1869));_0x54c107(_0x2a1c06);}},[_0x2189c3,_0x4af717[_0x121af4(0xc7)],_0x152e51['length']]),useInput(async(_0x57a76c,_0x3844fc)=>{const _0x3e09e6=_0x121af4;if(_0x355caf===_0x3e09e6(0xe8)){if(_0x3844fc[_0x3e09e6(0xc2)]){_0x43bb41(_0x148e2b=>_0x148e2b>0x0?_0x148e2b-0x1:_0x4af717[_0x3e09e6(0xc7)]-0x1);return;}if(_0x3844fc[_0x3e09e6(0xc3)]){_0x43bb41(_0x3c5b2d=>_0x3c5b2d<_0x4af717[_0x3e09e6(0xc7)]-0x1?_0x3c5b2d+0x1:0x0);return;}if(_0x57a76c==='\x20'){_0x54c107(_0x1f2e40=>{const _0x4ab496=_0x3e09e6,_0x4da98c=new Set(_0x1f2e40);return _0x4da98c[_0x4ab496(0xc1)](_0x5c7bdd)?_0x4da98c['delete'](_0x5c7bdd):_0x4da98c[_0x4ab496(0xbb)](_0x5c7bdd),_0x4da98c;});return;}if(_0x57a76c==='a'||_0x57a76c==='A'){const _0x17b561=new Set(_0x4af717['map']((_0x5591c8,_0x201c5f)=>_0x201c5f));_0x54c107(_0x17b561);return;}if(_0x57a76c==='i'||_0x57a76c==='I'||_0x57a76c==='r'||_0x57a76c==='R'){_0x54c107(_0x141da5=>{const _0x40a888=_0x3e09e6,_0x26d0e2=new Set();for(let _0x1f69c7=0x0;_0x1f69c7<_0x4af717[_0x40a888(0xc7)];_0x1f69c7++){!_0x141da5[_0x40a888(0xc1)](_0x1f69c7)&&_0x26d0e2[_0x40a888(0xbb)](_0x1f69c7);}return _0x26d0e2;});return;}if(_0x57a76c==='q'||_0x57a76c==='Q'){_0x112782();return;}if(_0x3844fc[_0x3e09e6(0xd5)]){if(_0x500329[_0x3e09e6(0xcb)]===0x0){_0x27bde4(_0x3e09e6(0xcc));return;}const _0x11e79c=_0x4af717[_0x3e09e6(0xe5)]((_0x58d09d,_0x2f1ae3)=>_0x500329[_0x3e09e6(0xc1)](_0x2f1ae3)),_0x4dd736=_0x11e79c[_0x3e09e6(0xda)](_0x364659=>_0x364659[_0x3e09e6(0xeb)])[_0x3e09e6(0xc8)](',\x20');_0x2decc3([{'label':_0x3e09e6(0xf6),'value':_0x500329[_0x3e09e6(0xcb)]+'\x20个'}]),_0x27bde4(''),_0x4b1af1(_0x3e09e6(0xec));return;}return;}if(_0x355caf===_0x3e09e6(0xec)){if(_0x3844fc[_0x3e09e6(0xd5)]){const _0x430094=_0x22e5f4[_0x3e09e6(0xf9)]();if(_0x430094==='')return;if(!isValidJsHttpsUrl(_0x430094)){_0x27bde4(_0x3e09e6(0xf8));return;}if(!await isUrlReachable(_0x430094)){_0x27bde4(_0x3e09e6(0xdb));return;}_0x5b86ec(_0x430094),_0x2decc3(_0x42ac5a=>[..._0x42ac5a,{'label':_0x3e09e6(0xbe),'value':_0x430094}]),_0x49922b(''),_0x27bde4(''),_0x4b1af1('input-css');return;}if(_0x3844fc[_0x3e09e6(0xbc)]||_0x3844fc['delete']){_0x49922b(_0x5efa2a=>_0x5efa2a[_0x3e09e6(0xd2)](0x0,-0x1)),_0x27bde4('');return;}_0x49922b(_0x469ad3=>_0x469ad3+_0x57a76c);return;}if(_0x355caf===_0x3e09e6(0xc6)){if(_0x3844fc[_0x3e09e6(0xd5)]){const _0x19988c=_0x22e5f4[_0x3e09e6(0xf9)]();if(_0x19988c==='')return;if(!isValidCssHttpsUrl(_0x19988c)){_0x27bde4(_0x3e09e6(0xd1));return;}if(!await isUrlReachable(_0x19988c)){_0x27bde4(_0x3e09e6(0xc5));return;}_0x5ebc77(_0x19988c),_0x2decc3(_0x55cbcb=>[..._0x55cbcb,{'label':'CSS\x20链接','value':_0x19988c}]),_0x49922b(''),_0x27bde4(''),_0x4b1af1(_0x3e09e6(0xfa));const _0x9dc61=_0x4af717[_0x3e09e6(0xe5)]((_0x171515,_0x361a72)=>_0x500329[_0x3e09e6(0xc1)](_0x361a72));createMenus(_0x9dc61,[_0x125cb0,_0x19988c])[_0x3e09e6(0xd9)](()=>{const _0x26f07e=_0x3e09e6;_0x4b1af1(_0x26f07e(0xc0)),setTimeout(()=>{_0x112782();},0x3e8);})[_0x3e09e6(0xe1)](_0x4f62e6=>{const _0x3540a7=_0x3e09e6;_0x27bde4(_0x4f62e6[_0x3540a7(0xf3)]||_0x3540a7(0xf2)),_0x4b1af1(_0x3540a7(0xe8));});return;}if(_0x3844fc[_0x3e09e6(0xbc)]||_0x3844fc[_0x3e09e6(0xfd)]){_0x49922b(_0x5edc22=>_0x5edc22[_0x3e09e6(0xd2)](0x0,-0x1)),_0x27bde4('');return;}_0x49922b(_0x7e905c=>_0x7e905c+_0x57a76c);return;}});if(_0x2189c3)return a12_0x5c7ba1(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x3f3357(Text,{'children':'\x20\x20'}),a12_0x3f3357(a12_0x202c94,{'type':'dots'}),a12_0x3f3357(Text,{'children':_0x121af4(0xcf)})]});if(_0x3d0946)return a12_0x5c7ba1(Box,{'flexDirection':_0x121af4(0x100),'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':['✗\x20',_0x3d0946]}),a12_0x5c7ba1(Box,{'marginTop':0x1,'children':[a12_0x3f3357(Text,{'color':'gray','children':'提示:使用\x20'}),a12_0x3f3357(Text,{'color':_0x121af4(0xd8),'children':_0x121af4(0xe4)}),a12_0x3f3357(Text,{'color':_0x121af4(0xf4),'children':_0x121af4(0xc4)})]})]});if(_0x4af717[_0x121af4(0xc7)]===0x0)return a12_0x3f3357(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x3f3357(Text,{'color':_0x121af4(0x101),'children':_0x121af4(0x102)})});return a12_0x5c7ba1(Box,{'flexDirection':_0x121af4(0x100),'marginTop':0x1,'marginBottom':0x1,'children':[_0x355caf===_0x121af4(0xe8)&&a12_0x5c7ba1(a12_0x2be73b,{'children':[a12_0x5c7ba1(Box,{'children':[a12_0x5c7ba1(Text,{'bold':!![],'children':['\x20\x20',_0x121af4(0xd6),getRemainingSpaces(_0x5c65af,_0x121af4(0xd6))]}),a12_0x5c7ba1(Text,{'bold':!![],'children':['本地',getRemainingSpaces(_0x5a3f33,_0x121af4(0xd6))]}),a12_0x5c7ba1(Text,{'bold':!![],'children':['Lovrabet平台',getRemainingSpaces(_0x5a3f33,_0x121af4(0xd6))]})]}),_0x11d011[_0x121af4(0xda)](_0x1371a7=>a12_0x5c7ba1(Box,{'children':[a12_0x5c7ba1(Text,{'children':['\x20\x20',_0x1371a7[_0x121af4(0xeb)],getRemainingSpaces(_0x5c65af,_0x1371a7[_0x121af4(0xeb)])]}),a12_0x5c7ba1(Text,{'color':_0x121af4(0xd0),'children':[_0x1371a7[_0x121af4(0xdd)]?'✓':'✗',getRemainingSpaces(_0x5a3f33,'✓')]}),a12_0x5c7ba1(Text,{'color':_0x1371a7['online']?'green':_0x121af4(0xc9),'children':[_0x1371a7[_0x121af4(0xe2)]?'✓':'✗',getRemainingSpaces(_0x5a3f33,'✓')]})]},_0x1371a7[_0x121af4(0xe7)]))]}),_0x355caf===_0x121af4(0xe8)&&_0x3af769['length']===0x0&&a12_0x3f3357(Box,{'marginTop':0x1,'children':a12_0x3f3357(Text,{'color':'cyan','children':_0x121af4(0xd3)})}),_0x3af769[_0x121af4(0xda)]((_0x3dc4f5,_0x5dce1)=>a12_0x5c7ba1(Box,{'children':[a12_0x5c7ba1(Text,{'color':'green','children':['√\x20',_0x3dc4f5[_0x121af4(0xeb)],':\x20']}),a12_0x3f3357(Text,{'color':_0x121af4(0xd8),'children':_0x3dc4f5[_0x121af4(0xd4)]})]},_0x5dce1)),_0x3256d9&&_0x355caf===_0x121af4(0xe8)&&a12_0x3f3357(Box,{'marginTop':0x1,'children':a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':['✗\x20',_0x3256d9]})}),_0x355caf==='selecting'&&a12_0x3f3357(a12_0x2be73b,{'children':a12_0x5c7ba1(Box,{'marginTop':_0x3af769[_0x121af4(0xc7)]>0x0||_0x3256d9?0x1:0x0,'flexDirection':_0x121af4(0x100),'children':[a12_0x3f3357(Text,{'bold':!![],'children':'*\x20请选择要同步的菜单:'}),_0x4af717[_0x121af4(0xda)]((_0x4cf289,_0x526766)=>{const _0xb45f92=_0x121af4,_0x1593cd=_0x5c7bdd===_0x526766,_0x1d4e8f=_0x500329['has'](_0x526766),_0x55c3c3=_0x152e51[_0xb45f92(0xe0)](_0x4cf289[_0xb45f92(0xe7)]),_0x580564=_0x55c3c3?'更新':'新建';return a12_0x3f3357(Box,{'children':a12_0x5c7ba1(Text,{'backgroundColor':_0x1593cd?_0xb45f92(0xfe):undefined,'color':_0x1593cd?_0xb45f92(0xf5):undefined,'children':['\x20\x20',_0x1d4e8f?'[✓]':_0xb45f92(0xcd),'\x20',_0x4cf289['label']]})},_0x4cf289[_0xb45f92(0xe7)]);}),a12_0x3f3357(Box,{'marginTop':0x1,'children':a12_0x5c7ba1(Text,{'color':_0x121af4(0xf4),'children':['\x20',_0x121af4(0xbf)]})})]})}),_0x355caf===_0x121af4(0xec)&&a12_0x5c7ba1(a12_0x2be73b,{'children':[a12_0x5c7ba1(Box,{'children':[a12_0x3f3357(Text,{'children':_0x121af4(0xef)}),a12_0x3f3357(Text,{'color':_0x121af4(0xd0),'children':_0x22e5f4}),_0x3256d9&&a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':['\x20←\x20',_0x3256d9]})]}),!_0x3256d9&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'color':_0x121af4(0xf4),'children':_0x121af4(0xce)})})]}),_0x355caf==='input-css'&&a12_0x5c7ba1(a12_0x2be73b,{'children':[a12_0x5c7ba1(Box,{'children':[a12_0x3f3357(Text,{'children':_0x121af4(0xf7)}),a12_0x3f3357(Text,{'color':_0x121af4(0xd0),'children':_0x22e5f4}),_0x3256d9&&a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':[_0x121af4(0xde),_0x3256d9]})]}),!_0x3256d9&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'color':'gray','children':_0x121af4(0xf1)})})]}),_0x355caf===_0x121af4(0xfa)&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'children':_0x121af4(0xe9)})}),_0x355caf===_0x121af4(0xc0)&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'color':'green','children':_0x121af4(0xdc)})})]});}function getStringWidth(_0x3e5d52){const _0x2908ea=a12_0x2e53;let _0x3ad012=0x0;for(const _0x4de7f7 of _0x3e5d52){/[\u4e00-\u9fa5]/[_0x2908ea(0xee)](_0x4de7f7)?_0x3ad012+=0x2:_0x3ad012+=0x1;}return _0x3ad012;}function getRemainingSpaces(_0x5753b2,_0x38925d){const _0x458bab=a12_0x2e53,_0x39ac66=getStringWidth(_0x38925d);return Array(Math[_0x458bab(0xbd)](0x0,_0x5753b2-_0x39ac66))[_0x458bab(0xe6)]('\x20')['join']('');}function a12_0x2e53(_0x21f5b9,_0x47634b){_0x21f5b9=_0x21f5b9-0xbb;const _0x52fb9c=a12_0x52fb();let _0x2e5374=_0x52fb9c[_0x21f5b9];return _0x2e5374;}function getMaxWidth(_0x306b3f,_0xa3d691=0x2){const _0x2c5257=a12_0x2e53;let _0x517d43='',_0x34d138=0x0;for(const _0x5b7fc0 of _0x306b3f){const _0x1a4299=getStringWidth(_0x5b7fc0);_0x1a4299>_0x34d138&&(_0x34d138=_0x1a4299,_0x517d43=_0x5b7fc0);}return _0x517d43+'\x20'[_0x2c5257(0xed)](_0xa3d691);}
@@ -1 +1 @@
1
- function a13_0x5ee0(_0x4e795c,_0x379121){_0x4e795c=_0x4e795c-0xc6;const _0x37c51c=a13_0x37c5();let _0x5ee026=_0x37c51c[_0x4e795c];return _0x5ee026;}(function(_0x36bd82,_0x11281a){const _0x5f2245=a13_0x5ee0,_0x5d7964=_0x36bd82();while(!![]){try{const _0x4b0201=-parseInt(_0x5f2245(0xde))/0x1*(-parseInt(_0x5f2245(0xe5))/0x2)+parseInt(_0x5f2245(0xe8))/0x3*(parseInt(_0x5f2245(0xd9))/0x4)+-parseInt(_0x5f2245(0xf0))/0x5*(parseInt(_0x5f2245(0xe3))/0x6)+parseInt(_0x5f2245(0xf5))/0x7*(-parseInt(_0x5f2245(0xe6))/0x8)+parseInt(_0x5f2245(0xf7))/0x9+-parseInt(_0x5f2245(0xd7))/0xa*(parseInt(_0x5f2245(0xe0))/0xb)+-parseInt(_0x5f2245(0xe7))/0xc;if(_0x4b0201===_0x11281a)break;else _0x5d7964['push'](_0x5d7964['shift']());}catch(_0x46ac5c){_0x5d7964['push'](_0x5d7964['shift']());}}}(a13_0x37c5,0x2622e));import{getCookie}from'../auth/get-cookie.js';function a13_0x37c5(){const _0x5bae27=['未知错误','create-menu','1009813UqcUnt','info','2239821qZOiko','import','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','!\x20请使用以下方式之一:','菜单创建成功:\x20','开始批量创建菜单,共\x20','appcode','success','未提供应用AppCode,且配置中也没有默认值','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','all','application/json','error','errorMsg','创建菜单成功:','/smartapi/menu/create','stringify','includes','11390lLcnDQ','path','3308EWzjLt','正在创建菜单:\x20','length','0011','create-menus','249091GtNJRz','log','2002jBAMdN','label','json','168piXtch','data','2BrTBmW','8bXaiVc','759012WRyHfv','678wEnaVV','procode','errorCode','批量创建菜单完成,共\x20','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','POST','status','创建菜单失败,HTTP状态码:\x20','20330oYGSMz','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','创建菜单失败:\x20'];a13_0x37c5=function(){return _0x5bae27;};return a13_0x37c5();}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x231353){const _0x551403=a13_0x5ee0,_0x2cc94d=config?.[_0x551403(0xcb)];if(!_0x2cc94d){const _0xed807d=_0x551403(0xcd);logger[_0x551403(0xd1)]('create-menu',_0xed807d),console[_0x551403(0xd1)]('×\x20'+_0xed807d),console[_0x551403(0xdf)]('!\x20请使用以下方式之一:'),console[_0x551403(0xdf)](_0x551403(0xce)),console['log']('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger['info']('create-menu',_0x551403(0xda)+_0x231353[_0x551403(0xe1)]+'\x20('+_0x231353['path']+')');const _0x4e363d={'appCode':_0x2cc94d,'type':_0x551403(0xe9),'sort':0x0,'extend':{'loadScriptMode':_0x551403(0xc6),'resources':_0x231353['resources']?JSON[_0x551403(0xd5)](_0x231353['resources']):undefined},..._0x231353},_0x2f065d=await fetch(getApiDomain()+_0x551403(0xd4),{'method':_0x551403(0xed),'body':JSON['stringify'](_0x4e363d),'headers':{'Content-Type':_0x551403(0xd0),'Cookie':getCookie()}});if(!_0x2f065d['ok']){if(_0x2f065d[_0x551403(0xee)]===0x191){const _0x81c853='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x551403(0xd1)](_0x551403(0xf4),_0x81c853,{'status':_0x2f065d[_0x551403(0xee)],'menu':_0x231353[_0x551403(0xe1)]});throw new Error(_0x81c853);}const _0x1caf06=_0x551403(0xef)+_0x2f065d[_0x551403(0xee)];logger[_0x551403(0xd1)](_0x551403(0xf4),_0x1caf06,{'menu':_0x231353['label']});throw new Error(_0x1caf06);}const _0x27ef54=await _0x2f065d[_0x551403(0xe2)]();if(!_0x27ef54[_0x551403(0xcc)]){const _0x1e6d9d=_0x551403(0xf2)+(_0x27ef54[_0x551403(0xd2)]||_0x551403(0xf3));logger[_0x551403(0xd1)](_0x551403(0xf4),_0x1e6d9d,{'errorCode':_0x27ef54[_0x551403(0xea)],'errorMsg':_0x27ef54['errorMsg'],'menu':_0x231353[_0x551403(0xe1)]});throw new Error(_0x1e6d9d);}logger['info'](_0x551403(0xf4),_0x551403(0xc9)+_0x231353[_0x551403(0xe1)],_0x27ef54[_0x551403(0xe4)]),console['log'](_0x551403(0xd3),_0x27ef54[_0x551403(0xe4)]);}async function _createMenu(_0x1d45c5,_0x341dba){const _0x5640c8=a13_0x5ee0,_0x4ea2c2=config?.[_0x5640c8(0xcb)];if(!_0x4ea2c2){const _0x363471=_0x5640c8(0xcd);logger[_0x5640c8(0xd1)]('create-menu',_0x363471),console[_0x5640c8(0xd1)]('×\x20'+_0x363471),console[_0x5640c8(0xdf)](_0x5640c8(0xc8)),console[_0x5640c8(0xdf)](_0x5640c8(0xce)),console[_0x5640c8(0xdf)](_0x5640c8(0xec));return;}const _0x799d60={'appCode':_0x4ea2c2,'type':_0x5640c8(0xe9),'sort':0x0,'extend':{'loadScriptMode':_0x5640c8(0xc6),'resources':_0x341dba?JSON['stringify'](_0x341dba):undefined},'label':_0x1d45c5['label'],'path':_0x1d45c5[_0x5640c8(0xd8)]},_0x86fe25=await fetch(getApiDomain()+_0x5640c8(0xd4),{'method':_0x5640c8(0xed),'body':JSON['stringify'](_0x799d60),'headers':{'Content-Type':_0x5640c8(0xd0),'Cookie':getCookie()}});if(!_0x86fe25['ok']){if(_0x86fe25[_0x5640c8(0xee)]===0x191){const _0x4e0ee3=_0x5640c8(0xf1);logger['error']('create-menu',_0x4e0ee3,{'status':_0x86fe25['status'],'menu':_0x1d45c5[_0x5640c8(0xe1)]});throw new Error(_0x4e0ee3);}const _0x53e8fe='创建菜单失败,HTTP状态码:\x20'+_0x86fe25['status'];logger[_0x5640c8(0xd1)](_0x5640c8(0xf4),_0x53e8fe,{'menu':_0x1d45c5[_0x5640c8(0xe1)]});throw new Error(_0x53e8fe);}const _0x2e4cb4=await _0x86fe25[_0x5640c8(0xe2)]();if(!_0x2e4cb4[_0x5640c8(0xcc)]){if(_0x2e4cb4[_0x5640c8(0xea)]===_0x5640c8(0xdc)||_0x2e4cb4['errorMsg']?.[_0x5640c8(0xd6)]('登录')){const _0xcc1093=_0x5640c8(0xc7);logger['error'](_0x5640c8(0xf4),_0xcc1093,{'errorCode':_0x2e4cb4[_0x5640c8(0xea)],'errorMsg':_0x2e4cb4[_0x5640c8(0xd2)],'menu':_0x1d45c5[_0x5640c8(0xe1)]});throw new Error(_0xcc1093);}const _0x1e07c9=_0x5640c8(0xf2)+(_0x2e4cb4['errorMsg']||_0x5640c8(0xf3));logger[_0x5640c8(0xd1)](_0x5640c8(0xf4),_0x1e07c9,{'errorCode':_0x2e4cb4['errorCode'],'errorMsg':_0x2e4cb4[_0x5640c8(0xd2)],'menu':_0x1d45c5[_0x5640c8(0xe1)]});throw new Error(_0x1e07c9);}logger[_0x5640c8(0xf6)](_0x5640c8(0xf4),'菜单创建成功:\x20'+_0x1d45c5[_0x5640c8(0xe1)]);}export async function createMenus(_0x475ff8,_0x470e20){const _0xada8dd=a13_0x5ee0;logger[_0xada8dd(0xf6)](_0xada8dd(0xdd),_0xada8dd(0xca)+_0x475ff8[_0xada8dd(0xdb)]+'\x20个'),await Promise[_0xada8dd(0xcf)](_0x475ff8['map'](async _0x229d3e=>{await _createMenu(_0x229d3e,_0x470e20);})),logger[_0xada8dd(0xf6)]('create-menus',_0xada8dd(0xeb)+_0x475ff8[_0xada8dd(0xdb)]+'\x20个');}
1
+ (function(_0x177558,_0x3d7afa){const _0x4048e5=a13_0x43dc,_0x75004=_0x177558();while(!![]){try{const _0x96b116=-parseInt(_0x4048e5(0x100))/0x1+parseInt(_0x4048e5(0xf3))/0x2*(-parseInt(_0x4048e5(0xfe))/0x3)+-parseInt(_0x4048e5(0xfd))/0x4*(-parseInt(_0x4048e5(0xd9))/0x5)+parseInt(_0x4048e5(0xe7))/0x6*(-parseInt(_0x4048e5(0x103))/0x7)+parseInt(_0x4048e5(0xdc))/0x8+-parseInt(_0x4048e5(0xfc))/0x9+parseInt(_0x4048e5(0xf7))/0xa;if(_0x96b116===_0x3d7afa)break;else _0x75004['push'](_0x75004['shift']());}catch(_0xec9d7e){_0x75004['push'](_0x75004['shift']());}}}(a13_0x40c7,0xb4883));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a13_0x40c7(){const _0x980afb=['success','正在创建菜单:\x20','json','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','!\x20请使用以下方式之一:','errorCode','/smartapi/menu/create','POST','0011','6wwPGMY','stringify','创建菜单成功:','import','all','info','errorMsg','error','label','创建菜单失败:\x20','includes','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','498sczAly','resources','create-menus','application/json','16401220MuOqBM','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','procode','status','data','6276924GLyHBO','108hfhZog','11379HZPorK','appcode','765500zFUhbe','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','create-menu','1705669wmxiwe','log','path','127665lrHorE','批量创建菜单完成,共\x20','菜单创建成功:\x20','8488048vPexjE','未提供应用AppCode,且配置中也没有默认值'];a13_0x40c7=function(){return _0x980afb;};return a13_0x40c7();}function a13_0x43dc(_0xbc9bf0,_0x4c03f9){_0xbc9bf0=_0xbc9bf0-0xd8;const _0x40c739=a13_0x40c7();let _0x43dce4=_0x40c739[_0xbc9bf0];return _0x43dce4;}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x272848){const _0x318436=a13_0x43dc,_0x319a72=config?.[_0x318436(0xff)];if(!_0x319a72){const _0x59609c=_0x318436(0xdd);logger[_0x318436(0xee)](_0x318436(0x102),_0x59609c),console[_0x318436(0xee)]('×\x20'+_0x59609c),console['log']('!\x20请使用以下方式之一:'),console[_0x318436(0x104)](_0x318436(0x101)),console[_0x318436(0x104)]('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger[_0x318436(0xec)](_0x318436(0x102),_0x318436(0xdf)+_0x272848[_0x318436(0xef)]+'\x20('+_0x272848[_0x318436(0xd8)]+')');const _0x4b03c7={'appCode':_0x319a72,'type':_0x318436(0xf9),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x272848[_0x318436(0xf4)]?JSON['stringify'](_0x272848[_0x318436(0xf4)]):undefined},..._0x272848},_0x2e53f7=await fetch(getApiDomain()+_0x318436(0xe4),{'method':'POST','body':JSON[_0x318436(0xe8)](_0x4b03c7),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x2e53f7['ok']){if(_0x2e53f7['status']===0x191){const _0x740b69='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x318436(0xee)]('create-menu',_0x740b69,{'status':_0x2e53f7[_0x318436(0xfa)],'menu':_0x272848[_0x318436(0xef)]});throw new Error(_0x740b69);}const _0x120cae='创建菜单失败,HTTP状态码:\x20'+_0x2e53f7[_0x318436(0xfa)];logger[_0x318436(0xee)](_0x318436(0x102),_0x120cae,{'menu':_0x272848['label']});throw new Error(_0x120cae);}const _0x269dbf=await _0x2e53f7[_0x318436(0xe0)]();if(!_0x269dbf['success']){const _0x257863='创建菜单失败:\x20'+(_0x269dbf[_0x318436(0xed)]||'未知错误');logger[_0x318436(0xee)](_0x318436(0x102),_0x257863,{'errorCode':_0x269dbf['errorCode'],'errorMsg':_0x269dbf[_0x318436(0xed)],'menu':_0x272848[_0x318436(0xef)]});throw new Error(_0x257863);}logger[_0x318436(0xec)](_0x318436(0x102),_0x318436(0xdb)+_0x272848['label'],_0x269dbf[_0x318436(0xfb)]),console[_0x318436(0x104)](_0x318436(0xe9),_0x269dbf['data']);}async function _createMenu(_0x395089,_0x2878fc){const _0x41de0b=a13_0x43dc,_0x5b7148=config?.[_0x41de0b(0xff)];if(!_0x5b7148){const _0x59c380=_0x41de0b(0xdd);logger['error']('create-menu',_0x59c380),console[_0x41de0b(0xee)]('×\x20'+_0x59c380),console[_0x41de0b(0x104)](_0x41de0b(0xe2)),console[_0x41de0b(0x104)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x41de0b(0x104)](_0x41de0b(0xf2));return;}const _0x37d948={'appCode':_0x5b7148,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x41de0b(0xea),'resources':_0x2878fc?JSON[_0x41de0b(0xe8)](_0x2878fc):undefined},'label':_0x395089['label'],'path':_0x395089[_0x41de0b(0xd8)]},_0x10029c=await fetch(getApiDomain()+_0x41de0b(0xe4),{'method':_0x41de0b(0xe5),'body':JSON[_0x41de0b(0xe8)](_0x37d948),'headers':{'Content-Type':_0x41de0b(0xf6),'Cookie':getCookie()}});if(!_0x10029c['ok']){if(_0x10029c['status']===0x191){const _0x2be655=_0x41de0b(0xe1);logger[_0x41de0b(0xee)](_0x41de0b(0x102),_0x2be655,{'status':_0x10029c['status'],'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x2be655);}const _0x9dbb34='创建菜单失败,HTTP状态码:\x20'+_0x10029c[_0x41de0b(0xfa)];logger['error'](_0x41de0b(0x102),_0x9dbb34,{'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x9dbb34);}const _0x1fc932=await _0x10029c[_0x41de0b(0xe0)]();if(!_0x1fc932[_0x41de0b(0xde)]){if(_0x1fc932[_0x41de0b(0xe3)]===_0x41de0b(0xe6)||_0x1fc932['errorMsg']?.[_0x41de0b(0xf1)]('登录')){const _0x807dba=_0x41de0b(0xf8);logger['error'](_0x41de0b(0x102),_0x807dba,{'errorCode':_0x1fc932['errorCode'],'errorMsg':_0x1fc932['errorMsg'],'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x807dba);}const _0x297fce=_0x41de0b(0xf0)+(_0x1fc932[_0x41de0b(0xed)]||'未知错误');logger[_0x41de0b(0xee)](_0x41de0b(0x102),_0x297fce,{'errorCode':_0x1fc932['errorCode'],'errorMsg':_0x1fc932[_0x41de0b(0xed)],'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x297fce);}logger[_0x41de0b(0xec)](_0x41de0b(0x102),_0x41de0b(0xdb)+_0x395089[_0x41de0b(0xef)]);}export async function createMenus(_0x4326d6,_0x521205){const _0x1fbc9c=a13_0x43dc;logger[_0x1fbc9c(0xec)](_0x1fbc9c(0xf5),'开始批量创建菜单,共\x20'+_0x4326d6['length']+'\x20个'),await Promise[_0x1fbc9c(0xeb)](_0x4326d6['map'](async _0xef7d0c=>{await _createMenu(_0xef7d0c,_0x521205);})),logger[_0x1fbc9c(0xec)]('create-menus',_0x1fbc9c(0xda)+_0x4326d6['length']+'\x20个');}
@@ -1 +1 @@
1
- const a14_0x37fc7a=a14_0x4784;(function(_0x5b7e88,_0x44918d){const _0x5805e7=a14_0x4784,_0x22316=_0x5b7e88();while(!![]){try{const _0x1c6856=-parseInt(_0x5805e7(0x7f))/0x1+parseInt(_0x5805e7(0x80))/0x2+-parseInt(_0x5805e7(0x73))/0x3+-parseInt(_0x5805e7(0x79))/0x4*(-parseInt(_0x5805e7(0x7c))/0x5)+parseInt(_0x5805e7(0x82))/0x6+-parseInt(_0x5805e7(0x89))/0x7*(parseInt(_0x5805e7(0x83))/0x8)+parseInt(_0x5805e7(0x87))/0x9*(parseInt(_0x5805e7(0x88))/0xa);if(_0x1c6856===_0x44918d)break;else _0x22316['push'](_0x22316['shift']());}catch(_0x2d5634){_0x22316['push'](_0x22316['shift']());}}}(a14_0x5252,0x281e7));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0x37fc7a(0x75)](),a14_0x37fc7a(0x74));export function extractTitleFromComment(_0x16e72f){const _0x77df75=a14_0x37fc7a;try{const _0x326ac0=readFileSync(_0x16e72f,'utf-8'),_0x105487=_0x326ac0[_0x77df75(0x7a)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x105487&&_0x105487[0x1]){const _0x3882cb=_0x105487[0x1],_0x29e384=_0x3882cb[_0x77df75(0x7a)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x29e384&&_0x29e384[0x1])return _0x29e384[0x1]['trim']();}let _0x4d5a74=null;const _0x5270d3=_0x326ac0[_0x77df75(0x7a)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5270d3&&_0x5270d3[0x1]&&(_0x4d5a74=_0x5270d3[0x1]);if(!_0x4d5a74){const _0xc6e865=_0x326ac0[_0x77df75(0x7a)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0xc6e865&&_0xc6e865[0x1]&&(_0x4d5a74=_0xc6e865[0x1]);}if(_0x4d5a74){const _0x2fc15f=new RegExp('\x5cb'+_0x4d5a74+_0x77df75(0x84)),_0x3e150c=_0x326ac0['match'](_0x2fc15f);if(_0x3e150c&&_0x3e150c[0x1])return _0x3e150c[0x1];return _0x4d5a74;}return null;}catch(_0x521929){return null;}}export function getLocalPages(_0x30002e=pagesDir,_0x5d7f0c=pagesDir){const _0x5210e3=a14_0x37fc7a;let _0x15e243=[];const _0x5dc4cc=readdirSync(_0x30002e);return _0x5dc4cc[_0x5210e3(0x71)](_0x4b51d3=>{const _0x12d2b3=_0x5210e3,_0xa7be79=join(_0x30002e,_0x4b51d3),_0xf2bc6b=statSync(_0xa7be79);if(_0xf2bc6b&&_0xf2bc6b[_0x12d2b3(0x7b)]())_0x15e243=_0x15e243[_0x12d2b3(0x7e)](getLocalPages(_0xa7be79,_0x5d7f0c));else{if(_0x4b51d3[_0x12d2b3(0x7d)](_0x12d2b3(0x76))){let _0x472b53=relative(_0x5d7f0c,_0xa7be79);_0x472b53[_0x12d2b3(0x7d)]('index.tsx')?_0x472b53=_0x472b53[_0x12d2b3(0x72)](/index\.tsx$/,''):_0x472b53=_0x472b53['replace'](/\.tsx$/,'');_0x472b53[_0x12d2b3(0x7d)]('/')&&(_0x472b53=_0x472b53[_0x12d2b3(0x78)](0x0,-0x1));const _0x47d412=extractTitleFromComment(_0xa7be79),_0x23fb06=_0x47d412||_0x472b53;_0x15e243[_0x12d2b3(0x86)]({'path':_0x472b53[_0x12d2b3(0x77)]('$',':'),'label':_0x23fb06});}}}),_0x15e243[_0x5210e3(0x85)](_0x552ad3=>_0x552ad3[_0x5210e3(0x81)]!=='');}function a14_0x4784(_0x37848d,_0x3097dd){_0x37848d=_0x37848d-0x71;const _0x5252b3=a14_0x5252();let _0x478463=_0x5252b3[_0x37848d];return _0x478463;}function a14_0x5252(){const _0x5d162f=['match','isDirectory','65PVCPuA','endsWith','concat','265394GfBqll','281258TWldPi','path','1386078XeWYtH','461456PnDCsL','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','filter','push','11601bZVncg','3170XcTaCA','7UPeAOl','forEach','replace','948561tLwbZy','src/pages','cwd','.tsx','replaceAll','slice','7180Enmetb'];a14_0x5252=function(){return _0x5d162f;};return a14_0x5252();}
1
+ const a14_0xab3c3f=a14_0x1c94;(function(_0x2a9439,_0x5f3bd4){const _0x39890f=a14_0x1c94,_0x4ca98f=_0x2a9439();while(!![]){try{const _0x2ee7e5=-parseInt(_0x39890f(0x189))/0x1+parseInt(_0x39890f(0x184))/0x2*(parseInt(_0x39890f(0x183))/0x3)+parseInt(_0x39890f(0x18b))/0x4*(-parseInt(_0x39890f(0x187))/0x5)+-parseInt(_0x39890f(0x17f))/0x6*(parseInt(_0x39890f(0x18f))/0x7)+-parseInt(_0x39890f(0x18a))/0x8+parseInt(_0x39890f(0x18d))/0x9*(-parseInt(_0x39890f(0x185))/0xa)+parseInt(_0x39890f(0x17e))/0xb*(parseInt(_0x39890f(0x188))/0xc);if(_0x2ee7e5===_0x5f3bd4)break;else _0x4ca98f['push'](_0x4ca98f['shift']());}catch(_0x360620){_0x4ca98f['push'](_0x4ca98f['shift']());}}}(a14_0x4bd0,0x2e2f1));function a14_0x4bd0(){const _0x350e2e=['src/pages','18410smeEZX','push','concat','.tsx','replaceAll','match','slice','filter','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','endsWith','utf-8','9970147BPKhNy','834mvhHyl','replace','path','trim','443943tJCxxk','4AlnhmX','70SfmUNL','index.tsx','90085xZYLVf','12PdvODQ','106395CwrkdW','2743640CmBuOw','16XidzhT','cwd','162234ACjFMV'];a14_0x4bd0=function(){return _0x350e2e;};return a14_0x4bd0();}function a14_0x1c94(_0x48da89,_0x550e7f){_0x48da89=_0x48da89-0x17a;const _0x4bd0f8=a14_0x4bd0();let _0x1c9460=_0x4bd0f8[_0x48da89];return _0x1c9460;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0xab3c3f(0x18c)](),a14_0xab3c3f(0x18e));export function extractTitleFromComment(_0x4db62a){const _0x817243=a14_0xab3c3f;try{const _0x942dae=readFileSync(_0x4db62a,_0x817243(0x17d)),_0x27b435=_0x942dae[_0x817243(0x194)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x27b435&&_0x27b435[0x1]){const _0x321b9c=_0x27b435[0x1],_0x4bd4c8=_0x321b9c['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4bd4c8&&_0x4bd4c8[0x1])return _0x4bd4c8[0x1][_0x817243(0x182)]();}let _0x5266d=null;const _0x24a701=_0x942dae['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x24a701&&_0x24a701[0x1]&&(_0x5266d=_0x24a701[0x1]);if(!_0x5266d){const _0x4bac50=_0x942dae[_0x817243(0x194)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4bac50&&_0x4bac50[0x1]&&(_0x5266d=_0x4bac50[0x1]);}if(_0x5266d){const _0x34d6c1=new RegExp('\x5cb'+_0x5266d+_0x817243(0x17b)),_0x4bcdbc=_0x942dae[_0x817243(0x194)](_0x34d6c1);if(_0x4bcdbc&&_0x4bcdbc[0x1])return _0x4bcdbc[0x1];return _0x5266d;}return null;}catch(_0x24df80){return null;}}export function getLocalPages(_0x2ae4bb=pagesDir,_0x20102c=pagesDir){const _0x245923=a14_0xab3c3f;let _0x568e5a=[];const _0x5c1d99=readdirSync(_0x2ae4bb);return _0x5c1d99['forEach'](_0x31adcc=>{const _0xc5d0e5=a14_0x1c94,_0x2e8472=join(_0x2ae4bb,_0x31adcc),_0x51c775=statSync(_0x2e8472);if(_0x51c775&&_0x51c775['isDirectory']())_0x568e5a=_0x568e5a[_0xc5d0e5(0x191)](getLocalPages(_0x2e8472,_0x20102c));else{if(_0x31adcc[_0xc5d0e5(0x17c)](_0xc5d0e5(0x192))){let _0x372231=relative(_0x20102c,_0x2e8472);_0x372231[_0xc5d0e5(0x17c)](_0xc5d0e5(0x186))?_0x372231=_0x372231[_0xc5d0e5(0x180)](/index\.tsx$/,''):_0x372231=_0x372231[_0xc5d0e5(0x180)](/\.tsx$/,'');_0x372231[_0xc5d0e5(0x17c)]('/')&&(_0x372231=_0x372231[_0xc5d0e5(0x195)](0x0,-0x1));const _0x4c9cbe=extractTitleFromComment(_0x2e8472),_0x42d893=_0x4c9cbe||_0x372231;_0x568e5a[_0xc5d0e5(0x190)]({'path':_0x372231[_0xc5d0e5(0x193)]('$',':'),'label':_0x42d893});}}}),_0x568e5a[_0x245923(0x17a)](_0x28e948=>_0x28e948[_0x245923(0x181)]!=='');}
@@ -1 +1 @@
1
- (function(_0x11abd5,_0x22865f){const _0xd81b81=a15_0x4430,_0x11f4fe=_0x11abd5();while(!![]){try{const _0x28d793=-parseInt(_0xd81b81(0x14f))/0x1*(-parseInt(_0xd81b81(0x148))/0x2)+-parseInt(_0xd81b81(0x13a))/0x3+-parseInt(_0xd81b81(0x12a))/0x4+-parseInt(_0xd81b81(0x138))/0x5*(-parseInt(_0xd81b81(0x14c))/0x6)+parseInt(_0xd81b81(0x14e))/0x7+-parseInt(_0xd81b81(0x136))/0x8+parseInt(_0xd81b81(0x13c))/0x9;if(_0x28d793===_0x22865f)break;else _0x11f4fe['push'](_0x11f4fe['shift']());}catch(_0x4ae495){_0x11f4fe['push'](_0x11f4fe['shift']());}}}(a15_0x55b5,0x5d928));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a15_0x4430(_0x54dfca,_0x53954d){_0x54dfca=_0x54dfca-0x129;const _0x55b50a=a15_0x55b5();let _0x44307a=_0x55b50a[_0x54dfca];return _0x44307a;}import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';const config=readConfig();export async function getOnlineMenuList(){const _0x20bc45=a15_0x4430,_0x517c91=config?.[_0x20bc45(0x140)];if(!_0x517c91){const _0x28967b=_0x20bc45(0x13b);return logger[_0x20bc45(0x141)](_0x20bc45(0x143),_0x28967b),console['error']('×\x20'+_0x28967b),console[_0x20bc45(0x12c)](_0x20bc45(0x14b)),console[_0x20bc45(0x12c)](_0x20bc45(0x152)),console['log'](_0x20bc45(0x130)),[];}const _0x134dd4=getEnv();logger[_0x20bc45(0x153)](_0x20bc45(0x143),_0x134dd4===_0x20bc45(0x13e)?_0x20bc45(0x134)+_0x517c91+')':_0x20bc45(0x139)+_0x517c91+')');const _0x189d09=await fetch(getApiDomain()+_0x20bc45(0x142)+_0x517c91,{'method':_0x20bc45(0x132),'headers':{'Content-Type':_0x20bc45(0x149),'Cookie':getCookie()}});if(!_0x189d09['ok']){if(_0x189d09[_0x20bc45(0x151)]===0x191){const _0x16803c=_0x20bc45(0x12e);logger[_0x20bc45(0x141)](_0x20bc45(0x143),_0x16803c,{'status':_0x189d09[_0x20bc45(0x151)]});throw new Error(_0x16803c);}const _0x6f8471=_0x20bc45(0x147)+_0x189d09['status'];logger[_0x20bc45(0x141)](_0x20bc45(0x143),_0x6f8471);throw new Error(_0x6f8471);}const _0x4e5518=await _0x189d09['json']();if(!_0x4e5518[_0x20bc45(0x144)]){const _0x5f2cda=_0x20bc45(0x135)+(_0x4e5518[_0x20bc45(0x129)]||_0x20bc45(0x133));logger[_0x20bc45(0x141)](_0x20bc45(0x143),_0x5f2cda,{'errorCode':_0x4e5518[_0x20bc45(0x12b)],'errorMsg':_0x4e5518[_0x20bc45(0x129)]});throw new Error(_0x5f2cda);}if(!_0x4e5518[_0x20bc45(0x14d)])return logger[_0x20bc45(0x153)](_0x20bc45(0x143),_0x20bc45(0x154)),[];return logger[_0x20bc45(0x153)](_0x20bc45(0x143),_0x20bc45(0x14a)+_0x4e5518[_0x20bc45(0x14d)][_0x20bc45(0x13f)]+'\x20个线上菜单'),_0x4e5518[_0x20bc45(0x14d)][_0x20bc45(0x150)](formatMenuList)[_0x20bc45(0x145)]();}function formatMenuList(_0x562bd9){const _0xdfc021=a15_0x4430;let _0x273c5a=[];try{if(_0x562bd9[_0xdfc021(0x12d)]?.['resources']){const _0x4da0e5=JSON['parse'](_0x562bd9[_0xdfc021(0x12d)][_0xdfc021(0x13d)]);Array[_0xdfc021(0x146)](_0x4da0e5)&&(_0x273c5a=_0x4da0e5);}}catch(_0x3148c1){}const _0xccffe1=[{'id':_0x562bd9['id'],'path':_0x562bd9[_0xdfc021(0x12f)],'label':_0x562bd9[_0xdfc021(0x131)],'resources':_0x273c5a}];if(_0x562bd9[_0xdfc021(0x137)]&&_0x562bd9[_0xdfc021(0x137)][_0xdfc021(0x13f)]>0x0)for(const _0x54c85c of _0x562bd9[_0xdfc021(0x137)]){_0xccffe1['push'](...formatMenuList(_0x54c85c));}return _0xccffe1;}function a15_0x55b5(){const _0x23337f=['log','extend','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','path','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','label','GET','未知错误','正在获取线上菜单列表...\x20(appCode:\x20','获取菜单列表失败:\x20','5970512wIGmQH','children','5iWbrHh','正在获取日常菜单列表...\x20(appCode:\x20','1208718AxASBQ','未提供应用AppCode,且配置中也没有默认值','6703398nqkBud','resources','online','length','appcode','error','/smartapi/menu/find?appCode=','get-online-menu-list','success','flat','isArray','获取菜单列表失败,HTTP状态码:\x20','2674GiswTN','application/json','成功获取\x20','!\x20请使用以下方式之一:','3069318KgFFuy','data','1229585RAWXuN','169BphyuS','map','status','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','info','服务端返回空菜单列表','errorMsg','501964IzxfHY','errorCode'];a15_0x55b5=function(){return _0x23337f;};return a15_0x55b5();}
1
+ function a15_0x2053(_0x48cf95,_0x10b491){_0x48cf95=_0x48cf95-0xba;const _0x35821d=a15_0x3582();let _0x205346=_0x35821d[_0x48cf95];return _0x205346;}(function(_0xbbe39,_0x115424){const _0x58fb90=a15_0x2053,_0x25389a=_0xbbe39();while(!![]){try{const _0x6dddbe=-parseInt(_0x58fb90(0xc0))/0x1+parseInt(_0x58fb90(0xbf))/0x2*(-parseInt(_0x58fb90(0xd8))/0x3)+parseInt(_0x58fb90(0xc4))/0x4*(-parseInt(_0x58fb90(0xd3))/0x5)+-parseInt(_0x58fb90(0xcf))/0x6+parseInt(_0x58fb90(0xc5))/0x7*(parseInt(_0x58fb90(0xbd))/0x8)+parseInt(_0x58fb90(0xba))/0x9+parseInt(_0x58fb90(0xbb))/0xa;if(_0x6dddbe===_0x115424)break;else _0x25389a['push'](_0x25389a['shift']());}catch(_0x28ab28){_0x25389a['push'](_0x25389a['shift']());}}}(a15_0x3582,0xed485));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';const config=readConfig();function a15_0x3582(){const _0x144290=['errorMsg','path','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','服务端返回空菜单列表','/smartapi/menu/find?appCode=','appcode','data','10801305YGjicW','28113850zBwyyy','未提供应用AppCode,且配置中也没有默认值','8gLZOko','application/json','369580pzEiMw','579951uUfPSs','status','children','未知错误','6632ldSHPM','12749163wLZqsv','!\x20请使用以下方式之一:','get-online-menu-list','获取菜单列表失败:\x20','resources','online','push','extend','label','GET','7246902YsFnsx','flat','error','json','3695DOiLfD','\x20个线上菜单','log','isArray','info','30dyaFGl','正在获取线上菜单列表...\x20(appCode:\x20','获取菜单列表失败,HTTP状态码:\x20'];a15_0x3582=function(){return _0x144290;};return a15_0x3582();}export async function getOnlineMenuList(){const _0x1577c4=a15_0x2053,_0x2f5512=config?.[_0x1577c4(0xe0)];if(!_0x2f5512){const _0x31ba9c=_0x1577c4(0xbc);return logger[_0x1577c4(0xd1)]('get-online-menu-list',_0x31ba9c),console[_0x1577c4(0xd1)]('×\x20'+_0x31ba9c),console[_0x1577c4(0xd5)](_0x1577c4(0xc6)),console['log']('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log']('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>'),[];}const _0x1ad1b7=getEnv();logger['info'](_0x1577c4(0xc7),_0x1ad1b7===_0x1577c4(0xca)?_0x1577c4(0xd9)+_0x2f5512+')':'正在获取日常菜单列表...\x20(appCode:\x20'+_0x2f5512+')');const _0x2b5974=await fetch(getApiDomain()+_0x1577c4(0xdf)+_0x2f5512,{'method':_0x1577c4(0xce),'headers':{'Content-Type':_0x1577c4(0xbe),'Cookie':getCookie()}});if(!_0x2b5974['ok']){if(_0x2b5974[_0x1577c4(0xc1)]===0x191){const _0x59f070=_0x1577c4(0xdd);logger[_0x1577c4(0xd1)](_0x1577c4(0xc7),_0x59f070,{'status':_0x2b5974[_0x1577c4(0xc1)]});throw new Error(_0x59f070);}const _0x3fbe1f=_0x1577c4(0xda)+_0x2b5974[_0x1577c4(0xc1)];logger[_0x1577c4(0xd1)](_0x1577c4(0xc7),_0x3fbe1f);throw new Error(_0x3fbe1f);}const _0x46ea47=await _0x2b5974[_0x1577c4(0xd2)]();if(!_0x46ea47['success']){const _0x554541=_0x1577c4(0xc8)+(_0x46ea47[_0x1577c4(0xdb)]||_0x1577c4(0xc3));logger['error']('get-online-menu-list',_0x554541,{'errorCode':_0x46ea47['errorCode'],'errorMsg':_0x46ea47[_0x1577c4(0xdb)]});throw new Error(_0x554541);}if(!_0x46ea47[_0x1577c4(0xe1)])return logger['info'](_0x1577c4(0xc7),_0x1577c4(0xde)),[];return logger[_0x1577c4(0xd7)](_0x1577c4(0xc7),'成功获取\x20'+_0x46ea47[_0x1577c4(0xe1)]['length']+_0x1577c4(0xd4)),_0x46ea47[_0x1577c4(0xe1)]['map'](formatMenuList)[_0x1577c4(0xd0)]();}function formatMenuList(_0x385ab2){const _0x4f714a=a15_0x2053;let _0x12cd80=[];try{if(_0x385ab2[_0x4f714a(0xcc)]?.[_0x4f714a(0xc9)]){const _0x15fb30=JSON['parse'](_0x385ab2['extend'][_0x4f714a(0xc9)]);Array[_0x4f714a(0xd6)](_0x15fb30)&&(_0x12cd80=_0x15fb30);}}catch(_0x30cd4c){}const _0x29d4a3=[{'id':_0x385ab2['id'],'path':_0x385ab2[_0x4f714a(0xdc)],'label':_0x385ab2[_0x4f714a(0xcd)],'resources':_0x12cd80}];if(_0x385ab2[_0x4f714a(0xc2)]&&_0x385ab2[_0x4f714a(0xc2)]['length']>0x0)for(const _0x246709 of _0x385ab2[_0x4f714a(0xc2)]){_0x29d4a3[_0x4f714a(0xcb)](...formatMenuList(_0x246709));}return _0x29d4a3;}
@@ -1 +1 @@
1
- function a17_0x5168(_0xf2ad7a,_0xb307dd){_0xf2ad7a=_0xf2ad7a-0x1cd;const _0x4304c6=a17_0x4304();let _0x516821=_0x4304c6[_0xf2ad7a];return _0x516821;}(function(_0x28dfc2,_0x5bbbb5){const _0x4956bb=a17_0x5168,_0x4de9cd=_0x28dfc2();while(!![]){try{const _0x19b1e6=parseInt(_0x4956bb(0x1d0))/0x1+-parseInt(_0x4956bb(0x1dc))/0x2+-parseInt(_0x4956bb(0x1d5))/0x3*(parseInt(_0x4956bb(0x1d4))/0x4)+-parseInt(_0x4956bb(0x1cd))/0x5*(-parseInt(_0x4956bb(0x1d2))/0x6)+-parseInt(_0x4956bb(0x1cf))/0x7+parseInt(_0x4956bb(0x1d8))/0x8*(-parseInt(_0x4956bb(0x1d3))/0x9)+parseInt(_0x4956bb(0x1d1))/0xa*(parseInt(_0x4956bb(0x1d7))/0xb);if(_0x19b1e6===_0x5bbbb5)break;else _0x4de9cd['push'](_0x4de9cd['shift']());}catch(_0x15d61a){_0x4de9cd['push'](_0x4de9cd['shift']());}}}(a17_0x4304,0xc9fdf));import{useEffect,useState}from'react';function a17_0x4304(){const _0x101761=['3305484jlMpFa','84UgsHPX','71448DpEvbN','finally','39842wCTleB','8NpNvCd','获取菜单列表失败','then','catch','3220634hkvksy','195FPqiSl','message','10168802StDjBa','318429swThee','9410RZIVmV','158622tVVcyU'];a17_0x4304=function(){return _0x101761;};return a17_0x4304();}import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x1767bf,_0x492b93]=useState([]),[_0x2d942a,_0xba4dde]=useState(!![]),[_0x3998e5,_0x4c570a]=useState('');return useEffect(()=>{const _0xbf7c0d=a17_0x5168;_0xba4dde(!![]),_0x4c570a(''),getOnlineMenuList()[_0xbf7c0d(0x1da)](_0x492b93)[_0xbf7c0d(0x1db)](_0xba6193=>{const _0x4623ad=_0xbf7c0d;_0x4c570a(_0xba6193[_0x4623ad(0x1ce)]||_0x4623ad(0x1d9));})[_0xbf7c0d(0x1d6)](()=>_0xba4dde(![]));},[]),{'menuList':_0x1767bf,'loading':_0x2d942a,'error':_0x3998e5};}
1
+ (function(_0x377ed7,_0x3ac5db){const _0x1b18ed=a17_0x1058,_0x5e4311=_0x377ed7();while(!![]){try{const _0x21451c=-parseInt(_0x1b18ed(0x103))/0x1*(parseInt(_0x1b18ed(0xfe))/0x2)+parseInt(_0x1b18ed(0x105))/0x3+-parseInt(_0x1b18ed(0x10a))/0x4*(-parseInt(_0x1b18ed(0x101))/0x5)+parseInt(_0x1b18ed(0x109))/0x6*(parseInt(_0x1b18ed(0xff))/0x7)+parseInt(_0x1b18ed(0x106))/0x8*(parseInt(_0x1b18ed(0x102))/0x9)+parseInt(_0x1b18ed(0x108))/0xa+-parseInt(_0x1b18ed(0x100))/0xb*(parseInt(_0x1b18ed(0x107))/0xc);if(_0x21451c===_0x3ac5db)break;else _0x5e4311['push'](_0x5e4311['shift']());}catch(_0x4eaeb6){_0x5e4311['push'](_0x5e4311['shift']());}}}(a17_0x3e45,0x96648));function a17_0x1058(_0x23c0d5,_0x83dd88){_0x23c0d5=_0x23c0d5-0xfb;const _0x3e45ad=a17_0x3e45();let _0x10588a=_0x3e45ad[_0x23c0d5];return _0x10588a;}function a17_0x3e45(){const _0x3f97c2=['3023400zzCodO','6488ZLmMoA','12mLPPMe','4664620scdCie','1464546UQuxVe','563912rvrKbi','finally','获取菜单列表失败','message','then','538jBePuU','7HSledo','18836884WcBYls','20HWbPit','7686ecXSZu','2403QcpMsZ','catch'];a17_0x3e45=function(){return _0x3f97c2;};return a17_0x3e45();}import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x38dabe,_0x44dd01]=useState([]),[_0x279312,_0x26b471]=useState(!![]),[_0x385517,_0x10378d]=useState('');return useEffect(()=>{const _0x162704=a17_0x1058;_0x26b471(!![]),_0x10378d(''),getOnlineMenuList()[_0x162704(0xfd)](_0x44dd01)[_0x162704(0x104)](_0x3d8d98=>{const _0x31d074=_0x162704;_0x10378d(_0x3d8d98[_0x31d074(0xfc)]||_0x31d074(0xfb));})[_0x162704(0x10b)](()=>_0x26b471(![]));},[]),{'menuList':_0x38dabe,'loading':_0x279312,'error':_0x385517};}
@@ -1 +1 @@
1
- function a18_0x2555(_0x4e256b,_0x58fadc){_0x4e256b=_0x4e256b-0x1ca;const _0x269cc4=a18_0x269c();let _0x2555ef=_0x269cc4[_0x4e256b];return _0x2555ef;}(function(_0x72dde0,_0x2677f0){const _0x1b104a=a18_0x2555,_0x4a80da=_0x72dde0();while(!![]){try{const _0xd199cc=-parseInt(_0x1b104a(0x1d2))/0x1+-parseInt(_0x1b104a(0x1d7))/0x2*(-parseInt(_0x1b104a(0x1cf))/0x3)+parseInt(_0x1b104a(0x1d6))/0x4+parseInt(_0x1b104a(0x1d0))/0x5*(parseInt(_0x1b104a(0x1d5))/0x6)+parseInt(_0x1b104a(0x1cd))/0x7+parseInt(_0x1b104a(0x1cb))/0x8*(-parseInt(_0x1b104a(0x1d1))/0x9)+-parseInt(_0x1b104a(0x1ce))/0xa*(-parseInt(_0x1b104a(0x1d3))/0xb);if(_0xd199cc===_0x2677f0)break;else _0x4a80da['push'](_0x4a80da['shift']());}catch(_0x441eed){_0x4a80da['push'](_0x4a80da['shift']());}}}(a18_0x269c,0xb20a8));export function getRemainingSpaces(_0x41a9f4,_0x1bf4d8){const _0x9de323=a18_0x2555,_0x952da7=getStringWidth(_0x1bf4d8);return Array(Math['max'](0x0,_0x41a9f4-_0x952da7))[_0x9de323(0x1ca)]('\x20')[_0x9de323(0x1d4)]('');}export function getMaxWidth(_0x2c84dc,_0x1c7001=0x2){const _0x17b1c7=a18_0x2555;let _0x36d172='',_0x29678b=0x0;for(const _0x204cb1 of _0x2c84dc){const _0x3d1a72=getStringWidth(_0x204cb1);_0x3d1a72>_0x29678b&&(_0x29678b=_0x3d1a72,_0x36d172=_0x204cb1);}return _0x36d172+'\x20'[_0x17b1c7(0x1cc)](_0x1c7001);}function a18_0x269c(){const _0x119991=['16WKRLtp','repeat','4805479NQnFDb','8830PZbnlv','258nQyqwW','5KcDKwz','2289546LIRSvH','1285849MwtasI','902ZKeXzc','join','2983614tosxHb','912612zBwuYG','24176zZhiik','test','fill'];a18_0x269c=function(){return _0x119991;};return a18_0x269c();}export function getStringWidth(_0x2d2b78){const _0x4fa7e0=a18_0x2555;let _0x50bf82=0x0;for(const _0x331a01 of _0x2d2b78){/[\u4e00-\u9fa5]/[_0x4fa7e0(0x1d8)](_0x331a01)?_0x50bf82+=0x2:_0x50bf82+=0x1;}return _0x50bf82;}
1
+ (function(_0x591d6c,_0x5a0468){const _0x1c6456=a18_0x59ae,_0x4ef2cc=_0x591d6c();while(!![]){try{const _0x1155f5=-parseInt(_0x1c6456(0x14d))/0x1+-parseInt(_0x1c6456(0x156))/0x2+-parseInt(_0x1c6456(0x154))/0x3+parseInt(_0x1c6456(0x153))/0x4*(parseInt(_0x1c6456(0x155))/0x5)+-parseInt(_0x1c6456(0x152))/0x6+parseInt(_0x1c6456(0x14f))/0x7+parseInt(_0x1c6456(0x159))/0x8*(parseInt(_0x1c6456(0x151))/0x9);if(_0x1155f5===_0x5a0468)break;else _0x4ef2cc['push'](_0x4ef2cc['shift']());}catch(_0x523372){_0x4ef2cc['push'](_0x4ef2cc['shift']());}}}(a18_0x3e16,0x61b60));function a18_0x59ae(_0x51de84,_0x3e7b2e){_0x51de84=_0x51de84-0x14d;const _0x3e16ba=a18_0x3e16();let _0x59ae46=_0x3e16ba[_0x51de84];return _0x59ae46;}export function getRemainingSpaces(_0x25f1c8,_0x55863d){const _0x12a35a=a18_0x59ae,_0x1e77c2=getStringWidth(_0x55863d);return Array(Math[_0x12a35a(0x157)](0x0,_0x25f1c8-_0x1e77c2))[_0x12a35a(0x158)]('\x20')[_0x12a35a(0x150)]('');}export function getMaxWidth(_0x54633f,_0x583b32=0x2){let _0xf4b48a='',_0x1d3381=0x0;for(const _0xe1011a of _0x54633f){const _0x4caf64=getStringWidth(_0xe1011a);_0x4caf64>_0x1d3381&&(_0x1d3381=_0x4caf64,_0xf4b48a=_0xe1011a);}return _0xf4b48a+'\x20'['repeat'](_0x583b32);}function a18_0x3e16(){const _0x57f582=['590742piBqbe','max','fill','785336ZzNnMN','561497IYnHYM','test','2923046gNXHAf','join','153oLBZIo','4283904zguBiX','4tmQCxE','1520160WrjgID','1956895PuMkJj'];a18_0x3e16=function(){return _0x57f582;};return a18_0x3e16();}export function getStringWidth(_0x14f923){const _0x34a320=a18_0x59ae;let _0x318853=0x0;for(const _0x428d15 of _0x14f923){/[\u4e00-\u9fa5]/[_0x34a320(0x14e)](_0x428d15)?_0x318853+=0x2:_0x318853+=0x1;}return _0x318853;}
@@ -1 +1 @@
1
- function a19_0x4e27(_0x465444,_0x4fb6dd){_0x465444=_0x465444-0x14f;const _0x244801=a19_0x2448();let _0x4e27d1=_0x244801[_0x465444];return _0x4e27d1;}(function(_0x5665d6,_0xb94c4e){const _0x43d473=a19_0x4e27,_0x330d99=_0x5665d6();while(!![]){try{const _0x4348c0=-parseInt(_0x43d473(0x15c))/0x1+parseInt(_0x43d473(0x157))/0x2*(parseInt(_0x43d473(0x155))/0x3)+-parseInt(_0x43d473(0x151))/0x4*(-parseInt(_0x43d473(0x15d))/0x5)+-parseInt(_0x43d473(0x154))/0x6*(-parseInt(_0x43d473(0x14f))/0x7)+parseInt(_0x43d473(0x158))/0x8*(parseInt(_0x43d473(0x159))/0x9)+-parseInt(_0x43d473(0x15b))/0xa*(parseInt(_0x43d473(0x153))/0xb)+-parseInt(_0x43d473(0x15a))/0xc;if(_0x4348c0===_0xb94c4e)break;else _0x330d99['push'](_0x330d99['shift']());}catch(_0x15ceac){_0x330d99['push'](_0x330d99['shift']());}}}(a19_0x2448,0x838d3));function a19_0x2448(){const _0x26e653=['1526921fYYldp','1296ZgfXdF','643185lEHhya','test','2DwcQQf','1579112MaMzYY','27EztjTR','18039516HQzSZQ','10TCiefP','243065aofGid','3820130SZyfVz','27657uXYJHR','trim','4zgBCLo','HEAD'];a19_0x2448=function(){return _0x26e653;};return a19_0x2448();}export function isValidJsHttpsUrl(_0x58d83c){const _0x5124ad=a19_0x4e27;return/^https:\/\/.+\.js(\?.*)?$/[_0x5124ad(0x156)](_0x58d83c[_0x5124ad(0x150)]());}export function isValidCssHttpsUrl(_0x5e7a56){const _0x262402=a19_0x4e27;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x5e7a56[_0x262402(0x150)]());}export async function isUrlReachable(_0x45f592){const _0x4f6f5a=a19_0x4e27;try{const _0x5be980=await fetch(_0x45f592,{'method':_0x4f6f5a(0x152)});return _0x5be980['ok'];}catch{return![];}}
1
+ function a19_0x7f6d(_0x3817fa,_0x42a036){_0x3817fa=_0x3817fa-0x84;const _0x27e91e=a19_0x27e9();let _0x7f6dd0=_0x27e91e[_0x3817fa];return _0x7f6dd0;}(function(_0x4bbcd0,_0x19d682){const _0x4ea295=a19_0x7f6d,_0x411192=_0x4bbcd0();while(!![]){try{const _0x5097d4=-parseInt(_0x4ea295(0x8b))/0x1+parseInt(_0x4ea295(0x85))/0x2+parseInt(_0x4ea295(0x8a))/0x3+-parseInt(_0x4ea295(0x88))/0x4*(parseInt(_0x4ea295(0x89))/0x5)+parseInt(_0x4ea295(0x8c))/0x6+-parseInt(_0x4ea295(0x84))/0x7+parseInt(_0x4ea295(0x87))/0x8;if(_0x5097d4===_0x19d682)break;else _0x411192['push'](_0x411192['shift']());}catch(_0x47acf5){_0x411192['push'](_0x411192['shift']());}}}(a19_0x27e9,0x83d25));function a19_0x27e9(){const _0x4f5dd2=['5021682clAwyd','6009388FHmqUN','753166wUCEPY','test','9073224teHcOY','34404ilouyK','235sRZIQi','1506561wwxfNw','1047198thfpmt'];a19_0x27e9=function(){return _0x4f5dd2;};return a19_0x27e9();}export function isValidJsHttpsUrl(_0x3d6f40){const _0x4d6b08=a19_0x7f6d;return/^https:\/\/.+\.js(\?.*)?$/[_0x4d6b08(0x86)](_0x3d6f40['trim']());}export function isValidCssHttpsUrl(_0x3f4ca3){const _0x902f88=a19_0x7f6d;return/^https:\/\/.+\.css(\?.*)?$/[_0x902f88(0x86)](_0x3f4ca3['trim']());}export async function isUrlReachable(_0x29d310){try{const _0xfa81b1=await fetch(_0x29d310,{'method':'HEAD'});return _0xfa81b1['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x37032c,_0x53584a){const _0x45488a=a20_0x917e,_0x123aca=_0x37032c();while(!![]){try{const _0x30a3b7=parseInt(_0x45488a(0x1c6))/0x1*(parseInt(_0x45488a(0x1cd))/0x2)+parseInt(_0x45488a(0x1d2))/0x3*(-parseInt(_0x45488a(0x1c4))/0x4)+-parseInt(_0x45488a(0x1be))/0x5+parseInt(_0x45488a(0x1ca))/0x6*(parseInt(_0x45488a(0x1d1))/0x7)+-parseInt(_0x45488a(0x1c1))/0x8*(parseInt(_0x45488a(0x1c0))/0x9)+-parseInt(_0x45488a(0x1c8))/0xa+parseInt(_0x45488a(0x1c9))/0xb;if(_0x30a3b7===_0x53584a)break;else _0x123aca['push'](_0x123aca['shift']());}catch(_0x174d48){_0x123aca['push'](_0x123aca['shift']());}}}(a20_0x5f17,0xa6a57));function a20_0x5f17(){const _0x5738ff=['961IBrRHx','label','11187610lFmNGE','24584648faqkap','276HBKysK','flat','resources','1402JmpdpU','length','join','待更新的菜单列表:','168119fXuUoi','762NcOCrE','*\x20待更新的菜单&资源链接','1272300rsiVKE','column','9TvtrvF','5651224fYCAbq','待更新的资源链接:','cyan','19704VmRpoY','map'];a20_0x5f17=function(){return _0x5738ff;};return a20_0x5f17();}import{jsx as a20_0x2ae764,jsxs as a20_0xb000f7}from'react/jsx-runtime';import{Text,Box}from'ink';function a20_0x917e(_0x3f52cc,_0x585ac3){_0x3f52cc=_0x3f52cc-0x1bd;const _0x5f17b5=a20_0x5f17();let _0x917e13=_0x5f17b5[_0x3f52cc];return _0x917e13;}export function CurrentMenuCdnContent(_0x5cb1b8){const _0x5668c0=a20_0x917e,{menuList:_0x4da6a4}=_0x5cb1b8,_0x5e49c9=_0x4da6a4['filter'](_0x84a6a0=>_0x84a6a0['resources'][_0x5668c0(0x1ce)]),_0x4438e4=Array['from'](new Set(_0x4da6a4[_0x5668c0(0x1c5)](_0x2b8650=>_0x2b8650[_0x5668c0(0x1cc)])[_0x5668c0(0x1cb)]()));return a20_0xb000f7(Box,{'flexDirection':'column','children':[a20_0x2ae764(Text,{'color':_0x5668c0(0x1c3),'children':_0x5668c0(0x1bd)}),a20_0xb000f7(Box,{'marginTop':0x1,'flexDirection':_0x5668c0(0x1bf),'children':[a20_0xb000f7(Text,{'bold':!![],'children':['\x20\x20',_0x5668c0(0x1d0)]}),a20_0xb000f7(Text,{'children':['\x20\x20',_0x5e49c9[_0x5668c0(0x1c5)](_0xf1b5a0=>_0xf1b5a0[_0x5668c0(0x1c7)])[_0x5668c0(0x1cf)](',\x20')]})]}),a20_0x2ae764(Box,{'marginTop':0x1,'children':a20_0xb000f7(Text,{'bold':!![],'children':['\x20\x20',_0x5668c0(0x1c2)]})}),_0x4438e4[_0x5668c0(0x1c5)](_0x2917b=>a20_0x2ae764(Box,{'children':a20_0xb000f7(Text,{'children':['\x20\x20',_0x2917b]})},_0x2917b))]});}
1
+ (function(_0x21b400,_0x1c39f6){const _0x539d38=a20_0xa381,_0x5c599a=_0x21b400();while(!![]){try{const _0x45e5a3=parseInt(_0x539d38(0x1c3))/0x1*(parseInt(_0x539d38(0x1d5))/0x2)+parseInt(_0x539d38(0x1d0))/0x3+parseInt(_0x539d38(0x1d1))/0x4+-parseInt(_0x539d38(0x1c5))/0x5+parseInt(_0x539d38(0x1d6))/0x6*(-parseInt(_0x539d38(0x1d2))/0x7)+-parseInt(_0x539d38(0x1cb))/0x8*(-parseInt(_0x539d38(0x1d4))/0x9)+-parseInt(_0x539d38(0x1c7))/0xa;if(_0x45e5a3===_0x1c39f6)break;else _0x5c599a['push'](_0x5c599a['shift']());}catch(_0x2adf43){_0x5c599a['push'](_0x5c599a['shift']());}}}(a20_0x29e7,0x4d0d9));import{jsx as a20_0x3fac8b,jsxs as a20_0x41fdc8}from'react/jsx-runtime';function a20_0xa381(_0x2ab1b2,_0x4eba53){_0x2ab1b2=_0x2ab1b2-0x1c2;const _0x29e79d=a20_0x29e7();let _0xa38140=_0x29e79d[_0x2ab1b2];return _0xa38140;}function a20_0x29e7(){const _0x3f1d3b=['*\x20待更新的菜单&资源链接','149NcjrIE','join','383425bjVOwL','待更新的菜单列表:','8901630MYdOuq','length','resources','label','48bSDwwR','flat','filter','from','map','959940AQkEbr','2287520XIcuWw','752647tFPpDE','cyan','300006HrGLbA','6888qfzkRn','18NVylSe'];a20_0x29e7=function(){return _0x3f1d3b;};return a20_0x29e7();}import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x58c542){const _0x32b29c=a20_0xa381,{menuList:_0x45ab13}=_0x58c542,_0x385b5c=_0x45ab13[_0x32b29c(0x1cd)](_0x331d52=>_0x331d52[_0x32b29c(0x1c9)][_0x32b29c(0x1c8)]),_0x4f4d01=Array[_0x32b29c(0x1ce)](new Set(_0x45ab13[_0x32b29c(0x1cf)](_0x30aaab=>_0x30aaab[_0x32b29c(0x1c9)])[_0x32b29c(0x1cc)]()));return a20_0x41fdc8(Box,{'flexDirection':'column','children':[a20_0x3fac8b(Text,{'color':_0x32b29c(0x1d3),'children':_0x32b29c(0x1c2)}),a20_0x41fdc8(Box,{'marginTop':0x1,'flexDirection':'column','children':[a20_0x41fdc8(Text,{'bold':!![],'children':['\x20\x20',_0x32b29c(0x1c6)]}),a20_0x41fdc8(Text,{'children':['\x20\x20',_0x385b5c[_0x32b29c(0x1cf)](_0x563da5=>_0x563da5[_0x32b29c(0x1ca)])[_0x32b29c(0x1c4)](',\x20')]})]}),a20_0x3fac8b(Box,{'marginTop':0x1,'children':a20_0x41fdc8(Text,{'bold':!![],'children':['\x20\x20','待更新的资源链接:']})}),_0x4f4d01['map'](_0x230849=>a20_0x3fac8b(Box,{'children':a20_0x41fdc8(Text,{'children':['\x20\x20',_0x230849]})},_0x230849))]});}
@@ -1 +1 @@
1
- (function(_0x279770,_0x32c6fe){const _0x40d01e=a21_0x2c28,_0x187638=_0x279770();while(!![]){try{const _0x3b57d1=parseInt(_0x40d01e(0x18d))/0x1+parseInt(_0x40d01e(0x187))/0x2*(parseInt(_0x40d01e(0x185))/0x3)+parseInt(_0x40d01e(0x191))/0x4+-parseInt(_0x40d01e(0x18b))/0x5*(parseInt(_0x40d01e(0x190))/0x6)+parseInt(_0x40d01e(0x18e))/0x7*(parseInt(_0x40d01e(0x186))/0x8)+-parseInt(_0x40d01e(0x18a))/0x9+-parseInt(_0x40d01e(0x18f))/0xa*(-parseInt(_0x40d01e(0x192))/0xb);if(_0x3b57d1===_0x32c6fe)break;else _0x187638['push'](_0x187638['shift']());}catch(_0x13b9d6){_0x187638['push'](_0x187638['shift']());}}}(a21_0x5855,0x61e9a));import{jsx as a21_0x25f3b8,jsxs as a21_0x7ab808}from'react/jsx-runtime';function a21_0x2c28(_0x513130,_0x3cabbc){_0x513130=_0x513130-0x185;const _0x585571=a21_0x5855();let _0x2c28fc=_0x585571[_0x513130];return _0x2c28fc;}import{Text,Box}from'ink';export function InputCdnAsset(_0x224768){const _0x26d43b=a21_0x2c28,{jsCdnUrl:_0x369566,cssCdnUrl:_0x2e4d88}=_0x224768;return a21_0x7ab808(Box,{'flexDirection':'column','marginTop':0x1,'children':[a21_0x25f3b8(Text,{'color':_0x26d43b(0x189),'children':'*\x20已输入的资源资源'}),a21_0x7ab808(Box,{'children':[a21_0x7ab808(Text,{'children':['\x20\x20','JS\x20链接:\x20']}),a21_0x25f3b8(Text,{'color':'green','children':_0x369566})]}),a21_0x7ab808(Box,{'children':[a21_0x7ab808(Text,{'children':['\x20\x20',_0x26d43b(0x18c)]}),a21_0x25f3b8(Text,{'color':_0x26d43b(0x188),'children':_0x2e4d88})]})]});}function a21_0x5855(){const _0x5cd6b1=['green','cyan','6432858qzbrwP','20WHtBjJ','CSS\x20链接:\x20','196021GvQNXm','7lUWgoH','788330qGkZsb','87210giLeYc','1162084qvfFEn','33pJkNNn','198jlcsFd','3258808uddQQd','1320QxNhsr'];a21_0x5855=function(){return _0x5cd6b1;};return a21_0x5855();}
1
+ function a21_0x2de7(_0x59b129,_0x2d5812){_0x59b129=_0x59b129-0x1dc;const _0x1c694e=a21_0x1c69();let _0x2de785=_0x1c694e[_0x59b129];return _0x2de785;}(function(_0x4c45f8,_0x137023){const _0x131643=a21_0x2de7,_0x39dcb8=_0x4c45f8();while(!![]){try{const _0x2dc8f2=parseInt(_0x131643(0x1e4))/0x1*(parseInt(_0x131643(0x1de))/0x2)+-parseInt(_0x131643(0x1e0))/0x3+parseInt(_0x131643(0x1e5))/0x4+-parseInt(_0x131643(0x1e8))/0x5*(parseInt(_0x131643(0x1dc))/0x6)+-parseInt(_0x131643(0x1e1))/0x7+-parseInt(_0x131643(0x1e2))/0x8+-parseInt(_0x131643(0x1e3))/0x9*(-parseInt(_0x131643(0x1df))/0xa);if(_0x2dc8f2===_0x137023)break;else _0x39dcb8['push'](_0x39dcb8['shift']());}catch(_0x34b76d){_0x39dcb8['push'](_0x39dcb8['shift']());}}}(a21_0x1c69,0x524f2));import{jsx as a21_0x49aa4a,jsxs as a21_0x14820d}from'react/jsx-runtime';import{Text,Box}from'ink';function a21_0x1c69(){const _0x72569a=['1617312HJudUZ','45zBuvZs','3614yzoVBA','1862884mOttEk','column','cyan','5TYSLRz','green','CSS\x20链接:\x20','3825582asudqd','JS\x20链接:\x20','300GnDcJd','1793950jdROur','609108uCGDLS','3674027uUqqhC'];a21_0x1c69=function(){return _0x72569a;};return a21_0x1c69();}export function InputCdnAsset(_0x44250e){const _0x26d3ac=a21_0x2de7,{jsCdnUrl:_0x14cc75,cssCdnUrl:_0x3bae98}=_0x44250e;return a21_0x14820d(Box,{'flexDirection':_0x26d3ac(0x1e6),'marginTop':0x1,'children':[a21_0x49aa4a(Text,{'color':_0x26d3ac(0x1e7),'children':'*\x20已输入的资源资源'}),a21_0x14820d(Box,{'children':[a21_0x14820d(Text,{'children':['\x20\x20',_0x26d3ac(0x1dd)]}),a21_0x49aa4a(Text,{'color':_0x26d3ac(0x1e9),'children':_0x14cc75})]}),a21_0x14820d(Box,{'children':[a21_0x14820d(Text,{'children':['\x20\x20',_0x26d3ac(0x1ea)]}),a21_0x49aa4a(Text,{'color':_0x26d3ac(0x1e9),'children':_0x3bae98})]})]});}
@@ -1 +1 @@
1
- (function(_0x365986,_0x3e1fae){const _0x2143e3=a22_0x35a2,_0x328fa0=_0x365986();while(!![]){try{const _0x16be8c=parseInt(_0x2143e3(0x206))/0x1+parseInt(_0x2143e3(0x1fe))/0x2*(parseInt(_0x2143e3(0x1fb))/0x3)+-parseInt(_0x2143e3(0x205))/0x4*(parseInt(_0x2143e3(0x1f4))/0x5)+parseInt(_0x2143e3(0x21f))/0x6*(-parseInt(_0x2143e3(0x1f0))/0x7)+parseInt(_0x2143e3(0x21b))/0x8+parseInt(_0x2143e3(0x1f3))/0x9+parseInt(_0x2143e3(0x20c))/0xa*(-parseInt(_0x2143e3(0x1fc))/0xb);if(_0x16be8c===_0x3e1fae)break;else _0x328fa0['push'](_0x328fa0['shift']());}catch(_0xcb9b1){_0x328fa0['push'](_0x328fa0['shift']());}}}(a22_0x282e,0x82391));import{jsx as a22_0x57b760,jsxs as a22_0x196e85,Fragment as a22_0x3a66e1}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';function a22_0x282e(){const _0x540102=['JS\x20链接无法访问','411qPdAJv','2893oVoAwG','yellow','6238QMIrSi','trim','from','提示:使用\x20','input-css','gray','\x20资源正在同步中...','4YZbLhX','998749QCusDM','length','red','\x20正在获取线上菜单资源链接...','rightArrow','map','29270ILvVXD','creating','请输入有效的\x20CSS\x20https\x20链接','return','dots','value','cyan','updated','need-confirm','*\x20请输入新的资源链接','resources','column','!\x20未找到菜单资源链接','input-js','继续更新','4903232CvmPuM','upArrow','green','delete','2664sSvUmI','JS\x20链接:\x20','backspace','slice','819wsMlpW','√\x20更新成功','请输入有效的\x20JS\x20https\x20链接','57960SRRQAa','3451270ORnths','cancel','label','CSS\x20链接无法访问','downArrow','\x20←\x20'];a22_0x282e=function(){return _0x540102;};return a22_0x282e();}import{useEffect,useState}from'react';import a22_0x5b8def from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';function a22_0x35a2(_0x54a5f7,_0x403dc0){_0x54a5f7=_0x54a5f7-0x1f0;const _0x282e47=a22_0x282e();let _0x35a24b=_0x282e47[_0x54a5f7];return _0x35a24b;}import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a22_0x57b760(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x3ee220=a22_0x35a2,{exit:_0x5a8897}=useApp(),{loading:_0x19cedc,menuList:_0x4aaf40,error:_0x3b9925}=useGetOnlineMenuList(),[_0x5997e1,_0x5dc9c5]=useState('ok'),[_0x2e0cb2,_0x358a27]=useState(_0x3ee220(0x219)),[_0x3c5419,_0x5c94ee]=useState(''),[_0x118284,_0x20f949]=useState(''),[_0x4d2b04,_0x390b10]=useState(''),[_0x175328,_0x27b085]=useState(''),_0x5b182c=Array[_0x3ee220(0x200)](new Set(_0x4aaf40[_0x3ee220(0x20b)](_0x1ac9f9=>_0x1ac9f9[_0x3ee220(0x216)])['flat']()));useEffect(()=>{const _0x3e7123=_0x3ee220;_0x2e0cb2===_0x3e7123(0x213)&&setTimeout(_0x5a8897,0x32);},[_0x2e0cb2]),useInput(async(_0x539ac5,_0x2b2a2b)=>{const _0x3497d9=_0x3ee220;if(_0x2e0cb2===_0x3497d9(0x219)){if(_0x2b2a2b[_0x3497d9(0x20f)]){const _0x5553eb=_0x4d2b04[_0x3497d9(0x1ff)]();if(_0x5553eb==='')return;if(!isValidJsHttpsUrl(_0x5553eb)){_0x27b085(_0x3497d9(0x1f2));return;}if(!await isUrlReachable(_0x5553eb)){_0x27b085(_0x3497d9(0x1fa));return;}_0x5c94ee(_0x5553eb),_0x390b10(''),_0x27b085(''),_0x358a27('input-css');return;}if(_0x2b2a2b[_0x3497d9(0x221)]||_0x2b2a2b[_0x3497d9(0x21e)]){_0x390b10(_0x42f81c=>_0x42f81c['slice'](0x0,-0x1)),_0x27b085('');return;}_0x390b10(_0x4faa97=>_0x4faa97+_0x539ac5);return;}if(_0x2e0cb2===_0x3497d9(0x202)){if(_0x2b2a2b[_0x3497d9(0x20f)]){const _0x2817a7=_0x4d2b04[_0x3497d9(0x1ff)]();if(_0x2817a7==='')return;if(!isValidCssHttpsUrl(_0x2817a7)){_0x27b085(_0x3497d9(0x20e));return;}if(!await isUrlReachable(_0x2817a7)){_0x27b085(_0x3497d9(0x1f7));return;}_0x20f949(_0x2817a7),_0x390b10(''),_0x27b085(''),_0x358a27('need-confirm');return;}if(_0x2b2a2b['backspace']||_0x2b2a2b[_0x3497d9(0x21e)]){_0x390b10(_0x1227b3=>_0x1227b3[_0x3497d9(0x222)](0x0,-0x1)),_0x27b085('');return;}_0x390b10(_0x22a053=>_0x22a053+_0x539ac5);return;}if(_0x2e0cb2===_0x3497d9(0x214)){(_0x2b2a2b[_0x3497d9(0x21c)]||_0x2b2a2b[_0x3497d9(0x1f8)]||_0x2b2a2b['leftArrow']||_0x2b2a2b[_0x3497d9(0x20a)])&&_0x5dc9c5(_0x1095bf=>_0x1095bf==='ok'?_0x3497d9(0x1f5):'ok');if(_0x2b2a2b[_0x3497d9(0x20f)]){_0x358a27(_0x3497d9(0x20d));if(_0x5997e1==='ok')await Promise['all'](_0x4aaf40[_0x3497d9(0x20b)](_0x148fa8=>{const _0x6c4833=_0x3497d9,_0x1753b2={'id':_0x148fa8['id'],'label':_0x148fa8['label'],'path':_0x148fa8['path'],'resources':[_0x3c5419,_0x118284]};if(_0x148fa8[_0x6c4833(0x216)][_0x6c4833(0x207)]===0x0)return Promise['resolve']();return updateMenuCdnUrl(_0x1753b2);})),await new Promise(_0x3452f6=>setTimeout(_0x3452f6,0x3e8)),_0x358a27(_0x3497d9(0x213));else _0x5997e1==='cancel'&&_0x5a8897();}}});if(_0x19cedc)return a22_0x196e85(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x57b760(Text,{}),a22_0x57b760(a22_0x5b8def,{'type':_0x3ee220(0x210)}),a22_0x57b760(Text,{'children':_0x3ee220(0x209)})]});if(_0x3b9925)return a22_0x196e85(Box,{'flexDirection':_0x3ee220(0x217),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x196e85(Text,{'color':'red','children':['✗\x20',_0x3b9925]}),a22_0x196e85(Box,{'marginTop':0x1,'children':[a22_0x57b760(Text,{'color':'gray','children':_0x3ee220(0x201)}),a22_0x57b760(Text,{'color':_0x3ee220(0x212),'children':'lovrabet\x20auth'}),a22_0x57b760(Text,{'color':_0x3ee220(0x203),'children':'\x20命令重新登录'})]})]});if(_0x5b182c[_0x3ee220(0x207)]===0x0)return a22_0x57b760(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x57b760(Text,{'color':_0x3ee220(0x1fd),'children':_0x3ee220(0x218)})});if(_0x2e0cb2===_0x3ee220(0x214))return a22_0x196e85(Box,{'flexDirection':_0x3ee220(0x217),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x57b760(CurrentMenuCdnContent,{'menuList':_0x4aaf40}),a22_0x57b760(InputCdnAsset,{'jsCdnUrl':_0x3c5419,'cssCdnUrl':_0x118284}),a22_0x57b760(Box,{'marginTop':0x1,'flexDirection':_0x3ee220(0x217),'children':[{'label':_0x3ee220(0x21a),'value':'ok'},{'label':'取消更新','value':_0x3ee220(0x1f5)}][_0x3ee220(0x20b)](_0x3b7db8=>a22_0x196e85(Text,{'color':_0x5997e1===_0x3b7db8[_0x3ee220(0x211)]?'yellow':undefined,'children':[_0x5997e1===_0x3b7db8['value']?'>\x20':'\x20\x20',_0x3b7db8[_0x3ee220(0x1f6)]]},_0x3b7db8[_0x3ee220(0x211)]))})]});if(_0x2e0cb2==='creating')return a22_0x196e85(Box,{'flexDirection':_0x3ee220(0x217),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x57b760(CurrentMenuCdnContent,{'menuList':_0x4aaf40}),a22_0x57b760(InputCdnAsset,{'jsCdnUrl':_0x3c5419,'cssCdnUrl':_0x118284}),a22_0x196e85(Box,{'marginTop':0x1,'children':[a22_0x57b760(a22_0x5b8def,{'type':_0x3ee220(0x210)}),a22_0x57b760(Text,{'children':_0x3ee220(0x204)})]})]});if(_0x2e0cb2===_0x3ee220(0x213))return a22_0x196e85(Box,{'flexDirection':_0x3ee220(0x217),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x57b760(CurrentMenuCdnContent,{'menuList':_0x4aaf40}),a22_0x57b760(InputCdnAsset,{'jsCdnUrl':_0x3c5419,'cssCdnUrl':_0x118284}),a22_0x57b760(Box,{'marginTop':0x1,'children':a22_0x57b760(Text,{'color':_0x3ee220(0x21d),'children':_0x3ee220(0x1f1)})})]});return a22_0x196e85(Box,{'flexDirection':_0x3ee220(0x217),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x57b760(CurrentMenuCdnContent,{'menuList':_0x4aaf40}),a22_0x196e85(Box,{'marginTop':0x1,'flexDirection':_0x3ee220(0x217),'children':[a22_0x57b760(Text,{'color':_0x3ee220(0x212),'children':_0x3ee220(0x215)}),_0x3c5419?a22_0x196e85(Box,{'children':[a22_0x196e85(Text,{'color':'gray','children':['\x20\x20','JS\x20链接:\x20']}),a22_0x57b760(Text,{'color':_0x3ee220(0x21d),'children':_0x3c5419})]}):_0x2e0cb2===_0x3ee220(0x219)&&a22_0x196e85(a22_0x3a66e1,{'children':[a22_0x196e85(Box,{'children':[a22_0x196e85(Text,{'children':['\x20\x20',_0x3ee220(0x220)]}),a22_0x57b760(Text,{'color':_0x3ee220(0x21d),'children':_0x4d2b04}),_0x175328&&a22_0x196e85(Text,{'color':_0x3ee220(0x208),'children':[_0x3ee220(0x1f9),_0x175328]})]}),!_0x175328&&a22_0x57b760(Box,{'children':a22_0x196e85(Text,{'color':_0x3ee220(0x203),'children':['\x20\x20','输入项目的\x20JS\x20资源链接(https://...)']})})]}),_0x118284?a22_0x196e85(Box,{'children':[a22_0x196e85(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a22_0x57b760(Text,{'color':_0x3ee220(0x21d),'children':_0x118284})]}):_0x2e0cb2===_0x3ee220(0x202)&&a22_0x196e85(a22_0x3a66e1,{'children':[a22_0x196e85(Box,{'children':[a22_0x196e85(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a22_0x57b760(Text,{'color':_0x3ee220(0x21d),'children':_0x4d2b04}),_0x175328&&a22_0x196e85(Text,{'color':_0x3ee220(0x208),'children':[_0x3ee220(0x1f9),_0x175328]})]}),!_0x175328&&a22_0x57b760(Box,{'children':a22_0x196e85(Text,{'color':_0x3ee220(0x203),'children':['\x20\x20','输入项目的\x20CSS\x20资源链接(https://...)']})})]})]})]});}
1
+ (function(_0x2d0e74,_0x4c5049){const _0x3c5845=a22_0x1f41,_0x127a20=_0x2d0e74();while(!![]){try{const _0x36b254=-parseInt(_0x3c5845(0x149))/0x1*(parseInt(_0x3c5845(0x13b))/0x2)+-parseInt(_0x3c5845(0x13c))/0x3*(-parseInt(_0x3c5845(0x138))/0x4)+parseInt(_0x3c5845(0x163))/0x5+parseInt(_0x3c5845(0x167))/0x6*(-parseInt(_0x3c5845(0x152))/0x7)+-parseInt(_0x3c5845(0x15a))/0x8+-parseInt(_0x3c5845(0x15b))/0x9+parseInt(_0x3c5845(0x156))/0xa;if(_0x36b254===_0x4c5049)break;else _0x127a20['push'](_0x127a20['shift']());}catch(_0x5db95c){_0x127a20['push'](_0x127a20['shift']());}}}(a22_0x5018,0x428b4));import{jsx as a22_0x49f9c0,jsxs as a22_0x46d283,Fragment as a22_0x16cba2}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a22_0x570944 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';function a22_0x5018(){const _0x276fbe=['3662190lEkpMw','继续更新','\x20命令重新登录','!\x20未找到菜单资源链接','creating','input-js','cyan','slice','322370MYQypi','√\x20更新成功','JS\x20链接:\x20','dots','884244FUYOxh','label','downArrow','gray','column','value','map','need-confirm','\x20←\x20','yellow','4CYRVwF','取消更新','\x20正在获取线上菜单资源链接...','58762EJomkN','507543KhqFaj','cancel','delete','green','JS\x20链接无法访问','upArrow','resources','*\x20请输入新的资源链接','backspace','rightArrow','all','from','input-css','17xzhimg','resolve','输入项目的\x20CSS\x20资源链接(https://...)','length','updated','\x20资源正在同步中...','CSS\x20链接:\x20','提示:使用\x20','请输入有效的\x20JS\x20https\x20链接','14ZIObQz','CSS\x20链接无法访问','return','trim','15241270GMilFg','flat','lovrabet\x20auth','red','2272664lJCtiO'];a22_0x5018=function(){return _0x276fbe;};return a22_0x5018();}import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';function a22_0x1f41(_0x4f787c,_0x47812d){_0x4f787c=_0x4f787c-0x132;const _0x5018a9=a22_0x5018();let _0x1f41f5=_0x5018a9[_0x4f787c];return _0x1f41f5;}import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a22_0x49f9c0(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x4b536e=a22_0x1f41,{exit:_0x118566}=useApp(),{loading:_0x41fae8,menuList:_0x3736af,error:_0x2fde84}=useGetOnlineMenuList(),[_0x576cd8,_0x367566]=useState('ok'),[_0x1b956d,_0x3a6927]=useState(_0x4b536e(0x160)),[_0x10f037,_0x32ea50]=useState(''),[_0xfe9e2f,_0x9c7c49]=useState(''),[_0x1cf5d2,_0x44bbf4]=useState(''),[_0x3ea01a,_0x1bf915]=useState(''),_0x4a469d=Array[_0x4b536e(0x147)](new Set(_0x3736af[_0x4b536e(0x134)](_0x592034=>_0x592034[_0x4b536e(0x142)])[_0x4b536e(0x157)]()));useEffect(()=>{const _0xa2d4de=_0x4b536e;_0x1b956d===_0xa2d4de(0x14d)&&setTimeout(_0x118566,0x32);},[_0x1b956d]),useInput(async(_0x1970fd,_0x5aa8e7)=>{const _0x1b715a=_0x4b536e;if(_0x1b956d==='input-js'){if(_0x5aa8e7[_0x1b715a(0x154)]){const _0x5650e2=_0x1cf5d2[_0x1b715a(0x155)]();if(_0x5650e2==='')return;if(!isValidJsHttpsUrl(_0x5650e2)){_0x1bf915(_0x1b715a(0x151));return;}if(!await isUrlReachable(_0x5650e2)){_0x1bf915(_0x1b715a(0x140));return;}_0x32ea50(_0x5650e2),_0x44bbf4(''),_0x1bf915(''),_0x3a6927(_0x1b715a(0x148));return;}if(_0x5aa8e7[_0x1b715a(0x144)]||_0x5aa8e7[_0x1b715a(0x13e)]){_0x44bbf4(_0x41f34a=>_0x41f34a[_0x1b715a(0x162)](0x0,-0x1)),_0x1bf915('');return;}_0x44bbf4(_0x17cee8=>_0x17cee8+_0x1970fd);return;}if(_0x1b956d===_0x1b715a(0x148)){if(_0x5aa8e7[_0x1b715a(0x154)]){const _0xcf32f6=_0x1cf5d2[_0x1b715a(0x155)]();if(_0xcf32f6==='')return;if(!isValidCssHttpsUrl(_0xcf32f6)){_0x1bf915('请输入有效的\x20CSS\x20https\x20链接');return;}if(!await isUrlReachable(_0xcf32f6)){_0x1bf915(_0x1b715a(0x153));return;}_0x9c7c49(_0xcf32f6),_0x44bbf4(''),_0x1bf915(''),_0x3a6927(_0x1b715a(0x135));return;}if(_0x5aa8e7[_0x1b715a(0x144)]||_0x5aa8e7['delete']){_0x44bbf4(_0x2b2056=>_0x2b2056[_0x1b715a(0x162)](0x0,-0x1)),_0x1bf915('');return;}_0x44bbf4(_0x1fd53c=>_0x1fd53c+_0x1970fd);return;}if(_0x1b956d===_0x1b715a(0x135)){(_0x5aa8e7[_0x1b715a(0x141)]||_0x5aa8e7[_0x1b715a(0x169)]||_0x5aa8e7['leftArrow']||_0x5aa8e7[_0x1b715a(0x145)])&&_0x367566(_0x1ebb32=>_0x1ebb32==='ok'?_0x1b715a(0x13d):'ok');if(_0x5aa8e7['return']){_0x3a6927(_0x1b715a(0x15f));if(_0x576cd8==='ok')await Promise[_0x1b715a(0x146)](_0x3736af[_0x1b715a(0x134)](_0x53c8bc=>{const _0xeea32c=_0x1b715a,_0x4a1cef={'id':_0x53c8bc['id'],'label':_0x53c8bc[_0xeea32c(0x168)],'path':_0x53c8bc['path'],'resources':[_0x10f037,_0xfe9e2f]};if(_0x53c8bc[_0xeea32c(0x142)][_0xeea32c(0x14c)]===0x0)return Promise[_0xeea32c(0x14a)]();return updateMenuCdnUrl(_0x4a1cef);})),await new Promise(_0x13f8e9=>setTimeout(_0x13f8e9,0x3e8)),_0x3a6927(_0x1b715a(0x14d));else _0x576cd8===_0x1b715a(0x13d)&&_0x118566();}}});if(_0x41fae8)return a22_0x46d283(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(Text,{}),a22_0x49f9c0(a22_0x570944,{'type':'dots'}),a22_0x49f9c0(Text,{'children':_0x4b536e(0x13a)})]});if(_0x2fde84)return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x46d283(Text,{'color':'red','children':['✗\x20',_0x2fde84]}),a22_0x46d283(Box,{'marginTop':0x1,'children':[a22_0x49f9c0(Text,{'color':'gray','children':_0x4b536e(0x150)}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x161),'children':_0x4b536e(0x158)}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x16a),'children':_0x4b536e(0x15d)})]})]});if(_0x4a469d[_0x4b536e(0x14c)]===0x0)return a22_0x49f9c0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x49f9c0(Text,{'color':_0x4b536e(0x137),'children':_0x4b536e(0x15e)})});if(_0x1b956d===_0x4b536e(0x135))return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x49f9c0(InputCdnAsset,{'jsCdnUrl':_0x10f037,'cssCdnUrl':_0xfe9e2f}),a22_0x49f9c0(Box,{'marginTop':0x1,'flexDirection':_0x4b536e(0x132),'children':[{'label':_0x4b536e(0x15c),'value':'ok'},{'label':_0x4b536e(0x139),'value':_0x4b536e(0x13d)}][_0x4b536e(0x134)](_0x50d5ca=>a22_0x46d283(Text,{'color':_0x576cd8===_0x50d5ca[_0x4b536e(0x133)]?_0x4b536e(0x137):undefined,'children':[_0x576cd8===_0x50d5ca['value']?'>\x20':'\x20\x20',_0x50d5ca[_0x4b536e(0x168)]]},_0x50d5ca['value']))})]});if(_0x1b956d===_0x4b536e(0x15f))return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x49f9c0(InputCdnAsset,{'jsCdnUrl':_0x10f037,'cssCdnUrl':_0xfe9e2f}),a22_0x46d283(Box,{'marginTop':0x1,'children':[a22_0x49f9c0(a22_0x570944,{'type':_0x4b536e(0x166)}),a22_0x49f9c0(Text,{'children':_0x4b536e(0x14e)})]})]});if(_0x1b956d===_0x4b536e(0x14d))return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x49f9c0(InputCdnAsset,{'jsCdnUrl':_0x10f037,'cssCdnUrl':_0xfe9e2f}),a22_0x49f9c0(Box,{'marginTop':0x1,'children':a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0x4b536e(0x164)})})]});return a22_0x46d283(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x46d283(Box,{'marginTop':0x1,'flexDirection':_0x4b536e(0x132),'children':[a22_0x49f9c0(Text,{'color':_0x4b536e(0x161),'children':_0x4b536e(0x143)}),_0x10f037?a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'color':_0x4b536e(0x16a),'children':['\x20\x20','JS\x20链接:\x20']}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0x10f037})]}):_0x1b956d==='input-js'&&a22_0x46d283(a22_0x16cba2,{'children':[a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'children':['\x20\x20',_0x4b536e(0x165)]}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0x1cf5d2}),_0x3ea01a&&a22_0x46d283(Text,{'color':'red','children':[_0x4b536e(0x136),_0x3ea01a]})]}),!_0x3ea01a&&a22_0x49f9c0(Box,{'children':a22_0x46d283(Text,{'color':_0x4b536e(0x16a),'children':['\x20\x20','输入项目的\x20JS\x20资源链接(https://...)']})})]}),_0xfe9e2f?a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'children':['\x20\x20',_0x4b536e(0x14f)]}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0xfe9e2f})]}):_0x1b956d==='input-css'&&a22_0x46d283(a22_0x16cba2,{'children':[a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'children':['\x20\x20',_0x4b536e(0x14f)]}),a22_0x49f9c0(Text,{'color':'green','children':_0x1cf5d2}),_0x3ea01a&&a22_0x46d283(Text,{'color':_0x4b536e(0x159),'children':[_0x4b536e(0x136),_0x3ea01a]})]}),!_0x3ea01a&&a22_0x49f9c0(Box,{'children':a22_0x46d283(Text,{'color':'gray','children':['\x20\x20',_0x4b536e(0x14b)]})})]})]})]});}
@@ -1 +1 @@
1
- const a24_0x3735a4=a24_0x4536;(function(_0x313cf1,_0x2c5dae){const _0x3ac6c2=a24_0x4536,_0x513a34=_0x313cf1();while(!![]){try{const _0x5bd933=parseInt(_0x3ac6c2(0xc8))/0x1*(parseInt(_0x3ac6c2(0xcf))/0x2)+-parseInt(_0x3ac6c2(0xce))/0x3+parseInt(_0x3ac6c2(0xe3))/0x4*(-parseInt(_0x3ac6c2(0xd2))/0x5)+parseInt(_0x3ac6c2(0xdb))/0x6+parseInt(_0x3ac6c2(0xd5))/0x7+-parseInt(_0x3ac6c2(0xc3))/0x8+-parseInt(_0x3ac6c2(0xe0))/0x9*(parseInt(_0x3ac6c2(0xe2))/0xa);if(_0x5bd933===_0x2c5dae)break;else _0x513a34['push'](_0x513a34['shift']());}catch(_0x59927d){_0x513a34['push'](_0x513a34['shift']());}}}(a24_0xb83f,0xca902));import{getCookie}from'../auth/get-cookie.js';function a24_0x4536(_0x5a3b51,_0x4e467c){_0x5a3b51=_0x5a3b51-0xc3;const _0xb83f0b=a24_0xb83f();let _0x453647=_0xb83f0b[_0x5a3b51];return _0x453647;}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a24_0xb83f(){const _0x2cf24b=['994437IEfxSm','POST','10cAXreW','7276CPiKHX','info','4811808BOxdST','log','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','errorMsg','菜单资源同步成功:\x20','11842KMokze','json','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','!\x20请使用以下方式之一:','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','update-menu-cdn-url','1233129VlDXmw','188jeXOng','status','SdkDemo1','790FGWFOB','success','/smartapi/menu/update','1786358hsfCtB','error','resources','创建菜单失败,HTTP状态码:\x20','label','更新菜单资源失败:\x20','5230620calkrp','appcode','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','stringify','正在更新菜单资源链接:\x20'];a24_0xb83f=function(){return _0x2cf24b;};return a24_0xb83f();}const config=readConfig(),logLabel=a24_0x3735a4(0xcd);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a24_0x3735a4(0xd1),'path':'sdk-demo','resources':[a24_0x3735a4(0xc5),'https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0x3e5d63){const _0x73b7d=a24_0x3735a4,_0x438b87=config?.[_0x73b7d(0xdc)];if(!_0x438b87){const _0x4537db='未提供应用AppCode,且配置中也没有默认值';logger[_0x73b7d(0xd6)](logLabel,_0x4537db),console[_0x73b7d(0xd6)]('×\x20'+_0x4537db),console[_0x73b7d(0xc4)](_0x73b7d(0xcb)),console[_0x73b7d(0xc4)](_0x73b7d(0xcc)),console['log'](_0x73b7d(0xdd));return;}logger[_0x73b7d(0xe4)](logLabel,_0x73b7d(0xdf)+_0x3e5d63[_0x73b7d(0xd9)]+'\x20('+_0x3e5d63['path']+')');const _0x1993f4={'id':_0x3e5d63['id'],'appCode':_0x438b87,'extend':{'loadScriptMode':'import','resources':_0x3e5d63[_0x73b7d(0xd7)]?JSON[_0x73b7d(0xde)](_0x3e5d63[_0x73b7d(0xd7)]):undefined}},_0x10477a=await fetch(getApiDomain()+_0x73b7d(0xd4),{'method':_0x73b7d(0xe1),'body':JSON['stringify'](_0x1993f4),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x10477a['ok']){if(_0x10477a[_0x73b7d(0xd0)]===0x191){const _0x348ffc=_0x73b7d(0xca);logger[_0x73b7d(0xd6)](logLabel,_0x348ffc,{'status':_0x10477a[_0x73b7d(0xd0)],'menu':_0x3e5d63[_0x73b7d(0xd9)]});throw new Error(_0x348ffc);}const _0x124df9=_0x73b7d(0xd8)+_0x10477a[_0x73b7d(0xd0)];logger['error'](logLabel,_0x124df9,{'menu':_0x3e5d63[_0x73b7d(0xd9)]});throw new Error(_0x124df9);}const _0x531ed2=await _0x10477a[_0x73b7d(0xc9)]();if(!_0x531ed2[_0x73b7d(0xd3)]){const _0x23e623=_0x73b7d(0xda)+(_0x531ed2[_0x73b7d(0xc6)]||'未知错误');logger[_0x73b7d(0xd6)](logLabel,_0x23e623,{'errorCode':_0x531ed2['errorCode'],'errorMsg':_0x531ed2['errorMsg'],'menu':_0x3e5d63[_0x73b7d(0xd9)]});throw new Error(_0x23e623);}logger[_0x73b7d(0xe4)](logLabel,_0x73b7d(0xc7)+_0x3e5d63['label'],_0x531ed2['data']);}
1
+ const a24_0x36b3ac=a24_0x55d2;(function(_0x18ea0a,_0x47b894){const _0x12a183=a24_0x55d2,_0x590d65=_0x18ea0a();while(!![]){try{const _0x1524fc=-parseInt(_0x12a183(0x110))/0x1*(parseInt(_0x12a183(0x121))/0x2)+parseInt(_0x12a183(0x109))/0x3+-parseInt(_0x12a183(0x120))/0x4*(parseInt(_0x12a183(0x11b))/0x5)+-parseInt(_0x12a183(0x123))/0x6+parseInt(_0x12a183(0x11a))/0x7*(-parseInt(_0x12a183(0x107))/0x8)+-parseInt(_0x12a183(0x102))/0x9*(parseInt(_0x12a183(0x117))/0xa)+-parseInt(_0x12a183(0x105))/0xb*(-parseInt(_0x12a183(0x11d))/0xc);if(_0x1524fc===_0x47b894)break;else _0x590d65['push'](_0x590d65['shift']());}catch(_0x466a99){_0x590d65['push'](_0x590d65['shift']());}}}(a24_0x2fc0,0xb67c8));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a24_0x36b3ac(0x100);function a24_0x55d2(_0x4b3a1d,_0x2ec24){_0x4b3a1d=_0x4b3a1d-0x100;const _0x2fc008=a24_0x2fc0();let _0x55d2b7=_0x2fc008[_0x4b3a1d];return _0x55d2b7;}function a24_0x2fc0(){const _0x5e57fd=['10573330suRRGG','resources','errorCode','153475aaXroB','5NMtpHn','SdkDemo1','24gihPYH','未提供应用AppCode,且配置中也没有默认值','log','4624172VbaGbh','174730ZbmfJA','未知错误','8891838vbAPJi','error','appcode','update-menu-cdn-url','errorMsg','9iUtdLU','POST','stringify','36843609VJLUSV','import','536OijVVy','label','2094465nKlNvJ','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','/smartapi/menu/update','sdk-demo','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','创建菜单失败,HTTP状态码:\x20','17EnwUhy','status','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','data','正在更新菜单资源链接:\x20','菜单资源同步成功:\x20','info'];a24_0x2fc0=function(){return _0x5e57fd;};return a24_0x2fc0();}import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a24_0x36b3ac(0x11c),'path':a24_0x36b3ac(0x10d),'resources':[a24_0x36b3ac(0x10e),'https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0x32a3c7){const _0x588e26=a24_0x36b3ac,_0xe05be4=config?.[_0x588e26(0x125)];if(!_0xe05be4){const _0x33db46=_0x588e26(0x11e);logger[_0x588e26(0x124)](logLabel,_0x33db46),console[_0x588e26(0x124)]('×\x20'+_0x33db46),console[_0x588e26(0x11f)]('!\x20请使用以下方式之一:'),console[_0x588e26(0x11f)](_0x588e26(0x112)),console[_0x588e26(0x11f)](_0x588e26(0x10b));return;}logger[_0x588e26(0x116)](logLabel,_0x588e26(0x114)+_0x32a3c7['label']+'\x20('+_0x32a3c7['path']+')');const _0x226ffd={'id':_0x32a3c7['id'],'appCode':_0xe05be4,'extend':{'loadScriptMode':_0x588e26(0x106),'resources':_0x32a3c7[_0x588e26(0x118)]?JSON[_0x588e26(0x104)](_0x32a3c7[_0x588e26(0x118)]):undefined}},_0x4aa890=await fetch(getApiDomain()+_0x588e26(0x10c),{'method':_0x588e26(0x103),'body':JSON[_0x588e26(0x104)](_0x226ffd),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x4aa890['ok']){if(_0x4aa890['status']===0x191){const _0x212b9e=_0x588e26(0x10a);logger[_0x588e26(0x124)](logLabel,_0x212b9e,{'status':_0x4aa890[_0x588e26(0x111)],'menu':_0x32a3c7[_0x588e26(0x108)]});throw new Error(_0x212b9e);}const _0x82d89b=_0x588e26(0x10f)+_0x4aa890[_0x588e26(0x111)];logger['error'](logLabel,_0x82d89b,{'menu':_0x32a3c7[_0x588e26(0x108)]});throw new Error(_0x82d89b);}const _0x1ffcdc=await _0x4aa890['json']();if(!_0x1ffcdc['success']){const _0x5dcc67='更新菜单资源失败:\x20'+(_0x1ffcdc[_0x588e26(0x101)]||_0x588e26(0x122));logger[_0x588e26(0x124)](logLabel,_0x5dcc67,{'errorCode':_0x1ffcdc[_0x588e26(0x119)],'errorMsg':_0x1ffcdc['errorMsg'],'menu':_0x32a3c7[_0x588e26(0x108)]});throw new Error(_0x5dcc67);}logger[_0x588e26(0x116)](logLabel,_0x588e26(0x115)+_0x32a3c7[_0x588e26(0x108)],_0x1ffcdc[_0x588e26(0x113)]);}
@@ -1 +1 @@
1
- function a25_0x13ae(_0xa9d618,_0x402ead){_0xa9d618=_0xa9d618-0x137;const _0x1b330e=a25_0x1b33();let _0x13ae19=_0x1b330e[_0xa9d618];return _0x13ae19;}(function(_0x2ab303,_0x24aa4f){const _0x114d5f=a25_0x13ae,_0x4b5bcc=_0x2ab303();while(!![]){try{const _0x33af50=parseInt(_0x114d5f(0x14f))/0x1*(-parseInt(_0x114d5f(0x14a))/0x2)+parseInt(_0x114d5f(0x13d))/0x3+parseInt(_0x114d5f(0x149))/0x4*(-parseInt(_0x114d5f(0x14d))/0x5)+parseInt(_0x114d5f(0x14c))/0x6*(parseInt(_0x114d5f(0x13a))/0x7)+-parseInt(_0x114d5f(0x144))/0x8*(parseInt(_0x114d5f(0x138))/0x9)+-parseInt(_0x114d5f(0x147))/0xa*(-parseInt(_0x114d5f(0x14e))/0xb)+parseInt(_0x114d5f(0x14b))/0xc;if(_0x33af50===_0x24aa4f)break;else _0x4b5bcc['push'](_0x4b5bcc['shift']());}catch(_0x5fb709){_0x4b5bcc['push'](_0x4b5bcc['shift']());}}}(a25_0x1b33,0xc356b));function a25_0x1b33(){const _0x26bce7=['return','18ZCRtgW','√\x20当前为有效会话,无需重新登录。','8316WIKfbG','gray','column','3892530AjtdBQ','then','请前往浏览器完成登录。','正在登录...\x20','按\x20“q”\x20退出。','green','*\x20按回车开始登录。','1665832HFaxgp','*\x20登录成功!','log','60wtNtev','dots','1644SNMwSO','2bkAfEj','10022472CXsQGl','846YpYybl','9775wbRqqo','236764rxwFAs','409298qbCkrd'];a25_0x1b33=function(){return _0x26bce7;};return a25_0x1b33();}import{jsx as a25_0x503a20,jsxs as a25_0x2c18ba}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a25_0x145101 from'ink-spinner';export function AuthServer(){const _0xf0dde2=a25_0x13ae,{exit:_0x2034f5}=useApp(),[_0x5b0de2,_0x21291f]=useState(![]),[_0x921ed7,_0x622d73]=useState(!![]),[_0x15bbb2,_0x521d26]=useState(![]),[_0x3faec6,_0xa994c7]=useState(![]);useEffect(()=>{const _0x19f0f0=a25_0x13ae;getIsSessionValid()[_0x19f0f0(0x13e)](_0x21291f)['finally'](()=>_0x622d73(![]));},[]),useEffect(()=>{const _0x5e2ee2=a25_0x13ae;!_0x921ed7&&_0x5b0de2&&(console['log'](_0x5e2ee2(0x139)),_0x2034f5());},[_0x921ed7,_0x5b0de2,_0x2034f5]),useEffect(()=>{const _0x33d214=a25_0x13ae;_0x3faec6&&(console[_0x33d214(0x146)](_0x33d214(0x145)),_0x2034f5());},[_0x3faec6,_0x2034f5]),useInput((_0x3f8b36,_0x2c6117)=>{const _0x39f77e=a25_0x13ae;_0x2c6117[_0x39f77e(0x137)]&&(_0x521d26(!![]),authServer({'silent':!![]})[_0x39f77e(0x13e)](_0x26cbb0=>{_0xa994c7(_0x26cbb0);})),_0x3f8b36==='q'&&_0x2034f5();});if(_0x921ed7)return null;if(_0x5b0de2||_0x3faec6)return null;return a25_0x503a20(Box,{'flexDirection':_0xf0dde2(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':_0x15bbb2?a25_0x2c18ba(Box,{'children':[a25_0x503a20(Box,{'width':'1'}),a25_0x2c18ba(Text,{'color':_0xf0dde2(0x142),'children':[a25_0x503a20(a25_0x145101,{'type':_0xf0dde2(0x148)}),'\x20\x20']}),a25_0x503a20(Text,{'children':_0xf0dde2(0x140)}),a25_0x503a20(Text,{'color':_0xf0dde2(0x13b),'children':_0xf0dde2(0x13f)})]}):a25_0x2c18ba(Box,{'children':[a25_0x503a20(Box,{'width':'1'}),a25_0x503a20(Text,{'children':_0xf0dde2(0x143)}),a25_0x503a20(Text,{'color':_0xf0dde2(0x13b),'children':_0xf0dde2(0x141)})]})});}
1
+ (function(_0x3b46a4,_0x4a0750){const _0x1325b9=a25_0x30cf,_0x1fb39b=_0x3b46a4();while(!![]){try{const _0x29d8c4=parseInt(_0x1325b9(0x175))/0x1+parseInt(_0x1325b9(0x16e))/0x2*(-parseInt(_0x1325b9(0x17c))/0x3)+-parseInt(_0x1325b9(0x179))/0x4+-parseInt(_0x1325b9(0x170))/0x5+-parseInt(_0x1325b9(0x17b))/0x6+-parseInt(_0x1325b9(0x16f))/0x7+parseInt(_0x1325b9(0x176))/0x8*(parseInt(_0x1325b9(0x17a))/0x9);if(_0x29d8c4===_0x4a0750)break;else _0x1fb39b['push'](_0x1fb39b['shift']());}catch(_0x15509a){_0x1fb39b['push'](_0x1fb39b['shift']());}}}(a25_0x1924,0xcd129));import{jsx as a25_0x49c123,jsxs as a25_0x96cc59}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';function a25_0x1924(){const _0x34a2bd=['5694704kPFoSZ','9aMKklp','753354XiaAWM','3189GPkTWG','column','then','724dkVFbU','1156001XBiZDF','6426955fmAuqR','请前往浏览器完成登录。','finally','log','正在登录...\x20','1151429olFusx','24584984pcXKnP','按\x20“q”\x20退出。','gray'];a25_0x1924=function(){return _0x34a2bd;};return a25_0x1924();}import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';function a25_0x30cf(_0x3e964b,_0x508c4a){_0x3e964b=_0x3e964b-0x16d;const _0x19241a=a25_0x1924();let _0x30cfac=_0x19241a[_0x3e964b];return _0x30cfac;}import a25_0xc65bdd from'ink-spinner';export function AuthServer(){const _0x33dd83=a25_0x30cf,{exit:_0x3d1cb9}=useApp(),[_0x22dc1c,_0xf58765]=useState(![]),[_0x428155,_0x3215d7]=useState(!![]),[_0x35a993,_0x13c987]=useState(![]),[_0x20bb3c,_0x5d457a]=useState(![]);useEffect(()=>{const _0x2cd5df=a25_0x30cf;getIsSessionValid()[_0x2cd5df(0x16d)](_0xf58765)[_0x2cd5df(0x172)](()=>_0x3215d7(![]));},[]),useEffect(()=>{const _0x3dd46c=a25_0x30cf;!_0x428155&&_0x22dc1c&&(console[_0x3dd46c(0x173)]('√\x20当前为有效会话,无需重新登录。'),_0x3d1cb9());},[_0x428155,_0x22dc1c,_0x3d1cb9]),useEffect(()=>{const _0x445351=a25_0x30cf;_0x20bb3c&&(console[_0x445351(0x173)]('*\x20登录成功!'),_0x3d1cb9());},[_0x20bb3c,_0x3d1cb9]),useInput((_0x756f75,_0x351f4b)=>{_0x351f4b['return']&&(_0x13c987(!![]),authServer({'silent':!![]})['then'](_0x4c3d48=>{_0x5d457a(_0x4c3d48);})),_0x756f75==='q'&&_0x3d1cb9();});if(_0x428155)return null;if(_0x22dc1c||_0x20bb3c)return null;return a25_0x49c123(Box,{'flexDirection':_0x33dd83(0x17d),'marginTop':0x1,'marginBottom':0x1,'children':_0x35a993?a25_0x96cc59(Box,{'children':[a25_0x49c123(Box,{'width':'1'}),a25_0x96cc59(Text,{'color':'green','children':[a25_0x49c123(a25_0xc65bdd,{'type':'dots'}),'\x20\x20']}),a25_0x49c123(Text,{'children':_0x33dd83(0x174)}),a25_0x49c123(Text,{'color':_0x33dd83(0x178),'children':_0x33dd83(0x171)})]}):a25_0x96cc59(Box,{'children':[a25_0x49c123(Box,{'width':'1'}),a25_0x49c123(Text,{'children':'*\x20按回车开始登录。'}),a25_0x49c123(Text,{'color':_0x33dd83(0x178),'children':_0x33dd83(0x177)})]})});}
@@ -1 +1 @@
1
- const a26_0x338687=a26_0x25a6;(function(_0x168717,_0x36f8a9){const _0x4cb17f=a26_0x25a6,_0x7b14b7=_0x168717();while(!![]){try{const _0x40796d=-parseInt(_0x4cb17f(0x118))/0x1+parseInt(_0x4cb17f(0x113))/0x2+-parseInt(_0x4cb17f(0x124))/0x3*(-parseInt(_0x4cb17f(0x125))/0x4)+-parseInt(_0x4cb17f(0x135))/0x5*(parseInt(_0x4cb17f(0x112))/0x6)+parseInt(_0x4cb17f(0x10a))/0x7+parseInt(_0x4cb17f(0x11b))/0x8*(parseInt(_0x4cb17f(0x122))/0x9)+-parseInt(_0x4cb17f(0x10e))/0xa;if(_0x40796d===_0x36f8a9)break;else _0x7b14b7['push'](_0x7b14b7['shift']());}catch(_0x39ab77){_0x7b14b7['push'](_0x7b14b7['shift']());}}}(a26_0x265e,0xc62cf));import{writeFileSync}from'node:fs';function a26_0x25a6(_0x5a2501,_0x3020fc){_0x5a2501=_0x5a2501-0x109;const _0x265e40=a26_0x265e();let _0x25a660=_0x265e40[_0x5a2501];return _0x25a660;}function a26_0x265e(){const _0x3b0feb=['127.0.0.1','623147UwKLfO','win32','session','5589712LKnttA','error','address','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','json','https://dev.lovrabet.com:','isAuth','18pdLRkN','catch','3WchfPK','3839536xqIoND','silent','platform','log','writeHead','open\x20\x22','createServer','cookie','start\x20\x22\x22\x20\x22','object','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','close','text/html;\x20charset=utf-8','✅\x20浏览器已自动打开,请在浏览器中完成登录','🔐\x20正在启动登录服务...','darwin','370vTJCCY','end','Auth\x20server\x20error:','2139725wajLHF','📍\x20登录地址:','headers','⚠️\x20\x20无法自动打开浏览器','17313450cplQxU','utf-8','🔗\x20请手动复制登录地址到浏览器:','/api/auth/get-session','52614NUKMUj','2304276xYJVQL','listen','then','port'];a26_0x265e=function(){return _0x3b0feb;};return a26_0x265e();}import a26_0x588267 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x592d89){const _0x3ce018=a26_0x25a6,_0x3ec296=_0x592d89?.[_0x3ce018(0x126)]||![];if(await getIsSessionValid())return!![];const _0x5a3c4f=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x3ce018(0x11f)]();return new Promise(async(_0x38a6ee,_0x446aed)=>{const _0x2dcaae=_0x3ce018;let _0x332980=0x0;const _0xd50eb3=a26_0x588267[_0x2dcaae(0x12b)](_0x5a3c4f,async(_0x154ed7,_0x212407)=>{const _0x98aff9=_0x2dcaae,_0x58902c=getUserDomain(),_0x5b12c6=_0x154ed7[_0x98aff9(0x10c)][_0x98aff9(0x12c)]||'',_0x5c5b52=await fetch(_0x58902c+_0x98aff9(0x111),{'headers':{'cookie':_0x5b12c6}})[_0x98aff9(0x115)](_0x3fd3fa=>_0x3fd3fa[_0x98aff9(0x11f)]()),_0x70408d=_0x5c5b52&&_0x5c5b52[_0x98aff9(0x11a)]&&_0x5c5b52['user'];if(_0x70408d){writeFileSync(cookieFile,_0x5b12c6,_0x98aff9(0x10f)),_0x38a6ee(!![]);const _0x17477b=_0x98aff9(0x12f);_0x212407[_0x98aff9(0x129)](0xc8,{'Content-Type':_0x98aff9(0x131)}),_0x212407[_0x98aff9(0x136)](_0x17477b),_0xd50eb3[_0x98aff9(0x130)]();}else{const _0x544567=''+encodeURIComponent(_0x98aff9(0x120)+_0x332980);_0x212407['writeHead'](0x12e,{'location':_0x58902c+'/sign-in?redirect='+_0x544567}),_0x212407[_0x98aff9(0x136)]();return;}});_0xd50eb3[_0x2dcaae(0x114)](0x0,_0x2dcaae(0x117),()=>{const _0x14f20e=_0x2dcaae,_0x4ccd47=_0xd50eb3[_0x14f20e(0x11d)]();_0x332980=typeof _0x4ccd47===_0x14f20e(0x12e)&&_0x4ccd47?_0x4ccd47[_0x14f20e(0x116)]:Number(_0x4ccd47);const _0x2f75f9=_0x14f20e(0x120)+_0x332980;!_0x3ec296&&(console[_0x14f20e(0x128)](_0x14f20e(0x133)),console['log'](_0x14f20e(0x10b),_0x2f75f9),console['log']('🌐\x20正在尝试自动打开浏览器...'),console[_0x14f20e(0x128)](''),console[_0x14f20e(0x128)](_0x14f20e(0x11e)),console['log']('')),openInBrowser(_0x2f75f9)[_0x14f20e(0x115)](_0x47b751=>{const _0x1f1cb6=_0x14f20e;!_0x3ec296&&(_0x47b751?console[_0x1f1cb6(0x128)](_0x1f1cb6(0x132)):(console[_0x1f1cb6(0x128)](_0x1f1cb6(0x10d)),console['log'](_0x1f1cb6(0x110),_0x2f75f9)),console[_0x1f1cb6(0x128)](''));})[_0x14f20e(0x123)](()=>{const _0x3a4ffd=_0x14f20e;!_0x3ec296&&(console[_0x3a4ffd(0x128)](_0x3a4ffd(0x10d)),console['log'](_0x3a4ffd(0x110),_0x2f75f9),console[_0x3a4ffd(0x128)](''));});}),_0xd50eb3['on']('error',_0x190a51=>{const _0x4e62f9=_0x2dcaae;!_0x3ec296&&console[_0x4e62f9(0x11c)](_0x4e62f9(0x109),_0x190a51),_0x446aed(_0x190a51);});});}function openInBrowser(_0x5f33b5){return new Promise(_0x39f705=>{const _0x590bb8=a26_0x25a6,_0x171e23=process[_0x590bb8(0x127)];let _0x531442;if(_0x171e23===_0x590bb8(0x119))_0x531442=_0x590bb8(0x12d)+_0x5f33b5+'\x22';else _0x171e23===_0x590bb8(0x134)?_0x531442=_0x590bb8(0x12a)+_0x5f33b5+'\x22':_0x531442='xdg-open\x20\x22'+_0x5f33b5+'\x22';exec(_0x531442,_0x409f40=>{_0x409f40?_0x39f705(![]):_0x39f705(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a26_0x338687(0x128)](a26_0x338687(0x121),isAuth);}
1
+ const a26_0xf730b3=a26_0x92b8;(function(_0x56d2fc,_0x5d9219){const _0x2b5eec=a26_0x92b8,_0x21ca1b=_0x56d2fc();while(!![]){try{const _0x267ee7=-parseInt(_0x2b5eec(0x1be))/0x1*(parseInt(_0x2b5eec(0x1bb))/0x2)+parseInt(_0x2b5eec(0x1b9))/0x3+parseInt(_0x2b5eec(0x1a5))/0x4+parseInt(_0x2b5eec(0x1ab))/0x5*(parseInt(_0x2b5eec(0x1a1))/0x6)+-parseInt(_0x2b5eec(0x1b3))/0x7*(parseInt(_0x2b5eec(0x1ba))/0x8)+parseInt(_0x2b5eec(0x1a2))/0x9+parseInt(_0x2b5eec(0x193))/0xa;if(_0x267ee7===_0x5d9219)break;else _0x21ca1b['push'](_0x21ca1b['shift']());}catch(_0x9fae17){_0x21ca1b['push'](_0x21ca1b['shift']());}}}(a26_0x3cc8,0x86711));import{writeFileSync}from'node:fs';import a26_0x100581 from'node:https';import{getUserDomain}from'../constant/domain.js';function a26_0x3cc8(){const _0x184095=['writeHead','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','text/html;\x20charset=utf-8','567522PDIoaZ','2726928VLiqwI','⚠️\x20\x20无法自动打开浏览器','headers','4222484UeMGnk','cookie','object','🔐\x20正在启动登录服务...','user','/sign-in?redirect=','25odwtCM','https://dev.lovrabet.com:','platform','log','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','/api/auth/get-session','end','then','29281ktnUGc','silent','isAuth','error','127.0.0.1','open\x20\x22','1006068ODdBIe','1664KbdoCa','566yHwvry','xdg-open\x20\x22','json','2908LoKjNl','767970QIaEdG','📍\x20登录地址:','port','utf-8','https://g.yuntooai.com/cert/lovrabet-dev.json','darwin','createServer','Auth\x20server\x20error:','close','🔗\x20请手动复制登录地址到浏览器:','start\x20\x22\x22\x20\x22'];a26_0x3cc8=function(){return _0x184095;};return a26_0x3cc8();}function a26_0x92b8(_0x345553,_0x4be800){_0x345553=_0x345553-0x193;const _0x3cc8e7=a26_0x3cc8();let _0x92b855=_0x3cc8e7[_0x345553];return _0x92b855;}import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x76f7e7){const _0x401bd7=a26_0x92b8,_0x2b14eb=_0x76f7e7?.[_0x401bd7(0x1b4)]||![];if(await getIsSessionValid())return!![];const _0x430b5a=await(await fetch(_0x401bd7(0x197)))[_0x401bd7(0x1bd)]();return new Promise(async(_0x5af4c4,_0x57f5cd)=>{const _0x77450f=_0x401bd7;let _0x4ceeb7=0x0;const _0x95bbc2=a26_0x100581[_0x77450f(0x199)](_0x430b5a,async(_0x2ef787,_0x1eaa92)=>{const _0x2c2fa6=_0x77450f,_0x42574c=getUserDomain(),_0x413000=_0x2ef787[_0x2c2fa6(0x1a4)][_0x2c2fa6(0x1a6)]||'',_0x50f5e8=await fetch(_0x42574c+_0x2c2fa6(0x1b0),{'headers':{'cookie':_0x413000}})['then'](_0x492c25=>_0x492c25[_0x2c2fa6(0x1bd)]()),_0x4ea106=_0x50f5e8&&_0x50f5e8['session']&&_0x50f5e8[_0x2c2fa6(0x1a9)];if(_0x4ea106){writeFileSync(cookieFile,_0x413000,_0x2c2fa6(0x196)),_0x5af4c4(!![]);const _0x1099a7=_0x2c2fa6(0x1af);_0x1eaa92['writeHead'](0xc8,{'Content-Type':_0x2c2fa6(0x1a0)}),_0x1eaa92[_0x2c2fa6(0x1b1)](_0x1099a7),_0x95bbc2[_0x2c2fa6(0x19b)]();}else{const _0x42e080=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x4ceeb7);_0x1eaa92[_0x2c2fa6(0x19e)](0x12e,{'location':_0x42574c+_0x2c2fa6(0x1aa)+_0x42e080}),_0x1eaa92[_0x2c2fa6(0x1b1)]();return;}});_0x95bbc2['listen'](0x0,_0x77450f(0x1b7),()=>{const _0x25a6d3=_0x77450f,_0xacd799=_0x95bbc2['address']();_0x4ceeb7=typeof _0xacd799===_0x25a6d3(0x1a7)&&_0xacd799?_0xacd799[_0x25a6d3(0x195)]:Number(_0xacd799);const _0x2e14f2=_0x25a6d3(0x1ac)+_0x4ceeb7;!_0x2b14eb&&(console['log'](_0x25a6d3(0x1a8)),console[_0x25a6d3(0x1ae)](_0x25a6d3(0x194),_0x2e14f2),console[_0x25a6d3(0x1ae)]('🌐\x20正在尝试自动打开浏览器...'),console[_0x25a6d3(0x1ae)](''),console['log'](_0x25a6d3(0x19f)),console['log']('')),openInBrowser(_0x2e14f2)[_0x25a6d3(0x1b2)](_0xda73de=>{const _0x4b00a6=_0x25a6d3;!_0x2b14eb&&(_0xda73de?console['log']('✅\x20浏览器已自动打开,请在浏览器中完成登录'):(console[_0x4b00a6(0x1ae)](_0x4b00a6(0x1a3)),console[_0x4b00a6(0x1ae)]('🔗\x20请手动复制登录地址到浏览器:',_0x2e14f2)),console[_0x4b00a6(0x1ae)](''));})['catch'](()=>{const _0x95b09b=_0x25a6d3;!_0x2b14eb&&(console['log']('⚠️\x20\x20无法自动打开浏览器'),console[_0x95b09b(0x1ae)](_0x95b09b(0x19c),_0x2e14f2),console['log'](''));});}),_0x95bbc2['on'](_0x77450f(0x1b6),_0x2352f0=>{const _0x5e0d63=_0x77450f;!_0x2b14eb&&console[_0x5e0d63(0x1b6)](_0x5e0d63(0x19a),_0x2352f0),_0x57f5cd(_0x2352f0);});});}function openInBrowser(_0x7b372f){return new Promise(_0x12dbc4=>{const _0x52ed6d=a26_0x92b8,_0x9c2b=process[_0x52ed6d(0x1ad)];let _0x379262;if(_0x9c2b==='win32')_0x379262=_0x52ed6d(0x19d)+_0x7b372f+'\x22';else _0x9c2b===_0x52ed6d(0x198)?_0x379262=_0x52ed6d(0x1b8)+_0x7b372f+'\x22':_0x379262=_0x52ed6d(0x1bc)+_0x7b372f+'\x22';exec(_0x379262,_0x34a520=>{_0x34a520?_0x12dbc4(![]):_0x12dbc4(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a26_0xf730b3(0x1ae)](a26_0xf730b3(0x1b5),isAuth);}
@@ -1 +1 @@
1
- (function(_0x56d53f,_0x5f487e){const _0x1209ea=a27_0x2aeb,_0x23a1aa=_0x56d53f();while(!![]){try{const _0x50d29f=parseInt(_0x1209ea(0x13a))/0x1*(-parseInt(_0x1209ea(0x13d))/0x2)+parseInt(_0x1209ea(0x139))/0x3+parseInt(_0x1209ea(0x13b))/0x4*(-parseInt(_0x1209ea(0x136))/0x5)+-parseInt(_0x1209ea(0x13c))/0x6*(parseInt(_0x1209ea(0x137))/0x7)+parseInt(_0x1209ea(0x135))/0x8+parseInt(_0x1209ea(0x138))/0x9*(parseInt(_0x1209ea(0x134))/0xa)+parseInt(_0x1209ea(0x133))/0xb;if(_0x50d29f===_0x5f487e)break;else _0x23a1aa['push'](_0x23a1aa['shift']());}catch(_0x3e07d5){_0x23a1aa['push'](_0x23a1aa['shift']());}}}(a27_0x1708,0x9f71e));function a27_0x1708(){const _0x221e5f=['63tOrOKM','58011VaVShP','21689sEuRkU','4osmfBQ','6eUeqGK','34NSSmXd','12650154COIZJc','923810kRZAav','683928rwjzkj','1694435tskTrI','3785761RclrAW'];a27_0x1708=function(){return _0x221e5f;};return a27_0x1708();}import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+'/.lovrabet';export const cookieFile=configDir+'/cookie';function a27_0x2aeb(_0x4ee0af,_0xa0ab84){_0x4ee0af=_0x4ee0af-0x133;const _0x17084c=a27_0x1708();let _0x2aebbd=_0x17084c[_0x4ee0af];return _0x2aebbd;}mkdirSync(configDir,{'recursive':!![]});
1
+ const a27_0x303c9f=a27_0xfb43;(function(_0xc2d1ea,_0x181a8f){const _0x327d8b=a27_0xfb43,_0x32c4e5=_0xc2d1ea();while(!![]){try{const _0x493c99=-parseInt(_0x327d8b(0x131))/0x1+parseInt(_0x327d8b(0x138))/0x2*(parseInt(_0x327d8b(0x13a))/0x3)+parseInt(_0x327d8b(0x13b))/0x4*(-parseInt(_0x327d8b(0x135))/0x5)+parseInt(_0x327d8b(0x134))/0x6+parseInt(_0x327d8b(0x137))/0x7+parseInt(_0x327d8b(0x136))/0x8*(parseInt(_0x327d8b(0x139))/0x9)+parseInt(_0x327d8b(0x130))/0xa*(-parseInt(_0x327d8b(0x133))/0xb);if(_0x493c99===_0x181a8f)break;else _0x32c4e5['push'](_0x32c4e5['shift']());}catch(_0xb9d564){_0x32c4e5['push'](_0x32c4e5['shift']());}}}(a27_0x3eec,0x997e5));import{mkdirSync}from'node:fs';function a27_0x3eec(){const _0x14cdca=['4WNPbsu','9bsPMwx','624678VTxGHq','550336TatZlG','/cookie','20UeyAyp','714484pLmyvL','/.lovrabet','6746806WWlknx','7528110VZaudW','5GpObLm','4639312pTuipK','3194926bNacVh'];a27_0x3eec=function(){return _0x14cdca;};return a27_0x3eec();}import{homedir}from'node:os';export const configDir=homedir()+a27_0x303c9f(0x132);export const cookieFile=configDir+a27_0x303c9f(0x13c);function a27_0xfb43(_0x240151,_0x4933f5){_0x240151=_0x240151-0x130;const _0x3eecbb=a27_0x3eec();let _0xfb436c=_0x3eecbb[_0x240151];return _0xfb436c;}mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a28_0x105b(_0x23600a,_0x56a6f9){_0x23600a=_0x23600a-0x1c0;var _0x1f2de2=a28_0x1f2d();var _0x105b78=_0x1f2de2[_0x23600a];return _0x105b78;}(function(_0xce50e8,_0x314ec4){var _0x18173f=a28_0x105b,_0x3dfa54=_0xce50e8();while(!![]){try{var _0x59b166=-parseInt(_0x18173f(0x1c1))/0x1+parseInt(_0x18173f(0x1c4))/0x2*(parseInt(_0x18173f(0x1c5))/0x3)+-parseInt(_0x18173f(0x1ca))/0x4*(parseInt(_0x18173f(0x1c8))/0x5)+-parseInt(_0x18173f(0x1c7))/0x6*(parseInt(_0x18173f(0x1c3))/0x7)+parseInt(_0x18173f(0x1cb))/0x8+parseInt(_0x18173f(0x1cc))/0x9*(-parseInt(_0x18173f(0x1c2))/0xa)+-parseInt(_0x18173f(0x1c9))/0xb*(-parseInt(_0x18173f(0x1c0))/0xc);if(_0x59b166===_0x314ec4)break;else _0x3dfa54['push'](_0x3dfa54['shift']());}catch(_0x4d778d){_0x3dfa54['push'](_0x3dfa54['shift']());}}}(a28_0x1f2d,0xadd34));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x55770b=a28_0x105b;try{return readFileSync(cookieFile,_0x55770b(0x1c6));}catch{}return'';}function a28_0x1f2d(){var _0x30ec88=['10uagziW','420MqOJoG','2kboQkg','2655657rgiURI','utf-8','33324RSAYMR','3690IgvcTf','11066lkykTa','972RIOZfP','4028016EXPNJi','530577BSfWnF','10344KqXzDL','972378GhfFmT'];a28_0x1f2d=function(){return _0x30ec88;};return a28_0x1f2d();}
1
+ function a28_0x3fd5(){var _0x38ec6d=['8452503gCQhOu','1036608KhEKEk','23937760npzCLt','16uAfMfr','634304bbyBUc','629877yKKDGx','1708940QgEkXV','utf-8','927087esPLra','2FBqHDy','20aWsvIL'];a28_0x3fd5=function(){return _0x38ec6d;};return a28_0x3fd5();}function a28_0x1959(_0x21083d,_0x349e1e){_0x21083d=_0x21083d-0x107;var _0x3fd5d7=a28_0x3fd5();var _0x195980=_0x3fd5d7[_0x21083d];return _0x195980;}(function(_0x16cb91,_0x115ba7){var _0x22508e=a28_0x1959,_0x3b3162=_0x16cb91();while(!![]){try{var _0x32e817=-parseInt(_0x22508e(0x10c))/0x1+-parseInt(_0x22508e(0x111))/0x2*(parseInt(_0x22508e(0x10d))/0x3)+-parseInt(_0x22508e(0x107))/0x4*(parseInt(_0x22508e(0x10e))/0x5)+-parseInt(_0x22508e(0x109))/0x6+parseInt(_0x22508e(0x110))/0x7*(parseInt(_0x22508e(0x10b))/0x8)+parseInt(_0x22508e(0x108))/0x9+parseInt(_0x22508e(0x10a))/0xa;if(_0x32e817===_0x115ba7)break;else _0x3b3162['push'](_0x3b3162['shift']());}catch(_0x2fddda){_0x3b3162['push'](_0x3b3162['shift']());}}}(a28_0x3fd5,0xd4dae));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x415c58=a28_0x1959;try{return readFileSync(cookieFile,_0x415c58(0x10f));}catch{}return'';}
@@ -1 +1 @@
1
- function a29_0x4859(_0x57cb73,_0xcab195){_0x57cb73=_0x57cb73-0x1cc;const _0x30940d=a29_0x3094();let _0x48597b=_0x30940d[_0x57cb73];return _0x48597b;}(function(_0x375a32,_0x2e7f58){const _0x5562ac=a29_0x4859,_0x202dec=_0x375a32();while(!![]){try{const _0x182486=-parseInt(_0x5562ac(0x1d5))/0x1*(-parseInt(_0x5562ac(0x1d7))/0x2)+parseInt(_0x5562ac(0x1d6))/0x3+parseInt(_0x5562ac(0x1d2))/0x4+-parseInt(_0x5562ac(0x1cc))/0x5*(-parseInt(_0x5562ac(0x1ce))/0x6)+-parseInt(_0x5562ac(0x1da))/0x7*(-parseInt(_0x5562ac(0x1d4))/0x8)+parseInt(_0x5562ac(0x1d9))/0x9+-parseInt(_0x5562ac(0x1db))/0xa*(parseInt(_0x5562ac(0x1cd))/0xb);if(_0x182486===_0x2e7f58)break;else _0x202dec['push'](_0x202dec['shift']());}catch(_0x55f239){_0x202dec['push'](_0x202dec['shift']());}}}(a29_0x3094,0x3427d));import{existsSync,readFileSync}from'node:fs';function a29_0x3094(){const _0x1a80ed=['1104LhLTWl','session','/api/auth/get-session','utf-8','1240876VlsgLR','json','860248apvBuk','94WRrMcQ','978267DwUFqc','5030DvvYcC','then','1451016QIHpTN','14QssJMT','10fznLjt','user','3585iorCUG','12840333yhyIyg'];a29_0x3094=function(){return _0x1a80ed;};return a29_0x3094();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x1fb9c2=a29_0x4859;try{if(!existsSync(cookieFile))return![];const _0x4ef3ba=readFileSync(cookieFile,_0x1fb9c2(0x1d1)),_0x32c209=await fetch(getUserDomain()+_0x1fb9c2(0x1d0),{'headers':{'cookie':_0x4ef3ba}})[_0x1fb9c2(0x1d8)](_0x184817=>_0x184817[_0x1fb9c2(0x1d3)]());return _0x32c209&&_0x32c209[_0x1fb9c2(0x1cf)]&&_0x32c209[_0x1fb9c2(0x1dc)];}catch{}return![];}
1
+ function a29_0x2b74(_0x199475,_0x2aeb17){_0x199475=_0x199475-0x181;const _0x32ad38=a29_0x32ad();let _0x2b743f=_0x32ad38[_0x199475];return _0x2b743f;}(function(_0x3a33a7,_0x1b09f3){const _0x5718b9=a29_0x2b74,_0x4ad1cd=_0x3a33a7();while(!![]){try{const _0xf0733b=parseInt(_0x5718b9(0x184))/0x1*(parseInt(_0x5718b9(0x18f))/0x2)+-parseInt(_0x5718b9(0x186))/0x3*(-parseInt(_0x5718b9(0x18c))/0x4)+parseInt(_0x5718b9(0x18b))/0x5+-parseInt(_0x5718b9(0x182))/0x6*(parseInt(_0x5718b9(0x185))/0x7)+parseInt(_0x5718b9(0x187))/0x8*(parseInt(_0x5718b9(0x18a))/0x9)+parseInt(_0x5718b9(0x183))/0xa+-parseInt(_0x5718b9(0x181))/0xb*(parseInt(_0x5718b9(0x190))/0xc);if(_0xf0733b===_0x1b09f3)break;else _0x4ad1cd['push'](_0x4ad1cd['shift']());}catch(_0x590c8d){_0x4ad1cd['push'](_0x4ad1cd['shift']());}}}(a29_0x32ad,0x2c5bf));import{existsSync,readFileSync}from'node:fs';function a29_0x32ad(){const _0x543d61=['json','387aTaSfE','859010RlPBoH','28672KrebEi','utf-8','then','4996IwXOnV','156jntioF','824549jPkgGW','54biJeTM','3129290TTvqWB','58uucnUn','73906glDckr','138IWRREl','54296NHNGiz','session'];a29_0x32ad=function(){return _0x543d61;};return a29_0x32ad();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x25a60b=a29_0x2b74;try{if(!existsSync(cookieFile))return![];const _0x1d478e=readFileSync(cookieFile,_0x25a60b(0x18d)),_0x32a1e0=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x1d478e}})[_0x25a60b(0x18e)](_0x3ca384=>_0x3ca384[_0x25a60b(0x189)]());return _0x32a1e0&&_0x32a1e0[_0x25a60b(0x188)]&&_0x32a1e0['user'];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x4522e0,_0x4b0834){var _0x3cbb74=a30_0x2740,_0x597cc5=_0x4522e0();while(!![]){try{var _0x5ae04d=-parseInt(_0x3cbb74(0x170))/0x1*(-parseInt(_0x3cbb74(0x16a))/0x2)+parseInt(_0x3cbb74(0x16b))/0x3*(parseInt(_0x3cbb74(0x16c))/0x4)+-parseInt(_0x3cbb74(0x16e))/0x5*(-parseInt(_0x3cbb74(0x168))/0x6)+-parseInt(_0x3cbb74(0x169))/0x7+-parseInt(_0x3cbb74(0x173))/0x8*(parseInt(_0x3cbb74(0x172))/0x9)+-parseInt(_0x3cbb74(0x171))/0xa*(parseInt(_0x3cbb74(0x16d))/0xb)+parseInt(_0x3cbb74(0x174))/0xc;if(_0x5ae04d===_0x4b0834)break;else _0x597cc5['push'](_0x597cc5['shift']());}catch(_0x2d99ce){_0x597cc5['push'](_0x597cc5['shift']());}}}(a30_0x1496,0x6bf68));import{unlinkSync,existsSync}from'node:fs';function a30_0x2740(_0x26143a,_0x380d44){_0x26143a=_0x26143a-0x168;var _0x149644=a30_0x1496();var _0x274061=_0x149644[_0x26143a];return _0x274061;}import{cookieFile}from'./constant.js';export function logout(){var _0x31ed5f=a30_0x2740;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x31ed5f(0x176)](_0x31ed5f(0x16f))):console[_0x31ed5f(0x176)](_0x31ed5f(0x175));}function a30_0x1496(){var _0x3e1b75=['20AItYlL','✓\x20已退出登录','100588HFcyyg','70bRUPyV','4461309aYIJtw','8hRoSOb','8054580nbNYgM','!\x20当前未登录','log','1181352DVjBgR','5241509WgRhAy','2AQZwfq','18FhFEBa','504996gQrNbd','990253gsmcHO'];a30_0x1496=function(){return _0x3e1b75;};return a30_0x1496();}
1
+ (function(_0x41d737,_0x23b1d8){var _0x59e4a0=a30_0x38ae,_0x13e2d2=_0x41d737();while(!![]){try{var _0x162af1=parseInt(_0x59e4a0(0x19d))/0x1+-parseInt(_0x59e4a0(0x1a3))/0x2+-parseInt(_0x59e4a0(0x1a2))/0x3+-parseInt(_0x59e4a0(0x19c))/0x4+-parseInt(_0x59e4a0(0x19f))/0x5*(-parseInt(_0x59e4a0(0x19b))/0x6)+parseInt(_0x59e4a0(0x1a4))/0x7+parseInt(_0x59e4a0(0x19e))/0x8;if(_0x162af1===_0x23b1d8)break;else _0x13e2d2['push'](_0x13e2d2['shift']());}catch(_0x561b41){_0x13e2d2['push'](_0x13e2d2['shift']());}}}(a30_0x5b38,0x8f79e));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a30_0x38ae(_0x3cc345,_0x4c6912){_0x3cc345=_0x3cc345-0x19b;var _0x5b388c=a30_0x5b38();var _0x38ae2c=_0x5b388c[_0x3cc345];return _0x38ae2c;}export function logout(){var _0x2b144a=a30_0x38ae;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x2b144a(0x1a1)](_0x2b144a(0x1a0))):console[_0x2b144a(0x1a1)]('!\x20当前未登录');}function a30_0x5b38(){var _0x5b0dc7=['6456798PRnJbh','2508824NHaPhD','133994MCcrWM','2083600HhRzgT','5CJmaIg','✓\x20已退出登录','log','2811102oPWBaH','938564zmpjZI','8054361xBlSvC'];a30_0x5b38=function(){return _0x5b0dc7;};return a30_0x5b38();}