@lovrabet/cli 1.3.4 → 1.4.1-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 (86) hide show
  1. package/lib/ai-setup/config.js +1 -1
  2. package/lib/api/api-doc-ui.js +1 -1
  3. package/lib/api/api-doc.js +1 -1
  4. package/lib/api/api-pull-ui.js +1 -1
  5. package/lib/api/fetch-model-list.js +1 -1
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/api/main.js +1 -1
  8. package/lib/api/pull-silent.js +1 -1
  9. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  10. package/lib/app-menu/create-menu.js +1 -1
  11. package/lib/app-menu/get-local-pages.js +1 -1
  12. package/lib/app-menu/get-online-menu-list.js +1 -1
  13. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  14. package/lib/app-menu/utils.js +1 -1
  15. package/lib/app-menu/valid-url.js +1 -1
  16. package/lib/app-menu-update-cdn/current-content.js +1 -1
  17. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  18. package/lib/app-menu-update-cdn/main.js +1 -1
  19. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  20. package/lib/auth/auth-server-ui.js +1 -1
  21. package/lib/auth/auth-server.js +1 -1
  22. package/lib/auth/constant.js +1 -1
  23. package/lib/auth/get-cookie.js +1 -1
  24. package/lib/auth/is-session-valid.js +1 -1
  25. package/lib/auth/logout.js +1 -1
  26. package/lib/cli-flags.js +1 -1
  27. package/lib/cli.js +1 -1
  28. package/lib/cmd/build-watch.js +1 -1
  29. package/lib/cmd/build.js +1 -1
  30. package/lib/cmd/logs.js +1 -1
  31. package/lib/cmd/preview.js +1 -1
  32. package/lib/cmd/start-execa.js +1 -1
  33. package/lib/cmd/start.js +1 -1
  34. package/lib/config/config-help.js +1 -1
  35. package/lib/config/main.js +1 -1
  36. package/lib/constant/domain.js +1 -1
  37. package/lib/constant/env.js +1 -1
  38. package/lib/create-app/enhanced-guided-create.js +1 -1
  39. package/lib/create-app/format-elapsed.js +1 -1
  40. package/lib/create-app/main.js +1 -1
  41. package/lib/create-app/non-interactive.js +1 -1
  42. package/lib/create-app/task-finished.js +1 -1
  43. package/lib/create-app/task-loading.js +1 -1
  44. package/lib/create-app/task-running.js +1 -1
  45. package/lib/create-app/task-time.js +1 -1
  46. package/lib/create-app/use-copy-project-template.js +1 -1
  47. package/lib/create-app/use-format-code.js +1 -1
  48. package/lib/create-app/use-install-dependencies.js +1 -1
  49. package/lib/help.js +1 -1
  50. package/lib/i18n/I18nProvider.js +1 -1
  51. package/lib/i18n/hooks.js +1 -1
  52. package/lib/i18n/index.js +1 -1
  53. package/lib/i18n/locales/en-US.js +1 -1
  54. package/lib/i18n/locales/zh-CN.js +1 -1
  55. package/lib/init/main.js +1 -1
  56. package/lib/mcp/McpInstallUI.js +1 -1
  57. package/lib/mcp/claude.js +1 -1
  58. package/lib/mcp/cursor.js +1 -1
  59. package/lib/mcp/main.js +1 -1
  60. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  61. package/lib/mcp/mcp-installer.js +1 -1
  62. package/lib/skills/main.js +1 -1
  63. package/lib/skills/npx-skills-add.js +1 -0
  64. package/lib/ui/IDESelector.js +1 -1
  65. package/lib/ui/useIDESelection.js +1 -1
  66. package/lib/utils/ai_config.js +1 -1
  67. package/lib/utils/cdn-config.js +1 -1
  68. package/lib/utils/check-sdk-version.js +1 -1
  69. package/lib/utils/cli-version-check.js +1 -1
  70. package/lib/utils/config.js +1 -1
  71. package/lib/utils/copy-directory.js +1 -1
  72. package/lib/utils/file-utils.js +1 -1
  73. package/lib/utils/guides-cdn.js +1 -1
  74. package/lib/utils/http-client.js +1 -1
  75. package/lib/utils/logger.js +1 -1
  76. package/lib/utils/rules-cdn.js +1 -1
  77. package/lib/utils/sleep.js +1 -1
  78. package/lib/utils/template-replacer.js +1 -1
  79. package/package.json +5 -5
  80. package/sidecar/flags.json +10 -0
  81. package/templates/rules/lovrabet_rules.mdc.tpl +891 -0
  82. package/templates/skill/SKILL.md.tpl +120 -0
  83. package/lib/ai-setup/AISetupUI.js +0 -1
  84. package/lib/skills/SkillInstallUI.js +0 -1
  85. package/lib/skills/skill-install-non-interactive.js +0 -1
  86. package/lib/skills/skill-installer.js +0 -1
@@ -1 +1 @@
1
- const a11_0x19c511=a11_0x4ec6;function a11_0x3ac6(){const _0x4b700f=['cwd','.tsx','4898961TsTYll','match','60MdbDvv','36664XaWxgU','7570760aJyPOd','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','17464CmUXWb','459012QXGXZz','concat','slice','trim','src/pages','3659718QnhHLE','index.tsx','76Pnkpdx','forEach','utf-8','replace','123765bUoFkC','490eziUKe','endsWith'];a11_0x3ac6=function(){return _0x4b700f;};return a11_0x3ac6();}(function(_0x268d43,_0x3bcb00){const _0x10e9e0=a11_0x4ec6,_0x1435cf=_0x268d43();while(!![]){try{const _0x529d9f=parseInt(_0x10e9e0(0x1bd))/0x1+parseInt(_0x10e9e0(0x1bc))/0x2*(-parseInt(_0x10e9e0(0x1b8))/0x3)+parseInt(_0x10e9e0(0x1c4))/0x4*(parseInt(_0x10e9e0(0x1b1))/0x5)+parseInt(_0x10e9e0(0x1c2))/0x6+parseInt(_0x10e9e0(0x1b2))/0x7*(parseInt(_0x10e9e0(0x1b9))/0x8)+-parseInt(_0x10e9e0(0x1b6))/0x9+-parseInt(_0x10e9e0(0x1ba))/0xa;if(_0x529d9f===_0x3bcb00)break;else _0x1435cf['push'](_0x1435cf['shift']());}catch(_0x33847a){_0x1435cf['push'](_0x1435cf['shift']());}}}(a11_0x3ac6,0x5dc25));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a11_0x19c511(0x1b4)](),a11_0x19c511(0x1c1));export function extractTitleFromComment(_0x53523b){const _0x29ad7c=a11_0x19c511;try{const _0x4956a3=readFileSync(_0x53523b,_0x29ad7c(0x1c6)),_0x132502=_0x4956a3[_0x29ad7c(0x1b7)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x132502&&_0x132502[0x1]){const _0x1f93fb=_0x132502[0x1],_0x5b8e2e=_0x1f93fb[_0x29ad7c(0x1b7)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x5b8e2e&&_0x5b8e2e[0x1])return _0x5b8e2e[0x1][_0x29ad7c(0x1c0)]();}let _0x3c53da=null;const _0x5e1b61=_0x4956a3[_0x29ad7c(0x1b7)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5e1b61&&_0x5e1b61[0x1]&&(_0x3c53da=_0x5e1b61[0x1]);if(!_0x3c53da){const _0xff5c7c=_0x4956a3[_0x29ad7c(0x1b7)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0xff5c7c&&_0xff5c7c[0x1]&&(_0x3c53da=_0xff5c7c[0x1]);}if(_0x3c53da){const _0x29a6be=new RegExp('\x5cb'+_0x3c53da+_0x29ad7c(0x1bb)),_0xe8183e=_0x4956a3[_0x29ad7c(0x1b7)](_0x29a6be);if(_0xe8183e&&_0xe8183e[0x1])return _0xe8183e[0x1];return _0x3c53da;}return null;}catch(_0xbb631e){return null;}}function a11_0x4ec6(_0x2282b0,_0x3db0fb){_0x2282b0=_0x2282b0-0x1b0;const _0x3ac6e2=a11_0x3ac6();let _0x4ec613=_0x3ac6e2[_0x2282b0];return _0x4ec613;}export function getLocalPages(_0x5a080=pagesDir,_0xa9371f=pagesDir){const _0xc1dd0d=a11_0x19c511;let _0x10d837=[];const _0x39aa0d=readdirSync(_0x5a080);return _0x39aa0d[_0xc1dd0d(0x1c5)](_0xef633d=>{const _0x23a21f=_0xc1dd0d,_0x45816c=join(_0x5a080,_0xef633d),_0x1e01b6=statSync(_0x45816c);if(_0x1e01b6&&_0x1e01b6['isDirectory']())_0x10d837=_0x10d837[_0x23a21f(0x1be)](getLocalPages(_0x45816c,_0xa9371f));else{if(_0xef633d[_0x23a21f(0x1b3)](_0x23a21f(0x1b5))){let _0x59e335=relative(_0xa9371f,_0x45816c);_0x59e335[_0x23a21f(0x1b3)](_0x23a21f(0x1c3))?_0x59e335=_0x59e335[_0x23a21f(0x1b0)](/index\.tsx$/,''):_0x59e335=_0x59e335[_0x23a21f(0x1b0)](/\.tsx$/,'');_0x59e335['endsWith']('/')&&(_0x59e335=_0x59e335[_0x23a21f(0x1bf)](0x0,-0x1));const _0x3b0915=extractTitleFromComment(_0x45816c),_0xa7add6=_0x3b0915||_0x59e335;_0x10d837['push']({'path':_0x59e335['replaceAll']('$',':'),'label':_0xa7add6});}}}),_0x10d837['filter'](_0x3229a3=>_0x3229a3['path']!=='');}
1
+ const a10_0x403edb=a10_0x511e;(function(_0x5ab3c4,_0x490c94){const _0x2f4086=a10_0x511e,_0x33427e=_0x5ab3c4();while(!![]){try{const _0x42ec7a=parseInt(_0x2f4086(0x129))/0x1*(-parseInt(_0x2f4086(0x12a))/0x2)+-parseInt(_0x2f4086(0x12f))/0x3+parseInt(_0x2f4086(0x123))/0x4*(-parseInt(_0x2f4086(0x131))/0x5)+-parseInt(_0x2f4086(0x12e))/0x6*(-parseInt(_0x2f4086(0x120))/0x7)+parseInt(_0x2f4086(0x11c))/0x8*(-parseInt(_0x2f4086(0x12d))/0x9)+parseInt(_0x2f4086(0x127))/0xa+-parseInt(_0x2f4086(0x130))/0xb*(-parseInt(_0x2f4086(0x132))/0xc);if(_0x42ec7a===_0x490c94)break;else _0x33427e['push'](_0x33427e['shift']());}catch(_0x34dcc8){_0x33427e['push'](_0x33427e['shift']());}}}(a10_0x1634,0x9be5c));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';function a10_0x511e(_0x43d47b,_0x31c08e){_0x43d47b=_0x43d47b-0x11a;const _0x163484=a10_0x1634();let _0x511e48=_0x163484[_0x43d47b];return _0x511e48;}function a10_0x1634(){const _0x59908e=['378660QYcQGQ','.tsx','67luwfCq','20778pzBGoG','utf-8','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','56142xUbPsq','3400428cVgYdl','1939779sAGDKG','4032765RPcoxb','10jkSqXv','48jsPYlk','concat','forEach','isDirectory','448OgPRhA','match','endsWith','src/pages','14HZYtUY','filter','replaceAll','614524HIXJjJ','slice','push','replace'];a10_0x1634=function(){return _0x59908e;};return a10_0x1634();}const pagesDir=resolve(process['cwd'](),a10_0x403edb(0x11f));export function extractTitleFromComment(_0x38c72b){const _0x415360=a10_0x403edb;try{const _0x3508e9=readFileSync(_0x38c72b,_0x415360(0x12b)),_0x1296e7=_0x3508e9['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1296e7&&_0x1296e7[0x1]){const _0x25645e=_0x1296e7[0x1],_0x53500a=_0x25645e[_0x415360(0x11d)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x53500a&&_0x53500a[0x1])return _0x53500a[0x1]['trim']();}let _0x70b16=null;const _0x5cde12=_0x3508e9['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5cde12&&_0x5cde12[0x1]&&(_0x70b16=_0x5cde12[0x1]);if(!_0x70b16){const _0x21d93b=_0x3508e9[_0x415360(0x11d)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x21d93b&&_0x21d93b[0x1]&&(_0x70b16=_0x21d93b[0x1]);}if(_0x70b16){const _0x3fc56f=new RegExp('\x5cb'+_0x70b16+_0x415360(0x12c)),_0x5cc170=_0x3508e9['match'](_0x3fc56f);if(_0x5cc170&&_0x5cc170[0x1])return _0x5cc170[0x1];return _0x70b16;}return null;}catch(_0x195d8e){return null;}}export function getLocalPages(_0x37f75e=pagesDir,_0x2fad64=pagesDir){const _0x3a3125=a10_0x403edb;let _0x4258fb=[];const _0x3f3997=readdirSync(_0x37f75e);return _0x3f3997[_0x3a3125(0x11a)](_0x206426=>{const _0x5f7f7c=_0x3a3125,_0xb0db72=join(_0x37f75e,_0x206426),_0x5be80e=statSync(_0xb0db72);if(_0x5be80e&&_0x5be80e[_0x5f7f7c(0x11b)]())_0x4258fb=_0x4258fb[_0x5f7f7c(0x133)](getLocalPages(_0xb0db72,_0x2fad64));else{if(_0x206426[_0x5f7f7c(0x11e)](_0x5f7f7c(0x128))){let _0x1ee89a=relative(_0x2fad64,_0xb0db72);_0x1ee89a[_0x5f7f7c(0x11e)]('index.tsx')?_0x1ee89a=_0x1ee89a[_0x5f7f7c(0x126)](/index\.tsx$/,''):_0x1ee89a=_0x1ee89a[_0x5f7f7c(0x126)](/\.tsx$/,'');_0x1ee89a[_0x5f7f7c(0x11e)]('/')&&(_0x1ee89a=_0x1ee89a[_0x5f7f7c(0x124)](0x0,-0x1));const _0x26a44e=extractTitleFromComment(_0xb0db72),_0x45832c=_0x26a44e||_0x1ee89a;_0x4258fb[_0x5f7f7c(0x125)]({'path':_0x1ee89a[_0x5f7f7c(0x122)]('$',':'),'label':_0x45832c});}}}),_0x4258fb[_0x3a3125(0x121)](_0x5b1ddb=>_0x5b1ddb['path']!=='');}
@@ -1 +1 @@
1
- (function(_0x161155,_0x53a0c1){const _0x4968d8=a12_0x146b,_0x590fc5=_0x161155();while(!![]){try{const _0x42dad2=-parseInt(_0x4968d8(0xee))/0x1*(-parseInt(_0x4968d8(0xf0))/0x2)+-parseInt(_0x4968d8(0x10a))/0x3+parseInt(_0x4968d8(0xe8))/0x4*(-parseInt(_0x4968d8(0xe9))/0x5)+-parseInt(_0x4968d8(0x109))/0x6+parseInt(_0x4968d8(0xf1))/0x7+parseInt(_0x4968d8(0x10f))/0x8*(-parseInt(_0x4968d8(0xff))/0x9)+-parseInt(_0x4968d8(0xea))/0xa*(-parseInt(_0x4968d8(0x10e))/0xb);if(_0x42dad2===_0x53a0c1)break;else _0x590fc5['push'](_0x590fc5['shift']());}catch(_0x374631){_0x590fc5['push'](_0x590fc5['shift']());}}}(a12_0x4d78,0xe7e44));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a12_0x4d78(){const _0x1347ef=['14533784zuVXhp','appMenu.fetching.online','32Sdmogy','970360rpzkIQ','590uzrQDz','map','label','log','1550597ljeiqQ','common.error','2YJLWrN','9491832VuIdgF','appcode','appMenu.error.httpStatus','errorCode','error','length','get-online-menu-list','application/json','online','path','push','appMenu.success.fetched','status','/smartapi/menu/find?appCode=','9zKKtWA','errorMsg','isArray','appMenu.error.appCodeHint.option1','children','appMenu.error.missingAppCode','GET','data','resources','parse','5694042zUvMUH','2581287uPMFQo','json','extend','info','600710HYEQrz'];a12_0x4d78=function(){return _0x1347ef;};return a12_0x4d78();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';import a12_0x1de3c2 from'../i18n/index.js';const config=readConfig(),t=a12_0x1de3c2['t']['bind'](a12_0x1de3c2);function a12_0x146b(_0x7c511c,_0x4b18db){_0x7c511c=_0x7c511c-0xe8;const _0x4d78ab=a12_0x4d78();let _0x146b25=_0x4d78ab[_0x7c511c];return _0x146b25;}export async function getOnlineMenuList(){const _0x33d86f=a12_0x146b,_0x58a85f=config?.[_0x33d86f(0xf2)];if(!_0x58a85f){const _0x10c591=t(_0x33d86f(0x104));return logger[_0x33d86f(0xf5)](_0x33d86f(0xf7),_0x10c591),console[_0x33d86f(0xf5)]('×\x20'+_0x10c591),console[_0x33d86f(0xed)](t('appMenu.error.appCodeHint.title')),console[_0x33d86f(0xed)](t(_0x33d86f(0x102))),console[_0x33d86f(0xed)](t('appMenu.error.appCodeHint.option2')),[];}const _0x18d991=getEnv();logger['info']('get-online-menu-list',_0x18d991===_0x33d86f(0xf9)?t(_0x33d86f(0x110),{'appCode':_0x58a85f}):t('appMenu.fetching.daily',{'appCode':_0x58a85f}));const _0x2487f6=await fetch(getApiDomain()+_0x33d86f(0xfe)+_0x58a85f,{'method':_0x33d86f(0x105),'headers':{'Content-Type':_0x33d86f(0xf8),'Cookie':getCookie()}});if(!_0x2487f6['ok']){if(_0x2487f6[_0x33d86f(0xfd)]===0x191){const _0x15fc96=t('appMenu.error.authExpired');logger[_0x33d86f(0xf5)]('get-online-menu-list',_0x15fc96,{'status':_0x2487f6[_0x33d86f(0xfd)]});throw new Error(_0x15fc96);}const _0x38ff67=t(_0x33d86f(0xf3),{'status':_0x2487f6[_0x33d86f(0xfd)]});logger[_0x33d86f(0xf5)](_0x33d86f(0xf7),_0x38ff67);throw new Error(_0x38ff67);}const _0x21b2a6=await _0x2487f6[_0x33d86f(0x10b)]();if(!_0x21b2a6['success']){const _0x12d86c=t('appMenu.error.fetchFailed',{'error':_0x21b2a6[_0x33d86f(0x100)]||t(_0x33d86f(0xef))});logger['error'](_0x33d86f(0xf7),_0x12d86c,{'errorCode':_0x21b2a6[_0x33d86f(0xf4)],'errorMsg':_0x21b2a6[_0x33d86f(0x100)]});throw new Error(_0x12d86c);}if(!_0x21b2a6[_0x33d86f(0x106)])return logger[_0x33d86f(0x10d)](_0x33d86f(0xf7),t('appMenu.info.emptyMenuList')),[];return logger[_0x33d86f(0x10d)](_0x33d86f(0xf7),t(_0x33d86f(0xfc),{'count':_0x21b2a6[_0x33d86f(0x106)][_0x33d86f(0xf6)]})),_0x21b2a6[_0x33d86f(0x106)][_0x33d86f(0xeb)](formatMenuList)['flat']();}function formatMenuList(_0x2e20d0){const _0x2411c1=a12_0x146b;let _0x489245=[];try{if(_0x2e20d0[_0x2411c1(0x10c)]?.[_0x2411c1(0x107)]){const _0x1e53c6=JSON[_0x2411c1(0x108)](_0x2e20d0[_0x2411c1(0x10c)][_0x2411c1(0x107)]);Array[_0x2411c1(0x101)](_0x1e53c6)&&(_0x489245=_0x1e53c6);}}catch(_0x3c7882){}const _0x2b2212=[{'id':_0x2e20d0['id'],'path':_0x2e20d0[_0x2411c1(0xfa)],'label':_0x2e20d0[_0x2411c1(0xec)],'resources':_0x489245}];if(_0x2e20d0[_0x2411c1(0x103)]&&_0x2e20d0[_0x2411c1(0x103)]['length']>0x0)for(const _0x195191 of _0x2e20d0['children']){_0x2b2212[_0x2411c1(0xfb)](...formatMenuList(_0x195191));}return _0x2b2212;}
1
+ const a11_0xadd3f2=a11_0x4245;(function(_0x4b1972,_0x18cdcc){const _0x4510de=a11_0x4245,_0x22afcb=_0x4b1972();while(!![]){try{const _0xcc3626=parseInt(_0x4510de(0x1c8))/0x1*(-parseInt(_0x4510de(0x1b4))/0x2)+parseInt(_0x4510de(0x1bf))/0x3+parseInt(_0x4510de(0x1c9))/0x4+-parseInt(_0x4510de(0x1a8))/0x5+parseInt(_0x4510de(0x1b2))/0x6*(-parseInt(_0x4510de(0x1a5))/0x7)+parseInt(_0x4510de(0x1b7))/0x8*(parseInt(_0x4510de(0x1b9))/0x9)+parseInt(_0x4510de(0x1c0))/0xa*(parseInt(_0x4510de(0x1bb))/0xb);if(_0xcc3626===_0x18cdcc)break;else _0x22afcb['push'](_0x22afcb['shift']());}catch(_0x512c5b){_0x22afcb['push'](_0x22afcb['shift']());}}}(a11_0x14c0,0x4c37d));function a11_0x14c0(){const _0x4cd170=['2349770iCILaU','push','application/json','flat','appMenu.error.appCodeHint.option1','appMenu.error.appCodeHint.title','/smartapi/menu/find?appCode=','isArray','map','children','402ctWBJe','info','13106IrOUNZ','parse','length','88iHOmMF','errorMsg','340839MKvZYO','json','8214481gWQrzT','data','log','extend','1411311HOtMqA','10nHLqSO','resources','status','error','appMenu.fetching.online','errorCode','get-online-menu-list','bind','57YpbvET','304664SYgiSt','success','appMenu.error.appCodeHint.option2','57911RimioQ','appMenu.success.fetched','common.error'];a11_0x14c0=function(){return _0x4cd170;};return a11_0x14c0();}import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a11_0x4245(_0x4c032f,_0x3abb1a){_0x4c032f=_0x4c032f-0x1a5;const _0x14c0f1=a11_0x14c0();let _0x424570=_0x14c0f1[_0x4c032f];return _0x424570;}import{getEnv}from'../constant/env.js';import a11_0x2b1d42 from'../i18n/index.js';const config=readConfig(),t=a11_0x2b1d42['t'][a11_0xadd3f2(0x1c7)](a11_0x2b1d42);export async function getOnlineMenuList(){const _0x800e=a11_0xadd3f2,_0x2012bb=config?.['appcode'];if(!_0x2012bb){const _0x487a35=t('appMenu.error.missingAppCode');return logger[_0x800e(0x1c3)](_0x800e(0x1c6),_0x487a35),console[_0x800e(0x1c3)]('×\x20'+_0x487a35),console['log'](t(_0x800e(0x1ad))),console[_0x800e(0x1bd)](t(_0x800e(0x1ac))),console[_0x800e(0x1bd)](t(_0x800e(0x1cb))),[];}const _0x30d7cc=getEnv();logger[_0x800e(0x1b3)](_0x800e(0x1c6),_0x30d7cc==='online'?t(_0x800e(0x1c4),{'appCode':_0x2012bb}):t('appMenu.fetching.daily',{'appCode':_0x2012bb}));const _0x3633eb=await fetch(getApiDomain()+_0x800e(0x1ae)+_0x2012bb,{'method':'GET','headers':{'Content-Type':_0x800e(0x1aa),'Cookie':getCookie()}});if(!_0x3633eb['ok']){if(_0x3633eb[_0x800e(0x1c2)]===0x191){const _0x16eff6=t('appMenu.error.authExpired');logger[_0x800e(0x1c3)](_0x800e(0x1c6),_0x16eff6,{'status':_0x3633eb[_0x800e(0x1c2)]});throw new Error(_0x16eff6);}const _0x1e1f47=t('appMenu.error.httpStatus',{'status':_0x3633eb[_0x800e(0x1c2)]});logger[_0x800e(0x1c3)](_0x800e(0x1c6),_0x1e1f47);throw new Error(_0x1e1f47);}const _0x38d174=await _0x3633eb[_0x800e(0x1ba)]();if(!_0x38d174[_0x800e(0x1ca)]){const _0x3ba1e5=t('appMenu.error.fetchFailed',{'error':_0x38d174[_0x800e(0x1b8)]||t(_0x800e(0x1a7))});logger[_0x800e(0x1c3)](_0x800e(0x1c6),_0x3ba1e5,{'errorCode':_0x38d174[_0x800e(0x1c5)],'errorMsg':_0x38d174[_0x800e(0x1b8)]});throw new Error(_0x3ba1e5);}if(!_0x38d174[_0x800e(0x1bc)])return logger[_0x800e(0x1b3)]('get-online-menu-list',t('appMenu.info.emptyMenuList')),[];return logger[_0x800e(0x1b3)](_0x800e(0x1c6),t(_0x800e(0x1a6),{'count':_0x38d174[_0x800e(0x1bc)][_0x800e(0x1b6)]})),_0x38d174[_0x800e(0x1bc)][_0x800e(0x1b0)](formatMenuList)[_0x800e(0x1ab)]();}function formatMenuList(_0x427d11){const _0x5951ce=a11_0xadd3f2;let _0x3a4d48=[];try{if(_0x427d11['extend']?.[_0x5951ce(0x1c1)]){const _0x103cb5=JSON[_0x5951ce(0x1b5)](_0x427d11[_0x5951ce(0x1be)][_0x5951ce(0x1c1)]);Array[_0x5951ce(0x1af)](_0x103cb5)&&(_0x3a4d48=_0x103cb5);}}catch(_0x26d2a5){}const _0x317216=[{'id':_0x427d11['id'],'path':_0x427d11['path'],'label':_0x427d11['label'],'resources':_0x3a4d48}];if(_0x427d11[_0x5951ce(0x1b1)]&&_0x427d11[_0x5951ce(0x1b1)]['length']>0x0)for(const _0xda1b3d of _0x427d11[_0x5951ce(0x1b1)]){_0x317216[_0x5951ce(0x1a9)](...formatMenuList(_0xda1b3d));}return _0x317216;}
@@ -1 +1 @@
1
- const a14_0x561502=a14_0x20f8;function a14_0x20f8(_0x5f2a45,_0x4b70f0){_0x5f2a45=_0x5f2a45-0x14d;const _0x32d026=a14_0x32d0();let _0x20f8f5=_0x32d026[_0x5f2a45];return _0x20f8f5;}(function(_0x16b477,_0xf1bf3e){const _0x4a56fc=a14_0x20f8,_0xa9640a=_0x16b477();while(!![]){try{const _0x434779=-parseInt(_0x4a56fc(0x151))/0x1*(parseInt(_0x4a56fc(0x154))/0x2)+parseInt(_0x4a56fc(0x14e))/0x3*(-parseInt(_0x4a56fc(0x159))/0x4)+-parseInt(_0x4a56fc(0x15c))/0x5+parseInt(_0x4a56fc(0x155))/0x6+-parseInt(_0x4a56fc(0x15a))/0x7*(parseInt(_0x4a56fc(0x15b))/0x8)+parseInt(_0x4a56fc(0x152))/0x9+parseInt(_0x4a56fc(0x150))/0xa;if(_0x434779===_0xf1bf3e)break;else _0xa9640a['push'](_0xa9640a['shift']());}catch(_0x55b1a4){_0xa9640a['push'](_0xa9640a['shift']());}}}(a14_0x32d0,0xb6799));import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';function a14_0x32d0(){const _0x4aad83=['appMenu.error.fetchFailed','39zjOLxs','catch','18554840xecTJT','61LIkagA','12088836AVpvpf','bind','39118nehrqa','7810386ngUGhp','finally','message','then','335588oQSreB','7zXoEHk','892024fhkidN','6788695YpPQuv'];a14_0x32d0=function(){return _0x4aad83;};return a14_0x32d0();}import a14_0x48381f from'../i18n/index.js';const t=a14_0x48381f['t'][a14_0x561502(0x153)](a14_0x48381f);export function useGetOnlineMenuList(){const [_0x4c2a88,_0x2dc9b2]=useState([]),[_0xa458c7,_0x57260b]=useState(!![]),[_0x2a6ca7,_0x2a04f9]=useState('');return useEffect(()=>{const _0xb13465=a14_0x20f8;_0x57260b(!![]),_0x2a04f9(''),getOnlineMenuList()[_0xb13465(0x158)](_0x2dc9b2)[_0xb13465(0x14f)](_0x2a611c=>{const _0x44cddc=_0xb13465;_0x2a04f9(_0x2a611c[_0x44cddc(0x157)]||t(_0x44cddc(0x14d),{'error':t('common.error')}));})[_0xb13465(0x156)](()=>_0x57260b(![]));},[]),{'menuList':_0x4c2a88,'loading':_0xa458c7,'error':_0x2a6ca7};}
1
+ function a13_0x2cf0(){const _0x1c2e41=['144661qSYUwA','9JvdToy','appMenu.error.fetchFailed','message','779883AEFjMM','204ZIRSOD','2140KNKdgO','common.error','5769472NvfPXd','26043ctkWbS','192KLlgxh','then','118130cUBWuG','8677361AFBJzz','bind','catch','finally','2143280aCfIgD'];a13_0x2cf0=function(){return _0x1c2e41;};return a13_0x2cf0();}const a13_0x1e2956=a13_0xe141;(function(_0x266109,_0x408dd1){const _0x5639f1=a13_0xe141,_0x454165=_0x266109();while(!![]){try{const _0x448cab=-parseInt(_0x5639f1(0xd0))/0x1+parseInt(_0x5639f1(0xcb))/0x2+-parseInt(_0x5639f1(0xd5))/0x3*(-parseInt(_0x5639f1(0xd1))/0x4)+parseInt(_0x5639f1(0xc6))/0x5*(parseInt(_0x5639f1(0xd6))/0x6)+parseInt(_0x5639f1(0xc7))/0x7+parseInt(_0x5639f1(0xd4))/0x8*(parseInt(_0x5639f1(0xcd))/0x9)+parseInt(_0x5639f1(0xd2))/0xa*(-parseInt(_0x5639f1(0xcc))/0xb);if(_0x448cab===_0x408dd1)break;else _0x454165['push'](_0x454165['shift']());}catch(_0x36baa8){_0x454165['push'](_0x454165['shift']());}}}(a13_0x2cf0,0x9b855));import{useEffect,useState}from'react';function a13_0xe141(_0xdc8107,_0x522164){_0xdc8107=_0xdc8107-0xc6;const _0x2cf08a=a13_0x2cf0();let _0xe141e7=_0x2cf08a[_0xdc8107];return _0xe141e7;}import{getOnlineMenuList}from'./get-online-menu-list.js';import a13_0x42c1db from'../i18n/index.js';const t=a13_0x42c1db['t'][a13_0x1e2956(0xc8)](a13_0x42c1db);export function useGetOnlineMenuList(){const [_0x5582e0,_0x2705d3]=useState([]),[_0x3a6285,_0x55357b]=useState(!![]),[_0xe0da96,_0x2fafcb]=useState('');return useEffect(()=>{const _0xe8efd3=a13_0xe141;_0x55357b(!![]),_0x2fafcb(''),getOnlineMenuList()[_0xe8efd3(0xd7)](_0x2705d3)[_0xe8efd3(0xc9)](_0x9fa34a=>{const _0x14b775=_0xe8efd3;_0x2fafcb(_0x9fa34a[_0x14b775(0xcf)]||t(_0x14b775(0xce),{'error':t(_0x14b775(0xd3))}));})[_0xe8efd3(0xca)](()=>_0x55357b(![]));},[]),{'menuList':_0x5582e0,'loading':_0x3a6285,'error':_0xe0da96};}
@@ -1 +1 @@
1
- (function(_0x31bca1,_0x354b3e){const _0x744785=a15_0x5a0a,_0x3e19f8=_0x31bca1();while(!![]){try{const _0x4ee930=-parseInt(_0x744785(0xab))/0x1+-parseInt(_0x744785(0xa8))/0x2*(parseInt(_0x744785(0xaf))/0x3)+parseInt(_0x744785(0xa5))/0x4*(parseInt(_0x744785(0xae))/0x5)+parseInt(_0x744785(0xa7))/0x6*(-parseInt(_0x744785(0xb1))/0x7)+parseInt(_0x744785(0xa6))/0x8+-parseInt(_0x744785(0xa9))/0x9+-parseInt(_0x744785(0xa4))/0xa*(-parseInt(_0x744785(0xa2))/0xb);if(_0x4ee930===_0x354b3e)break;else _0x3e19f8['push'](_0x3e19f8['shift']());}catch(_0x455132){_0x3e19f8['push'](_0x3e19f8['shift']());}}}(a15_0x14ae,0x55ad3));function a15_0x5a0a(_0x324991,_0x3e9c13){_0x324991=_0x324991-0xa2;const _0x14ae3a=a15_0x14ae();let _0x5a0a5c=_0x14ae3a[_0x324991];return _0x5a0a5c;}export function getRemainingSpaces(_0x3e9ace,_0x33e51c){const _0x23a3f1=a15_0x5a0a,_0x19c64f=getStringWidth(_0x33e51c);return Array(Math[_0x23a3f1(0xad)](0x0,_0x3e9ace-_0x19c64f))[_0x23a3f1(0xb0)]('\x20')[_0x23a3f1(0xac)]('');}export function getMaxWidth(_0xd86e2,_0x5744d6=0x2){const _0x13cba7=a15_0x5a0a;let _0x567e3e='',_0x197926=0x0;for(const _0x5a4692 of _0xd86e2){const _0x3570e6=getStringWidth(_0x5a4692);_0x3570e6>_0x197926&&(_0x197926=_0x3570e6,_0x567e3e=_0x5a4692);}return _0x567e3e+'\x20'[_0x13cba7(0xaa)](_0x5744d6);}function a15_0x14ae(){const _0x4d6aa5=['max','19230gfjPWo','3sNZbuN','fill','21baPbxP','10690207ktyhpC','test','10hHQfJU','672LKgEkE','1223168hfxyGJ','823434LEozEg','610966JkWhJM','3081528zEPTSN','repeat','360338nqRdAo','join'];a15_0x14ae=function(){return _0x4d6aa5;};return a15_0x14ae();}export function getStringWidth(_0xa351b9){const _0x4a7961=a15_0x5a0a;let _0x560688=0x0;for(const _0xb738cc of _0xa351b9){/[\u4e00-\u9fa5]/[_0x4a7961(0xa3)](_0xb738cc)?_0x560688+=0x2:_0x560688+=0x1;}return _0x560688;}
1
+ (function(_0x124238,_0x341137){const _0x1c2e49=a14_0x232d,_0x10146c=_0x124238();while(!![]){try{const _0x4c48e2=parseInt(_0x1c2e49(0xdb))/0x1*(-parseInt(_0x1c2e49(0xe5))/0x2)+parseInt(_0x1c2e49(0xe2))/0x3+parseInt(_0x1c2e49(0xd8))/0x4*(parseInt(_0x1c2e49(0xda))/0x5)+-parseInt(_0x1c2e49(0xd7))/0x6*(-parseInt(_0x1c2e49(0xde))/0x7)+-parseInt(_0x1c2e49(0xe3))/0x8+parseInt(_0x1c2e49(0xd9))/0x9*(parseInt(_0x1c2e49(0xd6))/0xa)+parseInt(_0x1c2e49(0xe1))/0xb*(-parseInt(_0x1c2e49(0xe0))/0xc);if(_0x4c48e2===_0x341137)break;else _0x10146c['push'](_0x10146c['shift']());}catch(_0x10e039){_0x10146c['push'](_0x10146c['shift']());}}}(a14_0x51f1,0x2f972));function a14_0x232d(_0x245941,_0x219349){_0x245941=_0x245941-0xd6;const _0x51f1b2=a14_0x51f1();let _0x232d0c=_0x51f1b2[_0x245941];return _0x232d0c;}export function getRemainingSpaces(_0x5f3c75,_0xc10b73){const _0x3832c6=a14_0x232d,_0x425d9a=getStringWidth(_0xc10b73);return Array(Math[_0x3832c6(0xe4)](0x0,_0x5f3c75-_0x425d9a))[_0x3832c6(0xdd)]('\x20')[_0x3832c6(0xdc)]('');}export function getMaxWidth(_0xedc5c7,_0x54b273=0x2){const _0x5d3e0f=a14_0x232d;let _0x51ab3a='',_0x1c7db1=0x0;for(const _0x25ccc3 of _0xedc5c7){const _0xc174a0=getStringWidth(_0x25ccc3);_0xc174a0>_0x1c7db1&&(_0x1c7db1=_0xc174a0,_0x51ab3a=_0x25ccc3);}return _0x51ab3a+'\x20'[_0x5d3e0f(0xe6)](_0x54b273);}export function getStringWidth(_0x20b94e){const _0x3a06c3=a14_0x232d;let _0x526a83=0x0;for(const _0xb661b7 of _0x20b94e){/[\u4e00-\u9fa5]/[_0x3a06c3(0xdf)](_0xb661b7)?_0x526a83+=0x2:_0x526a83+=0x1;}return _0x526a83;}function a14_0x51f1(){const _0x5d0d93=['1661616ukeinU','11auBQWa','360162YfEvxd','2398224nzeuUX','max','46aBaGPS','repeat','265830aNDSFh','6vCxidi','35396VXEvED','81ThEIpq','145ungrGJ','2164ujOdZp','join','fill','469182CIpBfd','test'];a14_0x51f1=function(){return _0x5d0d93;};return a14_0x51f1();}
@@ -1 +1 @@
1
- (function(_0x30fa1c,_0x477710){const _0x1e6faf=a16_0x1c03,_0x547280=_0x30fa1c();while(!![]){try{const _0x30bc82=parseInt(_0x1e6faf(0x152))/0x1+parseInt(_0x1e6faf(0x151))/0x2*(parseInt(_0x1e6faf(0x158))/0x3)+-parseInt(_0x1e6faf(0x15c))/0x4+parseInt(_0x1e6faf(0x15d))/0x5*(parseInt(_0x1e6faf(0x154))/0x6)+-parseInt(_0x1e6faf(0x15b))/0x7+-parseInt(_0x1e6faf(0x155))/0x8*(-parseInt(_0x1e6faf(0x153))/0x9)+-parseInt(_0x1e6faf(0x15a))/0xa;if(_0x30bc82===_0x477710)break;else _0x547280['push'](_0x547280['shift']());}catch(_0x2042e0){_0x547280['push'](_0x547280['shift']());}}}(a16_0x397c,0xc8a96));export function isValidJsHttpsUrl(_0x1842e6){const _0x400430=a16_0x1c03;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x1842e6[_0x400430(0x157)]());}function a16_0x1c03(_0x385681,_0x46b824){_0x385681=_0x385681-0x151;const _0x397c61=a16_0x397c();let _0x1c03a9=_0x397c61[_0x385681];return _0x1c03a9;}export function isValidCssHttpsUrl(_0x546f2b){const _0x598e48=a16_0x1c03;return/^https:\/\/.+\.css(\?.*)?$/[_0x598e48(0x156)](_0x546f2b[_0x598e48(0x157)]());}function a16_0x397c(){const _0x446525=['42GLuKvD','7768NmgpVm','test','trim','2121192UIXigp','HEAD','5943900NCTEZz','10224795HJNbhl','3782792qdbFyr','283585IqGFbz','4sUMQcG','662817uXaEbN','12501MZkHbh'];a16_0x397c=function(){return _0x446525;};return a16_0x397c();}export async function isUrlReachable(_0x30614e){const _0x36fe6f=a16_0x1c03;try{const _0x55e1e8=await fetch(_0x30614e,{'method':_0x36fe6f(0x159)});return _0x55e1e8['ok'];}catch{return![];}}
1
+ (function(_0x40faa5,_0x278eeb){const _0x5c367a=a15_0x24c3,_0x1f893f=_0x40faa5();while(!![]){try{const _0x50d3d7=parseInt(_0x5c367a(0x113))/0x1+-parseInt(_0x5c367a(0x117))/0x2+parseInt(_0x5c367a(0x116))/0x3*(parseInt(_0x5c367a(0x112))/0x4)+-parseInt(_0x5c367a(0x111))/0x5+parseInt(_0x5c367a(0x118))/0x6+-parseInt(_0x5c367a(0x110))/0x7*(parseInt(_0x5c367a(0x114))/0x8)+-parseInt(_0x5c367a(0x115))/0x9*(-parseInt(_0x5c367a(0x119))/0xa);if(_0x50d3d7===_0x278eeb)break;else _0x1f893f['push'](_0x1f893f['shift']());}catch(_0x9c33d1){_0x1f893f['push'](_0x1f893f['shift']());}}}(a15_0x42d4,0xcdefc));export function isValidJsHttpsUrl(_0x121a1f){const _0x4920fb=a15_0x24c3;return/^https:\/\/.+\.js(\?.*)?$/[_0x4920fb(0x11c)](_0x121a1f[_0x4920fb(0x11b)]());}function a15_0x24c3(_0x334824,_0x5db2f8){_0x334824=_0x334824-0x110;const _0x42d47d=a15_0x42d4();let _0x24c3b3=_0x42d47d[_0x334824];return _0x24c3b3;}function a15_0x42d4(){const _0xa8438e=['367436idBQQP','944196BjGeiK','961864pAXkxh','18oHOouP','42EnJUgQ','1645640BBLgLZ','97470gumdWQ','11036630RaGWBa','HEAD','trim','test','91GuEkWJ','6122140Fftwbx'];a15_0x42d4=function(){return _0xa8438e;};return a15_0x42d4();}export function isValidCssHttpsUrl(_0x472a10){const _0xc161f=a15_0x24c3;return/^https:\/\/.+\.css(\?.*)?$/[_0xc161f(0x11c)](_0x472a10[_0xc161f(0x11b)]());}export async function isUrlReachable(_0x2f8c8a){const _0x83c076=a15_0x24c3;try{const _0x2499be=await fetch(_0x2f8c8a,{'method':_0x83c076(0x11a)});return _0x2499be['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x1fb2c2,_0x50ed8f){const _0x3eac2a=a17_0x9f24,_0xa5cabb=_0x1fb2c2();while(!![]){try{const _0x27a396=parseInt(_0x3eac2a(0x13d))/0x1+parseInt(_0x3eac2a(0x12e))/0x2+parseInt(_0x3eac2a(0x134))/0x3+parseInt(_0x3eac2a(0x136))/0x4*(-parseInt(_0x3eac2a(0x13a))/0x5)+parseInt(_0x3eac2a(0x137))/0x6+-parseInt(_0x3eac2a(0x13c))/0x7*(-parseInt(_0x3eac2a(0x133))/0x8)+-parseInt(_0x3eac2a(0x132))/0x9*(parseInt(_0x3eac2a(0x130))/0xa);if(_0x27a396===_0x50ed8f)break;else _0xa5cabb['push'](_0xa5cabb['shift']());}catch(_0x278e1f){_0xa5cabb['push'](_0xa5cabb['shift']());}}}(a17_0x45c9,0xdebd3));function a17_0x9f24(_0x4d911b,_0x2cd20e){_0x4d911b=_0x4d911b-0x12a;const _0x45c956=a17_0x45c9();let _0x9f241=_0x45c956[_0x4d911b];return _0x9f241;}function a17_0x45c9(){const _0x3e4ae6=['2055928GvqBhx','8739210DfbPjf','map','column','5YCUfpS','join','7RxBWRv','1656797LONLsy','appMenu.updateCdn.preview.resourceLinks','filter','appMenu.updateCdn.preview.title','flat','2609350VkDUyU','from','18605040RQnMlo','label','18OjzcHu','38224bnXAQd','2173632IaitIu','resources'];a17_0x45c9=function(){return _0x3e4ae6;};return a17_0x45c9();}import{jsx as a17_0x11b777,jsxs as a17_0x87be7a}from'react/jsx-runtime';import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';export function CurrentMenuCdnContent(_0x34f5da){const _0x555e0e=a17_0x9f24,{t:_0xa13193}=useI18n(),{menuList:_0xdd6439}=_0x34f5da,_0x566713=_0xdd6439[_0x555e0e(0x12b)](_0x25f494=>_0x25f494[_0x555e0e(0x135)]['length']),_0x541194=Array[_0x555e0e(0x12f)](new Set(_0xdd6439[_0x555e0e(0x138)](_0x258a95=>_0x258a95[_0x555e0e(0x135)])[_0x555e0e(0x12d)]()));return a17_0x87be7a(Box,{'flexDirection':_0x555e0e(0x139),'children':[a17_0x11b777(Text,{'color':'cyan','children':_0xa13193(_0x555e0e(0x12c))}),a17_0x87be7a(Box,{'marginTop':0x1,'flexDirection':_0x555e0e(0x139),'children':[a17_0x87be7a(Text,{'bold':!![],'children':['\x20\x20',_0xa13193('appMenu.updateCdn.preview.menuList')]}),a17_0x87be7a(Text,{'children':['\x20\x20',_0x566713[_0x555e0e(0x138)](_0x46b48c=>_0x46b48c[_0x555e0e(0x131)])[_0x555e0e(0x13b)](',\x20')]})]}),a17_0x11b777(Box,{'marginTop':0x1,'children':a17_0x87be7a(Text,{'bold':!![],'children':['\x20\x20',_0xa13193(_0x555e0e(0x12a))]})}),_0x541194[_0x555e0e(0x138)](_0x2e228d=>a17_0x11b777(Box,{'children':a17_0x87be7a(Text,{'children':['\x20\x20',_0x2e228d]})},_0x2e228d))]});}
1
+ (function(_0x4b2e2c,_0x5a888b){const _0x2b9054=a16_0x50fa,_0x387e38=_0x4b2e2c();while(!![]){try{const _0xacff5e=parseInt(_0x2b9054(0xe2))/0x1+parseInt(_0x2b9054(0xde))/0x2*(-parseInt(_0x2b9054(0xdb))/0x3)+parseInt(_0x2b9054(0xd4))/0x4*(parseInt(_0x2b9054(0xe1))/0x5)+-parseInt(_0x2b9054(0xd9))/0x6+parseInt(_0x2b9054(0xdd))/0x7+-parseInt(_0x2b9054(0xe9))/0x8*(-parseInt(_0x2b9054(0xe5))/0x9)+parseInt(_0x2b9054(0xdf))/0xa*(-parseInt(_0x2b9054(0xdc))/0xb);if(_0xacff5e===_0x5a888b)break;else _0x387e38['push'](_0x387e38['shift']());}catch(_0xe877c5){_0x387e38['push'](_0x387e38['shift']());}}}(a16_0x160b,0xa414e));import{jsx as a16_0x2df92a,jsxs as a16_0x19ba37}from'react/jsx-runtime';function a16_0x50fa(_0x18e098,_0x1fb8b3){_0x18e098=_0x18e098-0xd3;const _0x160b49=a16_0x160b();let _0x50faa9=_0x160b49[_0x18e098];return _0x50faa9;}import{Text,Box}from'ink';function a16_0x160b(){const _0x44ef17=['1950Stamxg','map','5ZmOGES','828103fPJJXa','filter','column','18MDZfjv','appMenu.updateCdn.preview.title','cyan','flat','1939144rfSSIg','appMenu.updateCdn.preview.menuList','1003876YtQsyN','join','resources','appMenu.updateCdn.preview.resourceLinks','label','1339554wpPJsL','length','1989BJYRvD','33308JGnQKy','1518818AbAfSY','890lFLyOd'];a16_0x160b=function(){return _0x44ef17;};return a16_0x160b();}import{useI18n}from'../i18n/hooks.js';export function CurrentMenuCdnContent(_0x45b97c){const _0xdd624b=a16_0x50fa,{t:_0x5afdde}=useI18n(),{menuList:_0x5c5891}=_0x45b97c,_0x1e13a2=_0x5c5891[_0xdd624b(0xe3)](_0x1ef1e5=>_0x1ef1e5[_0xdd624b(0xd6)][_0xdd624b(0xda)]),_0x124f48=Array['from'](new Set(_0x5c5891[_0xdd624b(0xe0)](_0x44b59c=>_0x44b59c['resources'])[_0xdd624b(0xe8)]()));return a16_0x19ba37(Box,{'flexDirection':_0xdd624b(0xe4),'children':[a16_0x2df92a(Text,{'color':_0xdd624b(0xe7),'children':_0x5afdde(_0xdd624b(0xe6))}),a16_0x19ba37(Box,{'marginTop':0x1,'flexDirection':_0xdd624b(0xe4),'children':[a16_0x19ba37(Text,{'bold':!![],'children':['\x20\x20',_0x5afdde(_0xdd624b(0xd3))]}),a16_0x19ba37(Text,{'children':['\x20\x20',_0x1e13a2[_0xdd624b(0xe0)](_0x5ac332=>_0x5ac332[_0xdd624b(0xd8)])[_0xdd624b(0xd5)](',\x20')]})]}),a16_0x2df92a(Box,{'marginTop':0x1,'children':a16_0x19ba37(Text,{'bold':!![],'children':['\x20\x20',_0x5afdde(_0xdd624b(0xd7))]})}),_0x124f48[_0xdd624b(0xe0)](_0x2f15cb=>a16_0x2df92a(Box,{'children':a16_0x19ba37(Text,{'children':['\x20\x20',_0x2f15cb]})},_0x2f15cb))]});}
@@ -1 +1 @@
1
- (function(_0x4dbb8f,_0x39c07f){const _0x2e8d33=a18_0x1870,_0x343620=_0x4dbb8f();while(!![]){try{const _0x20f06f=parseInt(_0x2e8d33(0x190))/0x1*(parseInt(_0x2e8d33(0x18b))/0x2)+-parseInt(_0x2e8d33(0x185))/0x3+-parseInt(_0x2e8d33(0x194))/0x4*(parseInt(_0x2e8d33(0x18c))/0x5)+-parseInt(_0x2e8d33(0x191))/0x6+-parseInt(_0x2e8d33(0x189))/0x7*(-parseInt(_0x2e8d33(0x18a))/0x8)+-parseInt(_0x2e8d33(0x18d))/0x9*(-parseInt(_0x2e8d33(0x193))/0xa)+-parseInt(_0x2e8d33(0x18e))/0xb*(-parseInt(_0x2e8d33(0x186))/0xc);if(_0x20f06f===_0x39c07f)break;else _0x343620['push'](_0x343620['shift']());}catch(_0x402b21){_0x343620['push'](_0x343620['shift']());}}}(a18_0xbceb,0xa0a1f));function a18_0x1870(_0x477c2c,_0x192525){_0x477c2c=_0x477c2c-0x185;const _0xbcebc5=a18_0xbceb();let _0x187069=_0xbcebc5[_0x477c2c];return _0x187069;}import{jsx as a18_0x4b457f,jsxs as a18_0x2eeb4f}from'react/jsx-runtime';import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';export function InputCdnAsset(_0x11064d){const _0x89cab3=a18_0x1870,{t:_0x250591}=useI18n(),{jsCdnUrl:_0x19f5bb,cssCdnUrl:_0x466853}=_0x11064d;return a18_0x2eeb4f(Box,{'flexDirection':_0x89cab3(0x187),'marginTop':0x1,'children':[a18_0x4b457f(Text,{'color':'cyan','children':_0x250591(_0x89cab3(0x192))}),a18_0x2eeb4f(Box,{'children':[a18_0x2eeb4f(Text,{'children':['\x20\x20',_0x250591(_0x89cab3(0x18f))]}),a18_0x4b457f(Text,{'color':_0x89cab3(0x188),'children':_0x19f5bb})]}),a18_0x2eeb4f(Box,{'children':[a18_0x2eeb4f(Text,{'children':['\x20\x20',_0x250591('appMenu.updateCdn.input.cssUrl.label')]}),a18_0x4b457f(Text,{'color':'green','children':_0x466853})]})]});}function a18_0xbceb(){const _0x564b8e=['116040pqOSai','column','green','4169774MrIWvl','16VgpNfy','682iEOLWy','325pnqMTk','126rEaJze','638qTSMfK','appMenu.updateCdn.input.jsUrl.label','3063rrqRFT','6721812lIlnzE','appMenu.updateCdn.input.title','322580TJhbke','18076BnGZyz','3528993HbVaqR'];a18_0xbceb=function(){return _0x564b8e;};return a18_0xbceb();}
1
+ (function(_0x38c96b,_0x98c511){const _0x36a59b=a17_0x410f,_0x35c29e=_0x38c96b();while(!![]){try{const _0x487d0e=-parseInt(_0x36a59b(0x110))/0x1*(parseInt(_0x36a59b(0x106))/0x2)+parseInt(_0x36a59b(0x104))/0x3*(parseInt(_0x36a59b(0x10c))/0x4)+-parseInt(_0x36a59b(0x102))/0x5*(parseInt(_0x36a59b(0x10b))/0x6)+parseInt(_0x36a59b(0x108))/0x7+-parseInt(_0x36a59b(0x10d))/0x8+parseInt(_0x36a59b(0x101))/0x9*(-parseInt(_0x36a59b(0x10f))/0xa)+parseInt(_0x36a59b(0x10e))/0xb*(parseInt(_0x36a59b(0x10a))/0xc);if(_0x487d0e===_0x98c511)break;else _0x35c29e['push'](_0x35c29e['shift']());}catch(_0x4dc9c0){_0x35c29e['push'](_0x35c29e['shift']());}}}(a17_0x42b5,0xdfa21));import{jsx as a17_0x7e09f2,jsxs as a17_0xbd7400}from'react/jsx-runtime';import{Text,Box}from'ink';function a17_0x42b5(){const _0x1d4035=['152155aZadbc','column','1864071cPpUxo','cyan','453982DKInvj','appMenu.updateCdn.input.cssUrl.label','8142127ppBifh','green','84jbXAVR','36oEYHQZ','8cuRhHS','5099456mBTtAm','1124596XtMzSC','11585170XesFbE','1ncZHGE','9luSfOS'];a17_0x42b5=function(){return _0x1d4035;};return a17_0x42b5();}import{useI18n}from'../i18n/hooks.js';function a17_0x410f(_0x3a1f7c,_0x19fcee){_0x3a1f7c=_0x3a1f7c-0x101;const _0x42b56a=a17_0x42b5();let _0x410f0d=_0x42b56a[_0x3a1f7c];return _0x410f0d;}export function InputCdnAsset(_0x1d82fd){const _0x15be2d=a17_0x410f,{t:_0x1aa634}=useI18n(),{jsCdnUrl:_0x59c21e,cssCdnUrl:_0x283c82}=_0x1d82fd;return a17_0xbd7400(Box,{'flexDirection':_0x15be2d(0x103),'marginTop':0x1,'children':[a17_0x7e09f2(Text,{'color':_0x15be2d(0x105),'children':_0x1aa634('appMenu.updateCdn.input.title')}),a17_0xbd7400(Box,{'children':[a17_0xbd7400(Text,{'children':['\x20\x20',_0x1aa634('appMenu.updateCdn.input.jsUrl.label')]}),a17_0x7e09f2(Text,{'color':_0x15be2d(0x109),'children':_0x59c21e})]}),a17_0xbd7400(Box,{'children':[a17_0xbd7400(Text,{'children':['\x20\x20',_0x1aa634(_0x15be2d(0x107))]}),a17_0x7e09f2(Text,{'color':'green','children':_0x283c82})]})]});}
@@ -1 +1 @@
1
- (function(_0x1e99dd,_0x24f186){const _0x52cd8f=a19_0x547c,_0x40a1f5=_0x1e99dd();while(!![]){try{const _0x291c0c=-parseInt(_0x52cd8f(0xab))/0x1+-parseInt(_0x52cd8f(0xb2))/0x2*(parseInt(_0x52cd8f(0xc6))/0x3)+parseInt(_0x52cd8f(0xe0))/0x4*(parseInt(_0x52cd8f(0xdc))/0x5)+-parseInt(_0x52cd8f(0xb8))/0x6*(parseInt(_0x52cd8f(0xc0))/0x7)+parseInt(_0x52cd8f(0xc9))/0x8+parseInt(_0x52cd8f(0xcf))/0x9+parseInt(_0x52cd8f(0xbc))/0xa;if(_0x291c0c===_0x24f186)break;else _0x40a1f5['push'](_0x40a1f5['shift']());}catch(_0x1d4d65){_0x40a1f5['push'](_0x40a1f5['shift']());}}}(a19_0x546b,0xa78dc));function a19_0x546b(){const _0x4d463a=['leftArrow','906UtroHS','input-css','value','3950616GPwgst','downArrow','delete','slice','green','lovrabet\x20auth','9125424IRhzbA','need-confirm','appMenu.updateCdn.success.updated','red','appMenu.updateCdn.error.invalidCssUrl','appMenu.updateCdn.loading.fetching','appMenu.updateCdn.error.invalidJsUrl','cancel','backspace','upArrow','resources','path','length','5RHRuHy','appMenu.updateCdn.error.jsUrlUnreachable','from','updated','5277484ZTbWOH','appMenu.updateCdn.error.cssUrlUnreachable','rightArrow','120300WlGBXm','flat','dots','all','return','column','input-js','7188PccKip','map','appMenu.updateCdn.action.continue','appMenu.updateCdn.input.jsUrl.placeholder','trim','yellow','66nPLNGu','gray','appMenu.updateCdn.error.noCdnLinks','appMenu.updateCdn.input.cssUrl.label','1940370thdgJs','creating','resolve','label','718571qPWrQD','appMenu.updateCdn.input.cssUrl.placeholder','cyan','appMenu.updateCdn.error.authHint.prefix','appMenu.updateCdn.input.jsUrl.label'];a19_0x546b=function(){return _0x4d463a;};return a19_0x546b();}import{jsx as a19_0x1d1acb,jsxs as a19_0x41168d,Fragment as a19_0x14bfb5}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a19_0x547c(_0x2dd5c1,_0xa38643){_0x2dd5c1=_0x2dd5c1-0xaa;const _0x546b73=a19_0x546b();let _0x547cad=_0x546b73[_0x2dd5c1];return _0x547cad;}import a19_0xd2c19b from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import{useI18n}from'../i18n/hooks.js';import.meta.main&&render(a19_0x1d1acb(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x3d2ceb=a19_0x547c,{exit:_0x250d31}=useApp(),{t:_0x46f062}=useI18n(),{loading:_0x310010,menuList:_0x34ee36,error:_0x2d238d}=useGetOnlineMenuList(),[_0x1ccdfe,_0x24ae31]=useState('ok'),[_0x495150,_0x372acb]=useState(_0x3d2ceb(0xb1)),[_0x89a8f0,_0x1e3601]=useState(''),[_0x26a5ec,_0x109ec8]=useState(''),[_0x1bb21a,_0x42b200]=useState(''),[_0x1eab3e,_0x5e4353]=useState(''),_0xc8467f=Array[_0x3d2ceb(0xde)](new Set(_0x34ee36['map'](_0x4fb352=>_0x4fb352[_0x3d2ceb(0xd9)])[_0x3d2ceb(0xac)]()));useEffect(()=>{const _0x181246=_0x3d2ceb;_0x495150===_0x181246(0xdf)&&setTimeout(_0x250d31,0x32);},[_0x495150]),useInput(async(_0x234e08,_0x2c54a4)=>{const _0x36ddb7=_0x3d2ceb;if(_0x495150==='input-js'){if(_0x2c54a4[_0x36ddb7(0xaf)]){const _0xdac68c=_0x1bb21a['trim']();if(_0xdac68c==='')return;if(!isValidJsHttpsUrl(_0xdac68c)){_0x5e4353(_0x46f062(_0x36ddb7(0xd5)));return;}if(!await isUrlReachable(_0xdac68c)){_0x5e4353(_0x46f062(_0x36ddb7(0xdd)));return;}_0x1e3601(_0xdac68c),_0x42b200(''),_0x5e4353(''),_0x372acb(_0x36ddb7(0xc7));return;}if(_0x2c54a4[_0x36ddb7(0xd7)]||_0x2c54a4['delete']){_0x42b200(_0x2ca262=>_0x2ca262['slice'](0x0,-0x1)),_0x5e4353('');return;}_0x42b200(_0x16403a=>_0x16403a+_0x234e08);return;}if(_0x495150===_0x36ddb7(0xc7)){if(_0x2c54a4[_0x36ddb7(0xaf)]){const _0x128c35=_0x1bb21a[_0x36ddb7(0xb6)]();if(_0x128c35==='')return;if(!isValidCssHttpsUrl(_0x128c35)){_0x5e4353(_0x46f062(_0x36ddb7(0xd3)));return;}if(!await isUrlReachable(_0x128c35)){_0x5e4353(_0x46f062(_0x36ddb7(0xe1)));return;}_0x109ec8(_0x128c35),_0x42b200(''),_0x5e4353(''),_0x372acb(_0x36ddb7(0xd0));return;}if(_0x2c54a4[_0x36ddb7(0xd7)]||_0x2c54a4[_0x36ddb7(0xcb)]){_0x42b200(_0x25a2ee=>_0x25a2ee[_0x36ddb7(0xcc)](0x0,-0x1)),_0x5e4353('');return;}_0x42b200(_0x3f4f24=>_0x3f4f24+_0x234e08);return;}if(_0x495150===_0x36ddb7(0xd0)){(_0x2c54a4[_0x36ddb7(0xd8)]||_0x2c54a4[_0x36ddb7(0xca)]||_0x2c54a4[_0x36ddb7(0xc5)]||_0x2c54a4[_0x36ddb7(0xaa)])&&_0x24ae31(_0xf7aef4=>_0xf7aef4==='ok'?'cancel':'ok');if(_0x2c54a4[_0x36ddb7(0xaf)]){_0x372acb(_0x36ddb7(0xbd));if(_0x1ccdfe==='ok')await Promise[_0x36ddb7(0xae)](_0x34ee36[_0x36ddb7(0xb3)](_0x4c1405=>{const _0x3b72f4=_0x36ddb7,_0x2bb116={'id':_0x4c1405['id'],'label':_0x4c1405[_0x3b72f4(0xbf)],'path':_0x4c1405[_0x3b72f4(0xda)],'resources':[_0x89a8f0,_0x26a5ec]};if(_0x4c1405['resources'][_0x3b72f4(0xdb)]===0x0)return Promise[_0x3b72f4(0xbe)]();return updateMenuCdnUrl(_0x2bb116);})),await new Promise(_0x17be6c=>setTimeout(_0x17be6c,0x3e8)),_0x372acb(_0x36ddb7(0xdf));else _0x1ccdfe===_0x36ddb7(0xd6)&&_0x250d31();}}});if(_0x310010)return a19_0x41168d(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x1d1acb(Text,{}),a19_0x1d1acb(a19_0xd2c19b,{'type':_0x3d2ceb(0xad)}),a19_0x1d1acb(Text,{'children':_0x46f062(_0x3d2ceb(0xd4))})]});if(_0x2d238d)return a19_0x41168d(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a19_0x41168d(Text,{'color':_0x3d2ceb(0xd2),'children':['✗\x20',_0x2d238d]}),a19_0x41168d(Box,{'marginTop':0x1,'children':[a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xb9),'children':_0x46f062(_0x3d2ceb(0xc3))}),a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xc2),'children':_0x3d2ceb(0xce)}),a19_0x1d1acb(Text,{'color':'gray','children':_0x46f062('appMenu.updateCdn.error.authHint.suffix')})]})]});if(_0xc8467f['length']===0x0)return a19_0x1d1acb(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a19_0x1d1acb(Text,{'color':'yellow','children':_0x46f062(_0x3d2ceb(0xba))})});if(_0x495150===_0x3d2ceb(0xd0))return a19_0x41168d(Box,{'flexDirection':_0x3d2ceb(0xb0),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x1d1acb(CurrentMenuCdnContent,{'menuList':_0x34ee36}),a19_0x1d1acb(InputCdnAsset,{'jsCdnUrl':_0x89a8f0,'cssCdnUrl':_0x26a5ec}),a19_0x1d1acb(Box,{'marginTop':0x1,'flexDirection':_0x3d2ceb(0xb0),'children':[{'label':_0x46f062(_0x3d2ceb(0xb4)),'value':'ok'},{'label':_0x46f062('appMenu.updateCdn.action.cancel'),'value':_0x3d2ceb(0xd6)}][_0x3d2ceb(0xb3)](_0x1853dd=>a19_0x41168d(Text,{'color':_0x1ccdfe===_0x1853dd['value']?_0x3d2ceb(0xb7):undefined,'children':[_0x1ccdfe===_0x1853dd[_0x3d2ceb(0xc8)]?'>\x20':'\x20\x20',_0x1853dd['label']]},_0x1853dd['value']))})]});if(_0x495150==='creating')return a19_0x41168d(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a19_0x1d1acb(CurrentMenuCdnContent,{'menuList':_0x34ee36}),a19_0x1d1acb(InputCdnAsset,{'jsCdnUrl':_0x89a8f0,'cssCdnUrl':_0x26a5ec}),a19_0x41168d(Box,{'marginTop':0x1,'children':[a19_0x1d1acb(a19_0xd2c19b,{'type':_0x3d2ceb(0xad)}),a19_0x1d1acb(Text,{'children':_0x46f062('appMenu.updateCdn.loading.syncing')})]})]});if(_0x495150==='updated')return a19_0x41168d(Box,{'flexDirection':_0x3d2ceb(0xb0),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x1d1acb(CurrentMenuCdnContent,{'menuList':_0x34ee36}),a19_0x1d1acb(InputCdnAsset,{'jsCdnUrl':_0x89a8f0,'cssCdnUrl':_0x26a5ec}),a19_0x1d1acb(Box,{'marginTop':0x1,'children':a19_0x1d1acb(Text,{'color':'green','children':_0x46f062(_0x3d2ceb(0xd1))})})]});return a19_0x41168d(Box,{'flexDirection':_0x3d2ceb(0xb0),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x1d1acb(CurrentMenuCdnContent,{'menuList':_0x34ee36}),a19_0x41168d(Box,{'marginTop':0x1,'flexDirection':'column','children':[a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xc2),'children':_0x46f062('appMenu.updateCdn.title')}),_0x89a8f0?a19_0x41168d(Box,{'children':[a19_0x41168d(Text,{'color':'gray','children':['\x20\x20',_0x46f062(_0x3d2ceb(0xc4))]}),a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xcd),'children':_0x89a8f0})]}):_0x495150===_0x3d2ceb(0xb1)&&a19_0x41168d(a19_0x14bfb5,{'children':[a19_0x41168d(Box,{'children':[a19_0x41168d(Text,{'children':['\x20\x20',_0x46f062(_0x3d2ceb(0xc4))]}),a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xcd),'children':_0x1bb21a}),_0x1eab3e&&a19_0x41168d(Text,{'color':_0x3d2ceb(0xd2),'children':['\x20←\x20',_0x1eab3e]})]}),!_0x1eab3e&&a19_0x1d1acb(Box,{'children':a19_0x41168d(Text,{'color':_0x3d2ceb(0xb9),'children':['\x20\x20',_0x46f062(_0x3d2ceb(0xb5))]})})]}),_0x26a5ec?a19_0x41168d(Box,{'children':[a19_0x41168d(Text,{'children':['\x20\x20',_0x46f062('appMenu.updateCdn.input.cssUrl.label')]}),a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xcd),'children':_0x26a5ec})]}):_0x495150===_0x3d2ceb(0xc7)&&a19_0x41168d(a19_0x14bfb5,{'children':[a19_0x41168d(Box,{'children':[a19_0x41168d(Text,{'children':['\x20\x20',_0x46f062(_0x3d2ceb(0xbb))]}),a19_0x1d1acb(Text,{'color':_0x3d2ceb(0xcd),'children':_0x1bb21a}),_0x1eab3e&&a19_0x41168d(Text,{'color':_0x3d2ceb(0xd2),'children':['\x20←\x20',_0x1eab3e]})]}),!_0x1eab3e&&a19_0x1d1acb(Box,{'children':a19_0x41168d(Text,{'color':_0x3d2ceb(0xb9),'children':['\x20\x20',_0x46f062(_0x3d2ceb(0xc1))]})})]})]})]});}
1
+ (function(_0x3f2e9c,_0x50e781){const _0x13c7b3=a18_0x426b,_0x8ab962=_0x3f2e9c();while(!![]){try{const _0x244d0e=-parseInt(_0x13c7b3(0x132))/0x1*(-parseInt(_0x13c7b3(0x125))/0x2)+parseInt(_0x13c7b3(0x122))/0x3+parseInt(_0x13c7b3(0x139))/0x4*(-parseInt(_0x13c7b3(0x11c))/0x5)+-parseInt(_0x13c7b3(0x11d))/0x6+parseInt(_0x13c7b3(0x129))/0x7+-parseInt(_0x13c7b3(0x130))/0x8+-parseInt(_0x13c7b3(0x141))/0x9;if(_0x244d0e===_0x50e781)break;else _0x8ab962['push'](_0x8ab962['shift']());}catch(_0x43c72e){_0x8ab962['push'](_0x8ab962['shift']());}}}(a18_0x4dbe,0xbe6fe));import{jsx as a18_0x3966e9,jsxs as a18_0x228090,Fragment as a18_0x169c5f}from'react/jsx-runtime';function a18_0x426b(_0x4467a1,_0x3d86cc){_0x4467a1=_0x4467a1-0x10e;const _0x4dbe34=a18_0x4dbe();let _0x426b1e=_0x4dbe34[_0x4467a1];return _0x426b1e;}import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a18_0x39fbb0 from'ink-spinner';function a18_0x4dbe(){const _0x350ce8=['label','appMenu.updateCdn.title','appMenu.updateCdn.success.updated','158679uVsLKR','return','lovrabet\x20auth','appMenu.updateCdn.error.noCdnLinks','red','\x20←\x20','green','delete','cancel','appMenu.updateCdn.input.cssUrl.label','cyan','updated','dots','appMenu.updateCdn.input.jsUrl.placeholder','map','975335grfSUx','7310742qKuZCb','need-confirm','value','appMenu.updateCdn.loading.fetching','downArrow','4421994YiXnMA','leftArrow','slice','336236gikUiM','appMenu.updateCdn.error.jsUrlUnreachable','input-css','appMenu.updateCdn.error.authHint.suffix','2653532LRQHNI','from','appMenu.updateCdn.loading.syncing','length','resolve','backspace','appMenu.updateCdn.action.continue','5204776QpTmRb','trim','6SiSaDq','all','appMenu.updateCdn.input.cssUrl.placeholder','creating','upArrow','appMenu.updateCdn.error.invalidJsUrl','gray','4qBcgWH','yellow','path','column','resources'];a18_0x4dbe=function(){return _0x350ce8;};return a18_0x4dbe();}import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import{useI18n}from'../i18n/hooks.js';import.meta.main&&render(a18_0x3966e9(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x20f058=a18_0x426b,{exit:_0x19f6d6}=useApp(),{t:_0x34e5f1}=useI18n(),{loading:_0x5a0ed2,menuList:_0x9f2830,error:_0x3336f5}=useGetOnlineMenuList(),[_0x34deb1,_0x4c2073]=useState('ok'),[_0x47ae66,_0x56b0a9]=useState('input-js'),[_0x2f629d,_0x7c5346]=useState(''),[_0x1f70fa,_0x1b5b06]=useState(''),[_0x27ba56,_0x2d79be]=useState(''),[_0x455e9c,_0x260ac4]=useState(''),_0x1ea59c=Array[_0x20f058(0x12a)](new Set(_0x9f2830['map'](_0x5e473f=>_0x5e473f[_0x20f058(0x13d)])['flat']()));useEffect(()=>{const _0x4f6bed=_0x20f058;_0x47ae66===_0x4f6bed(0x118)&&setTimeout(_0x19f6d6,0x32);},[_0x47ae66]),useInput(async(_0x26ddac,_0xed1c5f)=>{const _0xa8aab7=_0x20f058;if(_0x47ae66==='input-js'){if(_0xed1c5f[_0xa8aab7(0x10e)]){const _0x189cca=_0x27ba56[_0xa8aab7(0x131)]();if(_0x189cca==='')return;if(!isValidJsHttpsUrl(_0x189cca)){_0x260ac4(_0x34e5f1(_0xa8aab7(0x137)));return;}if(!await isUrlReachable(_0x189cca)){_0x260ac4(_0x34e5f1(_0xa8aab7(0x126)));return;}_0x7c5346(_0x189cca),_0x2d79be(''),_0x260ac4(''),_0x56b0a9('input-css');return;}if(_0xed1c5f[_0xa8aab7(0x12e)]||_0xed1c5f[_0xa8aab7(0x114)]){_0x2d79be(_0x31a0e2=>_0x31a0e2['slice'](0x0,-0x1)),_0x260ac4('');return;}_0x2d79be(_0x53a1f6=>_0x53a1f6+_0x26ddac);return;}if(_0x47ae66===_0xa8aab7(0x127)){if(_0xed1c5f[_0xa8aab7(0x10e)]){const _0x22cd8e=_0x27ba56[_0xa8aab7(0x131)]();if(_0x22cd8e==='')return;if(!isValidCssHttpsUrl(_0x22cd8e)){_0x260ac4(_0x34e5f1('appMenu.updateCdn.error.invalidCssUrl'));return;}if(!await isUrlReachable(_0x22cd8e)){_0x260ac4(_0x34e5f1('appMenu.updateCdn.error.cssUrlUnreachable'));return;}_0x1b5b06(_0x22cd8e),_0x2d79be(''),_0x260ac4(''),_0x56b0a9('need-confirm');return;}if(_0xed1c5f[_0xa8aab7(0x12e)]||_0xed1c5f['delete']){_0x2d79be(_0x3a1180=>_0x3a1180[_0xa8aab7(0x124)](0x0,-0x1)),_0x260ac4('');return;}_0x2d79be(_0x35b50d=>_0x35b50d+_0x26ddac);return;}if(_0x47ae66===_0xa8aab7(0x11e)){(_0xed1c5f[_0xa8aab7(0x136)]||_0xed1c5f[_0xa8aab7(0x121)]||_0xed1c5f[_0xa8aab7(0x123)]||_0xed1c5f['rightArrow'])&&_0x4c2073(_0x5b579b=>_0x5b579b==='ok'?'cancel':'ok');if(_0xed1c5f[_0xa8aab7(0x10e)]){_0x56b0a9(_0xa8aab7(0x135));if(_0x34deb1==='ok')await Promise[_0xa8aab7(0x133)](_0x9f2830['map'](_0x40c4b7=>{const _0x30d8e2=_0xa8aab7,_0xd75e21={'id':_0x40c4b7['id'],'label':_0x40c4b7[_0x30d8e2(0x13e)],'path':_0x40c4b7[_0x30d8e2(0x13b)],'resources':[_0x2f629d,_0x1f70fa]};if(_0x40c4b7[_0x30d8e2(0x13d)][_0x30d8e2(0x12c)]===0x0)return Promise[_0x30d8e2(0x12d)]();return updateMenuCdnUrl(_0xd75e21);})),await new Promise(_0x2bba5f=>setTimeout(_0x2bba5f,0x3e8)),_0x56b0a9(_0xa8aab7(0x118));else _0x34deb1===_0xa8aab7(0x115)&&_0x19f6d6();}}});if(_0x5a0ed2)return a18_0x228090(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x3966e9(Text,{}),a18_0x3966e9(a18_0x39fbb0,{'type':_0x20f058(0x119)}),a18_0x3966e9(Text,{'children':_0x34e5f1(_0x20f058(0x120))})]});if(_0x3336f5)return a18_0x228090(Box,{'flexDirection':_0x20f058(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x228090(Text,{'color':_0x20f058(0x111),'children':['✗\x20',_0x3336f5]}),a18_0x228090(Box,{'marginTop':0x1,'children':[a18_0x3966e9(Text,{'color':'gray','children':_0x34e5f1('appMenu.updateCdn.error.authHint.prefix')}),a18_0x3966e9(Text,{'color':_0x20f058(0x117),'children':_0x20f058(0x10f)}),a18_0x3966e9(Text,{'color':'gray','children':_0x34e5f1(_0x20f058(0x128))})]})]});if(_0x1ea59c[_0x20f058(0x12c)]===0x0)return a18_0x3966e9(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a18_0x3966e9(Text,{'color':_0x20f058(0x13a),'children':_0x34e5f1(_0x20f058(0x110))})});if(_0x47ae66===_0x20f058(0x11e))return a18_0x228090(Box,{'flexDirection':_0x20f058(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x3966e9(CurrentMenuCdnContent,{'menuList':_0x9f2830}),a18_0x3966e9(InputCdnAsset,{'jsCdnUrl':_0x2f629d,'cssCdnUrl':_0x1f70fa}),a18_0x3966e9(Box,{'marginTop':0x1,'flexDirection':_0x20f058(0x13c),'children':[{'label':_0x34e5f1(_0x20f058(0x12f)),'value':'ok'},{'label':_0x34e5f1('appMenu.updateCdn.action.cancel'),'value':_0x20f058(0x115)}][_0x20f058(0x11b)](_0x56f682=>a18_0x228090(Text,{'color':_0x34deb1===_0x56f682[_0x20f058(0x11f)]?_0x20f058(0x13a):undefined,'children':[_0x34deb1===_0x56f682[_0x20f058(0x11f)]?'>\x20':'\x20\x20',_0x56f682[_0x20f058(0x13e)]]},_0x56f682['value']))})]});if(_0x47ae66===_0x20f058(0x135))return a18_0x228090(Box,{'flexDirection':_0x20f058(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x3966e9(CurrentMenuCdnContent,{'menuList':_0x9f2830}),a18_0x3966e9(InputCdnAsset,{'jsCdnUrl':_0x2f629d,'cssCdnUrl':_0x1f70fa}),a18_0x228090(Box,{'marginTop':0x1,'children':[a18_0x3966e9(a18_0x39fbb0,{'type':_0x20f058(0x119)}),a18_0x3966e9(Text,{'children':_0x34e5f1(_0x20f058(0x12b))})]})]});if(_0x47ae66==='updated')return a18_0x228090(Box,{'flexDirection':_0x20f058(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x3966e9(CurrentMenuCdnContent,{'menuList':_0x9f2830}),a18_0x3966e9(InputCdnAsset,{'jsCdnUrl':_0x2f629d,'cssCdnUrl':_0x1f70fa}),a18_0x3966e9(Box,{'marginTop':0x1,'children':a18_0x3966e9(Text,{'color':'green','children':_0x34e5f1(_0x20f058(0x140))})})]});return a18_0x228090(Box,{'flexDirection':_0x20f058(0x13c),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x3966e9(CurrentMenuCdnContent,{'menuList':_0x9f2830}),a18_0x228090(Box,{'marginTop':0x1,'flexDirection':_0x20f058(0x13c),'children':[a18_0x3966e9(Text,{'color':'cyan','children':_0x34e5f1(_0x20f058(0x13f))}),_0x2f629d?a18_0x228090(Box,{'children':[a18_0x228090(Text,{'color':_0x20f058(0x138),'children':['\x20\x20',_0x34e5f1('appMenu.updateCdn.input.jsUrl.label')]}),a18_0x3966e9(Text,{'color':'green','children':_0x2f629d})]}):_0x47ae66==='input-js'&&a18_0x228090(a18_0x169c5f,{'children':[a18_0x228090(Box,{'children':[a18_0x228090(Text,{'children':['\x20\x20',_0x34e5f1('appMenu.updateCdn.input.jsUrl.label')]}),a18_0x3966e9(Text,{'color':_0x20f058(0x113),'children':_0x27ba56}),_0x455e9c&&a18_0x228090(Text,{'color':_0x20f058(0x111),'children':[_0x20f058(0x112),_0x455e9c]})]}),!_0x455e9c&&a18_0x3966e9(Box,{'children':a18_0x228090(Text,{'color':_0x20f058(0x138),'children':['\x20\x20',_0x34e5f1(_0x20f058(0x11a))]})})]}),_0x1f70fa?a18_0x228090(Box,{'children':[a18_0x228090(Text,{'children':['\x20\x20',_0x34e5f1(_0x20f058(0x116))]}),a18_0x3966e9(Text,{'color':_0x20f058(0x113),'children':_0x1f70fa})]}):_0x47ae66===_0x20f058(0x127)&&a18_0x228090(a18_0x169c5f,{'children':[a18_0x228090(Box,{'children':[a18_0x228090(Text,{'children':['\x20\x20',_0x34e5f1(_0x20f058(0x116))]}),a18_0x3966e9(Text,{'color':'green','children':_0x27ba56}),_0x455e9c&&a18_0x228090(Text,{'color':_0x20f058(0x111),'children':['\x20←\x20',_0x455e9c]})]}),!_0x455e9c&&a18_0x3966e9(Box,{'children':a18_0x228090(Text,{'color':_0x20f058(0x138),'children':['\x20\x20',_0x34e5f1(_0x20f058(0x134))]})})]})]})]});}
@@ -1 +1 @@
1
- const a21_0x30521b=a21_0xb2fd;(function(_0x243df6,_0x135a1b){const _0x4837d0=a21_0xb2fd,_0x3f4c2c=_0x243df6();while(!![]){try{const _0x3c87e0=parseInt(_0x4837d0(0x159))/0x1*(-parseInt(_0x4837d0(0x166))/0x2)+-parseInt(_0x4837d0(0x150))/0x3*(parseInt(_0x4837d0(0x14e))/0x4)+parseInt(_0x4837d0(0x15d))/0x5+-parseInt(_0x4837d0(0x147))/0x6*(-parseInt(_0x4837d0(0x157))/0x7)+parseInt(_0x4837d0(0x15e))/0x8+-parseInt(_0x4837d0(0x153))/0x9*(parseInt(_0x4837d0(0x14b))/0xa)+parseInt(_0x4837d0(0x154))/0xb*(parseInt(_0x4837d0(0x169))/0xc);if(_0x3c87e0===_0x135a1b)break;else _0x3f4c2c['push'](_0x3f4c2c['shift']());}catch(_0x2da5a8){_0x3f4c2c['push'](_0x3f4c2c['shift']());}}}(a21_0x1e2c,0xd0476));import{getCookie}from'../auth/get-cookie.js';function a21_0x1e2c(){const _0x528171=['264LDwpJY','bind','appMenu.updateCdn.success.synced','2525004DdxzyD','1772683CemwAG','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','sdk-demo','3774358MqHIMv','log','1ebkvVn','appMenu.error.missingAppCode','status','info','5049550wrvWtL','6990480SuiLPk','resources','application/json','appMenu.updateCdn.updating','appMenu.error.appCodeHint.option1','error','appMenu.error.appCodeHint.option2','update-menu-cdn-url','2489440GmUpLJ','data','appMenu.error.authExpired','48feWxLU','errorMsg','path','label','18yRGPff','stringify','import','common.error','50vdqKFw','/smartapi/menu/update','appMenu.updateCdn.error.updateFailed','29332ewsrAB','SdkDemo1'];a21_0x1e2c=function(){return _0x528171;};return a21_0x1e2c();}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import a21_0xf24b02 from'../i18n/index.js';const config=readConfig(),logLabel=a21_0x30521b(0x165),t=a21_0xf24b02['t'][a21_0x30521b(0x151)](a21_0xf24b02);function a21_0xb2fd(_0x10b28d,_0x45f2e1){_0x10b28d=_0x10b28d-0x147;const _0x1e2cfc=a21_0x1e2c();let _0xb2fd90=_0x1e2cfc[_0x10b28d];return _0xb2fd90;}import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a21_0x30521b(0x14f),'path':a21_0x30521b(0x156),'resources':['https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js',a21_0x30521b(0x155)]});export async function updateMenuCdnUrl(_0x44c2dc){const _0xb41f66=a21_0x30521b,_0x350b06=config?.['appcode'];if(!_0x350b06){const _0x2c8dee=t(_0xb41f66(0x15a));logger['error'](logLabel,_0x2c8dee),console[_0xb41f66(0x163)]('×\x20'+_0x2c8dee),console[_0xb41f66(0x158)](t('appMenu.error.appCodeHint.title')),console[_0xb41f66(0x158)](t(_0xb41f66(0x162))),console[_0xb41f66(0x158)](t(_0xb41f66(0x164)));return;}logger[_0xb41f66(0x15c)](logLabel,t(_0xb41f66(0x161),{'label':_0x44c2dc[_0xb41f66(0x16c)],'path':_0x44c2dc[_0xb41f66(0x16b)]}));const _0x5ced5c={'id':_0x44c2dc['id'],'appCode':_0x350b06,'extend':{'loadScriptMode':_0xb41f66(0x149),'resources':_0x44c2dc[_0xb41f66(0x15f)]?JSON[_0xb41f66(0x148)](_0x44c2dc[_0xb41f66(0x15f)]):undefined}},_0x5767bd=await fetch(getApiDomain()+_0xb41f66(0x14c),{'method':'POST','body':JSON[_0xb41f66(0x148)](_0x5ced5c),'headers':{'Content-Type':_0xb41f66(0x160),'Cookie':getCookie()}});if(!_0x5767bd['ok']){if(_0x5767bd[_0xb41f66(0x15b)]===0x191){const _0x56141d=t(_0xb41f66(0x168));logger['error'](logLabel,_0x56141d,{'status':_0x5767bd[_0xb41f66(0x15b)],'menu':_0x44c2dc[_0xb41f66(0x16c)]});throw new Error(_0x56141d);}const _0x33f33f=t(_0xb41f66(0x14d),{'error':_0x5767bd[_0xb41f66(0x15b)]});logger[_0xb41f66(0x163)](logLabel,_0x33f33f,{'menu':_0x44c2dc[_0xb41f66(0x16c)]});throw new Error(_0x33f33f);}const _0x4848a1=await _0x5767bd['json']();if(!_0x4848a1['success']){const _0x251b7a=t('appMenu.updateCdn.error.updateFailed',{'error':_0x4848a1[_0xb41f66(0x16a)]||t(_0xb41f66(0x14a))});logger[_0xb41f66(0x163)](logLabel,_0x251b7a,{'errorCode':_0x4848a1['errorCode'],'errorMsg':_0x4848a1['errorMsg'],'menu':_0x44c2dc[_0xb41f66(0x16c)]});throw new Error(_0x251b7a);}logger['info'](logLabel,t(_0xb41f66(0x152),{'label':_0x44c2dc[_0xb41f66(0x16c)]}),_0x4848a1[_0xb41f66(0x167)]);}
1
+ function a20_0x58db(_0x564d96,_0x522b6e){_0x564d96=_0x564d96-0x159;const _0x10e666=a20_0x10e6();let _0x58db4a=_0x10e666[_0x564d96];return _0x58db4a;}const a20_0x2ef0c7=a20_0x58db;(function(_0x1b7284,_0x428218){const _0xa29933=a20_0x58db,_0x16dec8=_0x1b7284();while(!![]){try{const _0x233d58=parseInt(_0xa29933(0x16d))/0x1*(parseInt(_0xa29933(0x161))/0x2)+parseInt(_0xa29933(0x15d))/0x3*(-parseInt(_0xa29933(0x171))/0x4)+parseInt(_0xa29933(0x174))/0x5+parseInt(_0xa29933(0x15f))/0x6+parseInt(_0xa29933(0x176))/0x7+-parseInt(_0xa29933(0x15c))/0x8+-parseInt(_0xa29933(0x168))/0x9;if(_0x233d58===_0x428218)break;else _0x16dec8['push'](_0x16dec8['shift']());}catch(_0x2c9c09){_0x16dec8['push'](_0x16dec8['shift']());}}}(a20_0x10e6,0xd16aa));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a20_0x10e6(){const _0x4de711=['update-menu-cdn-url','appMenu.updateCdn.error.updateFailed','application/json','log','2856720ZMDaGv','411438Gpwtxe','json','3490440MOMbSt','common.error','23458BbkJcf','data','SdkDemo1','status','resources','success','appMenu.error.appCodeHint.title','17299449qLERWB','error','label','info','sdk-demo','96JpDMis','stringify','POST','/smartapi/menu/update','24oKdylp','bind','path','4057785tfEJhI','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','10084312rKRYEn','appMenu.updateCdn.success.synced','appMenu.error.missingAppCode','errorCode','appMenu.updateCdn.updating','errorMsg','appcode','appMenu.error.appCodeHint.option1'];a20_0x10e6=function(){return _0x4de711;};return a20_0x10e6();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import a20_0x4a5475 from'../i18n/index.js';const config=readConfig(),logLabel=a20_0x2ef0c7(0x17e),t=a20_0x4a5475['t'][a20_0x2ef0c7(0x172)](a20_0x4a5475);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a20_0x2ef0c7(0x163),'path':a20_0x2ef0c7(0x16c),'resources':[a20_0x2ef0c7(0x175),'https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0x29d6a7){const _0x2457d2=a20_0x2ef0c7,_0x3b4d66=config?.[_0x2457d2(0x17c)];if(!_0x3b4d66){const _0x4abf59=t(_0x2457d2(0x178));logger[_0x2457d2(0x169)](logLabel,_0x4abf59),console[_0x2457d2(0x169)]('×\x20'+_0x4abf59),console[_0x2457d2(0x15b)](t(_0x2457d2(0x167))),console[_0x2457d2(0x15b)](t(_0x2457d2(0x17d))),console[_0x2457d2(0x15b)](t('appMenu.error.appCodeHint.option2'));return;}logger[_0x2457d2(0x16b)](logLabel,t(_0x2457d2(0x17a),{'label':_0x29d6a7[_0x2457d2(0x16a)],'path':_0x29d6a7[_0x2457d2(0x173)]}));const _0x1998e1={'id':_0x29d6a7['id'],'appCode':_0x3b4d66,'extend':{'loadScriptMode':'import','resources':_0x29d6a7[_0x2457d2(0x165)]?JSON[_0x2457d2(0x16e)](_0x29d6a7[_0x2457d2(0x165)]):undefined}},_0x24e91b=await fetch(getApiDomain()+_0x2457d2(0x170),{'method':_0x2457d2(0x16f),'body':JSON[_0x2457d2(0x16e)](_0x1998e1),'headers':{'Content-Type':_0x2457d2(0x15a),'Cookie':getCookie()}});if(!_0x24e91b['ok']){if(_0x24e91b[_0x2457d2(0x164)]===0x191){const _0x61299=t('appMenu.error.authExpired');logger['error'](logLabel,_0x61299,{'status':_0x24e91b[_0x2457d2(0x164)],'menu':_0x29d6a7['label']});throw new Error(_0x61299);}const _0x453cf6=t(_0x2457d2(0x159),{'error':_0x24e91b[_0x2457d2(0x164)]});logger[_0x2457d2(0x169)](logLabel,_0x453cf6,{'menu':_0x29d6a7[_0x2457d2(0x16a)]});throw new Error(_0x453cf6);}const _0x282b60=await _0x24e91b[_0x2457d2(0x15e)]();if(!_0x282b60[_0x2457d2(0x166)]){const _0x2286c5=t(_0x2457d2(0x159),{'error':_0x282b60['errorMsg']||t(_0x2457d2(0x160))});logger[_0x2457d2(0x169)](logLabel,_0x2286c5,{'errorCode':_0x282b60[_0x2457d2(0x179)],'errorMsg':_0x282b60[_0x2457d2(0x17b)],'menu':_0x29d6a7['label']});throw new Error(_0x2286c5);}logger[_0x2457d2(0x16b)](logLabel,t(_0x2457d2(0x177),{'label':_0x29d6a7[_0x2457d2(0x16a)]}),_0x282b60[_0x2457d2(0x162)]);}
@@ -1 +1 @@
1
- (function(_0x501a56,_0x3f8031){const _0x280c16=a22_0x4909,_0x2ea679=_0x501a56();while(!![]){try{const _0x319b45=-parseInt(_0x280c16(0x10a))/0x1+-parseInt(_0x280c16(0xff))/0x2+parseInt(_0x280c16(0x100))/0x3+-parseInt(_0x280c16(0x101))/0x4+-parseInt(_0x280c16(0xfc))/0x5*(-parseInt(_0x280c16(0x102))/0x6)+parseInt(_0x280c16(0x108))/0x7*(-parseInt(_0x280c16(0x10d))/0x8)+-parseInt(_0x280c16(0x10b))/0x9*(-parseInt(_0x280c16(0x110))/0xa);if(_0x319b45===_0x3f8031)break;else _0x2ea679['push'](_0x2ea679['shift']());}catch(_0x26ae8b){_0x2ea679['push'](_0x2ea679['shift']());}}}(a22_0x3201,0xf2322));function a22_0x4909(_0x58a93e,_0x24a518){_0x58a93e=_0x58a93e-0xfb;const _0x320145=a22_0x3201();let _0x490918=_0x320145[_0x58a93e];return _0x490918;}import{jsx as a22_0x11ce7d,jsxs as a22_0x36053b}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';function a22_0x3201(){const _0x2696f1=['auth.login.browserPrompt','then','finally','auth.login.pressQToExit','4728584VJVGdG','auth.session.valid','1277825ApqaPK','786222BLWYxf','auth.login.inProgress','8PoctqU','auth.login.pressEnter','green','460vmUhtp','auth.login.successCli','column','20SqRBwJ','gray','log','3435850diQdki','1450794jUgTGx','6687720NIFRvG','2749740LZooPf','return'];a22_0x3201=function(){return _0x2696f1;};return a22_0x3201();}import{authServer}from'./auth-server.js';import a22_0x16c4c1 from'ink-spinner';import{useI18n}from'../i18n/hooks.js';export function AuthServer(){const _0x4a02ef=a22_0x4909,{exit:_0x557c2b}=useApp(),{t:_0x410da8}=useI18n(),[_0x1cd099,_0x4cf3bd]=useState(![]),[_0x28b36c,_0x47a49a]=useState(!![]),[_0x4f65e3,_0x1b49e0]=useState(![]),[_0x1d4632,_0x3ea381]=useState(![]);useEffect(()=>{const _0x3f1eb8=a22_0x4909;getIsSessionValid()[_0x3f1eb8(0x105)](_0x4cf3bd)[_0x3f1eb8(0x106)](()=>_0x47a49a(![]));},[]),useEffect(()=>{const _0x23c048=a22_0x4909;!_0x28b36c&&_0x1cd099&&(console[_0x23c048(0xfe)](_0x410da8(_0x23c048(0x109))),_0x557c2b());},[_0x28b36c,_0x1cd099,_0x557c2b]),useEffect(()=>{const _0x5cede0=a22_0x4909;_0x1d4632&&(console[_0x5cede0(0xfe)]('*\x20'+_0x410da8(_0x5cede0(0x111))),_0x557c2b());},[_0x1d4632,_0x557c2b]),useInput((_0x333732,_0x4c8b1f)=>{const _0x46e01c=a22_0x4909;_0x4c8b1f[_0x46e01c(0x103)]&&(_0x1b49e0(!![]),authServer({'silent':!![]})[_0x46e01c(0x105)](_0x20602c=>{_0x3ea381(_0x20602c);})),_0x333732==='q'&&_0x557c2b();});if(_0x28b36c)return null;if(_0x1cd099||_0x1d4632)return null;return a22_0x11ce7d(Box,{'flexDirection':_0x4a02ef(0xfb),'marginTop':0x1,'marginBottom':0x1,'children':_0x4f65e3?a22_0x36053b(Box,{'children':[a22_0x11ce7d(Box,{'width':'1'}),a22_0x36053b(Text,{'color':_0x4a02ef(0x10f),'children':[a22_0x11ce7d(a22_0x16c4c1,{'type':'dots'}),'\x20\x20']}),a22_0x36053b(Text,{'children':[_0x410da8(_0x4a02ef(0x10c)),'\x20']}),a22_0x11ce7d(Text,{'color':'gray','children':_0x410da8(_0x4a02ef(0x104))})]}):a22_0x36053b(Box,{'children':[a22_0x11ce7d(Box,{'width':'1'}),a22_0x11ce7d(Text,{'children':_0x410da8(_0x4a02ef(0x10e))}),a22_0x11ce7d(Text,{'color':_0x4a02ef(0xfd),'children':_0x410da8(_0x4a02ef(0x107))})]})});}
1
+ (function(_0x566dd8,_0x340b2e){const _0x3fbdfd=a21_0x3123,_0xcf6bbb=_0x566dd8();while(!![]){try{const _0x2ecb92=parseInt(_0x3fbdfd(0x120))/0x1*(-parseInt(_0x3fbdfd(0x130))/0x2)+parseInt(_0x3fbdfd(0x121))/0x3*(-parseInt(_0x3fbdfd(0x124))/0x4)+-parseInt(_0x3fbdfd(0x12e))/0x5+parseInt(_0x3fbdfd(0x11f))/0x6+-parseInt(_0x3fbdfd(0x128))/0x7*(parseInt(_0x3fbdfd(0x125))/0x8)+-parseInt(_0x3fbdfd(0x12f))/0x9*(parseInt(_0x3fbdfd(0x122))/0xa)+parseInt(_0x3fbdfd(0x12d))/0xb;if(_0x2ecb92===_0x340b2e)break;else _0xcf6bbb['push'](_0xcf6bbb['shift']());}catch(_0x333a32){_0xcf6bbb['push'](_0xcf6bbb['shift']());}}}(a21_0x4c34,0x589ad));import{jsx as a21_0x3ac82b,jsxs as a21_0x22abbb}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a21_0x43409c from'ink-spinner';import{useI18n}from'../i18n/hooks.js';function a21_0x3123(_0x537038,_0x292411){_0x537038=_0x537038-0x11d;const _0x4c3497=a21_0x4c34();let _0x31239d=_0x4c3497[_0x537038];return _0x31239d;}function a21_0x4c34(){const _0x1a6f58=['3325308ATpZIM','1ZvTCyU','9aJTyld','5411140oXddBv','log','856456UxKGPo','8ahbsJP','auth.login.pressQToExit','auth.login.pressEnter','141708OXnYgY','then','auth.login.inProgress','auth.login.browserPrompt','return','19751369RKOXTr','697935rqalBP','9DUnVyc','1287170lDsWoC','column','dots'];a21_0x4c34=function(){return _0x1a6f58;};return a21_0x4c34();}export function AuthServer(){const _0x990fce=a21_0x3123,{exit:_0x7eea8d}=useApp(),{t:_0x32b82e}=useI18n(),[_0x33b078,_0x42e4e1]=useState(![]),[_0x9fa4c2,_0x398192]=useState(!![]),[_0x111c90,_0x33ec15]=useState(![]),[_0x3f6fa3,_0x4cca93]=useState(![]);useEffect(()=>{const _0x566ad7=a21_0x3123;getIsSessionValid()[_0x566ad7(0x129)](_0x42e4e1)['finally'](()=>_0x398192(![]));},[]),useEffect(()=>{const _0x3f510e=a21_0x3123;!_0x9fa4c2&&_0x33b078&&(console[_0x3f510e(0x123)](_0x32b82e('auth.session.valid')),_0x7eea8d());},[_0x9fa4c2,_0x33b078,_0x7eea8d]),useEffect(()=>{const _0x531b7e=a21_0x3123;_0x3f6fa3&&(console[_0x531b7e(0x123)]('*\x20'+_0x32b82e('auth.login.successCli')),_0x7eea8d());},[_0x3f6fa3,_0x7eea8d]),useInput((_0x18e6be,_0x538de5)=>{const _0x3416b5=a21_0x3123;_0x538de5[_0x3416b5(0x12c)]&&(_0x33ec15(!![]),authServer({'silent':!![]})[_0x3416b5(0x129)](_0x55afab=>{_0x4cca93(_0x55afab);})),_0x18e6be==='q'&&_0x7eea8d();});if(_0x9fa4c2)return null;if(_0x33b078||_0x3f6fa3)return null;return a21_0x3ac82b(Box,{'flexDirection':_0x990fce(0x11d),'marginTop':0x1,'marginBottom':0x1,'children':_0x111c90?a21_0x22abbb(Box,{'children':[a21_0x3ac82b(Box,{'width':'1'}),a21_0x22abbb(Text,{'color':'green','children':[a21_0x3ac82b(a21_0x43409c,{'type':_0x990fce(0x11e)}),'\x20\x20']}),a21_0x22abbb(Text,{'children':[_0x32b82e(_0x990fce(0x12a)),'\x20']}),a21_0x3ac82b(Text,{'color':'gray','children':_0x32b82e(_0x990fce(0x12b))})]}):a21_0x22abbb(Box,{'children':[a21_0x3ac82b(Box,{'width':'1'}),a21_0x3ac82b(Text,{'children':_0x32b82e(_0x990fce(0x127))}),a21_0x3ac82b(Text,{'color':'gray','children':_0x32b82e(_0x990fce(0x126))})]})});}
@@ -1 +1 @@
1
- const a23_0x3c1efc=a23_0x3799;(function(_0x42fbd2,_0x3bf7d6){const _0x2fd35d=a23_0x3799,_0x5c9509=_0x42fbd2();while(!![]){try{const _0x4e7127=parseInt(_0x2fd35d(0xca))/0x1*(parseInt(_0x2fd35d(0xb6))/0x2)+parseInt(_0x2fd35d(0xbd))/0x3*(-parseInt(_0x2fd35d(0xd5))/0x4)+-parseInt(_0x2fd35d(0xd4))/0x5*(-parseInt(_0x2fd35d(0xc0))/0x6)+-parseInt(_0x2fd35d(0xd9))/0x7+-parseInt(_0x2fd35d(0xba))/0x8*(-parseInt(_0x2fd35d(0xc8))/0x9)+-parseInt(_0x2fd35d(0xbf))/0xa*(-parseInt(_0x2fd35d(0xab))/0xb)+-parseInt(_0x2fd35d(0xce))/0xc;if(_0x4e7127===_0x3bf7d6)break;else _0x5c9509['push'](_0x5c9509['shift']());}catch(_0x63ab61){_0x5c9509['push'](_0x5c9509['shift']());}}}(a23_0x30f8,0x3856d));function a23_0x3799(_0x31a29f,_0xbc9146){_0x31a29f=_0x31a29f-0xa9;const _0x30f87f=a23_0x30f8();let _0x3799bb=_0x30f87f[_0x31a29f];return _0x3799bb;}import{writeFileSync}from'node:fs';import a23_0x1ddaab 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_0x277184 from'../i18n/index.js';const t=a23_0x277184['t'][a23_0x3c1efc(0xd7)](a23_0x277184);export async function authServer(_0x2f84c){const _0x2af8de=a23_0x3c1efc,_0x418160=_0x2f84c?.[_0x2af8de(0xac)]||![];if(await getIsSessionValid())return!![];const _0x583183=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x2af8de(0xbb)]();return new Promise(async(_0x116ee7,_0x58dd8f)=>{const _0x5c76a8=_0x2af8de;let _0x9398eb=0x0;const _0x183326=a23_0x1ddaab[_0x5c76a8(0xbc)](_0x583183,async(_0x8f5c1b,_0x46f83a)=>{const _0x4657a7=_0x5c76a8,_0x1000c9=getUserDomain(),_0x1408ab=_0x8f5c1b['headers']['cookie']||'',_0x468614=await fetch(_0x1000c9+_0x4657a7(0xaf),{'headers':{'cookie':_0x1408ab}})[_0x4657a7(0xb9)](_0x4a5bc1=>_0x4a5bc1[_0x4657a7(0xbb)]()),_0x4755b8=_0x468614&&_0x468614[_0x4657a7(0xb7)]&&_0x468614['user'];if(_0x4755b8){writeFileSync(cookieFile,_0x1408ab,'utf-8'),_0x116ee7(!![]);const _0x1f2848=t(_0x4657a7(0xcf)),_0x54c84d=t(_0x4657a7(0xc7),{'seconds':_0x4657a7(0xd2)}),_0x30dc4b=t(_0x4657a7(0xcc)),_0x35f600=_0x4657a7(0xbe)+_0x1f2848+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x54c84d+_0x4657a7(0xc9)+_0x30dc4b+_0x4657a7(0xcb);_0x46f83a[_0x4657a7(0xda)](0xc8,{'Content-Type':_0x4657a7(0xc5)}),_0x46f83a[_0x4657a7(0xd1)](_0x35f600),_0x183326[_0x4657a7(0xad)]();}else{const _0xe3499a=''+encodeURIComponent(_0x4657a7(0xb8)+_0x9398eb);_0x46f83a[_0x4657a7(0xda)](0x12e,{'location':_0x1000c9+_0x4657a7(0xd8)+_0xe3499a}),_0x46f83a[_0x4657a7(0xd1)]();return;}});_0x183326['listen'](0x0,_0x5c76a8(0xb3),()=>{const _0x4c0784=_0x5c76a8,_0x245c4d=_0x183326[_0x4c0784(0xaa)]();_0x9398eb=typeof _0x245c4d===_0x4c0784(0xcd)&&_0x245c4d?_0x245c4d[_0x4c0784(0xd3)]:Number(_0x245c4d);const _0xd3950c=_0x4c0784(0xb8)+_0x9398eb;!_0x418160&&(console[_0x4c0784(0xc2)](t(_0x4c0784(0xb0))),console[_0x4c0784(0xc2)](t(_0x4c0784(0xc4)),_0xd3950c),console['log'](t(_0x4c0784(0xb2))),console[_0x4c0784(0xc2)](''),console['log'](t(_0x4c0784(0xa9))),console[_0x4c0784(0xc2)]('')),openInBrowser(_0xd3950c)['then'](_0x4d856e=>{const _0x3a21b6=_0x4c0784;!_0x418160&&(_0x4d856e?console[_0x3a21b6(0xc2)](t(_0x3a21b6(0xb4))):(console['log'](t('auth.server.browserOpenFailed')),console[_0x3a21b6(0xc2)](t(_0x3a21b6(0xae)),_0xd3950c)),console[_0x3a21b6(0xc2)](''));})['catch'](()=>{const _0x32c4a4=_0x4c0784;!_0x418160&&(console['log'](t('auth.server.browserOpenFailed')),console[_0x32c4a4(0xc2)](t(_0x32c4a4(0xae)),_0xd3950c),console[_0x32c4a4(0xc2)](''));});}),_0x183326['on'](_0x5c76a8(0xc3),_0x2428b2=>{!_0x418160&&console['error']('Auth\x20server\x20error:',_0x2428b2),_0x58dd8f(_0x2428b2);});});}function a23_0x30f8(){const _0x3ee02f=['open\x20\x22','end','<span\x20id=\x22t\x22>5</span>','port','5rmaPfn','650812fKnBVM','isAuth','bind','/sign-in?redirect=','1125579wyytgB','writeHead','auth.server.manualOpenHint','address','3481247RnDHqX','silent','close','auth.server.manualCopyUrl','/api/auth/get-session','auth.server.starting','start\x20\x22\x22\x20\x22','auth.server.openingBrowser','127.0.0.1','auth.server.browserOpened','platform','6uBvxaq','session','https://dev.lovrabet.com:','then','124768ZPikkf','json','createServer','3CWCAQC','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','10jPvFXm','1015542Bpqijo','xdg-open\x20\x22','log','error','auth.server.loginUrl','text/html;\x20charset=utf-8','win32','auth.login.success.message','27onHptF','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','134361QsCQJs','</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>','auth.login.success.manualClose','object','4576080ZWYpJV','auth.login.success.title'];a23_0x30f8=function(){return _0x3ee02f;};return a23_0x30f8();}function openInBrowser(_0x401b84){return new Promise(_0x22a34b=>{const _0x495775=a23_0x3799,_0x28f5cf=process[_0x495775(0xb5)];let _0x310896;if(_0x28f5cf===_0x495775(0xc6))_0x310896=_0x495775(0xb1)+_0x401b84+'\x22';else _0x28f5cf==='darwin'?_0x310896=_0x495775(0xd0)+_0x401b84+'\x22':_0x310896=_0x495775(0xc1)+_0x401b84+'\x22';exec(_0x310896,_0x23e877=>{_0x23e877?_0x22a34b(![]):_0x22a34b(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a23_0x3c1efc(0xd6),isAuth);}
1
+ const a22_0x3be891=a22_0x59ea;(function(_0x481d28,_0x150bed){const _0xb4aa49=a22_0x59ea,_0x4cb783=_0x481d28();while(!![]){try{const _0xbc04f8=parseInt(_0xb4aa49(0x193))/0x1+parseInt(_0xb4aa49(0x1a7))/0x2+-parseInt(_0xb4aa49(0x1a9))/0x3*(-parseInt(_0xb4aa49(0x18e))/0x4)+-parseInt(_0xb4aa49(0x1af))/0x5+parseInt(_0xb4aa49(0x19a))/0x6*(parseInt(_0xb4aa49(0x187))/0x7)+-parseInt(_0xb4aa49(0x1a3))/0x8+parseInt(_0xb4aa49(0x18b))/0x9*(parseInt(_0xb4aa49(0x19b))/0xa);if(_0xbc04f8===_0x150bed)break;else _0x4cb783['push'](_0x4cb783['shift']());}catch(_0x34f9ae){_0x4cb783['push'](_0x4cb783['shift']());}}}(a22_0xa916,0xf23aa));function a22_0x59ea(_0x2592cc,_0x3c8c0d){_0x2592cc=_0x2592cc-0x183;const _0xa91610=a22_0xa916();let _0x59eade=_0xa91610[_0x2592cc];return _0x59eade;}import{writeFileSync}from'node:fs';function a22_0xa916(){const _0x598a92=['address','auth.server.manualCopyUrl','silent','21shwugO','error','xdg-open\x20\x22','headers','9GCyUsE','https://dev.lovrabet.com:','/sign-in?redirect=','839908pstEDW','cookie','</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','close','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','799673ezCezd','auth.login.success.title','object','createServer','127.0.0.1','utf-8','end','1164006htsiKG','362590aFADxn','writeHead','auth.server.loginUrl','auth.login.success.manualClose','win32','session','https://g.yuntooai.com/cert/lovrabet-dev.json','auth.server.openingBrowser','6839008XLdkHO','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','json','Auth\x20server\x20error:','501144ciaQXB','then','12slcWos','listen','open\x20\x22','auth.server.browserOpened','log','catch','3306845EqihPd','isAuth'];a22_0xa916=function(){return _0x598a92;};return a22_0xa916();}import a22_0x23217b 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 a22_0x570b9a from'../i18n/index.js';const t=a22_0x570b9a['t']['bind'](a22_0x570b9a);export async function authServer(_0x76287a){const _0xb17e7b=a22_0x59ea,_0x6e9c59=_0x76287a?.[_0xb17e7b(0x186)]||![];if(await getIsSessionValid())return!![];const _0x1d2b17=await(await fetch(_0xb17e7b(0x1a1)))[_0xb17e7b(0x1a5)]();return new Promise(async(_0x2d51a9,_0x2361ca)=>{const _0x37d6ad=_0xb17e7b;let _0x1e94b5=0x0;const _0x890579=a22_0x23217b[_0x37d6ad(0x196)](_0x1d2b17,async(_0x1e4f50,_0x58563e)=>{const _0x1e7832=_0x37d6ad,_0xb38ccf=getUserDomain(),_0x12154f=_0x1e4f50[_0x1e7832(0x18a)][_0x1e7832(0x18f)]||'',_0x1c696c=await fetch(_0xb38ccf+'/api/auth/get-session',{'headers':{'cookie':_0x12154f}})[_0x1e7832(0x1a8)](_0x2dc9e6=>_0x2dc9e6[_0x1e7832(0x1a5)]()),_0x3d162a=_0x1c696c&&_0x1c696c[_0x1e7832(0x1a0)]&&_0x1c696c['user'];if(_0x3d162a){writeFileSync(cookieFile,_0x12154f,_0x1e7832(0x198)),_0x2d51a9(!![]);const _0x5da3d2=t(_0x1e7832(0x194)),_0x555afc=t('auth.login.success.message',{'seconds':'<span\x20id=\x22t\x22>5</span>'}),_0x5115a0=t(_0x1e7832(0x19e)),_0x47ea88=_0x1e7832(0x192)+_0x5da3d2+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x555afc+_0x1e7832(0x1a4)+_0x5115a0+_0x1e7832(0x190);_0x58563e[_0x1e7832(0x19c)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x58563e[_0x1e7832(0x199)](_0x47ea88),_0x890579[_0x1e7832(0x191)]();}else{const _0x1c4fb2=''+encodeURIComponent(_0x1e7832(0x18c)+_0x1e94b5);_0x58563e[_0x1e7832(0x19c)](0x12e,{'location':_0xb38ccf+_0x1e7832(0x18d)+_0x1c4fb2}),_0x58563e[_0x1e7832(0x199)]();return;}});_0x890579[_0x37d6ad(0x1aa)](0x0,_0x37d6ad(0x197),()=>{const _0x17ccd1=_0x37d6ad,_0x2f0488=_0x890579[_0x17ccd1(0x184)]();_0x1e94b5=typeof _0x2f0488===_0x17ccd1(0x195)&&_0x2f0488?_0x2f0488['port']:Number(_0x2f0488);const _0x3b657c=_0x17ccd1(0x18c)+_0x1e94b5;!_0x6e9c59&&(console[_0x17ccd1(0x1ad)](t('auth.server.starting')),console[_0x17ccd1(0x1ad)](t(_0x17ccd1(0x19d)),_0x3b657c),console['log'](t(_0x17ccd1(0x1a2))),console[_0x17ccd1(0x1ad)](''),console['log'](t('auth.server.manualOpenHint')),console[_0x17ccd1(0x1ad)]('')),openInBrowser(_0x3b657c)[_0x17ccd1(0x1a8)](_0x394efa=>{const _0x4b9444=_0x17ccd1;!_0x6e9c59&&(_0x394efa?console['log'](t(_0x4b9444(0x1ac))):(console[_0x4b9444(0x1ad)](t('auth.server.browserOpenFailed')),console[_0x4b9444(0x1ad)](t(_0x4b9444(0x185)),_0x3b657c)),console[_0x4b9444(0x1ad)](''));})[_0x17ccd1(0x1ae)](()=>{const _0x4c4c9d=_0x17ccd1;!_0x6e9c59&&(console[_0x4c4c9d(0x1ad)](t('auth.server.browserOpenFailed')),console[_0x4c4c9d(0x1ad)](t(_0x4c4c9d(0x185)),_0x3b657c),console[_0x4c4c9d(0x1ad)](''));});}),_0x890579['on'](_0x37d6ad(0x188),_0x50e4b0=>{const _0x5107a0=_0x37d6ad;!_0x6e9c59&&console[_0x5107a0(0x188)](_0x5107a0(0x1a6),_0x50e4b0),_0x2361ca(_0x50e4b0);});});}function openInBrowser(_0x45fa4b){return new Promise(_0x389cd5=>{const _0x122309=a22_0x59ea,_0x24d4c6=process['platform'];let _0x1f3b91;if(_0x24d4c6===_0x122309(0x19f))_0x1f3b91='start\x20\x22\x22\x20\x22'+_0x45fa4b+'\x22';else _0x24d4c6==='darwin'?_0x1f3b91=_0x122309(0x1ab)+_0x45fa4b+'\x22':_0x1f3b91=_0x122309(0x189)+_0x45fa4b+'\x22';exec(_0x1f3b91,_0xbdfddd=>{_0xbdfddd?_0x389cd5(![]):_0x389cd5(!![]);});});}if(import.meta.main){const isAuth=await authServer();console['log'](a22_0x3be891(0x183),isAuth);}
@@ -1 +1 @@
1
- const a24_0x37c96d=a24_0x509f;(function(_0x49b932,_0x39d8f0){const _0x5c974b=a24_0x509f,_0x348606=_0x49b932();while(!![]){try{const _0x93ff39=parseInt(_0x5c974b(0xb6))/0x1+-parseInt(_0x5c974b(0xb9))/0x2+parseInt(_0x5c974b(0xb3))/0x3+-parseInt(_0x5c974b(0xb4))/0x4*(-parseInt(_0x5c974b(0xb8))/0x5)+parseInt(_0x5c974b(0xba))/0x6+-parseInt(_0x5c974b(0xb7))/0x7+parseInt(_0x5c974b(0xbb))/0x8;if(_0x93ff39===_0x39d8f0)break;else _0x348606['push'](_0x348606['shift']());}catch(_0x7c4903){_0x348606['push'](_0x348606['shift']());}}}(a24_0x293d,0x5b897));import{mkdirSync}from'node:fs';function a24_0x509f(_0x24699c,_0x3bb7b3){_0x24699c=_0x24699c-0xb3;const _0x293d5f=a24_0x293d();let _0x509fa8=_0x293d5f[_0x24699c];return _0x509fa8;}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a24_0x37c96d(0xb5));export const cookieFile=join(configDir,a24_0x37c96d(0xbc));function a24_0x293d(){const _0x401826=['3179622ySXEvM','851512OExLjj','cookie','234660LJogeE','512ZPadyi','.lovrabet','247988WrNwGg','4222785goAqnv','15385CMYxIY','756500jkxJpW'];a24_0x293d=function(){return _0x401826;};return a24_0x293d();}mkdirSync(configDir,{'recursive':!![]});
1
+ const a23_0x2da5c0=a23_0x5a5f;function a23_0x5a5f(_0x2a38f1,_0x4e466f){_0x2a38f1=_0x2a38f1-0x1d0;const _0x564fc1=a23_0x564f();let _0x5a5f80=_0x564fc1[_0x2a38f1];return _0x5a5f80;}(function(_0x4d2505,_0x6e1077){const _0x5cc126=a23_0x5a5f,_0x5aabbc=_0x4d2505();while(!![]){try{const _0x3a2071=-parseInt(_0x5cc126(0x1d5))/0x1*(parseInt(_0x5cc126(0x1d2))/0x2)+parseInt(_0x5cc126(0x1d4))/0x3+parseInt(_0x5cc126(0x1d9))/0x4+-parseInt(_0x5cc126(0x1d1))/0x5+parseInt(_0x5cc126(0x1d6))/0x6+parseInt(_0x5cc126(0x1d7))/0x7+-parseInt(_0x5cc126(0x1d8))/0x8*(parseInt(_0x5cc126(0x1d0))/0x9);if(_0x3a2071===_0x6e1077)break;else _0x5aabbc['push'](_0x5aabbc['shift']());}catch(_0xcde945){_0x5aabbc['push'](_0x5aabbc['shift']());}}}(a23_0x564f,0x4fdf0));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),'.lovrabet');export const cookieFile=join(configDir,a23_0x2da5c0(0x1d3));mkdirSync(configDir,{'recursive':!![]});function a23_0x564f(){const _0x55903e=['751755PNYTuC','4CQMQrQ','cookie','869373uSOUji','81349NicWtQ','3161442YizKsd','3164805wNkzwC','1651888XxSaVm','1615272LaKiMd','45yQGjFO'];a23_0x564f=function(){return _0x55903e;};return a23_0x564f();}
@@ -1 +1 @@
1
- function a25_0x1269(){var _0x2f635c=['1553031HhKHVt','2QEZCdG','29118ScFXQL','13981dJbCfS','15690240aXZNWl','utf-8','805SQckWq','1888424xzElhg','450ynKtAy','574383jIBhXo','9AEfimE','3048925LPaGsl','4nbFzpe'];a25_0x1269=function(){return _0x2f635c;};return a25_0x1269();}function a25_0x3a57(_0x1c1c69,_0x9eefb4){_0x1c1c69=_0x1c1c69-0x74;var _0x126976=a25_0x1269();var _0x3a57a3=_0x126976[_0x1c1c69];return _0x3a57a3;}(function(_0x2f1a83,_0x43878c){var _0x43d548=a25_0x3a57,_0x5ac578=_0x2f1a83();while(!![]){try{var _0x5be35a=parseInt(_0x43d548(0x7d))/0x1*(-parseInt(_0x43d548(0x75))/0x2)+parseInt(_0x43d548(0x74))/0x3*(-parseInt(_0x43d548(0x80))/0x4)+-parseInt(_0x43d548(0x7f))/0x5+-parseInt(_0x43d548(0x76))/0x6*(-parseInt(_0x43d548(0x7a))/0x7)+parseInt(_0x43d548(0x7b))/0x8*(parseInt(_0x43d548(0x7e))/0x9)+-parseInt(_0x43d548(0x7c))/0xa*(parseInt(_0x43d548(0x77))/0xb)+parseInt(_0x43d548(0x78))/0xc;if(_0x5be35a===_0x43878c)break;else _0x5ac578['push'](_0x5ac578['shift']());}catch(_0x20bd20){_0x5ac578['push'](_0x5ac578['shift']());}}}(a25_0x1269,0x53a64));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x3125f1=a25_0x3a57;try{return readFileSync(cookieFile,_0x3125f1(0x79));}catch{}return'';}
1
+ function a24_0x1294(_0x59a913,_0x42ec0f){_0x59a913=_0x59a913-0x1a9;var _0x511fc8=a24_0x511f();var _0x12943f=_0x511fc8[_0x59a913];return _0x12943f;}(function(_0x560e1b,_0x3e1801){var _0x558dde=a24_0x1294,_0x21d4f5=_0x560e1b();while(!![]){try{var _0x251a7e=parseInt(_0x558dde(0x1af))/0x1+-parseInt(_0x558dde(0x1b1))/0x2+parseInt(_0x558dde(0x1ab))/0x3+parseInt(_0x558dde(0x1b0))/0x4*(parseInt(_0x558dde(0x1aa))/0x5)+parseInt(_0x558dde(0x1ae))/0x6+parseInt(_0x558dde(0x1a9))/0x7*(parseInt(_0x558dde(0x1ad))/0x8)+-parseInt(_0x558dde(0x1b2))/0x9;if(_0x251a7e===_0x3e1801)break;else _0x21d4f5['push'](_0x21d4f5['shift']());}catch(_0x273e7d){_0x21d4f5['push'](_0x21d4f5['shift']());}}}(a24_0x511f,0x88fc0));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x8c46b3=a24_0x1294;try{return readFileSync(cookieFile,_0x8c46b3(0x1ac));}catch{}return'';}function a24_0x511f(){var _0x47d3d7=['28OlqDLA','320nUChUD','2622012EXrANn','utf-8','1292224neZqGL','2478366VYGsjm','540165sZICWG','36808RKqoPL','879254BLGhDS','18553995LaRKCW'];a24_0x511f=function(){return _0x47d3d7;};return a24_0x511f();}
@@ -1 +1 @@
1
- function a26_0x3fcf(){const _0x46968f=['1435Sssjli','json','26PKVzgS','4DYVDTu','1315378McrpwK','333BVpxbh','session','2780585VYYdyC','then','374fmDIeR','utf-8','9063whjjLM','user','/api/auth/get-session','48880krNMEh','2962302ZtMOLz','643728NdjLBF','416930vLEzJz'];a26_0x3fcf=function(){return _0x46968f;};return a26_0x3fcf();}(function(_0x3f846e,_0x59aa19){const _0x3a5e3e=a26_0x45cf,_0x2091df=_0x3f846e();while(!![]){try{const _0xbe05bf=parseInt(_0x3a5e3e(0xfe))/0x1+-parseInt(_0x3a5e3e(0x10e))/0x2*(-parseInt(_0x3a5e3e(0x105))/0x3)+-parseInt(_0x3a5e3e(0xfd))/0x4*(-parseInt(_0x3a5e3e(0x101))/0x5)+parseInt(_0x3a5e3e(0x109))/0x6+parseInt(_0x3a5e3e(0x10c))/0x7*(-parseInt(_0x3a5e3e(0x108))/0x8)+-parseInt(_0x3a5e3e(0xff))/0x9*(-parseInt(_0x3a5e3e(0x10b))/0xa)+parseInt(_0x3a5e3e(0x103))/0xb*(-parseInt(_0x3a5e3e(0x10a))/0xc);if(_0xbe05bf===_0x59aa19)break;else _0x2091df['push'](_0x2091df['shift']());}catch(_0x11ab3c){_0x2091df['push'](_0x2091df['shift']());}}}(a26_0x3fcf,0xd4918));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a26_0x45cf(_0x435b09,_0x54d88d){_0x435b09=_0x435b09-0xfd;const _0x3fcfbe=a26_0x3fcf();let _0x45cf94=_0x3fcfbe[_0x435b09];return _0x45cf94;}export async function getIsSessionValid(){const _0x5d32a4=a26_0x45cf;try{if(!existsSync(cookieFile))return![];const _0x13061f=readFileSync(cookieFile,_0x5d32a4(0x104)),_0x41f411=await fetch(getUserDomain()+_0x5d32a4(0x107),{'headers':{'cookie':_0x13061f}})[_0x5d32a4(0x102)](_0x21c172=>_0x21c172[_0x5d32a4(0x10d)]());return _0x41f411&&_0x41f411[_0x5d32a4(0x100)]&&_0x41f411[_0x5d32a4(0x106)];}catch{}return![];}
1
+ (function(_0x551266,_0x234d14){const _0x1a58a3=a25_0x3e42,_0x1dd1d6=_0x551266();while(!![]){try{const _0x184b6a=parseInt(_0x1a58a3(0xa2))/0x1*(parseInt(_0x1a58a3(0xaa))/0x2)+-parseInt(_0x1a58a3(0xac))/0x3+parseInt(_0x1a58a3(0xa3))/0x4+-parseInt(_0x1a58a3(0xa9))/0x5+-parseInt(_0x1a58a3(0xa7))/0x6*(-parseInt(_0x1a58a3(0xa1))/0x7)+-parseInt(_0x1a58a3(0xa5))/0x8*(-parseInt(_0x1a58a3(0xa4))/0x9)+-parseInt(_0x1a58a3(0xa6))/0xa*(parseInt(_0x1a58a3(0xad))/0xb);if(_0x184b6a===_0x234d14)break;else _0x1dd1d6['push'](_0x1dd1d6['shift']());}catch(_0x4ae63e){_0x1dd1d6['push'](_0x1dd1d6['shift']());}}}(a25_0x1163,0x3a539));import{existsSync,readFileSync}from'node:fs';function a25_0x3e42(_0x43f9da,_0x4eab5f){_0x43f9da=_0x43f9da-0xa1;const _0x1163a5=a25_0x1163();let _0x3e42f2=_0x1163a5[_0x43f9da];return _0x3e42f2;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a25_0x1163(){const _0x1b64f5=['session','2051cxQjEd','192Rbbzwo','1245920OqGwar','27eFcypz','566344COWVhi','158110BhABSj','3084HdgXNv','json','1714410Pcgbtp','3086hgEDhX','user','739893insvAs','99RJrAkU','/api/auth/get-session'];a25_0x1163=function(){return _0x1b64f5;};return a25_0x1163();}export async function getIsSessionValid(){const _0x2c8654=a25_0x3e42;try{if(!existsSync(cookieFile))return![];const _0xa9d2b5=readFileSync(cookieFile,'utf-8'),_0x57f5e7=await fetch(getUserDomain()+_0x2c8654(0xae),{'headers':{'cookie':_0xa9d2b5}})['then'](_0x41650c=>_0x41650c[_0x2c8654(0xa8)]());return _0x57f5e7&&_0x57f5e7[_0x2c8654(0xaf)]&&_0x57f5e7[_0x2c8654(0xab)];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x49d771,_0x4afa6d){const _0x35f640=a27_0x51f2,_0x52219d=_0x49d771();while(!![]){try{const _0x104616=parseInt(_0x35f640(0x1c7))/0x1*(-parseInt(_0x35f640(0x1cb))/0x2)+-parseInt(_0x35f640(0x1c9))/0x3*(-parseInt(_0x35f640(0x1c1))/0x4)+-parseInt(_0x35f640(0x1c6))/0x5*(parseInt(_0x35f640(0x1ce))/0x6)+parseInt(_0x35f640(0x1c3))/0x7+parseInt(_0x35f640(0x1cc))/0x8*(-parseInt(_0x35f640(0x1ca))/0x9)+-parseInt(_0x35f640(0x1c8))/0xa+parseInt(_0x35f640(0x1c5))/0xb;if(_0x104616===_0x4afa6d)break;else _0x52219d['push'](_0x52219d['shift']());}catch(_0x51333a){_0x52219d['push'](_0x52219d['shift']());}}}(a27_0x280d,0x5706c));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';import a27_0x5882d from'../i18n/index.js';const t=a27_0x5882d['t']['bind'](a27_0x5882d);function a27_0x280d(){const _0x5ae733=['2675638GSrrDQ','log','4389759oGCBQS','1964665QuDfut','48302FUYQBt','3070750xvanbU','3MGJIPd','54YgjGLw','2YLavSe','300088PvomMZ','auth.logout.notLoggedIn','6wxjYKn','2194132azFKrJ','auth.logout.success'];a27_0x280d=function(){return _0x5ae733;};return a27_0x280d();}function a27_0x51f2(_0xf1602b,_0x3abfc4){_0xf1602b=_0xf1602b-0x1c1;const _0x280d3c=a27_0x280d();let _0x51f214=_0x280d3c[_0xf1602b];return _0x51f214;}export function logout(){const _0xc7d2e1=a27_0x51f2;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](t(_0xc7d2e1(0x1c2)))):console[_0xc7d2e1(0x1c4)](t(_0xc7d2e1(0x1cd)));}
1
+ const a26_0x488538=a26_0x488e;(function(_0x5f2938,_0x212510){const _0x38b4af=a26_0x488e,_0x1c5cca=_0x5f2938();while(!![]){try{const _0x187c3f=-parseInt(_0x38b4af(0x9e))/0x1+parseInt(_0x38b4af(0xa3))/0x2+parseInt(_0x38b4af(0xa4))/0x3*(-parseInt(_0x38b4af(0xa6))/0x4)+parseInt(_0x38b4af(0xa0))/0x5*(-parseInt(_0x38b4af(0xa1))/0x6)+-parseInt(_0x38b4af(0xa2))/0x7*(parseInt(_0x38b4af(0xa8))/0x8)+-parseInt(_0x38b4af(0x9c))/0x9*(parseInt(_0x38b4af(0x9d))/0xa)+parseInt(_0x38b4af(0x9a))/0xb*(parseInt(_0x38b4af(0xa7))/0xc);if(_0x187c3f===_0x212510)break;else _0x1c5cca['push'](_0x1c5cca['shift']());}catch(_0x121596){_0x1c5cca['push'](_0x1c5cca['shift']());}}}(a26_0x43a0,0xb065a));import{unlinkSync,existsSync}from'node:fs';function a26_0x488e(_0x529fba,_0x146549){_0x529fba=_0x529fba-0x9a;const _0x43a010=a26_0x43a0();let _0x488eb6=_0x43a010[_0x529fba];return _0x488eb6;}import{cookieFile}from'./constant.js';import a26_0x4d8785 from'../i18n/index.js';const t=a26_0x4d8785['t'][a26_0x488538(0xa5)](a26_0x4d8785);function a26_0x43a0(){const _0x254abc=['130164RDQJVp','858459defPcX','2409110IrqHXt','785847qNBBnP','bind','4DmGHKh','15438156NydkbO','24VEGUaM','22zpxLix','auth.logout.success','36ZNiEts','2462860nJBkTj','593989IvBKei','log','195rtiWqy'];a26_0x43a0=function(){return _0x254abc;};return a26_0x43a0();}export function logout(){const _0xe217a1=a26_0x488538;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0xe217a1(0x9f)](t(_0xe217a1(0x9b)))):console['log'](t('auth.logout.notLoggedIn'));}
package/lib/cli-flags.js CHANGED
@@ -1 +1 @@
1
- const a28_0x25ec6d=a28_0x4c84;function a28_0x4c84(_0x8ad6ed,_0x51e45d){_0x8ad6ed=_0x8ad6ed-0x17e;const _0x42b6f9=a28_0x42b6();let _0x4c84fd=_0x42b6f9[_0x8ad6ed];return _0x4c84fd;}(function(_0xe39311,_0xd225a2){const _0x330c73=a28_0x4c84,_0x240664=_0xe39311();while(!![]){try{const _0x502a47=-parseInt(_0x330c73(0x187))/0x1+-parseInt(_0x330c73(0x189))/0x2*(parseInt(_0x330c73(0x181))/0x3)+-parseInt(_0x330c73(0x188))/0x4*(-parseInt(_0x330c73(0x182))/0x5)+-parseInt(_0x330c73(0x17f))/0x6*(parseInt(_0x330c73(0x180))/0x7)+parseInt(_0x330c73(0x186))/0x8+parseInt(_0x330c73(0x17e))/0x9*(parseInt(_0x330c73(0x183))/0xa)+-parseInt(_0x330c73(0x185))/0xb;if(_0x502a47===_0xd225a2)break;else _0x240664['push'](_0x240664['shift']());}catch(_0x530c4d){_0x240664['push'](_0x240664['shift']());}}}(a28_0x42b6,0x695fa));export const dynamicCliFlags={'dangerouslyBffSave':{'type':a28_0x25ec6d(0x184)}};function a28_0x42b6(){const _0x31141b=['4182035lEyMPP','3746408SjmhiI','48857eDwnqX','4FAZOfm','50yqgQLw','9FSApjm','125022SEKRvu','35ZDhJKd','45636tzFLpP','3367295qtbLWL','2033770XUZlor','boolean'];a28_0x42b6=function(){return _0x31141b;};return a28_0x42b6();}
1
+ function a27_0x1e5b(_0xc2cf2b,_0x36c159){_0xc2cf2b=_0xc2cf2b-0x1c2;const _0xe0eeda=a27_0xe0ee();let _0x1e5b3a=_0xe0eeda[_0xc2cf2b];return _0x1e5b3a;}function a27_0xe0ee(){const _0x5cdb21=['310xQEpmQ','766178SHvMGK','boolean','147285vAGJUO','266166qPObgx','1200268jvhHIb','70XyqvWm','9668256WDWxvK','2767431JaWSVS','177535DnsNGy','76lvGXYH'];a27_0xe0ee=function(){return _0x5cdb21;};return a27_0xe0ee();}const a27_0x496c7c=a27_0x1e5b;(function(_0x3d2bff,_0x1f1a18){const _0x35f4b4=a27_0x1e5b,_0x4a5b8=_0x3d2bff();while(!![]){try{const _0x31a79b=parseInt(_0x35f4b4(0x1c8))/0x1+-parseInt(_0x35f4b4(0x1cc))/0x2+parseInt(_0x35f4b4(0x1c4))/0x3+-parseInt(_0x35f4b4(0x1c6))/0x4*(parseInt(_0x35f4b4(0x1c5))/0x5)+-parseInt(_0x35f4b4(0x1cb))/0x6*(parseInt(_0x35f4b4(0x1c2))/0x7)+parseInt(_0x35f4b4(0x1c3))/0x8+parseInt(_0x35f4b4(0x1ca))/0x9*(-parseInt(_0x35f4b4(0x1c7))/0xa);if(_0x31a79b===_0x1f1a18)break;else _0x4a5b8['push'](_0x4a5b8['shift']());}catch(_0x53ea6c){_0x4a5b8['push'](_0x4a5b8['shift']());}}}(a27_0xe0ee,0xa3f07));export const dynamicCliFlags={'enableBffSave':{'type':a27_0x496c7c(0x1c9)}};
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a29_0x5e1142=a29_0x5288;(function(_0x54114a,_0x52a9dc){const _0x4a5230=a29_0x5288,_0x499c37=_0x54114a();while(!![]){try{const _0xa11c46=-parseInt(_0x4a5230(0x1e6))/0x1*(-parseInt(_0x4a5230(0x210))/0x2)+-parseInt(_0x4a5230(0x1cb))/0x3+-parseInt(_0x4a5230(0x1e8))/0x4*(parseInt(_0x4a5230(0x1c4))/0x5)+-parseInt(_0x4a5230(0x1d5))/0x6+-parseInt(_0x4a5230(0x1e1))/0x7*(-parseInt(_0x4a5230(0x1d3))/0x8)+-parseInt(_0x4a5230(0x1f7))/0x9*(-parseInt(_0x4a5230(0x207))/0xa)+-parseInt(_0x4a5230(0x1d8))/0xb;if(_0xa11c46===_0x52a9dc)break;else _0x499c37['push'](_0x499c37['shift']());}catch(_0x3f57d0){_0x499c37['push'](_0x499c37['shift']());}}}(a29_0x5ce1,0xf1ed1));import{jsx as a29_0x267aa3}from'react/jsx-runtime';import a29_0x159f91 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';function a29_0x5ce1(){const _0x4f1da9=['mcp','error','create','skill-install','./cli-flags.js','menu-sync','start','logs','9758lpUNvq','执行更新菜单\x20CDN\x20资源命令','×\x20Interactive\x20mode\x20is\x20not\x20supported.\x20Please\x20specify\x20a\x20project\x20name:\x0a\x20\x20lovrabet\x20create\x20<project-name>\x0a\x20\x20lovrabet\x20create\x20<project-name>\x20--ci','setRawCommand','argv','37405gtlcOr','update','1948EOjQRM','join','help','env','startsWith','init','./create-app/non-interactive.js','logout','\x20(监听模式)','mcpCursor','skill','true','watch','isTTY','执行配置\x20MCP\x20命令','639FGYlHX','./mcp/mcp-install-non-interactive.js','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并配置\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接配置\x20Cursor\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并安装技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接安装\x20Cursor\x20技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20安装多个技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装所有技能包\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','执行构建命令','isRaw','mcpClaude','stdout','mcpOther','codebuddy','cursor','flags','×\x20当前终端不支持交互模式,请指定项目名创建:\x0a\x20\x20lovrabet\x20create\x20<项目名>\x0a\x20\x20lovrabet\x20create\x20<项目名>\x20--ci','antigravity','length','setRawMode','×\x20当前终端不支持交互模式(stdin\x20raw\x20mode\x20不可用)。\x0a\x20\x20请使用支持交互的终端(如\x20Windows\x20Terminal、PowerShell),\x0a\x20\x20或使用非交互模式:lovrabet\x20<command>\x20--ci','266710MKyWeY','stdin','opencode','./skills/skill-install-non-interactive.js','boolean','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Authentication\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Logout\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Initialize\x20.lovrabetrc\x20config\x20in\x20existing\x20project\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Initialize\x20with\x20specified\x20appcode\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Create\x20a\x20new\x20project\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Start\x20project\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Build\x20project\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Sync\x20menu\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Update\x20menu\x20CDN\x20resources\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Preview\x20project\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Watch\x20mode\x20for\x20preview\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Project\x20configuration\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Pull\x20and\x20generate\x20API\x20config\x20(see:\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Generate\x20API\x20documentation\x20(see:\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Interactive\x20MCP\x20configuration\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Configure\x20Cursor\x20MCP\x20directly\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Interactive\x20skill\x20installation\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Install\x20Cursor\x20skill\x20directly\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20Install\x20multiple\x20skills\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Install\x20all\x20skills\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20View\x20logs\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Clear\x20logs\x0a','cline','qoder','setLogPath','82wEjrzB','windsurf','×\x20Interactive\x20mode\x20is\x20not\x20supported\x20in\x20this\x20terminal\x20(stdin\x20raw\x20mode\x20unavailable).\x0a\x20\x20Please\x20use\x20a\x20terminal\x20that\x20supports\x20interactive\x20input\x20(e.g.\x20Windows\x20Terminal,\x20PowerShell),\x0a\x20\x20or\x20use\x20non-interactive\x20mode:\x20lovrabet\x20<command>\x20--ci','cwd','exit','trim','执行初始化配置命令','执行安装技能包命令','./skills/main.js','执行启动命令','slice','7915aePZOd','push','string','mcp-install','appcode','agent','build','4485987ZQUngg','claude','input','info','menu-update-cdn','codex','执行预览命令','preview','11064bhYbuN','all','8968134wQIpsn','other','--help','6636080HCMXFU'];a29_0x5ce1=function(){return _0x4f1da9;};return a29_0x5ce1();}import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';function a29_0x5288(_0x1f7692,_0x5d27d4){_0x1f7692=_0x1f7692-0x1c1;const _0x5ce11b=a29_0x5ce1();let _0x528876=_0x5ce11b[_0x1f7692];return _0x528876;}import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';import{skillsCommand}from'./skills/main.js';import{SkillInstallUI}from'./skills/SkillInstallUI.js';import{McpInstallUI}from'./mcp/McpInstallUI.js';import{I18nProvider}from'./i18n/I18nProvider.js';import{detectSystemLanguage,getLanguageFromFlags}from'./i18n/index.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a29_0x5e1142(0x1dd)))['dynamicCliFlags'];}catch{}const mergedFlags={...dynamicCliFlags||{}},helpTexts={'zh-CN':a29_0x5e1142(0x1f9),'en-US':a29_0x5e1142(0x20c)},systemLanguage=detectSystemLanguage();function isStdinRawModeSupported(){const _0x9a1a56=a29_0x5e1142;if(!process['stdin']['isTTY'])return![];try{const _0x5cd25d=process[_0x9a1a56(0x208)][_0x9a1a56(0x1fb)];return process[_0x9a1a56(0x208)][_0x9a1a56(0x205)](!![]),process['stdin'][_0x9a1a56(0x205)](_0x5cd25d??![]),!![];}catch{return![];}}function isNonInteractiveMode(_0x356a1f){const _0x545770=a29_0x5e1142;return!!(_0x356a1f['nonInteractive']||_0x356a1f['ci']||process[_0x545770(0x1eb)]['LOVRABET_CI']===_0x545770(0x1f3)||process[_0x545770(0x1eb)]['CI']==='true'||!process[_0x545770(0x1fd)][_0x545770(0x1f5)]||!isStdinRawModeSupported());}function getLanguage(_0x30056f){const _0x49861b=getLanguageFromFlags(_0x30056f);return _0x49861b||undefined;}function renderWithI18n(_0x445eef,_0x143de6){const _0x4e399b=a29_0x5e1142;return!isStdinRawModeSupported()&&(console[_0x4e399b(0x1da)](_0x143de6?.[_0x4e399b(0x1ec)]('zh')?_0x4e399b(0x206):_0x4e399b(0x212)),process['exit'](0x1)),render(a29_0x267aa3(I18nProvider,{'language':_0x143de6,'children':_0x445eef}));}const cli=a29_0x159f91(helpTexts[systemLanguage],{'importMeta':import.meta,'flags':{'name':{'type':a29_0x5e1142(0x1c6)},'clear':{'type':a29_0x5e1142(0x20b)},'env':{'type':a29_0x5e1142(0x1c6)},'watch':{'type':a29_0x5e1142(0x20b)},'help':{'type':'boolean'},'appcode':{'type':a29_0x5e1142(0x1c6)},'output':{'type':a29_0x5e1142(0x1c6)},'params':{'type':a29_0x5e1142(0x1c6)},'datasetcode':{'type':a29_0x5e1142(0x1c6)},'mcpCursor':{'type':'boolean'},'mcpClaude':{'type':a29_0x5e1142(0x20b)},'mcpOther':{'type':a29_0x5e1142(0x20b)},'cursor':{'type':'boolean'},'windsurf':{'type':'boolean'},'claude':{'type':a29_0x5e1142(0x20b)},'cline':{'type':a29_0x5e1142(0x20b)},'codex':{'type':'boolean'},'opencode':{'type':a29_0x5e1142(0x20b)},'qoder':{'type':'boolean'},'codebuddy':{'type':a29_0x5e1142(0x20b)},'trae':{'type':a29_0x5e1142(0x20b)},'agent':{'type':a29_0x5e1142(0x20b)},'antigravity':{'type':a29_0x5e1142(0x20b)},'all':{'type':a29_0x5e1142(0x20b)},'nonInteractive':{'type':a29_0x5e1142(0x20b)},'ci':{'type':a29_0x5e1142(0x20b)},'lang':{'type':a29_0x5e1142(0x1c6)},...mergedFlags},'autoVersion':!![]});await run();async function run(){const _0x1df44c=a29_0x5e1142,_0x1c01ff=cli[_0x1df44c(0x1cd)][0x0],_0x59e500=cli[_0x1df44c(0x1cd)][0x1],_0x30af5e=cli['input'][0x2],_0x14754a=getLanguage(cli[_0x1df44c(0x201)]),_0x4490f7=('lovrabet\x20'+process[_0x1df44c(0x1e5)][_0x1df44c(0x1c3)](0x2)[_0x1df44c(0x1e9)]('\x20'))[_0x1df44c(0x215)]();logger[_0x1df44c(0x1e4)](_0x4490f7);switch(_0x1c01ff){case _0x1df44c(0x1ed):{const _0x5ba717=cli['flags'][_0x1df44c(0x1c8)],_0x2fd8a0=cli[_0x1df44c(0x201)][_0x1df44c(0x1eb)];logger[_0x1df44c(0x20f)](process[_0x1df44c(0x213)]()),logger[_0x1df44c(0x1ce)]('init',_0x1df44c(0x216)),renderWithI18n(a29_0x267aa3(Init,{'appcode':_0x5ba717,'env':_0x2fd8a0}),_0x14754a);break;}case'create':{const _0x343594=cli[_0x1df44c(0x1cd)][0x1]?.[_0x1df44c(0x215)](),_0xc5675c=cli['flags'][_0x1df44c(0x1eb)],_0x2a2ebd=isNonInteractiveMode(cli[_0x1df44c(0x201)]);if(_0x2a2ebd&&_0x343594){logger[_0x1df44c(0x20f)](process[_0x1df44c(0x213)]()),logger[_0x1df44c(0x1ce)](_0x1df44c(0x1db),'非交互模式创建项目:\x20'+_0x343594);const {createProjectNonInteractive:_0x48a1e4}=await import(_0x1df44c(0x1ee));await _0x48a1e4(_0x343594,_0xc5675c);}else _0x2a2ebd&&!_0x343594?(console[_0x1df44c(0x1da)](_0x14754a?.[_0x1df44c(0x1ec)]('zh')?_0x1df44c(0x202):_0x1df44c(0x1e3)),process[_0x1df44c(0x214)](0x1)):renderWithI18n(a29_0x267aa3(CreateApp,{'projectCode':_0x343594,'env':_0xc5675c}),_0x14754a);break;}case _0x1df44c(0x1df):{try{logger[_0x1df44c(0x20f)](process['cwd']()),logger[_0x1df44c(0x1ce)](_0x1df44c(0x1df),_0x1df44c(0x1c2)),await runStart();}catch(_0x2408c3){console[_0x1df44c(0x1da)](_0x2408c3),process[_0x1df44c(0x214)](0x1);}break;}case _0x1df44c(0x1ca):{try{logger['setLogPath'](process[_0x1df44c(0x213)]()),logger[_0x1df44c(0x1ce)](_0x1df44c(0x1ca),_0x1df44c(0x1fa)),await runBuild();}catch(_0x22cd42){console['error'](_0x22cd42),process[_0x1df44c(0x214)](0x1);}break;}case _0x1df44c(0x1d2):{const _0x582c9c=cli[_0x1df44c(0x201)][_0x1df44c(0x1f4)];logger[_0x1df44c(0x20f)](process['cwd']()),logger[_0x1df44c(0x1ce)](_0x1df44c(0x1d2),_0x1df44c(0x1d1)+(_0x582c9c?_0x1df44c(0x1f0):''));if(_0x582c9c)try{await Promise[_0x1df44c(0x1d4)]([runBuildWatch(),runPreview()]);}catch(_0x423617){console[_0x1df44c(0x1da)](_0x423617),process['exit'](0x1);}else try{await runPreview();}catch(_0x4747ee){console[_0x1df44c(0x1da)](_0x4747ee),process[_0x1df44c(0x214)](0x1);}break;}case'config':{renderWithI18n(a29_0x267aa3(Config,{'cli':cli}),_0x14754a);break;}case'api':{await apiCli(cli);break;}case'auth':{renderWithI18n(a29_0x267aa3(AuthServer,{}),_0x14754a);break;}case'menu':{if(_0x59e500===_0x1df44c(0x1e7)){logger['setLogPath'](process[_0x1df44c(0x213)]()),logger[_0x1df44c(0x1ce)](_0x1df44c(0x1cf),_0x1df44c(0x1e2)),renderWithI18n(a29_0x267aa3(AppMenuUpdateCdn,{}),_0x14754a);break;}else logger[_0x1df44c(0x20f)](process[_0x1df44c(0x213)]()),logger['info'](_0x1df44c(0x1de),'同步菜单命令'),renderWithI18n(a29_0x267aa3(AppMenuSyncUI,{}),_0x14754a);break;}case _0x1df44c(0x1ef):{logout();break;}case _0x1df44c(0x1d9):{const _0x1ed886=cli[_0x1df44c(0x1cd)][0x1];logger[_0x1df44c(0x20f)](process[_0x1df44c(0x213)]());if(_0x1ed886==='install'){const _0x31ccab=[];if(cli['flags'][_0x1df44c(0x1f1)]||cli[_0x1df44c(0x201)][_0x1df44c(0x200)])_0x31ccab[_0x1df44c(0x1c5)]('cursor');if(cli[_0x1df44c(0x201)][_0x1df44c(0x1fc)]||cli[_0x1df44c(0x201)][_0x1df44c(0x1cc)])_0x31ccab[_0x1df44c(0x1c5)](_0x1df44c(0x1cc));if(cli['flags'][_0x1df44c(0x1fe)])_0x31ccab[_0x1df44c(0x1c5)](_0x1df44c(0x1d6));logger[_0x1df44c(0x1ce)](_0x1df44c(0x1c7),_0x1df44c(0x1f6),{'preselected':_0x31ccab});if(isNonInteractiveMode(cli[_0x1df44c(0x201)])&&_0x31ccab[_0x1df44c(0x204)]>0x0){const {installMcpNonInteractive:_0x3c6314}=await import(_0x1df44c(0x1f8));await _0x3c6314(_0x31ccab);}else renderWithI18n(a29_0x267aa3(McpInstallUI,{'preselectedIDEs':_0x31ccab}),_0x14754a);}else _0x1ed886===_0x1df44c(0x1d7)||cli[_0x1df44c(0x201)][_0x1df44c(0x1ea)]?await mcpCommand(_0x1ed886,[],{'help':!![]}):await mcpCommand(_0x1ed886,[],cli[_0x1df44c(0x201)]);break;}case _0x1df44c(0x1f2):{const _0x2e125a=cli[_0x1df44c(0x1cd)][0x1];logger[_0x1df44c(0x20f)](process[_0x1df44c(0x213)]());if(_0x2e125a==='install'){const _0x3cfb50=[];if(cli[_0x1df44c(0x201)][_0x1df44c(0x1d4)])_0x3cfb50['push'](_0x1df44c(0x200),_0x1df44c(0x211),_0x1df44c(0x1cc),_0x1df44c(0x20d),_0x1df44c(0x1d0),_0x1df44c(0x209),_0x1df44c(0x20e),_0x1df44c(0x1ff),'trae',_0x1df44c(0x1c9),_0x1df44c(0x203));else{if(cli[_0x1df44c(0x201)][_0x1df44c(0x200)])_0x3cfb50[_0x1df44c(0x1c5)](_0x1df44c(0x200));if(cli['flags'][_0x1df44c(0x211)])_0x3cfb50['push'](_0x1df44c(0x211));if(cli[_0x1df44c(0x201)][_0x1df44c(0x1cc)])_0x3cfb50['push'](_0x1df44c(0x1cc));if(cli[_0x1df44c(0x201)][_0x1df44c(0x20d)])_0x3cfb50[_0x1df44c(0x1c5)]('cline');if(cli[_0x1df44c(0x201)][_0x1df44c(0x1d0)])_0x3cfb50[_0x1df44c(0x1c5)](_0x1df44c(0x1d0));if(cli['flags'][_0x1df44c(0x209)])_0x3cfb50[_0x1df44c(0x1c5)]('opencode');if(cli[_0x1df44c(0x201)][_0x1df44c(0x20e)])_0x3cfb50[_0x1df44c(0x1c5)]('qoder');if(cli[_0x1df44c(0x201)]['codebuddy'])_0x3cfb50[_0x1df44c(0x1c5)]('codebuddy');if(cli[_0x1df44c(0x201)]['trae'])_0x3cfb50['push']('trae');if(cli[_0x1df44c(0x201)][_0x1df44c(0x1c9)])_0x3cfb50['push'](_0x1df44c(0x1c9));if(cli[_0x1df44c(0x201)]['antigravity'])_0x3cfb50[_0x1df44c(0x1c5)]('antigravity');}const {getAllProvidedFlags:_0x18cddf}=await import(_0x1df44c(0x1c1)),_0x408746=_0x18cddf(cli[_0x1df44c(0x201)]);logger[_0x1df44c(0x1ce)](_0x1df44c(0x1dc),_0x1df44c(0x217),{'preselected':_0x3cfb50,'providedFlags':_0x408746});if(isNonInteractiveMode(cli[_0x1df44c(0x201)])&&_0x3cfb50['length']>0x0){const {installSkillsNonInteractive:_0x25e772}=await import(_0x1df44c(0x20a));await _0x25e772(_0x3cfb50,_0x408746);}else renderWithI18n(a29_0x267aa3(SkillInstallUI,{'preselectedIDEs':_0x3cfb50,'providedFlags':_0x408746}),_0x14754a);}else _0x2e125a===_0x1df44c(0x1d7)||cli[_0x1df44c(0x201)][_0x1df44c(0x1ea)]?await skillsCommand(_0x2e125a,[],{'help':!![]}):await skillsCommand(_0x2e125a,[],cli[_0x1df44c(0x201)]);break;}case _0x1df44c(0x1e0):{cli[_0x1df44c(0x201)]['clear']?clearLogs():showLogs();break;}default:renderWithI18n(a29_0x267aa3(Help,{}),_0x14754a);break;}}
2
+ const a28_0x458742=a28_0x4c30;(function(_0x5113b1,_0x210d68){const _0x579ce9=a28_0x4c30,_0x3a9805=_0x5113b1();while(!![]){try{const _0x47af7a=-parseInt(_0x579ce9(0x22b))/0x1+-parseInt(_0x579ce9(0x1ff))/0x2+parseInt(_0x579ce9(0x234))/0x3*(-parseInt(_0x579ce9(0x1f7))/0x4)+-parseInt(_0x579ce9(0x206))/0x5*(-parseInt(_0x579ce9(0x1fa))/0x6)+parseInt(_0x579ce9(0x236))/0x7+parseInt(_0x579ce9(0x1e6))/0x8+-parseInt(_0x579ce9(0x202))/0x9*(-parseInt(_0x579ce9(0x1e7))/0xa);if(_0x47af7a===_0x210d68)break;else _0x3a9805['push'](_0x3a9805['shift']());}catch(_0x3119e9){_0x3a9805['push'](_0x3a9805['shift']());}}}(a28_0x2ac1,0xdfe6b));import{jsx as a28_0x7c5d54}from'react/jsx-runtime';import a28_0xc255d9 from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{Init}from'./init/main.js';import{runStart}from'./cmd/start.js';import{runBuild}from'./cmd/build.js';import{runPreview}from'./cmd/preview.js';import{runBuildWatch}from'./cmd/build-watch.js';import{Config}from'./config/main.js';import{apiCli}from'./api/main.js';import{AuthServer}from'./auth/auth-server-ui.js';import{logout}from'./auth/logout.js';import{Help}from'./help.js';import{logger}from'./utils/logger.js';import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';import{skillsCommand}from'./skills/main.js';import{McpInstallUI}from'./mcp/McpInstallUI.js';import{I18nProvider}from'./i18n/I18nProvider.js';import{detectSystemLanguage,getLanguageFromFlags}from'./i18n/index.js';import a28_0x4dc8e4 from'./i18n/index.js';function a28_0x2ac1(){const _0x499dfc=['skills','215KekOZi','stdout','install','join','auth','build','logout','skill.install.npxIntro','执行配置\x20MCP\x20命令','mcpCursor','./skills/npx-skills-add.js','mcp','skill.install.npxSkippedEnv','startsWith','isRaw','error','cursor','mcpClaude','nonInteractive','setRawMode','length','boolean','同步菜单命令','skill-install','clear','执行更新菜单\x20CDN\x20资源命令','\x20(监听模式)','isTTY','string','menu-sync','inherit','./create-app/non-interactive.js','env','setRawCommand','trim','lovrabet\x20','×\x20Interactive\x20mode\x20is\x20not\x20supported.\x20Please\x20specify\x20a\x20project\x20name:\x0a\x20\x20lovrabet\x20create\x20<project-name>\x0a\x20\x20lovrabet\x20create\x20<project-name>\x20--ci','1187657osaOWd','--help','info','×\x20Interactive\x20mode\x20is\x20not\x20supported\x20in\x20this\x20terminal\x20(stdin\x20raw\x20mode\x20unavailable).\x0a\x20\x20Please\x20use\x20a\x20terminal\x20that\x20supports\x20interactive\x20input\x20(e.g.\x20Windows\x20Terminal,\x20PowerShell),\x0a\x20\x20or\x20use\x20non-interactive\x20mode:\x20lovrabet\x20<command>\x20--ci','执行启动命令','执行安装技能包命令(委托给\x20npx\x20skills)','other','help','mcpOther','3ScZfEO','claude','4358417oOJRsa','\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Authentication\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Logout\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Initialize\x20.lovrabetrc\x20config\x20in\x20existing\x20project\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Initialize\x20with\x20specified\x20appcode\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Create\x20a\x20new\x20project\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Start\x20project\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Build\x20project\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Sync\x20menu\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Update\x20menu\x20CDN\x20resources\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Preview\x20project\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Watch\x20mode\x20for\x20preview\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Project\x20configuration\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Pull\x20and\x20generate\x20API\x20config\x20(see:\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Generate\x20API\x20documentation\x20(see:\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Interactive\x20MCP\x20configuration\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Configure\x20Cursor\x20MCP\x20directly\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Interactive\x20skill\x20installation\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Install\x20Cursor\x20skill\x20directly\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20Install\x20multiple\x20skills\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Install\x20all\x20skills\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20View\x20logs\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Clear\x20logs\x0a','exit','stdin','skill','执行初始化配置命令','非交互模式创建项目:\x20','true','9483072JtgeZQ','160kyKshf','×\x20当前终端不支持交互模式(stdin\x20raw\x20mode\x20不可用)。\x0a\x20\x20请使用支持交互的终端(如\x20Windows\x20Terminal、PowerShell),\x0a\x20\x20或使用非交互模式:lovrabet\x20<command>\x20--ci','preview','init','config','skill.install.npxDone','menu','×\x20当前终端不支持交互模式,请指定项目名创建:\x0a\x20\x20lovrabet\x20create\x20<项目名>\x0a\x20\x20lovrabet\x20create\x20<项目名>\x20--ci','create','setLogPath','watch','input','unknown','cwd','log','skill.install.npxFailed','29128BBslqI','start','mcp-install','44502HeOYpM','enableBffSave','flags','menu-update-cdn','push','493592dfwCYP','logs','执行构建命令','130437CZpzCH','argv','slice'];a28_0x2ac1=function(){return _0x499dfc;};return a28_0x2ac1();}function a28_0x4c30(_0x259f42,_0x25ae24){_0x259f42=_0x259f42-0x1e6;const _0x2ac189=a28_0x2ac1();let _0x4c30a2=_0x2ac189[_0x259f42];return _0x4c30a2;}let dynamicCliFlags=null;try{dynamicCliFlags=(await import('./cli-flags.js'))['dynamicCliFlags'];}catch{}const mergedFlags={...dynamicCliFlags||{}},helpTexts={'zh-CN':'\x0a\x09Usage\x0a\x09\x20\x20$\x20lovrabet\x0a\x0a\x09Examples\x0a\x09\x20\x20$\x20lovrabet\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20登录认证\x0a\x09\x20\x20$\x20lovrabet\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20退出登录\x0a\x09\x20\x20$\x20lovrabet\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20在现有项目中初始化\x20.lovrabetrc\x20配置文件\x0a\x09\x20\x20$\x20lovrabet\x20init\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x20初始化配置文件\x0a\x09\x20\x20$\x20lovrabet\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建一个项目\x0a\x09\x20\x20$\x20lovrabet\x20start\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20启动项目\x0a\x09\x20\x20$\x20lovrabet\x20build\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20构建项目\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20sync\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20同步菜单\x0a\x09\x20\x20$\x20lovrabet\x20menu\x20update\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20更新菜单\x20CDN\x20资源\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20预览项目\x0a\x09\x20\x20$\x20lovrabet\x20preview\x20--watch\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20监听文件变化并自动构建预览\x0a\x09\x20\x20$\x20lovrabet\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20项目配置\x0a\x09\x20\x20$\x20lovrabet\x20api\x20pull\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20api\x20doc\x20--[options]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档(详见\x20lovrabet\x20api\x20--help)\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并配置\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接配置\x20Cursor\x20MCP\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20交互式选择并安装技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20直接安装\x20Cursor\x20技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20//\x20安装多个技能包\x0a\x09\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20安装所有技能包\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20查看日志\x0a\x09\x20\x20$\x20lovrabet\x20logs\x20--clear\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20清空日志\x0a','en-US':a28_0x458742(0x237)},systemLanguage=detectSystemLanguage();function isStdinRawModeSupported(){const _0x1c602a=a28_0x458742;if(!process[_0x1c602a(0x239)][_0x1c602a(0x221)])return![];try{const _0x31c31e=process[_0x1c602a(0x239)][_0x1c602a(0x214)];return process['stdin']['setRawMode'](!![]),process['stdin'][_0x1c602a(0x219)](_0x31c31e??![]),!![];}catch{return![];}}function isNonInteractiveMode(_0x271525){const _0x125639=a28_0x458742;return!!(_0x271525[_0x125639(0x218)]||_0x271525['ci']||process['env']['LOVRABET_CI']==='true'||process[_0x125639(0x226)]['CI']===_0x125639(0x23d)||!process[_0x125639(0x207)][_0x125639(0x221)]||!isStdinRawModeSupported());}function getLanguage(_0x5424cc){const _0x270840=getLanguageFromFlags(_0x5424cc);return _0x270840||undefined;}function renderWithI18n(_0x18cb70,_0x84c41){const _0x1e0dae=a28_0x458742;return!isStdinRawModeSupported()&&(console[_0x1e0dae(0x215)](_0x84c41?.[_0x1e0dae(0x213)]('zh')?_0x1e0dae(0x1e8):_0x1e0dae(0x22e)),process['exit'](0x1)),render(a28_0x7c5d54(I18nProvider,{'language':_0x84c41,'children':_0x18cb70}));}const cli=a28_0xc255d9(helpTexts[systemLanguage],{'importMeta':import.meta,'flags':{'name':{'type':a28_0x458742(0x222)},'clear':{'type':a28_0x458742(0x21b)},'env':{'type':a28_0x458742(0x222)},'watch':{'type':a28_0x458742(0x21b)},'help':{'type':a28_0x458742(0x21b)},'appcode':{'type':a28_0x458742(0x222)},'output':{'type':a28_0x458742(0x222)},'params':{'type':a28_0x458742(0x222)},'datasetcode':{'type':a28_0x458742(0x222)},'mcpCursor':{'type':a28_0x458742(0x21b)},'mcpClaude':{'type':a28_0x458742(0x21b)},'mcpOther':{'type':'boolean'},'cursor':{'type':a28_0x458742(0x21b)},'windsurf':{'type':a28_0x458742(0x21b)},'claude':{'type':'boolean'},'cline':{'type':a28_0x458742(0x21b)},'codex':{'type':a28_0x458742(0x21b)},'opencode':{'type':a28_0x458742(0x21b)},'qoder':{'type':a28_0x458742(0x21b)},'codebuddy':{'type':'boolean'},'trae':{'type':'boolean'},'agent':{'type':a28_0x458742(0x21b)},'antigravity':{'type':a28_0x458742(0x21b)},'all':{'type':a28_0x458742(0x21b)},'enableBffSave':{'type':a28_0x458742(0x21b)},'nonInteractive':{'type':a28_0x458742(0x21b)},'ci':{'type':a28_0x458742(0x21b)},'lang':{'type':a28_0x458742(0x222)},...mergedFlags},'autoVersion':!![]});await run();async function run(){const _0x44a918=a28_0x458742,_0x3e36c0=cli['input'][0x0],_0x3d05c5=cli['input'][0x1],_0x2b6518=cli['input'][0x2],_0x4807e9=getLanguage(cli[_0x44a918(0x1fc)]),_0x17b263=(_0x44a918(0x229)+process[_0x44a918(0x203)][_0x44a918(0x204)](0x2)[_0x44a918(0x209)]('\x20'))[_0x44a918(0x228)]();logger[_0x44a918(0x227)](_0x17b263);switch(_0x3e36c0){case'init':{const _0x40777e=cli[_0x44a918(0x1fc)]['appcode'],_0x2a3323=cli[_0x44a918(0x1fc)][_0x44a918(0x226)];logger[_0x44a918(0x1f0)](process[_0x44a918(0x1f4)]()),logger[_0x44a918(0x22d)](_0x44a918(0x1ea),_0x44a918(0x23b)),renderWithI18n(a28_0x7c5d54(Init,{'appcode':_0x40777e,'env':_0x2a3323}),_0x4807e9);break;}case'create':{const _0x469829=cli[_0x44a918(0x1f2)][0x1]?.['trim'](),_0x54c6b1=cli[_0x44a918(0x1fc)][_0x44a918(0x226)],_0xb32ee7=isNonInteractiveMode(cli[_0x44a918(0x1fc)]);if(_0xb32ee7&&_0x469829){logger['setLogPath'](process['cwd']()),logger[_0x44a918(0x22d)](_0x44a918(0x1ef),_0x44a918(0x23c)+_0x469829);const {createProjectNonInteractive:_0x33ebfb}=await import(_0x44a918(0x225));await _0x33ebfb(_0x469829,_0x54c6b1);}else _0xb32ee7&&!_0x469829?(console['error'](_0x4807e9?.[_0x44a918(0x213)]('zh')?_0x44a918(0x1ee):_0x44a918(0x22a)),process[_0x44a918(0x238)](0x1)):renderWithI18n(a28_0x7c5d54(CreateApp,{'projectCode':_0x469829,'env':_0x54c6b1}),_0x4807e9);break;}case _0x44a918(0x1f8):{try{logger[_0x44a918(0x1f0)](process[_0x44a918(0x1f4)]()),logger[_0x44a918(0x22d)](_0x44a918(0x1f8),_0x44a918(0x22f)),await runStart();}catch(_0x36f67f){console['error'](_0x36f67f),process[_0x44a918(0x238)](0x1);}break;}case _0x44a918(0x20b):{try{logger['setLogPath'](process[_0x44a918(0x1f4)]()),logger[_0x44a918(0x22d)](_0x44a918(0x20b),_0x44a918(0x201)),await runBuild();}catch(_0x59fbaa){console[_0x44a918(0x215)](_0x59fbaa),process[_0x44a918(0x238)](0x1);}break;}case _0x44a918(0x1e9):{const _0x4e5a27=cli[_0x44a918(0x1fc)][_0x44a918(0x1f1)];logger[_0x44a918(0x1f0)](process['cwd']()),logger['info'](_0x44a918(0x1e9),'执行预览命令'+(_0x4e5a27?_0x44a918(0x220):''));if(_0x4e5a27)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x4decdb){console[_0x44a918(0x215)](_0x4decdb),process['exit'](0x1);}else try{await runPreview();}catch(_0x57ef1a){console[_0x44a918(0x215)](_0x57ef1a),process[_0x44a918(0x238)](0x1);}break;}case _0x44a918(0x1eb):{renderWithI18n(a28_0x7c5d54(Config,{'cli':cli}),_0x4807e9);break;}case'api':{await apiCli(cli);break;}case _0x44a918(0x20a):{renderWithI18n(a28_0x7c5d54(AuthServer,{}),_0x4807e9);break;}case _0x44a918(0x1ed):{if(_0x3d05c5==='update'){logger[_0x44a918(0x1f0)](process[_0x44a918(0x1f4)]()),logger[_0x44a918(0x22d)](_0x44a918(0x1fd),_0x44a918(0x21f)),renderWithI18n(a28_0x7c5d54(AppMenuUpdateCdn,{}),_0x4807e9);break;}else logger['setLogPath'](process['cwd']()),logger[_0x44a918(0x22d)](_0x44a918(0x223),_0x44a918(0x21c)),renderWithI18n(a28_0x7c5d54(AppMenuSyncUI,{}),_0x4807e9);break;}case _0x44a918(0x20c):{logout();break;}case _0x44a918(0x211):{const _0x1d510f=cli['input'][0x1];logger[_0x44a918(0x1f0)](process[_0x44a918(0x1f4)]());if(_0x1d510f==='install'){const _0x3615b8=[];if(cli[_0x44a918(0x1fc)][_0x44a918(0x20f)]||cli[_0x44a918(0x1fc)][_0x44a918(0x216)])_0x3615b8[_0x44a918(0x1fe)](_0x44a918(0x216));if(cli[_0x44a918(0x1fc)][_0x44a918(0x217)]||cli['flags'][_0x44a918(0x235)])_0x3615b8['push'](_0x44a918(0x235));if(cli[_0x44a918(0x1fc)][_0x44a918(0x233)])_0x3615b8['push'](_0x44a918(0x231));logger[_0x44a918(0x22d)](_0x44a918(0x1f9),_0x44a918(0x20e),{'preselected':_0x3615b8});if(isNonInteractiveMode(cli[_0x44a918(0x1fc)])&&_0x3615b8[_0x44a918(0x21a)]>0x0){const {installMcpNonInteractive:_0x2ccb5a}=await import('./mcp/mcp-install-non-interactive.js');await _0x2ccb5a(_0x3615b8,cli[_0x44a918(0x1fc)][_0x44a918(0x1fb)]);}else renderWithI18n(a28_0x7c5d54(McpInstallUI,{'preselectedIDEs':_0x3615b8,'enableBffSave':cli['flags'][_0x44a918(0x1fb)]}),_0x4807e9);}else _0x1d510f===_0x44a918(0x22c)||cli[_0x44a918(0x1fc)][_0x44a918(0x232)]?await mcpCommand(_0x1d510f,[],{'help':!![]}):await mcpCommand(_0x1d510f,[],cli['flags']);break;}case _0x44a918(0x23a):case _0x44a918(0x205):{const _0x3e4dd8=cli[_0x44a918(0x1f2)][0x1];logger[_0x44a918(0x1f0)](process[_0x44a918(0x1f4)]());if(_0x3e4dd8===_0x44a918(0x208)){logger[_0x44a918(0x1f0)](process[_0x44a918(0x1f4)]()),logger[_0x44a918(0x22d)](_0x44a918(0x21d),_0x44a918(0x230));const {runNpxSkillsAdd:_0x25b1ac}=await import(_0x44a918(0x210)),_0x4bd170=isNonInteractiveMode(cli['flags'])?'pipe':_0x44a918(0x224);console[_0x44a918(0x1f5)](a28_0x4dc8e4['t'](_0x44a918(0x20d)));const _0x4b26ab=_0x25b1ac(process['cwd'](),{'stdio':_0x4bd170});if(_0x4b26ab['skipped'])console['log'](a28_0x4dc8e4['t'](_0x44a918(0x212)));else _0x4b26ab['ok']?console[_0x44a918(0x1f5)](a28_0x4dc8e4['t'](_0x44a918(0x1ec))):(console[_0x44a918(0x215)](a28_0x4dc8e4['t'](_0x44a918(0x1f6),{'error':_0x4b26ab[_0x44a918(0x215)]||_0x44a918(0x1f3)})),process[_0x44a918(0x238)](0x1));}else _0x3e4dd8===_0x44a918(0x22c)||cli['flags'][_0x44a918(0x232)]?await skillsCommand(_0x3e4dd8,[],{'help':!![]}):await skillsCommand(_0x3e4dd8,[],cli['flags']);break;}case _0x44a918(0x200):{cli[_0x44a918(0x1fc)][_0x44a918(0x21e)]?clearLogs():showLogs();break;}default:renderWithI18n(a28_0x7c5d54(Help,{}),_0x4807e9);break;}}
@@ -1 +1 @@
1
- (function(_0x4b2cfa,_0x547036){const _0x3b650f=a30_0x548c,_0x10fbf6=_0x4b2cfa();while(!![]){try{const _0x1ca1da=-parseInt(_0x3b650f(0x10f))/0x1+parseInt(_0x3b650f(0x11a))/0x2+-parseInt(_0x3b650f(0x112))/0x3+parseInt(_0x3b650f(0x114))/0x4+-parseInt(_0x3b650f(0x116))/0x5+-parseInt(_0x3b650f(0x10d))/0x6+parseInt(_0x3b650f(0x119))/0x7;if(_0x1ca1da===_0x547036)break;else _0x10fbf6['push'](_0x10fbf6['shift']());}catch(_0x154d32){_0x10fbf6['push'](_0x10fbf6['shift']());}}}(a30_0x5b1c,0x37c06));import{spawn}from'node:child_process';function a30_0x5b1c(){const _0xfa9c1f=['inherit','2887906oTueqY','341796ZdDLUg','PATH','close','35082FiCbaW','node_modules','327637sjZCSu','npm\x20run\x20build\x20exited\x20with\x20code\x20','env','679275NIMVuG','build','1554556kkyHlU','vite','919140JLWcRD','--watch'];a30_0x5b1c=function(){return _0xfa9c1f;};return a30_0x5b1c();}function a30_0x548c(_0x316a8a,_0x521b04){_0x316a8a=_0x316a8a-0x10c;const _0x5b1c95=a30_0x5b1c();let _0x548cda=_0x5b1c95[_0x316a8a];return _0x548cda;}import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x581768,_0x56ceee)=>{const _0x42802b=a30_0x548c,_0x41004c=spawn(_0x42802b(0x115),[_0x42802b(0x113),_0x42802b(0x117)],{'stdio':_0x42802b(0x118),'shell':!![],'env':{...process[_0x42802b(0x111)],'PATH':''+join(process['cwd'](),_0x42802b(0x10e),'.bin')+delimiter+process[_0x42802b(0x111)][_0x42802b(0x11b)]}});_0x41004c['on'](_0x42802b(0x10c),_0x4f1ee4=>{const _0x41a0cf=_0x42802b;if(_0x4f1ee4===0x0||_0x4f1ee4===null)_0x581768();else _0x56ceee(new Error(_0x41a0cf(0x110)+_0x4f1ee4));}),_0x41004c['on']('error',_0x56ceee);});}
1
+ (function(_0x5405bf,_0x1c661f){const _0x23da3f=a29_0x4d46,_0x2c28f1=_0x5405bf();while(!![]){try{const _0x4a7639=-parseInt(_0x23da3f(0x1c0))/0x1+-parseInt(_0x23da3f(0x1c8))/0x2*(parseInt(_0x23da3f(0x1d2))/0x3)+parseInt(_0x23da3f(0x1bf))/0x4*(-parseInt(_0x23da3f(0x1cb))/0x5)+parseInt(_0x23da3f(0x1d1))/0x6+parseInt(_0x23da3f(0x1c9))/0x7*(-parseInt(_0x23da3f(0x1c4))/0x8)+parseInt(_0x23da3f(0x1cf))/0x9*(-parseInt(_0x23da3f(0x1cc))/0xa)+parseInt(_0x23da3f(0x1c5))/0xb*(parseInt(_0x23da3f(0x1c1))/0xc);if(_0x4a7639===_0x1c661f)break;else _0x2c28f1['push'](_0x2c28f1['shift']());}catch(_0x51cfca){_0x2c28f1['push'](_0x2c28f1['shift']());}}}(a29_0x34ab,0x36298));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a29_0x34ab(){const _0x324033=['vite','PATH','1451992fAUcCR','200779jtolNA','12FXoBQz','error','cwd','728Amaoqz','14115189eJHXBK','node_modules','close','41646ettgXN','7861dPyLEr','npm\x20run\x20build\x20exited\x20with\x20code\x20','5ZeHIAn','410jtItEF','build','.bin','48906IJIeDF','env','963486QdZDAr','48FJHeSv'];a29_0x34ab=function(){return _0x324033;};return a29_0x34ab();}function a29_0x4d46(_0x74b5f,_0x105a4d){_0x74b5f=_0x74b5f-0x1be;const _0x34ab60=a29_0x34ab();let _0x4d4666=_0x34ab60[_0x74b5f];return _0x4d4666;}export function runBuildWatch(){return new Promise((_0x56d18c,_0xc460db)=>{const _0x4dce60=a29_0x4d46,_0x5147df=spawn(_0x4dce60(0x1d3),[_0x4dce60(0x1cd),'--watch'],{'stdio':'inherit','shell':!![],'env':{...process[_0x4dce60(0x1d0)],'PATH':''+join(process[_0x4dce60(0x1c3)](),_0x4dce60(0x1c6),_0x4dce60(0x1ce))+delimiter+process[_0x4dce60(0x1d0)][_0x4dce60(0x1be)]}});_0x5147df['on'](_0x4dce60(0x1c7),_0xd8e8a3=>{const _0x199864=_0x4dce60;if(_0xd8e8a3===0x0||_0xd8e8a3===null)_0x56d18c();else _0xc460db(new Error(_0x199864(0x1ca)+_0xd8e8a3));}),_0x5147df['on'](_0x4dce60(0x1c2),_0xc460db);});}