@lovrabet/cli 1.3.3 → 1.3.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/lib/ai-setup/AISetupUI.js +1 -1
  2. package/lib/ai-setup/config.js +1 -1
  3. package/lib/api/api-doc-ui.js +1 -1
  4. package/lib/api/api-doc.js +1 -1
  5. package/lib/api/api-pull-ui.js +1 -1
  6. package/lib/api/fetch-model-list.js +1 -1
  7. package/lib/api/generate-api-file.js +1 -1
  8. package/lib/api/main.js +1 -1
  9. package/lib/api/pull-silent.js +1 -1
  10. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  11. package/lib/app-menu/create-menu.js +1 -1
  12. package/lib/app-menu/get-local-pages.js +1 -1
  13. package/lib/app-menu/get-online-menu-list.js +1 -1
  14. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  15. package/lib/app-menu/utils.js +1 -1
  16. package/lib/app-menu/valid-url.js +1 -1
  17. package/lib/app-menu-update-cdn/current-content.js +1 -1
  18. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  19. package/lib/app-menu-update-cdn/main.js +1 -1
  20. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  21. package/lib/auth/auth-server-ui.js +1 -1
  22. package/lib/auth/auth-server.js +1 -1
  23. package/lib/auth/constant.js +1 -1
  24. package/lib/auth/get-cookie.js +1 -1
  25. package/lib/auth/is-session-valid.js +1 -1
  26. package/lib/auth/logout.js +1 -1
  27. package/lib/cli-flags.js +1 -1
  28. package/lib/cli.js +1 -1
  29. package/lib/cmd/build-watch.js +1 -1
  30. package/lib/cmd/build.js +1 -1
  31. package/lib/cmd/logs.js +1 -1
  32. package/lib/cmd/preview.js +1 -1
  33. package/lib/cmd/start-execa.js +1 -0
  34. package/lib/cmd/start.js +1 -1
  35. package/lib/config/config-help.js +1 -1
  36. package/lib/config/main.js +1 -1
  37. package/lib/constant/domain.js +1 -1
  38. package/lib/constant/env.js +1 -1
  39. package/lib/create-app/enhanced-guided-create.js +1 -1
  40. package/lib/create-app/format-elapsed.js +1 -1
  41. package/lib/create-app/main.js +1 -1
  42. package/lib/create-app/non-interactive.js +1 -1
  43. package/lib/create-app/task-finished.js +1 -1
  44. package/lib/create-app/task-loading.js +1 -1
  45. package/lib/create-app/task-running.js +1 -1
  46. package/lib/create-app/task-time.js +1 -1
  47. package/lib/create-app/use-copy-project-template.js +1 -1
  48. package/lib/create-app/use-format-code.js +1 -1
  49. package/lib/create-app/use-install-dependencies.js +1 -1
  50. package/lib/help.js +1 -1
  51. package/lib/i18n/I18nProvider.js +1 -1
  52. package/lib/i18n/hooks.js +1 -1
  53. package/lib/i18n/index.js +1 -1
  54. package/lib/i18n/locales/en-US.js +1 -1
  55. package/lib/i18n/locales/zh-CN.js +1 -1
  56. package/lib/init/main.js +1 -1
  57. package/lib/mcp/McpInstallUI.js +1 -1
  58. package/lib/mcp/claude.js +1 -1
  59. package/lib/mcp/cursor.js +1 -1
  60. package/lib/mcp/main.js +1 -1
  61. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  62. package/lib/mcp/mcp-installer.js +1 -1
  63. package/lib/skills/SkillInstallUI.js +1 -1
  64. package/lib/skills/main.js +1 -1
  65. package/lib/skills/skill-install-non-interactive.js +1 -1
  66. package/lib/skills/skill-installer.js +1 -1
  67. package/lib/ui/IDESelector.js +1 -1
  68. package/lib/ui/useIDESelection.js +1 -1
  69. package/lib/utils/ai_config.js +1 -1
  70. package/lib/utils/cdn-config.js +1 -1
  71. package/lib/utils/check-sdk-version.js +1 -1
  72. package/lib/utils/cli-version-check.js +1 -1
  73. package/lib/utils/config.js +1 -1
  74. package/lib/utils/copy-directory.js +1 -1
  75. package/lib/utils/file-utils.js +1 -1
  76. package/lib/utils/guides-cdn.js +1 -1
  77. package/lib/utils/http-client.js +1 -1
  78. package/lib/utils/logger.js +1 -1
  79. package/lib/utils/rules-cdn.js +1 -1
  80. package/lib/utils/sleep.js +1 -1
  81. package/lib/utils/template-replacer.js +1 -1
  82. package/package.json +4 -1
  83. package/templates/README.md +10 -55
  84. package/lib/add-page/input-page-router.js +0 -1
  85. package/lib/add-page/main.js +0 -1
  86. package/lib/add-page/select-page-template.js +0 -1
  87. package/lib/utils/router-updater.js +0 -1
  88. package/templates/pages/blank/index.tsx.tpl +0 -13
  89. package/templates/pages/sdk-fetch/index.tsx.tpl +0 -80
@@ -1 +1 @@
1
- (function(_0x128d34,_0x1af416){const _0x3ba500=a60_0x5027,_0x5e1d8b=_0x128d34();while(!![]){try{const _0x2297fb=parseInt(_0x3ba500(0xb6))/0x1*(parseInt(_0x3ba500(0xd2))/0x2)+-parseInt(_0x3ba500(0xd4))/0x3+parseInt(_0x3ba500(0xc4))/0x4+parseInt(_0x3ba500(0xaf))/0x5*(parseInt(_0x3ba500(0xbf))/0x6)+-parseInt(_0x3ba500(0xd3))/0x7+-parseInt(_0x3ba500(0xcc))/0x8*(-parseInt(_0x3ba500(0xd8))/0x9)+parseInt(_0x3ba500(0xa7))/0xa*(parseInt(_0x3ba500(0xc7))/0xb);if(_0x2297fb===_0x1af416)break;else _0x5e1d8b['push'](_0x5e1d8b['shift']());}catch(_0xad8fcb){_0x5e1d8b['push'](_0x5e1d8b['shift']());}}}(a60_0x2859,0xc90b3));import{jsx as a60_0x2e31a7,jsxs as a60_0x15c12c,Fragment as a60_0x2dfb33}from'react/jsx-runtime';import{useState,useEffect,useMemo}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';function a60_0x5027(_0x4772d2,_0x2eee12){_0x4772d2=_0x4772d2-0xa2;const _0x2859fe=a60_0x2859();let _0x50274b=_0x2859fe[_0x4772d2];return _0x50274b;}import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{useI18n}from'../i18n/hooks.js';import a60_0x19ab1d from'../i18n/index.js';function a60_0x2859(){const _0x690d97=['241925QBlsfV','mcp.ui.count','\x20\x20✓','length','push','cursor','green','1PecUHD','handleKeyDown','key','\x20\x20✗','red','selecting','setErrorMsg','needsManualAction','mcp.ui.failed','72YYuIDZ','from','done','map','mcp.ui.pressAnyKeyToExit','1763696AWuqBh','manual','error','2639747eoBbpn','mcp.ui.unsupportedIDE','some','mcp.ui.otherIDE','message','6310904LnwQth','yellow','status','gray','column','selectedIndexes','141914vhVikR','5842396LFTswP','2829576IQVBxs','cyan','\x20\x20⚠️','ide','9pjcXHf','white','claude','description','getSelectedIDEs','name','other','30hzkWtO','success','label','configuring','mcp.ui.title','size','find','mcp.ui.configuring'];a60_0x2859=function(){return _0x690d97;};return a60_0x2859();}export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0xe9de2e=a60_0x5027,{t:_0x27dc12}=useI18n(),{exit:_0x4fd9f9}=useApp(),[_0x392a52,_0x4bbfe5]=useState(_0xe9de2e(0xbb)),[_0x2389de,_0x542065]=useState([]),[_0x5e81f7,_0x211a14]=useState([]),_0x138ec0=useMemo(()=>[...Array[_0xe9de2e(0xc0)](MCP_IDES)[_0xe9de2e(0xc2)](_0x46b3ba=>({'key':_0x46b3ba,'name':IDE_CONFIGS[_0x46b3ba]['name'],'description':IDE_CONFIGS[_0x46b3ba][_0xe9de2e(0xa3)]})),{'key':_0xe9de2e(0xa6),'name':_0x27dc12(_0xe9de2e(0xca)),'description':_0x27dc12('mcp.ui.otherIDEDescription')}],[_0x27dc12]),_0x114d46=useIDESelection({'ideList':_0x138ec0,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x5be60f=_0xe9de2e;preselectedIDEs[_0x5be60f(0xb2)]>0x0&&_0x114d46[_0x5be60f(0xd1)][_0x5be60f(0xac)]>0x0&&_0x165f79();},[]),useInput((_0x35cd90,_0x32ce18)=>{const _0x54ce42=_0xe9de2e;if(_0x392a52===_0x54ce42(0xbb)){if(_0x35cd90==='q'||_0x35cd90==='Q'){_0x4fd9f9();return;}if(_0x32ce18['return']){if(_0x114d46[_0x54ce42(0xd1)]['size']===0x0){_0x114d46[_0x54ce42(0xbc)](_0x27dc12('mcp.ui.selectAtLeastOne'));return;}_0x165f79();return;}_0x114d46[_0x54ce42(0xb7)](_0x35cd90,_0x32ce18);}_0x392a52===_0x54ce42(0xc1)&&_0x4fd9f9();});async function _0x165f79(){const _0xab4216=_0xe9de2e,_0x12be02=_0x114d46[_0xab4216(0xa4)]();_0x542065([{'label':_0x27dc12('mcp.ui.selectedIDE'),'value':_0x27dc12(_0xab4216(0xb0),{'count':_0x114d46[_0xab4216(0xd1)]['size']})}]),_0x4bbfe5('configuring');const _0x3ae035=[];for(const _0x337f8e of _0x12be02){try{const _0x1461f7=await configureMcp(_0x337f8e);_0x3ae035[_0xab4216(0xb3)]({'ide':_0x138ec0[_0xab4216(0xad)](_0x52e9eb=>_0x52e9eb[_0xab4216(0xb8)]===_0x337f8e)?.[_0xab4216(0xa5)]||_0x337f8e,'status':_0x1461f7[_0xab4216(0xbd)]?_0xab4216(0xc5):_0x1461f7[_0xab4216(0xa8)]?_0xab4216(0xa8):_0xab4216(0xc6),'message':_0x1461f7[_0xab4216(0xcb)]});}catch(_0x34f9cd){_0x3ae035[_0xab4216(0xb3)]({'ide':_0x138ec0['find'](_0x4ddd7d=>_0x4ddd7d[_0xab4216(0xb8)]===_0x337f8e)?.[_0xab4216(0xa5)]||_0x337f8e,'status':'error','message':_0x34f9cd instanceof Error?_0x34f9cd[_0xab4216(0xcb)]:String(_0x34f9cd)});}}_0x211a14(_0x3ae035),_0x4bbfe5(_0xab4216(0xc1)),setTimeout(()=>{_0x4fd9f9();},0x1388);}return a60_0x15c12c(Box,{'flexDirection':_0xe9de2e(0xd0),'marginTop':0x1,'children':[_0x392a52===_0xe9de2e(0xbb)&&a60_0x2e31a7(IDESelector,{'ideList':_0x138ec0,'title':_0x27dc12(_0xe9de2e(0xab)),'selection':_0x114d46}),_0x392a52===_0xe9de2e(0xaa)&&a60_0x15c12c(a60_0x2dfb33,{'children':[_0x2389de['map']((_0x50b4c0,_0x33928c)=>a60_0x15c12c(Box,{'children':[a60_0x15c12c(Text,{'color':_0xe9de2e(0xb5),'children':['√\x20',_0x50b4c0[_0xe9de2e(0xa9)],':\x20']}),a60_0x2e31a7(Text,{'color':_0xe9de2e(0xd5),'children':_0x50b4c0['value']})]},_0x33928c)),a60_0x2e31a7(Box,{'marginTop':0x1,'children':a60_0x2e31a7(Text,{'children':_0x27dc12(_0xe9de2e(0xae))})})]}),_0x392a52===_0xe9de2e(0xc1)&&a60_0x2e31a7(DoneStep,{'configResults':_0x5e81f7})]});}function DoneStep({configResults:_0x1fafcd}){const _0x4ff6ff=a60_0x5027,{t:_0x28a6a1}=useI18n(),_0x2a8310=_0x1fafcd['every'](_0x3b0b52=>_0x3b0b52[_0x4ff6ff(0xce)]===_0x4ff6ff(0xa8)),_0xd62e2=_0x1fafcd[_0x4ff6ff(0xc9)](_0x3aa88c=>_0x3aa88c['status']==='manual'),_0x384400=_0x1fafcd[_0x4ff6ff(0xc9)](_0x3eb98a=>_0x3eb98a[_0x4ff6ff(0xce)]===_0x4ff6ff(0xc6));return a60_0x15c12c(a60_0x2dfb33,{'children':[a60_0x2e31a7(Box,{'children':_0x2a8310?a60_0x2e31a7(Text,{'color':_0x4ff6ff(0xb5),'children':_0x28a6a1('mcp.ui.completed')}):_0xd62e2?a60_0x2e31a7(Text,{'color':_0x4ff6ff(0xcd),'children':_0x28a6a1('mcp.ui.partialManual')}):_0x384400?a60_0x2e31a7(Text,{'color':'red','children':_0x28a6a1(_0x4ff6ff(0xbe))}):a60_0x2e31a7(Text,{'color':_0x4ff6ff(0xcd),'children':_0x28a6a1('mcp.ui.manualRequired')})}),_0x1fafcd[_0x4ff6ff(0xc2)]((_0x19f57f,_0x5d660a)=>a60_0x15c12c(Box,{'flexDirection':'column','children':[a60_0x15c12c(Text,{'color':_0x19f57f[_0x4ff6ff(0xce)]==='success'?'green':_0x19f57f[_0x4ff6ff(0xce)]==='manual'?_0x4ff6ff(0xcd):_0x4ff6ff(0xba),'children':[_0x19f57f[_0x4ff6ff(0xce)]===_0x4ff6ff(0xa8)?_0x4ff6ff(0xb1):_0x19f57f[_0x4ff6ff(0xce)]===_0x4ff6ff(0xc5)?_0x4ff6ff(0xd6):_0x4ff6ff(0xb9),'\x20',_0x19f57f[_0x4ff6ff(0xd7)],':']}),a60_0x2e31a7(Text,{'color':_0x19f57f[_0x4ff6ff(0xce)]===_0x4ff6ff(0xa8)?_0x4ff6ff(0xd9):_0x19f57f['status']===_0x4ff6ff(0xc5)?_0x4ff6ff(0xcd):_0x4ff6ff(0xba),'children':_0x19f57f[_0x4ff6ff(0xcb)]})]},_0x5d660a)),a60_0x2e31a7(Box,{'marginTop':0x1,'children':a60_0x2e31a7(Text,{'color':_0x4ff6ff(0xcf),'children':_0x28a6a1(_0x4ff6ff(0xc3))})})]});}async function configureMcp(_0x38da84){const _0x2b268a=a60_0x5027,_0x3eeaab=process['cwd']();switch(_0x38da84){case _0x2b268a(0xb4):return configureCursorMcp(_0x3eeaab);case _0x2b268a(0xa2):return configureClaudeMcp(_0x3eeaab);case'other':return showOtherMcpGuide(_0x3eeaab);default:throw new Error(a60_0x19ab1d['t'](_0x2b268a(0xc8),{'ide':_0x38da84}));}}
1
+ (function(_0x4cd04d,_0x26c745){const _0x41ca81=a58_0xe1c4,_0x41920d=_0x4cd04d();while(!![]){try{const _0x2921b2=-parseInt(_0x41ca81(0xd6))/0x1*(parseInt(_0x41ca81(0xc9))/0x2)+-parseInt(_0x41ca81(0xb1))/0x3+parseInt(_0x41ca81(0xe0))/0x4*(-parseInt(_0x41ca81(0xdc))/0x5)+-parseInt(_0x41ca81(0xb4))/0x6+parseInt(_0x41ca81(0xc0))/0x7*(parseInt(_0x41ca81(0xe6))/0x8)+parseInt(_0x41ca81(0xd1))/0x9+parseInt(_0x41ca81(0xb8))/0xa;if(_0x2921b2===_0x26c745)break;else _0x41920d['push'](_0x41920d['shift']());}catch(_0x224729){_0x41920d['push'](_0x41920d['shift']());}}}(a58_0x300f,0x6323e));import{jsx as a58_0x1ed9e2,jsxs as a58_0x1ee3d0,Fragment as a58_0x4c337f}from'react/jsx-runtime';import{useState,useEffect,useMemo}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{useI18n}from'../i18n/hooks.js';import a58_0x3d3e37 from'../i18n/index.js';function a58_0x300f(){const _0x408026=['mcp.ui.otherIDEDescription','20lNgkrm','gray','ide','success','470836jXgdzW','size','error','needsManualAction','cwd','message','16kYwEMG','done','mcp.ui.selectAtLeastOne','1573641GYjMeD','description','\x20\x20✓','328176hHDqGH','\x20\x20⚠️','push','other','12318100SjAKfG','getSelectedIDEs','from','name','cursor','some','claude','value','1883805AeZSsj','status','mcp.ui.unsupportedIDE','\x20\x20✗','return','yellow','white','map','selectedIndexes','18ElpxcY','mcp.ui.title','column','find','selecting','mcp.ui.configuring','red','manual','2416482juRZrC','mcp.ui.count','mcp.ui.pressAnyKeyToExit','mcp.ui.selectedIDE','green','64709JyfpbY','mcp.ui.completed','configuring','key','mcp.ui.partialManual'];a58_0x300f=function(){return _0x408026;};return a58_0x300f();}export function McpInstallUI({preselectedIDEs:preselectedIDEs=[]}){const _0x2bfaed=a58_0xe1c4,{t:_0x3c75b4}=useI18n(),{exit:_0x5e9521}=useApp(),[_0x5ef8f1,_0x365273]=useState(_0x2bfaed(0xcd)),[_0x58aee6,_0x15a751]=useState([]),[_0x322524,_0x58d0e1]=useState([]),_0x43b2d8=useMemo(()=>[...Array[_0x2bfaed(0xba)](MCP_IDES)['map'](_0xbfe41=>({'key':_0xbfe41,'name':IDE_CONFIGS[_0xbfe41][_0x2bfaed(0xbb)],'description':IDE_CONFIGS[_0xbfe41][_0x2bfaed(0xb2)]})),{'key':_0x2bfaed(0xb7),'name':_0x3c75b4('mcp.ui.otherIDE'),'description':_0x3c75b4(_0x2bfaed(0xdb))}],[_0x3c75b4]),_0x348c94=useIDESelection({'ideList':_0x43b2d8,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x15d219=_0x2bfaed;preselectedIDEs['length']>0x0&&_0x348c94[_0x15d219(0xc8)][_0x15d219(0xe1)]>0x0&&_0x30e20c();},[]),useInput((_0x596d88,_0x16c820)=>{const _0x5ab432=_0x2bfaed;if(_0x5ef8f1===_0x5ab432(0xcd)){if(_0x596d88==='q'||_0x596d88==='Q'){_0x5e9521();return;}if(_0x16c820[_0x5ab432(0xc4)]){if(_0x348c94[_0x5ab432(0xc8)][_0x5ab432(0xe1)]===0x0){_0x348c94['setErrorMsg'](_0x3c75b4(_0x5ab432(0xb0)));return;}_0x30e20c();return;}_0x348c94['handleKeyDown'](_0x596d88,_0x16c820);}_0x5ef8f1===_0x5ab432(0xe7)&&_0x5e9521();});async function _0x30e20c(){const _0x1c33db=_0x2bfaed,_0x21df5d=_0x348c94[_0x1c33db(0xb9)]();_0x15a751([{'label':_0x3c75b4(_0x1c33db(0xd4)),'value':_0x3c75b4(_0x1c33db(0xd2),{'count':_0x348c94[_0x1c33db(0xc8)][_0x1c33db(0xe1)]})}]),_0x365273('configuring');const _0x40c54d=[];for(const _0x42c821 of _0x21df5d){try{const _0x2f2681=await configureMcp(_0x42c821);_0x40c54d[_0x1c33db(0xb6)]({'ide':_0x43b2d8[_0x1c33db(0xcc)](_0x4eeaf5=>_0x4eeaf5['key']===_0x42c821)?.[_0x1c33db(0xbb)]||_0x42c821,'status':_0x2f2681[_0x1c33db(0xe3)]?'manual':_0x2f2681[_0x1c33db(0xdf)]?_0x1c33db(0xdf):_0x1c33db(0xe2),'message':_0x2f2681[_0x1c33db(0xe5)]});}catch(_0x1a0a00){_0x40c54d['push']({'ide':_0x43b2d8[_0x1c33db(0xcc)](_0xcfffac=>_0xcfffac[_0x1c33db(0xd9)]===_0x42c821)?.['name']||_0x42c821,'status':'error','message':_0x1a0a00 instanceof Error?_0x1a0a00[_0x1c33db(0xe5)]:String(_0x1a0a00)});}}_0x58d0e1(_0x40c54d),_0x365273(_0x1c33db(0xe7)),setTimeout(()=>{_0x5e9521();},0x1388);}return a58_0x1ee3d0(Box,{'flexDirection':_0x2bfaed(0xcb),'marginTop':0x1,'children':[_0x5ef8f1==='selecting'&&a58_0x1ed9e2(IDESelector,{'ideList':_0x43b2d8,'title':_0x3c75b4(_0x2bfaed(0xca)),'selection':_0x348c94}),_0x5ef8f1===_0x2bfaed(0xd8)&&a58_0x1ee3d0(a58_0x4c337f,{'children':[_0x58aee6[_0x2bfaed(0xc7)]((_0x54fdb2,_0x29befc)=>a58_0x1ee3d0(Box,{'children':[a58_0x1ee3d0(Text,{'color':_0x2bfaed(0xd5),'children':['√\x20',_0x54fdb2['label'],':\x20']}),a58_0x1ed9e2(Text,{'color':'cyan','children':_0x54fdb2[_0x2bfaed(0xbf)]})]},_0x29befc)),a58_0x1ed9e2(Box,{'marginTop':0x1,'children':a58_0x1ed9e2(Text,{'children':_0x3c75b4(_0x2bfaed(0xce))})})]}),_0x5ef8f1===_0x2bfaed(0xe7)&&a58_0x1ed9e2(DoneStep,{'configResults':_0x322524})]});}function DoneStep({configResults:_0x45bdc1}){const _0x41e61e=a58_0xe1c4,{t:_0x596baf}=useI18n(),_0x2e31b4=_0x45bdc1['every'](_0xc475ed=>_0xc475ed['status']===_0x41e61e(0xdf)),_0x32849f=_0x45bdc1[_0x41e61e(0xbd)](_0x422dee=>_0x422dee[_0x41e61e(0xc1)]==='manual'),_0x30d8b2=_0x45bdc1[_0x41e61e(0xbd)](_0x151e98=>_0x151e98[_0x41e61e(0xc1)]==='error');return a58_0x1ee3d0(a58_0x4c337f,{'children':[a58_0x1ed9e2(Box,{'children':_0x2e31b4?a58_0x1ed9e2(Text,{'color':_0x41e61e(0xd5),'children':_0x596baf(_0x41e61e(0xd7))}):_0x32849f?a58_0x1ed9e2(Text,{'color':'yellow','children':_0x596baf(_0x41e61e(0xda))}):_0x30d8b2?a58_0x1ed9e2(Text,{'color':'red','children':_0x596baf('mcp.ui.failed')}):a58_0x1ed9e2(Text,{'color':_0x41e61e(0xc5),'children':_0x596baf('mcp.ui.manualRequired')})}),_0x45bdc1['map']((_0x108a03,_0x28aa3f)=>a58_0x1ee3d0(Box,{'flexDirection':_0x41e61e(0xcb),'children':[a58_0x1ee3d0(Text,{'color':_0x108a03[_0x41e61e(0xc1)]==='success'?_0x41e61e(0xd5):_0x108a03[_0x41e61e(0xc1)]===_0x41e61e(0xd0)?_0x41e61e(0xc5):_0x41e61e(0xcf),'children':[_0x108a03[_0x41e61e(0xc1)]===_0x41e61e(0xdf)?_0x41e61e(0xb3):_0x108a03[_0x41e61e(0xc1)]===_0x41e61e(0xd0)?_0x41e61e(0xb5):_0x41e61e(0xc3),'\x20',_0x108a03[_0x41e61e(0xde)],':']}),a58_0x1ed9e2(Text,{'color':_0x108a03[_0x41e61e(0xc1)]===_0x41e61e(0xdf)?_0x41e61e(0xc6):_0x108a03[_0x41e61e(0xc1)]==='manual'?_0x41e61e(0xc5):'red','children':_0x108a03[_0x41e61e(0xe5)]})]},_0x28aa3f)),a58_0x1ed9e2(Box,{'marginTop':0x1,'children':a58_0x1ed9e2(Text,{'color':_0x41e61e(0xdd),'children':_0x596baf(_0x41e61e(0xd3))})})]});}function a58_0xe1c4(_0x3566e5,_0x5889ec){_0x3566e5=_0x3566e5-0xb0;const _0x300fa8=a58_0x300f();let _0xe1c46a=_0x300fa8[_0x3566e5];return _0xe1c46a;}async function configureMcp(_0x2d727a){const _0x2a34d5=a58_0xe1c4,_0x3b05b3=process[_0x2a34d5(0xe4)]();switch(_0x2d727a){case _0x2a34d5(0xbc):return configureCursorMcp(_0x3b05b3);case _0x2a34d5(0xbe):return configureClaudeMcp(_0x3b05b3);case _0x2a34d5(0xb7):return showOtherMcpGuide(_0x3b05b3);default:throw new Error(a58_0x3d3e37['t'](_0x2a34d5(0xc2),{'ide':_0x2d727a}));}}
package/lib/mcp/claude.js CHANGED
@@ -1 +1 @@
1
- (function(_0x47e56c,_0x2e2c4a){const _0x15c890=a61_0xf4c0,_0x195a35=_0x47e56c();while(!![]){try{const _0x23db63=parseInt(_0x15c890(0x111))/0x1+-parseInt(_0x15c890(0x10d))/0x2*(-parseInt(_0x15c890(0x114))/0x3)+-parseInt(_0x15c890(0x113))/0x4+-parseInt(_0x15c890(0x10e))/0x5+parseInt(_0x15c890(0x115))/0x6+parseInt(_0x15c890(0x112))/0x7*(parseInt(_0x15c890(0x10a))/0x8)+-parseInt(_0x15c890(0x110))/0x9;if(_0x23db63===_0x2e2c4a)break;else _0x195a35['push'](_0x195a35['shift']());}catch(_0x254167){_0x195a35['push'](_0x195a35['shift']());}}}(a61_0xcfa0,0x8c42a));import{configureClaudeMcp as a61_0x4ca991}from'./mcp-installer.js';import a61_0x25ae93 from'../i18n/index.js';export async function configureClaudeMcp(){const _0x148338=a61_0xf4c0,_0x5b37e4=process[_0x148338(0x106)](),_0x1ef42e=a61_0x4ca991(_0x5b37e4);_0x1ef42e[_0x148338(0x10f)]?(console[_0x148338(0x10b)]('\x0a📋\x20'+_0x1ef42e[_0x148338(0x108)]+'\x0a'),process[_0x148338(0x10c)](0x0)):(console[_0x148338(0x109)](a61_0x25ae93['t'](_0x148338(0x107),{'error':_0x1ef42e['message']})),process['exit'](0x1));}function a61_0xf4c0(_0x5ccf61,_0x5e828c){_0x5ccf61=_0x5ccf61-0x106;const _0xcfa05f=a61_0xcfa0();let _0xf4c0ff=_0xcfa05f[_0x5ccf61];return _0xf4c0ff;}function a61_0xcfa0(){const _0x29f2e5=['13407372XXezWT','1121204jYhJAa','47705ryyfLU','46700zkvHPO','5853Vaeoyq','2242650lAOyLt','cwd','mcp.claudeConfig.error','message','error','648yYqIxi','log','exit','982HTDkmz','4645230ItGrQa','success'];a61_0xcfa0=function(){return _0x29f2e5;};return a61_0xcfa0();}
1
+ (function(_0x40adac,_0x3fb41b){const _0x426f9f=a59_0x2662,_0xe73772=_0x40adac();while(!![]){try{const _0x50a629=parseInt(_0x426f9f(0xd5))/0x1*(parseInt(_0x426f9f(0xc5))/0x2)+parseInt(_0x426f9f(0xd0))/0x3*(-parseInt(_0x426f9f(0xcf))/0x4)+-parseInt(_0x426f9f(0xca))/0x5+-parseInt(_0x426f9f(0xcd))/0x6*(-parseInt(_0x426f9f(0xcc))/0x7)+parseInt(_0x426f9f(0xd4))/0x8+-parseInt(_0x426f9f(0xc8))/0x9*(parseInt(_0x426f9f(0xd2))/0xa)+parseInt(_0x426f9f(0xc9))/0xb;if(_0x50a629===_0x3fb41b)break;else _0xe73772['push'](_0xe73772['shift']());}catch(_0x26abb8){_0xe73772['push'](_0xe73772['shift']());}}}(a59_0x2f7e,0x41a2b));function a59_0x2f7e(){const _0x8a401e=['log','260740lIaMGt','3vzXGPR','mcp.claudeConfig.error','10GKKMLr','message','887800TXkQge','2fJmwjb','36420gGofSS','exit','cwd','1065429XYScLX','3783043rInqZq','482410xWrdDG','success','4529vTiHnP','534rnfTVL'];a59_0x2f7e=function(){return _0x8a401e;};return a59_0x2f7e();}function a59_0x2662(_0x2ec207,_0x1cb8dc){_0x2ec207=_0x2ec207-0xc5;const _0x2f7e3b=a59_0x2f7e();let _0x2662ef=_0x2f7e3b[_0x2ec207];return _0x2662ef;}import{configureClaudeMcp as a59_0x3754ad}from'./mcp-installer.js';import a59_0x4183a6 from'../i18n/index.js';export async function configureClaudeMcp(){const _0x3c63f6=a59_0x2662,_0x27fc5c=process[_0x3c63f6(0xc7)](),_0x2ea1df=a59_0x3754ad(_0x27fc5c);_0x2ea1df[_0x3c63f6(0xcb)]?(console[_0x3c63f6(0xce)]('\x0a📋\x20'+_0x2ea1df[_0x3c63f6(0xd3)]+'\x0a'),process[_0x3c63f6(0xc6)](0x0)):(console['error'](a59_0x4183a6['t'](_0x3c63f6(0xd1),{'error':_0x2ea1df[_0x3c63f6(0xd3)]})),process[_0x3c63f6(0xc6)](0x1));}
package/lib/mcp/cursor.js CHANGED
@@ -1 +1 @@
1
- function a62_0x415d(_0xdaa75d,_0x307030){_0xdaa75d=_0xdaa75d-0x10f;const _0x991ab3=a62_0x991a();let _0x415dfb=_0x991ab3[_0xdaa75d];return _0x415dfb;}(function(_0x3a232,_0x7a3f14){const _0x606c5a=a62_0x415d,_0x59086e=_0x3a232();while(!![]){try{const _0x32d0f7=parseInt(_0x606c5a(0x113))/0x1+-parseInt(_0x606c5a(0x115))/0x2*(-parseInt(_0x606c5a(0x11b))/0x3)+-parseInt(_0x606c5a(0x111))/0x4*(-parseInt(_0x606c5a(0x116))/0x5)+-parseInt(_0x606c5a(0x114))/0x6+-parseInt(_0x606c5a(0x11d))/0x7+-parseInt(_0x606c5a(0x11e))/0x8*(-parseInt(_0x606c5a(0x119))/0x9)+-parseInt(_0x606c5a(0x11a))/0xa;if(_0x32d0f7===_0x7a3f14)break;else _0x59086e['push'](_0x59086e['shift']());}catch(_0x27148a){_0x59086e['push'](_0x59086e['shift']());}}}(a62_0x991a,0xacf6c));function a62_0x991a(){const _0xb0ae02=['mcp.cursorConfig.configInfo','cwd','message','297472jaeKmC','log','217443CAbPxR','3207012txRYUa','88670OqdTyA','10aXvugJ','mcp.cursorConfig.success','error','198eMHiqL','3735290VofafI','15UERuec','exit','1513939xuAjWI','452696cxVXPh'];a62_0x991a=function(){return _0xb0ae02;};return a62_0x991a();}import{configureCursorMcp as a62_0x1dd540}from'./mcp-installer.js';import a62_0xb5e884 from'../i18n/index.js';export async function configureCursorMcp(){const _0x4428ad=a62_0x415d,_0x12c25d=process[_0x4428ad(0x10f)](),_0x19699a=await a62_0x1dd540(_0x12c25d);_0x19699a['success']?(console[_0x4428ad(0x112)](a62_0xb5e884['t'](_0x4428ad(0x117))),console[_0x4428ad(0x112)](a62_0xb5e884['t'](_0x4428ad(0x11f))),console[_0x4428ad(0x112)]('\x20\x20'+_0x19699a[_0x4428ad(0x110)]+'\x0a'),console['log'](a62_0xb5e884['t']('mcp.cursorConfig.usageHint')),console[_0x4428ad(0x112)](a62_0xb5e884['t']('mcp.cursorConfig.restartRequired')),process[_0x4428ad(0x11c)](0x0)):(console[_0x4428ad(0x118)](a62_0xb5e884['t']('mcp.cursorConfig.error',{'error':_0x19699a['message']})),process['exit'](0x1));}
1
+ (function(_0x10dda3,_0x481f31){const _0x225ba4=a60_0x15c9,_0x4e8b53=_0x10dda3();while(!![]){try{const _0x50d458=parseInt(_0x225ba4(0x1e8))/0x1+parseInt(_0x225ba4(0x1e4))/0x2+-parseInt(_0x225ba4(0x1e0))/0x3*(parseInt(_0x225ba4(0x1ec))/0x4)+-parseInt(_0x225ba4(0x1de))/0x5*(-parseInt(_0x225ba4(0x1e3))/0x6)+-parseInt(_0x225ba4(0x1e5))/0x7+parseInt(_0x225ba4(0x1e7))/0x8+-parseInt(_0x225ba4(0x1e6))/0x9;if(_0x50d458===_0x481f31)break;else _0x4e8b53['push'](_0x4e8b53['shift']());}catch(_0xa8537){_0x4e8b53['push'](_0x4e8b53['shift']());}}}(a60_0x2304,0xaf6b0));import{configureCursorMcp as a60_0x8d8fb8}from'./mcp-installer.js';import a60_0x3aded2 from'../i18n/index.js';export async function configureCursorMcp(){const _0x150ef4=a60_0x15c9,_0x5237d8=process[_0x150ef4(0x1ea)](),_0x3fa935=await a60_0x8d8fb8(_0x5237d8);_0x3fa935[_0x150ef4(0x1df)]?(console[_0x150ef4(0x1ee)](a60_0x3aded2['t'](_0x150ef4(0x1e1))),console[_0x150ef4(0x1ee)](a60_0x3aded2['t'](_0x150ef4(0x1ed))),console[_0x150ef4(0x1ee)]('\x20\x20'+_0x3fa935['message']+'\x0a'),console[_0x150ef4(0x1ee)](a60_0x3aded2['t']('mcp.cursorConfig.usageHint')),console[_0x150ef4(0x1ee)](a60_0x3aded2['t'](_0x150ef4(0x1e2))),process[_0x150ef4(0x1dd)](0x0)):(console[_0x150ef4(0x1e9)](a60_0x3aded2['t']('mcp.cursorConfig.error',{'error':_0x3fa935[_0x150ef4(0x1eb)]})),process[_0x150ef4(0x1dd)](0x1));}function a60_0x15c9(_0x4593b8,_0x335378){_0x4593b8=_0x4593b8-0x1dd;const _0x23049e=a60_0x2304();let _0x15c9e7=_0x23049e[_0x4593b8];return _0x15c9e7;}function a60_0x2304(){const _0x3571bb=['mcp.cursorConfig.configInfo','log','exit','1165WuaFLS','success','39FXeqNv','mcp.cursorConfig.success','mcp.cursorConfig.restartRequired','22182nabWAa','1022914yvyTcv','2245488Cahtvt','2979450VKPYem','2890984WwoRqE','101866xvDotw','error','cwd','message','143308OsUNAF'];a60_0x2304=function(){return _0x3571bb;};return a60_0x2304();}
package/lib/mcp/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4cabcc,_0x33721){const _0x1b8ead=a63_0x5440,_0x30b71f=_0x4cabcc();while(!![]){try{const _0x4150cb=parseInt(_0x1b8ead(0xc3))/0x1+-parseInt(_0x1b8ead(0xab))/0x2+parseInt(_0x1b8ead(0xc6))/0x3*(-parseInt(_0x1b8ead(0xaf))/0x4)+parseInt(_0x1b8ead(0x8e))/0x5+-parseInt(_0x1b8ead(0xb6))/0x6*(-parseInt(_0x1b8ead(0x92))/0x7)+-parseInt(_0x1b8ead(0x93))/0x8*(-parseInt(_0x1b8ead(0xa4))/0x9)+parseInt(_0x1b8ead(0xb0))/0xa*(-parseInt(_0x1b8ead(0xbe))/0xb);if(_0x4150cb===_0x33721)break;else _0x30b71f['push'](_0x30b71f['shift']());}catch(_0x373b){_0x30b71f['push'](_0x30b71f['shift']());}}}(a63_0x5d28,0x750cb));import{configureCursorMcp}from'./cursor.js';import{configureClaudeMcp}from'./claude.js';import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import a63_0x42ab86 from'../i18n/index.js';export async function mcpCommand(_0x536bf1,_0x3f5101,_0x2100bc){const _0x12429f=a63_0x5440;logger[_0x12429f(0x8b)](process[_0x12429f(0xa7)]());if(_0x2100bc?.[_0x12429f(0xc7)]||_0x536bf1===_0x12429f(0xa3)){showHelp();return;}_0x536bf1!==_0x12429f(0xb9)&&(console[_0x12429f(0xb7)](a63_0x42ab86['t'](_0x12429f(0xc1),{'cmd':_0x536bf1||'-'})),console[_0x12429f(0x9d)](a63_0x42ab86['t'](_0x12429f(0xbb))),console['log'](a63_0x42ab86['t'](_0x12429f(0xb4))),console[_0x12429f(0x9d)](a63_0x42ab86['t'](_0x12429f(0xbd))),logger[_0x12429f(0xb7)](_0x12429f(0x9e),a63_0x42ab86['t']('mcp.error.unsupportedCommand',{'cmd':_0x536bf1||'-'})),process[_0x12429f(0xb1)](0x1));let _0x46758c;if(_0x2100bc?.['mcpCursor'])_0x46758c=_0x12429f(0x87);else{if(_0x2100bc?.[_0x12429f(0xc8)])_0x46758c=_0x12429f(0x8d);else{if(_0x3f5101?.[0x0]){const _0x29099e=_0x3f5101[0x0][_0x12429f(0xa1)]();MCP_IDES[_0x12429f(0x95)](_0x29099e)&&(_0x46758c=_0x29099e);}}}await installMcp(_0x46758c);}function a63_0x5440(_0x326ef8,_0x318242){_0x326ef8=_0x326ef8-0x86;const _0x5d28ad=a63_0x5d28();let _0x54408a=_0x5d28ad[_0x326ef8];return _0x54408a;}function showHelp(){const _0x50b3a0=a63_0x5440;console[_0x50b3a0(0x9d)]('\x0a'+a63_0x42ab86['t']('mcp.help.title')+'\x0a\x0a'+a63_0x42ab86['t']('mcp.help.usage.help')+'\x0a'+a63_0x42ab86['t']('mcp.help.usage.install')+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xa6))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x8f))+'\x0a\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x96))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xb3))+_0x50b3a0(0xa2)+a63_0x42ab86['t']('mcp.help.configMethodsInteractiveHint')+'\x0a\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xad))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x8c))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xae))+'\x0a\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x94))+'\x0a'+Array[_0x50b3a0(0xa5)](MCP_IDES)[_0x50b3a0(0x9a)]((_0x4af04d,_0x214ecc)=>'\x20\x20'+(_0x214ecc+0x1)+'.\x20'+IDE_CONFIGS[_0x4af04d]['name']+_0x50b3a0(0xc2)+IDE_CONFIGS[_0x4af04d][_0x50b3a0(0x9c)])[_0x50b3a0(0xb8)]('\x0a')+'\x0a\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xc0))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x89))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xaa))+'\x0a\x0a'+a63_0x42ab86['t'](_0x50b3a0(0xbf))+'\x0a'+a63_0x42ab86['t'](_0x50b3a0(0x8a))+'\x0a\x0a'+a63_0x42ab86['t']('mcp.help.configGuide')+_0x50b3a0(0x97));}async function selectIDE(){const _0x2c932c=a63_0x5440;console['log'](a63_0x42ab86['t']('mcp.select.chooseIDE'));const _0x3ce2be=Array[_0x2c932c(0xa5)](MCP_IDES);return _0x3ce2be[_0x2c932c(0x91)]((_0x63ab80,_0x2e29ee)=>{const _0x4e1358=_0x2c932c;console['log']('\x20\x20'+(_0x2e29ee+0x1)+'.\x20'+IDE_CONFIGS[_0x63ab80]['name']+'\x20-\x20'+IDE_CONFIGS[_0x63ab80][_0x4e1358(0x9c)]);}),console[_0x2c932c(0x9d)](a63_0x42ab86['t'](_0x2c932c(0xa0))),console['log'](a63_0x42ab86['t'](_0x2c932c(0xa9))),new Promise(_0x4f0c35=>{const _0x28a45f=_0x2c932c,_0x4ea6d9=createInterface({'input':process[_0x28a45f(0xbc)],'output':process[_0x28a45f(0xba)]});_0x4ea6d9[_0x28a45f(0x86)](a63_0x42ab86['t'](_0x28a45f(0xb2)),_0xdad3a3=>{const _0x2e7dc6=_0x28a45f;_0x4ea6d9[_0x2e7dc6(0xac)]();const _0x335578=_0xdad3a3[_0x2e7dc6(0x9b)]()[_0x2e7dc6(0xa1)]();(_0x335578==='q'||_0x335578===_0x2e7dc6(0x88)||_0x335578===_0x2e7dc6(0xb1))&&(console[_0x2e7dc6(0x9d)](a63_0x42ab86['t'](_0x2e7dc6(0xb5))),process[_0x2e7dc6(0xb1)](0x0));const _0x433c0c=parseInt(_0x335578,0xa);if(!isNaN(_0x433c0c)&&_0x433c0c>=0x1&&_0x433c0c<=_0x3ce2be[_0x2e7dc6(0x9f)]){const _0x2a75f1=_0x3ce2be[_0x433c0c-0x1];_0x2a75f1&&_0x4f0c35(_0x2a75f1);return;}console[_0x2e7dc6(0x9d)](a63_0x42ab86['t'](_0x2e7dc6(0x98),{'count':_0x3ce2be[_0x2e7dc6(0x9f)]})),process[_0x2e7dc6(0xb1)](0x1);});});}async function installMcp(_0x17ba3b){const _0x250a51=a63_0x5440;let _0x1095a6;!_0x17ba3b?_0x1095a6=await selectIDE():_0x1095a6=_0x17ba3b;try{const _0x20c016=IDE_CONFIGS[_0x1095a6];console[_0x250a51(0x9d)](a63_0x42ab86['t'](_0x250a51(0xc4),{'name':_0x20c016[_0x250a51(0x99)]}));switch(_0x1095a6){case _0x250a51(0x87):await configureCursorMcp();break;case'claude':await configureClaudeMcp();break;}}catch(_0x3fde3e){logger[_0x250a51(0xb7)](_0x250a51(0xa8),a63_0x42ab86['t'](_0x250a51(0xc5),{'error':_0x3fde3e instanceof Error?_0x3fde3e[_0x250a51(0x90)]:String(_0x3fde3e)}),{'error':_0x3fde3e instanceof Error?_0x3fde3e[_0x250a51(0x90)]:String(_0x3fde3e)}),console[_0x250a51(0xb7)](a63_0x42ab86['t'](_0x250a51(0xc5),{'error':_0x3fde3e instanceof Error?_0x3fde3e[_0x250a51(0x90)]:String(_0x3fde3e)})),process[_0x250a51(0xb1)](0x1);}}function a63_0x5d28(){const _0x5a1b4e=['toLowerCase','\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x0a','--help','1513611ijgTRo','from','mcp.help.usage.installCursor','cwd','mcp-install','mcp.select.enterNumber','mcp.help.exampleInstallHint','1237514TutowF','close','mcp.help.configMethodsDirect','mcp.help.configMethodsDirectClaude','1380SqVYmE','10YkHJDh','exit','mcp.select.prompt','mcp.help.configMethodsInteractive','mcp.help.command.install','mcp.select.cancelled','294JTfbyL','error','join','install','stdout','mcp.help.availableCommands','stdin','mcp.help.command.help','2694054LtLAmN','mcp.help.exampleInstallCursor','mcp.help.examples','mcp.error.unsupportedCommand','\x20-\x20','625626xZjaJn','mcp.installFlow.configuring','mcp.installFlow.error','5145pgLHBJ','help','mcpClaude','question','cursor','quit','mcp.help.exampleInstall','mcp.help.exampleInstallCursorHint','setLogPath','mcp.help.configMethodsDirectCursor','claude','3748555VngTwD','mcp.help.usage.installClaude','message','forEach','55895COtTPn','8zIRwce','mcp.help.supportedIDEs','has','mcp.help.configMethods','\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a','mcp.select.invalidChoice','name','map','trim','description','log','mcp','length','mcp.select.cancel'];a63_0x5d28=function(){return _0x5a1b4e;};return a63_0x5d28();}
1
+ (function(_0x1efb3e,_0x156e6a){const _0x176358=a61_0x4489,_0x48c0b1=_0x1efb3e();while(!![]){try{const _0x3e3423=-parseInt(_0x176358(0x1e9))/0x1+parseInt(_0x176358(0x202))/0x2*(parseInt(_0x176358(0x205))/0x3)+parseInt(_0x176358(0x1da))/0x4*(-parseInt(_0x176358(0x20e))/0x5)+parseInt(_0x176358(0x208))/0x6+-parseInt(_0x176358(0x1de))/0x7*(parseInt(_0x176358(0x1e0))/0x8)+-parseInt(_0x176358(0x20b))/0x9+-parseInt(_0x176358(0x1f6))/0xa*(-parseInt(_0x176358(0x1ee))/0xb);if(_0x3e3423===_0x156e6a)break;else _0x48c0b1['push'](_0x48c0b1['shift']());}catch(_0x388da6){_0x48c0b1['push'](_0x48c0b1['shift']());}}}(a61_0x1ec8,0x305b6));import{configureCursorMcp}from'./cursor.js';function a61_0x4489(_0x4d7ed8,_0x10ef71){_0x4d7ed8=_0x4d7ed8-0x1da;const _0x1ec8c4=a61_0x1ec8();let _0x448908=_0x1ec8c4[_0x4d7ed8];return _0x448908;}import{configureClaudeMcp}from'./claude.js';function a61_0x1ec8(){const _0x309c4f=['cursor','help','345386HylvyE','map','mcp.help.exampleInstallCursorHint','6ELnxlH','mcp.help.configGuide','mcp.help.supportedIDEs','672864OUVkAy','length','mcp-install','1897281uEAttT','mcp.select.cancel','mcp.help.configMethodsDirect','4955iIeEwc','name','message','mcp.help.examples','\x0a\x20\x20https://help.yuntoo.com/mcp/config-guide\x0a','toLowerCase','--help','forEach','944QyolnN','description','mcp.help.usage.help','from','2534567gMNqjy','close','8nmLPym','error','join','mcp.help.usage.install','mcp.select.prompt','mcp.error.unsupportedCommand','quit','mcp.help.configMethodsDirectCursor','mcp.help.exampleInstallCursor','356667jQiPrB','\x0a\x20\x20\x20\x20$\x20lovrabet\x20mcp\x20install\x0a','mcp.help.configMethodsDirectClaude','trim','install','6853xyoqpA','mcp.help.exampleInstall','log','question','mcp.help.usage.installClaude','mcp.help.command.install','mcp.help.configMethods','stdin','14510STyswY','setLogPath','mcp.select.chooseIDE','mcpClaude','mcp.installFlow.error','mcp.select.enterNumber','mcp.help.exampleInstallHint','claude','exit','mcp.installFlow.configuring'];a61_0x1ec8=function(){return _0x309c4f;};return a61_0x1ec8();}import{logger}from'../utils/logger.js';import{createInterface}from'node:readline';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import a61_0x1776fd from'../i18n/index.js';export async function mcpCommand(_0x2c325a,_0x398556,_0x190dcd){const _0x1a62e3=a61_0x4489;logger[_0x1a62e3(0x1f7)](process['cwd']());if(_0x190dcd?.[_0x1a62e3(0x201)]||_0x2c325a===_0x1a62e3(0x214)){showHelp();return;}_0x2c325a!==_0x1a62e3(0x1ed)&&(console[_0x1a62e3(0x1e1)](a61_0x1776fd['t']('mcp.error.unsupportedCommand',{'cmd':_0x2c325a||'-'})),console['log'](a61_0x1776fd['t']('mcp.help.availableCommands')),console[_0x1a62e3(0x1f0)](a61_0x1776fd['t'](_0x1a62e3(0x1f3))),console[_0x1a62e3(0x1f0)](a61_0x1776fd['t']('mcp.help.command.help')),logger['error']('mcp',a61_0x1776fd['t'](_0x1a62e3(0x1e5),{'cmd':_0x2c325a||'-'})),process[_0x1a62e3(0x1fe)](0x1));let _0x50bbd6;if(_0x190dcd?.['mcpCursor'])_0x50bbd6=_0x1a62e3(0x200);else{if(_0x190dcd?.[_0x1a62e3(0x1f9)])_0x50bbd6=_0x1a62e3(0x1fd);else{if(_0x398556?.[0x0]){const _0x1dc680=_0x398556[0x0][_0x1a62e3(0x213)]();MCP_IDES['has'](_0x1dc680)&&(_0x50bbd6=_0x1dc680);}}}await installMcp(_0x50bbd6);}function showHelp(){const _0x280d16=a61_0x4489;console['log']('\x0a'+a61_0x1776fd['t']('mcp.help.title')+'\x0a\x0a'+a61_0x1776fd['t'](_0x280d16(0x1dc))+'\x0a'+a61_0x1776fd['t'](_0x280d16(0x1e3))+'\x0a'+a61_0x1776fd['t']('mcp.help.usage.installCursor')+'\x0a'+a61_0x1776fd['t'](_0x280d16(0x1f2))+'\x0a\x0a'+a61_0x1776fd['t'](_0x280d16(0x1f4))+'\x0a'+a61_0x1776fd['t']('mcp.help.configMethodsInteractive')+_0x280d16(0x1ea)+a61_0x1776fd['t']('mcp.help.configMethodsInteractiveHint')+'\x0a\x0a'+a61_0x1776fd['t'](_0x280d16(0x20d))+'\x0a'+a61_0x1776fd['t'](_0x280d16(0x1e7))+'\x0a'+a61_0x1776fd['t'](_0x280d16(0x1eb))+'\x0a\x0a'+a61_0x1776fd['t'](_0x280d16(0x207))+'\x0a'+Array['from'](MCP_IDES)[_0x280d16(0x203)]((_0x54bee3,_0x1f8b51)=>'\x20\x20'+(_0x1f8b51+0x1)+'.\x20'+IDE_CONFIGS[_0x54bee3]['name']+'\x20-\x20'+IDE_CONFIGS[_0x54bee3][_0x280d16(0x1db)])[_0x280d16(0x1e2)]('\x0a')+'\x0a\x0a'+a61_0x1776fd['t'](_0x280d16(0x211))+'\x0a'+a61_0x1776fd['t'](_0x280d16(0x1ef))+'\x0a'+a61_0x1776fd['t'](_0x280d16(0x1fc))+'\x0a\x0a'+a61_0x1776fd['t'](_0x280d16(0x1e8))+'\x0a'+a61_0x1776fd['t'](_0x280d16(0x204))+'\x0a\x0a'+a61_0x1776fd['t'](_0x280d16(0x206))+_0x280d16(0x212));}async function selectIDE(){const _0x1f6fe8=a61_0x4489;console[_0x1f6fe8(0x1f0)](a61_0x1776fd['t'](_0x1f6fe8(0x1f8)));const _0x469592=Array[_0x1f6fe8(0x1dd)](MCP_IDES);return _0x469592[_0x1f6fe8(0x215)]((_0x51f3e5,_0x535c0b)=>{const _0x44c7b4=_0x1f6fe8;console[_0x44c7b4(0x1f0)]('\x20\x20'+(_0x535c0b+0x1)+'.\x20'+IDE_CONFIGS[_0x51f3e5][_0x44c7b4(0x20f)]+'\x20-\x20'+IDE_CONFIGS[_0x51f3e5][_0x44c7b4(0x1db)]);}),console[_0x1f6fe8(0x1f0)](a61_0x1776fd['t'](_0x1f6fe8(0x20c))),console['log'](a61_0x1776fd['t'](_0x1f6fe8(0x1fb))),new Promise(_0x1490e7=>{const _0x2669b2=_0x1f6fe8,_0x3b3d0c=createInterface({'input':process[_0x2669b2(0x1f5)],'output':process['stdout']});_0x3b3d0c[_0x2669b2(0x1f1)](a61_0x1776fd['t'](_0x2669b2(0x1e4)),_0x469dc1=>{const _0x2b76d2=_0x2669b2;_0x3b3d0c[_0x2b76d2(0x1df)]();const _0x50904c=_0x469dc1[_0x2b76d2(0x1ec)]()[_0x2b76d2(0x213)]();(_0x50904c==='q'||_0x50904c===_0x2b76d2(0x1e6)||_0x50904c===_0x2b76d2(0x1fe))&&(console['log'](a61_0x1776fd['t']('mcp.select.cancelled')),process[_0x2b76d2(0x1fe)](0x0));const _0x4e0eea=parseInt(_0x50904c,0xa);if(!isNaN(_0x4e0eea)&&_0x4e0eea>=0x1&&_0x4e0eea<=_0x469592[_0x2b76d2(0x209)]){const _0x2ae323=_0x469592[_0x4e0eea-0x1];_0x2ae323&&_0x1490e7(_0x2ae323);return;}console[_0x2b76d2(0x1f0)](a61_0x1776fd['t']('mcp.select.invalidChoice',{'count':_0x469592[_0x2b76d2(0x209)]})),process[_0x2b76d2(0x1fe)](0x1);});});}async function installMcp(_0x25655e){const _0x4c40f4=a61_0x4489;let _0x2dba47;!_0x25655e?_0x2dba47=await selectIDE():_0x2dba47=_0x25655e;try{const _0x49282f=IDE_CONFIGS[_0x2dba47];console[_0x4c40f4(0x1f0)](a61_0x1776fd['t'](_0x4c40f4(0x1ff),{'name':_0x49282f['name']}));switch(_0x2dba47){case _0x4c40f4(0x200):await configureCursorMcp();break;case _0x4c40f4(0x1fd):await configureClaudeMcp();break;}}catch(_0x540acc){logger['error'](_0x4c40f4(0x20a),a61_0x1776fd['t']('mcp.installFlow.error',{'error':_0x540acc instanceof Error?_0x540acc['message']:String(_0x540acc)}),{'error':_0x540acc instanceof Error?_0x540acc[_0x4c40f4(0x210)]:String(_0x540acc)}),console[_0x4c40f4(0x1e1)](a61_0x1776fd['t'](_0x4c40f4(0x1fa),{'error':_0x540acc instanceof Error?_0x540acc[_0x4c40f4(0x210)]:String(_0x540acc)})),process['exit'](0x1);}}
@@ -1 +1 @@
1
- const a64_0x266d90=a64_0x220b;(function(_0x143a1b,_0x54d964){const _0x5b09e4=a64_0x220b,_0x1473aa=_0x143a1b();while(!![]){try{const _0x49abb0=-parseInt(_0x5b09e4(0x1e1))/0x1+parseInt(_0x5b09e4(0x1d5))/0x2+parseInt(_0x5b09e4(0x1d7))/0x3*(parseInt(_0x5b09e4(0x1eb))/0x4)+-parseInt(_0x5b09e4(0x1e8))/0x5*(-parseInt(_0x5b09e4(0x1d3))/0x6)+-parseInt(_0x5b09e4(0x1d9))/0x7*(-parseInt(_0x5b09e4(0x1de))/0x8)+-parseInt(_0x5b09e4(0x1e9))/0x9+parseInt(_0x5b09e4(0x1d6))/0xa;if(_0x49abb0===_0x54d964)break;else _0x1473aa['push'](_0x1473aa['shift']());}catch(_0x304e19){_0x1473aa['push'](_0x1473aa['shift']());}}}(a64_0x26e4,0x1e02a));import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{logger}from'../utils/logger.js';function a64_0x26e4(){const _0x1e2e8b=['69pThyDD','success','126ogRQgb','claude','log','mcp.install.otherIDE','cwd','13016oAIFTC','mcp-install-non-interactive','length','232296QRpTcB','mcp.claude','filter','mcp.install.success','message','error','mcp.cursor','350VRBria','1860480NLCpbd','mcp.install.failed','18412wblLPt','info','needsManualAction','mcp.install.manualActionRequired','mcp.install.unknownIDE','other','mcp.install.completed','setLogPath','1128EbzgOX','cursor','130044EFiYIh','3486010JAqblW'];a64_0x26e4=function(){return _0x1e2e8b;};return a64_0x26e4();}function a64_0x220b(_0x59516d,_0x46135e){_0x59516d=_0x59516d-0x1cd;const _0x26e47d=a64_0x26e4();let _0x220b61=_0x26e47d[_0x59516d];return _0x220b61;}import a64_0x472424 from'../i18n/index.js';export async function installMcpNonInteractive(_0x82a139,_0x51cc2f=process[a64_0x266d90(0x1dd)]()){const _0x271644=a64_0x266d90;logger[_0x271644(0x1d2)](_0x51cc2f),logger[_0x271644(0x1ec)](_0x271644(0x1df),a64_0x472424['t']('mcp.install.starting'),{'ides':_0x82a139});const _0x2800a2=[];for(const _0xd0392c of _0x82a139){try{let _0x4a934d;switch(_0xd0392c){case _0x271644(0x1d4):_0x4a934d=await configureCursorMcp(_0x51cc2f);break;case'claude':_0x4a934d=configureClaudeMcp(_0x51cc2f);break;case _0x271644(0x1d0):_0x4a934d=showOtherMcpGuide(_0x51cc2f);break;default:_0x4a934d={'success':![],'message':a64_0x472424['t'](_0x271644(0x1cf),{'ide':_0xd0392c})};}_0x2800a2['push'](_0x4a934d);if(_0x4a934d[_0x271644(0x1d8)]){const _0x5831fa=_0xd0392c==='cursor'?a64_0x472424['t'](_0x271644(0x1e7)):_0xd0392c===_0x271644(0x1da)?a64_0x472424['t'](_0x271644(0x1e2)):a64_0x472424['t'](_0x271644(0x1dc));console[_0x271644(0x1db)](a64_0x472424['t'](_0x271644(0x1e4),{'ide':_0x5831fa})),console[_0x271644(0x1db)]('\x20\x20'+_0x4a934d[_0x271644(0x1e5)]);}else console[_0x271644(0x1e6)](a64_0x472424['t']('mcp.install.failed',{'ide':_0xd0392c===_0x271644(0x1d4)?a64_0x472424['t'](_0x271644(0x1e7)):_0xd0392c===_0x271644(0x1da)?a64_0x472424['t']('mcp.claude'):a64_0x472424['t'](_0x271644(0x1dc)),'error':_0x4a934d[_0x271644(0x1e5)]}));}catch(_0x294dd6){console[_0x271644(0x1e6)](a64_0x472424['t'](_0x271644(0x1ea),{'ide':_0xd0392c==='cursor'?a64_0x472424['t'](_0x271644(0x1e7)):_0xd0392c==='claude'?a64_0x472424['t'](_0x271644(0x1e2)):a64_0x472424['t'](_0x271644(0x1dc)),'error':_0x294dd6 instanceof Error?_0x294dd6[_0x271644(0x1e5)]:String(_0x294dd6)}));}}const _0x59b43e=_0x2800a2[_0x271644(0x1e3)](_0x42901e=>_0x42901e[_0x271644(0x1d8)])['length'],_0x3f61c3=_0x2800a2[_0x271644(0x1e0)];console['log'](a64_0x472424['t'](_0x271644(0x1d1),{'successCount':_0x59b43e,'totalCount':_0x3f61c3}));const _0xb5fbf1=_0x2800a2['some'](_0x1f3d00=>_0x1f3d00[_0x271644(0x1cd)]);_0xb5fbf1&&console[_0x271644(0x1db)](a64_0x472424['t'](_0x271644(0x1ce)));}
1
+ const a62_0x437fed=a62_0x4357;(function(_0x277b9a,_0x3178bd){const _0x4dfce9=a62_0x4357,_0x5a616c=_0x277b9a();while(!![]){try{const _0x5b1eab=-parseInt(_0x4dfce9(0xbb))/0x1*(parseInt(_0x4dfce9(0xd0))/0x2)+parseInt(_0x4dfce9(0xc1))/0x3+parseInt(_0x4dfce9(0xc3))/0x4*(-parseInt(_0x4dfce9(0xb7))/0x5)+-parseInt(_0x4dfce9(0xcb))/0x6+parseInt(_0x4dfce9(0xca))/0x7*(parseInt(_0x4dfce9(0xd1))/0x8)+parseInt(_0x4dfce9(0xc5))/0x9*(-parseInt(_0x4dfce9(0xc0))/0xa)+parseInt(_0x4dfce9(0xb6))/0xb;if(_0x5b1eab===_0x3178bd)break;else _0x5a616c['push'](_0x5a616c['shift']());}catch(_0x2991fa){_0x5a616c['push'](_0x5a616c['shift']());}}}(a62_0x47f8,0x8e4d7));function a62_0x4357(_0xca4c63,_0x421b9d){_0xca4c63=_0xca4c63-0xb5;const _0x47f8b8=a62_0x47f8();let _0x435700=_0x47f8b8[_0xca4c63];return _0x435700;}import{configureCursorMcp,configureClaudeMcp,showOtherMcpGuide}from'./mcp-installer.js';import{logger}from'../utils/logger.js';import a62_0x4d6f4f from'../i18n/index.js';export async function installMcpNonInteractive(_0x19bf01,_0x464555=process[a62_0x437fed(0xc6)]()){const _0x3532c7=a62_0x437fed;logger[_0x3532c7(0xc7)](_0x464555),logger[_0x3532c7(0xd4)]('mcp-install-non-interactive',a62_0x4d6f4f['t']('mcp.install.starting'),{'ides':_0x19bf01});const _0x1ed090=[];for(const _0x1f2667 of _0x19bf01){try{let _0x119caa;switch(_0x1f2667){case _0x3532c7(0xbd):_0x119caa=await configureCursorMcp(_0x464555);break;case _0x3532c7(0xb5):_0x119caa=configureClaudeMcp(_0x464555);break;case _0x3532c7(0xc4):_0x119caa=showOtherMcpGuide(_0x464555);break;default:_0x119caa={'success':![],'message':a62_0x4d6f4f['t'](_0x3532c7(0xc2),{'ide':_0x1f2667})};}_0x1ed090[_0x3532c7(0xcf)](_0x119caa);if(_0x119caa['success']){const _0xf342ac=_0x1f2667===_0x3532c7(0xbd)?a62_0x4d6f4f['t'](_0x3532c7(0xd3)):_0x1f2667===_0x3532c7(0xb5)?a62_0x4d6f4f['t'](_0x3532c7(0xb8)):a62_0x4d6f4f['t'](_0x3532c7(0xba));console['log'](a62_0x4d6f4f['t'](_0x3532c7(0xcc),{'ide':_0xf342ac})),console[_0x3532c7(0xbc)]('\x20\x20'+_0x119caa[_0x3532c7(0xcd)]);}else console[_0x3532c7(0xd2)](a62_0x4d6f4f['t'](_0x3532c7(0xb9),{'ide':_0x1f2667==='cursor'?a62_0x4d6f4f['t'](_0x3532c7(0xd3)):_0x1f2667===_0x3532c7(0xb5)?a62_0x4d6f4f['t'](_0x3532c7(0xb8)):a62_0x4d6f4f['t'](_0x3532c7(0xba)),'error':_0x119caa[_0x3532c7(0xcd)]}));}catch(_0x7b8086){console[_0x3532c7(0xd2)](a62_0x4d6f4f['t'](_0x3532c7(0xb9),{'ide':_0x1f2667==='cursor'?a62_0x4d6f4f['t'](_0x3532c7(0xd3)):_0x1f2667===_0x3532c7(0xb5)?a62_0x4d6f4f['t'](_0x3532c7(0xb8)):a62_0x4d6f4f['t'](_0x3532c7(0xba)),'error':_0x7b8086 instanceof Error?_0x7b8086['message']:String(_0x7b8086)}));}}const _0x289f4d=_0x1ed090[_0x3532c7(0xbf)](_0x44a182=>_0x44a182[_0x3532c7(0xbe)])[_0x3532c7(0xce)],_0x1fa1c8=_0x1ed090['length'];console[_0x3532c7(0xbc)](a62_0x4d6f4f['t']('mcp.install.completed',{'successCount':_0x289f4d,'totalCount':_0x1fa1c8}));const _0xe87556=_0x1ed090[_0x3532c7(0xc8)](_0x5a950=>_0x5a950['needsManualAction']);_0xe87556&&console['log'](a62_0x4d6f4f['t'](_0x3532c7(0xc9)));}function a62_0x47f8(){const _0xc6078b=['21498631szfEaf','5oYWvzP','mcp.claude','mcp.install.failed','mcp.install.otherIDE','11347qpmsaa','log','cursor','success','filter','646580IEkryF','1029045nKeyat','mcp.install.unknownIDE','2832732qeqBhq','other','27YsnQZA','cwd','setLogPath','some','mcp.install.manualActionRequired','2191vZboAy','4006194DBkzWq','mcp.install.success','message','length','push','66dHLIeA','5872Prjvaj','error','mcp.cursor','info','claude'];a62_0x47f8=function(){return _0xc6078b;};return a62_0x47f8();}
@@ -1 +1 @@
1
- (function(_0x23a76b,_0x36f445){const _0x2ebc84=a65_0x2daf,_0x163311=_0x23a76b();while(!![]){try{const _0x56e36d=-parseInt(_0x2ebc84(0x14f))/0x1*(parseInt(_0x2ebc84(0x162))/0x2)+parseInt(_0x2ebc84(0x174))/0x3+parseInt(_0x2ebc84(0x145))/0x4+parseInt(_0x2ebc84(0x152))/0x5*(parseInt(_0x2ebc84(0x15a))/0x6)+parseInt(_0x2ebc84(0x170))/0x7+parseInt(_0x2ebc84(0x159))/0x8*(-parseInt(_0x2ebc84(0x144))/0x9)+parseInt(_0x2ebc84(0x149))/0xa*(-parseInt(_0x2ebc84(0x175))/0xb);if(_0x56e36d===_0x36f445)break;else _0x163311['push'](_0x163311['shift']());}catch(_0x10eae2){_0x163311['push'](_0x163311['shift']());}}}(a65_0x314d,0xe0b9d));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';import a65_0x5d59df from'../i18n/index.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME='lovrabet-dataset';export const MCP_COMMAND='npx';export const MCP_ARGS=['@lovrabet/dataset-mcp-server@latest'];export function getAppConfig(){const _0x567682=a65_0x2daf,_0x38d722=readConfig(),_0x4953b0=_0x38d722[_0x567682(0x155)]||_0x38d722[_0x567682(0x13c)],_0x432b34=_0x38d722[_0x567682(0x143)]||_0x567682(0x15d);if(!_0x4953b0)throw new Error(a65_0x5d59df['t'](_0x567682(0x16e)));return{'appcode':String(_0x4953b0),'env':_0x432b34};}export function buildMcpEnv(_0x54f39d,_0x317963){const _0x37fd21=a65_0x2daf,_0x25c7db={'LOVRABET_APP_CODE':_0x54f39d};return _0x317963!=='online'&&(_0x25c7db[_0x37fd21(0x14c)]=_0x317963),_0x25c7db;}export function buildMcpServerConfig(_0x3ae782,_0x42403b){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x3ae782,_0x42403b)};}export function buildClaudeMcpCommand(_0x2bee73,_0x144cee){const _0x495ccd=a65_0x2daf,_0x25654d=_0x495ccd(0x134)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x495ccd(0x169)]('\x20')+_0x495ccd(0x135)+_0x2bee73,_0x3bfe2a=_0x144cee!==_0x495ccd(0x15d)?_0x495ccd(0x140)+_0x144cee:'';return''+_0x25654d+_0x3bfe2a;}export async function copyCursorRules(_0x3c15a7){const _0x4c1cae=a65_0x2daf,_0x417c2b=join(_0x3c15a7,_0x4c1cae(0x14d)),_0x48de9c=join(_0x417c2b,_0x4c1cae(0x153)),_0x53a87d=join(_0x48de9c,_0x4c1cae(0x171));if(existsSync(_0x53a87d))return logger[_0x4c1cae(0x13f)](_0x4c1cae(0x13e),a65_0x5d59df['t']('mcp.cursorConfig.rules.exists'),{'path':_0x53a87d}),![];try{ensureDir(_0x48de9c);const _0x20b466=await getRulesContent();return writeFileSync(_0x53a87d,_0x20b466,_0x4c1cae(0x168)),logger['info'](_0x4c1cae(0x13e),a65_0x5d59df['t']('mcp.cursorConfig.rules.created'),{'to':_0x53a87d}),!![];}catch(_0x1412a2){return logger[_0x4c1cae(0x157)](_0x4c1cae(0x13e),a65_0x5d59df['t'](_0x4c1cae(0x156)),{'error':_0x1412a2 instanceof Error?_0x1412a2[_0x4c1cae(0x15e)]:String(_0x1412a2)}),![];}}export async function copyAgentsMd(_0x37536f){const _0x255d04=a65_0x2daf,_0x374d2c=join(_0x37536f,_0x255d04(0x142));if(existsSync(_0x374d2c))return logger['info'](_0x255d04(0x13e),a65_0x5d59df['t'](_0x255d04(0x137)),{'path':_0x374d2c}),![];try{const _0x5a11c2=await getRulesContent();return writeFileSync(_0x374d2c,_0x5a11c2,'utf-8'),logger[_0x255d04(0x13f)](_0x255d04(0x13e),a65_0x5d59df['t'](_0x255d04(0x167)),{'to':_0x374d2c}),!![];}catch(_0x596d0a){return logger[_0x255d04(0x157)]('mcp-install',a65_0x5d59df['t'](_0x255d04(0x16a)),{'error':_0x596d0a instanceof Error?_0x596d0a[_0x255d04(0x15e)]:String(_0x596d0a)}),![];}}function a65_0x2daf(_0x45c406,_0xf52861){_0x45c406=_0x45c406-0x134;const _0x314d7c=a65_0x314d();let _0x2daf72=_0x314d7c[_0x45c406];return _0x2daf72;}export async function configureCursorMcp(_0x41e3a2){const _0x266f5a=a65_0x2daf;try{const {appcode:_0x5414cd,env:_0x5051e7}=getAppConfig(),_0x3ea29e=join(_0x41e3a2,'.cursor'),_0x55b44d=join(_0x3ea29e,_0x266f5a(0x151));ensureDir(_0x3ea29e);const _0x325579=buildMcpServerConfig(_0x5414cd,_0x5051e7);let _0x2c009b;if(existsSync(_0x55b44d)){const _0x2ea81a=readFileSync(_0x55b44d,_0x266f5a(0x16f));_0x2c009b=JSON[_0x266f5a(0x158)](_0x2ea81a),!_0x2c009b[_0x266f5a(0x16b)]&&(_0x2c009b[_0x266f5a(0x16b)]={}),logger['info']('mcp-cursor',a65_0x5d59df['t'](_0x266f5a(0x146)),{'path':_0x55b44d,'appcode':_0x5414cd,'env':_0x5051e7});}else _0x2c009b={'mcpServers':{}},logger[_0x266f5a(0x13f)](_0x266f5a(0x161),a65_0x5d59df['t'](_0x266f5a(0x163)),{'path':_0x55b44d,'appcode':_0x5414cd,'env':_0x5051e7});_0x2c009b[_0x266f5a(0x16b)][MCP_SERVER_NAME]=_0x325579,writeFileSync(_0x55b44d,JSON[_0x266f5a(0x16d)](_0x2c009b,null,0x2),{'encoding':'utf8'});const _0x4039e9=await copyCursorRules(_0x41e3a2),_0x35dd79=[a65_0x5d59df['t'](_0x266f5a(0x172)),_0x266f5a(0x13b)+_0x5414cd];return _0x5051e7!==_0x266f5a(0x15d)&&_0x35dd79[_0x266f5a(0x166)](a65_0x5d59df['t'](_0x266f5a(0x173),{'env':_0x5051e7})),_0x35dd79['push'](a65_0x5d59df['t'](_0x266f5a(0x160))),_0x4039e9&&_0x35dd79[_0x266f5a(0x166)](a65_0x5d59df['t'](_0x266f5a(0x15b))),logger['info'](_0x266f5a(0x161),a65_0x5d59df['t'](_0x266f5a(0x139)),{'appcode':_0x5414cd,'env':_0x5051e7,'configPath':_0x55b44d}),{'success':!![],'message':_0x35dd79[_0x266f5a(0x169)](_0x266f5a(0x16c))};}catch(_0x3975ed){return logger[_0x266f5a(0x157)](_0x266f5a(0x161),a65_0x5d59df['t']('mcp.cursorConfig.error',{'error':_0x3975ed instanceof Error?_0x3975ed['message']:String(_0x3975ed)}),{'error':_0x3975ed instanceof Error?_0x3975ed['message']:String(_0x3975ed)}),{'success':![],'message':_0x3975ed instanceof Error?_0x3975ed[_0x266f5a(0x15e)]:String(_0x3975ed)};}}export function configureClaudeMcp(_0x18c563){const _0x139125=a65_0x2daf;try{const {appcode:_0x5cca93,env:_0x5f55b0}=getAppConfig();copyAgentsMd(_0x18c563);const _0x144170=buildClaudeMcpCommand(_0x5cca93,_0x5f55b0),_0x27de32=[a65_0x5d59df['t'](_0x139125(0x14a)),''+_0x144170,a65_0x5d59df['t'](_0x139125(0x13a)),_0x139125(0x13b)+_0x5cca93];return _0x5f55b0!==_0x139125(0x15d)&&_0x27de32[_0x139125(0x166)](a65_0x5d59df['t']('mcp.config.env',{'env':_0x5f55b0})),_0x27de32['push'](a65_0x5d59df['t'](_0x139125(0x164))),logger[_0x139125(0x13f)](_0x139125(0x141),a65_0x5d59df['t'](_0x139125(0x154)),{'appcode':_0x5cca93,'env':_0x5f55b0,'command':_0x144170}),{'success':!![],'message':_0x27de32[_0x139125(0x169)]('\x0a\x20\x20'),'needsManualAction':!![]};}catch(_0x210499){return logger[_0x139125(0x157)](_0x139125(0x141),a65_0x5d59df['t'](_0x139125(0x15f),{'error':_0x210499 instanceof Error?_0x210499[_0x139125(0x15e)]:String(_0x210499)}),{'error':_0x210499 instanceof Error?_0x210499[_0x139125(0x15e)]:String(_0x210499)}),{'success':![],'message':_0x210499 instanceof Error?_0x210499['message']:String(_0x210499)};}}function a65_0x314d(){const _0x54420c=['push','mcp.claudeConfig.agents.created','utf-8','join','mcp.claudeConfig.agents.copyFailed','mcpServers','\x0a\x20\x20','stringify','mcp.error.missingAppcode','utf8','9937893pMyJio','lovrabet_rules.mdc','mcp.cursorConfig.written','mcp.config.env','4936950cizKwv','20603FAAsjD','claude\x20mcp\x20add\x20','\x20-e\x20LOVRABET_APP_CODE=','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','mcp.claudeConfig.agents.exists','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','mcp.cursorConfig.success','mcp.claudeConfig.configInfo','AppCode:\x20','app','mcp.other.configInfo','mcp-install','info','\x20-e\x20LOVRABET_ENV=','mcp-claude','agents.md','env','697482ozeyYt','2729408rwvtzT','mcp.cursorConfig.updateExisting','mcp.other.configGuide','\x22LOVRABET_ENV\x22:\x20\x22','19230KslaBP','mcp.claudeConfig.manualCommand','map','LOVRABET_ENV','.cursor','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','410819XhWODh','\x20\x20}','mcp.json','130autJYb','rules','mcp.claudeConfig.commandGenerated','appcode','mcp.cursorConfig.rules.copyFailed','error','parse','8nohdLt','291432btSCJx','mcp.cursorConfig.rules.created','mcp.other.guideShown','online','message','mcp.claudeConfig.error','mcp.cursorConfig.restartRequired','mcp-cursor','2fuzYHp','mcp.cursorConfig.createNew','mcp.claudeConfig.restartRequired','\x20\x20\x20\x20\x20\x20}'];a65_0x314d=function(){return _0x54420c;};return a65_0x314d();}export function showOtherMcpGuide(_0x1e2170){const _0x198a98=a65_0x2daf;try{const {appcode:_0x59b6eb,env:_0x2da441}=getAppConfig(),_0x41df22=buildMcpServerConfig(_0x59b6eb,_0x2da441),_0x6fd14a=['\x22LOVRABET_APP_CODE\x22:\x20\x22'+_0x59b6eb+'\x22'];_0x2da441!==_0x198a98(0x15d)&&_0x6fd14a[_0x198a98(0x166)](_0x198a98(0x148)+_0x2da441+'\x22');const _0x1cb281=[a65_0x5d59df['t'](_0x198a98(0x13d),{'appcode':_0x59b6eb,'env':_0x2da441}),'{','\x20\x20\x22mcpServers\x22:\x20{','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{',_0x198a98(0x138),_0x198a98(0x14e),_0x198a98(0x136),..._0x6fd14a[_0x198a98(0x14b)](_0x497f3c=>'\x20\x20\x20\x20\x20\x20\x20\x20'+_0x497f3c+','),_0x198a98(0x165),'\x20\x20\x20\x20}',_0x198a98(0x150),'}',a65_0x5d59df['t'](_0x198a98(0x147))];return logger[_0x198a98(0x13f)](_0x198a98(0x13e),a65_0x5d59df['t'](_0x198a98(0x15c)),{'appcode':_0x59b6eb,'env':_0x2da441}),{'success':!![],'message':_0x1cb281[_0x198a98(0x169)]('\x0a'),'needsManualAction':!![]};}catch(_0x1a78ab){return{'success':![],'message':_0x1a78ab instanceof Error?_0x1a78ab[_0x198a98(0x15e)]:String(_0x1a78ab)};}}function ensureDir(_0x45cadd){!existsSync(_0x45cadd)&&mkdirSync(_0x45cadd,{'recursive':!![]});}
1
+ const a63_0x2cd968=a63_0x2121;(function(_0x41968c,_0x2448ef){const _0x1f94e6=a63_0x2121,_0xe637e2=_0x41968c();while(!![]){try{const _0x4b8232=-parseInt(_0x1f94e6(0x150))/0x1+-parseInt(_0x1f94e6(0x149))/0x2*(-parseInt(_0x1f94e6(0x11e))/0x3)+-parseInt(_0x1f94e6(0x121))/0x4*(parseInt(_0x1f94e6(0x13e))/0x5)+-parseInt(_0x1f94e6(0x132))/0x6+parseInt(_0x1f94e6(0x120))/0x7+-parseInt(_0x1f94e6(0x119))/0x8+parseInt(_0x1f94e6(0x14d))/0x9;if(_0x4b8232===_0x2448ef)break;else _0xe637e2['push'](_0xe637e2['shift']());}catch(_0x32639d){_0xe637e2['push'](_0xe637e2['shift']());}}}(a63_0x46b3,0xf38d9));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';import a63_0x123d1a from'../i18n/index.js';const __dirname=dirname(fileURLToPath(import.meta.url));function a63_0x46b3(){const _0x281aed=['mcp-claude','mcp.claudeConfig.restartRequired','mcp.other.configGuide','mcp.claudeConfig.error','mcp.other.guideShown','mcp-cursor','stringify','11500KAIzZL','mcp.cursorConfig.rules.exists','mcp.other.configInfo','mcp.cursorConfig.written','AppCode:\x20','.cursor','app','map','message','info','mcpServers','4CQJlqC','mcp.cursorConfig.rules.created','lovrabet-dataset','LOVRABET_ENV','10814301lEcHeU','claude\x20mcp\x20add\x20','mcp.claudeConfig.configInfo','17901LJPWno','\x20-e\x20LOVRABET_APP_CODE=','mcp.cursorConfig.success','rules','online','mcp.cursorConfig.updateExisting','\x20\x20\x20\x20\x20\x20}','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','12025488CHxbpu','utf8','mcp.config.env','push','mcp.cursorConfig.error','2245932ZXvEdQ','\x20\x20}','13324612hQNGAv','1240SlXdfc','error','\x20-e\x20LOVRABET_ENV=','\x20\x20\x20\x20}','\x22LOVRABET_APP_CODE\x22:\x20\x22','utf-8','mcp.claudeConfig.manualCommand','mcp.cursorConfig.rules.copyFailed','\x20\x20\x20\x20\x20\x20\x20\x20','join','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[\x22@lovrabet/dataset-mcp-server@latest\x22],','\x20\x20\x22mcpServers\x22:\x20{','mcp-install','parse','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','agents.md','appcode','8224278axpZCt','\x0a\x20\x20','mcp.json','lovrabet_rules.mdc','@lovrabet/dataset-mcp-server@latest'];a63_0x46b3=function(){return _0x281aed;};return a63_0x46b3();}export const MCP_SERVER_NAME=a63_0x2cd968(0x14b);export const MCP_COMMAND='npx';export const MCP_ARGS=[a63_0x2cd968(0x136)];export function getAppConfig(){const _0x1f6f5c=a63_0x2cd968,_0x4ef85d=readConfig(),_0x36a3c7=_0x4ef85d[_0x1f6f5c(0x131)]||_0x4ef85d[_0x1f6f5c(0x144)],_0x27f29f=_0x4ef85d['env']||_0x1f6f5c(0x154);if(!_0x36a3c7)throw new Error(a63_0x123d1a['t']('mcp.error.missingAppcode'));return{'appcode':String(_0x36a3c7),'env':_0x27f29f};}export function buildMcpEnv(_0x39646f,_0x3d2cd6){const _0x20a3da=a63_0x2cd968,_0x3790b9={'LOVRABET_APP_CODE':_0x39646f};return _0x3d2cd6!=='online'&&(_0x3790b9[_0x20a3da(0x14c)]=_0x3d2cd6),_0x3790b9;}export function buildMcpServerConfig(_0x30ba73,_0x1b20c9){return{'command':MCP_COMMAND,'args':MCP_ARGS,'env':buildMcpEnv(_0x30ba73,_0x1b20c9)};}export function buildClaudeMcpCommand(_0x54bcc5,_0x44b38b){const _0x308e26=a63_0x2cd968,_0x215cf8=_0x308e26(0x14e)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x308e26(0x12a)]('\x20')+_0x308e26(0x151)+_0x54bcc5,_0x41110c=_0x44b38b!==_0x308e26(0x154)?_0x308e26(0x123)+_0x44b38b:'';return''+_0x215cf8+_0x41110c;}function a63_0x2121(_0x3c9fed,_0x2a9fcf){_0x3c9fed=_0x3c9fed-0x117;const _0x46b369=a63_0x46b3();let _0x2121ba=_0x46b369[_0x3c9fed];return _0x2121ba;}export async function copyCursorRules(_0x1856b9){const _0x1d6be8=a63_0x2cd968,_0x4fe608=join(_0x1856b9,_0x1d6be8(0x143)),_0x483753=join(_0x4fe608,_0x1d6be8(0x153)),_0x4f8aa8=join(_0x483753,_0x1d6be8(0x135));if(existsSync(_0x4f8aa8))return logger[_0x1d6be8(0x147)]('mcp-install',a63_0x123d1a['t'](_0x1d6be8(0x13f)),{'path':_0x4f8aa8}),![];try{ensureDir(_0x483753);const _0x5d38c5=await getRulesContent();return writeFileSync(_0x4f8aa8,_0x5d38c5,_0x1d6be8(0x126)),logger[_0x1d6be8(0x147)](_0x1d6be8(0x12d),a63_0x123d1a['t'](_0x1d6be8(0x14a)),{'to':_0x4f8aa8}),!![];}catch(_0x18878f){return logger[_0x1d6be8(0x122)](_0x1d6be8(0x12d),a63_0x123d1a['t'](_0x1d6be8(0x128)),{'error':_0x18878f instanceof Error?_0x18878f[_0x1d6be8(0x146)]:String(_0x18878f)}),![];}}export async function copyAgentsMd(_0x193ae6){const _0x412ba4=a63_0x2cd968,_0x26c144=join(_0x193ae6,_0x412ba4(0x130));if(existsSync(_0x26c144))return logger[_0x412ba4(0x147)](_0x412ba4(0x12d),a63_0x123d1a['t']('mcp.claudeConfig.agents.exists'),{'path':_0x26c144}),![];try{const _0x2a7d36=await getRulesContent();return writeFileSync(_0x26c144,_0x2a7d36,_0x412ba4(0x126)),logger[_0x412ba4(0x147)](_0x412ba4(0x12d),a63_0x123d1a['t']('mcp.claudeConfig.agents.created'),{'to':_0x26c144}),!![];}catch(_0x4bc61f){return logger[_0x412ba4(0x122)](_0x412ba4(0x12d),a63_0x123d1a['t']('mcp.claudeConfig.agents.copyFailed'),{'error':_0x4bc61f instanceof Error?_0x4bc61f[_0x412ba4(0x146)]:String(_0x4bc61f)}),![];}}export async function configureCursorMcp(_0x1d9694){const _0x2b8602=a63_0x2cd968;try{const {appcode:_0x235001,env:_0x21bb46}=getAppConfig(),_0x34e959=join(_0x1d9694,_0x2b8602(0x143)),_0x218ff5=join(_0x34e959,_0x2b8602(0x134));ensureDir(_0x34e959);const _0x4acbab=buildMcpServerConfig(_0x235001,_0x21bb46);let _0x3b0902;if(existsSync(_0x218ff5)){const _0x322ed1=readFileSync(_0x218ff5,_0x2b8602(0x11a));_0x3b0902=JSON[_0x2b8602(0x12e)](_0x322ed1),!_0x3b0902[_0x2b8602(0x148)]&&(_0x3b0902[_0x2b8602(0x148)]={}),logger[_0x2b8602(0x147)](_0x2b8602(0x13c),a63_0x123d1a['t'](_0x2b8602(0x155)),{'path':_0x218ff5,'appcode':_0x235001,'env':_0x21bb46});}else _0x3b0902={'mcpServers':{}},logger[_0x2b8602(0x147)](_0x2b8602(0x13c),a63_0x123d1a['t']('mcp.cursorConfig.createNew'),{'path':_0x218ff5,'appcode':_0x235001,'env':_0x21bb46});_0x3b0902['mcpServers'][MCP_SERVER_NAME]=_0x4acbab,writeFileSync(_0x218ff5,JSON[_0x2b8602(0x13d)](_0x3b0902,null,0x2),{'encoding':_0x2b8602(0x11a)});const _0x5ea3e1=await copyCursorRules(_0x1d9694),_0x13f0fd=[a63_0x123d1a['t'](_0x2b8602(0x141)),_0x2b8602(0x142)+_0x235001];return _0x21bb46!==_0x2b8602(0x154)&&_0x13f0fd[_0x2b8602(0x11c)](a63_0x123d1a['t']('mcp.config.env',{'env':_0x21bb46})),_0x13f0fd[_0x2b8602(0x11c)](a63_0x123d1a['t']('mcp.cursorConfig.restartRequired')),_0x5ea3e1&&_0x13f0fd['push'](a63_0x123d1a['t'](_0x2b8602(0x14a))),logger[_0x2b8602(0x147)]('mcp-cursor',a63_0x123d1a['t'](_0x2b8602(0x152)),{'appcode':_0x235001,'env':_0x21bb46,'configPath':_0x218ff5}),{'success':!![],'message':_0x13f0fd[_0x2b8602(0x12a)](_0x2b8602(0x133))};}catch(_0x2bc39e){return logger[_0x2b8602(0x122)]('mcp-cursor',a63_0x123d1a['t'](_0x2b8602(0x11d),{'error':_0x2bc39e instanceof Error?_0x2bc39e[_0x2b8602(0x146)]:String(_0x2bc39e)}),{'error':_0x2bc39e instanceof Error?_0x2bc39e[_0x2b8602(0x146)]:String(_0x2bc39e)}),{'success':![],'message':_0x2bc39e instanceof Error?_0x2bc39e['message']:String(_0x2bc39e)};}}export function configureClaudeMcp(_0x2efda6){const _0x1dc753=a63_0x2cd968;try{const {appcode:_0x145a73,env:_0x606dc3}=getAppConfig();copyAgentsMd(_0x2efda6);const _0x567fbe=buildClaudeMcpCommand(_0x145a73,_0x606dc3),_0xe63f69=[a63_0x123d1a['t'](_0x1dc753(0x127)),''+_0x567fbe,a63_0x123d1a['t'](_0x1dc753(0x14f)),_0x1dc753(0x142)+_0x145a73];return _0x606dc3!==_0x1dc753(0x154)&&_0xe63f69[_0x1dc753(0x11c)](a63_0x123d1a['t'](_0x1dc753(0x11b),{'env':_0x606dc3})),_0xe63f69[_0x1dc753(0x11c)](a63_0x123d1a['t'](_0x1dc753(0x138))),logger['info']('mcp-claude',a63_0x123d1a['t']('mcp.claudeConfig.commandGenerated'),{'appcode':_0x145a73,'env':_0x606dc3,'command':_0x567fbe}),{'success':!![],'message':_0xe63f69[_0x1dc753(0x12a)](_0x1dc753(0x133)),'needsManualAction':!![]};}catch(_0x4ce488){return logger[_0x1dc753(0x122)](_0x1dc753(0x137),a63_0x123d1a['t'](_0x1dc753(0x13a),{'error':_0x4ce488 instanceof Error?_0x4ce488[_0x1dc753(0x146)]:String(_0x4ce488)}),{'error':_0x4ce488 instanceof Error?_0x4ce488['message']:String(_0x4ce488)}),{'success':![],'message':_0x4ce488 instanceof Error?_0x4ce488[_0x1dc753(0x146)]:String(_0x4ce488)};}}export function showOtherMcpGuide(_0x3077b0){const _0x56b08c=a63_0x2cd968;try{const {appcode:_0x26aac9,env:_0x316f04}=getAppConfig(),_0x427c7a=buildMcpServerConfig(_0x26aac9,_0x316f04),_0x13247f=[_0x56b08c(0x125)+_0x26aac9+'\x22'];_0x316f04!=='online'&&_0x13247f[_0x56b08c(0x11c)]('\x22LOVRABET_ENV\x22:\x20\x22'+_0x316f04+'\x22');const _0x2f4e79=[a63_0x123d1a['t'](_0x56b08c(0x140),{'appcode':_0x26aac9,'env':_0x316f04}),'{',_0x56b08c(0x12c),'\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{',_0x56b08c(0x118),_0x56b08c(0x12b),_0x56b08c(0x12f),..._0x13247f[_0x56b08c(0x145)](_0xd365ef=>_0x56b08c(0x129)+_0xd365ef+','),_0x56b08c(0x117),_0x56b08c(0x124),_0x56b08c(0x11f),'}',a63_0x123d1a['t'](_0x56b08c(0x139))];return logger[_0x56b08c(0x147)]('mcp-install',a63_0x123d1a['t'](_0x56b08c(0x13b)),{'appcode':_0x26aac9,'env':_0x316f04}),{'success':!![],'message':_0x2f4e79['join']('\x0a'),'needsManualAction':!![]};}catch(_0x1142e3){return{'success':![],'message':_0x1142e3 instanceof Error?_0x1142e3[_0x56b08c(0x146)]:String(_0x1142e3)};}}function ensureDir(_0x57acdc){!existsSync(_0x57acdc)&&mkdirSync(_0x57acdc,{'recursive':!![]});}
@@ -1 +1 @@
1
- const a66_0x2ded27=a66_0x3daa;(function(_0x2e10de,_0x4270c8){const _0x503a71=a66_0x3daa,_0x586ca8=_0x2e10de();while(!![]){try{const _0x2829d5=parseInt(_0x503a71(0x13a))/0x1+parseInt(_0x503a71(0x14c))/0x2*(-parseInt(_0x503a71(0x144))/0x3)+-parseInt(_0x503a71(0x127))/0x4+-parseInt(_0x503a71(0x14b))/0x5+parseInt(_0x503a71(0x149))/0x6+-parseInt(_0x503a71(0x123))/0x7*(parseInt(_0x503a71(0x153))/0x8)+parseInt(_0x503a71(0x139))/0x9;if(_0x2829d5===_0x4270c8)break;else _0x586ca8['push'](_0x586ca8['shift']());}catch(_0xd907a){_0x586ca8['push'](_0x586ca8['shift']());}}}(a66_0x40bb,0x1d68b));import{jsx as a66_0x4ac8b1,jsxs as a66_0x2bd856,Fragment as a66_0x537357}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Text,Box,useInput,useApp}from'ink';function a66_0x40bb(){const _0x17db68=['.lovrabet/skill-manifest.json','cyan','setErrorMsg','skill-install','toISOString','warn','installing','64377ocaGbS','skill.error.installFailed','skill.done.pressAnyKey','info','skill.cdn.fetching','730620KVDCXn','skill.cdn.fetchingExtend','729930xMtfzq','2tWsPhP','\x20✓\x20','error','keys','length','selecting','size','48ENUFYO','name','map','log','column','gray','cwd','47348UETReD','.lovrabet/skill/.shared/guides','utf-8','description','326048hemjxK','skill.cdn.fetchFailed','label','value','selectedIndexes','skill.installing.installed','setLogPath','skill.done.successInline','stringify','安装成功','.lovrabet','green','handleKeyDown','skill.select.selectedIDE','message','return','skill.select.count','../../cdn-source/skills','1305279VCtTWm','143199gAPSOj','done','skill.installing.progress'];a66_0x40bb=function(){return _0x17db68;};return a66_0x40bb();}import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';function a66_0x3daa(_0x540431,_0x514ce6){_0x540431=_0x540431-0x11e;const _0x40bbe3=a66_0x40bb();let _0x3daaae=_0x40bbe3[_0x540431];return _0x3daaae;}import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,IDE_LIST}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{useI18n}from'../i18n/hooks.js';const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST['map'](_0x6a3e4=>({'key':_0x6a3e4,'name':IDE_CONFIGS[_0x6a3e4][a66_0x2ded27(0x154)],'description':IDE_CONFIGS[_0x6a3e4][a66_0x2ded27(0x126)]}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[],providedFlags:_0x5ced06}){const _0x28dbb9=a66_0x2ded27,{exit:_0x263251}=useApp(),{t:_0x36b8ef}=useI18n(),[_0x3a3ba9,_0x4ee461]=useState('selecting'),[_0x5b5101,_0x27df14]=useState([]),[_0x33feda,_0x3b9851]=useState([]),[_0x273a72,_0x39eb44]=useState(0x0),_0x2854e0=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x4f7be9=a66_0x3daa;preselectedIDEs[_0x4f7be9(0x150)]>0x0&&_0x2854e0[_0x4f7be9(0x12b)][_0x4f7be9(0x152)]>0x0&&_0x26db0d();},[]),useInput((_0x4e5908,_0x3bf577)=>{const _0x6c2d0e=a66_0x3daa;if(_0x3a3ba9===_0x6c2d0e(0x151)){if(_0x4e5908==='q'||_0x4e5908==='Q'){_0x263251();return;}if(_0x3bf577[_0x6c2d0e(0x136)]){if(_0x2854e0[_0x6c2d0e(0x12b)]['size']===0x0){_0x2854e0[_0x6c2d0e(0x13f)](_0x36b8ef('skill.error.selectAtLeastOne'));return;}_0x26db0d();return;}_0x2854e0[_0x6c2d0e(0x133)](_0x4e5908,_0x3bf577);}_0x3a3ba9===_0x6c2d0e(0x13b)&&_0x263251();});async function _0x26db0d(){const _0xac8b4f=a66_0x3daa,_0x2eb09e=_0x2854e0['getSelectedIDEs']();_0x3b9851(_0x2eb09e),_0x27df14([{'label':_0x36b8ef(_0xac8b4f(0x134)),'value':_0x36b8ef(_0xac8b4f(0x137),{'count':_0x2854e0[_0xac8b4f(0x12b)][_0xac8b4f(0x152)]})}]),_0x4ee461(_0xac8b4f(0x143)),await _0x5068cb(_0x2eb09e);}async function _0x5068cb(_0x1896ea){const _0xfe6bff=a66_0x3daa,_0x23b082=process[_0xfe6bff(0x122)](),_0x4708ea=resolve(__dirname,_0xfe6bff(0x138));logger[_0xfe6bff(0x12d)](_0x23b082);const _0x2511fc=_0x5ced06&&_0x5ced06[_0xfe6bff(0x150)]>0x0;console[_0xfe6bff(0x11f)](_0x2511fc?_0x36b8ef(_0xfe6bff(0x14a)):_0x36b8ef(_0xfe6bff(0x148)));let _0x4bc72d;try{_0x4bc72d=await fetchGuidesFromCDN(_0x2511fc),console[_0xfe6bff(0x11f)](_0x36b8ef('skill.cdn.fetchSuccess',{'count':Object[_0xfe6bff(0x14f)](_0x4bc72d['guides'])[_0xfe6bff(0x150)]}));}catch(_0x562888){console[_0xfe6bff(0x142)](_0x36b8ef(_0xfe6bff(0x128),{'error':_0x562888 instanceof Error?_0x562888[_0xfe6bff(0x135)]:String(_0x562888)}));}let _0xc1e6f6=0x0;for(const _0x317e21 of _0x1896ea){try{const _0x554884=IDE_CONFIGS[_0x317e21],_0x12648b=await installSingleIDE(_0x317e21,_0x554884,_0x23b082,_0x4708ea,_0x4bc72d,_0x5ced06);_0xc1e6f6+=_0x12648b,_0x39eb44(_0xc1e6f6);}catch(_0x20f446){console[_0xfe6bff(0x14e)](_0x36b8ef(_0xfe6bff(0x145),{'ide':_0x317e21,'error':_0x20f446 instanceof Error?_0x20f446[_0xfe6bff(0x135)]:String(_0x20f446)}));}}_0x4bc72d&&writeGuidesToProject(_0x4bc72d,_0x23b082,_0xfe6bff(0x124),_0x5ced06);const _0x38da2e={'version':'2.0.0','installedAt':new Date()[_0xfe6bff(0x141)](),'platforms':_0x1896ea},_0x45ddcc=join(_0x23b082,_0xfe6bff(0x13d)),_0x14f007=join(_0x23b082,_0xfe6bff(0x131));await copyDir(_0x14f007,_0x14f007),writeFileSync(_0x45ddcc,JSON[_0xfe6bff(0x12f)](_0x38da2e,null,0x2),_0xfe6bff(0x125)),logger[_0xfe6bff(0x147)](_0xfe6bff(0x140),_0xfe6bff(0x130),{'projectRoot':_0x23b082,'ides':_0x1896ea,'foldersCount':_0xc1e6f6}),_0x4ee461(_0xfe6bff(0x13b)),setTimeout(()=>{_0x263251();},0x3e8);}return a66_0x2bd856(Box,{'flexDirection':_0x28dbb9(0x120),'marginTop':0x1,'children':[_0x3a3ba9===_0x28dbb9(0x151)&&a66_0x4ac8b1(IDESelector,{'ideList':UI_IDE_LIST,'title':_0x36b8ef('skill.installing.title'),'selection':_0x2854e0}),_0x3a3ba9===_0x28dbb9(0x143)&&a66_0x4ac8b1(InstallingStep,{'completedSteps':_0x5b5101,'installingIDEs':_0x33feda,'installedCount':_0x273a72}),_0x3a3ba9===_0x28dbb9(0x13b)&&a66_0x4ac8b1(DoneStep,{'installedCount':_0x273a72})]});}function InstallingStep({completedSteps:_0xb2fdbd,installingIDEs:_0x2348c1,installedCount:_0x974294}){const _0x553302=a66_0x2ded27,{t:_0x43d206}=useI18n();return a66_0x2bd856(a66_0x537357,{'children':[_0xb2fdbd['map']((_0x3c189a,_0x4fecf0)=>a66_0x2bd856(Box,{'children':[a66_0x2bd856(Text,{'color':_0x553302(0x132),'children':['√\x20',_0x3c189a[_0x553302(0x129)],':\x20']}),a66_0x4ac8b1(Text,{'color':_0x553302(0x13e),'children':_0x3c189a[_0x553302(0x12a)]})]},_0x4fecf0)),a66_0x4ac8b1(Box,{'marginTop':0x1,'children':a66_0x4ac8b1(Text,{'children':_0x43d206(_0x553302(0x13c))})}),_0x2348c1[_0x553302(0x11e)](_0x329e97=>a66_0x2bd856(Box,{'children':[a66_0x4ac8b1(Text,{'color':_0x553302(0x132),'children':_0x553302(0x14d)}),a66_0x4ac8b1(Text,{'children':IDE_CONFIGS[_0x329e97]?.[_0x553302(0x154)]||_0x329e97})]},_0x329e97)),a66_0x4ac8b1(Box,{'marginTop':0x1,'children':a66_0x4ac8b1(Text,{'color':_0x553302(0x121),'children':_0x43d206(_0x553302(0x12c),{'count':_0x974294})})})]});}function DoneStep({installedCount:_0x30b23b}){const _0x386b52=a66_0x2ded27,{t:_0x46b9d9}=useI18n();return a66_0x2bd856(a66_0x537357,{'children':[a66_0x4ac8b1(Box,{'children':a66_0x4ac8b1(Text,{'color':'green','children':_0x46b9d9(_0x386b52(0x12e),{'count':_0x30b23b})})}),a66_0x4ac8b1(Box,{'marginTop':0x1,'children':a66_0x4ac8b1(Text,{'color':'gray','children':_0x46b9d9('skill.done.guidesPathInline')})}),a66_0x4ac8b1(Box,{'marginTop':0x1,'children':a66_0x4ac8b1(Text,{'color':_0x386b52(0x121),'children':_0x46b9d9(_0x386b52(0x146))})})]});}async function copyDirIfNeeded(_0xc3f736,_0x55f456){try{return await copyDir(_0xc3f736,_0x55f456),!![];}catch{return![];}}
1
+ const a64_0x2bd9a9=a64_0x2e5f;(function(_0x3b4e94,_0x10c8f6){const _0x2d2e68=a64_0x2e5f,_0x11efa1=_0x3b4e94();while(!![]){try{const _0x4b75ee=-parseInt(_0x2d2e68(0x17f))/0x1*(-parseInt(_0x2d2e68(0x15b))/0x2)+-parseInt(_0x2d2e68(0x15e))/0x3+-parseInt(_0x2d2e68(0x179))/0x4+-parseInt(_0x2d2e68(0x159))/0x5+parseInt(_0x2d2e68(0x15f))/0x6*(-parseInt(_0x2d2e68(0x155))/0x7)+-parseInt(_0x2d2e68(0x158))/0x8*(-parseInt(_0x2d2e68(0x156))/0x9)+parseInt(_0x2d2e68(0x174))/0xa;if(_0x4b75ee===_0x10c8f6)break;else _0x11efa1['push'](_0x11efa1['shift']());}catch(_0x4f57b3){_0x11efa1['push'](_0x11efa1['shift']());}}}(a64_0x3781,0x8e900));import{jsx as a64_0x34650d,jsxs as a64_0x286dea,Fragment as a64_0x2fc0b6}from'react/jsx-runtime';import{useState,useEffect}from'react';function a64_0x3781(){const _0x357235=['skill.installing.installed','error','description','skill.cdn.fetchFailed','installing','utf-8','gray','skill.installing.title','setLogPath','handleKeyDown','message','308MItPwi','261zGXTYa','stringify','103288QNLNXt','3523380tzEZQv','skill.cdn.fetchingExtend','16076HGbXVS','.lovrabet/skill-manifest.json','info','2300061bqgwlR','11772cVNgHL','.lovrabet/skill/.shared/guides','selectedIndexes','map','green','skill.done.pressAnyKey','getSelectedIDEs','skill.select.count','keys','log','toISOString','value','guides','skill.done.successInline','warn','setErrorMsg','skill.cdn.fetchSuccess','length','return','name','cwd','15043250PPdcgr','done','skill-install','skill.cdn.fetching','size','1713540xrhzsZ','selecting','../../cdn-source/skills','安装成功','column','2.0.0','86rqsohN'];a64_0x3781=function(){return _0x357235;};return a64_0x3781();}function a64_0x2e5f(_0x474a99,_0x163003){_0x474a99=_0x474a99-0x14e;const _0x37818f=a64_0x3781();let _0x2e5fe9=_0x37818f[_0x474a99];return _0x2e5fe9;}import{Text,Box,useInput,useApp}from'ink';import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,IDE_LIST}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{useI18n}from'../i18n/hooks.js';const __dirname=dirname(fileURLToPath(import.meta.url)),UI_IDE_LIST=IDE_LIST[a64_0x2bd9a9(0x162)](_0x1f55b8=>({'key':_0x1f55b8,'name':IDE_CONFIGS[_0x1f55b8][a64_0x2bd9a9(0x172)],'description':IDE_CONFIGS[_0x1f55b8][a64_0x2bd9a9(0x182)]}));export function SkillInstallUI({preselectedIDEs:preselectedIDEs=[],providedFlags:_0x5039f5}){const _0x1c373b=a64_0x2bd9a9,{exit:_0x17b2ae}=useApp(),{t:_0x1b8241}=useI18n(),[_0x954fad,_0x5c34a8]=useState(_0x1c373b(0x17a)),[_0x4c1146,_0x367ed2]=useState([]),[_0x58cf71,_0x3f8527]=useState([]),[_0x3f9e24,_0x16468f]=useState(0x0),_0x124ddd=useIDESelection({'ideList':UI_IDE_LIST,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{preselectedIDEs['length']>0x0&&_0x124ddd['selectedIndexes']['size']>0x0&&_0x419c47();},[]),useInput((_0x329527,_0xb8d045)=>{const _0x314e55=_0x1c373b;if(_0x954fad===_0x314e55(0x17a)){if(_0x329527==='q'||_0x329527==='Q'){_0x17b2ae();return;}if(_0xb8d045[_0x314e55(0x171)]){if(_0x124ddd[_0x314e55(0x161)][_0x314e55(0x178)]===0x0){_0x124ddd[_0x314e55(0x16e)](_0x1b8241('skill.error.selectAtLeastOne'));return;}_0x419c47();return;}_0x124ddd[_0x314e55(0x153)](_0x329527,_0xb8d045);}_0x954fad===_0x314e55(0x175)&&_0x17b2ae();});async function _0x419c47(){const _0x2dcfc8=_0x1c373b,_0x497b97=_0x124ddd[_0x2dcfc8(0x165)]();_0x3f8527(_0x497b97),_0x367ed2([{'label':_0x1b8241('skill.select.selectedIDE'),'value':_0x1b8241(_0x2dcfc8(0x166),{'count':_0x124ddd[_0x2dcfc8(0x161)][_0x2dcfc8(0x178)]})}]),_0x5c34a8(_0x2dcfc8(0x14e)),await _0x4bb4da(_0x497b97);}async function _0x4bb4da(_0x8ce940){const _0x2445a6=_0x1c373b,_0x4d4dfd=process[_0x2445a6(0x173)](),_0xeffe42=resolve(__dirname,_0x2445a6(0x17b));logger[_0x2445a6(0x152)](_0x4d4dfd);const _0x1d9f58=_0x5039f5&&_0x5039f5[_0x2445a6(0x170)]>0x0;console['log'](_0x1d9f58?_0x1b8241(_0x2445a6(0x15a)):_0x1b8241(_0x2445a6(0x177)));let _0x16ca34;try{_0x16ca34=await fetchGuidesFromCDN(_0x1d9f58),console[_0x2445a6(0x168)](_0x1b8241(_0x2445a6(0x16f),{'count':Object[_0x2445a6(0x167)](_0x16ca34[_0x2445a6(0x16b)])['length']}));}catch(_0xec4ad8){console[_0x2445a6(0x16d)](_0x1b8241(_0x2445a6(0x183),{'error':_0xec4ad8 instanceof Error?_0xec4ad8['message']:String(_0xec4ad8)}));}let _0x178206=0x0;for(const _0x2d5197 of _0x8ce940){try{const _0xabab9f=IDE_CONFIGS[_0x2d5197],_0x2b8d7f=await installSingleIDE(_0x2d5197,_0xabab9f,_0x4d4dfd,_0xeffe42,_0x16ca34,_0x5039f5);_0x178206+=_0x2b8d7f,_0x16468f(_0x178206);}catch(_0x5310fe){console[_0x2445a6(0x181)](_0x1b8241('skill.error.installFailed',{'ide':_0x2d5197,'error':_0x5310fe instanceof Error?_0x5310fe[_0x2445a6(0x154)]:String(_0x5310fe)}));}}_0x16ca34&&writeGuidesToProject(_0x16ca34,_0x4d4dfd,_0x2445a6(0x160),_0x5039f5);const _0x21991e={'version':_0x2445a6(0x17e),'installedAt':new Date()[_0x2445a6(0x169)](),'platforms':_0x8ce940},_0x30f47a=join(_0x4d4dfd,_0x2445a6(0x15c)),_0x30c0b4=join(_0x4d4dfd,'.lovrabet');await copyDir(_0x30c0b4,_0x30c0b4),writeFileSync(_0x30f47a,JSON[_0x2445a6(0x157)](_0x21991e,null,0x2),_0x2445a6(0x14f)),logger[_0x2445a6(0x15d)](_0x2445a6(0x176),_0x2445a6(0x17c),{'projectRoot':_0x4d4dfd,'ides':_0x8ce940,'foldersCount':_0x178206}),_0x5c34a8(_0x2445a6(0x175)),setTimeout(()=>{_0x17b2ae();},0x3e8);}return a64_0x286dea(Box,{'flexDirection':_0x1c373b(0x17d),'marginTop':0x1,'children':[_0x954fad===_0x1c373b(0x17a)&&a64_0x34650d(IDESelector,{'ideList':UI_IDE_LIST,'title':_0x1b8241(_0x1c373b(0x151)),'selection':_0x124ddd}),_0x954fad===_0x1c373b(0x14e)&&a64_0x34650d(InstallingStep,{'completedSteps':_0x4c1146,'installingIDEs':_0x58cf71,'installedCount':_0x3f9e24}),_0x954fad===_0x1c373b(0x175)&&a64_0x34650d(DoneStep,{'installedCount':_0x3f9e24})]});}function InstallingStep({completedSteps:_0x50f14f,installingIDEs:_0x56437b,installedCount:_0x5ba366}){const _0x4c300f=a64_0x2bd9a9,{t:_0x37879e}=useI18n();return a64_0x286dea(a64_0x2fc0b6,{'children':[_0x50f14f[_0x4c300f(0x162)]((_0x558b6d,_0xaeb284)=>a64_0x286dea(Box,{'children':[a64_0x286dea(Text,{'color':_0x4c300f(0x163),'children':['√\x20',_0x558b6d['label'],':\x20']}),a64_0x34650d(Text,{'color':'cyan','children':_0x558b6d[_0x4c300f(0x16a)]})]},_0xaeb284)),a64_0x34650d(Box,{'marginTop':0x1,'children':a64_0x34650d(Text,{'children':_0x37879e('skill.installing.progress')})}),_0x56437b[_0x4c300f(0x162)](_0x2a7f74=>a64_0x286dea(Box,{'children':[a64_0x34650d(Text,{'color':_0x4c300f(0x163),'children':'\x20✓\x20'}),a64_0x34650d(Text,{'children':IDE_CONFIGS[_0x2a7f74]?.[_0x4c300f(0x172)]||_0x2a7f74})]},_0x2a7f74)),a64_0x34650d(Box,{'marginTop':0x1,'children':a64_0x34650d(Text,{'color':_0x4c300f(0x150),'children':_0x37879e(_0x4c300f(0x180),{'count':_0x5ba366})})})]});}function DoneStep({installedCount:_0x5ea59b}){const _0x3b51f1=a64_0x2bd9a9,{t:_0x1f847a}=useI18n();return a64_0x286dea(a64_0x2fc0b6,{'children':[a64_0x34650d(Box,{'children':a64_0x34650d(Text,{'color':_0x3b51f1(0x163),'children':_0x1f847a(_0x3b51f1(0x16c),{'count':_0x5ea59b})})}),a64_0x34650d(Box,{'marginTop':0x1,'children':a64_0x34650d(Text,{'color':_0x3b51f1(0x150),'children':_0x1f847a('skill.done.guidesPathInline')})}),a64_0x34650d(Box,{'marginTop':0x1,'children':a64_0x34650d(Text,{'color':_0x3b51f1(0x150),'children':_0x1f847a(_0x3b51f1(0x164))})})]});}async function copyDirIfNeeded(_0x369400,_0x38be0b){try{return await copyDir(_0x369400,_0x38be0b),!![];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x182307,_0x5c1f31){const _0x28f8f0=a67_0x4572,_0x2b7e44=_0x182307();while(!![]){try{const _0x61fe80=parseInt(_0x28f8f0(0x246))/0x1*(parseInt(_0x28f8f0(0x207))/0x2)+parseInt(_0x28f8f0(0x1ea))/0x3*(parseInt(_0x28f8f0(0x22c))/0x4)+-parseInt(_0x28f8f0(0x200))/0x5*(parseInt(_0x28f8f0(0x256))/0x6)+parseInt(_0x28f8f0(0x1fe))/0x7+parseInt(_0x28f8f0(0x241))/0x8*(-parseInt(_0x28f8f0(0x1fd))/0x9)+-parseInt(_0x28f8f0(0x1ed))/0xa+parseInt(_0x28f8f0(0x1ef))/0xb;if(_0x61fe80===_0x5c1f31)break;else _0x2b7e44['push'](_0x2b7e44['shift']());}catch(_0x21f00a){_0x2b7e44['push'](_0x2b7e44['shift']());}}}(a67_0x3e68,0x5fa88));import{writeFileSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{createInterface}from'node:readline';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,CORE_IDE_LIST,ALL_CORE_IDES}from'../utils/ai_config.js';function a67_0x3e68(){const _0x18611b=['skill.help.exampleBffDesc','skill.help.bffWorkflow','toLowerCase','question','trim','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20','name','split','skill.generic','path','30MZolqg','skill.help.options','\x20-\x20','skill.select.title','agent','\x0a\x20\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','skill.installing.createdDir','969taUyJF','skill.help.installAll','skill.error.noValidIDE','2707660ygpMlp','skill.help.interactiveKeys','2398561TcExUl','-$1','skill.error.unsupportedCommand','skill.select.cancelled','includes','\x0a\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20q.\x20','skill.help.skillContentsList','skill-install','skill.help.installMethods','skill.select.cancel','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20','some','skill.installing.createdManifest','1198413QwFIFc','1464190jyRfwS','skill.help.title','130745bVeeoU','--help','stdin','skill.select.inputFormat','\x20\x200.\x20','from','error','1160MGfLUD','skill.cdn.fetchSuccess','\x0a\x20\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','log','utf-8','\x0a\x20\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x20\x20','skill.select.prompt','skill.help.interactiveSelect','length','folders','filter','skill.help.supportedIDEs','cwd','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x0a','skill.errorHint.installDirect','skill.done.success','stringify','skill.errorHint.exampleInteractive','skill.help.allDesc','\x0a\x20\x20--antigravity\x20\x20Antigravity\x20IDE\x20(.agent/skills/)\x0a\x20\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(empty)','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a','../../cdn-source/skills','2.0.0','skill.errorHint.usageExamples','skill.error.unknownPlatform','help','close','skill.help.exampleInteractive','skill.help.installDirect','安装成功','setLogPath','skill.cdn.fetching','\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x0a','toISOString','skill.cdn.fetchFailed','skill.help.examples','7988oRNFzO','startsWith','skill.cdn.fetchingExtend','skill.errorHint.availableCommands','skill.done.guidesLocation','all','skill.select.installAll','push','exit','guides','skill.help.exampleAllDesc','skill.help.afterInstall','skill.select.inputHint','skill.help.directInstall','skill.help.guidesLocationTitle','skill.help.bffOption','skill.help.skillContents','skill.help.afterInstallList','message','skill.installing.ide','stdout','40dnhOhl','skill.help.showHelp','forEach','replace','keys','667iXRqRC','files','.lovrabet','不支持的命令:\x20','skill.help.usage','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x0a'];a67_0x3e68=function(){return _0x18611b;};return a67_0x3e68();}import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a67_0x4a68b5 from'../i18n/index.js';const t=a67_0x4a68b5['t']['bind'](a67_0x4a68b5),__dirname=dirname(fileURLToPath(import.meta.url));export function camelCaseFlagsToKebab(_0x3aeb88){const _0x47c707=a67_0x4572,_0x4f60a0=[];for(const [_0x16b7a1,_0x52507c]of Object['entries'](_0x3aeb88)){if(_0x52507c===!![]){const _0x1dccc6=_0x16b7a1[_0x47c707(0x244)](/([A-Z])/g,_0x47c707(0x1f0))[_0x47c707(0x24e)]();_0x4f60a0[_0x47c707(0x233)](_0x1dccc6);}}return _0x4f60a0;}export function parseDynamicFlags(){const _0x68a713=a67_0x4572,_0x1ee975=[];for(let _0x11530f=0x3;_0x11530f<process['argv']['length'];_0x11530f++){const _0xd67f71=process['argv'][_0x11530f];if(_0xd67f71&&_0xd67f71[_0x68a713(0x22d)]('--')){const _0x5d613a=_0xd67f71['slice'](0x2);_0x5d613a&&!_0x5d613a['includes']('=')&&_0x1ee975[_0x68a713(0x233)](_0x5d613a);}}return _0x1ee975;}function a67_0x4572(_0x23fb40,_0x5f2f55){_0x23fb40=_0x23fb40-0x1e7;const _0x3e68f5=a67_0x3e68();let _0x45727a=_0x3e68f5[_0x23fb40];return _0x45727a;}export function getAllProvidedFlags(_0x181cf5){const _0xb19c40=a67_0x4572,_0xf1b880=camelCaseFlagsToKebab(_0x181cf5),_0x3d3055=parseDynamicFlags(),_0x47b7c4=new Set([..._0xf1b880,..._0x3d3055]);return Array[_0xb19c40(0x205)](_0x47b7c4);}export async function skillsCommand(_0x4f6179,_0x1cb7ce,_0x33c41e){const _0xce33f6=a67_0x4572;logger[_0xce33f6(0x226)](process[_0xce33f6(0x213)]());if(_0x33c41e?.[_0xce33f6(0x221)]||_0x4f6179===_0xce33f6(0x201)){showHelp();return;}_0x4f6179!=='install'&&(console[_0xce33f6(0x206)](t(_0xce33f6(0x1f1),{'cmd':_0x4f6179||_0xce33f6(0x21b)})),console[_0xce33f6(0x20a)](t(_0xce33f6(0x22f))),console[_0xce33f6(0x20a)](t('skill.errorHint.installInteractive')),console['log'](t(_0xce33f6(0x215))),console[_0xce33f6(0x20a)](t('skill.errorHint.showHelp')),console[_0xce33f6(0x20a)](t(_0xce33f6(0x21f))),console['log'](t(_0xce33f6(0x218))),console['log'](t('skill.errorHint.exampleDirect')),logger[_0xce33f6(0x206)]('skill',_0xce33f6(0x249)+_0x4f6179),process[_0xce33f6(0x234)](0x1));let _0x2f4b2b=_0x1cb7ce?.[0x0];const _0x33b780=getAllProvidedFlags(_0x33c41e??{});_0x2f4b2b?.[_0xce33f6(0x22d)]('--')&&(_0x2f4b2b=undefined),await installSkill(_0x2f4b2b??'agent',_0x33b780);}async function selectIDEs(){const _0x5b1b85=a67_0x4572;return console[_0x5b1b85(0x20a)](t(_0x5b1b85(0x259))),CORE_IDE_LIST[_0x5b1b85(0x243)]((_0x70d0db,_0x65c938)=>{const _0x1b9daf=_0x5b1b85;console['log']('\x20\x20'+(_0x65c938+0x1)+'.\x20'+IDE_CONFIGS[_0x70d0db]['name']+_0x1b9daf(0x258)+IDE_CONFIGS[_0x70d0db]['description']);}),console['log'](_0x5b1b85(0x204)+t(_0x5b1b85(0x232))),console[_0x5b1b85(0x20a)](_0x5b1b85(0x1f5)+t(_0x5b1b85(0x1f9))+'\x0a'),console[_0x5b1b85(0x20a)](t(_0x5b1b85(0x203))),console[_0x5b1b85(0x20a)](t(_0x5b1b85(0x238))),new Promise(_0x2527cb=>{const _0x3069ae=_0x5b1b85,_0x411cf7=createInterface({'input':process[_0x3069ae(0x202)],'output':process[_0x3069ae(0x240)]});_0x411cf7[_0x3069ae(0x24f)](t(_0x3069ae(0x20d)),_0xc2264d=>{const _0xd8c1db=_0x3069ae;_0x411cf7[_0xd8c1db(0x222)]();const _0x1f315a=_0xc2264d[_0xd8c1db(0x250)]()[_0xd8c1db(0x24e)]();(_0x1f315a==='q'||_0x1f315a==='quit'||_0x1f315a==='exit')&&(console['log'](t(_0xd8c1db(0x1f2))),process[_0xd8c1db(0x234)](0x0));if(_0x1f315a==='0'||_0x1f315a===_0xd8c1db(0x231)){_0x2527cb(['all']);return;}const _0x1bd212=_0x1f315a[_0xd8c1db(0x253)](/\s+/)[_0xd8c1db(0x211)](Boolean),_0x1e6870=[];for(const _0x3bc25d of _0x1bd212){const _0x3fdfca=parseInt(_0x3bc25d,0xa);if(!isNaN(_0x3fdfca)&&_0x3fdfca>=0x1&&_0x3fdfca<=CORE_IDE_LIST['length']){const _0x4342c7=CORE_IDE_LIST[_0x3fdfca-0x1];_0x4342c7&&!_0x1e6870[_0xd8c1db(0x1f3)](_0x4342c7)&&_0x1e6870[_0xd8c1db(0x233)](_0x4342c7);}}_0x1e6870['length']===0x0&&(console['log'](t('skill.select.noneSelected')),process[_0xd8c1db(0x234)](0x0)),_0x2527cb(_0x1e6870);});});}function showHelp(){const _0x5a255b=a67_0x4572;console[_0x5a255b(0x20a)]('\x0a'+t(_0x5a255b(0x1ff))+'\x0a\x0a'+t(_0x5a255b(0x24a))+'\x0a\x20\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+t(_0x5a255b(0x242))+_0x5a255b(0x1f4)+t('skill.help.installInteractive')+_0x5a255b(0x209)+t(_0x5a255b(0x224))+_0x5a255b(0x1e8)+t(_0x5a255b(0x1eb))+_0x5a255b(0x20c)+t('skill.help.installWithBff')+'\x0a\x0a'+t(_0x5a255b(0x1f8))+'\x0a'+t(_0x5a255b(0x20e))+'\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x0a'+t(_0x5a255b(0x1ee))+'\x0a\x0a'+t(_0x5a255b(0x239))+_0x5a255b(0x1fa)+t(_0x5a255b(0x224))+'\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20\x20#\x20'+t('skill.help.installAll')+_0x5a255b(0x251)+t('skill.help.installAll')+'\x0a\x0a'+t(_0x5a255b(0x24d))+'\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20cursor\x20--dangerously-bff-save\x0a\x0a'+t(_0x5a255b(0x212))+'\x0a\x20\x20--cursor\x20\x20\x20\x20\x20\x20\x20Cursor\x20IDE\x20(.cursorrules\x20+\x20.cursor/commands/)\x0a\x20\x20--windsurf\x20\x20\x20\x20\x20Windsurf\x20IDE\x20(.windsurf/workflows/)\x0a\x20\x20--claude\x20\x20\x20\x20\x20\x20\x20Claude\x20Code\x20(.claude/skills/)\x0a\x20\x20--cline\x20\x20\x20\x20\x20\x20\x20\x20Cline\x20IDE\x20(.cline/skills/)\x0a\x20\x20--codex\x20\x20\x20\x20\x20\x20\x20\x20Codex\x20IDE\x20(.codex/skills/)\x0a\x20\x20--opencode\x20\x20\x20\x20\x20OpenCode\x20IDE\x20(.opencode/skills/)\x0a\x20\x20--qoder\x20\x20\x20\x20\x20\x20\x20\x20Qoder\x20IDE\x20(.qoder/rules/\x20+\x20.qoder/skills/)\x0a\x20\x20--codebuddy\x20\x20\x20\x20CodeBuddy\x20IDE\x20(.codebuddy/skills/)\x0a\x20\x20--trae\x20\x20\x20\x20\x20\x20\x20\x20\x20Trae\x20IDE\x20(.trae/skills/)\x0a\x20\x20--agent\x20\x20\x20\x20\x20\x20\x20\x20'+t('skill.help.agentDesc')+_0x5a255b(0x21a)+t(_0x5a255b(0x219))+'\x0a\x0a'+t(_0x5a255b(0x257))+'\x0a'+t(_0x5a255b(0x23b))+'\x0a\x0a'+t(_0x5a255b(0x23c))+'\x0a'+t(_0x5a255b(0x1f6))+'\x0a\x0a'+t(_0x5a255b(0x22b))+_0x5a255b(0x228)+t(_0x5a255b(0x223))+_0x5a255b(0x214)+t('skill.help.exampleDirectDesc')+_0x5a255b(0x21c)+t(_0x5a255b(0x24c))+_0x5a255b(0x24b)+t(_0x5a255b(0x236))+'\x0a\x0a'+t(_0x5a255b(0x237))+'\x0a'+t(_0x5a255b(0x23d))+'\x0a\x0a'+t(_0x5a255b(0x23a))+'\x0a\x20\x20.lovrabet/skill/.shared/guides/01-typescript-sdk/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/02-mcp-sql-workflow/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/03-antd-style/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/04-troubleshooting/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/05-api-integration/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/06-menu-management/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/07-backend-function/guide.md\x0a\x20\x20');}async function installSkill(_0x365166,_0x3fd79b){const _0x14d77e=a67_0x4572,_0x5724ea=process['cwd'](),_0x313282=resolve(__dirname,_0x14d77e(0x21d));let _0xf74c28=[];!_0x365166?_0xf74c28=await selectIDEs():_0xf74c28=[_0x365166];_0xf74c28[_0x14d77e(0x1f3)](_0x14d77e(0x231))&&(_0xf74c28=[...ALL_CORE_IDES,_0x14d77e(0x1e7)]);const _0x10aeb0=[];for(const _0x2bc55e of _0xf74c28){if(_0x2bc55e===_0x14d77e(0x1e7))_0x10aeb0[_0x14d77e(0x233)]('agent');else{if(_0x2bc55e==='all')continue;else IDE_CONFIGS[_0x2bc55e]?_0x10aeb0['push'](_0x2bc55e):(console[_0x14d77e(0x20a)](t(_0x14d77e(0x220),{'ide':_0x2bc55e})),_0x10aeb0[_0x14d77e(0x233)](_0x14d77e(0x1e7)));}}_0x10aeb0[_0x14d77e(0x20f)]===0x0&&(console['log'](t(_0x14d77e(0x1ec))),process[_0x14d77e(0x234)](0x0));const _0xb3eb60=_0x3fd79b&&_0x3fd79b[_0x14d77e(0x20f)]>0x0;console[_0x14d77e(0x20a)](_0xb3eb60?t(_0x14d77e(0x22e)):t(_0x14d77e(0x227)));let _0x4da2d6;try{_0x4da2d6=await fetchGuidesFromCDN(_0xb3eb60),console[_0x14d77e(0x20a)](t(_0x14d77e(0x208),{'count':Object[_0x14d77e(0x245)](_0x4da2d6[_0x14d77e(0x235)])[_0x14d77e(0x20f)]}));}catch(_0x101772){console['warn'](t(_0x14d77e(0x22a),{'error':_0x101772 instanceof Error?_0x101772[_0x14d77e(0x23e)]:String(_0x101772)}));}let _0x16a04e=0x0;for(const _0x446805 of _0x10aeb0){try{const _0x381c1b=_0x446805===_0x14d77e(0x1e7)?t(_0x14d77e(0x254)):IDE_CONFIGS[_0x446805]?.[_0x14d77e(0x252)]||_0x446805;console[_0x14d77e(0x20a)](t(_0x14d77e(0x23f),{'name':_0x381c1b}));const _0xf35e5e=_0x446805===_0x14d77e(0x1e7)?undefined:IDE_CONFIGS[_0x446805],_0x2615e2=await installSingleIDE(_0x446805,_0xf35e5e,_0x5724ea,_0x313282,_0x4da2d6,_0x3fd79b);_0x16a04e+=_0x2615e2;if(_0xf35e5e?.[_0x14d77e(0x210)])for(const _0x3b123e of _0xf35e5e[_0x14d77e(0x210)]){const _0x15a417=_0xf35e5e[_0x14d77e(0x247)]?.[_0x14d77e(0x1fb)](_0x3b8a2c=>_0x3b8a2c[_0x14d77e(0x255)][_0x14d77e(0x22d)](_0x3b123e+'/'))??![];_0x15a417?console['log'](t(_0x14d77e(0x1e9),{'path':_0x3b123e})):console[_0x14d77e(0x20a)](t('skill.installing.created',{'path':_0x3b123e}));}if(_0xf35e5e?.[_0x14d77e(0x247)])for(const _0x5b7e0b of _0xf35e5e['files']){console['log'](t('skill.installing.created',{'path':_0x5b7e0b[_0x14d77e(0x255)]}));}}catch(_0x429215){console[_0x14d77e(0x206)](t('skill.error.installFailed',{'ide':_0x446805,'error':_0x429215 instanceof Error?_0x429215['message']:String(_0x429215)}));}}_0x4da2d6&&writeGuidesToProject(_0x4da2d6,_0x5724ea,'.lovrabet/skill/.shared/guides',_0x3fd79b);const _0x542256={'version':_0x14d77e(0x21e),'installedAt':new Date()[_0x14d77e(0x229)](),'platforms':_0x10aeb0},_0x2df489=join(_0x5724ea,'.lovrabet/skill-manifest.json'),_0x6544f4=join(_0x5724ea,_0x14d77e(0x248));await copyDir(_0x6544f4,_0x6544f4),writeFileSync(_0x2df489,JSON[_0x14d77e(0x217)](_0x542256,null,0x2),_0x14d77e(0x20b)),console[_0x14d77e(0x20a)](t(_0x14d77e(0x1fc))),console[_0x14d77e(0x20a)](t(_0x14d77e(0x216),{'count':_0x16a04e})),console[_0x14d77e(0x20a)](t(_0x14d77e(0x230))),console['log'](t('skill.done.guidesPath')),logger['info'](_0x14d77e(0x1f7),_0x14d77e(0x225),{'projectRoot':_0x5724ea,'ides':_0x10aeb0,'foldersCount':_0x16a04e});}
1
+ (function(_0x4f9735,_0x605349){const _0x595209=a65_0x3990,_0x5868d6=_0x4f9735();while(!![]){try{const _0x5a0237=parseInt(_0x595209(0x1fc))/0x1*(-parseInt(_0x595209(0x212))/0x2)+parseInt(_0x595209(0x21d))/0x3+parseInt(_0x595209(0x1db))/0x4*(parseInt(_0x595209(0x20c))/0x5)+parseInt(_0x595209(0x1f0))/0x6+-parseInt(_0x595209(0x223))/0x7*(parseInt(_0x595209(0x1cd))/0x8)+-parseInt(_0x595209(0x1e2))/0x9*(-parseInt(_0x595209(0x1dc))/0xa)+-parseInt(_0x595209(0x1f6))/0xb;if(_0x5a0237===_0x605349)break;else _0x5868d6['push'](_0x5868d6['shift']());}catch(_0x63784b){_0x5868d6['push'](_0x5868d6['shift']());}}}(a65_0x59df,0x23a05));import{writeFileSync}from'node:fs';function a65_0x59df(){const _0x5e4718=['skill.done.success','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x0a','toISOString','skill.error.noValidIDE','798204oGliyP','10spnpwZ','安装成功','setLogPath','不支持的命令:\x20','argv','agent','1188081exLdRg','--help','log','split','skill.help.examples','\x20\x200.\x20','skill.installing.createdDir','some','\x0a\x20\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','skill.installing.ide','.lovrabet/skill-manifest.json','skill.installing.createdManifest','skill.generic','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20','1108938hzImGV','skill.help.skillContents','exit','folders','skill.help.guidesLocationTitle','2.0.0','1290355aBqMsN','(empty)','skill','description','skill.select.installAll','skill.errorHint.exampleInteractive','1tkXnhH','skill.errorHint.exampleDirect','trim','skill.cdn.fetchSuccess','name','skill.help.showHelp','../../cdn-source/skills','forEach','skill.cdn.fetchFailed','skill.error.installFailed','skill.help.afterInstallList','skill.installing.created','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x0a','\x0a\x20\x20.lovrabet/skill/.shared/guides/01-typescript-sdk/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/02-mcp-sql-workflow/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/03-antd-style/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/04-troubleshooting/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/05-api-integration/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/06-menu-management/guide.md\x0a\x20\x20.lovrabet/skill/.shared/guides/07-backend-function/guide.md\x0a\x20\x20','skill.select.cancel','skill.errorHint.installDirect','5RQwwdJ','skill.select.cancelled','skill.help.title','skill.errorHint.showHelp','skill.select.noneSelected','-$1','490954vxoCRR','cwd','files','skill.help.bffWorkflow','\x0a\x20\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x20\x20','length','stdin','\x0a\x20\x20--antigravity\x20\x20Antigravity\x20IDE\x20(.agent/skills/)\x0a\x20\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','push','skill.help.installMethods','skill.help.agentDesc','36864kEoJPi','skill.help.interactiveKeys','\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a','\x0a\x20\x20--cursor\x20\x20\x20\x20\x20\x20\x20Cursor\x20IDE\x20(.cursorrules\x20+\x20.cursor/commands/)\x0a\x20\x20--windsurf\x20\x20\x20\x20\x20Windsurf\x20IDE\x20(.windsurf/workflows/)\x0a\x20\x20--claude\x20\x20\x20\x20\x20\x20\x20Claude\x20Code\x20(.claude/skills/)\x0a\x20\x20--cline\x20\x20\x20\x20\x20\x20\x20\x20Cline\x20IDE\x20(.cline/skills/)\x0a\x20\x20--codex\x20\x20\x20\x20\x20\x20\x20\x20Codex\x20IDE\x20(.codex/skills/)\x0a\x20\x20--opencode\x20\x20\x20\x20\x20OpenCode\x20IDE\x20(.opencode/skills/)\x0a\x20\x20--qoder\x20\x20\x20\x20\x20\x20\x20\x20Qoder\x20IDE\x20(.qoder/rules/\x20+\x20.qoder/skills/)\x0a\x20\x20--codebuddy\x20\x20\x20\x20CodeBuddy\x20IDE\x20(.codebuddy/skills/)\x0a\x20\x20--trae\x20\x20\x20\x20\x20\x20\x20\x20\x20Trae\x20IDE\x20(.trae/skills/)\x0a\x20\x20--agent\x20\x20\x20\x20\x20\x20\x20\x20','skill-install','skill.done.guidesLocation','161yPykRP','\x0a\x20\x20lovrabet\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','entries','path','all','skill.help.bffOption','.lovrabet','from','includes','skill.help.afterInstall','skill.select.title','skill.select.inputHint','close','stdout','skill.help.options','.lovrabet/skill/.shared/guides','replace','quit','skill.errorHint.installInteractive','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--dangerously-bff-save\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20cursor\x20--dangerously-bff-save\x0a\x0a','message','\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--cursor\x20--claude\x20\x20#\x20','startsWith','skill.help.installAll','skill.help.usage','skill.help.exampleInteractive','skill.help.installWithBff','skill.error.unsupportedCommand','\x0a\x20\x20lovrabet\x20skill\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','skill.help.skillContentsList','6944kAMJNY','skill.help.exampleAllDesc','error','\x20\x20q.\x20','slice','skill.help.allDesc','help','skill.help.installDirect','skill.errorHint.availableCommands','warn'];a65_0x59df=function(){return _0x5e4718;};return a65_0x59df();}import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';import{createInterface}from'node:readline';import{logger}from'../utils/logger.js';import{copyDir}from'../utils/file-utils.js';import{IDE_CONFIGS,CORE_IDE_LIST,ALL_CORE_IDES}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a65_0x380d23 from'../i18n/index.js';const t=a65_0x380d23['t']['bind'](a65_0x380d23),__dirname=dirname(fileURLToPath(import.meta.url));export function camelCaseFlagsToKebab(_0x3e140a){const _0x1a494f=a65_0x3990,_0x1704e3=[];for(const [_0x10ae57,_0x5bb84e]of Object[_0x1a494f(0x225)](_0x3e140a)){if(_0x5bb84e===!![]){const _0x34b2ab=_0x10ae57[_0x1a494f(0x233)](/([A-Z])/g,_0x1a494f(0x211))['toLowerCase']();_0x1704e3[_0x1a494f(0x21a)](_0x34b2ab);}}return _0x1704e3;}export function parseDynamicFlags(){const _0x439d4c=a65_0x3990,_0x23bc56=[];for(let _0x32e7fe=0x3;_0x32e7fe<process[_0x439d4c(0x1e0)][_0x439d4c(0x217)];_0x32e7fe++){const _0x57b28f=process[_0x439d4c(0x1e0)][_0x32e7fe];if(_0x57b28f&&_0x57b28f[_0x439d4c(0x1c5)]('--')){const _0x12cb03=_0x57b28f[_0x439d4c(0x1d1)](0x2);_0x12cb03&&!_0x12cb03[_0x439d4c(0x22b)]('=')&&_0x23bc56['push'](_0x12cb03);}}return _0x23bc56;}export function getAllProvidedFlags(_0x65727){const _0x233542=a65_0x3990,_0x178c9f=camelCaseFlagsToKebab(_0x65727),_0xc7be38=parseDynamicFlags(),_0x3faff5=new Set([..._0x178c9f,..._0xc7be38]);return Array[_0x233542(0x22a)](_0x3faff5);}export async function skillsCommand(_0x4f6967,_0x59a5fb,_0x4fe376){const _0x3c9402=a65_0x3990;logger[_0x3c9402(0x1de)](process[_0x3c9402(0x213)]());if(_0x4fe376?.[_0x3c9402(0x1d3)]||_0x4f6967===_0x3c9402(0x1e3)){showHelp();return;}_0x4f6967!=='install'&&(console['error'](t(_0x3c9402(0x1ca),{'cmd':_0x4f6967||_0x3c9402(0x1f7)})),console['log'](t(_0x3c9402(0x1d5))),console[_0x3c9402(0x1e4)](t(_0x3c9402(0x1c1))),console[_0x3c9402(0x1e4)](t(_0x3c9402(0x20b))),console[_0x3c9402(0x1e4)](t(_0x3c9402(0x20f))),console[_0x3c9402(0x1e4)](t('skill.errorHint.usageExamples')),console[_0x3c9402(0x1e4)](t(_0x3c9402(0x1fb))),console[_0x3c9402(0x1e4)](t(_0x3c9402(0x1fd))),logger[_0x3c9402(0x1cf)](_0x3c9402(0x1f8),_0x3c9402(0x1df)+_0x4f6967),process['exit'](0x1));let _0x230f63=_0x59a5fb?.[0x0];const _0x2f5efb=getAllProvidedFlags(_0x4fe376??{});_0x230f63?.[_0x3c9402(0x1c5)]('--')&&(_0x230f63=undefined),await installSkill(_0x230f63??_0x3c9402(0x1e1),_0x2f5efb);}async function selectIDEs(){const _0xda4233=a65_0x3990;return console[_0xda4233(0x1e4)](t(_0xda4233(0x22d))),CORE_IDE_LIST[_0xda4233(0x203)]((_0x494d7d,_0x4baad6)=>{const _0x3392f8=_0xda4233;console[_0x3392f8(0x1e4)]('\x20\x20'+(_0x4baad6+0x1)+'.\x20'+IDE_CONFIGS[_0x494d7d][_0x3392f8(0x200)]+'\x20-\x20'+IDE_CONFIGS[_0x494d7d][_0x3392f8(0x1f9)]);}),console[_0xda4233(0x1e4)](_0xda4233(0x1e7)+t(_0xda4233(0x1fa))),console[_0xda4233(0x1e4)](_0xda4233(0x1d0)+t(_0xda4233(0x20a))+'\x0a'),console['log'](t('skill.select.inputFormat')),console['log'](t(_0xda4233(0x22e))),new Promise(_0x3cf075=>{const _0x4bc9e0=_0xda4233,_0x266ec3=createInterface({'input':process[_0x4bc9e0(0x218)],'output':process[_0x4bc9e0(0x230)]});_0x266ec3['question'](t('skill.select.prompt'),_0x2f40e0=>{const _0x4adcf7=_0x4bc9e0;_0x266ec3[_0x4adcf7(0x22f)]();const _0x401c57=_0x2f40e0[_0x4adcf7(0x1fe)]()['toLowerCase']();(_0x401c57==='q'||_0x401c57===_0x4adcf7(0x1c0)||_0x401c57==='exit')&&(console[_0x4adcf7(0x1e4)](t(_0x4adcf7(0x20d))),process[_0x4adcf7(0x1f2)](0x0));if(_0x401c57==='0'||_0x401c57===_0x4adcf7(0x227)){_0x3cf075([_0x4adcf7(0x227)]);return;}const _0x179391=_0x401c57[_0x4adcf7(0x1e5)](/\s+/)['filter'](Boolean),_0x58e2b7=[];for(const _0x266115 of _0x179391){const _0x1ff47b=parseInt(_0x266115,0xa);if(!isNaN(_0x1ff47b)&&_0x1ff47b>=0x1&&_0x1ff47b<=CORE_IDE_LIST[_0x4adcf7(0x217)]){const _0x28b9a8=CORE_IDE_LIST[_0x1ff47b-0x1];_0x28b9a8&&!_0x58e2b7['includes'](_0x28b9a8)&&_0x58e2b7['push'](_0x28b9a8);}}_0x58e2b7[_0x4adcf7(0x217)]===0x0&&(console[_0x4adcf7(0x1e4)](t(_0x4adcf7(0x210))),process[_0x4adcf7(0x1f2)](0x0)),_0x3cf075(_0x58e2b7);});});}function showHelp(){const _0x4e706b=a65_0x3990;console['log']('\x0a'+t(_0x4e706b(0x20e))+'\x0a\x0a'+t(_0x4e706b(0x1c7))+_0x4e706b(0x224)+t(_0x4e706b(0x201))+'\x0a\x20\x20lovrabet\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+t('skill.help.installInteractive')+_0x4e706b(0x1cb)+t(_0x4e706b(0x1d4))+_0x4e706b(0x1ea)+t(_0x4e706b(0x1c6))+_0x4e706b(0x216)+t(_0x4e706b(0x1c9))+'\x0a\x0a'+t(_0x4e706b(0x21b))+'\x0a'+t('skill.help.interactiveSelect')+_0x4e706b(0x1d8)+t(_0x4e706b(0x21e))+'\x0a\x0a'+t('skill.help.directInstall')+_0x4e706b(0x1ef)+t('skill.help.installDirect')+_0x4e706b(0x1c4)+t('skill.help.installAll')+'\x0a\x20\x20\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20'+t('skill.help.installAll')+'\x0a\x0a'+t(_0x4e706b(0x215))+_0x4e706b(0x1c2)+t('skill.help.supportedIDEs')+_0x4e706b(0x220)+t(_0x4e706b(0x21c))+_0x4e706b(0x219)+t(_0x4e706b(0x1d2))+'\x0a\x0a'+t(_0x4e706b(0x231))+'\x0a'+t(_0x4e706b(0x228))+'\x0a\x0a'+t(_0x4e706b(0x1f1))+'\x0a'+t(_0x4e706b(0x1cc))+'\x0a\x0a'+t(_0x4e706b(0x1e6))+'\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x0a'+t(_0x4e706b(0x1c8))+_0x4e706b(0x208)+t('skill.help.exampleDirectDesc')+_0x4e706b(0x21f)+t('skill.help.exampleBffDesc')+'\x0a\x0a\x20\x20$\x20lovrabet\x20skill\x20install\x20--all\x0a'+t(_0x4e706b(0x1ce))+'\x0a\x0a'+t(_0x4e706b(0x22c))+'\x0a'+t(_0x4e706b(0x206))+'\x0a\x0a'+t(_0x4e706b(0x1f4))+_0x4e706b(0x209));}function a65_0x3990(_0x296632,_0x360361){_0x296632=_0x296632-0x1c0;const _0x59df5f=a65_0x59df();let _0x39900f=_0x59df5f[_0x296632];return _0x39900f;}async function installSkill(_0x365c29,_0x26ed1f){const _0x52d6a8=a65_0x3990,_0x428742=process[_0x52d6a8(0x213)](),_0x1e6c7d=resolve(__dirname,_0x52d6a8(0x202));let _0x38f7df=[];!_0x365c29?_0x38f7df=await selectIDEs():_0x38f7df=[_0x365c29];_0x38f7df[_0x52d6a8(0x22b)](_0x52d6a8(0x227))&&(_0x38f7df=[...ALL_CORE_IDES,_0x52d6a8(0x1e1)]);const _0x4abc46=[];for(const _0x2db4e4 of _0x38f7df){if(_0x2db4e4===_0x52d6a8(0x1e1))_0x4abc46[_0x52d6a8(0x21a)]('agent');else{if(_0x2db4e4===_0x52d6a8(0x227))continue;else IDE_CONFIGS[_0x2db4e4]?_0x4abc46[_0x52d6a8(0x21a)](_0x2db4e4):(console[_0x52d6a8(0x1e4)](t('skill.error.unknownPlatform',{'ide':_0x2db4e4})),_0x4abc46['push']('agent'));}}_0x4abc46['length']===0x0&&(console['log'](t(_0x52d6a8(0x1da))),process['exit'](0x0));const _0x2a5f9c=_0x26ed1f&&_0x26ed1f[_0x52d6a8(0x217)]>0x0;console[_0x52d6a8(0x1e4)](_0x2a5f9c?t('skill.cdn.fetchingExtend'):t('skill.cdn.fetching'));let _0x237eed;try{_0x237eed=await fetchGuidesFromCDN(_0x2a5f9c),console[_0x52d6a8(0x1e4)](t(_0x52d6a8(0x1ff),{'count':Object['keys'](_0x237eed['guides'])[_0x52d6a8(0x217)]}));}catch(_0x4e09fe){console[_0x52d6a8(0x1d6)](t(_0x52d6a8(0x204),{'error':_0x4e09fe instanceof Error?_0x4e09fe['message']:String(_0x4e09fe)}));}let _0x9eced1=0x0;for(const _0x3c6227 of _0x4abc46){try{const _0x47211a=_0x3c6227===_0x52d6a8(0x1e1)?t(_0x52d6a8(0x1ee)):IDE_CONFIGS[_0x3c6227]?.['name']||_0x3c6227;console[_0x52d6a8(0x1e4)](t(_0x52d6a8(0x1eb),{'name':_0x47211a}));const _0x52480a=_0x3c6227===_0x52d6a8(0x1e1)?undefined:IDE_CONFIGS[_0x3c6227],_0x17a272=await installSingleIDE(_0x3c6227,_0x52480a,_0x428742,_0x1e6c7d,_0x237eed,_0x26ed1f);_0x9eced1+=_0x17a272;if(_0x52480a?.[_0x52d6a8(0x1f3)])for(const _0x3584df of _0x52480a['folders']){const _0x521318=_0x52480a[_0x52d6a8(0x214)]?.[_0x52d6a8(0x1e9)](_0x4ccb74=>_0x4ccb74['path']['startsWith'](_0x3584df+'/'))??![];_0x521318?console[_0x52d6a8(0x1e4)](t(_0x52d6a8(0x1e8),{'path':_0x3584df})):console[_0x52d6a8(0x1e4)](t('skill.installing.created',{'path':_0x3584df}));}if(_0x52480a?.[_0x52d6a8(0x214)])for(const _0x55ec08 of _0x52480a['files']){console['log'](t(_0x52d6a8(0x207),{'path':_0x55ec08[_0x52d6a8(0x226)]}));}}catch(_0x28214b){console['error'](t(_0x52d6a8(0x205),{'ide':_0x3c6227,'error':_0x28214b instanceof Error?_0x28214b[_0x52d6a8(0x1c3)]:String(_0x28214b)}));}}_0x237eed&&writeGuidesToProject(_0x237eed,_0x428742,_0x52d6a8(0x232),_0x26ed1f);const _0x4049ef={'version':_0x52d6a8(0x1f5),'installedAt':new Date()[_0x52d6a8(0x1d9)](),'platforms':_0x4abc46},_0x587274=join(_0x428742,_0x52d6a8(0x1ec)),_0x1b6cb4=join(_0x428742,_0x52d6a8(0x229));await copyDir(_0x1b6cb4,_0x1b6cb4),writeFileSync(_0x587274,JSON['stringify'](_0x4049ef,null,0x2),'utf-8'),console[_0x52d6a8(0x1e4)](t(_0x52d6a8(0x1ed))),console['log'](t(_0x52d6a8(0x1d7),{'count':_0x9eced1})),console[_0x52d6a8(0x1e4)](t(_0x52d6a8(0x222))),console[_0x52d6a8(0x1e4)](t('skill.done.guidesPath')),logger['info'](_0x52d6a8(0x221),_0x52d6a8(0x1dd),{'projectRoot':_0x428742,'ides':_0x4abc46,'foldersCount':_0x9eced1});}
@@ -1 +1 @@
1
- const a68_0x14b76b=a68_0x2ee9;(function(_0x1e1f0b,_0x260229){const _0x14bc51=a68_0x2ee9,_0x181c3c=_0x1e1f0b();while(!![]){try{const _0x4a10=-parseInt(_0x14bc51(0x97))/0x1+-parseInt(_0x14bc51(0x91))/0x2*(-parseInt(_0x14bc51(0x8d))/0x3)+-parseInt(_0x14bc51(0x8a))/0x4*(parseInt(_0x14bc51(0x8b))/0x5)+parseInt(_0x14bc51(0x99))/0x6*(parseInt(_0x14bc51(0x7d))/0x7)+-parseInt(_0x14bc51(0x7f))/0x8*(-parseInt(_0x14bc51(0x81))/0x9)+-parseInt(_0x14bc51(0x77))/0xa*(-parseInt(_0x14bc51(0x98))/0xb)+-parseInt(_0x14bc51(0x89))/0xc;if(_0x4a10===_0x260229)break;else _0x181c3c['push'](_0x181c3c['shift']());}catch(_0x5138cf){_0x181c3c['push'](_0x181c3c['shift']());}}}(a68_0xc2f6,0x45905));import{writeFileSync,existsSync,mkdirSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';import{dirname}from'node:path';function a68_0xc2f6(){const _0x3c2cf8=['../../cdn-source/skills','skill.cdn.fetchFailed','keys','guides','.lovrabet/skill-manifest.json','191290LtFmqV','3043931kyAFlI','202854hhdNmX','toISOString','log','setLogPath','2.0.0','10ZYotdn','skill.cdn.fetchSuccess','length','开始安装技能包','安装成功','info','14lBaVFE','skill.error.unknownIDE','1950632cIuvVd','error','18rzATSI','skill-install-non-interactive','name','skill.done.guidesPathInline','.lovrabet/skill/.shared/guides','\x20\x20✓\x20','.lovrabet','bind','9119484zAojoy','463724lnbhwO','5dgPcja','skill.cdn.fetchingExtend','4074jkFvhb','utf-8','stringify','skill.error.installFailed','766YGRLee'];a68_0xc2f6=function(){return _0x3c2cf8;};return a68_0xc2f6();}import{logger}from'../utils/logger.js';import{IDE_CONFIGS}from'../utils/ai_config.js';function a68_0x2ee9(_0x5846bf,_0x55400e){_0x5846bf=_0x5846bf-0x76;const _0xc2f611=a68_0xc2f6();let _0x2ee9ca=_0xc2f611[_0x5846bf];return _0x2ee9ca;}import{installSingleIDE}from'./skill-installer.js';import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a68_0x1a3fc4 from'../i18n/index.js';const t=a68_0x1a3fc4['t'][a68_0x14b76b(0x88)](a68_0x1a3fc4),__dirname=dirname(fileURLToPath(import.meta.url));export async function installSkillsNonInteractive(_0x29f00d,_0x19b87f,_0x5a1fa3=process['cwd']()){const _0x581c75=a68_0x14b76b,_0x4c8fac=resolve(__dirname,_0x581c75(0x92));logger[_0x581c75(0x9c)](_0x5a1fa3),logger[_0x581c75(0x7c)](_0x581c75(0x82),_0x581c75(0x7a),{'ides':_0x29f00d});const _0x5b34a0=join(_0x5a1fa3,_0x581c75(0x87));!existsSync(_0x5b34a0)&&mkdirSync(_0x5b34a0,{'recursive':!![]});const _0x1c8ab7=_0x19b87f&&_0x19b87f[_0x581c75(0x79)]>0x0;console[_0x581c75(0x9b)](_0x1c8ab7?t(_0x581c75(0x8c)):t('skill.cdn.fetching'));let _0x54788f;try{_0x54788f=await fetchGuidesFromCDN(_0x1c8ab7),console['log'](t(_0x581c75(0x78),{'count':Object[_0x581c75(0x94)](_0x54788f[_0x581c75(0x95)])[_0x581c75(0x79)]}));}catch(_0x5b1eae){console['warn'](t(_0x581c75(0x93),{'error':_0x5b1eae instanceof Error?_0x5b1eae['message']:String(_0x5b1eae)}));}let _0xde99e2=0x0;for(const _0xb955a2 of _0x29f00d){try{const _0x454de9=IDE_CONFIGS[_0xb955a2];if(!_0x454de9){console['warn'](t(_0x581c75(0x7e),{'ide':_0xb955a2}));continue;}const _0x38041d=await installSingleIDE(_0xb955a2,_0x454de9,_0x5a1fa3,_0x4c8fac,_0x54788f,_0x19b87f);_0xde99e2+=_0x38041d,console[_0x581c75(0x9b)](_0x581c75(0x86)+(_0x454de9[_0x581c75(0x83)]||_0xb955a2));}catch(_0x3d6f63){console[_0x581c75(0x80)](t(_0x581c75(0x90),{'ide':_0xb955a2,'error':_0x3d6f63 instanceof Error?_0x3d6f63['message']:String(_0x3d6f63)}));}}_0x54788f&&writeGuidesToProject(_0x54788f,_0x5a1fa3,_0x581c75(0x85),_0x19b87f);const _0x4c65ca={'version':_0x581c75(0x76),'installedAt':new Date()[_0x581c75(0x9a)](),'platforms':_0x29f00d},_0x179005=join(_0x5a1fa3,_0x581c75(0x96));writeFileSync(_0x179005,JSON[_0x581c75(0x8f)](_0x4c65ca,null,0x2),_0x581c75(0x8e)),logger[_0x581c75(0x7c)]('skill-install-non-interactive',_0x581c75(0x7b),{'projectRoot':_0x5a1fa3,'ides':_0x29f00d,'foldersCount':_0xde99e2}),console[_0x581c75(0x9b)](t('skill.done.success',{'count':_0xde99e2})),console[_0x581c75(0x9b)](t(_0x581c75(0x84)));}
1
+ const a66_0x3459c2=a66_0x4722;(function(_0x1e507d,_0x426cf8){const _0x4a156d=a66_0x4722,_0x214810=_0x1e507d();while(!![]){try{const _0x4aa8e1=parseInt(_0x4a156d(0xe2))/0x1+-parseInt(_0x4a156d(0xe8))/0x2+parseInt(_0x4a156d(0xd8))/0x3*(-parseInt(_0x4a156d(0xcc))/0x4)+-parseInt(_0x4a156d(0xe4))/0x5+parseInt(_0x4a156d(0xdc))/0x6*(-parseInt(_0x4a156d(0xeb))/0x7)+-parseInt(_0x4a156d(0xe1))/0x8+parseInt(_0x4a156d(0xd2))/0x9;if(_0x4aa8e1===_0x426cf8)break;else _0x214810['push'](_0x214810['shift']());}catch(_0x41b457){_0x214810['push'](_0x214810['shift']());}}}(a66_0x440c,0x7e795));import{writeFileSync,existsSync,mkdirSync}from'node:fs';import{resolve,join}from'node:path';import{fileURLToPath}from'node:url';function a66_0x4722(_0x3894df,_0x511862){_0x3894df=_0x3894df-0xcc;const _0x440c45=a66_0x440c();let _0x4722ca=_0x440c45[_0x3894df];return _0x4722ca;}import{dirname}from'node:path';import{logger}from'../utils/logger.js';import{IDE_CONFIGS}from'../utils/ai_config.js';import{installSingleIDE}from'./skill-installer.js';function a66_0x440c(){const _0x551985=['2044086UnqRPY','2.0.0','\x20\x20✓\x20','message','skill.error.installFailed','972360ttdreZ','882188iwZFaJ','skill-install-non-interactive','2510335NJBjQo','toISOString','cwd','.lovrabet/skill-manifest.json','563928bCkfoB','length','skill.error.unknownIDE','14zlSXzN','431180ZOLcJq','skill.cdn.fetchFailed','skill.done.success','setLogPath','warn','bind','15855858XYzxFX','安装成功','../../cdn-source/skills','skill.cdn.fetching','skill.done.guidesPathInline','log','15IejNEO','开始安装技能包','info','utf-8'];a66_0x440c=function(){return _0x551985;};return a66_0x440c();}import{fetchGuidesFromCDN,writeGuidesToProject}from'../utils/guides-cdn.js';import a66_0x12ef09 from'../i18n/index.js';const t=a66_0x12ef09['t'][a66_0x3459c2(0xd1)](a66_0x12ef09),__dirname=dirname(fileURLToPath(import.meta.url));export async function installSkillsNonInteractive(_0x549108,_0x5c09c8,_0x471746=process[a66_0x3459c2(0xe6)]()){const _0x3e6485=a66_0x3459c2,_0xf128a9=resolve(__dirname,_0x3e6485(0xd4));logger[_0x3e6485(0xcf)](_0x471746),logger[_0x3e6485(0xda)](_0x3e6485(0xe3),_0x3e6485(0xd9),{'ides':_0x549108});const _0x59e099=join(_0x471746,'.lovrabet');!existsSync(_0x59e099)&&mkdirSync(_0x59e099,{'recursive':!![]});const _0x32aebd=_0x5c09c8&&_0x5c09c8[_0x3e6485(0xe9)]>0x0;console[_0x3e6485(0xd7)](_0x32aebd?t('skill.cdn.fetchingExtend'):t(_0x3e6485(0xd5)));let _0x42ed5c;try{_0x42ed5c=await fetchGuidesFromCDN(_0x32aebd),console[_0x3e6485(0xd7)](t('skill.cdn.fetchSuccess',{'count':Object['keys'](_0x42ed5c['guides'])[_0x3e6485(0xe9)]}));}catch(_0x121a6a){console[_0x3e6485(0xd0)](t(_0x3e6485(0xcd),{'error':_0x121a6a instanceof Error?_0x121a6a[_0x3e6485(0xdf)]:String(_0x121a6a)}));}let _0xda623a=0x0;for(const _0x41e1dd of _0x549108){try{const _0x24546c=IDE_CONFIGS[_0x41e1dd];if(!_0x24546c){console[_0x3e6485(0xd0)](t(_0x3e6485(0xea),{'ide':_0x41e1dd}));continue;}const _0x255ff0=await installSingleIDE(_0x41e1dd,_0x24546c,_0x471746,_0xf128a9,_0x42ed5c,_0x5c09c8);_0xda623a+=_0x255ff0,console[_0x3e6485(0xd7)](_0x3e6485(0xde)+(_0x24546c['name']||_0x41e1dd));}catch(_0x1309e9){console['error'](t(_0x3e6485(0xe0),{'ide':_0x41e1dd,'error':_0x1309e9 instanceof Error?_0x1309e9[_0x3e6485(0xdf)]:String(_0x1309e9)}));}}_0x42ed5c&&writeGuidesToProject(_0x42ed5c,_0x471746,'.lovrabet/skill/.shared/guides',_0x5c09c8);const _0x3be265={'version':_0x3e6485(0xdd),'installedAt':new Date()[_0x3e6485(0xe5)](),'platforms':_0x549108},_0x157af5=join(_0x471746,_0x3e6485(0xe7));writeFileSync(_0x157af5,JSON['stringify'](_0x3be265,null,0x2),_0x3e6485(0xdb)),logger[_0x3e6485(0xda)](_0x3e6485(0xe3),_0x3e6485(0xd3),{'projectRoot':_0x471746,'ides':_0x549108,'foldersCount':_0xda623a}),console[_0x3e6485(0xd7)](t(_0x3e6485(0xce),{'count':_0xda623a})),console['log'](t(_0x3e6485(0xd6)));}
@@ -1 +1 @@
1
- (function(_0x24bb5a,_0x21570f){const _0x7b6e72=a69_0x3127,_0x16e877=_0x24bb5a();while(!![]){try{const _0x4c2e29=-parseInt(_0x7b6e72(0x96))/0x1+-parseInt(_0x7b6e72(0x94))/0x2*(parseInt(_0x7b6e72(0x95))/0x3)+-parseInt(_0x7b6e72(0xa6))/0x4+parseInt(_0x7b6e72(0x9e))/0x5*(-parseInt(_0x7b6e72(0xa8))/0x6)+-parseInt(_0x7b6e72(0x8d))/0x7+parseInt(_0x7b6e72(0x99))/0x8*(parseInt(_0x7b6e72(0x9d))/0x9)+parseInt(_0x7b6e72(0x9a))/0xa;if(_0x4c2e29===_0x21570f)break;else _0x16e877['push'](_0x16e877['shift']());}catch(_0x53566c){_0x16e877['push'](_0x16e877['shift']());}}}(a69_0x4969,0x37d7b));function a69_0x3127(_0x3ef171,_0x16077f){_0x3ef171=_0x3ef171-0x8d;const _0x496929=a69_0x4969();let _0x312796=_0x496929[_0x3ef171];return _0x312796;}import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{dirname,join}from'node:path';function a69_0x4969(){const _0x59993b=['keys','<!--\x20GUIDES_APPEND\x20-->','guides','path','1739048jFdndk','requireFlags','6rNiHuW','name','1647933JkShmA','length','utf-8','push','template','|\x20`','`\x20|\x20','2XHMRfp','1015743woCSeH','263560gVVSit','some','join','270304WAeWdF','18019480gcIxsp','files','folders','18xlBHVI','1842355AgkPyn','sort','title','replace'];a69_0x4969=function(){return _0x59993b;};return a69_0x4969();}import{writeSkillFile,appendExtendContents}from'../utils/guides-cdn.js';export async function installSingleIDE(_0x488cb8,_0xb1c6e6,_0x46b8ac,_0x3696e7,_0x5b02f1,_0x3d192f){const _0x54fdfc=a69_0x3127;let _0x2d254f=0x0;const _0x3e6bec=_0xb1c6e6?.[_0x54fdfc(0x9c)]??['.'+_0x488cb8];for(const _0x392cc8 of _0x3e6bec){const _0x45bb5e=join(_0x46b8ac,_0x392cc8),_0x298f51=_0xb1c6e6?.['files']?.[_0x54fdfc(0x97)](_0x5e21a6=>_0x5e21a6[_0x54fdfc(0xa5)]['startsWith'](_0x392cc8+'/'))??![];_0x298f51?!existsSync(_0x45bb5e)&&(mkdirSync(_0x45bb5e,{'recursive':!![]}),_0x2d254f++):!existsSync(_0x45bb5e)&&(writeFileSync(_0x45bb5e,'',_0x54fdfc(0x8f)),_0x2d254f++);}if(_0xb1c6e6?.[_0x54fdfc(0x9b)]){const _0x16704d=_0xb1c6e6[_0x54fdfc(0xa9)]||_0x488cb8;for(const _0x18873b of _0xb1c6e6[_0x54fdfc(0x9b)]){const _0x209550=join(_0x46b8ac,_0x18873b[_0x54fdfc(0xa5)]);await createFileFromTemplate(_0x18873b,_0x209550,_0x16704d,_0x3696e7,_0x5b02f1,_0x3d192f),_0x2d254f++;}}return _0x2d254f;}export async function createFileFromTemplate(_0xd78de5,_0xf87701,_0x28c63e,_0x27ec15,_0x56dfd2,_0x796b8f){const _0x527bf4=a69_0x3127,_0x1549f3=dirname(_0xf87701);!existsSync(_0x1549f3)&&mkdirSync(_0x1549f3,{'recursive':!![]});const _0x503895=_0xd78de5['template']==='SKILL.md.tpl';if(existsSync(_0xf87701)&&!_0x503895)return;if(_0xd78de5[_0x527bf4(0x91)]){const _0x272206=join(_0x27ec15,_0xd78de5[_0x527bf4(0x91)]);if(existsSync(_0x272206)){let _0x2e2a36=readFileSync(_0x272206,_0x527bf4(0x8f));_0x2e2a36=_0x2e2a36['replace'](/\{\{IDE_NAME\}\}/g,_0x28c63e);_0x56dfd2&&_0x503895&&(_0x2e2a36=insertGuidesSection(_0x2e2a36,_0x56dfd2,_0x796b8f),_0x2e2a36=appendExtendContents(_0x2e2a36,_0x56dfd2,_0x796b8f));writeFileSync(_0xf87701,_0x2e2a36,_0x527bf4(0x8f));return;}if(_0x56dfd2&&_0x503895)try{writeSkillFile(_0x56dfd2,_0xf87701,_0x28c63e,_0x796b8f);return;}catch{}}writeFileSync(_0xf87701,'',_0x527bf4(0x8f));}function insertGuidesSection(_0x167e2f,_0x35d970,_0x31a288){const _0x31e186=a69_0x3127,_0x5ad7d2=_0x31e186(0xa3),_0x4c88d4=_0x167e2f['indexOf'](_0x5ad7d2);if(_0x4c88d4===-0x1)return _0x167e2f;const _0x2cf774=[],_0x6e4c3c=Object[_0x31e186(0xa2)](_0x35d970[_0x31e186(0xa4)])[_0x31e186(0x9f)]();for(const _0x1c7e45 of _0x6e4c3c){const _0x1c2dda=_0x35d970['guides'][_0x1c7e45];if(!_0x1c2dda)continue;if(/^0[1-6]-/['test'](_0x1c7e45))continue;if(_0x1c2dda[_0x31e186(0xa7)]&&_0x1c2dda[_0x31e186(0xa7)][_0x31e186(0x8e)]>0x0){const _0x36c60a=_0x1c2dda[_0x31e186(0xa7)][_0x31e186(0x97)](_0x428dee=>_0x31a288?.['includes'](_0x428dee));if(!_0x36c60a)continue;}const _0x4ece2a=_0x1c2dda['path'][_0x31e186(0xa1)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x2cf774[_0x31e186(0x90)](_0x31e186(0x92)+_0x4ece2a+_0x31e186(0x93)+_0x1c2dda[_0x31e186(0xa0)]+'\x20|');}if(_0x2cf774[_0x31e186(0x8e)]===0x0)return _0x167e2f[_0x31e186(0xa1)](_0x5ad7d2,_0x31e186(0xa3));const _0x59e61b=_0x2cf774[_0x31e186(0x98)]('\x0a');return _0x167e2f[_0x31e186(0xa1)](_0x5ad7d2,_0x59e61b+'\x0a<!--\x20GUIDES_APPEND\x20-->');}
1
+ (function(_0xa157b5,_0x3331d1){const _0x53a5d4=a67_0x46bf,_0x2a5ba8=_0xa157b5();while(!![]){try{const _0x5e943b=-parseInt(_0x53a5d4(0x87))/0x1+-parseInt(_0x53a5d4(0x81))/0x2+-parseInt(_0x53a5d4(0x97))/0x3*(-parseInt(_0x53a5d4(0x8d))/0x4)+parseInt(_0x53a5d4(0x85))/0x5*(parseInt(_0x53a5d4(0x7c))/0x6)+-parseInt(_0x53a5d4(0x89))/0x7+parseInt(_0x53a5d4(0x91))/0x8+-parseInt(_0x53a5d4(0x90))/0x9*(-parseInt(_0x53a5d4(0x8e))/0xa);if(_0x5e943b===_0x3331d1)break;else _0x2a5ba8['push'](_0x2a5ba8['shift']());}catch(_0x4b3cbc){_0x2a5ba8['push'](_0x2a5ba8['shift']());}}}(a67_0x50ec,0x1beee));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{dirname,join}from'node:path';import{writeSkillFile,appendExtendContents}from'../utils/guides-cdn.js';export async function installSingleIDE(_0x106772,_0x37c3bf,_0xbc366f,_0xf29ab0,_0x43d19d,_0x4bccab){const _0x4e80bc=a67_0x46bf;let _0x3e6cba=0x0;const _0x349c53=_0x37c3bf?.['folders']??['.'+_0x106772];for(const _0x10b96e of _0x349c53){const _0x24a763=join(_0xbc366f,_0x10b96e),_0x181d78=_0x37c3bf?.[_0x4e80bc(0x7f)]?.['some'](_0x27224c=>_0x27224c[_0x4e80bc(0x84)][_0x4e80bc(0x98)](_0x10b96e+'/'))??![];_0x181d78?!existsSync(_0x24a763)&&(mkdirSync(_0x24a763,{'recursive':!![]}),_0x3e6cba++):!existsSync(_0x24a763)&&(writeFileSync(_0x24a763,'',_0x4e80bc(0x8c)),_0x3e6cba++);}if(_0x37c3bf?.[_0x4e80bc(0x7f)]){const _0x5aa6c7=_0x37c3bf[_0x4e80bc(0x93)]||_0x106772;for(const _0x4d40f9 of _0x37c3bf[_0x4e80bc(0x7f)]){const _0x247928=join(_0xbc366f,_0x4d40f9[_0x4e80bc(0x84)]);await createFileFromTemplate(_0x4d40f9,_0x247928,_0x5aa6c7,_0xf29ab0,_0x43d19d,_0x4bccab),_0x3e6cba++;}}return _0x3e6cba;}export async function createFileFromTemplate(_0x4144ad,_0x8b62b8,_0x2a8c25,_0xb5f4fe,_0x42a739,_0x1ae88b){const _0x15cdc0=a67_0x46bf,_0x5b9156=dirname(_0x8b62b8);!existsSync(_0x5b9156)&&mkdirSync(_0x5b9156,{'recursive':!![]});const _0x1fc22f=_0x4144ad[_0x15cdc0(0x83)]===_0x15cdc0(0x95);if(existsSync(_0x8b62b8)&&!_0x1fc22f)return;if(_0x4144ad[_0x15cdc0(0x83)]){const _0x1f9237=join(_0xb5f4fe,_0x4144ad['template']);if(existsSync(_0x1f9237)){let _0xb4d991=readFileSync(_0x1f9237,_0x15cdc0(0x8c));_0xb4d991=_0xb4d991[_0x15cdc0(0x8f)](/\{\{IDE_NAME\}\}/g,_0x2a8c25);_0x42a739&&_0x1fc22f&&(_0xb4d991=insertGuidesSection(_0xb4d991,_0x42a739,_0x1ae88b),_0xb4d991=appendExtendContents(_0xb4d991,_0x42a739,_0x1ae88b));writeFileSync(_0x8b62b8,_0xb4d991,_0x15cdc0(0x8c));return;}if(_0x42a739&&_0x1fc22f)try{writeSkillFile(_0x42a739,_0x8b62b8,_0x2a8c25,_0x1ae88b);return;}catch{}}writeFileSync(_0x8b62b8,'',_0x15cdc0(0x8c));}function insertGuidesSection(_0x31be29,_0x50a651,_0x97a226){const _0x2ef5dc=a67_0x46bf,_0x841ca5=_0x2ef5dc(0x8a),_0x20dc26=_0x31be29[_0x2ef5dc(0x88)](_0x841ca5);if(_0x20dc26===-0x1)return _0x31be29;const _0x504118=[],_0x267daa=Object['keys'](_0x50a651['guides'])[_0x2ef5dc(0x8b)]();for(const _0x4c4761 of _0x267daa){const _0x32ed17=_0x50a651[_0x2ef5dc(0x82)][_0x4c4761];if(!_0x32ed17)continue;if(/^0[1-6]-/[_0x2ef5dc(0x94)](_0x4c4761))continue;if(_0x32ed17[_0x2ef5dc(0x80)]&&_0x32ed17['requireFlags'][_0x2ef5dc(0x96)]>0x0){const _0x4b4619=_0x32ed17[_0x2ef5dc(0x80)]['some'](_0x3b3dd6=>_0x97a226?.[_0x2ef5dc(0x7e)](_0x3b3dd6));if(!_0x4b4619)continue;}const _0x494207=_0x32ed17['path'][_0x2ef5dc(0x8f)](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x504118[_0x2ef5dc(0x7d)]('|\x20`'+_0x494207+_0x2ef5dc(0x86)+_0x32ed17[_0x2ef5dc(0x92)]+'\x20|');}if(_0x504118['length']===0x0)return _0x31be29[_0x2ef5dc(0x8f)](_0x841ca5,'<!--\x20GUIDES_APPEND\x20-->');const _0x346d26=_0x504118['join']('\x0a');return _0x31be29['replace'](_0x841ca5,_0x346d26+'\x0a<!--\x20GUIDES_APPEND\x20-->');}function a67_0x46bf(_0x49b043,_0x4136ca){_0x49b043=_0x49b043-0x7c;const _0x50ec85=a67_0x50ec();let _0x46bf43=_0x50ec85[_0x49b043];return _0x46bf43;}function a67_0x50ec(){const _0x1045d5=['name','test','SKILL.md.tpl','length','483AnRKmr','startsWith','8940VtVRBw','push','includes','files','requireFlags','355524uOmfEz','guides','template','path','760NpCHaE','`\x20|\x20','83724NwfYev','indexOf','1170386opVKEv','<!--\x20GUIDES_APPEND\x20-->','sort','utf-8','3340OcnOIl','50qNHzvj','replace','3537pirbZW','1441744tlvbXq','title'];a67_0x50ec=function(){return _0x1045d5;};return a67_0x50ec();}
@@ -1 +1 @@
1
- (function(_0x5bb3,_0x3e4266){const _0x459e94=a71_0x422e,_0x4b3e4e=_0x5bb3();while(!![]){try{const _0x145208=-parseInt(_0x459e94(0x1a5))/0x1+-parseInt(_0x459e94(0x1a8))/0x2*(parseInt(_0x459e94(0x19b))/0x3)+parseInt(_0x459e94(0x1a1))/0x4*(parseInt(_0x459e94(0x1a4))/0x5)+parseInt(_0x459e94(0x19f))/0x6*(parseInt(_0x459e94(0x19e))/0x7)+-parseInt(_0x459e94(0x1a6))/0x8*(parseInt(_0x459e94(0x1a0))/0x9)+parseInt(_0x459e94(0x1aa))/0xa+parseInt(_0x459e94(0x19d))/0xb*(parseInt(_0x459e94(0x196))/0xc);if(_0x145208===_0x3e4266)break;else _0x4b3e4e['push'](_0x4b3e4e['shift']());}catch(_0x302d30){_0x4b3e4e['push'](_0x4b3e4e['shift']());}}}(a71_0x17d4,0x80452));function a71_0x422e(_0x5b66ec,_0x22e597){_0x5b66ec=_0x5b66ec-0x194;const _0x17d476=a71_0x17d4();let _0x422e64=_0x17d476[_0x5b66ec];return _0x422e64;}import{jsxs as a71_0x119afc,jsx as a71_0x55780e}from'react/jsx-runtime';import{Text,Box}from'ink';function a71_0x17d4(){const _0x1be828=['column','[✓]','red','ui.ideSelector.hotkeys','864192qaemid','name','gray','white','has','33CzbaHa','ui.ideSelector.title','22mLPwqc','13118THEPNg','3174aGMLoc','45BBeluH','4pviLoe','[\x20]','description','3035735zADHpO','461077GyMEDO','1157960itUyMd','blue','181282jgbEGM','cyan','9647220dAccdL'];a71_0x17d4=function(){return _0x1be828;};return a71_0x17d4();}import{useI18n}from'../i18n/hooks.js';export function IDESelector({ideList:_0x378a11,title:_0x1d2096,selection:_0x247f1d}){const _0x51ceeb=a71_0x422e,{t:_0x30ebf9}=useI18n(),{selectedIndexes:_0x1d3860,highlightIndex:_0x2ea2da,errorMsg:_0x26b069}=_0x247f1d;return a71_0x119afc(Box,{'flexDirection':_0x51ceeb(0x1ab),'marginTop':0x1,'children':[a71_0x55780e(Box,{'children':a71_0x119afc(Text,{'color':_0x51ceeb(0x1a9),'children':['*\x20',_0x1d2096]})}),_0x26b069&&a71_0x55780e(Box,{'marginTop':0x1,'children':a71_0x119afc(Text,{'color':_0x51ceeb(0x194),'children':['✗\x20',_0x26b069]})}),a71_0x119afc(Box,{'marginTop':0x1,'flexDirection':_0x51ceeb(0x1ab),'children':[a71_0x119afc(Text,{'bold':!![],'children':['*\x20',_0x30ebf9(_0x51ceeb(0x19c))]}),_0x378a11['map']((_0x4caf54,_0x2649eb)=>{const _0xff9ae=_0x51ceeb,_0x35d66f=_0x2ea2da===_0x2649eb,_0x2ab22f=_0x1d3860[_0xff9ae(0x19a)](_0x2649eb);return a71_0x55780e(Box,{'children':a71_0x119afc(Text,{'backgroundColor':_0x35d66f?_0xff9ae(0x1a7):undefined,'color':_0x35d66f?_0xff9ae(0x199):undefined,'children':['\x20\x20',_0x2ab22f?_0xff9ae(0x1ac):_0xff9ae(0x1a2),'\x20',_0x4caf54[_0xff9ae(0x197)],'\x20',a71_0x119afc(Text,{'color':_0x35d66f?'white':_0xff9ae(0x198),'dimColor':!_0x35d66f,'children':['-\x20',_0x4caf54[_0xff9ae(0x1a3)]]})]})},_0x4caf54['key']);}),a71_0x55780e(Box,{'marginTop':0x1,'children':a71_0x119afc(Text,{'color':_0x51ceeb(0x198),'children':['\x20',_0x30ebf9(_0x51ceeb(0x195))]})})]})]});}export{useIDESelection}from'./useIDESelection.js';
1
+ (function(_0x1217fa,_0x51814d){const _0x8244e7=a69_0x271e,_0x3be4f8=_0x1217fa();while(!![]){try{const _0x5bc0e2=parseInt(_0x8244e7(0xb4))/0x1*(-parseInt(_0x8244e7(0xa6))/0x2)+parseInt(_0x8244e7(0xaf))/0x3+-parseInt(_0x8244e7(0xad))/0x4+-parseInt(_0x8244e7(0xb6))/0x5*(parseInt(_0x8244e7(0xae))/0x6)+-parseInt(_0x8244e7(0xa1))/0x7*(parseInt(_0x8244e7(0xa2))/0x8)+parseInt(_0x8244e7(0xa5))/0x9+parseInt(_0x8244e7(0xa7))/0xa*(parseInt(_0x8244e7(0xb5))/0xb);if(_0x5bc0e2===_0x51814d)break;else _0x3be4f8['push'](_0x3be4f8['shift']());}catch(_0x18ef9d){_0x3be4f8['push'](_0x3be4f8['shift']());}}}(a69_0x1704,0x4f651));import{jsxs as a69_0x3a9dda,jsx as a69_0x1d5928}from'react/jsx-runtime';function a69_0x271e(_0x94468e,_0x374705){_0x94468e=_0x94468e-0xa1;const _0x1704df=a69_0x1704();let _0x271e91=_0x1704df[_0x94468e];return _0x271e91;}import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';export function IDESelector({ideList:_0x4f068d,title:_0x23abb9,selection:_0x2b1037}){const _0x3df494=a69_0x271e,{t:_0x2b7c5d}=useI18n(),{selectedIndexes:_0x23f9db,highlightIndex:_0x236af1,errorMsg:_0x5c0430}=_0x2b1037;return a69_0x3a9dda(Box,{'flexDirection':'column','marginTop':0x1,'children':[a69_0x1d5928(Box,{'children':a69_0x3a9dda(Text,{'color':_0x3df494(0xa4),'children':['*\x20',_0x23abb9]})}),_0x5c0430&&a69_0x1d5928(Box,{'marginTop':0x1,'children':a69_0x3a9dda(Text,{'color':'red','children':['✗\x20',_0x5c0430]})}),a69_0x3a9dda(Box,{'marginTop':0x1,'flexDirection':_0x3df494(0xab),'children':[a69_0x3a9dda(Text,{'bold':!![],'children':['*\x20',_0x2b7c5d('ui.ideSelector.title')]}),_0x4f068d['map']((_0x25d7a9,_0x56f338)=>{const _0x1fd840=_0x3df494,_0x21259d=_0x236af1===_0x56f338,_0x3afba3=_0x23f9db[_0x1fd840(0xb0)](_0x56f338);return a69_0x1d5928(Box,{'children':a69_0x3a9dda(Text,{'backgroundColor':_0x21259d?_0x1fd840(0xac):undefined,'color':_0x21259d?'white':undefined,'children':['\x20\x20',_0x3afba3?_0x1fd840(0xa9):'[\x20]','\x20',_0x25d7a9[_0x1fd840(0xa8)],'\x20',a69_0x3a9dda(Text,{'color':_0x21259d?_0x1fd840(0xaa):_0x1fd840(0xb1),'dimColor':!_0x21259d,'children':['-\x20',_0x25d7a9[_0x1fd840(0xb3)]]})]})},_0x25d7a9[_0x1fd840(0xa3)]);}),a69_0x1d5928(Box,{'marginTop':0x1,'children':a69_0x3a9dda(Text,{'color':_0x3df494(0xb1),'children':['\x20',_0x2b7c5d(_0x3df494(0xb2))]})})]})]});}export{useIDESelection}from'./useIDESelection.js';function a69_0x1704(){const _0x5437be=['5ShsWuD','7gyfHfB','4054224oAbpVb','key','cyan','2851911NPLsim','2eyWaMb','50nTwaMl','name','[✓]','white','column','blue','157516tAZDxQ','1633614XhNXGi','1618800hWooDh','has','gray','ui.ideSelector.hotkeys','description','272567VIEMSV','1231373ZGyrcu'];a69_0x1704=function(){return _0x5437be;};return a69_0x1704();}
@@ -1 +1 @@
1
- (function(_0x350e3b,_0x15e4c1){const _0x574642=a72_0x274a,_0x22b2f0=_0x350e3b();while(!![]){try{const _0x1341d5=parseInt(_0x574642(0x16d))/0x1+-parseInt(_0x574642(0x16b))/0x2+parseInt(_0x574642(0x170))/0x3+parseInt(_0x574642(0x179))/0x4*(parseInt(_0x574642(0x16e))/0x5)+parseInt(_0x574642(0x16f))/0x6*(-parseInt(_0x574642(0x16a))/0x7)+-parseInt(_0x574642(0x17d))/0x8*(-parseInt(_0x574642(0x174))/0x9)+-parseInt(_0x574642(0x177))/0xa*(parseInt(_0x574642(0x175))/0xb);if(_0x1341d5===_0x15e4c1)break;else _0x22b2f0['push'](_0x22b2f0['shift']());}catch(_0x3815d6){_0x22b2f0['push'](_0x22b2f0['shift']());}}}(a72_0x30af,0x3962a));function a72_0x274a(_0x9872ac,_0x3a7582){_0x9872ac=_0x9872ac-0x16a;const _0x30af4b=a72_0x30af();let _0x274a34=_0x30af4b[_0x9872ac];return _0x274a34;}function a72_0x30af(){const _0x182cd9=['42XqzaRx','752892ZeQcjO','delete','length','downArrow','9HEiqBb','97130ktDHCv','map','590AcZdRA','key','148MzfaNe','filter','findIndex','from','3743848ghTgwe','35196mrAUnD','505914eXmaDO','has','155620GEdvhf','22920VOIiqF'];a72_0x30af=function(){return _0x182cd9;};return a72_0x30af();}import{useState,useCallback}from'react';export function useIDESelection({ideList:_0x4a7c8c,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0xbce404=a72_0x274a,[_0x13e887,_0x516aa7]=useState(new Set(preselectedIDEs[_0xbce404(0x176)](_0x3daeb3=>_0x4a7c8c[_0xbce404(0x17b)](_0x164d1d=>_0x164d1d[_0xbce404(0x178)]===_0x3daeb3))[_0xbce404(0x17a)](_0x324200=>_0x324200>=0x0))),[_0x576b88,_0x253568]=useState(0x0),[_0x26e112,_0x560027]=useState(''),_0x5115af=useCallback(()=>{const _0x1d8b26=_0xbce404;_0x253568(_0x4fb5ea=>_0x4fb5ea>0x0?_0x4fb5ea-0x1:_0x4a7c8c[_0x1d8b26(0x172)]-0x1);},[_0x4a7c8c[_0xbce404(0x172)]]),_0x1396c6=useCallback(()=>{const _0x97b1aa=_0xbce404;_0x253568(_0x14d1c7=>_0x14d1c7<_0x4a7c8c[_0x97b1aa(0x172)]-0x1?_0x14d1c7+0x1:0x0);},[_0x4a7c8c['length']]),_0x3a214d=useCallback(()=>{if(!multiSelect){_0x516aa7(new Set([_0x576b88]));return;}_0x516aa7(_0x1b7785=>{const _0x4d2f2b=a72_0x274a,_0x1174a5=new Set(_0x1b7785);return _0x1174a5['has'](_0x576b88)?_0x1174a5[_0x4d2f2b(0x171)](_0x576b88):_0x1174a5['add'](_0x576b88),_0x1174a5;});},[_0x576b88,multiSelect]),_0x1c6cb7=useCallback(()=>{const _0x2b1394=_0xbce404;_0x516aa7(new Set(_0x4a7c8c[_0x2b1394(0x176)]((_0x2a6046,_0x527c10)=>_0x527c10)));},[_0x4a7c8c]),_0x1e0581=useCallback(()=>{_0x516aa7(_0x5240c4=>{const _0x2e2dc7=a72_0x274a,_0x4b9a6e=new Set();for(let _0x495c1a=0x0;_0x495c1a<_0x4a7c8c[_0x2e2dc7(0x172)];_0x495c1a++){!_0x5240c4[_0x2e2dc7(0x16c)](_0x495c1a)&&_0x4b9a6e['add'](_0x495c1a);}return _0x4b9a6e;});},[_0x4a7c8c]),_0x2590df=useCallback(()=>{const _0x2b0994=_0xbce404;return Array[_0x2b0994(0x17c)](_0x13e887)[_0x2b0994(0x176)](_0x293075=>_0x4a7c8c[_0x293075]?.['key'])[_0x2b0994(0x17a)](_0x52f800=>_0x52f800!==undefined);},[_0x13e887,_0x4a7c8c]),_0x5033d4=useCallback(()=>{return _0x13e887['size']===_0x4a7c8c['length'];},[_0x13e887,_0x4a7c8c]),_0x12297c=useCallback((_0x20b890,_0x3c165a)=>{const _0x11837c=_0xbce404;if(_0x3c165a['upArrow'])return _0x5115af(),!![];if(_0x3c165a[_0x11837c(0x173)])return _0x1396c6(),!![];if(_0x20b890==='\x20')return _0x3a214d(),!![];if(_0x20b890==='a'||_0x20b890==='A')return _0x1c6cb7(),!![];if(_0x20b890==='i'||_0x20b890==='I'||_0x20b890==='r'||_0x20b890==='R')return _0x1e0581(),!![];return![];},[_0x5115af,_0x1396c6,_0x3a214d,_0x1c6cb7,_0x1e0581]);return{'selectedIndexes':_0x13e887,'highlightIndex':_0x576b88,'errorMsg':_0x26e112,'setErrorMsg':_0x560027,'handleKeyDown':_0x12297c,'getSelectedIDEs':_0x2590df,'isAllSelected':_0x5033d4,'toggleSelection':_0x3a214d,'selectAll':_0x1c6cb7,'invertSelection':_0x1e0581,'moveHighlightUp':_0x5115af,'moveHighlightDown':_0x1396c6};}
1
+ (function(_0x37fffd,_0x1513fa){const _0x48844e=a70_0x3d6c,_0x336b1b=_0x37fffd();while(!![]){try{const _0x31692d=-parseInt(_0x48844e(0xb4))/0x1*(-parseInt(_0x48844e(0xa8))/0x2)+-parseInt(_0x48844e(0xaf))/0x3+-parseInt(_0x48844e(0xae))/0x4+parseInt(_0x48844e(0xa9))/0x5*(parseInt(_0x48844e(0xb2))/0x6)+-parseInt(_0x48844e(0xad))/0x7+-parseInt(_0x48844e(0xac))/0x8+parseInt(_0x48844e(0xa7))/0x9;if(_0x31692d===_0x1513fa)break;else _0x336b1b['push'](_0x336b1b['shift']());}catch(_0x179872){_0x336b1b['push'](_0x336b1b['shift']());}}}(a70_0x309c,0xb1d67));import{useState,useCallback}from'react';function a70_0x309c(){const _0xc55be7=['1EYTaDb','map','has','key','filter','size','add','14435820nxrHvD','1860092jLHhZB','9705qqXlxs','delete','upArrow','5738136gzOORb','6220942BGzquO','1977044FFZwkb','3291198IIUlhQ','from','downArrow','4302HMwvuA','length'];a70_0x309c=function(){return _0xc55be7;};return a70_0x309c();}function a70_0x3d6c(_0x37c3c4,_0x2e3a13){_0x37c3c4=_0x37c3c4-0xa6;const _0x309c4f=a70_0x309c();let _0x3d6c1b=_0x309c4f[_0x37c3c4];return _0x3d6c1b;}export function useIDESelection({ideList:_0x14de8e,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0x598df5=a70_0x3d6c,[_0x2e8e4a,_0x3ad35d]=useState(new Set(preselectedIDEs[_0x598df5(0xb5)](_0x24a39e=>_0x14de8e['findIndex'](_0x3d856b=>_0x3d856b[_0x598df5(0xb7)]===_0x24a39e))[_0x598df5(0xb8)](_0x3edca1=>_0x3edca1>=0x0))),[_0x3aff53,_0xcee33]=useState(0x0),[_0x26890a,_0x49aa07]=useState(''),_0x2aa974=useCallback(()=>{const _0x4cc409=_0x598df5;_0xcee33(_0x548fb4=>_0x548fb4>0x0?_0x548fb4-0x1:_0x14de8e[_0x4cc409(0xb3)]-0x1);},[_0x14de8e[_0x598df5(0xb3)]]),_0x105682=useCallback(()=>{_0xcee33(_0x6e93d5=>_0x6e93d5<_0x14de8e['length']-0x1?_0x6e93d5+0x1:0x0);},[_0x14de8e[_0x598df5(0xb3)]]),_0x24a25f=useCallback(()=>{if(!multiSelect){_0x3ad35d(new Set([_0x3aff53]));return;}_0x3ad35d(_0x10e897=>{const _0x385be6=a70_0x3d6c,_0x12e354=new Set(_0x10e897);return _0x12e354[_0x385be6(0xb6)](_0x3aff53)?_0x12e354[_0x385be6(0xaa)](_0x3aff53):_0x12e354[_0x385be6(0xa6)](_0x3aff53),_0x12e354;});},[_0x3aff53,multiSelect]),_0x4ed88a=useCallback(()=>{const _0x1bde63=_0x598df5;_0x3ad35d(new Set(_0x14de8e[_0x1bde63(0xb5)]((_0x5da2f1,_0x212d82)=>_0x212d82)));},[_0x14de8e]),_0x317dc3=useCallback(()=>{_0x3ad35d(_0x70796b=>{const _0x17fcd5=a70_0x3d6c,_0x249538=new Set();for(let _0xe082a3=0x0;_0xe082a3<_0x14de8e['length'];_0xe082a3++){!_0x70796b[_0x17fcd5(0xb6)](_0xe082a3)&&_0x249538[_0x17fcd5(0xa6)](_0xe082a3);}return _0x249538;});},[_0x14de8e]),_0x7a6bb2=useCallback(()=>{const _0x33c568=_0x598df5;return Array[_0x33c568(0xb0)](_0x2e8e4a)['map'](_0x493f51=>_0x14de8e[_0x493f51]?.['key'])[_0x33c568(0xb8)](_0x3b95f7=>_0x3b95f7!==undefined);},[_0x2e8e4a,_0x14de8e]),_0xf17c3=useCallback(()=>{const _0x5b7f4f=_0x598df5;return _0x2e8e4a[_0x5b7f4f(0xb9)]===_0x14de8e[_0x5b7f4f(0xb3)];},[_0x2e8e4a,_0x14de8e]),_0x1cd669=useCallback((_0x47e26a,_0x5897d3)=>{const _0x31e567=_0x598df5;if(_0x5897d3[_0x31e567(0xab)])return _0x2aa974(),!![];if(_0x5897d3[_0x31e567(0xb1)])return _0x105682(),!![];if(_0x47e26a==='\x20')return _0x24a25f(),!![];if(_0x47e26a==='a'||_0x47e26a==='A')return _0x4ed88a(),!![];if(_0x47e26a==='i'||_0x47e26a==='I'||_0x47e26a==='r'||_0x47e26a==='R')return _0x317dc3(),!![];return![];},[_0x2aa974,_0x105682,_0x24a25f,_0x4ed88a,_0x317dc3]);return{'selectedIndexes':_0x2e8e4a,'highlightIndex':_0x3aff53,'errorMsg':_0x26890a,'setErrorMsg':_0x49aa07,'handleKeyDown':_0x1cd669,'getSelectedIDEs':_0x7a6bb2,'isAllSelected':_0xf17c3,'toggleSelection':_0x24a25f,'selectAll':_0x4ed88a,'invertSelection':_0x317dc3,'moveHighlightUp':_0x2aa974,'moveHighlightDown':_0x105682};}