@lovrabet/rabetbase-cli 2.1.6-beta.0 → 2.1.7-beta.2

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 (196) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/delete.js +1 -0
  52. package/lib/commands/dataset/detail.js +1 -1
  53. package/lib/commands/dataset/index.js +1 -1
  54. package/lib/commands/dataset/link-create.js +1 -0
  55. package/lib/commands/dataset/link-delete.js +1 -0
  56. package/lib/commands/dataset/link-shared.js +1 -0
  57. package/lib/commands/dataset/link-update.js +1 -0
  58. package/lib/commands/dataset/links.js +1 -1
  59. package/lib/commands/dataset/list.js +1 -1
  60. package/lib/commands/dataset/operations.js +1 -1
  61. package/lib/commands/db/analyze-cancel.js +1 -1
  62. package/lib/commands/db/analyze-start.js +1 -1
  63. package/lib/commands/db/analyze-status.js +1 -1
  64. package/lib/commands/db/create.js +1 -1
  65. package/lib/commands/db/delete.js +1 -1
  66. package/lib/commands/db/detail.js +1 -1
  67. package/lib/commands/db/diff.js +1 -1
  68. package/lib/commands/db/index.js +1 -1
  69. package/lib/commands/db/list.js +1 -1
  70. package/lib/commands/db/shared.js +1 -1
  71. package/lib/commands/db/tables.js +1 -1
  72. package/lib/commands/db/test.js +1 -1
  73. package/lib/commands/db/update.js +1 -1
  74. package/lib/commands/doctor.js +1 -1
  75. package/lib/commands/init/index.js +1 -1
  76. package/lib/commands/issue/index.js +1 -0
  77. package/lib/commands/issue/report.js +1 -0
  78. package/lib/commands/logs/index.js +1 -1
  79. package/lib/commands/menu/index.js +1 -1
  80. package/lib/commands/menu/shared/compare-table.js +1 -1
  81. package/lib/commands/menu/shared/index.js +1 -1
  82. package/lib/commands/menu/shared/inquirer.js +1 -1
  83. package/lib/commands/menu/shared/local-pages.js +1 -1
  84. package/lib/commands/menu/shared/logic.js +1 -1
  85. package/lib/commands/menu/shared/service.js +1 -1
  86. package/lib/commands/menu/shared/sync-core.js +1 -1
  87. package/lib/commands/menu/shared/update-core.js +1 -1
  88. package/lib/commands/menu/shared/valid-url.js +1 -1
  89. package/lib/commands/menu/sync.js +1 -1
  90. package/lib/commands/menu/update.js +1 -1
  91. package/lib/commands/page/generate-start.js +1 -1
  92. package/lib/commands/page/generate-status.js +1 -1
  93. package/lib/commands/page/index.js +1 -1
  94. package/lib/commands/page/pull.js +1 -1
  95. package/lib/commands/page/push.js +1 -1
  96. package/lib/commands/page/shared.js +1 -1
  97. package/lib/commands/page/standard-page-status.js +1 -1
  98. package/lib/commands/page/sync.js +1 -1
  99. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  100. package/lib/commands/project/create/format-elapsed.js +1 -1
  101. package/lib/commands/project/create/main.js +1 -1
  102. package/lib/commands/project/create/non-interactive.js +1 -1
  103. package/lib/commands/project/create/project-template-path.js +1 -1
  104. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  105. package/lib/commands/project/create/use-format-code.js +1 -1
  106. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  107. package/lib/commands/project/index.js +1 -1
  108. package/lib/commands/project/init.js +1 -1
  109. package/lib/commands/project/upgrade.js +1 -1
  110. package/lib/commands/registry.js +1 -1
  111. package/lib/commands/run/index.js +1 -1
  112. package/lib/commands/schema.js +1 -1
  113. package/lib/commands/skill/index.js +1 -1
  114. package/lib/commands/sql/create.js +1 -1
  115. package/lib/commands/sql/delete.js +1 -1
  116. package/lib/commands/sql/detail.js +1 -1
  117. package/lib/commands/sql/exec.js +1 -1
  118. package/lib/commands/sql/index.js +1 -1
  119. package/lib/commands/sql/list.js +1 -1
  120. package/lib/commands/sql/pull.js +1 -1
  121. package/lib/commands/sql/push.js +1 -1
  122. package/lib/commands/sql/save.js +1 -1
  123. package/lib/commands/sql/shared.js +1 -1
  124. package/lib/commands/sql/status.js +1 -1
  125. package/lib/commands/sql/validate.js +1 -1
  126. package/lib/config/schema.js +1 -1
  127. package/lib/constant/cdn.js +1 -1
  128. package/lib/constant/cli.js +1 -1
  129. package/lib/constant/defaults.js +1 -1
  130. package/lib/constant/domain.js +1 -1
  131. package/lib/constant/env.js +1 -1
  132. package/lib/constant/output.js +1 -1
  133. package/lib/constant/paths.js +1 -1
  134. package/lib/constant/risk.js +1 -1
  135. package/lib/context.js +1 -1
  136. package/lib/core/alias-resolver.js +1 -1
  137. package/lib/core/api-client.js +1 -1
  138. package/lib/core/bff/config.js +1 -1
  139. package/lib/core/bff/file-system.js +1 -1
  140. package/lib/core/bff/hash.js +1 -1
  141. package/lib/core/bff/lock.js +1 -1
  142. package/lib/core/bff/utils.js +1 -1
  143. package/lib/core/db-resolver.js +1 -1
  144. package/lib/core/page/file-system.js +1 -1
  145. package/lib/core/page/hash.js +1 -1
  146. package/lib/core/page/lock.js +1 -1
  147. package/lib/core/sql-sync/config.js +1 -1
  148. package/lib/core/sql-sync/file-system.js +1 -1
  149. package/lib/core/sql-sync/hash.js +1 -1
  150. package/lib/core/sql-sync/lock.js +1 -1
  151. package/lib/core/sql-sync/utils.js +1 -1
  152. package/lib/core/sql-validator.js +1 -1
  153. package/lib/errors.js +1 -1
  154. package/lib/framework/build-all-flags.js +1 -1
  155. package/lib/framework/flags.js +1 -1
  156. package/lib/framework/help.js +1 -1
  157. package/lib/framework/index.js +1 -1
  158. package/lib/framework/output.js +1 -1
  159. package/lib/framework/response.js +1 -1
  160. package/lib/framework/runner-alias.js +1 -1
  161. package/lib/framework/runner.js +1 -1
  162. package/lib/framework/schema-export.js +1 -1
  163. package/lib/framework/types.js +1 -1
  164. package/lib/generated/build-info.js +1 -1
  165. package/lib/help.js +1 -1
  166. package/lib/skills/main.js +1 -1
  167. package/lib/skills/npx-skills-add.js +1 -1
  168. package/lib/telemetry/cli-command-trace.js +1 -1
  169. package/lib/telemetry/cli-help-trace.js +1 -1
  170. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  171. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  172. package/lib/telemetry/send-cli-trace-log.js +1 -1
  173. package/lib/telemetry/send-platform-issue-collect-log.js +1 -0
  174. package/lib/utils/ai_config.js +1 -1
  175. package/lib/utils/apply-jq-filter.js +1 -1
  176. package/lib/utils/cdn-config.js +1 -1
  177. package/lib/utils/check-sdk-version.js +1 -1
  178. package/lib/utils/cli-version-check.js +1 -1
  179. package/lib/utils/cli-version-policy.js +1 -1
  180. package/lib/utils/config.js +1 -1
  181. package/lib/utils/copy-directory.js +1 -1
  182. package/lib/utils/entity-with-id.js +1 -1
  183. package/lib/utils/file-utils.js +1 -1
  184. package/lib/utils/guides-cdn.js +1 -1
  185. package/lib/utils/http-client.js +1 -1
  186. package/lib/utils/is-non-interactive.js +1 -1
  187. package/lib/utils/logger.js +1 -1
  188. package/lib/utils/params.js +1 -1
  189. package/lib/utils/platform.js +1 -1
  190. package/lib/utils/rules-cdn.js +1 -1
  191. package/lib/utils/sleep.js +1 -1
  192. package/lib/utils/template-replacer.js +1 -1
  193. package/lib/utils/version.js +1 -1
  194. package/lib/utils/with-active-cookie.js +1 -1
  195. package/lib/utils/write-cli-side-channel.js +1 -1
  196. package/package.json +2 -1
@@ -1 +1 @@
1
- function a69_0x3759(){const _0x7fc209=['defaultApp','App\x20code\x20to\x20initialize\x20with','\x0a✓\x20Successfully\x20initialized\x20','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','init','1761429QYRxBr','boolean','\x20\x20Default:\x20','cwd','bool','str','project','log','596953aoGjrm','Target\x20environment','appcode','7FxkuYF','nonInteractive','map','yes','global','toLocaleString','\x20\x20Env:\x20','join','5392DocSrG','1628oIuImf','flagMissing','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','20VNSOui','Usage:\x20','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','message','env','../../commands/project/init.js','valid','validation','string','2utHsQr','run','49224tuJlJe','some','2225770VXsALT','3213bVzqDJ','2004714pTwkMb','Use\x20`','\x20config','production','Write\x20to\x20global\x20config\x20instead\x20of\x20project','436744kVFMJo','appCode'];a69_0x3759=function(){return _0x7fc209;};return a69_0x3759();}const a69_0x4a8a18=a69_0x185d;(function(_0x48cf7f,_0x51e6bb){const _0x4784f5=a69_0x185d,_0x2021a6=_0x48cf7f();while(!![]){try{const _0x4734c9=parseInt(_0x4784f5(0x14e))/0x1+-parseInt(_0x4784f5(0x166))/0x2*(parseInt(_0x4784f5(0x146))/0x3)+parseInt(_0x4784f5(0x171))/0x4*(-parseInt(_0x4784f5(0x15d))/0x5)+parseInt(_0x4784f5(0x16c))/0x6*(-parseInt(_0x4784f5(0x151))/0x7)+parseInt(_0x4784f5(0x159))/0x8*(parseInt(_0x4784f5(0x16b))/0x9)+parseInt(_0x4784f5(0x16a))/0xa+-parseInt(_0x4784f5(0x15a))/0xb*(-parseInt(_0x4784f5(0x168))/0xc);if(_0x4734c9===_0x51e6bb)break;else _0x2021a6['push'](_0x2021a6['shift']());}catch(_0x3fadaf){_0x2021a6['push'](_0x2021a6['shift']());}}}(a69_0x3759,0x4b7f6));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x23e7df){return{'appCode':_0x23e7df,'appName':_0x23e7df};}function writeInitConfig(_0x610215,_0x78a901,_0x20e6a5){const _0x5d7cf0=a69_0x185d,_0x166483=resolveWriteConfigPath(_0x610215),_0x158f19=buildCanonicalProjectConfig({},{'appCodes':_0x78a901[_0x5d7cf0(0x153)](_0x28809c=>_0x28809c[_0x5d7cf0(0x172)]),'env':_0x20e6a5,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x5d7cf0(0x156)]()}});writeConfigFile(_0x166483,_0x158f19);const _0x171e04=_0x610215===_0x5d7cf0(0x155)?'global':_0x5d7cf0(0x14c);console[_0x5d7cf0(0x14d)](_0x5d7cf0(0x175)+_0x171e04+_0x5d7cf0(0x16e)),console['log']('\x20\x20Apps:\x20'+_0x78a901[_0x5d7cf0(0x153)](_0x58fa5d=>_0x58fa5d[_0x5d7cf0(0x172)])[_0x5d7cf0(0x158)](',\x20')),console[_0x5d7cf0(0x14d)](_0x5d7cf0(0x148)+_0x158f19[_0x5d7cf0(0x173)]),console[_0x5d7cf0(0x14d)](_0x5d7cf0(0x157)+_0x158f19[_0x5d7cf0(0x161)]),console['log']('\x20\x20Config:\x20'+_0x166483);}async function runSmartInit(_0x4e45c4){const _0x5c05e0=a69_0x185d,_0x67e983=process[_0x5c05e0(0x149)](),_0x56049f=_0x4e45c4['bool'](_0x5c05e0(0x155))?_0x5c05e0(0x155):'project',_0x2a5eda=_0x4e45c4[_0x5c05e0(0x14b)]('env')||_0x5c05e0(0x16f),_0x208e9c=_0x4e45c4[_0x5c05e0(0x14b)](_0x5c05e0(0x150))||undefined,_0xe4f159=_0x4e45c4[_0x5c05e0(0x14a)](_0x5c05e0(0x14c));if(_0xe4f159){const {initConfig:_0x13c2cf}=await import(_0x5c05e0(0x162));return _0x13c2cf({'appcode':_0x208e9c,'env':_0x2a5eda,'autoYes':_0x4e45c4[_0x5c05e0(0x14a)]('yes')});}if(_0x56049f===_0x5c05e0(0x14c)){const _0x14ac3b=existsSync(resolve(_0x67e983,NEW_CONFIG_NAME)),_0x241a54=LEGACY_CONFIG_NAMES[_0x5c05e0(0x169)](_0x5d6d7e=>existsSync(resolve(_0x67e983,_0x5d6d7e)));if(_0x241a54&&!_0x14ac3b)return console[_0x5c05e0(0x14d)]('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x4e45c4[_0x5c05e0(0x152)],{'yes':_0x4e45c4[_0x5c05e0(0x14a)](_0x5c05e0(0x154))});if(_0x14ac3b)throw CliErrors[_0x5c05e0(0x164)](_0x5c05e0(0x15f),_0x5c05e0(0x16d)+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x208e9c){const _0x317714=validateAppcode(_0x208e9c);if(!_0x317714[_0x5c05e0(0x163)])throw CliErrors[_0x5c05e0(0x164)](_0x317714[_0x5c05e0(0x160)]);writeInitConfig(_0x56049f,[syntheticApp(_0x208e9c)],_0x2a5eda);return;}if(_0x4e45c4['nonInteractive'])throw CliErrors[_0x5c05e0(0x15b)]('appcode',_0x5c05e0(0x15e)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x129f07=getCookie(),_0x5812c3=await selectMultipleApps(_0x129f07),_0x4d8b53=_0x5812c3==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x5812c3;writeInitConfig(_0x56049f,_0x4d8b53,_0x2a5eda);}const initFlags=[{'name':'global','type':'boolean','description':a69_0x4a8a18(0x170),'default':![]},{'name':a69_0x4a8a18(0x161),'type':a69_0x4a8a18(0x165),'description':a69_0x4a8a18(0x14f),'default':a69_0x4a8a18(0x16f),'enum':[...RABETBASE_ENV_VALUES]},{'name':a69_0x4a8a18(0x150),'type':'string','description':a69_0x4a8a18(0x174)},{'name':'project','type':a69_0x4a8a18(0x147),'description':a69_0x4a8a18(0x144),'default':![]},{'name':a69_0x4a8a18(0x154),'type':a69_0x4a8a18(0x147),'description':'Auto-confirm\x20prompts','default':![]}];function a69_0x185d(_0xd08003,_0x3c1ad4){_0xd08003=_0xd08003-0x144;const _0x37595c=a69_0x3759();let _0x185d1c=_0x37595c[_0xd08003];return _0x185d1c;}export const initDefinitions=[{'service':a69_0x4a8a18(0x145),'command':a69_0x4a8a18(0x167),'description':a69_0x4a8a18(0x15c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0xdc01fb){return await runSmartInit(_0xdc01fb),{'ok':!![]};}}];
1
+ const a74_0x6a0c97=a74_0x510c;function a74_0x42b9(){const _0x430d2f=['App\x20code\x20to\x20initialize\x20with','production','483QTYLdt','\x20config','appcode','40584ZGGJhN','defaultApp','13166140HWAuaz','toLocaleString','Auto-confirm\x20prompts','Target\x20environment','nonInteractive','appCode','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','6935967zQSkey','valid','\x20\x20Config:\x20','\x0a✓\x20Successfully\x20initialized\x20','project','Usage:\x20','env','4694700dsnXCB','string','yes','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','15xRNXxe','boolean','17164AERnuh','validation','custom','message','join','74698eSNjWT','Use\x20`','../../commands/project/init.js','8XzeFOP','bool','1935899sJwPAo','init','global','cwd','log','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','str','some','\x20\x20Apps:\x20','run'];a74_0x42b9=function(){return _0x430d2f;};return a74_0x42b9();}(function(_0x4672d8,_0x5117af){const _0x3c7847=a74_0x510c,_0x213e5a=_0x4672d8();while(!![]){try{const _0xdf53ac=-parseInt(_0x3c7847(0x111))/0x1*(-parseInt(_0x3c7847(0xe9))/0x2)+-parseInt(_0x3c7847(0xfa))/0x3*(parseInt(_0x3c7847(0x113))/0x4)+parseInt(_0x3c7847(0x10d))/0x5+parseInt(_0x3c7847(0xfd))/0x6+parseInt(_0x3c7847(0xee))/0x7*(parseInt(_0x3c7847(0xec))/0x8)+parseInt(_0x3c7847(0x106))/0x9+-parseInt(_0x3c7847(0xff))/0xa;if(_0xdf53ac===_0x5117af)break;else _0x213e5a['push'](_0x213e5a['shift']());}catch(_0x2ef9e4){_0x213e5a['push'](_0x213e5a['shift']());}}}(a74_0x42b9,0x8539e));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a74_0x510c(_0x1ca96f,_0x4b2be6){_0x1ca96f=_0x1ca96f-0xe5;const _0x42b9c9=a74_0x42b9();let _0x510ccf=_0x42b9c9[_0x1ca96f];return _0x510ccf;}import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x1878a9){return{'appCode':_0x1878a9,'appName':_0x1878a9};}function writeInitConfig(_0x3cfcea,_0x4483dd,_0x1c1fd2){const _0x3f1fed=a74_0x510c,_0x4b9cfd=resolveWriteConfigPath(_0x3cfcea),_0x3a4d0e=buildCanonicalProjectConfig({},{'appCodes':_0x4483dd['map'](_0x44db9a=>_0x44db9a[_0x3f1fed(0x104)]),'env':_0x1c1fd2,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x3f1fed(0x100)]()}});writeConfigFile(_0x4b9cfd,_0x3a4d0e);const _0x129b66=_0x3cfcea===_0x3f1fed(0xf0)?'global':_0x3f1fed(0x10a);console[_0x3f1fed(0xf2)](_0x3f1fed(0x109)+_0x129b66+_0x3f1fed(0xfb)),console[_0x3f1fed(0xf2)](_0x3f1fed(0xf6)+_0x4483dd['map'](_0x3e275a=>_0x3e275a[_0x3f1fed(0x104)])[_0x3f1fed(0xe8)](',\x20')),console[_0x3f1fed(0xf2)]('\x20\x20Default:\x20'+_0x3a4d0e[_0x3f1fed(0xfe)]),console[_0x3f1fed(0xf2)]('\x20\x20Env:\x20'+_0x3a4d0e[_0x3f1fed(0x10c)]),console['log'](_0x3f1fed(0x108)+_0x4b9cfd);}async function runSmartInit(_0x4ef703){const _0x1a987f=a74_0x510c,_0x2dab27=process[_0x1a987f(0xf1)](),_0x5429fd=_0x4ef703[_0x1a987f(0xed)](_0x1a987f(0xf0))?_0x1a987f(0xf0):'project',_0x33293c=_0x4ef703[_0x1a987f(0xf4)]('env')||'production',_0x229d73=_0x4ef703[_0x1a987f(0xf4)](_0x1a987f(0xfc))||undefined,_0x510f7d=_0x4ef703[_0x1a987f(0xed)](_0x1a987f(0x10a));if(_0x510f7d){const {initConfig:_0x464cdd}=await import(_0x1a987f(0xeb));return _0x464cdd({'appcode':_0x229d73,'env':_0x33293c,'autoYes':_0x4ef703[_0x1a987f(0xed)](_0x1a987f(0x10f))});}if(_0x5429fd===_0x1a987f(0x10a)){const _0x4f521a=existsSync(resolve(_0x2dab27,NEW_CONFIG_NAME)),_0x462e6a=LEGACY_CONFIG_NAMES[_0x1a987f(0xf5)](_0x27e539=>existsSync(resolve(_0x2dab27,_0x27e539)));if(_0x462e6a&&!_0x4f521a)return console[_0x1a987f(0xf2)]('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x4ef703['nonInteractive'],{'yes':_0x4ef703['bool'](_0x1a987f(0x10f))});if(_0x4f521a)throw CliErrors[_0x1a987f(0xe5)]('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.',_0x1a987f(0xea)+CLI_BIN_NAME+_0x1a987f(0x110));}if(_0x229d73){const _0x1bf371=validateAppcode(_0x229d73);if(!_0x1bf371[_0x1a987f(0x107)])throw CliErrors[_0x1a987f(0xe5)](_0x1bf371[_0x1a987f(0xe7)]);writeInitConfig(_0x5429fd,[syntheticApp(_0x229d73)],_0x33293c);return;}if(_0x4ef703[_0x1a987f(0x103)])throw CliErrors['flagMissing'](_0x1a987f(0xfc),_0x1a987f(0x10b)+CLI_BIN_NAME+_0x1a987f(0x105));const _0xcf437c=getCookie(),_0x31863c=await selectMultipleApps(_0xcf437c),_0x4e98c2=_0x31863c===_0x1a987f(0xe6)?[syntheticApp(await promptCustomAppcode())]:_0x31863c;writeInitConfig(_0x5429fd,_0x4e98c2,_0x33293c);}const initFlags=[{'name':'global','type':a74_0x6a0c97(0x112),'description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a74_0x6a0c97(0x10c),'type':a74_0x6a0c97(0x10e),'description':a74_0x6a0c97(0x102),'default':a74_0x6a0c97(0xf9),'enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':'string','description':a74_0x6a0c97(0xf8)},{'name':a74_0x6a0c97(0x10a),'type':'boolean','description':'Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','default':![]},{'name':a74_0x6a0c97(0x10f),'type':a74_0x6a0c97(0x112),'description':a74_0x6a0c97(0x101),'default':![]}];export const initDefinitions=[{'service':a74_0x6a0c97(0xef),'command':a74_0x6a0c97(0xf7),'description':a74_0x6a0c97(0xf3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x52d799){return await runSmartInit(_0x52d799),{'ok':!![]};}}];
@@ -0,0 +1 @@
1
+ function a75_0x12a3(_0xc632b6,_0x444cad){_0xc632b6=_0xc632b6-0x11a;const _0x3a3f51=a75_0x3a3f();let _0x12a361=_0x3a3f51[_0xc632b6];return _0x12a361;}(function(_0x171a86,_0xf37a88){const _0x409148=a75_0x12a3,_0x392031=_0x171a86();while(!![]){try{const _0x4749e4=-parseInt(_0x409148(0x123))/0x1*(-parseInt(_0x409148(0x11e))/0x2)+parseInt(_0x409148(0x11f))/0x3*(parseInt(_0x409148(0x11d))/0x4)+parseInt(_0x409148(0x121))/0x5*(parseInt(_0x409148(0x124))/0x6)+-parseInt(_0x409148(0x122))/0x7*(-parseInt(_0x409148(0x120))/0x8)+-parseInt(_0x409148(0x125))/0x9*(parseInt(_0x409148(0x11a))/0xa)+-parseInt(_0x409148(0x11b))/0xb+-parseInt(_0x409148(0x11c))/0xc;if(_0x4749e4===_0xf37a88)break;else _0x392031['push'](_0x392031['shift']());}catch(_0x357203){_0x392031['push'](_0x392031['shift']());}}}(a75_0x3a3f,0xd1b23));function a75_0x3a3f(){const _0x3ab7e2=['10171975lDUMzo','5467596YSbBxj','1960716tUDCdO','9342JLyZQe','6mIhWQA','849032NgElkF','5AmXXnm','77OTxvzh','51QbJiMU','9050988QQrqPB','69939ihGnVm','2130cFucLs'];a75_0x3a3f=function(){return _0x3ab7e2;};return a75_0x3a3f();}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
@@ -0,0 +1 @@
1
+ const a76_0x5d872e=a76_0x2eec;(function(_0x1846d0,_0x453ff1){const _0x28d6cc=a76_0x2eec,_0x426e4a=_0x1846d0();while(!![]){try{const _0x1475ef=-parseInt(_0x28d6cc(0x7f))/0x1*(parseInt(_0x28d6cc(0x88))/0x2)+-parseInt(_0x28d6cc(0x92))/0x3+parseInt(_0x28d6cc(0x9f))/0x4*(-parseInt(_0x28d6cc(0x74))/0x5)+parseInt(_0x28d6cc(0x86))/0x6+parseInt(_0x28d6cc(0x8b))/0x7+-parseInt(_0x28d6cc(0x83))/0x8*(parseInt(_0x28d6cc(0x76))/0x9)+-parseInt(_0x28d6cc(0x97))/0xa*(-parseInt(_0x28d6cc(0x90))/0xb);if(_0x1475ef===_0x453ff1)break;else _0x426e4a['push'](_0x426e4a['shift']());}catch(_0x19c551){_0x426e4a['push'](_0x426e4a['shift']());}}}(a76_0x1335,0x34f04));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a76_0x2eec(_0x38f86e,_0x27b9d2){_0x38f86e=_0x38f86e-0x6f;const _0x133538=a76_0x1335();let _0x2eec41=_0x133538[_0x38f86e];return _0x2eec41;}import{CliErrors}from'../../errors.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';function a76_0x1335(){const _0x2a276c=['cwd','40OhwLFh','Platform\x20issue\x20reported','trim','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','report','One-line\x20issue\x20summary','compress','Failed\x20to\x20report\x20platform\x20issue:\x20','6428ELhdsK','descriptionSource','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','inline','description','flagMissing','790xuzMuV','length','764838tShCTk','string','descriptionFilePath','file','File\x20not\x20found:\x20','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','Issue\x20description\x20cannot\x20be\x20empty.','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','str','3hTGaWf','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','utf8','otel://','24JNCTVB','join','message','2284092oQLwFR','filter','57578xzQoAO','descriptionFile:\x20','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','638974UwMCKc','issue.title','validation','write','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','1036706IAGwyA','apiError','110679xhUAET','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','title','POST'];a76_0x1335=function(){return _0x2a276c;};return a76_0x1335();}export const issueReport={'service':'issue','command':a76_0x5d872e(0x9b),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a76_0x5d872e(0x8e),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a76_0x5d872e(0x9d),'flags':[{'name':a76_0x5d872e(0x94),'type':a76_0x5d872e(0x77),'required':!![],'description':a76_0x5d872e(0x9c)},{'name':a76_0x5d872e(0x72),'type':'string','description':a76_0x5d872e(0x93)},{'name':DESCRIPTION_FILE_FLAG,'type':a76_0x5d872e(0x77),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x53a42d){const _0x3bbe7a=a76_0x5d872e,_0x276c59=_0x53a42d[_0x3bbe7a(0x7e)](_0x3bbe7a(0x94))[_0x3bbe7a(0x99)](),_0x385d2b=_0x53a42d['str'](_0x3bbe7a(0x72))[_0x3bbe7a(0x99)](),_0x218f4f=_0x53a42d[_0x3bbe7a(0x7e)](DESCRIPTION_FILE_FLAG)[_0x3bbe7a(0x99)]();if(!_0x276c59)throw CliErrors[_0x3bbe7a(0x73)]('title',_0x3bbe7a(0x8f));const _0x45a136=_0x385d2b['length']>0x0,_0x361ffa=_0x218f4f[_0x3bbe7a(0x75)]>0x0;if(_0x45a136===_0x361ffa)throw CliErrors[_0x3bbe7a(0x8d)](_0x3bbe7a(0x9a),_0x3bbe7a(0x8a));if(_0x361ffa){const _0x2667c1=resolve(process[_0x3bbe7a(0x96)](),_0x218f4f);if(!existsSync(_0x2667c1))throw CliErrors[_0x3bbe7a(0x8d)](_0x3bbe7a(0x7a)+_0x2667c1);}},async 'dryRun'(_0x385718){const _0x374fdf=a76_0x5d872e,_0x396086=await prepareIssueReport(_0x385718);return{'method':_0x374fdf(0x95),'url':_0x374fdf(0x82)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x396086[_0x374fdf(0x94)],'issue.description':_0x396086[_0x374fdf(0x72)]}},'description':[_0x374fdf(0x70),'descriptionSource:\x20'+_0x396086[_0x374fdf(0x6f)],_0x396086[_0x374fdf(0x78)]?_0x374fdf(0x89)+_0x396086['descriptionFilePath']:null][_0x374fdf(0x87)](Boolean)[_0x374fdf(0x84)]('\x0a')};},async 'execute'(_0x357219){const _0x495da5=a76_0x5d872e,_0x1a9ebc=await prepareIssueReport(_0x357219);try{await sendPlatformIssueCollectLog({'title':_0x1a9ebc['title'],'description':_0x1a9ebc['description']});}catch(_0x2152dc){throw CliErrors[_0x495da5(0x91)](_0x495da5(0x9e)+(_0x2152dc instanceof Error?_0x2152dc[_0x495da5(0x85)]:String(_0x2152dc)),_0x495da5(0x80));}return{'ok':!![],'message':_0x495da5(0x98),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x495da5(0x8c),'issue.description'],'issue':{'title':_0x1a9ebc[_0x495da5(0x94)],'descriptionLength':_0x1a9ebc[_0x495da5(0x72)][_0x495da5(0x75)],'descriptionSource':_0x1a9ebc['descriptionSource'],..._0x1a9ebc[_0x495da5(0x78)]?{'descriptionFile':_0x1a9ebc['descriptionFilePath']}:{}}}};}};async function prepareIssueReport(_0x17dd0f){const _0x56a710=a76_0x5d872e,_0x13aa61=_0x17dd0f[_0x56a710(0x7e)](_0x56a710(0x94))[_0x56a710(0x99)](),_0x224233=_0x17dd0f[_0x56a710(0x7e)](_0x56a710(0x72)),_0x47a59f=_0x17dd0f[_0x56a710(0x7e)](DESCRIPTION_FILE_FLAG)[_0x56a710(0x99)]();if(!_0x47a59f){const _0x299817=_0x224233;if(!_0x299817[_0x56a710(0x99)]())throw CliErrors['validation'](_0x56a710(0x7c),_0x56a710(0x7b));return{'title':_0x13aa61,'description':_0x299817,'descriptionSource':_0x56a710(0x71)};}const _0x528f81=resolve(process[_0x56a710(0x96)](),_0x47a59f),_0x433a92=await readFile(_0x528f81,_0x56a710(0x81));if(!_0x433a92[_0x56a710(0x99)]())throw CliErrors['validation']('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x528f81,_0x56a710(0x7d));return{'title':_0x13aa61,'description':_0x433a92,'descriptionSource':_0x56a710(0x79),'descriptionFilePath':_0x528f81};}
@@ -1 +1 @@
1
- const a70_0x137139=a70_0x3786;(function(_0x1d7f65,_0x2441b8){const _0x50ddef=a70_0x3786,_0xc3821c=_0x1d7f65();while(!![]){try{const _0xea7caa=-parseInt(_0x50ddef(0x1a2))/0x1*(-parseInt(_0x50ddef(0x19b))/0x2)+parseInt(_0x50ddef(0x18f))/0x3+-parseInt(_0x50ddef(0x198))/0x4+-parseInt(_0x50ddef(0x18d))/0x5*(parseInt(_0x50ddef(0x19d))/0x6)+parseInt(_0x50ddef(0x195))/0x7+-parseInt(_0x50ddef(0x193))/0x8+-parseInt(_0x50ddef(0x1a5))/0x9*(-parseInt(_0x50ddef(0x194))/0xa);if(_0xea7caa===_0x2441b8)break;else _0xc3821c['push'](_0xc3821c['shift']());}catch(_0x32ffd7){_0xc3821c['push'](_0xc3821c['shift']());}}}(a70_0x2aad,0xe4e17));import{logger}from'../../utils/logger.js';function a70_0x2aad(){const _0x5de200=['2288514lEbDTu','*\x20No\x20logs\x20found','write','clearLogs','duration','1613407bDzosD','details','success','3915927xRqZzS','show','en-US','View\x20command\x20history\x20logs','level','Clear\x20command\x20history\x20logs','timestamp','clear','20rLXQPK','message','4143534QJhbiF','*\x20Logs\x20cleared','command','log','14843176rrxeNq','30wJNJgh','12982214TRBDUQ','*\x20Lovrabet\x20CLI\x20logs:\x0a','logs','7343712vlwxWU','keys','error','2jpvCdV','forEach'];a70_0x2aad=function(){return _0x5de200;};return a70_0x2aad();}function a70_0x3786(_0x2d2258,_0x631f2d){_0x2d2258=_0x2d2258-0x18c;const _0x2aad4c=a70_0x2aad();let _0x37866a=_0x2aad4c[_0x2d2258];return _0x37866a;}function printLogs(_0x42faf1){const _0x10c7c4=a70_0x3786;if(_0x42faf1['length']===0x0){console['log'](_0x10c7c4(0x19e));return;}console['log'](_0x10c7c4(0x196)),_0x42faf1[_0x10c7c4(0x19c)]((_0x63bb15,_0x3fca1f)=>{const _0x435577=_0x10c7c4,_0x58adaf=new Date(_0x63bb15[_0x435577(0x1ab)])['toLocaleString'](_0x435577(0x1a7)),_0x25aff4=_0x63bb15[_0x435577(0x1a9)]===_0x435577(0x1a4)?'√':_0x63bb15[_0x435577(0x1a9)]===_0x435577(0x19a)?'×':_0x63bb15[_0x435577(0x1a9)]==='warn'?'!':'i';console[_0x435577(0x192)](_0x3fca1f+0x1+'.\x20'+_0x25aff4+'\x20['+_0x63bb15[_0x435577(0x191)]+']\x20'+_0x63bb15[_0x435577(0x18e)]),console[_0x435577(0x192)]('\x20\x20\x20Time:\x20'+_0x58adaf),_0x63bb15[_0x435577(0x1a1)]&&console['log']('\x20\x20\x20Duration:\x20'+_0x63bb15['duration']+'ms'),_0x63bb15[_0x435577(0x1a3)]&&Object[_0x435577(0x199)](_0x63bb15[_0x435577(0x1a3)])['length']>0x0&&console['log']('\x20\x20\x20Details:\x20'+JSON['stringify'](_0x63bb15[_0x435577(0x1a3)],null,0x2)),console[_0x435577(0x192)]('');});}export const logsDefinitions=[{'service':'logs','command':a70_0x137139(0x1a6),'description':a70_0x137139(0x1a8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2fb68d){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':a70_0x137139(0x197),'command':a70_0x137139(0x18c),'description':a70_0x137139(0x1aa),'risk':a70_0x137139(0x19f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x27c805){const _0x21b47f=a70_0x137139;return logger[_0x21b47f(0x1a0)](),console[_0x21b47f(0x192)](_0x21b47f(0x190)),{'ok':!![]};}}];
1
+ const a77_0x3ffab9=a77_0x351a;(function(_0x38e863,_0x534c6a){const _0x4ab2d4=a77_0x351a,_0x3ec67a=_0x38e863();while(!![]){try{const _0x48a061=-parseInt(_0x4ab2d4(0xb1))/0x1*(parseInt(_0x4ab2d4(0xa7))/0x2)+-parseInt(_0x4ab2d4(0xb3))/0x3+-parseInt(_0x4ab2d4(0xa5))/0x4*(parseInt(_0x4ab2d4(0xbb))/0x5)+-parseInt(_0x4ab2d4(0xbe))/0x6*(-parseInt(_0x4ab2d4(0xb8))/0x7)+parseInt(_0x4ab2d4(0xae))/0x8+parseInt(_0x4ab2d4(0xbf))/0x9+parseInt(_0x4ab2d4(0xb4))/0xa;if(_0x48a061===_0x534c6a)break;else _0x3ec67a['push'](_0x3ec67a['shift']());}catch(_0x2c5b6f){_0x3ec67a['push'](_0x3ec67a['shift']());}}}(a77_0x4c61,0xd5596));function a77_0x351a(_0x2ec505,_0x3c76a6){_0x2ec505=_0x2ec505-0xa3;const _0x4c6169=a77_0x4c61();let _0x351a12=_0x4c6169[_0x2ec505];return _0x351a12;}import{logger}from'../../utils/logger.js';function printLogs(_0x4d6ebb){const _0x14143b=a77_0x351a;if(_0x4d6ebb[_0x14143b(0xa6)]===0x0){console[_0x14143b(0xc6)](_0x14143b(0xbd));return;}console[_0x14143b(0xc6)](_0x14143b(0xaa)),_0x4d6ebb['forEach']((_0x114594,_0x4e5515)=>{const _0x742a53=_0x14143b,_0x39c794=new Date(_0x114594[_0x742a53(0xb2)])[_0x742a53(0xa9)](_0x742a53(0xb9)),_0x29d230=_0x114594[_0x742a53(0xc0)]===_0x742a53(0xc2)?'√':_0x114594['level']===_0x742a53(0xb7)?'×':_0x114594[_0x742a53(0xc0)]===_0x742a53(0xb5)?'!':'i';console['log'](_0x4e5515+0x1+'.\x20'+_0x29d230+'\x20['+_0x114594[_0x742a53(0xba)]+']\x20'+_0x114594[_0x742a53(0xb6)]),console[_0x742a53(0xc6)](_0x742a53(0xa3)+_0x39c794),_0x114594[_0x742a53(0xc7)]&&console['log'](_0x742a53(0xac)+_0x114594['duration']+'ms'),_0x114594[_0x742a53(0xbc)]&&Object[_0x742a53(0xc1)](_0x114594['details'])['length']>0x0&&console['log'](_0x742a53(0xc5)+JSON[_0x742a53(0xa8)](_0x114594[_0x742a53(0xbc)],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':a77_0x3ffab9(0xb0),'command':a77_0x3ffab9(0xad),'description':'View\x20command\x20history\x20logs','risk':a77_0x3ffab9(0xab),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x39100d){const _0x6ff9a3=a77_0x3ffab9;return printLogs(logger[_0x6ff9a3(0xaf)]()),{'ok':!![]};}},{'service':a77_0x3ffab9(0xb0),'command':'clear','description':a77_0x3ffab9(0xa4),'risk':a77_0x3ffab9(0xc4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x35a89d){const _0x1a02a9=a77_0x3ffab9;return logger[_0x1a02a9(0xc3)](),console[_0x1a02a9(0xc6)](_0x1a02a9(0xc8)),{'ok':!![]};}}];function a77_0x4c61(){const _0x443778=['*\x20Lovrabet\x20CLI\x20logs:\x0a','read','\x20\x20\x20Duration:\x20','show','6034488CSqwoN','readLogs','logs','1104681EIkWTb','timestamp','1271535TnbNiz','5685820DBgoQU','warn','message','error','7qmdFeK','en-US','command','940365ehkmNL','details','*\x20No\x20logs\x20found','1601268nlyyHw','10699011Hpqybx','level','keys','success','clearLogs','write','\x20\x20\x20Details:\x20','log','duration','*\x20Logs\x20cleared','\x20\x20\x20Time:\x20','Clear\x20command\x20history\x20logs','8HyhVps','length','2NOxfXT','stringify','toLocaleString'];a77_0x4c61=function(){return _0x443778;};return a77_0x4c61();}
@@ -1 +1 @@
1
- (function(_0x14796a,_0x5b5b4e){const _0x55034c=a71_0x57ed,_0x304dfc=_0x14796a();while(!![]){try{const _0x4e0284=parseInt(_0x55034c(0x7c))/0x1+parseInt(_0x55034c(0x75))/0x2*(-parseInt(_0x55034c(0x7d))/0x3)+-parseInt(_0x55034c(0x76))/0x4*(-parseInt(_0x55034c(0x79))/0x5)+parseInt(_0x55034c(0x77))/0x6+parseInt(_0x55034c(0x73))/0x7*(-parseInt(_0x55034c(0x7b))/0x8)+parseInt(_0x55034c(0x78))/0x9*(parseInt(_0x55034c(0x74))/0xa)+parseInt(_0x55034c(0x7a))/0xb;if(_0x4e0284===_0x5b5b4e)break;else _0x304dfc['push'](_0x304dfc['shift']());}catch(_0x2823c5){_0x304dfc['push'](_0x304dfc['shift']());}}}(a71_0x1c95,0x18f9d));function a71_0x57ed(_0x2d75ee,_0x437bdf){_0x2d75ee=_0x2d75ee-0x73;const _0x1c9597=a71_0x1c95();let _0x57ed0f=_0x1c9597[_0x2d75ee];return _0x57ed0f;}import{menuSync}from'../../commands/menu/sync.js';function a71_0x1c95(){const _0x3736a4=['15jeoqgI','10129VAidef','204870HBHfFm','28162YBdyOv','21748DfERDl','473238vVGAlx','54GedvDC','5ruDTAs','1718211dgbZJR','1096JKBoqL','7512BfLIhi'];a71_0x1c95=function(){return _0x3736a4;};return a71_0x1c95();}import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuSync,menuUpdate];
1
+ function a78_0x5719(){const _0x53f157=['3HSLoBi','34690jPGPOu','458620GTjZnX','189FJRWeo','16872168nbMtPJ','276LRVyCj','11svXFZy','105514IEgGoq','669472KkIbHp','875lFersR','204510rLCkLu','14046sUyEZA'];a78_0x5719=function(){return _0x53f157;};return a78_0x5719();}function a78_0x2fa9(_0x24fedc,_0xbd4d16){_0x24fedc=_0x24fedc-0x72;const _0x57195b=a78_0x5719();let _0x2fa91f=_0x57195b[_0x24fedc];return _0x2fa91f;}(function(_0xd3be6,_0x8eb88c){const _0x45c2cb=a78_0x2fa9,_0x16a604=_0xd3be6();while(!![]){try{const _0x5f2282=parseInt(_0x45c2cb(0x7b))/0x1+-parseInt(_0x45c2cb(0x74))/0x2*(parseInt(_0x45c2cb(0x79))/0x3)+parseInt(_0x45c2cb(0x72))/0x4*(parseInt(_0x45c2cb(0x7a))/0x5)+-parseInt(_0x45c2cb(0x78))/0x6*(-parseInt(_0x45c2cb(0x76))/0x7)+parseInt(_0x45c2cb(0x75))/0x8+-parseInt(_0x45c2cb(0x7c))/0x9*(-parseInt(_0x45c2cb(0x77))/0xa)+-parseInt(_0x45c2cb(0x73))/0xb*(parseInt(_0x45c2cb(0x7d))/0xc);if(_0x5f2282===_0x8eb88c)break;else _0x16a604['push'](_0x16a604['shift']());}catch(_0x4f47f6){_0x16a604['push'](_0x16a604['shift']());}}}(a78_0x5719,0x456bf));import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuSync,menuUpdate];
@@ -1 +1 @@
1
- (function(_0x595f92,_0x1e6ecd){const _0x5146a1=a72_0x18f9,_0xf8ef76=_0x595f92();while(!![]){try{const _0x3f1797=-parseInt(_0x5146a1(0x17d))/0x1*(-parseInt(_0x5146a1(0x191))/0x2)+parseInt(_0x5146a1(0x183))/0x3+parseInt(_0x5146a1(0x17f))/0x4*(parseInt(_0x5146a1(0x18a))/0x5)+parseInt(_0x5146a1(0x18b))/0x6+-parseInt(_0x5146a1(0x18e))/0x7+parseInt(_0x5146a1(0x17c))/0x8+-parseInt(_0x5146a1(0x17b))/0x9;if(_0x3f1797===_0x1e6ecd)break;else _0xf8ef76['push'](_0xf8ef76['shift']());}catch(_0x3d4744){_0xf8ef76['push'](_0xf8ef76['shift']());}}}(a72_0x517c,0x5e3a7));function a72_0x18f9(_0x458a31,_0x296617){_0x458a31=_0x458a31-0x178;const _0x517cd8=a72_0x517c();let _0x18f907=_0x517cd8[_0x458a31];return _0x18f907;}function strWidth(_0xcd4b55){let _0xce556b=0x0;for(const _0x5ed6a7 of _0xcd4b55){_0xce556b+=/[\u4e00-\u9fa5]/['test'](_0x5ed6a7)?0x2:0x1;}return _0xce556b;}function padRight(_0x53fb09,_0x5c2dc0){const _0x31212d=a72_0x18f9,_0x1d3bf2=strWidth(_0x53fb09);return _0x53fb09+'\x20'[_0x31212d(0x187)](Math[_0x31212d(0x186)](0x0,_0x5c2dc0-_0x1d3bf2));}export function renderCompareTable(_0x3f49bd,_0x181b13={}){const _0xcf60a8=a72_0x18f9;if(_0x3f49bd[_0xcf60a8(0x190)]===0x0)return'';const _0x1da167=_0x181b13[_0xcf60a8(0x188)]??!![],_0xa5306f=Math['max'](0x1e,..._0x3f49bd[_0xcf60a8(0x18c)](_0x495fde=>strWidth(_0x495fde[_0xcf60a8(0x195)]))),_0x410cc4=0x4,_0x29f768=[],_0x398fc7='\x20\x20'+padRight(_0xcf60a8(0x17e),_0xa5306f),_0x127ebd=padRight(_0xcf60a8(0x179),_0x410cc4),_0x21e72f=_0x1da167?'\x20\x20'+padRight(_0xcf60a8(0x185),_0x410cc4):'';_0x29f768['push'](_0x398fc7+'\x20\x20'+_0x127ebd+(_0x1da167?_0x21e72f:'')),_0x29f768[_0xcf60a8(0x18d)]('\x20\x20'+'─'[_0xcf60a8(0x187)](_0xa5306f)+'\x20\x20'+'─'['repeat'](_0x410cc4)+(_0x1da167?'\x20\x20'+'─'['repeat'](_0x410cc4):''));for(const _0x408aa3 of _0x3f49bd){const _0x1fe85e=padRight(_0x408aa3[_0xcf60a8(0x195)],_0xa5306f),_0x52871c=_0x408aa3['local']?'✓':'✗',_0x3e2cb7=padRight(_0x52871c,_0x410cc4);let _0x3c32ab='\x20\x20'+_0x1fe85e+'\x20\x20'+_0x3e2cb7;if(_0x1da167){const _0x503683=_0x408aa3[_0xcf60a8(0x184)]?'✓':'✗';_0x3c32ab+='\x20\x20'+padRight(_0x503683,_0x410cc4);}_0x29f768[_0xcf60a8(0x18d)](_0x3c32ab);}return _0x29f768['join']('\x0a');}function a72_0x517c(){const _0x4404e1=['22CZIZiZ','\x20\x20No\x20pages\x20to\x20sync.','path','\x20\x20\x20\x20•\x20','label','\x20\x20\x20\x20JS:\x20\x20','Local','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','6212277nsNEns','191888tqONwx','39332AysYgb','Menu\x20Name','561140BHmZoJ','\x20\x20Affected\x20menus:\x20','(unchanged)','join','1252296zsctZq','online','Platform','max','repeat','showOnline','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','5HJIgse','1260390dYllSp','map','push','1037456MGbkTV','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','length'];a72_0x517c=function(){return _0x4404e1;};return a72_0x517c();}export function renderSyncSummary(_0x12a33a,_0x3a5aad){const _0x14858e=a72_0x18f9;if(_0x12a33a[_0x14858e(0x190)]===0x0)return _0x3a5aad?_0x14858e(0x18f):_0x14858e(0x192);const _0x363440=['\x20\x20'+_0x12a33a['length']+_0x14858e(0x189)];for(const _0x54dc23 of _0x12a33a){_0x363440[_0x14858e(0x18d)](_0x14858e(0x194)+_0x54dc23[_0x14858e(0x195)]+'\x20('+_0x54dc23[_0x14858e(0x193)]+')');}return _0x363440[_0x14858e(0x182)]('\x0a');}export function renderUpdateSummary(_0x11b4df,_0x2ea851){const _0xf7e42c=a72_0x18f9;if(_0x11b4df[_0xf7e42c(0x190)]===0x0)return'\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.';const _0x491f73=['\x20\x20'+_0x11b4df[_0xf7e42c(0x190)]+_0xf7e42c(0x17a),_0xf7e42c(0x178)+(_0x2ea851[0x0]??_0xf7e42c(0x181)),'\x20\x20\x20\x20CSS:\x20'+(_0x2ea851[0x1]??'(unchanged)'),'',_0xf7e42c(0x180)+_0x11b4df['join'](',\x20')];return _0x491f73[_0xf7e42c(0x182)]('\x0a');}
1
+ (function(_0x3e56f1,_0x2af2ce){const _0x9304ed=a79_0x35ba,_0x42c6c6=_0x3e56f1();while(!![]){try{const _0x1883b2=-parseInt(_0x9304ed(0x117))/0x1+parseInt(_0x9304ed(0x119))/0x2*(-parseInt(_0x9304ed(0x125))/0x3)+-parseInt(_0x9304ed(0x126))/0x4*(-parseInt(_0x9304ed(0x114))/0x5)+parseInt(_0x9304ed(0x11e))/0x6+-parseInt(_0x9304ed(0x121))/0x7*(parseInt(_0x9304ed(0x124))/0x8)+parseInt(_0x9304ed(0x11a))/0x9+parseInt(_0x9304ed(0x12d))/0xa;if(_0x1883b2===_0x2af2ce)break;else _0x42c6c6['push'](_0x42c6c6['shift']());}catch(_0xa5e752){_0x42c6c6['push'](_0x42c6c6['shift']());}}}(a79_0x19af,0xcacb9));function a79_0x35ba(_0xa960,_0x576a59){_0xa960=_0xa960-0x110;const _0x19af03=a79_0x19af();let _0x35ba90=_0x19af03[_0xa960];return _0x35ba90;}function a79_0x19af(){const _0x2c4eea=['max','\x20\x20No\x20pages\x20to\x20sync.','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','13155VygdfP','length','Menu\x20Name','1334154lqoGIJ','push','290VxVThD','13513356CQkvva','\x20\x20Affected\x20menus:\x20','map','\x20\x20\x20\x20CSS:\x20','2261250aWUvvC','Platform','path','11295410cnacal','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','local','8hqmTHJ','19932BpnEqW','20NuDYqP','label','repeat','test','online','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','join','28502990ZjPgmf','\x20\x20\x20\x20JS:\x20\x20','(unchanged)'];a79_0x19af=function(){return _0x2c4eea;};return a79_0x19af();}function strWidth(_0x47aa0f){const _0x49e60d=a79_0x35ba;let _0x1d93b1=0x0;for(const _0x1b3f4c of _0x47aa0f){_0x1d93b1+=/[\u4e00-\u9fa5]/[_0x49e60d(0x129)](_0x1b3f4c)?0x2:0x1;}return _0x1d93b1;}function padRight(_0x46b892,_0x448563){const _0xd4cda6=a79_0x35ba,_0x3bba3c=strWidth(_0x46b892);return _0x46b892+'\x20'[_0xd4cda6(0x128)](Math['max'](0x0,_0x448563-_0x3bba3c));}export function renderCompareTable(_0x3aa4b7,_0x3b0ab7={}){const _0x88051b=a79_0x35ba;if(_0x3aa4b7[_0x88051b(0x115)]===0x0)return'';const _0x308365=_0x3b0ab7['showOnline']??!![],_0x1605b0=Math[_0x88051b(0x111)](0x1e,..._0x3aa4b7[_0x88051b(0x11c)](_0x36c6d8=>strWidth(_0x36c6d8['label']))),_0x2ec81f=0x4,_0x4abef1=[],_0x1149e5='\x20\x20'+padRight(_0x88051b(0x116),_0x1605b0),_0x1473d3=padRight('Local',_0x2ec81f),_0x586b4d=_0x308365?'\x20\x20'+padRight(_0x88051b(0x11f),_0x2ec81f):'';_0x4abef1[_0x88051b(0x118)](_0x1149e5+'\x20\x20'+_0x1473d3+(_0x308365?_0x586b4d:'')),_0x4abef1[_0x88051b(0x118)]('\x20\x20'+'─'[_0x88051b(0x128)](_0x1605b0)+'\x20\x20'+'─'[_0x88051b(0x128)](_0x2ec81f)+(_0x308365?'\x20\x20'+'─'[_0x88051b(0x128)](_0x2ec81f):''));for(const _0x391aa0 of _0x3aa4b7){const _0xfcd59c=padRight(_0x391aa0[_0x88051b(0x127)],_0x1605b0),_0x2e7092=_0x391aa0[_0x88051b(0x123)]?'✓':'✗',_0x30d147=padRight(_0x2e7092,_0x2ec81f);let _0x19857f='\x20\x20'+_0xfcd59c+'\x20\x20'+_0x30d147;if(_0x308365){const _0x546585=_0x391aa0[_0x88051b(0x12a)]?'✓':'✗';_0x19857f+='\x20\x20'+padRight(_0x546585,_0x2ec81f);}_0x4abef1[_0x88051b(0x118)](_0x19857f);}return _0x4abef1['join']('\x0a');}export function renderSyncSummary(_0x7e1369,_0x9fcc64){const _0xdda06d=a79_0x35ba;if(_0x7e1369[_0xdda06d(0x115)]===0x0)return _0x9fcc64?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0xdda06d(0x112);const _0x34f2a8=['\x20\x20'+_0x7e1369[_0xdda06d(0x115)]+_0xdda06d(0x12b)];for(const _0x270b33 of _0x7e1369){_0x34f2a8['push']('\x20\x20\x20\x20•\x20'+_0x270b33[_0xdda06d(0x127)]+'\x20('+_0x270b33[_0xdda06d(0x120)]+')');}return _0x34f2a8[_0xdda06d(0x12c)]('\x0a');}export function renderUpdateSummary(_0x393daf,_0x3206be){const _0x4a76c1=a79_0x35ba;if(_0x393daf[_0x4a76c1(0x115)]===0x0)return _0x4a76c1(0x122);const _0x1f64d2=['\x20\x20'+_0x393daf[_0x4a76c1(0x115)]+_0x4a76c1(0x113),_0x4a76c1(0x12e)+(_0x3206be[0x0]??'(unchanged)'),_0x4a76c1(0x11d)+(_0x3206be[0x1]??_0x4a76c1(0x110)),'',_0x4a76c1(0x11b)+_0x393daf[_0x4a76c1(0x12c)](',\x20')];return _0x1f64d2['join']('\x0a');}
@@ -1 +1 @@
1
- (function(_0x8ae63e,_0x5e756f){var _0x450c74=a73_0x9b5d,_0x2173a9=_0x8ae63e();while(!![]){try{var _0x540566=-parseInt(_0x450c74(0x143))/0x1+parseInt(_0x450c74(0x141))/0x2*(parseInt(_0x450c74(0x144))/0x3)+parseInt(_0x450c74(0x148))/0x4*(parseInt(_0x450c74(0x146))/0x5)+parseInt(_0x450c74(0x145))/0x6+-parseInt(_0x450c74(0x147))/0x7+parseInt(_0x450c74(0x149))/0x8*(parseInt(_0x450c74(0x142))/0x9)+parseInt(_0x450c74(0x140))/0xa*(-parseInt(_0x450c74(0x13f))/0xb);if(_0x540566===_0x5e756f)break;else _0x2173a9['push'](_0x2173a9['shift']());}catch(_0x4f466c){_0x2173a9['push'](_0x2173a9['shift']());}}}(a73_0x5e42,0xad811));function a73_0x9b5d(_0x47c8ca,_0x2fb10e){_0x47c8ca=_0x47c8ca-0x13f;var _0x5e4230=a73_0x5e42();var _0x9b5d98=_0x5e4230[_0x47c8ca];return _0x9b5d98;}export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';function a73_0x5e42(){var _0x38eb44=['364893QIqTXy','6723576tzhVmN','755cZnydT','7726719Wysiak','32372TOsQVA','58584tfBIIP','525547EjTbOH','430UZNYxE','16BKiUMS','1008sdvnrI','266962IrnxDp'];a73_0x5e42=function(){return _0x38eb44;};return a73_0x5e42();}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
1
+ (function(_0x3af48b,_0x5cd5c0){var _0x3debc8=a80_0x230d,_0x1c3a91=_0x3af48b();while(!![]){try{var _0x2056a1=-parseInt(_0x3debc8(0xab))/0x1*(-parseInt(_0x3debc8(0xaf))/0x2)+-parseInt(_0x3debc8(0xa9))/0x3+parseInt(_0x3debc8(0xa8))/0x4*(-parseInt(_0x3debc8(0xa7))/0x5)+-parseInt(_0x3debc8(0xad))/0x6*(parseInt(_0x3debc8(0xaa))/0x7)+parseInt(_0x3debc8(0xac))/0x8+-parseInt(_0x3debc8(0xa6))/0x9*(parseInt(_0x3debc8(0xae))/0xa)+parseInt(_0x3debc8(0xb0))/0xb;if(_0x2056a1===_0x5cd5c0)break;else _0x1c3a91['push'](_0x1c3a91['shift']());}catch(_0x38059d){_0x1c3a91['push'](_0x1c3a91['shift']());}}}(a80_0x40b5,0xbf5a3));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';function a80_0x230d(_0x2d6a3e,_0x552734){_0x2d6a3e=_0x2d6a3e-0xa6;var _0x40b59f=a80_0x40b5();var _0x230d4d=_0x40b59f[_0x2d6a3e];return _0x230d4d;}export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';function a80_0x40b5(){var _0x50f72d=['1395783aEhHTA','697039dFmjDS','13pkYKlk','6849704tWFEne','6CrAPSS','10cPziNi','77174JZigdU','8252673bEiaOw','564687IUHNba','5NutqKV','2786908lSYXas'];a80_0x40b5=function(){return _0x50f72d;};return a80_0x40b5();}export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
@@ -1 +1 @@
1
- (function(_0x574941,_0x36f483){const _0x371484=a74_0x532b,_0x7d8775=_0x574941();while(!![]){try{const _0x2a9090=parseInt(_0x371484(0xf0))/0x1+parseInt(_0x371484(0xf8))/0x2+parseInt(_0x371484(0xef))/0x3+-parseInt(_0x371484(0xfa))/0x4+-parseInt(_0x371484(0xf4))/0x5*(parseInt(_0x371484(0x114))/0x6)+-parseInt(_0x371484(0x10e))/0x7+parseInt(_0x371484(0x10a))/0x8*(parseInt(_0x371484(0x10f))/0x9);if(_0x2a9090===_0x36f483)break;else _0x7d8775['push'](_0x7d8775['shift']());}catch(_0x3d5270){_0x7d8775['push'](_0x7d8775['shift']());}}}(a74_0x4f75,0x8442e));function a74_0x532b(_0x33ce68,_0x428ed3){_0x33ce68=_0x33ce68-0xee;const _0x4f753b=a74_0x4f75();let _0x532b19=_0x4f753b[_0x33ce68];return _0x532b19;}import a74_0x4ef642 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a74_0x4d3603 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x3f0108){const _0x52638a=a74_0x532b;return _0x3f0108[_0x52638a(0x117)](_0x3af2cf=>{const _0x4ebf54=_0x52638a;if(_0x3af2cf?.[_0x4ebf54(0xf2)]===_0x4ebf54(0x112))throw CliErrors['cancelled']('Cancelled.');throw _0x3af2cf;});}export function startSpinner(_0x556c74){const _0x50aa95=a74_0x532b;return a74_0x4d3603({'text':_0x556c74,'color':_0x50aa95(0x10c)})[_0x50aa95(0x102)]();}export function stopSpinner(_0x47130a,_0x4070a6,_0x1a2ffd){const _0x504574=a74_0x532b;_0x1a2ffd?_0x47130a[_0x504574(0x111)](_0x4070a6):_0x47130a[_0x504574(0x105)](_0x4070a6);}export async function askConfirm(_0xad71f2){return onCancel(confirm({'message':_0xad71f2,'theme':{'prefix':''}}));}export async function askJsUrl(_0x5cf737){const _0x4f698b=a74_0x532b;while(!![]){const _0x2928c2=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x5cf737,'theme':{'prefix':''}}));if(_0x2928c2['trim']()==='')throw CliErrors[_0x4f698b(0x108)](_0x4f698b(0x107));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x4f698b(0xf1)](_0x2928c2[_0x4f698b(0x119)]())){console[_0x4f698b(0xff)](a74_0x4ef642[_0x4f698b(0xfb)](_0x4f698b(0x10d)));continue;}const _0x4763e4=startSpinner(_0x4f698b(0x113));try{const _0x307058=await isUrlReachable(_0x2928c2['trim']());stopSpinner(_0x4763e4,_0x4f698b(0xfc),_0x307058);if(!_0x307058){console[_0x4f698b(0xff)](a74_0x4ef642['red'](_0x4f698b(0x110)));continue;}return _0x2928c2['trim']();}catch(_0x143d3d){stopSpinner(_0x4763e4,_0x4f698b(0x116),![]);throw _0x143d3d;}}}export async function askCssUrl(_0x28d8f1){const _0x4b8c25=a74_0x532b;while(!![]){const _0x204161=await onCancel(input({'message':_0x4b8c25(0x103),'default':_0x28d8f1,'theme':{'prefix':''}}));if(_0x204161[_0x4b8c25(0x119)]()==='')throw CliErrors[_0x4b8c25(0x108)](_0x4b8c25(0x107));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x4b8c25(0xf1)](_0x204161[_0x4b8c25(0x119)]())){console[_0x4b8c25(0xff)](a74_0x4ef642['red']('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0x4defee=startSpinner(_0x4b8c25(0xf7));try{const _0x55a90f=await isUrlReachable(_0x204161[_0x4b8c25(0x119)]());stopSpinner(_0x4defee,_0x4b8c25(0xfe),_0x55a90f);if(!_0x55a90f){console[_0x4b8c25(0xff)](a74_0x4ef642[_0x4b8c25(0xfb)](_0x4b8c25(0xee)));continue;}return _0x204161[_0x4b8c25(0x119)]();}catch(_0x38052b){stopSpinner(_0x4defee,_0x4b8c25(0xf9),![]);throw _0x38052b;}}}export async function selectPages(_0x96b978,_0x4b4e41,_0x580ce7){const _0x67ae3f=a74_0x532b,_0x2047a3=_0x96b978['map'](_0x4a8089=>({'name':_0x4a8089[_0x67ae3f(0x109)]+'\x20\x20'+(_0x4b4e41[_0x67ae3f(0xfd)](_0x4a8089['path'])?a74_0x4ef642['gray']('[already\x20on\x20platform]'):a74_0x4ef642[_0x67ae3f(0x115)](_0x67ae3f(0xf5))),'value':_0x4a8089[_0x67ae3f(0x109)],'checked':_0x580ce7?_0x580ce7[_0x67ae3f(0x101)](_0x4a8089['label']):!_0x4b4e41[_0x67ae3f(0xfd)](_0x4a8089['path'])}));if(_0x2047a3[_0x67ae3f(0xf6)]===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x111ce0=await onCancel(checkbox({'message':_0x67ae3f(0x104),'choices':_0x2047a3,'loop':![],'theme':{'prefix':''}}));if(_0x111ce0['length']===0x0)throw new Error(_0x67ae3f(0xf3));return _0x96b978[_0x67ae3f(0x100)](_0x33bec7=>_0x111ce0[_0x67ae3f(0x101)](_0x33bec7[_0x67ae3f(0x109)]));}function a74_0x4f75(){const _0x5eb7c5=['CSS\x20URL\x20check\x20failed','3584864QZCoRo','red','JS\x20URL\x20checked','has','CSS\x20URL\x20checked','error','filter','includes','start','\x20\x20CSS\x20URL:','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','fail','isTTY','Cancelled.','cancelled','label','8uPOUzc','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','cyan','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','4255251eJwfhl','12202929oshswu','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','succeed','ExitPromptError','\x20\x20Checking\x20JS\x20URL\x20reachability...','3056838lcHZwL','green','JS\x20URL\x20check\x20failed','catch','stdin','trim','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','578499hliQBB','477821WWSDEO','test','name','No\x20menus\x20selected.','5TfLuah','[new]','length','\x20\x20Checking\x20CSS\x20URL\x20reachability...','1057578qPGcGC'];a74_0x4f75=function(){return _0x5eb7c5;};return a74_0x4f75();}export function isInteractive(){const _0x202984=a74_0x532b;return process[_0x202984(0x118)][_0x202984(0x106)]===!![];}export function requireInteractive(){const _0x1fb143=a74_0x532b;if(!isInteractive())throw new Error(_0x1fb143(0x10b)+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
1
+ (function(_0x33151b,_0x26188a){const _0x583cc7=a81_0x48a8,_0x5503ab=_0x33151b();while(!![]){try{const _0x2d4d4a=parseInt(_0x583cc7(0x1d1))/0x1+parseInt(_0x583cc7(0x1ef))/0x2*(-parseInt(_0x583cc7(0x1e3))/0x3)+parseInt(_0x583cc7(0x1e9))/0x4*(-parseInt(_0x583cc7(0x1f0))/0x5)+parseInt(_0x583cc7(0x1d4))/0x6*(parseInt(_0x583cc7(0x1d5))/0x7)+-parseInt(_0x583cc7(0x1ed))/0x8+parseInt(_0x583cc7(0x1d6))/0x9+parseInt(_0x583cc7(0x1e4))/0xa;if(_0x2d4d4a===_0x26188a)break;else _0x5503ab['push'](_0x5503ab['shift']());}catch(_0x5ea66d){_0x5503ab['push'](_0x5503ab['shift']());}}}(a81_0x5772,0x3ea84));import a81_0x248b15 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a81_0x55d52a from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x54e613){const _0x57e88b=a81_0x48a8;return _0x54e613[_0x57e88b(0x1db)](_0x31c8ac=>{const _0x59f24a=_0x57e88b;if(_0x31c8ac?.[_0x59f24a(0x1d9)]===_0x59f24a(0x1ce))throw CliErrors[_0x59f24a(0x1ee)](_0x59f24a(0x1e8));throw _0x31c8ac;});}export function startSpinner(_0xc401e0){const _0x583d23=a81_0x48a8;return a81_0x55d52a({'text':_0xc401e0,'color':'cyan'})[_0x583d23(0x1e6)]();}function a81_0x48a8(_0x1963ac,_0x4dc8cc){_0x1963ac=_0x1963ac-0x1cb;const _0x5772f6=a81_0x5772();let _0x48a8af=_0x5772f6[_0x1963ac];return _0x48a8af;}export function stopSpinner(_0xc3f239,_0x2a5602,_0x4d997e){const _0x2eb8fe=a81_0x48a8;_0x4d997e?_0xc3f239[_0x2eb8fe(0x1d7)](_0x2a5602):_0xc3f239['fail'](_0x2a5602);}export async function askConfirm(_0x241882){return onCancel(confirm({'message':_0x241882,'theme':{'prefix':''}}));}export async function askJsUrl(_0x497808){const _0x167934=a81_0x48a8;while(!![]){const _0x2540e6=await onCancel(input({'message':_0x167934(0x1f6),'default':_0x497808,'theme':{'prefix':''}}));if(_0x2540e6[_0x167934(0x1e5)]()==='')throw CliErrors[_0x167934(0x1ee)](_0x167934(0x1e8));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x167934(0x1ea)](_0x2540e6[_0x167934(0x1e5)]())){console['error'](a81_0x248b15['red'](_0x167934(0x1cf)));continue;}const _0x5b90d1=startSpinner(_0x167934(0x1f5));try{const _0x2466f6=await isUrlReachable(_0x2540e6[_0x167934(0x1e5)]());stopSpinner(_0x5b90d1,_0x167934(0x1d0),_0x2466f6);if(!_0x2466f6){console[_0x167934(0x1f3)](a81_0x248b15[_0x167934(0x1e0)](_0x167934(0x1f1)));continue;}return _0x2540e6[_0x167934(0x1e5)]();}catch(_0x63f302){stopSpinner(_0x5b90d1,_0x167934(0x1f8),![]);throw _0x63f302;}}}export async function askCssUrl(_0xcf0ccb){const _0x1627f8=a81_0x48a8;while(!![]){const _0x3d96a5=await onCancel(input({'message':_0x1627f8(0x1f4),'default':_0xcf0ccb,'theme':{'prefix':''}}));if(_0x3d96a5[_0x1627f8(0x1e5)]()==='')throw CliErrors['cancelled']('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0x1627f8(0x1ea)](_0x3d96a5['trim']())){console[_0x1627f8(0x1f3)](a81_0x248b15[_0x1627f8(0x1e0)](_0x1627f8(0x1cb)));continue;}const _0xc15540=startSpinner(_0x1627f8(0x1de));try{const _0x33ec3=await isUrlReachable(_0x3d96a5['trim']());stopSpinner(_0xc15540,_0x1627f8(0x1cd),_0x33ec3);if(!_0x33ec3){console[_0x1627f8(0x1f3)](a81_0x248b15[_0x1627f8(0x1e0)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x3d96a5['trim']();}catch(_0x5c308e){stopSpinner(_0xc15540,_0x1627f8(0x1e2),![]);throw _0x5c308e;}}}export async function selectPages(_0x8f67f3,_0x203e78,_0x3d46c0){const _0x116c4a=a81_0x48a8,_0x2bec64=_0x8f67f3[_0x116c4a(0x1dc)](_0x5019d7=>({'name':_0x5019d7[_0x116c4a(0x1dd)]+'\x20\x20'+(_0x203e78['has'](_0x5019d7[_0x116c4a(0x1d3)])?a81_0x248b15[_0x116c4a(0x1d8)]('[already\x20on\x20platform]'):a81_0x248b15[_0x116c4a(0x1d2)](_0x116c4a(0x1eb))),'value':_0x5019d7[_0x116c4a(0x1dd)],'checked':_0x3d46c0?_0x3d46c0[_0x116c4a(0x1ec)](_0x5019d7['label']):!_0x203e78[_0x116c4a(0x1f7)](_0x5019d7[_0x116c4a(0x1d3)])}));if(_0x2bec64[_0x116c4a(0x1e1)]===0x0)throw new Error(_0x116c4a(0x1df));const _0xd48c84=await onCancel(checkbox({'message':_0x116c4a(0x1f2),'choices':_0x2bec64,'loop':![],'theme':{'prefix':''}}));if(_0xd48c84[_0x116c4a(0x1e1)]===0x0)throw new Error('No\x20menus\x20selected.');return _0x8f67f3['filter'](_0x17e450=>_0xd48c84[_0x116c4a(0x1ec)](_0x17e450['label']));}function a81_0x5772(){const _0xecca2=['\x20\x20Checking\x20CSS\x20URL\x20reachability...','No\x20local\x20pages\x20found.','red','length','CSS\x20URL\x20check\x20failed','165BFlMnv','4189880czGZPQ','trim','start','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','Cancelled.','975452BgHQDj','test','[new]','includes','2111384acadne','cancelled','6350rRqlIa','5BRbpIJ','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','error','\x20\x20CSS\x20URL:','\x20\x20Checking\x20JS\x20URL\x20reachability...','\x20\x20JS\x20URL:','has','JS\x20URL\x20check\x20failed','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','stdin','CSS\x20URL\x20checked','ExitPromptError','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','JS\x20URL\x20checked','134946EgeUzo','green','path','48BSTRIb','333088WUiOBk','40041ReoCPh','succeed','gray','name','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','catch','map','label'];a81_0x5772=function(){return _0xecca2;};return a81_0x5772();}export function isInteractive(){const _0x49f094=a81_0x48a8;return process[_0x49f094(0x1cc)]['isTTY']===!![];}export function requireInteractive(){const _0x19c189=a81_0x48a8;if(!isInteractive())throw new Error(_0x19c189(0x1da)+_0x19c189(0x1e7));}
@@ -1 +1 @@
1
- function a75_0x2040(){const _0x1ec364=['4402486tdWIIw','endsWith','24LGDbHn','3388hIqlTu','cwd','318fXDMyk','2yUSQAt','1007464JzZBoU','push','isDirectory','9OtnQrS','replace','filter','match','1059wjWSHj','split','concat','utf-8','1379050CnKYuh','.tsx','18900QGfAjE','55034KpMYFn','join','replaceAll','200890mKiRnt','forEach'];a75_0x2040=function(){return _0x1ec364;};return a75_0x2040();}const a75_0x18132a=a75_0x438d;(function(_0x5ab8cd,_0x533ab7){const _0x51a5ea=a75_0x438d,_0x3135c4=_0x5ab8cd();while(!![]){try{const _0x334949=parseInt(_0x51a5ea(0x1dd))/0x1*(-parseInt(_0x51a5ea(0x1e8))/0x2)+-parseInt(_0x51a5ea(0x1f0))/0x3*(parseInt(_0x51a5ea(0x1e5))/0x4)+-parseInt(_0x51a5ea(0x1f4))/0x5+parseInt(_0x51a5ea(0x1e7))/0x6*(-parseInt(_0x51a5ea(0x1f6))/0x7)+-parseInt(_0x51a5ea(0x1e9))/0x8*(-parseInt(_0x51a5ea(0x1ec))/0x9)+parseInt(_0x51a5ea(0x1e0))/0xa+-parseInt(_0x51a5ea(0x1e2))/0xb*(-parseInt(_0x51a5ea(0x1e4))/0xc);if(_0x334949===_0x533ab7)break;else _0x3135c4['push'](_0x3135c4['shift']());}catch(_0x20d26b){_0x3135c4['push'](_0x3135c4['shift']());}}}(a75_0x2040,0x2a5e3));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a75_0x18132a(0x1e6)](),'src/pages');function a75_0x438d(_0x4a2c0a,_0x40a972){_0x4a2c0a=_0x4a2c0a-0x1dd;const _0x204092=a75_0x2040();let _0x438da1=_0x204092[_0x4a2c0a];return _0x438da1;}export function extractTitleFromComment(_0x3f17a9){const _0x48c8a2=a75_0x18132a;try{const _0x2b9ef4=readFileSync(_0x3f17a9,_0x48c8a2(0x1f3)),_0x3bc94e=_0x2b9ef4[_0x48c8a2(0x1ef)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x3bc94e&&_0x3bc94e[0x1]){const _0x391032=_0x3bc94e[0x1],_0x485326=_0x391032[_0x48c8a2(0x1ef)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x485326&&_0x485326[0x1])return _0x485326[0x1]['trim']();}let _0xd5715c=null;const _0x3b7185=_0x2b9ef4[_0x48c8a2(0x1ef)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x3b7185&&_0x3b7185[0x1]&&(_0xd5715c=_0x3b7185[0x1]);if(!_0xd5715c){const _0x31a3bd=_0x2b9ef4['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x31a3bd&&_0x31a3bd[0x1]&&(_0xd5715c=_0x31a3bd[0x1]);}if(_0xd5715c){const _0x4edec2=new RegExp('\x5cb'+_0xd5715c+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x5a8663=_0x2b9ef4['match'](_0x4edec2);if(_0x5a8663&&_0x5a8663[0x1])return _0x5a8663[0x1];return _0xd5715c;}return null;}catch(_0x489e95){return null;}}export function getLocalPages(_0x4f1ead=pagesDir,_0x5b3840=pagesDir){const _0x2376f4=a75_0x18132a;let _0x11cfb1=[];const _0x2a0a31=readdirSync(_0x4f1ead);return _0x2a0a31[_0x2376f4(0x1e1)](_0x52ea01=>{const _0x17a04f=_0x2376f4,_0x58f420=join(_0x4f1ead,_0x52ea01),_0x273826=statSync(_0x58f420);if(_0x273826&&_0x273826[_0x17a04f(0x1eb)]())_0x11cfb1=_0x11cfb1[_0x17a04f(0x1f2)](getLocalPages(_0x58f420,_0x5b3840));else{if(_0x52ea01[_0x17a04f(0x1e3)](_0x17a04f(0x1f5))){let _0x1994ec=relative(_0x5b3840,_0x58f420);_0x1994ec['endsWith']('index.tsx')?_0x1994ec=_0x1994ec[_0x17a04f(0x1ed)](/index\.tsx$/,''):_0x1994ec=_0x1994ec[_0x17a04f(0x1ed)](/\.tsx$/,'');_0x1994ec[_0x17a04f(0x1e3)](sep)&&(_0x1994ec=_0x1994ec['slice'](0x0,-0x1));const _0x1d33d0=_0x1994ec[_0x17a04f(0x1f1)](sep)[_0x17a04f(0x1de)]('/'),_0x36c42c=extractTitleFromComment(_0x58f420),_0x27f6c9=_0x36c42c||_0x1d33d0;_0x11cfb1[_0x17a04f(0x1ea)]({'path':_0x1d33d0[_0x17a04f(0x1df)]('$',':'),'label':_0x27f6c9});}}}),_0x11cfb1[_0x2376f4(0x1ee)](_0x5718ea=>_0x5718ea['path']!=='');}
1
+ function a82_0x1d64(_0x51ed6f,_0x2797d8){_0x51ed6f=_0x51ed6f-0x1e2;const _0x4457d1=a82_0x4457();let _0x1d645c=_0x4457d1[_0x51ed6f];return _0x1d645c;}const a82_0x3ae9e4=a82_0x1d64;(function(_0x1eab2e,_0x1f6a69){const _0x23cd3a=a82_0x1d64,_0x52f15f=_0x1eab2e();while(!![]){try{const _0x1a5eae=parseInt(_0x23cd3a(0x1e9))/0x1*(parseInt(_0x23cd3a(0x1e5))/0x2)+-parseInt(_0x23cd3a(0x1f5))/0x3*(parseInt(_0x23cd3a(0x1fb))/0x4)+parseInt(_0x23cd3a(0x1f0))/0x5*(parseInt(_0x23cd3a(0x1ec))/0x6)+-parseInt(_0x23cd3a(0x1fa))/0x7*(-parseInt(_0x23cd3a(0x1fd))/0x8)+-parseInt(_0x23cd3a(0x1e3))/0x9+-parseInt(_0x23cd3a(0x1ef))/0xa*(parseInt(_0x23cd3a(0x1e7))/0xb)+parseInt(_0x23cd3a(0x1f1))/0xc;if(_0x1a5eae===_0x1f6a69)break;else _0x52f15f['push'](_0x52f15f['shift']());}catch(_0x1d185b){_0x52f15f['push'](_0x52f15f['shift']());}}}(a82_0x4457,0xb5540));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),a82_0x3ae9e4(0x1ee));export function extractTitleFromComment(_0x120a46){const _0x1f0d92=a82_0x3ae9e4;try{const _0x3ba3ac=readFileSync(_0x120a46,_0x1f0d92(0x1f7)),_0x3f1b53=_0x3ba3ac[_0x1f0d92(0x1e8)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x3f1b53&&_0x3f1b53[0x1]){const _0x52e3ff=_0x3f1b53[0x1],_0x410d51=_0x52e3ff[_0x1f0d92(0x1e8)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x410d51&&_0x410d51[0x1])return _0x410d51[0x1]['trim']();}let _0x17c0ce=null;const _0x1bb31e=_0x3ba3ac[_0x1f0d92(0x1e8)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x1bb31e&&_0x1bb31e[0x1]&&(_0x17c0ce=_0x1bb31e[0x1]);if(!_0x17c0ce){const _0x52ba6e=_0x3ba3ac[_0x1f0d92(0x1e8)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x52ba6e&&_0x52ba6e[0x1]&&(_0x17c0ce=_0x52ba6e[0x1]);}if(_0x17c0ce){const _0x20e6a7=new RegExp('\x5cb'+_0x17c0ce+_0x1f0d92(0x1f8)),_0x34204d=_0x3ba3ac[_0x1f0d92(0x1e8)](_0x20e6a7);if(_0x34204d&&_0x34204d[0x1])return _0x34204d[0x1];return _0x17c0ce;}return null;}catch(_0x43d2e1){return null;}}export function getLocalPages(_0x3fce54=pagesDir,_0x4bf4f3=pagesDir){const _0x1fbc79=a82_0x3ae9e4;let _0x1d2bf9=[];const _0x245634=readdirSync(_0x3fce54);return _0x245634[_0x1fbc79(0x1e6)](_0x8dc930=>{const _0x2bee76=_0x1fbc79,_0x1f56cf=join(_0x3fce54,_0x8dc930),_0x2e6717=statSync(_0x1f56cf);if(_0x2e6717&&_0x2e6717[_0x2bee76(0x1f2)]())_0x1d2bf9=_0x1d2bf9[_0x2bee76(0x1f6)](getLocalPages(_0x1f56cf,_0x4bf4f3));else{if(_0x8dc930[_0x2bee76(0x1fc)](_0x2bee76(0x1e4))){let _0x13a0d3=relative(_0x4bf4f3,_0x1f56cf);_0x13a0d3[_0x2bee76(0x1fc)](_0x2bee76(0x1e2))?_0x13a0d3=_0x13a0d3[_0x2bee76(0x1ed)](/index\.tsx$/,''):_0x13a0d3=_0x13a0d3[_0x2bee76(0x1ed)](/\.tsx$/,'');_0x13a0d3['endsWith'](sep)&&(_0x13a0d3=_0x13a0d3[_0x2bee76(0x1f3)](0x0,-0x1));const _0x383313=_0x13a0d3[_0x2bee76(0x1eb)](sep)[_0x2bee76(0x1f9)]('/'),_0x321313=extractTitleFromComment(_0x1f56cf),_0x128576=_0x321313||_0x383313;_0x1d2bf9[_0x2bee76(0x1ea)]({'path':_0x383313['replaceAll']('$',':'),'label':_0x128576});}}}),_0x1d2bf9[_0x1fbc79(0x1f4)](_0x4aa349=>_0x4aa349['path']!=='');}function a82_0x4457(){const _0x31c692=['2999700szwPNY','.tsx','182218yYnEck','forEach','209rFrmzS','match','5RtNcSg','push','split','4001766zNFUhi','replace','src/pages','189480YMLlIB','5foqhTg','2220084kdmnXc','isDirectory','slice','filter','18JAGGTw','concat','utf-8','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','join','49ZNqhAy','411988IbOrNv','endsWith','853144cSEAla','index.tsx'];a82_0x4457=function(){return _0x31c692;};return a82_0x4457();}
@@ -1 +1 @@
1
- (function(_0x4f5b66,_0x30520e){const _0x3f5243=a76_0x3336,_0x4d976d=_0x4f5b66();while(!![]){try{const _0x357f2e=parseInt(_0x3f5243(0xf2))/0x1*(-parseInt(_0x3f5243(0xf0))/0x2)+parseInt(_0x3f5243(0xe8))/0x3+parseInt(_0x3f5243(0xec))/0x4+parseInt(_0x3f5243(0xef))/0x5+-parseInt(_0x3f5243(0xf5))/0x6*(-parseInt(_0x3f5243(0xfc))/0x7)+-parseInt(_0x3f5243(0xf6))/0x8+-parseInt(_0x3f5243(0xf1))/0x9;if(_0x357f2e===_0x30520e)break;else _0x4d976d['push'](_0x4d976d['shift']());}catch(_0x3f186c){_0x4d976d['push'](_0x4d976d['shift']());}}}(a76_0x318b,0xc37ec));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a76_0x318b(){const _0x4bd361=['map','CSS\x20URL\x20is\x20unreachable','trim','JS\x20URL\x20is\x20unreachable','rejected','1087887DUuzoF','path','length','status','4766208eeehrd','has','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','7961780zxfGHd','6GJWsqu','22100670cLcWjS','12301zoXUaF','label','filter','107526rMGhaf','1836776DuegYo','No\x20local\x20pages\x20matched\x20labels:\x20','push','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','errors','join','147wisKJo'];a76_0x318b=function(){return _0x4bd361;};return a76_0x318b();}import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x23e0de){const _0x41e23c=a76_0x3336,_0x4b7e17=[];return!isValidJsHttpsUrl(_0x23e0de)&&_0x4b7e17['push'](_0x41e23c(0xee)),{'ok':_0x4b7e17[_0x41e23c(0xea)]===0x0,'errors':_0x4b7e17};}export function validateCssUrl(_0x4c333d){const _0x40a74f=a76_0x3336,_0x4e2ef7=[];return!isValidCssHttpsUrl(_0x4c333d)&&_0x4e2ef7[_0x40a74f(0xf8)](_0x40a74f(0xf9)),{'ok':_0x4e2ef7['length']===0x0,'errors':_0x4e2ef7};}export async function validateJsUrlReachable(_0x21a68c){const _0x510423=a76_0x3336,_0x32091e=validateJsUrl(_0x21a68c);if(!_0x32091e['ok'])return _0x32091e;const _0x1cdf44=await isUrlReachable(_0x21a68c);if(!_0x1cdf44)_0x32091e['errors'][_0x510423(0xf8)](_0x510423(0x100));return{'ok':_0x32091e[_0x510423(0xfa)][_0x510423(0xea)]===0x0,'errors':_0x32091e[_0x510423(0xfa)]};}function a76_0x3336(_0x12f9ee,_0x440845){_0x12f9ee=_0x12f9ee-0xe8;const _0x318b47=a76_0x318b();let _0x33361d=_0x318b47[_0x12f9ee];return _0x33361d;}export async function validateCssUrlReachable(_0x3b3471){const _0x2ddb89=a76_0x3336,_0x20a21e=validateCssUrl(_0x3b3471);if(!_0x20a21e['ok'])return _0x20a21e;const _0x5cca3b=await isUrlReachable(_0x3b3471);if(!_0x5cca3b)_0x20a21e[_0x2ddb89(0xfa)]['push'](_0x2ddb89(0xfe));return{'ok':_0x20a21e['errors'][_0x2ddb89(0xea)]===0x0,'errors':_0x20a21e['errors']};}export function buildCompareRows(_0x559630,_0x59de33){const _0x4ac975=a76_0x3336;return _0x559630[_0x4ac975(0xfd)](_0x5c4b1c=>({'label':_0x5c4b1c[_0x4ac975(0xf3)],'path':_0x5c4b1c['path'],'local':!![],'online':_0x59de33[_0x4ac975(0xed)](_0x5c4b1c[_0x4ac975(0xe9)])}));}export function filterNewPages(_0x4cad79,_0x33a2f2,_0xc77477){const _0x225337=a76_0x3336;if(_0xc77477&&_0xc77477[_0x225337(0xea)]>0x0){const _0x5e17cd=new Set(_0xc77477[_0x225337(0xfd)](_0x47a137=>_0x47a137[_0x225337(0xff)]())),_0x16bfe8=_0x4cad79[_0x225337(0xf4)](_0x34f3a5=>_0x5e17cd[_0x225337(0xed)](_0x34f3a5['label']));if(_0x16bfe8['length']===0x0)throw new Error(_0x225337(0xf7)+[..._0x5e17cd][_0x225337(0xfb)](',\x20'));return _0x16bfe8;}return _0x4cad79[_0x225337(0xf4)](_0x23a07a=>!_0x33a2f2[_0x225337(0xed)](_0x23a07a[_0x225337(0xe9)]));}export function filterPagesByLabels(_0x12a50c,_0xeb4f50){const _0x4ed3b8=a76_0x3336,_0x12de93=[],_0x3c0fa9=[];for(const _0x47c855 of _0xeb4f50){const _0x2af307=_0x47c855[_0x4ed3b8(0xff)](),_0x2cc8c0=_0x12a50c['find'](_0x2c69cc=>_0x2c69cc['label']===_0x2af307);if(_0x2cc8c0)_0x12de93[_0x4ed3b8(0xf8)](_0x2cc8c0);else _0x3c0fa9[_0x4ed3b8(0xf8)](_0x47c855);}return{'matched':_0x12de93,'unmatched':_0x3c0fa9};}export async function doCreateMenus(_0x5229db,_0x1bf795,_0x504717,_0x2b7cd6){const _0xe2ea7b=a76_0x3336,_0x22053c=await createMenus(_0x5229db,_0x1bf795,_0x504717,_0x2b7cd6);return{'created':_0x22053c[_0xe2ea7b(0xea)],'failed':0x0,'labels':_0x504717['map'](_0x7b9c7f=>_0x7b9c7f['label']),'menus':_0x22053c};}export function filterMenusWithResources(_0x2a85cb){const _0x276626=a76_0x3336;return _0x2a85cb['filter'](_0x18cda0=>_0x18cda0['resources'][_0x276626(0xea)]>0x0);}export async function doUpdateCdnUrls(_0x105599,_0x2a3e8c,_0x356358,_0x1b5e05){const _0x518367=a76_0x3336,_0x356179=_0x356358[_0x518367(0xf4)](_0x55831b=>_0x55831b['resources'][_0x518367(0xea)]>0x0),_0xa48e15=await Promise['allSettled'](_0x356179[_0x518367(0xfd)](_0x10a1ad=>updateMenuCdnUrl(_0x105599,_0x2a3e8c,{'id':_0x10a1ad['id'],'label':_0x10a1ad[_0x518367(0xf3)],'path':_0x10a1ad['path'],'resources':_0x1b5e05}))),_0x1033a4=_0xa48e15[_0x518367(0xf4)](_0x9ddc28=>_0x9ddc28[_0x518367(0xeb)]==='fulfilled')['map'](_0x1bcfcc=>_0x1bcfcc['value']),_0x24fb59=_0xa48e15[_0x518367(0xf4)](_0x5dd3b2=>_0x5dd3b2['status']===_0x518367(0x101))[_0x518367(0xea)];return{'updated':_0x1033a4['length'],'failed':_0x24fb59,'menus':_0x1033a4};}export async function fetchMenuData(_0x399463,_0x34b85a){const _0x39a3ea=a76_0x3336,_0x13c2e0=getLocalPages(),_0x450030=await getOnlineMenuList(_0x399463,_0x34b85a),_0x177899=new Set(_0x450030[_0x39a3ea(0xfd)](_0x2e40f4=>_0x2e40f4['path']));return{'localPages':_0x13c2e0,'onlineMenuList':_0x450030,'onlinePaths':_0x177899};}export async function fetchOnlineMenuList(_0x89a11b,_0x40f7c6){return getOnlineMenuList(_0x89a11b,_0x40f7c6);}
1
+ (function(_0x3259a8,_0x2efbe6){const _0x2aa03e=a83_0x501f,_0x2773fb=_0x3259a8();while(!![]){try{const _0x1a0d97=parseInt(_0x2aa03e(0x76))/0x1*(parseInt(_0x2aa03e(0x6f))/0x2)+parseInt(_0x2aa03e(0x75))/0x3*(-parseInt(_0x2aa03e(0x80))/0x4)+parseInt(_0x2aa03e(0x7c))/0x5*(-parseInt(_0x2aa03e(0x78))/0x6)+-parseInt(_0x2aa03e(0x85))/0x7+-parseInt(_0x2aa03e(0x70))/0x8+parseInt(_0x2aa03e(0x82))/0x9+-parseInt(_0x2aa03e(0x7a))/0xa*(-parseInt(_0x2aa03e(0x7d))/0xb);if(_0x1a0d97===_0x2efbe6)break;else _0x2773fb['push'](_0x2773fb['shift']());}catch(_0x5b0fa6){_0x2773fb['push'](_0x2773fb['shift']());}}}(a83_0x3340,0xb89e4));function a83_0x501f(_0x12d989,_0x256de4){_0x12d989=_0x12d989-0x6a;const _0x3340b0=a83_0x3340();let _0x501fc3=_0x3340b0[_0x12d989];return _0x501fc3;}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x5dd8e4){const _0x48ca08=a83_0x501f,_0x1d1740=[];return!isValidJsHttpsUrl(_0x5dd8e4)&&_0x1d1740[_0x48ca08(0x86)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x1d1740[_0x48ca08(0x81)]===0x0,'errors':_0x1d1740};}function a83_0x3340(){const _0x4ef4bf=['66QzKSQs','11840832madoBW','value','No\x20local\x20pages\x20matched\x20labels:\x20','filter','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','2433BbPuYr','10882LbCiWF','has','84lZIEjh','trim','320pfSGlW','CSS\x20URL\x20is\x20unreachable','403230dkNVZQ','1151392ThrRiy','label','errors','4348vxJSNx','length','11911536XGNNcl','path','status','5496491XQhVTl','push','resources','allSettled','JS\x20URL\x20is\x20unreachable','map','find'];a83_0x3340=function(){return _0x4ef4bf;};return a83_0x3340();}export function validateCssUrl(_0x2bcea5){const _0x5a9184=a83_0x501f,_0x2ac63b=[];return!isValidCssHttpsUrl(_0x2bcea5)&&_0x2ac63b[_0x5a9184(0x86)](_0x5a9184(0x74)),{'ok':_0x2ac63b[_0x5a9184(0x81)]===0x0,'errors':_0x2ac63b};}export async function validateJsUrlReachable(_0x4f3237){const _0x1e37a2=a83_0x501f,_0x16a13d=validateJsUrl(_0x4f3237);if(!_0x16a13d['ok'])return _0x16a13d;const _0x4386a9=await isUrlReachable(_0x4f3237);if(!_0x4386a9)_0x16a13d[_0x1e37a2(0x7f)][_0x1e37a2(0x86)](_0x1e37a2(0x6c));return{'ok':_0x16a13d[_0x1e37a2(0x7f)]['length']===0x0,'errors':_0x16a13d[_0x1e37a2(0x7f)]};}export async function validateCssUrlReachable(_0x3d2628){const _0x23fbfc=a83_0x501f,_0x4cc53d=validateCssUrl(_0x3d2628);if(!_0x4cc53d['ok'])return _0x4cc53d;const _0x4f5b94=await isUrlReachable(_0x3d2628);if(!_0x4f5b94)_0x4cc53d[_0x23fbfc(0x7f)][_0x23fbfc(0x86)](_0x23fbfc(0x7b));return{'ok':_0x4cc53d['errors'][_0x23fbfc(0x81)]===0x0,'errors':_0x4cc53d['errors']};}export function buildCompareRows(_0xe92afe,_0x197667){const _0x400f4c=a83_0x501f;return _0xe92afe['map'](_0x1bfd19=>({'label':_0x1bfd19[_0x400f4c(0x7e)],'path':_0x1bfd19[_0x400f4c(0x83)],'local':!![],'online':_0x197667[_0x400f4c(0x77)](_0x1bfd19[_0x400f4c(0x83)])}));}export function filterNewPages(_0x550573,_0x4dc46c,_0x4e770a){const _0x14a215=a83_0x501f;if(_0x4e770a&&_0x4e770a[_0x14a215(0x81)]>0x0){const _0x4f5034=new Set(_0x4e770a[_0x14a215(0x6d)](_0x56130b=>_0x56130b[_0x14a215(0x79)]())),_0x12624d=_0x550573['filter'](_0x208dbe=>_0x4f5034[_0x14a215(0x77)](_0x208dbe[_0x14a215(0x7e)]));if(_0x12624d[_0x14a215(0x81)]===0x0)throw new Error(_0x14a215(0x72)+[..._0x4f5034]['join'](',\x20'));return _0x12624d;}return _0x550573[_0x14a215(0x73)](_0x47cf59=>!_0x4dc46c[_0x14a215(0x77)](_0x47cf59[_0x14a215(0x83)]));}export function filterPagesByLabels(_0x2c5ef0,_0xfade77){const _0x5af43e=a83_0x501f,_0x1fb367=[],_0x1d0604=[];for(const _0x33e839 of _0xfade77){const _0x3f9bd4=_0x33e839[_0x5af43e(0x79)](),_0x404ae8=_0x2c5ef0[_0x5af43e(0x6e)](_0x191419=>_0x191419[_0x5af43e(0x7e)]===_0x3f9bd4);if(_0x404ae8)_0x1fb367[_0x5af43e(0x86)](_0x404ae8);else _0x1d0604['push'](_0x33e839);}return{'matched':_0x1fb367,'unmatched':_0x1d0604};}export async function doCreateMenus(_0x47a77b,_0x433a6f,_0x4c7592,_0x2c8ad4){const _0x2bb3fa=a83_0x501f,_0x3ddd49=await createMenus(_0x47a77b,_0x433a6f,_0x4c7592,_0x2c8ad4);return{'created':_0x3ddd49[_0x2bb3fa(0x81)],'failed':0x0,'labels':_0x4c7592[_0x2bb3fa(0x6d)](_0x39d866=>_0x39d866[_0x2bb3fa(0x7e)]),'menus':_0x3ddd49};}export function filterMenusWithResources(_0x25293a){const _0x512d44=a83_0x501f;return _0x25293a[_0x512d44(0x73)](_0x3a0140=>_0x3a0140['resources'][_0x512d44(0x81)]>0x0);}export async function doUpdateCdnUrls(_0x53763a,_0x435144,_0x3d6296,_0x18435a){const _0x1b9f30=a83_0x501f,_0x55a575=_0x3d6296[_0x1b9f30(0x73)](_0x843312=>_0x843312[_0x1b9f30(0x6a)][_0x1b9f30(0x81)]>0x0),_0x5bb723=await Promise[_0x1b9f30(0x6b)](_0x55a575[_0x1b9f30(0x6d)](_0x438a5a=>updateMenuCdnUrl(_0x53763a,_0x435144,{'id':_0x438a5a['id'],'label':_0x438a5a['label'],'path':_0x438a5a[_0x1b9f30(0x83)],'resources':_0x18435a}))),_0x3aad2c=_0x5bb723[_0x1b9f30(0x73)](_0x178e81=>_0x178e81['status']==='fulfilled')[_0x1b9f30(0x6d)](_0x24c46f=>_0x24c46f[_0x1b9f30(0x71)]),_0x302234=_0x5bb723['filter'](_0x1edde3=>_0x1edde3[_0x1b9f30(0x84)]==='rejected')[_0x1b9f30(0x81)];return{'updated':_0x3aad2c['length'],'failed':_0x302234,'menus':_0x3aad2c};}export async function fetchMenuData(_0x1526f4,_0x552e4e){const _0x1cdc3b=a83_0x501f,_0x391406=getLocalPages(),_0x5e8e5d=await getOnlineMenuList(_0x1526f4,_0x552e4e),_0x339c21=new Set(_0x5e8e5d[_0x1cdc3b(0x6d)](_0x29a6c8=>_0x29a6c8[_0x1cdc3b(0x83)]));return{'localPages':_0x391406,'onlineMenuList':_0x5e8e5d,'onlinePaths':_0x339c21};}export async function fetchOnlineMenuList(_0x3f4043,_0x2de8f4){return getOnlineMenuList(_0x3f4043,_0x2de8f4);}
@@ -1 +1 @@
1
- (function(_0x54a4a4,_0x5eb755){const _0x2969a4=a77_0xecfc,_0x1fbe2e=_0x54a4a4();while(!![]){try{const _0x25e85d=-parseInt(_0x2969a4(0xee))/0x1+-parseInt(_0x2969a4(0xe9))/0x2+parseInt(_0x2969a4(0xda))/0x3+-parseInt(_0x2969a4(0xe2))/0x4+-parseInt(_0x2969a4(0xe1))/0x5+-parseInt(_0x2969a4(0xe8))/0x6+parseInt(_0x2969a4(0xf8))/0x7;if(_0x25e85d===_0x5eb755)break;else _0x1fbe2e['push'](_0x1fbe2e['shift']());}catch(_0x3089f0){_0x1fbe2e['push'](_0x1fbe2e['shift']());}}}(a77_0x1950,0x5381e));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';function a77_0x1950(){const _0x167411=['path','create-menu','resources','Fetch\x20menu\x20list','1362330ynzPWF','info','Menu\x20created\x20successfully:\x20','map','isArray','POST','get-online-menu-list','362775AoxTSi','213296mTPyDg','extend','Create\x20menu\x20\x22','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','procode','Batch\x20menu\x20creation\x20completed,\x20total\x20','2178822ucekjX','1021694nPeVtH','all','\x20online\x20menus\x20successfully','update-menu-cdn-url','label','587098cmzmzx','Creating\x20menu:\x20','Updating\x20menu\x20asset\x20links:\x20','/smartapi/menu/find?appCode=','import','length','Start\x20batch\x20menu\x20creation,\x20total\x20','/smartapi/menu/create','push','children','10324279noZnHp','Menu\x20assets\x20synced:\x20','create-menus','stringify','flat','Fetched\x20','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'];a77_0x1950=function(){return _0x167411;};return a77_0x1950();}function a77_0xecfc(_0x113fe2,_0x17b13c){_0x113fe2=_0x113fe2-0xd6;const _0x195096=a77_0x1950();let _0xecfcf2=_0x195096[_0x113fe2];return _0xecfcf2;}import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x4b52e,_0x5f78b){const _0x359b37=a77_0xecfc,_0x3eb9da=getEnv();logger[_0x359b37(0xdb)]('get-online-menu-list',isProduction(_0x3eb9da)?_0x359b37(0xfe)+_0x4b52e+')':_0x359b37(0xe5)+_0x4b52e+')');const _0x279d79=await platformFetch(getApiDomain()+_0x359b37(0xf1)+_0x4b52e,{'cookie':_0x5f78b,'label':_0x359b37(0xd9)});if(!_0x279d79)return logger[_0x359b37(0xdb)](_0x359b37(0xe0),'Server\x20returned\x20empty\x20menu\x20list'),[];return logger[_0x359b37(0xdb)](_0x359b37(0xe0),_0x359b37(0xfd)+_0x279d79[_0x359b37(0xf3)]+_0x359b37(0xeb)),_0x279d79[_0x359b37(0xdd)](flattenMenuItem)[_0x359b37(0xfc)]();}function flattenMenuItem(_0x44b00a){const _0x17ba9b=a77_0xecfc;let _0x4a0116=[];try{if(_0x44b00a[_0x17ba9b(0xe3)]?.[_0x17ba9b(0xd8)]){const _0x587f9d=JSON['parse'](_0x44b00a[_0x17ba9b(0xe3)]['resources']);if(Array[_0x17ba9b(0xde)](_0x587f9d))_0x4a0116=_0x587f9d;}}catch{}const _0x42e822=[{'id':_0x44b00a['id'],'path':_0x44b00a[_0x17ba9b(0xd6)],'label':_0x44b00a[_0x17ba9b(0xed)],'resources':_0x4a0116}];if(_0x44b00a[_0x17ba9b(0xf7)]&&_0x44b00a[_0x17ba9b(0xf7)][_0x17ba9b(0xf3)]>0x0)for(const _0x269144 of _0x44b00a[_0x17ba9b(0xf7)]){_0x42e822[_0x17ba9b(0xf6)](...flattenMenuItem(_0x269144));}return _0x42e822;}export async function createMenu(_0x27f889,_0x5ec21b,_0x37f9ed){const _0x3bfec0=a77_0xecfc;logger[_0x3bfec0(0xdb)]('create-menu',_0x3bfec0(0xef)+_0x37f9ed[_0x3bfec0(0xed)]+'\x20('+_0x37f9ed[_0x3bfec0(0xd6)]+')');const _0x221a20={'appCode':_0x27f889,'type':_0x3bfec0(0xe6),'sort':0x0,'extend':{'loadScriptMode':_0x3bfec0(0xf2),'resources':_0x37f9ed[_0x3bfec0(0xd8)]?JSON[_0x3bfec0(0xfb)](_0x37f9ed[_0x3bfec0(0xd8)]):undefined},..._0x37f9ed},_0x24265f=await platformFetch(getApiDomain()+_0x3bfec0(0xf5),{'method':_0x3bfec0(0xdf),'body':_0x221a20,'cookie':_0x5ec21b,'label':_0x3bfec0(0xe4)+_0x37f9ed[_0x3bfec0(0xed)]+'\x22'});return logger[_0x3bfec0(0xdb)](_0x3bfec0(0xd7),'Menu\x20created\x20successfully:\x20'+_0x37f9ed[_0x3bfec0(0xed)]),_0x24265f;}async function createSingleMenu(_0x5d81a0,_0x471a7c,_0x3f9e51,_0x447d52){const _0x2c7619=a77_0xecfc,_0xdc504={'appCode':_0x5d81a0,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x2c7619(0xf2),'resources':_0x447d52?JSON['stringify'](_0x447d52):undefined},'label':_0x3f9e51[_0x2c7619(0xed)],'path':_0x3f9e51[_0x2c7619(0xd6)]},_0x4f0baa=await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x2c7619(0xdf),'body':_0xdc504,'cookie':_0x471a7c,'label':'Create\x20menu\x20\x22'+_0x3f9e51['label']+'\x22'});return logger[_0x2c7619(0xdb)](_0x2c7619(0xd7),_0x2c7619(0xdc)+_0x3f9e51['label']),_0x4f0baa;}export async function createMenus(_0x1fa5ae,_0x15ae1d,_0x5ecc6b,_0x3a0092){const _0xc47b2b=a77_0xecfc;logger[_0xc47b2b(0xdb)]('create-menus',_0xc47b2b(0xf4)+_0x5ecc6b[_0xc47b2b(0xf3)]);const _0x4ebe1a=await Promise[_0xc47b2b(0xea)](_0x5ecc6b['map'](_0x314739=>createSingleMenu(_0x1fa5ae,_0x15ae1d,_0x314739,_0x3a0092)));return logger['info'](_0xc47b2b(0xfa),_0xc47b2b(0xe7)+_0x5ecc6b['length']),_0x4ebe1a;}export async function updateMenuCdnUrl(_0x536ab7,_0x5cdb60,_0x142f69){const _0x505d31=a77_0xecfc;logger['info'](_0x505d31(0xec),_0x505d31(0xf0)+_0x142f69[_0x505d31(0xed)]+'\x20('+_0x142f69[_0x505d31(0xd6)]+')');const _0x5d70a5={'id':_0x142f69['id'],'appCode':_0x536ab7,'extend':{'loadScriptMode':_0x505d31(0xf2),'resources':_0x142f69[_0x505d31(0xd8)]?JSON[_0x505d31(0xfb)](_0x142f69[_0x505d31(0xd8)]):undefined}},_0x36f8f9=await platformFetch(getApiDomain()+'/smartapi/menu/update',{'method':_0x505d31(0xdf),'body':_0x5d70a5,'cookie':_0x5cdb60,'label':'Update\x20menu\x20assets\x20\x22'+_0x142f69[_0x505d31(0xed)]+'\x22'});return logger[_0x505d31(0xdb)](_0x505d31(0xec),_0x505d31(0xf9)+_0x142f69[_0x505d31(0xed)],undefined),_0x36f8f9;}
1
+ (function(_0x7c8e43,_0x2d8bda){const _0x11b9dd=a84_0x2706,_0xe0e7d8=_0x7c8e43();while(!![]){try{const _0x1978ca=parseInt(_0x11b9dd(0x192))/0x1*(parseInt(_0x11b9dd(0x19e))/0x2)+-parseInt(_0x11b9dd(0x17b))/0x3*(-parseInt(_0x11b9dd(0x19f))/0x4)+parseInt(_0x11b9dd(0x187))/0x5*(-parseInt(_0x11b9dd(0x18a))/0x6)+-parseInt(_0x11b9dd(0x186))/0x7+-parseInt(_0x11b9dd(0x19d))/0x8*(-parseInt(_0x11b9dd(0x1a2))/0x9)+-parseInt(_0x11b9dd(0x19a))/0xa*(parseInt(_0x11b9dd(0x196))/0xb)+parseInt(_0x11b9dd(0x185))/0xc;if(_0x1978ca===_0x2d8bda)break;else _0xe0e7d8['push'](_0xe0e7d8['shift']());}catch(_0x40f621){_0xe0e7d8['push'](_0xe0e7d8['shift']());}}}(a84_0xd7e5,0xc5178));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x4482c1,_0x5c60a3){const _0x428de9=a84_0x2706,_0x10a4ca=getEnv();logger[_0x428de9(0x1a5)](_0x428de9(0x193),isProduction(_0x10a4ca)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x4482c1+')':_0x428de9(0x1a1)+_0x4482c1+')');const _0x1fdc4e=await platformFetch(getApiDomain()+_0x428de9(0x17c)+_0x4482c1,{'cookie':_0x5c60a3,'label':_0x428de9(0x180)});if(!_0x1fdc4e)return logger['info'](_0x428de9(0x193),'Server\x20returned\x20empty\x20menu\x20list'),[];return logger[_0x428de9(0x1a5)](_0x428de9(0x193),_0x428de9(0x18b)+_0x1fdc4e[_0x428de9(0x190)]+'\x20online\x20menus\x20successfully'),_0x1fdc4e[_0x428de9(0x17d)](flattenMenuItem)[_0x428de9(0x17e)]();}function flattenMenuItem(_0x4e178d){const _0x965583=a84_0x2706;let _0x54a11a=[];try{if(_0x4e178d['extend']?.[_0x965583(0x198)]){const _0x3eb820=JSON[_0x965583(0x18f)](_0x4e178d['extend'][_0x965583(0x198)]);if(Array[_0x965583(0x18d)](_0x3eb820))_0x54a11a=_0x3eb820;}}catch{}const _0x3d09e3=[{'id':_0x4e178d['id'],'path':_0x4e178d[_0x965583(0x195)],'label':_0x4e178d[_0x965583(0x191)],'resources':_0x54a11a}];if(_0x4e178d[_0x965583(0x1a6)]&&_0x4e178d[_0x965583(0x1a6)][_0x965583(0x190)]>0x0)for(const _0xdb13d0 of _0x4e178d[_0x965583(0x1a6)]){_0x3d09e3['push'](...flattenMenuItem(_0xdb13d0));}return _0x3d09e3;}function a84_0xd7e5(){const _0x21e164=['Fetch\x20menu\x20list','Start\x20batch\x20menu\x20creation,\x20total\x20','update-menu-cdn-url','Update\x20menu\x20assets\x20\x22','create-menus','19540284yBgiZJ','1801324SKOkXS','407690sUHUAH','Create\x20menu\x20\x22','Menu\x20created\x20successfully:\x20','96hJbRWd','Fetched\x20','stringify','isArray','Updating\x20menu\x20asset\x20links:\x20','parse','length','label','2420RBgSga','get-online-menu-list','/smartapi/menu/update','path','5426443ANllwT','/smartapi/menu/create','resources','Batch\x20menu\x20creation\x20completed,\x20total\x20','10chmOWz','procode','Creating\x20menu:\x20','509848RYNEgL','872WByIik','388ZABiOZ','POST','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','9JAiZTY','all','Menu\x20assets\x20synced:\x20','info','children','import','3567egSYvw','/smartapi/menu/find?appCode=','map','flat','create-menu'];a84_0xd7e5=function(){return _0x21e164;};return a84_0xd7e5();}export async function createMenu(_0x59c998,_0x37536a,_0x147391){const _0x2dea93=a84_0x2706;logger[_0x2dea93(0x1a5)]('create-menu',_0x2dea93(0x19c)+_0x147391['label']+'\x20('+_0x147391[_0x2dea93(0x195)]+')');const _0x350071={'appCode':_0x59c998,'type':_0x2dea93(0x19b),'sort':0x0,'extend':{'loadScriptMode':_0x2dea93(0x17a),'resources':_0x147391['resources']?JSON['stringify'](_0x147391['resources']):undefined},..._0x147391},_0x58a823=await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x2dea93(0x1a0),'body':_0x350071,'cookie':_0x37536a,'label':_0x2dea93(0x188)+_0x147391[_0x2dea93(0x191)]+'\x22'});return logger[_0x2dea93(0x1a5)](_0x2dea93(0x17f),'Menu\x20created\x20successfully:\x20'+_0x147391['label']),_0x58a823;}async function createSingleMenu(_0x31a28a,_0x2a5247,_0x261c9c,_0x5ba7b5){const _0x2bda84=a84_0x2706,_0x382872={'appCode':_0x31a28a,'type':_0x2bda84(0x19b),'sort':0x0,'extend':{'loadScriptMode':_0x2bda84(0x17a),'resources':_0x5ba7b5?JSON[_0x2bda84(0x18c)](_0x5ba7b5):undefined},'label':_0x261c9c[_0x2bda84(0x191)],'path':_0x261c9c[_0x2bda84(0x195)]},_0x1efc43=await platformFetch(getApiDomain()+_0x2bda84(0x197),{'method':'POST','body':_0x382872,'cookie':_0x2a5247,'label':_0x2bda84(0x188)+_0x261c9c[_0x2bda84(0x191)]+'\x22'});return logger['info'](_0x2bda84(0x17f),_0x2bda84(0x189)+_0x261c9c['label']),_0x1efc43;}export async function createMenus(_0x297005,_0x57da90,_0x240fab,_0x247668){const _0x2b2160=a84_0x2706;logger[_0x2b2160(0x1a5)]('create-menus',_0x2b2160(0x181)+_0x240fab[_0x2b2160(0x190)]);const _0x431fd4=await Promise[_0x2b2160(0x1a3)](_0x240fab['map'](_0x9d62fc=>createSingleMenu(_0x297005,_0x57da90,_0x9d62fc,_0x247668)));return logger['info'](_0x2b2160(0x184),_0x2b2160(0x199)+_0x240fab['length']),_0x431fd4;}function a84_0x2706(_0x1a9d8a,_0x5c1757){_0x1a9d8a=_0x1a9d8a-0x17a;const _0xd7e51e=a84_0xd7e5();let _0x27067c=_0xd7e51e[_0x1a9d8a];return _0x27067c;}export async function updateMenuCdnUrl(_0x5da524,_0x4dffd9,_0x51fbff){const _0x15ab4c=a84_0x2706;logger[_0x15ab4c(0x1a5)](_0x15ab4c(0x182),_0x15ab4c(0x18e)+_0x51fbff[_0x15ab4c(0x191)]+'\x20('+_0x51fbff[_0x15ab4c(0x195)]+')');const _0x55cb14={'id':_0x51fbff['id'],'appCode':_0x5da524,'extend':{'loadScriptMode':_0x15ab4c(0x17a),'resources':_0x51fbff['resources']?JSON[_0x15ab4c(0x18c)](_0x51fbff['resources']):undefined}},_0x2e0289=await platformFetch(getApiDomain()+_0x15ab4c(0x194),{'method':_0x15ab4c(0x1a0),'body':_0x55cb14,'cookie':_0x4dffd9,'label':_0x15ab4c(0x183)+_0x51fbff[_0x15ab4c(0x191)]+'\x22'});return logger[_0x15ab4c(0x1a5)](_0x15ab4c(0x182),_0x15ab4c(0x1a4)+_0x51fbff[_0x15ab4c(0x191)],undefined),_0x2e0289;}
@@ -1 +1 @@
1
- function a78_0xb0a4(_0x31515e,_0x5d285b){_0x31515e=_0x31515e-0x16c;const _0x4128ce=a78_0x4128();let _0xb0a40=_0x4128ce[_0x31515e];return _0xb0a40;}(function(_0xaa0dbf,_0x55cbd3){const _0x1c4f42=a78_0xb0a4,_0x26f298=_0xaa0dbf();while(!![]){try{const _0x4c10ed=parseInt(_0x1c4f42(0x199))/0x1*(parseInt(_0x1c4f42(0x188))/0x2)+-parseInt(_0x1c4f42(0x195))/0x3*(parseInt(_0x1c4f42(0x19a))/0x4)+parseInt(_0x1c4f42(0x18d))/0x5+parseInt(_0x1c4f42(0x17d))/0x6+parseInt(_0x1c4f42(0x17a))/0x7+-parseInt(_0x1c4f42(0x182))/0x8+parseInt(_0x1c4f42(0x17b))/0x9;if(_0x4c10ed===_0x55cbd3)break;else _0x26f298['push'](_0x26f298['shift']());}catch(_0x20325e){_0x26f298['push'](_0x26f298['shift']());}}}(a78_0x4128,0x647d1));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x24aa48){const _0x162ae7=a78_0xb0a4,_0x5df781=[];return _0x24aa48[_0x162ae7(0x18a)]&&!isValidJsHttpsUrl(_0x24aa48['jsUrl'])&&_0x5df781[_0x162ae7(0x175)]({'field':_0x162ae7(0x18a),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x24aa48[_0x162ae7(0x17e)]&&!isValidCssHttpsUrl(_0x24aa48[_0x162ae7(0x17e)])&&_0x5df781[_0x162ae7(0x175)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x5df781;}function a78_0x4128(){const _0x163e6b=['string','utf8','112452oaqmgn','isTTY','readableEnded','menu-sync','16ucYHtv','60ZKATzD','trim','message','path','has','pages','--params.','JS\x20URL\x20is\x20unreachable:\x20','split','concat','push','selectedLabels','isArray','data','CSS\x20URL\x20is\x20unreachable:\x20','3104388aKHPHC','809613KDDyLV','map','1863510VmJpnA','cssUrl','label','toString','Menu\x20sync\x20completed','5568840MriXVa','field','length','object','info','stdin','93202ROgeTy','filter','jsUrl','Start\x20non-interactive\x20menu\x20sync','\x0a\x20\x20Available\x20local\x20pages:\x20','401620noFjHO','startsWith','Invalid\x20--params:\x20','cwd','No\x20local\x20pages\x20matched\x20labels:\x20','join'];a78_0x4128=function(){return _0x163e6b;};return a78_0x4128();}export async function runMenuSyncCore(_0x44cf38,_0x3cc013,_0x406f09=[],_0x4e96f2){const _0x183398=a78_0xb0a4,_0x1e87d0=parseParamsFlag(_0x4e96f2),_0x4b6c53=_0x406f09[_0x183398(0x184)]>0x0?_0x406f09:_0x1e87d0[_0x183398(0x176)],_0x230cc9=_0x1e87d0[_0x183398(0x18a)],_0x1a02fc=_0x1e87d0['cssUrl'],_0x21c49c=[];if(_0x230cc9)_0x21c49c['push'](_0x230cc9);if(_0x1a02fc)_0x21c49c[_0x183398(0x175)](_0x1a02fc);const _0x52e89a=validateParams(_0x1e87d0);if(_0x52e89a[_0x183398(0x184)]>0x0){const _0x3ed5d8=_0x52e89a[_0x183398(0x17c)](_0x33b642=>_0x183398(0x171)+_0x33b642[_0x183398(0x183)]+':\x20'+_0x33b642[_0x183398(0x16d)])['join'](';\x20');throw new Error(_0x183398(0x18f)+_0x3ed5d8);}logger['setLogPath'](process[_0x183398(0x190)]()),logger[_0x183398(0x186)](_0x183398(0x198),_0x183398(0x18b),{'appCode':_0x44cf38,'selectedCount':_0x4b6c53?.[_0x183398(0x184)],'jsUrl':_0x230cc9,'cssUrl':_0x1a02fc});if(_0x230cc9){const _0x150905=await isUrlReachable(_0x230cc9);if(!_0x150905)throw new Error(_0x183398(0x172)+_0x230cc9);}if(_0x1a02fc){const _0x591ef6=await isUrlReachable(_0x1a02fc);if(!_0x591ef6)throw new Error(_0x183398(0x179)+_0x1a02fc);}const _0x2231cd=getLocalPages();if(_0x2231cd['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x5800ae=await getOnlineMenuList(_0x44cf38,_0x3cc013),_0x417953=new Set(_0x5800ae[_0x183398(0x17c)](_0x207010=>_0x207010[_0x183398(0x16e)]));let _0x482217;if(_0x4b6c53&&_0x4b6c53[_0x183398(0x184)]>0x0){const _0x432ad1=new Set(_0x4b6c53[_0x183398(0x17c)](_0x4a68a9=>_0x4a68a9[_0x183398(0x16c)]()));_0x482217=_0x2231cd['filter'](_0x2b83cf=>_0x432ad1[_0x183398(0x16f)](_0x2b83cf[_0x183398(0x17f)]));if(_0x482217['length']===0x0){const _0x559a05=_0x2231cd[_0x183398(0x17c)](_0x26b475=>_0x26b475[_0x183398(0x17f)])['join'](',\x20');throw new Error(_0x183398(0x191)+[..._0x432ad1][_0x183398(0x192)](',\x20')+_0x183398(0x18c)+_0x559a05);}}else _0x482217=_0x2231cd[_0x183398(0x189)](_0x3cea55=>!_0x417953[_0x183398(0x16f)](_0x3cea55[_0x183398(0x16e)]));if(_0x482217[_0x183398(0x184)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x11aeba=await createMenus(_0x44cf38,_0x3cc013,_0x482217,_0x21c49c[_0x183398(0x184)]>0x0?_0x21c49c:undefined);return logger[_0x183398(0x186)](_0x183398(0x198),_0x183398(0x181),{'count':_0x482217[_0x183398(0x184)],'resources':_0x21c49c}),{'created':_0x11aeba[_0x183398(0x184)],'skipped':![],'targetPages':_0x482217,'menus':_0x11aeba};}export async function readPageLabelsFromStdin(){const _0x2bf173=a78_0xb0a4;if(!process['stdin'][_0x2bf173(0x196)]&&!process['stdin'][_0x2bf173(0x197)])return new Promise(_0x14d756=>{const _0x30b9b9=_0x2bf173,_0x46299c=[];process[_0x30b9b9(0x187)]['on'](_0x30b9b9(0x178),_0x2596a9=>_0x46299c[_0x30b9b9(0x175)](_0x2596a9)),process['stdin']['on']('end',()=>{const _0x5c8280=_0x30b9b9,_0x55fb6b=Buffer[_0x5c8280(0x174)](_0x46299c)[_0x5c8280(0x180)](_0x5c8280(0x194)),_0x50fc2e=_0x55fb6b[_0x5c8280(0x173)]('\x0a')[_0x5c8280(0x17c)](_0x3edac5=>_0x3edac5[_0x5c8280(0x16c)]())[_0x5c8280(0x189)](_0x4bf71a=>_0x4bf71a[_0x5c8280(0x184)]>0x0&&!_0x4bf71a[_0x5c8280(0x18e)]('#'));_0x14d756(_0x50fc2e);}),setTimeout(()=>_0x14d756([]),0x1f4);});return[];}function parseParamsFlag(_0x568689){const _0x238d5f=a78_0xb0a4;if(!_0x568689||typeof _0x568689!==_0x238d5f(0x193))return{};try{const _0x2c0605=JSON['parse'](_0x568689);if(typeof _0x2c0605!==_0x238d5f(0x185)||_0x2c0605===null||Array['isArray'](_0x2c0605))return{};return{'selectedLabels':Array[_0x238d5f(0x177)](_0x2c0605[_0x238d5f(0x170)])?_0x2c0605[_0x238d5f(0x170)][_0x238d5f(0x17c)](String):undefined,'jsUrl':typeof _0x2c0605['jsUrl']===_0x238d5f(0x193)?_0x2c0605[_0x238d5f(0x18a)][_0x238d5f(0x16c)]():undefined,'cssUrl':typeof _0x2c0605[_0x238d5f(0x17e)]===_0x238d5f(0x193)?_0x2c0605[_0x238d5f(0x17e)][_0x238d5f(0x16c)]():undefined};}catch{return{};}}
1
+ (function(_0x28893f,_0x155a59){const _0x59e602=a85_0x531d,_0x512a3e=_0x28893f();while(!![]){try{const _0x2e63e2=parseInt(_0x59e602(0x1a5))/0x1+parseInt(_0x59e602(0x1ce))/0x2*(parseInt(_0x59e602(0x1b3))/0x3)+parseInt(_0x59e602(0x1a2))/0x4+-parseInt(_0x59e602(0x1c2))/0x5*(-parseInt(_0x59e602(0x1af))/0x6)+-parseInt(_0x59e602(0x1c3))/0x7+-parseInt(_0x59e602(0x1c5))/0x8+parseInt(_0x59e602(0x1a9))/0x9;if(_0x2e63e2===_0x155a59)break;else _0x512a3e['push'](_0x512a3e['shift']());}catch(_0x38cdd6){_0x512a3e['push'](_0x512a3e['shift']());}}}(a85_0x205f,0x6db0a));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x5d1583){const _0x3ba378=a85_0x531d,_0x106678=[];return _0x5d1583[_0x3ba378(0x1b1)]&&!isValidJsHttpsUrl(_0x5d1583[_0x3ba378(0x1b1)])&&_0x106678[_0x3ba378(0x1b5)]({'field':'jsUrl','message':_0x3ba378(0x1bf)}),_0x5d1583[_0x3ba378(0x1b8)]&&!isValidCssHttpsUrl(_0x5d1583[_0x3ba378(0x1b8)])&&_0x106678['push']({'field':_0x3ba378(0x1b8),'message':_0x3ba378(0x1a6)}),_0x106678;}export async function runMenuSyncCore(_0x1c63e8,_0x1ac520,_0x42bf44=[],_0x49fc4b){const _0x1ffa91=a85_0x531d,_0x3a6e94=parseParamsFlag(_0x49fc4b),_0x5a88b6=_0x42bf44['length']>0x0?_0x42bf44:_0x3a6e94[_0x1ffa91(0x1a3)],_0x3e2cfd=_0x3a6e94[_0x1ffa91(0x1b1)],_0x3aeec4=_0x3a6e94[_0x1ffa91(0x1b8)],_0x26c9af=[];if(_0x3e2cfd)_0x26c9af[_0x1ffa91(0x1b5)](_0x3e2cfd);if(_0x3aeec4)_0x26c9af[_0x1ffa91(0x1b5)](_0x3aeec4);const _0x7a967b=validateParams(_0x3a6e94);if(_0x7a967b[_0x1ffa91(0x1cb)]>0x0){const _0x89174c=_0x7a967b['map'](_0x560320=>_0x1ffa91(0x1aa)+_0x560320[_0x1ffa91(0x1a8)]+':\x20'+_0x560320[_0x1ffa91(0x1ab)])[_0x1ffa91(0x1b0)](';\x20');throw new Error(_0x1ffa91(0x1b9)+_0x89174c);}logger['setLogPath'](process[_0x1ffa91(0x1b4)]()),logger[_0x1ffa91(0x1bd)]('menu-sync',_0x1ffa91(0x1bc),{'appCode':_0x1c63e8,'selectedCount':_0x5a88b6?.[_0x1ffa91(0x1cb)],'jsUrl':_0x3e2cfd,'cssUrl':_0x3aeec4});if(_0x3e2cfd){const _0x4c8276=await isUrlReachable(_0x3e2cfd);if(!_0x4c8276)throw new Error(_0x1ffa91(0x1a7)+_0x3e2cfd);}if(_0x3aeec4){const _0x241739=await isUrlReachable(_0x3aeec4);if(!_0x241739)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x3aeec4);}const _0x29b53c=getLocalPages();if(_0x29b53c['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x9b3232=await getOnlineMenuList(_0x1c63e8,_0x1ac520),_0x252f3d=new Set(_0x9b3232[_0x1ffa91(0x1c4)](_0x423b02=>_0x423b02[_0x1ffa91(0x1a1)]));let _0x20fdf6;if(_0x5a88b6&&_0x5a88b6['length']>0x0){const _0x2af1de=new Set(_0x5a88b6['map'](_0x4a5442=>_0x4a5442['trim']()));_0x20fdf6=_0x29b53c[_0x1ffa91(0x1cc)](_0xdc941e=>_0x2af1de[_0x1ffa91(0x1ba)](_0xdc941e[_0x1ffa91(0x1ad)]));if(_0x20fdf6[_0x1ffa91(0x1cb)]===0x0){const _0x1c10cb=_0x29b53c[_0x1ffa91(0x1c4)](_0x3b7073=>_0x3b7073['label'])['join'](',\x20');throw new Error(_0x1ffa91(0x1c0)+[..._0x2af1de][_0x1ffa91(0x1b0)](',\x20')+_0x1ffa91(0x1cd)+_0x1c10cb);}}else _0x20fdf6=_0x29b53c[_0x1ffa91(0x1cc)](_0x1935f5=>!_0x252f3d[_0x1ffa91(0x1ba)](_0x1935f5[_0x1ffa91(0x1a1)]));if(_0x20fdf6[_0x1ffa91(0x1cb)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x43872c=await createMenus(_0x1c63e8,_0x1ac520,_0x20fdf6,_0x26c9af[_0x1ffa91(0x1cb)]>0x0?_0x26c9af:undefined);return logger[_0x1ffa91(0x1bd)](_0x1ffa91(0x1c8),_0x1ffa91(0x1bb),{'count':_0x20fdf6['length'],'resources':_0x26c9af}),{'created':_0x43872c[_0x1ffa91(0x1cb)],'skipped':![],'targetPages':_0x20fdf6,'menus':_0x43872c};}function a85_0x531d(_0x1857fa,_0x545978){_0x1857fa=_0x1857fa-0x1a1;const _0x205f4b=a85_0x205f();let _0x531d4d=_0x205f4b[_0x1857fa];return _0x531d4d;}export async function readPageLabelsFromStdin(){const _0x181642=a85_0x531d;if(!process[_0x181642(0x1c6)]['isTTY']&&!process[_0x181642(0x1c6)][_0x181642(0x1ae)])return new Promise(_0xbd504=>{const _0x24b484=_0x181642,_0x2d59d9=[];process[_0x24b484(0x1c6)]['on']('data',_0x17ecbb=>_0x2d59d9[_0x24b484(0x1b5)](_0x17ecbb)),process['stdin']['on'](_0x24b484(0x1be),()=>{const _0x8119eb=_0x24b484,_0x214f32=Buffer['concat'](_0x2d59d9)[_0x8119eb(0x1b2)](_0x8119eb(0x1ca)),_0x5f02c6=_0x214f32[_0x8119eb(0x1c9)]('\x0a')[_0x8119eb(0x1c4)](_0x4a9b97=>_0x4a9b97[_0x8119eb(0x1c7)]())[_0x8119eb(0x1cc)](_0x24b4ad=>_0x24b4ad[_0x8119eb(0x1cb)]>0x0&&!_0x24b4ad['startsWith']('#'));_0xbd504(_0x5f02c6);}),setTimeout(()=>_0xbd504([]),0x1f4);});return[];}function parseParamsFlag(_0x329048){const _0x30271f=a85_0x531d;if(!_0x329048||typeof _0x329048!==_0x30271f(0x1c1))return{};try{const _0x3cf2d1=JSON[_0x30271f(0x1ac)](_0x329048);if(typeof _0x3cf2d1!==_0x30271f(0x1b6)||_0x3cf2d1===null||Array[_0x30271f(0x1b7)](_0x3cf2d1))return{};return{'selectedLabels':Array[_0x30271f(0x1b7)](_0x3cf2d1['pages'])?_0x3cf2d1[_0x30271f(0x1a4)][_0x30271f(0x1c4)](String):undefined,'jsUrl':typeof _0x3cf2d1['jsUrl']==='string'?_0x3cf2d1[_0x30271f(0x1b1)][_0x30271f(0x1c7)]():undefined,'cssUrl':typeof _0x3cf2d1[_0x30271f(0x1b8)]===_0x30271f(0x1c1)?_0x3cf2d1[_0x30271f(0x1b8)][_0x30271f(0x1c7)]():undefined};}catch{return{};}}function a85_0x205f(){const _0x28a742=['isArray','cssUrl','Invalid\x20--params:\x20','has','Menu\x20sync\x20completed','Start\x20non-interactive\x20menu\x20sync','info','end','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','No\x20local\x20pages\x20matched\x20labels:\x20','string','10zEmnUE','1638609tKldjz','map','6699800YDoqqZ','stdin','trim','menu-sync','split','utf8','length','filter','\x0a\x20\x20Available\x20local\x20pages:\x20','4HybBFt','path','765124Mrtayu','selectedLabels','pages','240193RHBumz','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','JS\x20URL\x20is\x20unreachable:\x20','field','7262046WwHXvq','--params.','message','parse','label','readableEnded','842970TYXWvE','join','jsUrl','toString','2241nvqPBo','cwd','push','object'];a85_0x205f=function(){return _0x28a742;};return a85_0x205f();}
@@ -1 +1 @@
1
- (function(_0x82475b,_0x3d0eb3){const _0x254709=a80_0xb1a3,_0x350b6d=_0x82475b();while(!![]){try{const _0x285428=parseInt(_0x254709(0xf5))/0x1*(-parseInt(_0x254709(0xe2))/0x2)+-parseInt(_0x254709(0x106))/0x3+-parseInt(_0x254709(0xee))/0x4*(-parseInt(_0x254709(0xf8))/0x5)+-parseInt(_0x254709(0x10b))/0x6*(-parseInt(_0x254709(0x107))/0x7)+parseInt(_0x254709(0xfe))/0x8*(parseInt(_0x254709(0xe8))/0x9)+-parseInt(_0x254709(0xea))/0xa*(parseInt(_0x254709(0xf7))/0xb)+-parseInt(_0x254709(0x103))/0xc*(-parseInt(_0x254709(0x100))/0xd);if(_0x285428===_0x3d0eb3)break;else _0x350b6d['push'](_0x350b6d['shift']());}catch(_0x3395c9){_0x350b6d['push'](_0x350b6d['shift']());}}}(a80_0x3dfc,0xb7f42));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x2ecb83){const _0x443d68=a80_0xb1a3,_0xcd7132=[];return _0x2ecb83[_0x443d68(0x10c)]&&!isValidJsHttpsUrl(_0x2ecb83[_0x443d68(0x10c)])&&_0xcd7132[_0x443d68(0xfd)]({'field':_0x443d68(0x10c),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x2ecb83[_0x443d68(0xfa)]&&!isValidCssHttpsUrl(_0x2ecb83['cssUrl'])&&_0xcd7132[_0x443d68(0xfd)]({'field':_0x443d68(0xfa),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0xcd7132;}function a80_0x3dfc(){const _0x45640f=['status','CSS\x20URL\x20is\x20unreachable:\x20','48kKcjss','length','trim','2822949KjJkmj','3446422XgbdQU','isArray','--params.','path','6AnDoqV','jsUrl','4YMcRwz','parse','map','message','object','setLogPath','498105ubDpNC','menu-update','152420GVJasp','value','allSettled','label','184swtIyv','Start\x20non-interactive\x20menu\x20update','Invalid\x20--params:\x20','cwd','string','JS\x20URL\x20is\x20unreachable:\x20','join','368201gHffCb','resources','1001RLZSrA','63685PCeSso','fulfilled','cssUrl','filter','Menu\x20update\x20completed','push','40AYaxkp','info','8004451UFflor'];a80_0x3dfc=function(){return _0x45640f;};return a80_0x3dfc();}function a80_0xb1a3(_0x4b3731,_0x45fabe){_0x4b3731=_0x4b3731-0xe2;const _0x3dfc70=a80_0x3dfc();let _0xb1a32c=_0x3dfc70[_0x4b3731];return _0xb1a32c;}export async function runMenuUpdateCore(_0x4184e2,_0x52f302,_0x292a5c){const _0x40fc88=a80_0xb1a3,_0x58118d=parseUpdateParamsFlag(_0x292a5c),_0x573346=[];if(_0x58118d[_0x40fc88(0x10c)])_0x573346[_0x40fc88(0xfd)](_0x58118d[_0x40fc88(0x10c)]);if(_0x58118d[_0x40fc88(0xfa)])_0x573346[_0x40fc88(0xfd)](_0x58118d[_0x40fc88(0xfa)]);const _0x507062=validateParams(_0x58118d);if(_0x507062['length']>0x0){const _0x506524=_0x507062[_0x40fc88(0xe4)](_0x15910d=>_0x40fc88(0x109)+_0x15910d['field']+':\x20'+_0x15910d[_0x40fc88(0xe5)])[_0x40fc88(0xf4)](';\x20');throw new Error(_0x40fc88(0xf0)+_0x506524);}logger[_0x40fc88(0xe7)](process[_0x40fc88(0xf1)]()),logger[_0x40fc88(0xff)](_0x40fc88(0xe9),_0x40fc88(0xef),{'appCode':_0x4184e2,'jsUrl':_0x58118d[_0x40fc88(0x10c)],'cssUrl':_0x58118d['cssUrl']});if(_0x58118d[_0x40fc88(0x10c)]){const _0x40f89a=await isUrlReachable(_0x58118d['jsUrl']);if(!_0x40f89a)throw new Error(_0x40fc88(0xf3)+_0x58118d[_0x40fc88(0x10c)]);}if(_0x58118d['cssUrl']){const _0x2d06c6=await isUrlReachable(_0x58118d[_0x40fc88(0xfa)]);if(!_0x2d06c6)throw new Error(_0x40fc88(0x102)+_0x58118d[_0x40fc88(0xfa)]);}const _0x47189e=await getOnlineMenuList(_0x4184e2,_0x52f302),_0x5809d2=_0x47189e[_0x40fc88(0xfb)](_0x126587=>_0x126587[_0x40fc88(0xf6)][_0x40fc88(0x104)]>0x0);if(_0x5809d2[_0x40fc88(0x104)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x426b3f=await Promise[_0x40fc88(0xec)](_0x5809d2[_0x40fc88(0xe4)](_0x358f59=>updateMenuCdnUrl(_0x4184e2,_0x52f302,{'id':_0x358f59['id'],'label':_0x358f59[_0x40fc88(0xed)],'path':_0x358f59[_0x40fc88(0x10a)],'resources':_0x573346}))),_0x2434f6=_0x426b3f[_0x40fc88(0xfb)](_0x11775c=>_0x11775c[_0x40fc88(0x101)]===_0x40fc88(0xf9))[_0x40fc88(0xe4)](_0x38440f=>_0x38440f[_0x40fc88(0xeb)]),_0x40d8ca=_0x426b3f[_0x40fc88(0xfb)](_0x2f26cc=>_0x2f26cc[_0x40fc88(0x101)]==='rejected')[_0x40fc88(0x104)];return logger[_0x40fc88(0xff)]('menu-update',_0x40fc88(0xfc),{'count':_0x5809d2[_0x40fc88(0x104)],'resources':_0x573346}),{'updated':_0x2434f6[_0x40fc88(0x104)],'failed':_0x40d8ca,'skipped':![],'menus':_0x2434f6};}function parseUpdateParamsFlag(_0x2e788f){const _0x3c3b2d=a80_0xb1a3;if(!_0x2e788f||typeof _0x2e788f!==_0x3c3b2d(0xf2))return{};try{const _0x40e231=JSON[_0x3c3b2d(0xe3)](_0x2e788f);if(typeof _0x40e231!==_0x3c3b2d(0xe6)||_0x40e231===null||Array[_0x3c3b2d(0x108)](_0x40e231))return{};return{'jsUrl':typeof _0x40e231['jsUrl']===_0x3c3b2d(0xf2)?_0x40e231[_0x3c3b2d(0x10c)]['trim']():undefined,'cssUrl':typeof _0x40e231['cssUrl']==='string'?_0x40e231[_0x3c3b2d(0xfa)][_0x3c3b2d(0x105)]():undefined};}catch{return{};}}
1
+ (function(_0x427e5c,_0x584ef7){const _0xd2f0f5=a87_0x1539,_0x5eddf9=_0x427e5c();while(!![]){try{const _0x3a013e=-parseInt(_0xd2f0f5(0x137))/0x1*(parseInt(_0xd2f0f5(0x124))/0x2)+parseInt(_0xd2f0f5(0x138))/0x3+parseInt(_0xd2f0f5(0x132))/0x4*(-parseInt(_0xd2f0f5(0x121))/0x5)+parseInt(_0xd2f0f5(0x123))/0x6*(parseInt(_0xd2f0f5(0x133))/0x7)+parseInt(_0xd2f0f5(0x128))/0x8+-parseInt(_0xd2f0f5(0x12e))/0x9*(-parseInt(_0xd2f0f5(0x12c))/0xa)+-parseInt(_0xd2f0f5(0x143))/0xb;if(_0x3a013e===_0x584ef7)break;else _0x5eddf9['push'](_0x5eddf9['shift']());}catch(_0x5e2894){_0x5eddf9['push'](_0x5eddf9['shift']());}}}(a87_0x9879,0x70420));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a87_0x1539(_0x10061f,_0x204cea){_0x10061f=_0x10061f-0x121;const _0x9879fc=a87_0x9879();let _0x15390f=_0x9879fc[_0x10061f];return _0x15390f;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x11d035){const _0x2f7256=a87_0x1539,_0x30ba9d=[];return _0x11d035[_0x2f7256(0x134)]&&!isValidJsHttpsUrl(_0x11d035['jsUrl'])&&_0x30ba9d[_0x2f7256(0x12f)]({'field':'jsUrl','message':_0x2f7256(0x13a)}),_0x11d035['cssUrl']&&!isValidCssHttpsUrl(_0x11d035[_0x2f7256(0x13e)])&&_0x30ba9d['push']({'field':_0x2f7256(0x13e),'message':_0x2f7256(0x126)}),_0x30ba9d;}export async function runMenuUpdateCore(_0x17bd79,_0x1b1f2f,_0x4f848d){const _0x4820a7=a87_0x1539,_0x574a26=parseUpdateParamsFlag(_0x4f848d),_0x4e1ba9=[];if(_0x574a26[_0x4820a7(0x134)])_0x4e1ba9[_0x4820a7(0x12f)](_0x574a26[_0x4820a7(0x134)]);if(_0x574a26[_0x4820a7(0x13e)])_0x4e1ba9['push'](_0x574a26[_0x4820a7(0x13e)]);const _0x95f5d9=validateParams(_0x574a26);if(_0x95f5d9[_0x4820a7(0x129)]>0x0){const _0x3fb60c=_0x95f5d9['map'](_0x2ba714=>_0x4820a7(0x12a)+_0x2ba714[_0x4820a7(0x140)]+':\x20'+_0x2ba714['message'])[_0x4820a7(0x125)](';\x20');throw new Error(_0x4820a7(0x127)+_0x3fb60c);}logger[_0x4820a7(0x13b)](process[_0x4820a7(0x131)]()),logger[_0x4820a7(0x135)](_0x4820a7(0x12d),'Start\x20non-interactive\x20menu\x20update',{'appCode':_0x17bd79,'jsUrl':_0x574a26[_0x4820a7(0x134)],'cssUrl':_0x574a26['cssUrl']});if(_0x574a26[_0x4820a7(0x134)]){const _0x190dcf=await isUrlReachable(_0x574a26['jsUrl']);if(!_0x190dcf)throw new Error(_0x4820a7(0x13c)+_0x574a26[_0x4820a7(0x134)]);}if(_0x574a26[_0x4820a7(0x13e)]){const _0x356434=await isUrlReachable(_0x574a26['cssUrl']);if(!_0x356434)throw new Error(_0x4820a7(0x147)+_0x574a26['cssUrl']);}const _0x2df51c=await getOnlineMenuList(_0x17bd79,_0x1b1f2f),_0x1211bf=_0x2df51c[_0x4820a7(0x139)](_0x4e6b61=>_0x4e6b61['resources'][_0x4820a7(0x129)]>0x0);if(_0x1211bf['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x3d25b7=await Promise[_0x4820a7(0x13f)](_0x1211bf['map'](_0x4ab3df=>updateMenuCdnUrl(_0x17bd79,_0x1b1f2f,{'id':_0x4ab3df['id'],'label':_0x4ab3df['label'],'path':_0x4ab3df[_0x4820a7(0x142)],'resources':_0x4e1ba9}))),_0x36decb=_0x3d25b7[_0x4820a7(0x139)](_0x34b9e4=>_0x34b9e4[_0x4820a7(0x12b)]==='fulfilled')[_0x4820a7(0x122)](_0x81dfbd=>_0x81dfbd[_0x4820a7(0x130)]),_0x25e30a=_0x3d25b7[_0x4820a7(0x139)](_0x2d64e8=>_0x2d64e8[_0x4820a7(0x12b)]==='rejected')[_0x4820a7(0x129)];return logger[_0x4820a7(0x135)](_0x4820a7(0x12d),_0x4820a7(0x13d),{'count':_0x1211bf[_0x4820a7(0x129)],'resources':_0x4e1ba9}),{'updated':_0x36decb[_0x4820a7(0x129)],'failed':_0x25e30a,'skipped':![],'menus':_0x36decb};}function a87_0x9879(){const _0xe138c=['join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Invalid\x20--params:\x20','7141328uBFoqX','length','--params.','status','7534630puOuAu','menu-update','9NvLcJR','push','value','cwd','916Slgmxz','154vILVLa','jsUrl','info','trim','2155XNfllF','1744395IapMPM','filter','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','setLogPath','JS\x20URL\x20is\x20unreachable:\x20','Menu\x20update\x20completed','cssUrl','allSettled','field','string','path','2382655kMgSFR','isArray','object','parse','CSS\x20URL\x20is\x20unreachable:\x20','17455FjmYOj','map','684VbfjDB','700zCTfIR'];a87_0x9879=function(){return _0xe138c;};return a87_0x9879();}function parseUpdateParamsFlag(_0x5c15a0){const _0x33ee92=a87_0x1539;if(!_0x5c15a0||typeof _0x5c15a0!=='string')return{};try{const _0x1d7a10=JSON[_0x33ee92(0x146)](_0x5c15a0);if(typeof _0x1d7a10!==_0x33ee92(0x145)||_0x1d7a10===null||Array[_0x33ee92(0x144)](_0x1d7a10))return{};return{'jsUrl':typeof _0x1d7a10[_0x33ee92(0x134)]==='string'?_0x1d7a10[_0x33ee92(0x134)][_0x33ee92(0x136)]():undefined,'cssUrl':typeof _0x1d7a10[_0x33ee92(0x13e)]===_0x33ee92(0x141)?_0x1d7a10[_0x33ee92(0x13e)][_0x33ee92(0x136)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x1abba9,_0x5d5a27){const _0x52344e=a81_0x593a,_0x5ab3d0=_0x1abba9();while(!![]){try{const _0x39266f=-parseInt(_0x52344e(0xbc))/0x1+-parseInt(_0x52344e(0xc2))/0x2*(-parseInt(_0x52344e(0xbf))/0x3)+parseInt(_0x52344e(0xba))/0x4*(parseInt(_0x52344e(0xc1))/0x5)+parseInt(_0x52344e(0xbe))/0x6*(-parseInt(_0x52344e(0xb9))/0x7)+-parseInt(_0x52344e(0xc5))/0x8*(-parseInt(_0x52344e(0xbd))/0x9)+-parseInt(_0x52344e(0xc3))/0xa*(parseInt(_0x52344e(0xc4))/0xb)+-parseInt(_0x52344e(0xbb))/0xc*(-parseInt(_0x52344e(0xc6))/0xd);if(_0x39266f===_0x5d5a27)break;else _0x5ab3d0['push'](_0x5ab3d0['shift']());}catch(_0xb213ef){_0x5ab3d0['push'](_0x5ab3d0['shift']());}}}(a81_0x18ac,0xe9c93));export function isValidJsHttpsUrl(_0x47d51e){const _0x19a42a=a81_0x593a;return/^https:\/\/.+\.js(\?.*)?$/[_0x19a42a(0xc0)](_0x47d51e[_0x19a42a(0xb8)]());}export function isValidCssHttpsUrl(_0x343da8){const _0x352f33=a81_0x593a;return/^https:\/\/.+\.css(\?.*)?$/[_0x352f33(0xc0)](_0x343da8[_0x352f33(0xb8)]());}function a81_0x593a(_0x807f04,_0x2069fe){_0x807f04=_0x807f04-0xb8;const _0x18ac53=a81_0x18ac();let _0x593a2f=_0x18ac53[_0x807f04];return _0x593a2f;}export async function isUrlReachable(_0xff95f3){try{const _0x33b591=await fetch(_0xff95f3,{'method':'HEAD'});return _0x33b591['ok'];}catch{return![];}}function a81_0x18ac(){const _0x4493c4=['10PbvhDV','4768577ZJDjaF','175688MtTPNM','558389CYSoVd','trim','9149OGraVL','32KZwkaW','588ouPiqw','1865638oYHEca','90XbJPDZ','204XANFYF','249XorFvq','test','215200AhUzPT','15242ljcggw'];a81_0x18ac=function(){return _0x4493c4;};return a81_0x18ac();}
1
+ function a88_0x9913(_0x28f19a,_0x4df9c6){_0x28f19a=_0x28f19a-0x105;const _0x1749e2=a88_0x1749();let _0x991354=_0x1749e2[_0x28f19a];return _0x991354;}(function(_0x36a110,_0x12e254){const _0x2bbc10=a88_0x9913,_0x471fe6=_0x36a110();while(!![]){try{const _0x1491fe=-parseInt(_0x2bbc10(0x10d))/0x1+parseInt(_0x2bbc10(0x10b))/0x2*(parseInt(_0x2bbc10(0x108))/0x3)+-parseInt(_0x2bbc10(0x107))/0x4+-parseInt(_0x2bbc10(0x110))/0x5+-parseInt(_0x2bbc10(0x105))/0x6*(-parseInt(_0x2bbc10(0x10e))/0x7)+-parseInt(_0x2bbc10(0x109))/0x8*(parseInt(_0x2bbc10(0x10a))/0x9)+parseInt(_0x2bbc10(0x10c))/0xa;if(_0x1491fe===_0x12e254)break;else _0x471fe6['push'](_0x471fe6['shift']());}catch(_0x22d9e7){_0x471fe6['push'](_0x471fe6['shift']());}}}(a88_0x1749,0x4d932));export function isValidJsHttpsUrl(_0x2e01b4){const _0x5e5c01=a88_0x9913;return/^https:\/\/.+\.js(\?.*)?$/[_0x5e5c01(0x106)](_0x2e01b4[_0x5e5c01(0x10f)]());}export function isValidCssHttpsUrl(_0x330606){return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x330606['trim']());}export async function isUrlReachable(_0x45626c){try{const _0x215d14=await fetch(_0x45626c,{'method':'HEAD'});return _0x215d14['ok'];}catch{return![];}}function a88_0x1749(){const _0x291a0c=['10029KMqpIK','6008WaKlhH','3600SqJkTf','10JYnGmz','13630020RjRewA','422222BIhUUO','1455223pAwlcq','trim','2668185jYuzFK','18oqLSSt','test','1717516vJKjUP'];a88_0x1749=function(){return _0x291a0c;};return a88_0x1749();}
@@ -1 +1 @@
1
- const a82_0x4f5f24=a82_0x1a16;(function(_0x1556ba,_0x3b1d6f){const _0x35532d=a82_0x1a16,_0x2c2130=_0x1556ba();while(!![]){try{const _0x18a997=parseInt(_0x35532d(0x1b3))/0x1+-parseInt(_0x35532d(0x1c2))/0x2*(parseInt(_0x35532d(0x1dc))/0x3)+parseInt(_0x35532d(0x1c9))/0x4*(parseInt(_0x35532d(0x1aa))/0x5)+parseInt(_0x35532d(0x1ad))/0x6*(parseInt(_0x35532d(0x1d6))/0x7)+parseInt(_0x35532d(0x1bc))/0x8+-parseInt(_0x35532d(0x1b5))/0x9*(parseInt(_0x35532d(0x1e5))/0xa)+-parseInt(_0x35532d(0x1cf))/0xb;if(_0x18a997===_0x3b1d6f)break;else _0x2c2130['push'](_0x2c2130['shift']());}catch(_0x494a14){_0x2c2130['push'](_0x2c2130['shift']());}}}(a82_0x4cc8,0x81dca));import a82_0x1f67d7 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';function a82_0x1a16(_0x474c73,_0x59dfe6){_0x474c73=_0x474c73-0x1a8;const _0x4cc8d6=a82_0x4cc8();let _0x1a1638=_0x4cc8d6[_0x474c73];return _0x1a1638;}import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a82_0x4cc8(){const _0x1284bf=['\x20menu(s)...','\x20menu(s)\x20with\x20JS:\x20','parse','1969704qybPxT','Sync\x20local\x20pages\x20as\x20platform\x20menus','isArray','validation','Creating\x20','onlinePaths','148598QXKsUt','\x20created.','flag','\x20\x20Continue\x20with\x20creation?','\x20and\x20CSS:\x20','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','sync','24yAztVS','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','yes','\x20failed.','created','Online\x20menu\x20list\x20fetched','18275389LdrBni','failed','message','yellow','Fetching\x20online\x20menu\x20list...','cyan','\x20menu(s)','93779Ppmdxv','Menu\x20sync\x20completed:\x20','length','localPages','Failed\x20to\x20fetch\x20online\x20menu\x20list','write','3ARYCdG','appCode','str','object','trim','map','Menu\x20sync\x20skipped','gray','cookie','9129990zfWkji','string','pages','832935xmIJdt','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','\x20\x20Cancelled.','438ginEgc','jsUrl','onlineMenuList','\x20\x20Create\x20','Menu\x20creation\x20failed','params','956895AqkepI','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','9ZRpeYj','cssUrl','Created\x20','skipped'];a82_0x4cc8=function(){return _0x1284bf;};return a82_0x4cc8();}export const menuSync={'service':'menu','command':a82_0x4f5f24(0x1c8),'description':a82_0x4f5f24(0x1bd),'risk':a82_0x4f5f24(0x1db),'flags':[{'name':'params','type':'string','description':a82_0x4f5f24(0x1b4)+a82_0x4f5f24(0x1ab)},{'name':a82_0x4f5f24(0x1cb),'type':'boolean','description':a82_0x4f5f24(0x1c7)}],async 'execute'(_0x24c986){const _0x3e707a=a82_0x4f5f24,_0x55744e=_0x24c986[_0x3e707a(0x1c4)]('yes'),_0x2d8ec5=_0x24c986[_0x3e707a(0x1de)](_0x3e707a(0x1b2)),_0x4fe85a=parseParams(_0x2d8ec5),_0x25a15d=!!(_0x4fe85a['jsUrl']||_0x4fe85a['cssUrl']||_0x4fe85a[_0x3e707a(0x1a9)]&&_0x4fe85a['pages'][_0x3e707a(0x1d8)]>0x0);if(_0x55744e||_0x25a15d){let _0xc7e4d4=[];!isInteractive()&&!_0x4fe85a[_0x3e707a(0x1a9)]?.[_0x3e707a(0x1d8)]&&(_0xc7e4d4=await readPageLabelsFromStdin());const _0x5cb4f9=await runMenuSyncCore(_0x24c986['appCode'],_0x24c986[_0x3e707a(0x1e4)],_0xc7e4d4[_0x3e707a(0x1d8)]>0x0?_0xc7e4d4:_0x4fe85a[_0x3e707a(0x1a9)]??[],_0x2d8ec5);if(_0x5cb4f9[_0x3e707a(0x1b8)]){const _0x41d7a1=getLocalPages();_0x41d7a1[_0x3e707a(0x1d8)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x3e707a(0x1ca));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x5cb4f9[_0x3e707a(0x1cd)]+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x5cb4f9,'message':_0x5cb4f9[_0x3e707a(0x1b8)]?_0x3e707a(0x1e2):_0x3e707a(0x1d7)+_0x5cb4f9[_0x3e707a(0x1cd)]+_0x3e707a(0x1c3)};}requireInteractive();const _0x565c38=startSpinner(_0x3e707a(0x1d3));let _0x121bee,_0x4e06a9,_0x444140;try{const _0x59a681=await fetchMenuData(_0x24c986[_0x3e707a(0x1dd)],_0x24c986['cookie']);_0x121bee=_0x59a681[_0x3e707a(0x1d9)],_0x4e06a9=_0x59a681[_0x3e707a(0x1c1)],_0x444140=_0x59a681[_0x3e707a(0x1af)],stopSpinner(_0x565c38,_0x3e707a(0x1ce),!![]);}catch(_0x5ee904){stopSpinner(_0x565c38,_0x3e707a(0x1da),![]);throw CliErrors[_0x3e707a(0x1bf)](_0x5ee904 instanceof Error?_0x5ee904[_0x3e707a(0x1d1)]:_0x3e707a(0x1da));}if(_0x121bee[_0x3e707a(0x1d8)]===0x0)return writeCliSideChannelLine(a82_0x1f67d7[_0x3e707a(0x1d2)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x60946d=buildCompareRows(_0x121bee,_0x4e06a9);writeCliSideChannelLine(renderCompareTable(_0x60946d)),writeCliSideChannelLine('');const _0x442a2a=_0x4fe85a[_0x3e707a(0x1a9)],_0x1b62b7=await selectPages(_0x121bee,_0x4e06a9,_0x442a2a);writeCliSideChannelLine(''),writeCliSideChannelLine(a82_0x1f67d7[_0x3e707a(0x1d4)]('\x20\x20✓\x20Selected:\x20'+_0x1b62b7['length']+'\x20page(s)'));const _0xa41445=_0x4fe85a['jsUrl']&&_0x4fe85a[_0x3e707a(0x1b6)];if(!_0xa41445){writeCliSideChannelLine(renderSyncSummary(_0x1b62b7,_0x4e06a9['size']>0x0));const _0x34571f=await askConfirm(_0x3e707a(0x1c5));if(!_0x34571f)return writeCliSideChannelLine(a82_0x1f67d7['gray'](_0x3e707a(0x1ac))),{'ok':!![]};}let _0x5740e6=_0x4fe85a[_0x3e707a(0x1ae)],_0x5dabf3=_0x4fe85a[_0x3e707a(0x1b6)];!_0x5740e6&&(_0x5740e6=await askJsUrl());!_0x5dabf3&&(_0x5dabf3=await askCssUrl());const _0x53e3f1=await askConfirm(_0x3e707a(0x1b0)+_0x1b62b7[_0x3e707a(0x1d8)]+_0x3e707a(0x1ba)+_0x5740e6+_0x3e707a(0x1c6)+_0x5dabf3+'?');if(!_0x53e3f1)return writeCliSideChannelLine(a82_0x1f67d7[_0x3e707a(0x1e3)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x54e292=[_0x5740e6,_0x5dabf3],_0x1a0a07=startSpinner(_0x3e707a(0x1c0)+_0x1b62b7[_0x3e707a(0x1d8)]+_0x3e707a(0x1b9));try{const _0x4ad975=await doCreateMenus(_0x24c986[_0x3e707a(0x1dd)],_0x24c986[_0x3e707a(0x1e4)],_0x1b62b7,_0x54e292);return stopSpinner(_0x1a0a07,_0x3e707a(0x1b7)+_0x4ad975[_0x3e707a(0x1cd)]+_0x3e707a(0x1d5),!![]),{'ok':!![],'data':_0x4ad975,'message':_0x3e707a(0x1d7)+_0x4ad975[_0x3e707a(0x1cd)]+'\x20created,\x20'+_0x4ad975[_0x3e707a(0x1d0)]+_0x3e707a(0x1cc)};}catch(_0x2c3c49){stopSpinner(_0x1a0a07,_0x3e707a(0x1b1),![]);throw CliErrors['validation'](_0x2c3c49 instanceof Error?_0x2c3c49['message']:'Menu\x20creation\x20failed');}}};function parseParams(_0xe59746){const _0xdac017=a82_0x4f5f24;if(!_0xe59746)return{};try{const _0xb4c3c2=JSON[_0xdac017(0x1bb)](_0xe59746);if(typeof _0xb4c3c2!==_0xdac017(0x1df)||_0xb4c3c2===null||Array[_0xdac017(0x1be)](_0xb4c3c2))return{};return{'jsUrl':typeof _0xb4c3c2['jsUrl']===_0xdac017(0x1a8)?_0xb4c3c2[_0xdac017(0x1ae)][_0xdac017(0x1e0)]():undefined,'cssUrl':typeof _0xb4c3c2[_0xdac017(0x1b6)]==='string'?_0xb4c3c2['cssUrl'][_0xdac017(0x1e0)]():undefined,'pages':Array[_0xdac017(0x1be)](_0xb4c3c2[_0xdac017(0x1a9)])?_0xb4c3c2['pages'][_0xdac017(0x1e1)](String):undefined};}catch{return{};}}
1
+ const a89_0x2de17d=a89_0x42a8;(function(_0x2e534d,_0xc3ffca){const _0xa7e9fa=a89_0x42a8,_0xd5503c=_0x2e534d();while(!![]){try{const _0xb9d186=parseInt(_0xa7e9fa(0x159))/0x1+parseInt(_0xa7e9fa(0x14d))/0x2+-parseInt(_0xa7e9fa(0x166))/0x3+parseInt(_0xa7e9fa(0x174))/0x4+-parseInt(_0xa7e9fa(0x16b))/0x5+-parseInt(_0xa7e9fa(0x170))/0x6*(parseInt(_0xa7e9fa(0x156))/0x7)+-parseInt(_0xa7e9fa(0x160))/0x8*(-parseInt(_0xa7e9fa(0x16d))/0x9);if(_0xb9d186===_0xc3ffca)break;else _0xd5503c['push'](_0xd5503c['shift']());}catch(_0x16e21a){_0xd5503c['push'](_0xd5503c['shift']());}}}(a89_0x28ca,0xab4f5));import a89_0x109ad4 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a89_0x28ca(){const _0x2e745e=['Online\x20menu\x20list\x20fetched','Menu\x20creation\x20failed','\x20\x20Cancelled.','sync','Failed\x20to\x20fetch\x20online\x20menu\x20list','params','7woAvvq','str','object','104433Mxfmyb','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','string','jsUrl','length','cookie','cssUrl','720hgvDxn','isArray','onlineMenuList','created','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Sync\x20local\x20pages\x20as\x20platform\x20menus','1532253tzGdqK','onlinePaths','trim','\x20\x20Continue\x20with\x20creation?','gray','5685935nFkQVv','\x20page(s)','148176plLIvX','✓\x20Menu\x20sync\x20completed:\x20','appCode','1016646CZBkNS','Created\x20','Fetching\x20online\x20menu\x20list...','validation','481712GYKlpw','Creating\x20','\x20menu(s)','size','Menu\x20sync\x20skipped','\x20menu(s)\x20created','skipped','\x20and\x20CSS:\x20','pages','map','write','boolean','menu','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','localPages','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','cyan','yellow','\x20created.','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','1624886qZzUsL','parse','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'];a89_0x28ca=function(){return _0x2e745e;};return a89_0x28ca();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':a89_0x2de17d(0x180),'command':a89_0x2de17d(0x153),'description':a89_0x2de17d(0x165),'risk':a89_0x2de17d(0x17e),'flags':[{'name':a89_0x2de17d(0x155),'type':a89_0x2de17d(0x15b),'description':a89_0x2de17d(0x15a)+a89_0x2de17d(0x14c)},{'name':'yes','type':a89_0x2de17d(0x17f),'description':a89_0x2de17d(0x146)}],async 'execute'(_0x4fef48){const _0x261cb0=a89_0x2de17d,_0x2977c3=_0x4fef48['flag']('yes'),_0x3c3fc6=_0x4fef48[_0x261cb0(0x157)]('params'),_0x570fb0=parseParams(_0x3c3fc6),_0x1f78c7=!!(_0x570fb0['jsUrl']||_0x570fb0[_0x261cb0(0x15f)]||_0x570fb0[_0x261cb0(0x17c)]&&_0x570fb0[_0x261cb0(0x17c)]['length']>0x0);if(_0x2977c3||_0x1f78c7){let _0x207c93=[];!isInteractive()&&!_0x570fb0['pages']?.[_0x261cb0(0x15d)]&&(_0x207c93=await readPageLabelsFromStdin());const _0x3147c1=await runMenuSyncCore(_0x4fef48[_0x261cb0(0x16f)],_0x4fef48['cookie'],_0x207c93[_0x261cb0(0x15d)]>0x0?_0x207c93:_0x570fb0['pages']??[],_0x3c3fc6);if(_0x3147c1[_0x261cb0(0x17a)]){const _0x52b22d=getLocalPages();_0x52b22d[_0x261cb0(0x15d)]===0x0?writeCliSideChannelLine(_0x261cb0(0x14f)):writeCliSideChannelLine(_0x261cb0(0x164));}else writeCliSideChannelLine(_0x261cb0(0x16e)+_0x3147c1['created']+_0x261cb0(0x179));return{'ok':!![],'data':_0x3147c1,'message':_0x3147c1[_0x261cb0(0x17a)]?_0x261cb0(0x178):'Menu\x20sync\x20completed:\x20'+_0x3147c1[_0x261cb0(0x163)]+_0x261cb0(0x14b)};}requireInteractive();const _0xf648c2=startSpinner(_0x261cb0(0x172));let _0x221fec,_0x224bc2,_0x59eaa7;try{const _0xe960ee=await fetchMenuData(_0x4fef48['appCode'],_0x4fef48[_0x261cb0(0x15e)]);_0x221fec=_0xe960ee[_0x261cb0(0x147)],_0x224bc2=_0xe960ee[_0x261cb0(0x167)],_0x59eaa7=_0xe960ee[_0x261cb0(0x162)],stopSpinner(_0xf648c2,_0x261cb0(0x150),!![]);}catch(_0x57c383){stopSpinner(_0xf648c2,_0x261cb0(0x154),![]);throw CliErrors[_0x261cb0(0x173)](_0x57c383 instanceof Error?_0x57c383['message']:_0x261cb0(0x154));}if(_0x221fec[_0x261cb0(0x15d)]===0x0)return writeCliSideChannelLine(a89_0x109ad4[_0x261cb0(0x14a)](_0x261cb0(0x148))),{'ok':!![]};const _0x2c9759=buildCompareRows(_0x221fec,_0x224bc2);writeCliSideChannelLine(renderCompareTable(_0x2c9759)),writeCliSideChannelLine('');const _0x1b7cce=_0x570fb0[_0x261cb0(0x17c)],_0x2cefc3=await selectPages(_0x221fec,_0x224bc2,_0x1b7cce);writeCliSideChannelLine(''),writeCliSideChannelLine(a89_0x109ad4[_0x261cb0(0x149)]('\x20\x20✓\x20Selected:\x20'+_0x2cefc3[_0x261cb0(0x15d)]+_0x261cb0(0x16c)));const _0x5af4d9=_0x570fb0[_0x261cb0(0x15c)]&&_0x570fb0['cssUrl'];if(!_0x5af4d9){writeCliSideChannelLine(renderSyncSummary(_0x2cefc3,_0x224bc2[_0x261cb0(0x177)]>0x0));const _0x36cb2c=await askConfirm(_0x261cb0(0x169));if(!_0x36cb2c)return writeCliSideChannelLine(a89_0x109ad4[_0x261cb0(0x16a)](_0x261cb0(0x152))),{'ok':!![]};}let _0x419df4=_0x570fb0[_0x261cb0(0x15c)],_0x541b19=_0x570fb0['cssUrl'];!_0x419df4&&(_0x419df4=await askJsUrl());!_0x541b19&&(_0x541b19=await askCssUrl());const _0x16ac77=await askConfirm('\x20\x20Create\x20'+_0x2cefc3['length']+'\x20menu(s)\x20with\x20JS:\x20'+_0x419df4+_0x261cb0(0x17b)+_0x541b19+'?');if(!_0x16ac77)return writeCliSideChannelLine(a89_0x109ad4[_0x261cb0(0x16a)](_0x261cb0(0x152))),{'ok':!![]};const _0x246deb=[_0x419df4,_0x541b19],_0xeaad9f=startSpinner(_0x261cb0(0x175)+_0x2cefc3[_0x261cb0(0x15d)]+'\x20menu(s)...');try{const _0x167616=await doCreateMenus(_0x4fef48['appCode'],_0x4fef48['cookie'],_0x2cefc3,_0x246deb);return stopSpinner(_0xeaad9f,_0x261cb0(0x171)+_0x167616['created']+_0x261cb0(0x176),!![]),{'ok':!![],'data':_0x167616,'message':'Menu\x20sync\x20completed:\x20'+_0x167616['created']+'\x20created,\x20'+_0x167616['failed']+'\x20failed.'};}catch(_0xb8a4de){stopSpinner(_0xeaad9f,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x261cb0(0x173)](_0xb8a4de instanceof Error?_0xb8a4de['message']:_0x261cb0(0x151));}}};function a89_0x42a8(_0x8da9fa,_0x2c9b74){_0x8da9fa=_0x8da9fa-0x146;const _0x28caba=a89_0x28ca();let _0x42a8c8=_0x28caba[_0x8da9fa];return _0x42a8c8;}function parseParams(_0x1c834b){const _0x4865eb=a89_0x2de17d;if(!_0x1c834b)return{};try{const _0x489e2f=JSON[_0x4865eb(0x14e)](_0x1c834b);if(typeof _0x489e2f!==_0x4865eb(0x158)||_0x489e2f===null||Array[_0x4865eb(0x161)](_0x489e2f))return{};return{'jsUrl':typeof _0x489e2f[_0x4865eb(0x15c)]===_0x4865eb(0x15b)?_0x489e2f[_0x4865eb(0x15c)][_0x4865eb(0x168)]():undefined,'cssUrl':typeof _0x489e2f[_0x4865eb(0x15f)]==='string'?_0x489e2f[_0x4865eb(0x15f)][_0x4865eb(0x168)]():undefined,'pages':Array[_0x4865eb(0x161)](_0x489e2f['pages'])?_0x489e2f[_0x4865eb(0x17c)][_0x4865eb(0x17d)](String):undefined};}catch{return{};}}