@lovrabet/rabetbase-cli 2.1.6 → 2.1.7-beta.3

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
- const a69_0x1f397c=a69_0x1ff5;(function(_0x1aee54,_0x4722a0){const _0x20215d=a69_0x1ff5,_0x407b3d=_0x1aee54();while(!![]){try{const _0x4e544b=parseInt(_0x20215d(0x1cb))/0x1*(-parseInt(_0x20215d(0x1d2))/0x2)+parseInt(_0x20215d(0x1b3))/0x3+parseInt(_0x20215d(0x1ba))/0x4*(parseInt(_0x20215d(0x1cf))/0x5)+-parseInt(_0x20215d(0x1d4))/0x6+-parseInt(_0x20215d(0x1da))/0x7+-parseInt(_0x20215d(0x1c7))/0x8*(parseInt(_0x20215d(0x1be))/0x9)+parseInt(_0x20215d(0x1d3))/0xa*(parseInt(_0x20215d(0x1d6))/0xb);if(_0x4e544b===_0x4722a0)break;else _0x407b3d['push'](_0x407b3d['shift']());}catch(_0x2e6529){_0x407b3d['push'](_0x407b3d['shift']());}}}(a69_0x9da8,0x3918a));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(_0x110572){return{'appCode':_0x110572,'appName':_0x110572};}function writeInitConfig(_0x5af880,_0x29d0a3,_0x45c719){const _0x576968=a69_0x1ff5,_0x1f3114=resolveWriteConfigPath(_0x5af880),_0xfe97ba=buildCanonicalProjectConfig({},{'appCodes':_0x29d0a3['map'](_0x31ec30=>_0x31ec30[_0x576968(0x1bd)]),'env':_0x45c719,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x576968(0x1db)]()}});writeConfigFile(_0x1f3114,_0xfe97ba);const _0x548bd2=_0x5af880==='global'?_0x576968(0x1c3):_0x576968(0x1c0);console[_0x576968(0x1aa)](_0x576968(0x1c9)+_0x548bd2+'\x20config'),console[_0x576968(0x1aa)](_0x576968(0x1af)+_0x29d0a3[_0x576968(0x1d9)](_0x305003=>_0x305003[_0x576968(0x1bd)])[_0x576968(0x1ae)](',\x20')),console[_0x576968(0x1aa)](_0x576968(0x1d8)+_0xfe97ba['defaultApp']),console[_0x576968(0x1aa)](_0x576968(0x1b4)+_0xfe97ba[_0x576968(0x1ab)]),console[_0x576968(0x1aa)]('\x20\x20Config:\x20'+_0x1f3114);}async function runSmartInit(_0x5e61ba){const _0x158f91=a69_0x1ff5,_0x4f0c0a=process[_0x158f91(0x1cd)](),_0x2c8425=_0x5e61ba[_0x158f91(0x1bc)](_0x158f91(0x1c3))?_0x158f91(0x1c3):'project',_0x23b27b=_0x5e61ba[_0x158f91(0x1c6)](_0x158f91(0x1ab))||'production',_0x113c83=_0x5e61ba[_0x158f91(0x1c6)](_0x158f91(0x1dc))||undefined,_0x1f38c6=_0x5e61ba[_0x158f91(0x1bc)]('project');if(_0x1f38c6){const {initConfig:_0x33269a}=await import(_0x158f91(0x1ac));return _0x33269a({'appcode':_0x113c83,'env':_0x23b27b,'autoYes':_0x5e61ba[_0x158f91(0x1bc)](_0x158f91(0x1bf))});}if(_0x2c8425===_0x158f91(0x1c0)){const _0x3a866f=existsSync(resolve(_0x4f0c0a,NEW_CONFIG_NAME)),_0x4eb072=LEGACY_CONFIG_NAMES[_0x158f91(0x1ce)](_0xf3187c=>existsSync(resolve(_0x4f0c0a,_0xf3187c)));if(_0x4eb072&&!_0x3a866f)return console[_0x158f91(0x1aa)](_0x158f91(0x1b0)),upgradeApp(_0x5e61ba[_0x158f91(0x1d0)],{'yes':_0x5e61ba['bool']('yes')});if(_0x3a866f)throw CliErrors[_0x158f91(0x1ca)](_0x158f91(0x1c1),_0x158f91(0x1ad)+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x113c83){const _0x50674a=validateAppcode(_0x113c83);if(!_0x50674a[_0x158f91(0x1bb)])throw CliErrors['validation'](_0x50674a[_0x158f91(0x1b5)]);writeInitConfig(_0x2c8425,[syntheticApp(_0x113c83)],_0x23b27b);return;}if(_0x5e61ba[_0x158f91(0x1d0)])throw CliErrors['flagMissing'](_0x158f91(0x1dc),_0x158f91(0x1d5)+CLI_BIN_NAME+_0x158f91(0x1b8));const _0x514fcd=getCookie(),_0x49d1b3=await selectMultipleApps(_0x514fcd),_0x244afc=_0x49d1b3===_0x158f91(0x1d1)?[syntheticApp(await promptCustomAppcode())]:_0x49d1b3;writeInitConfig(_0x2c8425,_0x244afc,_0x23b27b);}const initFlags=[{'name':'global','type':a69_0x1f397c(0x1d7),'description':a69_0x1f397c(0x1b1),'default':![]},{'name':a69_0x1f397c(0x1ab),'type':a69_0x1f397c(0x1c4),'description':a69_0x1f397c(0x1b9),'default':a69_0x1f397c(0x1cc),'enum':[...RABETBASE_ENV_VALUES]},{'name':a69_0x1f397c(0x1dc),'type':a69_0x1f397c(0x1c4),'description':a69_0x1f397c(0x1c5)},{'name':'project','type':'boolean','description':a69_0x1f397c(0x1c2),'default':![]},{'name':'yes','type':a69_0x1f397c(0x1d7),'description':a69_0x1f397c(0x1b7),'default':![]}];function a69_0x1ff5(_0x4d8aca,_0x386ab8){_0x4d8aca=_0x4d8aca-0x1aa;const _0x9da88c=a69_0x9da8();let _0x1ff57d=_0x9da88c[_0x4d8aca];return _0x1ff57d;}export const initDefinitions=[{'service':a69_0x1f397c(0x1c8),'command':a69_0x1f397c(0x1dd),'description':a69_0x1f397c(0x1b2),'risk':a69_0x1f397c(0x1b6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0xa51851){return await runSmartInit(_0xa51851),{'ok':!![]};}}];function a69_0x9da8(){const _0x2e5e2c=['string','App\x20code\x20to\x20initialize\x20with','str','9776pRHctb','init','\x0a✓\x20Successfully\x20initialized\x20','validation','23048RsnXHa','production','cwd','some','365055WdUNQQ','nonInteractive','custom','18EJZkhR','12983220WKGFba','2265780fGmlkA','Usage:\x20','11IsPtiB','boolean','\x20\x20Default:\x20','map','2049908GqbtNz','toLocaleString','appcode','run','log','env','../../commands/project/init.js','Use\x20`','join','\x20\x20Apps:\x20','检测到旧配置文件,正在自动升级...\x0a','Write\x20to\x20global\x20config\x20instead\x20of\x20project','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','384366lUaQoM','\x20\x20Env:\x20','message','write','Auto-confirm\x20prompts','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','Target\x20environment','8okbZEc','valid','bool','appCode','3393bMwtNW','yes','project','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','global'];a69_0x9da8=function(){return _0x2e5e2c;};return a69_0x9da8();}
1
+ function a74_0x3c88(){const _0x48d03b=['4388337Zeyucz','log','201THnjIY','\x20\x20Env:\x20','project','nonInteractive','global','372MDirFp','2689285oBknKp','18HKSWJI','str','init','Usage:\x20','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','appcode','run','boolean','App\x20code\x20to\x20initialize\x20with','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','Auto-confirm\x20prompts','\x20\x20Config:\x20','20VUPjZo','appCode','flagMissing','yes','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','Use\x20`','toLocaleString','valid','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','\x20\x20Default:\x20','1374318uUNUuh','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','message','defaultApp','bool','检测到旧配置文件,正在自动升级...\x0a','73956NARaUP','validation','196xIycLM','225656hEtEZJ','Write\x20to\x20global\x20config\x20instead\x20of\x20project','write','\x0a✓\x20Successfully\x20initialized\x20','../../commands/project/init.js','env','Target\x20environment','map','string','custom','893486WAakvU','1357895LJIKPd'];a74_0x3c88=function(){return _0x48d03b;};return a74_0x3c88();}const a74_0x191db2=a74_0x3fb2;(function(_0x44d108,_0x658ed){const _0xe6d094=a74_0x3fb2,_0xcde282=_0x44d108();while(!![]){try{const _0x718b5f=-parseInt(_0xe6d094(0xb5))/0x1+-parseInt(_0xe6d094(0x94))/0x2+parseInt(_0xe6d094(0x98))/0x3*(-parseInt(_0xe6d094(0xbb))/0x4)+parseInt(_0xe6d094(0x9e))/0x5*(-parseInt(_0xe6d094(0x9f))/0x6)+-parseInt(_0xe6d094(0xbd))/0x7*(-parseInt(_0xe6d094(0xbe))/0x8)+parseInt(_0xe6d094(0x96))/0x9*(parseInt(_0xe6d094(0xab))/0xa)+-parseInt(_0xe6d094(0x95))/0xb*(-parseInt(_0xe6d094(0x9d))/0xc);if(_0x718b5f===_0x658ed)break;else _0xcde282['push'](_0xcde282['shift']());}catch(_0x3cfad1){_0xcde282['push'](_0xcde282['shift']());}}}(a74_0x3c88,0xe036e));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a74_0x3fb2(_0x1fef36,_0x481e9a){_0x1fef36=_0x1fef36-0x91;const _0x3c8866=a74_0x3c88();let _0x3fb2b=_0x3c8866[_0x1fef36];return _0x3fb2b;}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(_0x393930){return{'appCode':_0x393930,'appName':_0x393930};}function writeInitConfig(_0x49cf1b,_0x246619,_0x43a0b8){const _0x521a6f=a74_0x3fb2,_0x9b9d69=resolveWriteConfigPath(_0x49cf1b),_0x2a92f8=buildCanonicalProjectConfig({},{'appCodes':_0x246619[_0x521a6f(0x91)](_0x78635e=>_0x78635e['appCode']),'env':_0x43a0b8,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x521a6f(0xb1)]()}});writeConfigFile(_0x9b9d69,_0x2a92f8);const _0xf1d8d6=_0x49cf1b==='global'?_0x521a6f(0x9c):_0x521a6f(0x9a);console['log'](_0x521a6f(0xc1)+_0xf1d8d6+'\x20config'),console[_0x521a6f(0x97)]('\x20\x20Apps:\x20'+_0x246619[_0x521a6f(0x91)](_0x3caff1=>_0x3caff1[_0x521a6f(0xac)])['join'](',\x20')),console[_0x521a6f(0x97)](_0x521a6f(0xb4)+_0x2a92f8[_0x521a6f(0xb8)]),console['log'](_0x521a6f(0x99)+_0x2a92f8['env']),console['log'](_0x521a6f(0xaa)+_0x9b9d69);}async function runSmartInit(_0x2cf9b3){const _0x54d48d=a74_0x3fb2,_0x176563=process['cwd'](),_0x1f10f0=_0x2cf9b3[_0x54d48d(0xb9)](_0x54d48d(0x9c))?_0x54d48d(0x9c):_0x54d48d(0x9a),_0x7eb9d6=_0x2cf9b3[_0x54d48d(0xa0)](_0x54d48d(0xc3))||'production',_0x49bbeb=_0x2cf9b3[_0x54d48d(0xa0)](_0x54d48d(0xa4))||undefined,_0x3d2f27=_0x2cf9b3[_0x54d48d(0xb9)]('project');if(_0x3d2f27){const {initConfig:_0x4bd937}=await import(_0x54d48d(0xc2));return _0x4bd937({'appcode':_0x49bbeb,'env':_0x7eb9d6,'autoYes':_0x2cf9b3[_0x54d48d(0xb9)](_0x54d48d(0xae))});}if(_0x1f10f0===_0x54d48d(0x9a)){const _0x51b95f=existsSync(resolve(_0x176563,NEW_CONFIG_NAME)),_0x3ef367=LEGACY_CONFIG_NAMES['some'](_0x550f16=>existsSync(resolve(_0x176563,_0x550f16)));if(_0x3ef367&&!_0x51b95f)return console['log'](_0x54d48d(0xba)),upgradeApp(_0x2cf9b3['nonInteractive'],{'yes':_0x2cf9b3['bool'](_0x54d48d(0xae))});if(_0x51b95f)throw CliErrors[_0x54d48d(0xbc)](_0x54d48d(0xaf),_0x54d48d(0xb0)+CLI_BIN_NAME+_0x54d48d(0xa3));}if(_0x49bbeb){const _0x1b49e7=validateAppcode(_0x49bbeb);if(!_0x1b49e7[_0x54d48d(0xb2)])throw CliErrors['validation'](_0x1b49e7[_0x54d48d(0xb7)]);writeInitConfig(_0x1f10f0,[syntheticApp(_0x49bbeb)],_0x7eb9d6);return;}if(_0x2cf9b3[_0x54d48d(0x9b)])throw CliErrors[_0x54d48d(0xad)](_0x54d48d(0xa4),_0x54d48d(0xa2)+CLI_BIN_NAME+_0x54d48d(0xb3));const _0x1d45a6=getCookie(),_0x17f755=await selectMultipleApps(_0x1d45a6),_0x1609ce=_0x17f755===_0x54d48d(0x93)?[syntheticApp(await promptCustomAppcode())]:_0x17f755;writeInitConfig(_0x1f10f0,_0x1609ce,_0x7eb9d6);}const initFlags=[{'name':a74_0x191db2(0x9c),'type':a74_0x191db2(0xa6),'description':a74_0x191db2(0xbf),'default':![]},{'name':a74_0x191db2(0xc3),'type':'string','description':a74_0x191db2(0xc4),'default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':a74_0x191db2(0xa4),'type':a74_0x191db2(0x92),'description':a74_0x191db2(0xa7)},{'name':'project','type':a74_0x191db2(0xa6),'description':a74_0x191db2(0xb6),'default':![]},{'name':a74_0x191db2(0xae),'type':a74_0x191db2(0xa6),'description':a74_0x191db2(0xa9),'default':![]}];export const initDefinitions=[{'service':a74_0x191db2(0xa1),'command':a74_0x191db2(0xa5),'description':a74_0x191db2(0xa8),'risk':a74_0x191db2(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x5ce65f){return await runSmartInit(_0x5ce65f),{'ok':!![]};}}];
@@ -0,0 +1 @@
1
+ function a75_0x1436(){const _0x5365c=['3vRXBOx','24iIDPRR','693429HPGBsE','1265725rBAvan','21mZtTog','245414LllYbF','60ZLZXeD','79074TDgwxQ','3076952Mksfgn','3035400QcduXW','420BhTfJF','2958374SyslSu'];a75_0x1436=function(){return _0x5365c;};return a75_0x1436();}(function(_0x328da7,_0x138a7c){const _0x1abb4f=a75_0x42d4,_0x1939d3=_0x328da7();while(!![]){try{const _0x218612=parseInt(_0x1abb4f(0x101))/0x1+-parseInt(_0x1abb4f(0xfb))/0x2*(parseInt(_0x1abb4f(0xfc))/0x3)+-parseInt(_0x1abb4f(0x104))/0x4+-parseInt(_0x1abb4f(0xff))/0x5*(-parseInt(_0x1abb4f(0xfd))/0x6)+-parseInt(_0x1abb4f(0x100))/0x7*(-parseInt(_0x1abb4f(0xf9))/0x8)+-parseInt(_0x1abb4f(0x103))/0x9*(-parseInt(_0x1abb4f(0xfa))/0xa)+parseInt(_0x1abb4f(0xfe))/0xb*(parseInt(_0x1abb4f(0x102))/0xc);if(_0x218612===_0x138a7c)break;else _0x1939d3['push'](_0x1939d3['shift']());}catch(_0x420187){_0x1939d3['push'](_0x1939d3['shift']());}}}(a75_0x1436,0xcb233));function a75_0x42d4(_0x27397d,_0x2e9745){_0x27397d=_0x27397d-0xf9;const _0x14361a=a75_0x1436();let _0x42d4ac=_0x14361a[_0x27397d];return _0x42d4ac;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
@@ -0,0 +1 @@
1
+ const a76_0x4d5c75=a76_0x1e35;(function(_0x126f66,_0x5eb88f){const _0x53cc10=a76_0x1e35,_0x37a907=_0x126f66();while(!![]){try{const _0x2f1793=parseInt(_0x53cc10(0xaf))/0x1+parseInt(_0x53cc10(0xb4))/0x2+-parseInt(_0x53cc10(0xa3))/0x3*(parseInt(_0x53cc10(0xb1))/0x4)+parseInt(_0x53cc10(0x9f))/0x5+parseInt(_0x53cc10(0xab))/0x6*(parseInt(_0x53cc10(0xb2))/0x7)+-parseInt(_0x53cc10(0xc3))/0x8+-parseInt(_0x53cc10(0xc2))/0x9*(parseInt(_0x53cc10(0xb3))/0xa);if(_0x2f1793===_0x5eb88f)break;else _0x37a907['push'](_0x37a907['shift']());}catch(_0x559ba1){_0x37a907['push'](_0x37a907['shift']());}}}(a76_0x4864,0xa7f32));function a76_0x4864(){const _0x22a797=['9153aqMgmv','title','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','length','Issue\x20description\x20file\x20is\x20empty:\x20','string','report','compress','3920628Aizuhh','Platform\x20issue\x20reported','descriptionFilePath','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','107698TGDTLK','cwd','1608POcGhc','7zkGuZY','100ctckGz','2728900qiZtwr','join','flagMissing','message','POST','description','inline','Issue\x20description\x20cannot\x20be\x20empty.','issue.title','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','otel://','descriptionFile:\x20','utf8','description-file','260847FNlyyc','7584808hgFscM','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','File\x20not\x20found:\x20','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','validation','descriptionSource:\x20','issue','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','descriptionSource','write','apiError','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','file','5133845jcIhNX','trim','One-line\x20issue\x20summary','str'];a76_0x4864=function(){return _0x22a797;};return a76_0x4864();}import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';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=a76_0x4d5c75(0xc1);export const issueReport={'service':a76_0x4d5c75(0xc9),'command':a76_0x4d5c75(0xa9),'description':a76_0x4d5c75(0xbd),'risk':a76_0x4d5c75(0x9b),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a76_0x4d5c75(0xaa),'flags':[{'name':a76_0x4d5c75(0xa4),'type':a76_0x4d5c75(0xa8),'required':!![],'description':a76_0x4d5c75(0xa1)},{'name':a76_0x4d5c75(0xb9),'type':a76_0x4d5c75(0xa8),'description':'Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)'},{'name':DESCRIPTION_FILE_FLAG,'type':'string','description':a76_0x4d5c75(0xae)}],async 'validate'(_0x4c29eb){const _0x2f2bfb=a76_0x4d5c75,_0x57f777=_0x4c29eb[_0x2f2bfb(0xa2)](_0x2f2bfb(0xa4))[_0x2f2bfb(0xa0)](),_0x3c9d49=_0x4c29eb[_0x2f2bfb(0xa2)](_0x2f2bfb(0xb9))[_0x2f2bfb(0xa0)](),_0x48b7db=_0x4c29eb[_0x2f2bfb(0xa2)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x57f777)throw CliErrors[_0x2f2bfb(0xb6)](_0x2f2bfb(0xa4),_0x2f2bfb(0xca));const _0x2baf6c=_0x3c9d49[_0x2f2bfb(0xa6)]>0x0,_0x59232f=_0x48b7db[_0x2f2bfb(0xa6)]>0x0;if(_0x2baf6c===_0x59232f)throw CliErrors[_0x2f2bfb(0xc7)](_0x2f2bfb(0xc6),_0x2f2bfb(0xa5));if(_0x59232f){const _0x55f07d=resolve(process[_0x2f2bfb(0xb0)](),_0x48b7db);if(!existsSync(_0x55f07d))throw CliErrors[_0x2f2bfb(0xc7)](_0x2f2bfb(0xc5)+_0x55f07d);}},async 'dryRun'(_0x2fee77){const _0x29f673=a76_0x4d5c75,_0xabfc1b=await prepareIssueReport(_0x2fee77);return{'method':_0x29f673(0xb8),'url':_0x29f673(0xbe)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0xabfc1b[_0x29f673(0xa4)],'issue.description':_0xabfc1b[_0x29f673(0xb9)]}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter',_0x29f673(0xc8)+_0xabfc1b[_0x29f673(0xcc)],_0xabfc1b[_0x29f673(0xad)]?_0x29f673(0xbf)+_0xabfc1b[_0x29f673(0xad)]:null]['filter'](Boolean)[_0x29f673(0xb5)]('\x0a')};},async 'execute'(_0x3789f5){const _0x159014=a76_0x4d5c75,_0x3b7c43=await prepareIssueReport(_0x3789f5);try{await sendPlatformIssueCollectLog({'title':_0x3b7c43[_0x159014(0xa4)],'description':_0x3b7c43[_0x159014(0xb9)]});}catch(_0x32c60f){throw CliErrors[_0x159014(0x9c)]('Failed\x20to\x20report\x20platform\x20issue:\x20'+(_0x32c60f instanceof Error?_0x32c60f[_0x159014(0xb7)]:String(_0x32c60f)),_0x159014(0xcb));}return{'ok':!![],'message':_0x159014(0xac),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x159014(0xbc),'issue.description'],'issue':{'title':_0x3b7c43[_0x159014(0xa4)],'descriptionLength':_0x3b7c43['description']['length'],'descriptionSource':_0x3b7c43[_0x159014(0xcc)],..._0x3b7c43['descriptionFilePath']?{'descriptionFile':_0x3b7c43[_0x159014(0xad)]}:{}}}};}};function a76_0x1e35(_0x52cfb1,_0x4ad842){_0x52cfb1=_0x52cfb1-0x9b;const _0x48642e=a76_0x4864();let _0x1e35ec=_0x48642e[_0x52cfb1];return _0x1e35ec;}async function prepareIssueReport(_0x1fcaf9){const _0x34332a=a76_0x4d5c75,_0x14a1cf=_0x1fcaf9[_0x34332a(0xa2)](_0x34332a(0xa4))[_0x34332a(0xa0)](),_0x25396b=_0x1fcaf9['str'](_0x34332a(0xb9)),_0x543377=_0x1fcaf9[_0x34332a(0xa2)](DESCRIPTION_FILE_FLAG)[_0x34332a(0xa0)]();if(!_0x543377){const _0x10afd8=_0x25396b;if(!_0x10afd8[_0x34332a(0xa0)]())throw CliErrors[_0x34332a(0xc7)](_0x34332a(0xbb),_0x34332a(0x9d));return{'title':_0x14a1cf,'description':_0x10afd8,'descriptionSource':_0x34332a(0xba)};}const _0x1db059=resolve(process['cwd'](),_0x543377),_0x110e64=await readFile(_0x1db059,_0x34332a(0xc0));if(!_0x110e64[_0x34332a(0xa0)]())throw CliErrors[_0x34332a(0xc7)](_0x34332a(0xa7)+_0x1db059,_0x34332a(0xc4));return{'title':_0x14a1cf,'description':_0x110e64,'descriptionSource':_0x34332a(0x9e),'descriptionFilePath':_0x1db059};}
@@ -1 +1 @@
1
- const a70_0x1d8fba=a70_0x3829;(function(_0x41d2b3,_0x45328a){const _0xc4bd13=a70_0x3829,_0x21f18e=_0x41d2b3();while(!![]){try{const _0x407da6=-parseInt(_0xc4bd13(0x139))/0x1*(parseInt(_0xc4bd13(0x130))/0x2)+parseInt(_0xc4bd13(0x141))/0x3+-parseInt(_0xc4bd13(0x12d))/0x4+parseInt(_0xc4bd13(0x133))/0x5+-parseInt(_0xc4bd13(0x13f))/0x6+parseInt(_0xc4bd13(0x13d))/0x7+-parseInt(_0xc4bd13(0x147))/0x8*(-parseInt(_0xc4bd13(0x137))/0x9);if(_0x407da6===_0x45328a)break;else _0x21f18e['push'](_0x21f18e['shift']());}catch(_0x591d8f){_0x21f18e['push'](_0x21f18e['shift']());}}}(a70_0x1997,0x76651));import{logger}from'../../utils/logger.js';function printLogs(_0x22d3f4){const _0x157cc3=a70_0x3829;if(_0x22d3f4[_0x157cc3(0x146)]===0x0){console[_0x157cc3(0x12e)](_0x157cc3(0x14c));return;}console[_0x157cc3(0x12e)](_0x157cc3(0x14a)),_0x22d3f4['forEach']((_0x295832,_0x1f456c)=>{const _0x74eb94=_0x157cc3,_0x3fd4af=new Date(_0x295832[_0x74eb94(0x13a)])['toLocaleString'](_0x74eb94(0x13c)),_0x4eb034=_0x295832['level']===_0x74eb94(0x145)?'√':_0x295832[_0x74eb94(0x144)]===_0x74eb94(0x140)?'×':_0x295832[_0x74eb94(0x144)]==='warn'?'!':'i';console['log'](_0x1f456c+0x1+'.\x20'+_0x4eb034+'\x20['+_0x295832[_0x74eb94(0x148)]+']\x20'+_0x295832[_0x74eb94(0x138)]),console[_0x74eb94(0x12e)](_0x74eb94(0x143)+_0x3fd4af),_0x295832[_0x74eb94(0x149)]&&console[_0x74eb94(0x12e)](_0x74eb94(0x13b)+_0x295832['duration']+'ms'),_0x295832['details']&&Object['keys'](_0x295832[_0x74eb94(0x134)])['length']>0x0&&console[_0x74eb94(0x12e)](_0x74eb94(0x12f)+JSON[_0x74eb94(0x142)](_0x295832['details'],null,0x2)),console[_0x74eb94(0x12e)]('');});}export const logsDefinitions=[{'service':'logs','command':a70_0x1d8fba(0x136),'description':'View\x20command\x20history\x20logs','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1b01c2){const _0x7c44d8=a70_0x1d8fba;return printLogs(logger[_0x7c44d8(0x131)]()),{'ok':!![]};}},{'service':'logs','command':a70_0x1d8fba(0x135),'description':'Clear\x20command\x20history\x20logs','risk':a70_0x1d8fba(0x132),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x99408d){const _0x30f58e=a70_0x1d8fba;return logger[_0x30f58e(0x14b)](),console[_0x30f58e(0x12e)](_0x30f58e(0x13e)),{'ok':!![]};}}];function a70_0x3829(_0x447cf7,_0x2b22c3){_0x447cf7=_0x447cf7-0x12d;const _0x1997b7=a70_0x1997();let _0x382946=_0x1997b7[_0x447cf7];return _0x382946;}function a70_0x1997(){const _0x3d8fef=['1078068StJryp','stringify','\x20\x20\x20Time:\x20','level','success','length','808lRGvGL','command','duration','*\x20Lovrabet\x20CLI\x20logs:\x0a','clearLogs','*\x20No\x20logs\x20found','724928DzoAdz','log','\x20\x20\x20Details:\x20','104OrIzbY','readLogs','write','4252175nUBNqj','details','clear','show','13329JaMvpq','message','7327rdNJoj','timestamp','\x20\x20\x20Duration:\x20','en-US','938539eauOmO','*\x20Logs\x20cleared','2677608wZffdw','error'];a70_0x1997=function(){return _0x3d8fef;};return a70_0x1997();}
1
+ function a77_0x501c(_0x53bd93,_0x3f378e){_0x53bd93=_0x53bd93-0xb4;const _0x5f366a=a77_0x5f36();let _0x501ca3=_0x5f366a[_0x53bd93];return _0x501ca3;}function a77_0x5f36(){const _0x4b04fb=['Clear\x20command\x20history\x20logs','33507njxxMS','clear','14014XSZeno','read','show','490975sHHvlS','level','log','*\x20Logs\x20cleared','*\x20No\x20logs\x20found','readLogs','duration','length','\x20\x20\x20Duration:\x20','logs','success','7835030rFModQ','timestamp','toLocaleString','clearLogs','9508296AqrTCG','39ibnKvf','*\x20Lovrabet\x20CLI\x20logs:\x0a','840167aZtvmJ','details','warn','View\x20command\x20history\x20logs','3470FvRBvw','\x20\x20\x20Details:\x20','12KNYmnE','8054508kiHIva','stringify','error'];a77_0x5f36=function(){return _0x4b04fb;};return a77_0x5f36();}const a77_0x1f6311=a77_0x501c;(function(_0x45ea15,_0x375ccd){const _0x45bc92=a77_0x501c,_0x39a9ac=_0x45ea15();while(!![]){try{const _0x4f339f=parseInt(_0x45bc92(0xb5))/0x1+-parseInt(_0x45bc92(0xc2))/0x2*(-parseInt(_0x45bc92(0xd5))/0x3)+parseInt(_0x45bc92(0xbb))/0x4*(parseInt(_0x45bc92(0xc5))/0x5)+-parseInt(_0x45bc92(0xbc))/0x6+parseInt(_0x45bc92(0xd0))/0x7+parseInt(_0x45bc92(0xd4))/0x8+-parseInt(_0x45bc92(0xc0))/0x9*(parseInt(_0x45bc92(0xb9))/0xa);if(_0x4f339f===_0x375ccd)break;else _0x39a9ac['push'](_0x39a9ac['shift']());}catch(_0x36d676){_0x39a9ac['push'](_0x39a9ac['shift']());}}}(a77_0x5f36,0xdb92b));import{logger}from'../../utils/logger.js';function printLogs(_0x22d4d5){const _0x2edc28=a77_0x501c;if(_0x22d4d5[_0x2edc28(0xcc)]===0x0){console[_0x2edc28(0xc7)](_0x2edc28(0xc9));return;}console[_0x2edc28(0xc7)](_0x2edc28(0xb4)),_0x22d4d5['forEach']((_0xacc714,_0x1a7e30)=>{const _0x138e1d=_0x2edc28,_0x117d33=new Date(_0xacc714[_0x138e1d(0xd1)])[_0x138e1d(0xd2)]('en-US'),_0x4af562=_0xacc714[_0x138e1d(0xc6)]===_0x138e1d(0xcf)?'√':_0xacc714[_0x138e1d(0xc6)]===_0x138e1d(0xbe)?'×':_0xacc714[_0x138e1d(0xc6)]===_0x138e1d(0xb7)?'!':'i';console[_0x138e1d(0xc7)](_0x1a7e30+0x1+'.\x20'+_0x4af562+'\x20['+_0xacc714['command']+']\x20'+_0xacc714['message']),console[_0x138e1d(0xc7)]('\x20\x20\x20Time:\x20'+_0x117d33),_0xacc714[_0x138e1d(0xcb)]&&console['log'](_0x138e1d(0xcd)+_0xacc714[_0x138e1d(0xcb)]+'ms'),_0xacc714[_0x138e1d(0xb6)]&&Object['keys'](_0xacc714[_0x138e1d(0xb6)])[_0x138e1d(0xcc)]>0x0&&console['log'](_0x138e1d(0xba)+JSON[_0x138e1d(0xbd)](_0xacc714[_0x138e1d(0xb6)],null,0x2)),console[_0x138e1d(0xc7)]('');});}export const logsDefinitions=[{'service':'logs','command':a77_0x1f6311(0xc4),'description':a77_0x1f6311(0xb8),'risk':a77_0x1f6311(0xc3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x460522){const _0x5e640a=a77_0x1f6311;return printLogs(logger[_0x5e640a(0xca)]()),{'ok':!![]};}},{'service':a77_0x1f6311(0xce),'command':a77_0x1f6311(0xc1),'description':a77_0x1f6311(0xbf),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x11a009){const _0x2c459c=a77_0x1f6311;return logger[_0x2c459c(0xd3)](),console[_0x2c459c(0xc7)](_0x2c459c(0xc8)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x2a65e1,_0x333acd){const _0xdb6dd5=a71_0x51fe,_0x334077=_0x2a65e1();while(!![]){try{const _0x2730ed=-parseInt(_0xdb6dd5(0x162))/0x1*(parseInt(_0xdb6dd5(0x165))/0x2)+parseInt(_0xdb6dd5(0x163))/0x3*(-parseInt(_0xdb6dd5(0x16c))/0x4)+parseInt(_0xdb6dd5(0x168))/0x5+parseInt(_0xdb6dd5(0x169))/0x6*(parseInt(_0xdb6dd5(0x164))/0x7)+parseInt(_0xdb6dd5(0x16b))/0x8*(-parseInt(_0xdb6dd5(0x16a))/0x9)+-parseInt(_0xdb6dd5(0x166))/0xa*(parseInt(_0xdb6dd5(0x167))/0xb)+parseInt(_0xdb6dd5(0x16d))/0xc;if(_0x2730ed===_0x333acd)break;else _0x334077['push'](_0x334077['shift']());}catch(_0x2f74e9){_0x334077['push'](_0x334077['shift']());}}}(a71_0x36f2,0xd6273));function a71_0x51fe(_0x519097,_0x5c36a9){_0x519097=_0x519097-0x162;const _0x36f208=a71_0x36f2();let _0x51fe4a=_0x36f208[_0x519097];return _0x51fe4a;}import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a71_0x36f2(){const _0x4f043d=['14mXtRvb','745270OaAbQD','13402430cpcAtJ','11pfoIll','3332000wbkAlx','4307994OakYgE','9KviBWn','11675744kVvvyC','4JShCgr','37262640icZero','4JxNizh','120588xINaeF'];a71_0x36f2=function(){return _0x4f043d;};return a71_0x36f2();}export const menuDefinitions=[menuSync,menuUpdate];
1
+ function a78_0x28f6(_0x3bc8a3,_0x155c32){_0x3bc8a3=_0x3bc8a3-0x17b;const _0x4a40f1=a78_0x4a40();let _0x28f625=_0x4a40f1[_0x3bc8a3];return _0x28f625;}(function(_0x2fe508,_0x24792d){const _0x22c8f0=a78_0x28f6,_0x293607=_0x2fe508();while(!![]){try{const _0x21e553=parseInt(_0x22c8f0(0x183))/0x1+parseInt(_0x22c8f0(0x17b))/0x2*(parseInt(_0x22c8f0(0x182))/0x3)+-parseInt(_0x22c8f0(0x17e))/0x4+parseInt(_0x22c8f0(0x184))/0x5+-parseInt(_0x22c8f0(0x17f))/0x6*(parseInt(_0x22c8f0(0x17c))/0x7)+parseInt(_0x22c8f0(0x17d))/0x8*(parseInt(_0x22c8f0(0x181))/0x9)+-parseInt(_0x22c8f0(0x180))/0xa*(-parseInt(_0x22c8f0(0x185))/0xb);if(_0x21e553===_0x24792d)break;else _0x293607['push'](_0x293607['shift']());}catch(_0x1cd48d){_0x293607['push'](_0x293607['shift']());}}}(a78_0x4a40,0x80e11));import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a78_0x4a40(){const _0x4f89d0=['55NJOOcO','46110vvSlkO','210xcovMc','2236144mzXiwW','4047000HQDUEe','185178VVyslw','1028180xDeHbi','9wpzUdf','105CTkPBQ','349487aUSwgw','2577545qCThXf'];a78_0x4a40=function(){return _0x4f89d0;};return a78_0x4a40();}export const menuDefinitions=[menuSync,menuUpdate];
@@ -1 +1 @@
1
- (function(_0xfc90be,_0x42204d){const _0x35e75f=a72_0x2b21,_0x457cf3=_0xfc90be();while(!![]){try{const _0x4c7417=-parseInt(_0x35e75f(0xd8))/0x1+parseInt(_0x35e75f(0xe4))/0x2+-parseInt(_0x35e75f(0xe5))/0x3+parseInt(_0x35e75f(0xd9))/0x4*(parseInt(_0x35e75f(0xde))/0x5)+-parseInt(_0x35e75f(0xe0))/0x6+parseInt(_0x35e75f(0xdf))/0x7*(parseInt(_0x35e75f(0xdb))/0x8)+parseInt(_0x35e75f(0xe1))/0x9;if(_0x4c7417===_0x42204d)break;else _0x457cf3['push'](_0x457cf3['shift']());}catch(_0x35003f){_0x457cf3['push'](_0x457cf3['shift']());}}}(a72_0x5efa,0xafb23));function strWidth(_0x2ee206){const _0x558db0=a72_0x2b21;let _0x850303=0x0;for(const _0x3a9faf of _0x2ee206){_0x850303+=/[\u4e00-\u9fa5]/[_0x558db0(0xd1)](_0x3a9faf)?0x2:0x1;}return _0x850303;}function padRight(_0x31ba6f,_0x28c537){const _0xb2a585=a72_0x2b21,_0x29ff48=strWidth(_0x31ba6f);return _0x31ba6f+'\x20'[_0xb2a585(0xe3)](Math['max'](0x0,_0x28c537-_0x29ff48));}function a72_0x2b21(_0x36f818,_0x39620a){_0x36f818=_0x36f818-0xcf;const _0x5efaff=a72_0x5efa();let _0x2b21ab=_0x5efaff[_0x36f818];return _0x2b21ab;}export function renderCompareTable(_0x4767ea,_0x2be282={}){const _0x4e3f58=a72_0x2b21;if(_0x4767ea[_0x4e3f58(0xe6)]===0x0)return'';const _0x2a76ff=_0x2be282['showOnline']??!![],_0x2e8d29=Math['max'](0x1e,..._0x4767ea['map'](_0x3541b8=>strWidth(_0x3541b8[_0x4e3f58(0xd0)]))),_0x756ec5=0x4,_0x355e25=[],_0x32aa5e='\x20\x20'+padRight(_0x4e3f58(0xd3),_0x2e8d29),_0x2bb0bd=padRight(_0x4e3f58(0xcf),_0x756ec5),_0x431de0=_0x2a76ff?'\x20\x20'+padRight(_0x4e3f58(0xd7),_0x756ec5):'';_0x355e25[_0x4e3f58(0xdd)](_0x32aa5e+'\x20\x20'+_0x2bb0bd+(_0x2a76ff?_0x431de0:'')),_0x355e25[_0x4e3f58(0xdd)]('\x20\x20'+'─'[_0x4e3f58(0xe3)](_0x2e8d29)+'\x20\x20'+'─'[_0x4e3f58(0xe3)](_0x756ec5)+(_0x2a76ff?'\x20\x20'+'─'[_0x4e3f58(0xe3)](_0x756ec5):''));for(const _0x4df8af of _0x4767ea){const _0x4e5178=padRight(_0x4df8af[_0x4e3f58(0xd0)],_0x2e8d29),_0x3ef4c3=_0x4df8af[_0x4e3f58(0xe8)]?'✓':'✗',_0x3b32e3=padRight(_0x3ef4c3,_0x756ec5);let _0x38b90e='\x20\x20'+_0x4e5178+'\x20\x20'+_0x3b32e3;if(_0x2a76ff){const _0x31b373=_0x4df8af[_0x4e3f58(0xda)]?'✓':'✗';_0x38b90e+='\x20\x20'+padRight(_0x31b373,_0x756ec5);}_0x355e25[_0x4e3f58(0xdd)](_0x38b90e);}return _0x355e25[_0x4e3f58(0xd6)]('\x0a');}export function renderSyncSummary(_0x24faef,_0x148f89){const _0x26bab6=a72_0x2b21;if(_0x24faef[_0x26bab6(0xe6)]===0x0)return _0x148f89?_0x26bab6(0xd4):_0x26bab6(0xe7);const _0x2cf710=['\x20\x20'+_0x24faef[_0x26bab6(0xe6)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x4cb964 of _0x24faef){_0x2cf710['push'](_0x26bab6(0xdc)+_0x4cb964[_0x26bab6(0xd0)]+'\x20('+_0x4cb964['path']+')');}return _0x2cf710[_0x26bab6(0xd6)]('\x0a');}export function renderUpdateSummary(_0x1c0a9e,_0x1ef609){const _0x5a07ab=a72_0x2b21;if(_0x1c0a9e['length']===0x0)return _0x5a07ab(0xe2);const _0x1b6d3a=['\x20\x20'+_0x1c0a9e[_0x5a07ab(0xe6)]+_0x5a07ab(0xd5),'\x20\x20\x20\x20JS:\x20\x20'+(_0x1ef609[0x0]??'(unchanged)'),'\x20\x20\x20\x20CSS:\x20'+(_0x1ef609[0x1]??'(unchanged)'),'',_0x5a07ab(0xd2)+_0x1c0a9e[_0x5a07ab(0xd6)](',\x20')];return _0x1b6d3a[_0x5a07ab(0xd6)]('\x0a');}function a72_0x5efa(){const _0x403630=['push','6698455neVCLW','5189506DyvvUN','6163026llOPqS','3418515OnRcGU','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','repeat','1498306eBafak','1473255VeMvyC','length','\x20\x20No\x20pages\x20to\x20sync.','local','Local','label','test','\x20\x20Affected\x20menus:\x20','Menu\x20Name','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','join','Platform','972130FucUQo','4wJcwpX','online','8MdFMBj','\x20\x20\x20\x20•\x20'];a72_0x5efa=function(){return _0x403630;};return a72_0x5efa();}
1
+ (function(_0x8c120c,_0x40300e){const _0xf4154=a79_0x3b45,_0x3fea90=_0x8c120c();while(!![]){try{const _0x583c1c=-parseInt(_0xf4154(0x89))/0x1*(-parseInt(_0xf4154(0x95))/0x2)+-parseInt(_0xf4154(0x8d))/0x3+parseInt(_0xf4154(0x87))/0x4+parseInt(_0xf4154(0x7e))/0x5+-parseInt(_0xf4154(0x90))/0x6*(parseInt(_0xf4154(0x8b))/0x7)+parseInt(_0xf4154(0x96))/0x8*(-parseInt(_0xf4154(0x8e))/0x9)+parseInt(_0xf4154(0x88))/0xa;if(_0x583c1c===_0x40300e)break;else _0x3fea90['push'](_0x3fea90['shift']());}catch(_0xdde13d){_0x3fea90['push'](_0x3fea90['shift']());}}}(a79_0x11f9,0x38203));function a79_0x3b45(_0x53740d,_0x422fcf){_0x53740d=_0x53740d-0x7c;const _0x11f932=a79_0x11f9();let _0x3b453a=_0x11f932[_0x53740d];return _0x3b453a;}function strWidth(_0x280684){const _0x41c51a=a79_0x3b45;let _0x460281=0x0;for(const _0xe347f5 of _0x280684){_0x460281+=/[\u4e00-\u9fa5]/[_0x41c51a(0x84)](_0xe347f5)?0x2:0x1;}return _0x460281;}function padRight(_0x3267ae,_0x1f13cd){const _0x5d80b3=a79_0x3b45,_0x39bc2b=strWidth(_0x3267ae);return _0x3267ae+'\x20'[_0x5d80b3(0x82)](Math[_0x5d80b3(0x97)](0x0,_0x1f13cd-_0x39bc2b));}export function renderCompareTable(_0x338800,_0x5472e5={}){const _0x26e43e=a79_0x3b45;if(_0x338800[_0x26e43e(0x98)]===0x0)return'';const _0x45c8a3=_0x5472e5['showOnline']??!![],_0x5e3453=Math[_0x26e43e(0x97)](0x1e,..._0x338800[_0x26e43e(0x8c)](_0x2a6713=>strWidth(_0x2a6713[_0x26e43e(0x85)]))),_0x335012=0x4,_0x2817eb=[],_0x5803bb='\x20\x20'+padRight(_0x26e43e(0x86),_0x5e3453),_0x33ec2b=padRight(_0x26e43e(0x7f),_0x335012),_0x496d86=_0x45c8a3?'\x20\x20'+padRight(_0x26e43e(0x7c),_0x335012):'';_0x2817eb[_0x26e43e(0x93)](_0x5803bb+'\x20\x20'+_0x33ec2b+(_0x45c8a3?_0x496d86:'')),_0x2817eb[_0x26e43e(0x93)]('\x20\x20'+'─'[_0x26e43e(0x82)](_0x5e3453)+'\x20\x20'+'─'[_0x26e43e(0x82)](_0x335012)+(_0x45c8a3?'\x20\x20'+'─'[_0x26e43e(0x82)](_0x335012):''));for(const _0x3ac19c of _0x338800){const _0x1d7f9d=padRight(_0x3ac19c[_0x26e43e(0x85)],_0x5e3453),_0x571e90=_0x3ac19c[_0x26e43e(0x94)]?'✓':'✗',_0x57db37=padRight(_0x571e90,_0x335012);let _0x184c29='\x20\x20'+_0x1d7f9d+'\x20\x20'+_0x57db37;if(_0x45c8a3){const _0xd1f784=_0x3ac19c[_0x26e43e(0x91)]?'✓':'✗';_0x184c29+='\x20\x20'+padRight(_0xd1f784,_0x335012);}_0x2817eb['push'](_0x184c29);}return _0x2817eb[_0x26e43e(0x8a)]('\x0a');}export function renderSyncSummary(_0x366cbc,_0xe2b0ba){const _0x1b8475=a79_0x3b45;if(_0x366cbc['length']===0x0)return _0xe2b0ba?_0x1b8475(0x80):'\x20\x20No\x20pages\x20to\x20sync.';const _0x4c08f3=['\x20\x20'+_0x366cbc[_0x1b8475(0x98)]+_0x1b8475(0x81)];for(const _0x55fbe8 of _0x366cbc){_0x4c08f3['push'](_0x1b8475(0x83)+_0x55fbe8[_0x1b8475(0x85)]+'\x20('+_0x55fbe8[_0x1b8475(0x8f)]+')');}return _0x4c08f3[_0x1b8475(0x8a)]('\x0a');}function a79_0x11f9(){const _0x130d06=['4iNTBmZ','8SBpAWe','max','length','Platform','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','1292330qfYxrI','Local','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','repeat','\x20\x20\x20\x20•\x20','test','label','Menu\x20Name','885120MlRGYK','2575820ETnKLs','90905VuYFgb','join','3283uKozZp','map','369930qukmIQ','2784546LfrGbX','path','3282RfKieQ','online','(unchanged)','push','local'];a79_0x11f9=function(){return _0x130d06;};return a79_0x11f9();}export function renderUpdateSummary(_0x243cc4,_0x489ccb){const _0x513039=a79_0x3b45;if(_0x243cc4[_0x513039(0x98)]===0x0)return _0x513039(0x7d);const _0x32301f=['\x20\x20'+_0x243cc4[_0x513039(0x98)]+'\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','\x20\x20\x20\x20JS:\x20\x20'+(_0x489ccb[0x0]??_0x513039(0x92)),'\x20\x20\x20\x20CSS:\x20'+(_0x489ccb[0x1]??_0x513039(0x92)),'','\x20\x20Affected\x20menus:\x20'+_0x243cc4['join'](',\x20')];return _0x32301f[_0x513039(0x8a)]('\x0a');}
@@ -1 +1 @@
1
- (function(_0x31b6f1,_0x3c90be){var _0x323ee8=a73_0x5d90,_0x45cf49=_0x31b6f1();while(!![]){try{var _0x2659a4=-parseInt(_0x323ee8(0x150))/0x1+parseInt(_0x323ee8(0x151))/0x2*(-parseInt(_0x323ee8(0x148))/0x3)+parseInt(_0x323ee8(0x14c))/0x4*(-parseInt(_0x323ee8(0x152))/0x5)+parseInt(_0x323ee8(0x14b))/0x6+-parseInt(_0x323ee8(0x153))/0x7*(parseInt(_0x323ee8(0x14d))/0x8)+-parseInt(_0x323ee8(0x14f))/0x9*(parseInt(_0x323ee8(0x14e))/0xa)+-parseInt(_0x323ee8(0x149))/0xb*(-parseInt(_0x323ee8(0x14a))/0xc);if(_0x2659a4===_0x3c90be)break;else _0x45cf49['push'](_0x45cf49['shift']());}catch(_0x4d3e38){_0x45cf49['push'](_0x45cf49['shift']());}}}(a73_0x40f7,0xc2db4));function a73_0x40f7(){var _0xef8e10=['1424143mtIkye','3VaPhow','11IfdcsW','58588668xzmWFX','2929086JrPOHH','528twAlvg','16HybDzV','6070fSjyGV','17361vhSBcJ','697744zfcpdz','2184786XMGamH','45625TeyZvX'];a73_0x40f7=function(){return _0xef8e10;};return a73_0x40f7();}function a73_0x5d90(_0x537ee9,_0x362172){_0x537ee9=_0x537ee9-0x148;var _0x40f7c7=a73_0x40f7();var _0x5d90ba=_0x40f7c7[_0x537ee9];return _0x5d90ba;}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';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(_0x2829d5,_0x145e2b){var _0x492a50=a80_0x56f6,_0x17ab0b=_0x2829d5();while(!![]){try{var _0x26cb9a=-parseInt(_0x492a50(0x15a))/0x1+parseInt(_0x492a50(0x15e))/0x2*(-parseInt(_0x492a50(0x15b))/0x3)+-parseInt(_0x492a50(0x162))/0x4+parseInt(_0x492a50(0x163))/0x5*(parseInt(_0x492a50(0x15f))/0x6)+parseInt(_0x492a50(0x164))/0x7*(parseInt(_0x492a50(0x160))/0x8)+-parseInt(_0x492a50(0x15d))/0x9*(parseInt(_0x492a50(0x161))/0xa)+parseInt(_0x492a50(0x15c))/0xb;if(_0x26cb9a===_0x145e2b)break;else _0x17ab0b['push'](_0x17ab0b['shift']());}catch(_0x149243){_0x17ab0b['push'](_0x17ab0b['shift']());}}}(a80_0x5edc,0xaf629));function a80_0x5edc(){var _0x7beffa=['110dcEjZS','2978340bLIFKO','1602215junlPe','1325737UUYCZR','688687wBsMxX','316710YGKzNI','24075898MeWYtR','310761nbozlQ','20pKZfuQ','12JxTQGr','32sTkHqT'];a80_0x5edc=function(){return _0x7beffa;};return a80_0x5edc();}function a80_0x56f6(_0x5c6b17,_0x44809e){_0x5c6b17=_0x5c6b17-0x15a;var _0x5edc00=a80_0x5edc();var _0x56f63d=_0x5edc00[_0x5c6b17];return _0x56f63d;}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';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
@@ -1 +1 @@
1
- (function(_0x266cfd,_0x4cfa9f){const _0x3135a0=a74_0x5c79,_0x18ecc4=_0x266cfd();while(!![]){try{const _0x5b08b3=parseInt(_0x3135a0(0x10a))/0x1+-parseInt(_0x3135a0(0xfa))/0x2*(-parseInt(_0x3135a0(0x105))/0x3)+parseInt(_0x3135a0(0x108))/0x4+parseInt(_0x3135a0(0x100))/0x5+parseInt(_0x3135a0(0xf8))/0x6+-parseInt(_0x3135a0(0x118))/0x7+-parseInt(_0x3135a0(0x111))/0x8*(parseInt(_0x3135a0(0x104))/0x9);if(_0x5b08b3===_0x4cfa9f)break;else _0x18ecc4['push'](_0x18ecc4['shift']());}catch(_0x42bde2){_0x18ecc4['push'](_0x18ecc4['shift']());}}}(a74_0x3eee,0x28a91));import a74_0x2ceef1 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a74_0x886356 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x504db4){const _0x3cbfb4=a74_0x5c79;return _0x504db4[_0x3cbfb4(0x109)](_0xfafd6f=>{const _0x2e7af0=_0x3cbfb4;if(_0xfafd6f?.[_0x2e7af0(0x10c)]==='ExitPromptError')throw CliErrors[_0x2e7af0(0xfc)](_0x2e7af0(0xf1));throw _0xfafd6f;});}export function startSpinner(_0x364e58){const _0xf64ef7=a74_0x5c79;return a74_0x886356({'text':_0x364e58,'color':_0xf64ef7(0x10d)})[_0xf64ef7(0x101)]();}function a74_0x5c79(_0x4b5788,_0x125b8e){_0x4b5788=_0x4b5788-0xef;const _0x3eee8a=a74_0x3eee();let _0x5c796c=_0x3eee8a[_0x4b5788];return _0x5c796c;}export function stopSpinner(_0x28b667,_0x2ac6a0,_0x3eb2c2){const _0x5756b6=a74_0x5c79;_0x3eb2c2?_0x28b667[_0x5756b6(0x10e)](_0x2ac6a0):_0x28b667[_0x5756b6(0xf0)](_0x2ac6a0);}export async function askConfirm(_0xa43186){return onCancel(confirm({'message':_0xa43186,'theme':{'prefix':''}}));}function a74_0x3eee(){const _0x30b408=['gray','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','18ncPbPC','384645nyVhNo','JS\x20URL\x20checked','test','132360KZZpGS','catch','27024aeXihH','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','name','cyan','succeed','CSS\x20URL\x20checked','No\x20menus\x20selected.','1664360ElFKnb','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','length','isTTY','includes','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','filter','576303lAaxux','\x20\x20Checking\x20JS\x20URL\x20reachability...','has','label','red','stdin','fail','Cancelled.','No\x20local\x20pages\x20found.','map','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','\x20\x20CSS\x20URL:','[already\x20on\x20platform]','\x20\x20Checking\x20CSS\x20URL\x20reachability...','1668378VjFpBm','green','2CNkQcP','error','cancelled','path','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','trim','992860mzdTzX','start'];a74_0x3eee=function(){return _0x30b408;};return a74_0x3eee();}export async function askJsUrl(_0x3ff095){const _0x73adab=a74_0x5c79;while(!![]){const _0x5d10c5=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x3ff095,'theme':{'prefix':''}}));if(_0x5d10c5['trim']()==='')throw CliErrors[_0x73adab(0xfc)](_0x73adab(0xf1));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x73adab(0x107)](_0x5d10c5['trim']())){console[_0x73adab(0xfb)](a74_0x2ceef1[_0x73adab(0x11c)](_0x73adab(0x103)));continue;}const _0x223de6=startSpinner(_0x73adab(0x119));try{const _0x4b7504=await isUrlReachable(_0x5d10c5[_0x73adab(0xff)]());stopSpinner(_0x223de6,_0x73adab(0x106),_0x4b7504);if(!_0x4b7504){console[_0x73adab(0xfb)](a74_0x2ceef1[_0x73adab(0x11c)](_0x73adab(0x116)));continue;}return _0x5d10c5['trim']();}catch(_0x3a7790){stopSpinner(_0x223de6,'JS\x20URL\x20check\x20failed',![]);throw _0x3a7790;}}}export async function askCssUrl(_0x5d1cf7){const _0x321c65=a74_0x5c79;while(!![]){const _0x5e281b=await onCancel(input({'message':_0x321c65(0xf5),'default':_0x5d1cf7,'theme':{'prefix':''}}));if(_0x5e281b['trim']()==='')throw CliErrors[_0x321c65(0xfc)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x5e281b['trim']())){console[_0x321c65(0xfb)](a74_0x2ceef1[_0x321c65(0x11c)](_0x321c65(0x10b)));continue;}const _0x5780bd=startSpinner(_0x321c65(0xf7));try{const _0x17bee6=await isUrlReachable(_0x5e281b[_0x321c65(0xff)]());stopSpinner(_0x5780bd,_0x321c65(0x10f),_0x17bee6);if(!_0x17bee6){console[_0x321c65(0xfb)](a74_0x2ceef1[_0x321c65(0x11c)](_0x321c65(0xfe)));continue;}return _0x5e281b['trim']();}catch(_0x54efb6){stopSpinner(_0x5780bd,'CSS\x20URL\x20check\x20failed',![]);throw _0x54efb6;}}}export async function selectPages(_0x167c0f,_0x522719,_0x49284b){const _0x41f94b=a74_0x5c79,_0xe841b5=_0x167c0f[_0x41f94b(0xf3)](_0x58d0ff=>({'name':_0x58d0ff[_0x41f94b(0x11b)]+'\x20\x20'+(_0x522719[_0x41f94b(0x11a)](_0x58d0ff[_0x41f94b(0xfd)])?a74_0x2ceef1[_0x41f94b(0x102)](_0x41f94b(0xf6)):a74_0x2ceef1[_0x41f94b(0xf9)]('[new]')),'value':_0x58d0ff['label'],'checked':_0x49284b?_0x49284b[_0x41f94b(0x115)](_0x58d0ff[_0x41f94b(0x11b)]):!_0x522719[_0x41f94b(0x11a)](_0x58d0ff[_0x41f94b(0xfd)])}));if(_0xe841b5[_0x41f94b(0x113)]===0x0)throw new Error(_0x41f94b(0xf2));const _0x5e661f=await onCancel(checkbox({'message':_0x41f94b(0x112),'choices':_0xe841b5,'loop':![],'theme':{'prefix':''}}));if(_0x5e661f[_0x41f94b(0x113)]===0x0)throw new Error(_0x41f94b(0x110));return _0x167c0f[_0x41f94b(0x117)](_0x6f0520=>_0x5e661f['includes'](_0x6f0520[_0x41f94b(0x11b)]));}export function isInteractive(){const _0xe19f3e=a74_0x5c79;return process[_0xe19f3e(0xef)][_0xe19f3e(0x114)]===!![];}export function requireInteractive(){const _0x54ffea=a74_0x5c79;if(!isInteractive())throw new Error(_0x54ffea(0xf4)+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
1
+ (function(_0x513121,_0x591dbe){const _0x26ee53=a81_0x40f4,_0xd39b29=_0x513121();while(!![]){try{const _0x300853=parseInt(_0x26ee53(0x209))/0x1+parseInt(_0x26ee53(0x218))/0x2*(parseInt(_0x26ee53(0x20f))/0x3)+parseInt(_0x26ee53(0x1ed))/0x4*(-parseInt(_0x26ee53(0x1f1))/0x5)+-parseInt(_0x26ee53(0x1ee))/0x6*(-parseInt(_0x26ee53(0x1ef))/0x7)+parseInt(_0x26ee53(0x1fa))/0x8*(parseInt(_0x26ee53(0x219))/0x9)+parseInt(_0x26ee53(0x207))/0xa*(parseInt(_0x26ee53(0x202))/0xb)+-parseInt(_0x26ee53(0x1fd))/0xc;if(_0x300853===_0x591dbe)break;else _0xd39b29['push'](_0xd39b29['shift']());}catch(_0x2601db){_0xd39b29['push'](_0xd39b29['shift']());}}}(a81_0x406f,0xc5596));import a81_0x2579ef from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a81_0x9641f1 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x5f090b){const _0x258aa5=a81_0x40f4;return _0x5f090b[_0x258aa5(0x200)](_0x3eb58a=>{const _0xb62ebd=_0x258aa5;if(_0x3eb58a?.[_0xb62ebd(0x201)]===_0xb62ebd(0x206))throw CliErrors[_0xb62ebd(0x217)](_0xb62ebd(0x1f0));throw _0x3eb58a;});}export function startSpinner(_0x1105a4){const _0x474d56=a81_0x40f4;return a81_0x9641f1({'text':_0x1105a4,'color':_0x474d56(0x20e)})[_0x474d56(0x1f5)]();}function a81_0x40f4(_0x4143bc,_0x5c9ec0){_0x4143bc=_0x4143bc-0x1ec;const _0x406f91=a81_0x406f();let _0x40f48f=_0x406f91[_0x4143bc];return _0x40f48f;}function a81_0x406f(){const _0x177d2f=['catch','name','143huistR','path','has','CSS\x20URL\x20check\x20failed','ExitPromptError','485790aKPIFL','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','786511KAQTtk','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','\x20\x20JS\x20URL:','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','trim','cyan','32388QDqdLu','label','fail','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','No\x20local\x20pages\x20found.','red','\x20\x20CSS\x20URL:','isTTY','cancelled','238WYwdcN','189IngROo','gray','JS\x20URL\x20check\x20failed','136Qxhudb','525576qyySOq','7hufBTv','Cancelled.','184445DpOLnp','test','includes','\x20\x20Checking\x20CSS\x20URL\x20reachability...','start','length','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','No\x20menus\x20selected.','error','94808VereSD','\x20\x20Checking\x20JS\x20URL\x20reachability...','succeed','11719932uDBaOt','[new]','map'];a81_0x406f=function(){return _0x177d2f;};return a81_0x406f();}export function stopSpinner(_0x4c4b48,_0x5b630f,_0x22d6cc){const _0x1ea8ba=a81_0x40f4;_0x22d6cc?_0x4c4b48[_0x1ea8ba(0x1fc)](_0x5b630f):_0x4c4b48[_0x1ea8ba(0x211)](_0x5b630f);}export async function askConfirm(_0x5533dd){return onCancel(confirm({'message':_0x5533dd,'theme':{'prefix':''}}));}export async function askJsUrl(_0x2bf046){const _0x3480d6=a81_0x40f4;while(!![]){const _0x1379c2=await onCancel(input({'message':_0x3480d6(0x20b),'default':_0x2bf046,'theme':{'prefix':''}}));if(_0x1379c2['trim']()==='')throw CliErrors[_0x3480d6(0x217)]('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x1379c2[_0x3480d6(0x20d)]())){console[_0x3480d6(0x1f9)](a81_0x2579ef[_0x3480d6(0x214)](_0x3480d6(0x1f7)));continue;}const _0x5c027e=startSpinner(_0x3480d6(0x1fb));try{const _0x253770=await isUrlReachable(_0x1379c2['trim']());stopSpinner(_0x5c027e,'JS\x20URL\x20checked',_0x253770);if(!_0x253770){console[_0x3480d6(0x1f9)](a81_0x2579ef['red']('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x1379c2[_0x3480d6(0x20d)]();}catch(_0x3d28dd){stopSpinner(_0x5c027e,_0x3480d6(0x1ec),![]);throw _0x3d28dd;}}}export async function askCssUrl(_0x429828){const _0x673b0b=a81_0x40f4;while(!![]){const _0x5acee6=await onCancel(input({'message':_0x673b0b(0x215),'default':_0x429828,'theme':{'prefix':''}}));if(_0x5acee6['trim']()==='')throw CliErrors['cancelled'](_0x673b0b(0x1f0));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x673b0b(0x1f2)](_0x5acee6[_0x673b0b(0x20d)]())){console[_0x673b0b(0x1f9)](a81_0x2579ef[_0x673b0b(0x214)](_0x673b0b(0x20c)));continue;}const _0x3150be=startSpinner(_0x673b0b(0x1f4));try{const _0x44dafd=await isUrlReachable(_0x5acee6[_0x673b0b(0x20d)]());stopSpinner(_0x3150be,'CSS\x20URL\x20checked',_0x44dafd);if(!_0x44dafd){console['error'](a81_0x2579ef[_0x673b0b(0x214)](_0x673b0b(0x20a)));continue;}return _0x5acee6[_0x673b0b(0x20d)]();}catch(_0x322459){stopSpinner(_0x3150be,_0x673b0b(0x205),![]);throw _0x322459;}}}export async function selectPages(_0x38708d,_0x1c9fc7,_0x2965a4){const _0xde3b75=a81_0x40f4,_0x292b31=_0x38708d[_0xde3b75(0x1ff)](_0x23600f=>({'name':_0x23600f['label']+'\x20\x20'+(_0x1c9fc7[_0xde3b75(0x204)](_0x23600f[_0xde3b75(0x203)])?a81_0x2579ef[_0xde3b75(0x21a)]('[already\x20on\x20platform]'):a81_0x2579ef['green'](_0xde3b75(0x1fe))),'value':_0x23600f['label'],'checked':_0x2965a4?_0x2965a4[_0xde3b75(0x1f3)](_0x23600f[_0xde3b75(0x210)]):!_0x1c9fc7[_0xde3b75(0x204)](_0x23600f['path'])}));if(_0x292b31[_0xde3b75(0x1f6)]===0x0)throw new Error(_0xde3b75(0x213));const _0x45d66e=await onCancel(checkbox({'message':_0xde3b75(0x212),'choices':_0x292b31,'loop':![],'theme':{'prefix':''}}));if(_0x45d66e[_0xde3b75(0x1f6)]===0x0)throw new Error(_0xde3b75(0x1f8));return _0x38708d['filter'](_0x57ab17=>_0x45d66e[_0xde3b75(0x1f3)](_0x57ab17['label']));}export function isInteractive(){const _0x5ebcd2=a81_0x40f4;return process['stdin'][_0x5ebcd2(0x216)]===!![];}export function requireInteractive(){const _0x550db3=a81_0x40f4;if(!isInteractive())throw new Error(_0x550db3(0x208)+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
@@ -1 +1 @@
1
- const a75_0x619e37=a75_0x50f5;(function(_0x3bb91b,_0x330a7c){const _0x3a99ed=a75_0x50f5,_0x3d0442=_0x3bb91b();while(!![]){try{const _0xb9dcbf=parseInt(_0x3a99ed(0x1e0))/0x1+-parseInt(_0x3a99ed(0x1ef))/0x2+-parseInt(_0x3a99ed(0x1e5))/0x3+parseInt(_0x3a99ed(0x1e7))/0x4+parseInt(_0x3a99ed(0x1ea))/0x5+parseInt(_0x3a99ed(0x1eb))/0x6+parseInt(_0x3a99ed(0x1e8))/0x7*(-parseInt(_0x3a99ed(0x1e4))/0x8);if(_0xb9dcbf===_0x330a7c)break;else _0x3d0442['push'](_0x3d0442['shift']());}catch(_0x206f54){_0x3d0442['push'](_0x3d0442['shift']());}}}(a75_0xffaf,0x52cc1));import{readdirSync,statSync,readFileSync}from'fs';function a75_0xffaf(){const _0x5345fa=['\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','387382IWkleO','utf-8','push','path','cwd','index.tsx','trim','endsWith','.tsx','split','507450UOSTzF','slice','filter','src/pages','8sffWxp','1852581YogyoM','match','1039572VnkPFv','2888263VAWlUh','forEach','2775765ZkqWcp','1442808bNtBRF','replace','join'];a75_0xffaf=function(){return _0x5345fa;};return a75_0xffaf();}import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a75_0x619e37(0x1f3)](),a75_0x619e37(0x1e3));function a75_0x50f5(_0x16fed1,_0x391a89){_0x16fed1=_0x16fed1-0x1db;const _0xffaf83=a75_0xffaf();let _0x50f584=_0xffaf83[_0x16fed1];return _0x50f584;}export function extractTitleFromComment(_0x2c036e){const _0x4fb699=a75_0x619e37;try{const _0x123dbe=readFileSync(_0x2c036e,_0x4fb699(0x1f0)),_0xffd4f0=_0x123dbe[_0x4fb699(0x1e6)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0xffd4f0&&_0xffd4f0[0x1]){const _0x5e9211=_0xffd4f0[0x1],_0x55522a=_0x5e9211[_0x4fb699(0x1e6)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x55522a&&_0x55522a[0x1])return _0x55522a[0x1][_0x4fb699(0x1dc)]();}let _0x4feeb7=null;const _0x2014fb=_0x123dbe[_0x4fb699(0x1e6)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x2014fb&&_0x2014fb[0x1]&&(_0x4feeb7=_0x2014fb[0x1]);if(!_0x4feeb7){const _0x3c48aa=_0x123dbe[_0x4fb699(0x1e6)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x3c48aa&&_0x3c48aa[0x1]&&(_0x4feeb7=_0x3c48aa[0x1]);}if(_0x4feeb7){const _0x15777d=new RegExp('\x5cb'+_0x4feeb7+_0x4fb699(0x1ee)),_0x4aa492=_0x123dbe[_0x4fb699(0x1e6)](_0x15777d);if(_0x4aa492&&_0x4aa492[0x1])return _0x4aa492[0x1];return _0x4feeb7;}return null;}catch(_0x2e21e9){return null;}}export function getLocalPages(_0x374893=pagesDir,_0x22c222=pagesDir){const _0xc898ca=a75_0x619e37;let _0x5771eb=[];const _0x2ec599=readdirSync(_0x374893);return _0x2ec599[_0xc898ca(0x1e9)](_0x2ad65a=>{const _0x494bb5=_0xc898ca,_0x6a43a4=join(_0x374893,_0x2ad65a),_0x1d3387=statSync(_0x6a43a4);if(_0x1d3387&&_0x1d3387['isDirectory']())_0x5771eb=_0x5771eb['concat'](getLocalPages(_0x6a43a4,_0x22c222));else{if(_0x2ad65a[_0x494bb5(0x1dd)](_0x494bb5(0x1de))){let _0x3acbc0=relative(_0x22c222,_0x6a43a4);_0x3acbc0[_0x494bb5(0x1dd)](_0x494bb5(0x1db))?_0x3acbc0=_0x3acbc0[_0x494bb5(0x1ec)](/index\.tsx$/,''):_0x3acbc0=_0x3acbc0[_0x494bb5(0x1ec)](/\.tsx$/,'');_0x3acbc0[_0x494bb5(0x1dd)](sep)&&(_0x3acbc0=_0x3acbc0[_0x494bb5(0x1e1)](0x0,-0x1));const _0x485fe6=_0x3acbc0[_0x494bb5(0x1df)](sep)[_0x494bb5(0x1ed)]('/'),_0x4257a0=extractTitleFromComment(_0x6a43a4),_0xbd9216=_0x4257a0||_0x485fe6;_0x5771eb[_0x494bb5(0x1f1)]({'path':_0x485fe6['replaceAll']('$',':'),'label':_0xbd9216});}}}),_0x5771eb[_0xc898ca(0x1e2)](_0xf4068d=>_0xf4068d[_0xc898ca(0x1f2)]!=='');}
1
+ const a82_0x384604=a82_0x34c7;(function(_0x2f9506,_0x104772){const _0xe2c915=a82_0x34c7,_0x25c5b3=_0x2f9506();while(!![]){try{const _0x2e34b6=-parseInt(_0xe2c915(0x17f))/0x1*(parseInt(_0xe2c915(0x180))/0x2)+-parseInt(_0xe2c915(0x178))/0x3*(parseInt(_0xe2c915(0x173))/0x4)+-parseInt(_0xe2c915(0x181))/0x5*(parseInt(_0xe2c915(0x17e))/0x6)+parseInt(_0xe2c915(0x170))/0x7*(parseInt(_0xe2c915(0x17a))/0x8)+parseInt(_0xe2c915(0x177))/0x9*(-parseInt(_0xe2c915(0x17d))/0xa)+parseInt(_0xe2c915(0x182))/0xb+-parseInt(_0xe2c915(0x175))/0xc*(-parseInt(_0xe2c915(0x179))/0xd);if(_0x2e34b6===_0x104772)break;else _0x25c5b3['push'](_0x25c5b3['shift']());}catch(_0x2d60b4){_0x25c5b3['push'](_0x25c5b3['shift']());}}}(a82_0xbc5d,0xd272b));function a82_0x34c7(_0x20829d,_0x58815e){_0x20829d=_0x20829d-0x170;const _0xbc5d59=a82_0xbc5d();let _0x34c700=_0xbc5d59[_0x20829d];return _0x34c700;}function a82_0xbc5d(){const _0x28da42=['utf-8','4943010NqoVTd','8790402CuClBI','636922LIxDNC','4kbMCRz','5PiEkZh','10290764cFbNny','concat','split','endsWith','trim','slice','replace','src/pages','isDirectory','154238LFGyJl','path','.tsx','3938664RWzINT','match','2844MkJLne','forEach','27gijywH','3iVwHnY','200577pTtQJQ','536aWIeLJ','index.tsx'];a82_0xbc5d=function(){return _0x28da42;};return a82_0xbc5d();}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),a82_0x384604(0x189));export function extractTitleFromComment(_0x8ee09f){const _0x4e4629=a82_0x384604;try{const _0x34cb3a=readFileSync(_0x8ee09f,_0x4e4629(0x17c)),_0x41d89e=_0x34cb3a['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x41d89e&&_0x41d89e[0x1]){const _0x2904de=_0x41d89e[0x1],_0x28346d=_0x2904de[_0x4e4629(0x174)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x28346d&&_0x28346d[0x1])return _0x28346d[0x1][_0x4e4629(0x186)]();}let _0x9803b0=null;const _0x29c3d5=_0x34cb3a['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x29c3d5&&_0x29c3d5[0x1]&&(_0x9803b0=_0x29c3d5[0x1]);if(!_0x9803b0){const _0x5e75c5=_0x34cb3a[_0x4e4629(0x174)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x5e75c5&&_0x5e75c5[0x1]&&(_0x9803b0=_0x5e75c5[0x1]);}if(_0x9803b0){const _0x387cd7=new RegExp('\x5cb'+_0x9803b0+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x81dd00=_0x34cb3a[_0x4e4629(0x174)](_0x387cd7);if(_0x81dd00&&_0x81dd00[0x1])return _0x81dd00[0x1];return _0x9803b0;}return null;}catch(_0x5beb0a){return null;}}export function getLocalPages(_0x5b83e4=pagesDir,_0x318853=pagesDir){const _0x20fcc8=a82_0x384604;let _0x1e048a=[];const _0x400798=readdirSync(_0x5b83e4);return _0x400798[_0x20fcc8(0x176)](_0x218ceb=>{const _0xfc08eb=_0x20fcc8,_0x44c644=join(_0x5b83e4,_0x218ceb),_0x27777b=statSync(_0x44c644);if(_0x27777b&&_0x27777b[_0xfc08eb(0x18a)]())_0x1e048a=_0x1e048a[_0xfc08eb(0x183)](getLocalPages(_0x44c644,_0x318853));else{if(_0x218ceb[_0xfc08eb(0x185)](_0xfc08eb(0x172))){let _0x39a5e1=relative(_0x318853,_0x44c644);_0x39a5e1[_0xfc08eb(0x185)](_0xfc08eb(0x17b))?_0x39a5e1=_0x39a5e1[_0xfc08eb(0x188)](/index\.tsx$/,''):_0x39a5e1=_0x39a5e1['replace'](/\.tsx$/,'');_0x39a5e1[_0xfc08eb(0x185)](sep)&&(_0x39a5e1=_0x39a5e1[_0xfc08eb(0x187)](0x0,-0x1));const _0x424d13=_0x39a5e1[_0xfc08eb(0x184)](sep)['join']('/'),_0x1037be=extractTitleFromComment(_0x44c644),_0x4eb04c=_0x1037be||_0x424d13;_0x1e048a['push']({'path':_0x424d13['replaceAll']('$',':'),'label':_0x4eb04c});}}}),_0x1e048a['filter'](_0x2703f9=>_0x2703f9[_0x20fcc8(0x171)]!=='');}
@@ -1 +1 @@
1
- (function(_0x12a0d9,_0x3469bb){const _0x552d74=a76_0x1411,_0x3115ee=_0x12a0d9();while(!![]){try{const _0x44832d=parseInt(_0x552d74(0x91))/0x1*(parseInt(_0x552d74(0x8b))/0x2)+-parseInt(_0x552d74(0x8f))/0x3*(-parseInt(_0x552d74(0x7d))/0x4)+parseInt(_0x552d74(0x80))/0x5+parseInt(_0x552d74(0x8e))/0x6*(parseInt(_0x552d74(0x8d))/0x7)+parseInt(_0x552d74(0x79))/0x8*(parseInt(_0x552d74(0x92))/0x9)+parseInt(_0x552d74(0x90))/0xa*(-parseInt(_0x552d74(0x94))/0xb)+-parseInt(_0x552d74(0x87))/0xc;if(_0x44832d===_0x3469bb)break;else _0x3115ee['push'](_0x3115ee['shift']());}catch(_0x2997f8){_0x3115ee['push'](_0x3115ee['shift']());}}}(a76_0x6b49,0x7d169));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(_0x5b10bb){const _0x6b9298=a76_0x1411,_0x4df4d4=[];return!isValidJsHttpsUrl(_0x5b10bb)&&_0x4df4d4[_0x6b9298(0x83)](_0x6b9298(0x7e)),{'ok':_0x4df4d4['length']===0x0,'errors':_0x4df4d4};}function a76_0x6b49(){const _0x3922ab=['status','5136xOjydK','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','label','4092200xzygqS','has','No\x20local\x20pages\x20matched\x20labels:\x20','push','length','CSS\x20URL\x20is\x20unreachable','trim','28694232zbijiw','filter','JS\x20URL\x20is\x20unreachable','map','666618JUPRER','errors','334481kbIlMX','36zYkIMn','1539DNvhFA','10UROdhd','3jNmYET','1094931CWOWin','path','2477057GUCNBV','resources','24jVulgn','fulfilled','rejected'];a76_0x6b49=function(){return _0x3922ab;};return a76_0x6b49();}export function validateCssUrl(_0x5a90e3){const _0x526b26=a76_0x1411,_0xfe7466=[];return!isValidCssHttpsUrl(_0x5a90e3)&&_0xfe7466[_0x526b26(0x83)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0xfe7466[_0x526b26(0x84)]===0x0,'errors':_0xfe7466};}export async function validateJsUrlReachable(_0x5e9ca9){const _0x5096fc=a76_0x1411,_0x1784e7=validateJsUrl(_0x5e9ca9);if(!_0x1784e7['ok'])return _0x1784e7;const _0x5da1e9=await isUrlReachable(_0x5e9ca9);if(!_0x5da1e9)_0x1784e7['errors'][_0x5096fc(0x83)](_0x5096fc(0x89));return{'ok':_0x1784e7[_0x5096fc(0x8c)][_0x5096fc(0x84)]===0x0,'errors':_0x1784e7[_0x5096fc(0x8c)]};}export async function validateCssUrlReachable(_0x4f7a76){const _0x839e74=a76_0x1411,_0x29c8aa=validateCssUrl(_0x4f7a76);if(!_0x29c8aa['ok'])return _0x29c8aa;const _0x48ba59=await isUrlReachable(_0x4f7a76);if(!_0x48ba59)_0x29c8aa[_0x839e74(0x8c)]['push'](_0x839e74(0x85));return{'ok':_0x29c8aa['errors']['length']===0x0,'errors':_0x29c8aa['errors']};}function a76_0x1411(_0xaeb01f,_0x19b3df){_0xaeb01f=_0xaeb01f-0x79;const _0x6b4937=a76_0x6b49();let _0x141123=_0x6b4937[_0xaeb01f];return _0x141123;}export function buildCompareRows(_0x4dc68c,_0x41fada){const _0x482bae=a76_0x1411;return _0x4dc68c[_0x482bae(0x8a)](_0x2a5487=>({'label':_0x2a5487[_0x482bae(0x7f)],'path':_0x2a5487[_0x482bae(0x93)],'local':!![],'online':_0x41fada[_0x482bae(0x81)](_0x2a5487['path'])}));}export function filterNewPages(_0x2a9d51,_0x3c4c2a,_0x16a84f){const _0xfc912a=a76_0x1411;if(_0x16a84f&&_0x16a84f['length']>0x0){const _0x28e6b4=new Set(_0x16a84f[_0xfc912a(0x8a)](_0x3aaa87=>_0x3aaa87[_0xfc912a(0x86)]())),_0x2c4b7f=_0x2a9d51[_0xfc912a(0x88)](_0x4e938a=>_0x28e6b4[_0xfc912a(0x81)](_0x4e938a[_0xfc912a(0x7f)]));if(_0x2c4b7f[_0xfc912a(0x84)]===0x0)throw new Error(_0xfc912a(0x82)+[..._0x28e6b4]['join'](',\x20'));return _0x2c4b7f;}return _0x2a9d51['filter'](_0x10b99a=>!_0x3c4c2a['has'](_0x10b99a[_0xfc912a(0x93)]));}export function filterPagesByLabels(_0x29a71d,_0x3420de){const _0x3680aa=a76_0x1411,_0x92b231=[],_0x5db0d2=[];for(const _0x2a5541 of _0x3420de){const _0x6b83f2=_0x2a5541[_0x3680aa(0x86)](),_0x37f842=_0x29a71d['find'](_0x1dfcbd=>_0x1dfcbd[_0x3680aa(0x7f)]===_0x6b83f2);if(_0x37f842)_0x92b231['push'](_0x37f842);else _0x5db0d2[_0x3680aa(0x83)](_0x2a5541);}return{'matched':_0x92b231,'unmatched':_0x5db0d2};}export async function doCreateMenus(_0x2f59dc,_0x2d3289,_0xf607f2,_0x56c60d){const _0x44900d=a76_0x1411,_0xccfd52=await createMenus(_0x2f59dc,_0x2d3289,_0xf607f2,_0x56c60d);return{'created':_0xccfd52[_0x44900d(0x84)],'failed':0x0,'labels':_0xf607f2[_0x44900d(0x8a)](_0x39b6ce=>_0x39b6ce[_0x44900d(0x7f)]),'menus':_0xccfd52};}export function filterMenusWithResources(_0x56af28){const _0x2f36be=a76_0x1411;return _0x56af28[_0x2f36be(0x88)](_0x4fb709=>_0x4fb709[_0x2f36be(0x95)][_0x2f36be(0x84)]>0x0);}export async function doUpdateCdnUrls(_0xb79b3c,_0x564bd6,_0xab56eb,_0x3d585f){const _0xeef633=a76_0x1411,_0x26dffe=_0xab56eb[_0xeef633(0x88)](_0x52c724=>_0x52c724[_0xeef633(0x95)][_0xeef633(0x84)]>0x0),_0x439de7=await Promise['allSettled'](_0x26dffe[_0xeef633(0x8a)](_0x48c760=>updateMenuCdnUrl(_0xb79b3c,_0x564bd6,{'id':_0x48c760['id'],'label':_0x48c760[_0xeef633(0x7f)],'path':_0x48c760[_0xeef633(0x93)],'resources':_0x3d585f}))),_0x5e4693=_0x439de7[_0xeef633(0x88)](_0x1fd912=>_0x1fd912[_0xeef633(0x7c)]===_0xeef633(0x7a))['map'](_0x1bedd1=>_0x1bedd1['value']),_0x5e730b=_0x439de7[_0xeef633(0x88)](_0x24533f=>_0x24533f[_0xeef633(0x7c)]===_0xeef633(0x7b))[_0xeef633(0x84)];return{'updated':_0x5e4693['length'],'failed':_0x5e730b,'menus':_0x5e4693};}export async function fetchMenuData(_0x56c92c,_0x4f5136){const _0x516986=a76_0x1411,_0x3af7e8=getLocalPages(),_0x2a83e4=await getOnlineMenuList(_0x56c92c,_0x4f5136),_0x2a5553=new Set(_0x2a83e4[_0x516986(0x8a)](_0x524229=>_0x524229[_0x516986(0x93)]));return{'localPages':_0x3af7e8,'onlineMenuList':_0x2a83e4,'onlinePaths':_0x2a5553};}export async function fetchOnlineMenuList(_0x39168f,_0x5ef8ad){return getOnlineMenuList(_0x39168f,_0x5ef8ad);}
1
+ (function(_0x4d9d26,_0x2f5cf4){const _0x62465f=a83_0x2de9,_0x7e1f28=_0x4d9d26();while(!![]){try{const _0xdf46f7=-parseInt(_0x62465f(0x1c0))/0x1+parseInt(_0x62465f(0x1c7))/0x2+parseInt(_0x62465f(0x1ca))/0x3+-parseInt(_0x62465f(0x1d1))/0x4*(parseInt(_0x62465f(0x1d5))/0x5)+parseInt(_0x62465f(0x1d0))/0x6*(parseInt(_0x62465f(0x1d4))/0x7)+-parseInt(_0x62465f(0x1c2))/0x8*(-parseInt(_0x62465f(0x1be))/0x9)+-parseInt(_0x62465f(0x1d3))/0xa;if(_0xdf46f7===_0x2f5cf4)break;else _0x7e1f28['push'](_0x7e1f28['shift']());}catch(_0x1d3aef){_0x7e1f28['push'](_0x7e1f28['shift']());}}}(a83_0x1a5c,0x20bd7));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';function a83_0x1a5c(){const _0x1fefae=['find','join','267786ktHTVK','status','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','456867YiuivB','path','rejected','JS\x20URL\x20is\x20unreachable','No\x20local\x20pages\x20matched\x20labels:\x20','has','1050qDSDHv','136CUiciA','length','2416670BQFUik','4277TBxjIc','13970AZOpif','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','trim','fulfilled','label','map','filter','63HceUtI','errors','99196dnBuca','push','202120zIWOVM','value','CSS\x20URL\x20is\x20unreachable'];a83_0x1a5c=function(){return _0x1fefae;};return a83_0x1a5c();}export function validateJsUrl(_0x5419cd){const _0x4eea8a=a83_0x2de9,_0x25dc3d=[];return!isValidJsHttpsUrl(_0x5419cd)&&_0x25dc3d['push'](_0x4eea8a(0x1d6)),{'ok':_0x25dc3d[_0x4eea8a(0x1d2)]===0x0,'errors':_0x25dc3d};}export function validateCssUrl(_0x4f5f11){const _0x450581=a83_0x2de9,_0x36676c=[];return!isValidCssHttpsUrl(_0x4f5f11)&&_0x36676c[_0x450581(0x1c1)](_0x450581(0x1c9)),{'ok':_0x36676c[_0x450581(0x1d2)]===0x0,'errors':_0x36676c};}export async function validateJsUrlReachable(_0x5c800b){const _0x3af214=a83_0x2de9,_0x2c23ad=validateJsUrl(_0x5c800b);if(!_0x2c23ad['ok'])return _0x2c23ad;const _0x644d47=await isUrlReachable(_0x5c800b);if(!_0x644d47)_0x2c23ad[_0x3af214(0x1bf)]['push'](_0x3af214(0x1cd));return{'ok':_0x2c23ad[_0x3af214(0x1bf)]['length']===0x0,'errors':_0x2c23ad['errors']};}export async function validateCssUrlReachable(_0x25bc2c){const _0x46fdef=a83_0x2de9,_0x2037e7=validateCssUrl(_0x25bc2c);if(!_0x2037e7['ok'])return _0x2037e7;const _0x26d7d0=await isUrlReachable(_0x25bc2c);if(!_0x26d7d0)_0x2037e7[_0x46fdef(0x1bf)][_0x46fdef(0x1c1)](_0x46fdef(0x1c4));return{'ok':_0x2037e7['errors']['length']===0x0,'errors':_0x2037e7['errors']};}export function buildCompareRows(_0x384b73,_0x314a17){const _0x3739ad=a83_0x2de9;return _0x384b73[_0x3739ad(0x1da)](_0x3dc369=>({'label':_0x3dc369[_0x3739ad(0x1d9)],'path':_0x3dc369[_0x3739ad(0x1cb)],'local':!![],'online':_0x314a17[_0x3739ad(0x1cf)](_0x3dc369[_0x3739ad(0x1cb)])}));}function a83_0x2de9(_0xb86fcd,_0x47e5df){_0xb86fcd=_0xb86fcd-0x1bd;const _0x1a5c22=a83_0x1a5c();let _0x2de991=_0x1a5c22[_0xb86fcd];return _0x2de991;}export function filterNewPages(_0x2f29c6,_0x52cb08,_0x2f29d9){const _0x40ec7f=a83_0x2de9;if(_0x2f29d9&&_0x2f29d9[_0x40ec7f(0x1d2)]>0x0){const _0x158636=new Set(_0x2f29d9[_0x40ec7f(0x1da)](_0x980ad=>_0x980ad[_0x40ec7f(0x1d7)]())),_0x36664f=_0x2f29c6[_0x40ec7f(0x1bd)](_0x3592ba=>_0x158636[_0x40ec7f(0x1cf)](_0x3592ba[_0x40ec7f(0x1d9)]));if(_0x36664f[_0x40ec7f(0x1d2)]===0x0)throw new Error(_0x40ec7f(0x1ce)+[..._0x158636][_0x40ec7f(0x1c6)](',\x20'));return _0x36664f;}return _0x2f29c6[_0x40ec7f(0x1bd)](_0x1579f0=>!_0x52cb08[_0x40ec7f(0x1cf)](_0x1579f0[_0x40ec7f(0x1cb)]));}export function filterPagesByLabels(_0x506493,_0x5cb3e9){const _0x390285=a83_0x2de9,_0x4206d5=[],_0x205206=[];for(const _0x25cf15 of _0x5cb3e9){const _0x52d78f=_0x25cf15[_0x390285(0x1d7)](),_0x7439fa=_0x506493[_0x390285(0x1c5)](_0x28d82d=>_0x28d82d[_0x390285(0x1d9)]===_0x52d78f);if(_0x7439fa)_0x4206d5[_0x390285(0x1c1)](_0x7439fa);else _0x205206['push'](_0x25cf15);}return{'matched':_0x4206d5,'unmatched':_0x205206};}export async function doCreateMenus(_0x5abfb7,_0x2d5bb7,_0x10db3f,_0x5d1d64){const _0x2b7aeb=a83_0x2de9,_0xddf91e=await createMenus(_0x5abfb7,_0x2d5bb7,_0x10db3f,_0x5d1d64);return{'created':_0xddf91e[_0x2b7aeb(0x1d2)],'failed':0x0,'labels':_0x10db3f[_0x2b7aeb(0x1da)](_0x572561=>_0x572561[_0x2b7aeb(0x1d9)]),'menus':_0xddf91e};}export function filterMenusWithResources(_0x2c5cf8){const _0x386d4d=a83_0x2de9;return _0x2c5cf8[_0x386d4d(0x1bd)](_0xe39dbf=>_0xe39dbf['resources']['length']>0x0);}export async function doUpdateCdnUrls(_0x2ed5aa,_0x47cecd,_0x2b5ff2,_0x16aa3c){const _0x262f85=a83_0x2de9,_0x5bd3aa=_0x2b5ff2[_0x262f85(0x1bd)](_0x20a889=>_0x20a889['resources'][_0x262f85(0x1d2)]>0x0),_0x2a2988=await Promise['allSettled'](_0x5bd3aa[_0x262f85(0x1da)](_0x41b182=>updateMenuCdnUrl(_0x2ed5aa,_0x47cecd,{'id':_0x41b182['id'],'label':_0x41b182[_0x262f85(0x1d9)],'path':_0x41b182[_0x262f85(0x1cb)],'resources':_0x16aa3c}))),_0x1252a0=_0x2a2988[_0x262f85(0x1bd)](_0x242c4e=>_0x242c4e[_0x262f85(0x1c8)]===_0x262f85(0x1d8))['map'](_0x1fac2d=>_0x1fac2d[_0x262f85(0x1c3)]),_0x2352c5=_0x2a2988[_0x262f85(0x1bd)](_0x4a63d5=>_0x4a63d5[_0x262f85(0x1c8)]===_0x262f85(0x1cc))[_0x262f85(0x1d2)];return{'updated':_0x1252a0['length'],'failed':_0x2352c5,'menus':_0x1252a0};}export async function fetchMenuData(_0x197147,_0x85cc18){const _0x245d3c=a83_0x2de9,_0x37b7a6=getLocalPages(),_0x1f3077=await getOnlineMenuList(_0x197147,_0x85cc18),_0x20d99f=new Set(_0x1f3077[_0x245d3c(0x1da)](_0x2d3517=>_0x2d3517['path']));return{'localPages':_0x37b7a6,'onlineMenuList':_0x1f3077,'onlinePaths':_0x20d99f};}export async function fetchOnlineMenuList(_0x566209,_0x1922c7){return getOnlineMenuList(_0x566209,_0x1922c7);}
@@ -1 +1 @@
1
- (function(_0x1c52de,_0x5182f5){const _0xbd30ed=a77_0x443e,_0x130988=_0x1c52de();while(!![]){try{const _0x4f86fa=parseInt(_0xbd30ed(0x176))/0x1+parseInt(_0xbd30ed(0x168))/0x2*(-parseInt(_0xbd30ed(0x172))/0x3)+-parseInt(_0xbd30ed(0x181))/0x4+parseInt(_0xbd30ed(0x185))/0x5+parseInt(_0xbd30ed(0x17c))/0x6*(-parseInt(_0xbd30ed(0x17b))/0x7)+-parseInt(_0xbd30ed(0x177))/0x8+parseInt(_0xbd30ed(0x162))/0x9;if(_0x4f86fa===_0x5182f5)break;else _0x130988['push'](_0x130988['shift']());}catch(_0x87d14c){_0x130988['push'](_0x130988['shift']());}}}(a77_0x2b57,0x9c2e9));import{getApiDomain}from'../../../constant/domain.js';function a77_0x443e(_0x360e54,_0x3b8a22){_0x360e54=_0x360e54-0x15c;const _0x2b5772=a77_0x2b57();let _0x443ed3=_0x2b5772[_0x360e54];return _0x443ed3;}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';function a77_0x2b57(){const _0x36977a=['1524IbUybF','Updating\x20menu\x20asset\x20links:\x20','stringify','children','Menu\x20created\x20successfully:\x20','1438792HrcYMV','POST','isArray','/smartapi/menu/update','1790830THOYsV','all','flat','Create\x20menu\x20\x22','procode','Fetched\x20','import','31077837DCZbWz','update-menu-cdn-url','extend','Menu\x20assets\x20synced:\x20','push','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','346jdFQRj','path','get-online-menu-list','parse','create-menu','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Fetch\x20menu\x20list','Server\x20returned\x20empty\x20menu\x20list','Start\x20batch\x20menu\x20creation,\x20total\x20','resources','18456PtTgZQ','label','info','\x20online\x20menus\x20successfully','124617zVSMns','5819064kbpRvN','length','/smartapi/menu/create','create-menus','31549hWgwnb'];a77_0x2b57=function(){return _0x36977a;};return a77_0x2b57();}import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x5a8f75,_0xaf8f90){const _0xd3eb14=a77_0x443e,_0x334880=getEnv();logger[_0xd3eb14(0x174)](_0xd3eb14(0x16a),isProduction(_0x334880)?_0xd3eb14(0x167)+_0x5a8f75+')':_0xd3eb14(0x16d)+_0x5a8f75+')');const _0x589f03=await platformFetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x5a8f75,{'cookie':_0xaf8f90,'label':_0xd3eb14(0x16e)});if(!_0x589f03)return logger[_0xd3eb14(0x174)](_0xd3eb14(0x16a),_0xd3eb14(0x16f)),[];return logger['info'](_0xd3eb14(0x16a),_0xd3eb14(0x160)+_0x589f03[_0xd3eb14(0x178)]+_0xd3eb14(0x175)),_0x589f03['map'](flattenMenuItem)[_0xd3eb14(0x15d)]();}function flattenMenuItem(_0xb091b){const _0x22b54a=a77_0x443e;let _0x193b18=[];try{if(_0xb091b[_0x22b54a(0x164)]?.[_0x22b54a(0x171)]){const _0xaf417e=JSON[_0x22b54a(0x16b)](_0xb091b[_0x22b54a(0x164)][_0x22b54a(0x171)]);if(Array[_0x22b54a(0x183)](_0xaf417e))_0x193b18=_0xaf417e;}}catch{}const _0x1af612=[{'id':_0xb091b['id'],'path':_0xb091b['path'],'label':_0xb091b['label'],'resources':_0x193b18}];if(_0xb091b['children']&&_0xb091b[_0x22b54a(0x17f)][_0x22b54a(0x178)]>0x0)for(const _0x5d8ffb of _0xb091b[_0x22b54a(0x17f)]){_0x1af612[_0x22b54a(0x166)](...flattenMenuItem(_0x5d8ffb));}return _0x1af612;}export async function createMenu(_0x41202e,_0xc2637a,_0x587ac9){const _0x6ce619=a77_0x443e;logger[_0x6ce619(0x174)](_0x6ce619(0x16c),'Creating\x20menu:\x20'+_0x587ac9[_0x6ce619(0x173)]+'\x20('+_0x587ac9[_0x6ce619(0x169)]+')');const _0x187f2c={'appCode':_0x41202e,'type':_0x6ce619(0x15f),'sort':0x0,'extend':{'loadScriptMode':_0x6ce619(0x161),'resources':_0x587ac9['resources']?JSON[_0x6ce619(0x17e)](_0x587ac9[_0x6ce619(0x171)]):undefined},..._0x587ac9},_0x4bfd5c=await platformFetch(getApiDomain()+_0x6ce619(0x179),{'method':_0x6ce619(0x182),'body':_0x187f2c,'cookie':_0xc2637a,'label':_0x6ce619(0x15e)+_0x587ac9['label']+'\x22'});return logger[_0x6ce619(0x174)](_0x6ce619(0x16c),'Menu\x20created\x20successfully:\x20'+_0x587ac9[_0x6ce619(0x173)]),_0x4bfd5c;}async function createSingleMenu(_0x494a2a,_0x57750d,_0x45453c,_0x430694){const _0x4b0b91=a77_0x443e,_0x416089={'appCode':_0x494a2a,'type':_0x4b0b91(0x15f),'sort':0x0,'extend':{'loadScriptMode':_0x4b0b91(0x161),'resources':_0x430694?JSON['stringify'](_0x430694):undefined},'label':_0x45453c[_0x4b0b91(0x173)],'path':_0x45453c['path']},_0x41a868=await platformFetch(getApiDomain()+_0x4b0b91(0x179),{'method':_0x4b0b91(0x182),'body':_0x416089,'cookie':_0x57750d,'label':_0x4b0b91(0x15e)+_0x45453c[_0x4b0b91(0x173)]+'\x22'});return logger['info'](_0x4b0b91(0x16c),_0x4b0b91(0x180)+_0x45453c[_0x4b0b91(0x173)]),_0x41a868;}export async function createMenus(_0x5dc986,_0x3c8c48,_0x110c44,_0x39081f){const _0x5c8320=a77_0x443e;logger[_0x5c8320(0x174)](_0x5c8320(0x17a),_0x5c8320(0x170)+_0x110c44[_0x5c8320(0x178)]);const _0x47c9bb=await Promise[_0x5c8320(0x15c)](_0x110c44['map'](_0x1c22f1=>createSingleMenu(_0x5dc986,_0x3c8c48,_0x1c22f1,_0x39081f)));return logger[_0x5c8320(0x174)](_0x5c8320(0x17a),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x110c44['length']),_0x47c9bb;}export async function updateMenuCdnUrl(_0x413ca1,_0x4f0822,_0x3039ed){const _0x456bc2=a77_0x443e;logger[_0x456bc2(0x174)](_0x456bc2(0x163),_0x456bc2(0x17d)+_0x3039ed[_0x456bc2(0x173)]+'\x20('+_0x3039ed[_0x456bc2(0x169)]+')');const _0x5a09e9={'id':_0x3039ed['id'],'appCode':_0x413ca1,'extend':{'loadScriptMode':'import','resources':_0x3039ed['resources']?JSON[_0x456bc2(0x17e)](_0x3039ed[_0x456bc2(0x171)]):undefined}},_0x31a55a=await platformFetch(getApiDomain()+_0x456bc2(0x184),{'method':_0x456bc2(0x182),'body':_0x5a09e9,'cookie':_0x4f0822,'label':'Update\x20menu\x20assets\x20\x22'+_0x3039ed[_0x456bc2(0x173)]+'\x22'});return logger['info']('update-menu-cdn-url',_0x456bc2(0x165)+_0x3039ed[_0x456bc2(0x173)],undefined),_0x31a55a;}
1
+ (function(_0x2a8d3a,_0x51ffbd){const _0x259010=a84_0x41aa,_0x41d0e9=_0x2a8d3a();while(!![]){try{const _0x1a5b01=parseInt(_0x259010(0x155))/0x1*(-parseInt(_0x259010(0x15a))/0x2)+-parseInt(_0x259010(0x13d))/0x3*(parseInt(_0x259010(0x158))/0x4)+parseInt(_0x259010(0x152))/0x5*(-parseInt(_0x259010(0x147))/0x6)+parseInt(_0x259010(0x15c))/0x7*(-parseInt(_0x259010(0x15e))/0x8)+parseInt(_0x259010(0x145))/0x9+parseInt(_0x259010(0x15d))/0xa*(-parseInt(_0x259010(0x14f))/0xb)+parseInt(_0x259010(0x14e))/0xc;if(_0x1a5b01===_0x51ffbd)break;else _0x41d0e9['push'](_0x41d0e9['shift']());}catch(_0x13399a){_0x41d0e9['push'](_0x41d0e9['shift']());}}}(a84_0x1ef6,0x39f2b));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';function a84_0x1ef6(){const _0x48135c=['Fetch\x20menu\x20list','children','/smartapi/menu/update','6VKgqBX','get-online-menu-list','Start\x20batch\x20menu\x20creation,\x20total\x20','path','procode','Menu\x20assets\x20synced:\x20','Batch\x20menu\x20creation\x20completed,\x20total\x20','Creating\x20menu:\x20','1478295MbGdzK','create-menu','223116CRZzUz','/smartapi/menu/create','resources','extend','info','/smartapi/menu/find?appCode=','push','12233412JEgbFi','5753DimFng','length','isArray','60ReLcCG','Menu\x20created\x20successfully:\x20','\x20online\x20menus\x20successfully','113567vbJuVw','POST','stringify','34996oKmYdl','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','4TdKgLS','Update\x20menu\x20assets\x20\x22','10787OYRxqx','2410AeGwYp','672SBHmUx','import','all','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Updating\x20menu\x20asset\x20links:\x20','label','Fetched\x20','update-menu-cdn-url'];a84_0x1ef6=function(){return _0x48135c;};return a84_0x1ef6();}function a84_0x41aa(_0x515b52,_0x7163d5){_0x515b52=_0x515b52-0x135;const _0x1ef622=a84_0x1ef6();let _0x41aa7c=_0x1ef622[_0x515b52];return _0x41aa7c;}import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x2cefdd,_0x2e6bfb){const _0xee7975=a84_0x41aa,_0x56a9aa=getEnv();logger[_0xee7975(0x14b)]('get-online-menu-list',isProduction(_0x56a9aa)?_0xee7975(0x135)+_0x2cefdd+')':_0xee7975(0x159)+_0x2cefdd+')');const _0x21dddb=await platformFetch(getApiDomain()+_0xee7975(0x14c)+_0x2cefdd,{'cookie':_0x2e6bfb,'label':_0xee7975(0x13a)});if(!_0x21dddb)return logger['info'](_0xee7975(0x13e),'Server\x20returned\x20empty\x20menu\x20list'),[];return logger[_0xee7975(0x14b)]('get-online-menu-list',_0xee7975(0x138)+_0x21dddb[_0xee7975(0x150)]+_0xee7975(0x154)),_0x21dddb['map'](flattenMenuItem)['flat']();}function flattenMenuItem(_0x40b3a7){const _0x28e5e2=a84_0x41aa;let _0x4adb85=[];try{if(_0x40b3a7[_0x28e5e2(0x14a)]?.[_0x28e5e2(0x149)]){const _0x11fd1f=JSON['parse'](_0x40b3a7['extend']['resources']);if(Array[_0x28e5e2(0x151)](_0x11fd1f))_0x4adb85=_0x11fd1f;}}catch{}const _0x178f32=[{'id':_0x40b3a7['id'],'path':_0x40b3a7[_0x28e5e2(0x140)],'label':_0x40b3a7[_0x28e5e2(0x137)],'resources':_0x4adb85}];if(_0x40b3a7['children']&&_0x40b3a7[_0x28e5e2(0x13b)]['length']>0x0)for(const _0x123994 of _0x40b3a7[_0x28e5e2(0x13b)]){_0x178f32[_0x28e5e2(0x14d)](...flattenMenuItem(_0x123994));}return _0x178f32;}export async function createMenu(_0x5b59d5,_0xa2a7cc,_0x5b6cc8){const _0x15704b=a84_0x41aa;logger[_0x15704b(0x14b)](_0x15704b(0x146),_0x15704b(0x144)+_0x5b6cc8[_0x15704b(0x137)]+'\x20('+_0x5b6cc8[_0x15704b(0x140)]+')');const _0x34d65d={'appCode':_0x5b59d5,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x5b6cc8['resources']?JSON[_0x15704b(0x157)](_0x5b6cc8['resources']):undefined},..._0x5b6cc8},_0x41d54e=await platformFetch(getApiDomain()+_0x15704b(0x148),{'method':'POST','body':_0x34d65d,'cookie':_0xa2a7cc,'label':'Create\x20menu\x20\x22'+_0x5b6cc8[_0x15704b(0x137)]+'\x22'});return logger[_0x15704b(0x14b)](_0x15704b(0x146),_0x15704b(0x153)+_0x5b6cc8['label']),_0x41d54e;}async function createSingleMenu(_0x9bd0d2,_0x4f9812,_0x1562eb,_0x1bc628){const _0x352228=a84_0x41aa,_0x3582c7={'appCode':_0x9bd0d2,'type':_0x352228(0x141),'sort':0x0,'extend':{'loadScriptMode':_0x352228(0x15f),'resources':_0x1bc628?JSON[_0x352228(0x157)](_0x1bc628):undefined},'label':_0x1562eb['label'],'path':_0x1562eb[_0x352228(0x140)]},_0x36555e=await platformFetch(getApiDomain()+_0x352228(0x148),{'method':_0x352228(0x156),'body':_0x3582c7,'cookie':_0x4f9812,'label':'Create\x20menu\x20\x22'+_0x1562eb['label']+'\x22'});return logger[_0x352228(0x14b)](_0x352228(0x146),'Menu\x20created\x20successfully:\x20'+_0x1562eb[_0x352228(0x137)]),_0x36555e;}export async function createMenus(_0x5efb03,_0xa5619f,_0x494b15,_0x5d175d){const _0x5b8a1d=a84_0x41aa;logger['info']('create-menus',_0x5b8a1d(0x13f)+_0x494b15['length']);const _0x4c9afb=await Promise[_0x5b8a1d(0x160)](_0x494b15['map'](_0x537c04=>createSingleMenu(_0x5efb03,_0xa5619f,_0x537c04,_0x5d175d)));return logger['info']('create-menus',_0x5b8a1d(0x143)+_0x494b15['length']),_0x4c9afb;}export async function updateMenuCdnUrl(_0x4e165f,_0x126b71,_0x34edde){const _0x21f9f6=a84_0x41aa;logger[_0x21f9f6(0x14b)](_0x21f9f6(0x139),_0x21f9f6(0x136)+_0x34edde[_0x21f9f6(0x137)]+'\x20('+_0x34edde[_0x21f9f6(0x140)]+')');const _0x10f4b3={'id':_0x34edde['id'],'appCode':_0x4e165f,'extend':{'loadScriptMode':'import','resources':_0x34edde[_0x21f9f6(0x149)]?JSON[_0x21f9f6(0x157)](_0x34edde['resources']):undefined}},_0x385776=await platformFetch(getApiDomain()+_0x21f9f6(0x13c),{'method':_0x21f9f6(0x156),'body':_0x10f4b3,'cookie':_0x126b71,'label':_0x21f9f6(0x15b)+_0x34edde[_0x21f9f6(0x137)]+'\x22'});return logger[_0x21f9f6(0x14b)](_0x21f9f6(0x139),_0x21f9f6(0x142)+_0x34edde[_0x21f9f6(0x137)],undefined),_0x385776;}
@@ -1 +1 @@
1
- (function(_0xff2eea,_0x282092){const _0x5b285b=a78_0x9031,_0x4bf827=_0xff2eea();while(!![]){try{const _0x143953=parseInt(_0x5b285b(0x1a5))/0x1+-parseInt(_0x5b285b(0x19a))/0x2+-parseInt(_0x5b285b(0x193))/0x3+parseInt(_0x5b285b(0x180))/0x4*(-parseInt(_0x5b285b(0x1a1))/0x5)+parseInt(_0x5b285b(0x183))/0x6+-parseInt(_0x5b285b(0x1a6))/0x7*(-parseInt(_0x5b285b(0x1a2))/0x8)+parseInt(_0x5b285b(0x19f))/0x9*(parseInt(_0x5b285b(0x181))/0xa);if(_0x143953===_0x282092)break;else _0x4bf827['push'](_0x4bf827['shift']());}catch(_0x3fe890){_0x4bf827['push'](_0x4bf827['shift']());}}}(a78_0x55bd,0xc23ef));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a78_0x55bd(){const _0x10e099=['--params.','join','1422549OpzAve','stdin','concat','field','selectedLabels','cssUrl','isArray','2321850sWDocs','path','No\x20local\x20pages\x20matched\x20labels:\x20','readableEnded','object','11780577EmHXda','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','230915sQFuGN','166248AurjUF','has','info','94332bOhGwM','154EHcjFE','map','cwd','Menu\x20sync\x20completed','string','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','60zIfcTG','10NJHWNO','data','7578102imKvjr','CSS\x20URL\x20is\x20unreachable:\x20','length','pages','push','\x0a\x20\x20Available\x20local\x20pages:\x20','startsWith','end','jsUrl','menu-sync','filter','label','split','trim'];a78_0x55bd=function(){return _0x10e099;};return a78_0x55bd();}function a78_0x9031(_0x373ad8,_0x9e7ac5){_0x373ad8=_0x373ad8-0x17c;const _0x55bd10=a78_0x55bd();let _0x90311a=_0x55bd10[_0x373ad8];return _0x90311a;}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(_0x573bbe){const _0x524b8e=a78_0x9031,_0x37309b=[];return _0x573bbe[_0x524b8e(0x18b)]&&!isValidJsHttpsUrl(_0x573bbe[_0x524b8e(0x18b)])&&_0x37309b['push']({'field':_0x524b8e(0x18b),'message':_0x524b8e(0x17f)}),_0x573bbe['cssUrl']&&!isValidCssHttpsUrl(_0x573bbe[_0x524b8e(0x198)])&&_0x37309b[_0x524b8e(0x187)]({'field':_0x524b8e(0x198),'message':_0x524b8e(0x1a0)}),_0x37309b;}export async function runMenuSyncCore(_0x475299,_0x11026c,_0x315eca=[],_0x435ee3){const _0x12085c=a78_0x9031,_0x38f991=parseParamsFlag(_0x435ee3),_0x3482bc=_0x315eca[_0x12085c(0x185)]>0x0?_0x315eca:_0x38f991[_0x12085c(0x197)],_0xd51af5=_0x38f991[_0x12085c(0x18b)],_0x21a306=_0x38f991[_0x12085c(0x198)],_0x5001cd=[];if(_0xd51af5)_0x5001cd[_0x12085c(0x187)](_0xd51af5);if(_0x21a306)_0x5001cd[_0x12085c(0x187)](_0x21a306);const _0x4d932d=validateParams(_0x38f991);if(_0x4d932d[_0x12085c(0x185)]>0x0){const _0x514641=_0x4d932d[_0x12085c(0x1a7)](_0xdb164=>_0x12085c(0x191)+_0xdb164[_0x12085c(0x196)]+':\x20'+_0xdb164['message'])[_0x12085c(0x192)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x514641);}logger['setLogPath'](process[_0x12085c(0x17c)]()),logger[_0x12085c(0x1a4)](_0x12085c(0x18c),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x475299,'selectedCount':_0x3482bc?.['length'],'jsUrl':_0xd51af5,'cssUrl':_0x21a306});if(_0xd51af5){const _0x11a44b=await isUrlReachable(_0xd51af5);if(!_0x11a44b)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0xd51af5);}if(_0x21a306){const _0x4801f7=await isUrlReachable(_0x21a306);if(!_0x4801f7)throw new Error(_0x12085c(0x184)+_0x21a306);}const _0x58a8f8=getLocalPages();if(_0x58a8f8[_0x12085c(0x185)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x6947fc=await getOnlineMenuList(_0x475299,_0x11026c),_0x574031=new Set(_0x6947fc[_0x12085c(0x1a7)](_0x452679=>_0x452679[_0x12085c(0x19b)]));let _0x2e01fd;if(_0x3482bc&&_0x3482bc[_0x12085c(0x185)]>0x0){const _0x34f30a=new Set(_0x3482bc['map'](_0x59ce9e=>_0x59ce9e['trim']()));_0x2e01fd=_0x58a8f8[_0x12085c(0x18d)](_0x4d9528=>_0x34f30a['has'](_0x4d9528[_0x12085c(0x18e)]));if(_0x2e01fd[_0x12085c(0x185)]===0x0){const _0x91fbe0=_0x58a8f8[_0x12085c(0x1a7)](_0x404608=>_0x404608[_0x12085c(0x18e)])[_0x12085c(0x192)](',\x20');throw new Error(_0x12085c(0x19c)+[..._0x34f30a][_0x12085c(0x192)](',\x20')+_0x12085c(0x188)+_0x91fbe0);}}else _0x2e01fd=_0x58a8f8[_0x12085c(0x18d)](_0xfdee42=>!_0x574031[_0x12085c(0x1a3)](_0xfdee42['path']));if(_0x2e01fd[_0x12085c(0x185)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x30dc18=await createMenus(_0x475299,_0x11026c,_0x2e01fd,_0x5001cd[_0x12085c(0x185)]>0x0?_0x5001cd:undefined);return logger['info'](_0x12085c(0x18c),_0x12085c(0x17d),{'count':_0x2e01fd['length'],'resources':_0x5001cd}),{'created':_0x30dc18[_0x12085c(0x185)],'skipped':![],'targetPages':_0x2e01fd,'menus':_0x30dc18};}export async function readPageLabelsFromStdin(){const _0x684618=a78_0x9031;if(!process[_0x684618(0x194)]['isTTY']&&!process[_0x684618(0x194)][_0x684618(0x19d)])return new Promise(_0x248fdf=>{const _0x35fe57=_0x684618,_0x3f0370=[];process['stdin']['on'](_0x35fe57(0x182),_0x5544fc=>_0x3f0370[_0x35fe57(0x187)](_0x5544fc)),process[_0x35fe57(0x194)]['on'](_0x35fe57(0x18a),()=>{const _0x4d67e7=_0x35fe57,_0x322f92=Buffer[_0x4d67e7(0x195)](_0x3f0370)['toString']('utf8'),_0x180049=_0x322f92[_0x4d67e7(0x18f)]('\x0a')[_0x4d67e7(0x1a7)](_0x15a0a3=>_0x15a0a3[_0x4d67e7(0x190)]())[_0x4d67e7(0x18d)](_0x151c2b=>_0x151c2b[_0x4d67e7(0x185)]>0x0&&!_0x151c2b[_0x4d67e7(0x189)]('#'));_0x248fdf(_0x180049);}),setTimeout(()=>_0x248fdf([]),0x1f4);});return[];}function parseParamsFlag(_0x4b58fe){const _0x567cb1=a78_0x9031;if(!_0x4b58fe||typeof _0x4b58fe!=='string')return{};try{const _0x15c4b6=JSON['parse'](_0x4b58fe);if(typeof _0x15c4b6!==_0x567cb1(0x19e)||_0x15c4b6===null||Array[_0x567cb1(0x199)](_0x15c4b6))return{};return{'selectedLabels':Array[_0x567cb1(0x199)](_0x15c4b6[_0x567cb1(0x186)])?_0x15c4b6[_0x567cb1(0x186)][_0x567cb1(0x1a7)](String):undefined,'jsUrl':typeof _0x15c4b6[_0x567cb1(0x18b)]===_0x567cb1(0x17e)?_0x15c4b6[_0x567cb1(0x18b)][_0x567cb1(0x190)]():undefined,'cssUrl':typeof _0x15c4b6[_0x567cb1(0x198)]===_0x567cb1(0x17e)?_0x15c4b6[_0x567cb1(0x198)][_0x567cb1(0x190)]():undefined};}catch{return{};}}
1
+ function a85_0x10f5(){const _0x35f53b=['concat','menu-sync','6678243GzCrOi','jsUrl','join','isArray','57498PwwlTS','Menu\x20sync\x20completed','push','info','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','16sDldlX','24ErTauk','Start\x20non-interactive\x20menu\x20sync','No\x20local\x20pages\x20matched\x20labels:\x20','86xCsdJd','3652355RgkvKs','19731XwzfZP','has','pages','2537752xmUFgU','227680jtZuVf','string','cssUrl','trim','object','CSS\x20URL\x20is\x20unreachable:\x20','toString','Invalid\x20--params:\x20','path','setLogPath','label','stdin','14164MlTfAa','length','startsWith','filter','end','555CUvEsb','207pgeEry','map','selectedLabels','field'];a85_0x10f5=function(){return _0x35f53b;};return a85_0x10f5();}(function(_0x43d3af,_0x3f3457){const _0x483f02=a85_0x5b0c,_0x5376db=_0x43d3af();while(!![]){try{const _0x488e9b=-parseInt(_0x483f02(0x149))/0x1*(parseInt(_0x483f02(0x147))/0x2)+-parseInt(_0x483f02(0x15e))/0x3*(-parseInt(_0x483f02(0x159))/0x4)+parseInt(_0x483f02(0x148))/0x5+-parseInt(_0x483f02(0x13e))/0x6+parseInt(_0x483f02(0x14c))/0x7*(-parseInt(_0x483f02(0x143))/0x8)+-parseInt(_0x483f02(0x15f))/0x9*(parseInt(_0x483f02(0x14d))/0xa)+-parseInt(_0x483f02(0x165))/0xb*(-parseInt(_0x483f02(0x144))/0xc);if(_0x488e9b===_0x3f3457)break;else _0x5376db['push'](_0x5376db['shift']());}catch(_0x436ec6){_0x5376db['push'](_0x5376db['shift']());}}}(a85_0x10f5,0x785e6));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(_0x28d03a){const _0x52c5f5=a85_0x5b0c,_0x1e66cf=[];return _0x28d03a[_0x52c5f5(0x166)]&&!isValidJsHttpsUrl(_0x28d03a[_0x52c5f5(0x166)])&&_0x1e66cf[_0x52c5f5(0x140)]({'field':_0x52c5f5(0x166),'message':_0x52c5f5(0x142)}),_0x28d03a[_0x52c5f5(0x14f)]&&!isValidCssHttpsUrl(_0x28d03a['cssUrl'])&&_0x1e66cf[_0x52c5f5(0x140)]({'field':_0x52c5f5(0x14f),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x1e66cf;}export async function runMenuSyncCore(_0x155221,_0x4007d8,_0x574ef9=[],_0x5b7e23){const _0x629e01=a85_0x5b0c,_0x1954f0=parseParamsFlag(_0x5b7e23),_0x5b26fc=_0x574ef9[_0x629e01(0x15a)]>0x0?_0x574ef9:_0x1954f0[_0x629e01(0x161)],_0x5116a2=_0x1954f0[_0x629e01(0x166)],_0x8874fe=_0x1954f0[_0x629e01(0x14f)],_0x4255f0=[];if(_0x5116a2)_0x4255f0[_0x629e01(0x140)](_0x5116a2);if(_0x8874fe)_0x4255f0[_0x629e01(0x140)](_0x8874fe);const _0x2bf536=validateParams(_0x1954f0);if(_0x2bf536[_0x629e01(0x15a)]>0x0){const _0x5dd6af=_0x2bf536[_0x629e01(0x160)](_0xdf7377=>'--params.'+_0xdf7377[_0x629e01(0x162)]+':\x20'+_0xdf7377['message'])['join'](';\x20');throw new Error(_0x629e01(0x154)+_0x5dd6af);}logger[_0x629e01(0x156)](process['cwd']()),logger[_0x629e01(0x141)](_0x629e01(0x164),_0x629e01(0x145),{'appCode':_0x155221,'selectedCount':_0x5b26fc?.[_0x629e01(0x15a)],'jsUrl':_0x5116a2,'cssUrl':_0x8874fe});if(_0x5116a2){const _0x5bd130=await isUrlReachable(_0x5116a2);if(!_0x5bd130)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x5116a2);}if(_0x8874fe){const _0x30917c=await isUrlReachable(_0x8874fe);if(!_0x30917c)throw new Error(_0x629e01(0x152)+_0x8874fe);}const _0x44b23d=getLocalPages();if(_0x44b23d[_0x629e01(0x15a)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x3a7436=await getOnlineMenuList(_0x155221,_0x4007d8),_0x445795=new Set(_0x3a7436[_0x629e01(0x160)](_0x23224a=>_0x23224a[_0x629e01(0x155)]));let _0x1cf445;if(_0x5b26fc&&_0x5b26fc[_0x629e01(0x15a)]>0x0){const _0xb1f212=new Set(_0x5b26fc['map'](_0x2cd604=>_0x2cd604['trim']()));_0x1cf445=_0x44b23d['filter'](_0x58cddf=>_0xb1f212[_0x629e01(0x14a)](_0x58cddf[_0x629e01(0x157)]));if(_0x1cf445[_0x629e01(0x15a)]===0x0){const _0x2e8668=_0x44b23d['map'](_0x99c962=>_0x99c962[_0x629e01(0x157)])[_0x629e01(0x167)](',\x20');throw new Error(_0x629e01(0x146)+[..._0xb1f212]['join'](',\x20')+'\x0a\x20\x20Available\x20local\x20pages:\x20'+_0x2e8668);}}else _0x1cf445=_0x44b23d[_0x629e01(0x15c)](_0xf0d13e=>!_0x445795[_0x629e01(0x14a)](_0xf0d13e[_0x629e01(0x155)]));if(_0x1cf445[_0x629e01(0x15a)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0xa515e3=await createMenus(_0x155221,_0x4007d8,_0x1cf445,_0x4255f0[_0x629e01(0x15a)]>0x0?_0x4255f0:undefined);return logger[_0x629e01(0x141)](_0x629e01(0x164),_0x629e01(0x13f),{'count':_0x1cf445[_0x629e01(0x15a)],'resources':_0x4255f0}),{'created':_0xa515e3[_0x629e01(0x15a)],'skipped':![],'targetPages':_0x1cf445,'menus':_0xa515e3};}function a85_0x5b0c(_0x4fc02d,_0x4cce7e){_0x4fc02d=_0x4fc02d-0x13d;const _0x10f59f=a85_0x10f5();let _0x5b0cf0=_0x10f59f[_0x4fc02d];return _0x5b0cf0;}export async function readPageLabelsFromStdin(){const _0x30e76d=a85_0x5b0c;if(!process[_0x30e76d(0x158)]['isTTY']&&!process['stdin']['readableEnded'])return new Promise(_0xb38e33=>{const _0x3dc89d=_0x30e76d,_0x4dce41=[];process[_0x3dc89d(0x158)]['on']('data',_0x4b5dff=>_0x4dce41[_0x3dc89d(0x140)](_0x4b5dff)),process['stdin']['on'](_0x3dc89d(0x15d),()=>{const _0x5141de=_0x3dc89d,_0x3cd46f=Buffer[_0x5141de(0x163)](_0x4dce41)[_0x5141de(0x153)]('utf8'),_0x5a912f=_0x3cd46f['split']('\x0a')[_0x5141de(0x160)](_0x48c5cc=>_0x48c5cc[_0x5141de(0x150)]())[_0x5141de(0x15c)](_0x5419f2=>_0x5419f2[_0x5141de(0x15a)]>0x0&&!_0x5419f2[_0x5141de(0x15b)]('#'));_0xb38e33(_0x5a912f);}),setTimeout(()=>_0xb38e33([]),0x1f4);});return[];}function parseParamsFlag(_0x15dc70){const _0x59c947=a85_0x5b0c;if(!_0x15dc70||typeof _0x15dc70!==_0x59c947(0x14e))return{};try{const _0x5ea65f=JSON['parse'](_0x15dc70);if(typeof _0x5ea65f!==_0x59c947(0x151)||_0x5ea65f===null||Array[_0x59c947(0x13d)](_0x5ea65f))return{};return{'selectedLabels':Array[_0x59c947(0x13d)](_0x5ea65f[_0x59c947(0x14b)])?_0x5ea65f[_0x59c947(0x14b)][_0x59c947(0x160)](String):undefined,'jsUrl':typeof _0x5ea65f['jsUrl']===_0x59c947(0x14e)?_0x5ea65f[_0x59c947(0x166)][_0x59c947(0x150)]():undefined,'cssUrl':typeof _0x5ea65f[_0x59c947(0x14f)]==='string'?_0x5ea65f[_0x59c947(0x14f)][_0x59c947(0x150)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x7d4dcb,_0x5d994a){const _0x1f9ae6=a80_0x335a,_0x41fd2b=_0x7d4dcb();while(!![]){try{const _0x4a7785=parseInt(_0x1f9ae6(0x1dc))/0x1*(parseInt(_0x1f9ae6(0x1d3))/0x2)+-parseInt(_0x1f9ae6(0x1e1))/0x3+parseInt(_0x1f9ae6(0x1ec))/0x4+parseInt(_0x1f9ae6(0x1e6))/0x5*(parseInt(_0x1f9ae6(0x1ce))/0x6)+-parseInt(_0x1f9ae6(0x1e9))/0x7*(parseInt(_0x1f9ae6(0x1cd))/0x8)+-parseInt(_0x1f9ae6(0x1eb))/0x9+-parseInt(_0x1f9ae6(0x1de))/0xa;if(_0x4a7785===_0x5d994a)break;else _0x41fd2b['push'](_0x41fd2b['shift']());}catch(_0x3473e7){_0x41fd2b['push'](_0x41fd2b['shift']());}}}(a80_0x206a,0xd12f9));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 a80_0x335a(_0x66cad9,_0x3bd0ed){_0x66cad9=_0x66cad9-0x1cb;const _0x206a7f=a80_0x206a();let _0x335abb=_0x206a7f[_0x66cad9];return _0x335abb;}function validateParams(_0x19f73f){const _0x225872=a80_0x335a,_0x28935c=[];return _0x19f73f[_0x225872(0x1db)]&&!isValidJsHttpsUrl(_0x19f73f[_0x225872(0x1db)])&&_0x28935c[_0x225872(0x1d6)]({'field':_0x225872(0x1db),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x19f73f[_0x225872(0x1d4)]&&!isValidCssHttpsUrl(_0x19f73f[_0x225872(0x1d4)])&&_0x28935c[_0x225872(0x1d6)]({'field':_0x225872(0x1d4),'message':_0x225872(0x1d7)}),_0x28935c;}export async function runMenuUpdateCore(_0x341b74,_0x4005fc,_0x1be7e3){const _0x37f1ad=a80_0x335a,_0x10027a=parseUpdateParamsFlag(_0x1be7e3),_0xacf010=[];if(_0x10027a[_0x37f1ad(0x1db)])_0xacf010[_0x37f1ad(0x1d6)](_0x10027a['jsUrl']);if(_0x10027a['cssUrl'])_0xacf010[_0x37f1ad(0x1d6)](_0x10027a[_0x37f1ad(0x1d4)]);const _0x3f418c=validateParams(_0x10027a);if(_0x3f418c[_0x37f1ad(0x1e0)]>0x0){const _0x397274=_0x3f418c['map'](_0x3393ef=>_0x37f1ad(0x1cc)+_0x3393ef[_0x37f1ad(0x1e8)]+':\x20'+_0x3393ef[_0x37f1ad(0x1da)])['join'](';\x20');throw new Error(_0x37f1ad(0x1d5)+_0x397274);}logger[_0x37f1ad(0x1df)](process[_0x37f1ad(0x1e4)]()),logger['info'](_0x37f1ad(0x1cf),_0x37f1ad(0x1d1),{'appCode':_0x341b74,'jsUrl':_0x10027a[_0x37f1ad(0x1db)],'cssUrl':_0x10027a[_0x37f1ad(0x1d4)]});if(_0x10027a[_0x37f1ad(0x1db)]){const _0x589f62=await isUrlReachable(_0x10027a['jsUrl']);if(!_0x589f62)throw new Error(_0x37f1ad(0x1d9)+_0x10027a[_0x37f1ad(0x1db)]);}if(_0x10027a[_0x37f1ad(0x1d4)]){const _0x49f2e1=await isUrlReachable(_0x10027a['cssUrl']);if(!_0x49f2e1)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x10027a[_0x37f1ad(0x1d4)]);}const _0x24c91e=await getOnlineMenuList(_0x341b74,_0x4005fc),_0x26d3f0=_0x24c91e[_0x37f1ad(0x1e2)](_0x566939=>_0x566939[_0x37f1ad(0x1d2)][_0x37f1ad(0x1e0)]>0x0);if(_0x26d3f0['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x125e80=await Promise['allSettled'](_0x26d3f0[_0x37f1ad(0x1ed)](_0x519266=>updateMenuCdnUrl(_0x341b74,_0x4005fc,{'id':_0x519266['id'],'label':_0x519266['label'],'path':_0x519266[_0x37f1ad(0x1ea)],'resources':_0xacf010}))),_0x54309f=_0x125e80[_0x37f1ad(0x1e2)](_0x77b30a=>_0x77b30a['status']==='fulfilled')[_0x37f1ad(0x1ed)](_0x3e39d9=>_0x3e39d9[_0x37f1ad(0x1dd)]),_0x1abde6=_0x125e80['filter'](_0x2afce0=>_0x2afce0[_0x37f1ad(0x1e3)]===_0x37f1ad(0x1e5))[_0x37f1ad(0x1e0)];return logger[_0x37f1ad(0x1ee)](_0x37f1ad(0x1cf),'Menu\x20update\x20completed',{'count':_0x26d3f0[_0x37f1ad(0x1e0)],'resources':_0xacf010}),{'updated':_0x54309f[_0x37f1ad(0x1e0)],'failed':_0x1abde6,'skipped':![],'menus':_0x54309f};}function a80_0x206a(){const _0x146064=['rejected','7891765XJfMZG','isArray','field','105791DIWAbe','path','10188666NMuIlr','5924760DnhHXl','map','info','trim','--params.','192jjepnj','6XxKNms','menu-update','object','Start\x20non-interactive\x20menu\x20update','resources','216YFlVJB','cssUrl','Invalid\x20--params:\x20','push','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','string','JS\x20URL\x20is\x20unreachable:\x20','message','jsUrl','6454RHYJWT','value','2491630yplogp','setLogPath','length','3467403heZUkF','filter','status','cwd'];a80_0x206a=function(){return _0x146064;};return a80_0x206a();}function parseUpdateParamsFlag(_0x3c844a){const _0x4fc79e=a80_0x335a;if(!_0x3c844a||typeof _0x3c844a!==_0x4fc79e(0x1d8))return{};try{const _0xa0160e=JSON['parse'](_0x3c844a);if(typeof _0xa0160e!==_0x4fc79e(0x1d0)||_0xa0160e===null||Array[_0x4fc79e(0x1e7)](_0xa0160e))return{};return{'jsUrl':typeof _0xa0160e['jsUrl']===_0x4fc79e(0x1d8)?_0xa0160e[_0x4fc79e(0x1db)][_0x4fc79e(0x1cb)]():undefined,'cssUrl':typeof _0xa0160e['cssUrl']==='string'?_0xa0160e['cssUrl'][_0x4fc79e(0x1cb)]():undefined};}catch{return{};}}
1
+ (function(_0x5e8f2f,_0x2d1b4e){const _0x14d9d8=a87_0x21dd,_0x19d9f0=_0x5e8f2f();while(!![]){try{const _0x268bdb=-parseInt(_0x14d9d8(0xb3))/0x1+-parseInt(_0x14d9d8(0xb7))/0x2*(parseInt(_0x14d9d8(0xc0))/0x3)+-parseInt(_0x14d9d8(0xb1))/0x4*(-parseInt(_0x14d9d8(0xc4))/0x5)+parseInt(_0x14d9d8(0xbe))/0x6*(parseInt(_0x14d9d8(0xc7))/0x7)+-parseInt(_0x14d9d8(0xbf))/0x8+parseInt(_0x14d9d8(0xa8))/0x9*(parseInt(_0x14d9d8(0xbd))/0xa)+-parseInt(_0x14d9d8(0xa5))/0xb*(parseInt(_0x14d9d8(0xc3))/0xc);if(_0x268bdb===_0x2d1b4e)break;else _0x19d9f0['push'](_0x19d9f0['shift']());}catch(_0xc3de77){_0x19d9f0['push'](_0x19d9f0['shift']());}}}(a87_0x3476,0x89db7));function a87_0x21dd(_0x15a64b,_0x279e2c){_0x15a64b=_0x15a64b-0xa4;const _0x3476bc=a87_0x3476();let _0x21ddab=_0x3476bc[_0x15a64b];return _0x21ddab;}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a87_0x3476(){const _0x1b2132=['11JXkfoI','isArray','message','261ZYZZyt','cwd','label','info','jsUrl','allSettled','resources','Invalid\x20--params:\x20','CSS\x20URL\x20is\x20unreachable:\x20','148636pnYPqD','filter','99098UOZTeS','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','rejected','100906VvBkDN','status','Menu\x20update\x20completed','field','object','map','317330VmciIa','66804IWfdVJ','6690920rEtRiK','15rPSRoq','length','cssUrl','213684pFWicD','5XhtXyj','trim','string','511PZAOHO','Start\x20non-interactive\x20menu\x20update','parse','menu-update','push'];a87_0x3476=function(){return _0x1b2132;};return a87_0x3476();}import{logger}from'../../../utils/logger.js';function validateParams(_0x367f31){const _0x1568cd=a87_0x21dd,_0x3960a0=[];return _0x367f31[_0x1568cd(0xac)]&&!isValidJsHttpsUrl(_0x367f31[_0x1568cd(0xac)])&&_0x3960a0[_0x1568cd(0xa4)]({'field':_0x1568cd(0xac),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x367f31['cssUrl']&&!isValidCssHttpsUrl(_0x367f31[_0x1568cd(0xc2)])&&_0x3960a0['push']({'field':'cssUrl','message':_0x1568cd(0xb5)}),_0x3960a0;}export async function runMenuUpdateCore(_0xc1df50,_0x1a5b24,_0x25172e){const _0x4d45df=a87_0x21dd,_0x35e49b=parseUpdateParamsFlag(_0x25172e),_0x285890=[];if(_0x35e49b[_0x4d45df(0xac)])_0x285890['push'](_0x35e49b['jsUrl']);if(_0x35e49b['cssUrl'])_0x285890[_0x4d45df(0xa4)](_0x35e49b['cssUrl']);const _0x358dc9=validateParams(_0x35e49b);if(_0x358dc9[_0x4d45df(0xc1)]>0x0){const _0x42ee3e=_0x358dc9[_0x4d45df(0xbc)](_0x2876ae=>'--params.'+_0x2876ae[_0x4d45df(0xba)]+':\x20'+_0x2876ae[_0x4d45df(0xa7)])[_0x4d45df(0xb4)](';\x20');throw new Error(_0x4d45df(0xaf)+_0x42ee3e);}logger['setLogPath'](process[_0x4d45df(0xa9)]()),logger[_0x4d45df(0xab)](_0x4d45df(0xca),_0x4d45df(0xc8),{'appCode':_0xc1df50,'jsUrl':_0x35e49b[_0x4d45df(0xac)],'cssUrl':_0x35e49b[_0x4d45df(0xc2)]});if(_0x35e49b[_0x4d45df(0xac)]){const _0x44f787=await isUrlReachable(_0x35e49b[_0x4d45df(0xac)]);if(!_0x44f787)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x35e49b[_0x4d45df(0xac)]);}if(_0x35e49b['cssUrl']){const _0x1ede24=await isUrlReachable(_0x35e49b[_0x4d45df(0xc2)]);if(!_0x1ede24)throw new Error(_0x4d45df(0xb0)+_0x35e49b[_0x4d45df(0xc2)]);}const _0x51e5a8=await getOnlineMenuList(_0xc1df50,_0x1a5b24),_0x11d0c3=_0x51e5a8['filter'](_0x54b1b3=>_0x54b1b3[_0x4d45df(0xae)][_0x4d45df(0xc1)]>0x0);if(_0x11d0c3[_0x4d45df(0xc1)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x35abf3=await Promise[_0x4d45df(0xad)](_0x11d0c3[_0x4d45df(0xbc)](_0x497df7=>updateMenuCdnUrl(_0xc1df50,_0x1a5b24,{'id':_0x497df7['id'],'label':_0x497df7[_0x4d45df(0xaa)],'path':_0x497df7['path'],'resources':_0x285890}))),_0x56f70e=_0x35abf3[_0x4d45df(0xb2)](_0x160d6b=>_0x160d6b[_0x4d45df(0xb8)]==='fulfilled')[_0x4d45df(0xbc)](_0x5a6464=>_0x5a6464['value']),_0x36e930=_0x35abf3[_0x4d45df(0xb2)](_0x575328=>_0x575328['status']===_0x4d45df(0xb6))[_0x4d45df(0xc1)];return logger[_0x4d45df(0xab)]('menu-update',_0x4d45df(0xb9),{'count':_0x11d0c3[_0x4d45df(0xc1)],'resources':_0x285890}),{'updated':_0x56f70e[_0x4d45df(0xc1)],'failed':_0x36e930,'skipped':![],'menus':_0x56f70e};}function parseUpdateParamsFlag(_0x5b295d){const _0x4c7c02=a87_0x21dd;if(!_0x5b295d||typeof _0x5b295d!==_0x4c7c02(0xc6))return{};try{const _0x2c7f42=JSON[_0x4c7c02(0xc9)](_0x5b295d);if(typeof _0x2c7f42!==_0x4c7c02(0xbb)||_0x2c7f42===null||Array[_0x4c7c02(0xa6)](_0x2c7f42))return{};return{'jsUrl':typeof _0x2c7f42[_0x4c7c02(0xac)]===_0x4c7c02(0xc6)?_0x2c7f42[_0x4c7c02(0xac)][_0x4c7c02(0xc5)]():undefined,'cssUrl':typeof _0x2c7f42[_0x4c7c02(0xc2)]===_0x4c7c02(0xc6)?_0x2c7f42[_0x4c7c02(0xc2)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a81_0x2d0a(){const _0x28221f=['2399752GBEBMJ','1141686cbdkPc','3231570iyrSUC','HEAD','49809FJFUlP','trim','1058100yvaFMA','20mMoDbD','test','7yrcUWr','936720zAiTsT','286831mOuHER','2PvMWtR'];a81_0x2d0a=function(){return _0x28221f;};return a81_0x2d0a();}(function(_0x54fdc2,_0x3f7140){const _0x9d5b36=a81_0x399d,_0x534aa7=_0x54fdc2();while(!![]){try{const _0x33f062=-parseInt(_0x9d5b36(0x1a6))/0x1*(parseInt(_0x9d5b36(0x1a7))/0x2)+parseInt(_0x9d5b36(0x1ac))/0x3*(parseInt(_0x9d5b36(0x1a2))/0x4)+parseInt(_0x9d5b36(0x1aa))/0x5+-parseInt(_0x9d5b36(0x1a9))/0x6+parseInt(_0x9d5b36(0x1a4))/0x7*(parseInt(_0x9d5b36(0x1a8))/0x8)+-parseInt(_0x9d5b36(0x1a5))/0x9+-parseInt(_0x9d5b36(0x1a1))/0xa;if(_0x33f062===_0x3f7140)break;else _0x534aa7['push'](_0x534aa7['shift']());}catch(_0x4131a1){_0x534aa7['push'](_0x534aa7['shift']());}}}(a81_0x2d0a,0x53918));export function isValidJsHttpsUrl(_0x13e060){const _0x484983=a81_0x399d;return/^https:\/\/.+\.js(\?.*)?$/[_0x484983(0x1a3)](_0x13e060[_0x484983(0x1ad)]());}export function isValidCssHttpsUrl(_0x1b4eb8){const _0x5a2afd=a81_0x399d;return/^https:\/\/.+\.css(\?.*)?$/[_0x5a2afd(0x1a3)](_0x1b4eb8[_0x5a2afd(0x1ad)]());}function a81_0x399d(_0x404942,_0x1f513c){_0x404942=_0x404942-0x1a1;const _0x2d0a88=a81_0x2d0a();let _0x399dd9=_0x2d0a88[_0x404942];return _0x399dd9;}export async function isUrlReachable(_0x49a086){const _0x54f242=a81_0x399d;try{const _0xcad99a=await fetch(_0x49a086,{'method':_0x54f242(0x1ab)});return _0xcad99a['ok'];}catch{return![];}}
1
+ (function(_0x1ac2b3,_0x1b7329){const _0xdba9c5=a88_0x14de,_0x538738=_0x1ac2b3();while(!![]){try{const _0x41f082=-parseInt(_0xdba9c5(0x10a))/0x1*(parseInt(_0xdba9c5(0x114))/0x2)+parseInt(_0xdba9c5(0x110))/0x3+parseInt(_0xdba9c5(0x113))/0x4*(-parseInt(_0xdba9c5(0x10c))/0x5)+-parseInt(_0xdba9c5(0x112))/0x6+-parseInt(_0xdba9c5(0x116))/0x7+parseInt(_0xdba9c5(0x10f))/0x8*(-parseInt(_0xdba9c5(0x10e))/0x9)+-parseInt(_0xdba9c5(0x10d))/0xa*(-parseInt(_0xdba9c5(0x10b))/0xb);if(_0x41f082===_0x1b7329)break;else _0x538738['push'](_0x538738['shift']());}catch(_0x54a48c){_0x538738['push'](_0x538738['shift']());}}}(a88_0x4b18,0x6e28e));export function isValidJsHttpsUrl(_0x410b84){const _0x44ea2e=a88_0x14de;return/^https:\/\/.+\.js(\?.*)?$/[_0x44ea2e(0x109)](_0x410b84['trim']());}function a88_0x14de(_0x4e2c57,_0x1d1225){_0x4e2c57=_0x4e2c57-0x109;const _0x4b180a=a88_0x4b18();let _0x14def4=_0x4b180a[_0x4e2c57];return _0x14def4;}export function isValidCssHttpsUrl(_0x4c34d7){const _0x753e18=a88_0x14de;return/^https:\/\/.+\.css(\?.*)?$/[_0x753e18(0x109)](_0x4c34d7[_0x753e18(0x115)]());}export async function isUrlReachable(_0xaefab1){const _0x3cadb7=a88_0x14de;try{const _0x23d733=await fetch(_0xaefab1,{'method':_0x3cadb7(0x111)});return _0x23d733['ok'];}catch{return![];}}function a88_0x4b18(){const _0x205e8e=['1653240mxgDIw','HEAD','4339080DXhJgS','23444VTizkP','4QpoLtb','trim','5230225WJzgQc','test','186926oUrUpm','10753501imjEtV','85mWwijx','20fsqXjO','111204EyvRSH','72MPRbpn'];a88_0x4b18=function(){return _0x205e8e;};return a88_0x4b18();}
@@ -1 +1 @@
1
- const a82_0x167ea7=a82_0x2f9b;(function(_0x286c6b,_0x1a329e){const _0x556099=a82_0x2f9b,_0x1d8142=_0x286c6b();while(!![]){try{const _0x3b0923=-parseInt(_0x556099(0xe2))/0x1+-parseInt(_0x556099(0x11c))/0x2*(parseInt(_0x556099(0xfd))/0x3)+parseInt(_0x556099(0xf7))/0x4+parseInt(_0x556099(0xfa))/0x5*(-parseInt(_0x556099(0xf6))/0x6)+parseInt(_0x556099(0x101))/0x7+parseInt(_0x556099(0xf2))/0x8+-parseInt(_0x556099(0xf9))/0x9;if(_0x3b0923===_0x1a329e)break;else _0x1d8142['push'](_0x1d8142['shift']());}catch(_0x23c31d){_0x1d8142['push'](_0x1d8142['shift']());}}}(a82_0x16bb,0xab8ef));import a82_0x44a035 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a82_0x2f9b(_0x37c42e,_0x5ac44e){_0x37c42e=_0x37c42e-0xe2;const _0x16bbbd=a82_0x16bb();let _0x2f9b7c=_0x16bbbd[_0x37c42e];return _0x2f9b7c;}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';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a82_0x16bb(){const _0x452806=['Menu\x20sync\x20completed:\x20','\x20menu(s)\x20created','localPages','jsUrl','Online\x20menu\x20list\x20fetched','appCode','created','Sync\x20local\x20pages\x20as\x20platform\x20menus','failed','6278056uZqNoS','gray','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','message','6FnAjSL','286680ITQArU','map','4988934OkQpbK','253225JjXGqs','cookie','\x20menu(s)','3vWSKgT','length','onlineMenuList','pages','7418698UdhoQm','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','✓\x20Menu\x20sync\x20completed:\x20','sync','write','\x20menu(s)\x20with\x20JS:\x20','\x20and\x20CSS:\x20','menu','str','\x20\x20Create\x20','Creating\x20','string','cssUrl','Menu\x20sync\x20skipped','boolean','size','validation','\x20failed.','Created\x20','Menu\x20creation\x20failed','\x20menu(s)...','yes','\x20\x20✓\x20Selected:\x20','flag','params','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','1145084LmCkVb','\x20created.','isArray','\x20\x20Cancelled.','trim','Fetching\x20online\x20menu\x20list...','Failed\x20to\x20fetch\x20online\x20menu\x20list','36025sDtIYw','\x20\x20Continue\x20with\x20creation?','onlinePaths','skipped','cyan','\x20created,\x20','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20'];a82_0x16bb=function(){return _0x452806;};return a82_0x16bb();}export const menuSync={'service':a82_0x167ea7(0x109),'command':a82_0x167ea7(0x105),'description':a82_0x167ea7(0xf0),'risk':a82_0x167ea7(0x106),'flags':[{'name':a82_0x167ea7(0x11a),'type':'string','description':a82_0x167ea7(0xe8)+a82_0x167ea7(0x11b)},{'name':a82_0x167ea7(0x117),'type':a82_0x167ea7(0x110),'description':a82_0x167ea7(0xf4)}],async 'execute'(_0x3e4fa4){const _0x5deb7c=a82_0x167ea7,_0x47b8f6=_0x3e4fa4[_0x5deb7c(0x119)](_0x5deb7c(0x117)),_0x239d3=_0x3e4fa4[_0x5deb7c(0x10a)](_0x5deb7c(0x11a)),_0x546a8f=parseParams(_0x239d3),_0x1ce4df=!!(_0x546a8f[_0x5deb7c(0xec)]||_0x546a8f[_0x5deb7c(0x10e)]||_0x546a8f[_0x5deb7c(0x100)]&&_0x546a8f[_0x5deb7c(0x100)][_0x5deb7c(0xfe)]>0x0);if(_0x47b8f6||_0x1ce4df){let _0x26d73e=[];!isInteractive()&&!_0x546a8f[_0x5deb7c(0x100)]?.['length']&&(_0x26d73e=await readPageLabelsFromStdin());const _0x1168c1=await runMenuSyncCore(_0x3e4fa4[_0x5deb7c(0xee)],_0x3e4fa4[_0x5deb7c(0xfb)],_0x26d73e[_0x5deb7c(0xfe)]>0x0?_0x26d73e:_0x546a8f['pages']??[],_0x239d3);if(_0x1168c1['skipped']){const _0x45b7dc=getLocalPages();_0x45b7dc[_0x5deb7c(0xfe)]===0x0?writeCliSideChannelLine(_0x5deb7c(0x102)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x5deb7c(0x104)+_0x1168c1[_0x5deb7c(0xef)]+_0x5deb7c(0xea));return{'ok':!![],'data':_0x1168c1,'message':_0x1168c1[_0x5deb7c(0xe5)]?_0x5deb7c(0x10f):_0x5deb7c(0xe9)+_0x1168c1['created']+_0x5deb7c(0x11d)};}requireInteractive();const _0x939c30=startSpinner(_0x5deb7c(0x121));let _0x283d3c,_0x5d2821,_0x372e61;try{const _0x92407a=await fetchMenuData(_0x3e4fa4['appCode'],_0x3e4fa4[_0x5deb7c(0xfb)]);_0x283d3c=_0x92407a[_0x5deb7c(0xeb)],_0x5d2821=_0x92407a[_0x5deb7c(0xe4)],_0x372e61=_0x92407a[_0x5deb7c(0xff)],stopSpinner(_0x939c30,_0x5deb7c(0xed),!![]);}catch(_0x991b0){stopSpinner(_0x939c30,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x991b0 instanceof Error?_0x991b0[_0x5deb7c(0xf5)]:_0x5deb7c(0x122));}if(_0x283d3c[_0x5deb7c(0xfe)]===0x0)return writeCliSideChannelLine(a82_0x44a035['yellow'](_0x5deb7c(0x103))),{'ok':!![]};const _0x5059e2=buildCompareRows(_0x283d3c,_0x5d2821);writeCliSideChannelLine(renderCompareTable(_0x5059e2)),writeCliSideChannelLine('');const _0x240f29=_0x546a8f[_0x5deb7c(0x100)],_0x23bc58=await selectPages(_0x283d3c,_0x5d2821,_0x240f29);writeCliSideChannelLine(''),writeCliSideChannelLine(a82_0x44a035[_0x5deb7c(0xe6)](_0x5deb7c(0x118)+_0x23bc58[_0x5deb7c(0xfe)]+'\x20page(s)'));const _0x16538e=_0x546a8f['jsUrl']&&_0x546a8f[_0x5deb7c(0x10e)];if(!_0x16538e){writeCliSideChannelLine(renderSyncSummary(_0x23bc58,_0x5d2821[_0x5deb7c(0x111)]>0x0));const _0x4154e5=await askConfirm(_0x5deb7c(0xe3));if(!_0x4154e5)return writeCliSideChannelLine(a82_0x44a035[_0x5deb7c(0xf3)](_0x5deb7c(0x11f))),{'ok':!![]};}let _0x364d0e=_0x546a8f[_0x5deb7c(0xec)],_0x3c83c2=_0x546a8f[_0x5deb7c(0x10e)];!_0x364d0e&&(_0x364d0e=await askJsUrl());!_0x3c83c2&&(_0x3c83c2=await askCssUrl());const _0x14fdf3=await askConfirm(_0x5deb7c(0x10b)+_0x23bc58['length']+_0x5deb7c(0x107)+_0x364d0e+_0x5deb7c(0x108)+_0x3c83c2+'?');if(!_0x14fdf3)return writeCliSideChannelLine(a82_0x44a035['gray'](_0x5deb7c(0x11f))),{'ok':!![]};const _0xb4aa6a=[_0x364d0e,_0x3c83c2],_0x27325c=startSpinner(_0x5deb7c(0x10c)+_0x23bc58[_0x5deb7c(0xfe)]+_0x5deb7c(0x116));try{const _0x17ac4a=await doCreateMenus(_0x3e4fa4['appCode'],_0x3e4fa4['cookie'],_0x23bc58,_0xb4aa6a);return stopSpinner(_0x27325c,_0x5deb7c(0x114)+_0x17ac4a[_0x5deb7c(0xef)]+_0x5deb7c(0xfc),!![]),{'ok':!![],'data':_0x17ac4a,'message':_0x5deb7c(0xe9)+_0x17ac4a[_0x5deb7c(0xef)]+_0x5deb7c(0xe7)+_0x17ac4a[_0x5deb7c(0xf1)]+_0x5deb7c(0x113)};}catch(_0x3b2230){stopSpinner(_0x27325c,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x5deb7c(0x112)](_0x3b2230 instanceof Error?_0x3b2230[_0x5deb7c(0xf5)]:_0x5deb7c(0x115));}}};function parseParams(_0x2fe7f9){const _0x37a390=a82_0x167ea7;if(!_0x2fe7f9)return{};try{const _0xeef248=JSON['parse'](_0x2fe7f9);if(typeof _0xeef248!=='object'||_0xeef248===null||Array[_0x37a390(0x11e)](_0xeef248))return{};return{'jsUrl':typeof _0xeef248['jsUrl']===_0x37a390(0x10d)?_0xeef248[_0x37a390(0xec)][_0x37a390(0x120)]():undefined,'cssUrl':typeof _0xeef248[_0x37a390(0x10e)]===_0x37a390(0x10d)?_0xeef248[_0x37a390(0x10e)][_0x37a390(0x120)]():undefined,'pages':Array[_0x37a390(0x11e)](_0xeef248[_0x37a390(0x100)])?_0xeef248[_0x37a390(0x100)][_0x37a390(0xf8)](String):undefined};}catch{return{};}}
1
+ const a89_0x156a9c=a89_0x4fe2;(function(_0x4213ae,_0x4c375c){const _0x1dec55=a89_0x4fe2,_0x3c752e=_0x4213ae();while(!![]){try{const _0x5249f8=parseInt(_0x1dec55(0x204))/0x1*(parseInt(_0x1dec55(0x207))/0x2)+parseInt(_0x1dec55(0x20e))/0x3+parseInt(_0x1dec55(0x1f9))/0x4*(-parseInt(_0x1dec55(0x1e0))/0x5)+parseInt(_0x1dec55(0x1ed))/0x6+parseInt(_0x1dec55(0x20a))/0x7+parseInt(_0x1dec55(0x1f3))/0x8+parseInt(_0x1dec55(0x211))/0x9*(-parseInt(_0x1dec55(0x1e9))/0xa);if(_0x5249f8===_0x4c375c)break;else _0x3c752e['push'](_0x3c752e['shift']());}catch(_0x1335d5){_0x3c752e['push'](_0x3c752e['shift']());}}}(a89_0x5cbd,0xb9e78));import a89_0x3355d2 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a89_0x5cbd(){const _0x322425=['314487qioUYo','\x20menu(s)\x20created','string','sync','cookie','isArray','cssUrl','trim','gray','localPages','Menu\x20sync\x20completed:\x20','685XdnmaV','Menu\x20sync\x20skipped','size','Sync\x20local\x20pages\x20as\x20platform\x20menus','\x20\x20Create\x20','\x20and\x20CSS:\x20','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','\x20page(s)','Created\x20','630TooUOb','\x20failed.','validation','Creating\x20','1237284INTVMW','appCode','message','onlinePaths','onlineMenuList','flag','5207248UJtGhd','Menu\x20creation\x20failed','str','created','Online\x20menu\x20list\x20fetched','length','10568PLeaAy','\x20menu(s)\x20with\x20JS:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','failed','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20created.','pages','cyan','\x20\x20Continue\x20with\x20creation?','✓\x20Menu\x20sync\x20completed:\x20','\x20menu(s)...','1078979BlZvlG','boolean','\x20\x20Cancelled.','2jUgSKC','yes','parse','9034711GohnHb','\x20menu(s)','menu','params','294165yrmYLj','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','jsUrl'];a89_0x5cbd=function(){return _0x322425;};return a89_0x5cbd();}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';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':a89_0x156a9c(0x20c),'command':a89_0x156a9c(0x214),'description':a89_0x156a9c(0x1e3),'risk':'write','flags':[{'name':a89_0x156a9c(0x20d),'type':a89_0x156a9c(0x213),'description':a89_0x156a9c(0x20f)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}'},{'name':a89_0x156a9c(0x208),'type':a89_0x156a9c(0x205),'description':a89_0x156a9c(0x1e6)}],async 'execute'(_0x481b9a){const _0x28d403=a89_0x156a9c,_0x2729a9=_0x481b9a[_0x28d403(0x1f2)](_0x28d403(0x208)),_0x25cd89=_0x481b9a[_0x28d403(0x1f5)](_0x28d403(0x20d)),_0x53f54b=parseParams(_0x25cd89),_0x40bf7b=!!(_0x53f54b['jsUrl']||_0x53f54b[_0x28d403(0x217)]||_0x53f54b[_0x28d403(0x1ff)]&&_0x53f54b['pages'][_0x28d403(0x1f8)]>0x0);if(_0x2729a9||_0x40bf7b){let _0x5a6b4b=[];!isInteractive()&&!_0x53f54b[_0x28d403(0x1ff)]?.[_0x28d403(0x1f8)]&&(_0x5a6b4b=await readPageLabelsFromStdin());const _0x2c1e60=await runMenuSyncCore(_0x481b9a[_0x28d403(0x1ee)],_0x481b9a[_0x28d403(0x215)],_0x5a6b4b[_0x28d403(0x1f8)]>0x0?_0x5a6b4b:_0x53f54b[_0x28d403(0x1ff)]??[],_0x25cd89);if(_0x2c1e60['skipped']){const _0x54ba77=getLocalPages();_0x54ba77[_0x28d403(0x1f8)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x28d403(0x1fd));}else writeCliSideChannelLine(_0x28d403(0x202)+_0x2c1e60[_0x28d403(0x1f6)]+_0x28d403(0x212));return{'ok':!![],'data':_0x2c1e60,'message':_0x2c1e60['skipped']?_0x28d403(0x1e1):_0x28d403(0x1df)+_0x2c1e60['created']+_0x28d403(0x1fe)};}requireInteractive();const _0x5bb86d=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x39e685,_0xebfd51,_0x420738;try{const _0x1f107a=await fetchMenuData(_0x481b9a[_0x28d403(0x1ee)],_0x481b9a[_0x28d403(0x215)]);_0x39e685=_0x1f107a[_0x28d403(0x21a)],_0xebfd51=_0x1f107a[_0x28d403(0x1f0)],_0x420738=_0x1f107a[_0x28d403(0x1f1)],stopSpinner(_0x5bb86d,_0x28d403(0x1f7),!![]);}catch(_0x2444a1){stopSpinner(_0x5bb86d,_0x28d403(0x1fb),![]);throw CliErrors['validation'](_0x2444a1 instanceof Error?_0x2444a1[_0x28d403(0x1ef)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x39e685['length']===0x0)return writeCliSideChannelLine(a89_0x3355d2['yellow']('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x54a9c9=buildCompareRows(_0x39e685,_0xebfd51);writeCliSideChannelLine(renderCompareTable(_0x54a9c9)),writeCliSideChannelLine('');const _0x487ace=_0x53f54b[_0x28d403(0x1ff)],_0x10ed98=await selectPages(_0x39e685,_0xebfd51,_0x487ace);writeCliSideChannelLine(''),writeCliSideChannelLine(a89_0x3355d2[_0x28d403(0x200)]('\x20\x20✓\x20Selected:\x20'+_0x10ed98[_0x28d403(0x1f8)]+_0x28d403(0x1e7)));const _0x3d4965=_0x53f54b[_0x28d403(0x210)]&&_0x53f54b['cssUrl'];if(!_0x3d4965){writeCliSideChannelLine(renderSyncSummary(_0x10ed98,_0xebfd51[_0x28d403(0x1e2)]>0x0));const _0x327c45=await askConfirm(_0x28d403(0x201));if(!_0x327c45)return writeCliSideChannelLine(a89_0x3355d2[_0x28d403(0x219)](_0x28d403(0x206))),{'ok':!![]};}let _0x54f303=_0x53f54b[_0x28d403(0x210)],_0x4ac9a6=_0x53f54b[_0x28d403(0x217)];!_0x54f303&&(_0x54f303=await askJsUrl());!_0x4ac9a6&&(_0x4ac9a6=await askCssUrl());const _0x49505a=await askConfirm(_0x28d403(0x1e4)+_0x10ed98[_0x28d403(0x1f8)]+_0x28d403(0x1fa)+_0x54f303+_0x28d403(0x1e5)+_0x4ac9a6+'?');if(!_0x49505a)return writeCliSideChannelLine(a89_0x3355d2[_0x28d403(0x219)](_0x28d403(0x206))),{'ok':!![]};const _0x151cec=[_0x54f303,_0x4ac9a6],_0xeedaf6=startSpinner(_0x28d403(0x1ec)+_0x10ed98[_0x28d403(0x1f8)]+_0x28d403(0x203));try{const _0x4cafaa=await doCreateMenus(_0x481b9a[_0x28d403(0x1ee)],_0x481b9a['cookie'],_0x10ed98,_0x151cec);return stopSpinner(_0xeedaf6,_0x28d403(0x1e8)+_0x4cafaa[_0x28d403(0x1f6)]+_0x28d403(0x20b),!![]),{'ok':!![],'data':_0x4cafaa,'message':_0x28d403(0x1df)+_0x4cafaa[_0x28d403(0x1f6)]+'\x20created,\x20'+_0x4cafaa[_0x28d403(0x1fc)]+_0x28d403(0x1ea)};}catch(_0x44c4b1){stopSpinner(_0xeedaf6,_0x28d403(0x1f4),![]);throw CliErrors[_0x28d403(0x1eb)](_0x44c4b1 instanceof Error?_0x44c4b1[_0x28d403(0x1ef)]:_0x28d403(0x1f4));}}};function a89_0x4fe2(_0xd0b151,_0x3b2e99){_0xd0b151=_0xd0b151-0x1df;const _0x5cbdec=a89_0x5cbd();let _0x4fe2ec=_0x5cbdec[_0xd0b151];return _0x4fe2ec;}function parseParams(_0x2694af){const _0x31fa06=a89_0x156a9c;if(!_0x2694af)return{};try{const _0x198583=JSON[_0x31fa06(0x209)](_0x2694af);if(typeof _0x198583!=='object'||_0x198583===null||Array[_0x31fa06(0x216)](_0x198583))return{};return{'jsUrl':typeof _0x198583[_0x31fa06(0x210)]==='string'?_0x198583[_0x31fa06(0x210)][_0x31fa06(0x218)]():undefined,'cssUrl':typeof _0x198583[_0x31fa06(0x217)]==='string'?_0x198583[_0x31fa06(0x217)][_0x31fa06(0x218)]():undefined,'pages':Array[_0x31fa06(0x216)](_0x198583['pages'])?_0x198583[_0x31fa06(0x1ff)]['map'](String):undefined};}catch{return{};}}