@lovrabet/rabetbase-cli 2.1.14-beta.3 → 2.2.0-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 (209) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/extend-update.js +1 -1
  55. package/lib/commands/dataset/field-update.js +1 -1
  56. package/lib/commands/dataset/index.js +1 -1
  57. package/lib/commands/dataset/list.js +1 -1
  58. package/lib/commands/dataset/operations.js +1 -1
  59. package/lib/commands/dataset/relation-create.js +1 -0
  60. package/lib/commands/dataset/relation-delete.js +1 -0
  61. package/lib/commands/dataset/relation-shared.js +1 -0
  62. package/lib/commands/dataset/relation-update.js +1 -0
  63. package/lib/commands/dataset/relations.js +1 -0
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/shared/compare-table.js +1 -1
  87. package/lib/commands/menu/shared/index.js +1 -1
  88. package/lib/commands/menu/shared/inquirer.js +1 -1
  89. package/lib/commands/menu/shared/local-pages.js +1 -1
  90. package/lib/commands/menu/shared/logic.js +1 -1
  91. package/lib/commands/menu/shared/service.js +1 -1
  92. package/lib/commands/menu/shared/sync-core.js +1 -1
  93. package/lib/commands/menu/shared/update-core.js +1 -1
  94. package/lib/commands/menu/shared/valid-url.js +1 -1
  95. package/lib/commands/menu/sync.js +1 -1
  96. package/lib/commands/menu/update.js +1 -1
  97. package/lib/commands/page/generate-start.js +1 -1
  98. package/lib/commands/page/generate-status.js +1 -1
  99. package/lib/commands/page/index.js +1 -1
  100. package/lib/commands/page/pull.js +1 -1
  101. package/lib/commands/page/push.js +1 -1
  102. package/lib/commands/page/relation-audit.js +1 -0
  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/update-notice.js +1 -0
  201. package/lib/utils/version.js +1 -1
  202. package/lib/utils/with-active-cookie.js +1 -1
  203. package/lib/utils/write-cli-side-channel.js +1 -1
  204. package/package.json +1 -1
  205. package/lib/commands/dataset/link-create.js +0 -1
  206. package/lib/commands/dataset/link-delete.js +0 -1
  207. package/lib/commands/dataset/link-shared.js +0 -1
  208. package/lib/commands/dataset/link-update.js +0 -1
  209. package/lib/commands/dataset/links.js +0 -1
@@ -1 +1 @@
1
- const a83_0x57ec2e=a83_0x3d67;(function(_0x120742,_0x5eab22){const _0x2bf1ff=a83_0x3d67,_0x4969ec=_0x120742();while(!![]){try{const _0x8d2cc5=parseInt(_0x2bf1ff(0xc0))/0x1+-parseInt(_0x2bf1ff(0xd6))/0x2*(parseInt(_0x2bf1ff(0xba))/0x3)+parseInt(_0x2bf1ff(0xcd))/0x4*(-parseInt(_0x2bf1ff(0xdc))/0x5)+parseInt(_0x2bf1ff(0xd2))/0x6*(-parseInt(_0x2bf1ff(0xcf))/0x7)+parseInt(_0x2bf1ff(0xd8))/0x8*(parseInt(_0x2bf1ff(0xdb))/0x9)+parseInt(_0x2bf1ff(0xd4))/0xa*(-parseInt(_0x2bf1ff(0xdd))/0xb)+parseInt(_0x2bf1ff(0xcc))/0xc*(parseInt(_0x2bf1ff(0xbc))/0xd);if(_0x8d2cc5===_0x5eab22)break;else _0x4969ec['push'](_0x4969ec['shift']());}catch(_0x113692){_0x4969ec['push'](_0x4969ec['shift']());}}}(a83_0x1ae1,0x7d47f));import{logger}from'../../utils/logger.js';function a83_0x3d67(_0x541dd,_0x366411){_0x541dd=_0x541dd-0xba;const _0x1ae1ba=a83_0x1ae1();let _0x3d6706=_0x1ae1ba[_0x541dd];return _0x3d6706;}function printLogs(_0x1852de){const _0x255bc8=a83_0x3d67;if(_0x1852de[_0x255bc8(0xbb)]===0x0){console[_0x255bc8(0xc4)]('*\x20No\x20logs\x20found');return;}console[_0x255bc8(0xc4)](_0x255bc8(0xc2)),_0x1852de['forEach']((_0x5758d5,_0x517797)=>{const _0x3ec933=_0x255bc8,_0x3c36b4=new Date(_0x5758d5[_0x3ec933(0xd9)])[_0x3ec933(0xc7)](_0x3ec933(0xce)),_0x1c4034=_0x5758d5[_0x3ec933(0xda)]===_0x3ec933(0xcb)?'√':_0x5758d5[_0x3ec933(0xda)]===_0x3ec933(0xc9)?'×':_0x5758d5[_0x3ec933(0xda)]==='warn'?'!':'i';console[_0x3ec933(0xc4)](_0x517797+0x1+'.\x20'+_0x1c4034+'\x20['+_0x5758d5[_0x3ec933(0xc5)]+']\x20'+_0x5758d5[_0x3ec933(0xd3)]),console[_0x3ec933(0xc4)](_0x3ec933(0xd1)+_0x3c36b4),_0x5758d5[_0x3ec933(0xd7)]&&console['log']('\x20\x20\x20Duration:\x20'+_0x5758d5[_0x3ec933(0xd7)]+'ms'),_0x5758d5[_0x3ec933(0xd5)]&&Object[_0x3ec933(0xc8)](_0x5758d5[_0x3ec933(0xd5)])[_0x3ec933(0xbb)]>0x0&&console['log'](_0x3ec933(0xc6)+JSON[_0x3ec933(0xca)](_0x5758d5[_0x3ec933(0xd5)],null,0x2)),console[_0x3ec933(0xc4)]('');});}function a83_0x1ae1(){const _0x28569d=['duration','8GvRosA','timestamp','level','7086483BQWXvk','1011860fIwdVL','427603RSdXfc','27951xODJzT','length','195GuVzBQ','show','clear','View\x20command\x20history\x20logs','604716rzEVcK','logs','*\x20Lovrabet\x20CLI\x20logs:\x0a','write','log','command','\x20\x20\x20Details:\x20','toLocaleString','keys','error','stringify','success','593172CgiTeL','16GJrvmh','en-US','2191KhvkRY','read','\x20\x20\x20Time:\x20','6732axDSnJ','message','20XGgjxI','details','82QywLnT'];a83_0x1ae1=function(){return _0x28569d;};return a83_0x1ae1();}export const logsDefinitions=[{'service':a83_0x57ec2e(0xc1),'command':a83_0x57ec2e(0xbd),'description':a83_0x57ec2e(0xbf),'risk':a83_0x57ec2e(0xd0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x407669){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':a83_0x57ec2e(0xc1),'command':a83_0x57ec2e(0xbe),'description':'Clear\x20command\x20history\x20logs','risk':a83_0x57ec2e(0xc3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x53f382){const _0x3c8d02=a83_0x57ec2e;return logger['clearLogs'](),console[_0x3c8d02(0xc4)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
1
+ const a83_0x3572d8=a83_0x1edf;(function(_0x1c5c3c,_0x1a1050){const _0x21d81a=a83_0x1edf,_0x1f967a=_0x1c5c3c();while(!![]){try{const _0x524d8a=-parseInt(_0x21d81a(0xd6))/0x1*(-parseInt(_0x21d81a(0xcc))/0x2)+parseInt(_0x21d81a(0xbf))/0x3*(-parseInt(_0x21d81a(0xd3))/0x4)+-parseInt(_0x21d81a(0xcd))/0x5+parseInt(_0x21d81a(0xbd))/0x6+parseInt(_0x21d81a(0xc3))/0x7*(parseInt(_0x21d81a(0xd9))/0x8)+parseInt(_0x21d81a(0xdd))/0x9+-parseInt(_0x21d81a(0xcf))/0xa;if(_0x524d8a===_0x1a1050)break;else _0x1f967a['push'](_0x1f967a['shift']());}catch(_0x572abd){_0x1f967a['push'](_0x1f967a['shift']());}}}(a83_0x2ca9,0x2339d));function a83_0x2ca9(){const _0xc4ed78=['log','readLogs','1099jaeckn','level','message','en-US','toLocaleString','Clear\x20command\x20history\x20logs','logs','timestamp','View\x20command\x20history\x20logs','3140VYiVmD','11935eTcLuV','*\x20Logs\x20cleared','5021930mdTrct','stringify','*\x20Lovrabet\x20CLI\x20logs:\x0a','duration','938184VuYZif','command','\x20\x20\x20Details:\x20','167lPLIxi','\x20\x20\x20Time:\x20','*\x20No\x20logs\x20found','14280zkwdsy','details','show','keys','1459485DqjpYY','success','1072866wDOAnI','clear','3CQhRye','length'];a83_0x2ca9=function(){return _0xc4ed78;};return a83_0x2ca9();}import{logger}from'../../utils/logger.js';function a83_0x1edf(_0x4b3609,_0x3ba47e){_0x4b3609=_0x4b3609-0xbc;const _0x2ca998=a83_0x2ca9();let _0x1edfa5=_0x2ca998[_0x4b3609];return _0x1edfa5;}function printLogs(_0x329a3f){const _0x4dde95=a83_0x1edf;if(_0x329a3f[_0x4dde95(0xc0)]===0x0){console[_0x4dde95(0xc1)](_0x4dde95(0xd8));return;}console['log'](_0x4dde95(0xd1)),_0x329a3f['forEach']((_0x50014b,_0x2129e3)=>{const _0x2ceb27=_0x4dde95,_0x5c5d77=new Date(_0x50014b[_0x2ceb27(0xca)])[_0x2ceb27(0xc7)](_0x2ceb27(0xc6)),_0x3791bf=_0x50014b[_0x2ceb27(0xc4)]===_0x2ceb27(0xbc)?'√':_0x50014b[_0x2ceb27(0xc4)]==='error'?'×':_0x50014b[_0x2ceb27(0xc4)]==='warn'?'!':'i';console[_0x2ceb27(0xc1)](_0x2129e3+0x1+'.\x20'+_0x3791bf+'\x20['+_0x50014b[_0x2ceb27(0xd4)]+']\x20'+_0x50014b[_0x2ceb27(0xc5)]),console['log'](_0x2ceb27(0xd7)+_0x5c5d77),_0x50014b[_0x2ceb27(0xd2)]&&console['log']('\x20\x20\x20Duration:\x20'+_0x50014b[_0x2ceb27(0xd2)]+'ms'),_0x50014b[_0x2ceb27(0xda)]&&Object[_0x2ceb27(0xdc)](_0x50014b['details'])[_0x2ceb27(0xc0)]>0x0&&console[_0x2ceb27(0xc1)](_0x2ceb27(0xd5)+JSON[_0x2ceb27(0xd0)](_0x50014b[_0x2ceb27(0xda)],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':a83_0x3572d8(0xc9),'command':a83_0x3572d8(0xdb),'description':a83_0x3572d8(0xcb),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x26f43d){const _0x5afa8a=a83_0x3572d8;return printLogs(logger[_0x5afa8a(0xc2)]()),{'ok':!![]};}},{'service':a83_0x3572d8(0xc9),'command':a83_0x3572d8(0xbe),'description':a83_0x3572d8(0xc8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x420773){const _0x42386=a83_0x3572d8;return logger['clearLogs'](),console['log'](_0x42386(0xce)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- function a84_0x3a14(_0x2094a5,_0x23e7e6){_0x2094a5=_0x2094a5-0x1b1;const _0x5f3344=a84_0x5f33();let _0x3a14ed=_0x5f3344[_0x2094a5];return _0x3a14ed;}(function(_0x2dad63,_0x2b8b9e){const _0x18c31b=a84_0x3a14,_0x61429f=_0x2dad63();while(!![]){try{const _0x226327=-parseInt(_0x18c31b(0x1b9))/0x1*(parseInt(_0x18c31b(0x1b5))/0x2)+parseInt(_0x18c31b(0x1b2))/0x3*(-parseInt(_0x18c31b(0x1b6))/0x4)+-parseInt(_0x18c31b(0x1ba))/0x5+-parseInt(_0x18c31b(0x1b7))/0x6*(-parseInt(_0x18c31b(0x1b3))/0x7)+parseInt(_0x18c31b(0x1b4))/0x8+parseInt(_0x18c31b(0x1b8))/0x9+-parseInt(_0x18c31b(0x1b1))/0xa*(-parseInt(_0x18c31b(0x1bb))/0xb);if(_0x226327===_0x2b8b9e)break;else _0x61429f['push'](_0x61429f['shift']());}catch(_0x1efc61){_0x61429f['push'](_0x61429f['shift']());}}}(a84_0x5f33,0xcd7df));import{menuSync}from'../../commands/menu/sync.js';function a84_0x5f33(){const _0x3cf91e=['24033yBiKzk','331250QGRYtW','266233sJLOui','830fxSBOn','108gBxAAL','1657348IxTXby','2849048qnUjjI','130qHZEWm','186812HyepJy','18pgvuzc','9685134ChAoPv'];a84_0x5f33=function(){return _0x3cf91e;};return a84_0x5f33();}import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuSync,menuUpdate];
1
+ function a84_0x1380(_0xde329,_0x37e218){_0xde329=_0xde329-0x154;const _0x15a492=a84_0x15a4();let _0x1380ab=_0x15a492[_0xde329];return _0x1380ab;}(function(_0x2737f3,_0x49e3b9){const _0x57d06c=a84_0x1380,_0x2b1f84=_0x2737f3();while(!![]){try{const _0x353062=-parseInt(_0x57d06c(0x155))/0x1+-parseInt(_0x57d06c(0x159))/0x2+parseInt(_0x57d06c(0x156))/0x3*(-parseInt(_0x57d06c(0x154))/0x4)+-parseInt(_0x57d06c(0x157))/0x5+-parseInt(_0x57d06c(0x15b))/0x6+-parseInt(_0x57d06c(0x15a))/0x7+parseInt(_0x57d06c(0x158))/0x8;if(_0x353062===_0x49e3b9)break;else _0x2b1f84['push'](_0x2b1f84['shift']());}catch(_0xc1ef11){_0x2b1f84['push'](_0x2b1f84['shift']());}}}(a84_0x15a4,0x9b60e));function a84_0x15a4(){const _0x5a2e1e=['3261910QSTktY','39558376AAWmnG','2181874LFZKNq','6814815kKaaky','2460114mIJmaI','236WJDWTa','1038704AYLvSo','7260CadoOZ'];a84_0x15a4=function(){return _0x5a2e1e;};return a84_0x15a4();}import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuSync,menuUpdate];
@@ -1 +1 @@
1
- (function(_0x3f7423,_0x3b1cb1){const _0x194cc0=a85_0x5a78,_0x239423=_0x3f7423();while(!![]){try{const _0x502553=-parseInt(_0x194cc0(0xcf))/0x1*(parseInt(_0x194cc0(0xcc))/0x2)+-parseInt(_0x194cc0(0xdf))/0x3*(-parseInt(_0x194cc0(0xdc))/0x4)+-parseInt(_0x194cc0(0xde))/0x5*(-parseInt(_0x194cc0(0xdb))/0x6)+-parseInt(_0x194cc0(0xe2))/0x7*(parseInt(_0x194cc0(0xe7))/0x8)+-parseInt(_0x194cc0(0xd0))/0x9+parseInt(_0x194cc0(0xd3))/0xa+-parseInt(_0x194cc0(0xda))/0xb*(parseInt(_0x194cc0(0xea))/0xc);if(_0x502553===_0x3b1cb1)break;else _0x239423['push'](_0x239423['shift']());}catch(_0x249b35){_0x239423['push'](_0x239423['shift']());}}}(a85_0x5034,0x29b94));function a85_0x5034(){const _0x102c3e=['356007FznCOI','\x20\x20Affected\x20menus:\x20','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','7pcdLhY','test','online','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','max','542824IKtUiW','Local','join','204kLDEti','\x20\x20\x20\x20JS:\x20\x20','75410rDwCUQ','Menu\x20Name','push','5jkJqgk','1290987uJffOq','\x20\x20No\x20pages\x20to\x20sync.','path','1497130jSlZOy','label','length','local','repeat','(unchanged)','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','12749goDMEd','54NqCERV','8NImScb','\x20\x20\x20\x20•\x20','112985wWmnmW'];a85_0x5034=function(){return _0x102c3e;};return a85_0x5034();}function strWidth(_0x34bd36){const _0x5c17f5=a85_0x5a78;let _0x563e69=0x0;for(const _0x32d926 of _0x34bd36){_0x563e69+=/[\u4e00-\u9fa5]/[_0x5c17f5(0xe3)](_0x32d926)?0x2:0x1;}return _0x563e69;}function padRight(_0x2798a4,_0x44497e){const _0x3f6d97=a85_0x5a78,_0x449308=strWidth(_0x2798a4);return _0x2798a4+'\x20'[_0x3f6d97(0xd7)](Math['max'](0x0,_0x44497e-_0x449308));}function a85_0x5a78(_0x2503ad,_0x51447f){_0x2503ad=_0x2503ad-0xcb;const _0x5034e2=a85_0x5034();let _0x5a786a=_0x5034e2[_0x2503ad];return _0x5a786a;}export function renderCompareTable(_0x3851e6,_0x2f5cd7={}){const _0x57054a=a85_0x5a78;if(_0x3851e6['length']===0x0)return'';const _0x258dda=_0x2f5cd7['showOnline']??!![],_0x590e8a=Math[_0x57054a(0xe6)](0x1e,..._0x3851e6['map'](_0x5d9149=>strWidth(_0x5d9149[_0x57054a(0xd4)]))),_0x667671=0x4,_0x226acd=[],_0x3a95c7='\x20\x20'+padRight(_0x57054a(0xcd),_0x590e8a),_0x505caf=padRight(_0x57054a(0xe8),_0x667671),_0xc49b7a=_0x258dda?'\x20\x20'+padRight('Platform',_0x667671):'';_0x226acd[_0x57054a(0xce)](_0x3a95c7+'\x20\x20'+_0x505caf+(_0x258dda?_0xc49b7a:'')),_0x226acd[_0x57054a(0xce)]('\x20\x20'+'─'[_0x57054a(0xd7)](_0x590e8a)+'\x20\x20'+'─'[_0x57054a(0xd7)](_0x667671)+(_0x258dda?'\x20\x20'+'─'[_0x57054a(0xd7)](_0x667671):''));for(const _0x25d062 of _0x3851e6){const _0x1e1597=padRight(_0x25d062[_0x57054a(0xd4)],_0x590e8a),_0x1d7616=_0x25d062[_0x57054a(0xd6)]?'✓':'✗',_0x1bc57d=padRight(_0x1d7616,_0x667671);let _0x26b8a2='\x20\x20'+_0x1e1597+'\x20\x20'+_0x1bc57d;if(_0x258dda){const _0x33bf86=_0x25d062[_0x57054a(0xe4)]?'✓':'✗';_0x26b8a2+='\x20\x20'+padRight(_0x33bf86,_0x667671);}_0x226acd[_0x57054a(0xce)](_0x26b8a2);}return _0x226acd[_0x57054a(0xe9)]('\x0a');}export function renderSyncSummary(_0x1d9dec,_0x5c4827){const _0xd8e24d=a85_0x5a78;if(_0x1d9dec['length']===0x0)return _0x5c4827?_0xd8e24d(0xe5):_0xd8e24d(0xd1);const _0x49577a=['\x20\x20'+_0x1d9dec[_0xd8e24d(0xd5)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x4c2fb9 of _0x1d9dec){_0x49577a[_0xd8e24d(0xce)](_0xd8e24d(0xdd)+_0x4c2fb9[_0xd8e24d(0xd4)]+'\x20('+_0x4c2fb9[_0xd8e24d(0xd2)]+')');}return _0x49577a[_0xd8e24d(0xe9)]('\x0a');}export function renderUpdateSummary(_0x391cbb,_0x3a4830){const _0xeb18d0=a85_0x5a78;if(_0x391cbb['length']===0x0)return _0xeb18d0(0xe1);const _0x7a7ee0=['\x20\x20'+_0x391cbb[_0xeb18d0(0xd5)]+_0xeb18d0(0xd9),_0xeb18d0(0xcb)+(_0x3a4830[0x0]??_0xeb18d0(0xd8)),'\x20\x20\x20\x20CSS:\x20'+(_0x3a4830[0x1]??_0xeb18d0(0xd8)),'',_0xeb18d0(0xe0)+_0x391cbb[_0xeb18d0(0xe9)](',\x20')];return _0x7a7ee0[_0xeb18d0(0xe9)]('\x0a');}
1
+ (function(_0x76b6fc,_0xa75799){const _0x58ce81=a85_0x4d9c,_0x432339=_0x76b6fc();while(!![]){try{const _0x1fa855=parseInt(_0x58ce81(0x90))/0x1+-parseInt(_0x58ce81(0x93))/0x2+-parseInt(_0x58ce81(0x81))/0x3*(parseInt(_0x58ce81(0x8d))/0x4)+-parseInt(_0x58ce81(0x86))/0x5+-parseInt(_0x58ce81(0x95))/0x6+parseInt(_0x58ce81(0x8a))/0x7+parseInt(_0x58ce81(0x94))/0x8;if(_0x1fa855===_0xa75799)break;else _0x432339['push'](_0x432339['shift']());}catch(_0x56aeb0){_0x432339['push'](_0x432339['shift']());}}}(a85_0x56da,0x913e0));function a85_0x4d9c(_0x41dc13,_0x308874){_0x41dc13=_0x41dc13-0x7d;const _0x56daad=a85_0x56da();let _0x4d9c1b=_0x56daad[_0x41dc13];return _0x4d9c1b;}function a85_0x56da(){const _0x1e4e70=['\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','push','7384972GLveGR','label','length','270392LAfvvr','Local','online','75865Vzdwqx','join','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','522516qEGsCy','16496672sKbYYl','1820082ycoOUZ','\x20\x20\x20\x20CSS:\x20','repeat','\x20\x20No\x20pages\x20to\x20sync.','(unchanged)','48kWpXuU','max','map','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','\x20\x20Affected\x20menus:\x20','4759300jeuYRr','showOnline'];a85_0x56da=function(){return _0x1e4e70;};return a85_0x56da();}function strWidth(_0x137fa6){let _0x2dfe8d=0x0;for(const _0x5615ca of _0x137fa6){_0x2dfe8d+=/[\u4e00-\u9fa5]/['test'](_0x5615ca)?0x2:0x1;}return _0x2dfe8d;}function padRight(_0x1dba3b,_0x29ade7){const _0x5b3763=a85_0x4d9c,_0x590001=strWidth(_0x1dba3b);return _0x1dba3b+'\x20'[_0x5b3763(0x7e)](Math['max'](0x0,_0x29ade7-_0x590001));}export function renderCompareTable(_0x917907,_0x411a16={}){const _0x52733c=a85_0x4d9c;if(_0x917907[_0x52733c(0x8c)]===0x0)return'';const _0x941ecc=_0x411a16[_0x52733c(0x87)]??!![],_0x224909=Math[_0x52733c(0x82)](0x1e,..._0x917907[_0x52733c(0x83)](_0xe2d35f=>strWidth(_0xe2d35f[_0x52733c(0x8b)]))),_0x284354=0x4,_0x1435c7=[],_0x50ad24='\x20\x20'+padRight('Menu\x20Name',_0x224909),_0x31cb66=padRight(_0x52733c(0x8e),_0x284354),_0x327c22=_0x941ecc?'\x20\x20'+padRight('Platform',_0x284354):'';_0x1435c7[_0x52733c(0x89)](_0x50ad24+'\x20\x20'+_0x31cb66+(_0x941ecc?_0x327c22:'')),_0x1435c7['push']('\x20\x20'+'─'[_0x52733c(0x7e)](_0x224909)+'\x20\x20'+'─'[_0x52733c(0x7e)](_0x284354)+(_0x941ecc?'\x20\x20'+'─'[_0x52733c(0x7e)](_0x284354):''));for(const _0x2c23d5 of _0x917907){const _0x2c02af=padRight(_0x2c23d5[_0x52733c(0x8b)],_0x224909),_0x16ea5c=_0x2c23d5['local']?'✓':'✗',_0x148cc9=padRight(_0x16ea5c,_0x284354);let _0x3afef7='\x20\x20'+_0x2c02af+'\x20\x20'+_0x148cc9;if(_0x941ecc){const _0xcfb28f=_0x2c23d5[_0x52733c(0x8f)]?'✓':'✗';_0x3afef7+='\x20\x20'+padRight(_0xcfb28f,_0x284354);}_0x1435c7[_0x52733c(0x89)](_0x3afef7);}return _0x1435c7['join']('\x0a');}export function renderSyncSummary(_0x3353e2,_0x2c38a4){const _0x21720c=a85_0x4d9c;if(_0x3353e2['length']===0x0)return _0x2c38a4?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x21720c(0x7f);const _0x4aa43d=['\x20\x20'+_0x3353e2['length']+_0x21720c(0x84)];for(const _0x5d59af of _0x3353e2){_0x4aa43d[_0x21720c(0x89)]('\x20\x20\x20\x20•\x20'+_0x5d59af[_0x21720c(0x8b)]+'\x20('+_0x5d59af['path']+')');}return _0x4aa43d[_0x21720c(0x91)]('\x0a');}export function renderUpdateSummary(_0x2152c6,_0x5341f8){const _0x6e68b1=a85_0x4d9c;if(_0x2152c6['length']===0x0)return _0x6e68b1(0x88);const _0x11720c=['\x20\x20'+_0x2152c6[_0x6e68b1(0x8c)]+_0x6e68b1(0x92),'\x20\x20\x20\x20JS:\x20\x20'+(_0x5341f8[0x0]??_0x6e68b1(0x80)),_0x6e68b1(0x7d)+(_0x5341f8[0x1]??_0x6e68b1(0x80)),'',_0x6e68b1(0x85)+_0x2152c6[_0x6e68b1(0x91)](',\x20')];return _0x11720c[_0x6e68b1(0x91)]('\x0a');}
@@ -1 +1 @@
1
- (function(_0x22f53d,_0x2d1d06){var _0x992f4f=a86_0x2e83,_0x5b2e90=_0x22f53d();while(!![]){try{var _0x6b3507=parseInt(_0x992f4f(0x114))/0x1*(-parseInt(_0x992f4f(0x11b))/0x2)+-parseInt(_0x992f4f(0x11a))/0x3+parseInt(_0x992f4f(0x116))/0x4+parseInt(_0x992f4f(0x117))/0x5+parseInt(_0x992f4f(0x118))/0x6+parseInt(_0x992f4f(0x115))/0x7+-parseInt(_0x992f4f(0x119))/0x8;if(_0x6b3507===_0x2d1d06)break;else _0x5b2e90['push'](_0x5b2e90['shift']());}catch(_0xe069a3){_0x5b2e90['push'](_0x5b2e90['shift']());}}}(a86_0x17e4,0x97ada));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_0x17e4(){var _0x4a60f0=['1976697oDMBuo','206148xMMdho','9QaQtiH','6275094QXDaai','2661768WPLtfg','3395740gQBtEn','806586beAZAo','1340992UMlWuV'];a86_0x17e4=function(){return _0x4a60f0;};return a86_0x17e4();}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';function a86_0x2e83(_0x777365,_0x500494){_0x777365=_0x777365-0x114;var _0x17e4d9=a86_0x17e4();var _0x2e8331=_0x17e4d9[_0x777365];return _0x2e8331;}export*from'../../../commands/menu/shared/update-core.js';
1
+ (function(_0xe35b59,_0x4e13cb){var _0x46628f=a86_0x1d4f,_0x34b793=_0xe35b59();while(!![]){try{var _0x1eec00=-parseInt(_0x46628f(0x136))/0x1+parseInt(_0x46628f(0x131))/0x2+-parseInt(_0x46628f(0x137))/0x3*(parseInt(_0x46628f(0x133))/0x4)+-parseInt(_0x46628f(0x134))/0x5+-parseInt(_0x46628f(0x132))/0x6+parseInt(_0x46628f(0x135))/0x7+parseInt(_0x46628f(0x138))/0x8;if(_0x1eec00===_0x4e13cb)break;else _0x34b793['push'](_0x34b793['shift']());}catch(_0x41c19d){_0x34b793['push'](_0x34b793['shift']());}}}(a86_0x1a6a,0x84bdd));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';function a86_0x1a6a(){var _0x1e652a=['1353492fbarBX','714734VEceEg','6129xsfSbv','14598248yQoCxg','479272FSxBeI','5219346Hwficn','164yybUGl','228380cHiwJB'];a86_0x1a6a=function(){return _0x1e652a;};return a86_0x1a6a();}export*from'../../../commands/menu/shared/compare-table.js';function a86_0x1d4f(_0x14398e,_0x4b5011){_0x14398e=_0x14398e-0x131;var _0x1a6aea=a86_0x1a6a();var _0x1d4f62=_0x1a6aea[_0x14398e];return _0x1d4f62;}export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
@@ -1 +1 @@
1
- (function(_0x517bbc,_0x474947){const _0x3525e5=a87_0x4f98,_0x433c7c=_0x517bbc();while(!![]){try{const _0x4f298f=parseInt(_0x3525e5(0x1e9))/0x1+parseInt(_0x3525e5(0x1f4))/0x2*(-parseInt(_0x3525e5(0x1e5))/0x3)+parseInt(_0x3525e5(0x1f6))/0x4*(parseInt(_0x3525e5(0x1f9))/0x5)+-parseInt(_0x3525e5(0x1ff))/0x6+parseInt(_0x3525e5(0x1df))/0x7*(parseInt(_0x3525e5(0x205))/0x8)+-parseInt(_0x3525e5(0x200))/0x9*(-parseInt(_0x3525e5(0x1f3))/0xa)+parseInt(_0x3525e5(0x1de))/0xb;if(_0x4f298f===_0x474947)break;else _0x433c7c['push'](_0x433c7c['shift']());}catch(_0x4562e9){_0x433c7c['push'](_0x433c7c['shift']());}}}(a87_0x3692,0x8b93b));import a87_0x5b5532 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';function a87_0x4f98(_0x3dd8c1,_0x44d70d){_0x3dd8c1=_0x3dd8c1-0x1d6;const _0x36929e=a87_0x3692();let _0x4f984e=_0x36929e[_0x3dd8c1];return _0x4f984e;}function a87_0x3692(){const _0x16357d=['CSS\x20URL\x20checked','isTTY','has','cancelled','trim','stdin','20WhHnML','1199302pVGLBi','Cancelled.','766156yWvBuC','No\x20local\x20pages\x20found.','path','5HkdLCl','catch','green','[already\x20on\x20platform]','CSS\x20URL\x20check\x20failed','ExitPromptError','6205470NAyXnK','2325141zJeZLt','gray','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','name','64ZnTBhE','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','filter','includes','map','length','\x20\x20CSS\x20URL:','test','cyan','4365592LSjYVz','501431xTBEaX','\x20\x20Checking\x20CSS\x20URL\x20reachability...','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','label','No\x20menus\x20selected.','succeed','3EHTlCo','red','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','JS\x20URL\x20checked','527430EplpKp','[new]','\x20\x20Checking\x20JS\x20URL\x20reachability...','error'];a87_0x3692=function(){return _0x16357d;};return a87_0x3692();}import a87_0x5d71cd from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x2112e1){const _0x150b2f=a87_0x4f98;return _0x2112e1[_0x150b2f(0x1fa)](_0x4f6f98=>{const _0x541f7a=_0x150b2f;if(_0x4f6f98?.[_0x541f7a(0x204)]===_0x541f7a(0x1fe))throw CliErrors[_0x541f7a(0x1f0)](_0x541f7a(0x1f5));throw _0x4f6f98;});}export function startSpinner(_0x399a99){const _0x4a0d86=a87_0x4f98;return a87_0x5d71cd({'text':_0x399a99,'color':_0x4a0d86(0x1dd)})['start']();}export function stopSpinner(_0x3f38e7,_0x3f5b71,_0x759141){const _0x35f642=a87_0x4f98;_0x759141?_0x3f38e7[_0x35f642(0x1e4)](_0x3f5b71):_0x3f38e7['fail'](_0x3f5b71);}export async function askConfirm(_0x41f58b){return onCancel(confirm({'message':_0x41f58b,'theme':{'prefix':''}}));}export async function askJsUrl(_0x244442){const _0x296f0e=a87_0x4f98;while(!![]){const _0x330e51=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x244442,'theme':{'prefix':''}}));if(_0x330e51['trim']()==='')throw CliErrors[_0x296f0e(0x1f0)](_0x296f0e(0x1f5));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x296f0e(0x1dc)](_0x330e51['trim']())){console['error'](a87_0x5b5532[_0x296f0e(0x1e6)](_0x296f0e(0x1e7)));continue;}const _0xbb763b=startSpinner(_0x296f0e(0x1eb));try{const _0xdbd61b=await isUrlReachable(_0x330e51['trim']());stopSpinner(_0xbb763b,_0x296f0e(0x1e8),_0xdbd61b);if(!_0xdbd61b){console['error'](a87_0x5b5532['red'](_0x296f0e(0x202)));continue;}return _0x330e51[_0x296f0e(0x1f1)]();}catch(_0x5a936e){stopSpinner(_0xbb763b,'JS\x20URL\x20check\x20failed',![]);throw _0x5a936e;}}}export async function askCssUrl(_0x24e584){const _0xc134bb=a87_0x4f98;while(!![]){const _0x436913=await onCancel(input({'message':_0xc134bb(0x1db),'default':_0x24e584,'theme':{'prefix':''}}));if(_0x436913[_0xc134bb(0x1f1)]()==='')throw CliErrors[_0xc134bb(0x1f0)](_0xc134bb(0x1f5));if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x436913[_0xc134bb(0x1f1)]())){console[_0xc134bb(0x1ec)](a87_0x5b5532[_0xc134bb(0x1e6)](_0xc134bb(0x1e1)));continue;}const _0x26bc9b=startSpinner(_0xc134bb(0x1e0));try{const _0x14019=await isUrlReachable(_0x436913[_0xc134bb(0x1f1)]());stopSpinner(_0x26bc9b,_0xc134bb(0x1ed),_0x14019);if(!_0x14019){console['error'](a87_0x5b5532['red'](_0xc134bb(0x203)));continue;}return _0x436913[_0xc134bb(0x1f1)]();}catch(_0x1c723e){stopSpinner(_0x26bc9b,_0xc134bb(0x1fd),![]);throw _0x1c723e;}}}export async function selectPages(_0x55cf6,_0x188030,_0x10d953){const _0x544cc1=a87_0x4f98,_0x2c23b9=_0x55cf6[_0x544cc1(0x1d9)](_0x2e2f81=>({'name':_0x2e2f81[_0x544cc1(0x1e2)]+'\x20\x20'+(_0x188030[_0x544cc1(0x1ef)](_0x2e2f81[_0x544cc1(0x1f8)])?a87_0x5b5532[_0x544cc1(0x201)](_0x544cc1(0x1fc)):a87_0x5b5532[_0x544cc1(0x1fb)](_0x544cc1(0x1ea))),'value':_0x2e2f81[_0x544cc1(0x1e2)],'checked':_0x10d953?_0x10d953[_0x544cc1(0x1d8)](_0x2e2f81[_0x544cc1(0x1e2)]):!_0x188030[_0x544cc1(0x1ef)](_0x2e2f81['path'])}));if(_0x2c23b9[_0x544cc1(0x1da)]===0x0)throw new Error(_0x544cc1(0x1f7));const _0x3b3010=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x2c23b9,'loop':![],'theme':{'prefix':''}}));if(_0x3b3010[_0x544cc1(0x1da)]===0x0)throw new Error(_0x544cc1(0x1e3));return _0x55cf6[_0x544cc1(0x1d7)](_0x9616eb=>_0x3b3010[_0x544cc1(0x1d8)](_0x9616eb[_0x544cc1(0x1e2)]));}export function isInteractive(){const _0x17c961=a87_0x4f98;return process[_0x17c961(0x1f2)][_0x17c961(0x1ee)]===!![];}export function requireInteractive(){const _0x59785a=a87_0x4f98;if(!isInteractive())throw new Error(_0x59785a(0x206)+_0x59785a(0x1d6));}
1
+ (function(_0x3678e4,_0x95017a){const _0x27fba3=a87_0x5dc1,_0x5489d7=_0x3678e4();while(!![]){try{const _0x8bd961=-parseInt(_0x27fba3(0x217))/0x1+-parseInt(_0x27fba3(0x1fb))/0x2*(-parseInt(_0x27fba3(0x1f1))/0x3)+-parseInt(_0x27fba3(0x201))/0x4*(parseInt(_0x27fba3(0x21b))/0x5)+parseInt(_0x27fba3(0x202))/0x6*(parseInt(_0x27fba3(0x20e))/0x7)+parseInt(_0x27fba3(0x1ed))/0x8+-parseInt(_0x27fba3(0x1f0))/0x9*(parseInt(_0x27fba3(0x211))/0xa)+-parseInt(_0x27fba3(0x1fe))/0xb*(parseInt(_0x27fba3(0x1ef))/0xc);if(_0x8bd961===_0x95017a)break;else _0x5489d7['push'](_0x5489d7['shift']());}catch(_0x291213){_0x5489d7['push'](_0x5489d7['shift']());}}}(a87_0x15c6,0xb2091));import a87_0x28dd4c from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a87_0x18b6fe from'ora';function a87_0x15c6(){const _0xd14744=['[already\x20on\x20platform]','label','CSS\x20URL\x20check\x20failed','Cancelled.','cancelled','catch','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','has','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','name','JS\x20URL\x20check\x20failed','35zjFpLk','\x20\x20Checking\x20CSS\x20URL\x20reachability...','isTTY','4359930RSXnFa','filter','start','map','No\x20menus\x20selected.','trim','600124RDFpTc','[new]','\x20\x20Checking\x20JS\x20URL\x20reachability...','ExitPromptError','191350IUQvdc','\x20\x20JS\x20URL:','includes','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','CSS\x20URL\x20checked','9889592YelyWI','No\x20local\x20pages\x20found.','9504mQoBVl','9uPULIk','466626yeOEXL','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','green','gray','\x20\x20CSS\x20URL:','red','cyan','length','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','succeed','6dyOGaB','path','error','16610tNTjKL','test','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','20Avtjcl','1739754AFcaDM'];a87_0x15c6=function(){return _0xd14744;};return a87_0x15c6();}import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x1fe76e){const _0x585ce0=a87_0x5dc1;return _0x1fe76e[_0x585ce0(0x208)](_0x4b27ec=>{const _0x26b01a=_0x585ce0;if(_0x4b27ec?.[_0x26b01a(0x20c)]===_0x26b01a(0x21a))throw CliErrors[_0x26b01a(0x207)](_0x26b01a(0x206));throw _0x4b27ec;});}export function startSpinner(_0x4fb1fe){const _0x53ac90=a87_0x5dc1;return a87_0x18b6fe({'text':_0x4fb1fe,'color':_0x53ac90(0x1f7)})[_0x53ac90(0x213)]();}export function stopSpinner(_0x389ca0,_0x132877,_0x427e1a){const _0x486d23=a87_0x5dc1;_0x427e1a?_0x389ca0[_0x486d23(0x1fa)](_0x132877):_0x389ca0['fail'](_0x132877);}function a87_0x5dc1(_0x43bcab,_0x3c8d1a){_0x43bcab=_0x43bcab-0x1eb;const _0x15c605=a87_0x15c6();let _0x5dc15b=_0x15c605[_0x43bcab];return _0x5dc15b;}export async function askConfirm(_0x5abf76){return onCancel(confirm({'message':_0x5abf76,'theme':{'prefix':''}}));}export async function askJsUrl(_0xd57630){const _0x32e0a7=a87_0x5dc1;while(!![]){const _0x533947=await onCancel(input({'message':_0x32e0a7(0x21c),'default':_0xd57630,'theme':{'prefix':''}}));if(_0x533947[_0x32e0a7(0x216)]()==='')throw CliErrors[_0x32e0a7(0x207)]('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/[_0x32e0a7(0x1ff)](_0x533947[_0x32e0a7(0x216)]())){console[_0x32e0a7(0x1fd)](a87_0x28dd4c[_0x32e0a7(0x1f6)](_0x32e0a7(0x1f9)));continue;}const _0x66ddd4=startSpinner(_0x32e0a7(0x219));try{const _0x454125=await isUrlReachable(_0x533947[_0x32e0a7(0x216)]());stopSpinner(_0x66ddd4,'JS\x20URL\x20checked',_0x454125);if(!_0x454125){console[_0x32e0a7(0x1fd)](a87_0x28dd4c['red'](_0x32e0a7(0x200)));continue;}return _0x533947[_0x32e0a7(0x216)]();}catch(_0xf66120){stopSpinner(_0x66ddd4,_0x32e0a7(0x20d),![]);throw _0xf66120;}}}export async function askCssUrl(_0x45b850){const _0x46a102=a87_0x5dc1;while(!![]){const _0x2e7148=await onCancel(input({'message':_0x46a102(0x1f5),'default':_0x45b850,'theme':{'prefix':''}}));if(_0x2e7148[_0x46a102(0x216)]()==='')throw CliErrors['cancelled'](_0x46a102(0x206));if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x2e7148[_0x46a102(0x216)]())){console[_0x46a102(0x1fd)](a87_0x28dd4c[_0x46a102(0x1f6)](_0x46a102(0x20b)));continue;}const _0x15fbd2=startSpinner(_0x46a102(0x20f));try{const _0x4dc19f=await isUrlReachable(_0x2e7148['trim']());stopSpinner(_0x15fbd2,_0x46a102(0x1ec),_0x4dc19f);if(!_0x4dc19f){console[_0x46a102(0x1fd)](a87_0x28dd4c['red'](_0x46a102(0x209)));continue;}return _0x2e7148[_0x46a102(0x216)]();}catch(_0x44ff09){stopSpinner(_0x15fbd2,_0x46a102(0x205),![]);throw _0x44ff09;}}}export async function selectPages(_0x34afde,_0x1e44ea,_0x270e52){const _0x35d21c=a87_0x5dc1,_0x56c565=_0x34afde[_0x35d21c(0x214)](_0x188269=>({'name':_0x188269['label']+'\x20\x20'+(_0x1e44ea['has'](_0x188269[_0x35d21c(0x1fc)])?a87_0x28dd4c[_0x35d21c(0x1f4)](_0x35d21c(0x203)):a87_0x28dd4c[_0x35d21c(0x1f3)](_0x35d21c(0x218))),'value':_0x188269[_0x35d21c(0x204)],'checked':_0x270e52?_0x270e52['includes'](_0x188269[_0x35d21c(0x204)]):!_0x1e44ea[_0x35d21c(0x20a)](_0x188269[_0x35d21c(0x1fc)])}));if(_0x56c565[_0x35d21c(0x1f8)]===0x0)throw new Error(_0x35d21c(0x1ee));const _0x494af9=await onCancel(checkbox({'message':_0x35d21c(0x1f2),'choices':_0x56c565,'loop':![],'theme':{'prefix':''}}));if(_0x494af9[_0x35d21c(0x1f8)]===0x0)throw new Error(_0x35d21c(0x215));return _0x34afde[_0x35d21c(0x212)](_0x1d848e=>_0x494af9[_0x35d21c(0x21d)](_0x1d848e[_0x35d21c(0x204)]));}export function isInteractive(){const _0x193c56=a87_0x5dc1;return process['stdin'][_0x193c56(0x210)]===!![];}export function requireInteractive(){const _0x2942a3=a87_0x5dc1;if(!isInteractive())throw new Error('This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'+_0x2942a3(0x1eb));}
@@ -1 +1 @@
1
- const a88_0x2549c1=a88_0x8139;(function(_0x5d4380,_0xfd5901){const _0x277efc=a88_0x8139,_0x33d1ee=_0x5d4380();while(!![]){try{const _0x169d38=parseInt(_0x277efc(0xd2))/0x1*(-parseInt(_0x277efc(0xca))/0x2)+-parseInt(_0x277efc(0xc6))/0x3+parseInt(_0x277efc(0xd9))/0x4*(parseInt(_0x277efc(0xd1))/0x5)+parseInt(_0x277efc(0xc4))/0x6+parseInt(_0x277efc(0xce))/0x7*(parseInt(_0x277efc(0xda))/0x8)+parseInt(_0x277efc(0xcc))/0x9*(parseInt(_0x277efc(0xcd))/0xa)+parseInt(_0x277efc(0xcf))/0xb*(-parseInt(_0x277efc(0xc1))/0xc);if(_0x169d38===_0xfd5901)break;else _0x33d1ee['push'](_0x33d1ee['shift']());}catch(_0x32a1ba){_0x33d1ee['push'](_0x33d1ee['shift']());}}}(a88_0x3c51,0xf2522));import{readdirSync,statSync,readFileSync}from'fs';function a88_0x8139(_0x2287a7,_0x2f629f){_0x2287a7=_0x2287a7-0xbe;const _0x3c514a=a88_0x3c51();let _0x813915=_0x3c514a[_0x2287a7];return _0x813915;}import{join,relative,resolve,sep}from'path';function a88_0x3c51(){const _0x4d1eb1=['trim','1828038qMdrtr','replaceAll','endsWith','isDirectory','1294xSviGw','forEach','44505QpHDCF','580UVWzei','1841lJkfCm','55uwZZNu','src/pages','5RjQNEh','1455nxzqRq','split','replace','push','utf-8','.tsx','slice','7713588YqmcGq','56008mJqcnR','match','join','cwd','7555812qwLnrm','filter','path','9810372rfDdhF'];a88_0x3c51=function(){return _0x4d1eb1;};return a88_0x3c51();}const pagesDir=resolve(process[a88_0x2549c1(0xc0)](),a88_0x2549c1(0xd0));export function extractTitleFromComment(_0x17574a){const _0x3fc31c=a88_0x2549c1;try{const _0x1eb945=readFileSync(_0x17574a,_0x3fc31c(0xd6)),_0x28482b=_0x1eb945[_0x3fc31c(0xbe)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x28482b&&_0x28482b[0x1]){const _0x52687b=_0x28482b[0x1],_0xc3c3b4=_0x52687b[_0x3fc31c(0xbe)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0xc3c3b4&&_0xc3c3b4[0x1])return _0xc3c3b4[0x1][_0x3fc31c(0xc5)]();}let _0x33123c=null;const _0x55fc46=_0x1eb945['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x55fc46&&_0x55fc46[0x1]&&(_0x33123c=_0x55fc46[0x1]);if(!_0x33123c){const _0x408839=_0x1eb945[_0x3fc31c(0xbe)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x408839&&_0x408839[0x1]&&(_0x33123c=_0x408839[0x1]);}if(_0x33123c){const _0x287de3=new RegExp('\x5cb'+_0x33123c+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x4ac177=_0x1eb945['match'](_0x287de3);if(_0x4ac177&&_0x4ac177[0x1])return _0x4ac177[0x1];return _0x33123c;}return null;}catch(_0x482e7d){return null;}}export function getLocalPages(_0x48d8a5=pagesDir,_0x4a2f12=pagesDir){const _0x2cf376=a88_0x2549c1;let _0x4f5c15=[];const _0x37012f=readdirSync(_0x48d8a5);return _0x37012f[_0x2cf376(0xcb)](_0x2df3e6=>{const _0x149ad1=_0x2cf376,_0xfaf8e8=join(_0x48d8a5,_0x2df3e6),_0x9d7c66=statSync(_0xfaf8e8);if(_0x9d7c66&&_0x9d7c66[_0x149ad1(0xc9)]())_0x4f5c15=_0x4f5c15['concat'](getLocalPages(_0xfaf8e8,_0x4a2f12));else{if(_0x2df3e6[_0x149ad1(0xc8)](_0x149ad1(0xd7))){let _0x1df9fa=relative(_0x4a2f12,_0xfaf8e8);_0x1df9fa[_0x149ad1(0xc8)]('index.tsx')?_0x1df9fa=_0x1df9fa['replace'](/index\.tsx$/,''):_0x1df9fa=_0x1df9fa[_0x149ad1(0xd4)](/\.tsx$/,'');_0x1df9fa['endsWith'](sep)&&(_0x1df9fa=_0x1df9fa[_0x149ad1(0xd8)](0x0,-0x1));const _0x512e97=_0x1df9fa[_0x149ad1(0xd3)](sep)[_0x149ad1(0xbf)]('/'),_0x57d285=extractTitleFromComment(_0xfaf8e8),_0x4d078b=_0x57d285||_0x512e97;_0x4f5c15[_0x149ad1(0xd5)]({'path':_0x512e97[_0x149ad1(0xc7)]('$',':'),'label':_0x4d078b});}}}),_0x4f5c15[_0x2cf376(0xc2)](_0x1da582=>_0x1da582[_0x2cf376(0xc3)]!=='');}
1
+ function a88_0x2026(_0x5e9da9,_0x3de289){_0x5e9da9=_0x5e9da9-0x122;const _0x36e634=a88_0x36e6();let _0x202630=_0x36e634[_0x5e9da9];return _0x202630;}const a88_0x567e2d=a88_0x2026;(function(_0xfca5f2,_0x4bb077){const _0x4ce152=a88_0x2026,_0x232bc0=_0xfca5f2();while(!![]){try{const _0x313642=-parseInt(_0x4ce152(0x13a))/0x1+-parseInt(_0x4ce152(0x122))/0x2+parseInt(_0x4ce152(0x129))/0x3+parseInt(_0x4ce152(0x124))/0x4+-parseInt(_0x4ce152(0x133))/0x5+parseInt(_0x4ce152(0x139))/0x6*(-parseInt(_0x4ce152(0x130))/0x7)+parseInt(_0x4ce152(0x131))/0x8;if(_0x313642===_0x4bb077)break;else _0x232bc0['push'](_0x232bc0['shift']());}catch(_0xd1dbfa){_0x232bc0['push'](_0x232bc0['shift']());}}}(a88_0x36e6,0x7eb56));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a88_0x567e2d(0x135)](),a88_0x567e2d(0x12c));function a88_0x36e6(){const _0x4715af=['12482720pVpaGR','filter','2619845exXQJB','utf-8','cwd','replace','index.tsx','concat','379914MqXFOY','100865XGhiER','463234jrlrkH','isDirectory','2211272qfuvdJ','endsWith','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','split','replaceAll','256314zNOyGB','slice','match','src/pages','join','trim','push','91vHuTDq'];a88_0x36e6=function(){return _0x4715af;};return a88_0x36e6();}export function extractTitleFromComment(_0x51a336){const _0x24fb9f=a88_0x567e2d;try{const _0x5f06a6=readFileSync(_0x51a336,_0x24fb9f(0x134)),_0x50f7ca=_0x5f06a6['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x50f7ca&&_0x50f7ca[0x1]){const _0x549784=_0x50f7ca[0x1],_0x5e4bc9=_0x549784[_0x24fb9f(0x12b)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x5e4bc9&&_0x5e4bc9[0x1])return _0x5e4bc9[0x1][_0x24fb9f(0x12e)]();}let _0x8abddd=null;const _0x56478a=_0x5f06a6[_0x24fb9f(0x12b)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x56478a&&_0x56478a[0x1]&&(_0x8abddd=_0x56478a[0x1]);if(!_0x8abddd){const _0x223134=_0x5f06a6[_0x24fb9f(0x12b)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x223134&&_0x223134[0x1]&&(_0x8abddd=_0x223134[0x1]);}if(_0x8abddd){const _0x326afb=new RegExp('\x5cb'+_0x8abddd+_0x24fb9f(0x126)),_0x588381=_0x5f06a6[_0x24fb9f(0x12b)](_0x326afb);if(_0x588381&&_0x588381[0x1])return _0x588381[0x1];return _0x8abddd;}return null;}catch(_0xa87109){return null;}}export function getLocalPages(_0x2ee1db=pagesDir,_0x103d49=pagesDir){const _0x117be5=a88_0x567e2d;let _0xc1ec03=[];const _0xf8730e=readdirSync(_0x2ee1db);return _0xf8730e['forEach'](_0x3f66eb=>{const _0xdca539=a88_0x2026,_0x31cafc=join(_0x2ee1db,_0x3f66eb),_0x1de35b=statSync(_0x31cafc);if(_0x1de35b&&_0x1de35b[_0xdca539(0x123)]())_0xc1ec03=_0xc1ec03[_0xdca539(0x138)](getLocalPages(_0x31cafc,_0x103d49));else{if(_0x3f66eb[_0xdca539(0x125)]('.tsx')){let _0x573ad3=relative(_0x103d49,_0x31cafc);_0x573ad3[_0xdca539(0x125)](_0xdca539(0x137))?_0x573ad3=_0x573ad3['replace'](/index\.tsx$/,''):_0x573ad3=_0x573ad3[_0xdca539(0x136)](/\.tsx$/,'');_0x573ad3[_0xdca539(0x125)](sep)&&(_0x573ad3=_0x573ad3[_0xdca539(0x12a)](0x0,-0x1));const _0x247579=_0x573ad3[_0xdca539(0x127)](sep)[_0xdca539(0x12d)]('/'),_0x3d0428=extractTitleFromComment(_0x31cafc),_0x2a5003=_0x3d0428||_0x247579;_0xc1ec03[_0xdca539(0x12f)]({'path':_0x247579[_0xdca539(0x128)]('$',':'),'label':_0x2a5003});}}}),_0xc1ec03[_0x117be5(0x132)](_0x63c098=>_0x63c098['path']!=='');}
@@ -1 +1 @@
1
- (function(_0x39c244,_0x2c7885){const _0x158abb=a89_0x9ba0,_0x1f812d=_0x39c244();while(!![]){try{const _0x3371f9=-parseInt(_0x158abb(0xc3))/0x1+-parseInt(_0x158abb(0xc0))/0x2*(parseInt(_0x158abb(0xc5))/0x3)+-parseInt(_0x158abb(0xbc))/0x4*(-parseInt(_0x158abb(0xd7))/0x5)+parseInt(_0x158abb(0xcf))/0x6*(-parseInt(_0x158abb(0xbf))/0x7)+-parseInt(_0x158abb(0xc1))/0x8+parseInt(_0x158abb(0xca))/0x9+parseInt(_0x158abb(0xba))/0xa*(parseInt(_0x158abb(0xd4))/0xb);if(_0x3371f9===_0x2c7885)break;else _0x1f812d['push'](_0x1f812d['shift']());}catch(_0x5e34e8){_0x1f812d['push'](_0x1f812d['shift']());}}}(a89_0x536b,0x346d9));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(_0x4001f6){const _0x1b3d37=a89_0x9ba0,_0x21c464=[];return!isValidJsHttpsUrl(_0x4001f6)&&_0x21c464[_0x1b3d37(0xd8)](_0x1b3d37(0xb8)),{'ok':_0x21c464['length']===0x0,'errors':_0x21c464};}function a89_0x9ba0(_0x4fc695,_0x27c651){_0x4fc695=_0x4fc695-0xb8;const _0x536b07=a89_0x536b();let _0x9ba06d=_0x536b07[_0x4fc695];return _0x9ba06d;}export function validateCssUrl(_0x56171d){const _0x1d7f74=a89_0x9ba0,_0x42f156=[];return!isValidCssHttpsUrl(_0x56171d)&&_0x42f156[_0x1d7f74(0xd8)](_0x1d7f74(0xc6)),{'ok':_0x42f156['length']===0x0,'errors':_0x42f156};}export async function validateJsUrlReachable(_0x226b9d){const _0x38cbba=a89_0x9ba0,_0x254de1=validateJsUrl(_0x226b9d);if(!_0x254de1['ok'])return _0x254de1;const _0x4cb744=await isUrlReachable(_0x226b9d);if(!_0x4cb744)_0x254de1[_0x38cbba(0xd3)]['push'](_0x38cbba(0xc2));return{'ok':_0x254de1[_0x38cbba(0xd3)][_0x38cbba(0xb9)]===0x0,'errors':_0x254de1[_0x38cbba(0xd3)]};}export async function validateCssUrlReachable(_0x49a388){const _0x3d9e60=a89_0x9ba0,_0x18ac57=validateCssUrl(_0x49a388);if(!_0x18ac57['ok'])return _0x18ac57;const _0xd22466=await isUrlReachable(_0x49a388);if(!_0xd22466)_0x18ac57[_0x3d9e60(0xd3)][_0x3d9e60(0xd8)](_0x3d9e60(0xce));return{'ok':_0x18ac57['errors'][_0x3d9e60(0xb9)]===0x0,'errors':_0x18ac57[_0x3d9e60(0xd3)]};}export function buildCompareRows(_0x572ea5,_0x336858){const _0x35c00f=a89_0x9ba0;return _0x572ea5[_0x35c00f(0xd1)](_0x5236ad=>({'label':_0x5236ad[_0x35c00f(0xd5)],'path':_0x5236ad[_0x35c00f(0xbe)],'local':!![],'online':_0x336858[_0x35c00f(0xbb)](_0x5236ad['path'])}));}export function filterNewPages(_0x312cb8,_0x390350,_0x1254d8){const _0x293b81=a89_0x9ba0;if(_0x1254d8&&_0x1254d8['length']>0x0){const _0x66986a=new Set(_0x1254d8[_0x293b81(0xd1)](_0x3b47c5=>_0x3b47c5[_0x293b81(0xc8)]())),_0x5b37e7=_0x312cb8[_0x293b81(0xc7)](_0x51676e=>_0x66986a[_0x293b81(0xbb)](_0x51676e[_0x293b81(0xd5)]));if(_0x5b37e7[_0x293b81(0xb9)]===0x0)throw new Error(_0x293b81(0xcd)+[..._0x66986a][_0x293b81(0xc4)](',\x20'));return _0x5b37e7;}return _0x312cb8[_0x293b81(0xc7)](_0x106eb6=>!_0x390350[_0x293b81(0xbb)](_0x106eb6['path']));}export function filterPagesByLabels(_0xd3871b,_0x2dc500){const _0x141c80=a89_0x9ba0,_0x4e32ef=[],_0x3bffa6=[];for(const _0x431ddc of _0x2dc500){const _0x35f228=_0x431ddc['trim'](),_0x24e09d=_0xd3871b[_0x141c80(0xd2)](_0x3336a6=>_0x3336a6[_0x141c80(0xd5)]===_0x35f228);if(_0x24e09d)_0x4e32ef[_0x141c80(0xd8)](_0x24e09d);else _0x3bffa6[_0x141c80(0xd8)](_0x431ddc);}return{'matched':_0x4e32ef,'unmatched':_0x3bffa6};}export async function doCreateMenus(_0x31985e,_0x1303e4,_0x579de1,_0x598574){const _0x15753c=a89_0x9ba0,_0x138c16=await createMenus(_0x31985e,_0x1303e4,_0x579de1,_0x598574);return{'created':_0x138c16[_0x15753c(0xb9)],'failed':0x0,'labels':_0x579de1[_0x15753c(0xd1)](_0x42638c=>_0x42638c[_0x15753c(0xd5)]),'menus':_0x138c16};}export function filterMenusWithResources(_0x4e8940){const _0x1f9b48=a89_0x9ba0;return _0x4e8940[_0x1f9b48(0xc7)](_0xfb1374=>_0xfb1374[_0x1f9b48(0xc9)][_0x1f9b48(0xb9)]>0x0);}export async function doUpdateCdnUrls(_0x202671,_0x221280,_0x51d5b3,_0x202153){const _0x2ebd98=a89_0x9ba0,_0x4fadf2=_0x51d5b3[_0x2ebd98(0xc7)](_0x4f6804=>_0x4f6804[_0x2ebd98(0xc9)][_0x2ebd98(0xb9)]>0x0),_0x4159a8=await Promise[_0x2ebd98(0xd0)](_0x4fadf2[_0x2ebd98(0xd1)](_0x4be0cb=>updateMenuCdnUrl(_0x202671,_0x221280,{'id':_0x4be0cb['id'],'label':_0x4be0cb['label'],'path':_0x4be0cb[_0x2ebd98(0xbe)],'resources':_0x202153,'extend':_0x4be0cb[_0x2ebd98(0xd6)]??null}))),_0x3b68f8=_0x4159a8['filter'](_0x17352f=>_0x17352f[_0x2ebd98(0xcc)]==='fulfilled')[_0x2ebd98(0xd1)](_0x542da7=>_0x542da7[_0x2ebd98(0xcb)]),_0x82170b=_0x4159a8['filter'](_0x50fb8a=>_0x50fb8a[_0x2ebd98(0xcc)]===_0x2ebd98(0xbd))[_0x2ebd98(0xb9)];return{'updated':_0x3b68f8[_0x2ebd98(0xb9)],'failed':_0x82170b,'menus':_0x3b68f8};}export async function fetchMenuData(_0x1e1d5e,_0x42e943){const _0x490977=a89_0x9ba0,_0x4508e6=getLocalPages(),_0x4b7944=await getOnlineMenuList(_0x1e1d5e,_0x42e943),_0x1beea4=new Set(_0x4b7944[_0x490977(0xd1)](_0x43ec56=>_0x43ec56[_0x490977(0xbe)]));return{'localPages':_0x4508e6,'onlineMenuList':_0x4b7944,'onlinePaths':_0x1beea4};}function a89_0x536b(){const _0xd77846=['value','status','No\x20local\x20pages\x20matched\x20labels:\x20','CSS\x20URL\x20is\x20unreachable','382230YjtXVK','allSettled','map','find','errors','11StpBpH','label','extend','134465rhjJjf','push','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','length','8535350hzEEDu','has','20DdgOuC','rejected','path','7PpKpHA','2ScmHzS','2928840JIJLid','JS\x20URL\x20is\x20unreachable','3458eRGkgp','join','1097178MSkKXE','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','filter','trim','resources','231651LRcWca'];a89_0x536b=function(){return _0xd77846;};return a89_0x536b();}export async function fetchOnlineMenuList(_0x1c4c50,_0x236ceb){return getOnlineMenuList(_0x1c4c50,_0x236ceb);}
1
+ (function(_0x57e093,_0x201575){const _0x597383=a89_0x15dc,_0xb64b9=_0x57e093();while(!![]){try{const _0x4991ef=-parseInt(_0x597383(0xd6))/0x1+-parseInt(_0x597383(0xdb))/0x2*(parseInt(_0x597383(0xd9))/0x3)+-parseInt(_0x597383(0xe1))/0x4+parseInt(_0x597383(0xdc))/0x5+parseInt(_0x597383(0xdf))/0x6+parseInt(_0x597383(0xe3))/0x7*(-parseInt(_0x597383(0xe2))/0x8)+-parseInt(_0x597383(0xdd))/0x9*(-parseInt(_0x597383(0xe5))/0xa);if(_0x4991ef===_0x201575)break;else _0xb64b9['push'](_0xb64b9['shift']());}catch(_0x51a2bb){_0xb64b9['push'](_0xb64b9['shift']());}}}(a89_0x3c39,0x4642d));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a89_0x3c39(){const _0x105bb1=['label','1476976UdrRPv','16prHMdC','876211OECqjS','map','4310LYwWqw','filter','path','value','resources','extend','status','push','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','rejected','has','join','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','No\x20local\x20pages\x20matched\x20labels:\x20','allSettled','find','trim','length','512551tHIzbu','errors','fulfilled','320661eKzpME','JS\x20URL\x20is\x20unreachable','4igAakP','2092545nYyXVh','23733ZoaCFa','CSS\x20URL\x20is\x20unreachable','471888ILIcxU'];a89_0x3c39=function(){return _0x105bb1;};return a89_0x3c39();}import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a89_0x15dc(_0x39e982,_0x2e735a){_0x39e982=_0x39e982-0xd3;const _0x3c39cd=a89_0x3c39();let _0x15dc3d=_0x3c39cd[_0x39e982];return _0x15dc3d;}export function validateJsUrl(_0x590ae4){const _0x2481fd=a89_0x15dc,_0x1d777e=[];return!isValidJsHttpsUrl(_0x590ae4)&&_0x1d777e[_0x2481fd(0xec)](_0x2481fd(0xf1)),{'ok':_0x1d777e[_0x2481fd(0xd5)]===0x0,'errors':_0x1d777e};}export function validateCssUrl(_0x46dc5a){const _0x385c3c=a89_0x15dc,_0x472eb6=[];return!isValidCssHttpsUrl(_0x46dc5a)&&_0x472eb6['push'](_0x385c3c(0xed)),{'ok':_0x472eb6['length']===0x0,'errors':_0x472eb6};}export async function validateJsUrlReachable(_0x41de18){const _0x3f9bfc=a89_0x15dc,_0x49ae1e=validateJsUrl(_0x41de18);if(!_0x49ae1e['ok'])return _0x49ae1e;const _0x41261a=await isUrlReachable(_0x41de18);if(!_0x41261a)_0x49ae1e['errors']['push'](_0x3f9bfc(0xda));return{'ok':_0x49ae1e['errors'][_0x3f9bfc(0xd5)]===0x0,'errors':_0x49ae1e[_0x3f9bfc(0xd7)]};}export async function validateCssUrlReachable(_0x3bd263){const _0x30f25d=a89_0x15dc,_0x2da2fd=validateCssUrl(_0x3bd263);if(!_0x2da2fd['ok'])return _0x2da2fd;const _0x5148ea=await isUrlReachable(_0x3bd263);if(!_0x5148ea)_0x2da2fd[_0x30f25d(0xd7)][_0x30f25d(0xec)](_0x30f25d(0xde));return{'ok':_0x2da2fd[_0x30f25d(0xd7)][_0x30f25d(0xd5)]===0x0,'errors':_0x2da2fd[_0x30f25d(0xd7)]};}export function buildCompareRows(_0x40df2b,_0x491260){const _0x31d26b=a89_0x15dc;return _0x40df2b[_0x31d26b(0xe4)](_0x16f9ea=>({'label':_0x16f9ea[_0x31d26b(0xe0)],'path':_0x16f9ea[_0x31d26b(0xe7)],'local':!![],'online':_0x491260['has'](_0x16f9ea[_0x31d26b(0xe7)])}));}export function filterNewPages(_0x579412,_0x4972a0,_0x2bb3e3){const _0x329d00=a89_0x15dc;if(_0x2bb3e3&&_0x2bb3e3[_0x329d00(0xd5)]>0x0){const _0x2da682=new Set(_0x2bb3e3[_0x329d00(0xe4)](_0x16be8f=>_0x16be8f[_0x329d00(0xd4)]())),_0x382cfd=_0x579412[_0x329d00(0xe6)](_0x5b3706=>_0x2da682[_0x329d00(0xef)](_0x5b3706['label']));if(_0x382cfd[_0x329d00(0xd5)]===0x0)throw new Error(_0x329d00(0xf2)+[..._0x2da682][_0x329d00(0xf0)](',\x20'));return _0x382cfd;}return _0x579412[_0x329d00(0xe6)](_0x6eeec5=>!_0x4972a0[_0x329d00(0xef)](_0x6eeec5[_0x329d00(0xe7)]));}export function filterPagesByLabels(_0x272217,_0x477b32){const _0x3362f5=a89_0x15dc,_0x3e90e8=[],_0x42c8fb=[];for(const _0x134701 of _0x477b32){const _0x1e75d0=_0x134701['trim'](),_0x5c14c1=_0x272217[_0x3362f5(0xd3)](_0x5f4d3d=>_0x5f4d3d[_0x3362f5(0xe0)]===_0x1e75d0);if(_0x5c14c1)_0x3e90e8[_0x3362f5(0xec)](_0x5c14c1);else _0x42c8fb['push'](_0x134701);}return{'matched':_0x3e90e8,'unmatched':_0x42c8fb};}export async function doCreateMenus(_0x5e2ca1,_0x3c61e0,_0x3b2705,_0x11d79b){const _0x55defb=a89_0x15dc,_0x4ec6e4=await createMenus(_0x5e2ca1,_0x3c61e0,_0x3b2705,_0x11d79b);return{'created':_0x4ec6e4['length'],'failed':0x0,'labels':_0x3b2705[_0x55defb(0xe4)](_0x15cef0=>_0x15cef0['label']),'menus':_0x4ec6e4};}export function filterMenusWithResources(_0x4b6eab){const _0x485623=a89_0x15dc;return _0x4b6eab[_0x485623(0xe6)](_0x5d56ca=>_0x5d56ca['resources'][_0x485623(0xd5)]>0x0);}export async function doUpdateCdnUrls(_0x31ca0a,_0x75cace,_0x524fc1,_0x168ac4){const _0x2abfcd=a89_0x15dc,_0x3fb6a7=_0x524fc1['filter'](_0x28b805=>_0x28b805[_0x2abfcd(0xe9)]['length']>0x0),_0x487bb3=await Promise[_0x2abfcd(0xf3)](_0x3fb6a7[_0x2abfcd(0xe4)](_0x235c84=>updateMenuCdnUrl(_0x31ca0a,_0x75cace,{'id':_0x235c84['id'],'label':_0x235c84[_0x2abfcd(0xe0)],'path':_0x235c84['path'],'resources':_0x168ac4,'extend':_0x235c84[_0x2abfcd(0xea)]??null}))),_0x5bc300=_0x487bb3[_0x2abfcd(0xe6)](_0xc8613=>_0xc8613[_0x2abfcd(0xeb)]===_0x2abfcd(0xd8))[_0x2abfcd(0xe4)](_0x2635f0=>_0x2635f0[_0x2abfcd(0xe8)]),_0x13231e=_0x487bb3[_0x2abfcd(0xe6)](_0x2b8fa4=>_0x2b8fa4['status']===_0x2abfcd(0xee))[_0x2abfcd(0xd5)];return{'updated':_0x5bc300[_0x2abfcd(0xd5)],'failed':_0x13231e,'menus':_0x5bc300};}export async function fetchMenuData(_0x26e34a,_0x1958f1){const _0x594895=getLocalPages(),_0x23ad2c=await getOnlineMenuList(_0x26e34a,_0x1958f1),_0x9629f7=new Set(_0x23ad2c['map'](_0x1a11fa=>_0x1a11fa['path']));return{'localPages':_0x594895,'onlineMenuList':_0x23ad2c,'onlinePaths':_0x9629f7};}export async function fetchOnlineMenuList(_0x3d94db,_0x3f828e){return getOnlineMenuList(_0x3d94db,_0x3f828e);}
@@ -1 +1 @@
1
- (function(_0x100570,_0x2ced67){const _0x3d8295=a90_0x3ad3,_0x37bb2c=_0x100570();while(!![]){try{const _0x5b8927=-parseInt(_0x3d8295(0x1ae))/0x1*(parseInt(_0x3d8295(0x1b9))/0x2)+-parseInt(_0x3d8295(0x1b3))/0x3*(parseInt(_0x3d8295(0x1c0))/0x4)+-parseInt(_0x3d8295(0x196))/0x5+parseInt(_0x3d8295(0x1b7))/0x6+parseInt(_0x3d8295(0x1a2))/0x7*(-parseInt(_0x3d8295(0x1a1))/0x8)+parseInt(_0x3d8295(0x1b8))/0x9*(-parseInt(_0x3d8295(0x1aa))/0xa)+parseInt(_0x3d8295(0x19e))/0xb;if(_0x5b8927===_0x2ced67)break;else _0x37bb2c['push'](_0x37bb2c['shift']());}catch(_0x26a359){_0x37bb2c['push'](_0x37bb2c['shift']());}}}(a90_0x2307,0x71d2c));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';function a90_0x3ad3(_0x26f670,_0xed4de2){_0x26f670=_0x26f670-0x196;const _0x230769=a90_0x2307();let _0x3ad38e=_0x230769[_0x26f670];return _0x3ad38e;}export async function getOnlineMenuList(_0xb99e37,_0x20f33d){const _0x350c21=a90_0x3ad3,_0x5e3dbf=getEnv();logger['info'](_0x350c21(0x1a3),isProduction(_0x5e3dbf)?_0x350c21(0x1b1)+_0xb99e37+')':_0x350c21(0x199)+_0xb99e37+')');const _0x3dd6fd=await platformFetch(getApiDomain()+_0x350c21(0x19a)+_0xb99e37,{'cookie':_0x20f33d,'label':'Fetch\x20menu\x20list'});if(!_0x3dd6fd)return logger[_0x350c21(0x1bf)](_0x350c21(0x1a3),_0x350c21(0x1b0)),[];return logger[_0x350c21(0x1bf)](_0x350c21(0x1a3),_0x350c21(0x19b)+_0x3dd6fd['length']+_0x350c21(0x197)),_0x3dd6fd['map'](flattenMenuItem)[_0x350c21(0x1bd)]();}function flattenMenuItem(_0x21e921){const _0x5e493e=a90_0x3ad3;let _0x485962=[];try{const _0x5eae0f=_0x21e921[_0x5e493e(0x1a0)]?.['resources'];if(typeof _0x5eae0f==='string'){const _0x3f7505=JSON[_0x5e493e(0x1a6)](_0x5eae0f);if(Array['isArray'](_0x3f7505))_0x485962=_0x3f7505[_0x5e493e(0x1c1)](String);}else Array[_0x5e493e(0x1a7)](_0x5eae0f)&&(_0x485962=_0x5eae0f[_0x5e493e(0x1c1)](String));}catch{}const _0x4faaf6=[{'id':_0x21e921['id'],'path':_0x21e921['path'],'label':_0x21e921[_0x5e493e(0x1ac)],'resources':_0x485962,'extend':_0x21e921[_0x5e493e(0x1a0)]??null}];if(_0x21e921[_0x5e493e(0x1ba)]&&_0x21e921[_0x5e493e(0x1ba)]['length']>0x0)for(const _0x5d81d2 of _0x21e921['children']){_0x4faaf6['push'](...flattenMenuItem(_0x5d81d2));}return _0x4faaf6;}export async function createMenu(_0x1fd512,_0x5d7158,_0x22defc){const _0x4951fb=a90_0x3ad3;logger[_0x4951fb(0x1bf)](_0x4951fb(0x1b2),'Creating\x20menu:\x20'+_0x22defc[_0x4951fb(0x1ac)]+'\x20('+_0x22defc[_0x4951fb(0x1a4)]+')');const _0x399bfe={'appCode':_0x1fd512,'type':_0x4951fb(0x1bc),'sort':0x0,'extend':{'loadScriptMode':_0x4951fb(0x19c),'resources':_0x22defc[_0x4951fb(0x1b6)]?JSON[_0x4951fb(0x1b4)](_0x22defc[_0x4951fb(0x1b6)]):undefined},..._0x22defc},_0x41cf08=await platformFetch(getApiDomain()+_0x4951fb(0x1a8),{'method':_0x4951fb(0x1be),'body':_0x399bfe,'cookie':_0x5d7158,'label':_0x4951fb(0x1ad)+_0x22defc[_0x4951fb(0x1ac)]+'\x22'});return logger[_0x4951fb(0x1bf)](_0x4951fb(0x1b2),_0x4951fb(0x1a9)+_0x22defc[_0x4951fb(0x1ac)]),_0x41cf08;}async function createSingleMenu(_0x26b678,_0x46b4d6,_0x1d48ce,_0x594b91){const _0x14a98d=a90_0x3ad3,_0x124b3b={'appCode':_0x26b678,'type':_0x14a98d(0x1bc),'sort':0x0,'extend':{'loadScriptMode':_0x14a98d(0x19c),'resources':_0x594b91?JSON[_0x14a98d(0x1b4)](_0x594b91):undefined},'label':_0x1d48ce[_0x14a98d(0x1ac)],'path':_0x1d48ce[_0x14a98d(0x1a4)]},_0x3cea6e=await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':'POST','body':_0x124b3b,'cookie':_0x46b4d6,'label':_0x14a98d(0x1ad)+_0x1d48ce[_0x14a98d(0x1ac)]+'\x22'});return logger['info']('create-menu',_0x14a98d(0x1a9)+_0x1d48ce[_0x14a98d(0x1ac)]),_0x3cea6e;}function a90_0x2307(){const _0x2f80c8=['\x20online\x20menus\x20successfully','update-menu-cdn-url','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','/smartapi/menu/find?appCode=','Fetched\x20','import','create-menus','31556855zgaNlh','Start\x20batch\x20menu\x20creation,\x20total\x20','extend','1075648QqSIzO','35EQtyNK','get-online-menu-list','path','Update\x20menu\x20assets\x20\x22','parse','isArray','/smartapi/menu/create','Menu\x20created\x20successfully:\x20','5886130fYcAYW','Batch\x20menu\x20creation\x20completed,\x20total\x20','label','Create\x20menu\x20\x22','4353RXmxlm','length','Server\x20returned\x20empty\x20menu\x20list','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','create-menu','261jIKfgQ','stringify','/smartapi/menu/update','resources','3216612NxNuza','9FYxjjF','108XqlpAf','children','all','procode','flat','POST','info','25352JyibAu','map','4456630ijsvmi'];a90_0x2307=function(){return _0x2f80c8;};return a90_0x2307();}export async function createMenus(_0x3880be,_0x4d082b,_0x334ae5,_0x598cc8){const _0x32631e=a90_0x3ad3;logger[_0x32631e(0x1bf)](_0x32631e(0x19d),_0x32631e(0x19f)+_0x334ae5[_0x32631e(0x1af)]);const _0x263f5b=await Promise[_0x32631e(0x1bb)](_0x334ae5['map'](_0x239555=>createSingleMenu(_0x3880be,_0x4d082b,_0x239555,_0x598cc8)));return logger['info'](_0x32631e(0x19d),_0x32631e(0x1ab)+_0x334ae5['length']),_0x263f5b;}export async function updateMenuCdnUrl(_0x261708,_0x5ddb39,_0x219044){const _0x154f51=a90_0x3ad3;logger['info'](_0x154f51(0x198),'Updating\x20menu\x20asset\x20links:\x20'+_0x219044[_0x154f51(0x1ac)]+'\x20('+_0x219044[_0x154f51(0x1a4)]+')');const _0x412f51={'id':_0x219044['id'],'appCode':_0x261708,'extend':{..._0x219044[_0x154f51(0x1a0)]??{},'loadScriptMode':_0x154f51(0x19c),'resources':_0x219044[_0x154f51(0x1b6)]?JSON[_0x154f51(0x1b4)](_0x219044[_0x154f51(0x1b6)]):undefined}},_0x592428=await platformFetch(getApiDomain()+_0x154f51(0x1b5),{'method':_0x154f51(0x1be),'body':_0x412f51,'cookie':_0x5ddb39,'label':_0x154f51(0x1a5)+_0x219044[_0x154f51(0x1ac)]+'\x22'});return logger[_0x154f51(0x1bf)]('update-menu-cdn-url','Menu\x20assets\x20synced:\x20'+_0x219044[_0x154f51(0x1ac)],undefined),_0x592428;}
1
+ (function(_0x684e05,_0x2acb05){const _0x1d319f=a90_0x545e,_0x1cab0f=_0x684e05();while(!![]){try{const _0x47ecc8=-parseInt(_0x1d319f(0x194))/0x1*(parseInt(_0x1d319f(0x1b4))/0x2)+-parseInt(_0x1d319f(0x18e))/0x3*(-parseInt(_0x1d319f(0x1a2))/0x4)+parseInt(_0x1d319f(0x19b))/0x5*(parseInt(_0x1d319f(0x191))/0x6)+parseInt(_0x1d319f(0x1ac))/0x7+-parseInt(_0x1d319f(0x196))/0x8+-parseInt(_0x1d319f(0x1aa))/0x9+parseInt(_0x1d319f(0x18d))/0xa*(parseInt(_0x1d319f(0x1b1))/0xb);if(_0x47ecc8===_0x2acb05)break;else _0x1cab0f['push'](_0x1cab0f['shift']());}catch(_0x597016){_0x1cab0f['push'](_0x1cab0f['shift']());}}}(a90_0xa830,0x42daf));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(_0x9bba2b,_0x52d71f){const _0x1ffe82=a90_0x545e,_0x9bfbf6=getEnv();logger['info'](_0x1ffe82(0x1ad),isProduction(_0x9bfbf6)?_0x1ffe82(0x19e)+_0x9bba2b+')':_0x1ffe82(0x195)+_0x9bba2b+')');const _0x1bb880=await platformFetch(getApiDomain()+_0x1ffe82(0x1a3)+_0x9bba2b,{'cookie':_0x52d71f,'label':_0x1ffe82(0x19f)});if(!_0x1bb880)return logger[_0x1ffe82(0x197)](_0x1ffe82(0x1ad),_0x1ffe82(0x192)),[];return logger[_0x1ffe82(0x197)](_0x1ffe82(0x1ad),'Fetched\x20'+_0x1bb880[_0x1ffe82(0x199)]+_0x1ffe82(0x193)),_0x1bb880[_0x1ffe82(0x19c)](flattenMenuItem)[_0x1ffe82(0x18c)]();}function flattenMenuItem(_0x545430){const _0x3ceb8a=a90_0x545e;let _0x3082da=[];try{const _0x93366f=_0x545430[_0x3ceb8a(0x18a)]?.[_0x3ceb8a(0x1a1)];if(typeof _0x93366f==='string'){const _0x20d80d=JSON[_0x3ceb8a(0x1ae)](_0x93366f);if(Array[_0x3ceb8a(0x1b0)](_0x20d80d))_0x3082da=_0x20d80d['map'](String);}else Array[_0x3ceb8a(0x1b0)](_0x93366f)&&(_0x3082da=_0x93366f[_0x3ceb8a(0x19c)](String));}catch{}const _0x3b549e=[{'id':_0x545430['id'],'path':_0x545430[_0x3ceb8a(0x1a8)],'label':_0x545430['label'],'resources':_0x3082da,'extend':_0x545430[_0x3ceb8a(0x18a)]??null}];if(_0x545430['children']&&_0x545430[_0x3ceb8a(0x1a7)][_0x3ceb8a(0x199)]>0x0)for(const _0x4fab05 of _0x545430[_0x3ceb8a(0x1a7)]){_0x3b549e['push'](...flattenMenuItem(_0x4fab05));}return _0x3b549e;}export async function createMenu(_0x375627,_0xb4681e,_0xd88f3){const _0x53f8c7=a90_0x545e;logger[_0x53f8c7(0x197)](_0x53f8c7(0x1a6),_0x53f8c7(0x18f)+_0xd88f3[_0x53f8c7(0x198)]+'\x20('+_0xd88f3['path']+')');const _0x26eaf2={'appCode':_0x375627,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x53f8c7(0x190),'resources':_0xd88f3['resources']?JSON[_0x53f8c7(0x1af)](_0xd88f3['resources']):undefined},..._0xd88f3},_0x1cb0aa=await platformFetch(getApiDomain()+_0x53f8c7(0x18b),{'method':_0x53f8c7(0x19a),'body':_0x26eaf2,'cookie':_0xb4681e,'label':_0x53f8c7(0x19d)+_0xd88f3[_0x53f8c7(0x198)]+'\x22'});return logger[_0x53f8c7(0x197)](_0x53f8c7(0x1a6),_0x53f8c7(0x1ab)+_0xd88f3[_0x53f8c7(0x198)]),_0x1cb0aa;}function a90_0xa830(){const _0x1813cf=['55CMfmTh','/smartapi/menu/update','create-menus','4hyOdum','all','extend','/smartapi/menu/create','flat','66210sLhEpX','57WtJyLy','Creating\x20menu:\x20','import','578334GhXuHM','Server\x20returned\x20empty\x20menu\x20list','\x20online\x20menus\x20successfully','6016mgMzmZ','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','2298616lbUNqx','info','label','length','POST','10LToboo','map','Create\x20menu\x20\x22','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Fetch\x20menu\x20list','update-menu-cdn-url','resources','98632kuONez','/smartapi/menu/find?appCode=','procode','Menu\x20assets\x20synced:\x20','create-menu','children','path','Update\x20menu\x20assets\x20\x22','2085165IORUAP','Menu\x20created\x20successfully:\x20','773486QItTdJ','get-online-menu-list','parse','stringify','isArray'];a90_0xa830=function(){return _0x1813cf;};return a90_0xa830();}async function createSingleMenu(_0x3cdeef,_0x2655a7,_0x2af317,_0x4452fe){const _0x11bce7=a90_0x545e,_0x39b7c5={'appCode':_0x3cdeef,'type':_0x11bce7(0x1a4),'sort':0x0,'extend':{'loadScriptMode':_0x11bce7(0x190),'resources':_0x4452fe?JSON[_0x11bce7(0x1af)](_0x4452fe):undefined},'label':_0x2af317[_0x11bce7(0x198)],'path':_0x2af317[_0x11bce7(0x1a8)]},_0x5d5835=await platformFetch(getApiDomain()+_0x11bce7(0x18b),{'method':_0x11bce7(0x19a),'body':_0x39b7c5,'cookie':_0x2655a7,'label':_0x11bce7(0x19d)+_0x2af317[_0x11bce7(0x198)]+'\x22'});return logger[_0x11bce7(0x197)](_0x11bce7(0x1a6),_0x11bce7(0x1ab)+_0x2af317[_0x11bce7(0x198)]),_0x5d5835;}function a90_0x545e(_0x54fcb1,_0x56ee71){_0x54fcb1=_0x54fcb1-0x18a;const _0xa830ca=a90_0xa830();let _0x545eee=_0xa830ca[_0x54fcb1];return _0x545eee;}export async function createMenus(_0x277733,_0x155497,_0x4ec602,_0x37cd60){const _0x24eb91=a90_0x545e;logger[_0x24eb91(0x197)](_0x24eb91(0x1b3),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x4ec602['length']);const _0xc58d0d=await Promise[_0x24eb91(0x1b5)](_0x4ec602['map'](_0x543f86=>createSingleMenu(_0x277733,_0x155497,_0x543f86,_0x37cd60)));return logger[_0x24eb91(0x197)](_0x24eb91(0x1b3),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x4ec602[_0x24eb91(0x199)]),_0xc58d0d;}export async function updateMenuCdnUrl(_0x256ad5,_0x3bb55f,_0x285bf0){const _0x2062a3=a90_0x545e;logger[_0x2062a3(0x197)](_0x2062a3(0x1a0),'Updating\x20menu\x20asset\x20links:\x20'+_0x285bf0[_0x2062a3(0x198)]+'\x20('+_0x285bf0[_0x2062a3(0x1a8)]+')');const _0x33c2a1={'id':_0x285bf0['id'],'appCode':_0x256ad5,'extend':{..._0x285bf0[_0x2062a3(0x18a)]??{},'loadScriptMode':'import','resources':_0x285bf0[_0x2062a3(0x1a1)]?JSON[_0x2062a3(0x1af)](_0x285bf0[_0x2062a3(0x1a1)]):undefined}},_0x22b475=await platformFetch(getApiDomain()+_0x2062a3(0x1b2),{'method':'POST','body':_0x33c2a1,'cookie':_0x3bb55f,'label':_0x2062a3(0x1a9)+_0x285bf0['label']+'\x22'});return logger[_0x2062a3(0x197)](_0x2062a3(0x1a0),_0x2062a3(0x1a5)+_0x285bf0[_0x2062a3(0x198)],undefined),_0x22b475;}
@@ -1 +1 @@
1
- (function(_0x36dcfc,_0x1cb03e){const _0x4564c9=a91_0x5a3e,_0xdf8608=_0x36dcfc();while(!![]){try{const _0x84131=-parseInt(_0x4564c9(0x15b))/0x1*(-parseInt(_0x4564c9(0x157))/0x2)+parseInt(_0x4564c9(0x162))/0x3+parseInt(_0x4564c9(0x151))/0x4*(-parseInt(_0x4564c9(0x150))/0x5)+parseInt(_0x4564c9(0x15d))/0x6*(parseInt(_0x4564c9(0x135))/0x7)+parseInt(_0x4564c9(0x145))/0x8+-parseInt(_0x4564c9(0x144))/0x9+-parseInt(_0x4564c9(0x146))/0xa*(parseInt(_0x4564c9(0x13a))/0xb);if(_0x84131===_0x1cb03e)break;else _0xdf8608['push'](_0xdf8608['shift']());}catch(_0x4aa683){_0xdf8608['push'](_0xdf8608['shift']());}}}(a91_0x49f9,0xaf229));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_0x5a3e(_0x5cb4cf,_0x459bd7){_0x5cb4cf=_0x5cb4cf-0x135;const _0x49f95d=a91_0x49f9();let _0x5a3e33=_0x49f95d[_0x5cb4cf];return _0x5a3e33;}import{logger}from'../../../utils/logger.js';function validateParams(_0x37e0dc){const _0x12dc02=a91_0x5a3e,_0x17ab8c=[];return _0x37e0dc[_0x12dc02(0x13b)]&&!isValidJsHttpsUrl(_0x37e0dc[_0x12dc02(0x13b)])&&_0x17ab8c[_0x12dc02(0x14c)]({'field':_0x12dc02(0x13b),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x37e0dc[_0x12dc02(0x138)]&&!isValidCssHttpsUrl(_0x37e0dc[_0x12dc02(0x138)])&&_0x17ab8c[_0x12dc02(0x14c)]({'field':_0x12dc02(0x138),'message':_0x12dc02(0x14f)}),_0x17ab8c;}function a91_0x49f9(){const _0x3ca0b6=['string','\x0a\x20\x20Available\x20local\x20pages:\x20','filter','JS\x20URL\x20is\x20unreachable:\x20','push','startsWith','end','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','25OmCKpk','287788etfZqt','Invalid\x20--params:\x20','selectedLabels','has','--params.','readableEnded','1566614pXHdWI','utf8','cwd','toString','1xlTpoA','map','84yRwDcH','pages','data','info','label','3675231edgUqK','isArray','trim','477008cswepl','stdin','join','cssUrl','length','11ubJOgv','jsUrl','Start\x20non-interactive\x20menu\x20sync','split','Menu\x20sync\x20completed','path','No\x20local\x20pages\x20matched\x20labels:\x20','concat','CSS\x20URL\x20is\x20unreachable:\x20','setLogPath','8172405bahynV','6099760FsqcWr','17397370OOxXVb','message'];a91_0x49f9=function(){return _0x3ca0b6;};return a91_0x49f9();}export async function runMenuSyncCore(_0x23e785,_0x5c9ea3,_0x3b057d=[],_0x433a45){const _0x125609=a91_0x5a3e,_0x2be213=parseParamsFlag(_0x433a45),_0x153225=_0x3b057d[_0x125609(0x139)]>0x0?_0x3b057d:_0x2be213[_0x125609(0x153)],_0x3f4199=_0x2be213['jsUrl'],_0xb488b7=_0x2be213['cssUrl'],_0x4d79cd=[];if(_0x3f4199)_0x4d79cd[_0x125609(0x14c)](_0x3f4199);if(_0xb488b7)_0x4d79cd[_0x125609(0x14c)](_0xb488b7);const _0x290c7d=validateParams(_0x2be213);if(_0x290c7d[_0x125609(0x139)]>0x0){const _0x39bf41=_0x290c7d[_0x125609(0x15c)](_0x59d62f=>_0x125609(0x155)+_0x59d62f['field']+':\x20'+_0x59d62f[_0x125609(0x147)])[_0x125609(0x137)](';\x20');throw new Error(_0x125609(0x152)+_0x39bf41);}logger[_0x125609(0x143)](process[_0x125609(0x159)]()),logger[_0x125609(0x160)]('menu-sync',_0x125609(0x13c),{'appCode':_0x23e785,'selectedCount':_0x153225?.[_0x125609(0x139)],'jsUrl':_0x3f4199,'cssUrl':_0xb488b7});if(_0x3f4199){const _0x23d561=await isUrlReachable(_0x3f4199);if(!_0x23d561)throw new Error(_0x125609(0x14b)+_0x3f4199);}if(_0xb488b7){const _0x2ac7cd=await isUrlReachable(_0xb488b7);if(!_0x2ac7cd)throw new Error(_0x125609(0x142)+_0xb488b7);}const _0x58d4ce=getLocalPages();if(_0x58d4ce['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x2b636d=await getOnlineMenuList(_0x23e785,_0x5c9ea3),_0x53bbc8=new Set(_0x2b636d[_0x125609(0x15c)](_0x2253d1=>_0x2253d1[_0x125609(0x13f)]));let _0x1f163a;if(_0x153225&&_0x153225['length']>0x0){const _0x5c5b29=new Set(_0x153225[_0x125609(0x15c)](_0x486251=>_0x486251[_0x125609(0x164)]()));_0x1f163a=_0x58d4ce[_0x125609(0x14a)](_0x171dd1=>_0x5c5b29[_0x125609(0x154)](_0x171dd1[_0x125609(0x161)]));if(_0x1f163a[_0x125609(0x139)]===0x0){const _0x1ac54d=_0x58d4ce['map'](_0x308ebc=>_0x308ebc[_0x125609(0x161)])[_0x125609(0x137)](',\x20');throw new Error(_0x125609(0x140)+[..._0x5c5b29][_0x125609(0x137)](',\x20')+_0x125609(0x149)+_0x1ac54d);}}else _0x1f163a=_0x58d4ce[_0x125609(0x14a)](_0x2cf6a5=>!_0x53bbc8['has'](_0x2cf6a5['path']));if(_0x1f163a[_0x125609(0x139)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x1ff712=await createMenus(_0x23e785,_0x5c9ea3,_0x1f163a,_0x4d79cd[_0x125609(0x139)]>0x0?_0x4d79cd:undefined);return logger[_0x125609(0x160)]('menu-sync',_0x125609(0x13e),{'count':_0x1f163a[_0x125609(0x139)],'resources':_0x4d79cd}),{'created':_0x1ff712[_0x125609(0x139)],'skipped':![],'targetPages':_0x1f163a,'menus':_0x1ff712};}export async function readPageLabelsFromStdin(){const _0x21e966=a91_0x5a3e;if(!process[_0x21e966(0x136)]['isTTY']&&!process[_0x21e966(0x136)][_0x21e966(0x156)])return new Promise(_0xeb05b5=>{const _0x22ec09=_0x21e966,_0x478726=[];process[_0x22ec09(0x136)]['on'](_0x22ec09(0x15f),_0x462272=>_0x478726['push'](_0x462272)),process['stdin']['on'](_0x22ec09(0x14e),()=>{const _0x990f0e=_0x22ec09,_0xaa853=Buffer[_0x990f0e(0x141)](_0x478726)[_0x990f0e(0x15a)](_0x990f0e(0x158)),_0x198ff8=_0xaa853[_0x990f0e(0x13d)]('\x0a')['map'](_0x25f651=>_0x25f651[_0x990f0e(0x164)]())[_0x990f0e(0x14a)](_0x337c99=>_0x337c99['length']>0x0&&!_0x337c99[_0x990f0e(0x14d)]('#'));_0xeb05b5(_0x198ff8);}),setTimeout(()=>_0xeb05b5([]),0x1f4);});return[];}function parseParamsFlag(_0x19614c){const _0x23b386=a91_0x5a3e;if(!_0x19614c||typeof _0x19614c!==_0x23b386(0x148))return{};try{const _0xfee0f4=JSON['parse'](_0x19614c);if(typeof _0xfee0f4!=='object'||_0xfee0f4===null||Array[_0x23b386(0x163)](_0xfee0f4))return{};return{'selectedLabels':Array[_0x23b386(0x163)](_0xfee0f4[_0x23b386(0x15e)])?_0xfee0f4[_0x23b386(0x15e)][_0x23b386(0x15c)](String):undefined,'jsUrl':typeof _0xfee0f4[_0x23b386(0x13b)]==='string'?_0xfee0f4['jsUrl']['trim']():undefined,'cssUrl':typeof _0xfee0f4[_0x23b386(0x138)]===_0x23b386(0x148)?_0xfee0f4['cssUrl']['trim']():undefined};}catch{return{};}}
1
+ (function(_0x42585e,_0x3f3d19){const _0x37910=a91_0x1931,_0x195e4c=_0x42585e();while(!![]){try{const _0x5b37f1=-parseInt(_0x37910(0x182))/0x1+-parseInt(_0x37910(0x1a0))/0x2+parseInt(_0x37910(0x18c))/0x3*(-parseInt(_0x37910(0x1a9))/0x4)+-parseInt(_0x37910(0x1a4))/0x5+parseInt(_0x37910(0x1a2))/0x6+-parseInt(_0x37910(0x19b))/0x7+parseInt(_0x37910(0x1a3))/0x8*(parseInt(_0x37910(0x18f))/0x9);if(_0x5b37f1===_0x3f3d19)break;else _0x195e4c['push'](_0x195e4c['shift']());}catch(_0x1b6bc9){_0x195e4c['push'](_0x195e4c['shift']());}}}(a91_0x1b54,0x9e86e));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x180bdb){const _0x3805c4=a91_0x1931,_0x5e4961=[];return _0x180bdb[_0x3805c4(0x19a)]&&!isValidJsHttpsUrl(_0x180bdb[_0x3805c4(0x19a)])&&_0x5e4961['push']({'field':_0x3805c4(0x19a),'message':_0x3805c4(0x19c)}),_0x180bdb[_0x3805c4(0x189)]&&!isValidCssHttpsUrl(_0x180bdb[_0x3805c4(0x189)])&&_0x5e4961[_0x3805c4(0x18e)]({'field':'cssUrl','message':_0x3805c4(0x19e)}),_0x5e4961;}export async function runMenuSyncCore(_0x576b9b,_0x586168,_0x38123d=[],_0x374dc9){const _0x47c22e=a91_0x1931,_0xb7410d=parseParamsFlag(_0x374dc9),_0x2c52b2=_0x38123d[_0x47c22e(0x1aa)]>0x0?_0x38123d:_0xb7410d[_0x47c22e(0x1ae)],_0x774936=_0xb7410d['jsUrl'],_0x52b83e=_0xb7410d['cssUrl'],_0x30062f=[];if(_0x774936)_0x30062f[_0x47c22e(0x18e)](_0x774936);if(_0x52b83e)_0x30062f[_0x47c22e(0x18e)](_0x52b83e);const _0x3f463d=validateParams(_0xb7410d);if(_0x3f463d['length']>0x0){const _0x57fe51=_0x3f463d[_0x47c22e(0x181)](_0x4fc05e=>_0x47c22e(0x188)+_0x4fc05e['field']+':\x20'+_0x4fc05e[_0x47c22e(0x1a1)])[_0x47c22e(0x183)](';\x20');throw new Error(_0x47c22e(0x18d)+_0x57fe51);}logger[_0x47c22e(0x19d)](process[_0x47c22e(0x195)]()),logger[_0x47c22e(0x18a)](_0x47c22e(0x193),_0x47c22e(0x1a5),{'appCode':_0x576b9b,'selectedCount':_0x2c52b2?.[_0x47c22e(0x1aa)],'jsUrl':_0x774936,'cssUrl':_0x52b83e});if(_0x774936){const _0x4b86f1=await isUrlReachable(_0x774936);if(!_0x4b86f1)throw new Error(_0x47c22e(0x196)+_0x774936);}if(_0x52b83e){const _0xb2ac10=await isUrlReachable(_0x52b83e);if(!_0xb2ac10)throw new Error(_0x47c22e(0x197)+_0x52b83e);}const _0x27edc6=getLocalPages();if(_0x27edc6['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x1ab0ce=await getOnlineMenuList(_0x576b9b,_0x586168),_0x359c79=new Set(_0x1ab0ce[_0x47c22e(0x181)](_0x249181=>_0x249181[_0x47c22e(0x1a8)]));let _0x2dd418;if(_0x2c52b2&&_0x2c52b2['length']>0x0){const _0x55f930=new Set(_0x2c52b2[_0x47c22e(0x181)](_0x2cb7b1=>_0x2cb7b1[_0x47c22e(0x190)]()));_0x2dd418=_0x27edc6[_0x47c22e(0x194)](_0x5668c6=>_0x55f930[_0x47c22e(0x19f)](_0x5668c6[_0x47c22e(0x1ab)]));if(_0x2dd418['length']===0x0){const _0x28596d=_0x27edc6[_0x47c22e(0x181)](_0x47261a=>_0x47261a[_0x47c22e(0x1ab)])[_0x47c22e(0x183)](',\x20');throw new Error(_0x47c22e(0x199)+[..._0x55f930][_0x47c22e(0x183)](',\x20')+_0x47c22e(0x1a6)+_0x28596d);}}else _0x2dd418=_0x27edc6[_0x47c22e(0x194)](_0x262655=>!_0x359c79[_0x47c22e(0x19f)](_0x262655['path']));if(_0x2dd418['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x18577a=await createMenus(_0x576b9b,_0x586168,_0x2dd418,_0x30062f[_0x47c22e(0x1aa)]>0x0?_0x30062f:undefined);return logger['info'](_0x47c22e(0x193),_0x47c22e(0x186),{'count':_0x2dd418[_0x47c22e(0x1aa)],'resources':_0x30062f}),{'created':_0x18577a['length'],'skipped':![],'targetPages':_0x2dd418,'menus':_0x18577a};}function a91_0x1b54(){const _0x1de6b0=['stdin','selectedLabels','startsWith','map','1113738fofQAV','join','string','isTTY','Menu\x20sync\x20completed','pages','--params.','cssUrl','info','data','173577QXcRmp','Invalid\x20--params:\x20','push','1107DMcbQZ','trim','parse','split','menu-sync','filter','cwd','JS\x20URL\x20is\x20unreachable:\x20','CSS\x20URL\x20is\x20unreachable:\x20','concat','No\x20local\x20pages\x20matched\x20labels:\x20','jsUrl','264026uUtsAg','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','setLogPath','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','has','1847108hobTLz','message','275166weWSXV','299704DQmkmI','5307945FQfaTV','Start\x20non-interactive\x20menu\x20sync','\x0a\x20\x20Available\x20local\x20pages:\x20','isArray','path','60ablpFb','length','label','readableEnded'];a91_0x1b54=function(){return _0x1de6b0;};return a91_0x1b54();}function a91_0x1931(_0x52c399,_0x5e1133){_0x52c399=_0x52c399-0x181;const _0x1b54e4=a91_0x1b54();let _0x1931e5=_0x1b54e4[_0x52c399];return _0x1931e5;}export async function readPageLabelsFromStdin(){const _0x4cb502=a91_0x1931;if(!process[_0x4cb502(0x1ad)][_0x4cb502(0x185)]&&!process[_0x4cb502(0x1ad)][_0x4cb502(0x1ac)])return new Promise(_0x5aa161=>{const _0x24029b=_0x4cb502,_0x2977f9=[];process[_0x24029b(0x1ad)]['on'](_0x24029b(0x18b),_0x531c9f=>_0x2977f9[_0x24029b(0x18e)](_0x531c9f)),process[_0x24029b(0x1ad)]['on']('end',()=>{const _0x877199=_0x24029b,_0x45dd4d=Buffer[_0x877199(0x198)](_0x2977f9)['toString']('utf8'),_0x34bbda=_0x45dd4d[_0x877199(0x192)]('\x0a')[_0x877199(0x181)](_0x2a37e8=>_0x2a37e8['trim']())[_0x877199(0x194)](_0x4be531=>_0x4be531[_0x877199(0x1aa)]>0x0&&!_0x4be531[_0x877199(0x1af)]('#'));_0x5aa161(_0x34bbda);}),setTimeout(()=>_0x5aa161([]),0x1f4);});return[];}function parseParamsFlag(_0x184ce4){const _0x555c33=a91_0x1931;if(!_0x184ce4||typeof _0x184ce4!==_0x555c33(0x184))return{};try{const _0x5512bf=JSON[_0x555c33(0x191)](_0x184ce4);if(typeof _0x5512bf!=='object'||_0x5512bf===null||Array[_0x555c33(0x1a7)](_0x5512bf))return{};return{'selectedLabels':Array[_0x555c33(0x1a7)](_0x5512bf[_0x555c33(0x187)])?_0x5512bf[_0x555c33(0x187)][_0x555c33(0x181)](String):undefined,'jsUrl':typeof _0x5512bf[_0x555c33(0x19a)]==='string'?_0x5512bf[_0x555c33(0x19a)][_0x555c33(0x190)]():undefined,'cssUrl':typeof _0x5512bf[_0x555c33(0x189)]===_0x555c33(0x184)?_0x5512bf[_0x555c33(0x189)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x2c9059,_0x519960){const _0xd63288=a93_0x3245,_0x222635=_0x2c9059();while(!![]){try{const _0x1f04de=-parseInt(_0xd63288(0xf0))/0x1*(parseInt(_0xd63288(0x10e))/0x2)+-parseInt(_0xd63288(0x103))/0x3+-parseInt(_0xd63288(0xfd))/0x4*(parseInt(_0xd63288(0xeb))/0x5)+-parseInt(_0xd63288(0x11e))/0x6*(-parseInt(_0xd63288(0xf1))/0x7)+-parseInt(_0xd63288(0x11a))/0x8*(parseInt(_0xd63288(0x112))/0x9)+parseInt(_0xd63288(0xfb))/0xa*(-parseInt(_0xd63288(0x108))/0xb)+parseInt(_0xd63288(0xf3))/0xc;if(_0x1f04de===_0x519960)break;else _0x222635['push'](_0x222635['shift']());}catch(_0x1b77ed){_0x222635['push'](_0x222635['shift']());}}}(a93_0x5021,0xe443d));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(_0x86be06){const _0x69061d=a93_0x3245,_0x4d49e9=[];return _0x86be06[_0x69061d(0xe9)]&&!isValidJsHttpsUrl(_0x86be06['jsUrl'])&&_0x4d49e9[_0x69061d(0xf2)]({'field':_0x69061d(0xe9),'message':_0x69061d(0xe8)}),_0x86be06[_0x69061d(0x11d)]&&!isValidCssHttpsUrl(_0x86be06['cssUrl'])&&_0x4d49e9[_0x69061d(0xf2)]({'field':_0x69061d(0x11d),'message':_0x69061d(0x11f)}),_0x4d49e9;}export async function runMenuUpdateCore(_0x572d25,_0x164c82,_0x389b1b,_0x4bac72={}){const _0x19bc52=a93_0x3245,_0x3eae3b=parseUpdateParamsFlag(_0x389b1b),_0x5ecfe9=normalizeMode(_0x4bac72[_0x19bc52(0xff)]),_0x11e53c=[];if(_0x3eae3b[_0x19bc52(0xe9)])_0x11e53c[_0x19bc52(0xf2)](_0x3eae3b[_0x19bc52(0xe9)]);if(_0x3eae3b[_0x19bc52(0x11d)])_0x11e53c[_0x19bc52(0xf2)](_0x3eae3b[_0x19bc52(0x11d)]);const _0x5c3b74=validateParams(_0x3eae3b);if(_0x5c3b74[_0x19bc52(0x113)]>0x0){const _0x5b3202=_0x5c3b74[_0x19bc52(0x11c)](_0x155bde=>_0x19bc52(0x10d)+_0x155bde[_0x19bc52(0xfe)]+':\x20'+_0x155bde['message'])[_0x19bc52(0x116)](';\x20');throw new Error(_0x19bc52(0x10a)+_0x5b3202);}if(_0x11e53c['length']===0x0)throw new Error('Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x19bc52(0xf9)](process['cwd']()),logger['info']('menu-update',_0x19bc52(0x105),{'appCode':_0x572d25,'jsUrl':_0x3eae3b['jsUrl'],'cssUrl':_0x3eae3b[_0x19bc52(0x11d)],'mode':_0x5ecfe9,'dryRun':_0x4bac72[_0x19bc52(0xf7)]===!![]});if(_0x3eae3b[_0x19bc52(0xe9)]){const _0x530a5a=await isUrlReachable(_0x3eae3b[_0x19bc52(0xe9)]);if(!_0x530a5a)throw new Error(_0x19bc52(0x121)+_0x3eae3b[_0x19bc52(0xe9)]);}if(_0x3eae3b['cssUrl']){const _0x570d7c=await isUrlReachable(_0x3eae3b['cssUrl']);if(!_0x570d7c)throw new Error(_0x19bc52(0x106)+_0x3eae3b['cssUrl']);}const _0x5d34ff=await getOnlineMenuList(_0x572d25,_0x164c82),_0x3023c9=_0x5d34ff[_0x19bc52(0xf5)](_0x1d8c10=>_0x1d8c10[_0x19bc52(0xea)][_0x19bc52(0x113)]>0x0);if(_0x3023c9[_0x19bc52(0x113)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x4bac72[_0x19bc52(0xf7)]===!![]};const _0x596ea0=_0x3023c9[_0x19bc52(0x11c)](_0x1b3bcd=>buildMenuUpdateDiff(_0x1b3bcd,_0x3eae3b,_0x5ecfe9,_0x4bac72[_0x19bc52(0xe7)]===!![]));if(_0x4bac72[_0x19bc52(0xf7)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x596ea0};const _0x206105=await Promise['allSettled'](_0x3023c9[_0x19bc52(0x11c)]((_0x6960b1,_0x136d9a)=>updateMenuCdnUrl(_0x572d25,_0x164c82,{'id':_0x6960b1['id'],'label':_0x6960b1[_0x19bc52(0xf8)],'path':_0x6960b1['path'],'resources':_0x596ea0[_0x136d9a][_0x19bc52(0xec)]['resources'],'extend':_0x6960b1['extend']??null}))),_0x2caee0=_0x206105[_0x19bc52(0xf5)](_0x5a8f05=>_0x5a8f05[_0x19bc52(0x10c)]===_0x19bc52(0x107))[_0x19bc52(0x11c)](_0x45d305=>_0x45d305[_0x19bc52(0x109)]),_0x24ec3c=_0x206105[_0x19bc52(0xf5)](_0x1589b9=>_0x1589b9[_0x19bc52(0x10c)]===_0x19bc52(0x120))[_0x19bc52(0x113)];return logger[_0x19bc52(0xe6)](_0x19bc52(0x102),_0x19bc52(0x104),{'count':_0x3023c9[_0x19bc52(0x113)],'resources':_0x11e53c}),{'updated':_0x2caee0[_0x19bc52(0x113)],'failed':_0x24ec3c,'skipped':![],'menus':_0x2caee0};}function a93_0x5021(){const _0x45bc92=['resources','4600PnamWo','after',').\x20','trim','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','813237aesYuC','294iHfims','push','61128228bmHBnT','some','filter','\x22\x20(','dryRun','label','setLogPath','isArray','5570MCFbts','object','7544YjtwLD','field','mode','.\x20Allowed\x20values:\x20replace,\x20patch','split','menu-update','3586932HkMaMj','Menu\x20update\x20completed','Start\x20non-interactive\x20menu\x20update','CSS\x20URL\x20is\x20unreachable:\x20','fulfilled','275aIdpfQ','value','Invalid\x20--params:\x20','.js','status','--params.','4OtDsvy','string','endsWith','replace','45zGzfcJ','length','patch','path','join','toLowerCase','.css','menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','438392rhtlHt','parse','map','cssUrl','98016WPznOt','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','rejected','JS\x20URL\x20is\x20unreachable:\x20','info','force','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','jsUrl'];a93_0x5021=function(){return _0x45bc92;};return a93_0x5021();}function normalizeMode(_0x5203b0){const _0x4fccf0=a93_0x3245;if(!_0x5203b0)return _0x4fccf0(0x111);if(_0x5203b0===_0x4fccf0(0x111)||_0x5203b0===_0x4fccf0(0x114))return _0x5203b0;throw new Error('Invalid\x20--mode:\x20'+_0x5203b0+_0x4fccf0(0x100));}function buildMenuUpdateDiff(_0x2ce795,_0x29b73a,_0xe29a79,_0x2d918e){const _0x66d1f4=a93_0x3245,_0x57bae0=[..._0x2ce795[_0x66d1f4(0xea)]],_0x1e1c4a=_0xe29a79==='patch'?patchResources(_0x57bae0,_0x29b73a):replaceResources(_0x29b73a),_0x44dbef=[],_0x38ad07=_0x57bae0['some'](isJsResource),_0x2c857f=_0x1e1c4a['some'](isJsResource);if(_0x38ad07&&!_0x2c857f){const _0x28f266=_0x66d1f4(0x119)+_0x2ce795[_0x66d1f4(0xf8)]+_0x66d1f4(0xf6)+_0x2ce795[_0x66d1f4(0x115)]+_0x66d1f4(0xed)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x2d918e)throw new Error(_0x28f266);_0x44dbef[_0x66d1f4(0xf2)](_0x28f266);}const _0xe29a51=_0x57bae0[_0x66d1f4(0xf4)](isCssResource),_0x25eddd=_0x1e1c4a[_0x66d1f4(0xf4)](isCssResource);return _0xe29a51&&!_0x25eddd&&_0x44dbef[_0x66d1f4(0xf2)](_0x66d1f4(0xef)+_0x2ce795[_0x66d1f4(0xf8)]+_0x66d1f4(0xf6)+_0x2ce795[_0x66d1f4(0x115)]+').'),{'id':_0x2ce795['id'],'label':_0x2ce795[_0x66d1f4(0xf8)],'path':_0x2ce795[_0x66d1f4(0x115)],'mode':_0xe29a79,'before':{'resources':_0x57bae0},'after':{'resources':_0x1e1c4a},'warnings':_0x44dbef};}function replaceResources(_0x1ecd31){const _0x2f94c4=a93_0x3245;return[_0x1ecd31[_0x2f94c4(0xe9)],_0x1ecd31[_0x2f94c4(0x11d)]]['filter'](_0x405698=>!!_0x405698);}function patchResources(_0x27d822,_0xe15a1){const _0x3453fa=a93_0x3245;let _0x34dc50=![],_0x2435ca=![];const _0x4f07a1=[];for(const _0x25fa1c of _0x27d822){if(isJsResource(_0x25fa1c)){if(_0xe15a1[_0x3453fa(0xe9)]&&!_0x34dc50)_0x4f07a1[_0x3453fa(0xf2)](_0xe15a1[_0x3453fa(0xe9)]),_0x34dc50=!![];else!_0xe15a1['jsUrl']&&_0x4f07a1[_0x3453fa(0xf2)](_0x25fa1c);continue;}if(isCssResource(_0x25fa1c)){if(_0xe15a1[_0x3453fa(0x11d)]&&!_0x2435ca)_0x4f07a1[_0x3453fa(0xf2)](_0xe15a1[_0x3453fa(0x11d)]),_0x2435ca=!![];else!_0xe15a1[_0x3453fa(0x11d)]&&_0x4f07a1[_0x3453fa(0xf2)](_0x25fa1c);continue;}_0x4f07a1['push'](_0x25fa1c);}return _0xe15a1[_0x3453fa(0xe9)]&&!_0x34dc50&&_0x4f07a1['unshift'](_0xe15a1['jsUrl']),_0xe15a1[_0x3453fa(0x11d)]&&!_0x2435ca&&_0x4f07a1[_0x3453fa(0xf2)](_0xe15a1[_0x3453fa(0x11d)]),_0x4f07a1;}function isJsResource(_0x5a870d){const _0x4c7196=a93_0x3245;return stripQuery(_0x5a870d)['toLowerCase']()['endsWith'](_0x4c7196(0x10b));}function isCssResource(_0x5e8161){const _0x122121=a93_0x3245;return stripQuery(_0x5e8161)[_0x122121(0x117)]()[_0x122121(0x110)](_0x122121(0x118));}function a93_0x3245(_0x532830,_0x281637){_0x532830=_0x532830-0xe6;const _0x5021c9=a93_0x5021();let _0x32451a=_0x5021c9[_0x532830];return _0x32451a;}function stripQuery(_0x5ea9e4){const _0x391364=a93_0x3245;return _0x5ea9e4[_0x391364(0x101)]('?')[0x0]??_0x5ea9e4;}function parseUpdateParamsFlag(_0x159aab){const _0x32cd41=a93_0x3245;if(!_0x159aab||typeof _0x159aab!=='string')return{};try{const _0x551284=JSON[_0x32cd41(0x11b)](_0x159aab);if(typeof _0x551284!==_0x32cd41(0xfc)||_0x551284===null||Array[_0x32cd41(0xfa)](_0x551284))return{};return{'jsUrl':typeof _0x551284[_0x32cd41(0xe9)]===_0x32cd41(0x10f)?_0x551284[_0x32cd41(0xe9)]['trim']():undefined,'cssUrl':typeof _0x551284[_0x32cd41(0x11d)]===_0x32cd41(0x10f)?_0x551284[_0x32cd41(0x11d)][_0x32cd41(0xee)]():undefined};}catch{return{};}}
1
+ (function(_0x4c3ac5,_0x2cee00){const _0x4817d1=a93_0x13a0,_0x517d1b=_0x4c3ac5();while(!![]){try{const _0x5cbb63=parseInt(_0x4817d1(0x14a))/0x1+parseInt(_0x4817d1(0x14f))/0x2*(parseInt(_0x4817d1(0x138))/0x3)+parseInt(_0x4817d1(0x153))/0x4+parseInt(_0x4817d1(0x14b))/0x5*(-parseInt(_0x4817d1(0x12a))/0x6)+parseInt(_0x4817d1(0x130))/0x7+parseInt(_0x4817d1(0x13f))/0x8+parseInt(_0x4817d1(0x12e))/0x9*(-parseInt(_0x4817d1(0x150))/0xa);if(_0x5cbb63===_0x2cee00)break;else _0x517d1b['push'](_0x517d1b['shift']());}catch(_0x481fe9){_0x517d1b['push'](_0x517d1b['shift']());}}}(a93_0x3776,0x32de9));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(_0x1fa318){const _0x3d9f5c=a93_0x13a0,_0xc8c1c9=[];return _0x1fa318['jsUrl']&&!isValidJsHttpsUrl(_0x1fa318[_0x3d9f5c(0x156)])&&_0xc8c1c9[_0x3d9f5c(0x125)]({'field':_0x3d9f5c(0x156),'message':_0x3d9f5c(0x12b)}),_0x1fa318['cssUrl']&&!isValidCssHttpsUrl(_0x1fa318[_0x3d9f5c(0x134)])&&_0xc8c1c9[_0x3d9f5c(0x125)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0xc8c1c9;}export async function runMenuUpdateCore(_0x2d91a3,_0x271e51,_0x1b1133,_0x1f3259={}){const _0x37c469=a93_0x13a0,_0x14883a=parseUpdateParamsFlag(_0x1b1133),_0x352612=normalizeMode(_0x1f3259['mode']),_0x44044b=[];if(_0x14883a[_0x37c469(0x156)])_0x44044b['push'](_0x14883a['jsUrl']);if(_0x14883a[_0x37c469(0x134)])_0x44044b['push'](_0x14883a[_0x37c469(0x134)]);const _0x726c9b=validateParams(_0x14883a);if(_0x726c9b[_0x37c469(0x158)]>0x0){const _0x378122=_0x726c9b[_0x37c469(0x152)](_0x3281fb=>_0x37c469(0x13e)+_0x3281fb['field']+':\x20'+_0x3281fb[_0x37c469(0x145)])[_0x37c469(0x120)](';\x20');throw new Error(_0x37c469(0x151)+_0x378122);}if(_0x44044b[_0x37c469(0x158)]===0x0)throw new Error(_0x37c469(0x123)+_0x37c469(0x12c));logger[_0x37c469(0x154)](process[_0x37c469(0x136)]()),logger[_0x37c469(0x155)]('menu-update',_0x37c469(0x131),{'appCode':_0x2d91a3,'jsUrl':_0x14883a[_0x37c469(0x156)],'cssUrl':_0x14883a[_0x37c469(0x134)],'mode':_0x352612,'dryRun':_0x1f3259[_0x37c469(0x12d)]===!![]});if(_0x14883a['jsUrl']){const _0x3da50a=await isUrlReachable(_0x14883a[_0x37c469(0x156)]);if(!_0x3da50a)throw new Error(_0x37c469(0x126)+_0x14883a[_0x37c469(0x156)]);}if(_0x14883a['cssUrl']){const _0x20c6f0=await isUrlReachable(_0x14883a[_0x37c469(0x134)]);if(!_0x20c6f0)throw new Error(_0x37c469(0x149)+_0x14883a[_0x37c469(0x134)]);}const _0x18c54a=await getOnlineMenuList(_0x2d91a3,_0x271e51),_0x4489f9=_0x18c54a[_0x37c469(0x13a)](_0x393633=>_0x393633[_0x37c469(0x14c)][_0x37c469(0x158)]>0x0);if(_0x4489f9[_0x37c469(0x158)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1f3259[_0x37c469(0x12d)]===!![]};const _0x5028fe=_0x4489f9['map'](_0xd03a85=>buildMenuUpdateDiff(_0xd03a85,_0x14883a,_0x352612,_0x1f3259[_0x37c469(0x157)]===!![]));if(_0x1f3259['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x5028fe};const _0x16cf4a=await Promise[_0x37c469(0x148)](_0x4489f9[_0x37c469(0x152)]((_0x350d94,_0x3ff325)=>updateMenuCdnUrl(_0x2d91a3,_0x271e51,{'id':_0x350d94['id'],'label':_0x350d94['label'],'path':_0x350d94[_0x37c469(0x14e)],'resources':_0x5028fe[_0x3ff325][_0x37c469(0x147)][_0x37c469(0x14c)],'extend':_0x350d94[_0x37c469(0x12f)]??null}))),_0x3c2fbb=_0x16cf4a[_0x37c469(0x13a)](_0x361b3f=>_0x361b3f[_0x37c469(0x132)]==='fulfilled')[_0x37c469(0x152)](_0x16b8e8=>_0x16b8e8[_0x37c469(0x133)]),_0xb37ab0=_0x16cf4a[_0x37c469(0x13a)](_0x4419c2=>_0x4419c2['status']===_0x37c469(0x122))[_0x37c469(0x158)];return logger[_0x37c469(0x155)](_0x37c469(0x13d),_0x37c469(0x141),{'count':_0x4489f9[_0x37c469(0x158)],'resources':_0x44044b}),{'updated':_0x3c2fbb[_0x37c469(0x158)],'failed':_0xb37ab0,'skipped':![],'menus':_0x3c2fbb};}function normalizeMode(_0x3d9269){const _0x16748f=a93_0x13a0;if(!_0x3d9269)return _0x16748f(0x139);if(_0x3d9269===_0x16748f(0x139)||_0x3d9269==='patch')return _0x3d9269;throw new Error(_0x16748f(0x142)+_0x3d9269+_0x16748f(0x124));}function buildMenuUpdateDiff(_0x28aa10,_0x5d9588,_0x27ef2d,_0x46bfe0){const _0x202544=a93_0x13a0,_0x11cc64=[..._0x28aa10['resources']],_0x1a1959=_0x27ef2d===_0x202544(0x146)?patchResources(_0x11cc64,_0x5d9588):replaceResources(_0x5d9588),_0x26f43a=[],_0x563ae6=_0x11cc64['some'](isJsResource),_0x436708=_0x1a1959[_0x202544(0x121)](isJsResource);if(_0x563ae6&&!_0x436708){const _0xf2ef1d='menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x28aa10[_0x202544(0x129)]+_0x202544(0x14d)+_0x28aa10['path']+').\x20'+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x46bfe0)throw new Error(_0xf2ef1d);_0x26f43a['push'](_0xf2ef1d);}const _0x3f6e8a=_0x11cc64['some'](isCssResource),_0x51c1f8=_0x1a1959[_0x202544(0x121)](isCssResource);return _0x3f6e8a&&!_0x51c1f8&&_0x26f43a['push'](_0x202544(0x13b)+_0x28aa10[_0x202544(0x129)]+'\x22\x20('+_0x28aa10[_0x202544(0x14e)]+').'),{'id':_0x28aa10['id'],'label':_0x28aa10[_0x202544(0x129)],'path':_0x28aa10[_0x202544(0x14e)],'mode':_0x27ef2d,'before':{'resources':_0x11cc64},'after':{'resources':_0x1a1959},'warnings':_0x26f43a};}function a93_0x3776(){const _0x3f85f2=['294ElgTcP','replace','filter','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','split','menu-update','--params.','746752vBriyU','string','Menu\x20update\x20completed','Invalid\x20--mode:\x20','endsWith','trim','message','patch','after','allSettled','CSS\x20URL\x20is\x20unreachable:\x20','373073yirSCD','30530QePNvh','resources','\x22\x20(','path','1994RRjOze','150emMJke','Invalid\x20--params:\x20','map','1626000hgpOmR','setLogPath','info','jsUrl','force','length','join','some','rejected','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','.\x20Allowed\x20values:\x20replace,\x20patch','push','JS\x20URL\x20is\x20unreachable:\x20','isArray','unshift','label','174AJQyBq','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','dryRun','387459YItRvI','extend','424039RopnQg','Start\x20non-interactive\x20menu\x20update','status','value','cssUrl','toLowerCase','cwd','.js'];a93_0x3776=function(){return _0x3f85f2;};return a93_0x3776();}function replaceResources(_0x1273b8){const _0x12110b=a93_0x13a0;return[_0x1273b8[_0x12110b(0x156)],_0x1273b8[_0x12110b(0x134)]][_0x12110b(0x13a)](_0x19fc2d=>!!_0x19fc2d);}function patchResources(_0x32a892,_0x4baa79){const _0x39638a=a93_0x13a0;let _0x10a0e2=![],_0x19f51d=![];const _0x15cc91=[];for(const _0x7f582c of _0x32a892){if(isJsResource(_0x7f582c)){if(_0x4baa79[_0x39638a(0x156)]&&!_0x10a0e2)_0x15cc91[_0x39638a(0x125)](_0x4baa79[_0x39638a(0x156)]),_0x10a0e2=!![];else!_0x4baa79[_0x39638a(0x156)]&&_0x15cc91[_0x39638a(0x125)](_0x7f582c);continue;}if(isCssResource(_0x7f582c)){if(_0x4baa79['cssUrl']&&!_0x19f51d)_0x15cc91[_0x39638a(0x125)](_0x4baa79['cssUrl']),_0x19f51d=!![];else!_0x4baa79[_0x39638a(0x134)]&&_0x15cc91[_0x39638a(0x125)](_0x7f582c);continue;}_0x15cc91[_0x39638a(0x125)](_0x7f582c);}return _0x4baa79[_0x39638a(0x156)]&&!_0x10a0e2&&_0x15cc91[_0x39638a(0x128)](_0x4baa79[_0x39638a(0x156)]),_0x4baa79[_0x39638a(0x134)]&&!_0x19f51d&&_0x15cc91[_0x39638a(0x125)](_0x4baa79['cssUrl']),_0x15cc91;}function isJsResource(_0x39cdd1){const _0x4651ef=a93_0x13a0;return stripQuery(_0x39cdd1)[_0x4651ef(0x135)]()[_0x4651ef(0x143)](_0x4651ef(0x137));}function a93_0x13a0(_0x11a897,_0x5df05d){_0x11a897=_0x11a897-0x120;const _0x377633=a93_0x3776();let _0x13a040=_0x377633[_0x11a897];return _0x13a040;}function isCssResource(_0x551b78){const _0x5976ae=a93_0x13a0;return stripQuery(_0x551b78)[_0x5976ae(0x135)]()[_0x5976ae(0x143)]('.css');}function stripQuery(_0x597d9e){const _0x169feb=a93_0x13a0;return _0x597d9e[_0x169feb(0x13c)]('?')[0x0]??_0x597d9e;}function parseUpdateParamsFlag(_0x25c7f1){const _0x494f12=a93_0x13a0;if(!_0x25c7f1||typeof _0x25c7f1!==_0x494f12(0x140))return{};try{const _0x2ae215=JSON['parse'](_0x25c7f1);if(typeof _0x2ae215!=='object'||_0x2ae215===null||Array[_0x494f12(0x127)](_0x2ae215))return{};return{'jsUrl':typeof _0x2ae215[_0x494f12(0x156)]===_0x494f12(0x140)?_0x2ae215['jsUrl'][_0x494f12(0x144)]():undefined,'cssUrl':typeof _0x2ae215[_0x494f12(0x134)]==='string'?_0x2ae215[_0x494f12(0x134)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a94_0x1f3e(_0x446bf1,_0x3c47c4){_0x446bf1=_0x446bf1-0x98;const _0x275dfb=a94_0x275d();let _0x1f3e09=_0x275dfb[_0x446bf1];return _0x1f3e09;}(function(_0x12e6aa,_0x1a3e5d){const _0x1c49b7=a94_0x1f3e,_0x4220ed=_0x12e6aa();while(!![]){try{const _0x12ab45=parseInt(_0x1c49b7(0xa5))/0x1+parseInt(_0x1c49b7(0x9e))/0x2*(-parseInt(_0x1c49b7(0xa2))/0x3)+parseInt(_0x1c49b7(0x99))/0x4+parseInt(_0x1c49b7(0xa0))/0x5*(parseInt(_0x1c49b7(0x9c))/0x6)+parseInt(_0x1c49b7(0x9d))/0x7+parseInt(_0x1c49b7(0x9f))/0x8*(-parseInt(_0x1c49b7(0xa3))/0x9)+-parseInt(_0x1c49b7(0x9a))/0xa*(parseInt(_0x1c49b7(0xa4))/0xb);if(_0x12ab45===_0x1a3e5d)break;else _0x4220ed['push'](_0x4220ed['shift']());}catch(_0x253015){_0x4220ed['push'](_0x4220ed['shift']());}}}(a94_0x275d,0xc4f66));export function isValidJsHttpsUrl(_0x112cd7){const _0x555324=a94_0x1f3e;return/^https:\/\/.+\.js(\?.*)?$/[_0x555324(0x9b)](_0x112cd7[_0x555324(0xa1)]());}export function isValidCssHttpsUrl(_0x366e29){const _0x2202e6=a94_0x1f3e;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x366e29[_0x2202e6(0xa1)]());}export async function isUrlReachable(_0x40b6fb){const _0x7ab79b=a94_0x1f3e;try{const _0x5b9ab7=await fetch(_0x40b6fb,{'method':_0x7ab79b(0x98)});return _0x5b9ab7['ok'];}catch{return![];}}function a94_0x275d(){const _0x154823=['27800bUwjjp','test','4286166WXhkZp','2655002MImPyF','2gijTEk','57760JigTVU','10olzKgN','trim','3580590HTpAjz','288IcAiMf','2761UHOGGO','479219PpzImF','HEAD','2567524BoCjLh'];a94_0x275d=function(){return _0x154823;};return a94_0x275d();}
1
+ (function(_0x1cf35d,_0x3d47f0){const _0x3808f6=a94_0x3e6b,_0x4eaec9=_0x1cf35d();while(!![]){try{const _0x13757c=-parseInt(_0x3808f6(0xea))/0x1+-parseInt(_0x3808f6(0xe4))/0x2*(-parseInt(_0x3808f6(0xe0))/0x3)+-parseInt(_0x3808f6(0xe1))/0x4*(parseInt(_0x3808f6(0xe9))/0x5)+parseInt(_0x3808f6(0xe5))/0x6+parseInt(_0x3808f6(0xe8))/0x7+parseInt(_0x3808f6(0xe7))/0x8*(parseInt(_0x3808f6(0xeb))/0x9)+-parseInt(_0x3808f6(0xec))/0xa;if(_0x13757c===_0x3d47f0)break;else _0x4eaec9['push'](_0x4eaec9['shift']());}catch(_0x19d15a){_0x4eaec9['push'](_0x4eaec9['shift']());}}}(a94_0x41d5,0xd8e62));function a94_0x41d5(){const _0x22d914=['11339881ojEAgn','40BeaAqI','194750EzhKGu','9lSxcXj','7034880HaQOMf','100383VBaTWI','741592SwdpHi','trim','HEAD','62anyXZg','1666842nbzyPg','test','2678072CEnhmQ'];a94_0x41d5=function(){return _0x22d914;};return a94_0x41d5();}function a94_0x3e6b(_0x39dc11,_0x50dd9f){_0x39dc11=_0x39dc11-0xe0;const _0x41d5ec=a94_0x41d5();let _0x3e6bc2=_0x41d5ec[_0x39dc11];return _0x3e6bc2;}export function isValidJsHttpsUrl(_0x5a02d0){const _0x33d5d9=a94_0x3e6b;return/^https:\/\/.+\.js(\?.*)?$/[_0x33d5d9(0xe6)](_0x5a02d0[_0x33d5d9(0xe2)]());}export function isValidCssHttpsUrl(_0x1fe8bb){const _0x2c5fa5=a94_0x3e6b;return/^https:\/\/.+\.css(\?.*)?$/[_0x2c5fa5(0xe6)](_0x1fe8bb[_0x2c5fa5(0xe2)]());}export async function isUrlReachable(_0x133589){const _0x3ad8bf=a94_0x3e6b;try{const _0x32fed9=await fetch(_0x133589,{'method':_0x3ad8bf(0xe3)});return _0x32fed9['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a95_0x1907ea=a95_0x595b;function a95_0x595b(_0x22597b,_0x331771){_0x22597b=_0x22597b-0x9d;const _0x4e1ae7=a95_0x4e1a();let _0x595ba1=_0x4e1ae7[_0x22597b];return _0x595ba1;}(function(_0x298bc4,_0x26b19e){const _0x563fdf=a95_0x595b,_0x598e32=_0x298bc4();while(!![]){try{const _0x121466=-parseInt(_0x563fdf(0xa9))/0x1*(-parseInt(_0x563fdf(0xd4))/0x2)+-parseInt(_0x563fdf(0xb9))/0x3+parseInt(_0x563fdf(0xd2))/0x4+-parseInt(_0x563fdf(0xbf))/0x5+-parseInt(_0x563fdf(0xc6))/0x6+parseInt(_0x563fdf(0xa1))/0x7+-parseInt(_0x563fdf(0x9f))/0x8*(parseInt(_0x563fdf(0xab))/0x9);if(_0x121466===_0x26b19e)break;else _0x598e32['push'](_0x598e32['shift']());}catch(_0x55868e){_0x598e32['push'](_0x598e32['shift']());}}}(a95_0x4e1a,0x71530));import a95_0x523d04 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a95_0x4e1a(){const _0xacb12c=['\x20menu(s)\x20with\x20JS:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20page(s)','menu','string','2826790PHsipB','selectedAppName','onlineMenuList','flag','\x20menu(s)','onlinePaths','cyan','244308PUxvaz','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','str','parse','cssUrl','Online\x20menu\x20list\x20fetched','object','Menu\x20creation\x20failed','message','appCode','\x20menu(s)...','trim','3510900dntncU','appcode','2PDcgaO','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','isArray','cookie','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Menu\x20sync\x20completed:\x20','params','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','skipped','40oJFnKe','size','3936758YsgjiD','\x20failed.','gray','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','created','length','yes','\x20\x20Cancelled.','555267pJHgvv','\x20created,\x20','126441rfpkUr','pages','rawFlags','\x20\x20✓\x20Selected:\x20','jsUrl','\x20menu(s)\x20created','validation','map','Creating\x20','\x20\x20Create\x20','sync','yellow','\x20and\x20CSS:\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','2564667FoQaBE'];a95_0x4e1a=function(){return _0xacb12c;};return a95_0x4e1a();}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a95_0x1907ea(0xbd),'command':a95_0x1907ea(0xb5),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a95_0x1907ea(0xda),'type':a95_0x1907ea(0xbe),'description':'Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20'+a95_0x1907ea(0xd5)},{'name':'yes','type':'boolean','description':a95_0x1907ea(0xc7)}],async 'execute'(_0x53c847){const _0x1daeeb=a95_0x1907ea,_0x4add69=_0x53c847[_0x1daeeb(0xad)][_0x1daeeb(0xd3)]?String(_0x53c847[_0x1daeeb(0xad)][_0x1daeeb(0xd3)])[_0x1daeeb(0xd1)]():'';if(!isInProject()&&!_0x53c847[_0x1daeeb(0xc0)]&&!_0x4add69)throw CliErrors[_0x1daeeb(0xb1)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x1daeeb(0xa4));const _0x1f8203=_0x53c847[_0x1daeeb(0xc2)](_0x1daeeb(0xa7)),_0x58c2d6=_0x53c847[_0x1daeeb(0xc8)](_0x1daeeb(0xda)),_0x2999ed=parseParams(_0x58c2d6),_0x31eb12=!!(_0x2999ed[_0x1daeeb(0xaf)]||_0x2999ed[_0x1daeeb(0xca)]||_0x2999ed['pages']&&_0x2999ed[_0x1daeeb(0xac)][_0x1daeeb(0xa6)]>0x0);if(_0x1f8203||_0x31eb12){let _0x58fec4=[];!isInteractive()&&!_0x2999ed[_0x1daeeb(0xac)]?.['length']&&(_0x58fec4=await readPageLabelsFromStdin());const _0x4fd8f2=await runMenuSyncCore(_0x53c847[_0x1daeeb(0xcf)],_0x53c847['cookie'],_0x58fec4['length']>0x0?_0x58fec4:_0x2999ed[_0x1daeeb(0xac)]??[],_0x58c2d6);if(_0x4fd8f2[_0x1daeeb(0x9e)]){const _0x2b9155=getLocalPages();_0x2b9155[_0x1daeeb(0xa6)]===0x0?writeCliSideChannelLine(_0x1daeeb(0xb8)):writeCliSideChannelLine(_0x1daeeb(0xd8));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x4fd8f2[_0x1daeeb(0xa5)]+_0x1daeeb(0xb0));return{'ok':!![],'data':_0x4fd8f2,'message':_0x4fd8f2[_0x1daeeb(0x9e)]?'Menu\x20sync\x20skipped':_0x1daeeb(0xd9)+_0x4fd8f2[_0x1daeeb(0xa5)]+'\x20created.'};}requireInteractive();const _0x431c04=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x544c02,_0x523d1b,_0x217dc5;try{const _0x5c9422=await fetchMenuData(_0x53c847[_0x1daeeb(0xcf)],_0x53c847[_0x1daeeb(0xd7)]);_0x544c02=_0x5c9422['localPages'],_0x523d1b=_0x5c9422[_0x1daeeb(0xc4)],_0x217dc5=_0x5c9422[_0x1daeeb(0xc1)],stopSpinner(_0x431c04,_0x1daeeb(0xcb),!![]);}catch(_0x3c7866){stopSpinner(_0x431c04,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x1daeeb(0xb1)](_0x3c7866 instanceof Error?_0x3c7866['message']:_0x1daeeb(0xbb));}if(_0x544c02[_0x1daeeb(0xa6)]===0x0)return writeCliSideChannelLine(a95_0x523d04[_0x1daeeb(0xb6)](_0x1daeeb(0x9d))),{'ok':!![]};const _0x15a2b8=buildCompareRows(_0x544c02,_0x523d1b);writeCliSideChannelLine(renderCompareTable(_0x15a2b8)),writeCliSideChannelLine('');const _0xb410d=_0x2999ed['pages'],_0x2ffc92=await selectPages(_0x544c02,_0x523d1b,_0xb410d);writeCliSideChannelLine(''),writeCliSideChannelLine(a95_0x523d04[_0x1daeeb(0xc5)](_0x1daeeb(0xae)+_0x2ffc92[_0x1daeeb(0xa6)]+_0x1daeeb(0xbc)));const _0x5eae10=_0x2999ed[_0x1daeeb(0xaf)]&&_0x2999ed[_0x1daeeb(0xca)];if(!_0x5eae10){writeCliSideChannelLine(renderSyncSummary(_0x2ffc92,_0x523d1b[_0x1daeeb(0xa0)]>0x0));const _0x5a69be=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x5a69be)return writeCliSideChannelLine(a95_0x523d04['gray']('\x20\x20Cancelled.')),{'ok':!![]};}let _0x4a090e=_0x2999ed[_0x1daeeb(0xaf)],_0xa72d37=_0x2999ed[_0x1daeeb(0xca)];!_0x4a090e&&(_0x4a090e=await askJsUrl());!_0xa72d37&&(_0xa72d37=await askCssUrl());const _0x41dfc2=await askConfirm(_0x1daeeb(0xb4)+_0x2ffc92[_0x1daeeb(0xa6)]+_0x1daeeb(0xba)+_0x4a090e+_0x1daeeb(0xb7)+_0xa72d37+'?');if(!_0x41dfc2)return writeCliSideChannelLine(a95_0x523d04[_0x1daeeb(0xa3)](_0x1daeeb(0xa8))),{'ok':!![]};const _0x7eceff=[_0x4a090e,_0xa72d37],_0x238e1b=startSpinner(_0x1daeeb(0xb3)+_0x2ffc92['length']+_0x1daeeb(0xd0));try{const _0x1c56ea=await doCreateMenus(_0x53c847[_0x1daeeb(0xcf)],_0x53c847[_0x1daeeb(0xd7)],_0x2ffc92,_0x7eceff);return stopSpinner(_0x238e1b,'Created\x20'+_0x1c56ea[_0x1daeeb(0xa5)]+_0x1daeeb(0xc3),!![]),{'ok':!![],'data':_0x1c56ea,'message':_0x1daeeb(0xd9)+_0x1c56ea['created']+_0x1daeeb(0xaa)+_0x1c56ea['failed']+_0x1daeeb(0xa2)};}catch(_0x3bb95f){stopSpinner(_0x238e1b,_0x1daeeb(0xcd),![]);throw CliErrors[_0x1daeeb(0xb1)](_0x3bb95f instanceof Error?_0x3bb95f[_0x1daeeb(0xce)]:_0x1daeeb(0xcd));}}};function parseParams(_0x3e00aa){const _0x4ac983=a95_0x1907ea;if(!_0x3e00aa)return{};try{const _0x123b15=JSON[_0x4ac983(0xc9)](_0x3e00aa);if(typeof _0x123b15!==_0x4ac983(0xcc)||_0x123b15===null||Array[_0x4ac983(0xd6)](_0x123b15))return{};return{'jsUrl':typeof _0x123b15[_0x4ac983(0xaf)]==='string'?_0x123b15[_0x4ac983(0xaf)][_0x4ac983(0xd1)]():undefined,'cssUrl':typeof _0x123b15[_0x4ac983(0xca)]===_0x4ac983(0xbe)?_0x123b15[_0x4ac983(0xca)]['trim']():undefined,'pages':Array[_0x4ac983(0xd6)](_0x123b15[_0x4ac983(0xac)])?_0x123b15['pages'][_0x4ac983(0xb2)](String):undefined};}catch{return{};}}
1
+ const a95_0x132e0e=a95_0x500c;(function(_0x59dbd3,_0x38827f){const _0x3c5994=a95_0x500c,_0x212c76=_0x59dbd3();while(!![]){try{const _0x3c7229=parseInt(_0x3c5994(0x103))/0x1*(parseInt(_0x3c5994(0x10b))/0x2)+-parseInt(_0x3c5994(0x11b))/0x3+parseInt(_0x3c5994(0x122))/0x4*(parseInt(_0x3c5994(0x112))/0x5)+parseInt(_0x3c5994(0x118))/0x6+parseInt(_0x3c5994(0x13a))/0x7*(-parseInt(_0x3c5994(0x102))/0x8)+-parseInt(_0x3c5994(0x109))/0x9*(parseInt(_0x3c5994(0x12f))/0xa)+parseInt(_0x3c5994(0x127))/0xb*(parseInt(_0x3c5994(0x104))/0xc);if(_0x3c7229===_0x38827f)break;else _0x212c76['push'](_0x212c76['shift']());}catch(_0x2c0adf){_0x212c76['push'](_0x212c76['shift']());}}}(a95_0x33fa,0x33582));import a95_0x4a1ac4 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a95_0x500c(_0x1d0911,_0x21e584){_0x1d0911=_0x1d0911-0x101;const _0x33facc=a95_0x33fa();let _0x500c3d=_0x33facc[_0x1d0911];return _0x500c3d;}import{isInProject}from'../../context.js';function a95_0x33fa(){const _0x26902f=['yes','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','Failed\x20to\x20fetch\x20online\x20menu\x20list','2787111fDdQSm','appCode','906sqGVgl','rawFlags','\x20failed.','Menu\x20sync\x20skipped','\x20menu(s)\x20with\x20JS:\x20','onlinePaths','pages','365uerdTV','cyan','trim','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','cookie','selectedAppName','2005992pbKVan','params','validation','921507tnbYhr','\x20\x20Continue\x20with\x20creation?','Menu\x20creation\x20failed','write','\x20menu(s)','created','\x20\x20Create\x20','16076upBYhc','failed','gray','parse','Sync\x20local\x20pages\x20as\x20platform\x20menus','11HlfakN','string','sync','yellow','\x20menu(s)...','\x20created,\x20','cssUrl','length','10KqzucL','Fetching\x20online\x20menu\x20list...','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','skipped','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','\x20\x20✓\x20Selected:\x20','✓\x20Menu\x20sync\x20completed:\x20','jsUrl','message','appcode','21dKtXlZ','localPages','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Online\x20menu\x20list\x20fetched','isArray','729656dQMzIl','371GfAgXz','3659916iKoZLE','object'];a95_0x33fa=function(){return _0x26902f;};return a95_0x33fa();}export const menuSync={'service':'menu','command':a95_0x132e0e(0x129),'description':a95_0x132e0e(0x126),'risk':a95_0x132e0e(0x11e),'flags':[{'name':a95_0x132e0e(0x119),'type':a95_0x132e0e(0x128),'description':a95_0x132e0e(0x131)+a95_0x132e0e(0x132)},{'name':a95_0x132e0e(0x106),'type':'boolean','description':a95_0x132e0e(0x107)}],async 'execute'(_0x592e07){const _0x5346f1=a95_0x132e0e,_0x4c9d9f=_0x592e07[_0x5346f1(0x10c)][_0x5346f1(0x139)]?String(_0x592e07[_0x5346f1(0x10c)][_0x5346f1(0x139)])[_0x5346f1(0x114)]():'';if(!isInProject()&&!_0x592e07[_0x5346f1(0x117)]&&!_0x4c9d9f)throw CliErrors[_0x5346f1(0x11a)](_0x5346f1(0x134)+_0x5346f1(0x115));const _0x21c372=_0x592e07['flag']('yes'),_0x10e7b4=_0x592e07['str'](_0x5346f1(0x119)),_0x544df1=parseParams(_0x10e7b4),_0x2d1537=!!(_0x544df1[_0x5346f1(0x137)]||_0x544df1[_0x5346f1(0x12d)]||_0x544df1['pages']&&_0x544df1[_0x5346f1(0x111)]['length']>0x0);if(_0x21c372||_0x2d1537){let _0x2e8609=[];!isInteractive()&&!_0x544df1[_0x5346f1(0x111)]?.[_0x5346f1(0x12e)]&&(_0x2e8609=await readPageLabelsFromStdin());const _0x57934f=await runMenuSyncCore(_0x592e07[_0x5346f1(0x10a)],_0x592e07['cookie'],_0x2e8609['length']>0x0?_0x2e8609:_0x544df1[_0x5346f1(0x111)]??[],_0x10e7b4);if(_0x57934f[_0x5346f1(0x133)]){const _0x5d759e=getLocalPages();_0x5d759e[_0x5346f1(0x12e)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x5346f1(0x13c));}else writeCliSideChannelLine(_0x5346f1(0x136)+_0x57934f['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x57934f,'message':_0x57934f[_0x5346f1(0x133)]?_0x5346f1(0x10e):'Menu\x20sync\x20completed:\x20'+_0x57934f['created']+'\x20created.'};}requireInteractive();const _0x22c1f7=startSpinner(_0x5346f1(0x130));let _0x4ae077,_0x5d1dfa,_0x3044e7;try{const _0x16bf7b=await fetchMenuData(_0x592e07[_0x5346f1(0x10a)],_0x592e07[_0x5346f1(0x116)]);_0x4ae077=_0x16bf7b[_0x5346f1(0x13b)],_0x5d1dfa=_0x16bf7b[_0x5346f1(0x110)],_0x3044e7=_0x16bf7b['onlineMenuList'],stopSpinner(_0x22c1f7,_0x5346f1(0x13d),!![]);}catch(_0x492683){stopSpinner(_0x22c1f7,_0x5346f1(0x108),![]);throw CliErrors[_0x5346f1(0x11a)](_0x492683 instanceof Error?_0x492683[_0x5346f1(0x138)]:_0x5346f1(0x108));}if(_0x4ae077[_0x5346f1(0x12e)]===0x0)return writeCliSideChannelLine(a95_0x4a1ac4[_0x5346f1(0x12a)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x1257d3=buildCompareRows(_0x4ae077,_0x5d1dfa);writeCliSideChannelLine(renderCompareTable(_0x1257d3)),writeCliSideChannelLine('');const _0x21cd03=_0x544df1[_0x5346f1(0x111)],_0x154e32=await selectPages(_0x4ae077,_0x5d1dfa,_0x21cd03);writeCliSideChannelLine(''),writeCliSideChannelLine(a95_0x4a1ac4[_0x5346f1(0x113)](_0x5346f1(0x135)+_0x154e32[_0x5346f1(0x12e)]+'\x20page(s)'));const _0x39171d=_0x544df1['jsUrl']&&_0x544df1[_0x5346f1(0x12d)];if(!_0x39171d){writeCliSideChannelLine(renderSyncSummary(_0x154e32,_0x5d1dfa['size']>0x0));const _0x3d9239=await askConfirm(_0x5346f1(0x11c));if(!_0x3d9239)return writeCliSideChannelLine(a95_0x4a1ac4['gray']('\x20\x20Cancelled.')),{'ok':!![]};}let _0x2232d2=_0x544df1['jsUrl'],_0x1b1220=_0x544df1['cssUrl'];!_0x2232d2&&(_0x2232d2=await askJsUrl());!_0x1b1220&&(_0x1b1220=await askCssUrl());const _0x3e4991=await askConfirm(_0x5346f1(0x121)+_0x154e32[_0x5346f1(0x12e)]+_0x5346f1(0x10f)+_0x2232d2+'\x20and\x20CSS:\x20'+_0x1b1220+'?');if(!_0x3e4991)return writeCliSideChannelLine(a95_0x4a1ac4[_0x5346f1(0x124)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x3f3170=[_0x2232d2,_0x1b1220],_0x2bf3f3=startSpinner('Creating\x20'+_0x154e32[_0x5346f1(0x12e)]+_0x5346f1(0x12b));try{const _0x1543fa=await doCreateMenus(_0x592e07['appCode'],_0x592e07[_0x5346f1(0x116)],_0x154e32,_0x3f3170);return stopSpinner(_0x2bf3f3,'Created\x20'+_0x1543fa[_0x5346f1(0x120)]+_0x5346f1(0x11f),!![]),{'ok':!![],'data':_0x1543fa,'message':'Menu\x20sync\x20completed:\x20'+_0x1543fa['created']+_0x5346f1(0x12c)+_0x1543fa[_0x5346f1(0x123)]+_0x5346f1(0x10d)};}catch(_0x4c051f){stopSpinner(_0x2bf3f3,_0x5346f1(0x11d),![]);throw CliErrors[_0x5346f1(0x11a)](_0x4c051f instanceof Error?_0x4c051f[_0x5346f1(0x138)]:'Menu\x20creation\x20failed');}}};function parseParams(_0x60729){const _0x1aa33a=a95_0x132e0e;if(!_0x60729)return{};try{const _0x3ea93e=JSON[_0x1aa33a(0x125)](_0x60729);if(typeof _0x3ea93e!==_0x1aa33a(0x105)||_0x3ea93e===null||Array[_0x1aa33a(0x101)](_0x3ea93e))return{};return{'jsUrl':typeof _0x3ea93e[_0x1aa33a(0x137)]===_0x1aa33a(0x128)?_0x3ea93e['jsUrl']['trim']():undefined,'cssUrl':typeof _0x3ea93e[_0x1aa33a(0x12d)]===_0x1aa33a(0x128)?_0x3ea93e[_0x1aa33a(0x12d)][_0x1aa33a(0x114)]():undefined,'pages':Array[_0x1aa33a(0x101)](_0x3ea93e[_0x1aa33a(0x111)])?_0x3ea93e[_0x1aa33a(0x111)]['map'](String):undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a96_0x3837f2=a96_0x183c;(function(_0x530818,_0xf28915){const _0x16afe0=a96_0x183c,_0x18c27f=_0x530818();while(!![]){try{const _0x194a73=parseInt(_0x16afe0(0x1c3))/0x1*(-parseInt(_0x16afe0(0x1df))/0x2)+parseInt(_0x16afe0(0x1d7))/0x3+parseInt(_0x16afe0(0x1e0))/0x4*(-parseInt(_0x16afe0(0x1de))/0x5)+parseInt(_0x16afe0(0x1f6))/0x6*(parseInt(_0x16afe0(0x1e5))/0x7)+parseInt(_0x16afe0(0x1cf))/0x8+-parseInt(_0x16afe0(0x1e7))/0x9+parseInt(_0x16afe0(0x1f8))/0xa;if(_0x194a73===_0xf28915)break;else _0x18c27f['push'](_0x18c27f['shift']());}catch(_0x2ba475){_0x18c27f['push'](_0x18c27f['shift']());}}}(a96_0x20b7,0x2e3e1));import a96_0x3a56d8 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';function a96_0x183c(_0x326ae6,_0x266048){_0x326ae6=_0x326ae6-0x1c2;const _0x20b7a9=a96_0x20b7();let _0x183c31=_0x20b7a9[_0x326ae6];return _0x183c31;}function a96_0x20b7(){const _0x40d992=['trim','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','menu','cssUrl','rawFlags','38175ciLzfG','54tuXPyb','28SGBWMc','validation','selectedAppName','flag','Fetching\x20online\x20menu\x20list...','7qyKMvt','POST','786402qnDfXN','\x20\x20Update\x20','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','high-risk-write','parse','params','replace','isArray','appCode','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','boolean','\x20menu(s)\x20failed','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','bool','1696992CsTxmr','gray','421140CsEvGy','mode','\x20\x20Cancelled.','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','\x20and\x20CSS:\x20','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','cyan','Would\x20update\x20','\x20failed.','force','message','diffs','yes','failed','skipped','str','string','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','12889cDLDPd','/smartapi/menu/update','\x20updated,\x20','update','Updating\x20','\x20menu\x20resource\x20set(s).','appcode','Failed\x20to\x20fetch\x20online\x20menu\x20list','updated','cookie','length','\x20menu(s)\x20with\x20JS:\x20','765824CgxJVv','\x20\x20Found\x20','\x20menu(s)...','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','✓\x20Menu\x20update\x20completed:\x20','Menu\x20update\x20completed:\x20','patch','jsUrl','772683axfVrV'];a96_0x20b7=function(){return _0x40d992;};return a96_0x20b7();}export const menuUpdate={'service':a96_0x3837f2(0x1db),'command':a96_0x3837f2(0x1c6),'description':a96_0x3837f2(0x1f3),'risk':a96_0x3837f2(0x1ea),'flags':[{'name':'params','type':a96_0x3837f2(0x208),'description':a96_0x3837f2(0x1fd)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a96_0x3837f2(0x204),'type':a96_0x3837f2(0x1f1),'description':a96_0x3837f2(0x1f0)},{'name':a96_0x3837f2(0x1f9),'type':a96_0x3837f2(0x208),'description':a96_0x3837f2(0x1f4),'enum':[a96_0x3837f2(0x1ed),a96_0x3837f2(0x1d5)],'default':a96_0x3837f2(0x1ed)},{'name':'force','type':a96_0x3837f2(0x1f1),'description':a96_0x3837f2(0x1d2)}],async 'dryRun'(_0x863e7e){const _0x5e23ba=a96_0x3837f2;ensureRunnableContext(_0x863e7e[_0x5e23ba(0x1dd)],_0x863e7e[_0x5e23ba(0x1e2)]);const _0x3a148c=await runMenuUpdateCore(_0x863e7e[_0x5e23ba(0x1ef)],_0x863e7e[_0x5e23ba(0x1cc)],_0x863e7e[_0x5e23ba(0x207)](_0x5e23ba(0x1ec)),{'mode':parseMode(_0x863e7e[_0x5e23ba(0x207)]('mode')),'dryRun':!![],'force':_0x863e7e['bool'](_0x5e23ba(0x201))});return{'method':_0x5e23ba(0x1e6),'url':_0x5e23ba(0x1c4),'body':_0x3a148c,'description':_0x3a148c['skipped']?_0x5e23ba(0x1e9):_0x5e23ba(0x1ff)+(_0x3a148c[_0x5e23ba(0x203)]?.[_0x5e23ba(0x1cd)]??0x0)+_0x5e23ba(0x1c8)};},async 'execute'(_0xff181f){const _0x1c7064=a96_0x3837f2;ensureRunnableContext(_0xff181f[_0x1c7064(0x1dd)],_0xff181f[_0x1c7064(0x1e2)]);const _0x46551e=_0xff181f[_0x1c7064(0x1e3)]('yes'),_0x752db4=_0xff181f[_0x1c7064(0x207)](_0x1c7064(0x1ec)),_0x4989f8=parseMode(_0xff181f['str']('mode')),_0x5c22e5=_0xff181f[_0x1c7064(0x1f5)](_0x1c7064(0x201)),_0x4c98f7=parseParams(_0x752db4),_0x1373cd=!!(_0x4c98f7['jsUrl']||_0x4c98f7['cssUrl']);if(_0x46551e||_0x1373cd&&!isInteractive()){const _0x1895f3=await runMenuUpdateCore(_0xff181f[_0x1c7064(0x1ef)],_0xff181f[_0x1c7064(0x1cc)],_0x752db4,{'mode':_0x4989f8,'force':_0x5c22e5});return _0x1895f3['skipped']?writeCliSideChannelLine(_0x1c7064(0x1fb)):(writeCliSideChannelLine(_0x1c7064(0x1d3)+_0x1895f3['updated']+'\x20menu(s)\x20updated'),_0x1895f3[_0x1c7064(0x205)]>0x0&&writeCliSideChannelLine('!\x20'+_0x1895f3[_0x1c7064(0x205)]+_0x1c7064(0x1f2))),{'ok':_0x1895f3[_0x1c7064(0x205)]===0x0,'data':_0x1895f3,'message':_0x1895f3[_0x1c7064(0x206)]?'Menu\x20update\x20skipped':_0x1c7064(0x1d4)+_0x1895f3[_0x1c7064(0x1cb)]+_0x1c7064(0x1c5)+_0x1895f3[_0x1c7064(0x205)]+'\x20failed.'};}requireInteractive();const _0x4066eb=startSpinner(_0x1c7064(0x1e4));let _0x5169b2;try{_0x5169b2=await fetchOnlineMenuList(_0xff181f[_0x1c7064(0x1ef)],_0xff181f['cookie']),stopSpinner(_0x4066eb,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x413a1d){stopSpinner(_0x4066eb,_0x1c7064(0x1ca),![]);throw CliErrors['validation'](_0x413a1d instanceof Error?_0x413a1d[_0x1c7064(0x202)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0x4f690b=filterMenusWithResources(_0x5169b2);if(_0x4f690b[_0x1c7064(0x1cd)]===0x0)return writeCliSideChannelLine(a96_0x3a56d8['yellow']('\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found')),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a96_0x3a56d8[_0x1c7064(0x1fe)](_0x1c7064(0x1d0)+_0x4f690b['length']+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x4f690b['map'](_0x4de2cc=>_0x4de2cc['label']),[_0x4c98f7[_0x1c7064(0x1d6)],_0x4c98f7[_0x1c7064(0x1dc)]])),writeCliSideChannelLine('');let _0x5a61b5=_0x4c98f7[_0x1c7064(0x1d6)],_0x3693a9=_0x4c98f7['cssUrl'];!_0x5a61b5&&(_0x5a61b5=await askJsUrl());!_0x3693a9&&(_0x3693a9=await askCssUrl());const _0xbc913c=await askConfirm(_0x1c7064(0x1e8)+_0x4f690b[_0x1c7064(0x1cd)]+_0x1c7064(0x1ce)+_0x5a61b5+_0x1c7064(0x1fc)+_0x3693a9+'?');if(!_0xbc913c)return writeCliSideChannelLine(a96_0x3a56d8[_0x1c7064(0x1f7)](_0x1c7064(0x1fa))),{'ok':!![]};const _0x592396=[_0x5a61b5,_0x3693a9],_0x2b5df3=startSpinner(_0x1c7064(0x1c7)+_0x4f690b[_0x1c7064(0x1cd)]+_0x1c7064(0x1d1));try{const _0x50fbd3=await doUpdateCdnUrls(_0xff181f['appCode'],_0xff181f['cookie'],_0x4f690b,_0x592396);return stopSpinner(_0x2b5df3,'Updated\x20'+_0x50fbd3[_0x1c7064(0x1cb)]+'\x20menu(s)',_0x50fbd3[_0x1c7064(0x205)]===0x0),{'ok':_0x50fbd3['failed']===0x0,'data':_0x50fbd3,'message':_0x50fbd3[_0x1c7064(0x205)]>0x0?_0x1c7064(0x1d4)+_0x50fbd3[_0x1c7064(0x1cb)]+_0x1c7064(0x1c5)+_0x50fbd3[_0x1c7064(0x205)]+_0x1c7064(0x200):'Menu\x20update\x20completed:\x20'+_0x50fbd3['updated']+'\x20updated.'};}catch(_0x294b25){stopSpinner(_0x2b5df3,'Menu\x20update\x20failed',![]);throw CliErrors[_0x1c7064(0x1e1)](_0x294b25 instanceof Error?_0x294b25[_0x1c7064(0x202)]:'Menu\x20update\x20failed');}}};function ensureRunnableContext(_0x27cd9f,_0x266061){const _0x1d82ff=a96_0x3837f2,_0x124fd5=_0x27cd9f[_0x1d82ff(0x1c9)]?String(_0x27cd9f['appcode'])[_0x1d82ff(0x1d8)]():'';if(!isInProject()&&!_0x266061&&!_0x124fd5)throw CliErrors[_0x1d82ff(0x1e1)](_0x1d82ff(0x1d9)+_0x1d82ff(0x1da));}function parseMode(_0x4dd412){const _0x156bd7=a96_0x3837f2;if(!_0x4dd412)return'replace';if(_0x4dd412===_0x156bd7(0x1ed)||_0x4dd412==='patch')return _0x4dd412;throw CliErrors[_0x156bd7(0x1e1)](_0x156bd7(0x1c2));}function parseParams(_0x5e1b7d){const _0x85e1fa=a96_0x3837f2;if(!_0x5e1b7d)return{};try{const _0x303720=JSON[_0x85e1fa(0x1eb)](_0x5e1b7d);if(typeof _0x303720!=='object'||_0x303720===null||Array[_0x85e1fa(0x1ee)](_0x303720))return{};return{'jsUrl':typeof _0x303720[_0x85e1fa(0x1d6)]===_0x85e1fa(0x208)?_0x303720['jsUrl'][_0x85e1fa(0x1d8)]():undefined,'cssUrl':typeof _0x303720['cssUrl']===_0x85e1fa(0x208)?_0x303720['cssUrl'][_0x85e1fa(0x1d8)]():undefined};}catch{return{};}}
1
+ const a96_0x31062e=a96_0x23b7;(function(_0x21bb69,_0x5cb512){const _0x1b5d6f=a96_0x23b7,_0x55bed3=_0x21bb69();while(!![]){try{const _0x2f3ad6=parseInt(_0x1b5d6f(0x1bd))/0x1*(parseInt(_0x1b5d6f(0x1cd))/0x2)+-parseInt(_0x1b5d6f(0x1df))/0x3+-parseInt(_0x1b5d6f(0x1e9))/0x4*(-parseInt(_0x1b5d6f(0x1c1))/0x5)+parseInt(_0x1b5d6f(0x1c4))/0x6+-parseInt(_0x1b5d6f(0x1da))/0x7*(-parseInt(_0x1b5d6f(0x1cb))/0x8)+-parseInt(_0x1b5d6f(0x1bc))/0x9+parseInt(_0x1b5d6f(0x1ac))/0xa;if(_0x2f3ad6===_0x5cb512)break;else _0x55bed3['push'](_0x55bed3['shift']());}catch(_0x433621){_0x55bed3['push'](_0x55bed3['shift']());}}}(a96_0x2035,0x32c31));import a96_0x15b1c9 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a96_0x23b7(_0x867157,_0x3e52ba){_0x867157=_0x867157-0x1ab;const _0x2035f6=a96_0x2035();let _0x23b71b=_0x2035f6[_0x867157];return _0x23b71b;}import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';function a96_0x2035(){const _0x20c289=['5WLUrrl','appcode','\x20menu(s)\x20with\x20JS:\x20','119982EsXnhD','map','trim','\x20\x20Found\x20','cssUrl','updated','diffs','3109192qZRTNq','cyan','10CBxgcs','Online\x20menu\x20list\x20fetched','\x20and\x20CSS:\x20','validation','menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','\x20menu(s)\x20with\x20existing\x20resources','Menu\x20update\x20skipped','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','Updating\x20','update','Menu\x20update\x20failed','7IqReeR','string','\x20menu(s)','\x20updated,\x20','flag','1132542vDNKgC','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20menu(s)...','length','\x20menu(s)\x20updated','label','isArray','selectedAppName','\x20\x20Cancelled.','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','21940DFUMJI','rawFlags','bool','mode','\x20\x20Update\x20','jsUrl','Menu\x20update\x20completed:\x20','skipped','parse','✓\x20Menu\x20update\x20completed:\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','failed','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation;\x20requires\x20--params','high-risk-write','4821210oWFeeg','\x20menu(s)\x20failed','cookie','str','yes','appCode','gray','force','message','Updated\x20','boolean','replace','yellow','\x20failed.','patch','params','3347523TwGBID','12226tlxKtj','\x20updated.','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','Fetching\x20online\x20menu\x20list...'];a96_0x2035=function(){return _0x20c289;};return a96_0x2035();}export const menuUpdate={'service':'menu','command':a96_0x31062e(0x1d8),'description':a96_0x31062e(0x1d6),'risk':a96_0x31062e(0x1ab),'flags':[{'name':a96_0x31062e(0x1bb),'type':'string','description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+a96_0x31062e(0x1f3)},{'name':a96_0x31062e(0x1b0),'type':'boolean','description':a96_0x31062e(0x1f5)},{'name':a96_0x31062e(0x1ec),'type':a96_0x31062e(0x1db),'description':'Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20patch\x20replaces\x20only\x20supplied\x20resource\x20types','enum':[a96_0x31062e(0x1b7),a96_0x31062e(0x1ba)],'default':a96_0x31062e(0x1b7)},{'name':a96_0x31062e(0x1b3),'type':a96_0x31062e(0x1b6),'description':a96_0x31062e(0x1e8)}],async 'dryRun'(_0x3398ba){const _0x4b6ec1=a96_0x31062e;ensureRunnableContext(_0x3398ba['rawFlags'],_0x3398ba[_0x4b6ec1(0x1e6)]);const _0x3f021e=await runMenuUpdateCore(_0x3398ba[_0x4b6ec1(0x1b1)],_0x3398ba[_0x4b6ec1(0x1ae)],_0x3398ba[_0x4b6ec1(0x1af)](_0x4b6ec1(0x1bb)),{'mode':parseMode(_0x3398ba[_0x4b6ec1(0x1af)]('mode')),'dryRun':!![],'force':_0x3398ba[_0x4b6ec1(0x1eb)](_0x4b6ec1(0x1b3))});return{'method':'POST','url':'/smartapi/menu/update','body':_0x3f021e,'description':_0x3f021e[_0x4b6ec1(0x1f0)]?'No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.':'Would\x20update\x20'+(_0x3f021e[_0x4b6ec1(0x1ca)]?.[_0x4b6ec1(0x1e2)]??0x0)+'\x20menu\x20resource\x20set(s).'};},async 'execute'(_0x1332b8){const _0x21d58a=a96_0x31062e;ensureRunnableContext(_0x1332b8[_0x21d58a(0x1ea)],_0x1332b8['selectedAppName']);const _0x3d9b18=_0x1332b8[_0x21d58a(0x1de)](_0x21d58a(0x1b0)),_0x1e85fc=_0x1332b8[_0x21d58a(0x1af)](_0x21d58a(0x1bb)),_0x53f345=parseMode(_0x1332b8[_0x21d58a(0x1af)]('mode')),_0x450c0d=_0x1332b8[_0x21d58a(0x1eb)](_0x21d58a(0x1b3)),_0xe6dd2d=parseParams(_0x1e85fc),_0x1fd7db=!!(_0xe6dd2d[_0x21d58a(0x1ee)]||_0xe6dd2d[_0x21d58a(0x1c8)]);if(_0x3d9b18||_0x1fd7db&&!isInteractive()){const _0x5cfa94=await runMenuUpdateCore(_0x1332b8[_0x21d58a(0x1b1)],_0x1332b8[_0x21d58a(0x1ae)],_0x1e85fc,{'mode':_0x53f345,'force':_0x450c0d});return _0x5cfa94[_0x21d58a(0x1f0)]?writeCliSideChannelLine(_0x21d58a(0x1bf)):(writeCliSideChannelLine(_0x21d58a(0x1f2)+_0x5cfa94[_0x21d58a(0x1c9)]+_0x21d58a(0x1e3)),_0x5cfa94[_0x21d58a(0x1f4)]>0x0&&writeCliSideChannelLine('!\x20'+_0x5cfa94[_0x21d58a(0x1f4)]+_0x21d58a(0x1ad))),{'ok':_0x5cfa94[_0x21d58a(0x1f4)]===0x0,'data':_0x5cfa94,'message':_0x5cfa94[_0x21d58a(0x1f0)]?_0x21d58a(0x1d5):'Menu\x20update\x20completed:\x20'+_0x5cfa94[_0x21d58a(0x1c9)]+_0x21d58a(0x1dd)+_0x5cfa94[_0x21d58a(0x1f4)]+_0x21d58a(0x1b9)};}requireInteractive();const _0x1e187d=startSpinner(_0x21d58a(0x1c0));let _0x3d97be;try{_0x3d97be=await fetchOnlineMenuList(_0x1332b8[_0x21d58a(0x1b1)],_0x1332b8[_0x21d58a(0x1ae)]),stopSpinner(_0x1e187d,_0x21d58a(0x1ce),!![]);}catch(_0x237d54){stopSpinner(_0x1e187d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x237d54 instanceof Error?_0x237d54[_0x21d58a(0x1b4)]:_0x21d58a(0x1e0));}const _0x282020=filterMenusWithResources(_0x3d97be);if(_0x282020[_0x21d58a(0x1e2)]===0x0)return writeCliSideChannelLine(a96_0x15b1c9[_0x21d58a(0x1b8)](_0x21d58a(0x1d3))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a96_0x15b1c9[_0x21d58a(0x1cc)](_0x21d58a(0x1c7)+_0x282020[_0x21d58a(0x1e2)]+_0x21d58a(0x1d4))),writeCliSideChannelLine(renderUpdateSummary(_0x282020[_0x21d58a(0x1c5)](_0xef026d=>_0xef026d[_0x21d58a(0x1e4)]),[_0xe6dd2d[_0x21d58a(0x1ee)],_0xe6dd2d[_0x21d58a(0x1c8)]])),writeCliSideChannelLine('');let _0x53998f=_0xe6dd2d['jsUrl'],_0x1e4600=_0xe6dd2d[_0x21d58a(0x1c8)];!_0x53998f&&(_0x53998f=await askJsUrl());!_0x1e4600&&(_0x1e4600=await askCssUrl());const _0x3e16dc=await askConfirm(_0x21d58a(0x1ed)+_0x282020[_0x21d58a(0x1e2)]+_0x21d58a(0x1c3)+_0x53998f+_0x21d58a(0x1cf)+_0x1e4600+'?');if(!_0x3e16dc)return writeCliSideChannelLine(a96_0x15b1c9[_0x21d58a(0x1b2)](_0x21d58a(0x1e7))),{'ok':!![]};const _0x5bc8c0=[_0x53998f,_0x1e4600],_0x35880d=startSpinner(_0x21d58a(0x1d7)+_0x282020[_0x21d58a(0x1e2)]+_0x21d58a(0x1e1));try{const _0x3568a1=await doUpdateCdnUrls(_0x1332b8['appCode'],_0x1332b8[_0x21d58a(0x1ae)],_0x282020,_0x5bc8c0);return stopSpinner(_0x35880d,_0x21d58a(0x1b5)+_0x3568a1[_0x21d58a(0x1c9)]+_0x21d58a(0x1dc),_0x3568a1[_0x21d58a(0x1f4)]===0x0),{'ok':_0x3568a1[_0x21d58a(0x1f4)]===0x0,'data':_0x3568a1,'message':_0x3568a1[_0x21d58a(0x1f4)]>0x0?_0x21d58a(0x1ef)+_0x3568a1[_0x21d58a(0x1c9)]+_0x21d58a(0x1dd)+_0x3568a1[_0x21d58a(0x1f4)]+'\x20failed.':_0x21d58a(0x1ef)+_0x3568a1[_0x21d58a(0x1c9)]+_0x21d58a(0x1be)};}catch(_0x5ec1f9){stopSpinner(_0x35880d,_0x21d58a(0x1d9),![]);throw CliErrors['validation'](_0x5ec1f9 instanceof Error?_0x5ec1f9[_0x21d58a(0x1b4)]:_0x21d58a(0x1d9));}}};function ensureRunnableContext(_0x4b29eb,_0xe184b0){const _0x2ab683=a96_0x31062e,_0x1d3292=_0x4b29eb[_0x2ab683(0x1c2)]?String(_0x4b29eb[_0x2ab683(0x1c2)])['trim']():'';if(!isInProject()&&!_0xe184b0&&!_0x1d3292)throw CliErrors[_0x2ab683(0x1d0)](_0x2ab683(0x1d1)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parseMode(_0x3ee3d8){const _0x50af48=a96_0x31062e;if(!_0x3ee3d8)return _0x50af48(0x1b7);if(_0x3ee3d8===_0x50af48(0x1b7)||_0x3ee3d8===_0x50af48(0x1ba))return _0x3ee3d8;throw CliErrors[_0x50af48(0x1d0)](_0x50af48(0x1d2));}function parseParams(_0x213832){const _0x41c824=a96_0x31062e;if(!_0x213832)return{};try{const _0x1ed283=JSON[_0x41c824(0x1f1)](_0x213832);if(typeof _0x1ed283!=='object'||_0x1ed283===null||Array[_0x41c824(0x1e5)](_0x1ed283))return{};return{'jsUrl':typeof _0x1ed283[_0x41c824(0x1ee)]==='string'?_0x1ed283[_0x41c824(0x1ee)][_0x41c824(0x1c6)]():undefined,'cssUrl':typeof _0x1ed283[_0x41c824(0x1c8)]==='string'?_0x1ed283[_0x41c824(0x1c8)]['trim']():undefined};}catch{return{};}}