@lovrabet/rabetbase-cli 2.1.14-beta.0 → 2.1.14-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/README.md +18 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/discover.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app/use.js +1 -1
  27. package/lib/commands/auth/index.js +1 -1
  28. package/lib/commands/bff/create.js +1 -1
  29. package/lib/commands/bff/delete.js +1 -1
  30. package/lib/commands/bff/detail.js +1 -1
  31. package/lib/commands/bff/index.js +1 -1
  32. package/lib/commands/bff/list.js +1 -1
  33. package/lib/commands/bff/pull.js +1 -1
  34. package/lib/commands/bff/push.js +1 -1
  35. package/lib/commands/bff/status.js +1 -1
  36. package/lib/commands/cli-update.js +1 -1
  37. package/lib/commands/codegen/index.js +1 -1
  38. package/lib/commands/codegen/sdk.js +1 -1
  39. package/lib/commands/codegen/sql.js +1 -1
  40. package/lib/commands/common/app-selector.js +1 -1
  41. package/lib/commands/common/flags.js +1 -1
  42. package/lib/commands/common/validate.js +1 -1
  43. package/lib/commands/config/get.js +1 -1
  44. package/lib/commands/config/index.js +1 -1
  45. package/lib/commands/config/list.js +1 -1
  46. package/lib/commands/config/set.js +1 -1
  47. package/lib/commands/config/shared.js +1 -1
  48. package/lib/commands/data/filter.js +1 -1
  49. package/lib/commands/data/getOne.js +1 -1
  50. package/lib/commands/data/index.js +1 -1
  51. package/lib/commands/data/shared.js +1 -1
  52. package/lib/commands/dataset/capability.js +1 -1
  53. package/lib/commands/dataset/delete.js +1 -1
  54. package/lib/commands/dataset/detail.js +1 -1
  55. package/lib/commands/dataset/extend-update.js +1 -0
  56. package/lib/commands/dataset/field-update.js +1 -1
  57. package/lib/commands/dataset/index.js +1 -1
  58. package/lib/commands/dataset/link-create.js +1 -1
  59. package/lib/commands/dataset/link-delete.js +1 -1
  60. package/lib/commands/dataset/link-shared.js +1 -1
  61. package/lib/commands/dataset/link-update.js +1 -1
  62. package/lib/commands/dataset/links.js +1 -1
  63. package/lib/commands/dataset/list.js +1 -1
  64. package/lib/commands/dataset/operations.js +1 -1
  65. package/lib/commands/dataset/rename.js +1 -1
  66. package/lib/commands/db/analyze-cancel.js +1 -1
  67. package/lib/commands/db/analyze-start.js +1 -1
  68. package/lib/commands/db/analyze-status.js +1 -1
  69. package/lib/commands/db/create.js +1 -1
  70. package/lib/commands/db/delete.js +1 -1
  71. package/lib/commands/db/detail.js +1 -1
  72. package/lib/commands/db/diff.js +1 -1
  73. package/lib/commands/db/index.js +1 -1
  74. package/lib/commands/db/list.js +1 -1
  75. package/lib/commands/db/shared.js +1 -1
  76. package/lib/commands/db/tables.js +1 -1
  77. package/lib/commands/db/test.js +1 -1
  78. package/lib/commands/db/update.js +1 -1
  79. package/lib/commands/doctor.js +1 -1
  80. package/lib/commands/init/index.js +1 -1
  81. package/lib/commands/issue/index.js +1 -1
  82. package/lib/commands/issue/nudge.js +1 -1
  83. package/lib/commands/issue/report.js +1 -1
  84. package/lib/commands/issue/shared.js +1 -1
  85. package/lib/commands/logs/index.js +1 -1
  86. package/lib/commands/menu/index.js +1 -1
  87. package/lib/commands/menu/shared/compare-table.js +1 -1
  88. package/lib/commands/menu/shared/index.js +1 -1
  89. package/lib/commands/menu/shared/inquirer.js +1 -1
  90. package/lib/commands/menu/shared/local-pages.js +1 -1
  91. package/lib/commands/menu/shared/logic.js +1 -1
  92. package/lib/commands/menu/shared/service.js +1 -1
  93. package/lib/commands/menu/shared/sync-core.js +1 -1
  94. package/lib/commands/menu/shared/update-core.js +1 -1
  95. package/lib/commands/menu/shared/valid-url.js +1 -1
  96. package/lib/commands/menu/sync.js +1 -1
  97. package/lib/commands/menu/update.js +1 -1
  98. package/lib/commands/page/generate-start.js +1 -1
  99. package/lib/commands/page/generate-status.js +1 -1
  100. package/lib/commands/page/index.js +1 -1
  101. package/lib/commands/page/pull.js +1 -1
  102. package/lib/commands/page/push.js +1 -1
  103. package/lib/commands/page/shared.js +1 -1
  104. package/lib/commands/page/standard-page-status.js +1 -1
  105. package/lib/commands/page/sync.js +1 -1
  106. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  107. package/lib/commands/project/create/format-elapsed.js +1 -1
  108. package/lib/commands/project/create/main.js +1 -1
  109. package/lib/commands/project/create/non-interactive.js +1 -1
  110. package/lib/commands/project/create/project-template-path.js +1 -1
  111. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  112. package/lib/commands/project/create/use-format-code.js +1 -1
  113. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  114. package/lib/commands/project/index.js +1 -1
  115. package/lib/commands/project/init.js +1 -1
  116. package/lib/commands/project/upgrade.js +1 -1
  117. package/lib/commands/registry.js +1 -1
  118. package/lib/commands/run/index.js +1 -1
  119. package/lib/commands/schema.js +1 -1
  120. package/lib/commands/skill/index.js +1 -1
  121. package/lib/commands/sql/create.js +1 -1
  122. package/lib/commands/sql/delete.js +1 -1
  123. package/lib/commands/sql/detail.js +1 -1
  124. package/lib/commands/sql/exec.js +1 -1
  125. package/lib/commands/sql/index.js +1 -1
  126. package/lib/commands/sql/list.js +1 -1
  127. package/lib/commands/sql/pull.js +1 -1
  128. package/lib/commands/sql/push.js +1 -1
  129. package/lib/commands/sql/save.js +1 -1
  130. package/lib/commands/sql/shared.js +1 -1
  131. package/lib/commands/sql/status.js +1 -1
  132. package/lib/commands/sql/validate.js +1 -1
  133. package/lib/config/schema.js +1 -1
  134. package/lib/constant/cdn.js +1 -1
  135. package/lib/constant/cli.js +1 -1
  136. package/lib/constant/defaults.js +1 -1
  137. package/lib/constant/domain.js +1 -1
  138. package/lib/constant/env.js +1 -1
  139. package/lib/constant/output.js +1 -1
  140. package/lib/constant/paths.js +1 -1
  141. package/lib/constant/risk.js +1 -1
  142. package/lib/context.js +1 -1
  143. package/lib/core/alias-resolver.js +1 -1
  144. package/lib/core/api-client.js +1 -1
  145. package/lib/core/bff/config.js +1 -1
  146. package/lib/core/bff/file-system.js +1 -1
  147. package/lib/core/bff/hash.js +1 -1
  148. package/lib/core/bff/lock.js +1 -1
  149. package/lib/core/bff/utils.js +1 -1
  150. package/lib/core/db-resolver.js +1 -1
  151. package/lib/core/page/file-system.js +1 -1
  152. package/lib/core/page/hash.js +1 -1
  153. package/lib/core/page/lock.js +1 -1
  154. package/lib/core/sql-sync/config.js +1 -1
  155. package/lib/core/sql-sync/file-system.js +1 -1
  156. package/lib/core/sql-sync/hash.js +1 -1
  157. package/lib/core/sql-sync/lock.js +1 -1
  158. package/lib/core/sql-sync/utils.js +1 -1
  159. package/lib/core/sql-validator.js +1 -1
  160. package/lib/errors.js +1 -1
  161. package/lib/framework/build-all-flags.js +1 -1
  162. package/lib/framework/flags.js +1 -1
  163. package/lib/framework/help.js +1 -1
  164. package/lib/framework/index.js +1 -1
  165. package/lib/framework/output.js +1 -1
  166. package/lib/framework/response.js +1 -1
  167. package/lib/framework/runner-alias.js +1 -1
  168. package/lib/framework/runner.js +1 -1
  169. package/lib/framework/schema-export.js +1 -1
  170. package/lib/framework/types.js +1 -1
  171. package/lib/generated/build-info.js +1 -1
  172. package/lib/help.js +1 -1
  173. package/lib/skills/main.js +1 -1
  174. package/lib/skills/npx-skills-add.js +1 -1
  175. package/lib/telemetry/cli-command-trace.js +1 -1
  176. package/lib/telemetry/cli-help-trace.js +1 -1
  177. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  178. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  179. package/lib/telemetry/send-cli-trace-log.js +1 -1
  180. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  181. package/lib/utils/ai_config.js +1 -1
  182. package/lib/utils/apply-jq-filter.js +1 -1
  183. package/lib/utils/cdn-config.js +1 -1
  184. package/lib/utils/check-sdk-version.js +1 -1
  185. package/lib/utils/cli-version-check.js +1 -1
  186. package/lib/utils/cli-version-policy.js +1 -1
  187. package/lib/utils/config.js +1 -1
  188. package/lib/utils/copy-directory.js +1 -1
  189. package/lib/utils/entity-with-id.js +1 -1
  190. package/lib/utils/file-utils.js +1 -1
  191. package/lib/utils/guides-cdn.js +1 -1
  192. package/lib/utils/http-client.js +1 -1
  193. package/lib/utils/is-non-interactive.js +1 -1
  194. package/lib/utils/logger.js +1 -1
  195. package/lib/utils/params.js +1 -1
  196. package/lib/utils/platform.js +1 -1
  197. package/lib/utils/rules-cdn.js +1 -1
  198. package/lib/utils/sleep.js +1 -1
  199. package/lib/utils/template-replacer.js +1 -1
  200. package/lib/utils/version.js +1 -1
  201. package/lib/utils/with-active-cookie.js +1 -1
  202. package/lib/utils/write-cli-side-channel.js +1 -1
  203. package/package.json +3 -3
@@ -1 +1 @@
1
- const a80_0x4175a5=a80_0x4c8c;(function(_0x322662,_0x346da){const _0xfb5c09=a80_0x4c8c,_0x1f95e3=_0x322662();while(!![]){try{const _0x14ffeb=-parseInt(_0xfb5c09(0x14b))/0x1+parseInt(_0xfb5c09(0x14e))/0x2+-parseInt(_0xfb5c09(0x140))/0x3*(parseInt(_0xfb5c09(0x131))/0x4)+-parseInt(_0xfb5c09(0x128))/0x5+parseInt(_0xfb5c09(0x121))/0x6+parseInt(_0xfb5c09(0x13f))/0x7*(-parseInt(_0xfb5c09(0x137))/0x8)+parseInt(_0xfb5c09(0x127))/0x9;if(_0x14ffeb===_0x346da)break;else _0x1f95e3['push'](_0x1f95e3['shift']());}catch(_0x3f05d5){_0x1f95e3['push'](_0x1f95e3['shift']());}}}(a80_0x157b,0xe97fe));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a80_0x4c8c(_0x32ec78,_0x4c2e0f){_0x32ec78=_0x32ec78-0x11c;const _0x157bae=a80_0x157b();let _0x4c8c8b=_0x157bae[_0x32ec78];return _0x4c8c8b;}import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a80_0x4175a5(0x13d);export const issueReport={'service':'issue','command':'report','description':a80_0x4175a5(0x123),'risk':'write','requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a80_0x4175a5(0x12c),'flags':[{'name':'title','type':a80_0x4175a5(0x13b),'required':!![],'description':a80_0x4175a5(0x13c)},{'name':a80_0x4175a5(0x14a),'type':a80_0x4175a5(0x13b),'description':a80_0x4175a5(0x134)},{'name':DESCRIPTION_FILE_FLAG,'type':a80_0x4175a5(0x13b),'description':a80_0x4175a5(0x149)}],async 'validate'(_0x328010){const _0x4b862c=a80_0x4175a5,_0x5d3ef8=_0x328010[_0x4b862c(0x12f)](_0x4b862c(0x14c))['trim'](),_0x487bb5=_0x328010['str'](_0x4b862c(0x14a))[_0x4b862c(0x152)](),_0x452a87=_0x328010[_0x4b862c(0x12f)](DESCRIPTION_FILE_FLAG)[_0x4b862c(0x152)]();if(!_0x5d3ef8)throw CliErrors['flagMissing'](_0x4b862c(0x14c),_0x4b862c(0x11d));const _0x3fe0bd=_0x487bb5['length']>0x0,_0x1e78f3=_0x452a87[_0x4b862c(0x130)]>0x0;if(_0x3fe0bd===_0x1e78f3)throw CliErrors[_0x4b862c(0x120)](_0x4b862c(0x150),_0x4b862c(0x147));if(_0x1e78f3){const _0x5936ec=resolve(process[_0x4b862c(0x144)](),_0x452a87);if(!existsSync(_0x5936ec))throw CliErrors[_0x4b862c(0x120)]('File\x20not\x20found:\x20'+_0x5936ec);}},async 'dryRun'(_0x5055aa){const _0x238115=a80_0x4175a5,_0x49ebcb=await prepareIssueReport(_0x5055aa);return{'method':'POST','url':_0x238115(0x11c)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x49ebcb[_0x238115(0x14c)],'issue.description':_0x49ebcb[_0x238115(0x14a)],'issue.description_original_bytes':_0x49ebcb[_0x238115(0x13a)]['originalBytes'],'issue.description_truncated':_0x49ebcb[_0x238115(0x13a)][_0x238115(0x145)],'issue.description_redactions':_0x49ebcb['sanitize']['redactionCount'],'issue.description_redaction_kinds':_0x49ebcb[_0x238115(0x13a)][_0x238115(0x122)][_0x238115(0x156)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter',_0x238115(0x13e)+_0x49ebcb['descriptionSource'],_0x49ebcb[_0x238115(0x153)]?_0x238115(0x146)+_0x49ebcb[_0x238115(0x153)]:null,_0x49ebcb['sanitize'][_0x238115(0x145)]?_0x238115(0x148)+_0x49ebcb['sanitize'][_0x238115(0x12d)]+'\x20bytes':null,_0x49ebcb[_0x238115(0x13a)]['redactionCount']>0x0?'redactions:\x20'+_0x49ebcb[_0x238115(0x13a)]['redactionCount']+'\x20('+_0x49ebcb['sanitize'][_0x238115(0x122)]['join'](',\x20')+')':null][_0x238115(0x129)](Boolean)[_0x238115(0x156)]('\x0a')};},async 'execute'(_0x38da1d){const _0x76f3e3=a80_0x4175a5,_0x17de97=await prepareIssueReport(_0x38da1d);try{await sendPlatformIssueCollectLog({'title':_0x17de97[_0x76f3e3(0x14c)],'description':_0x17de97[_0x76f3e3(0x14a)],'sanitize':{'originalBytes':_0x17de97[_0x76f3e3(0x13a)][_0x76f3e3(0x12d)],'truncated':_0x17de97[_0x76f3e3(0x13a)][_0x76f3e3(0x145)],'redactionCount':_0x17de97[_0x76f3e3(0x13a)][_0x76f3e3(0x11e)],'redactionKinds':_0x17de97[_0x76f3e3(0x13a)]['redactionKinds']}});}catch(_0x450ea7){throw CliErrors[_0x76f3e3(0x14d)](_0x76f3e3(0x157)+(_0x450ea7 instanceof Error?_0x450ea7['message']:String(_0x450ea7)),_0x76f3e3(0x12e));}return{'ok':!![],'message':buildResultMessage(_0x17de97[_0x76f3e3(0x13a)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x76f3e3(0x125),_0x76f3e3(0x141),_0x76f3e3(0x154),_0x76f3e3(0x136),_0x76f3e3(0x12b),_0x76f3e3(0x133)],'issue':{'title':_0x17de97[_0x76f3e3(0x14c)],'descriptionLength':_0x17de97[_0x76f3e3(0x14a)]['length'],'descriptionSource':_0x17de97[_0x76f3e3(0x11f)],..._0x17de97[_0x76f3e3(0x153)]?{'descriptionFile':_0x17de97[_0x76f3e3(0x153)]}:{},'sanitize':{'originalBytes':_0x17de97[_0x76f3e3(0x13a)][_0x76f3e3(0x12d)],'truncated':_0x17de97[_0x76f3e3(0x13a)][_0x76f3e3(0x145)],'redactions':_0x17de97['sanitize']['redactionCount'],'redactionKinds':_0x17de97['sanitize'][_0x76f3e3(0x122)]}}}};}};function buildResultMessage(_0x53ce17){const _0x29a1e2=a80_0x4175a5,_0x18e388=[];return _0x53ce17[_0x29a1e2(0x145)]&&_0x18e388[_0x29a1e2(0x12a)](_0x29a1e2(0x155)+_0x53ce17[_0x29a1e2(0x12d)]+_0x29a1e2(0x124)),_0x53ce17['redactionCount']>0x0&&_0x18e388[_0x29a1e2(0x12a)](_0x29a1e2(0x132)+_0x53ce17['redactionCount']+_0x29a1e2(0x14f)+_0x53ce17['redactionKinds']['join'](',\x20')),_0x18e388[_0x29a1e2(0x130)]===0x0?_0x29a1e2(0x143):_0x29a1e2(0x151)+_0x18e388[_0x29a1e2(0x156)](';\x20')+')';}async function prepareIssueReport(_0x26de9b){const _0x713b4c=a80_0x4175a5,_0x3f5a30=_0x26de9b['str'](_0x713b4c(0x14c))[_0x713b4c(0x152)](),_0x1bf41c=_0x26de9b['str'](_0x713b4c(0x14a)),_0x1ee200=_0x26de9b[_0x713b4c(0x12f)](DESCRIPTION_FILE_FLAG)[_0x713b4c(0x152)]();if(!_0x1ee200){const _0x171353=_0x1bf41c;if(!_0x171353['trim']())throw CliErrors['validation'](_0x713b4c(0x126),_0x713b4c(0x139));const _0x1f507f=sanitizeIssueDescription(_0x171353);return{'title':_0x3f5a30,'description':_0x1f507f[_0x713b4c(0x14a)],'descriptionSource':'inline','sanitize':_0x1f507f};}const _0x21830e=resolve(process[_0x713b4c(0x144)](),_0x1ee200),_0x56062b=await readFile(_0x21830e,_0x713b4c(0x142));if(!_0x56062b['trim']())throw CliErrors[_0x713b4c(0x120)]('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x21830e,_0x713b4c(0x135));const _0x22c7f7=sanitizeIssueDescription(_0x56062b);return{'title':_0x3f5a30,'description':_0x22c7f7[_0x713b4c(0x14a)],'descriptionSource':_0x713b4c(0x138),'descriptionFilePath':_0x21830e,'sanitize':_0x22c7f7};}function a80_0x157b(){const _0x70667=['44236728dPfeFs','4898470hDSIFg','filter','push','issue.description_redactions','compress','originalBytes','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','str','length','4xRMqhM','redacted\x20','issue.description_redaction_kinds','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','issue.description_truncated','70016ibYBYh','file','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','sanitize','string','One-line\x20issue\x20summary','description-file','descriptionSource:\x20','259eSgqnU','4616925oOCisD','issue.description','utf8','Platform\x20issue\x20reported','cwd','truncated','descriptionFile:\x20','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','truncated:\x20original\x20','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','description','1755334IGxNRO','title','apiError','287146YvvZsK','\x20secret(s):\x20','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Platform\x20issue\x20reported\x20(','trim','descriptionFilePath','issue.description_original_bytes','truncated\x20from\x20','join','Failed\x20to\x20report\x20platform\x20issue:\x20','otel://','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','redactionCount','descriptionSource','validation','2972856OSRAPD','redactionKinds','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','\x20bytes','issue.title','Issue\x20description\x20cannot\x20be\x20empty.'];a80_0x157b=function(){return _0x70667;};return a80_0x157b();}
1
+ function a81_0x2b35(_0xdb92f6,_0x22a406){_0xdb92f6=_0xdb92f6-0x112;const _0x2771a8=a81_0x2771();let _0x2b3517=_0x2771a8[_0xdb92f6];return _0x2b3517;}const a81_0x409bb8=a81_0x2b35;(function(_0x2dc2f1,_0x32f2df){const _0x34dfb0=a81_0x2b35,_0x1508c4=_0x2dc2f1();while(!![]){try{const _0x502fb1=-parseInt(_0x34dfb0(0x114))/0x1+parseInt(_0x34dfb0(0x13b))/0x2*(-parseInt(_0x34dfb0(0x12a))/0x3)+parseInt(_0x34dfb0(0x121))/0x4+parseInt(_0x34dfb0(0x11d))/0x5+-parseInt(_0x34dfb0(0x12f))/0x6*(parseInt(_0x34dfb0(0x131))/0x7)+-parseInt(_0x34dfb0(0x132))/0x8*(-parseInt(_0x34dfb0(0x112))/0x9)+parseInt(_0x34dfb0(0x13a))/0xa*(parseInt(_0x34dfb0(0x14d))/0xb);if(_0x502fb1===_0x32f2df)break;else _0x1508c4['push'](_0x1508c4['shift']());}catch(_0x4ec417){_0x1508c4['push'](_0x1508c4['shift']());}}}(a81_0x2771,0x25c7f));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';function a81_0x2771(){const _0x48f5dc=['truncated:\x20original\x20','issue.description_redaction_kinds','1508810tfLfSx','4iqarDQ','\x20bytes','sanitize','flagMissing','title','descriptionSource','string','POST','descriptionFile:\x20','descriptionFilePath','Failed\x20to\x20report\x20platform\x20issue:\x20','compress','cwd','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','redactions:\x20','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','file','issue.description_redactions','11SchUbb','inline','truncated\x20from\x20','18yVXkCg','redactionCount','112221WPCwzm','message','filter','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','trim','description-file','One-line\x20issue\x20summary','join','description','709215QMtQYI','Issue\x20description\x20cannot\x20be\x20empty.','issue.description_original_bytes','File\x20not\x20found:\x20','643208KJajny','otel://','str','Platform\x20issue\x20reported','apiError','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','length','issue.title','truncated','150903cAywMN','redactionKinds','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','write','Issue\x20description\x20file\x20is\x20empty:\x20','5574YzQMZe','originalBytes','840FDGCmo','102112nQkmTB','validation','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','issue.description','issue','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.'];a81_0x2771=function(){return _0x48f5dc;};return a81_0x2771();}import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a81_0x409bb8(0x119);export const issueReport={'service':a81_0x409bb8(0x136),'command':'report','description':a81_0x409bb8(0x126),'risk':a81_0x409bb8(0x12d),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a81_0x409bb8(0x146),'flags':[{'name':a81_0x409bb8(0x13f),'type':a81_0x409bb8(0x141),'required':!![],'description':a81_0x409bb8(0x11a)},{'name':a81_0x409bb8(0x11c),'type':a81_0x409bb8(0x141),'description':'Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)'},{'name':DESCRIPTION_FILE_FLAG,'type':a81_0x409bb8(0x141),'description':a81_0x409bb8(0x12c)}],async 'validate'(_0x1c8561){const _0xe101d5=a81_0x409bb8,_0x2be4a8=_0x1c8561[_0xe101d5(0x123)](_0xe101d5(0x13f))[_0xe101d5(0x118)](),_0x1f8e9a=_0x1c8561[_0xe101d5(0x123)]('description')[_0xe101d5(0x118)](),_0xf44c89=_0x1c8561[_0xe101d5(0x123)](DESCRIPTION_FILE_FLAG)[_0xe101d5(0x118)]();if(!_0x2be4a8)throw CliErrors[_0xe101d5(0x13e)]('title',_0xe101d5(0x148));const _0x447895=_0x1f8e9a[_0xe101d5(0x127)]>0x0,_0x1647c8=_0xf44c89[_0xe101d5(0x127)]>0x0;if(_0x447895===_0x1647c8)throw CliErrors[_0xe101d5(0x133)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.',_0xe101d5(0x134));if(_0x1647c8){const _0x1aea9e=resolve(process[_0xe101d5(0x147)](),_0xf44c89);if(!existsSync(_0x1aea9e))throw CliErrors['validation'](_0xe101d5(0x120)+_0x1aea9e);}},async 'dryRun'(_0x37e35c){const _0x30a2a9=a81_0x409bb8,_0x29c6e=await prepareIssueReport(_0x37e35c);return{'method':_0x30a2a9(0x142),'url':_0x30a2a9(0x122)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x29c6e[_0x30a2a9(0x13f)],'issue.description':_0x29c6e[_0x30a2a9(0x11c)],'issue.description_original_bytes':_0x29c6e[_0x30a2a9(0x13d)][_0x30a2a9(0x130)],'issue.description_truncated':_0x29c6e[_0x30a2a9(0x13d)][_0x30a2a9(0x129)],'issue.description_redactions':_0x29c6e[_0x30a2a9(0x13d)]['redactionCount'],'issue.description_redaction_kinds':_0x29c6e['sanitize']['redactionKinds'][_0x30a2a9(0x11b)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','descriptionSource:\x20'+_0x29c6e[_0x30a2a9(0x140)],_0x29c6e[_0x30a2a9(0x144)]?_0x30a2a9(0x143)+_0x29c6e[_0x30a2a9(0x144)]:null,_0x29c6e['sanitize'][_0x30a2a9(0x129)]?_0x30a2a9(0x138)+_0x29c6e[_0x30a2a9(0x13d)][_0x30a2a9(0x130)]+_0x30a2a9(0x13c):null,_0x29c6e[_0x30a2a9(0x13d)]['redactionCount']>0x0?_0x30a2a9(0x149)+_0x29c6e['sanitize'][_0x30a2a9(0x113)]+'\x20('+_0x29c6e[_0x30a2a9(0x13d)]['redactionKinds'][_0x30a2a9(0x11b)](',\x20')+')':null][_0x30a2a9(0x116)](Boolean)['join']('\x0a')};},async 'execute'(_0x3c9743){const _0x541973=a81_0x409bb8,_0x750782=await prepareIssueReport(_0x3c9743);try{await sendPlatformIssueCollectLog({'title':_0x750782[_0x541973(0x13f)],'description':_0x750782[_0x541973(0x11c)],'sanitize':{'originalBytes':_0x750782[_0x541973(0x13d)][_0x541973(0x130)],'truncated':_0x750782[_0x541973(0x13d)]['truncated'],'redactionCount':_0x750782[_0x541973(0x13d)][_0x541973(0x113)],'redactionKinds':_0x750782[_0x541973(0x13d)]['redactionKinds']}});}catch(_0x1f2728){throw CliErrors[_0x541973(0x125)](_0x541973(0x145)+(_0x1f2728 instanceof Error?_0x1f2728[_0x541973(0x115)]:String(_0x1f2728)),_0x541973(0x137));}return{'ok':!![],'message':buildResultMessage(_0x750782[_0x541973(0x13d)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x541973(0x128),_0x541973(0x135),_0x541973(0x11f),'issue.description_truncated',_0x541973(0x14c),_0x541973(0x139)],'issue':{'title':_0x750782[_0x541973(0x13f)],'descriptionLength':_0x750782[_0x541973(0x11c)][_0x541973(0x127)],'descriptionSource':_0x750782['descriptionSource'],..._0x750782[_0x541973(0x144)]?{'descriptionFile':_0x750782[_0x541973(0x144)]}:{},'sanitize':{'originalBytes':_0x750782['sanitize'][_0x541973(0x130)],'truncated':_0x750782['sanitize']['truncated'],'redactions':_0x750782[_0x541973(0x13d)][_0x541973(0x113)],'redactionKinds':_0x750782[_0x541973(0x13d)][_0x541973(0x12b)]}}}};}};function buildResultMessage(_0x105f5e){const _0x1cac53=a81_0x409bb8,_0x2e271a=[];return _0x105f5e['truncated']&&_0x2e271a['push'](_0x1cac53(0x14f)+_0x105f5e['originalBytes']+_0x1cac53(0x13c)),_0x105f5e['redactionCount']>0x0&&_0x2e271a['push']('redacted\x20'+_0x105f5e['redactionCount']+'\x20secret(s):\x20'+_0x105f5e['redactionKinds'][_0x1cac53(0x11b)](',\x20')),_0x2e271a[_0x1cac53(0x127)]===0x0?_0x1cac53(0x124):'Platform\x20issue\x20reported\x20('+_0x2e271a[_0x1cac53(0x11b)](';\x20')+')';}async function prepareIssueReport(_0x3d9fd2){const _0xa75145=a81_0x409bb8,_0xae05f0=_0x3d9fd2[_0xa75145(0x123)](_0xa75145(0x13f))[_0xa75145(0x118)](),_0x2651b3=_0x3d9fd2[_0xa75145(0x123)](_0xa75145(0x11c)),_0x23e77e=_0x3d9fd2[_0xa75145(0x123)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x23e77e){const _0x137448=_0x2651b3;if(!_0x137448[_0xa75145(0x118)]())throw CliErrors[_0xa75145(0x133)](_0xa75145(0x11e),_0xa75145(0x117));const _0x31d713=sanitizeIssueDescription(_0x137448);return{'title':_0xae05f0,'description':_0x31d713['description'],'descriptionSource':_0xa75145(0x14e),'sanitize':_0x31d713};}const _0x31a38d=resolve(process[_0xa75145(0x147)](),_0x23e77e),_0x4e7ddc=await readFile(_0x31a38d,'utf8');if(!_0x4e7ddc['trim']())throw CliErrors['validation'](_0xa75145(0x12e)+_0x31a38d,_0xa75145(0x14a));const _0x5e1363=sanitizeIssueDescription(_0x4e7ddc);return{'title':_0xae05f0,'description':_0x5e1363['description'],'descriptionSource':_0xa75145(0x14b),'descriptionFilePath':_0x31a38d,'sanitize':_0x5e1363};}
@@ -1 +1 @@
1
- const a81_0x26f17e=a81_0x5391;function a81_0x5391(_0x39e6d6,_0x13aa5f){_0x39e6d6=_0x39e6d6-0xa4;const _0x2352c6=a81_0x2352();let _0x53911a=_0x2352c6[_0x39e6d6];return _0x53911a;}(function(_0x13833c,_0xa253f1){const _0x544dbe=a81_0x5391,_0x37ec96=_0x13833c();while(!![]){try{const _0xc43ad1=parseInt(_0x544dbe(0xb0))/0x1*(-parseInt(_0x544dbe(0xc1))/0x2)+-parseInt(_0x544dbe(0xae))/0x3*(-parseInt(_0x544dbe(0xc3))/0x4)+parseInt(_0x544dbe(0xc4))/0x5*(parseInt(_0x544dbe(0xa6))/0x6)+parseInt(_0x544dbe(0xb5))/0x7*(-parseInt(_0x544dbe(0xad))/0x8)+parseInt(_0x544dbe(0xb3))/0x9+parseInt(_0x544dbe(0xc0))/0xa*(-parseInt(_0x544dbe(0xbe))/0xb)+parseInt(_0x544dbe(0xbc))/0xc;if(_0xc43ad1===_0xa253f1)break;else _0x37ec96['push'](_0x37ec96['shift']());}catch(_0x2540df){_0x37ec96['push'](_0x37ec96['shift']());}}}(a81_0x2352,0x8ef86));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':'cookie','pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a81_0x26f17e(0xa8)},{'kind':a81_0x26f17e(0xb2),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a81_0x26f17e(0xb4)},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a81_0x26f17e(0xb6)},{'kind':a81_0x26f17e(0xa5),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a81_0x26f17e(0xbb)},{'kind':a81_0x26f17e(0xc2),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a81_0x26f17e(0xaa)},{'kind':a81_0x26f17e(0xb1),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a81_0x26f17e(0xac)}];export function sanitizeIssueDescription(_0x159192){const _0x1f3caf=a81_0x26f17e,_0x5f4147=Buffer['byteLength'](_0x159192,_0x1f3caf(0xb9)),_0xafb4b2=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x364609=_0x159192,_0x328de7=0x0;const _0x49a75e=[];if(!_0xafb4b2)for(const _0x1a7355 of REDACTION_RULES){let _0x202e3a=0x0;_0x364609=_0x364609['replace'](_0x1a7355[_0x1f3caf(0xba)],(_0x1a5784,_0x2506f9)=>{const _0x2a6639=_0x1f3caf;_0x202e3a+=0x1;const _0x327c5b=typeof _0x2506f9===_0x2a6639(0xb7)?_0x2506f9:'';return _0x327c5b+'['+_0x1a7355[_0x2a6639(0xa4)]+']';}),_0x202e3a>0x0&&(_0x328de7+=_0x202e3a,!_0x49a75e[_0x1f3caf(0xab)](_0x1a7355[_0x1f3caf(0xbf)])&&_0x49a75e[_0x1f3caf(0xaf)](_0x1a7355[_0x1f3caf(0xbf)]));}let _0x4f145b=![];if(Buffer[_0x1f3caf(0xa7)](_0x364609,_0x1f3caf(0xb9))>ISSUE_DESCRIPTION_MAX_BYTES){_0x4f145b=!![];const _0x38e5cb=Buffer[_0x1f3caf(0xa7)](TRUNCATION_NOTICE,_0x1f3caf(0xb9)),_0x13cd39=Math[_0x1f3caf(0xbd)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x38e5cb);_0x364609=sliceUtf8Bytes(_0x364609,_0x13cd39)+TRUNCATION_NOTICE;}return{'description':_0x364609,'originalBytes':_0x5f4147,'truncated':_0x4f145b,'redactionCount':_0x328de7,'redactionKinds':_0x49a75e};}function sliceUtf8Bytes(_0x324436,_0x55c5e0){const _0x2a619a=a81_0x26f17e;if(_0x55c5e0<=0x0)return'';const _0x10df3c=Buffer[_0x2a619a(0xb8)](_0x324436,_0x2a619a(0xb9));if(_0x10df3c[_0x2a619a(0xa7)]<=_0x55c5e0)return _0x324436;let _0x156cac=_0x55c5e0;while(_0x156cac>0x0){const _0x3b8686=_0x10df3c[_0x156cac];if(_0x3b8686===undefined||(_0x3b8686&0xc0)!==0x80)break;_0x156cac-=0x1;}return _0x10df3c[_0x2a619a(0xa9)](0x0,_0x156cac)['toString'](_0x2a619a(0xb9));}function a81_0x2352(){const _0x5570d9=['419746sVNkrY','password','43224VwIBLg','185rqXiDu','label','access-key','53286DTmPXi','byteLength','REDACTED:cookie','subarray','REDACTED:password','includes','REDACTED:bearer-jwt','8848DcDAKd','285ExFDhq','push','3ZNJutm','bearer-jwt','authorization','10168758RrQanS','REDACTED:authorization','6832Jsibtq','REDACTED:private-key','string','from','utf8','pattern','REDACTED:access-key','6122592TolQvl','max','3853102jOiCPW','kind','20dIcXuC'];a81_0x2352=function(){return _0x5570d9;};return a81_0x2352();}
1
+ const a82_0x622d08=a82_0x51fe;(function(_0x22f33d,_0x5fb186){const _0x416bce=a82_0x51fe,_0x555c2f=_0x22f33d();while(!![]){try{const _0x198f94=-parseInt(_0x416bce(0xba))/0x1*(-parseInt(_0x416bce(0xc5))/0x2)+-parseInt(_0x416bce(0xc2))/0x3*(-parseInt(_0x416bce(0xb7))/0x4)+parseInt(_0x416bce(0xa7))/0x5+parseInt(_0x416bce(0xa8))/0x6*(-parseInt(_0x416bce(0xb1))/0x7)+parseInt(_0x416bce(0xb4))/0x8+-parseInt(_0x416bce(0xc1))/0x9*(parseInt(_0x416bce(0xab))/0xa)+parseInt(_0x416bce(0xac))/0xb*(parseInt(_0x416bce(0xbc))/0xc);if(_0x198f94===_0x5fb186)break;else _0x555c2f['push'](_0x555c2f['shift']());}catch(_0x550aa3){_0x555c2f['push'](_0x555c2f['shift']());}}}(a82_0x51dd,0x79363));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;function a82_0x51dd(){const _0x722794=['417719wsJGiy','private-key','95448DHROvy','string','replace','subarray','bearer-jwt','4600116KwdCrL','2403VCTOee','utf8','cookie','4eCzhNO','976005ppivKs','77160emYdQT','kind','from','10CrKCTC','209SiCswU','pattern','REDACTED:password','REDACTED:bearer-jwt','access-key','518LZLSrE','byteLength','REDACTED:access-key','1048600oQflTM','max','includes','3228jQfyJy','label','REDACTED:private-key'];a82_0x51dd=function(){return _0x722794;};return a82_0x51dd();}function a82_0x51fe(_0x4bb31e,_0x316ae7){_0x4bb31e=_0x4bb31e-0xa7;const _0x51dd42=a82_0x51dd();let _0x51fee6=_0x51dd42[_0x4bb31e];return _0x51fee6;}const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':a82_0x622d08(0xc4),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a82_0x622d08(0xbb),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a82_0x622d08(0xb9)},{'kind':a82_0x622d08(0xb0),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a82_0x622d08(0xb3)},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a82_0x622d08(0xae)},{'kind':a82_0x622d08(0xc0),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a82_0x622d08(0xaf)}];export function sanitizeIssueDescription(_0x2746bd){const _0x2f1604=a82_0x622d08,_0x3fd128=Buffer['byteLength'](_0x2746bd,'utf8'),_0x2269c3=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x3d48b4=_0x2746bd,_0x28e431=0x0;const _0x4fdcd8=[];if(!_0x2269c3)for(const _0xdcc17 of REDACTION_RULES){let _0x498813=0x0;_0x3d48b4=_0x3d48b4[_0x2f1604(0xbe)](_0xdcc17[_0x2f1604(0xad)],(_0x5623e9,_0x27d365)=>{const _0x38b905=_0x2f1604;_0x498813+=0x1;const _0x576d7d=typeof _0x27d365===_0x38b905(0xbd)?_0x27d365:'';return _0x576d7d+'['+_0xdcc17[_0x38b905(0xb8)]+']';}),_0x498813>0x0&&(_0x28e431+=_0x498813,!_0x4fdcd8[_0x2f1604(0xb6)](_0xdcc17['kind'])&&_0x4fdcd8['push'](_0xdcc17[_0x2f1604(0xa9)]));}let _0x4344cc=![];if(Buffer[_0x2f1604(0xb2)](_0x3d48b4,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x4344cc=!![];const _0x273749=Buffer[_0x2f1604(0xb2)](TRUNCATION_NOTICE,'utf8'),_0x4dbdfa=Math[_0x2f1604(0xb5)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x273749);_0x3d48b4=sliceUtf8Bytes(_0x3d48b4,_0x4dbdfa)+TRUNCATION_NOTICE;}return{'description':_0x3d48b4,'originalBytes':_0x3fd128,'truncated':_0x4344cc,'redactionCount':_0x28e431,'redactionKinds':_0x4fdcd8};}function sliceUtf8Bytes(_0x54fadb,_0x504a45){const _0x2a9982=a82_0x622d08;if(_0x504a45<=0x0)return'';const _0x58fbcb=Buffer[_0x2a9982(0xaa)](_0x54fadb,'utf8');if(_0x58fbcb[_0x2a9982(0xb2)]<=_0x504a45)return _0x54fadb;let _0x4d55f8=_0x504a45;while(_0x4d55f8>0x0){const _0x484a14=_0x58fbcb[_0x4d55f8];if(_0x484a14===undefined||(_0x484a14&0xc0)!==0x80)break;_0x4d55f8-=0x1;}return _0x58fbcb[_0x2a9982(0xbf)](0x0,_0x4d55f8)['toString'](_0x2a9982(0xc3));}
@@ -1 +1 @@
1
- const a82_0x4b92bb=a82_0x28ea;(function(_0x255029,_0x5e76ef){const _0x2678b5=a82_0x28ea,_0x17062c=_0x255029();while(!![]){try{const _0x5409e7=parseInt(_0x2678b5(0x13d))/0x1*(-parseInt(_0x2678b5(0x13c))/0x2)+parseInt(_0x2678b5(0x156))/0x3+parseInt(_0x2678b5(0x155))/0x4*(parseInt(_0x2678b5(0x144))/0x5)+parseInt(_0x2678b5(0x149))/0x6+parseInt(_0x2678b5(0x14e))/0x7+-parseInt(_0x2678b5(0x142))/0x8+parseInt(_0x2678b5(0x148))/0x9;if(_0x5409e7===_0x5e76ef)break;else _0x17062c['push'](_0x17062c['shift']());}catch(_0x11ac08){_0x17062c['push'](_0x17062c['shift']());}}}(a82_0x1328,0xc44f1));function a82_0x28ea(_0x24c6d4,_0x5bff64){_0x24c6d4=_0x24c6d4-0x139;const _0x132837=a82_0x1328();let _0x28ea39=_0x132837[_0x24c6d4];return _0x28ea39;}import{logger}from'../../utils/logger.js';function printLogs(_0x50f4b7){const _0x174581=a82_0x28ea;if(_0x50f4b7[_0x174581(0x143)]===0x0){console[_0x174581(0x150)](_0x174581(0x13b));return;}console['log'](_0x174581(0x146)),_0x50f4b7['forEach']((_0x4848ef,_0x23bf86)=>{const _0x4b05dd=_0x174581,_0x53f816=new Date(_0x4848ef[_0x4b05dd(0x147)])['toLocaleString'](_0x4b05dd(0x151)),_0x59cac7=_0x4848ef[_0x4b05dd(0x152)]==='success'?'√':_0x4848ef[_0x4b05dd(0x152)]===_0x4b05dd(0x14a)?'×':_0x4848ef[_0x4b05dd(0x152)]===_0x4b05dd(0x13e)?'!':'i';console[_0x4b05dd(0x150)](_0x23bf86+0x1+'.\x20'+_0x59cac7+'\x20['+_0x4848ef[_0x4b05dd(0x145)]+']\x20'+_0x4848ef['message']),console[_0x4b05dd(0x150)](_0x4b05dd(0x139)+_0x53f816),_0x4848ef['duration']&&console[_0x4b05dd(0x150)](_0x4b05dd(0x13a)+_0x4848ef[_0x4b05dd(0x14b)]+'ms'),_0x4848ef[_0x4b05dd(0x14c)]&&Object['keys'](_0x4848ef[_0x4b05dd(0x14c)])['length']>0x0&&console['log']('\x20\x20\x20Details:\x20'+JSON[_0x4b05dd(0x14d)](_0x4848ef[_0x4b05dd(0x14c)],null,0x2)),console[_0x4b05dd(0x150)]('');});}export const logsDefinitions=[{'service':a82_0x4b92bb(0x140),'command':'show','description':'View\x20command\x20history\x20logs','risk':a82_0x4b92bb(0x154),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x385e65){const _0x80df1d=a82_0x4b92bb;return printLogs(logger[_0x80df1d(0x141)]()),{'ok':!![]};}},{'service':a82_0x4b92bb(0x140),'command':'clear','description':a82_0x4b92bb(0x13f),'risk':a82_0x4b92bb(0x153),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3eb468){const _0x299fb3=a82_0x4b92bb;return logger[_0x299fb3(0x14f)](),console[_0x299fb3(0x150)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];function a82_0x1328(){const _0x18da9f=['\x20\x20\x20Time:\x20','\x20\x20\x20Duration:\x20','*\x20No\x20logs\x20found','42nQsKTC','62857PTQCWW','warn','Clear\x20command\x20history\x20logs','logs','readLogs','11116352hEmhFd','length','31665aqkDMy','command','*\x20Lovrabet\x20CLI\x20logs:\x0a','timestamp','11897847zjhiEu','3206994LNQPKB','error','duration','details','stringify','6016066EihJof','clearLogs','log','en-US','level','write','read','24pqVSDi','2279112BnZzfw'];a82_0x1328=function(){return _0x18da9f;};return a82_0x1328();}
1
+ const a83_0x39d162=a83_0x4eba;function a83_0x4eba(_0x5c2030,_0x205ef1){_0x5c2030=_0x5c2030-0xa2;const _0x2ad34d=a83_0x2ad3();let _0x4ebafe=_0x2ad34d[_0x5c2030];return _0x4ebafe;}(function(_0x204ae3,_0x452964){const _0x1f78c8=a83_0x4eba,_0x4ccc00=_0x204ae3();while(!![]){try{const _0x274b15=parseInt(_0x1f78c8(0xb2))/0x1*(parseInt(_0x1f78c8(0xb7))/0x2)+-parseInt(_0x1f78c8(0xa9))/0x3*(-parseInt(_0x1f78c8(0xa3))/0x4)+parseInt(_0x1f78c8(0xac))/0x5*(-parseInt(_0x1f78c8(0xb8))/0x6)+parseInt(_0x1f78c8(0xb9))/0x7*(parseInt(_0x1f78c8(0xab))/0x8)+parseInt(_0x1f78c8(0xaa))/0x9*(parseInt(_0x1f78c8(0xc3))/0xa)+parseInt(_0x1f78c8(0xb3))/0xb*(parseInt(_0x1f78c8(0xa6))/0xc)+-parseInt(_0x1f78c8(0xc2))/0xd;if(_0x274b15===_0x452964)break;else _0x4ccc00['push'](_0x4ccc00['shift']());}catch(_0x2059e9){_0x4ccc00['push'](_0x4ccc00['shift']());}}}(a83_0x2ad3,0xeba71));function a83_0x2ad3(){const _0x5bda0c=['command','error','stringify','details','20601230eaeHoU','40ZmSena','log','logs','470804ADLfwv','read','\x20\x20\x20Time:\x20','36KrsRXY','timestamp','toLocaleString','33SVjiyw','18405NEDlYq','3800576eGwcZz','5JvheSf','message','readLogs','\x20\x20\x20Duration:\x20','success','duration','1dFxKoS','2876632VTXjTE','length','warn','en-US','739430YnNgUi','10844922RpqyrX','28JCAfiG','level','keys','write','*\x20No\x20logs\x20found'];a83_0x2ad3=function(){return _0x5bda0c;};return a83_0x2ad3();}import{logger}from'../../utils/logger.js';function printLogs(_0x76b4b9){const _0x4da5f7=a83_0x4eba;if(_0x76b4b9[_0x4da5f7(0xb4)]===0x0){console[_0x4da5f7(0xc4)](_0x4da5f7(0xbd));return;}console[_0x4da5f7(0xc4)]('*\x20Lovrabet\x20CLI\x20logs:\x0a'),_0x76b4b9['forEach']((_0x5277c1,_0x368b0d)=>{const _0x307e87=_0x4da5f7,_0x41b41e=new Date(_0x5277c1[_0x307e87(0xa7)])[_0x307e87(0xa8)](_0x307e87(0xb6)),_0x10acc2=_0x5277c1[_0x307e87(0xba)]===_0x307e87(0xb0)?'√':_0x5277c1[_0x307e87(0xba)]===_0x307e87(0xbf)?'×':_0x5277c1[_0x307e87(0xba)]===_0x307e87(0xb5)?'!':'i';console[_0x307e87(0xc4)](_0x368b0d+0x1+'.\x20'+_0x10acc2+'\x20['+_0x5277c1[_0x307e87(0xbe)]+']\x20'+_0x5277c1[_0x307e87(0xad)]),console[_0x307e87(0xc4)](_0x307e87(0xa5)+_0x41b41e),_0x5277c1['duration']&&console['log'](_0x307e87(0xaf)+_0x5277c1[_0x307e87(0xb1)]+'ms'),_0x5277c1[_0x307e87(0xc1)]&&Object[_0x307e87(0xbb)](_0x5277c1[_0x307e87(0xc1)])['length']>0x0&&console[_0x307e87(0xc4)]('\x20\x20\x20Details:\x20'+JSON[_0x307e87(0xc0)](_0x5277c1[_0x307e87(0xc1)],null,0x2)),console[_0x307e87(0xc4)]('');});}export const logsDefinitions=[{'service':a83_0x39d162(0xa2),'command':'show','description':'View\x20command\x20history\x20logs','risk':a83_0x39d162(0xa4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2b19f3){const _0xfff3ec=a83_0x39d162;return printLogs(logger[_0xfff3ec(0xae)]()),{'ok':!![]};}},{'service':'logs','command':'clear','description':'Clear\x20command\x20history\x20logs','risk':a83_0x39d162(0xbc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x114efe){const _0x1e10b4=a83_0x39d162;return logger['clearLogs'](),console[_0x1e10b4(0xc4)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x4c16f1,_0x5f19fa){const _0x35dc9e=a83_0x40d5,_0x2f59d8=_0x4c16f1();while(!![]){try{const _0x3f681a=parseInt(_0x35dc9e(0x97))/0x1+parseInt(_0x35dc9e(0x93))/0x2*(-parseInt(_0x35dc9e(0x95))/0x3)+parseInt(_0x35dc9e(0x9c))/0x4*(-parseInt(_0x35dc9e(0x9b))/0x5)+-parseInt(_0x35dc9e(0x9a))/0x6+-parseInt(_0x35dc9e(0x96))/0x7*(parseInt(_0x35dc9e(0x98))/0x8)+parseInt(_0x35dc9e(0x99))/0x9*(parseInt(_0x35dc9e(0x94))/0xa)+parseInt(_0x35dc9e(0x92))/0xb;if(_0x3f681a===_0x5f19fa)break;else _0x2f59d8['push'](_0x2f59d8['shift']());}catch(_0x13dbec){_0x2f59d8['push'](_0x2f59d8['shift']());}}}(a83_0x2d72,0x96b5b));import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a83_0x40d5(_0x441a36,_0x2cfe7a){_0x441a36=_0x441a36-0x92;const _0x2d728c=a83_0x2d72();let _0x40d5a7=_0x2d728c[_0x441a36];return _0x40d5a7;}function a83_0x2d72(){const _0x8e2c03=['854193tywfzQ','734192eywnJb','144UsDXfR','6210738evOOmN','205OJujdh','106676WBfAHl','29169591gVXuFi','26XmguBL','3950XMuTdE','155691grkVpf','7DiTPfW'];a83_0x2d72=function(){return _0x8e2c03;};return a83_0x2d72();}export const menuDefinitions=[menuSync,menuUpdate];
1
+ (function(_0x4fbd9f,_0x3df1ae){const _0x599ce1=a84_0x4571,_0x5168e2=_0x4fbd9f();while(!![]){try{const _0x1a92db=-parseInt(_0x599ce1(0x122))/0x1+parseInt(_0x599ce1(0x121))/0x2*(-parseInt(_0x599ce1(0x11d))/0x3)+-parseInt(_0x599ce1(0x11a))/0x4+parseInt(_0x599ce1(0x11c))/0x5*(parseInt(_0x599ce1(0x120))/0x6)+parseInt(_0x599ce1(0x119))/0x7+parseInt(_0x599ce1(0x11f))/0x8*(parseInt(_0x599ce1(0x11e))/0x9)+parseInt(_0x599ce1(0x11b))/0xa*(parseInt(_0x599ce1(0x123))/0xb);if(_0x1a92db===_0x3df1ae)break;else _0x5168e2['push'](_0x5168e2['shift']());}catch(_0x1c9927){_0x5168e2['push'](_0x5168e2['shift']());}}}(a84_0x19c6,0x251ef));import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a84_0x4571(_0x920552,_0x4468c7){_0x920552=_0x920552-0x119;const _0x19c69b=a84_0x19c6();let _0x45718e=_0x19c69b[_0x920552];return _0x45718e;}function a84_0x19c6(){const _0xac373=['36311jqseTh','879221ARmLoj','615456zBtiUe','530dLfBUx','10CYdSNJ','37029OfYFWP','343755ZfmHPQ','16cjFSnN','542838TJwGHC','2VGsMaE','239638ReoIvV'];a84_0x19c6=function(){return _0xac373;};return a84_0x19c6();}export const menuDefinitions=[menuSync,menuUpdate];
@@ -1 +1 @@
1
- function a84_0x2d2a(){const _0x4c74a2=['4240GUUAGL','showOnline','\x20\x20No\x20pages\x20to\x20sync.','join','push','online','label','13031208jeYKJW','map','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','\x20\x20\x20\x20CSS:\x20','length','20MFlAGv','2580626rUQnIJ','\x20\x20\x20\x20JS:\x20\x20','7167255kHnIZw','repeat','541263CJIAXZ','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','\x20\x20Affected\x20menus:\x20','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','1SEHUBG','\x20\x20\x20\x20•\x20','Platform','max','(unchanged)','165177dTlNEB','6832722ODYaHj','3320695UltpAM'];a84_0x2d2a=function(){return _0x4c74a2;};return a84_0x2d2a();}function a84_0x540e(_0x3e2daa,_0x4018f9){_0x3e2daa=_0x3e2daa-0x78;const _0x2d2a73=a84_0x2d2a();let _0x540e90=_0x2d2a73[_0x3e2daa];return _0x540e90;}(function(_0x522fbe,_0x1d678b){const _0x3e5af2=a84_0x540e,_0x59ec87=_0x522fbe();while(!![]){try{const _0x17c640=-parseInt(_0x3e5af2(0x79))/0x1*(parseInt(_0x3e5af2(0x8e))/0x2)+-parseInt(_0x3e5af2(0x92))/0x3*(parseInt(_0x3e5af2(0x8d))/0x4)+-parseInt(_0x3e5af2(0x90))/0x5+-parseInt(_0x3e5af2(0x7f))/0x6+-parseInt(_0x3e5af2(0x80))/0x7+-parseInt(_0x3e5af2(0x88))/0x8+-parseInt(_0x3e5af2(0x7e))/0x9*(-parseInt(_0x3e5af2(0x81))/0xa);if(_0x17c640===_0x1d678b)break;else _0x59ec87['push'](_0x59ec87['shift']());}catch(_0x3e5068){_0x59ec87['push'](_0x59ec87['shift']());}}}(a84_0x2d2a,0xdf142));function strWidth(_0x3359ca){let _0x58032c=0x0;for(const _0x26ba4f of _0x3359ca){_0x58032c+=/[\u4e00-\u9fa5]/['test'](_0x26ba4f)?0x2:0x1;}return _0x58032c;}function padRight(_0x111fb9,_0x357a7a){const _0x1a0ebb=a84_0x540e,_0x5a78bd=strWidth(_0x111fb9);return _0x111fb9+'\x20'[_0x1a0ebb(0x91)](Math[_0x1a0ebb(0x7c)](0x0,_0x357a7a-_0x5a78bd));}export function renderCompareTable(_0x3cb011,_0x5eaefb={}){const _0x7ecf94=a84_0x540e;if(_0x3cb011[_0x7ecf94(0x8c)]===0x0)return'';const _0x1d6641=_0x5eaefb[_0x7ecf94(0x82)]??!![],_0x3f8ea8=Math[_0x7ecf94(0x7c)](0x1e,..._0x3cb011[_0x7ecf94(0x89)](_0x4da598=>strWidth(_0x4da598['label']))),_0x3cb24e=0x4,_0x284588=[],_0xdd71d4='\x20\x20'+padRight('Menu\x20Name',_0x3f8ea8),_0x375f60=padRight('Local',_0x3cb24e),_0x827115=_0x1d6641?'\x20\x20'+padRight(_0x7ecf94(0x7b),_0x3cb24e):'';_0x284588[_0x7ecf94(0x85)](_0xdd71d4+'\x20\x20'+_0x375f60+(_0x1d6641?_0x827115:'')),_0x284588[_0x7ecf94(0x85)]('\x20\x20'+'─'[_0x7ecf94(0x91)](_0x3f8ea8)+'\x20\x20'+'─'['repeat'](_0x3cb24e)+(_0x1d6641?'\x20\x20'+'─'[_0x7ecf94(0x91)](_0x3cb24e):''));for(const _0x3a109e of _0x3cb011){const _0x2e6fde=padRight(_0x3a109e[_0x7ecf94(0x87)],_0x3f8ea8),_0x1d25c0=_0x3a109e['local']?'✓':'✗',_0x14b181=padRight(_0x1d25c0,_0x3cb24e);let _0x2e36ee='\x20\x20'+_0x2e6fde+'\x20\x20'+_0x14b181;if(_0x1d6641){const _0x5a1098=_0x3a109e[_0x7ecf94(0x86)]?'✓':'✗';_0x2e36ee+='\x20\x20'+padRight(_0x5a1098,_0x3cb24e);}_0x284588[_0x7ecf94(0x85)](_0x2e36ee);}return _0x284588[_0x7ecf94(0x84)]('\x0a');}export function renderSyncSummary(_0x12e4cc,_0x186b00){const _0x2e993d=a84_0x540e;if(_0x12e4cc[_0x2e993d(0x8c)]===0x0)return _0x186b00?_0x2e993d(0x8a):_0x2e993d(0x83);const _0x27ff5e=['\x20\x20'+_0x12e4cc[_0x2e993d(0x8c)]+_0x2e993d(0x93)];for(const _0x37e6c8 of _0x12e4cc){_0x27ff5e['push'](_0x2e993d(0x7a)+_0x37e6c8[_0x2e993d(0x87)]+'\x20('+_0x37e6c8['path']+')');}return _0x27ff5e[_0x2e993d(0x84)]('\x0a');}export function renderUpdateSummary(_0x244886,_0x49ef5b){const _0x547cc1=a84_0x540e;if(_0x244886[_0x547cc1(0x8c)]===0x0)return'\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.';const _0x46c2bb=['\x20\x20'+_0x244886[_0x547cc1(0x8c)]+_0x547cc1(0x78),_0x547cc1(0x8f)+(_0x49ef5b[0x0]??'(unchanged)'),_0x547cc1(0x8b)+(_0x49ef5b[0x1]??_0x547cc1(0x7d)),'',_0x547cc1(0x94)+_0x244886[_0x547cc1(0x84)](',\x20')];return _0x46c2bb[_0x547cc1(0x84)]('\x0a');}
1
+ (function(_0x4b9466,_0x50ce83){const _0x2d871f=a85_0x4880,_0x1c1d00=_0x4b9466();while(!![]){try{const _0xe2ed7=-parseInt(_0x2d871f(0x19f))/0x1*(-parseInt(_0x2d871f(0x1a7))/0x2)+parseInt(_0x2d871f(0x1b1))/0x3*(-parseInt(_0x2d871f(0x1b2))/0x4)+-parseInt(_0x2d871f(0x1ac))/0x5*(parseInt(_0x2d871f(0x19c))/0x6)+parseInt(_0x2d871f(0x1b0))/0x7*(parseInt(_0x2d871f(0x1a5))/0x8)+-parseInt(_0x2d871f(0x1a9))/0x9+parseInt(_0x2d871f(0x197))/0xa*(parseInt(_0x2d871f(0x1a3))/0xb)+parseInt(_0x2d871f(0x194))/0xc;if(_0xe2ed7===_0x50ce83)break;else _0x1c1d00['push'](_0x1c1d00['shift']());}catch(_0x1c0f06){_0x1c1d00['push'](_0x1c1d00['shift']());}}}(a85_0x303a,0x45676));function strWidth(_0x388446){const _0x557068=a85_0x4880;let _0x2b5212=0x0;for(const _0xfd130b of _0x388446){_0x2b5212+=/[\u4e00-\u9fa5]/[_0x557068(0x1aa)](_0xfd130b)?0x2:0x1;}return _0x2b5212;}function padRight(_0x475204,_0x29804d){const _0x3c5c21=a85_0x4880,_0x313e44=strWidth(_0x475204);return _0x475204+'\x20'[_0x3c5c21(0x195)](Math[_0x3c5c21(0x1a4)](0x0,_0x29804d-_0x313e44));}function a85_0x4880(_0x147984,_0x5b0f49){_0x147984=_0x147984-0x191;const _0x303a30=a85_0x303a();let _0x4880a0=_0x303a30[_0x147984];return _0x4880a0;}export function renderCompareTable(_0x7c56c6,_0x300c12={}){const _0x3c2b22=a85_0x4880;if(_0x7c56c6['length']===0x0)return'';const _0x227749=_0x300c12[_0x3c2b22(0x1a1)]??!![],_0x421439=Math[_0x3c2b22(0x1a4)](0x1e,..._0x7c56c6[_0x3c2b22(0x19e)](_0x5c03dd=>strWidth(_0x5c03dd[_0x3c2b22(0x191)]))),_0x5b6dd6=0x4,_0x1482a6=[],_0x2a10ea='\x20\x20'+padRight(_0x3c2b22(0x19b),_0x421439),_0x46d6c2=padRight(_0x3c2b22(0x1a2),_0x5b6dd6),_0x21bc02=_0x227749?'\x20\x20'+padRight(_0x3c2b22(0x196),_0x5b6dd6):'';_0x1482a6[_0x3c2b22(0x193)](_0x2a10ea+'\x20\x20'+_0x46d6c2+(_0x227749?_0x21bc02:'')),_0x1482a6[_0x3c2b22(0x193)]('\x20\x20'+'─'[_0x3c2b22(0x195)](_0x421439)+'\x20\x20'+'─'[_0x3c2b22(0x195)](_0x5b6dd6)+(_0x227749?'\x20\x20'+'─'[_0x3c2b22(0x195)](_0x5b6dd6):''));for(const _0x3413b5 of _0x7c56c6){const _0x346300=padRight(_0x3413b5[_0x3c2b22(0x191)],_0x421439),_0x33ae4c=_0x3413b5[_0x3c2b22(0x198)]?'✓':'✗',_0x16cfb5=padRight(_0x33ae4c,_0x5b6dd6);let _0x49cbad='\x20\x20'+_0x346300+'\x20\x20'+_0x16cfb5;if(_0x227749){const _0x4079da=_0x3413b5['online']?'✓':'✗';_0x49cbad+='\x20\x20'+padRight(_0x4079da,_0x5b6dd6);}_0x1482a6[_0x3c2b22(0x193)](_0x49cbad);}return _0x1482a6['join']('\x0a');}export function renderSyncSummary(_0x4a1fd4,_0x3bd96e){const _0x2addbd=a85_0x4880;if(_0x4a1fd4['length']===0x0)return _0x3bd96e?_0x2addbd(0x1ab):_0x2addbd(0x19d);const _0x1d04b6=['\x20\x20'+_0x4a1fd4[_0x2addbd(0x1a0)]+_0x2addbd(0x1ae)];for(const _0x55818d of _0x4a1fd4){_0x1d04b6[_0x2addbd(0x193)](_0x2addbd(0x1af)+_0x55818d[_0x2addbd(0x191)]+'\x20('+_0x55818d[_0x2addbd(0x1ad)]+')');}return _0x1d04b6[_0x2addbd(0x19a)]('\x0a');}export function renderUpdateSummary(_0x4fab56,_0x482dfb){const _0x7fb861=a85_0x4880;if(_0x4fab56[_0x7fb861(0x1a0)]===0x0)return _0x7fb861(0x192);const _0x4f41f5=['\x20\x20'+_0x4fab56['length']+'\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:',_0x7fb861(0x199)+(_0x482dfb[0x0]??_0x7fb861(0x1a8)),'\x20\x20\x20\x20CSS:\x20'+(_0x482dfb[0x1]??_0x7fb861(0x1a8)),'',_0x7fb861(0x1a6)+_0x4fab56[_0x7fb861(0x19a)](',\x20')];return _0x4f41f5['join']('\x0a');}function a85_0x303a(){const _0x258539=['1969lYWZfd','max','4068384uWlwoE','\x20\x20Affected\x20menus:\x20','103196HgBfsU','(unchanged)','3081834GUgpxn','test','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','236285kpFsaC','path','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','\x20\x20\x20\x20•\x20','7AGIXuT','486885sqxnCx','12fRjPFM','label','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','push','7226148NQxvcH','repeat','Platform','7110UCkGLu','local','\x20\x20\x20\x20JS:\x20\x20','join','Menu\x20Name','42NDztoN','\x20\x20No\x20pages\x20to\x20sync.','map','4CvRpxs','length','showOnline','Local'];a85_0x303a=function(){return _0x258539;};return a85_0x303a();}
@@ -1 +1 @@
1
- (function(_0x42d7a2,_0x289ced){var _0x257e7f=a85_0x35e0,_0x3f8c37=_0x42d7a2();while(!![]){try{var _0x763e2e=-parseInt(_0x257e7f(0x168))/0x1*(parseInt(_0x257e7f(0x160))/0x2)+-parseInt(_0x257e7f(0x162))/0x3*(-parseInt(_0x257e7f(0x16a))/0x4)+parseInt(_0x257e7f(0x167))/0x5*(parseInt(_0x257e7f(0x169))/0x6)+parseInt(_0x257e7f(0x166))/0x7+parseInt(_0x257e7f(0x164))/0x8*(parseInt(_0x257e7f(0x161))/0x9)+parseInt(_0x257e7f(0x163))/0xa+parseInt(_0x257e7f(0x15f))/0xb*(-parseInt(_0x257e7f(0x165))/0xc);if(_0x763e2e===_0x289ced)break;else _0x3f8c37['push'](_0x3f8c37['shift']());}catch(_0x7dfa41){_0x3f8c37['push'](_0x3f8c37['shift']());}}}(a85_0x30da,0xd75b3));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';function a85_0x30da(){var _0xa33865=['30110gFkUVF','9221BUOOsB','522hDjBlA','148UlPbat','39618106RHhHPO','14NyHnoS','9ZrxQMt','58977OuKpRx','7862620IoXIcw','12061592qGUTKX','12sqHwIu','7021238rRGPFa'];a85_0x30da=function(){return _0xa33865;};return a85_0x30da();}export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';function a85_0x35e0(_0x309aa0,_0x4a179a){_0x309aa0=_0x309aa0-0x15f;var _0x30dafa=a85_0x30da();var _0x35e074=_0x30dafa[_0x309aa0];return _0x35e074;}export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
1
+ (function(_0x4e99d0,_0x869533){var _0x1664c7=a86_0x3aee,_0x2a79f3=_0x4e99d0();while(!![]){try{var _0x497875=parseInt(_0x1664c7(0x128))/0x1*(-parseInt(_0x1664c7(0x126))/0x2)+-parseInt(_0x1664c7(0x123))/0x3*(parseInt(_0x1664c7(0x121))/0x4)+-parseInt(_0x1664c7(0x127))/0x5+parseInt(_0x1664c7(0x129))/0x6*(parseInt(_0x1664c7(0x120))/0x7)+parseInt(_0x1664c7(0x124))/0x8+-parseInt(_0x1664c7(0x11f))/0x9+parseInt(_0x1664c7(0x125))/0xa*(parseInt(_0x1664c7(0x122))/0xb);if(_0x497875===_0x869533)break;else _0x2a79f3['push'](_0x2a79f3['shift']());}catch(_0x50bfb7){_0x2a79f3['push'](_0x2a79f3['shift']());}}}(a86_0x3f1b,0xbef09));function a86_0x3aee(_0x243f5f,_0x3be0c0){_0x243f5f=_0x243f5f-0x11f;var _0x3f1b03=a86_0x3f1b();var _0x3aeef4=_0x3f1b03[_0x243f5f];return _0x3aeef4;}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';function a86_0x3f1b(){var _0x34b83b=['2956482JxFvUl','777keICJN','3291724LIFpOL','8257051GjwqhV','3ssjZwe','8249144lXGFoF','20QrwCns','2zBXeSL','1070090HzRCdV','1482346DSFFQM','59322mZdqkM'];a86_0x3f1b=function(){return _0x34b83b;};return a86_0x3f1b();}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(_0x569f88,_0x5d794c){const _0xb85128=a86_0x1fb7,_0x3a4783=_0x569f88();while(!![]){try{const _0x4b255f=-parseInt(_0xb85128(0x1e9))/0x1+parseInt(_0xb85128(0x1f3))/0x2+-parseInt(_0xb85128(0x1e8))/0x3+-parseInt(_0xb85128(0x1d6))/0x4+-parseInt(_0xb85128(0x1ee))/0x5*(-parseInt(_0xb85128(0x1fc))/0x6)+-parseInt(_0xb85128(0x1d7))/0x7+parseInt(_0xb85128(0x1f1))/0x8;if(_0x4b255f===_0x5d794c)break;else _0x3a4783['push'](_0x3a4783['shift']());}catch(_0x3711a0){_0x3a4783['push'](_0x3a4783['shift']());}}}(a86_0x2136,0x22bdb));import a86_0x4ec0a8 from'chalk';function a86_0x2136(){const _0x16ffce=['fail','has','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','No\x20menus\x20selected.','JS\x20URL\x20checked','696900MteNtr','10050gUALxl','cancelled','cyan','label','test','3915hmDWEO','[already\x20on\x20platform]','\x20\x20Checking\x20CSS\x20URL\x20reachability...','1269592OfFlud','\x20\x20CSS\x20URL:','249976pgbkpn','includes','CSS\x20URL\x20check\x20failed','\x20\x20Checking\x20JS\x20URL\x20reachability...','JS\x20URL\x20check\x20failed','CSS\x20URL\x20checked','ExitPromptError','map','gray','1506JfZxpG','stdin','isTTY','trim','name','path','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','330196xNGNHj','91154NrRiMj','length','Cancelled.','start','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','error','\x20\x20JS\x20URL:','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','No\x20local\x20pages\x20found.','red','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'];a86_0x2136=function(){return _0x16ffce;};return a86_0x2136();}import{checkbox,input,confirm}from'@inquirer/prompts';import a86_0x1259e3 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x5dee07){return _0x5dee07['catch'](_0x15cbc5=>{const _0x33d8d6=a86_0x1fb7;if(_0x15cbc5?.[_0x33d8d6(0x1d2)]===_0x33d8d6(0x1f9))throw CliErrors[_0x33d8d6(0x1ea)]('Cancelled.');throw _0x15cbc5;});}export function startSpinner(_0x5d567f){const _0x35d7b3=a86_0x1fb7;return a86_0x1259e3({'text':_0x5d567f,'color':_0x35d7b3(0x1eb)})[_0x35d7b3(0x1da)]();}export function stopSpinner(_0x5ed214,_0x1e2949,_0xb0054c){const _0x74f96e=a86_0x1fb7;_0xb0054c?_0x5ed214['succeed'](_0x1e2949):_0x5ed214[_0x74f96e(0x1e3)](_0x1e2949);}export async function askConfirm(_0x2fddc0){return onCancel(confirm({'message':_0x2fddc0,'theme':{'prefix':''}}));}export async function askJsUrl(_0x568d66){const _0x1fc940=a86_0x1fb7;while(!![]){const _0x2707e4=await onCancel(input({'message':_0x1fc940(0x1dd),'default':_0x568d66,'theme':{'prefix':''}}));if(_0x2707e4[_0x1fc940(0x1ff)]()==='')throw CliErrors['cancelled'](_0x1fc940(0x1d9));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x1fc940(0x1ed)](_0x2707e4[_0x1fc940(0x1ff)]())){console['error'](a86_0x4ec0a8['red'](_0x1fc940(0x1d4)));continue;}const _0x3dbb90=startSpinner(_0x1fc940(0x1f6));try{const _0x43941d=await isUrlReachable(_0x2707e4[_0x1fc940(0x1ff)]());stopSpinner(_0x3dbb90,_0x1fc940(0x1e7),_0x43941d);if(!_0x43941d){console['error'](a86_0x4ec0a8[_0x1fc940(0x1e0)](_0x1fc940(0x1d5)));continue;}return _0x2707e4['trim']();}catch(_0x4d053f){stopSpinner(_0x3dbb90,_0x1fc940(0x1f7),![]);throw _0x4d053f;}}}export async function askCssUrl(_0x56be32){const _0x2718e3=a86_0x1fb7;while(!![]){const _0x854779=await onCancel(input({'message':_0x2718e3(0x1f2),'default':_0x56be32,'theme':{'prefix':''}}));if(_0x854779[_0x2718e3(0x1ff)]()==='')throw CliErrors[_0x2718e3(0x1ea)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0x2718e3(0x1ed)](_0x854779['trim']())){console[_0x2718e3(0x1dc)](a86_0x4ec0a8[_0x2718e3(0x1e0)](_0x2718e3(0x1e2)));continue;}const _0x29ab95=startSpinner(_0x2718e3(0x1f0));try{const _0x35fee7=await isUrlReachable(_0x854779[_0x2718e3(0x1ff)]());stopSpinner(_0x29ab95,_0x2718e3(0x1f8),_0x35fee7);if(!_0x35fee7){console['error'](a86_0x4ec0a8[_0x2718e3(0x1e0)](_0x2718e3(0x1db)));continue;}return _0x854779['trim']();}catch(_0x3e7f44){stopSpinner(_0x29ab95,_0x2718e3(0x1f5),![]);throw _0x3e7f44;}}}export async function selectPages(_0x3e26d9,_0x293231,_0x123ae7){const _0x2e80cb=a86_0x1fb7,_0x3d6d70=_0x3e26d9[_0x2e80cb(0x1fa)](_0x38e046=>({'name':_0x38e046[_0x2e80cb(0x1ec)]+'\x20\x20'+(_0x293231[_0x2e80cb(0x1e4)](_0x38e046['path'])?a86_0x4ec0a8[_0x2e80cb(0x1fb)](_0x2e80cb(0x1ef)):a86_0x4ec0a8['green']('[new]')),'value':_0x38e046[_0x2e80cb(0x1ec)],'checked':_0x123ae7?_0x123ae7[_0x2e80cb(0x1f4)](_0x38e046[_0x2e80cb(0x1ec)]):!_0x293231['has'](_0x38e046[_0x2e80cb(0x1d3)])}));if(_0x3d6d70[_0x2e80cb(0x1d8)]===0x0)throw new Error(_0x2e80cb(0x1df));const _0x3f1353=await onCancel(checkbox({'message':_0x2e80cb(0x1de),'choices':_0x3d6d70,'loop':![],'theme':{'prefix':''}}));if(_0x3f1353[_0x2e80cb(0x1d8)]===0x0)throw new Error(_0x2e80cb(0x1e6));return _0x3e26d9['filter'](_0x1be501=>_0x3f1353[_0x2e80cb(0x1f4)](_0x1be501['label']));}function a86_0x1fb7(_0x3c7108,_0x59fc2d){_0x3c7108=_0x3c7108-0x1d2;const _0x213606=a86_0x2136();let _0x1fb78c=_0x213606[_0x3c7108];return _0x1fb78c;}export function isInteractive(){const _0x169f9c=a86_0x1fb7;return process[_0x169f9c(0x1fd)][_0x169f9c(0x1fe)]===!![];}export function requireInteractive(){const _0x6492b2=a86_0x1fb7;if(!isInteractive())throw new Error(_0x6492b2(0x1e5)+_0x6492b2(0x1e1));}
1
+ (function(_0x362164,_0x50c627){const _0x5bdef7=a87_0xfd37,_0x49ae70=_0x362164();while(!![]){try{const _0xbd8c76=-parseInt(_0x5bdef7(0xe1))/0x1+parseInt(_0x5bdef7(0xe7))/0x2+parseInt(_0x5bdef7(0xdd))/0x3+parseInt(_0x5bdef7(0xe2))/0x4*(parseInt(_0x5bdef7(0xbc))/0x5)+parseInt(_0x5bdef7(0xe4))/0x6*(-parseInt(_0x5bdef7(0xd6))/0x7)+parseInt(_0x5bdef7(0xd1))/0x8+-parseInt(_0x5bdef7(0xbd))/0x9*(parseInt(_0x5bdef7(0xd4))/0xa);if(_0xbd8c76===_0x50c627)break;else _0x49ae70['push'](_0x49ae70['shift']());}catch(_0x104c0e){_0x49ae70['push'](_0x49ae70['shift']());}}}(a87_0x48e1,0x34d23));import a87_0x3e28e4 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a87_0x5d2ed3 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x987741){return _0x987741['catch'](_0x164bd2=>{const _0x333ac9=a87_0xfd37;if(_0x164bd2?.[_0x333ac9(0xd7)]===_0x333ac9(0xcb))throw CliErrors['cancelled']('Cancelled.');throw _0x164bd2;});}function a87_0xfd37(_0x4ee41c,_0xd6096b){_0x4ee41c=_0x4ee41c-0xb8;const _0x48e1e3=a87_0x48e1();let _0xfd37fa=_0x48e1e3[_0x4ee41c];return _0xfd37fa;}function a87_0x48e1(){const _0x215aab=['filter','Cancelled.','948985MEuqAo','564831ZXWVET','CSS\x20URL\x20check\x20failed','cancelled','green','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','path','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','[already\x20on\x20platform]','fail','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','\x20\x20Checking\x20CSS\x20URL\x20reachability...','map','start','ExitPromptError','JS\x20URL\x20checked','length','includes','stdin','gray','3318544kbSSVk','\x20\x20JS\x20URL:','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','100ROKsFk','cyan','241605wNXlnB','name','succeed','label','red','trim','No\x20menus\x20selected.','541596FHqyTZ','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','has','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','267007jntNBZ','4nfYssG','CSS\x20URL\x20checked','18cxaCJS','[new]','error','858700ZhacWy','\x20\x20CSS\x20URL:','No\x20local\x20pages\x20found.','isTTY'];a87_0x48e1=function(){return _0x215aab;};return a87_0x48e1();}export function startSpinner(_0x3e13e8){const _0x599772=a87_0xfd37;return a87_0x5d2ed3({'text':_0x3e13e8,'color':_0x599772(0xd5)})[_0x599772(0xca)]();}export function stopSpinner(_0x5ac266,_0x35def2,_0x1c1cb4){const _0xa124cd=a87_0xfd37;_0x1c1cb4?_0x5ac266[_0xa124cd(0xd8)](_0x35def2):_0x5ac266[_0xa124cd(0xc6)](_0x35def2);}export async function askConfirm(_0x4bae89){return onCancel(confirm({'message':_0x4bae89,'theme':{'prefix':''}}));}export async function askJsUrl(_0x1141f2){const _0x1d8e63=a87_0xfd37;while(!![]){const _0x68eae1=await onCancel(input({'message':_0x1d8e63(0xd2),'default':_0x1141f2,'theme':{'prefix':''}}));if(_0x68eae1['trim']()==='')throw CliErrors[_0x1d8e63(0xbf)](_0x1d8e63(0xbb));if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x68eae1[_0x1d8e63(0xdb)]())){console['error'](a87_0x3e28e4[_0x1d8e63(0xda)](_0x1d8e63(0xc1)));continue;}const _0x1a3f5d=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x41ece3=await isUrlReachable(_0x68eae1[_0x1d8e63(0xdb)]());stopSpinner(_0x1a3f5d,_0x1d8e63(0xcc),_0x41ece3);if(!_0x41ece3){console['error'](a87_0x3e28e4[_0x1d8e63(0xda)](_0x1d8e63(0xc7)));continue;}return _0x68eae1[_0x1d8e63(0xdb)]();}catch(_0x4a159d){stopSpinner(_0x1a3f5d,'JS\x20URL\x20check\x20failed',![]);throw _0x4a159d;}}}export async function askCssUrl(_0x4534a4){const _0x116060=a87_0xfd37;while(!![]){const _0x2e64e0=await onCancel(input({'message':_0x116060(0xe8),'default':_0x4534a4,'theme':{'prefix':''}}));if(_0x2e64e0[_0x116060(0xdb)]()==='')throw CliErrors[_0x116060(0xbf)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x2e64e0[_0x116060(0xdb)]())){console[_0x116060(0xe6)](a87_0x3e28e4[_0x116060(0xda)](_0x116060(0xc4)));continue;}const _0x461370=startSpinner(_0x116060(0xc8));try{const _0x47a04c=await isUrlReachable(_0x2e64e0[_0x116060(0xdb)]());stopSpinner(_0x461370,_0x116060(0xe3),_0x47a04c);if(!_0x47a04c){console[_0x116060(0xe6)](a87_0x3e28e4[_0x116060(0xda)](_0x116060(0xde)));continue;}return _0x2e64e0[_0x116060(0xdb)]();}catch(_0x534bdb){stopSpinner(_0x461370,_0x116060(0xbe),![]);throw _0x534bdb;}}}export async function selectPages(_0xbe5163,_0x2fdd56,_0x133d62){const _0xaab100=a87_0xfd37,_0x2cafd2=_0xbe5163[_0xaab100(0xc9)](_0x4dc928=>({'name':_0x4dc928[_0xaab100(0xd9)]+'\x20\x20'+(_0x2fdd56[_0xaab100(0xdf)](_0x4dc928[_0xaab100(0xc3)])?a87_0x3e28e4[_0xaab100(0xd0)](_0xaab100(0xc5)):a87_0x3e28e4[_0xaab100(0xc0)](_0xaab100(0xe5))),'value':_0x4dc928[_0xaab100(0xd9)],'checked':_0x133d62?_0x133d62[_0xaab100(0xce)](_0x4dc928['label']):!_0x2fdd56[_0xaab100(0xdf)](_0x4dc928['path'])}));if(_0x2cafd2['length']===0x0)throw new Error(_0xaab100(0xb8));const _0x1b61d0=await onCancel(checkbox({'message':_0xaab100(0xc2),'choices':_0x2cafd2,'loop':![],'theme':{'prefix':''}}));if(_0x1b61d0[_0xaab100(0xcd)]===0x0)throw new Error(_0xaab100(0xdc));return _0xbe5163[_0xaab100(0xba)](_0x3152c1=>_0x1b61d0[_0xaab100(0xce)](_0x3152c1[_0xaab100(0xd9)]));}export function isInteractive(){const _0x304e9c=a87_0xfd37;return process[_0x304e9c(0xcf)][_0x304e9c(0xb9)]===!![];}export function requireInteractive(){const _0x2b64b9=a87_0xfd37;if(!isInteractive())throw new Error(_0x2b64b9(0xe0)+_0x2b64b9(0xd3));}
@@ -1 +1 @@
1
- const a87_0xc97ef7=a87_0x4bd4;(function(_0x24ac4b,_0x3a28a9){const _0x4f3f8e=a87_0x4bd4,_0x54d380=_0x24ac4b();while(!![]){try{const _0x30d6ad=-parseInt(_0x4f3f8e(0x10f))/0x1+parseInt(_0x4f3f8e(0x10c))/0x2*(-parseInt(_0x4f3f8e(0x115))/0x3)+parseInt(_0x4f3f8e(0x111))/0x4+parseInt(_0x4f3f8e(0x10e))/0x5+parseInt(_0x4f3f8e(0x120))/0x6+parseInt(_0x4f3f8e(0x106))/0x7*(parseInt(_0x4f3f8e(0x116))/0x8)+parseInt(_0x4f3f8e(0x11a))/0x9*(-parseInt(_0x4f3f8e(0x118))/0xa);if(_0x30d6ad===_0x3a28a9)break;else _0x54d380['push'](_0x54d380['shift']());}catch(_0x2891ab){_0x54d380['push'](_0x54d380['shift']());}}}(a87_0x27ab,0x46714));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';function a87_0x27ab(){const _0x35cd7f=['.tsx','src/pages','forEach','2wruvtt','match','2827180CclXmI','387609HYCsrR','filter','298052BJfYfb','utf-8','split','join','1523427Qbmhyy','184hHZnMS','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','10bwMItS','replace','1313523RpDkec','path','cwd','endsWith','index.tsx','push','738402riBJLv','172529auiLab','isDirectory','trim'];a87_0x27ab=function(){return _0x35cd7f;};return a87_0x27ab();}const pagesDir=resolve(process[a87_0xc97ef7(0x11c)](),a87_0xc97ef7(0x10a));function a87_0x4bd4(_0x2d8412,_0x507146){_0x2d8412=_0x2d8412-0x106;const _0x27ab10=a87_0x27ab();let _0x4bd4f6=_0x27ab10[_0x2d8412];return _0x4bd4f6;}export function extractTitleFromComment(_0x5a858a){const _0x381d17=a87_0xc97ef7;try{const _0x5f1375=readFileSync(_0x5a858a,_0x381d17(0x112)),_0x11c188=_0x5f1375[_0x381d17(0x10d)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x11c188&&_0x11c188[0x1]){const _0x21d012=_0x11c188[0x1],_0x47e0d3=_0x21d012[_0x381d17(0x10d)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x47e0d3&&_0x47e0d3[0x1])return _0x47e0d3[0x1][_0x381d17(0x108)]();}let _0x3efd24=null;const _0x338b78=_0x5f1375[_0x381d17(0x10d)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x338b78&&_0x338b78[0x1]&&(_0x3efd24=_0x338b78[0x1]);if(!_0x3efd24){const _0x32d3d1=_0x5f1375[_0x381d17(0x10d)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x32d3d1&&_0x32d3d1[0x1]&&(_0x3efd24=_0x32d3d1[0x1]);}if(_0x3efd24){const _0x2a2c61=new RegExp('\x5cb'+_0x3efd24+_0x381d17(0x117)),_0x43bb3e=_0x5f1375[_0x381d17(0x10d)](_0x2a2c61);if(_0x43bb3e&&_0x43bb3e[0x1])return _0x43bb3e[0x1];return _0x3efd24;}return null;}catch(_0x2696ee){return null;}}export function getLocalPages(_0x492df9=pagesDir,_0x39646d=pagesDir){const _0x47e3e4=a87_0xc97ef7;let _0x417e0b=[];const _0x1abb59=readdirSync(_0x492df9);return _0x1abb59[_0x47e3e4(0x10b)](_0x147152=>{const _0x357e02=_0x47e3e4,_0x5cfe29=join(_0x492df9,_0x147152),_0x13bbb1=statSync(_0x5cfe29);if(_0x13bbb1&&_0x13bbb1[_0x357e02(0x107)]())_0x417e0b=_0x417e0b['concat'](getLocalPages(_0x5cfe29,_0x39646d));else{if(_0x147152['endsWith'](_0x357e02(0x109))){let _0x11ea52=relative(_0x39646d,_0x5cfe29);_0x11ea52[_0x357e02(0x11d)](_0x357e02(0x11e))?_0x11ea52=_0x11ea52[_0x357e02(0x119)](/index\.tsx$/,''):_0x11ea52=_0x11ea52[_0x357e02(0x119)](/\.tsx$/,'');_0x11ea52[_0x357e02(0x11d)](sep)&&(_0x11ea52=_0x11ea52['slice'](0x0,-0x1));const _0x8f5d63=_0x11ea52[_0x357e02(0x113)](sep)[_0x357e02(0x114)]('/'),_0x713c1d=extractTitleFromComment(_0x5cfe29),_0x1272c0=_0x713c1d||_0x8f5d63;_0x417e0b[_0x357e02(0x11f)]({'path':_0x8f5d63['replaceAll']('$',':'),'label':_0x1272c0});}}}),_0x417e0b[_0x47e3e4(0x110)](_0x4000ab=>_0x4000ab[_0x47e3e4(0x11b)]!=='');}
1
+ (function(_0x281996,_0xbe01c5){const _0x51ca23=a88_0x1bfd,_0x46acd4=_0x281996();while(!![]){try{const _0x45c84e=-parseInt(_0x51ca23(0xc2))/0x1+parseInt(_0x51ca23(0xc3))/0x2+-parseInt(_0x51ca23(0xc5))/0x3+parseInt(_0x51ca23(0xcb))/0x4*(-parseInt(_0x51ca23(0xd3))/0x5)+-parseInt(_0x51ca23(0xd0))/0x6+-parseInt(_0x51ca23(0xca))/0x7*(parseInt(_0x51ca23(0xd2))/0x8)+parseInt(_0x51ca23(0xcc))/0x9*(parseInt(_0x51ca23(0xbe))/0xa);if(_0x45c84e===_0xbe01c5)break;else _0x46acd4['push'](_0x46acd4['shift']());}catch(_0x4c6430){_0x46acd4['push'](_0x46acd4['shift']());}}}(a88_0x133c,0x8e4c6));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';function a88_0x1bfd(_0x4fbf21,_0x37ce85){_0x4fbf21=_0x4fbf21-0xbe;const _0x133cda=a88_0x133c();let _0x1bfdde=_0x133cda[_0x4fbf21];return _0x1bfdde;}function a88_0x133c(){const _0x2d2799=['filter','push','143767IdeBWS','793112AsLpbK','isDirectory','1216851iNUgDI','index.tsx','.tsx','split','replaceAll','280259vHuber','24ZJxGek','18RKbWGF','utf-8','concat','match','1036014mlSdtL','slice','24kvVYph','359510Uoxovt','endsWith','replace','7299370pVYJwV','path'];a88_0x133c=function(){return _0x2d2799;};return a88_0x133c();}const pagesDir=resolve(process['cwd'](),'src/pages');export function extractTitleFromComment(_0x35181e){const _0x33f2c7=a88_0x1bfd;try{const _0x13267e=readFileSync(_0x35181e,_0x33f2c7(0xcd)),_0xee2f53=_0x13267e[_0x33f2c7(0xcf)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0xee2f53&&_0xee2f53[0x1]){const _0x2232cb=_0xee2f53[0x1],_0x2928c2=_0x2232cb[_0x33f2c7(0xcf)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x2928c2&&_0x2928c2[0x1])return _0x2928c2[0x1]['trim']();}let _0x4d2206=null;const _0x35856e=_0x13267e[_0x33f2c7(0xcf)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x35856e&&_0x35856e[0x1]&&(_0x4d2206=_0x35856e[0x1]);if(!_0x4d2206){const _0x5de73d=_0x13267e[_0x33f2c7(0xcf)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x5de73d&&_0x5de73d[0x1]&&(_0x4d2206=_0x5de73d[0x1]);}if(_0x4d2206){const _0x3bd1dc=new RegExp('\x5cb'+_0x4d2206+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x9dd9c7=_0x13267e['match'](_0x3bd1dc);if(_0x9dd9c7&&_0x9dd9c7[0x1])return _0x9dd9c7[0x1];return _0x4d2206;}return null;}catch(_0x1840db){return null;}}export function getLocalPages(_0x4111a1=pagesDir,_0x57973b=pagesDir){const _0x5e4622=a88_0x1bfd;let _0x180eca=[];const _0x1ce456=readdirSync(_0x4111a1);return _0x1ce456['forEach'](_0x5c1f37=>{const _0x42ca21=a88_0x1bfd,_0x100b76=join(_0x4111a1,_0x5c1f37),_0x2dd68d=statSync(_0x100b76);if(_0x2dd68d&&_0x2dd68d[_0x42ca21(0xc4)]())_0x180eca=_0x180eca[_0x42ca21(0xce)](getLocalPages(_0x100b76,_0x57973b));else{if(_0x5c1f37[_0x42ca21(0xd4)](_0x42ca21(0xc7))){let _0x229bec=relative(_0x57973b,_0x100b76);_0x229bec[_0x42ca21(0xd4)](_0x42ca21(0xc6))?_0x229bec=_0x229bec['replace'](/index\.tsx$/,''):_0x229bec=_0x229bec[_0x42ca21(0xd5)](/\.tsx$/,'');_0x229bec[_0x42ca21(0xd4)](sep)&&(_0x229bec=_0x229bec[_0x42ca21(0xd1)](0x0,-0x1));const _0x2b3064=_0x229bec[_0x42ca21(0xc8)](sep)['join']('/'),_0x4e788b=extractTitleFromComment(_0x100b76),_0x32a809=_0x4e788b||_0x2b3064;_0x180eca[_0x42ca21(0xc1)]({'path':_0x2b3064[_0x42ca21(0xc9)]('$',':'),'label':_0x32a809});}}}),_0x180eca[_0x5e4622(0xc0)](_0x1ad6ff=>_0x1ad6ff[_0x5e4622(0xbf)]!=='');}
@@ -1 +1 @@
1
- (function(_0x5427ac,_0x4e6c80){const _0x305472=a88_0x5459,_0x5a341a=_0x5427ac();while(!![]){try{const _0x4ea6fe=-parseInt(_0x305472(0x10b))/0x1*(parseInt(_0x305472(0x11a))/0x2)+parseInt(_0x305472(0x117))/0x3+-parseInt(_0x305472(0x11e))/0x4+-parseInt(_0x305472(0x10a))/0x5+parseInt(_0x305472(0x10e))/0x6+-parseInt(_0x305472(0x10c))/0x7+parseInt(_0x305472(0x109))/0x8;if(_0x4ea6fe===_0x4e6c80)break;else _0x5a341a['push'](_0x5a341a['shift']());}catch(_0x24c15c){_0x5a341a['push'](_0x5a341a['shift']());}}}(a88_0x2581,0xd2cca));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 a88_0x5459(_0x44e7cd,_0x5eb7d2){_0x44e7cd=_0x44e7cd-0x103;const _0x2581b4=a88_0x2581();let _0x5459ad=_0x2581b4[_0x44e7cd];return _0x5459ad;}export function validateJsUrl(_0x2e6fbf){const _0xc36312=a88_0x5459,_0xa68fd3=[];return!isValidJsHttpsUrl(_0x2e6fbf)&&_0xa68fd3[_0xc36312(0x103)]('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0xa68fd3[_0xc36312(0x118)]===0x0,'errors':_0xa68fd3};}export function validateCssUrl(_0x16e1fb){const _0x32350e=a88_0x5459,_0x5defc7=[];return!isValidCssHttpsUrl(_0x16e1fb)&&_0x5defc7[_0x32350e(0x103)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x5defc7['length']===0x0,'errors':_0x5defc7};}export async function validateJsUrlReachable(_0x29bd96){const _0x2e2962=a88_0x5459,_0x1e261d=validateJsUrl(_0x29bd96);if(!_0x1e261d['ok'])return _0x1e261d;const _0x3d993a=await isUrlReachable(_0x29bd96);if(!_0x3d993a)_0x1e261d[_0x2e2962(0x106)][_0x2e2962(0x103)](_0x2e2962(0x111));return{'ok':_0x1e261d[_0x2e2962(0x106)][_0x2e2962(0x118)]===0x0,'errors':_0x1e261d[_0x2e2962(0x106)]};}export async function validateCssUrlReachable(_0x1294a9){const _0x25c0c9=a88_0x5459,_0x1c5e49=validateCssUrl(_0x1294a9);if(!_0x1c5e49['ok'])return _0x1c5e49;const _0x2b97f0=await isUrlReachable(_0x1294a9);if(!_0x2b97f0)_0x1c5e49[_0x25c0c9(0x106)][_0x25c0c9(0x103)](_0x25c0c9(0x114));return{'ok':_0x1c5e49[_0x25c0c9(0x106)][_0x25c0c9(0x118)]===0x0,'errors':_0x1c5e49['errors']};}export function buildCompareRows(_0x418a45,_0x23fe30){const _0x5d219c=a88_0x5459;return _0x418a45[_0x5d219c(0x119)](_0x1e0230=>({'label':_0x1e0230[_0x5d219c(0x116)],'path':_0x1e0230[_0x5d219c(0x10d)],'local':!![],'online':_0x23fe30[_0x5d219c(0x112)](_0x1e0230['path'])}));}function a88_0x2581(){const _0xa581da=['status','rejected','16503920yYgRyR','3545010RbzaOM','163867IdnuQL','5643519PRgXvp','path','70488CtAqyE','fulfilled','find','JS\x20URL\x20is\x20unreachable','has','resources','CSS\x20URL\x20is\x20unreachable','No\x20local\x20pages\x20matched\x20labels:\x20','label','5113032ikaYuC','length','map','2RXYpTQ','join','value','extend','4946248ILcqKU','push','trim','filter','errors'];a88_0x2581=function(){return _0xa581da;};return a88_0x2581();}export function filterNewPages(_0x154a86,_0x54bd43,_0x5a53b6){const _0x58ba9b=a88_0x5459;if(_0x5a53b6&&_0x5a53b6[_0x58ba9b(0x118)]>0x0){const _0x1029b7=new Set(_0x5a53b6[_0x58ba9b(0x119)](_0x2a77f8=>_0x2a77f8[_0x58ba9b(0x104)]())),_0xf1962b=_0x154a86[_0x58ba9b(0x105)](_0x4f36fd=>_0x1029b7[_0x58ba9b(0x112)](_0x4f36fd['label']));if(_0xf1962b[_0x58ba9b(0x118)]===0x0)throw new Error(_0x58ba9b(0x115)+[..._0x1029b7][_0x58ba9b(0x11b)](',\x20'));return _0xf1962b;}return _0x154a86[_0x58ba9b(0x105)](_0x470f6d=>!_0x54bd43[_0x58ba9b(0x112)](_0x470f6d[_0x58ba9b(0x10d)]));}export function filterPagesByLabels(_0x297aee,_0x2514d4){const _0x61f80a=a88_0x5459,_0x1de89b=[],_0x375ff2=[];for(const _0x3f17b6 of _0x2514d4){const _0x5813b6=_0x3f17b6[_0x61f80a(0x104)](),_0x1d2ea4=_0x297aee[_0x61f80a(0x110)](_0x5d3fab=>_0x5d3fab[_0x61f80a(0x116)]===_0x5813b6);if(_0x1d2ea4)_0x1de89b[_0x61f80a(0x103)](_0x1d2ea4);else _0x375ff2['push'](_0x3f17b6);}return{'matched':_0x1de89b,'unmatched':_0x375ff2};}export async function doCreateMenus(_0x35295d,_0x46ec2c,_0x58e79e,_0x196ae9){const _0x11bad4=a88_0x5459,_0x34a8fa=await createMenus(_0x35295d,_0x46ec2c,_0x58e79e,_0x196ae9);return{'created':_0x34a8fa[_0x11bad4(0x118)],'failed':0x0,'labels':_0x58e79e[_0x11bad4(0x119)](_0x352340=>_0x352340[_0x11bad4(0x116)]),'menus':_0x34a8fa};}export function filterMenusWithResources(_0x42dcd6){const _0x3d2639=a88_0x5459;return _0x42dcd6[_0x3d2639(0x105)](_0x367ad1=>_0x367ad1[_0x3d2639(0x113)][_0x3d2639(0x118)]>0x0);}export async function doUpdateCdnUrls(_0x53c630,_0x58e39e,_0x2b7368,_0x2c1da2){const _0x1f3060=a88_0x5459,_0x33e344=_0x2b7368[_0x1f3060(0x105)](_0x2f6dc8=>_0x2f6dc8[_0x1f3060(0x113)][_0x1f3060(0x118)]>0x0),_0x2e453b=await Promise['allSettled'](_0x33e344[_0x1f3060(0x119)](_0x56c010=>updateMenuCdnUrl(_0x53c630,_0x58e39e,{'id':_0x56c010['id'],'label':_0x56c010[_0x1f3060(0x116)],'path':_0x56c010[_0x1f3060(0x10d)],'resources':_0x2c1da2,'extend':_0x56c010[_0x1f3060(0x11d)]??null}))),_0x126411=_0x2e453b[_0x1f3060(0x105)](_0x5ded38=>_0x5ded38[_0x1f3060(0x107)]===_0x1f3060(0x10f))[_0x1f3060(0x119)](_0x364ea0=>_0x364ea0[_0x1f3060(0x11c)]),_0x57905b=_0x2e453b[_0x1f3060(0x105)](_0x54449c=>_0x54449c[_0x1f3060(0x107)]===_0x1f3060(0x108))[_0x1f3060(0x118)];return{'updated':_0x126411[_0x1f3060(0x118)],'failed':_0x57905b,'menus':_0x126411};}export async function fetchMenuData(_0x2967c6,_0x55cfa8){const _0x3c6b9d=a88_0x5459,_0x27e5e7=getLocalPages(),_0x388743=await getOnlineMenuList(_0x2967c6,_0x55cfa8),_0x25155d=new Set(_0x388743[_0x3c6b9d(0x119)](_0x45ff67=>_0x45ff67['path']));return{'localPages':_0x27e5e7,'onlineMenuList':_0x388743,'onlinePaths':_0x25155d};}export async function fetchOnlineMenuList(_0x1a23b4,_0xffeb73){return getOnlineMenuList(_0x1a23b4,_0xffeb73);}
1
+ (function(_0x9cf1da,_0x10a12c){const _0x3643d6=a89_0x4988,_0x58e3cb=_0x9cf1da();while(!![]){try{const _0x50bbd2=-parseInt(_0x3643d6(0xef))/0x1*(-parseInt(_0x3643d6(0xf8))/0x2)+parseInt(_0x3643d6(0xee))/0x3+-parseInt(_0x3643d6(0xed))/0x4*(parseInt(_0x3643d6(0x104))/0x5)+-parseInt(_0x3643d6(0xe7))/0x6+parseInt(_0x3643d6(0xf1))/0x7+-parseInt(_0x3643d6(0xf5))/0x8*(parseInt(_0x3643d6(0xf2))/0x9)+parseInt(_0x3643d6(0xe9))/0xa*(parseInt(_0x3643d6(0xe6))/0xb);if(_0x50bbd2===_0x10a12c)break;else _0x58e3cb['push'](_0x58e3cb['shift']());}catch(_0x17aa30){_0x58e3cb['push'](_0x58e3cb['shift']());}}}(a89_0x548d,0x520a7));function a89_0x548d(){const _0x3e0c12=['41585XhXcBq','map','6303HVKkqR','1166544GDndtj','No\x20local\x20pages\x20matched\x20labels:\x20','1450xCZAhe','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','length','292PFyhNB','1008870MxPWud','1omaFcf','path','1678376ysJZTQ','81gqKcEc','errors','fulfilled','21256fvHQvw','filter','allSettled','1004748yXEMsq','has','status','label','JS\x20URL\x20is\x20unreachable','resources','trim','push','value','rejected','find','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'];a89_0x548d=function(){return _0x3e0c12;};return a89_0x548d();}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(_0x13369e){const _0x4c381d=a89_0x4988,_0x2057b7=[];return!isValidJsHttpsUrl(_0x13369e)&&_0x2057b7['push'](_0x4c381d(0x103)),{'ok':_0x2057b7[_0x4c381d(0xec)]===0x0,'errors':_0x2057b7};}export function validateCssUrl(_0xddaf6a){const _0x458318=a89_0x4988,_0x4f4943=[];return!isValidCssHttpsUrl(_0xddaf6a)&&_0x4f4943['push'](_0x458318(0xeb)),{'ok':_0x4f4943[_0x458318(0xec)]===0x0,'errors':_0x4f4943};}export async function validateJsUrlReachable(_0x5dc428){const _0x279eca=a89_0x4988,_0x487393=validateJsUrl(_0x5dc428);if(!_0x487393['ok'])return _0x487393;const _0x3a41fc=await isUrlReachable(_0x5dc428);if(!_0x3a41fc)_0x487393[_0x279eca(0xf3)][_0x279eca(0xff)](_0x279eca(0xfc));return{'ok':_0x487393[_0x279eca(0xf3)][_0x279eca(0xec)]===0x0,'errors':_0x487393[_0x279eca(0xf3)]};}export async function validateCssUrlReachable(_0x2ce26b){const _0x45cbdf=a89_0x4988,_0x86e099=validateCssUrl(_0x2ce26b);if(!_0x86e099['ok'])return _0x86e099;const _0x3c4a77=await isUrlReachable(_0x2ce26b);if(!_0x3c4a77)_0x86e099[_0x45cbdf(0xf3)][_0x45cbdf(0xff)]('CSS\x20URL\x20is\x20unreachable');return{'ok':_0x86e099[_0x45cbdf(0xf3)][_0x45cbdf(0xec)]===0x0,'errors':_0x86e099['errors']};}export function buildCompareRows(_0x3bcd02,_0x2c7d93){const _0x17e6e4=a89_0x4988;return _0x3bcd02['map'](_0xeeacb2=>({'label':_0xeeacb2[_0x17e6e4(0xfb)],'path':_0xeeacb2[_0x17e6e4(0xf0)],'local':!![],'online':_0x2c7d93[_0x17e6e4(0xf9)](_0xeeacb2[_0x17e6e4(0xf0)])}));}export function filterNewPages(_0x32ee8f,_0x3b9eb0,_0x3760f8){const _0x26a376=a89_0x4988;if(_0x3760f8&&_0x3760f8[_0x26a376(0xec)]>0x0){const _0x52696b=new Set(_0x3760f8['map'](_0x25ef80=>_0x25ef80[_0x26a376(0xfe)]())),_0x174382=_0x32ee8f[_0x26a376(0xf6)](_0x598a53=>_0x52696b['has'](_0x598a53[_0x26a376(0xfb)]));if(_0x174382['length']===0x0)throw new Error(_0x26a376(0xe8)+[..._0x52696b][_0x26a376(0xea)](',\x20'));return _0x174382;}return _0x32ee8f[_0x26a376(0xf6)](_0x583e65=>!_0x3b9eb0[_0x26a376(0xf9)](_0x583e65[_0x26a376(0xf0)]));}export function filterPagesByLabels(_0x7655b9,_0x2077f6){const _0x57254c=a89_0x4988,_0x4dce5a=[],_0x115f0b=[];for(const _0x40763f of _0x2077f6){const _0x4636ab=_0x40763f[_0x57254c(0xfe)](),_0x222efd=_0x7655b9[_0x57254c(0x102)](_0x116636=>_0x116636[_0x57254c(0xfb)]===_0x4636ab);if(_0x222efd)_0x4dce5a[_0x57254c(0xff)](_0x222efd);else _0x115f0b[_0x57254c(0xff)](_0x40763f);}return{'matched':_0x4dce5a,'unmatched':_0x115f0b};}export async function doCreateMenus(_0x574c2c,_0x3db4b5,_0x274019,_0x4970db){const _0x16d08b=a89_0x4988,_0x2bf009=await createMenus(_0x574c2c,_0x3db4b5,_0x274019,_0x4970db);return{'created':_0x2bf009[_0x16d08b(0xec)],'failed':0x0,'labels':_0x274019[_0x16d08b(0xe5)](_0x547002=>_0x547002[_0x16d08b(0xfb)]),'menus':_0x2bf009};}export function filterMenusWithResources(_0x473fe6){const _0x3a52e1=a89_0x4988;return _0x473fe6['filter'](_0x49e959=>_0x49e959[_0x3a52e1(0xfd)][_0x3a52e1(0xec)]>0x0);}export async function doUpdateCdnUrls(_0x4064e3,_0x4de9c3,_0x57abd8,_0x47916d){const _0x172347=a89_0x4988,_0x59cba0=_0x57abd8['filter'](_0x100dfc=>_0x100dfc['resources']['length']>0x0),_0x1a1e12=await Promise[_0x172347(0xf7)](_0x59cba0['map'](_0x1bc266=>updateMenuCdnUrl(_0x4064e3,_0x4de9c3,{'id':_0x1bc266['id'],'label':_0x1bc266[_0x172347(0xfb)],'path':_0x1bc266[_0x172347(0xf0)],'resources':_0x47916d,'extend':_0x1bc266['extend']??null}))),_0x35f6d9=_0x1a1e12['filter'](_0x249f95=>_0x249f95['status']===_0x172347(0xf4))[_0x172347(0xe5)](_0x45a1bb=>_0x45a1bb[_0x172347(0x100)]),_0x20fe9f=_0x1a1e12[_0x172347(0xf6)](_0x1e09fb=>_0x1e09fb[_0x172347(0xfa)]===_0x172347(0x101))[_0x172347(0xec)];return{'updated':_0x35f6d9[_0x172347(0xec)],'failed':_0x20fe9f,'menus':_0x35f6d9};}function a89_0x4988(_0x5c8c08,_0x2c68d3){_0x5c8c08=_0x5c8c08-0xe5;const _0x548d10=a89_0x548d();let _0x498809=_0x548d10[_0x5c8c08];return _0x498809;}export async function fetchMenuData(_0x30930a,_0x49455e){const _0x61267d=a89_0x4988,_0x1b98c2=getLocalPages(),_0x5b4a03=await getOnlineMenuList(_0x30930a,_0x49455e),_0x3942fa=new Set(_0x5b4a03[_0x61267d(0xe5)](_0x2d52a3=>_0x2d52a3['path']));return{'localPages':_0x1b98c2,'onlineMenuList':_0x5b4a03,'onlinePaths':_0x3942fa};}export async function fetchOnlineMenuList(_0x1af9d7,_0x416762){return getOnlineMenuList(_0x1af9d7,_0x416762);}
@@ -1 +1 @@
1
- (function(_0x3d49a7,_0x358093){const _0x5b4726=a89_0x98da,_0x5b4549=_0x3d49a7();while(!![]){try{const _0x14fde2=-parseInt(_0x5b4726(0x1a2))/0x1+parseInt(_0x5b4726(0x1ab))/0x2*(parseInt(_0x5b4726(0x1c4))/0x3)+-parseInt(_0x5b4726(0x1aa))/0x4*(parseInt(_0x5b4726(0x1be))/0x5)+parseInt(_0x5b4726(0x1cb))/0x6+-parseInt(_0x5b4726(0x1c6))/0x7+-parseInt(_0x5b4726(0x1c7))/0x8+parseInt(_0x5b4726(0x1af))/0x9*(parseInt(_0x5b4726(0x1b3))/0xa);if(_0x14fde2===_0x358093)break;else _0x5b4549['push'](_0x5b4549['shift']());}catch(_0x3c7ef1){_0x5b4549['push'](_0x5b4549['shift']());}}}(a89_0x4f00,0xbb31a));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x58eaa8,_0x1a5fa0){const _0x2954b2=a89_0x98da,_0x542cb9=getEnv();logger[_0x2954b2(0x1a7)](_0x2954b2(0x1ba),isProduction(_0x542cb9)?_0x2954b2(0x1a9)+_0x58eaa8+')':_0x2954b2(0x1b9)+_0x58eaa8+')');const _0x2c8522=await platformFetch(getApiDomain()+_0x2954b2(0x1b1)+_0x58eaa8,{'cookie':_0x1a5fa0,'label':_0x2954b2(0x1ad)});if(!_0x2c8522)return logger['info'](_0x2954b2(0x1ba),_0x2954b2(0x1a3)),[];return logger[_0x2954b2(0x1a7)](_0x2954b2(0x1ba),'Fetched\x20'+_0x2c8522[_0x2954b2(0x1ca)]+_0x2954b2(0x1a1)),_0x2c8522[_0x2954b2(0x1b4)](flattenMenuItem)[_0x2954b2(0x1a8)]();}function a89_0x4f00(){const _0x2b941a=['Batch\x20menu\x20creation\x20completed,\x20total\x20','children','/smartapi/menu/update','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','get-online-menu-list','create-menu','label','Menu\x20assets\x20synced:\x20','7665tWWICE','Start\x20batch\x20menu\x20creation,\x20total\x20','Menu\x20created\x20successfully:\x20','path','Creating\x20menu:\x20','procode','165YcIEDE','update-menu-cdn-url','4706464DEyGtd','477144VRuyaa','stringify','Update\x20menu\x20assets\x20\x22','length','5480976TEitxh','/smartapi/menu/create','resources','\x20online\x20menus\x20successfully','190576FAFHfB','Server\x20returned\x20empty\x20menu\x20list','all','string','create-menus','info','flat','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','76CYzJEv','1924bGIsPM','POST','Fetch\x20menu\x20list','Create\x20menu\x20\x22','966906XrxGNW','extend','/smartapi/menu/find?appCode=','import','70qqtfOx','map','isArray'];a89_0x4f00=function(){return _0x2b941a;};return a89_0x4f00();}function a89_0x98da(_0xbdee6f,_0x568c4b){_0xbdee6f=_0xbdee6f-0x1a1;const _0x4f004a=a89_0x4f00();let _0x98dafc=_0x4f004a[_0xbdee6f];return _0x98dafc;}function flattenMenuItem(_0x135c29){const _0x1b0cfb=a89_0x98da;let _0x14b9a4=[];try{const _0x5f4347=_0x135c29[_0x1b0cfb(0x1b0)]?.[_0x1b0cfb(0x1cd)];if(typeof _0x5f4347===_0x1b0cfb(0x1a5)){const _0x21ccad=JSON['parse'](_0x5f4347);if(Array[_0x1b0cfb(0x1b5)](_0x21ccad))_0x14b9a4=_0x21ccad[_0x1b0cfb(0x1b4)](String);}else Array[_0x1b0cfb(0x1b5)](_0x5f4347)&&(_0x14b9a4=_0x5f4347[_0x1b0cfb(0x1b4)](String));}catch{}const _0x503602=[{'id':_0x135c29['id'],'path':_0x135c29[_0x1b0cfb(0x1c1)],'label':_0x135c29['label'],'resources':_0x14b9a4,'extend':_0x135c29[_0x1b0cfb(0x1b0)]??null}];if(_0x135c29[_0x1b0cfb(0x1b7)]&&_0x135c29[_0x1b0cfb(0x1b7)][_0x1b0cfb(0x1ca)]>0x0)for(const _0x31ff0b of _0x135c29['children']){_0x503602['push'](...flattenMenuItem(_0x31ff0b));}return _0x503602;}export async function createMenu(_0xf5d76c,_0xc0ed3a,_0x1a7fc8){const _0x207307=a89_0x98da;logger['info'](_0x207307(0x1bb),_0x207307(0x1c2)+_0x1a7fc8[_0x207307(0x1bc)]+'\x20('+_0x1a7fc8[_0x207307(0x1c1)]+')');const _0x5762c8={'appCode':_0xf5d76c,'type':_0x207307(0x1c3),'sort':0x0,'extend':{'loadScriptMode':_0x207307(0x1b2),'resources':_0x1a7fc8['resources']?JSON[_0x207307(0x1c8)](_0x1a7fc8['resources']):undefined},..._0x1a7fc8},_0x2f0912=await platformFetch(getApiDomain()+_0x207307(0x1cc),{'method':_0x207307(0x1ac),'body':_0x5762c8,'cookie':_0xc0ed3a,'label':_0x207307(0x1ae)+_0x1a7fc8[_0x207307(0x1bc)]+'\x22'});return logger[_0x207307(0x1a7)](_0x207307(0x1bb),_0x207307(0x1c0)+_0x1a7fc8[_0x207307(0x1bc)]),_0x2f0912;}async function createSingleMenu(_0x49029c,_0x959790,_0x10b805,_0x519ef4){const _0x437631=a89_0x98da,_0x228c0b={'appCode':_0x49029c,'type':_0x437631(0x1c3),'sort':0x0,'extend':{'loadScriptMode':_0x437631(0x1b2),'resources':_0x519ef4?JSON[_0x437631(0x1c8)](_0x519ef4):undefined},'label':_0x10b805[_0x437631(0x1bc)],'path':_0x10b805[_0x437631(0x1c1)]},_0x25d0c4=await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x437631(0x1ac),'body':_0x228c0b,'cookie':_0x959790,'label':'Create\x20menu\x20\x22'+_0x10b805[_0x437631(0x1bc)]+'\x22'});return logger[_0x437631(0x1a7)](_0x437631(0x1bb),_0x437631(0x1c0)+_0x10b805[_0x437631(0x1bc)]),_0x25d0c4;}export async function createMenus(_0x35b8fa,_0x7cedc5,_0x3772f5,_0x79cb43){const _0x34de52=a89_0x98da;logger[_0x34de52(0x1a7)](_0x34de52(0x1a6),_0x34de52(0x1bf)+_0x3772f5[_0x34de52(0x1ca)]);const _0x51613d=await Promise[_0x34de52(0x1a4)](_0x3772f5[_0x34de52(0x1b4)](_0x3abb7d=>createSingleMenu(_0x35b8fa,_0x7cedc5,_0x3abb7d,_0x79cb43)));return logger[_0x34de52(0x1a7)](_0x34de52(0x1a6),_0x34de52(0x1b6)+_0x3772f5[_0x34de52(0x1ca)]),_0x51613d;}export async function updateMenuCdnUrl(_0x2c2b6c,_0x395221,_0x10eef8){const _0x9dcfe0=a89_0x98da;logger[_0x9dcfe0(0x1a7)](_0x9dcfe0(0x1c5),'Updating\x20menu\x20asset\x20links:\x20'+_0x10eef8['label']+'\x20('+_0x10eef8[_0x9dcfe0(0x1c1)]+')');const _0x42fb63={'id':_0x10eef8['id'],'appCode':_0x2c2b6c,'extend':{..._0x10eef8[_0x9dcfe0(0x1b0)]??{},'loadScriptMode':'import','resources':_0x10eef8[_0x9dcfe0(0x1cd)]?JSON[_0x9dcfe0(0x1c8)](_0x10eef8[_0x9dcfe0(0x1cd)]):undefined}},_0x376de4=await platformFetch(getApiDomain()+_0x9dcfe0(0x1b8),{'method':'POST','body':_0x42fb63,'cookie':_0x395221,'label':_0x9dcfe0(0x1c9)+_0x10eef8[_0x9dcfe0(0x1bc)]+'\x22'});return logger[_0x9dcfe0(0x1a7)](_0x9dcfe0(0x1c5),_0x9dcfe0(0x1bd)+_0x10eef8[_0x9dcfe0(0x1bc)],undefined),_0x376de4;}
1
+ (function(_0x363d9a,_0x558bf9){const _0x55bcb5=a90_0x4875,_0x1ecceb=_0x363d9a();while(!![]){try{const _0x532d13=parseInt(_0x55bcb5(0x1dc))/0x1*(-parseInt(_0x55bcb5(0x1d2))/0x2)+-parseInt(_0x55bcb5(0x1cc))/0x3*(-parseInt(_0x55bcb5(0x1cf))/0x4)+parseInt(_0x55bcb5(0x1d3))/0x5*(parseInt(_0x55bcb5(0x1b5))/0x6)+-parseInt(_0x55bcb5(0x1b2))/0x7+parseInt(_0x55bcb5(0x1b3))/0x8+-parseInt(_0x55bcb5(0x1ce))/0x9+-parseInt(_0x55bcb5(0x1d9))/0xa*(-parseInt(_0x55bcb5(0x1c9))/0xb);if(_0x532d13===_0x558bf9)break;else _0x1ecceb['push'](_0x1ecceb['shift']());}catch(_0x4920d5){_0x1ecceb['push'](_0x1ecceb['shift']());}}}(a90_0x312d,0x9479f));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';function a90_0x4875(_0x38da91,_0xc9902d){_0x38da91=_0x38da91-0x1b1;const _0x312dc1=a90_0x312d();let _0x4875e4=_0x312dc1[_0x38da91];return _0x4875e4;}import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x3995f7,_0x35be54){const _0x40e3d1=a90_0x4875,_0x321a2a=getEnv();logger[_0x40e3d1(0x1be)](_0x40e3d1(0x1cb),isProduction(_0x321a2a)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x3995f7+')':_0x40e3d1(0x1c3)+_0x3995f7+')');const _0x5695d9=await platformFetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x3995f7,{'cookie':_0x35be54,'label':'Fetch\x20menu\x20list'});if(!_0x5695d9)return logger[_0x40e3d1(0x1be)](_0x40e3d1(0x1cb),_0x40e3d1(0x1d1)),[];return logger[_0x40e3d1(0x1be)](_0x40e3d1(0x1cb),_0x40e3d1(0x1b8)+_0x5695d9[_0x40e3d1(0x1b6)]+_0x40e3d1(0x1b1)),_0x5695d9['map'](flattenMenuItem)[_0x40e3d1(0x1c4)]();}function flattenMenuItem(_0x44dff5){const _0x58fadf=a90_0x4875;let _0x11d323=[];try{const _0x40d19b=_0x44dff5['extend']?.[_0x58fadf(0x1b9)];if(typeof _0x40d19b===_0x58fadf(0x1c6)){const _0x43d82a=JSON[_0x58fadf(0x1c8)](_0x40d19b);if(Array[_0x58fadf(0x1b7)](_0x43d82a))_0x11d323=_0x43d82a[_0x58fadf(0x1d7)](String);}else Array[_0x58fadf(0x1b7)](_0x40d19b)&&(_0x11d323=_0x40d19b[_0x58fadf(0x1d7)](String));}catch{}const _0x5cd078=[{'id':_0x44dff5['id'],'path':_0x44dff5[_0x58fadf(0x1d6)],'label':_0x44dff5[_0x58fadf(0x1c5)],'resources':_0x11d323,'extend':_0x44dff5[_0x58fadf(0x1d4)]??null}];if(_0x44dff5[_0x58fadf(0x1bd)]&&_0x44dff5['children'][_0x58fadf(0x1b6)]>0x0)for(const _0x1b1726 of _0x44dff5['children']){_0x5cd078[_0x58fadf(0x1d5)](...flattenMenuItem(_0x1b1726));}return _0x5cd078;}export async function createMenu(_0x1c4915,_0x3a430c,_0x3581dc){const _0x48966f=a90_0x4875;logger[_0x48966f(0x1be)](_0x48966f(0x1d0),_0x48966f(0x1c7)+_0x3581dc[_0x48966f(0x1c5)]+'\x20('+_0x3581dc[_0x48966f(0x1d6)]+')');const _0x3f6e3e={'appCode':_0x1c4915,'type':_0x48966f(0x1c2),'sort':0x0,'extend':{'loadScriptMode':_0x48966f(0x1d8),'resources':_0x3581dc[_0x48966f(0x1b9)]?JSON[_0x48966f(0x1cd)](_0x3581dc[_0x48966f(0x1b9)]):undefined},..._0x3581dc},_0x4e87bc=await platformFetch(getApiDomain()+_0x48966f(0x1b4),{'method':_0x48966f(0x1ba),'body':_0x3f6e3e,'cookie':_0x3a430c,'label':'Create\x20menu\x20\x22'+_0x3581dc[_0x48966f(0x1c5)]+'\x22'});return logger[_0x48966f(0x1be)](_0x48966f(0x1d0),_0x48966f(0x1db)+_0x3581dc[_0x48966f(0x1c5)]),_0x4e87bc;}function a90_0x312d(){const _0x3e36e1=['3287172GqJnQH','1840128tqIgnl','/smartapi/menu/create','54288ZXGfUs','length','isArray','Fetched\x20','resources','POST','update-menu-cdn-url','Start\x20batch\x20menu\x20creation,\x20total\x20','children','info','Batch\x20menu\x20creation\x20completed,\x20total\x20','Create\x20menu\x20\x22','all','procode','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','flat','label','string','Creating\x20menu:\x20','parse','19810879NxlbwB','Menu\x20assets\x20synced:\x20','get-online-menu-list','6iyffvn','stringify','10774575POcbaf','361276uZygzy','create-menu','Server\x20returned\x20empty\x20menu\x20list','542978srpbet','185LiroDt','extend','push','path','map','import','10BCVHiT','Updating\x20menu\x20asset\x20links:\x20','Menu\x20created\x20successfully:\x20','1ZYZCVB','\x20online\x20menus\x20successfully'];a90_0x312d=function(){return _0x3e36e1;};return a90_0x312d();}async function createSingleMenu(_0x329ca1,_0x518486,_0x2704c5,_0x253906){const _0x101265=a90_0x4875,_0x33b194={'appCode':_0x329ca1,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x101265(0x1d8),'resources':_0x253906?JSON[_0x101265(0x1cd)](_0x253906):undefined},'label':_0x2704c5['label'],'path':_0x2704c5[_0x101265(0x1d6)]},_0x381c83=await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x101265(0x1ba),'body':_0x33b194,'cookie':_0x518486,'label':_0x101265(0x1c0)+_0x2704c5[_0x101265(0x1c5)]+'\x22'});return logger[_0x101265(0x1be)](_0x101265(0x1d0),_0x101265(0x1db)+_0x2704c5[_0x101265(0x1c5)]),_0x381c83;}export async function createMenus(_0x101ab8,_0x9a67a4,_0x4c633d,_0x5d1a15){const _0x1ada73=a90_0x4875;logger[_0x1ada73(0x1be)]('create-menus',_0x1ada73(0x1bc)+_0x4c633d[_0x1ada73(0x1b6)]);const _0x1a7179=await Promise[_0x1ada73(0x1c1)](_0x4c633d[_0x1ada73(0x1d7)](_0x34e60b=>createSingleMenu(_0x101ab8,_0x9a67a4,_0x34e60b,_0x5d1a15)));return logger['info']('create-menus',_0x1ada73(0x1bf)+_0x4c633d[_0x1ada73(0x1b6)]),_0x1a7179;}export async function updateMenuCdnUrl(_0xebfe6f,_0x928d72,_0x3ba981){const _0x4fc1c7=a90_0x4875;logger['info']('update-menu-cdn-url',_0x4fc1c7(0x1da)+_0x3ba981[_0x4fc1c7(0x1c5)]+'\x20('+_0x3ba981['path']+')');const _0x43639c={'id':_0x3ba981['id'],'appCode':_0xebfe6f,'extend':{..._0x3ba981[_0x4fc1c7(0x1d4)]??{},'loadScriptMode':_0x4fc1c7(0x1d8),'resources':_0x3ba981[_0x4fc1c7(0x1b9)]?JSON[_0x4fc1c7(0x1cd)](_0x3ba981['resources']):undefined}},_0x220b14=await platformFetch(getApiDomain()+'/smartapi/menu/update',{'method':'POST','body':_0x43639c,'cookie':_0x928d72,'label':'Update\x20menu\x20assets\x20\x22'+_0x3ba981[_0x4fc1c7(0x1c5)]+'\x22'});return logger[_0x4fc1c7(0x1be)](_0x4fc1c7(0x1bb),_0x4fc1c7(0x1ca)+_0x3ba981[_0x4fc1c7(0x1c5)],undefined),_0x220b14;}
@@ -1 +1 @@
1
- (function(_0x4a050d,_0x58fca9){const _0x1a4d76=a90_0x50f3,_0x437974=_0x4a050d();while(!![]){try{const _0x44248d=parseInt(_0x1a4d76(0x8f))/0x1+-parseInt(_0x1a4d76(0xa7))/0x2+parseInt(_0x1a4d76(0x9a))/0x3*(parseInt(_0x1a4d76(0x88))/0x4)+-parseInt(_0x1a4d76(0xb0))/0x5*(parseInt(_0x1a4d76(0xa5))/0x6)+parseInt(_0x1a4d76(0x8a))/0x7*(-parseInt(_0x1a4d76(0xac))/0x8)+-parseInt(_0x1a4d76(0x89))/0x9*(parseInt(_0x1a4d76(0xae))/0xa)+parseInt(_0x1a4d76(0x97))/0xb;if(_0x44248d===_0x58fca9)break;else _0x437974['push'](_0x437974['shift']());}catch(_0x4444c4){_0x437974['push'](_0x437974['shift']());}}}(a90_0x172a,0x38111));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 a90_0x172a(){const _0xccbd5a=['8DfGnVQ','pages','620450rQRhtd','Menu\x20sync\x20completed','475YUsBbb','cwd','selectedLabels','object','utf8','map','string','7556xmZBVK','36xkOvWy','485037IJHOOY','end','push','parse','split','49442JqkRNu','length','CSS\x20URL\x20is\x20unreachable:\x20','label','startsWith','has','concat','isArray','5367890ggzBeM','No\x20local\x20pages\x20matched\x20labels:\x20','cssUrl','444yFrrRh','stdin','path','filter','readableEnded','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','setLogPath','trim','message','data','join','16746HVeoyq','menu-sync','9478EGByVA','jsUrl','Invalid\x20--params:\x20','info','isTTY'];a90_0x172a=function(){return _0xccbd5a;};return a90_0x172a();}function validateParams(_0x22005a){const _0x9d6faa=a90_0x50f3,_0x853eb1=[];return _0x22005a[_0x9d6faa(0xa8)]&&!isValidJsHttpsUrl(_0x22005a[_0x9d6faa(0xa8)])&&_0x853eb1[_0x9d6faa(0x8c)]({'field':_0x9d6faa(0xa8),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x22005a[_0x9d6faa(0x99)]&&!isValidCssHttpsUrl(_0x22005a[_0x9d6faa(0x99)])&&_0x853eb1[_0x9d6faa(0x8c)]({'field':_0x9d6faa(0x99),'message':_0x9d6faa(0x9f)}),_0x853eb1;}function a90_0x50f3(_0x5892b6,_0x323884){_0x5892b6=_0x5892b6-0x84;const _0x172ab8=a90_0x172a();let _0x50f31e=_0x172ab8[_0x5892b6];return _0x50f31e;}export async function runMenuSyncCore(_0x56943a,_0x4805c,_0x236d5f=[],_0x4330f4){const _0x34c743=a90_0x50f3,_0x56c9d9=parseParamsFlag(_0x4330f4),_0xbec9e5=_0x236d5f[_0x34c743(0x90)]>0x0?_0x236d5f:_0x56c9d9[_0x34c743(0xb2)],_0xc0101d=_0x56c9d9['jsUrl'],_0x2916d5=_0x56c9d9['cssUrl'],_0x3d25eb=[];if(_0xc0101d)_0x3d25eb[_0x34c743(0x8c)](_0xc0101d);if(_0x2916d5)_0x3d25eb[_0x34c743(0x8c)](_0x2916d5);const _0x3e7c01=validateParams(_0x56c9d9);if(_0x3e7c01[_0x34c743(0x90)]>0x0){const _0x303ddf=_0x3e7c01['map'](_0x30a438=>'--params.'+_0x30a438['field']+':\x20'+_0x30a438[_0x34c743(0xa2)])[_0x34c743(0xa4)](';\x20');throw new Error(_0x34c743(0xa9)+_0x303ddf);}logger[_0x34c743(0xa0)](process[_0x34c743(0xb1)]()),logger['info'](_0x34c743(0xa6),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x56943a,'selectedCount':_0xbec9e5?.[_0x34c743(0x90)],'jsUrl':_0xc0101d,'cssUrl':_0x2916d5});if(_0xc0101d){const _0x5309b8=await isUrlReachable(_0xc0101d);if(!_0x5309b8)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0xc0101d);}if(_0x2916d5){const _0x5341fa=await isUrlReachable(_0x2916d5);if(!_0x5341fa)throw new Error(_0x34c743(0x91)+_0x2916d5);}const _0x284c68=getLocalPages();if(_0x284c68[_0x34c743(0x90)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x1c5a95=await getOnlineMenuList(_0x56943a,_0x4805c),_0x551f2f=new Set(_0x1c5a95[_0x34c743(0x86)](_0x2e3cbc=>_0x2e3cbc['path']));let _0x3c2a4b;if(_0xbec9e5&&_0xbec9e5['length']>0x0){const _0x261d8a=new Set(_0xbec9e5[_0x34c743(0x86)](_0x678f55=>_0x678f55[_0x34c743(0xa1)]()));_0x3c2a4b=_0x284c68[_0x34c743(0x9d)](_0xb49ead=>_0x261d8a[_0x34c743(0x94)](_0xb49ead[_0x34c743(0x92)]));if(_0x3c2a4b[_0x34c743(0x90)]===0x0){const _0x138fe7=_0x284c68[_0x34c743(0x86)](_0x1f8c2c=>_0x1f8c2c[_0x34c743(0x92)])[_0x34c743(0xa4)](',\x20');throw new Error(_0x34c743(0x98)+[..._0x261d8a][_0x34c743(0xa4)](',\x20')+'\x0a\x20\x20Available\x20local\x20pages:\x20'+_0x138fe7);}}else _0x3c2a4b=_0x284c68[_0x34c743(0x9d)](_0x545888=>!_0x551f2f['has'](_0x545888[_0x34c743(0x9c)]));if(_0x3c2a4b['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x1d9863=await createMenus(_0x56943a,_0x4805c,_0x3c2a4b,_0x3d25eb[_0x34c743(0x90)]>0x0?_0x3d25eb:undefined);return logger[_0x34c743(0xaa)]('menu-sync',_0x34c743(0xaf),{'count':_0x3c2a4b[_0x34c743(0x90)],'resources':_0x3d25eb}),{'created':_0x1d9863['length'],'skipped':![],'targetPages':_0x3c2a4b,'menus':_0x1d9863};}export async function readPageLabelsFromStdin(){const _0x200d5a=a90_0x50f3;if(!process[_0x200d5a(0x9b)][_0x200d5a(0xab)]&&!process['stdin'][_0x200d5a(0x9e)])return new Promise(_0x1bf91a=>{const _0xe779b9=_0x200d5a,_0x206c90=[];process[_0xe779b9(0x9b)]['on'](_0xe779b9(0xa3),_0x10c860=>_0x206c90[_0xe779b9(0x8c)](_0x10c860)),process[_0xe779b9(0x9b)]['on'](_0xe779b9(0x8b),()=>{const _0x1d40f9=_0xe779b9,_0x2ef076=Buffer[_0x1d40f9(0x95)](_0x206c90)['toString'](_0x1d40f9(0x85)),_0x5a3ef0=_0x2ef076[_0x1d40f9(0x8e)]('\x0a')[_0x1d40f9(0x86)](_0x5385c6=>_0x5385c6[_0x1d40f9(0xa1)]())[_0x1d40f9(0x9d)](_0x527186=>_0x527186[_0x1d40f9(0x90)]>0x0&&!_0x527186[_0x1d40f9(0x93)]('#'));_0x1bf91a(_0x5a3ef0);}),setTimeout(()=>_0x1bf91a([]),0x1f4);});return[];}function parseParamsFlag(_0x5b695f){const _0x4f3b47=a90_0x50f3;if(!_0x5b695f||typeof _0x5b695f!=='string')return{};try{const _0x590bdc=JSON[_0x4f3b47(0x8d)](_0x5b695f);if(typeof _0x590bdc!==_0x4f3b47(0x84)||_0x590bdc===null||Array[_0x4f3b47(0x96)](_0x590bdc))return{};return{'selectedLabels':Array['isArray'](_0x590bdc[_0x4f3b47(0xad)])?_0x590bdc[_0x4f3b47(0xad)][_0x4f3b47(0x86)](String):undefined,'jsUrl':typeof _0x590bdc[_0x4f3b47(0xa8)]===_0x4f3b47(0x87)?_0x590bdc[_0x4f3b47(0xa8)][_0x4f3b47(0xa1)]():undefined,'cssUrl':typeof _0x590bdc[_0x4f3b47(0x99)]===_0x4f3b47(0x87)?_0x590bdc[_0x4f3b47(0x99)][_0x4f3b47(0xa1)]():undefined};}catch{return{};}}
1
+ (function(_0x2e0ef2,_0x1e96dc){const _0x1612f9=a91_0x3c10,_0x4ecc6e=_0x2e0ef2();while(!![]){try{const _0x48bdd0=parseInt(_0x1612f9(0x19c))/0x1+-parseInt(_0x1612f9(0x1ad))/0x2+parseInt(_0x1612f9(0x197))/0x3*(parseInt(_0x1612f9(0x1a9))/0x4)+-parseInt(_0x1612f9(0x1a1))/0x5+parseInt(_0x1612f9(0x19a))/0x6*(-parseInt(_0x1612f9(0x19d))/0x7)+parseInt(_0x1612f9(0x1b6))/0x8+-parseInt(_0x1612f9(0x1b2))/0x9*(-parseInt(_0x1612f9(0x1c4))/0xa);if(_0x48bdd0===_0x1e96dc)break;else _0x4ecc6e['push'](_0x4ecc6e['shift']());}catch(_0x4f809e){_0x4ecc6e['push'](_0x4ecc6e['shift']());}}}(a91_0x4015,0x9f929));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';function a91_0x4015(){const _0x6c7098=['1078446WhDdUP','21bSMoZI','\x0a\x20\x20Available\x20local\x20pages:\x20','toString','data','1132855hqhpJM','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','pages','field','push','object','label','isArray','7916GwlpQh','cssUrl','cwd','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','2079624KgdfsN','--params.','map','JS\x20URL\x20is\x20unreachable:\x20','join','19962zOrYkC','end','readableEnded','concat','4132536fsQsNH','Invalid\x20--params:\x20','stdin','Menu\x20sync\x20completed','path','info','has','isTTY','jsUrl','menu-sync','message','trim','setLogPath','filter','2770QYfyVa','startsWith','split','length','1413GfcDsN','selectedLabels','Start\x20non-interactive\x20menu\x20sync','2443032lhDEBG','utf8'];a91_0x4015=function(){return _0x6c7098;};return a91_0x4015();}import{logger}from'../../../utils/logger.js';function validateParams(_0x4a0076){const _0x25e9ad=a91_0x3c10,_0x95ef3b=[];return _0x4a0076[_0x25e9ad(0x1be)]&&!isValidJsHttpsUrl(_0x4a0076['jsUrl'])&&_0x95ef3b['push']({'field':_0x25e9ad(0x1be),'message':_0x25e9ad(0x1ac)}),_0x4a0076[_0x25e9ad(0x1aa)]&&!isValidCssHttpsUrl(_0x4a0076[_0x25e9ad(0x1aa)])&&_0x95ef3b['push']({'field':'cssUrl','message':_0x25e9ad(0x1a2)}),_0x95ef3b;}export async function runMenuSyncCore(_0x516e4a,_0x30f877,_0x5e510a=[],_0x33dfd2){const _0x12cd12=a91_0x3c10,_0x11db35=parseParamsFlag(_0x33dfd2),_0x578f96=_0x5e510a[_0x12cd12(0x196)]>0x0?_0x5e510a:_0x11db35[_0x12cd12(0x198)],_0x5385bc=_0x11db35['jsUrl'],_0x916c38=_0x11db35[_0x12cd12(0x1aa)],_0x2dc010=[];if(_0x5385bc)_0x2dc010['push'](_0x5385bc);if(_0x916c38)_0x2dc010['push'](_0x916c38);const _0x448b12=validateParams(_0x11db35);if(_0x448b12[_0x12cd12(0x196)]>0x0){const _0x1a6f20=_0x448b12[_0x12cd12(0x1af)](_0x452d94=>_0x12cd12(0x1ae)+_0x452d94[_0x12cd12(0x1a4)]+':\x20'+_0x452d94[_0x12cd12(0x1c0)])[_0x12cd12(0x1b1)](';\x20');throw new Error(_0x12cd12(0x1b7)+_0x1a6f20);}logger[_0x12cd12(0x1c2)](process[_0x12cd12(0x1ab)]()),logger[_0x12cd12(0x1bb)](_0x12cd12(0x1bf),_0x12cd12(0x199),{'appCode':_0x516e4a,'selectedCount':_0x578f96?.['length'],'jsUrl':_0x5385bc,'cssUrl':_0x916c38});if(_0x5385bc){const _0x57227b=await isUrlReachable(_0x5385bc);if(!_0x57227b)throw new Error(_0x12cd12(0x1b0)+_0x5385bc);}if(_0x916c38){const _0x15c5cb=await isUrlReachable(_0x916c38);if(!_0x15c5cb)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x916c38);}const _0x38a567=getLocalPages();if(_0x38a567['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x45f68f=await getOnlineMenuList(_0x516e4a,_0x30f877),_0x398fe6=new Set(_0x45f68f[_0x12cd12(0x1af)](_0x1a3520=>_0x1a3520[_0x12cd12(0x1ba)]));let _0x179cea;if(_0x578f96&&_0x578f96[_0x12cd12(0x196)]>0x0){const _0x263599=new Set(_0x578f96[_0x12cd12(0x1af)](_0x3d86ad=>_0x3d86ad['trim']()));_0x179cea=_0x38a567['filter'](_0x2b0301=>_0x263599['has'](_0x2b0301[_0x12cd12(0x1a7)]));if(_0x179cea['length']===0x0){const _0x1c3b83=_0x38a567[_0x12cd12(0x1af)](_0x5a8af1=>_0x5a8af1['label'])[_0x12cd12(0x1b1)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x263599]['join'](',\x20')+_0x12cd12(0x19e)+_0x1c3b83);}}else _0x179cea=_0x38a567['filter'](_0x596c02=>!_0x398fe6[_0x12cd12(0x1bc)](_0x596c02[_0x12cd12(0x1ba)]));if(_0x179cea[_0x12cd12(0x196)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x43d8a1=await createMenus(_0x516e4a,_0x30f877,_0x179cea,_0x2dc010[_0x12cd12(0x196)]>0x0?_0x2dc010:undefined);return logger[_0x12cd12(0x1bb)](_0x12cd12(0x1bf),_0x12cd12(0x1b9),{'count':_0x179cea[_0x12cd12(0x196)],'resources':_0x2dc010}),{'created':_0x43d8a1[_0x12cd12(0x196)],'skipped':![],'targetPages':_0x179cea,'menus':_0x43d8a1};}function a91_0x3c10(_0x5051f6,_0x51a424){_0x5051f6=_0x5051f6-0x195;const _0x401577=a91_0x4015();let _0x3c1024=_0x401577[_0x5051f6];return _0x3c1024;}export async function readPageLabelsFromStdin(){const _0x475f18=a91_0x3c10;if(!process['stdin'][_0x475f18(0x1bd)]&&!process[_0x475f18(0x1b8)][_0x475f18(0x1b4)])return new Promise(_0x486e09=>{const _0x5b3b71=_0x475f18,_0x39215a=[];process[_0x5b3b71(0x1b8)]['on'](_0x5b3b71(0x1a0),_0x1c5b97=>_0x39215a[_0x5b3b71(0x1a5)](_0x1c5b97)),process[_0x5b3b71(0x1b8)]['on'](_0x5b3b71(0x1b3),()=>{const _0x50133c=_0x5b3b71,_0x3e42fd=Buffer[_0x50133c(0x1b5)](_0x39215a)[_0x50133c(0x19f)](_0x50133c(0x19b)),_0x502d90=_0x3e42fd[_0x50133c(0x195)]('\x0a')[_0x50133c(0x1af)](_0x25d296=>_0x25d296[_0x50133c(0x1c1)]())[_0x50133c(0x1c3)](_0x1d0b5b=>_0x1d0b5b[_0x50133c(0x196)]>0x0&&!_0x1d0b5b[_0x50133c(0x1c5)]('#'));_0x486e09(_0x502d90);}),setTimeout(()=>_0x486e09([]),0x1f4);});return[];}function parseParamsFlag(_0x4916d5){const _0x183f3f=a91_0x3c10;if(!_0x4916d5||typeof _0x4916d5!=='string')return{};try{const _0x4e17b4=JSON['parse'](_0x4916d5);if(typeof _0x4e17b4!==_0x183f3f(0x1a6)||_0x4e17b4===null||Array['isArray'](_0x4e17b4))return{};return{'selectedLabels':Array[_0x183f3f(0x1a8)](_0x4e17b4[_0x183f3f(0x1a3)])?_0x4e17b4[_0x183f3f(0x1a3)][_0x183f3f(0x1af)](String):undefined,'jsUrl':typeof _0x4e17b4[_0x183f3f(0x1be)]==='string'?_0x4e17b4['jsUrl']['trim']():undefined,'cssUrl':typeof _0x4e17b4[_0x183f3f(0x1aa)]==='string'?_0x4e17b4[_0x183f3f(0x1aa)][_0x183f3f(0x1c1)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x2aa77a,_0x4f8fba){const _0x3afb77=a92_0x4465,_0x54f7ea=_0x2aa77a();while(!![]){try{const _0x439fcf=parseInt(_0x3afb77(0x1e2))/0x1+parseInt(_0x3afb77(0x1d8))/0x2+-parseInt(_0x3afb77(0x1f2))/0x3+-parseInt(_0x3afb77(0x1db))/0x4*(parseInt(_0x3afb77(0x1ca))/0x5)+-parseInt(_0x3afb77(0x1d3))/0x6+parseInt(_0x3afb77(0x1ea))/0x7*(parseInt(_0x3afb77(0x1d7))/0x8)+-parseInt(_0x3afb77(0x1e0))/0x9;if(_0x439fcf===_0x4f8fba)break;else _0x54f7ea['push'](_0x54f7ea['shift']());}catch(_0x4a667e){_0x54f7ea['push'](_0x54f7ea['shift']());}}}(a92_0x57c4,0xf3f4b));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a92_0x4465(_0x3fdfca,_0x57db01){_0x3fdfca=_0x3fdfca-0x1be;const _0x57c4e2=a92_0x57c4();let _0x446507=_0x57c4e2[_0x3fdfca];return _0x446507;}import{logger}from'../../../utils/logger.js';function validateParams(_0x88858b){const _0x5b40b7=a92_0x4465,_0xadd22d=[];return _0x88858b[_0x5b40b7(0x1e5)]&&!isValidJsHttpsUrl(_0x88858b[_0x5b40b7(0x1e5)])&&_0xadd22d[_0x5b40b7(0x1e7)]({'field':_0x5b40b7(0x1e5),'message':_0x5b40b7(0x1cb)}),_0x88858b[_0x5b40b7(0x1cd)]&&!isValidCssHttpsUrl(_0x88858b['cssUrl'])&&_0xadd22d[_0x5b40b7(0x1e7)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0xadd22d;}export async function runMenuUpdateCore(_0x4b40e3,_0x4aecd0,_0x405b96,_0x32eeb8={}){const _0x5e289d=a92_0x4465,_0x16de84=parseUpdateParamsFlag(_0x405b96),_0x333e06=normalizeMode(_0x32eeb8['mode']),_0x5b8066=[];if(_0x16de84[_0x5e289d(0x1e5)])_0x5b8066[_0x5e289d(0x1e7)](_0x16de84[_0x5e289d(0x1e5)]);if(_0x16de84[_0x5e289d(0x1cd)])_0x5b8066[_0x5e289d(0x1e7)](_0x16de84['cssUrl']);const _0x46d44f=validateParams(_0x16de84);if(_0x46d44f[_0x5e289d(0x1df)]>0x0){const _0x546960=_0x46d44f[_0x5e289d(0x1c2)](_0x470fa1=>_0x5e289d(0x1da)+_0x470fa1[_0x5e289d(0x1ee)]+':\x20'+_0x470fa1[_0x5e289d(0x1c1)])[_0x5e289d(0x1e1)](';\x20');throw new Error(_0x5e289d(0x1d5)+_0x546960);}if(_0x5b8066[_0x5e289d(0x1df)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x5e289d(0x1f3));logger[_0x5e289d(0x1d1)](process[_0x5e289d(0x1e3)]()),logger[_0x5e289d(0x1ce)](_0x5e289d(0x1c8),_0x5e289d(0x1f1),{'appCode':_0x4b40e3,'jsUrl':_0x16de84[_0x5e289d(0x1e5)],'cssUrl':_0x16de84[_0x5e289d(0x1cd)],'mode':_0x333e06,'dryRun':_0x32eeb8[_0x5e289d(0x1c4)]===!![]});if(_0x16de84[_0x5e289d(0x1e5)]){const _0x21bb11=await isUrlReachable(_0x16de84[_0x5e289d(0x1e5)]);if(!_0x21bb11)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x16de84['jsUrl']);}if(_0x16de84['cssUrl']){const _0x40ac2c=await isUrlReachable(_0x16de84[_0x5e289d(0x1cd)]);if(!_0x40ac2c)throw new Error(_0x5e289d(0x1e6)+_0x16de84[_0x5e289d(0x1cd)]);}const _0x2d4e5a=await getOnlineMenuList(_0x4b40e3,_0x4aecd0),_0x2befb8=_0x2d4e5a['filter'](_0x5358b9=>_0x5358b9['resources'][_0x5e289d(0x1df)]>0x0);if(_0x2befb8[_0x5e289d(0x1df)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x32eeb8[_0x5e289d(0x1c4)]===!![]};const _0x5189d6=_0x2befb8[_0x5e289d(0x1c2)](_0x5cdcd1=>buildMenuUpdateDiff(_0x5cdcd1,_0x16de84,_0x333e06,_0x32eeb8['force']===!![]));if(_0x32eeb8[_0x5e289d(0x1c4)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x5189d6};const _0x130c14=await Promise[_0x5e289d(0x1e9)](_0x2befb8['map']((_0x134bc8,_0x58dc01)=>updateMenuCdnUrl(_0x4b40e3,_0x4aecd0,{'id':_0x134bc8['id'],'label':_0x134bc8[_0x5e289d(0x1c7)],'path':_0x134bc8[_0x5e289d(0x1be)],'resources':_0x5189d6[_0x58dc01][_0x5e289d(0x1ef)][_0x5e289d(0x1cc)],'extend':_0x134bc8[_0x5e289d(0x1c0)]??null}))),_0x1e9852=_0x130c14[_0x5e289d(0x1c6)](_0x558cd4=>_0x558cd4[_0x5e289d(0x1c9)]===_0x5e289d(0x1cf))['map'](_0x234f1d=>_0x234f1d[_0x5e289d(0x1dc)]),_0x44ada5=_0x130c14[_0x5e289d(0x1c6)](_0x138816=>_0x138816[_0x5e289d(0x1c9)]==='rejected')[_0x5e289d(0x1df)];return logger[_0x5e289d(0x1ce)]('menu-update','Menu\x20update\x20completed',{'count':_0x2befb8[_0x5e289d(0x1df)],'resources':_0x5b8066}),{'updated':_0x1e9852['length'],'failed':_0x44ada5,'skipped':![],'menus':_0x1e9852};}function normalizeMode(_0xfc2e9e){const _0x5486a4=a92_0x4465;if(!_0xfc2e9e)return _0x5486a4(0x1ec);if(_0xfc2e9e==='replace'||_0xfc2e9e===_0x5486a4(0x1eb))return _0xfc2e9e;throw new Error(_0x5486a4(0x1d6)+_0xfc2e9e+'.\x20Allowed\x20values:\x20replace,\x20patch');}function a92_0x57c4(){const _0x2a4c3=['after','some','Start\x20non-interactive\x20menu\x20update','3818625bDwgmU','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','path','.js','extend','message','map','parse','dryRun','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','filter','label','menu-update','status','4055fGiMxz','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','resources','cssUrl','info','fulfilled','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','setLogPath','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','1396338IbKsGG','toLowerCase','Invalid\x20--params:\x20','Invalid\x20--mode:\x20','13055408umAptk','2598156FHrULJ','.css','--params.','508plewoI','value','\x22\x20(','string','length','7594506WPRmYy','join','520668rzDwGF','cwd','endsWith','jsUrl','CSS\x20URL\x20is\x20unreachable:\x20','push','trim','allSettled','7Dmgcgh','patch','replace','split','field'];a92_0x57c4=function(){return _0x2a4c3;};return a92_0x57c4();}function buildMenuUpdateDiff(_0x299b05,_0x40bfc1,_0x3c5d7d,_0x10a5d2){const _0x577d46=a92_0x4465,_0xa3b782=[..._0x299b05['resources']],_0x44aa8e=_0x3c5d7d===_0x577d46(0x1eb)?patchResources(_0xa3b782,_0x40bfc1):replaceResources(_0x40bfc1),_0x1de304=[],_0x360556=_0xa3b782['some'](isJsResource),_0x31710e=_0x44aa8e['some'](isJsResource);if(_0x360556&&!_0x31710e){const _0x3778f5=_0x577d46(0x1c5)+_0x299b05[_0x577d46(0x1c7)]+_0x577d46(0x1dd)+_0x299b05[_0x577d46(0x1be)]+').\x20'+_0x577d46(0x1d2);if(!_0x10a5d2)throw new Error(_0x3778f5);_0x1de304[_0x577d46(0x1e7)](_0x3778f5);}const _0x588519=_0xa3b782[_0x577d46(0x1f0)](isCssResource),_0x2c7947=_0x44aa8e[_0x577d46(0x1f0)](isCssResource);return _0x588519&&!_0x2c7947&&_0x1de304['push'](_0x577d46(0x1d0)+_0x299b05[_0x577d46(0x1c7)]+_0x577d46(0x1dd)+_0x299b05[_0x577d46(0x1be)]+').'),{'id':_0x299b05['id'],'label':_0x299b05['label'],'path':_0x299b05[_0x577d46(0x1be)],'mode':_0x3c5d7d,'before':{'resources':_0xa3b782},'after':{'resources':_0x44aa8e},'warnings':_0x1de304};}function replaceResources(_0x4de16b){const _0x1509d1=a92_0x4465;return[_0x4de16b[_0x1509d1(0x1e5)],_0x4de16b[_0x1509d1(0x1cd)]][_0x1509d1(0x1c6)](_0x48a4ad=>!!_0x48a4ad);}function patchResources(_0x4b1e12,_0x50c081){const _0xd2f9e5=a92_0x4465;let _0x27d0b2=![],_0x5c8fd9=![];const _0x1fe67c=[];for(const _0x62001e of _0x4b1e12){if(isJsResource(_0x62001e)){if(_0x50c081[_0xd2f9e5(0x1e5)]&&!_0x27d0b2)_0x1fe67c['push'](_0x50c081[_0xd2f9e5(0x1e5)]),_0x27d0b2=!![];else!_0x50c081[_0xd2f9e5(0x1e5)]&&_0x1fe67c['push'](_0x62001e);continue;}if(isCssResource(_0x62001e)){if(_0x50c081[_0xd2f9e5(0x1cd)]&&!_0x5c8fd9)_0x1fe67c[_0xd2f9e5(0x1e7)](_0x50c081['cssUrl']),_0x5c8fd9=!![];else!_0x50c081[_0xd2f9e5(0x1cd)]&&_0x1fe67c[_0xd2f9e5(0x1e7)](_0x62001e);continue;}_0x1fe67c[_0xd2f9e5(0x1e7)](_0x62001e);}return _0x50c081[_0xd2f9e5(0x1e5)]&&!_0x27d0b2&&_0x1fe67c['unshift'](_0x50c081[_0xd2f9e5(0x1e5)]),_0x50c081[_0xd2f9e5(0x1cd)]&&!_0x5c8fd9&&_0x1fe67c['push'](_0x50c081['cssUrl']),_0x1fe67c;}function isJsResource(_0x3bd861){const _0x5f185c=a92_0x4465;return stripQuery(_0x3bd861)[_0x5f185c(0x1d4)]()[_0x5f185c(0x1e4)](_0x5f185c(0x1bf));}function isCssResource(_0x1d1f5d){const _0x3357a9=a92_0x4465;return stripQuery(_0x1d1f5d)[_0x3357a9(0x1d4)]()[_0x3357a9(0x1e4)](_0x3357a9(0x1d9));}function stripQuery(_0x363814){const _0x55327e=a92_0x4465;return _0x363814[_0x55327e(0x1ed)]('?')[0x0]??_0x363814;}function parseUpdateParamsFlag(_0xa50078){const _0x4fd239=a92_0x4465;if(!_0xa50078||typeof _0xa50078!=='string')return{};try{const _0xb41173=JSON[_0x4fd239(0x1c3)](_0xa50078);if(typeof _0xb41173!=='object'||_0xb41173===null||Array['isArray'](_0xb41173))return{};return{'jsUrl':typeof _0xb41173['jsUrl']===_0x4fd239(0x1de)?_0xb41173['jsUrl'][_0x4fd239(0x1e8)]():undefined,'cssUrl':typeof _0xb41173[_0x4fd239(0x1cd)]===_0x4fd239(0x1de)?_0xb41173['cssUrl'][_0x4fd239(0x1e8)]():undefined};}catch{return{};}}
1
+ function a93_0x5edd(){const _0x28eee9=['120rtekcN','trim','push','endsWith','JS\x20URL\x20is\x20unreachable:\x20','.js','Invalid\x20--mode:\x20','3780434TqPMhX','extend','17088038EhReLc','field','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu-update','Invalid\x20--params:\x20','after','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','string','596fLaMvF',').\x20','isArray','map','length','mode','2145625EyResK','245277XMLDza','allSettled','CSS\x20URL\x20is\x20unreachable:\x20','parse','setLogPath','force','some','info','object','path','toLowerCase','value','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','status','unshift','label','jsUrl','patch','cssUrl','48qUNREX','Start\x20non-interactive\x20menu\x20update','resources','10pNdJgN','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','1378kkGgpt','split','filter','--params.','dryRun','fulfilled','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','\x22\x20(','4290NHeHSi','8167938FjJwRN'];a93_0x5edd=function(){return _0x28eee9;};return a93_0x5edd();}(function(_0x5aba88,_0x35615d){const _0x11bac7=a93_0x2952,_0x574ab0=_0x5aba88();while(!![]){try{const _0x145a10=-parseInt(_0x11bac7(0xbb))/0x1*(-parseInt(_0x11bac7(0xf1))/0x2)+parseInt(_0x11bac7(0xc4))/0x3*(parseInt(_0x11bac7(0xd7))/0x4)+parseInt(_0x11bac7(0xdd))/0x5+-parseInt(_0x11bac7(0xc5))/0x6+parseInt(_0x11bac7(0xcd))/0x7+parseInt(_0x11bac7(0xc6))/0x8*(-parseInt(_0x11bac7(0xde))/0x9)+parseInt(_0x11bac7(0xf4))/0xa*(parseInt(_0x11bac7(0xcf))/0xb);if(_0x145a10===_0x35615d)break;else _0x574ab0['push'](_0x574ab0['shift']());}catch(_0x49841e){_0x574ab0['push'](_0x574ab0['shift']());}}}(a93_0x5edd,0xf3d0d));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x11a612){const _0x5b0da7=a93_0x2952,_0x54105c=[];return _0x11a612['jsUrl']&&!isValidJsHttpsUrl(_0x11a612['jsUrl'])&&_0x54105c[_0x5b0da7(0xc8)]({'field':_0x5b0da7(0xee),'message':_0x5b0da7(0xd5)}),_0x11a612['cssUrl']&&!isValidCssHttpsUrl(_0x11a612[_0x5b0da7(0xf0)])&&_0x54105c[_0x5b0da7(0xc8)]({'field':_0x5b0da7(0xf0),'message':_0x5b0da7(0xc2)}),_0x54105c;}export async function runMenuUpdateCore(_0x153602,_0x5e0bd5,_0xed4187,_0x11b7d7={}){const _0xd7c97e=a93_0x2952,_0x13d0a8=parseUpdateParamsFlag(_0xed4187),_0x22666d=normalizeMode(_0x11b7d7[_0xd7c97e(0xdc)]),_0x3cf5b8=[];if(_0x13d0a8[_0xd7c97e(0xee)])_0x3cf5b8[_0xd7c97e(0xc8)](_0x13d0a8['jsUrl']);if(_0x13d0a8[_0xd7c97e(0xf0)])_0x3cf5b8['push'](_0x13d0a8['cssUrl']);const _0x477513=validateParams(_0x13d0a8);if(_0x477513[_0xd7c97e(0xdb)]>0x0){const _0x435e5f=_0x477513['map'](_0x21ccea=>_0xd7c97e(0xbe)+_0x21ccea[_0xd7c97e(0xd0)]+':\x20'+_0x21ccea['message'])[_0xd7c97e(0xc1)](';\x20');throw new Error(_0xd7c97e(0xd3)+_0x435e5f);}if(_0x3cf5b8[_0xd7c97e(0xdb)]===0x0)throw new Error(_0xd7c97e(0xd1)+_0xd7c97e(0xea));logger[_0xd7c97e(0xe2)](process['cwd']()),logger[_0xd7c97e(0xe5)](_0xd7c97e(0xd2),_0xd7c97e(0xf2),{'appCode':_0x153602,'jsUrl':_0x13d0a8['jsUrl'],'cssUrl':_0x13d0a8[_0xd7c97e(0xf0)],'mode':_0x22666d,'dryRun':_0x11b7d7[_0xd7c97e(0xbf)]===!![]});if(_0x13d0a8[_0xd7c97e(0xee)]){const _0x4eeb80=await isUrlReachable(_0x13d0a8[_0xd7c97e(0xee)]);if(!_0x4eeb80)throw new Error(_0xd7c97e(0xca)+_0x13d0a8[_0xd7c97e(0xee)]);}if(_0x13d0a8[_0xd7c97e(0xf0)]){const _0x10269f=await isUrlReachable(_0x13d0a8[_0xd7c97e(0xf0)]);if(!_0x10269f)throw new Error(_0xd7c97e(0xe0)+_0x13d0a8[_0xd7c97e(0xf0)]);}const _0x46a21d=await getOnlineMenuList(_0x153602,_0x5e0bd5),_0x15185b=_0x46a21d[_0xd7c97e(0xbd)](_0x587490=>_0x587490['resources']['length']>0x0);if(_0x15185b[_0xd7c97e(0xdb)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x11b7d7[_0xd7c97e(0xbf)]===!![]};const _0x500e36=_0x15185b[_0xd7c97e(0xda)](_0xee3b7e=>buildMenuUpdateDiff(_0xee3b7e,_0x13d0a8,_0x22666d,_0x11b7d7[_0xd7c97e(0xe3)]===!![]));if(_0x11b7d7['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x500e36};const _0x4e6fbc=await Promise[_0xd7c97e(0xdf)](_0x15185b[_0xd7c97e(0xda)]((_0x35df81,_0x1c38f1)=>updateMenuCdnUrl(_0x153602,_0x5e0bd5,{'id':_0x35df81['id'],'label':_0x35df81['label'],'path':_0x35df81[_0xd7c97e(0xe7)],'resources':_0x500e36[_0x1c38f1][_0xd7c97e(0xd4)][_0xd7c97e(0xf3)],'extend':_0x35df81[_0xd7c97e(0xce)]??null}))),_0x71856f=_0x4e6fbc[_0xd7c97e(0xbd)](_0xd0f9c9=>_0xd0f9c9[_0xd7c97e(0xeb)]===_0xd7c97e(0xc0))['map'](_0x2930d8=>_0x2930d8[_0xd7c97e(0xe9)]),_0x13594b=_0x4e6fbc[_0xd7c97e(0xbd)](_0x2f0762=>_0x2f0762[_0xd7c97e(0xeb)]==='rejected')[_0xd7c97e(0xdb)];return logger[_0xd7c97e(0xe5)](_0xd7c97e(0xd2),'Menu\x20update\x20completed',{'count':_0x15185b[_0xd7c97e(0xdb)],'resources':_0x3cf5b8}),{'updated':_0x71856f[_0xd7c97e(0xdb)],'failed':_0x13594b,'skipped':![],'menus':_0x71856f};}function normalizeMode(_0xf6e9d0){const _0x320aec=a93_0x2952;if(!_0xf6e9d0)return'replace';if(_0xf6e9d0==='replace'||_0xf6e9d0===_0x320aec(0xef))return _0xf6e9d0;throw new Error(_0x320aec(0xcc)+_0xf6e9d0+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x59bab4,_0x2b3854,_0x2855fd,_0x5df3f4){const _0x24e5a0=a93_0x2952,_0x491367=[..._0x59bab4[_0x24e5a0(0xf3)]],_0x2ee080=_0x2855fd===_0x24e5a0(0xef)?patchResources(_0x491367,_0x2b3854):replaceResources(_0x2b3854),_0x3056fb=[],_0x5b0aa0=_0x491367[_0x24e5a0(0xe4)](isJsResource),_0x5789cc=_0x2ee080[_0x24e5a0(0xe4)](isJsResource);if(_0x5b0aa0&&!_0x5789cc){const _0x1fcad4='menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x59bab4['label']+_0x24e5a0(0xc3)+_0x59bab4[_0x24e5a0(0xe7)]+_0x24e5a0(0xd8)+_0x24e5a0(0xf5);if(!_0x5df3f4)throw new Error(_0x1fcad4);_0x3056fb[_0x24e5a0(0xc8)](_0x1fcad4);}const _0x2c5808=_0x491367['some'](isCssResource),_0x35d142=_0x2ee080[_0x24e5a0(0xe4)](isCssResource);return _0x2c5808&&!_0x35d142&&_0x3056fb[_0x24e5a0(0xc8)]('menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x59bab4['label']+_0x24e5a0(0xc3)+_0x59bab4[_0x24e5a0(0xe7)]+').'),{'id':_0x59bab4['id'],'label':_0x59bab4[_0x24e5a0(0xed)],'path':_0x59bab4[_0x24e5a0(0xe7)],'mode':_0x2855fd,'before':{'resources':_0x491367},'after':{'resources':_0x2ee080},'warnings':_0x3056fb};}function replaceResources(_0x440517){const _0x5be23b=a93_0x2952;return[_0x440517[_0x5be23b(0xee)],_0x440517[_0x5be23b(0xf0)]][_0x5be23b(0xbd)](_0x1d06c2=>!!_0x1d06c2);}function a93_0x2952(_0xe2d54,_0x923118){_0xe2d54=_0xe2d54-0xbb;const _0x5edd7a=a93_0x5edd();let _0x2952fd=_0x5edd7a[_0xe2d54];return _0x2952fd;}function patchResources(_0x4c8150,_0x6c4d72){const _0x59505c=a93_0x2952;let _0x5a2b71=![],_0x2f0f8f=![];const _0x16f533=[];for(const _0x537411 of _0x4c8150){if(isJsResource(_0x537411)){if(_0x6c4d72['jsUrl']&&!_0x5a2b71)_0x16f533['push'](_0x6c4d72[_0x59505c(0xee)]),_0x5a2b71=!![];else!_0x6c4d72[_0x59505c(0xee)]&&_0x16f533[_0x59505c(0xc8)](_0x537411);continue;}if(isCssResource(_0x537411)){if(_0x6c4d72['cssUrl']&&!_0x2f0f8f)_0x16f533[_0x59505c(0xc8)](_0x6c4d72[_0x59505c(0xf0)]),_0x2f0f8f=!![];else!_0x6c4d72[_0x59505c(0xf0)]&&_0x16f533[_0x59505c(0xc8)](_0x537411);continue;}_0x16f533[_0x59505c(0xc8)](_0x537411);}return _0x6c4d72[_0x59505c(0xee)]&&!_0x5a2b71&&_0x16f533[_0x59505c(0xec)](_0x6c4d72[_0x59505c(0xee)]),_0x6c4d72[_0x59505c(0xf0)]&&!_0x2f0f8f&&_0x16f533[_0x59505c(0xc8)](_0x6c4d72[_0x59505c(0xf0)]),_0x16f533;}function isJsResource(_0xfc33e5){const _0x4c663b=a93_0x2952;return stripQuery(_0xfc33e5)[_0x4c663b(0xe8)]()['endsWith'](_0x4c663b(0xcb));}function isCssResource(_0x32cf23){const _0x58ff7d=a93_0x2952;return stripQuery(_0x32cf23)['toLowerCase']()[_0x58ff7d(0xc9)]('.css');}function stripQuery(_0x5f5ab4){const _0x1de855=a93_0x2952;return _0x5f5ab4[_0x1de855(0xbc)]('?')[0x0]??_0x5f5ab4;}function parseUpdateParamsFlag(_0x4c4410){const _0x809f7f=a93_0x2952;if(!_0x4c4410||typeof _0x4c4410!=='string')return{};try{const _0xdd6b00=JSON[_0x809f7f(0xe1)](_0x4c4410);if(typeof _0xdd6b00!==_0x809f7f(0xe6)||_0xdd6b00===null||Array[_0x809f7f(0xd9)](_0xdd6b00))return{};return{'jsUrl':typeof _0xdd6b00[_0x809f7f(0xee)]==='string'?_0xdd6b00[_0x809f7f(0xee)][_0x809f7f(0xc7)]():undefined,'cssUrl':typeof _0xdd6b00['cssUrl']===_0x809f7f(0xd6)?_0xdd6b00[_0x809f7f(0xf0)][_0x809f7f(0xc7)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a93_0x58a6(){const _0x4d7616=['test','322rJyRhb','3978714LkBkGN','7afnNPF','HEAD','2731460jYVfWw','1712216xEYbrG','9bqKSOA','17222414tlnsEv','9528xhgVox','772ZNwlRe','trim','4196lpVBWe','3113425QRUPOO'];a93_0x58a6=function(){return _0x4d7616;};return a93_0x58a6();}function a93_0x5312(_0x1d7339,_0x591463){_0x1d7339=_0x1d7339-0x177;const _0x58a643=a93_0x58a6();let _0x531207=_0x58a643[_0x1d7339];return _0x531207;}(function(_0x24751a,_0x108b01){const _0x594e78=a93_0x5312,_0x4809fb=_0x24751a();while(!![]){try{const _0x33bebe=-parseInt(_0x594e78(0x183))/0x1*(parseInt(_0x594e78(0x178))/0x2)+parseInt(_0x594e78(0x180))/0x3*(-parseInt(_0x594e78(0x181))/0x4)+-parseInt(_0x594e78(0x184))/0x5+parseInt(_0x594e78(0x179))/0x6+parseInt(_0x594e78(0x17a))/0x7*(-parseInt(_0x594e78(0x17d))/0x8)+parseInt(_0x594e78(0x17e))/0x9*(parseInt(_0x594e78(0x17c))/0xa)+parseInt(_0x594e78(0x17f))/0xb;if(_0x33bebe===_0x108b01)break;else _0x4809fb['push'](_0x4809fb['shift']());}catch(_0x21a930){_0x4809fb['push'](_0x4809fb['shift']());}}}(a93_0x58a6,0x5bf7f));export function isValidJsHttpsUrl(_0x1c0e3f){const _0x323ef0=a93_0x5312;return/^https:\/\/.+\.js(\?.*)?$/[_0x323ef0(0x177)](_0x1c0e3f[_0x323ef0(0x182)]());}export function isValidCssHttpsUrl(_0x48783e){const _0x194a34=a93_0x5312;return/^https:\/\/.+\.css(\?.*)?$/[_0x194a34(0x177)](_0x48783e[_0x194a34(0x182)]());}export async function isUrlReachable(_0x2216e1){const _0x31f92b=a93_0x5312;try{const _0x431e0b=await fetch(_0x2216e1,{'method':_0x31f92b(0x17b)});return _0x431e0b['ok'];}catch{return![];}}
1
+ function a94_0x4cf8(){const _0x505cd3=['40128htkZcS','test','2227974lnqlrs','9hilsvf','3176jkSaLx','16axjReD','1678605RQkUBG','100KWUnfW','2538650LauwlC','528KwtcMb','trim','3746134JWlkih','173084cVYJDP','14lBwsnK'];a94_0x4cf8=function(){return _0x505cd3;};return a94_0x4cf8();}function a94_0x470c(_0x1fc40b,_0x1139ea){_0x1fc40b=_0x1fc40b-0x12d;const _0x4cf89a=a94_0x4cf8();let _0x470cc7=_0x4cf89a[_0x1fc40b];return _0x470cc7;}(function(_0x57dfcb,_0x744bc9){const _0x5143bc=a94_0x470c,_0x16a227=_0x57dfcb();while(!![]){try{const _0xec569a=parseInt(_0x5143bc(0x139))/0x1*(parseInt(_0x5143bc(0x138))/0x2)+parseInt(_0x5143bc(0x132))/0x3+-parseInt(_0x5143bc(0x130))/0x4*(-parseInt(_0x5143bc(0x133))/0x5)+parseInt(_0x5143bc(0x12e))/0x6+parseInt(_0x5143bc(0x137))/0x7*(-parseInt(_0x5143bc(0x131))/0x8)+parseInt(_0x5143bc(0x12f))/0x9*(-parseInt(_0x5143bc(0x134))/0xa)+-parseInt(_0x5143bc(0x135))/0xb*(parseInt(_0x5143bc(0x13a))/0xc);if(_0xec569a===_0x744bc9)break;else _0x16a227['push'](_0x16a227['shift']());}catch(_0x47b145){_0x16a227['push'](_0x16a227['shift']());}}}(a94_0x4cf8,0xa475f));export function isValidJsHttpsUrl(_0x3144f4){const _0x46de58=a94_0x470c;return/^https:\/\/.+\.js(\?.*)?$/[_0x46de58(0x12d)](_0x3144f4[_0x46de58(0x136)]());}export function isValidCssHttpsUrl(_0x3df162){const _0x39392e=a94_0x470c;return/^https:\/\/.+\.css(\?.*)?$/[_0x39392e(0x12d)](_0x3df162['trim']());}export async function isUrlReachable(_0x1fc0ca){try{const _0x46096d=await fetch(_0x1fc0ca,{'method':'HEAD'});return _0x46096d['ok'];}catch{return![];}}