@lovrabet/cli 1.3.2 → 1.3.4-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 (89) hide show
  1. package/lib/ai-setup/AISetupUI.js +1 -1
  2. package/lib/ai-setup/config.js +1 -1
  3. package/lib/api/api-doc-ui.js +1 -1
  4. package/lib/api/api-doc.js +1 -1
  5. package/lib/api/api-pull-ui.js +1 -1
  6. package/lib/api/fetch-model-list.js +1 -1
  7. package/lib/api/generate-api-file.js +1 -1
  8. package/lib/api/main.js +1 -1
  9. package/lib/api/pull-silent.js +1 -1
  10. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  11. package/lib/app-menu/create-menu.js +1 -1
  12. package/lib/app-menu/get-local-pages.js +1 -1
  13. package/lib/app-menu/get-online-menu-list.js +1 -1
  14. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  15. package/lib/app-menu/utils.js +1 -1
  16. package/lib/app-menu/valid-url.js +1 -1
  17. package/lib/app-menu-update-cdn/current-content.js +1 -1
  18. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  19. package/lib/app-menu-update-cdn/main.js +1 -1
  20. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  21. package/lib/auth/auth-server-ui.js +1 -1
  22. package/lib/auth/auth-server.js +1 -1
  23. package/lib/auth/constant.js +1 -1
  24. package/lib/auth/get-cookie.js +1 -1
  25. package/lib/auth/is-session-valid.js +1 -1
  26. package/lib/auth/logout.js +1 -1
  27. package/lib/cli-flags.js +1 -1
  28. package/lib/cli.js +1 -1
  29. package/lib/cmd/build-watch.js +1 -1
  30. package/lib/cmd/build.js +1 -1
  31. package/lib/cmd/logs.js +1 -1
  32. package/lib/cmd/preview.js +1 -1
  33. package/lib/cmd/start-execa.js +1 -0
  34. package/lib/cmd/start.js +1 -1
  35. package/lib/config/config-help.js +1 -1
  36. package/lib/config/main.js +1 -1
  37. package/lib/constant/domain.js +1 -1
  38. package/lib/constant/env.js +1 -1
  39. package/lib/create-app/enhanced-guided-create.js +1 -1
  40. package/lib/create-app/format-elapsed.js +1 -1
  41. package/lib/create-app/main.js +1 -1
  42. package/lib/create-app/non-interactive.js +1 -1
  43. package/lib/create-app/task-finished.js +1 -1
  44. package/lib/create-app/task-loading.js +1 -1
  45. package/lib/create-app/task-running.js +1 -1
  46. package/lib/create-app/task-time.js +1 -1
  47. package/lib/create-app/use-copy-project-template.js +1 -1
  48. package/lib/create-app/use-format-code.js +1 -1
  49. package/lib/create-app/use-install-dependencies.js +1 -1
  50. package/lib/help.js +1 -1
  51. package/lib/i18n/I18nProvider.js +1 -0
  52. package/lib/i18n/hooks.js +1 -0
  53. package/lib/i18n/index.js +1 -0
  54. package/lib/i18n/locales/en-US.js +1 -0
  55. package/lib/i18n/locales/zh-CN.js +1 -0
  56. package/lib/init/main.js +1 -1
  57. package/lib/mcp/McpInstallUI.js +1 -1
  58. package/lib/mcp/claude.js +1 -1
  59. package/lib/mcp/cursor.js +1 -1
  60. package/lib/mcp/main.js +1 -1
  61. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  62. package/lib/mcp/mcp-installer.js +1 -1
  63. package/lib/skills/SkillInstallUI.js +1 -1
  64. package/lib/skills/main.js +1 -1
  65. package/lib/skills/skill-install-non-interactive.js +1 -1
  66. package/lib/skills/skill-installer.js +1 -1
  67. package/lib/ui/IDESelector.js +1 -1
  68. package/lib/ui/useIDESelection.js +1 -1
  69. package/lib/utils/ai_config.js +1 -1
  70. package/lib/utils/cdn-config.js +1 -1
  71. package/lib/utils/check-sdk-version.js +1 -1
  72. package/lib/utils/cli-version-check.js +1 -1
  73. package/lib/utils/config.js +1 -1
  74. package/lib/utils/copy-directory.js +1 -1
  75. package/lib/utils/file-utils.js +1 -1
  76. package/lib/utils/guides-cdn.js +1 -1
  77. package/lib/utils/http-client.js +1 -1
  78. package/lib/utils/logger.js +1 -1
  79. package/lib/utils/rules-cdn.js +1 -1
  80. package/lib/utils/sleep.js +1 -1
  81. package/lib/utils/template-replacer.js +1 -1
  82. package/package.json +6 -1
  83. package/templates/README.md +10 -55
  84. package/lib/add-page/input-page-router.js +0 -1
  85. package/lib/add-page/main.js +0 -1
  86. package/lib/add-page/select-page-template.js +0 -1
  87. package/lib/utils/router-updater.js +0 -1
  88. package/templates/pages/blank/index.tsx.tpl +0 -13
  89. package/templates/pages/sdk-fetch/index.tsx.tpl +0 -80
@@ -1 +1 @@
1
- (function(_0x1f427f,_0x40d0f8){const _0x566a31=a12_0x20ca,_0x14e6f7=_0x1f427f();while(!![]){try{const _0x36368d=parseInt(_0x566a31(0x20c))/0x1*(-parseInt(_0x566a31(0x21b))/0x2)+-parseInt(_0x566a31(0x215))/0x3+parseInt(_0x566a31(0x22e))/0x4*(parseInt(_0x566a31(0x222))/0x5)+-parseInt(_0x566a31(0x1f9))/0x6*(parseInt(_0x566a31(0x1ea))/0x7)+parseInt(_0x566a31(0x1f0))/0x8*(-parseInt(_0x566a31(0x229))/0x9)+-parseInt(_0x566a31(0x221))/0xa*(-parseInt(_0x566a31(0x1f6))/0xb)+parseInt(_0x566a31(0x213))/0xc*(parseInt(_0x566a31(0x210))/0xd);if(_0x36368d===_0x40d0f8)break;else _0x14e6f7['push'](_0x14e6f7['shift']());}catch(_0x21d362){_0x14e6f7['push'](_0x14e6f7['shift']());}}}(a12_0x3df1,0x78326));import{jsx as a12_0x5bcc98,jsxs as a12_0x1fcba6,Fragment as a12_0x1be7d4}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a12_0x389237 from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';function a12_0x20ca(_0x2bd162,_0x2c4518){_0x2bd162=_0x2bd162-0x1ea;const _0x3df192=a12_0x3df1();let _0x20ca17=_0x3df192[_0x2bd162];return _0x20ca17;}import{getLocalPages}from'./get-local-pages.js';function a12_0x3df1(){const _0x53f836=['backspace','10777gcxLSt','*\x20同步菜单到\x20Lovrabet\x20平台','√\x20菜单创建完成','29604HvIHrF','CSS\x20链接无法访问','348897gYlwnU','label','green','max','\x20输入项目的\x20JS\x20资源链接(https://...)','\x20命令重新登录','1794442bUKPbD','请输入有效的\x20CSS\x20https\x20链接','local','filter','upArrow','slice','10GkMFTw','45jRBJpR','*\x20JS\x20链接:\x20','includes','*\x20请选择要同步的菜单:','请输入有效的\x20JS\x20https\x20链接','\x20正在获取线上菜单列表...','path','9fOitQa','online','创建菜单失败','cyan','菜单名称','259352kKyTJK','message','JS\x20链接无法访问','8729WcDntm','dots','join','done','\x20←\x20','selecting','7122832qkNbjh','test','length','add','已选择菜单','提示:使用\x20','7785283KdRGbr','gray','map','4524wUghEl','white','delete','red','lovrabet\x20auth','creating','input-css','fill','has','trim','input-js','CSS\x20链接','repeat','Lovrabet平台','JS\x20链接','size','return','请至少选择一个菜单','*\x20正在创建菜单...','1LotyHK','[\x20]','column'];a12_0x3df1=function(){return _0x53f836;};return a12_0x3df1();}import{createMenus}from'./create-menu.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a12_0x5bcc98(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x1984ef=a12_0x20ca,{exit:_0x3fe2d6}=useApp(),{loading:_0x395867,menuList:_0x30024b,error:_0xcef265}=useGetOnlineMenuList(),_0x4da114=getLocalPages(),_0x49bb67=_0x30024b[_0x1984ef(0x1f8)](_0x3fd622=>_0x3fd622['path']),_0x19ac7b=[_0x1984ef(0x22d),..._0x4da114['map'](_0x5d7a92=>_0x5d7a92['label'])],_0x3ddf8e=getStringWidth(getMaxWidth(_0x19ac7b,0x4)),_0x28e0cd=getStringWidth(getMaxWidth([_0x1984ef(0x22d)])),[_0x4dfbe4,_0x34a925]=useState(_0x1984ef(0x1ef)),[_0x506728,_0x24bd2e]=useState(new Set()),[_0x4076a5,_0x1b8c22]=useState(0x0),[_0x1efe3b,_0x485896]=useState(''),[_0x3a0684,_0x5c141f]=useState(''),[_0x2aec27,_0x2f5920]=useState(''),[_0xc5434a,_0x272cd9]=useState(''),[_0x1c39b9,_0x325dc8]=useState([]),_0x270af9=_0x4da114[_0x1984ef(0x1f8)](_0x5b2e9e=>({'label':_0x5b2e9e[_0x1984ef(0x216)],'path':_0x5b2e9e[_0x1984ef(0x228)],'local':!![],'online':_0x49bb67[_0x1984ef(0x224)](_0x5b2e9e[_0x1984ef(0x228)])})),_0x274904=_0x4da114[_0x1984ef(0x21e)](_0x330c53=>{return!_0x49bb67['includes'](_0x330c53['path']);});useEffect(()=>{const _0x3006b2=_0x1984ef;if(!_0x395867&&_0x4da114[_0x3006b2(0x1f2)]>0x0&&_0x506728[_0x3006b2(0x208)]===0x0){const _0x554a11=new Set(_0x4da114[_0x3006b2(0x1f8)]((_0x243b11,_0x1ea128)=>({'page':_0x243b11,'index':_0x1ea128}))[_0x3006b2(0x21e)](({page:_0x534d8c})=>!_0x49bb67[_0x3006b2(0x224)](_0x534d8c[_0x3006b2(0x228)]))[_0x3006b2(0x1f8)](({index:_0x44166a})=>_0x44166a));_0x24bd2e(_0x554a11);}},[_0x395867,_0x4da114[_0x1984ef(0x1f2)],_0x49bb67[_0x1984ef(0x1f2)]]),useInput(async(_0x3b599a,_0x287372)=>{const _0x5b073f=_0x1984ef;if(_0x4dfbe4===_0x5b073f(0x1ef)){if(_0x287372[_0x5b073f(0x21f)]){_0x1b8c22(_0x15b4ae=>_0x15b4ae>0x0?_0x15b4ae-0x1:_0x4da114[_0x5b073f(0x1f2)]-0x1);return;}if(_0x287372['downArrow']){_0x1b8c22(_0x1b4d0f=>_0x1b4d0f<_0x4da114[_0x5b073f(0x1f2)]-0x1?_0x1b4d0f+0x1:0x0);return;}if(_0x3b599a==='\x20'){_0x24bd2e(_0x1fd455=>{const _0x82ebfa=_0x5b073f,_0x869253=new Set(_0x1fd455);return _0x869253['has'](_0x4076a5)?_0x869253[_0x82ebfa(0x1fb)](_0x4076a5):_0x869253[_0x82ebfa(0x1f3)](_0x4076a5),_0x869253;});return;}if(_0x3b599a==='a'||_0x3b599a==='A'){const _0x1083df=new Set(_0x4da114[_0x5b073f(0x1f8)]((_0x5073bc,_0x31df14)=>_0x31df14));_0x24bd2e(_0x1083df);return;}if(_0x3b599a==='i'||_0x3b599a==='I'||_0x3b599a==='r'||_0x3b599a==='R'){_0x24bd2e(_0x3fe767=>{const _0x24daeb=_0x5b073f,_0x3e3dbc=new Set();for(let _0x2f1e9e=0x0;_0x2f1e9e<_0x4da114[_0x24daeb(0x1f2)];_0x2f1e9e++){!_0x3fe767[_0x24daeb(0x201)](_0x2f1e9e)&&_0x3e3dbc[_0x24daeb(0x1f3)](_0x2f1e9e);}return _0x3e3dbc;});return;}if(_0x3b599a==='q'||_0x3b599a==='Q'){_0x3fe2d6();return;}if(_0x287372[_0x5b073f(0x209)]){if(_0x506728[_0x5b073f(0x208)]===0x0){_0x272cd9(_0x5b073f(0x20a));return;}const _0x149f23=_0x4da114['filter']((_0x7aa396,_0x2cb57b)=>_0x506728['has'](_0x2cb57b)),_0x472f42=_0x149f23[_0x5b073f(0x1f8)](_0x4ad397=>_0x4ad397[_0x5b073f(0x216)])[_0x5b073f(0x1ec)](',\x20');_0x325dc8([{'label':_0x5b073f(0x1f4),'value':_0x506728[_0x5b073f(0x208)]+'\x20个'}]),_0x272cd9(''),_0x34a925(_0x5b073f(0x203));return;}return;}if(_0x4dfbe4===_0x5b073f(0x203)){if(_0x287372[_0x5b073f(0x209)]){const _0x8b484d=_0x2aec27[_0x5b073f(0x202)]();if(_0x8b484d==='')return;if(!isValidJsHttpsUrl(_0x8b484d)){_0x272cd9(_0x5b073f(0x226));return;}if(!await isUrlReachable(_0x8b484d)){_0x272cd9(_0x5b073f(0x230));return;}_0x485896(_0x8b484d),_0x325dc8(_0x5363d5=>[..._0x5363d5,{'label':_0x5b073f(0x207),'value':_0x8b484d}]),_0x2f5920(''),_0x272cd9(''),_0x34a925(_0x5b073f(0x1ff));return;}if(_0x287372[_0x5b073f(0x20f)]||_0x287372[_0x5b073f(0x1fb)]){_0x2f5920(_0x454eb8=>_0x454eb8[_0x5b073f(0x220)](0x0,-0x1)),_0x272cd9('');return;}_0x2f5920(_0x4c554c=>_0x4c554c+_0x3b599a);return;}if(_0x4dfbe4==='input-css'){if(_0x287372[_0x5b073f(0x209)]){const _0x563ae2=_0x2aec27[_0x5b073f(0x202)]();if(_0x563ae2==='')return;if(!isValidCssHttpsUrl(_0x563ae2)){_0x272cd9(_0x5b073f(0x21c));return;}if(!await isUrlReachable(_0x563ae2)){_0x272cd9(_0x5b073f(0x214));return;}_0x5c141f(_0x563ae2),_0x325dc8(_0x4ca6d0=>[..._0x4ca6d0,{'label':_0x5b073f(0x204),'value':_0x563ae2}]),_0x2f5920(''),_0x272cd9(''),_0x34a925(_0x5b073f(0x1fe));const _0x6c3403=_0x4da114['filter']((_0x1a474b,_0x556e20)=>_0x506728[_0x5b073f(0x201)](_0x556e20));createMenus(_0x6c3403,[_0x1efe3b,_0x563ae2])['then'](()=>{const _0xdf61c8=_0x5b073f;_0x34a925(_0xdf61c8(0x1ed)),setTimeout(()=>{_0x3fe2d6();},0x3e8);})['catch'](_0x18e001=>{const _0x4f0594=_0x5b073f;_0x272cd9(_0x18e001[_0x4f0594(0x22f)]||_0x4f0594(0x22b)),_0x34a925('selecting');});return;}if(_0x287372[_0x5b073f(0x20f)]||_0x287372['delete']){_0x2f5920(_0x5c60c4=>_0x5c60c4[_0x5b073f(0x220)](0x0,-0x1)),_0x272cd9('');return;}_0x2f5920(_0x38b8f2=>_0x38b8f2+_0x3b599a);return;}});if(_0x395867)return a12_0x1fcba6(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x5bcc98(Text,{'children':'\x20\x20'}),a12_0x5bcc98(a12_0x389237,{'type':_0x1984ef(0x1eb)}),a12_0x5bcc98(Text,{'children':_0x1984ef(0x227)})]});if(_0xcef265)return a12_0x1fcba6(Box,{'flexDirection':_0x1984ef(0x20e),'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x1fcba6(Text,{'color':_0x1984ef(0x1fc),'children':['✗\x20',_0xcef265]}),a12_0x1fcba6(Box,{'marginTop':0x1,'children':[a12_0x5bcc98(Text,{'color':_0x1984ef(0x1f7),'children':_0x1984ef(0x1f5)}),a12_0x5bcc98(Text,{'color':_0x1984ef(0x22c),'children':_0x1984ef(0x1fd)}),a12_0x5bcc98(Text,{'color':_0x1984ef(0x1f7),'children':_0x1984ef(0x21a)})]})]});if(_0x4da114[_0x1984ef(0x1f2)]===0x0)return a12_0x5bcc98(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x5bcc98(Text,{'color':'yellow','children':'!\x20未找到本地页面,请先创建页面'})});return a12_0x1fcba6(Box,{'flexDirection':_0x1984ef(0x20e),'marginTop':0x1,'marginBottom':0x1,'children':[_0x4dfbe4===_0x1984ef(0x1ef)&&a12_0x1fcba6(a12_0x1be7d4,{'children':[a12_0x1fcba6(Box,{'children':[a12_0x1fcba6(Text,{'bold':!![],'children':['\x20\x20','菜单名称',getRemainingSpaces(_0x3ddf8e,_0x1984ef(0x22d))]}),a12_0x1fcba6(Text,{'bold':!![],'children':['本地',getRemainingSpaces(_0x28e0cd,_0x1984ef(0x22d))]}),a12_0x1fcba6(Text,{'bold':!![],'children':[_0x1984ef(0x206),getRemainingSpaces(_0x28e0cd,_0x1984ef(0x22d))]})]}),_0x270af9[_0x1984ef(0x1f8)](_0x248f4c=>a12_0x1fcba6(Box,{'children':[a12_0x1fcba6(Text,{'children':['\x20\x20',_0x248f4c[_0x1984ef(0x216)],getRemainingSpaces(_0x3ddf8e,_0x248f4c[_0x1984ef(0x216)])]}),a12_0x1fcba6(Text,{'color':_0x1984ef(0x217),'children':[_0x248f4c[_0x1984ef(0x21d)]?'✓':'✗',getRemainingSpaces(_0x28e0cd,'✓')]}),a12_0x1fcba6(Text,{'color':_0x248f4c[_0x1984ef(0x22a)]?'green':_0x1984ef(0x1fc),'children':[_0x248f4c[_0x1984ef(0x22a)]?'✓':'✗',getRemainingSpaces(_0x28e0cd,'✓')]})]},_0x248f4c['path']))]}),_0x4dfbe4===_0x1984ef(0x1ef)&&_0x1c39b9[_0x1984ef(0x1f2)]===0x0&&a12_0x5bcc98(Box,{'marginTop':0x1,'children':a12_0x5bcc98(Text,{'color':_0x1984ef(0x22c),'children':_0x1984ef(0x211)})}),_0x1c39b9['map']((_0xa91a8f,_0x4304df)=>a12_0x1fcba6(Box,{'children':[a12_0x1fcba6(Text,{'color':'green','children':['√\x20',_0xa91a8f[_0x1984ef(0x216)],':\x20']}),a12_0x5bcc98(Text,{'color':_0x1984ef(0x22c),'children':_0xa91a8f['value']})]},_0x4304df)),_0xc5434a&&_0x4dfbe4==='selecting'&&a12_0x5bcc98(Box,{'marginTop':0x1,'children':a12_0x1fcba6(Text,{'color':_0x1984ef(0x1fc),'children':['✗\x20',_0xc5434a]})}),_0x4dfbe4===_0x1984ef(0x1ef)&&a12_0x5bcc98(a12_0x1be7d4,{'children':a12_0x1fcba6(Box,{'marginTop':_0x1c39b9[_0x1984ef(0x1f2)]>0x0||_0xc5434a?0x1:0x0,'flexDirection':_0x1984ef(0x20e),'children':[a12_0x5bcc98(Text,{'bold':!![],'children':_0x1984ef(0x225)}),_0x4da114[_0x1984ef(0x1f8)]((_0x2e175e,_0x197a0e)=>{const _0x1005b8=_0x1984ef,_0x31210a=_0x4076a5===_0x197a0e,_0x414173=_0x506728[_0x1005b8(0x201)](_0x197a0e),_0x1a6fcc=_0x49bb67[_0x1005b8(0x224)](_0x2e175e[_0x1005b8(0x228)]),_0x48e19f=_0x1a6fcc?'更新':'新建';return a12_0x5bcc98(Box,{'children':a12_0x1fcba6(Text,{'backgroundColor':_0x31210a?'blue':undefined,'color':_0x31210a?_0x1005b8(0x1fa):undefined,'children':['\x20\x20',_0x414173?'[✓]':_0x1005b8(0x20d),'\x20',_0x2e175e[_0x1005b8(0x216)]]})},_0x2e175e[_0x1005b8(0x228)]);}),a12_0x5bcc98(Box,{'marginTop':0x1,'children':a12_0x1fcba6(Text,{'color':_0x1984ef(0x1f7),'children':['\x20','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认']})})]})}),_0x4dfbe4===_0x1984ef(0x203)&&a12_0x1fcba6(a12_0x1be7d4,{'children':[a12_0x1fcba6(Box,{'children':[a12_0x5bcc98(Text,{'children':_0x1984ef(0x223)}),a12_0x5bcc98(Text,{'color':'green','children':_0x2aec27}),_0xc5434a&&a12_0x1fcba6(Text,{'color':_0x1984ef(0x1fc),'children':[_0x1984ef(0x1ee),_0xc5434a]})]}),!_0xc5434a&&a12_0x5bcc98(Box,{'children':a12_0x5bcc98(Text,{'color':_0x1984ef(0x1f7),'children':_0x1984ef(0x219)})})]}),_0x4dfbe4===_0x1984ef(0x1ff)&&a12_0x1fcba6(a12_0x1be7d4,{'children':[a12_0x1fcba6(Box,{'children':[a12_0x5bcc98(Text,{'children':'*\x20CSS\x20链接:\x20'}),a12_0x5bcc98(Text,{'color':_0x1984ef(0x217),'children':_0x2aec27}),_0xc5434a&&a12_0x1fcba6(Text,{'color':_0x1984ef(0x1fc),'children':[_0x1984ef(0x1ee),_0xc5434a]})]}),!_0xc5434a&&a12_0x5bcc98(Box,{'children':a12_0x5bcc98(Text,{'color':'gray','children':'\x20输入项目的\x20CSS\x20资源链接(https://...)'})})]}),_0x4dfbe4===_0x1984ef(0x1fe)&&a12_0x5bcc98(Box,{'children':a12_0x5bcc98(Text,{'children':_0x1984ef(0x20b)})}),_0x4dfbe4==='done'&&a12_0x5bcc98(Box,{'children':a12_0x5bcc98(Text,{'color':_0x1984ef(0x217),'children':_0x1984ef(0x212)})})]});}function getStringWidth(_0x595af7){const _0x3a1ad5=a12_0x20ca;let _0x26db4d=0x0;for(const _0x5876aa of _0x595af7){/[\u4e00-\u9fa5]/[_0x3a1ad5(0x1f1)](_0x5876aa)?_0x26db4d+=0x2:_0x26db4d+=0x1;}return _0x26db4d;}function getRemainingSpaces(_0x508235,_0x28c8c2){const _0x2c3e20=a12_0x20ca,_0x5e47ec=getStringWidth(_0x28c8c2);return Array(Math[_0x2c3e20(0x218)](0x0,_0x508235-_0x5e47ec))[_0x2c3e20(0x200)]('\x20')[_0x2c3e20(0x1ec)]('');}function getMaxWidth(_0x50d1d2,_0x1c8357=0x2){const _0x296f79=a12_0x20ca;let _0xea14d='',_0x10e25d=0x0;for(const _0x4b64c1 of _0x50d1d2){const _0x479587=getStringWidth(_0x4b64c1);_0x479587>_0x10e25d&&(_0x10e25d=_0x479587,_0xea14d=_0x4b64c1);}return _0xea14d+'\x20'[_0x296f79(0x205)](_0x1c8357);}
1
+ (function(_0x359df1,_0x259416){const _0x23cd1d=a9_0x1a1c,_0x36c084=_0x359df1();while(!![]){try{const _0x304b1e=-parseInt(_0x23cd1d(0x1b7))/0x1*(-parseInt(_0x23cd1d(0x1a4))/0x2)+-parseInt(_0x23cd1d(0x1a1))/0x3+parseInt(_0x23cd1d(0x17e))/0x4+parseInt(_0x23cd1d(0x198))/0x5*(parseInt(_0x23cd1d(0x18d))/0x6)+-parseInt(_0x23cd1d(0x1bc))/0x7+-parseInt(_0x23cd1d(0x19b))/0x8+parseInt(_0x23cd1d(0x1b6))/0x9;if(_0x304b1e===_0x259416)break;else _0x36c084['push'](_0x36c084['shift']());}catch(_0x2b036f){_0x36c084['push'](_0x36c084['shift']());}}}(a9_0x80f1,0x46eff));import{jsx as a9_0x3d93b7,jsxs as a9_0x51d38f,Fragment as a9_0x439252}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a9_0x22da00 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';function a9_0x1a1c(_0x517314,_0x462a1b){_0x517314=_0x517314-0x17d;const _0x80f135=a9_0x80f1();let _0x1a1cf9=_0x80f135[_0x517314];return _0x1a1cf9;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{useI18n}from'../i18n/hooks.js';import.meta.main&&render(a9_0x3d93b7(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x1af092=a9_0x1a1c,{exit:_0x4d472c}=useApp(),{t:_0x44eb3d}=useI18n(),{loading:_0x141359,menuList:_0x18a7b5,error:_0x3478f3}=useGetOnlineMenuList(),_0x17980f=getLocalPages(),_0x2c756a=_0x18a7b5[_0x1af092(0x186)](_0x405d7d=>_0x405d7d[_0x1af092(0x1a9)]),_0x3212ac=_0x44eb3d(_0x1af092(0x1bb)),_0x334f16=[_0x3212ac,..._0x17980f[_0x1af092(0x186)](_0x318bf8=>_0x318bf8[_0x1af092(0x1ab)])],_0x1697c7=getStringWidth(getMaxWidth(_0x334f16,0x4)),_0x5b68e4=getStringWidth(getMaxWidth([_0x3212ac])),[_0x4f4d30,_0x3a26cc]=useState(_0x1af092(0x183)),[_0x2ce0b5,_0x3a1e52]=useState(new Set()),[_0x3c76ef,_0x5bd34c]=useState(0x0),[_0x154318,_0x8011cf]=useState(''),[_0x24d68b,_0xfd9722]=useState(''),[_0x119f41,_0x3e0d48]=useState(''),[_0x2ddbc7,_0x1a8b7f]=useState(''),[_0x1ee030,_0x4a5917]=useState([]),_0x57aee5=_0x17980f[_0x1af092(0x186)](_0x59cbef=>({'label':_0x59cbef[_0x1af092(0x1ab)],'path':_0x59cbef[_0x1af092(0x1a9)],'local':!![],'online':_0x2c756a[_0x1af092(0x1b0)](_0x59cbef[_0x1af092(0x1a9)])})),_0x19d89c=_0x17980f[_0x1af092(0x1a6)](_0x276a2a=>{const _0x294317=_0x1af092;return!_0x2c756a[_0x294317(0x1b0)](_0x276a2a['path']);});useEffect(()=>{const _0xf71e4f=_0x1af092;if(!_0x141359&&_0x17980f[_0xf71e4f(0x182)]>0x0&&_0x2ce0b5['size']===0x0){const _0x5209b6=new Set(_0x17980f[_0xf71e4f(0x186)]((_0x5b0153,_0x385550)=>({'page':_0x5b0153,'index':_0x385550}))[_0xf71e4f(0x1a6)](({page:_0x1ec916})=>!_0x2c756a[_0xf71e4f(0x1b0)](_0x1ec916[_0xf71e4f(0x1a9)]))['map'](({index:_0x46ec2c})=>_0x46ec2c));_0x3a1e52(_0x5209b6);}},[_0x141359,_0x17980f['length'],_0x2c756a[_0x1af092(0x182)]]),useInput(async(_0x344cc8,_0x5de545)=>{const _0x1fac2c=_0x1af092;if(_0x4f4d30==='selecting'){if(_0x5de545[_0x1fac2c(0x17d)]){_0x5bd34c(_0x4a9c38=>_0x4a9c38>0x0?_0x4a9c38-0x1:_0x17980f[_0x1fac2c(0x182)]-0x1);return;}if(_0x5de545[_0x1fac2c(0x1b4)]){_0x5bd34c(_0x3426cd=>_0x3426cd<_0x17980f[_0x1fac2c(0x182)]-0x1?_0x3426cd+0x1:0x0);return;}if(_0x344cc8==='\x20'){_0x3a1e52(_0x1a9ddd=>{const _0x72655d=_0x1fac2c,_0x3b479a=new Set(_0x1a9ddd);return _0x3b479a['has'](_0x3c76ef)?_0x3b479a[_0x72655d(0x193)](_0x3c76ef):_0x3b479a[_0x72655d(0x1a7)](_0x3c76ef),_0x3b479a;});return;}if(_0x344cc8==='a'||_0x344cc8==='A'){const _0x1f20b2=new Set(_0x17980f[_0x1fac2c(0x186)]((_0x3d9977,_0x2f0bef)=>_0x2f0bef));_0x3a1e52(_0x1f20b2);return;}if(_0x344cc8==='i'||_0x344cc8==='I'||_0x344cc8==='r'||_0x344cc8==='R'){_0x3a1e52(_0xf5c5f=>{const _0xe99b4d=_0x1fac2c,_0x3cfc3b=new Set();for(let _0x1c201e=0x0;_0x1c201e<_0x17980f[_0xe99b4d(0x182)];_0x1c201e++){!_0xf5c5f[_0xe99b4d(0x1ae)](_0x1c201e)&&_0x3cfc3b[_0xe99b4d(0x1a7)](_0x1c201e);}return _0x3cfc3b;});return;}if(_0x344cc8==='q'||_0x344cc8==='Q'){_0x4d472c();return;}if(_0x5de545['return']){if(_0x2ce0b5[_0x1fac2c(0x1be)]===0x0){_0x1a8b7f(_0x44eb3d('appMenu.sync.error.noMenuSelected'));return;}const _0x1d7f60=_0x17980f['filter']((_0x1e43a5,_0x308c8b)=>_0x2ce0b5[_0x1fac2c(0x1ae)](_0x308c8b)),_0x1f1be0=_0x1d7f60[_0x1fac2c(0x186)](_0x4179fc=>_0x4179fc['label'])['join'](',\x20');_0x4a5917([{'label':_0x44eb3d(_0x1fac2c(0x18c)),'value':_0x44eb3d(_0x1fac2c(0x1ac),{'count':_0x2ce0b5[_0x1fac2c(0x1be)]})}]),_0x1a8b7f(''),_0x3a26cc(_0x1fac2c(0x18e));return;}return;}if(_0x4f4d30===_0x1fac2c(0x18e)){if(_0x5de545[_0x1fac2c(0x1a2)]){const _0x31d6c4=_0x119f41[_0x1fac2c(0x1b3)]();if(_0x31d6c4==='')return;if(!isValidJsHttpsUrl(_0x31d6c4)){_0x1a8b7f(_0x44eb3d('appMenu.sync.error.invalidJsUrl'));return;}if(!await isUrlReachable(_0x31d6c4)){_0x1a8b7f(_0x44eb3d('appMenu.sync.error.jsUrlUnreachable'));return;}_0x8011cf(_0x31d6c4),_0x4a5917(_0x5da337=>[..._0x5da337,{'label':_0x44eb3d(_0x1fac2c(0x188)),'value':_0x31d6c4}]),_0x3e0d48(''),_0x1a8b7f(''),_0x3a26cc('input-css');return;}if(_0x5de545[_0x1fac2c(0x187)]||_0x5de545[_0x1fac2c(0x193)]){_0x3e0d48(_0x56a022=>_0x56a022[_0x1fac2c(0x1aa)](0x0,-0x1)),_0x1a8b7f('');return;}_0x3e0d48(_0x5cdad8=>_0x5cdad8+_0x344cc8);return;}if(_0x4f4d30===_0x1fac2c(0x1b2)){if(_0x5de545[_0x1fac2c(0x1a2)]){const _0x282ae0=_0x119f41[_0x1fac2c(0x1b3)]();if(_0x282ae0==='')return;if(!isValidCssHttpsUrl(_0x282ae0)){_0x1a8b7f(_0x44eb3d(_0x1fac2c(0x18b)));return;}if(!await isUrlReachable(_0x282ae0)){_0x1a8b7f(_0x44eb3d(_0x1fac2c(0x191)));return;}_0xfd9722(_0x282ae0),_0x4a5917(_0x1ab708=>[..._0x1ab708,{'label':_0x44eb3d(_0x1fac2c(0x19a)),'value':_0x282ae0}]),_0x3e0d48(''),_0x1a8b7f(''),_0x3a26cc(_0x1fac2c(0x18f));const _0x5b79dc=_0x17980f[_0x1fac2c(0x1a6)]((_0x3f0cdb,_0x16c799)=>_0x2ce0b5[_0x1fac2c(0x1ae)](_0x16c799));createMenus(_0x5b79dc,[_0x154318,_0x282ae0])[_0x1fac2c(0x196)](()=>{const _0x499787=_0x1fac2c;_0x3a26cc(_0x499787(0x190)),setTimeout(()=>{_0x4d472c();},0x3e8);})['catch'](_0x305dca=>{const _0x46a4b7=_0x1fac2c;_0x1a8b7f(_0x305dca[_0x46a4b7(0x17f)]||_0x44eb3d('appMenu.sync.error.createMenuFailed')),_0x3a26cc(_0x46a4b7(0x183));});return;}if(_0x5de545[_0x1fac2c(0x187)]||_0x5de545[_0x1fac2c(0x193)]){_0x3e0d48(_0x3e5373=>_0x3e5373[_0x1fac2c(0x1aa)](0x0,-0x1)),_0x1a8b7f('');return;}_0x3e0d48(_0x3d75ba=>_0x3d75ba+_0x344cc8);return;}});if(_0x141359)return a9_0x51d38f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a9_0x3d93b7(Text,{'children':'\x20\x20'}),a9_0x3d93b7(a9_0x22da00,{'type':'dots'}),a9_0x3d93b7(Text,{'children':_0x44eb3d(_0x1af092(0x1a3))})]});if(_0x3478f3)return a9_0x51d38f(Box,{'flexDirection':_0x1af092(0x195),'marginTop':0x1,'marginBottom':0x1,'children':[a9_0x51d38f(Text,{'color':'red','children':['✗\x20',_0x3478f3]}),a9_0x51d38f(Box,{'marginTop':0x1,'children':[a9_0x3d93b7(Text,{'color':_0x1af092(0x199),'children':_0x44eb3d(_0x1af092(0x1af))}),a9_0x3d93b7(Text,{'color':_0x1af092(0x19f),'children':_0x1af092(0x19c)}),a9_0x3d93b7(Text,{'color':'gray','children':_0x44eb3d('appMenu.sync.error.authHint.suffix')})]})]});if(_0x17980f['length']===0x0)return a9_0x3d93b7(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a9_0x3d93b7(Text,{'color':_0x1af092(0x1ad),'children':_0x44eb3d('appMenu.sync.error.noLocalPages')})});return a9_0x51d38f(Box,{'flexDirection':_0x1af092(0x195),'marginTop':0x1,'marginBottom':0x1,'children':[_0x4f4d30===_0x1af092(0x183)&&a9_0x51d38f(a9_0x439252,{'children':[a9_0x51d38f(Box,{'children':[a9_0x51d38f(Text,{'bold':!![],'children':['\x20\x20',_0x3212ac,getRemainingSpaces(_0x1697c7,_0x3212ac)]}),a9_0x51d38f(Text,{'bold':!![],'children':[_0x44eb3d('appMenu.sync.table.local'),getRemainingSpaces(_0x5b68e4,_0x3212ac)]}),a9_0x51d38f(Text,{'bold':!![],'children':[_0x44eb3d('appMenu.sync.table.lovrabetPlatform'),getRemainingSpaces(_0x5b68e4,_0x3212ac)]})]}),_0x57aee5['map'](_0x8ff2af=>a9_0x51d38f(Box,{'children':[a9_0x51d38f(Text,{'children':['\x20\x20',_0x8ff2af[_0x1af092(0x1ab)],getRemainingSpaces(_0x1697c7,_0x8ff2af['label'])]}),a9_0x51d38f(Text,{'color':'green','children':[_0x8ff2af[_0x1af092(0x19e)]?'✓':'✗',getRemainingSpaces(_0x5b68e4,'✓')]}),a9_0x51d38f(Text,{'color':_0x8ff2af[_0x1af092(0x1b1)]?'green':'red','children':[_0x8ff2af[_0x1af092(0x1b1)]?'✓':'✗',getRemainingSpaces(_0x5b68e4,'✓')]})]},_0x8ff2af[_0x1af092(0x1a9)]))]}),_0x4f4d30===_0x1af092(0x183)&&_0x1ee030['length']===0x0&&a9_0x3d93b7(Box,{'marginTop':0x1,'children':a9_0x3d93b7(Text,{'color':'cyan','children':_0x44eb3d(_0x1af092(0x1b8))})}),_0x1ee030[_0x1af092(0x186)]((_0x124294,_0x46239a)=>a9_0x51d38f(Box,{'children':[a9_0x51d38f(Text,{'color':_0x1af092(0x1bf),'children':['√\x20',_0x124294['label'],':\x20']}),a9_0x3d93b7(Text,{'color':_0x1af092(0x19f),'children':_0x124294[_0x1af092(0x1b5)]})]},_0x46239a)),_0x2ddbc7&&_0x4f4d30===_0x1af092(0x183)&&a9_0x3d93b7(Box,{'marginTop':0x1,'children':a9_0x51d38f(Text,{'color':_0x1af092(0x184),'children':['✗\x20',_0x2ddbc7]})}),_0x4f4d30===_0x1af092(0x183)&&a9_0x3d93b7(a9_0x439252,{'children':a9_0x51d38f(Box,{'marginTop':_0x1ee030[_0x1af092(0x182)]>0x0||_0x2ddbc7?0x1:0x0,'flexDirection':_0x1af092(0x195),'children':[a9_0x3d93b7(Text,{'bold':!![],'children':_0x44eb3d(_0x1af092(0x1ba))}),_0x17980f[_0x1af092(0x186)]((_0xf3f0b8,_0x238986)=>{const _0x182f72=_0x1af092,_0x4467cb=_0x3c76ef===_0x238986,_0x36630a=_0x2ce0b5[_0x182f72(0x1ae)](_0x238986),_0x252193=_0x2c756a[_0x182f72(0x1b0)](_0xf3f0b8[_0x182f72(0x1a9)]),_0x265985=_0x252193?_0x44eb3d(_0x182f72(0x1c0)):_0x44eb3d(_0x182f72(0x189));return a9_0x3d93b7(Box,{'children':a9_0x51d38f(Text,{'backgroundColor':_0x4467cb?_0x182f72(0x18a):undefined,'color':_0x4467cb?_0x182f72(0x19d):undefined,'children':['\x20\x20',_0x36630a?_0x182f72(0x194):_0x182f72(0x1bd),'\x20',_0xf3f0b8[_0x182f72(0x1ab)]]})},_0xf3f0b8['path']);}),a9_0x3d93b7(Box,{'marginTop':0x1,'children':a9_0x51d38f(Text,{'color':_0x1af092(0x199),'children':['\x20',_0x44eb3d('appMenu.sync.hotkeys')]})})]})}),_0x4f4d30==='input-js'&&a9_0x51d38f(a9_0x439252,{'children':[a9_0x51d38f(Box,{'children':[a9_0x3d93b7(Text,{'children':_0x44eb3d(_0x1af092(0x1a0))}),a9_0x3d93b7(Text,{'color':_0x1af092(0x1bf),'children':_0x119f41}),_0x2ddbc7&&a9_0x51d38f(Text,{'color':_0x1af092(0x184),'children':[_0x1af092(0x192),_0x2ddbc7]})]}),!_0x2ddbc7&&a9_0x3d93b7(Box,{'children':a9_0x3d93b7(Text,{'color':'gray','children':_0x44eb3d('appMenu.sync.input.jsUrl.placeholder')})})]}),_0x4f4d30===_0x1af092(0x1b2)&&a9_0x51d38f(a9_0x439252,{'children':[a9_0x51d38f(Box,{'children':[a9_0x3d93b7(Text,{'children':_0x44eb3d(_0x1af092(0x181))}),a9_0x3d93b7(Text,{'color':_0x1af092(0x1bf),'children':_0x119f41}),_0x2ddbc7&&a9_0x51d38f(Text,{'color':_0x1af092(0x184),'children':[_0x1af092(0x192),_0x2ddbc7]})]}),!_0x2ddbc7&&a9_0x3d93b7(Box,{'children':a9_0x3d93b7(Text,{'color':'gray','children':_0x44eb3d(_0x1af092(0x1a5))})})]}),_0x4f4d30===_0x1af092(0x18f)&&a9_0x3d93b7(Box,{'children':a9_0x3d93b7(Text,{'children':_0x44eb3d('appMenu.sync.step.creating')})}),_0x4f4d30===_0x1af092(0x190)&&a9_0x3d93b7(Box,{'children':a9_0x3d93b7(Text,{'color':'green','children':_0x44eb3d(_0x1af092(0x197))})})]});}function a9_0x80f1(){const _0x23482e=['red','test','map','backspace','appMenu.sync.step.jsUrl','appMenu.sync.operation.create','blue','appMenu.sync.error.invalidCssUrl','appMenu.sync.step.selectedMenus','96UaMkXf','input-js','creating','done','appMenu.sync.error.cssUrlUnreachable','\x20←\x20','delete','[✓]','column','then','appMenu.sync.step.completed','27185OkRjwh','gray','appMenu.sync.step.cssUrl','1425208vmCjzm','lovrabet\x20auth','white','local','cyan','appMenu.sync.input.jsUrl.label','50652touhqZ','return','appMenu.sync.loading.fetchingMenuList','130uuJDFx','appMenu.sync.input.cssUrl.placeholder','filter','add','join','path','slice','label','appMenu.sync.step.selectedMenusCount','yellow','has','appMenu.sync.error.authHint.prefix','includes','online','input-css','trim','downArrow','value','3748230LHbDlW','565mBxAqK','appMenu.sync.title','repeat','appMenu.sync.step.selectMenus','appMenu.sync.table.menuName','3301004bcrzQS','[\x20]','size','green','appMenu.sync.operation.update','upArrow','1667916RzngEI','message','fill','appMenu.sync.input.cssUrl.label','length','selecting'];a9_0x80f1=function(){return _0x23482e;};return a9_0x80f1();}function getStringWidth(_0x1e8a0b){const _0x40a881=a9_0x1a1c;let _0xe528f1=0x0;for(const _0x48df23 of _0x1e8a0b){/[\u4e00-\u9fa5]/[_0x40a881(0x185)](_0x48df23)?_0xe528f1+=0x2:_0xe528f1+=0x1;}return _0xe528f1;}function getRemainingSpaces(_0x2a1f84,_0x1c0c40){const _0x1d5a47=a9_0x1a1c,_0x1de647=getStringWidth(_0x1c0c40);return Array(Math['max'](0x0,_0x2a1f84-_0x1de647))[_0x1d5a47(0x180)]('\x20')[_0x1d5a47(0x1a8)]('');}function getMaxWidth(_0x56a739,_0x9bd844=0x2){const _0xd71d9d=a9_0x1a1c;let _0x4219c5='',_0x58bf84=0x0;for(const _0x388d52 of _0x56a739){const _0x497662=getStringWidth(_0x388d52);_0x497662>_0x58bf84&&(_0x58bf84=_0x497662,_0x4219c5=_0x388d52);}return _0x4219c5+'\x20'[_0xd71d9d(0x1b9)](_0x9bd844);}
@@ -1 +1 @@
1
- (function(_0x1313d0,_0x229e71){const _0x94c50=a13_0x2a23,_0x385627=_0x1313d0();while(!![]){try{const _0x372554=-parseInt(_0x94c50(0xf9))/0x1*(parseInt(_0x94c50(0xe8))/0x2)+-parseInt(_0x94c50(0x107))/0x3*(parseInt(_0x94c50(0xeb))/0x4)+parseInt(_0x94c50(0xee))/0x5*(-parseInt(_0x94c50(0x105))/0x6)+-parseInt(_0x94c50(0xfd))/0x7*(parseInt(_0x94c50(0xe9))/0x8)+-parseInt(_0x94c50(0x103))/0x9*(parseInt(_0x94c50(0x101))/0xa)+-parseInt(_0x94c50(0xf7))/0xb+parseInt(_0x94c50(0xff))/0xc;if(_0x372554===_0x229e71)break;else _0x385627['push'](_0x385627['shift']());}catch(_0xa44495){_0x385627['push'](_0x385627['shift']());}}}(a13_0xabb5,0xf372e));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a13_0xabb5(){const _0x2e5266=['import','success','status','POST','errorMsg','0011','正在创建菜单:\x20','1595578fWyLod','128euMFAA','map','8ATvmps','label','log','47520tgKebx','appcode','info','!\x20请使用以下方式之一:','application/json','菜单创建成功:\x20','errorCode','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','error','18005218TNWlMq','开始批量创建菜单,共\x20','2XUHNIu','未提供应用AppCode,且配置中也没有默认值','includes','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','547575TryVVZ','/smartapi/menu/create','95694828uXDlCc','create-menu','10zWKDST','path','1878543YNryNt','创建菜单失败,HTTP状态码:\x20','888aXrPNw','procode','1317102ORADjv','length','创建菜单成功:','未知错误','resources','json','stringify','data','create-menus','创建菜单失败:\x20'];a13_0xabb5=function(){return _0x2e5266;};return a13_0xabb5();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();function a13_0x2a23(_0x51e5a3,_0x26d9d3){_0x51e5a3=_0x51e5a3-0xe7;const _0xabb53d=a13_0xabb5();let _0x2a2396=_0xabb53d[_0x51e5a3];return _0x2a2396;}export async function createMenu(_0x128def){const _0x3ade28=a13_0x2a23,_0x511c82=config?.[_0x3ade28(0xef)];if(!_0x511c82){const _0x1ff749=_0x3ade28(0xfa);logger['error'](_0x3ade28(0x100),_0x1ff749),console[_0x3ade28(0xf6)]('×\x20'+_0x1ff749),console[_0x3ade28(0xed)]('!\x20请使用以下方式之一:'),console[_0x3ade28(0xed)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log']('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger['info']('create-menu',_0x3ade28(0xe7)+_0x128def[_0x3ade28(0xec)]+'\x20('+_0x128def[_0x3ade28(0x102)]+')');const _0x1af9d6={'appCode':_0x511c82,'type':_0x3ade28(0x106),'sort':0x0,'extend':{'loadScriptMode':_0x3ade28(0x111),'resources':_0x128def[_0x3ade28(0x10b)]?JSON['stringify'](_0x128def[_0x3ade28(0x10b)]):undefined},..._0x128def},_0x2e473d=await fetch(getApiDomain()+_0x3ade28(0xfe),{'method':_0x3ade28(0x114),'body':JSON[_0x3ade28(0x10d)](_0x1af9d6),'headers':{'Content-Type':_0x3ade28(0xf2),'Cookie':getCookie()}});if(!_0x2e473d['ok']){if(_0x2e473d['status']===0x191){const _0x457545=_0x3ade28(0xfc);logger[_0x3ade28(0xf6)]('create-menu',_0x457545,{'status':_0x2e473d[_0x3ade28(0x113)],'menu':_0x128def['label']});throw new Error(_0x457545);}const _0x1b00d2='创建菜单失败,HTTP状态码:\x20'+_0x2e473d[_0x3ade28(0x113)];logger[_0x3ade28(0xf6)](_0x3ade28(0x100),_0x1b00d2,{'menu':_0x128def[_0x3ade28(0xec)]});throw new Error(_0x1b00d2);}const _0x5a908f=await _0x2e473d[_0x3ade28(0x10c)]();if(!_0x5a908f['success']){const _0x21f570=_0x3ade28(0x110)+(_0x5a908f['errorMsg']||_0x3ade28(0x10a));logger[_0x3ade28(0xf6)](_0x3ade28(0x100),_0x21f570,{'errorCode':_0x5a908f[_0x3ade28(0xf4)],'errorMsg':_0x5a908f[_0x3ade28(0x115)],'menu':_0x128def[_0x3ade28(0xec)]});throw new Error(_0x21f570);}logger[_0x3ade28(0xf0)](_0x3ade28(0x100),_0x3ade28(0xf3)+_0x128def[_0x3ade28(0xec)],_0x5a908f[_0x3ade28(0x10e)]),console[_0x3ade28(0xed)](_0x3ade28(0x109),_0x5a908f[_0x3ade28(0x10e)]);}async function _createMenu(_0x3468c1,_0x31bc87){const _0x5828cb=a13_0x2a23,_0x1901df=config?.['appcode'];if(!_0x1901df){const _0x5e1225=_0x5828cb(0xfa);logger[_0x5828cb(0xf6)]('create-menu',_0x5e1225),console[_0x5828cb(0xf6)]('×\x20'+_0x5e1225),console['log'](_0x5828cb(0xf1)),console[_0x5828cb(0xed)](_0x5828cb(0xf5)),console[_0x5828cb(0xed)]('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}const _0x502488={'appCode':_0x1901df,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x5828cb(0x111),'resources':_0x31bc87?JSON['stringify'](_0x31bc87):undefined},'label':_0x3468c1[_0x5828cb(0xec)],'path':_0x3468c1[_0x5828cb(0x102)]},_0x19d3d8=await fetch(getApiDomain()+_0x5828cb(0xfe),{'method':'POST','body':JSON[_0x5828cb(0x10d)](_0x502488),'headers':{'Content-Type':_0x5828cb(0xf2),'Cookie':getCookie()}});if(!_0x19d3d8['ok']){if(_0x19d3d8[_0x5828cb(0x113)]===0x191){const _0x6704b9=_0x5828cb(0xfc);logger['error'](_0x5828cb(0x100),_0x6704b9,{'status':_0x19d3d8[_0x5828cb(0x113)],'menu':_0x3468c1[_0x5828cb(0xec)]});throw new Error(_0x6704b9);}const _0x328f42=_0x5828cb(0x104)+_0x19d3d8['status'];logger[_0x5828cb(0xf6)](_0x5828cb(0x100),_0x328f42,{'menu':_0x3468c1['label']});throw new Error(_0x328f42);}const _0x24e3ad=await _0x19d3d8[_0x5828cb(0x10c)]();if(!_0x24e3ad[_0x5828cb(0x112)]){if(_0x24e3ad[_0x5828cb(0xf4)]===_0x5828cb(0x116)||_0x24e3ad['errorMsg']?.[_0x5828cb(0xfb)]('登录')){const _0x4dff80='登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录';logger['error'](_0x5828cb(0x100),_0x4dff80,{'errorCode':_0x24e3ad[_0x5828cb(0xf4)],'errorMsg':_0x24e3ad[_0x5828cb(0x115)],'menu':_0x3468c1[_0x5828cb(0xec)]});throw new Error(_0x4dff80);}const _0x244163='创建菜单失败:\x20'+(_0x24e3ad[_0x5828cb(0x115)]||_0x5828cb(0x10a));logger[_0x5828cb(0xf6)]('create-menu',_0x244163,{'errorCode':_0x24e3ad['errorCode'],'errorMsg':_0x24e3ad['errorMsg'],'menu':_0x3468c1[_0x5828cb(0xec)]});throw new Error(_0x244163);}logger['info'](_0x5828cb(0x100),_0x5828cb(0xf3)+_0x3468c1[_0x5828cb(0xec)]);}export async function createMenus(_0x1bb93e,_0x12b0f8){const _0x44a64b=a13_0x2a23;logger[_0x44a64b(0xf0)](_0x44a64b(0x10f),_0x44a64b(0xf8)+_0x1bb93e[_0x44a64b(0x108)]+'\x20个'),await Promise['all'](_0x1bb93e[_0x44a64b(0xea)](async _0x23fb5a=>{await _createMenu(_0x23fb5a,_0x12b0f8);})),logger[_0x44a64b(0xf0)](_0x44a64b(0x10f),'批量创建菜单完成,共\x20'+_0x1bb93e[_0x44a64b(0x108)]+'\x20个');}
1
+ (function(_0xf70ea8,_0x3a9555){const _0x2e0d8b=a10_0x5927,_0x9670fa=_0xf70ea8();while(!![]){try{const _0x42080=-parseInt(_0x2e0d8b(0xe6))/0x1*(-parseInt(_0x2e0d8b(0xd3))/0x2)+parseInt(_0x2e0d8b(0xf3))/0x3*(-parseInt(_0x2e0d8b(0xdc))/0x4)+-parseInt(_0x2e0d8b(0xda))/0x5+-parseInt(_0x2e0d8b(0xd6))/0x6+parseInt(_0x2e0d8b(0xf7))/0x7+parseInt(_0x2e0d8b(0xd0))/0x8+parseInt(_0x2e0d8b(0xd5))/0x9*(parseInt(_0x2e0d8b(0xcb))/0xa);if(_0x42080===_0x3a9555)break;else _0x9670fa['push'](_0x9670fa['shift']());}catch(_0x816206){_0x9670fa['push'](_0x9670fa['shift']());}}}(a10_0x16c8,0x85278));function a10_0x16c8(){const _0x4b5db9=['appcode','common.error','430LeJBYM','POST','9SiRcJe','5788176lLFvNX','appMenu.error.createFailed','0011','all','1165295SCVwyD','resources','1864MgIUZz','error','stringify','appMenu.success.created','procode','info','appMenu.error.createHttpStatus','appMenu.error.appCodeHint.option2','appMenu.error.authExpired','log','571pdTfrO','import','status','data','map','length','label','includes','appMenu.error.authValidationFailed','errorMsg','appMenu.error.appCodeHint.title','path','appMenu.error.missingAppCode','1821vrkPvd','application/json','errorCode','create-menus','2580431ZTbwrP','create-menu','4852520fospuF','appMenu.error.appCodeHint.option1','/smartapi/menu/create','appMenu.creating.batch.completed','success','8394936IyDMcw'];a10_0x16c8=function(){return _0x4b5db9;};return a10_0x16c8();}import{getCookie}from'../auth/get-cookie.js';function a10_0x5927(_0x3d512b,_0x396210){_0x3d512b=_0x3d512b-0xca;const _0x16c825=a10_0x16c8();let _0x592759=_0x16c825[_0x3d512b];return _0x592759;}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import a10_0xad3309 from'../i18n/index.js';const config=readConfig(),t=a10_0xad3309['t']['bind'](a10_0xad3309);export async function createMenu(_0x2e4dd8){const _0x4028d3=a10_0x5927,_0x37b6e5=config?.[_0x4028d3(0xd1)];if(!_0x37b6e5){const _0x445601=t(_0x4028d3(0xf2));logger[_0x4028d3(0xdd)](_0x4028d3(0xca),_0x445601),console['error']('×\x20'+_0x445601),console['log'](t(_0x4028d3(0xf0))),console[_0x4028d3(0xe5)](t(_0x4028d3(0xcc))),console['log'](t(_0x4028d3(0xe3)));return;}logger[_0x4028d3(0xe1)](_0x4028d3(0xca),t('appMenu.creating.single',{'label':_0x2e4dd8[_0x4028d3(0xec)],'path':_0x2e4dd8[_0x4028d3(0xf1)]}));const _0x491073={'appCode':_0x37b6e5,'type':_0x4028d3(0xe0),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x2e4dd8[_0x4028d3(0xdb)]?JSON['stringify'](_0x2e4dd8[_0x4028d3(0xdb)]):undefined},..._0x2e4dd8},_0x4fa67d=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':'POST','body':JSON[_0x4028d3(0xde)](_0x491073),'headers':{'Content-Type':_0x4028d3(0xf4),'Cookie':getCookie()}});if(!_0x4fa67d['ok']){if(_0x4fa67d[_0x4028d3(0xe8)]===0x191){const _0xd1f257=t(_0x4028d3(0xe4));logger[_0x4028d3(0xdd)](_0x4028d3(0xca),_0xd1f257,{'status':_0x4fa67d[_0x4028d3(0xe8)],'menu':_0x2e4dd8[_0x4028d3(0xec)]});throw new Error(_0xd1f257);}const _0xbc9230=t('appMenu.error.createHttpStatus',{'status':_0x4fa67d['status']});logger[_0x4028d3(0xdd)](_0x4028d3(0xca),_0xbc9230,{'menu':_0x2e4dd8[_0x4028d3(0xec)]});throw new Error(_0xbc9230);}const _0x435ac6=await _0x4fa67d['json']();if(!_0x435ac6[_0x4028d3(0xcf)]){const _0x1f0e33=t(_0x4028d3(0xd7),{'error':_0x435ac6['errorMsg']||t(_0x4028d3(0xd2))});logger[_0x4028d3(0xdd)]('create-menu',_0x1f0e33,{'errorCode':_0x435ac6[_0x4028d3(0xf5)],'errorMsg':_0x435ac6[_0x4028d3(0xef)],'menu':_0x2e4dd8['label']});throw new Error(_0x1f0e33);}logger[_0x4028d3(0xe1)](_0x4028d3(0xca),''+t('appMenu.success.created')+_0x2e4dd8[_0x4028d3(0xec)],_0x435ac6['data']),console[_0x4028d3(0xe5)](t(_0x4028d3(0xdf)),_0x435ac6[_0x4028d3(0xe9)]);}async function _createMenu(_0x35278b,_0x4cb089){const _0xbb77a2=a10_0x5927,_0x51fa13=config?.[_0xbb77a2(0xd1)];if(!_0x51fa13){const _0x207ca1=t(_0xbb77a2(0xf2));logger[_0xbb77a2(0xdd)]('create-menu',_0x207ca1),console[_0xbb77a2(0xdd)]('×\x20'+_0x207ca1),console[_0xbb77a2(0xe5)](t('appMenu.error.appCodeHint.title')),console[_0xbb77a2(0xe5)](t(_0xbb77a2(0xcc))),console[_0xbb77a2(0xe5)](t(_0xbb77a2(0xe3)));return;}const _0x2b58={'appCode':_0x51fa13,'type':_0xbb77a2(0xe0),'sort':0x0,'extend':{'loadScriptMode':_0xbb77a2(0xe7),'resources':_0x4cb089?JSON['stringify'](_0x4cb089):undefined},'label':_0x35278b[_0xbb77a2(0xec)],'path':_0x35278b[_0xbb77a2(0xf1)]},_0x3d2f2b=await fetch(getApiDomain()+_0xbb77a2(0xcd),{'method':_0xbb77a2(0xd4),'body':JSON[_0xbb77a2(0xde)](_0x2b58),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x3d2f2b['ok']){if(_0x3d2f2b[_0xbb77a2(0xe8)]===0x191){const _0x320bd3=t('appMenu.error.authExpired');logger[_0xbb77a2(0xdd)](_0xbb77a2(0xca),_0x320bd3,{'status':_0x3d2f2b[_0xbb77a2(0xe8)],'menu':_0x35278b['label']});throw new Error(_0x320bd3);}const _0x1555d3=t(_0xbb77a2(0xe2),{'status':_0x3d2f2b[_0xbb77a2(0xe8)]});logger['error']('create-menu',_0x1555d3,{'menu':_0x35278b[_0xbb77a2(0xec)]});throw new Error(_0x1555d3);}const _0x164f1f=await _0x3d2f2b['json']();if(!_0x164f1f['success']){if(_0x164f1f['errorCode']===_0xbb77a2(0xd8)||_0x164f1f[_0xbb77a2(0xef)]?.[_0xbb77a2(0xed)]('登录')){const _0x2b7d48=t(_0xbb77a2(0xee));logger[_0xbb77a2(0xdd)]('create-menu',_0x2b7d48,{'errorCode':_0x164f1f['errorCode'],'errorMsg':_0x164f1f['errorMsg'],'menu':_0x35278b[_0xbb77a2(0xec)]});throw new Error(_0x2b7d48);}const _0x1a5413=t(_0xbb77a2(0xd7),{'error':_0x164f1f[_0xbb77a2(0xef)]||t('common.error')});logger['error']('create-menu',_0x1a5413,{'errorCode':_0x164f1f[_0xbb77a2(0xf5)],'errorMsg':_0x164f1f[_0xbb77a2(0xef)],'menu':_0x35278b[_0xbb77a2(0xec)]});throw new Error(_0x1a5413);}logger[_0xbb77a2(0xe1)](_0xbb77a2(0xca),''+t('appMenu.success.created')+_0x35278b[_0xbb77a2(0xec)]);}export async function createMenus(_0x290155,_0x546ad6){const _0x19b777=a10_0x5927;logger[_0x19b777(0xe1)](_0x19b777(0xf6),t('appMenu.creating.batch.start',{'count':_0x290155[_0x19b777(0xeb)]})),await Promise[_0x19b777(0xd9)](_0x290155[_0x19b777(0xea)](async _0x335b4b=>{await _createMenu(_0x335b4b,_0x546ad6);})),logger[_0x19b777(0xe1)](_0x19b777(0xf6),t(_0x19b777(0xce),{'count':_0x290155['length']}));}
@@ -1 +1 @@
1
- const a14_0x556edc=a14_0x9dc9;(function(_0x51f2cb,_0xcedc52){const _0x48cc26=a14_0x9dc9,_0x186ba1=_0x51f2cb();while(!![]){try{const _0x8f6556=parseInt(_0x48cc26(0x1ad))/0x1+-parseInt(_0x48cc26(0x19d))/0x2*(parseInt(_0x48cc26(0x1ab))/0x3)+-parseInt(_0x48cc26(0x198))/0x4+parseInt(_0x48cc26(0x1a0))/0x5*(parseInt(_0x48cc26(0x1a3))/0x6)+parseInt(_0x48cc26(0x1a8))/0x7*(-parseInt(_0x48cc26(0x1a5))/0x8)+parseInt(_0x48cc26(0x19c))/0x9*(-parseInt(_0x48cc26(0x1aa))/0xa)+parseInt(_0x48cc26(0x19a))/0xb;if(_0x8f6556===_0xcedc52)break;else _0x186ba1['push'](_0x186ba1['shift']());}catch(_0x1a800e){_0x186ba1['push'](_0x186ba1['shift']());}}}(a14_0x5e6f,0x1f8d5));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0x556edc(0x1a9)](),a14_0x556edc(0x1a4));function a14_0x5e6f(){const _0x4e3f0f=['7dGFXMU','cwd','908130rqyCAq','9096lJHocm','match','125613HVBQuD','forEach','endsWith','index.tsx','utf-8','.tsx','42260CmFcwL','concat','2093355Nprayb','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','9ErGqqy','124uIQiel','filter','slice','10kgEVMC','trim','push','516030gKusfr','src/pages','554632SODsXB','replace','isDirectory'];a14_0x5e6f=function(){return _0x4e3f0f;};return a14_0x5e6f();}export function extractTitleFromComment(_0x162a68){const _0x42b61f=a14_0x556edc;try{const _0x1f755f=readFileSync(_0x162a68,_0x42b61f(0x196)),_0xb56fe7=_0x1f755f['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0xb56fe7&&_0xb56fe7[0x1]){const _0x397422=_0xb56fe7[0x1],_0x3d9ca0=_0x397422[_0x42b61f(0x1ac)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x3d9ca0&&_0x3d9ca0[0x1])return _0x3d9ca0[0x1][_0x42b61f(0x1a1)]();}let _0x56994b=null;const _0x1b85d7=_0x1f755f[_0x42b61f(0x1ac)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x1b85d7&&_0x1b85d7[0x1]&&(_0x56994b=_0x1b85d7[0x1]);if(!_0x56994b){const _0x38343c=_0x1f755f[_0x42b61f(0x1ac)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x38343c&&_0x38343c[0x1]&&(_0x56994b=_0x38343c[0x1]);}if(_0x56994b){const _0x231797=new RegExp('\x5cb'+_0x56994b+_0x42b61f(0x19b)),_0x3f7e71=_0x1f755f[_0x42b61f(0x1ac)](_0x231797);if(_0x3f7e71&&_0x3f7e71[0x1])return _0x3f7e71[0x1];return _0x56994b;}return null;}catch(_0x2ebcfb){return null;}}function a14_0x9dc9(_0x3f64bd,_0x595368){_0x3f64bd=_0x3f64bd-0x195;const _0x5e6fb1=a14_0x5e6f();let _0x9dc9ae=_0x5e6fb1[_0x3f64bd];return _0x9dc9ae;}export function getLocalPages(_0x37fcae=pagesDir,_0x208351=pagesDir){const _0x3ea307=a14_0x556edc;let _0x3765a0=[];const _0x52a68f=readdirSync(_0x37fcae);return _0x52a68f[_0x3ea307(0x1ae)](_0xf70468=>{const _0x42a979=_0x3ea307,_0x3167dc=join(_0x37fcae,_0xf70468),_0x445fc9=statSync(_0x3167dc);if(_0x445fc9&&_0x445fc9[_0x42a979(0x1a7)]())_0x3765a0=_0x3765a0[_0x42a979(0x199)](getLocalPages(_0x3167dc,_0x208351));else{if(_0xf70468[_0x42a979(0x1af)](_0x42a979(0x197))){let _0x533533=relative(_0x208351,_0x3167dc);_0x533533['endsWith'](_0x42a979(0x195))?_0x533533=_0x533533[_0x42a979(0x1a6)](/index\.tsx$/,''):_0x533533=_0x533533[_0x42a979(0x1a6)](/\.tsx$/,'');_0x533533['endsWith']('/')&&(_0x533533=_0x533533[_0x42a979(0x19f)](0x0,-0x1));const _0xa6fe66=extractTitleFromComment(_0x3167dc),_0x462914=_0xa6fe66||_0x533533;_0x3765a0[_0x42a979(0x1a2)]({'path':_0x533533['replaceAll']('$',':'),'label':_0x462914});}}}),_0x3765a0[_0x3ea307(0x19e)](_0x29ef0f=>_0x29ef0f['path']!=='');}
1
+ const a11_0x399931=a11_0x2bc3;(function(_0x3c7084,_0x4bb6bc){const _0x4d6e89=a11_0x2bc3,_0x51ad46=_0x3c7084();while(!![]){try{const _0x477a4e=parseInt(_0x4d6e89(0xc7))/0x1*(parseInt(_0x4d6e89(0xbf))/0x2)+parseInt(_0x4d6e89(0xca))/0x3*(parseInt(_0x4d6e89(0xc5))/0x4)+-parseInt(_0x4d6e89(0xc3))/0x5+-parseInt(_0x4d6e89(0xcb))/0x6+-parseInt(_0x4d6e89(0xc0))/0x7*(-parseInt(_0x4d6e89(0xcd))/0x8)+-parseInt(_0x4d6e89(0xd0))/0x9+parseInt(_0x4d6e89(0xcc))/0xa;if(_0x477a4e===_0x4bb6bc)break;else _0x51ad46['push'](_0x51ad46['shift']());}catch(_0x105fe6){_0x51ad46['push'](_0x51ad46['shift']());}}}(a11_0x4a53,0xd4e3b));function a11_0x2bc3(_0x2c5c30,_0x1f730d){_0x2c5c30=_0x2c5c30-0xbe;const _0x4a531a=a11_0x4a53();let _0x2bc3d3=_0x4a531a[_0x2c5c30];return _0x2bc3d3;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';function a11_0x4a53(){const _0x57a614=['slice','utf-8','5939050ovahyn','trim','20764vtViVO','forEach','620965bktNJx','endsWith','src/pages','159krObtH','6378288reBkDD','9146100GBsKhs','5546056qpEQdB','.tsx','concat','669231ctmWjv','isDirectory','match','replaceAll','cwd','replace','filter','2NcVaJe','14HFPLie'];a11_0x4a53=function(){return _0x57a614;};return a11_0x4a53();}const pagesDir=resolve(process[a11_0x399931(0xd4)](),a11_0x399931(0xc9));export function extractTitleFromComment(_0x474fcc){const _0xf3c7a=a11_0x399931;try{const _0x2b7bae=readFileSync(_0x474fcc,_0xf3c7a(0xc2)),_0x5bc195=_0x2b7bae['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x5bc195&&_0x5bc195[0x1]){const _0x4511c5=_0x5bc195[0x1],_0x143f89=_0x4511c5[_0xf3c7a(0xd2)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x143f89&&_0x143f89[0x1])return _0x143f89[0x1][_0xf3c7a(0xc4)]();}let _0x2572fc=null;const _0xf0c027=_0x2b7bae[_0xf3c7a(0xd2)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0xf0c027&&_0xf0c027[0x1]&&(_0x2572fc=_0xf0c027[0x1]);if(!_0x2572fc){const _0x99dfa2=_0x2b7bae['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x99dfa2&&_0x99dfa2[0x1]&&(_0x2572fc=_0x99dfa2[0x1]);}if(_0x2572fc){const _0x90f12a=new RegExp('\x5cb'+_0x2572fc+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x41bb14=_0x2b7bae[_0xf3c7a(0xd2)](_0x90f12a);if(_0x41bb14&&_0x41bb14[0x1])return _0x41bb14[0x1];return _0x2572fc;}return null;}catch(_0x2e1a0a){return null;}}export function getLocalPages(_0xf7d1e4=pagesDir,_0x274132=pagesDir){const _0x23f798=a11_0x399931;let _0x46ef8f=[];const _0x4f6038=readdirSync(_0xf7d1e4);return _0x4f6038[_0x23f798(0xc6)](_0x3bc705=>{const _0xb29e07=_0x23f798,_0x564129=join(_0xf7d1e4,_0x3bc705),_0x1cd036=statSync(_0x564129);if(_0x1cd036&&_0x1cd036[_0xb29e07(0xd1)]())_0x46ef8f=_0x46ef8f[_0xb29e07(0xcf)](getLocalPages(_0x564129,_0x274132));else{if(_0x3bc705['endsWith'](_0xb29e07(0xce))){let _0x3122a2=relative(_0x274132,_0x564129);_0x3122a2['endsWith']('index.tsx')?_0x3122a2=_0x3122a2[_0xb29e07(0xd5)](/index\.tsx$/,''):_0x3122a2=_0x3122a2[_0xb29e07(0xd5)](/\.tsx$/,'');_0x3122a2[_0xb29e07(0xc8)]('/')&&(_0x3122a2=_0x3122a2[_0xb29e07(0xc1)](0x0,-0x1));const _0x59225e=extractTitleFromComment(_0x564129),_0x18e4f2=_0x59225e||_0x3122a2;_0x46ef8f['push']({'path':_0x3122a2[_0xb29e07(0xd3)]('$',':'),'label':_0x18e4f2});}}}),_0x46ef8f[_0x23f798(0xbe)](_0x33e4e8=>_0x33e4e8['path']!=='');}
@@ -1 +1 @@
1
- (function(_0x551440,_0x3517e8){const _0x4eb923=a15_0x5c17,_0x6fc5bc=_0x551440();while(!![]){try{const _0x54288f=-parseInt(_0x4eb923(0x1bb))/0x1+-parseInt(_0x4eb923(0x1a0))/0x2*(-parseInt(_0x4eb923(0x1a9))/0x3)+parseInt(_0x4eb923(0x1bf))/0x4+-parseInt(_0x4eb923(0x1b3))/0x5*(parseInt(_0x4eb923(0x1a7))/0x6)+parseInt(_0x4eb923(0x1b1))/0x7*(-parseInt(_0x4eb923(0x1c9))/0x8)+-parseInt(_0x4eb923(0x1ab))/0x9*(-parseInt(_0x4eb923(0x1be))/0xa)+-parseInt(_0x4eb923(0x1c5))/0xb*(parseInt(_0x4eb923(0x1c2))/0xc);if(_0x54288f===_0x3517e8)break;else _0x6fc5bc['push'](_0x6fc5bc['shift']());}catch(_0x390976){_0x6fc5bc['push'](_0x6fc5bc['shift']());}}}(a15_0x537f,0xbfe62));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a15_0x5c17(_0x1d4768,_0x3effe4){_0x1d4768=_0x1d4768-0x1a0;const _0x537f51=a15_0x537f();let _0x5c17fd=_0x537f51[_0x1d4768];return _0x5c17fd;}function a15_0x537f(){const _0x1f0296=['online','13735206XQHLIt','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','成功获取\x20','GET','map','status','2451785DNvkPj','获取菜单列表失败:\x20','860865UcNUgi','\x20个线上菜单','resources','!\x20请使用以下方式之一:','length','get-online-menu-list','isArray','success','25979ONsEJX','children','application/json','10DDPtyn','5413252seSBPQ','parse','errorMsg','37097076OLQnHk','error','json','11EIlPNX','未知错误','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','appcode','8RgvAwl','extend','data','2yvhFci','log','正在获取线上菜单列表...\x20(appCode:\x20','push','服务端返回空菜单列表','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','label','6BctCoM','info','4639203IKsKqy'];a15_0x537f=function(){return _0x1f0296;};return a15_0x537f();}import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';const config=readConfig();export async function getOnlineMenuList(){const _0x2daaaf=a15_0x5c17,_0x18c085=config?.[_0x2daaaf(0x1c8)];if(!_0x18c085){const _0x5b1ee4='未提供应用AppCode,且配置中也没有默认值';return logger[_0x2daaaf(0x1c3)](_0x2daaaf(0x1b8),_0x5b1ee4),console['error']('×\x20'+_0x5b1ee4),console[_0x2daaaf(0x1a1)](_0x2daaaf(0x1b6)),console['log'](_0x2daaaf(0x1ac)),console['log'](_0x2daaaf(0x1a5)),[];}const _0x43cee1=getEnv();logger[_0x2daaaf(0x1a8)]('get-online-menu-list',_0x43cee1===_0x2daaaf(0x1aa)?_0x2daaaf(0x1a2)+_0x18c085+')':'正在获取日常菜单列表...\x20(appCode:\x20'+_0x18c085+')');const _0x107143=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x18c085,{'method':_0x2daaaf(0x1ae),'headers':{'Content-Type':_0x2daaaf(0x1bd),'Cookie':getCookie()}});if(!_0x107143['ok']){if(_0x107143['status']===0x191){const _0x18f09b=_0x2daaaf(0x1c7);logger[_0x2daaaf(0x1c3)](_0x2daaaf(0x1b8),_0x18f09b,{'status':_0x107143[_0x2daaaf(0x1b0)]});throw new Error(_0x18f09b);}const _0x2ea798='获取菜单列表失败,HTTP状态码:\x20'+_0x107143[_0x2daaaf(0x1b0)];logger['error'](_0x2daaaf(0x1b8),_0x2ea798);throw new Error(_0x2ea798);}const _0x1676e9=await _0x107143[_0x2daaaf(0x1c4)]();if(!_0x1676e9[_0x2daaaf(0x1ba)]){const _0xcc9c03=_0x2daaaf(0x1b2)+(_0x1676e9[_0x2daaaf(0x1c1)]||_0x2daaaf(0x1c6));logger['error']('get-online-menu-list',_0xcc9c03,{'errorCode':_0x1676e9['errorCode'],'errorMsg':_0x1676e9[_0x2daaaf(0x1c1)]});throw new Error(_0xcc9c03);}if(!_0x1676e9[_0x2daaaf(0x1cb)])return logger[_0x2daaaf(0x1a8)](_0x2daaaf(0x1b8),_0x2daaaf(0x1a4)),[];return logger[_0x2daaaf(0x1a8)](_0x2daaaf(0x1b8),_0x2daaaf(0x1ad)+_0x1676e9[_0x2daaaf(0x1cb)]['length']+_0x2daaaf(0x1b4)),_0x1676e9[_0x2daaaf(0x1cb)][_0x2daaaf(0x1af)](formatMenuList)['flat']();}function formatMenuList(_0x7e014b){const _0x2e82f3=a15_0x5c17;let _0x24521b=[];try{if(_0x7e014b[_0x2e82f3(0x1ca)]?.[_0x2e82f3(0x1b5)]){const _0x19851a=JSON[_0x2e82f3(0x1c0)](_0x7e014b['extend'][_0x2e82f3(0x1b5)]);Array[_0x2e82f3(0x1b9)](_0x19851a)&&(_0x24521b=_0x19851a);}}catch(_0x2cb002){}const _0x122e33=[{'id':_0x7e014b['id'],'path':_0x7e014b['path'],'label':_0x7e014b[_0x2e82f3(0x1a6)],'resources':_0x24521b}];if(_0x7e014b[_0x2e82f3(0x1bc)]&&_0x7e014b['children'][_0x2e82f3(0x1b7)]>0x0)for(const _0x29b261 of _0x7e014b[_0x2e82f3(0x1bc)]){_0x122e33[_0x2e82f3(0x1a3)](...formatMenuList(_0x29b261));}return _0x122e33;}
1
+ const a12_0x42f749=a12_0x6082;(function(_0x570d14,_0x1db671){const _0x320598=a12_0x6082,_0x532018=_0x570d14();while(!![]){try{const _0x399302=-parseInt(_0x320598(0x193))/0x1+parseInt(_0x320598(0x19a))/0x2*(parseInt(_0x320598(0x1a0))/0x3)+parseInt(_0x320598(0x1a5))/0x4*(parseInt(_0x320598(0x1a6))/0x5)+parseInt(_0x320598(0x1b3))/0x6*(parseInt(_0x320598(0x1a1))/0x7)+-parseInt(_0x320598(0x197))/0x8+parseInt(_0x320598(0x1b5))/0x9+-parseInt(_0x320598(0x1ac))/0xa;if(_0x399302===_0x1db671)break;else _0x532018['push'](_0x532018['shift']());}catch(_0x3d20c0){_0x532018['push'](_0x532018['shift']());}}}(a12_0x1c8a,0x1fa4d));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a12_0x6082(_0xb02c15,_0x40af3e){_0xb02c15=_0xb02c15-0x18f;const _0x1c8ae7=a12_0x1c8a();let _0x608252=_0x1c8ae7[_0xb02c15];return _0x608252;}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';import a12_0x5d85c3 from'../i18n/index.js';const config=readConfig(),t=a12_0x5d85c3['t'][a12_0x42f749(0x198)](a12_0x5d85c3);function a12_0x1c8a(){const _0x3b12f9=['bind','length','86uvrMUm','parse','json','errorMsg','resources','flat','17502sVgLcY','259483gHZxsG','/smartapi/menu/find?appCode=','error','get-online-menu-list','5412dJMkdS','835svOCig','status','appMenu.error.appCodeHint.option2','appMenu.fetching.daily','appMenu.error.httpStatus','path','1577220AtDxMA','appcode','extend','info','success','appMenu.error.appCodeHint.title','map','24jSGAyg','application/json','296577bBdNCm','log','isArray','data','children','appMenu.error.fetchFailed','211906vYXFsE','GET','appMenu.error.missingAppCode','appMenu.error.authExpired','1270408ulvEpo'];a12_0x1c8a=function(){return _0x3b12f9;};return a12_0x1c8a();}export async function getOnlineMenuList(){const _0x2ed3e1=a12_0x42f749,_0x8db55c=config?.[_0x2ed3e1(0x1ad)];if(!_0x8db55c){const _0x27cfaf=t(_0x2ed3e1(0x195));return logger['error'](_0x2ed3e1(0x1a4),_0x27cfaf),console['error']('×\x20'+_0x27cfaf),console[_0x2ed3e1(0x1b6)](t(_0x2ed3e1(0x1b1))),console['log'](t('appMenu.error.appCodeHint.option1')),console['log'](t(_0x2ed3e1(0x1a8))),[];}const _0x3762c9=getEnv();logger['info'](_0x2ed3e1(0x1a4),_0x3762c9==='online'?t('appMenu.fetching.online',{'appCode':_0x8db55c}):t(_0x2ed3e1(0x1a9),{'appCode':_0x8db55c}));const _0x40761e=await fetch(getApiDomain()+_0x2ed3e1(0x1a2)+_0x8db55c,{'method':_0x2ed3e1(0x194),'headers':{'Content-Type':_0x2ed3e1(0x1b4),'Cookie':getCookie()}});if(!_0x40761e['ok']){if(_0x40761e[_0x2ed3e1(0x1a7)]===0x191){const _0x1560f6=t(_0x2ed3e1(0x196));logger[_0x2ed3e1(0x1a3)](_0x2ed3e1(0x1a4),_0x1560f6,{'status':_0x40761e[_0x2ed3e1(0x1a7)]});throw new Error(_0x1560f6);}const _0x12340f=t(_0x2ed3e1(0x1aa),{'status':_0x40761e['status']});logger[_0x2ed3e1(0x1a3)]('get-online-menu-list',_0x12340f);throw new Error(_0x12340f);}const _0x551196=await _0x40761e[_0x2ed3e1(0x19c)]();if(!_0x551196[_0x2ed3e1(0x1b0)]){const _0x3ec234=t(_0x2ed3e1(0x192),{'error':_0x551196[_0x2ed3e1(0x19d)]||t('common.error')});logger[_0x2ed3e1(0x1a3)](_0x2ed3e1(0x1a4),_0x3ec234,{'errorCode':_0x551196['errorCode'],'errorMsg':_0x551196[_0x2ed3e1(0x19d)]});throw new Error(_0x3ec234);}if(!_0x551196[_0x2ed3e1(0x190)])return logger['info'](_0x2ed3e1(0x1a4),t('appMenu.info.emptyMenuList')),[];return logger[_0x2ed3e1(0x1af)](_0x2ed3e1(0x1a4),t('appMenu.success.fetched',{'count':_0x551196[_0x2ed3e1(0x190)][_0x2ed3e1(0x199)]})),_0x551196[_0x2ed3e1(0x190)][_0x2ed3e1(0x1b2)](formatMenuList)[_0x2ed3e1(0x19f)]();}function formatMenuList(_0x48a6cd){const _0x5d1ebc=a12_0x42f749;let _0x49748c=[];try{if(_0x48a6cd[_0x5d1ebc(0x1ae)]?.[_0x5d1ebc(0x19e)]){const _0x2e0416=JSON[_0x5d1ebc(0x19b)](_0x48a6cd['extend'][_0x5d1ebc(0x19e)]);Array[_0x5d1ebc(0x18f)](_0x2e0416)&&(_0x49748c=_0x2e0416);}}catch(_0x3b3c1f){}const _0x2d4ca9=[{'id':_0x48a6cd['id'],'path':_0x48a6cd[_0x5d1ebc(0x1ab)],'label':_0x48a6cd['label'],'resources':_0x49748c}];if(_0x48a6cd[_0x5d1ebc(0x191)]&&_0x48a6cd[_0x5d1ebc(0x191)][_0x5d1ebc(0x199)]>0x0)for(const _0x523317 of _0x48a6cd[_0x5d1ebc(0x191)]){_0x2d4ca9['push'](...formatMenuList(_0x523317));}return _0x2d4ca9;}
@@ -1 +1 @@
1
- (function(_0x259016,_0x3da913){const _0xdac444=a17_0xa2a0,_0x51526f=_0x259016();while(!![]){try{const _0x2a149b=parseInt(_0xdac444(0x1e0))/0x1+parseInt(_0xdac444(0x1e2))/0x2+-parseInt(_0xdac444(0x1e8))/0x3*(parseInt(_0xdac444(0x1e9))/0x4)+parseInt(_0xdac444(0x1e1))/0x5+parseInt(_0xdac444(0x1e3))/0x6+-parseInt(_0xdac444(0x1e6))/0x7*(parseInt(_0xdac444(0x1e7))/0x8)+-parseInt(_0xdac444(0x1df))/0x9*(-parseInt(_0xdac444(0x1e4))/0xa);if(_0x2a149b===_0x3da913)break;else _0x51526f['push'](_0x51526f['shift']());}catch(_0x106b4f){_0x51526f['push'](_0x51526f['shift']());}}}(a17_0x44fc,0x55674));import{useEffect,useState}from'react';function a17_0x44fc(){const _0xcdc1da=['693JBfpWu','12112EOGtGc','finally','catch','8676FzpzfB','166640CrsTGp','3312980oTukDi','1047342eKKsyI','1009866tLDyXy','1670ofzgyT','then','4430482cUTECo','8kUthlW'];a17_0x44fc=function(){return _0xcdc1da;};return a17_0x44fc();}import{getOnlineMenuList}from'./get-online-menu-list.js';function a17_0xa2a0(_0xa0df0,_0x36407a){_0xa0df0=_0xa0df0-0x1de;const _0x44fcd2=a17_0x44fc();let _0xa2a008=_0x44fcd2[_0xa0df0];return _0xa2a008;}export function useGetOnlineMenuList(){const [_0x1de40f,_0x7242f1]=useState([]),[_0x55cbbf,_0x5abac2]=useState(!![]),[_0x136993,_0x5cbc5f]=useState('');return useEffect(()=>{const _0x44f651=a17_0xa2a0;_0x5abac2(!![]),_0x5cbc5f(''),getOnlineMenuList()[_0x44f651(0x1e5)](_0x7242f1)[_0x44f651(0x1de)](_0x5045f4=>{_0x5cbc5f(_0x5045f4['message']||'获取菜单列表失败');})[_0x44f651(0x1ea)](()=>_0x5abac2(![]));},[]),{'menuList':_0x1de40f,'loading':_0x55cbbf,'error':_0x136993};}
1
+ const a14_0x1d16a6=a14_0x5529;(function(_0x3de8cd,_0x1fe6a2){const _0x18f9a2=a14_0x5529,_0x394739=_0x3de8cd();while(!![]){try{const _0x3b5428=-parseInt(_0x18f9a2(0x1bc))/0x1+parseInt(_0x18f9a2(0x1b5))/0x2*(parseInt(_0x18f9a2(0x1b7))/0x3)+parseInt(_0x18f9a2(0x1b3))/0x4+parseInt(_0x18f9a2(0x1b4))/0x5+-parseInt(_0x18f9a2(0x1c0))/0x6*(parseInt(_0x18f9a2(0x1bb))/0x7)+parseInt(_0x18f9a2(0x1c1))/0x8*(-parseInt(_0x18f9a2(0x1be))/0x9)+-parseInt(_0x18f9a2(0x1b9))/0xa*(-parseInt(_0x18f9a2(0x1bf))/0xb);if(_0x3b5428===_0x1fe6a2)break;else _0x394739['push'](_0x394739['shift']());}catch(_0x2b5e93){_0x394739['push'](_0x394739['shift']());}}}(a14_0x42d1,0x66ebe));import{useEffect,useState}from'react';function a14_0x42d1(){const _0x1f0d63=['4424148OBkZyy','175496ElKPIF','52768eeCRWF','197905JOchMs','172SdqIfU','then','1503BzbkNi','finally','1245730xbkBYf','common.error','7fTiNuL','73770GlBfbg','bind','198tTofKT','143GCxeKH'];a14_0x42d1=function(){return _0x1f0d63;};return a14_0x42d1();}function a14_0x5529(_0x1215b5,_0x3c012a){_0x1215b5=_0x1215b5-0x1b3;const _0x42d13b=a14_0x42d1();let _0x552947=_0x42d13b[_0x1215b5];return _0x552947;}import{getOnlineMenuList}from'./get-online-menu-list.js';import a14_0x25dd2e from'../i18n/index.js';const t=a14_0x25dd2e['t'][a14_0x1d16a6(0x1bd)](a14_0x25dd2e);export function useGetOnlineMenuList(){const [_0x51d456,_0x383794]=useState([]),[_0xa5e3a5,_0x46d907]=useState(!![]),[_0x4267f2,_0x92a906]=useState('');return useEffect(()=>{const _0x479113=a14_0x5529;_0x46d907(!![]),_0x92a906(''),getOnlineMenuList()[_0x479113(0x1b6)](_0x383794)['catch'](_0x279b0d=>{const _0x2e7d1f=_0x479113;_0x92a906(_0x279b0d['message']||t('appMenu.error.fetchFailed',{'error':t(_0x2e7d1f(0x1ba))}));})[_0x479113(0x1b8)](()=>_0x46d907(![]));},[]),{'menuList':_0x51d456,'loading':_0xa5e3a5,'error':_0x4267f2};}
@@ -1 +1 @@
1
- (function(_0x1e9c75,_0x519b45){const _0x1cbdc9=a18_0x1b78,_0x5906a5=_0x1e9c75();while(!![]){try{const _0x5e76ad=parseInt(_0x1cbdc9(0x1d0))/0x1*(-parseInt(_0x1cbdc9(0x1cb))/0x2)+-parseInt(_0x1cbdc9(0x1d3))/0x3+-parseInt(_0x1cbdc9(0x1d1))/0x4*(parseInt(_0x1cbdc9(0x1d2))/0x5)+parseInt(_0x1cbdc9(0x1c6))/0x6*(-parseInt(_0x1cbdc9(0x1c8))/0x7)+parseInt(_0x1cbdc9(0x1c7))/0x8*(-parseInt(_0x1cbdc9(0x1d4))/0x9)+parseInt(_0x1cbdc9(0x1c9))/0xa+parseInt(_0x1cbdc9(0x1cd))/0xb;if(_0x5e76ad===_0x519b45)break;else _0x5906a5['push'](_0x5906a5['shift']());}catch(_0x1823a1){_0x5906a5['push'](_0x5906a5['shift']());}}}(a18_0x51c6,0xa1bf4));export function getRemainingSpaces(_0x379b7f,_0x37fb6f){const _0x228ca8=a18_0x1b78,_0x13cf14=getStringWidth(_0x37fb6f);return Array(Math[_0x228ca8(0x1cc)](0x0,_0x379b7f-_0x13cf14))[_0x228ca8(0x1ca)]('\x20')['join']('');}function a18_0x1b78(_0x337cc0,_0x4b6dc3){_0x337cc0=_0x337cc0-0x1c6;const _0x51c6d1=a18_0x51c6();let _0x1b7896=_0x51c6d1[_0x337cc0];return _0x1b7896;}function a18_0x51c6(){const _0x3ad1d6=['fill','125462ozKUOm','max','41564765HlDlel','test','repeat','13LwpZRX','4wNUDzW','4891255zdPRuH','2669379AtVpaw','2529JZFRQL','14436WRGwMu','25448CvwhSM','1869DEKHHl','11037110tevqRv'];a18_0x51c6=function(){return _0x3ad1d6;};return a18_0x51c6();}export function getMaxWidth(_0x286e81,_0x19025f=0x2){const _0x2b6605=a18_0x1b78;let _0x337fc9='',_0x51cec9=0x0;for(const _0x3b6b56 of _0x286e81){const _0x43250c=getStringWidth(_0x3b6b56);_0x43250c>_0x51cec9&&(_0x51cec9=_0x43250c,_0x337fc9=_0x3b6b56);}return _0x337fc9+'\x20'[_0x2b6605(0x1cf)](_0x19025f);}export function getStringWidth(_0xe6193d){const _0x2aab63=a18_0x1b78;let _0x51ed2a=0x0;for(const _0x434850 of _0xe6193d){/[\u4e00-\u9fa5]/[_0x2aab63(0x1ce)](_0x434850)?_0x51ed2a+=0x2:_0x51ed2a+=0x1;}return _0x51ed2a;}
1
+ function a15_0x3289(){const _0x275675=['3zKhlZp','574KepSEu','max','229892EzFIGr','10zYNHZm','repeat','695zuXkxL','175120FRueoJ','1477EEVGEa','118693jHLkMs','4MVJsWe','108TKuGGn','2577492glCgzV','1566244bWRVNI','join','7032cYEGIS','fill','14442gyrpFn'];a15_0x3289=function(){return _0x275675;};return a15_0x3289();}function a15_0xc493(_0x3eef17,_0x236e3f){_0x3eef17=_0x3eef17-0x85;const _0x32891d=a15_0x3289();let _0xc493c9=_0x32891d[_0x3eef17];return _0xc493c9;}(function(_0x3cd0e8,_0x5aa027){const _0x1193a1=a15_0xc493,_0x51bfcb=_0x3cd0e8();while(!![]){try{const _0x5b8991=-parseInt(_0x1193a1(0x8b))/0x1*(-parseInt(_0x1193a1(0x8c))/0x2)+-parseInt(_0x1193a1(0x94))/0x3*(-parseInt(_0x1193a1(0x8f))/0x4)+parseInt(_0x1193a1(0x88))/0x5*(parseInt(_0x1193a1(0x93))/0x6)+-parseInt(_0x1193a1(0x8a))/0x7*(parseInt(_0x1193a1(0x91))/0x8)+-parseInt(_0x1193a1(0x8e))/0x9*(-parseInt(_0x1193a1(0x86))/0xa)+-parseInt(_0x1193a1(0x89))/0xb*(parseInt(_0x1193a1(0x8d))/0xc)+parseInt(_0x1193a1(0x85))/0xd*(-parseInt(_0x1193a1(0x95))/0xe);if(_0x5b8991===_0x5aa027)break;else _0x51bfcb['push'](_0x51bfcb['shift']());}catch(_0x4074b6){_0x51bfcb['push'](_0x51bfcb['shift']());}}}(a15_0x3289,0x2fe13));export function getRemainingSpaces(_0x5e9294,_0x4be302){const _0x43a856=a15_0xc493,_0x2291f1=getStringWidth(_0x4be302);return Array(Math[_0x43a856(0x96)](0x0,_0x5e9294-_0x2291f1))[_0x43a856(0x92)]('\x20')[_0x43a856(0x90)]('');}export function getMaxWidth(_0x5c34b4,_0xb0215c=0x2){const _0x2e47d0=a15_0xc493;let _0x15c393='',_0xa0d231=0x0;for(const _0x215ca7 of _0x5c34b4){const _0x572e01=getStringWidth(_0x215ca7);_0x572e01>_0xa0d231&&(_0xa0d231=_0x572e01,_0x15c393=_0x215ca7);}return _0x15c393+'\x20'[_0x2e47d0(0x87)](_0xb0215c);}export function getStringWidth(_0x2b327f){let _0x4fbcb9=0x0;for(const _0x4ac372 of _0x2b327f){/[\u4e00-\u9fa5]/['test'](_0x4ac372)?_0x4fbcb9+=0x2:_0x4fbcb9+=0x1;}return _0x4fbcb9;}
@@ -1 +1 @@
1
- (function(_0x2a1ef7,_0x2712cb){const _0x11662c=a19_0x8500,_0x2cbff8=_0x2a1ef7();while(!![]){try{const _0x2382ec=parseInt(_0x11662c(0xc8))/0x1+parseInt(_0x11662c(0xc9))/0x2*(-parseInt(_0x11662c(0xcf))/0x3)+-parseInt(_0x11662c(0xc5))/0x4*(-parseInt(_0x11662c(0xce))/0x5)+-parseInt(_0x11662c(0xc6))/0x6+-parseInt(_0x11662c(0xd3))/0x7*(parseInt(_0x11662c(0xc7))/0x8)+parseInt(_0x11662c(0xcc))/0x9*(parseInt(_0x11662c(0xcb))/0xa)+parseInt(_0x11662c(0xca))/0xb*(parseInt(_0x11662c(0xd2))/0xc);if(_0x2382ec===_0x2712cb)break;else _0x2cbff8['push'](_0x2cbff8['shift']());}catch(_0x28f22a){_0x2cbff8['push'](_0x2cbff8['shift']());}}}(a19_0xe7eb,0xe2ee5));export function isValidJsHttpsUrl(_0x181761){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x181761['trim']());}export function isValidCssHttpsUrl(_0x31435b){const _0x560232=a19_0x8500;return/^https:\/\/.+\.css(\?.*)?$/[_0x560232(0xcd)](_0x31435b[_0x560232(0xd1)]());}export async function isUrlReachable(_0x2c25b1){const _0x3a4ef6=a19_0x8500;try{const _0x1f079a=await fetch(_0x2c25b1,{'method':_0x3a4ef6(0xd0)});return _0x1f079a['ok'];}catch{return![];}}function a19_0x8500(_0x46c4b0,_0x47a534){_0x46c4b0=_0x46c4b0-0xc5;const _0xe7eb6d=a19_0xe7eb();let _0x850017=_0xe7eb6d[_0x46c4b0];return _0x850017;}function a19_0xe7eb(){const _0x37568c=['938905hmzIwQ','6ARviod','11NfgORi','7230hNBCUg','8910sXiHxd','test','210695gquZkr','290991rDvESt','HEAD','trim','6064044qEzLbB','742pidZUD','44fpcfgF','1558350aJVLUT','86288hxedTZ'];a19_0xe7eb=function(){return _0x37568c;};return a19_0xe7eb();}
1
+ (function(_0x396dcc,_0x13f5c1){const _0x28076a=a16_0x40cb,_0x222084=_0x396dcc();while(!![]){try{const _0x33fb4e=parseInt(_0x28076a(0x93))/0x1*(-parseInt(_0x28076a(0x9c))/0x2)+parseInt(_0x28076a(0x95))/0x3+-parseInt(_0x28076a(0x98))/0x4*(parseInt(_0x28076a(0x9a))/0x5)+parseInt(_0x28076a(0x99))/0x6+-parseInt(_0x28076a(0x97))/0x7+-parseInt(_0x28076a(0x96))/0x8*(parseInt(_0x28076a(0x92))/0x9)+parseInt(_0x28076a(0x94))/0xa;if(_0x33fb4e===_0x13f5c1)break;else _0x222084['push'](_0x222084['shift']());}catch(_0x24febe){_0x222084['push'](_0x222084['shift']());}}}(a16_0x2b06,0xb0c0c));function a16_0x2b06(){const _0x345280=['78YBiAHR','286569JGvzQk','31642uQtKpj','35409680UrDxxI','1785138sWZkoE','152SWuRfA','2557646PhybzP','1154652dURguD','1414056mxWIuq','25RzNpHZ','test'];a16_0x2b06=function(){return _0x345280;};return a16_0x2b06();}function a16_0x40cb(_0x424044,_0x5f2e2a){_0x424044=_0x424044-0x92;const _0x2b0689=a16_0x2b06();let _0x40cb3a=_0x2b0689[_0x424044];return _0x40cb3a;}export function isValidJsHttpsUrl(_0x3edfcd){const _0xb03a57=a16_0x40cb;return/^https:\/\/.+\.js(\?.*)?$/[_0xb03a57(0x9b)](_0x3edfcd['trim']());}export function isValidCssHttpsUrl(_0xd816e2){const _0x32f5a5=a16_0x40cb;return/^https:\/\/.+\.css(\?.*)?$/[_0x32f5a5(0x9b)](_0xd816e2['trim']());}export async function isUrlReachable(_0x36b0a4){try{const _0x59a051=await fetch(_0x36b0a4,{'method':'HEAD'});return _0x59a051['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- function a20_0x3807(_0x231f1d,_0x454b98){_0x231f1d=_0x231f1d-0x1e9;const _0x43c317=a20_0x43c3();let _0x3807f9=_0x43c317[_0x231f1d];return _0x3807f9;}(function(_0x1a9e22,_0xdd474d){const _0x22aac5=a20_0x3807,_0x2eba38=_0x1a9e22();while(!![]){try{const _0x5013ed=parseInt(_0x22aac5(0x1f7))/0x1+-parseInt(_0x22aac5(0x1f9))/0x2+-parseInt(_0x22aac5(0x1f1))/0x3*(-parseInt(_0x22aac5(0x1ea))/0x4)+-parseInt(_0x22aac5(0x1e9))/0x5+-parseInt(_0x22aac5(0x1ef))/0x6+-parseInt(_0x22aac5(0x1fa))/0x7+-parseInt(_0x22aac5(0x1f3))/0x8*(-parseInt(_0x22aac5(0x1f6))/0x9);if(_0x5013ed===_0xdd474d)break;else _0x2eba38['push'](_0x2eba38['shift']());}catch(_0x168fe9){_0x2eba38['push'](_0x2eba38['shift']());}}}(a20_0x43c3,0xe3cab));function a20_0x43c3(){const _0x1b2655=['1219166yddtks','10563518HBHIWc','3702595JIitWL','4376FxRKJu','cyan','join','label','待更新的菜单列表:','909072HjNQze','from','1032RoajIQ','length','8dyNZWx','map','column','27343809JkDpFb','529186koIFpz','*\x20待更新的菜单&资源链接'];a20_0x43c3=function(){return _0x1b2655;};return a20_0x43c3();}import{jsx as a20_0x31fd4e,jsxs as a20_0x1aa64e}from'react/jsx-runtime';import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x11c244){const _0x46f24a=a20_0x3807,{menuList:_0x1f9f31}=_0x11c244,_0x1513cf=_0x1f9f31['filter'](_0x57f210=>_0x57f210['resources'][_0x46f24a(0x1f2)]),_0x562fac=Array[_0x46f24a(0x1f0)](new Set(_0x1f9f31[_0x46f24a(0x1f4)](_0x1d2edd=>_0x1d2edd['resources'])['flat']()));return a20_0x1aa64e(Box,{'flexDirection':_0x46f24a(0x1f5),'children':[a20_0x31fd4e(Text,{'color':_0x46f24a(0x1eb),'children':_0x46f24a(0x1f8)}),a20_0x1aa64e(Box,{'marginTop':0x1,'flexDirection':'column','children':[a20_0x1aa64e(Text,{'bold':!![],'children':['\x20\x20',_0x46f24a(0x1ee)]}),a20_0x1aa64e(Text,{'children':['\x20\x20',_0x1513cf[_0x46f24a(0x1f4)](_0x3df341=>_0x3df341[_0x46f24a(0x1ed)])[_0x46f24a(0x1ec)](',\x20')]})]}),a20_0x31fd4e(Box,{'marginTop':0x1,'children':a20_0x1aa64e(Text,{'bold':!![],'children':['\x20\x20','待更新的资源链接:']})}),_0x562fac[_0x46f24a(0x1f4)](_0x2804c7=>a20_0x31fd4e(Box,{'children':a20_0x1aa64e(Text,{'children':['\x20\x20',_0x2804c7]})},_0x2804c7))]});}
1
+ (function(_0x1e541c,_0xfe580e){const _0x48bf6f=a17_0x4eb8,_0x5906ae=_0x1e541c();while(!![]){try{const _0x14281e=-parseInt(_0x48bf6f(0x1a1))/0x1+-parseInt(_0x48bf6f(0x19d))/0x2*(parseInt(_0x48bf6f(0x1a5))/0x3)+-parseInt(_0x48bf6f(0x194))/0x4*(-parseInt(_0x48bf6f(0x1a0))/0x5)+parseInt(_0x48bf6f(0x197))/0x6*(parseInt(_0x48bf6f(0x196))/0x7)+-parseInt(_0x48bf6f(0x198))/0x8+parseInt(_0x48bf6f(0x195))/0x9*(-parseInt(_0x48bf6f(0x1a6))/0xa)+parseInt(_0x48bf6f(0x1a3))/0xb;if(_0x14281e===_0xfe580e)break;else _0x5906ae['push'](_0x5906ae['shift']());}catch(_0x3d0784){_0x5906ae['push'](_0x5906ae['shift']());}}}(a17_0x2fe5,0x278db));import{jsx as a17_0x4d5b1b,jsxs as a17_0x1bf355}from'react/jsx-runtime';import{Text,Box}from'ink';function a17_0x4eb8(_0x4331b7,_0x3ebb67){_0x4331b7=_0x4331b7-0x194;const _0x2fe5a2=a17_0x2fe5();let _0x4eb890=_0x2fe5a2[_0x4331b7];return _0x4eb890;}function a17_0x2fe5(){const _0x5a2084=['513164ZroSNT','199602rVeltK','2282YPufmu','1548nxoyYp','1511680LFkLsN','appMenu.updateCdn.preview.resourceLinks','cyan','map','length','2yPxWAq','label','appMenu.updateCdn.preview.menuList','10IbzXCx','180529JqVlSQ','column','2883166arJBjv','resources','14286qzBchi','30QRVfIl'];a17_0x2fe5=function(){return _0x5a2084;};return a17_0x2fe5();}import{useI18n}from'../i18n/hooks.js';export function CurrentMenuCdnContent(_0x126913){const _0x50dd36=a17_0x4eb8,{t:_0x4016af}=useI18n(),{menuList:_0x3042bb}=_0x126913,_0x55207c=_0x3042bb['filter'](_0xa6b648=>_0xa6b648['resources'][_0x50dd36(0x19c)]),_0xb9f463=Array['from'](new Set(_0x3042bb[_0x50dd36(0x19b)](_0x241210=>_0x241210[_0x50dd36(0x1a4)])['flat']()));return a17_0x1bf355(Box,{'flexDirection':_0x50dd36(0x1a2),'children':[a17_0x4d5b1b(Text,{'color':_0x50dd36(0x19a),'children':_0x4016af('appMenu.updateCdn.preview.title')}),a17_0x1bf355(Box,{'marginTop':0x1,'flexDirection':_0x50dd36(0x1a2),'children':[a17_0x1bf355(Text,{'bold':!![],'children':['\x20\x20',_0x4016af(_0x50dd36(0x19f))]}),a17_0x1bf355(Text,{'children':['\x20\x20',_0x55207c[_0x50dd36(0x19b)](_0xdcdd3=>_0xdcdd3[_0x50dd36(0x19e)])['join'](',\x20')]})]}),a17_0x4d5b1b(Box,{'marginTop':0x1,'children':a17_0x1bf355(Text,{'bold':!![],'children':['\x20\x20',_0x4016af(_0x50dd36(0x199))]})}),_0xb9f463[_0x50dd36(0x19b)](_0x15c147=>a17_0x4d5b1b(Box,{'children':a17_0x1bf355(Text,{'children':['\x20\x20',_0x15c147]})},_0x15c147))]});}
@@ -1 +1 @@
1
- (function(_0x8dd296,_0x5087f3){const _0x3e8e85=a21_0x9823,_0x3621a0=_0x8dd296();while(!![]){try{const _0x661b0e=parseInt(_0x3e8e85(0x1ad))/0x1+-parseInt(_0x3e8e85(0x1ab))/0x2+-parseInt(_0x3e8e85(0x1b2))/0x3*(-parseInt(_0x3e8e85(0x1b6))/0x4)+parseInt(_0x3e8e85(0x1b5))/0x5*(parseInt(_0x3e8e85(0x1b3))/0x6)+-parseInt(_0x3e8e85(0x1b1))/0x7*(-parseInt(_0x3e8e85(0x1b4))/0x8)+parseInt(_0x3e8e85(0x1b0))/0x9*(-parseInt(_0x3e8e85(0x1a7))/0xa)+-parseInt(_0x3e8e85(0x1ae))/0xb*(parseInt(_0x3e8e85(0x1a8))/0xc);if(_0x661b0e===_0x5087f3)break;else _0x3621a0['push'](_0x3621a0['shift']());}catch(_0x1c1b3a){_0x3621a0['push'](_0x3621a0['shift']());}}}(a21_0x5cc6,0x9fe28));import{jsx as a21_0x30d471,jsxs as a21_0x508c0c}from'react/jsx-runtime';function a21_0x5cc6(){const _0x335bcd=['8459361TYiVVE','7ajBmCq','30VsPakx','5998308wTfQtL','6753952HAhfAV','5ZJpvkP','104588iVSEHe','10RkJCMT','20652zKfGqg','green','CSS\x20链接:\x20','447178atuMLx','JS\x20链接:\x20','619941FSuMmK','5797GZYJBg','column'];a21_0x5cc6=function(){return _0x335bcd;};return a21_0x5cc6();}function a21_0x9823(_0xba828,_0x1c0885){_0xba828=_0xba828-0x1a7;const _0x5cc68e=a21_0x5cc6();let _0x982321=_0x5cc68e[_0xba828];return _0x982321;}import{Text,Box}from'ink';export function InputCdnAsset(_0x147a99){const _0x6303d4=a21_0x9823,{jsCdnUrl:_0x55d6a0,cssCdnUrl:_0x9884ac}=_0x147a99;return a21_0x508c0c(Box,{'flexDirection':_0x6303d4(0x1af),'marginTop':0x1,'children':[a21_0x30d471(Text,{'color':'cyan','children':'*\x20已输入的资源资源'}),a21_0x508c0c(Box,{'children':[a21_0x508c0c(Text,{'children':['\x20\x20',_0x6303d4(0x1ac)]}),a21_0x30d471(Text,{'color':_0x6303d4(0x1a9),'children':_0x55d6a0})]}),a21_0x508c0c(Box,{'children':[a21_0x508c0c(Text,{'children':['\x20\x20',_0x6303d4(0x1aa)]}),a21_0x30d471(Text,{'color':_0x6303d4(0x1a9),'children':_0x9884ac})]})]});}
1
+ (function(_0x54ec8c,_0x165b12){const _0x495fa6=a18_0x2e6a,_0x1ca563=_0x54ec8c();while(!![]){try{const _0x58f5bf=parseInt(_0x495fa6(0xce))/0x1*(parseInt(_0x495fa6(0xcc))/0x2)+parseInt(_0x495fa6(0xd2))/0x3+parseInt(_0x495fa6(0xd3))/0x4*(-parseInt(_0x495fa6(0xd7))/0x5)+parseInt(_0x495fa6(0xc7))/0x6+parseInt(_0x495fa6(0xc8))/0x7*(parseInt(_0x495fa6(0xd6))/0x8)+parseInt(_0x495fa6(0xc9))/0x9*(parseInt(_0x495fa6(0xcf))/0xa)+parseInt(_0x495fa6(0xcd))/0xb*(-parseInt(_0x495fa6(0xd5))/0xc);if(_0x58f5bf===_0x165b12)break;else _0x1ca563['push'](_0x1ca563['shift']());}catch(_0x160c4b){_0x1ca563['push'](_0x1ca563['shift']());}}}(a18_0x35f9,0xe45a4));import{jsx as a18_0x2eb44c,jsxs as a18_0x15d0a2}from'react/jsx-runtime';import{Text,Box}from'ink';function a18_0x2e6a(_0x5802ac,_0x18f549){_0x5802ac=_0x5802ac-0xc6;const _0x35f9f9=a18_0x35f9();let _0x2e6a3b=_0x35f9f9[_0x5802ac];return _0x2e6a3b;}import{useI18n}from'../i18n/hooks.js';export function InputCdnAsset(_0x3169df){const _0x50c0e9=a18_0x2e6a,{t:_0x5402ba}=useI18n(),{jsCdnUrl:_0x2ed578,cssCdnUrl:_0x36d30a}=_0x3169df;return a18_0x15d0a2(Box,{'flexDirection':_0x50c0e9(0xd4),'marginTop':0x1,'children':[a18_0x2eb44c(Text,{'color':_0x50c0e9(0xd0),'children':_0x5402ba(_0x50c0e9(0xcb))}),a18_0x15d0a2(Box,{'children':[a18_0x15d0a2(Text,{'children':['\x20\x20',_0x5402ba(_0x50c0e9(0xca))]}),a18_0x2eb44c(Text,{'color':_0x50c0e9(0xd1),'children':_0x2ed578})]}),a18_0x15d0a2(Box,{'children':[a18_0x15d0a2(Text,{'children':['\x20\x20',_0x5402ba(_0x50c0e9(0xc6))]}),a18_0x2eb44c(Text,{'color':_0x50c0e9(0xd1),'children':_0x36d30a})]})]});}function a18_0x35f9(){const _0x5dacd4=['16RAWHVZ','55whRttB','appMenu.updateCdn.input.cssUrl.label','6612264VeVKTm','4089981awNcUW','124182mOpGMS','appMenu.updateCdn.input.jsUrl.label','appMenu.updateCdn.input.title','2jHvXpl','11lxtMgb','1371486orznFX','320NEPxGb','cyan','green','4968900KWjLOT','424884TVKLbg','column','43634028DLQApU'];a18_0x35f9=function(){return _0x5dacd4;};return a18_0x35f9();}
@@ -1 +1 @@
1
- (function(_0x26f9a7,_0x3598ad){const _0x1b20fd=a22_0x51ea,_0x38234a=_0x26f9a7();while(!![]){try{const _0x4a998a=-parseInt(_0x1b20fd(0x169))/0x1*(-parseInt(_0x1b20fd(0x15d))/0x2)+parseInt(_0x1b20fd(0x187))/0x3+-parseInt(_0x1b20fd(0x15c))/0x4*(-parseInt(_0x1b20fd(0x17d))/0x5)+parseInt(_0x1b20fd(0x162))/0x6+parseInt(_0x1b20fd(0x15a))/0x7+-parseInt(_0x1b20fd(0x177))/0x8*(-parseInt(_0x1b20fd(0x163))/0x9)+-parseInt(_0x1b20fd(0x173))/0xa;if(_0x4a998a===_0x3598ad)break;else _0x38234a['push'](_0x38234a['shift']());}catch(_0x1fe502){_0x38234a['push'](_0x38234a['shift']());}}}(a22_0x42c1,0xdaa42));import{jsx as a22_0x260b12,jsxs as a22_0x19594f,Fragment as a22_0x1e0544}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a22_0x1c7e62 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_0x42c1(){const _0x22fefe=['red','CSS\x20链接无法访问','return','1NaGNOQ','请输入有效的\x20CSS\x20https\x20链接','resolve','delete','提示:使用\x20','取消更新','green','updated','downArrow','leftArrow','40737490bRLqiW','yellow','JS\x20链接:\x20','继续更新','37888obczTV','!\x20未找到菜单资源链接','flat','rightArrow','upArrow','input-js','1236865icEoUS','all','JS\x20链接无法访问','cyan','\x20正在获取线上菜单资源链接...','dots','lovrabet\x20auth','\x20←\x20','map','input-css','4734687LyMirR','label','resources','need-confirm','*\x20请输入新的资源链接','value','cancel','slice','creating','gray','path','10613701UVAByX','backspace','20NxKDiD','774466CSnPkb','length','CSS\x20链接:\x20','\x20资源正在同步中...','from','1475982rzdzps','9uNqcsx','column','\x20命令重新登录'];a22_0x42c1=function(){return _0x22fefe;};return a22_0x42c1();}function a22_0x51ea(_0x410d14,_0x159887){_0x410d14=_0x410d14-0x15a;const _0x42c114=a22_0x42c1();let _0x51ea54=_0x42c114[_0x410d14];return _0x51ea54;}import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a22_0x260b12(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x46a7d7=a22_0x51ea,{exit:_0x344683}=useApp(),{loading:_0x4a0712,menuList:_0x4dd184,error:_0x33adc1}=useGetOnlineMenuList(),[_0x22cbd8,_0x28ba73]=useState('ok'),[_0xb754ee,_0x23b489]=useState(_0x46a7d7(0x17c)),[_0x21712b,_0x5a92cb]=useState(''),[_0x588a40,_0x448313]=useState(''),[_0x454913,_0x4ff387]=useState(''),[_0x571761,_0x5a74bc]=useState(''),_0x4aaf00=Array[_0x46a7d7(0x161)](new Set(_0x4dd184['map'](_0xd00118=>_0xd00118[_0x46a7d7(0x189)])[_0x46a7d7(0x179)]()));useEffect(()=>{_0xb754ee==='updated'&&setTimeout(_0x344683,0x32);},[_0xb754ee]),useInput(async(_0x39c6af,_0xa97e19)=>{const _0x45c3b9=_0x46a7d7;if(_0xb754ee==='input-js'){if(_0xa97e19[_0x45c3b9(0x168)]){const _0x674bec=_0x454913['trim']();if(_0x674bec==='')return;if(!isValidJsHttpsUrl(_0x674bec)){_0x5a74bc('请输入有效的\x20JS\x20https\x20链接');return;}if(!await isUrlReachable(_0x674bec)){_0x5a74bc(_0x45c3b9(0x17f));return;}_0x5a92cb(_0x674bec),_0x4ff387(''),_0x5a74bc(''),_0x23b489('input-css');return;}if(_0xa97e19['backspace']||_0xa97e19[_0x45c3b9(0x16c)]){_0x4ff387(_0x35d443=>_0x35d443['slice'](0x0,-0x1)),_0x5a74bc('');return;}_0x4ff387(_0x2ffb57=>_0x2ffb57+_0x39c6af);return;}if(_0xb754ee==='input-css'){if(_0xa97e19['return']){const _0x4b07ea=_0x454913['trim']();if(_0x4b07ea==='')return;if(!isValidCssHttpsUrl(_0x4b07ea)){_0x5a74bc(_0x45c3b9(0x16a));return;}if(!await isUrlReachable(_0x4b07ea)){_0x5a74bc(_0x45c3b9(0x167));return;}_0x448313(_0x4b07ea),_0x4ff387(''),_0x5a74bc(''),_0x23b489(_0x45c3b9(0x18a));return;}if(_0xa97e19[_0x45c3b9(0x15b)]||_0xa97e19['delete']){_0x4ff387(_0x57ede7=>_0x57ede7[_0x45c3b9(0x18e)](0x0,-0x1)),_0x5a74bc('');return;}_0x4ff387(_0x37b1a5=>_0x37b1a5+_0x39c6af);return;}if(_0xb754ee===_0x45c3b9(0x18a)){(_0xa97e19[_0x45c3b9(0x17b)]||_0xa97e19[_0x45c3b9(0x171)]||_0xa97e19[_0x45c3b9(0x172)]||_0xa97e19[_0x45c3b9(0x17a)])&&_0x28ba73(_0x35e892=>_0x35e892==='ok'?_0x45c3b9(0x18d):'ok');if(_0xa97e19['return']){_0x23b489(_0x45c3b9(0x18f));if(_0x22cbd8==='ok')await Promise[_0x45c3b9(0x17e)](_0x4dd184[_0x45c3b9(0x185)](_0x1291c9=>{const _0x394135=_0x45c3b9,_0x15b7a4={'id':_0x1291c9['id'],'label':_0x1291c9[_0x394135(0x188)],'path':_0x1291c9[_0x394135(0x191)],'resources':[_0x21712b,_0x588a40]};if(_0x1291c9[_0x394135(0x189)][_0x394135(0x15e)]===0x0)return Promise[_0x394135(0x16b)]();return updateMenuCdnUrl(_0x15b7a4);})),await new Promise(_0x1bb9ea=>setTimeout(_0x1bb9ea,0x3e8)),_0x23b489(_0x45c3b9(0x170));else _0x22cbd8===_0x45c3b9(0x18d)&&_0x344683();}}});if(_0x4a0712)return a22_0x19594f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x260b12(Text,{}),a22_0x260b12(a22_0x1c7e62,{'type':_0x46a7d7(0x182)}),a22_0x260b12(Text,{'children':_0x46a7d7(0x181)})]});if(_0x33adc1)return a22_0x19594f(Box,{'flexDirection':_0x46a7d7(0x164),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x19594f(Text,{'color':_0x46a7d7(0x166),'children':['✗\x20',_0x33adc1]}),a22_0x19594f(Box,{'marginTop':0x1,'children':[a22_0x260b12(Text,{'color':_0x46a7d7(0x190),'children':_0x46a7d7(0x16d)}),a22_0x260b12(Text,{'color':'cyan','children':_0x46a7d7(0x183)}),a22_0x260b12(Text,{'color':_0x46a7d7(0x190),'children':_0x46a7d7(0x165)})]})]});if(_0x4aaf00[_0x46a7d7(0x15e)]===0x0)return a22_0x260b12(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x260b12(Text,{'color':_0x46a7d7(0x174),'children':_0x46a7d7(0x178)})});if(_0xb754ee===_0x46a7d7(0x18a))return a22_0x19594f(Box,{'flexDirection':_0x46a7d7(0x164),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x260b12(CurrentMenuCdnContent,{'menuList':_0x4dd184}),a22_0x260b12(InputCdnAsset,{'jsCdnUrl':_0x21712b,'cssCdnUrl':_0x588a40}),a22_0x260b12(Box,{'marginTop':0x1,'flexDirection':_0x46a7d7(0x164),'children':[{'label':_0x46a7d7(0x176),'value':'ok'},{'label':_0x46a7d7(0x16e),'value':_0x46a7d7(0x18d)}][_0x46a7d7(0x185)](_0x3aae0b=>a22_0x19594f(Text,{'color':_0x22cbd8===_0x3aae0b[_0x46a7d7(0x18c)]?_0x46a7d7(0x174):undefined,'children':[_0x22cbd8===_0x3aae0b[_0x46a7d7(0x18c)]?'>\x20':'\x20\x20',_0x3aae0b[_0x46a7d7(0x188)]]},_0x3aae0b[_0x46a7d7(0x18c)]))})]});if(_0xb754ee===_0x46a7d7(0x18f))return a22_0x19594f(Box,{'flexDirection':_0x46a7d7(0x164),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x260b12(CurrentMenuCdnContent,{'menuList':_0x4dd184}),a22_0x260b12(InputCdnAsset,{'jsCdnUrl':_0x21712b,'cssCdnUrl':_0x588a40}),a22_0x19594f(Box,{'marginTop':0x1,'children':[a22_0x260b12(a22_0x1c7e62,{'type':_0x46a7d7(0x182)}),a22_0x260b12(Text,{'children':_0x46a7d7(0x160)})]})]});if(_0xb754ee==='updated')return a22_0x19594f(Box,{'flexDirection':_0x46a7d7(0x164),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x260b12(CurrentMenuCdnContent,{'menuList':_0x4dd184}),a22_0x260b12(InputCdnAsset,{'jsCdnUrl':_0x21712b,'cssCdnUrl':_0x588a40}),a22_0x260b12(Box,{'marginTop':0x1,'children':a22_0x260b12(Text,{'color':_0x46a7d7(0x16f),'children':'√\x20更新成功'})})]});return a22_0x19594f(Box,{'flexDirection':_0x46a7d7(0x164),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x260b12(CurrentMenuCdnContent,{'menuList':_0x4dd184}),a22_0x19594f(Box,{'marginTop':0x1,'flexDirection':_0x46a7d7(0x164),'children':[a22_0x260b12(Text,{'color':_0x46a7d7(0x180),'children':_0x46a7d7(0x18b)}),_0x21712b?a22_0x19594f(Box,{'children':[a22_0x19594f(Text,{'color':'gray','children':['\x20\x20',_0x46a7d7(0x175)]}),a22_0x260b12(Text,{'color':_0x46a7d7(0x16f),'children':_0x21712b})]}):_0xb754ee===_0x46a7d7(0x17c)&&a22_0x19594f(a22_0x1e0544,{'children':[a22_0x19594f(Box,{'children':[a22_0x19594f(Text,{'children':['\x20\x20',_0x46a7d7(0x175)]}),a22_0x260b12(Text,{'color':_0x46a7d7(0x16f),'children':_0x454913}),_0x571761&&a22_0x19594f(Text,{'color':_0x46a7d7(0x166),'children':['\x20←\x20',_0x571761]})]}),!_0x571761&&a22_0x260b12(Box,{'children':a22_0x19594f(Text,{'color':'gray','children':['\x20\x20','输入项目的\x20JS\x20资源链接(https://...)']})})]}),_0x588a40?a22_0x19594f(Box,{'children':[a22_0x19594f(Text,{'children':['\x20\x20',_0x46a7d7(0x15f)]}),a22_0x260b12(Text,{'color':_0x46a7d7(0x16f),'children':_0x588a40})]}):_0xb754ee===_0x46a7d7(0x186)&&a22_0x19594f(a22_0x1e0544,{'children':[a22_0x19594f(Box,{'children':[a22_0x19594f(Text,{'children':['\x20\x20',_0x46a7d7(0x15f)]}),a22_0x260b12(Text,{'color':'green','children':_0x454913}),_0x571761&&a22_0x19594f(Text,{'color':_0x46a7d7(0x166),'children':[_0x46a7d7(0x184),_0x571761]})]}),!_0x571761&&a22_0x260b12(Box,{'children':a22_0x19594f(Text,{'color':_0x46a7d7(0x190),'children':['\x20\x20','输入项目的\x20CSS\x20资源链接(https://...)']})})]})]})]});}
1
+ (function(_0x511e5c,_0x3d40bf){const _0x30eb8c=a19_0x4a9b,_0x4772fe=_0x511e5c();while(!![]){try{const _0x5374c4=-parseInt(_0x30eb8c(0x17d))/0x1*(-parseInt(_0x30eb8c(0x16b))/0x2)+parseInt(_0x30eb8c(0x182))/0x3+-parseInt(_0x30eb8c(0x176))/0x4+-parseInt(_0x30eb8c(0x17f))/0x5*(-parseInt(_0x30eb8c(0x17c))/0x6)+parseInt(_0x30eb8c(0x181))/0x7+parseInt(_0x30eb8c(0x17e))/0x8+-parseInt(_0x30eb8c(0x175))/0x9;if(_0x5374c4===_0x3d40bf)break;else _0x4772fe['push'](_0x4772fe['shift']());}catch(_0xdb2540){_0x4772fe['push'](_0x4772fe['shift']());}}}(a19_0x68bb,0x4bc32));import{jsx as a19_0x2f0187,jsxs as a19_0x380a92,Fragment as a19_0x59a322}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a19_0x1b8cb7 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 a19_0x4a9b(_0x2904d2,_0x4ca238){_0x2904d2=_0x2904d2-0x167;const _0x68bb1b=a19_0x68bb();let _0x4a9b0f=_0x68bb1b[_0x2904d2];return _0x4a9b0f;}import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';function a19_0x68bb(){const _0x25ba2b=['return','dots','from','8042094CDpMBf','813088oPPITn','appMenu.updateCdn.input.jsUrl.placeholder','red','downArrow','trim','delete','4206CFVHDA','1xGwBFD','3437568UuHNAy','1180PSkJke','need-confirm','1006243EXmQar','1092078NuCnUa','yellow','appMenu.updateCdn.error.authHint.prefix','appMenu.updateCdn.loading.syncing','resources','upArrow','appMenu.updateCdn.input.jsUrl.label','appMenu.updateCdn.error.invalidJsUrl','column','input-css','\x20←\x20','path','appMenu.updateCdn.error.jsUrlUnreachable','creating','appMenu.updateCdn.error.noCdnLinks','appMenu.updateCdn.title','length','cancel','label','appMenu.updateCdn.action.cancel','flat','appMenu.updateCdn.input.cssUrl.label','cyan','green','appMenu.updateCdn.error.authHint.suffix','backspace','map','leftArrow','appMenu.updateCdn.input.cssUrl.placeholder','608506ABOzVU','slice','gray','value','updated','appMenu.updateCdn.error.cssUrlUnreachable','appMenu.updateCdn.success.updated'];a19_0x68bb=function(){return _0x25ba2b;};return a19_0x68bb();}import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import{useI18n}from'../i18n/hooks.js';import.meta.main&&render(a19_0x2f0187(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x1f3e06=a19_0x4a9b,{exit:_0x2e844d}=useApp(),{t:_0x370ab2}=useI18n(),{loading:_0x4958ee,menuList:_0x3dae3e,error:_0x5a638f}=useGetOnlineMenuList(),[_0x56104a,_0x47a5c3]=useState('ok'),[_0x5f235b,_0x3adbcd]=useState('input-js'),[_0x480b2e,_0xea45c6]=useState(''),[_0x235ebb,_0x590003]=useState(''),[_0x277edc,_0x3fac5b]=useState(''),[_0x5b0427,_0x4d9422]=useState(''),_0x14b1a1=Array[_0x1f3e06(0x174)](new Set(_0x3dae3e[_0x1f3e06(0x168)](_0x138e5d=>_0x138e5d[_0x1f3e06(0x186)])[_0x1f3e06(0x196)]()));useEffect(()=>{_0x5f235b==='updated'&&setTimeout(_0x2e844d,0x32);},[_0x5f235b]),useInput(async(_0xa6364c,_0x3f6489)=>{const _0x1091f9=_0x1f3e06;if(_0x5f235b==='input-js'){if(_0x3f6489[_0x1091f9(0x172)]){const _0x1e3177=_0x277edc['trim']();if(_0x1e3177==='')return;if(!isValidJsHttpsUrl(_0x1e3177)){_0x4d9422(_0x370ab2(_0x1091f9(0x189)));return;}if(!await isUrlReachable(_0x1e3177)){_0x4d9422(_0x370ab2(_0x1091f9(0x18e)));return;}_0xea45c6(_0x1e3177),_0x3fac5b(''),_0x4d9422(''),_0x3adbcd('input-css');return;}if(_0x3f6489[_0x1091f9(0x167)]||_0x3f6489[_0x1091f9(0x17b)]){_0x3fac5b(_0x414a02=>_0x414a02['slice'](0x0,-0x1)),_0x4d9422('');return;}_0x3fac5b(_0x50c023=>_0x50c023+_0xa6364c);return;}if(_0x5f235b===_0x1091f9(0x18b)){if(_0x3f6489['return']){const _0x315d04=_0x277edc[_0x1091f9(0x17a)]();if(_0x315d04==='')return;if(!isValidCssHttpsUrl(_0x315d04)){_0x4d9422(_0x370ab2('appMenu.updateCdn.error.invalidCssUrl'));return;}if(!await isUrlReachable(_0x315d04)){_0x4d9422(_0x370ab2(_0x1091f9(0x170)));return;}_0x590003(_0x315d04),_0x3fac5b(''),_0x4d9422(''),_0x3adbcd(_0x1091f9(0x180));return;}if(_0x3f6489['backspace']||_0x3f6489[_0x1091f9(0x17b)]){_0x3fac5b(_0x4775c0=>_0x4775c0[_0x1091f9(0x16c)](0x0,-0x1)),_0x4d9422('');return;}_0x3fac5b(_0x11bd0d=>_0x11bd0d+_0xa6364c);return;}if(_0x5f235b===_0x1091f9(0x180)){(_0x3f6489[_0x1091f9(0x187)]||_0x3f6489[_0x1091f9(0x179)]||_0x3f6489[_0x1091f9(0x169)]||_0x3f6489['rightArrow'])&&_0x47a5c3(_0x22e4ec=>_0x22e4ec==='ok'?_0x1091f9(0x193):'ok');if(_0x3f6489[_0x1091f9(0x172)]){_0x3adbcd(_0x1091f9(0x18f));if(_0x56104a==='ok')await Promise['all'](_0x3dae3e['map'](_0x11f1a0=>{const _0xaa17aa=_0x1091f9,_0xb58da={'id':_0x11f1a0['id'],'label':_0x11f1a0[_0xaa17aa(0x194)],'path':_0x11f1a0[_0xaa17aa(0x18d)],'resources':[_0x480b2e,_0x235ebb]};if(_0x11f1a0[_0xaa17aa(0x186)][_0xaa17aa(0x192)]===0x0)return Promise['resolve']();return updateMenuCdnUrl(_0xb58da);})),await new Promise(_0x4f0d86=>setTimeout(_0x4f0d86,0x3e8)),_0x3adbcd(_0x1091f9(0x16f));else _0x56104a===_0x1091f9(0x193)&&_0x2e844d();}}});if(_0x4958ee)return a19_0x380a92(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x2f0187(Text,{}),a19_0x2f0187(a19_0x1b8cb7,{'type':_0x1f3e06(0x173)}),a19_0x2f0187(Text,{'children':_0x370ab2('appMenu.updateCdn.loading.fetching')})]});if(_0x5a638f)return a19_0x380a92(Box,{'flexDirection':_0x1f3e06(0x18a),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x380a92(Text,{'color':_0x1f3e06(0x178),'children':['✗\x20',_0x5a638f]}),a19_0x380a92(Box,{'marginTop':0x1,'children':[a19_0x2f0187(Text,{'color':_0x1f3e06(0x16d),'children':_0x370ab2(_0x1f3e06(0x184))}),a19_0x2f0187(Text,{'color':_0x1f3e06(0x198),'children':'lovrabet\x20auth'}),a19_0x2f0187(Text,{'color':_0x1f3e06(0x16d),'children':_0x370ab2(_0x1f3e06(0x19a))})]})]});if(_0x14b1a1[_0x1f3e06(0x192)]===0x0)return a19_0x2f0187(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a19_0x2f0187(Text,{'color':_0x1f3e06(0x183),'children':_0x370ab2(_0x1f3e06(0x190))})});if(_0x5f235b===_0x1f3e06(0x180))return a19_0x380a92(Box,{'flexDirection':_0x1f3e06(0x18a),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x2f0187(CurrentMenuCdnContent,{'menuList':_0x3dae3e}),a19_0x2f0187(InputCdnAsset,{'jsCdnUrl':_0x480b2e,'cssCdnUrl':_0x235ebb}),a19_0x2f0187(Box,{'marginTop':0x1,'flexDirection':_0x1f3e06(0x18a),'children':[{'label':_0x370ab2('appMenu.updateCdn.action.continue'),'value':'ok'},{'label':_0x370ab2(_0x1f3e06(0x195)),'value':_0x1f3e06(0x193)}][_0x1f3e06(0x168)](_0x33488a=>a19_0x380a92(Text,{'color':_0x56104a===_0x33488a[_0x1f3e06(0x16e)]?_0x1f3e06(0x183):undefined,'children':[_0x56104a===_0x33488a[_0x1f3e06(0x16e)]?'>\x20':'\x20\x20',_0x33488a[_0x1f3e06(0x194)]]},_0x33488a['value']))})]});if(_0x5f235b===_0x1f3e06(0x18f))return a19_0x380a92(Box,{'flexDirection':_0x1f3e06(0x18a),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x2f0187(CurrentMenuCdnContent,{'menuList':_0x3dae3e}),a19_0x2f0187(InputCdnAsset,{'jsCdnUrl':_0x480b2e,'cssCdnUrl':_0x235ebb}),a19_0x380a92(Box,{'marginTop':0x1,'children':[a19_0x2f0187(a19_0x1b8cb7,{'type':_0x1f3e06(0x173)}),a19_0x2f0187(Text,{'children':_0x370ab2(_0x1f3e06(0x185))})]})]});if(_0x5f235b===_0x1f3e06(0x16f))return a19_0x380a92(Box,{'flexDirection':_0x1f3e06(0x18a),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x2f0187(CurrentMenuCdnContent,{'menuList':_0x3dae3e}),a19_0x2f0187(InputCdnAsset,{'jsCdnUrl':_0x480b2e,'cssCdnUrl':_0x235ebb}),a19_0x2f0187(Box,{'marginTop':0x1,'children':a19_0x2f0187(Text,{'color':'green','children':_0x370ab2(_0x1f3e06(0x171))})})]});return a19_0x380a92(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a19_0x2f0187(CurrentMenuCdnContent,{'menuList':_0x3dae3e}),a19_0x380a92(Box,{'marginTop':0x1,'flexDirection':_0x1f3e06(0x18a),'children':[a19_0x2f0187(Text,{'color':_0x1f3e06(0x198),'children':_0x370ab2(_0x1f3e06(0x191))}),_0x480b2e?a19_0x380a92(Box,{'children':[a19_0x380a92(Text,{'color':_0x1f3e06(0x16d),'children':['\x20\x20',_0x370ab2(_0x1f3e06(0x188))]}),a19_0x2f0187(Text,{'color':_0x1f3e06(0x199),'children':_0x480b2e})]}):_0x5f235b==='input-js'&&a19_0x380a92(a19_0x59a322,{'children':[a19_0x380a92(Box,{'children':[a19_0x380a92(Text,{'children':['\x20\x20',_0x370ab2(_0x1f3e06(0x188))]}),a19_0x2f0187(Text,{'color':_0x1f3e06(0x199),'children':_0x277edc}),_0x5b0427&&a19_0x380a92(Text,{'color':_0x1f3e06(0x178),'children':['\x20←\x20',_0x5b0427]})]}),!_0x5b0427&&a19_0x2f0187(Box,{'children':a19_0x380a92(Text,{'color':_0x1f3e06(0x16d),'children':['\x20\x20',_0x370ab2(_0x1f3e06(0x177))]})})]}),_0x235ebb?a19_0x380a92(Box,{'children':[a19_0x380a92(Text,{'children':['\x20\x20',_0x370ab2('appMenu.updateCdn.input.cssUrl.label')]}),a19_0x2f0187(Text,{'color':_0x1f3e06(0x199),'children':_0x235ebb})]}):_0x5f235b===_0x1f3e06(0x18b)&&a19_0x380a92(a19_0x59a322,{'children':[a19_0x380a92(Box,{'children':[a19_0x380a92(Text,{'children':['\x20\x20',_0x370ab2(_0x1f3e06(0x197))]}),a19_0x2f0187(Text,{'color':_0x1f3e06(0x199),'children':_0x277edc}),_0x5b0427&&a19_0x380a92(Text,{'color':_0x1f3e06(0x178),'children':[_0x1f3e06(0x18c),_0x5b0427]})]}),!_0x5b0427&&a19_0x2f0187(Box,{'children':a19_0x380a92(Text,{'color':_0x1f3e06(0x16d),'children':['\x20\x20',_0x370ab2(_0x1f3e06(0x16a))]})})]})]})]});}
@@ -1 +1 @@
1
- function a24_0x59a3(_0x42849f,_0x44a0c3){_0x42849f=_0x42849f-0x15a;const _0x38712e=a24_0x3871();let _0x59a3cf=_0x38712e[_0x42849f];return _0x59a3cf;}const a24_0x39904c=a24_0x59a3;(function(_0x339595,_0x3ebc58){const _0x1c4a2e=a24_0x59a3,_0x5a1d90=_0x339595();while(!![]){try{const _0x390cb2=parseInt(_0x1c4a2e(0x15f))/0x1*(parseInt(_0x1c4a2e(0x179))/0x2)+parseInt(_0x1c4a2e(0x167))/0x3*(-parseInt(_0x1c4a2e(0x16a))/0x4)+parseInt(_0x1c4a2e(0x17d))/0x5*(parseInt(_0x1c4a2e(0x163))/0x6)+parseInt(_0x1c4a2e(0x180))/0x7+parseInt(_0x1c4a2e(0x178))/0x8*(-parseInt(_0x1c4a2e(0x15a))/0x9)+-parseInt(_0x1c4a2e(0x15d))/0xa+parseInt(_0x1c4a2e(0x17c))/0xb*(parseInt(_0x1c4a2e(0x169))/0xc);if(_0x390cb2===_0x3ebc58)break;else _0x5a1d90['push'](_0x5a1d90['shift']());}catch(_0xbe1164){_0x5a1d90['push'](_0x5a1d90['shift']());}}}(a24_0x3871,0x2f9fe));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a24_0x3871(){const _0x54d7bc=['status','142140fsQoiy','4bNUmam','更新菜单资源失败:\x20','path','json','正在更新菜单资源链接:\x20','!\x20请使用以下方式之一:','创建菜单失败,HTTP状态码:\x20','stringify','data','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','resources','error','24GwaLWD','28154YUXRMd','errorMsg','log','220HrlYEw','76490OYVbAk','import','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','1592766zVBwvh','/smartapi/menu/update','label','942237oSEiwV','未知错误','errorCode','191940AmMbuh','application/json','17ibxxVx','菜单资源同步成功:\x20','success','info','6VxMhCV','appcode','SdkDemo1','POST','572106JEoNaB'];a24_0x3871=function(){return _0x54d7bc;};return a24_0x3871();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel='update-menu-cdn-url';import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a24_0x39904c(0x165),'path':'sdk-demo','resources':[a24_0x39904c(0x17f),'https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0xc30e70){const _0x494668=a24_0x39904c,_0x4a0e26=config?.[_0x494668(0x164)];if(!_0x4a0e26){const _0x17427c='未提供应用AppCode,且配置中也没有默认值';logger[_0x494668(0x177)](logLabel,_0x17427c),console[_0x494668(0x177)]('×\x20'+_0x17427c),console['log'](_0x494668(0x16f)),console[_0x494668(0x17b)](_0x494668(0x175)),console[_0x494668(0x17b)](_0x494668(0x174));return;}logger[_0x494668(0x162)](logLabel,_0x494668(0x16e)+_0xc30e70['label']+'\x20('+_0xc30e70[_0x494668(0x16c)]+')');const _0x5a191d={'id':_0xc30e70['id'],'appCode':_0x4a0e26,'extend':{'loadScriptMode':_0x494668(0x17e),'resources':_0xc30e70[_0x494668(0x176)]?JSON[_0x494668(0x171)](_0xc30e70['resources']):undefined}},_0x3cac85=await fetch(getApiDomain()+_0x494668(0x181),{'method':_0x494668(0x166),'body':JSON[_0x494668(0x171)](_0x5a191d),'headers':{'Content-Type':_0x494668(0x15e),'Cookie':getCookie()}});if(!_0x3cac85['ok']){if(_0x3cac85[_0x494668(0x168)]===0x191){const _0x24974c=_0x494668(0x173);logger['error'](logLabel,_0x24974c,{'status':_0x3cac85['status'],'menu':_0xc30e70[_0x494668(0x182)]});throw new Error(_0x24974c);}const _0x1bb506=_0x494668(0x170)+_0x3cac85['status'];logger[_0x494668(0x177)](logLabel,_0x1bb506,{'menu':_0xc30e70[_0x494668(0x182)]});throw new Error(_0x1bb506);}const _0x10954a=await _0x3cac85[_0x494668(0x16d)]();if(!_0x10954a[_0x494668(0x161)]){const _0x8e0389=_0x494668(0x16b)+(_0x10954a['errorMsg']||_0x494668(0x15b));logger[_0x494668(0x177)](logLabel,_0x8e0389,{'errorCode':_0x10954a[_0x494668(0x15c)],'errorMsg':_0x10954a[_0x494668(0x17a)],'menu':_0xc30e70[_0x494668(0x182)]});throw new Error(_0x8e0389);}logger[_0x494668(0x162)](logLabel,_0x494668(0x160)+_0xc30e70[_0x494668(0x182)],_0x10954a[_0x494668(0x172)]);}
1
+ const a21_0x1ad4df=a21_0x837e;function a21_0x837e(_0x1efdce,_0x36f87d){_0x1efdce=_0x1efdce-0xf1;const _0x4abb65=a21_0x4abb();let _0x837e46=_0x4abb65[_0x1efdce];return _0x837e46;}(function(_0x24d007,_0x21d1f7){const _0x1baafa=a21_0x837e,_0x5e50be=_0x24d007();while(!![]){try{const _0x520854=-parseInt(_0x1baafa(0x113))/0x1+-parseInt(_0x1baafa(0x109))/0x2*(parseInt(_0x1baafa(0x107))/0x3)+parseInt(_0x1baafa(0x100))/0x4+-parseInt(_0x1baafa(0x114))/0x5+-parseInt(_0x1baafa(0xf6))/0x6*(-parseInt(_0x1baafa(0x101))/0x7)+-parseInt(_0x1baafa(0x10d))/0x8+-parseInt(_0x1baafa(0xf7))/0x9*(-parseInt(_0x1baafa(0xf3))/0xa);if(_0x520854===_0x21d1f7)break;else _0x5e50be['push'](_0x5e50be['shift']());}catch(_0x189704){_0x5e50be['push'](_0x5e50be['shift']());}}}(a21_0x4abb,0x4ea06));import{getCookie}from'../auth/get-cookie.js';function a21_0x4abb(){const _0xdf4422=['json','resources','2210768cQFqNJ','error','sdk-demo','info','appMenu.updateCdn.error.updateFailed','status','213769OuIGwn','3030520dyPsoU','data','appMenu.updateCdn.updating','40820qfowAY','errorCode','errorMsg','6dqfRLk','2763NdyPYf','log','appcode','appMenu.updateCdn.success.synced','import','label','appMenu.error.appCodeHint.option1','appMenu.error.missingAppCode','common.error','278648hFKMRq','1891106MdtAuJ','stringify','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','path','/smartapi/menu/update','SdkDemo1','524163pxUqSG','appMenu.error.appCodeHint.title','2wfFlLZ','update-menu-cdn-url'];a21_0x4abb=function(){return _0xdf4422;};return a21_0x4abb();}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import a21_0x4ba9ba from'../i18n/index.js';const config=readConfig(),logLabel=a21_0x1ad4df(0x10a),t=a21_0x4ba9ba['t']['bind'](a21_0x4ba9ba);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a21_0x1ad4df(0x106),'path':a21_0x1ad4df(0x10f),'resources':['https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js',a21_0x1ad4df(0x103)]});export async function updateMenuCdnUrl(_0x5a23d4){const _0x5caf56=a21_0x1ad4df,_0x67ffb9=config?.[_0x5caf56(0xf9)];if(!_0x67ffb9){const _0x5b8d57=t(_0x5caf56(0xfe));logger['error'](logLabel,_0x5b8d57),console['error']('×\x20'+_0x5b8d57),console[_0x5caf56(0xf8)](t(_0x5caf56(0x108))),console['log'](t(_0x5caf56(0xfd))),console[_0x5caf56(0xf8)](t('appMenu.error.appCodeHint.option2'));return;}logger[_0x5caf56(0x110)](logLabel,t(_0x5caf56(0xf2),{'label':_0x5a23d4[_0x5caf56(0xfc)],'path':_0x5a23d4[_0x5caf56(0x104)]}));const _0x9e8b9c={'id':_0x5a23d4['id'],'appCode':_0x67ffb9,'extend':{'loadScriptMode':_0x5caf56(0xfb),'resources':_0x5a23d4[_0x5caf56(0x10c)]?JSON[_0x5caf56(0x102)](_0x5a23d4[_0x5caf56(0x10c)]):undefined}},_0x71447e=await fetch(getApiDomain()+_0x5caf56(0x105),{'method':'POST','body':JSON['stringify'](_0x9e8b9c),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x71447e['ok']){if(_0x71447e[_0x5caf56(0x112)]===0x191){const _0x1794f8=t('appMenu.error.authExpired');logger[_0x5caf56(0x10e)](logLabel,_0x1794f8,{'status':_0x71447e[_0x5caf56(0x112)],'menu':_0x5a23d4[_0x5caf56(0xfc)]});throw new Error(_0x1794f8);}const _0x532ebe=t(_0x5caf56(0x111),{'error':_0x71447e[_0x5caf56(0x112)]});logger[_0x5caf56(0x10e)](logLabel,_0x532ebe,{'menu':_0x5a23d4[_0x5caf56(0xfc)]});throw new Error(_0x532ebe);}const _0x3dac03=await _0x71447e[_0x5caf56(0x10b)]();if(!_0x3dac03['success']){const _0x328351=t(_0x5caf56(0x111),{'error':_0x3dac03[_0x5caf56(0xf5)]||t(_0x5caf56(0xff))});logger[_0x5caf56(0x10e)](logLabel,_0x328351,{'errorCode':_0x3dac03[_0x5caf56(0xf4)],'errorMsg':_0x3dac03[_0x5caf56(0xf5)],'menu':_0x5a23d4[_0x5caf56(0xfc)]});throw new Error(_0x328351);}logger[_0x5caf56(0x110)](logLabel,t(_0x5caf56(0xfa),{'label':_0x5a23d4[_0x5caf56(0xfc)]}),_0x3dac03[_0x5caf56(0xf1)]);}
@@ -1 +1 @@
1
- (function(_0x473f5c,_0xea03db){const _0x4dd26a=a25_0x525e,_0x67646f=_0x473f5c();while(!![]){try{const _0x32ece3=-parseInt(_0x4dd26a(0x83))/0x1+-parseInt(_0x4dd26a(0x88))/0x2+parseInt(_0x4dd26a(0x82))/0x3+-parseInt(_0x4dd26a(0x85))/0x4+parseInt(_0x4dd26a(0x7d))/0x5+-parseInt(_0x4dd26a(0x80))/0x6*(-parseInt(_0x4dd26a(0x87))/0x7)+parseInt(_0x4dd26a(0x89))/0x8*(parseInt(_0x4dd26a(0x7e))/0x9);if(_0x32ece3===_0xea03db)break;else _0x67646f['push'](_0x67646f['shift']());}catch(_0x2b1d6d){_0x67646f['push'](_0x67646f['shift']());}}}(a25_0x3387,0xd2117));import{jsx as a25_0x3cd392,jsxs as a25_0x3dc937}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';function a25_0x3387(){const _0x196d7e=['1131084FkVzxu','1194581JSnaIF','column','3316124CASVKt','dots','1596721EhfQhb','2294210feRkjy','172504gCwSaJ','按\x20“q”\x20退出。','then','gray','log','请前往浏览器完成登录。','4822300ZuZWQl','837qyPzKI','finally','18GAJjuu','正在登录...\x20'];a25_0x3387=function(){return _0x196d7e;};return a25_0x3387();}import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a25_0x3f5d87 from'ink-spinner';function a25_0x525e(_0x4c90e5,_0x391877){_0x4c90e5=_0x4c90e5-0x7d;const _0x338708=a25_0x3387();let _0x525eb5=_0x338708[_0x4c90e5];return _0x525eb5;}export function AuthServer(){const _0x45a981=a25_0x525e,{exit:_0x47b910}=useApp(),[_0x246031,_0x15b36b]=useState(![]),[_0x28129d,_0x39d922]=useState(!![]),[_0x508d1e,_0x14843e]=useState(![]),[_0x18135f,_0x2dff0a]=useState(![]);useEffect(()=>{const _0x471f5c=a25_0x525e;getIsSessionValid()[_0x471f5c(0x8b)](_0x15b36b)[_0x471f5c(0x7f)](()=>_0x39d922(![]));},[]),useEffect(()=>{!_0x28129d&&_0x246031&&(console['log']('√\x20当前为有效会话,无需重新登录。'),_0x47b910());},[_0x28129d,_0x246031,_0x47b910]),useEffect(()=>{const _0x1fd8fc=a25_0x525e;_0x18135f&&(console[_0x1fd8fc(0x8d)]('*\x20登录成功!'),_0x47b910());},[_0x18135f,_0x47b910]),useInput((_0x4a4305,_0x59f244)=>{const _0xa20496=a25_0x525e;_0x59f244['return']&&(_0x14843e(!![]),authServer({'silent':!![]})[_0xa20496(0x8b)](_0x1d371f=>{_0x2dff0a(_0x1d371f);})),_0x4a4305==='q'&&_0x47b910();});if(_0x28129d)return null;if(_0x246031||_0x18135f)return null;return a25_0x3cd392(Box,{'flexDirection':_0x45a981(0x84),'marginTop':0x1,'marginBottom':0x1,'children':_0x508d1e?a25_0x3dc937(Box,{'children':[a25_0x3cd392(Box,{'width':'1'}),a25_0x3dc937(Text,{'color':'green','children':[a25_0x3cd392(a25_0x3f5d87,{'type':_0x45a981(0x86)}),'\x20\x20']}),a25_0x3cd392(Text,{'children':_0x45a981(0x81)}),a25_0x3cd392(Text,{'color':'gray','children':_0x45a981(0x8e)})]}):a25_0x3dc937(Box,{'children':[a25_0x3cd392(Box,{'width':'1'}),a25_0x3cd392(Text,{'children':'*\x20按回车开始登录。'}),a25_0x3cd392(Text,{'color':_0x45a981(0x8c),'children':_0x45a981(0x8a)})]})});}
1
+ (function(_0x56b614,_0x28425c){const _0x16d1be=a22_0x37bd,_0x1a722c=_0x56b614();while(!![]){try{const _0x23ac1a=-parseInt(_0x16d1be(0xb1))/0x1*(parseInt(_0x16d1be(0xac))/0x2)+-parseInt(_0x16d1be(0xb8))/0x3*(parseInt(_0x16d1be(0xb3))/0x4)+-parseInt(_0x16d1be(0xa9))/0x5*(-parseInt(_0x16d1be(0xbc))/0x6)+-parseInt(_0x16d1be(0xae))/0x7*(parseInt(_0x16d1be(0xb4))/0x8)+-parseInt(_0x16d1be(0xb9))/0x9+parseInt(_0x16d1be(0xb7))/0xa+parseInt(_0x16d1be(0xb0))/0xb;if(_0x23ac1a===_0x28425c)break;else _0x1a722c['push'](_0x1a722c['shift']());}catch(_0x55f739){_0x1a722c['push'](_0x1a722c['shift']());}}}(a22_0x4bc6,0x4b79b));function a22_0x4bc6(){const _0x3ba068=['336608gwjcWK','118736YZQIPV','auth.login.pressEnter','log','2592100Cpczri','6VTRGnj','1883241aTrevf','auth.login.pressQToExit','column','489372aqTzkv','auth.login.successCli','25QboNQx','auth.session.valid','gray','603004vqvFxo','finally','7lNzNFC','auth.login.browserPrompt','3696264TvArdi','1fYqNoJ','then'];a22_0x4bc6=function(){return _0x3ba068;};return a22_0x4bc6();}import{jsx as a22_0x4b8de9,jsxs as a22_0x347feb}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';function a22_0x37bd(_0xa873e1,_0x3a6fa8){_0xa873e1=_0xa873e1-0xa8;const _0x4bc6b3=a22_0x4bc6();let _0x37bd6a=_0x4bc6b3[_0xa873e1];return _0x37bd6a;}import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a22_0x1e54b5 from'ink-spinner';import{useI18n}from'../i18n/hooks.js';export function AuthServer(){const _0xf4c1ff=a22_0x37bd,{exit:_0x3d3c92}=useApp(),{t:_0x15ca9d}=useI18n(),[_0x146a53,_0x5d7887]=useState(![]),[_0x541783,_0x1599e4]=useState(!![]),[_0x2f4b84,_0x2a6af9]=useState(![]),[_0x3ccb37,_0x53d480]=useState(![]);useEffect(()=>{const _0x273b72=a22_0x37bd;getIsSessionValid()[_0x273b72(0xb2)](_0x5d7887)[_0x273b72(0xad)](()=>_0x1599e4(![]));},[]),useEffect(()=>{const _0x1b42ab=a22_0x37bd;!_0x541783&&_0x146a53&&(console[_0x1b42ab(0xb6)](_0x15ca9d(_0x1b42ab(0xaa))),_0x3d3c92());},[_0x541783,_0x146a53,_0x3d3c92]),useEffect(()=>{const _0x35edba=a22_0x37bd;_0x3ccb37&&(console[_0x35edba(0xb6)]('*\x20'+_0x15ca9d(_0x35edba(0xa8))),_0x3d3c92());},[_0x3ccb37,_0x3d3c92]),useInput((_0x51b9bf,_0x9622b5)=>{const _0x14c977=a22_0x37bd;_0x9622b5['return']&&(_0x2a6af9(!![]),authServer({'silent':!![]})[_0x14c977(0xb2)](_0x17a258=>{_0x53d480(_0x17a258);})),_0x51b9bf==='q'&&_0x3d3c92();});if(_0x541783)return null;if(_0x146a53||_0x3ccb37)return null;return a22_0x4b8de9(Box,{'flexDirection':_0xf4c1ff(0xbb),'marginTop':0x1,'marginBottom':0x1,'children':_0x2f4b84?a22_0x347feb(Box,{'children':[a22_0x4b8de9(Box,{'width':'1'}),a22_0x347feb(Text,{'color':'green','children':[a22_0x4b8de9(a22_0x1e54b5,{'type':'dots'}),'\x20\x20']}),a22_0x347feb(Text,{'children':[_0x15ca9d('auth.login.inProgress'),'\x20']}),a22_0x4b8de9(Text,{'color':'gray','children':_0x15ca9d(_0xf4c1ff(0xaf))})]}):a22_0x347feb(Box,{'children':[a22_0x4b8de9(Box,{'width':'1'}),a22_0x4b8de9(Text,{'children':_0x15ca9d(_0xf4c1ff(0xb5))}),a22_0x4b8de9(Text,{'color':_0xf4c1ff(0xab),'children':_0x15ca9d(_0xf4c1ff(0xba))})]})});}
@@ -1 +1 @@
1
- function a26_0x33b7(){const _0x2719ae=['⚠️\x20\x20无法自动打开浏览器','address','error','listen','https://g.yuntooai.com/cert/lovrabet-dev.json','76385iIwElb','✅\x20浏览器已自动打开,请在浏览器中完成登录','object','cookie','start\x20\x22\x22\x20\x22','🔗\x20请手动复制登录地址到浏览器:','platform','2zeeTIM','<!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>','208VkaFmQ','text/html;\x20charset=utf-8','isAuth','writeHead','9fZspaY','25593RKeHVj','6918920vdmUap','https://dev.lovrabet.com:','log','📍\x20登录地址:','61158mOeCKM','5286694JXTwVC','Auth\x20server\x20error:','🌐\x20正在尝试自动打开浏览器...','204OOYLfd','15600904ToBMwc','6557944KCBsWt','then','session','port','win32','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','json','end','utf-8','darwin'];a26_0x33b7=function(){return _0x2719ae;};return a26_0x33b7();}const a26_0x43dc44=a26_0x2839;(function(_0x1f683e,_0x1f606f){const _0x1463b1=a26_0x2839,_0x329495=_0x1f683e();while(!![]){try{const _0x15c45c=-parseInt(_0x1463b1(0x166))/0x1*(-parseInt(_0x1463b1(0x187))/0x2)+-parseInt(_0x1463b1(0x16b))/0x3*(parseInt(_0x1463b1(0x189))/0x4)+parseInt(_0x1463b1(0x180))/0x5*(-parseInt(_0x1463b1(0x16f))/0x6)+-parseInt(_0x1463b1(0x16c))/0x7+-parseInt(_0x1463b1(0x171))/0x8*(-parseInt(_0x1463b1(0x18d))/0x9)+parseInt(_0x1463b1(0x167))/0xa+parseInt(_0x1463b1(0x170))/0xb;if(_0x15c45c===_0x1f606f)break;else _0x329495['push'](_0x329495['shift']());}catch(_0x5751d1){_0x329495['push'](_0x329495['shift']());}}}(a26_0x33b7,0x978d8));function a26_0x2839(_0x52d3db,_0x4f44c4){_0x52d3db=_0x52d3db-0x166;const _0x33b785=a26_0x33b7();let _0x283938=_0x33b785[_0x52d3db];return _0x283938;}import{writeFileSync}from'node:fs';import a26_0x471170 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(_0x49ed90){const _0x5b3922=a26_0x2839,_0x5ee821=_0x49ed90?.['silent']||![];if(await getIsSessionValid())return!![];const _0xb4aa01=await(await fetch(_0x5b3922(0x17f)))['json']();return new Promise(async(_0x314119,_0x4bec15)=>{const _0x43bb91=_0x5b3922;let _0x1edcd4=0x0;const _0x4c5786=a26_0x471170['createServer'](_0xb4aa01,async(_0x365844,_0x8f6ae9)=>{const _0x2bfa9b=a26_0x2839,_0x3798ab=getUserDomain(),_0xbb498a=_0x365844['headers'][_0x2bfa9b(0x183)]||'',_0xaaf12c=await fetch(_0x3798ab+'/api/auth/get-session',{'headers':{'cookie':_0xbb498a}})[_0x2bfa9b(0x172)](_0x2177a3=>_0x2177a3[_0x2bfa9b(0x177)]()),_0x58859a=_0xaaf12c&&_0xaaf12c[_0x2bfa9b(0x173)]&&_0xaaf12c['user'];if(_0x58859a){writeFileSync(cookieFile,_0xbb498a,_0x2bfa9b(0x179)),_0x314119(!![]);const _0x3b02db=_0x2bfa9b(0x188);_0x8f6ae9[_0x2bfa9b(0x18c)](0xc8,{'Content-Type':_0x2bfa9b(0x18a)}),_0x8f6ae9['end'](_0x3b02db),_0x4c5786['close']();}else{const _0x40e4e7=''+encodeURIComponent(_0x2bfa9b(0x168)+_0x1edcd4);_0x8f6ae9['writeHead'](0x12e,{'location':_0x3798ab+'/sign-in?redirect='+_0x40e4e7}),_0x8f6ae9[_0x2bfa9b(0x178)]();return;}});_0x4c5786[_0x43bb91(0x17e)](0x0,'127.0.0.1',()=>{const _0x1cc2ce=_0x43bb91,_0x3fffa8=_0x4c5786[_0x1cc2ce(0x17c)]();_0x1edcd4=typeof _0x3fffa8===_0x1cc2ce(0x182)&&_0x3fffa8?_0x3fffa8[_0x1cc2ce(0x174)]:Number(_0x3fffa8);const _0x3a021c=_0x1cc2ce(0x168)+_0x1edcd4;!_0x5ee821&&(console[_0x1cc2ce(0x169)]('🔐\x20正在启动登录服务...'),console['log'](_0x1cc2ce(0x16a),_0x3a021c),console[_0x1cc2ce(0x169)](_0x1cc2ce(0x16e)),console[_0x1cc2ce(0x169)](''),console[_0x1cc2ce(0x169)](_0x1cc2ce(0x176)),console[_0x1cc2ce(0x169)]('')),openInBrowser(_0x3a021c)['then'](_0x2c57b9=>{const _0x5b202a=_0x1cc2ce;!_0x5ee821&&(_0x2c57b9?console['log'](_0x5b202a(0x181)):(console[_0x5b202a(0x169)](_0x5b202a(0x17b)),console[_0x5b202a(0x169)](_0x5b202a(0x185),_0x3a021c)),console['log'](''));})['catch'](()=>{const _0x33eb48=_0x1cc2ce;!_0x5ee821&&(console['log'](_0x33eb48(0x17b)),console[_0x33eb48(0x169)](_0x33eb48(0x185),_0x3a021c),console['log'](''));});}),_0x4c5786['on']('error',_0x43d905=>{const _0x1aff22=_0x43bb91;!_0x5ee821&&console[_0x1aff22(0x17d)](_0x1aff22(0x16d),_0x43d905),_0x4bec15(_0x43d905);});});}function openInBrowser(_0x1adcdd){return new Promise(_0x3fcdd4=>{const _0xde7e62=a26_0x2839,_0x32647b=process[_0xde7e62(0x186)];let _0x28a5f0;if(_0x32647b===_0xde7e62(0x175))_0x28a5f0=_0xde7e62(0x184)+_0x1adcdd+'\x22';else _0x32647b===_0xde7e62(0x17a)?_0x28a5f0='open\x20\x22'+_0x1adcdd+'\x22':_0x28a5f0='xdg-open\x20\x22'+_0x1adcdd+'\x22';exec(_0x28a5f0,_0x23bf5b=>{_0x23bf5b?_0x3fcdd4(![]):_0x3fcdd4(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a26_0x43dc44(0x169)](a26_0x43dc44(0x18b),isAuth);}
1
+ const a23_0x391e16=a23_0x2239;function a23_0x2239(_0x5b2f08,_0x422c9f){_0x5b2f08=_0x5b2f08-0x1c6;const _0x49afe9=a23_0x49af();let _0x223946=_0x49afe9[_0x5b2f08];return _0x223946;}(function(_0xd64d88,_0xe83547){const _0x23d9fd=a23_0x2239,_0x1be039=_0xd64d88();while(!![]){try{const _0x307e9d=-parseInt(_0x23d9fd(0x1f0))/0x1*(parseInt(_0x23d9fd(0x1ed))/0x2)+-parseInt(_0x23d9fd(0x1ca))/0x3+-parseInt(_0x23d9fd(0x1d9))/0x4*(-parseInt(_0x23d9fd(0x1e8))/0x5)+parseInt(_0x23d9fd(0x1f4))/0x6+parseInt(_0x23d9fd(0x1e9))/0x7+-parseInt(_0x23d9fd(0x1d8))/0x8+parseInt(_0x23d9fd(0x1c8))/0x9*(parseInt(_0x23d9fd(0x1cf))/0xa);if(_0x307e9d===_0xe83547)break;else _0x1be039['push'](_0x1be039['shift']());}catch(_0x16719b){_0x1be039['push'](_0x1be039['shift']());}}}(a23_0x49af,0xf1bfc));import{writeFileSync}from'node:fs';import a23_0x87de4c 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';import a23_0x14163e from'../i18n/index.js';const t=a23_0x14163e['t'][a23_0x391e16(0x1cb)](a23_0x14163e);export async function authServer(_0x2e183d){const _0x2bb4b2=a23_0x391e16,_0xcbb96f=_0x2e183d?.[_0x2bb4b2(0x1ef)]||![];if(await getIsSessionValid())return!![];const _0x277348=await(await fetch(_0x2bb4b2(0x1e0)))[_0x2bb4b2(0x1e1)]();return new Promise(async(_0x59ab66,_0x82adc0)=>{const _0x44daf4=_0x2bb4b2;let _0x407069=0x0;const _0x35d466=a23_0x87de4c[_0x44daf4(0x1d3)](_0x277348,async(_0x51ef59,_0x273e6e)=>{const _0x5aa08b=_0x44daf4,_0x17f63c=getUserDomain(),_0x30c184=_0x51ef59[_0x5aa08b(0x1c6)][_0x5aa08b(0x1ec)]||'',_0x34d45e=await fetch(_0x17f63c+'/api/auth/get-session',{'headers':{'cookie':_0x30c184}})[_0x5aa08b(0x1d1)](_0x1da872=>_0x1da872[_0x5aa08b(0x1e1)]()),_0x36b90a=_0x34d45e&&_0x34d45e[_0x5aa08b(0x1f7)]&&_0x34d45e[_0x5aa08b(0x1de)];if(_0x36b90a){writeFileSync(cookieFile,_0x30c184,_0x5aa08b(0x1dc)),_0x59ab66(!![]);const _0x26335b=t(_0x5aa08b(0x1da)),_0x5b3791=t(_0x5aa08b(0x1d5),{'seconds':_0x5aa08b(0x1d2)}),_0x3a2d5a=t(_0x5aa08b(0x1c9)),_0x25b319=_0x5aa08b(0x1ee)+_0x26335b+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x5b3791+_0x5aa08b(0x1d0)+_0x3a2d5a+_0x5aa08b(0x1f5);_0x273e6e[_0x5aa08b(0x1e3)](0xc8,{'Content-Type':_0x5aa08b(0x1cc)}),_0x273e6e[_0x5aa08b(0x1df)](_0x25b319),_0x35d466['close']();}else{const _0xc246a9=''+encodeURIComponent(_0x5aa08b(0x1ea)+_0x407069);_0x273e6e[_0x5aa08b(0x1e3)](0x12e,{'location':_0x17f63c+_0x5aa08b(0x1e6)+_0xc246a9}),_0x273e6e['end']();return;}});_0x35d466['listen'](0x0,_0x44daf4(0x1e2),()=>{const _0x11ba86=_0x44daf4,_0x48ed37=_0x35d466['address']();_0x407069=typeof _0x48ed37===_0x11ba86(0x1c7)&&_0x48ed37?_0x48ed37['port']:Number(_0x48ed37);const _0x57d392=_0x11ba86(0x1ea)+_0x407069;!_0xcbb96f&&(console[_0x11ba86(0x1ce)](t(_0x11ba86(0x1eb))),console['log'](t(_0x11ba86(0x1d4)),_0x57d392),console['log'](t(_0x11ba86(0x1dd))),console[_0x11ba86(0x1ce)](''),console[_0x11ba86(0x1ce)](t(_0x11ba86(0x1e5))),console[_0x11ba86(0x1ce)]('')),openInBrowser(_0x57d392)[_0x11ba86(0x1d1)](_0x3b0cb5=>{const _0x5a3d00=_0x11ba86;!_0xcbb96f&&(_0x3b0cb5?console[_0x5a3d00(0x1ce)](t('auth.server.browserOpened')):(console[_0x5a3d00(0x1ce)](t(_0x5a3d00(0x1d6))),console['log'](t(_0x5a3d00(0x1cd)),_0x57d392)),console[_0x5a3d00(0x1ce)](''));})[_0x11ba86(0x1f3)](()=>{const _0x4ff5d2=_0x11ba86;!_0xcbb96f&&(console[_0x4ff5d2(0x1ce)](t(_0x4ff5d2(0x1d6))),console['log'](t(_0x4ff5d2(0x1cd)),_0x57d392),console['log'](''));});}),_0x35d466['on'](_0x44daf4(0x1e4),_0x109863=>{const _0x157a5b=_0x44daf4;!_0xcbb96f&&console[_0x157a5b(0x1e4)]('Auth\x20server\x20error:',_0x109863),_0x82adc0(_0x109863);});});}function openInBrowser(_0x338a23){return new Promise(_0x1dbdc0=>{const _0x63a4df=a23_0x2239,_0x222d48=process[_0x63a4df(0x1db)];let _0x3ce859;if(_0x222d48===_0x63a4df(0x1e7))_0x3ce859=_0x63a4df(0x1f1)+_0x338a23+'\x22';else _0x222d48==='darwin'?_0x3ce859=_0x63a4df(0x1f6)+_0x338a23+'\x22':_0x3ce859=_0x63a4df(0x1d7)+_0x338a23+'\x22';exec(_0x3ce859,_0x1fa509=>{_0x1fa509?_0x1dbdc0(![]):_0x1dbdc0(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a23_0x391e16(0x1ce)](a23_0x391e16(0x1f2),isAuth);}function a23_0x49af(){const _0xb129bb=['isAuth','catch','9993402qbmrIH','</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>','open\x20\x22','session','headers','object','18RfZZqy','auth.login.success.manualClose','5331510Adbtal','bind','text/html;\x20charset=utf-8','auth.server.manualCopyUrl','log','15233340HxNcOj','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','then','<span\x20id=\x22t\x22>5</span>','createServer','auth.server.loginUrl','auth.login.success.message','auth.server.browserOpenFailed','xdg-open\x20\x22','15427504ENlGag','156304xEJzkf','auth.login.success.title','platform','utf-8','auth.server.openingBrowser','user','end','https://g.yuntooai.com/cert/lovrabet-dev.json','json','127.0.0.1','writeHead','error','auth.server.manualOpenHint','/sign-in?redirect=','win32','10RVXtiK','4777199AHzqfl','https://dev.lovrabet.com:','auth.server.starting','cookie','1554064unYlOy','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','silent','1OlGxst','start\x20\x22\x22\x20\x22'];a23_0x49af=function(){return _0xb129bb;};return a23_0x49af();}
@@ -1 +1 @@
1
- const a27_0x2b2326=a27_0x3c8b;function a27_0x3c8b(_0x4e419a,_0x28d8c6){_0x4e419a=_0x4e419a-0x112;const _0x5e5442=a27_0x5e54();let _0x3c8ba7=_0x5e5442[_0x4e419a];return _0x3c8ba7;}(function(_0x16392c,_0x23fe86){const _0x51b45d=a27_0x3c8b,_0x49502e=_0x16392c();while(!![]){try{const _0x5f2368=-parseInt(_0x51b45d(0x114))/0x1*(parseInt(_0x51b45d(0x116))/0x2)+parseInt(_0x51b45d(0x118))/0x3+-parseInt(_0x51b45d(0x11a))/0x4+parseInt(_0x51b45d(0x117))/0x5*(parseInt(_0x51b45d(0x113))/0x6)+parseInt(_0x51b45d(0x119))/0x7+parseInt(_0x51b45d(0x11b))/0x8*(-parseInt(_0x51b45d(0x112))/0x9)+parseInt(_0x51b45d(0x11d))/0xa*(parseInt(_0x51b45d(0x115))/0xb);if(_0x5f2368===_0x23fe86)break;else _0x49502e['push'](_0x49502e['shift']());}catch(_0x3d0517){_0x49502e['push'](_0x49502e['shift']());}}}(a27_0x5e54,0x60f7a));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+a27_0x2b2326(0x11c);export const cookieFile=configDir+a27_0x2b2326(0x11e);mkdirSync(configDir,{'recursive':!![]});function a27_0x5e54(){const _0x76ae5e=['1562388EPMsKY','88RNcwir','/.lovrabet','160ZfOTZk','/cookie','328239AcgSfZ','78cKhkQs','8PXnMjF','172535uMsWVN','134084EBptQQ','122885BWTOjM','1642881dyKAYh','4250428HCtcnT'];a27_0x5e54=function(){return _0x76ae5e;};return a27_0x5e54();}
1
+ function a24_0x39a6(){const _0x30c1fe=['205UauPVa','.lovrabet','84qmntQm','224799wCXYwN','2842499lKPOCF','640050gJseIO','18aBLbDJ','cookie','40mXVQgA','20800izNTdv','52328xzyqvz','804429bevGNC','427uhJWVM','2363952wXBKEu'];a24_0x39a6=function(){return _0x30c1fe;};return a24_0x39a6();}const a24_0x74d2e3=a24_0x3b89;(function(_0x4922b6,_0x274c17){const _0x51139c=a24_0x3b89,_0x374a2f=_0x4922b6();while(!![]){try{const _0x5ed61d=-parseInt(_0x51139c(0x1e1))/0x1+parseInt(_0x51139c(0x1e2))/0x2*(-parseInt(_0x51139c(0x1df))/0x3)+-parseInt(_0x51139c(0x1e5))/0x4*(-parseInt(_0x51139c(0x1dc))/0x5)+-parseInt(_0x51139c(0x1db))/0x6+parseInt(_0x51139c(0x1da))/0x7*(parseInt(_0x51139c(0x1d8))/0x8)+parseInt(_0x51139c(0x1d9))/0x9*(-parseInt(_0x51139c(0x1e4))/0xa)+-parseInt(_0x51139c(0x1e0))/0xb*(-parseInt(_0x51139c(0x1de))/0xc);if(_0x5ed61d===_0x274c17)break;else _0x374a2f['push'](_0x374a2f['shift']());}catch(_0x3df9fd){_0x374a2f['push'](_0x374a2f['shift']());}}}(a24_0x39a6,0x56b1d));import{mkdirSync}from'node:fs';function a24_0x3b89(_0x4feb87,_0x4479e7){_0x4feb87=_0x4feb87-0x1d8;const _0x39a637=a24_0x39a6();let _0x3b8966=_0x39a637[_0x4feb87];return _0x3b8966;}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a24_0x74d2e3(0x1dd));export const cookieFile=join(configDir,a24_0x74d2e3(0x1e3));mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a28_0x309d(){var _0x39a473=['12226599CYxjuK','utf-8','91ftjIgF','20Plxvaq','16617260IKDSYN','40664WRcPjx','9xrvLlF','162684IaJDWo','196320Ylotwp','973nTpImT','7544xAgnFC','1733790encMyI','69tMJhmq','25VSpxeM'];a28_0x309d=function(){return _0x39a473;};return a28_0x309d();}(function(_0x117098,_0x12aebc){var _0x2b46d7=a28_0x21ca,_0x2e88dc=_0x117098();while(!![]){try{var _0x308cc8=-parseInt(_0x2b46d7(0x1c9))/0x1*(parseInt(_0x2b46d7(0x1cb))/0x2)+-parseInt(_0x2b46d7(0x1c4))/0x3*(parseInt(_0x2b46d7(0x1cd))/0x4)+parseInt(_0x2b46d7(0x1c5))/0x5*(parseInt(_0x2b46d7(0x1c3))/0x6)+-parseInt(_0x2b46d7(0x1cf))/0x7*(-parseInt(_0x2b46d7(0x1d0))/0x8)+parseInt(_0x2b46d7(0x1cc))/0x9*(parseInt(_0x2b46d7(0x1ca))/0xa)+-parseInt(_0x2b46d7(0x1c6))/0xb+parseInt(_0x2b46d7(0x1ce))/0xc*(parseInt(_0x2b46d7(0x1c8))/0xd);if(_0x308cc8===_0x12aebc)break;else _0x2e88dc['push'](_0x2e88dc['shift']());}catch(_0x6ffd04){_0x2e88dc['push'](_0x2e88dc['shift']());}}}(a28_0x309d,0xdb606));function a28_0x21ca(_0x361326,_0x2a475a){_0x361326=_0x361326-0x1c3;var _0x309d4e=a28_0x309d();var _0x21ca5f=_0x309d4e[_0x361326];return _0x21ca5f;}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0xf18ef8=a28_0x21ca;try{return readFileSync(cookieFile,_0xf18ef8(0x1c7));}catch{}return'';}
1
+ (function(_0x242329,_0x45d346){var _0x591b37=a25_0x4c32,_0x4a9387=_0x242329();while(!![]){try{var _0x4baf78=-parseInt(_0x591b37(0xba))/0x1+parseInt(_0x591b37(0xbc))/0x2+-parseInt(_0x591b37(0xc2))/0x3*(parseInt(_0x591b37(0xb9))/0x4)+parseInt(_0x591b37(0xbb))/0x5+-parseInt(_0x591b37(0xc3))/0x6*(parseInt(_0x591b37(0xbd))/0x7)+parseInt(_0x591b37(0xc0))/0x8+-parseInt(_0x591b37(0xbe))/0x9*(-parseInt(_0x591b37(0xbf))/0xa);if(_0x4baf78===_0x45d346)break;else _0x4a9387['push'](_0x4a9387['shift']());}catch(_0x24e64a){_0x4a9387['push'](_0x4a9387['shift']());}}}(a25_0x22d1,0xd227c));import{readFileSync}from'node:fs';function a25_0x4c32(_0x30e187,_0x113461){_0x30e187=_0x30e187-0xb9;var _0x22d1b7=a25_0x22d1();var _0x4c32d7=_0x22d1b7[_0x30e187];return _0x4c32d7;}import{cookieFile}from'./constant.js';function a25_0x22d1(){var _0x446b76=['2152732UjZdwv','746582UvJoIz','8083325AEHMjZ','547506WDDwMS','145691dmZPOv','27QFZLxs','171260HnZNbj','8100136seHTbE','utf-8','6kLiiBo','78ZxHORD'];a25_0x22d1=function(){return _0x446b76;};return a25_0x22d1();}export function getCookie(){var _0x593b17=a25_0x4c32;try{return readFileSync(cookieFile,_0x593b17(0xc1));}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0x4b4e63,_0x6144c7){const _0x59e88b=a29_0x3b32,_0x538cbd=_0x4b4e63();while(!![]){try{const _0x397347=-parseInt(_0x59e88b(0xf0))/0x1+-parseInt(_0x59e88b(0xf7))/0x2*(-parseInt(_0x59e88b(0xfb))/0x3)+parseInt(_0x59e88b(0xf6))/0x4+-parseInt(_0x59e88b(0xee))/0x5*(parseInt(_0x59e88b(0xf1))/0x6)+-parseInt(_0x59e88b(0xf4))/0x7+parseInt(_0x59e88b(0xf3))/0x8+parseInt(_0x59e88b(0xf8))/0x9;if(_0x397347===_0x6144c7)break;else _0x538cbd['push'](_0x538cbd['shift']());}catch(_0x15389c){_0x538cbd['push'](_0x538cbd['shift']());}}}(a29_0x3367,0x91255));function a29_0x3367(){const _0xfbe53f=['session','3Advhti','4830765iDIkyg','/api/auth/get-session','418378EbzyvV','6ysJemL','utf-8','8427984XfCSmj','7363615lRngVh','then','1448504bCOvUD','931886RGNGPt','10344834btnOmT','user'];a29_0x3367=function(){return _0xfbe53f;};return a29_0x3367();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a29_0x3b32(_0x2d4ff5,_0xdced7e){_0x2d4ff5=_0x2d4ff5-0xee;const _0x3367a7=a29_0x3367();let _0x3b327a=_0x3367a7[_0x2d4ff5];return _0x3b327a;}import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0xc32a75=a29_0x3b32;try{if(!existsSync(cookieFile))return![];const _0x479684=readFileSync(cookieFile,_0xc32a75(0xf2)),_0x3b9e50=await fetch(getUserDomain()+_0xc32a75(0xef),{'headers':{'cookie':_0x479684}})[_0xc32a75(0xf5)](_0x20474e=>_0x20474e['json']());return _0x3b9e50&&_0x3b9e50[_0xc32a75(0xfa)]&&_0x3b9e50[_0xc32a75(0xf9)];}catch{}return![];}
1
+ (function(_0x2a3f5c,_0x148d66){const _0x21f16b=a26_0x3cc7,_0x585520=_0x2a3f5c();while(!![]){try{const _0x11b4a0=-parseInt(_0x21f16b(0x170))/0x1+-parseInt(_0x21f16b(0x16f))/0x2*(parseInt(_0x21f16b(0x16e))/0x3)+-parseInt(_0x21f16b(0x168))/0x4*(-parseInt(_0x21f16b(0x169))/0x5)+parseInt(_0x21f16b(0x167))/0x6+-parseInt(_0x21f16b(0x164))/0x7*(-parseInt(_0x21f16b(0x16a))/0x8)+parseInt(_0x21f16b(0x166))/0x9*(-parseInt(_0x21f16b(0x16b))/0xa)+parseInt(_0x21f16b(0x171))/0xb*(parseInt(_0x21f16b(0x165))/0xc);if(_0x11b4a0===_0x148d66)break;else _0x585520['push'](_0x585520['shift']());}catch(_0x3b5a09){_0x585520['push'](_0x585520['shift']());}}}(a26_0x1836,0x6e9dc));function a26_0x3cc7(_0x30c419,_0xf47752){_0x30c419=_0x30c419-0x164;const _0x1836fc=a26_0x1836();let _0x3cc77e=_0x1836fc[_0x30c419];return _0x3cc77e;}function a26_0x1836(){const _0x418401=['12fKCfiq','723885KoFnQm','32wuHajK','5240CBBjlK','session','/api/auth/get-session','3WNnckk','902364tfaYHz','646297UnmFHj','33YJDJAr','json','797482LpUbZA','5411004uTuKNt','15462GRfQTg','1248054oZmIcs'];a26_0x1836=function(){return _0x418401;};return a26_0x1836();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x5ee9cd=a26_0x3cc7;try{if(!existsSync(cookieFile))return![];const _0x215331=readFileSync(cookieFile,'utf-8'),_0x1fa1ed=await fetch(getUserDomain()+_0x5ee9cd(0x16d),{'headers':{'cookie':_0x215331}})['then'](_0x497453=>_0x497453[_0x5ee9cd(0x172)]());return _0x1fa1ed&&_0x1fa1ed[_0x5ee9cd(0x16c)]&&_0x1fa1ed['user'];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x1dfd05,_0x5ef246){var _0x588ac3=a30_0x5bbe,_0x234a83=_0x1dfd05();while(!![]){try{var _0x5ca011=parseInt(_0x588ac3(0x72))/0x1*(parseInt(_0x588ac3(0x74))/0x2)+-parseInt(_0x588ac3(0x75))/0x3+-parseInt(_0x588ac3(0x76))/0x4*(parseInt(_0x588ac3(0x79))/0x5)+-parseInt(_0x588ac3(0x77))/0x6*(-parseInt(_0x588ac3(0x73))/0x7)+parseInt(_0x588ac3(0x7b))/0x8+parseInt(_0x588ac3(0x7a))/0x9*(-parseInt(_0x588ac3(0x78))/0xa)+-parseInt(_0x588ac3(0x70))/0xb;if(_0x5ca011===_0x5ef246)break;else _0x234a83['push'](_0x234a83['shift']());}catch(_0x3bb4df){_0x234a83['push'](_0x234a83['shift']());}}}(a30_0x19a1,0xae58f));function a30_0x5bbe(_0x4b3a7e,_0xcb2329){_0x4b3a7e=_0x4b3a7e-0x70;var _0x19a167=a30_0x19a1();var _0x5bbe9f=_0x19a167[_0x4b3a7e];return _0x5bbe9f;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x5ecfbe=a30_0x5bbe;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x5ecfbe(0x71)](_0x5ecfbe(0x7c))):console[_0x5ecfbe(0x71)]('!\x20当前未登录');}function a30_0x19a1(){var _0x12594f=['14JuUvrF','634378LWmney','956193vmQZjV','5106292ocvwPr','3773418QIrjzn','230XlmJbO','5WLzzqN','76023cvxvUX','10621992WapaxH','✓\x20已退出登录','4389352ocTQbV','log','1dYjSWL'];a30_0x19a1=function(){return _0x12594f;};return a30_0x19a1();}
1
+ const a27_0x55c896=a27_0x231d;(function(_0x3870fd,_0xdcea30){const _0xa66ae5=a27_0x231d,_0x266ae5=_0x3870fd();while(!![]){try{const _0xcee9b5=-parseInt(_0xa66ae5(0x1a1))/0x1*(parseInt(_0xa66ae5(0x1a2))/0x2)+parseInt(_0xa66ae5(0x1a4))/0x3*(-parseInt(_0xa66ae5(0x199))/0x4)+parseInt(_0xa66ae5(0x195))/0x5*(-parseInt(_0xa66ae5(0x19b))/0x6)+parseInt(_0xa66ae5(0x1a3))/0x7+parseInt(_0xa66ae5(0x19c))/0x8*(-parseInt(_0xa66ae5(0x196))/0x9)+-parseInt(_0xa66ae5(0x19f))/0xa*(-parseInt(_0xa66ae5(0x19d))/0xb)+-parseInt(_0xa66ae5(0x198))/0xc*(-parseInt(_0xa66ae5(0x1a0))/0xd);if(_0xcee9b5===_0xdcea30)break;else _0x266ae5['push'](_0x266ae5['shift']());}catch(_0x454b64){_0x266ae5['push'](_0x266ae5['shift']());}}}(a27_0x3303,0x6e5b0));function a27_0x3303(){const _0x385846=['auth.logout.notLoggedIn','7545TFUqLt','130437bUXSrS','bind','113268tiMALN','13388kZBMva','auth.logout.success','1884lnjlCr','424xNWHJT','286HdMESq','log','114010zhTPzy','1391AGDVmM','170HqVqlK','4642ungOcd','5920145IniVZY','57rOssff'];a27_0x3303=function(){return _0x385846;};return a27_0x3303();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';import a27_0x1b3fed from'../i18n/index.js';const t=a27_0x1b3fed['t'][a27_0x55c896(0x197)](a27_0x1b3fed);function a27_0x231d(_0x5a0415,_0x10662c){_0x5a0415=_0x5a0415-0x195;const _0x330337=a27_0x3303();let _0x231d2d=_0x330337[_0x5a0415];return _0x231d2d;}export function logout(){const _0x502273=a27_0x55c896;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x502273(0x19e)](t(_0x502273(0x19a)))):console[_0x502273(0x19e)](t(_0x502273(0x1a5)));}
package/lib/cli-flags.js CHANGED
@@ -1 +1 @@
1
- const a31_0x23c084=a31_0x5ad8;function a31_0x5ad8(_0x24321e,_0x2efd11){_0x24321e=_0x24321e-0xb9;const _0x56c995=a31_0x56c9();let _0x5ad810=_0x56c995[_0x24321e];return _0x5ad810;}(function(_0x1f84b6,_0xd9bb4){const _0x58b0b9=a31_0x5ad8,_0x15808d=_0x1f84b6();while(!![]){try{const _0x47fec1=parseInt(_0x58b0b9(0xc2))/0x1+-parseInt(_0x58b0b9(0xc0))/0x2*(-parseInt(_0x58b0b9(0xc5))/0x3)+parseInt(_0x58b0b9(0xbf))/0x4*(parseInt(_0x58b0b9(0xbb))/0x5)+parseInt(_0x58b0b9(0xc6))/0x6*(-parseInt(_0x58b0b9(0xbd))/0x7)+parseInt(_0x58b0b9(0xc3))/0x8*(-parseInt(_0x58b0b9(0xc1))/0x9)+parseInt(_0x58b0b9(0xb9))/0xa*(-parseInt(_0x58b0b9(0xba))/0xb)+-parseInt(_0x58b0b9(0xbc))/0xc*(-parseInt(_0x58b0b9(0xbe))/0xd);if(_0x47fec1===_0xd9bb4)break;else _0x15808d['push'](_0x15808d['shift']());}catch(_0x1e5a34){_0x15808d['push'](_0x15808d['shift']());}}}(a31_0x56c9,0x44267));export const dynamicCliFlags={'dangerouslyBffSave':{'type':a31_0x23c084(0xc4)}};function a31_0x56c9(){const _0x674d99=['259cAvVbR','25272LfBiol','1564iSbZxI','180710eeFKxW','116307ghIQIW','52681KziYch','264Qebtib','boolean','18Bqvtzf','43248pfOtdP','10whYGsx','1024738wHrnyc','2215XQpcSv','1836gFRodw'];a31_0x56c9=function(){return _0x674d99;};return a31_0x56c9();}
1
+ function a28_0x1cdf(_0x556c41,_0x5c3697){_0x556c41=_0x556c41-0x145;const _0x162387=a28_0x1623();let _0x1cdf6a=_0x162387[_0x556c41];return _0x1cdf6a;}function a28_0x1623(){const _0x3cd130=['1kcRXGE','10857064WzWBHo','2640700YFqRcU','1418571WPYMsH','5476144bHFBTx','340lvcjpW','4569558oQLkQU','7AunAuO','2970766kgWkmg','11117166snHMlu'];a28_0x1623=function(){return _0x3cd130;};return a28_0x1623();}(function(_0x2d740d,_0x3d5e55){const _0x40c161=a28_0x1cdf,_0xe65b6e=_0x2d740d();while(!![]){try{const _0x1971a6=-parseInt(_0x40c161(0x149))/0x1*(parseInt(_0x40c161(0x147))/0x2)+-parseInt(_0x40c161(0x145))/0x3+-parseInt(_0x40c161(0x14d))/0x4+-parseInt(_0x40c161(0x14b))/0x5+-parseInt(_0x40c161(0x148))/0x6*(-parseInt(_0x40c161(0x146))/0x7)+-parseInt(_0x40c161(0x14a))/0x8+parseInt(_0x40c161(0x14c))/0x9*(parseInt(_0x40c161(0x14e))/0xa);if(_0x1971a6===_0x3d5e55)break;else _0xe65b6e['push'](_0xe65b6e['shift']());}catch(_0x156093){_0xe65b6e['push'](_0xe65b6e['shift']());}}}(a28_0x1623,0xe7b25));export const dynamicCliFlags={'dangerouslyBffSave':{'type':'boolean'}};