@lovrabet/cli 1.1.26-beta.8 → 1.1.26

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 (61) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/api/api-doc-ui.js +1 -1
  5. package/lib/api/api-doc.js +1 -1
  6. package/lib/api/api-pull-ui.js +1 -1
  7. package/lib/api/fetch-model-list.js +1 -1
  8. package/lib/api/generate-api-file.js +1 -1
  9. package/lib/api/main.js +1 -1
  10. package/lib/api/pull-silent.js +1 -1
  11. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  12. package/lib/app-menu/create-menu.js +1 -1
  13. package/lib/app-menu/get-local-pages.js +1 -1
  14. package/lib/app-menu/get-online-menu-list.js +1 -1
  15. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  16. package/lib/app-menu/utils.js +1 -1
  17. package/lib/app-menu/valid-url.js +1 -1
  18. package/lib/app-menu-cdn-version/app-menu-sync-cdn-version-ui.js +1 -1
  19. package/lib/app-menu-cdn-version/cdn-url-compare-table.js +1 -1
  20. package/lib/app-menu-cdn-version/update-menu-cdn-url.js +1 -1
  21. package/lib/app-menu-update-cdn/current-content.js +1 -0
  22. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -0
  23. package/lib/app-menu-update-cdn/main.js +1 -0
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli.js +1 -1
  31. package/lib/cmd/build-watch.js +1 -1
  32. package/lib/cmd/build.js +1 -1
  33. package/lib/cmd/logs.js +1 -1
  34. package/lib/cmd/preview.js +1 -1
  35. package/lib/cmd/start.js +1 -1
  36. package/lib/config/config-help.js +1 -1
  37. package/lib/config/main.js +1 -1
  38. package/lib/constant/domain.js +1 -1
  39. package/lib/constant/env.js +1 -1
  40. package/lib/create-app/enhanced-guided-create.js +1 -1
  41. package/lib/create-app/format-elapsed.js +1 -1
  42. package/lib/create-app/main.js +1 -1
  43. package/lib/create-app/task-finished.js +1 -1
  44. package/lib/create-app/task-loading.js +1 -1
  45. package/lib/create-app/task-running.js +1 -1
  46. package/lib/create-app/task-time.js +1 -1
  47. package/lib/create-app/use-copy-project-template.js +1 -1
  48. package/lib/create-app/use-format-code.js +1 -1
  49. package/lib/create-app/use-install-dependencies.js +1 -1
  50. package/lib/help.js +1 -1
  51. package/lib/init/main.js +1 -1
  52. package/lib/mcp/cursor.js +1 -1
  53. package/lib/mcp/main.js +1 -1
  54. package/lib/utils/config.js +1 -1
  55. package/lib/utils/copy-directory.js +1 -1
  56. package/lib/utils/http-client.js +1 -1
  57. package/lib/utils/logger.js +1 -1
  58. package/lib/utils/router-updater.js +1 -1
  59. package/lib/utils/sleep.js +1 -1
  60. package/lib/utils/template-replacer.js +1 -1
  61. package/package.json +1 -1
@@ -1 +1 @@
1
- function a11_0x4c01(_0x11b9e6,_0x4dca80){const _0x26ea17=a11_0x26ea();return a11_0x4c01=function(_0x4c01cd,_0x3ca441){_0x4c01cd=_0x4c01cd-0x105;let _0x35161a=_0x26ea17[_0x4c01cd];return _0x35161a;},a11_0x4c01(_0x11b9e6,_0x4dca80);}function a11_0x26ea(){const _0x526e75=['4577667iWxbDc','status','stringify','import','正在创建菜单:\x20','开始批量创建菜单,共\x20','data','23951295eMiYFy','all','1720VQwRAr','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','!\x20请使用以下方式之一:','log','12quFQMW','创建菜单成功:','17539CwMiWy','error','/smartapi/menu/create','errorCode','label','application/json','3116920xANWzd','未知错误','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','path','success','map','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','create-menus','创建菜单失败:\x20','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','info','json','创建菜单失败,HTTP状态码:\x20','POST','procode','create-menu','errorMsg','1256766xMdngG','未提供应用AppCode,且配置中也没有默认值','15445uxUhyv','0011','3453042DDFFaM','resources','length','appcode','批量创建菜单完成,共\x20'];a11_0x26ea=function(){return _0x526e75;};return a11_0x26ea();}(function(_0xd55e24,_0x59033c){const _0xf0311f=a11_0x4c01,_0x38ec72=_0xd55e24();while(!![]){try{const _0x4cf865=parseInt(_0xf0311f(0x125))/0x1*(-parseInt(_0xf0311f(0x123))/0x2)+-parseInt(_0xf0311f(0x116))/0x3+parseInt(_0xf0311f(0x11f))/0x4*(-parseInt(_0xf0311f(0x10f))/0x5)+parseInt(_0xf0311f(0x111))/0x6+parseInt(_0xf0311f(0x10d))/0x7+parseInt(_0xf0311f(0x12b))/0x8+parseInt(_0xf0311f(0x11d))/0x9;if(_0x4cf865===_0x59033c)break;else _0x38ec72['push'](_0x38ec72['shift']());}catch(_0x280ad5){_0x38ec72['push'](_0x38ec72['shift']());}}}(a11_0x26ea,0xceaba));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x3c0589){const _0x285b1e=a11_0x4c01,_0x3df1cd=config?.[_0x285b1e(0x114)];if(!_0x3df1cd){const _0x505588=_0x285b1e(0x10e);logger[_0x285b1e(0x126)](_0x285b1e(0x10b),_0x505588),console[_0x285b1e(0x126)]('×\x20'+_0x505588),console[_0x285b1e(0x122)](_0x285b1e(0x121)),console['log']('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log'](_0x285b1e(0x105));return;}logger[_0x285b1e(0x106)]('create-menu',_0x285b1e(0x11a)+_0x3c0589['label']+'\x20('+_0x3c0589[_0x285b1e(0x12e)]+')');const _0xe4b3f={'appCode':_0x3df1cd,'type':_0x285b1e(0x10a),'sort':0x0,'extend':{'loadScriptMode':_0x285b1e(0x119),'resources':_0x3c0589[_0x285b1e(0x112)]?JSON[_0x285b1e(0x118)](_0x3c0589[_0x285b1e(0x112)]):undefined},..._0x3c0589},_0x4e2c30=await fetch(getApiDomain()+_0x285b1e(0x127),{'method':_0x285b1e(0x109),'body':JSON[_0x285b1e(0x118)](_0xe4b3f),'headers':{'Content-Type':_0x285b1e(0x12a),'Cookie':getCookie()}});if(!_0x4e2c30['ok']){if(_0x4e2c30[_0x285b1e(0x117)]===0x191){const _0x3341c3=_0x285b1e(0x131);logger[_0x285b1e(0x126)](_0x285b1e(0x10b),_0x3341c3,{'status':_0x4e2c30[_0x285b1e(0x117)],'menu':_0x3c0589['label']});throw new Error(_0x3341c3);}const _0x5ad83c='创建菜单失败,HTTP状态码:\x20'+_0x4e2c30[_0x285b1e(0x117)];logger[_0x285b1e(0x126)](_0x285b1e(0x10b),_0x5ad83c,{'menu':_0x3c0589[_0x285b1e(0x129)]});throw new Error(_0x5ad83c);}const _0x3e98ac=await _0x4e2c30[_0x285b1e(0x107)]();if(!_0x3e98ac[_0x285b1e(0x12f)]){const _0x1c85b0=_0x285b1e(0x133)+(_0x3e98ac[_0x285b1e(0x10c)]||_0x285b1e(0x12c));logger[_0x285b1e(0x126)](_0x285b1e(0x10b),_0x1c85b0,{'errorCode':_0x3e98ac[_0x285b1e(0x128)],'errorMsg':_0x3e98ac['errorMsg'],'menu':_0x3c0589['label']});throw new Error(_0x1c85b0);}logger[_0x285b1e(0x106)](_0x285b1e(0x10b),'菜单创建成功:\x20'+_0x3c0589[_0x285b1e(0x129)],_0x3e98ac[_0x285b1e(0x11c)]),console[_0x285b1e(0x122)](_0x285b1e(0x124),_0x3e98ac[_0x285b1e(0x11c)]);}async function _createMenu(_0x11877c,_0x4b2f1b){const _0x198705=a11_0x4c01,_0x44084d=config?.[_0x198705(0x114)];if(!_0x44084d){const _0x146dc3=_0x198705(0x10e);logger[_0x198705(0x126)](_0x198705(0x10b),_0x146dc3),console[_0x198705(0x126)]('×\x20'+_0x146dc3),console[_0x198705(0x122)](_0x198705(0x121)),console[_0x198705(0x122)](_0x198705(0x120)),console[_0x198705(0x122)](_0x198705(0x105));return;}const _0x587ed0={'appCode':_0x44084d,'type':_0x198705(0x10a),'sort':0x0,'extend':{'loadScriptMode':_0x198705(0x119),'resources':_0x4b2f1b?JSON[_0x198705(0x118)](_0x4b2f1b):undefined},'label':_0x11877c['label'],'path':_0x11877c['path']},_0x1755b6=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x198705(0x109),'body':JSON[_0x198705(0x118)](_0x587ed0),'headers':{'Content-Type':_0x198705(0x12a),'Cookie':getCookie()}});if(!_0x1755b6['ok']){if(_0x1755b6[_0x198705(0x117)]===0x191){const _0x2a532d=_0x198705(0x131);logger['error'](_0x198705(0x10b),_0x2a532d,{'status':_0x1755b6['status'],'menu':_0x11877c[_0x198705(0x129)]});throw new Error(_0x2a532d);}const _0x57d14d=_0x198705(0x108)+_0x1755b6[_0x198705(0x117)];logger[_0x198705(0x126)]('create-menu',_0x57d14d,{'menu':_0x11877c['label']});throw new Error(_0x57d14d);}const _0x5be63b=await _0x1755b6[_0x198705(0x107)]();if(!_0x5be63b[_0x198705(0x12f)]){if(_0x5be63b['errorCode']===_0x198705(0x110)||_0x5be63b[_0x198705(0x10c)]?.['includes']('登录')){const _0x509e10=_0x198705(0x12d);logger[_0x198705(0x126)](_0x198705(0x10b),_0x509e10,{'errorCode':_0x5be63b[_0x198705(0x128)],'errorMsg':_0x5be63b[_0x198705(0x10c)],'menu':_0x11877c['label']});throw new Error(_0x509e10);}const _0x18bbf5=_0x198705(0x133)+(_0x5be63b[_0x198705(0x10c)]||_0x198705(0x12c));logger[_0x198705(0x126)](_0x198705(0x10b),_0x18bbf5,{'errorCode':_0x5be63b['errorCode'],'errorMsg':_0x5be63b[_0x198705(0x10c)],'menu':_0x11877c[_0x198705(0x129)]});throw new Error(_0x18bbf5);}logger[_0x198705(0x106)](_0x198705(0x10b),'菜单创建成功:\x20'+_0x11877c[_0x198705(0x129)]);}export async function createMenus(_0x309a97,_0x53ffa6){const _0x4b2f6f=a11_0x4c01;logger[_0x4b2f6f(0x106)](_0x4b2f6f(0x132),_0x4b2f6f(0x11b)+_0x309a97[_0x4b2f6f(0x113)]+'\x20个'),await Promise[_0x4b2f6f(0x11e)](_0x309a97[_0x4b2f6f(0x130)](async _0x2fef44=>{await _createMenu(_0x2fef44,_0x53ffa6);})),logger[_0x4b2f6f(0x106)]('create-menus',_0x4b2f6f(0x115)+_0x309a97['length']+'\x20个');}
1
+ (function(_0x3f8e35,_0x562dc4){const _0x101cb3=a11_0xdab3,_0x428d02=_0x3f8e35();while(!![]){try{const _0x4c5d3f=-parseInt(_0x101cb3(0x16f))/0x1+parseInt(_0x101cb3(0x179))/0x2+-parseInt(_0x101cb3(0x18a))/0x3*(-parseInt(_0x101cb3(0x18f))/0x4)+-parseInt(_0x101cb3(0x182))/0x5+parseInt(_0x101cb3(0x190))/0x6*(parseInt(_0x101cb3(0x172))/0x7)+-parseInt(_0x101cb3(0x171))/0x8*(parseInt(_0x101cb3(0x17a))/0x9)+parseInt(_0x101cb3(0x18c))/0xa;if(_0x4c5d3f===_0x562dc4)break;else _0x428d02['push'](_0x428d02['shift']());}catch(_0x3384a1){_0x428d02['push'](_0x428d02['shift']());}}}(a11_0x2865,0x5561a));function a11_0x2865(){const _0x4f5ce7=['includes','length','info','errorCode','0011','创建菜单失败:\x20','907286KtpszP','2060271LGoaKS','POST','label','data','创建菜单成功:','!\x20请使用以下方式之一:','all','创建菜单失败,HTTP状态码:\x20','1343560xfAMNv','application/json','success','map','create-menus','菜单创建成功:\x20','批量创建菜单完成,共\x20','stringify','498AypEaL','status','5437850aWciBv','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','log','11632jiJCjg','19752ZZQmgu','create-menu','/smartapi/menu/create','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','import','未提供应用AppCode,且配置中也没有默认值','未知错误','path','json','errorMsg','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','正在创建菜单:\x20','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','resources','642679JsCrIE','error','8thZjaT','21KvHoJs'];a11_0x2865=function(){return _0x4f5ce7;};return a11_0x2865();}import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x390705){const _0x2f95cf=a11_0xdab3,_0x41d38d=config?.['appcode'];if(!_0x41d38d){const _0x173ef2=_0x2f95cf(0x195);logger[_0x2f95cf(0x170)](_0x2f95cf(0x191),_0x173ef2),console[_0x2f95cf(0x170)]('×\x20'+_0x173ef2),console[_0x2f95cf(0x18e)](_0x2f95cf(0x17f)),console['log'](_0x2f95cf(0x16b)),console[_0x2f95cf(0x18e)](_0x2f95cf(0x18d));return;}logger[_0x2f95cf(0x175)](_0x2f95cf(0x191),_0x2f95cf(0x16c)+_0x390705[_0x2f95cf(0x17c)]+'\x20('+_0x390705[_0x2f95cf(0x197)]+')');const _0x5b22af={'appCode':_0x41d38d,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x2f95cf(0x194),'resources':_0x390705[_0x2f95cf(0x16e)]?JSON[_0x2f95cf(0x189)](_0x390705[_0x2f95cf(0x16e)]):undefined},..._0x390705},_0x1cf41a=await fetch(getApiDomain()+_0x2f95cf(0x192),{'method':_0x2f95cf(0x17b),'body':JSON[_0x2f95cf(0x189)](_0x5b22af),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x1cf41a['ok']){if(_0x1cf41a['status']===0x191){const _0x1b8ce1=_0x2f95cf(0x193);logger['error'](_0x2f95cf(0x191),_0x1b8ce1,{'status':_0x1cf41a['status'],'menu':_0x390705[_0x2f95cf(0x17c)]});throw new Error(_0x1b8ce1);}const _0x336ba5='创建菜单失败,HTTP状态码:\x20'+_0x1cf41a['status'];logger[_0x2f95cf(0x170)](_0x2f95cf(0x191),_0x336ba5,{'menu':_0x390705[_0x2f95cf(0x17c)]});throw new Error(_0x336ba5);}const _0x43a075=await _0x1cf41a[_0x2f95cf(0x198)]();if(!_0x43a075[_0x2f95cf(0x184)]){const _0x14f1bf=_0x2f95cf(0x178)+(_0x43a075['errorMsg']||_0x2f95cf(0x196));logger[_0x2f95cf(0x170)](_0x2f95cf(0x191),_0x14f1bf,{'errorCode':_0x43a075[_0x2f95cf(0x176)],'errorMsg':_0x43a075[_0x2f95cf(0x16a)],'menu':_0x390705['label']});throw new Error(_0x14f1bf);}logger[_0x2f95cf(0x175)]('create-menu','菜单创建成功:\x20'+_0x390705[_0x2f95cf(0x17c)],_0x43a075[_0x2f95cf(0x17d)]),console['log'](_0x2f95cf(0x17e),_0x43a075['data']);}function a11_0xdab3(_0x32d776,_0x1f4598){_0x32d776=_0x32d776-0x16a;const _0x286530=a11_0x2865();let _0xdab331=_0x286530[_0x32d776];return _0xdab331;}async function _createMenu(_0x158ca5,_0x542a8d){const _0x16be57=a11_0xdab3,_0x159947=config?.['appcode'];if(!_0x159947){const _0x59927e='未提供应用AppCode,且配置中也没有默认值';logger[_0x16be57(0x170)](_0x16be57(0x191),_0x59927e),console[_0x16be57(0x170)]('×\x20'+_0x59927e),console[_0x16be57(0x18e)]('!\x20请使用以下方式之一:'),console['log'](_0x16be57(0x16b)),console['log']('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}const _0x1ef323={'appCode':_0x159947,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x16be57(0x194),'resources':_0x542a8d?JSON[_0x16be57(0x189)](_0x542a8d):undefined},'label':_0x158ca5[_0x16be57(0x17c)],'path':_0x158ca5[_0x16be57(0x197)]},_0x373f76=await fetch(getApiDomain()+_0x16be57(0x192),{'method':_0x16be57(0x17b),'body':JSON[_0x16be57(0x189)](_0x1ef323),'headers':{'Content-Type':_0x16be57(0x183),'Cookie':getCookie()}});if(!_0x373f76['ok']){if(_0x373f76['status']===0x191){const _0x5273b5='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x16be57(0x170)]('create-menu',_0x5273b5,{'status':_0x373f76[_0x16be57(0x18b)],'menu':_0x158ca5[_0x16be57(0x17c)]});throw new Error(_0x5273b5);}const _0x1b5ddf=_0x16be57(0x181)+_0x373f76['status'];logger[_0x16be57(0x170)](_0x16be57(0x191),_0x1b5ddf,{'menu':_0x158ca5[_0x16be57(0x17c)]});throw new Error(_0x1b5ddf);}const _0x100e54=await _0x373f76[_0x16be57(0x198)]();if(!_0x100e54[_0x16be57(0x184)]){if(_0x100e54['errorCode']===_0x16be57(0x177)||_0x100e54[_0x16be57(0x16a)]?.[_0x16be57(0x173)]('登录')){const _0x40e227=_0x16be57(0x16d);logger[_0x16be57(0x170)](_0x16be57(0x191),_0x40e227,{'errorCode':_0x100e54['errorCode'],'errorMsg':_0x100e54[_0x16be57(0x16a)],'menu':_0x158ca5[_0x16be57(0x17c)]});throw new Error(_0x40e227);}const _0x349898=_0x16be57(0x178)+(_0x100e54['errorMsg']||_0x16be57(0x196));logger[_0x16be57(0x170)](_0x16be57(0x191),_0x349898,{'errorCode':_0x100e54[_0x16be57(0x176)],'errorMsg':_0x100e54[_0x16be57(0x16a)],'menu':_0x158ca5['label']});throw new Error(_0x349898);}logger[_0x16be57(0x175)](_0x16be57(0x191),_0x16be57(0x187)+_0x158ca5[_0x16be57(0x17c)]);}export async function createMenus(_0x380d5a,_0x27a23f){const _0x2d5a58=a11_0xdab3;logger[_0x2d5a58(0x175)](_0x2d5a58(0x186),'开始批量创建菜单,共\x20'+_0x380d5a[_0x2d5a58(0x174)]+'\x20个'),await Promise[_0x2d5a58(0x180)](_0x380d5a[_0x2d5a58(0x185)](async _0x3d91c0=>{await _createMenu(_0x3d91c0,_0x27a23f);})),logger[_0x2d5a58(0x175)]('create-menus',_0x2d5a58(0x188)+_0x380d5a[_0x2d5a58(0x174)]+'\x20个');}
@@ -1 +1 @@
1
- function a12_0x24b9(){const _0x5be172=['375439HgBzkW','3EgSipB','12946144pcdURc','slice','filter','1596340WkPxxP','6288765mKmzZJ','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','endsWith','60XIcuYN','concat','22551570zPgFRh','replace','203250pcaicC','utf-8','isDirectory','.tsx','match','path','865042Ewvpnb','trim','src/pages','cwd','push'];a12_0x24b9=function(){return _0x5be172;};return a12_0x24b9();}const a12_0x1d22fa=a12_0x4f13;(function(_0x17e0d8,_0x15a6de){const _0x2b8839=a12_0x4f13,_0x3da7ee=_0x17e0d8();while(!![]){try{const _0x2fbf7a=-parseInt(_0x2b8839(0x1c2))/0x1+-parseInt(_0x2b8839(0x1d5))/0x2*(-parseInt(_0x2b8839(0x1c3))/0x3)+parseInt(_0x2b8839(0x1c7))/0x4+parseInt(_0x2b8839(0x1cf))/0x5*(parseInt(_0x2b8839(0x1cb))/0x6)+parseInt(_0x2b8839(0x1c8))/0x7+parseInt(_0x2b8839(0x1c4))/0x8+-parseInt(_0x2b8839(0x1cd))/0x9;if(_0x2fbf7a===_0x15a6de)break;else _0x3da7ee['push'](_0x3da7ee['shift']());}catch(_0xfe15ee){_0x3da7ee['push'](_0x3da7ee['shift']());}}}(a12_0x24b9,0xd5480));function a12_0x4f13(_0x4e45f5,_0x4946da){const _0x24b95f=a12_0x24b9();return a12_0x4f13=function(_0x4f13fd,_0x5ded2a){_0x4f13fd=_0x4f13fd-0x1c2;let _0x32bea1=_0x24b95f[_0x4f13fd];return _0x32bea1;},a12_0x4f13(_0x4e45f5,_0x4946da);}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a12_0x1d22fa(0x1d8)](),a12_0x1d22fa(0x1d7));export function extractTitleFromComment(_0x34bfd1){const _0x4e5a81=a12_0x1d22fa;try{const _0x5d32e1=readFileSync(_0x34bfd1,_0x4e5a81(0x1d0)),_0x90d5ce=_0x5d32e1[_0x4e5a81(0x1d3)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x90d5ce&&_0x90d5ce[0x1]){const _0x52cbcb=_0x90d5ce[0x1],_0x476304=_0x52cbcb[_0x4e5a81(0x1d3)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x476304&&_0x476304[0x1])return _0x476304[0x1][_0x4e5a81(0x1d6)]();}let _0x5ed9c7=null;const _0x20225a=_0x5d32e1[_0x4e5a81(0x1d3)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x20225a&&_0x20225a[0x1]&&(_0x5ed9c7=_0x20225a[0x1]);if(!_0x5ed9c7){const _0x498eb5=_0x5d32e1[_0x4e5a81(0x1d3)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x498eb5&&_0x498eb5[0x1]&&(_0x5ed9c7=_0x498eb5[0x1]);}if(_0x5ed9c7){const _0x1b39ae=new RegExp('\x5cb'+_0x5ed9c7+_0x4e5a81(0x1c9)),_0x45c482=_0x5d32e1['match'](_0x1b39ae);if(_0x45c482&&_0x45c482[0x1])return _0x45c482[0x1];return _0x5ed9c7;}return null;}catch(_0x567e9c){return null;}}export function getLocalPages(_0x36c12a=pagesDir,_0x36bd9f=pagesDir){const _0x3646fa=a12_0x1d22fa;let _0x1d6acc=[];const _0x3fd944=readdirSync(_0x36c12a);return _0x3fd944['forEach'](_0x354da3=>{const _0xdea16a=a12_0x4f13,_0x20652e=join(_0x36c12a,_0x354da3),_0x517ceb=statSync(_0x20652e);if(_0x517ceb&&_0x517ceb[_0xdea16a(0x1d1)]())_0x1d6acc=_0x1d6acc[_0xdea16a(0x1cc)](getLocalPages(_0x20652e,_0x36bd9f));else{if(_0x354da3[_0xdea16a(0x1ca)](_0xdea16a(0x1d2))){let _0x78731d=relative(_0x36bd9f,_0x20652e);_0x78731d[_0xdea16a(0x1ca)]('index.tsx')?_0x78731d=_0x78731d[_0xdea16a(0x1ce)](/index\.tsx$/,''):_0x78731d=_0x78731d[_0xdea16a(0x1ce)](/\.tsx$/,'');_0x78731d[_0xdea16a(0x1ca)]('/')&&(_0x78731d=_0x78731d[_0xdea16a(0x1c5)](0x0,-0x1));const _0x19e6ee=extractTitleFromComment(_0x20652e),_0x2d4051=_0x19e6ee||_0x78731d;_0x1d6acc[_0xdea16a(0x1d9)]({'path':_0x78731d['replaceAll']('$',':'),'label':_0x2d4051});}}}),_0x1d6acc[_0x3646fa(0x1c6)](_0x477a31=>_0x477a31[_0x3646fa(0x1d4)]!=='');}
1
+ const a12_0x302d2a=a12_0x3f45;(function(_0x36a613,_0x5bcc0b){const _0x260a8e=a12_0x3f45,_0x26735b=_0x36a613();while(!![]){try{const _0x1fdbdc=parseInt(_0x260a8e(0xfd))/0x1+-parseInt(_0x260a8e(0x108))/0x2*(parseInt(_0x260a8e(0x10c))/0x3)+parseInt(_0x260a8e(0x101))/0x4*(-parseInt(_0x260a8e(0xf4))/0x5)+parseInt(_0x260a8e(0x105))/0x6+parseInt(_0x260a8e(0x103))/0x7*(-parseInt(_0x260a8e(0xf7))/0x8)+-parseInt(_0x260a8e(0x10d))/0x9*(-parseInt(_0x260a8e(0xf9))/0xa)+parseInt(_0x260a8e(0x102))/0xb;if(_0x1fdbdc===_0x5bcc0b)break;else _0x26735b['push'](_0x26735b['shift']());}catch(_0x3149a4){_0x26735b['push'](_0x26735b['shift']());}}}(a12_0x2ffd,0xf342a));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process['cwd'](),a12_0x302d2a(0x106));export function extractTitleFromComment(_0x31814c){const _0x4321bb=a12_0x302d2a;try{const _0x9423ea=readFileSync(_0x31814c,_0x4321bb(0x104)),_0x451250=_0x9423ea[_0x4321bb(0x100)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x451250&&_0x451250[0x1]){const _0x4aee08=_0x451250[0x1],_0x1d8097=_0x4aee08[_0x4321bb(0x100)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x1d8097&&_0x1d8097[0x1])return _0x1d8097[0x1][_0x4321bb(0x10e)]();}let _0x399711=null;const _0x29d9f1=_0x9423ea['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x29d9f1&&_0x29d9f1[0x1]&&(_0x399711=_0x29d9f1[0x1]);if(!_0x399711){const _0x11d331=_0x9423ea['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x11d331&&_0x11d331[0x1]&&(_0x399711=_0x11d331[0x1]);}if(_0x399711){const _0x2bec9a=new RegExp('\x5cb'+_0x399711+_0x4321bb(0xff)),_0x5b15b1=_0x9423ea['match'](_0x2bec9a);if(_0x5b15b1&&_0x5b15b1[0x1])return _0x5b15b1[0x1];return _0x399711;}return null;}catch(_0x3f5c04){return null;}}export function getLocalPages(_0xedd906=pagesDir,_0x23782c=pagesDir){const _0x43127b=a12_0x302d2a;let _0x43ca8e=[];const _0x413155=readdirSync(_0xedd906);return _0x413155[_0x43127b(0xf5)](_0x52a902=>{const _0x35be18=_0x43127b,_0x510f96=join(_0xedd906,_0x52a902),_0x3261fa=statSync(_0x510f96);if(_0x3261fa&&_0x3261fa[_0x35be18(0x10b)]())_0x43ca8e=_0x43ca8e[_0x35be18(0x10f)](getLocalPages(_0x510f96,_0x23782c));else{if(_0x52a902[_0x35be18(0x109)](_0x35be18(0xfe))){let _0x519959=relative(_0x23782c,_0x510f96);_0x519959['endsWith'](_0x35be18(0x10a))?_0x519959=_0x519959[_0x35be18(0xfa)](/index\.tsx$/,''):_0x519959=_0x519959[_0x35be18(0xfa)](/\.tsx$/,'');_0x519959[_0x35be18(0x109)]('/')&&(_0x519959=_0x519959[_0x35be18(0xf6)](0x0,-0x1));const _0x4ec5cb=extractTitleFromComment(_0x510f96),_0x35e6a4=_0x4ec5cb||_0x519959;_0x43ca8e[_0x35be18(0xfc)]({'path':_0x519959[_0x35be18(0xfb)]('$',':'),'label':_0x35e6a4});}}}),_0x43ca8e[_0x43127b(0xf8)](_0x9a9491=>_0x9a9491[_0x43127b(0x107)]!=='');}function a12_0x3f45(_0x22a0b4,_0x41cb1e){_0x22a0b4=_0x22a0b4-0xf4;const _0x2ffd14=a12_0x2ffd();let _0x3f45ab=_0x2ffd14[_0x22a0b4];return _0x3f45ab;}function a12_0x2ffd(){const _0x140631=['path','126WDvhGp','endsWith','index.tsx','isDirectory','4461NWwlVP','8621667CDgKvr','trim','concat','15PxdTyY','forEach','slice','8SMvnnP','filter','20XbhKlY','replace','replaceAll','push','389783TdpluG','.tsx','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','match','2177552TZbGxb','2345695vCbTjD','2539516brFxUc','utf-8','3402438DZWfJd','src/pages'];a12_0x2ffd=function(){return _0x140631;};return a12_0x2ffd();}
@@ -1 +1 @@
1
- (function(_0x78bc86,_0x29b40f){const _0x49127e=a13_0x5a15,_0x2598b9=_0x78bc86();while(!![]){try{const _0x4cffc2=parseInt(_0x49127e(0x154))/0x1*(parseInt(_0x49127e(0x15c))/0x2)+-parseInt(_0x49127e(0x167))/0x3*(parseInt(_0x49127e(0x153))/0x4)+-parseInt(_0x49127e(0x158))/0x5*(-parseInt(_0x49127e(0x169))/0x6)+parseInt(_0x49127e(0x179))/0x7*(-parseInt(_0x49127e(0x15a))/0x8)+-parseInt(_0x49127e(0x155))/0x9*(-parseInt(_0x49127e(0x159))/0xa)+parseInt(_0x49127e(0x166))/0xb*(parseInt(_0x49127e(0x168))/0xc)+parseInt(_0x49127e(0x175))/0xd*(-parseInt(_0x49127e(0x15b))/0xe);if(_0x4cffc2===_0x29b40f)break;else _0x2598b9['push'](_0x2598b9['shift']());}catch(_0x134ebe){_0x2598b9['push'](_0x2598b9['shift']());}}}(a13_0x5322,0x4526c));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 a13_0x5a15(_0x353e77,_0x82c216){const _0x532288=a13_0x5322();return a13_0x5a15=function(_0x5a150f,_0x56848d){_0x5a150f=_0x5a150f-0x153;let _0x3dbe3f=_0x532288[_0x5a150f];return _0x3dbe3f;},a13_0x5a15(_0x353e77,_0x82c216);}const config=readConfig();function a13_0x5322(){const _0x5386d8=['appcode','extend','获取菜单列表失败,HTTP状态码:\x20','data','123695picVdF','3gGuVXX','504DPNnNT','12OzyQEz','info','isArray','path','成功获取\x20','application/json','json','label','获取菜单列表失败:\x20','服务端返回空菜单列表','status','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','491647hwZTzl','get-online-menu-list','success','未知错误','3680047lMkugV','resources','map','\x20个线上菜单','1730908HdIjyr','631BCIQDA','2894202coaoQE','errorMsg','正在获取线上菜单列表...\x20(appCode:\x20','597305ziqTKJ','10lTAOhh','8dbRGxl','14lrVNCU','782pnErzD','未提供应用AppCode,且配置中也没有默认值','error','GET','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','log'];a13_0x5322=function(){return _0x5386d8;};return a13_0x5322();}export async function getOnlineMenuList(){const _0x2cf591=a13_0x5a15,_0x404ff8=config?.[_0x2cf591(0x162)];if(!_0x404ff8){const _0x3060a8=_0x2cf591(0x15d);return logger[_0x2cf591(0x15e)]('get-online-menu-list',_0x3060a8),console['error']('×\x20'+_0x3060a8),console[_0x2cf591(0x161)]('!\x20请使用以下方式之一:'),console[_0x2cf591(0x161)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log'](_0x2cf591(0x174)),[];}logger['info'](_0x2cf591(0x176),_0x2cf591(0x157)+_0x404ff8+')');const _0xc85404=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x404ff8,{'method':_0x2cf591(0x15f),'headers':{'Content-Type':_0x2cf591(0x16e),'Cookie':getCookie()}});if(!_0xc85404['ok']){if(_0xc85404[_0x2cf591(0x173)]===0x191){const _0x36a40e=_0x2cf591(0x160);logger[_0x2cf591(0x15e)](_0x2cf591(0x176),_0x36a40e,{'status':_0xc85404[_0x2cf591(0x173)]});throw new Error(_0x36a40e);}const _0x1af89b=_0x2cf591(0x164)+_0xc85404[_0x2cf591(0x173)];logger[_0x2cf591(0x15e)](_0x2cf591(0x176),_0x1af89b);throw new Error(_0x1af89b);}const _0x3d69ec=await _0xc85404[_0x2cf591(0x16f)]();if(!_0x3d69ec[_0x2cf591(0x177)]){const _0x39bbe5=_0x2cf591(0x171)+(_0x3d69ec[_0x2cf591(0x156)]||_0x2cf591(0x178));logger[_0x2cf591(0x15e)]('get-online-menu-list',_0x39bbe5,{'errorCode':_0x3d69ec['errorCode'],'errorMsg':_0x3d69ec[_0x2cf591(0x156)]});throw new Error(_0x39bbe5);}if(!_0x3d69ec['data'])return logger['info'](_0x2cf591(0x176),_0x2cf591(0x172)),[];return logger[_0x2cf591(0x16a)](_0x2cf591(0x176),_0x2cf591(0x16d)+_0x3d69ec[_0x2cf591(0x165)]['length']+_0x2cf591(0x17c)),_0x3d69ec[_0x2cf591(0x165)][_0x2cf591(0x17b)](_0x384076=>{const _0x279fab=_0x2cf591;let _0x394b02=[];try{if(_0x384076[_0x279fab(0x163)]?.[_0x279fab(0x17a)]){const _0xfa9ae2=JSON['parse'](_0x384076['extend'][_0x279fab(0x17a)]);Array[_0x279fab(0x16b)](_0xfa9ae2)&&(_0x394b02=_0xfa9ae2);}}catch(_0x20ee3c){}return{'id':_0x384076['id'],'path':_0x384076[_0x279fab(0x16c)],'label':_0x384076[_0x279fab(0x170)],'resources':_0x394b02};});}
1
+ function a13_0x380b(_0x1f07b9,_0x3eaa05){_0x1f07b9=_0x1f07b9-0x7c;const _0x28f9f3=a13_0x28f9();let _0x380b6c=_0x28f9f3[_0x1f07b9];return _0x380b6c;}(function(_0x40e6a6,_0x1f477e){const _0x23174f=a13_0x380b,_0x42f85f=_0x40e6a6();while(!![]){try{const _0x25350d=-parseInt(_0x23174f(0x8f))/0x1*(parseInt(_0x23174f(0x9e))/0x2)+-parseInt(_0x23174f(0xa6))/0x3+-parseInt(_0x23174f(0x7e))/0x4*(parseInt(_0x23174f(0x8c))/0x5)+-parseInt(_0x23174f(0x80))/0x6+parseInt(_0x23174f(0x84))/0x7+parseInt(_0x23174f(0x7d))/0x8+parseInt(_0x23174f(0x8b))/0x9*(parseInt(_0x23174f(0xa2))/0xa);if(_0x25350d===_0x1f477e)break;else _0x42f85f['push'](_0x42f85f['shift']());}catch(_0x1c39ee){_0x42f85f['push'](_0x42f85f['shift']());}}}(a13_0x28f9,0x40066));function a13_0x28f9(){const _0x1a3778=['success','!\x20请使用以下方式之一:','获取菜单列表失败,HTTP状态码:\x20','flat','errorMsg','36lCDRZJ','2305aJNqkd','服务端返回空菜单列表','正在获取线上菜单列表...\x20(appCode:\x20','11971vVmIdV','json','map','extend','label','\x20个线上菜单','length','parse','成功获取\x20','path','data','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','get-online-menu-list','appcode','application/json','46aWmkLG','error','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','errorCode','2016590BoRxkZ','children','/smartapi/menu/find?appCode=','获取菜单列表失败:\x20','543306LJNZfZ','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','3650288UociLQ','3412yYnQYY','info','1667712czmFuN','log','push','resources','888608TWAloj','status'];a13_0x28f9=function(){return _0x1a3778;};return a13_0x28f9();}import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function getOnlineMenuList(){const _0x15cf2d=a13_0x380b,_0x4369cf=config?.[_0x15cf2d(0x9c)];if(!_0x4369cf){const _0x36f884='未提供应用AppCode,且配置中也没有默认值';return logger[_0x15cf2d(0x9f)](_0x15cf2d(0x9b),_0x36f884),console[_0x15cf2d(0x9f)]('×\x20'+_0x36f884),console[_0x15cf2d(0x81)](_0x15cf2d(0x87)),console['log'](_0x15cf2d(0x7c)),console[_0x15cf2d(0x81)](_0x15cf2d(0xa0)),[];}logger[_0x15cf2d(0x7f)](_0x15cf2d(0x9b),_0x15cf2d(0x8e)+_0x4369cf+')');const _0x4557be=await fetch(getApiDomain()+_0x15cf2d(0xa4)+_0x4369cf,{'method':'GET','headers':{'Content-Type':_0x15cf2d(0x9d),'Cookie':getCookie()}});if(!_0x4557be['ok']){if(_0x4557be[_0x15cf2d(0x85)]===0x191){const _0x13335f=_0x15cf2d(0x9a);logger[_0x15cf2d(0x9f)](_0x15cf2d(0x9b),_0x13335f,{'status':_0x4557be[_0x15cf2d(0x85)]});throw new Error(_0x13335f);}const _0x2b1f01=_0x15cf2d(0x88)+_0x4557be[_0x15cf2d(0x85)];logger[_0x15cf2d(0x9f)](_0x15cf2d(0x9b),_0x2b1f01);throw new Error(_0x2b1f01);}const _0x33f079=await _0x4557be[_0x15cf2d(0x90)]();if(!_0x33f079[_0x15cf2d(0x86)]){const _0x2e26ad=_0x15cf2d(0xa5)+(_0x33f079['errorMsg']||'未知错误');logger[_0x15cf2d(0x9f)](_0x15cf2d(0x9b),_0x2e26ad,{'errorCode':_0x33f079[_0x15cf2d(0xa1)],'errorMsg':_0x33f079[_0x15cf2d(0x8a)]});throw new Error(_0x2e26ad);}if(!_0x33f079[_0x15cf2d(0x99)])return logger[_0x15cf2d(0x7f)](_0x15cf2d(0x9b),_0x15cf2d(0x8d)),[];return logger['info'](_0x15cf2d(0x9b),_0x15cf2d(0x97)+_0x33f079[_0x15cf2d(0x99)][_0x15cf2d(0x95)]+_0x15cf2d(0x94)),_0x33f079[_0x15cf2d(0x99)][_0x15cf2d(0x91)](formatMenuList)[_0x15cf2d(0x89)]();}function formatMenuList(_0x3cf669){const _0x505e25=a13_0x380b;let _0x36cad3=[];try{if(_0x3cf669[_0x505e25(0x92)]?.[_0x505e25(0x83)]){const _0x4750d3=JSON[_0x505e25(0x96)](_0x3cf669[_0x505e25(0x92)][_0x505e25(0x83)]);Array['isArray'](_0x4750d3)&&(_0x36cad3=_0x4750d3);}}catch(_0x58a640){}const _0x1b06ff=[{'id':_0x3cf669['id'],'path':_0x3cf669[_0x505e25(0x98)],'label':_0x3cf669[_0x505e25(0x93)],'resources':_0x36cad3}];if(_0x3cf669['children']&&_0x3cf669['children'][_0x505e25(0x95)]>0x0)for(const _0x2a9bc6 of _0x3cf669[_0x505e25(0xa3)]){_0x1b06ff[_0x505e25(0x82)](...formatMenuList(_0x2a9bc6));}return _0x1b06ff;}
@@ -1 +1 @@
1
- (function(_0xfc9035,_0x2868c5){const _0x7493e0=a15_0x1752,_0x5a6d9a=_0xfc9035();while(!![]){try{const _0x406856=-parseInt(_0x7493e0(0x89))/0x1*(parseInt(_0x7493e0(0x84))/0x2)+-parseInt(_0x7493e0(0x8a))/0x3+-parseInt(_0x7493e0(0x87))/0x4+parseInt(_0x7493e0(0x85))/0x5+-parseInt(_0x7493e0(0x8b))/0x6+-parseInt(_0x7493e0(0x83))/0x7+-parseInt(_0x7493e0(0x81))/0x8*(-parseInt(_0x7493e0(0x8c))/0x9);if(_0x406856===_0x2868c5)break;else _0x5a6d9a['push'](_0x5a6d9a['shift']());}catch(_0x4b3237){_0x5a6d9a['push'](_0x5a6d9a['shift']());}}}(a15_0x2f51,0xe935f));import{useEffect,useState}from'react';function a15_0x2f51(){const _0xc19de8=['7584500CVXolO','then','53684IlgKhn','833856YPBUXg','10851024Apcasy','604017NNlZRF','finally','744YUvqsz','message','10310559GIPocL','40JrAxve','6214600MxJPho','获取菜单列表失败'];a15_0x2f51=function(){return _0xc19de8;};return a15_0x2f51();}import{getOnlineMenuList}from'./get-online-menu-list.js';function a15_0x1752(_0x55f74,_0x49382a){const _0x2f5189=a15_0x2f51();return a15_0x1752=function(_0x17526e,_0x35ff65){_0x17526e=_0x17526e-0x81;let _0x4f1c8d=_0x2f5189[_0x17526e];return _0x4f1c8d;},a15_0x1752(_0x55f74,_0x49382a);}export function useGetOnlineMenuList(){const [_0xfcab1e,_0x48ad47]=useState([]),[_0x479dc7,_0x3b4877]=useState(!![]),[_0x205a74,_0x292c81]=useState('');return useEffect(()=>{const _0x7d1c94=a15_0x1752;_0x3b4877(!![]),_0x292c81(''),getOnlineMenuList()[_0x7d1c94(0x88)](_0x48ad47)['catch'](_0x5648fb=>{const _0x4d0c1f=_0x7d1c94;_0x292c81(_0x5648fb[_0x4d0c1f(0x82)]||_0x4d0c1f(0x86));})[_0x7d1c94(0x8d)](()=>_0x3b4877(![]));},[]),{'menuList':_0xfcab1e,'loading':_0x479dc7,'error':_0x205a74};}
1
+ function a15_0x178f(){const _0x53b181=['1782151ciibxL','then','message','catch','finally','1784RmATRo','6870OektgV','5515371WfuTsW','158EuJDyl','172036AKjamh','15029784CiUWbB','215DINqHa','12834qqHkrf','36xYJVTG','13344180rXRBCG'];a15_0x178f=function(){return _0x53b181;};return a15_0x178f();}function a15_0x384d(_0x12a97d,_0x1cfa6b){_0x12a97d=_0x12a97d-0x1b7;const _0x178f49=a15_0x178f();let _0x384d64=_0x178f49[_0x12a97d];return _0x384d64;}(function(_0x26605d,_0x2cea2d){const _0x58cdca=a15_0x384d,_0x4207c4=_0x26605d();while(!![]){try{const _0x55136a=parseInt(_0x58cdca(0x1bb))/0x1*(-parseInt(_0x58cdca(0x1bd))/0x2)+parseInt(_0x58cdca(0x1bc))/0x3+-parseInt(_0x58cdca(0x1be))/0x4*(parseInt(_0x58cdca(0x1c0))/0x5)+-parseInt(_0x58cdca(0x1c2))/0x6*(parseInt(_0x58cdca(0x1c4))/0x7)+parseInt(_0x58cdca(0x1ba))/0x8*(parseInt(_0x58cdca(0x1c1))/0x9)+parseInt(_0x58cdca(0x1c3))/0xa+parseInt(_0x58cdca(0x1bf))/0xb;if(_0x55136a===_0x2cea2d)break;else _0x4207c4['push'](_0x4207c4['shift']());}catch(_0x2e21c6){_0x4207c4['push'](_0x4207c4['shift']());}}}(a15_0x178f,0xe4e46));import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x3be994,_0x5e8598]=useState([]),[_0x13d090,_0x4253b4]=useState(!![]),[_0x4983eb,_0x11dc3b]=useState('');return useEffect(()=>{const _0x19d773=a15_0x384d;_0x4253b4(!![]),_0x11dc3b(''),getOnlineMenuList()[_0x19d773(0x1c5)](_0x5e8598)[_0x19d773(0x1b8)](_0x1436e7=>{const _0x4d8908=_0x19d773;_0x11dc3b(_0x1436e7[_0x4d8908(0x1b7)]||'获取菜单列表失败');})[_0x19d773(0x1b9)](()=>_0x4253b4(![]));},[]),{'menuList':_0x3be994,'loading':_0x13d090,'error':_0x4983eb};}
@@ -1 +1 @@
1
- (function(_0x4a7449,_0xd85d78){const _0x43d806=a16_0x1b9b,_0x4d2c88=_0x4a7449();while(!![]){try{const _0x2fcef0=-parseInt(_0x43d806(0xa5))/0x1+-parseInt(_0x43d806(0xa7))/0x2*(-parseInt(_0x43d806(0xa6))/0x3)+parseInt(_0x43d806(0x9b))/0x4+parseInt(_0x43d806(0xa4))/0x5+parseInt(_0x43d806(0xa0))/0x6+-parseInt(_0x43d806(0x9e))/0x7+-parseInt(_0x43d806(0xa1))/0x8*(parseInt(_0x43d806(0x9d))/0x9);if(_0x2fcef0===_0xd85d78)break;else _0x4d2c88['push'](_0x4d2c88['shift']());}catch(_0xb49303){_0x4d2c88['push'](_0x4d2c88['shift']());}}}(a16_0x3ae2,0xee487));export function getRemainingSpaces(_0x4bab72,_0x4ccb63){const _0x464520=a16_0x1b9b,_0xccc56c=getStringWidth(_0x4ccb63);return Array(Math[_0x464520(0xa3)](0x0,_0x4bab72-_0xccc56c))[_0x464520(0xa2)]('\x20')[_0x464520(0x9c)]('');}export function getMaxWidth(_0xc9224a,_0x440597=0x2){const _0x543faa=a16_0x1b9b;let _0x5c81d1='',_0x46ab9b=0x0;for(const _0x3c7fbf of _0xc9224a){const _0x3eb8d4=getStringWidth(_0x3c7fbf);_0x3eb8d4>_0x46ab9b&&(_0x46ab9b=_0x3eb8d4,_0x5c81d1=_0x3c7fbf);}return _0x5c81d1+'\x20'[_0x543faa(0x9f)](_0x440597);}export function getStringWidth(_0x387d58){let _0x41dbdc=0x0;for(const _0x156474 of _0x387d58){/[\u4e00-\u9fa5]/['test'](_0x156474)?_0x41dbdc+=0x2:_0x41dbdc+=0x1;}return _0x41dbdc;}function a16_0x1b9b(_0x250d02,_0x2df969){const _0x3ae2c9=a16_0x3ae2();return a16_0x1b9b=function(_0x1b9b1c,_0x477805){_0x1b9b1c=_0x1b9b1c-0x9b;let _0x2ba457=_0x3ae2c9[_0x1b9b1c];return _0x2ba457;},a16_0x1b9b(_0x250d02,_0x2df969);}function a16_0x3ae2(){const _0x45ad6e=['1385032XSAqEA','join','9nBVPHn','1859746RQOXId','repeat','6735450bkZuBo','13806488ESaEEW','fill','max','2901415QQTDuE','544156JSGRcQ','29646MQsQOY','296EBFUWG'];a16_0x3ae2=function(){return _0x45ad6e;};return a16_0x3ae2();}
1
+ function a16_0x1e8a(){const _0x15a9b9=['438675ZoPjjh','4301196kbyGsI','28YjMlik','11617731ygEunY','51826GjOIUD','6909132ZSOUVA','10AAcHNk','max','test','repeat','fill','60FlzyZJ','2297148ylyUOP','11ftlNoR','8BbfBfd','join','830951VLoZSO'];a16_0x1e8a=function(){return _0x15a9b9;};return a16_0x1e8a();}(function(_0x3f19c0,_0x4a285e){const _0x3eca4a=a16_0xab39,_0x457206=_0x3f19c0();while(!![]){try{const _0x22d15e=parseInt(_0x3eca4a(0x165))/0x1*(-parseInt(_0x3eca4a(0x15c))/0x2)+parseInt(_0x3eca4a(0x169))/0x3*(parseInt(_0x3eca4a(0x15a))/0x4)+parseInt(_0x3eca4a(0x15e))/0x5*(-parseInt(_0x3eca4a(0x159))/0x6)+parseInt(_0x3eca4a(0x164))/0x7+parseInt(_0x3eca4a(0x166))/0x8*(parseInt(_0x3eca4a(0x15b))/0x9)+-parseInt(_0x3eca4a(0x163))/0xa*(-parseInt(_0x3eca4a(0x168))/0xb)+-parseInt(_0x3eca4a(0x15d))/0xc;if(_0x22d15e===_0x4a285e)break;else _0x457206['push'](_0x457206['shift']());}catch(_0x4e4827){_0x457206['push'](_0x457206['shift']());}}}(a16_0x1e8a,0xc3a1c));export function getRemainingSpaces(_0x11643f,_0x5e03ee){const _0x541771=a16_0xab39,_0x454db2=getStringWidth(_0x5e03ee);return Array(Math[_0x541771(0x15f)](0x0,_0x11643f-_0x454db2))[_0x541771(0x162)]('\x20')[_0x541771(0x167)]('');}function a16_0xab39(_0x30b569,_0x45e83e){_0x30b569=_0x30b569-0x159;const _0x1e8a2c=a16_0x1e8a();let _0xab3956=_0x1e8a2c[_0x30b569];return _0xab3956;}export function getMaxWidth(_0x25caa7,_0x10aeba=0x2){const _0x47baa7=a16_0xab39;let _0x3b7277='',_0x5f25b9=0x0;for(const _0x14defd of _0x25caa7){const _0x14ec7f=getStringWidth(_0x14defd);_0x14ec7f>_0x5f25b9&&(_0x5f25b9=_0x14ec7f,_0x3b7277=_0x14defd);}return _0x3b7277+'\x20'[_0x47baa7(0x161)](_0x10aeba);}export function getStringWidth(_0x523029){const _0x4b0f29=a16_0xab39;let _0x82c6a7=0x0;for(const _0x4d2f2c of _0x523029){/[\u4e00-\u9fa5]/[_0x4b0f29(0x160)](_0x4d2f2c)?_0x82c6a7+=0x2:_0x82c6a7+=0x1;}return _0x82c6a7;}
@@ -1 +1 @@
1
- (function(_0xacbe1f,_0x2ca8ea){const _0x424836=a17_0x2aef,_0x57e039=_0xacbe1f();while(!![]){try{const _0x3732e2=parseInt(_0x424836(0xb9))/0x1+-parseInt(_0x424836(0xc3))/0x2+-parseInt(_0x424836(0xc4))/0x3*(-parseInt(_0x424836(0xc2))/0x4)+-parseInt(_0x424836(0xbf))/0x5+-parseInt(_0x424836(0xbe))/0x6*(parseInt(_0x424836(0xba))/0x7)+-parseInt(_0x424836(0xbb))/0x8+-parseInt(_0x424836(0xc1))/0x9*(-parseInt(_0x424836(0xc0))/0xa);if(_0x3732e2===_0x2ca8ea)break;else _0x57e039['push'](_0x57e039['shift']());}catch(_0x5e7030){_0x57e039['push'](_0x57e039['shift']());}}}(a17_0x4771,0xd88a6));export function isValidJsHttpsUrl(_0x5e38f3){const _0x3eecf3=a17_0x2aef;return/^https:\/\/.+\.js(\?.*)?$/[_0x3eecf3(0xbc)](_0x5e38f3[_0x3eecf3(0xbd)]());}function a17_0x4771(){const _0x2804b8=['87WckkLk','HEAD','73035BSvjdC','1036ZUgptI','4444264XwMjPj','test','trim','62250cDQYlG','1254040daQzzB','45945970ghTFmI','9QNuHIi','31108EPDfdJ','3328748YEwobw'];a17_0x4771=function(){return _0x2804b8;};return a17_0x4771();}export function isValidCssHttpsUrl(_0x42e1db){const _0x553297=a17_0x2aef;return/^https:\/\/.+\.css(\?.*)?$/[_0x553297(0xbc)](_0x42e1db['trim']());}function a17_0x2aef(_0x1a27b6,_0x40f5eb){const _0x4771d8=a17_0x4771();return a17_0x2aef=function(_0x2aef73,_0x489ad7){_0x2aef73=_0x2aef73-0xb8;let _0x19dc50=_0x4771d8[_0x2aef73];return _0x19dc50;},a17_0x2aef(_0x1a27b6,_0x40f5eb);}export async function isUrlReachable(_0x4d20df){const _0x351553=a17_0x2aef;try{const _0x3cf17d=await fetch(_0x4d20df,{'method':_0x351553(0xb8)});return _0x3cf17d['ok'];}catch{return![];}}
1
+ (function(_0xe07d,_0x585dd4){const _0xf83f63=a17_0x3001,_0x100c76=_0xe07d();while(!![]){try{const _0x1018f5=parseInt(_0xf83f63(0xdb))/0x1*(parseInt(_0xf83f63(0xda))/0x2)+-parseInt(_0xf83f63(0xde))/0x3+-parseInt(_0xf83f63(0xdf))/0x4*(-parseInt(_0xf83f63(0xd8))/0x5)+-parseInt(_0xf83f63(0xe0))/0x6*(-parseInt(_0xf83f63(0xd7))/0x7)+-parseInt(_0xf83f63(0xd6))/0x8+-parseInt(_0xf83f63(0xd5))/0x9*(parseInt(_0xf83f63(0xdd))/0xa)+-parseInt(_0xf83f63(0xdc))/0xb*(-parseInt(_0xf83f63(0xe1))/0xc);if(_0x1018f5===_0x585dd4)break;else _0x100c76['push'](_0x100c76['shift']());}catch(_0x41860c){_0x100c76['push'](_0x100c76['shift']());}}}(a17_0x18b0,0x7d611));function a17_0x18b0(){const _0x4b3143=['trim','122kCgSTF','11873OAGsye','809974IUZcgD','182420zgpWzY','942819URWUOY','4WNBCJr','380064ZoJBSx','72eAUUNA','189KJeLZF','5601232gNgXMS','35IHpQYv','2141425PDebgk'];a17_0x18b0=function(){return _0x4b3143;};return a17_0x18b0();}export function isValidJsHttpsUrl(_0x1ee6a0){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x1ee6a0['trim']());}function a17_0x3001(_0x3c83a3,_0x7d97b3){_0x3c83a3=_0x3c83a3-0xd5;const _0x18b0d5=a17_0x18b0();let _0x300192=_0x18b0d5[_0x3c83a3];return _0x300192;}export function isValidCssHttpsUrl(_0x1e689e){const _0x1ca89a=a17_0x3001;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x1e689e[_0x1ca89a(0xd9)]());}export async function isUrlReachable(_0x315c70){try{const _0x170fa5=await fetch(_0x315c70,{'method':'HEAD'});return _0x170fa5['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a18_0x5a015b=a18_0x6a1c;(function(_0x38259a,_0x9ac67e){const _0x1b2f08=a18_0x6a1c,_0x3aced1=_0x38259a();while(!![]){try{const _0x2a05c2=-parseInt(_0x1b2f08(0x8f))/0x1*(-parseInt(_0x1b2f08(0x94))/0x2)+parseInt(_0x1b2f08(0x72))/0x3*(-parseInt(_0x1b2f08(0x87))/0x4)+parseInt(_0x1b2f08(0x6d))/0x5*(-parseInt(_0x1b2f08(0x73))/0x6)+-parseInt(_0x1b2f08(0x82))/0x7*(parseInt(_0x1b2f08(0x71))/0x8)+-parseInt(_0x1b2f08(0x79))/0x9+parseInt(_0x1b2f08(0x93))/0xa*(parseInt(_0x1b2f08(0x81))/0xb)+parseInt(_0x1b2f08(0x7e))/0xc;if(_0x2a05c2===_0x9ac67e)break;else _0x3aced1['push'](_0x3aced1['shift']());}catch(_0x240be7){_0x3aced1['push'](_0x3aced1['shift']());}}}(a18_0x232d,0xcfafc));import{jsx as a18_0x148fb5,jsxs as a18_0x53f6c5}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a18_0x6a1c(_0x4360c2,_0x2ae316){const _0x232df3=a18_0x232d();return a18_0x6a1c=function(_0x6a1ce2,_0x2e5a8a){_0x6a1ce2=_0x6a1ce2-0x6d;let _0x18be2e=_0x232df3[_0x6a1ce2];return _0x18be2e;},a18_0x6a1c(_0x4360c2,_0x2ae316);}import a18_0x57d5b7 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable}from'../app-menu/valid-url.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import{CdnUrlCompareTable}from'./cdn-url-compare-table.js';import.meta['main']&&render(a18_0x148fb5(AppMenuSyncCdnVersionUI,{'newVersion':a18_0x5a015b(0x83)}));export function AppMenuSyncCdnVersionUI(_0x284502){const _0x173031=a18_0x5a015b,{exit:_0x1a734f}=useApp(),{newVersion:_0x1ebbf8}=_0x284502,{loading:_0x2b158f,menuList:_0x298f78,error:_0x3c60f3}=useGetOnlineMenuList(),[_0x5ee062,_0x4ab63a]=useState(![]),[_0x3c4732,_0x514dab]=useState(!![]),[_0x4ba1cc,_0x53e980]=useState('ok'),[_0xd8bb52,_0x37b6b9]=useState([]),_0x48ad5a=Array[_0x173031(0x7a)](new Set(_0x298f78[_0x173031(0x74)](_0x47693d=>_0x47693d[_0x173031(0x70)])['flat']()));useEffect(()=>{const _0x3a04be=_0x173031;if(!_0x48ad5a[_0x3a04be(0x88)])return;Promise['all'](_0x48ad5a[_0x3a04be(0x74)](async _0x147e4=>{const _0x4f7071=_0x3a04be,_0x1949c9=_0x147e4[_0x4f7071(0x86)](extractVersionFromUrl(_0x147e4),_0x1ebbf8),_0x3061bc=await isUrlReachable(_0x1949c9);if(_0x3061bc)return'';return _0x1949c9;}))['then'](_0x55869c=>{_0x37b6b9(_0x55869c['filter'](_0x2c0b74=>_0x2c0b74)),_0x514dab(![]);});},[_0x48ad5a['length'],_0x1ebbf8]),useEffect(()=>{const _0x51e919=_0x173031;(_0x5ee062||_0xd8bb52[_0x51e919(0x88)]>0x0)&&setTimeout(_0x1a734f,0x32);},[_0x5ee062,_0xd8bb52[_0x173031(0x88)]]),useInput(async(_0x47634e,_0x505a62)=>{const _0x250230=_0x173031;if(_0x505a62[_0x250230(0x91)]||_0x505a62[_0x250230(0x96)]||_0x505a62['leftArrow']||_0x505a62[_0x250230(0x95)]){_0x53e980(_0x29d2dc=>_0x29d2dc==='ok'?_0x250230(0x89):'ok');return;}if(_0x505a62[_0x250230(0x7f)]){if(_0x4ba1cc==='ok'){await Promise[_0x250230(0x98)](_0x298f78[_0x250230(0x74)](_0x35ef3a=>{const _0xc9077e=_0x250230,_0x4319cb={'id':_0x35ef3a['id'],'label':_0x35ef3a['label'],'path':_0x35ef3a[_0xc9077e(0x7c)],'resources':_0x35ef3a[_0xc9077e(0x70)][_0xc9077e(0x74)](_0x13b90e=>_0x13b90e['replace'](extractVersionFromUrl(_0x13b90e),_0x1ebbf8))};return updateMenuCdnUrl(_0x4319cb);})),_0x4ab63a(!![]);return;}_0x4ba1cc===_0x250230(0x89)&&_0x1a734f();}});if(_0x2b158f||_0x3c4732)return a18_0x53f6c5(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x148fb5(Text,{'children':'\x20\x20'}),a18_0x148fb5(a18_0x57d5b7,{'type':_0x173031(0x7b)}),a18_0x148fb5(Text,{'children':'\x20正在获取线上菜单资源列表...'})]});if(_0x3c60f3)return a18_0x53f6c5(Box,{'flexDirection':_0x173031(0x8e),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x53f6c5(Text,{'color':_0x173031(0x80),'children':['✗\x20',_0x3c60f3]}),a18_0x53f6c5(Box,{'marginTop':0x1,'children':[a18_0x148fb5(Text,{'color':_0x173031(0x8b),'children':_0x173031(0x99)}),a18_0x148fb5(Text,{'color':_0x173031(0x8a),'children':_0x173031(0x90)}),a18_0x148fb5(Text,{'color':_0x173031(0x8b),'children':_0x173031(0x76)})]})]});if(_0x48ad5a['length']===0x0)return a18_0x148fb5(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a18_0x148fb5(Text,{'color':_0x173031(0x78),'children':_0x173031(0x6e)})});const _0xe8f5a=_0x48ad5a[_0x173031(0x74)](_0x2e1583=>({'cdnUrl':_0x2e1583,'currentVersion':extractVersionFromUrl(_0x2e1583)||_0x173031(0x77),'newVersion':_0x1ebbf8}));if(_0x5ee062)return a18_0x53f6c5(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a18_0x148fb5(CdnUrlCompareTable,{'compareRows':_0xe8f5a}),a18_0x148fb5(Box,{'marginTop':0x1,'children':a18_0x148fb5(Text,{'color':_0x173031(0x6f),'children':_0x173031(0x8d)})})]});if(_0xd8bb52['length'])return a18_0x53f6c5(Box,{'flexDirection':_0x173031(0x8e),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x148fb5(CdnUrlCompareTable,{'compareRows':_0xe8f5a}),a18_0x53f6c5(Box,{'marginTop':0x1,'flexDirection':_0x173031(0x8e),'children':[a18_0x148fb5(Text,{'color':'red','children':_0x173031(0x7d)}),_0xd8bb52[_0x173031(0x74)](_0x220b64=>a18_0x148fb5(Text,{'color':_0x173031(0x8b),'children':'\x20\x20'+_0x220b64},_0x220b64))]})]});return a18_0x53f6c5(Box,{'flexDirection':_0x173031(0x8e),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x148fb5(CdnUrlCompareTable,{'compareRows':_0xe8f5a}),a18_0x148fb5(Box,{'marginTop':0x1,'children':a18_0x148fb5(Text,{'color':_0x173031(0x8a),'children':'*\x20更新菜单资源到\x20Lovrabet\x20平台'})}),a18_0x148fb5(Box,{'marginTop':0x1,'flexDirection':_0x173031(0x8e),'children':[{'label':_0x173031(0x8c),'value':'ok'},{'label':'取消更新','value':_0x173031(0x89)}][_0x173031(0x74)](_0x174e90=>a18_0x53f6c5(Text,{'color':_0x4ba1cc===_0x174e90[_0x173031(0x97)]?_0x173031(0x78):undefined,'children':[_0x4ba1cc===_0x174e90['value']?'>\x20':'\x20\x20',_0x174e90[_0x173031(0x85)]]},_0x174e90[_0x173031(0x97)]))})]});}function a18_0x232d(){const _0x4df292=['length','cancel','cyan','gray','继续更新','√\x20资源版本更新成功','column','231085hrCqGW','lovrabet\x20auth','upArrow','\x5cd+\x5c.\x5cd+\x5c.\x5cd+(?:[-+A-Za-z0-9.]+)?','7966790plGuSY','12ewJWNc','rightArrow','downArrow','value','all','提示:使用\x20','145vIMWpx','!\x20未找到菜单资源链接','green','resources','1240leYPiY','27esjavx','36810vCeNwh','map',')(?:/|$)','\x20命令重新登录','unknown','yellow','8320032Byjqxj','from','dots','path','✗\x20待更新的菜单资源无法访问,请检查链接是否正确','12430320elBzWI','return','red','11ymBbHs','27307PJBPlT','1.0.4','/v?(','label','replace','293932CLVSAg'];a18_0x232d=function(){return _0x4df292;};return a18_0x232d();}function extractVersionFromUrl(_0x3cfa5a){const _0x1819ef=a18_0x5a015b;if(!_0x3cfa5a)return'';const _0x955bc6=_0x1819ef(0x92),_0x227836=[new RegExp('@('+_0x955bc6+')'),new RegExp('-('+_0x955bc6+')(?:\x5c.|-)'),new RegExp(_0x1819ef(0x84)+_0x955bc6+_0x1819ef(0x75)),new RegExp('[?&]version=('+_0x955bc6+')')];for(const _0x2b6ce5 of _0x227836){const _0x5e2ce2=_0x3cfa5a['match'](_0x2b6ce5);if(_0x5e2ce2&&_0x5e2ce2[0x1])return _0x5e2ce2[0x1];}return'';}
1
+ const a18_0x15b661=a18_0x2352;(function(_0x5a76d4,_0x2d2b03){const _0x3e1009=a18_0x2352,_0x1c53d8=_0x5a76d4();while(!![]){try{const _0x130c39=-parseInt(_0x3e1009(0x144))/0x1+parseInt(_0x3e1009(0x14a))/0x2+-parseInt(_0x3e1009(0x125))/0x3*(-parseInt(_0x3e1009(0x13f))/0x4)+parseInt(_0x3e1009(0x138))/0x5+-parseInt(_0x3e1009(0x126))/0x6*(-parseInt(_0x3e1009(0x14b))/0x7)+-parseInt(_0x3e1009(0x13b))/0x8*(-parseInt(_0x3e1009(0x139))/0x9)+-parseInt(_0x3e1009(0x12e))/0xa;if(_0x130c39===_0x2d2b03)break;else _0x1c53d8['push'](_0x1c53d8['shift']());}catch(_0x8b0e9e){_0x1c53d8['push'](_0x1c53d8['shift']());}}}(a18_0x28bf,0x334e3));import{jsx as a18_0x1e2646,jsxs as a18_0x597746}from'react/jsx-runtime';function a18_0x28bf(){const _0x1a2a1f=['28434aNSEnp','*\x20更新菜单资源到\x20Lovrabet\x20平台','red','cyan','match','upArrow','leftArrow','from','3550850ekCEgy','1.0.4','length',')(?:\x5c.|-)','!\x20未找到菜单资源链接','[?&]version=(','√\x20资源版本更新成功','rightArrow','replace','✗\x20待更新的菜单资源无法访问,请检查链接是否正确','390810vofNAW','27qrJDeX','yellow','351272IybvoH','map','resources','继续更新','1632404MQmVRj','\x5cd+\x5c.\x5cd+\x5c.\x5cd+(?:[-+A-Za-z0-9.]+)?','path','gray','column','157849eDkaXg','value','cancel','label','then','取消更新','134358SJxrmQ','56cfnofW','\x20正在获取线上菜单资源列表...','downArrow','green',')(?:/|$)','\x20命令重新登录','return','unknown','3cHsVbU'];a18_0x28bf=function(){return _0x1a2a1f;};return a18_0x28bf();}import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a18_0x39e680 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable}from'../app-menu/valid-url.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import{CdnUrlCompareTable}from'./cdn-url-compare-table.js';import.meta.main&&render(a18_0x1e2646(AppMenuSyncCdnVersionUI,{'newVersion':a18_0x15b661(0x12f)}));function a18_0x2352(_0x2bea1d,_0x1d1b96){_0x2bea1d=_0x2bea1d-0x125;const _0x28bf7c=a18_0x28bf();let _0x2352c4=_0x28bf7c[_0x2bea1d];return _0x2352c4;}export function AppMenuSyncCdnVersionUI(_0x380325){const _0x362ca8=a18_0x15b661,{exit:_0x12e1e7}=useApp(),{newVersion:_0x5cc22d}=_0x380325,{loading:_0x1340e9,menuList:_0x4e65b3,error:_0x4a0a54}=useGetOnlineMenuList(),[_0x484264,_0x5d7a1a]=useState(![]),[_0x51096b,_0x1a6299]=useState(!![]),[_0x2e962e,_0x47056b]=useState('ok'),[_0x51316e,_0x11a582]=useState([]),_0x117f2e=Array[_0x362ca8(0x12d)](new Set(_0x4e65b3[_0x362ca8(0x13c)](_0x5b8ad7=>_0x5b8ad7[_0x362ca8(0x13d)])['flat']()));useEffect(()=>{const _0x19d5d4=_0x362ca8;if(!_0x117f2e[_0x19d5d4(0x130)])return;Promise['all'](_0x117f2e['map'](async _0x3d6f1f=>{const _0x1bf5c4=_0x19d5d4,_0x5cdeff=_0x3d6f1f[_0x1bf5c4(0x136)](extractVersionFromUrl(_0x3d6f1f),_0x5cc22d),_0xa3c1f3=await isUrlReachable(_0x5cdeff);if(_0xa3c1f3)return'';return _0x5cdeff;}))[_0x19d5d4(0x148)](_0x2c40d7=>{_0x11a582(_0x2c40d7['filter'](_0x587718=>_0x587718)),_0x1a6299(![]);});},[_0x117f2e['length'],_0x5cc22d]),useEffect(()=>{const _0xfcad89=_0x362ca8;(_0x484264||_0x51316e[_0xfcad89(0x130)]>0x0)&&setTimeout(_0x12e1e7,0x32);},[_0x484264,_0x51316e['length']]),useInput(async(_0xc2f9f8,_0x129184)=>{const _0x56c0ec=_0x362ca8;if(_0x129184[_0x56c0ec(0x12b)]||_0x129184[_0x56c0ec(0x14d)]||_0x129184[_0x56c0ec(0x12c)]||_0x129184[_0x56c0ec(0x135)]){_0x47056b(_0x34c576=>_0x34c576==='ok'?'cancel':'ok');return;}if(_0x129184[_0x56c0ec(0x151)]){if(_0x2e962e==='ok'){await Promise['all'](_0x4e65b3['map'](_0x4a18b0=>{const _0x5e84dd=_0x56c0ec,_0x557054={'id':_0x4a18b0['id'],'label':_0x4a18b0[_0x5e84dd(0x147)],'path':_0x4a18b0[_0x5e84dd(0x141)],'resources':_0x4a18b0['resources'][_0x5e84dd(0x13c)](_0x158936=>_0x158936[_0x5e84dd(0x136)](extractVersionFromUrl(_0x158936),_0x5cc22d))};return updateMenuCdnUrl(_0x557054);})),_0x5d7a1a(!![]);return;}_0x2e962e===_0x56c0ec(0x146)&&_0x12e1e7();}});if(_0x1340e9||_0x51096b)return a18_0x597746(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x1e2646(Text,{'children':'\x20\x20'}),a18_0x1e2646(a18_0x39e680,{'type':'dots'}),a18_0x1e2646(Text,{'children':_0x362ca8(0x14c)})]});if(_0x4a0a54)return a18_0x597746(Box,{'flexDirection':_0x362ca8(0x143),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x597746(Text,{'color':_0x362ca8(0x128),'children':['✗\x20',_0x4a0a54]}),a18_0x597746(Box,{'marginTop':0x1,'children':[a18_0x1e2646(Text,{'color':_0x362ca8(0x142),'children':'提示:使用\x20'}),a18_0x1e2646(Text,{'color':_0x362ca8(0x129),'children':'lovrabet\x20auth'}),a18_0x1e2646(Text,{'color':_0x362ca8(0x142),'children':_0x362ca8(0x150)})]})]});if(_0x117f2e[_0x362ca8(0x130)]===0x0)return a18_0x1e2646(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a18_0x1e2646(Text,{'color':_0x362ca8(0x13a),'children':_0x362ca8(0x132)})});const _0x7f029d=_0x117f2e[_0x362ca8(0x13c)](_0x53d693=>({'cdnUrl':_0x53d693,'currentVersion':extractVersionFromUrl(_0x53d693)||_0x362ca8(0x152),'newVersion':_0x5cc22d}));if(_0x484264)return a18_0x597746(Box,{'flexDirection':_0x362ca8(0x143),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x1e2646(CdnUrlCompareTable,{'compareRows':_0x7f029d}),a18_0x1e2646(Box,{'marginTop':0x1,'children':a18_0x1e2646(Text,{'color':_0x362ca8(0x14e),'children':_0x362ca8(0x134)})})]});if(_0x51316e[_0x362ca8(0x130)])return a18_0x597746(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a18_0x1e2646(CdnUrlCompareTable,{'compareRows':_0x7f029d}),a18_0x597746(Box,{'marginTop':0x1,'flexDirection':_0x362ca8(0x143),'children':[a18_0x1e2646(Text,{'color':_0x362ca8(0x128),'children':_0x362ca8(0x137)}),_0x51316e[_0x362ca8(0x13c)](_0x43c0a3=>a18_0x1e2646(Text,{'color':_0x362ca8(0x142),'children':'\x20\x20'+_0x43c0a3},_0x43c0a3))]})]});return a18_0x597746(Box,{'flexDirection':_0x362ca8(0x143),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x1e2646(CdnUrlCompareTable,{'compareRows':_0x7f029d}),a18_0x1e2646(Box,{'marginTop':0x1,'children':a18_0x1e2646(Text,{'color':_0x362ca8(0x129),'children':_0x362ca8(0x127)})}),a18_0x1e2646(Box,{'marginTop':0x1,'flexDirection':'column','children':[{'label':_0x362ca8(0x13e),'value':'ok'},{'label':_0x362ca8(0x149),'value':_0x362ca8(0x146)}][_0x362ca8(0x13c)](_0x36f97c=>a18_0x597746(Text,{'color':_0x2e962e===_0x36f97c[_0x362ca8(0x145)]?_0x362ca8(0x13a):undefined,'children':[_0x2e962e===_0x36f97c[_0x362ca8(0x145)]?'>\x20':'\x20\x20',_0x36f97c[_0x362ca8(0x147)]]},_0x36f97c[_0x362ca8(0x145)]))})]});}function extractVersionFromUrl(_0xf221f2){const _0x5f470a=a18_0x15b661;if(!_0xf221f2)return'';const _0x332743=_0x5f470a(0x140),_0x2949b4=[new RegExp('@('+_0x332743+')'),new RegExp('-('+_0x332743+_0x5f470a(0x131)),new RegExp('/v?('+_0x332743+_0x5f470a(0x14f)),new RegExp(_0x5f470a(0x133)+_0x332743+')')];for(const _0x2c7a10 of _0x2949b4){const _0x370df9=_0xf221f2[_0x5f470a(0x12a)](_0x2c7a10);if(_0x370df9&&_0x370df9[0x1])return _0x370df9[0x1];}return'';}
@@ -1 +1 @@
1
- (function(_0x23cf4c,_0x551124){const _0x32de42=a19_0x271c,_0xcc6a54=_0x23cf4c();while(!![]){try{const _0x236801=parseInt(_0x32de42(0x1f6))/0x1*(parseInt(_0x32de42(0x1f5))/0x2)+-parseInt(_0x32de42(0x1fe))/0x3+parseInt(_0x32de42(0x1fa))/0x4+-parseInt(_0x32de42(0x1fd))/0x5*(-parseInt(_0x32de42(0x1ff))/0x6)+-parseInt(_0x32de42(0x200))/0x7*(parseInt(_0x32de42(0x1fb))/0x8)+-parseInt(_0x32de42(0x1ef))/0x9+parseInt(_0x32de42(0x1ee))/0xa;if(_0x236801===_0x551124)break;else _0xcc6a54['push'](_0xcc6a54['shift']());}catch(_0x12139f){_0xcc6a54['push'](_0xcc6a54['shift']());}}}(a19_0x4904,0x5c768));import{jsx as a19_0x24e47c,jsxs as a19_0x2866a3,Fragment as a19_0x18e14b}from'react/jsx-runtime';import{Text,Box}from'ink';function a19_0x271c(_0xf766e1,_0x34d6af){const _0x490452=a19_0x4904();return a19_0x271c=function(_0x271c34,_0x35e37e){_0x271c34=_0x271c34-0x1ee;let _0x43fd53=_0x490452[_0x271c34];return _0x43fd53;},a19_0x271c(_0xf766e1,_0x34d6af);}import{getMaxWidth,getRemainingSpaces,getStringWidth}from'../app-menu/utils.js';export function CdnUrlCompareTable(_0x5abd9c){const _0x39ef60=a19_0x271c,{compareRows:_0x7fc44b}=_0x5abd9c,_0x2fd5ef=_0x7fc44b[_0x39ef60(0x1f1)](_0x374656=>_0x374656['cdnUrl']),_0x3ba919=getStringWidth(getMaxWidth([_0x39ef60(0x1fc),_0x39ef60(0x1f3)],0x2)),_0xcccf9f=getStringWidth(getMaxWidth(_0x2fd5ef,0x2));return a19_0x2866a3(a19_0x18e14b,{'children':[a19_0x24e47c(Text,{'color':'cyan','children':_0x39ef60(0x1f4)}),a19_0x2866a3(Box,{'children':[a19_0x2866a3(Text,{'bold':!![],'children':['\x20\x20',_0x39ef60(0x201),getRemainingSpaces(_0xcccf9f,'资源链接')]}),a19_0x2866a3(Text,{'bold':!![],'children':[_0x39ef60(0x1fc),getRemainingSpaces(_0x3ba919,_0x39ef60(0x1fc))]}),a19_0x2866a3(Text,{'bold':!![],'children':['新版本',getRemainingSpaces(_0x3ba919,'新版本')]})]}),_0x7fc44b[_0x39ef60(0x1f1)](_0x1da4ff=>a19_0x2866a3(Box,{'children':[a19_0x2866a3(Text,{'children':['\x20\x20',_0x1da4ff['cdnUrl'],getRemainingSpaces(_0xcccf9f,_0x1da4ff[_0x39ef60(0x1f8)])]}),a19_0x2866a3(Text,{'color':_0x39ef60(0x1f9),'children':[_0x1da4ff[_0x39ef60(0x1f0)],getRemainingSpaces(_0x3ba919,_0x1da4ff[_0x39ef60(0x1f0)])]}),a19_0x2866a3(Text,{'color':_0x39ef60(0x1f7),'children':[_0x1da4ff['newVersion'],getRemainingSpaces(_0x3ba919,_0x1da4ff[_0x39ef60(0x1f2)])]})]},_0x1da4ff[_0x39ef60(0x1f8)]))]});}function a19_0x4904(){const _0x29520e=['map','newVersion','新版本','*\x20待更新的菜单资源链接','2aIrGfW','216547VToeYR','cyan','cdnUrl','green','2509604zByajA','16lrrEuY','当前版本','665275rOKtEa','676614mbdvfm','12eXlbru','922047eTBdFP','资源链接','4446950sCUdWw','6183405uGouWq','currentVersion'];a19_0x4904=function(){return _0x29520e;};return a19_0x4904();}
1
+ (function(_0x4357c9,_0x51747a){const _0x37e3cc=a19_0x57cf,_0x2ae439=_0x4357c9();while(!![]){try{const _0x94a9e3=-parseInt(_0x37e3cc(0x80))/0x1*(-parseInt(_0x37e3cc(0x8b))/0x2)+-parseInt(_0x37e3cc(0x86))/0x3+parseInt(_0x37e3cc(0x83))/0x4+parseInt(_0x37e3cc(0x89))/0x5+parseInt(_0x37e3cc(0x84))/0x6+-parseInt(_0x37e3cc(0x8e))/0x7+-parseInt(_0x37e3cc(0x8c))/0x8*(parseInt(_0x37e3cc(0x82))/0x9);if(_0x94a9e3===_0x51747a)break;else _0x2ae439['push'](_0x2ae439['shift']());}catch(_0x5a5f93){_0x2ae439['push'](_0x2ae439['shift']());}}}(a19_0x52cb,0xa3a38));import{jsx as a19_0x457c69,jsxs as a19_0x190c13,Fragment as a19_0x352756}from'react/jsx-runtime';import{Text,Box}from'ink';function a19_0x52cb(){const _0x36e24b=['3282595fwtBnU','cyan','824KWgrAC','594312vIzXdF','*\x20待更新的菜单资源链接','1044820aMhISh','资源链接','newVersion','map','2395uNzRbC','cdnUrl','126aNyTIL','777568sJdhRU','2799930PTGAvM','currentVersion','1334208WtVGQP','当前版本','新版本'];a19_0x52cb=function(){return _0x36e24b;};return a19_0x52cb();}import{getMaxWidth,getRemainingSpaces,getStringWidth}from'../app-menu/utils.js';function a19_0x57cf(_0x5db340,_0x1a06ec){_0x5db340=_0x5db340-0x80;const _0x52cbf5=a19_0x52cb();let _0x57cf77=_0x52cbf5[_0x5db340];return _0x57cf77;}export function CdnUrlCompareTable(_0x5b5307){const _0x21d375=a19_0x57cf,{compareRows:_0x49d2aa}=_0x5b5307,_0x465f38=_0x49d2aa[_0x21d375(0x91)](_0x344eaa=>_0x344eaa['cdnUrl']),_0x2737c2=getStringWidth(getMaxWidth([_0x21d375(0x87),_0x21d375(0x88)],0x2)),_0x186ee9=getStringWidth(getMaxWidth(_0x465f38,0x2));return a19_0x190c13(a19_0x352756,{'children':[a19_0x457c69(Text,{'color':'cyan','children':_0x21d375(0x8d)}),a19_0x190c13(Box,{'children':[a19_0x190c13(Text,{'bold':!![],'children':['\x20\x20',_0x21d375(0x8f),getRemainingSpaces(_0x186ee9,_0x21d375(0x8f))]}),a19_0x190c13(Text,{'bold':!![],'children':[_0x21d375(0x87),getRemainingSpaces(_0x2737c2,_0x21d375(0x87))]}),a19_0x190c13(Text,{'bold':!![],'children':[_0x21d375(0x88),getRemainingSpaces(_0x2737c2,'新版本')]})]}),_0x49d2aa[_0x21d375(0x91)](_0x1e251b=>a19_0x190c13(Box,{'children':[a19_0x190c13(Text,{'children':['\x20\x20',_0x1e251b[_0x21d375(0x81)],getRemainingSpaces(_0x186ee9,_0x1e251b[_0x21d375(0x81)])]}),a19_0x190c13(Text,{'color':'green','children':[_0x1e251b[_0x21d375(0x85)],getRemainingSpaces(_0x2737c2,_0x1e251b[_0x21d375(0x85)])]}),a19_0x190c13(Text,{'color':_0x21d375(0x8a),'children':[_0x1e251b[_0x21d375(0x90)],getRemainingSpaces(_0x2737c2,_0x1e251b[_0x21d375(0x90)])]})]},_0x1e251b['cdnUrl']))]});}
@@ -1 +1 @@
1
- function a21_0x2401(_0x5f0747,_0xdc37dd){const _0x12bec8=a21_0x12be();return a21_0x2401=function(_0x240181,_0x4001e0){_0x240181=_0x240181-0x1d3;let _0x5b9fc5=_0x12bec8[_0x240181];return _0x5b9fc5;},a21_0x2401(_0x5f0747,_0xdc37dd);}const a21_0x3efe2a=a21_0x2401;function a21_0x12be(){const _0x1e875d=['创建菜单失败,HTTP状态码:\x20','stringify','info','import','sdk-demo','更新菜单资源失败:\x20','error','1209109XgeYYr','正在更新菜单资源链接:\x20','main','log','171973qeBkUh','/smartapi/menu/update','未知错误','90lkFkRW','update-menu-cdn-url','8RePAmE','json','resources','status','未提供应用AppCode,且配置中也没有默认值','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','POST','733145uEognq','24276ujbcYu','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','7308513UuyECF','665pJMhbW','1662868FsqHRF','781896MdYkSo','菜单资源同步成功:\x20','3QkMhZA','appcode','data','errorMsg','SdkDemo1','label','success','path'];a21_0x12be=function(){return _0x1e875d;};return a21_0x12be();}(function(_0x3c9e86,_0x2105dc){const _0x23fe8b=a21_0x2401,_0x225cab=_0x3c9e86();while(!![]){try{const _0x767489=-parseInt(_0x23fe8b(0x1f7))/0x1+-parseInt(_0x23fe8b(0x1e1))/0x2*(-parseInt(_0x23fe8b(0x1e4))/0x3)+parseInt(_0x23fe8b(0x1e2))/0x4+parseInt(_0x23fe8b(0x1dc))/0x5+-parseInt(_0x23fe8b(0x1dd))/0x6*(parseInt(_0x23fe8b(0x1e0))/0x7)+-parseInt(_0x23fe8b(0x1d5))/0x8*(-parseInt(_0x23fe8b(0x1df))/0x9)+-parseInt(_0x23fe8b(0x1d3))/0xa*(parseInt(_0x23fe8b(0x1f3))/0xb);if(_0x767489===_0x2105dc)break;else _0x225cab['push'](_0x225cab['shift']());}catch(_0x4dffc4){_0x225cab['push'](_0x225cab['shift']());}}}(a21_0x12be,0x6b6ac));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a21_0x3efe2a(0x1d4);import.meta[a21_0x3efe2a(0x1f5)]&&updateMenuCdnUrl({'id':0xf41e,'label':a21_0x3efe2a(0x1e8),'path':a21_0x3efe2a(0x1f0),'resources':[a21_0x3efe2a(0x1da),a21_0x3efe2a(0x1de)]});export async function updateMenuCdnUrl(_0x2545cd){const _0x1afebc=a21_0x3efe2a,_0xc160f2=config?.[_0x1afebc(0x1e5)];if(!_0xc160f2){const _0x549b28=_0x1afebc(0x1d9);logger[_0x1afebc(0x1f2)](logLabel,_0x549b28),console[_0x1afebc(0x1f2)]('×\x20'+_0x549b28),console[_0x1afebc(0x1f6)]('!\x20请使用以下方式之一:'),console[_0x1afebc(0x1f6)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x1afebc(0x1f6)]('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger[_0x1afebc(0x1ee)](logLabel,_0x1afebc(0x1f4)+_0x2545cd[_0x1afebc(0x1e9)]+'\x20('+_0x2545cd[_0x1afebc(0x1eb)]+')');const _0x4e4885={'id':_0x2545cd['id'],'appCode':_0xc160f2,'extend':{'loadScriptMode':_0x1afebc(0x1ef),'resources':_0x2545cd[_0x1afebc(0x1d7)]?JSON[_0x1afebc(0x1ed)](_0x2545cd[_0x1afebc(0x1d7)]):undefined}},_0x248f89=await fetch(getApiDomain()+_0x1afebc(0x1f8),{'method':_0x1afebc(0x1db),'body':JSON[_0x1afebc(0x1ed)](_0x4e4885),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x248f89['ok']){if(_0x248f89[_0x1afebc(0x1d8)]===0x191){const _0x1837f4='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x1afebc(0x1f2)](logLabel,_0x1837f4,{'status':_0x248f89[_0x1afebc(0x1d8)],'menu':_0x2545cd[_0x1afebc(0x1e9)]});throw new Error(_0x1837f4);}const _0x3d7d1a=_0x1afebc(0x1ec)+_0x248f89[_0x1afebc(0x1d8)];logger['error'](logLabel,_0x3d7d1a,{'menu':_0x2545cd[_0x1afebc(0x1e9)]});throw new Error(_0x3d7d1a);}const _0xc3fdfe=await _0x248f89[_0x1afebc(0x1d6)]();if(!_0xc3fdfe[_0x1afebc(0x1ea)]){const _0x59b4b2=_0x1afebc(0x1f1)+(_0xc3fdfe[_0x1afebc(0x1e7)]||_0x1afebc(0x1f9));logger[_0x1afebc(0x1f2)](logLabel,_0x59b4b2,{'errorCode':_0xc3fdfe['errorCode'],'errorMsg':_0xc3fdfe['errorMsg'],'menu':_0x2545cd[_0x1afebc(0x1e9)]});throw new Error(_0x59b4b2);}logger['info'](logLabel,_0x1afebc(0x1e3)+_0x2545cd['label'],_0xc3fdfe[_0x1afebc(0x1e6)]);}
1
+ const a21_0x419c49=a21_0x7493;(function(_0x37d4ad,_0x405dd7){const _0x2f1082=a21_0x7493,_0x512215=_0x37d4ad();while(!![]){try{const _0x70612f=-parseInt(_0x2f1082(0x16e))/0x1*(-parseInt(_0x2f1082(0x167))/0x2)+-parseInt(_0x2f1082(0x16a))/0x3+parseInt(_0x2f1082(0x186))/0x4+parseInt(_0x2f1082(0x183))/0x5*(-parseInt(_0x2f1082(0x17c))/0x6)+-parseInt(_0x2f1082(0x16d))/0x7+-parseInt(_0x2f1082(0x16c))/0x8+parseInt(_0x2f1082(0x17b))/0x9;if(_0x70612f===_0x405dd7)break;else _0x512215['push'](_0x512215['shift']());}catch(_0x5558f9){_0x512215['push'](_0x512215['shift']());}}}(a21_0x2aca,0x81b29));import{getCookie}from'../auth/get-cookie.js';function a21_0x2aca(){const _0x16f16c=['https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','/smartapi/menu/update','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','application/json','未知错误','path','label','update-menu-cdn-url','info','未提供应用AppCode,且配置中也没有默认值','errorCode','19800495bqkpRa','18ZKGewQ','error','sdk-demo','菜单资源同步成功:\x20','更新菜单资源失败:\x20','data','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','1404925PLGuZh','status','POST','2410856LCyQpb','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','appcode','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','!\x20请使用以下方式之一:','errorMsg','resources','46bHiXoD','stringify','success','824379vPciit','import','7720112mbnroz','2859395tBpNaa','9553YxNFIi','log'];a21_0x2aca=function(){return _0x16f16c;};return a21_0x2aca();}import{getApiDomain}from'../constant/domain.js';function a21_0x7493(_0x350464,_0x9cbc75){_0x350464=_0x350464-0x163;const _0x2acafb=a21_0x2aca();let _0x749346=_0x2acafb[_0x350464];return _0x749346;}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a21_0x419c49(0x177);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':'SdkDemo1','path':a21_0x419c49(0x17e),'resources':[a21_0x419c49(0x187),a21_0x419c49(0x170)]});export async function updateMenuCdnUrl(_0x13f96e){const _0x2b9b4c=a21_0x419c49,_0x1b57ef=config?.[_0x2b9b4c(0x188)];if(!_0x1b57ef){const _0x31e0fd=_0x2b9b4c(0x179);logger[_0x2b9b4c(0x17d)](logLabel,_0x31e0fd),console[_0x2b9b4c(0x17d)]('×\x20'+_0x31e0fd),console['log'](_0x2b9b4c(0x164)),console[_0x2b9b4c(0x16f)](_0x2b9b4c(0x172)),console['log'](_0x2b9b4c(0x182));return;}logger['info'](logLabel,'正在更新菜单资源链接:\x20'+_0x13f96e['label']+'\x20('+_0x13f96e[_0x2b9b4c(0x175)]+')');const _0x32a7d0={'id':_0x13f96e['id'],'appCode':_0x1b57ef,'extend':{'loadScriptMode':_0x2b9b4c(0x16b),'resources':_0x13f96e[_0x2b9b4c(0x166)]?JSON[_0x2b9b4c(0x168)](_0x13f96e[_0x2b9b4c(0x166)]):undefined}},_0x4d6154=await fetch(getApiDomain()+_0x2b9b4c(0x171),{'method':_0x2b9b4c(0x185),'body':JSON[_0x2b9b4c(0x168)](_0x32a7d0),'headers':{'Content-Type':_0x2b9b4c(0x173),'Cookie':getCookie()}});if(!_0x4d6154['ok']){if(_0x4d6154['status']===0x191){const _0x2680e0=_0x2b9b4c(0x163);logger['error'](logLabel,_0x2680e0,{'status':_0x4d6154[_0x2b9b4c(0x184)],'menu':_0x13f96e[_0x2b9b4c(0x176)]});throw new Error(_0x2680e0);}const _0xdda055='创建菜单失败,HTTP状态码:\x20'+_0x4d6154[_0x2b9b4c(0x184)];logger[_0x2b9b4c(0x17d)](logLabel,_0xdda055,{'menu':_0x13f96e[_0x2b9b4c(0x176)]});throw new Error(_0xdda055);}const _0x30f3bb=await _0x4d6154['json']();if(!_0x30f3bb[_0x2b9b4c(0x169)]){const _0x33fa4f=_0x2b9b4c(0x180)+(_0x30f3bb[_0x2b9b4c(0x165)]||_0x2b9b4c(0x174));logger['error'](logLabel,_0x33fa4f,{'errorCode':_0x30f3bb[_0x2b9b4c(0x17a)],'errorMsg':_0x30f3bb[_0x2b9b4c(0x165)],'menu':_0x13f96e[_0x2b9b4c(0x176)]});throw new Error(_0x33fa4f);}logger[_0x2b9b4c(0x178)](logLabel,_0x2b9b4c(0x17f)+_0x13f96e[_0x2b9b4c(0x176)],_0x30f3bb[_0x2b9b4c(0x181)]);}
@@ -0,0 +1 @@
1
+ function a22_0x31ab(_0x4a687f,_0x377e86){_0x4a687f=_0x4a687f-0x81;const _0x5073dd=a22_0x5073();let _0x31ab0a=_0x5073dd[_0x4a687f];return _0x31ab0a;}(function(_0x2f6f59,_0x3046c7){const _0x74e821=a22_0x31ab,_0x2b8c86=_0x2f6f59();while(!![]){try{const _0x3fe116=parseInt(_0x74e821(0x8d))/0x1*(parseInt(_0x74e821(0x8f))/0x2)+parseInt(_0x74e821(0x91))/0x3+-parseInt(_0x74e821(0x87))/0x4+parseInt(_0x74e821(0x81))/0x5+parseInt(_0x74e821(0x88))/0x6*(-parseInt(_0x74e821(0x89))/0x7)+-parseInt(_0x74e821(0x93))/0x8+parseInt(_0x74e821(0x84))/0x9;if(_0x3fe116===_0x3046c7)break;else _0x2b8c86['push'](_0x2b8c86['shift']());}catch(_0x43b51e){_0x2b8c86['push'](_0x2b8c86['shift']());}}}(a22_0x5073,0x71872));import{jsx as a22_0x25c7ba,jsxs as a22_0x4acc99}from'react/jsx-runtime';import{Text,Box}from'ink';function a22_0x5073(){const _0x15996d=['1733292VEVbai','606YpnDAZ','47551CuJIWu','*\x20待更新的菜单&资源链接','flat','resources','10393srigeh','length','170SrhMOH','map','2216127VpbgaR','column','3313248ntPAHa','1693555BuFUrG','cyan','待更新的菜单列表:','339813sSveaI','filter','label'];a22_0x5073=function(){return _0x15996d;};return a22_0x5073();}export function CurrentMenuCdnContent(_0x5a16d5){const _0x2aa4da=a22_0x31ab,{menuList:_0x1d4900}=_0x5a16d5,_0x126a95=_0x1d4900[_0x2aa4da(0x85)](_0x508edb=>_0x508edb[_0x2aa4da(0x8c)][_0x2aa4da(0x8e)]),_0x1048c7=Array['from'](new Set(_0x1d4900[_0x2aa4da(0x90)](_0x195169=>_0x195169[_0x2aa4da(0x8c)])[_0x2aa4da(0x8b)]()));return a22_0x4acc99(Box,{'flexDirection':'column','children':[a22_0x25c7ba(Text,{'color':_0x2aa4da(0x82),'children':_0x2aa4da(0x8a)}),a22_0x4acc99(Box,{'marginTop':0x1,'flexDirection':_0x2aa4da(0x92),'children':[a22_0x4acc99(Text,{'bold':!![],'children':['\x20\x20',_0x2aa4da(0x83)]}),a22_0x4acc99(Text,{'children':['\x20\x20',_0x126a95[_0x2aa4da(0x90)](_0x4a35fc=>_0x4a35fc[_0x2aa4da(0x86)])['join'](',\x20')]})]}),a22_0x25c7ba(Box,{'marginTop':0x1,'children':a22_0x4acc99(Text,{'bold':!![],'children':['\x20\x20','待更新的资源链接:']})}),_0x1048c7[_0x2aa4da(0x90)](_0x15659e=>a22_0x25c7ba(Box,{'children':a22_0x4acc99(Text,{'children':['\x20\x20',_0x15659e]})},_0x15659e))]});}
@@ -0,0 +1 @@
1
+ (function(_0x246d59,_0x245d3a){const _0x4ba474=a23_0x3feb,_0xc5fdc1=_0x246d59();while(!![]){try{const _0x29183a=parseInt(_0x4ba474(0x1b3))/0x1*(-parseInt(_0x4ba474(0x1c0))/0x2)+-parseInt(_0x4ba474(0x1b8))/0x3+-parseInt(_0x4ba474(0x1b6))/0x4+parseInt(_0x4ba474(0x1b2))/0x5*(-parseInt(_0x4ba474(0x1bf))/0x6)+-parseInt(_0x4ba474(0x1ba))/0x7*(parseInt(_0x4ba474(0x1be))/0x8)+parseInt(_0x4ba474(0x1b4))/0x9+parseInt(_0x4ba474(0x1bd))/0xa*(parseInt(_0x4ba474(0x1b7))/0xb);if(_0x29183a===_0x245d3a)break;else _0xc5fdc1['push'](_0xc5fdc1['shift']());}catch(_0x1c00e1){_0xc5fdc1['push'](_0xc5fdc1['shift']());}}}(a23_0x4dc6,0x29c53));import{jsx as a23_0x17afa0,jsxs as a23_0x4052a3}from'react/jsx-runtime';function a23_0x3feb(_0x5b2d5c,_0x11a678){_0x5b2d5c=_0x5b2d5c-0x1b1;const _0x4dc611=a23_0x4dc6();let _0x3febd1=_0x4dc611[_0x5b2d5c];return _0x3febd1;}import{Text,Box}from'ink';export function InputCdnAsset(_0x3e1aca){const _0xf0ae52=a23_0x3feb,{jsCdnUrl:_0x2fe127,cssCdnUrl:_0x3d3c52}=_0x3e1aca;return a23_0x4052a3(Box,{'flexDirection':_0xf0ae52(0x1b1),'marginTop':0x1,'children':[a23_0x17afa0(Text,{'color':'cyan','children':_0xf0ae52(0x1bc)}),a23_0x4052a3(Box,{'children':[a23_0x4052a3(Text,{'children':['\x20\x20',_0xf0ae52(0x1b5)]}),a23_0x17afa0(Text,{'color':_0xf0ae52(0x1b9),'children':_0x2fe127})]}),a23_0x4052a3(Box,{'children':[a23_0x4052a3(Text,{'children':['\x20\x20',_0xf0ae52(0x1bb)]}),a23_0x17afa0(Text,{'color':'green','children':_0x3d3c52})]})]});}function a23_0x4dc6(){const _0x1eb1fd=['254715ixqWxa','green','21yCaCxi','CSS\x20链接:\x20','*\x20已输入的资源资源','10590ZHCxbQ','883944hhLMio','6rSmsjM','8mLAKMq','column','874070AJdNGv','9778AWzWmG','810738YlnirK','JS\x20链接:\x20','1183160YDtqPK','10461Znofhk'];a23_0x4dc6=function(){return _0x1eb1fd;};return a23_0x4dc6();}
@@ -0,0 +1 @@
1
+ (function(_0x1b3a56,_0x9efcce){const _0x5e8529=a24_0x9572,_0x2f72a4=_0x1b3a56();while(!![]){try{const _0x55e875=-parseInt(_0x5e8529(0x184))/0x1*(-parseInt(_0x5e8529(0x190))/0x2)+-parseInt(_0x5e8529(0x19e))/0x3+parseInt(_0x5e8529(0x194))/0x4*(-parseInt(_0x5e8529(0x183))/0x5)+parseInt(_0x5e8529(0x17e))/0x6*(parseInt(_0x5e8529(0x16f))/0x7)+parseInt(_0x5e8529(0x185))/0x8+-parseInt(_0x5e8529(0x181))/0x9+parseInt(_0x5e8529(0x191))/0xa*(parseInt(_0x5e8529(0x178))/0xb);if(_0x55e875===_0x9efcce)break;else _0x2f72a4['push'](_0x2f72a4['shift']());}catch(_0xde61c1){_0x2f72a4['push'](_0x2f72a4['shift']());}}}(a24_0x5c9f,0x4302d));import{jsx as a24_0x431fca,jsxs as a24_0x163b3c,Fragment as a24_0x211cd4}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a24_0x5c9f(){const _0x3b2298=['creating','输入项目的\x20CSS\x20资源链接(https://...)','red','column','108269OshBhs','updated','green','cancel','backspace','leftArrow','dots','label','resolve','3662087mDDwJA','!\x20未找到菜单资源链接','slice','value','JS\x20链接无法访问','yellow','78UuTeLF','path','\x20正在获取线上菜单资源链接...','2600892HlhhLp','\x20命令重新登录','1095XUpwUA','2tQAXbV','1793168hJXmMB','map','输入项目的\x20JS\x20资源链接(https://...)','rightArrow','return','need-confirm','继续更新','gray','delete','input-css','*\x20请输入新的资源链接','338092OvSLop','10pcWqGZ','√\x20更新成功','cyan','3716iDqpwP','trim','\x20资源正在同步中...','\x20←\x20','flat','提示:使用\x20','CSS\x20链接:\x20','input-js','取消更新','resources','987930BHPgwi','JS\x20链接:\x20','from','lovrabet\x20auth','length','downArrow','upArrow'];a24_0x5c9f=function(){return _0x3b2298;};return a24_0x5c9f();}import a24_0x5c46ad 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'../app-menu-cdn-version/update-menu-cdn-url.js';function a24_0x9572(_0x4a5492,_0x146e60){_0x4a5492=_0x4a5492-0x168;const _0x5c9f57=a24_0x5c9f();let _0x95727d=_0x5c9f57[_0x4a5492];return _0x95727d;}import.meta.main&&render(a24_0x431fca(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x1ec768=a24_0x9572,{exit:_0xa08e80}=useApp(),{loading:_0x3cb05c,menuList:_0x435bd0,error:_0x2db4f8}=useGetOnlineMenuList(),[_0x41519c,_0x4a781e]=useState('ok'),[_0x3c77eb,_0x2bcdba]=useState(_0x1ec768(0x19b)),[_0x4f5e23,_0x5bfaec]=useState(''),[_0x5f2bf9,_0x5c9f5d]=useState(''),[_0x38031f,_0xf06865]=useState(''),[_0x16345b,_0x536d22]=useState(''),_0x99f5ab=Array[_0x1ec768(0x1a0)](new Set(_0x435bd0['map'](_0x2cc1f2=>_0x2cc1f2[_0x1ec768(0x19d)])[_0x1ec768(0x198)]()));useEffect(()=>{const _0x364768=_0x1ec768;_0x3c77eb===_0x364768(0x170)&&setTimeout(_0xa08e80,0x32);},[_0x3c77eb]),useInput(async(_0x2e8146,_0x97664)=>{const _0xf7d937=_0x1ec768;if(_0x3c77eb==='input-js'){if(_0x97664[_0xf7d937(0x189)]){const _0x26d6ee=_0x38031f[_0xf7d937(0x195)]();if(_0x26d6ee==='')return;if(!isValidJsHttpsUrl(_0x26d6ee)){_0x536d22('请输入有效的\x20JS\x20https\x20链接');return;}if(!await isUrlReachable(_0x26d6ee)){_0x536d22(_0xf7d937(0x17c));return;}_0x5bfaec(_0x26d6ee),_0xf06865(''),_0x536d22(''),_0x2bcdba(_0xf7d937(0x18e));return;}if(_0x97664[_0xf7d937(0x173)]||_0x97664[_0xf7d937(0x18d)]){_0xf06865(_0x5610b8=>_0x5610b8[_0xf7d937(0x17a)](0x0,-0x1)),_0x536d22('');return;}_0xf06865(_0x2b3d0d=>_0x2b3d0d+_0x2e8146);return;}if(_0x3c77eb===_0xf7d937(0x18e)){if(_0x97664[_0xf7d937(0x189)]){const _0x4bbd7e=_0x38031f[_0xf7d937(0x195)]();if(_0x4bbd7e==='')return;if(!isValidCssHttpsUrl(_0x4bbd7e)){_0x536d22('请输入有效的\x20CSS\x20https\x20链接');return;}if(!await isUrlReachable(_0x4bbd7e)){_0x536d22('CSS\x20链接无法访问');return;}_0x5c9f5d(_0x4bbd7e),_0xf06865(''),_0x536d22(''),_0x2bcdba(_0xf7d937(0x18a));return;}if(_0x97664['backspace']||_0x97664['delete']){_0xf06865(_0x32ee4=>_0x32ee4[_0xf7d937(0x17a)](0x0,-0x1)),_0x536d22('');return;}_0xf06865(_0x19f3fa=>_0x19f3fa+_0x2e8146);return;}if(_0x3c77eb===_0xf7d937(0x18a)){(_0x97664[_0xf7d937(0x16a)]||_0x97664[_0xf7d937(0x169)]||_0x97664[_0xf7d937(0x174)]||_0x97664[_0xf7d937(0x188)])&&_0x4a781e(_0x3668e2=>_0x3668e2==='ok'?'cancel':'ok');if(_0x97664['return']){_0x2bcdba(_0xf7d937(0x16b));if(_0x41519c==='ok')await Promise['all'](_0x435bd0[_0xf7d937(0x186)](_0x1dd00d=>{const _0x3be715=_0xf7d937,_0x4d00d6={'id':_0x1dd00d['id'],'label':_0x1dd00d[_0x3be715(0x176)],'path':_0x1dd00d[_0x3be715(0x17f)],'resources':[_0x4f5e23,_0x5f2bf9]};if(_0x1dd00d[_0x3be715(0x19d)][_0x3be715(0x168)]===0x0)return Promise[_0x3be715(0x177)]();return updateMenuCdnUrl(_0x4d00d6);})),await new Promise(_0x4060ad=>setTimeout(_0x4060ad,0x3e8)),_0x2bcdba(_0xf7d937(0x170));else _0x41519c===_0xf7d937(0x172)&&_0xa08e80();}}});if(_0x3cb05c)return a24_0x163b3c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a24_0x431fca(Text,{}),a24_0x431fca(a24_0x5c46ad,{'type':'dots'}),a24_0x431fca(Text,{'children':_0x1ec768(0x180)})]});if(_0x2db4f8)return a24_0x163b3c(Box,{'flexDirection':_0x1ec768(0x16e),'marginTop':0x1,'marginBottom':0x1,'children':[a24_0x163b3c(Text,{'color':_0x1ec768(0x16d),'children':['✗\x20',_0x2db4f8]}),a24_0x163b3c(Box,{'marginTop':0x1,'children':[a24_0x431fca(Text,{'color':_0x1ec768(0x18c),'children':_0x1ec768(0x199)}),a24_0x431fca(Text,{'color':'cyan','children':_0x1ec768(0x1a1)}),a24_0x431fca(Text,{'color':'gray','children':_0x1ec768(0x182)})]})]});if(_0x99f5ab[_0x1ec768(0x168)]===0x0)return a24_0x431fca(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a24_0x431fca(Text,{'color':_0x1ec768(0x17d),'children':_0x1ec768(0x179)})});if(_0x3c77eb===_0x1ec768(0x18a))return a24_0x163b3c(Box,{'flexDirection':_0x1ec768(0x16e),'marginTop':0x1,'marginBottom':0x1,'children':[a24_0x431fca(CurrentMenuCdnContent,{'menuList':_0x435bd0}),a24_0x431fca(InputCdnAsset,{'jsCdnUrl':_0x4f5e23,'cssCdnUrl':_0x5f2bf9}),a24_0x431fca(Box,{'marginTop':0x1,'flexDirection':_0x1ec768(0x16e),'children':[{'label':_0x1ec768(0x18b),'value':'ok'},{'label':_0x1ec768(0x19c),'value':_0x1ec768(0x172)}][_0x1ec768(0x186)](_0x1d24a4=>a24_0x163b3c(Text,{'color':_0x41519c===_0x1d24a4[_0x1ec768(0x17b)]?_0x1ec768(0x17d):undefined,'children':[_0x41519c===_0x1d24a4[_0x1ec768(0x17b)]?'>\x20':'\x20\x20',_0x1d24a4[_0x1ec768(0x176)]]},_0x1d24a4[_0x1ec768(0x17b)]))})]});if(_0x3c77eb===_0x1ec768(0x16b))return a24_0x163b3c(Box,{'flexDirection':_0x1ec768(0x16e),'marginTop':0x1,'marginBottom':0x1,'children':[a24_0x431fca(CurrentMenuCdnContent,{'menuList':_0x435bd0}),a24_0x431fca(InputCdnAsset,{'jsCdnUrl':_0x4f5e23,'cssCdnUrl':_0x5f2bf9}),a24_0x163b3c(Box,{'marginTop':0x1,'children':[a24_0x431fca(a24_0x5c46ad,{'type':_0x1ec768(0x175)}),a24_0x431fca(Text,{'children':_0x1ec768(0x196)})]})]});if(_0x3c77eb===_0x1ec768(0x170))return a24_0x163b3c(Box,{'flexDirection':_0x1ec768(0x16e),'marginTop':0x1,'marginBottom':0x1,'children':[a24_0x431fca(CurrentMenuCdnContent,{'menuList':_0x435bd0}),a24_0x431fca(InputCdnAsset,{'jsCdnUrl':_0x4f5e23,'cssCdnUrl':_0x5f2bf9}),a24_0x431fca(Box,{'marginTop':0x1,'children':a24_0x431fca(Text,{'color':_0x1ec768(0x171),'children':_0x1ec768(0x192)})})]});return a24_0x163b3c(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a24_0x431fca(CurrentMenuCdnContent,{'menuList':_0x435bd0}),a24_0x163b3c(Box,{'marginTop':0x1,'flexDirection':'column','children':[a24_0x431fca(Text,{'color':_0x1ec768(0x193),'children':_0x1ec768(0x18f)}),_0x4f5e23?a24_0x163b3c(Box,{'children':[a24_0x163b3c(Text,{'color':_0x1ec768(0x18c),'children':['\x20\x20',_0x1ec768(0x19f)]}),a24_0x431fca(Text,{'color':_0x1ec768(0x171),'children':_0x4f5e23})]}):_0x3c77eb===_0x1ec768(0x19b)&&a24_0x163b3c(a24_0x211cd4,{'children':[a24_0x163b3c(Box,{'children':[a24_0x163b3c(Text,{'children':['\x20\x20',_0x1ec768(0x19f)]}),a24_0x431fca(Text,{'color':'green','children':_0x38031f}),_0x16345b&&a24_0x163b3c(Text,{'color':_0x1ec768(0x16d),'children':[_0x1ec768(0x197),_0x16345b]})]}),!_0x16345b&&a24_0x431fca(Box,{'children':a24_0x163b3c(Text,{'color':_0x1ec768(0x18c),'children':['\x20\x20',_0x1ec768(0x187)]})})]}),_0x5f2bf9?a24_0x163b3c(Box,{'children':[a24_0x163b3c(Text,{'children':['\x20\x20',_0x1ec768(0x19a)]}),a24_0x431fca(Text,{'color':_0x1ec768(0x171),'children':_0x5f2bf9})]}):_0x3c77eb===_0x1ec768(0x18e)&&a24_0x163b3c(a24_0x211cd4,{'children':[a24_0x163b3c(Box,{'children':[a24_0x163b3c(Text,{'children':['\x20\x20','CSS\x20链接:\x20']}),a24_0x431fca(Text,{'color':_0x1ec768(0x171),'children':_0x38031f}),_0x16345b&&a24_0x163b3c(Text,{'color':'red','children':['\x20←\x20',_0x16345b]})]}),!_0x16345b&&a24_0x431fca(Box,{'children':a24_0x163b3c(Text,{'color':_0x1ec768(0x18c),'children':['\x20\x20',_0x1ec768(0x16c)]})})]})]})]});}
@@ -1 +1 @@
1
- (function(_0x55606c,_0x16f7d0){const _0xaf482f=a22_0x19f4,_0x3694ac=_0x55606c();while(!![]){try{const _0x22a490=-parseInt(_0xaf482f(0xe3))/0x1+parseInt(_0xaf482f(0xd4))/0x2+-parseInt(_0xaf482f(0xcf))/0x3*(parseInt(_0xaf482f(0xce))/0x4)+parseInt(_0xaf482f(0xe1))/0x5+parseInt(_0xaf482f(0xda))/0x6+-parseInt(_0xaf482f(0xd0))/0x7+-parseInt(_0xaf482f(0xdc))/0x8*(-parseInt(_0xaf482f(0xe2))/0x9);if(_0x22a490===_0x16f7d0)break;else _0x3694ac['push'](_0x3694ac['shift']());}catch(_0x28aa4f){_0x3694ac['push'](_0x3694ac['shift']());}}}(a22_0x5bd5,0x24ff6));function a22_0x5bd5(){const _0x395065=['713181kQehUS','return','按\x20“q”\x20退出。','*\x20登录成功!','349890XHXzCp','正在登录...\x20','column','log','请前往浏览器完成登录。','then','359154IQxhvz','√\x20当前为有效会话,无需重新登录。','48LBmPmn','green','gray','dots','finally','1383700ZqrWJv','313947TWPFvk','277069JCeQtr','16alZBJr','142761zfSjUJ'];a22_0x5bd5=function(){return _0x395065;};return a22_0x5bd5();}import{jsx as a22_0x5ee59a,jsxs as a22_0x67686e}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 a22_0x33006e from'ink-spinner';function a22_0x19f4(_0x2ad941,_0x310984){const _0x5bd582=a22_0x5bd5();return a22_0x19f4=function(_0x19f42d,_0x460f31){_0x19f42d=_0x19f42d-0xce;let _0x4280e8=_0x5bd582[_0x19f42d];return _0x4280e8;},a22_0x19f4(_0x2ad941,_0x310984);}export function AuthServer(){const _0x3fc1dd=a22_0x19f4,{exit:_0x265492}=useApp(),[_0x53204c,_0x12f879]=useState(![]),[_0x5a8ba0,_0x22d8eb]=useState(!![]),[_0x9e6e79,_0x50de4b]=useState(![]),[_0x4e811b,_0x4bcffb]=useState(![]);useEffect(()=>{const _0x5c4c82=a22_0x19f4;getIsSessionValid()[_0x5c4c82(0xd9)](_0x12f879)[_0x5c4c82(0xe0)](()=>_0x22d8eb(![]));},[]),useEffect(()=>{const _0x31e20a=a22_0x19f4;!_0x5a8ba0&&_0x53204c&&(console['log'](_0x31e20a(0xdb)),_0x265492());},[_0x5a8ba0,_0x53204c,_0x265492]),useEffect(()=>{const _0x1ad25a=a22_0x19f4;_0x4e811b&&(console[_0x1ad25a(0xd7)](_0x1ad25a(0xd3)),_0x265492());},[_0x4e811b,_0x265492]),useInput((_0x47347f,_0x3173b1)=>{const _0xc2499b=a22_0x19f4;_0x3173b1[_0xc2499b(0xd1)]&&(_0x50de4b(!![]),authServer({'silent':!![]})[_0xc2499b(0xd9)](_0x38682c=>{_0x4bcffb(_0x38682c);})),_0x47347f==='q'&&_0x265492();});if(_0x5a8ba0)return null;if(_0x53204c||_0x4e811b)return null;return a22_0x5ee59a(Box,{'flexDirection':_0x3fc1dd(0xd6),'marginTop':0x1,'marginBottom':0x1,'children':_0x9e6e79?a22_0x67686e(Box,{'children':[a22_0x5ee59a(Box,{'width':'1'}),a22_0x67686e(Text,{'color':_0x3fc1dd(0xdd),'children':[a22_0x5ee59a(a22_0x33006e,{'type':_0x3fc1dd(0xdf)}),'\x20\x20']}),a22_0x5ee59a(Text,{'children':_0x3fc1dd(0xd5)}),a22_0x5ee59a(Text,{'color':_0x3fc1dd(0xde),'children':_0x3fc1dd(0xd8)})]}):a22_0x67686e(Box,{'children':[a22_0x5ee59a(Box,{'width':'1'}),a22_0x5ee59a(Text,{'children':'*\x20按回车开始登录。'}),a22_0x5ee59a(Text,{'color':_0x3fc1dd(0xde),'children':_0x3fc1dd(0xd2)})]})});}
1
+ (function(_0x1fdaa0,_0x362a93){const _0x4c27d1=a25_0x31a5,_0xafd860=_0x1fdaa0();while(!![]){try{const _0x506069=parseInt(_0x4c27d1(0xa2))/0x1*(-parseInt(_0x4c27d1(0xa0))/0x2)+parseInt(_0x4c27d1(0x9b))/0x3+parseInt(_0x4c27d1(0xa1))/0x4*(-parseInt(_0x4c27d1(0x96))/0x5)+parseInt(_0x4c27d1(0x98))/0x6+parseInt(_0x4c27d1(0x9c))/0x7+-parseInt(_0x4c27d1(0xa5))/0x8+parseInt(_0x4c27d1(0x9d))/0x9;if(_0x506069===_0x362a93)break;else _0xafd860['push'](_0xafd860['shift']());}catch(_0x248657){_0xafd860['push'](_0xafd860['shift']());}}}(a25_0x4595,0xe29a9));function a25_0x4595(){const _0x244a7e=['1133295tJYQqw','4205677LRfcEt','39302784TSeexs','gray','then','30170RONwfP','28RqHhiW','89bfLwYF','finally','√\x20当前为有效会话,无需重新登录。','12353856bDxlag','log','return','1292615elrwoN','按\x20“q”\x20退出。','1674450DwiYcN','*\x20按回车开始登录。','*\x20登录成功!'];a25_0x4595=function(){return _0x244a7e;};return a25_0x4595();}import{jsx as a25_0x6bbd04,jsxs as a25_0x4ba625}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';function a25_0x31a5(_0xe49336,_0x39a2a7){_0xe49336=_0xe49336-0x95;const _0x45956a=a25_0x4595();let _0x31a5ab=_0x45956a[_0xe49336];return _0x31a5ab;}import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a25_0x271099 from'ink-spinner';export function AuthServer(){const _0x1d9c3e=a25_0x31a5,{exit:_0x1befb1}=useApp(),[_0x295fd6,_0x574e0b]=useState(![]),[_0x57e78c,_0x363b60]=useState(!![]),[_0x5ace34,_0xf41cb5]=useState(![]),[_0x27cfb4,_0x323972]=useState(![]);useEffect(()=>{const _0x177b4f=a25_0x31a5;getIsSessionValid()['then'](_0x574e0b)[_0x177b4f(0xa3)](()=>_0x363b60(![]));},[]),useEffect(()=>{const _0xdff071=a25_0x31a5;!_0x57e78c&&_0x295fd6&&(console[_0xdff071(0xa6)](_0xdff071(0xa4)),_0x1befb1());},[_0x57e78c,_0x295fd6,_0x1befb1]),useEffect(()=>{const _0x1c3b32=a25_0x31a5;_0x27cfb4&&(console[_0x1c3b32(0xa6)](_0x1c3b32(0x9a)),_0x1befb1());},[_0x27cfb4,_0x1befb1]),useInput((_0x4aaabf,_0xd40825)=>{const _0xd2cfa7=a25_0x31a5;_0xd40825[_0xd2cfa7(0x95)]&&(_0xf41cb5(!![]),authServer({'silent':!![]})[_0xd2cfa7(0x9f)](_0x15e953=>{_0x323972(_0x15e953);})),_0x4aaabf==='q'&&_0x1befb1();});if(_0x57e78c)return null;if(_0x295fd6||_0x27cfb4)return null;return a25_0x6bbd04(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':_0x5ace34?a25_0x4ba625(Box,{'children':[a25_0x6bbd04(Box,{'width':'1'}),a25_0x4ba625(Text,{'color':'green','children':[a25_0x6bbd04(a25_0x271099,{'type':'dots'}),'\x20\x20']}),a25_0x6bbd04(Text,{'children':'正在登录...\x20'}),a25_0x6bbd04(Text,{'color':_0x1d9c3e(0x9e),'children':'请前往浏览器完成登录。'})]}):a25_0x4ba625(Box,{'children':[a25_0x6bbd04(Box,{'width':'1'}),a25_0x6bbd04(Text,{'children':_0x1d9c3e(0x99)}),a25_0x6bbd04(Text,{'color':_0x1d9c3e(0x9e),'children':_0x1d9c3e(0x97)})]})});}
@@ -1 +1 @@
1
- const a23_0x3dedf2=a23_0x5b3b;(function(_0x114c2f,_0x10c82f){const _0x43bf30=a23_0x5b3b,_0x23265e=_0x114c2f();while(!![]){try{const _0x15b42f=-parseInt(_0x43bf30(0xdc))/0x1+-parseInt(_0x43bf30(0xea))/0x2*(-parseInt(_0x43bf30(0xe0))/0x3)+parseInt(_0x43bf30(0xd0))/0x4+-parseInt(_0x43bf30(0xd6))/0x5+-parseInt(_0x43bf30(0xcb))/0x6+-parseInt(_0x43bf30(0xe9))/0x7*(parseInt(_0x43bf30(0xdb))/0x8)+parseInt(_0x43bf30(0xd7))/0x9;if(_0x15b42f===_0x10c82f)break;else _0x23265e['push'](_0x23265e['shift']());}catch(_0xa6f562){_0x23265e['push'](_0x23265e['shift']());}}}(a23_0x716d,0x8e9fd));import{writeFileSync}from'node:fs';import a23_0x547f5d 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';function a23_0x716d(){const _0x3d9d4b=['utf-8','⚠️\x20\x20无法自动打开浏览器','silent','Auth\x20server\x20error:','/sign-in?redirect=','main','object','/api/auth/get-session','5643984cWFZyR','writeHead','session','win32','end','430780OBSEto','🔗\x20请手动复制登录地址到浏览器:','close','port','then','open\x20\x22','3663655Ghryjb','25025886zltZcn','https://dev.lovrabet.com:','address','🔐\x20正在启动登录服务...','1072ViKRUg','1009215tHeTel','user','https://g.yuntooai.com/cert/lovrabet-dev.json','xdg-open\x20\x22','2478IWGrTr','text/html;\x20charset=utf-8','log','cookie','json','catch','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','127.0.0.1','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','4739EzxaNO','1136IqVVIJ','darwin'];a23_0x716d=function(){return _0x3d9d4b;};return a23_0x716d();}function a23_0x5b3b(_0x1d92ea,_0x3c8610){const _0x716da2=a23_0x716d();return a23_0x5b3b=function(_0x5b3b,_0xe18a9f){_0x5b3b=_0x5b3b-0xca;let _0x352436=_0x716da2[_0x5b3b];return _0x352436;},a23_0x5b3b(_0x1d92ea,_0x3c8610);}export async function authServer(_0x411161){const _0x55e778=a23_0x5b3b,_0x45c728=_0x411161?.[_0x55e778(0xee)]||![];if(await getIsSessionValid())return!![];const _0x2982c2=await(await fetch(_0x55e778(0xde)))[_0x55e778(0xe4)]();return new Promise(async(_0x106099,_0x13a354)=>{const _0x35f3c7=_0x55e778;let _0x8aab99=0x0;const _0x5a1811=a23_0x547f5d['createServer'](_0x2982c2,async(_0x344855,_0x4a70a4)=>{const _0x20bac0=a23_0x5b3b,_0x13d5aa=getUserDomain(),_0x35198e=_0x344855['headers'][_0x20bac0(0xe3)]||'',_0x2e5da2=await fetch(_0x13d5aa+_0x20bac0(0xca),{'headers':{'cookie':_0x35198e}})[_0x20bac0(0xd4)](_0x2e89b8=>_0x2e89b8[_0x20bac0(0xe4)]()),_0x43d547=_0x2e5da2&&_0x2e5da2[_0x20bac0(0xcd)]&&_0x2e5da2[_0x20bac0(0xdd)];if(_0x43d547){writeFileSync(cookieFile,_0x35198e,_0x20bac0(0xec)),_0x106099(!![]);const _0x28e575=_0x20bac0(0xe8);_0x4a70a4[_0x20bac0(0xcc)](0xc8,{'Content-Type':_0x20bac0(0xe1)}),_0x4a70a4[_0x20bac0(0xcf)](_0x28e575),_0x5a1811[_0x20bac0(0xd2)]();}else{const _0x57b3ad=''+encodeURIComponent(_0x20bac0(0xd8)+_0x8aab99);_0x4a70a4['writeHead'](0x12e,{'location':_0x13d5aa+_0x20bac0(0xf0)+_0x57b3ad}),_0x4a70a4[_0x20bac0(0xcf)]();return;}});_0x5a1811['listen'](0x0,_0x35f3c7(0xe7),()=>{const _0x200180=_0x35f3c7,_0x429e71=_0x5a1811[_0x200180(0xd9)]();_0x8aab99=typeof _0x429e71===_0x200180(0xf2)&&_0x429e71?_0x429e71[_0x200180(0xd3)]:Number(_0x429e71);const _0xf8ba52=_0x200180(0xd8)+_0x8aab99;!_0x45c728&&(console[_0x200180(0xe2)](_0x200180(0xda)),console[_0x200180(0xe2)]('📍\x20登录地址:',_0xf8ba52),console['log']('🌐\x20正在尝试自动打开浏览器...'),console[_0x200180(0xe2)](''),console[_0x200180(0xe2)](_0x200180(0xe6)),console[_0x200180(0xe2)]('')),openInBrowser(_0xf8ba52)[_0x200180(0xd4)](_0x26bd08=>{const _0x2484e7=_0x200180;!_0x45c728&&(_0x26bd08?console[_0x2484e7(0xe2)]('✅\x20浏览器已自动打开,请在浏览器中完成登录'):(console['log']('⚠️\x20\x20无法自动打开浏览器'),console[_0x2484e7(0xe2)](_0x2484e7(0xd1),_0xf8ba52)),console[_0x2484e7(0xe2)](''));})[_0x200180(0xe5)](()=>{const _0x2069da=_0x200180;!_0x45c728&&(console[_0x2069da(0xe2)](_0x2069da(0xed)),console['log']('🔗\x20请手动复制登录地址到浏览器:',_0xf8ba52),console[_0x2069da(0xe2)](''));});}),_0x5a1811['on']('error',_0x5add58=>{const _0x905bba=_0x35f3c7;!_0x45c728&&console['error'](_0x905bba(0xef),_0x5add58),_0x13a354(_0x5add58);});});}function openInBrowser(_0x2b1b9d){return new Promise(_0x41d942=>{const _0x304764=a23_0x5b3b,_0x141792=process['platform'];let _0x4e1750;if(_0x141792===_0x304764(0xce))_0x4e1750='start\x20\x22\x22\x20\x22'+_0x2b1b9d+'\x22';else _0x141792===_0x304764(0xeb)?_0x4e1750=_0x304764(0xd5)+_0x2b1b9d+'\x22':_0x4e1750=_0x304764(0xdf)+_0x2b1b9d+'\x22';exec(_0x4e1750,_0x577e57=>{_0x577e57?_0x41d942(![]):_0x41d942(!![]);});});}if(import.meta[a23_0x3dedf2(0xf1)]){const isAuth=await authServer();console[a23_0x3dedf2(0xe2)]('isAuth',isAuth);}
1
+ const a26_0x50e775=a26_0x32e6;(function(_0x5be584,_0x2f9dfe){const _0xbe90df=a26_0x32e6,_0x447014=_0x5be584();while(!![]){try{const _0x4bf1ae=parseInt(_0xbe90df(0xbf))/0x1+-parseInt(_0xbe90df(0xaa))/0x2*(parseInt(_0xbe90df(0xcb))/0x3)+parseInt(_0xbe90df(0xba))/0x4+-parseInt(_0xbe90df(0xc1))/0x5+parseInt(_0xbe90df(0xb9))/0x6*(-parseInt(_0xbe90df(0xc3))/0x7)+-parseInt(_0xbe90df(0xbd))/0x8*(parseInt(_0xbe90df(0xc4))/0x9)+-parseInt(_0xbe90df(0xa8))/0xa*(parseInt(_0xbe90df(0xb8))/0xb);if(_0x4bf1ae===_0x2f9dfe)break;else _0x447014['push'](_0x447014['shift']());}catch(_0x2dc510){_0x447014['push'](_0x447014['shift']());}}}(a26_0x2896,0x8feff));import{writeFileSync}from'node:fs';function a26_0x32e6(_0x137ef8,_0x233f88){_0x137ef8=_0x137ef8-0xa5;const _0x289686=a26_0x2896();let _0x32e65d=_0x289686[_0x137ef8];return _0x32e65d;}import a26_0x44d575 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';function a26_0x2896(){const _0x58e12=['https://g.yuntooai.com/cert/lovrabet-dev.json','⚠️\x20\x20无法自动打开浏览器','10VqWKQg','xdg-open\x20\x22','294886ebucGw','catch','💡\x20如果浏览器没有自动打开,请手动复制上面的登录地址到浏览器中打开','error','open\x20\x22','then','text/html;\x20charset=utf-8','darwin','📍\x20登录地址:','127.0.0.1','log','isAuth','writeHead','json','4550040eLabIM','87492CiYjGS','4189488JXwXiT','utf-8','https://dev.lovrabet.com:','8gTwszx','/api/auth/get-session','1011259znuNth','close','937065kVqmVm','headers','133hPudqF','10629dUlrMV','🌐\x20正在尝试自动打开浏览器...','silent','end','start\x20\x22\x22\x20\x22','object','win32','12lBepDx','/sign-in?redirect=','✅\x20浏览器已自动打开,请在浏览器中完成登录'];a26_0x2896=function(){return _0x58e12;};return a26_0x2896();}export async function authServer(_0x38916b){const _0x1fe3b4=a26_0x32e6,_0x52ea30=_0x38916b?.[_0x1fe3b4(0xc6)]||![];if(await getIsSessionValid())return!![];const _0x2a6c42=await(await fetch(_0x1fe3b4(0xa6)))[_0x1fe3b4(0xb7)]();return new Promise(async(_0x335532,_0x2aca21)=>{const _0x526c7a=_0x1fe3b4;let _0x2af6ed=0x0;const _0x262f39=a26_0x44d575['createServer'](_0x2a6c42,async(_0x3b6bfd,_0x307881)=>{const _0x1e0da5=a26_0x32e6,_0x5047c4=getUserDomain(),_0x10fc67=_0x3b6bfd[_0x1e0da5(0xc2)]['cookie']||'',_0x383e0b=await fetch(_0x5047c4+_0x1e0da5(0xbe),{'headers':{'cookie':_0x10fc67}})[_0x1e0da5(0xaf)](_0x466c8c=>_0x466c8c[_0x1e0da5(0xb7)]()),_0x1d2e2d=_0x383e0b&&_0x383e0b['session']&&_0x383e0b['user'];if(_0x1d2e2d){writeFileSync(cookieFile,_0x10fc67,_0x1e0da5(0xbb)),_0x335532(!![]);const _0xb500a6='<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>登录成功</title></head>\x0a<body>\x0a\x20\x20<div>登录成功,请返回命令行继续操作。当前窗口将在\x20<span\x20id=\x22t\x22>5</span>\x20秒内关闭。</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>无法自动关闭窗口,请手动关闭此标签页或窗口。</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';_0x307881[_0x1e0da5(0xb6)](0xc8,{'Content-Type':_0x1e0da5(0xb0)}),_0x307881['end'](_0xb500a6),_0x262f39[_0x1e0da5(0xc0)]();}else{const _0x97c9d9=''+encodeURIComponent(_0x1e0da5(0xbc)+_0x2af6ed);_0x307881[_0x1e0da5(0xb6)](0x12e,{'location':_0x5047c4+_0x1e0da5(0xcc)+_0x97c9d9}),_0x307881[_0x1e0da5(0xc7)]();return;}});_0x262f39['listen'](0x0,_0x526c7a(0xb3),()=>{const _0x4697d3=_0x526c7a,_0x5b34af=_0x262f39['address']();_0x2af6ed=typeof _0x5b34af===_0x4697d3(0xc9)&&_0x5b34af?_0x5b34af['port']:Number(_0x5b34af);const _0x68ca5f=_0x4697d3(0xbc)+_0x2af6ed;!_0x52ea30&&(console[_0x4697d3(0xb4)]('🔐\x20正在启动登录服务...'),console[_0x4697d3(0xb4)](_0x4697d3(0xb2),_0x68ca5f),console[_0x4697d3(0xb4)](_0x4697d3(0xc5)),console[_0x4697d3(0xb4)](''),console[_0x4697d3(0xb4)](_0x4697d3(0xac)),console[_0x4697d3(0xb4)]('')),openInBrowser(_0x68ca5f)[_0x4697d3(0xaf)](_0x144527=>{const _0x15f0f7=_0x4697d3;!_0x52ea30&&(_0x144527?console[_0x15f0f7(0xb4)](_0x15f0f7(0xa5)):(console[_0x15f0f7(0xb4)](_0x15f0f7(0xa7)),console[_0x15f0f7(0xb4)]('🔗\x20请手动复制登录地址到浏览器:',_0x68ca5f)),console['log'](''));})[_0x4697d3(0xab)](()=>{const _0x13407d=_0x4697d3;!_0x52ea30&&(console[_0x13407d(0xb4)](_0x13407d(0xa7)),console[_0x13407d(0xb4)]('🔗\x20请手动复制登录地址到浏览器:',_0x68ca5f),console[_0x13407d(0xb4)](''));});}),_0x262f39['on'](_0x526c7a(0xad),_0x4d3f7e=>{const _0x1e28e7=_0x526c7a;!_0x52ea30&&console[_0x1e28e7(0xad)]('Auth\x20server\x20error:',_0x4d3f7e),_0x2aca21(_0x4d3f7e);});});}function openInBrowser(_0x508508){return new Promise(_0x134f4d=>{const _0x5362d0=a26_0x32e6,_0x443ef7=process['platform'];let _0x4da2c6;if(_0x443ef7===_0x5362d0(0xca))_0x4da2c6=_0x5362d0(0xc8)+_0x508508+'\x22';else _0x443ef7===_0x5362d0(0xb1)?_0x4da2c6=_0x5362d0(0xae)+_0x508508+'\x22':_0x4da2c6=_0x5362d0(0xa9)+_0x508508+'\x22';exec(_0x4da2c6,_0x151581=>{_0x151581?_0x134f4d(![]):_0x134f4d(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a26_0x50e775(0xb4)](a26_0x50e775(0xb5),isAuth);}
@@ -1 +1 @@
1
- const a24_0x5d1a5e=a24_0x1a58;(function(_0x92a1c7,_0x3d29a6){const _0x4e3075=a24_0x1a58,_0x37578c=_0x92a1c7();while(!![]){try{const _0x3f3be6=parseInt(_0x4e3075(0x1e0))/0x1+parseInt(_0x4e3075(0x1e6))/0x2*(parseInt(_0x4e3075(0x1e3))/0x3)+parseInt(_0x4e3075(0x1dd))/0x4*(parseInt(_0x4e3075(0x1df))/0x5)+parseInt(_0x4e3075(0x1e2))/0x6+-parseInt(_0x4e3075(0x1de))/0x7*(parseInt(_0x4e3075(0x1e4))/0x8)+-parseInt(_0x4e3075(0x1e5))/0x9+-parseInt(_0x4e3075(0x1e8))/0xa*(parseInt(_0x4e3075(0x1e1))/0xb);if(_0x3f3be6===_0x3d29a6)break;else _0x37578c['push'](_0x37578c['shift']());}catch(_0x14b0e3){_0x37578c['push'](_0x37578c['shift']());}}}(a24_0x5363,0x4412d));import{mkdirSync}from'node:fs';import{homedir}from'node:os';export const configDir=homedir()+a24_0x5d1a5e(0x1e7);function a24_0x5363(){const _0x428922=['/.lovrabet','4390200PCsXKE','/cookie','5036KUXoot','455zvdotg','1370FSlgTk','208856wBGJXI','11iKTauM','2671686BRATtP','93090lWlsFi','32392SiKpVD','1838241YTemFb','12OJZnPW'];a24_0x5363=function(){return _0x428922;};return a24_0x5363();}function a24_0x1a58(_0x4b3743,_0x411f92){const _0x5363e4=a24_0x5363();return a24_0x1a58=function(_0x1a58e8,_0x37f3cf){_0x1a58e8=_0x1a58e8-0x1dc;let _0x14a80e=_0x5363e4[_0x1a58e8];return _0x14a80e;},a24_0x1a58(_0x4b3743,_0x411f92);}export const cookieFile=configDir+a24_0x5d1a5e(0x1dc);mkdirSync(configDir,{'recursive':!![]});
1
+ const a27_0x4990a5=a27_0x55ac;(function(_0x3ca58b,_0x188d36){const _0xa54924=a27_0x55ac,_0x3e84f2=_0x3ca58b();while(!![]){try{const _0x4d03e2=parseInt(_0xa54924(0x15a))/0x1*(parseInt(_0xa54924(0x15f))/0x2)+parseInt(_0xa54924(0x15e))/0x3*(parseInt(_0xa54924(0x161))/0x4)+-parseInt(_0xa54924(0x167))/0x5*(parseInt(_0xa54924(0x162))/0x6)+-parseInt(_0xa54924(0x166))/0x7+-parseInt(_0xa54924(0x15b))/0x8*(-parseInt(_0xa54924(0x15d))/0x9)+parseInt(_0xa54924(0x15c))/0xa*(-parseInt(_0xa54924(0x165))/0xb)+-parseInt(_0xa54924(0x164))/0xc*(-parseInt(_0xa54924(0x160))/0xd);if(_0x4d03e2===_0x188d36)break;else _0x3e84f2['push'](_0x3e84f2['shift']());}catch(_0x14673e){_0x3e84f2['push'](_0x3e84f2['shift']());}}}(a27_0x2ce2,0x5630e));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a27_0x55ac(_0x24a3c2,_0x13002a){_0x24a3c2=_0x24a3c2-0x15a;const _0x2ce2e7=a27_0x2ce2();let _0x55ac27=_0x2ce2e7[_0x24a3c2];return _0x55ac27;}export const configDir=homedir()+'/.lovrabet';export const cookieFile=configDir+a27_0x4990a5(0x163);mkdirSync(configDir,{'recursive':!![]});function a27_0x2ce2(){const _0x31cf0a=['1235LLqxqa','3926032hrNjtm','90crXDTw','9wGbZHF','1338cncPCQ','140FyuuQJ','9698rNGKvI','80jooMWf','24936UWofXU','/cookie','18264PoLSyF','690085sCsvEx','4928973jehPCz','120CftaOY'];a27_0x2ce2=function(){return _0x31cf0a;};return a27_0x2ce2();}
@@ -1 +1 @@
1
- (function(_0x3e8e09,_0x285c28){var _0x353aba=a25_0x11c9,_0x4615d7=_0x3e8e09();while(!![]){try{var _0x5c0757=parseInt(_0x353aba(0x179))/0x1*(parseInt(_0x353aba(0x17d))/0x2)+parseInt(_0x353aba(0x17b))/0x3+parseInt(_0x353aba(0x177))/0x4*(-parseInt(_0x353aba(0x17a))/0x5)+-parseInt(_0x353aba(0x176))/0x6+-parseInt(_0x353aba(0x17c))/0x7+-parseInt(_0x353aba(0x17f))/0x8*(-parseInt(_0x353aba(0x175))/0x9)+-parseInt(_0x353aba(0x178))/0xa*(-parseInt(_0x353aba(0x17e))/0xb);if(_0x5c0757===_0x285c28)break;else _0x4615d7['push'](_0x4615d7['shift']());}catch(_0xcf7728){_0x4615d7['push'](_0x4615d7['shift']());}}}(a25_0x4a5f,0x8f09d));function a25_0x4a5f(){var _0x54194b=['178OYHBKA','5128618RUHyGR','1216NrgIZK','utf-8','24597DqwNnA','1716762xFkqia','4BKCtUs','40xCNEwl','5257zaSpXE','4919245MOttPd','517920zuPYob','7455140BhzKnj'];a25_0x4a5f=function(){return _0x54194b;};return a25_0x4a5f();}function a25_0x11c9(_0x4fd76e,_0x5b036e){var _0x4a5fb8=a25_0x4a5f();return a25_0x11c9=function(_0x11c992,_0x4dc669){_0x11c992=_0x11c992-0x175;var _0x53cd68=_0x4a5fb8[_0x11c992];return _0x53cd68;},a25_0x11c9(_0x4fd76e,_0x5b036e);}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0xc6d167=a25_0x11c9;try{return readFileSync(cookieFile,_0xc6d167(0x180));}catch{}return'';}
1
+ (function(_0x45afed,_0x3f6d59){var _0x493549=a28_0x3330,_0x230e26=_0x45afed();while(!![]){try{var _0x296032=parseInt(_0x493549(0x1fb))/0x1*(-parseInt(_0x493549(0x1f3))/0x2)+parseInt(_0x493549(0x1fc))/0x3*(-parseInt(_0x493549(0x1fa))/0x4)+-parseInt(_0x493549(0x1fe))/0x5+parseInt(_0x493549(0x1fd))/0x6*(parseInt(_0x493549(0x1f4))/0x7)+-parseInt(_0x493549(0x1f7))/0x8+parseInt(_0x493549(0x1f8))/0x9*(-parseInt(_0x493549(0x1f5))/0xa)+parseInt(_0x493549(0x1f9))/0xb;if(_0x296032===_0x3f6d59)break;else _0x230e26['push'](_0x230e26['shift']());}catch(_0x36593f){_0x230e26['push'](_0x230e26['shift']());}}}(a28_0x3ddf,0xc1386));function a28_0x3330(_0x2795a4,_0x4d71a7){_0x2795a4=_0x2795a4-0x1f3;var _0x3ddfc7=a28_0x3ddf();var _0x333080=_0x3ddfc7[_0x2795a4];return _0x333080;}import{readFileSync}from'node:fs';function a28_0x3ddf(){var _0xe5d3f9=['3407OkzyZC','3sJDKiX','1698DkYvzI','5211805PULCtH','494KfXuia','19887tNoykI','10USqMdx','utf-8','7807624SWdACN','8871003HXXCHl','57146188ZNhOXE','5448684wZXsbt'];a28_0x3ddf=function(){return _0xe5d3f9;};return a28_0x3ddf();}import{cookieFile}from'./constant.js';export function getCookie(){var _0x5e8466=a28_0x3330;try{return readFileSync(cookieFile,_0x5e8466(0x1f6));}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0xbfdbb9,_0x3160ef){const _0x5334d3=a26_0x263a,_0x17232b=_0xbfdbb9();while(!![]){try{const _0x1e8d41=parseInt(_0x5334d3(0x1cc))/0x1+-parseInt(_0x5334d3(0x1cf))/0x2+parseInt(_0x5334d3(0x1cb))/0x3*(parseInt(_0x5334d3(0x1cd))/0x4)+-parseInt(_0x5334d3(0x1c7))/0x5+parseInt(_0x5334d3(0x1ce))/0x6+-parseInt(_0x5334d3(0x1d0))/0x7*(-parseInt(_0x5334d3(0x1ca))/0x8)+-parseInt(_0x5334d3(0x1c8))/0x9*(parseInt(_0x5334d3(0x1d1))/0xa);if(_0x1e8d41===_0x3160ef)break;else _0x17232b['push'](_0x17232b['shift']());}catch(_0x580641){_0x17232b['push'](_0x17232b['shift']());}}}(a26_0x1ffb,0xc295a));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x4e03e1=a26_0x263a;try{if(!existsSync(cookieFile))return![];const _0x4c0e3e=readFileSync(cookieFile,'utf-8'),_0x47dcdf=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x4c0e3e}})['then'](_0x3506fc=>_0x3506fc[_0x4e03e1(0x1c9)]());return _0x47dcdf&&_0x47dcdf['session']&&_0x47dcdf['user'];}catch{}return![];}function a26_0x263a(_0xe3f12c,_0x25586d){const _0x1ffb15=a26_0x1ffb();return a26_0x263a=function(_0x263a83,_0xb563ef){_0x263a83=_0x263a83-0x1c7;let _0xf01fb8=_0x1ffb15[_0x263a83];return _0xf01fb8;},a26_0x263a(_0xe3f12c,_0x25586d);}function a26_0x1ffb(){const _0x50e90c=['3FwPIDM','1018318OJWdfT','5916844ZTPNlu','2927508LZPpWv','472842pFBCKj','231IaouZv','11887150XhrvsS','4491645kjCSjQ','9DeKqLy','json','32736PnzuhC'];a26_0x1ffb=function(){return _0x50e90c;};return a26_0x1ffb();}
1
+ (function(_0x46b030,_0x897105){const _0x59651a=a29_0x1e36,_0x2abe7d=_0x46b030();while(!![]){try{const _0x4cb470=parseInt(_0x59651a(0xd0))/0x1+-parseInt(_0x59651a(0xd3))/0x2+-parseInt(_0x59651a(0xd5))/0x3*(parseInt(_0x59651a(0xd1))/0x4)+parseInt(_0x59651a(0xdb))/0x5*(-parseInt(_0x59651a(0xdc))/0x6)+parseInt(_0x59651a(0xd2))/0x7+parseInt(_0x59651a(0xd9))/0x8*(parseInt(_0x59651a(0xd7))/0x9)+parseInt(_0x59651a(0xd6))/0xa;if(_0x4cb470===_0x897105)break;else _0x2abe7d['push'](_0x2abe7d['shift']());}catch(_0x231d4f){_0x2abe7d['push'](_0x2abe7d['shift']());}}}(a29_0x56fa,0x1a66b));import{existsSync,readFileSync}from'node:fs';function a29_0x56fa(){const _0x2f9c1a=['16398FrhwVd','/api/auth/get-session','29236rIkCYN','104qdKfhm','153482VNUHQZ','337930JwqcTS','then','2121rRwfJs','2486480FFmDqq','99TBfbPh','json','58472PKYvGL','user','155oyKyKK'];a29_0x56fa=function(){return _0x2f9c1a;};return a29_0x56fa();}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a29_0x1e36(_0x3a2e48,_0x5eaccf){_0x3a2e48=_0x3a2e48-0xcf;const _0x56fa37=a29_0x56fa();let _0x1e364a=_0x56fa37[_0x3a2e48];return _0x1e364a;}export async function getIsSessionValid(){const _0x19f150=a29_0x1e36;try{if(!existsSync(cookieFile))return![];const _0x1c8fdb=readFileSync(cookieFile,'utf-8'),_0x181276=await fetch(getUserDomain()+_0x19f150(0xcf),{'headers':{'cookie':_0x1c8fdb}})[_0x19f150(0xd4)](_0x8d86e1=>_0x8d86e1[_0x19f150(0xd8)]());return _0x181276&&_0x181276['session']&&_0x181276[_0x19f150(0xda)];}catch{}return![];}
@@ -1 +1 @@
1
- function a27_0x4c69(){var _0x1470f8=['log','!\x20当前未登录','1417876fsrELN','1372902EeowHK','8253zMtLzE','2748087CcOrIU','382487JkcYHd','312ylROny','✓\x20已退出登录','450868ePcTwn','26nyrrld','30831AOYgJu','5wmwwZb','20MlkFWZ'];a27_0x4c69=function(){return _0x1470f8;};return a27_0x4c69();}(function(_0x43f385,_0x4495c9){var _0x55985a=a27_0x17ec,_0x29782c=_0x43f385();while(!![]){try{var _0x575b24=parseInt(_0x55985a(0x18f))/0x1+parseInt(_0x55985a(0x193))/0x2*(parseInt(_0x55985a(0x194))/0x3)+parseInt(_0x55985a(0x199))/0x4*(parseInt(_0x55985a(0x195))/0x5)+-parseInt(_0x55985a(0x19a))/0x6+parseInt(_0x55985a(0x19b))/0x7*(-parseInt(_0x55985a(0x190))/0x8)+-parseInt(_0x55985a(0x19c))/0x9+-parseInt(_0x55985a(0x196))/0xa*(parseInt(_0x55985a(0x192))/0xb);if(_0x575b24===_0x4495c9)break;else _0x29782c['push'](_0x29782c['shift']());}catch(_0x163d3b){_0x29782c['push'](_0x29782c['shift']());}}}(a27_0x4c69,0x32e38));import{unlinkSync,existsSync}from'node:fs';function a27_0x17ec(_0x332af9,_0x5a4c19){var _0x4c6992=a27_0x4c69();return a27_0x17ec=function(_0x17ec59,_0x49474e){_0x17ec59=_0x17ec59-0x18f;var _0x13da17=_0x4c6992[_0x17ec59];return _0x13da17;},a27_0x17ec(_0x332af9,_0x5a4c19);}import{cookieFile}from'./constant.js';export function logout(){var _0x3baa0b=a27_0x17ec;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x3baa0b(0x197)](_0x3baa0b(0x191))):console[_0x3baa0b(0x197)](_0x3baa0b(0x198));}
1
+ function a30_0x5d48(_0x2fa11a,_0x542e9d){_0x2fa11a=_0x2fa11a-0x181;var _0x159caa=a30_0x159c();var _0x5d48ce=_0x159caa[_0x2fa11a];return _0x5d48ce;}(function(_0x3cbbb1,_0x209326){var _0x55d8ae=a30_0x5d48,_0x46f219=_0x3cbbb1();while(!![]){try{var _0x51409e=-parseInt(_0x55d8ae(0x181))/0x1*(-parseInt(_0x55d8ae(0x184))/0x2)+parseInt(_0x55d8ae(0x18a))/0x3+-parseInt(_0x55d8ae(0x18b))/0x4+parseInt(_0x55d8ae(0x18c))/0x5+parseInt(_0x55d8ae(0x189))/0x6+parseInt(_0x55d8ae(0x183))/0x7+-parseInt(_0x55d8ae(0x185))/0x8*(-parseInt(_0x55d8ae(0x187))/0x9);if(_0x51409e===_0x209326)break;else _0x46f219['push'](_0x46f219['shift']());}catch(_0x315af5){_0x46f219['push'](_0x46f219['shift']());}}}(a30_0x159c,0x43cf4));function a30_0x159c(){var _0x31fd15=['131775MAGwEc','41wLIpOo','log','2857687IsNzLv','466QonKMb','24zeHUwo','✓\x20已退出登录','276084SlTHXu','!\x20当前未登录','212430qcVYIK','469950GvHOoN','1801936jPiFIp'];a30_0x159c=function(){return _0x31fd15;};return a30_0x159c();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x190a26=a30_0x5d48;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x190a26(0x182)](_0x190a26(0x186))):console[_0x190a26(0x182)](_0x190a26(0x188));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a28_0x18c25a=a28_0x33f0;function a28_0x4b85(){const _0x456273=['add-page','执行添加页面命令','执行预览命令','3227xJfAse','执行初始化配置命令','env','boolean','preview','14292289sSwDkT','执行启动命令','logout','cwd','189AKWLhW','start','6272yetENa','885489EsjhwS','12SnFNxr','auth','205xSdVaq','build','\x20(监听模式)','exit','join','23154vRBmDJ','config','info','549299nejZSy','add','\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\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\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\x20cdn\x20sync\x20--version\x201.0.0\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\x20cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20配置\x20Cursor\x20的\x20MCP\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','执行构建命令','logs','sync','api','input','cdn','flags','lovrabet\x20','appcode','setLogPath','error','create','string','watch','trim','mcp','version','init','setRawCommand','2txeyuu','93740gjzFdh','2021200RRgfSS'];a28_0x4b85=function(){return _0x456273;};return a28_0x4b85();}(function(_0x1a3541,_0xca553e){const _0x57e4b4=a28_0x33f0,_0x3f09b1=_0x1a3541();while(!![]){try{const _0x5935e3=-parseInt(_0x57e4b4(0x18a))/0x1+parseInt(_0x57e4b4(0x16d))/0x2*(-parseInt(_0x57e4b4(0x17f))/0x3)+-parseInt(_0x57e4b4(0x16f))/0x4+-parseInt(_0x57e4b4(0x182))/0x5*(parseInt(_0x57e4b4(0x187))/0x6)+parseInt(_0x57e4b4(0x173))/0x7*(parseInt(_0x57e4b4(0x17e))/0x8)+-parseInt(_0x57e4b4(0x17c))/0x9*(-parseInt(_0x57e4b4(0x16e))/0xa)+-parseInt(_0x57e4b4(0x178))/0xb*(-parseInt(_0x57e4b4(0x180))/0xc);if(_0x5935e3===_0xca553e)break;else _0x3f09b1['push'](_0x3f09b1['shift']());}catch(_0x50693d){_0x3f09b1['push'](_0x3f09b1['shift']());}}}(a28_0x4b85,0x5559c));import{jsx as a28_0x4051fa}from'react/jsx-runtime';import a28_0x10e952 from'meow';function a28_0x33f0(_0x11b733,_0x594131){const _0x4b8576=a28_0x4b85();return a28_0x33f0=function(_0x33f0e8,_0x10d7de){_0x33f0e8=_0x33f0e8-0x168;let _0x59fd76=_0x4b8576[_0x33f0e8];return _0x59fd76;},a28_0x33f0(_0x11b733,_0x594131);}import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/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{AppMenuSyncCdnVersionUI}from'./app-menu-cdn-version/app-menu-sync-cdn-version-ui.js';const cli=a28_0x10e952(a28_0x18c25a(0x18c),{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a28_0x18c25a(0x176)},'env':{'type':'string'},'watch':{'type':a28_0x18c25a(0x176)},'help':{'type':a28_0x18c25a(0x176)},'appcode':{'type':a28_0x18c25a(0x199)},'output':{'type':a28_0x18c25a(0x199)},'params':{'type':'string'},'datasetcode':{'type':a28_0x18c25a(0x199)},'version':{'type':'string'}}});await run();async function run(){const _0x1a3195=a28_0x18c25a,_0x43136a=cli[_0x1a3195(0x191)][0x0],_0x29d97e=cli['input'][0x1],_0x80a575=cli[_0x1a3195(0x191)][0x2],_0x147b2d=(_0x1a3195(0x194)+process['argv']['slice'](0x2)[_0x1a3195(0x186)]('\x20'))[_0x1a3195(0x168)]();logger[_0x1a3195(0x16c)](_0x147b2d);switch(_0x43136a){case _0x1a3195(0x16b):{const _0x221745=cli[_0x1a3195(0x193)][_0x1a3195(0x195)],_0x5300c2=cli[_0x1a3195(0x193)][_0x1a3195(0x175)];logger[_0x1a3195(0x196)](process['cwd']()),logger[_0x1a3195(0x189)](_0x1a3195(0x16b),_0x1a3195(0x174)),render(a28_0x4051fa(Init,{'appcode':_0x221745,'env':_0x5300c2}));break;}case _0x1a3195(0x198):{const _0x41dfb6=cli[_0x1a3195(0x191)][0x1]?.[_0x1a3195(0x168)](),_0x3d758a=cli[_0x1a3195(0x193)][_0x1a3195(0x175)];render(a28_0x4051fa(CreateApp,{'projectCode':_0x41dfb6,'env':_0x3d758a}));break;}case _0x1a3195(0x18b):{cli[_0x1a3195(0x191)][0x1]==='page'&&(logger[_0x1a3195(0x196)](process['cwd']()),logger[_0x1a3195(0x189)](_0x1a3195(0x170),_0x1a3195(0x171)),render(a28_0x4051fa(AddPage,{})));break;}case _0x1a3195(0x17d):{try{logger[_0x1a3195(0x196)](process['cwd']()),logger[_0x1a3195(0x189)]('start',_0x1a3195(0x179)),await runStart();}catch(_0x3d4cf3){console[_0x1a3195(0x197)](_0x3d4cf3),process['exit'](0x1);}break;}case _0x1a3195(0x183):{try{logger['setLogPath'](process[_0x1a3195(0x17b)]()),logger[_0x1a3195(0x189)](_0x1a3195(0x183),_0x1a3195(0x18d)),await runBuild();}catch(_0x496998){console[_0x1a3195(0x197)](_0x496998),process[_0x1a3195(0x185)](0x1);}break;}case _0x1a3195(0x177):{const _0x2d2983=cli[_0x1a3195(0x193)][_0x1a3195(0x19a)];logger['setLogPath'](process[_0x1a3195(0x17b)]()),logger[_0x1a3195(0x189)]('preview',_0x1a3195(0x172)+(_0x2d2983?_0x1a3195(0x184):''));if(_0x2d2983)try{await Promise['all']([runBuildWatch(),runPreview()]);}catch(_0x7423cf){console[_0x1a3195(0x197)](_0x7423cf),process[_0x1a3195(0x185)](0x1);}else try{await runPreview();}catch(_0x309282){console[_0x1a3195(0x197)](_0x309282),process[_0x1a3195(0x185)](0x1);}break;}case _0x1a3195(0x188):{render(a28_0x4051fa(Config,{'cli':cli}));break;}case _0x1a3195(0x190):{await apiCli(cli);break;}case _0x1a3195(0x181):{render(a28_0x4051fa(AuthServer,{}));break;}case'menu':{if(_0x29d97e===_0x1a3195(0x192)){if(_0x80a575===_0x1a3195(0x18f)&&cli['flags'][_0x1a3195(0x16a)]){logger[_0x1a3195(0x196)](process[_0x1a3195(0x17b)]()),logger[_0x1a3195(0x189)]('menu-sync-cdn','执行菜单\x20CDN\x20版本同步命令'),render(a28_0x4051fa(AppMenuSyncCdnVersionUI,{'newVersion':cli[_0x1a3195(0x193)][_0x1a3195(0x16a)]}));break;}}else render(a28_0x4051fa(AppMenuSyncUI,{}));break;}case _0x1a3195(0x17a):{logout();break;}case _0x1a3195(0x169):{const _0x20d7d7=cli[_0x1a3195(0x191)][0x1];await mcpCommand(_0x20d7d7);break;}case _0x1a3195(0x18e):{cli[_0x1a3195(0x193)]['clear']?clearLogs():showLogs();break;}default:render(a28_0x4051fa(Help,{}));break;}}
2
+ const a31_0x3df4f3=a31_0x1ff1;(function(_0x164c44,_0x1fa371){const _0x301e11=a31_0x1ff1,_0x4e930c=_0x164c44();while(!![]){try{const _0x1156c5=-parseInt(_0x301e11(0x1b3))/0x1*(parseInt(_0x301e11(0x190))/0x2)+parseInt(_0x301e11(0x1aa))/0x3+parseInt(_0x301e11(0x197))/0x4+-parseInt(_0x301e11(0x1b8))/0x5+-parseInt(_0x301e11(0x18c))/0x6+parseInt(_0x301e11(0x1a2))/0x7*(parseInt(_0x301e11(0x191))/0x8)+parseInt(_0x301e11(0x1ac))/0x9;if(_0x1156c5===_0x1fa371)break;else _0x4e930c['push'](_0x4e930c['shift']());}catch(_0x1f031c){_0x4e930c['push'](_0x4e930c['shift']());}}}(a31_0x6b38,0xea5cd));import{jsx as a31_0x44d487}from'react/jsx-runtime';import a31_0x30f77b from'meow';import{render}from'ink';import{CreateApp}from'./create-app/main.js';import{AddPage}from'./add-page/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';function a31_0x1ff1(_0x16ff33,_0x56dbce){_0x16ff33=_0x16ff33-0x184;const _0x6b380e=a31_0x6b38();let _0x1ff1dc=_0x6b380e[_0x16ff33];return _0x1ff1dc;}import{showLogs,clearLogs}from'./cmd/logs.js';import{AppMenuSyncUI}from'./app-menu/app-menu-sync-ui.js';import{mcpCommand}from'./mcp/main.js';import{AppMenuSyncCdnVersionUI}from'./app-menu-cdn-version/app-menu-sync-cdn-version-ui.js';import{AppMenuUpdateCdn}from'./app-menu-update-cdn/main.js';const cli=a31_0x30f77b('\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\x20create\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20创建项目并指定环境\x0a\x09\x20\x20$\x20lovrabet\x20add\x20page\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\x20cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20配置\x20Cursor\x20的\x20MCP\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',{'importMeta':import.meta,'flags':{'name':{'type':'string'},'clear':{'type':a31_0x3df4f3(0x196)},'env':{'type':a31_0x3df4f3(0x195)},'watch':{'type':a31_0x3df4f3(0x196)},'help':{'type':a31_0x3df4f3(0x196)},'appcode':{'type':a31_0x3df4f3(0x195)},'output':{'type':a31_0x3df4f3(0x195)},'params':{'type':a31_0x3df4f3(0x195)},'datasetcode':{'type':a31_0x3df4f3(0x195)},'version':{'type':a31_0x3df4f3(0x195)}}});await run();async function run(){const _0x55ccea=a31_0x3df4f3,_0x5b9931=cli[_0x55ccea(0x1af)][0x0],_0x1b5f8b=cli[_0x55ccea(0x1af)][0x1],_0x13bad0=cli[_0x55ccea(0x1af)][0x2],_0x17dcfa=(_0x55ccea(0x1a5)+process[_0x55ccea(0x18b)][_0x55ccea(0x189)](0x2)[_0x55ccea(0x1a8)]('\x20'))[_0x55ccea(0x1a4)]();logger[_0x55ccea(0x1ae)](_0x17dcfa);switch(_0x5b9931){case _0x55ccea(0x198):{const _0x14f660=cli[_0x55ccea(0x188)][_0x55ccea(0x19d)],_0x4d9a0c=cli['flags'][_0x55ccea(0x18d)];logger[_0x55ccea(0x1b1)](process[_0x55ccea(0x1a0)]()),logger[_0x55ccea(0x1b0)](_0x55ccea(0x198),'执行初始化配置命令'),render(a31_0x44d487(Init,{'appcode':_0x14f660,'env':_0x4d9a0c}));break;}case _0x55ccea(0x1b5):{const _0x5ebdc9=cli['input'][0x1]?.[_0x55ccea(0x1a4)](),_0x188593=cli[_0x55ccea(0x188)][_0x55ccea(0x18d)];render(a31_0x44d487(CreateApp,{'projectCode':_0x5ebdc9,'env':_0x188593}));break;}case _0x55ccea(0x1b7):{cli[_0x55ccea(0x1af)][0x1]===_0x55ccea(0x1a1)&&(logger[_0x55ccea(0x1b1)](process[_0x55ccea(0x1a0)]()),logger[_0x55ccea(0x1b0)]('add-page',_0x55ccea(0x1ab)),render(a31_0x44d487(AddPage,{})));break;}case'start':{try{logger[_0x55ccea(0x1b1)](process[_0x55ccea(0x1a0)]()),logger[_0x55ccea(0x1b0)](_0x55ccea(0x1a9),_0x55ccea(0x19b)),await runStart();}catch(_0x17dc91){console[_0x55ccea(0x18a)](_0x17dc91),process[_0x55ccea(0x18f)](0x1);}break;}case _0x55ccea(0x199):{try{logger['setLogPath'](process[_0x55ccea(0x1a0)]()),logger[_0x55ccea(0x1b0)](_0x55ccea(0x199),_0x55ccea(0x18e)),await runBuild();}catch(_0x432f65){console['error'](_0x432f65),process[_0x55ccea(0x18f)](0x1);}break;}case _0x55ccea(0x1b4):{const _0x5ce2e5=cli['flags'][_0x55ccea(0x1a3)];logger['setLogPath'](process[_0x55ccea(0x1a0)]()),logger[_0x55ccea(0x1b0)]('preview','执行预览命令'+(_0x5ce2e5?_0x55ccea(0x1a6):''));if(_0x5ce2e5)try{await Promise[_0x55ccea(0x19e)]([runBuildWatch(),runPreview()]);}catch(_0x453caf){console[_0x55ccea(0x18a)](_0x453caf),process[_0x55ccea(0x18f)](0x1);}else try{await runPreview();}catch(_0x38e6d0){console[_0x55ccea(0x18a)](_0x38e6d0),process[_0x55ccea(0x18f)](0x1);}break;}case _0x55ccea(0x186):{render(a31_0x44d487(Config,{'cli':cli}));break;}case _0x55ccea(0x185):{await apiCli(cli);break;}case _0x55ccea(0x19c):{render(a31_0x44d487(AuthServer,{}));break;}case _0x55ccea(0x187):{if(_0x1b5f8b===_0x55ccea(0x1ad)){if(_0x13bad0===_0x55ccea(0x1b6)&&cli[_0x55ccea(0x188)]['version']){logger[_0x55ccea(0x1b1)](process[_0x55ccea(0x1a0)]()),logger[_0x55ccea(0x1b0)]('menu-sync-cdn',_0x55ccea(0x19f)),render(a31_0x44d487(AppMenuSyncCdnVersionUI,{'newVersion':cli[_0x55ccea(0x188)][_0x55ccea(0x1b2)]}));break;}}else{if(_0x1b5f8b===_0x55ccea(0x194)){logger[_0x55ccea(0x1b1)](process['cwd']()),logger[_0x55ccea(0x1b0)](_0x55ccea(0x19a),'执行更新菜单\x20CDN\x20资源命令'),render(a31_0x44d487(AppMenuUpdateCdn,{}));break;}else render(a31_0x44d487(AppMenuSyncUI,{}));}break;}case _0x55ccea(0x184):{logout();break;}case _0x55ccea(0x1a7):{const _0x132dd7=cli[_0x55ccea(0x1af)][0x1];await mcpCommand(_0x132dd7);break;}case _0x55ccea(0x192):{cli['flags'][_0x55ccea(0x193)]?clearLogs():showLogs();break;}default:render(a31_0x44d487(Help,{}));break;}}function a31_0x6b38(){const _0xde7d11=['执行菜单\x20CDN\x20版本同步命令','cwd','page','45598kTahro','watch','trim','lovrabet\x20','\x20(监听模式)','mcp','join','start','5410674CRmKln','执行添加页面命令','13066263GKoGcx','cdn','setRawCommand','input','info','setLogPath','version','74jHqtuD','preview','create','sync','add','5200730RbRFoY','logout','api','config','menu','flags','slice','error','argv','11400036DHOOkW','env','执行构建命令','exit','36798UxGRDX','1960XRGrJo','logs','clear','update','string','boolean','1641328ZYwPow','init','build','menu-update-cdn','执行启动命令','auth','appcode','all'];a31_0x6b38=function(){return _0xde7d11;};return a31_0x6b38();}
@@ -1 +1 @@
1
- function a29_0x3079(_0x5c2e70,_0x1e46b0){const _0xd36bed=a29_0xd36b();return a29_0x3079=function(_0x307933,_0x270eff){_0x307933=_0x307933-0x11c;let _0x49a532=_0xd36bed[_0x307933];return _0x49a532;},a29_0x3079(_0x5c2e70,_0x1e46b0);}function a29_0xd36b(){const _0x403971=['335JdAMvu','980CNtEig','vite','1630136SmfXZj','132uwRzOF','27YeJdnF','1542efuJie','3831YcpbQZ','cwd','PATH','20461qIzHSD','15917DjlHsg','node_modules','build','521840UGsKyB','9908ODeqPm','4295880ifmyiZ'];a29_0xd36b=function(){return _0x403971;};return a29_0xd36b();}(function(_0x19e311,_0x1f56dd){const _0x249e0f=a29_0x3079,_0x5e00ea=_0x19e311();while(!![]){try{const _0x20ce4a=parseInt(_0x249e0f(0x124))/0x1+-parseInt(_0x249e0f(0x12b))/0x2*(-parseInt(_0x249e0f(0x120))/0x3)+-parseInt(_0x249e0f(0x128))/0x4*(-parseInt(_0x249e0f(0x12a))/0x5)+parseInt(_0x249e0f(0x11f))/0x6*(-parseInt(_0x249e0f(0x123))/0x7)+parseInt(_0x249e0f(0x11c))/0x8*(parseInt(_0x249e0f(0x11e))/0x9)+parseInt(_0x249e0f(0x129))/0xa+-parseInt(_0x249e0f(0x127))/0xb*(parseInt(_0x249e0f(0x11d))/0xc);if(_0x20ce4a===_0x1f56dd)break;else _0x5e00ea['push'](_0x5e00ea['shift']());}catch(_0x1e6b73){_0x5e00ea['push'](_0x5e00ea['shift']());}}}(a29_0xd36b,0x8c7d4));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';export function runBuildWatch(){return new Promise((_0x322356,_0x344388)=>{const _0x8811aa=a29_0x3079,_0x5f39f0=spawn(_0x8811aa(0x12c),[_0x8811aa(0x126),'--watch'],{'stdio':'inherit','shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x8811aa(0x121)](),_0x8811aa(0x125),'.bin')+delimiter+process['env'][_0x8811aa(0x122)]}});_0x5f39f0['on']('close',_0x4fe39e=>{if(_0x4fe39e===0x0||_0x4fe39e===null)_0x322356();else _0x344388(new Error('npm\x20run\x20build\x20exited\x20with\x20code\x20'+_0x4fe39e));}),_0x5f39f0['on']('error',_0x344388);});}
1
+ (function(_0x3ab072,_0x1722c0){const _0x137ec2=a32_0x1694,_0x1f66fa=_0x3ab072();while(!![]){try{const _0x55edc2=parseInt(_0x137ec2(0xd6))/0x1+parseInt(_0x137ec2(0xce))/0x2+parseInt(_0x137ec2(0xe0))/0x3+-parseInt(_0x137ec2(0xdc))/0x4*(parseInt(_0x137ec2(0xd9))/0x5)+parseInt(_0x137ec2(0xd1))/0x6*(parseInt(_0x137ec2(0xd7))/0x7)+parseInt(_0x137ec2(0xdf))/0x8*(-parseInt(_0x137ec2(0xdb))/0x9)+-parseInt(_0x137ec2(0xd2))/0xa;if(_0x55edc2===_0x1722c0)break;else _0x1f66fa['push'](_0x1f66fa['shift']());}catch(_0x4cb7f9){_0x1f66fa['push'](_0x1f66fa['shift']());}}}(a32_0x44ec,0x6552d));import{spawn}from'node:child_process';import{delimiter,join}from'node:path';function a32_0x1694(_0x10318d,_0x549009){_0x10318d=_0x10318d-0xce;const _0x44ec89=a32_0x44ec();let _0x1694af=_0x44ec89[_0x10318d];return _0x1694af;}function a32_0x44ec(){const _0x3ff0b3=['env','4850DSSnXL','inherit','26037YUOoft','340lvaDTO','vite','.bin','1704RWQUqn','2416317tgwUTH','1397460uyLOzH','npm\x20run\x20build\x20exited\x20with\x20code\x20','close','172734vchtOA','8055910CyOppU','PATH','build','node_modules','98423FYdzpf','77tedjQU'];a32_0x44ec=function(){return _0x3ff0b3;};return a32_0x44ec();}export function runBuildWatch(){return new Promise((_0x1ad7a0,_0x23b5d7)=>{const _0x3a0d10=a32_0x1694,_0x7c62f0=spawn(_0x3a0d10(0xdd),[_0x3a0d10(0xd4),'--watch'],{'stdio':_0x3a0d10(0xda),'shell':!![],'env':{...process['env'],'PATH':''+join(process['cwd'](),_0x3a0d10(0xd5),_0x3a0d10(0xde))+delimiter+process[_0x3a0d10(0xd8)][_0x3a0d10(0xd3)]}});_0x7c62f0['on'](_0x3a0d10(0xd0),_0x1c6355=>{const _0x1f662f=_0x3a0d10;if(_0x1c6355===0x0||_0x1c6355===null)_0x1ad7a0();else _0x23b5d7(new Error(_0x1f662f(0xcf)+_0x1c6355));}),_0x7c62f0['on']('error',_0x23b5d7);});}