@lovrabet/rabetbase-cli 2.5.5-beta.2 → 2.5.5

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 (363) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/delete.js +1 -1
  100. package/lib/commands/db/detail.js +1 -1
  101. package/lib/commands/db/diff-refresh-start.js +1 -1
  102. package/lib/commands/db/diff-refresh-status.js +1 -1
  103. package/lib/commands/db/diff.js +1 -1
  104. package/lib/commands/db/index.js +1 -1
  105. package/lib/commands/db/list.js +1 -1
  106. package/lib/commands/db/shared.js +1 -1
  107. package/lib/commands/db/table-diff-shared.js +1 -1
  108. package/lib/commands/db/tables.js +1 -1
  109. package/lib/commands/db/test.js +1 -1
  110. package/lib/commands/db/update.js +1 -1
  111. package/lib/commands/deployment/index.js +1 -1
  112. package/lib/commands/deployment/sync-all.js +1 -1
  113. package/lib/commands/deployment/sync-jobs.js +1 -1
  114. package/lib/commands/deployment/sync-status.js +1 -1
  115. package/lib/commands/doctor.js +1 -1
  116. package/lib/commands/file/index.js +1 -1
  117. package/lib/commands/flow/create.js +1 -1
  118. package/lib/commands/flow/detail.js +1 -1
  119. package/lib/commands/flow/index.js +1 -1
  120. package/lib/commands/flow/list.js +1 -1
  121. package/lib/commands/flow/publish.js +1 -1
  122. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  123. package/lib/commands/flow/runtime-role-list.js +1 -1
  124. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  125. package/lib/commands/flow/runtime-user-search.js +1 -1
  126. package/lib/commands/flow/shared.js +1 -1
  127. package/lib/commands/flow/update.js +1 -1
  128. package/lib/commands/flow/validate.js +1 -1
  129. package/lib/commands/instant-api-policy/current.js +1 -1
  130. package/lib/commands/instant-api-policy/index.js +1 -1
  131. package/lib/commands/instant-api-policy/init.js +1 -1
  132. package/lib/commands/instant-api-policy/publish.js +1 -1
  133. package/lib/commands/instant-api-policy/pull.js +1 -1
  134. package/lib/commands/instant-api-policy/revision.js +1 -1
  135. package/lib/commands/instant-api-policy/revisions.js +1 -1
  136. package/lib/commands/instant-api-policy/rollback.js +1 -1
  137. package/lib/commands/instant-api-policy/shared.js +1 -1
  138. package/lib/commands/instant-api-policy/validate.js +1 -1
  139. package/lib/commands/issue/index.js +1 -1
  140. package/lib/commands/issue/nudge.js +1 -1
  141. package/lib/commands/issue/report.js +1 -1
  142. package/lib/commands/issue/shared.js +1 -1
  143. package/lib/commands/kb/create.js +1 -1
  144. package/lib/commands/kb/delete.js +1 -1
  145. package/lib/commands/kb/detail.js +1 -1
  146. package/lib/commands/kb/index.js +1 -1
  147. package/lib/commands/kb/list.js +1 -1
  148. package/lib/commands/kb/search.js +1 -1
  149. package/lib/commands/kb/shared.js +1 -1
  150. package/lib/commands/kb/update.js +1 -1
  151. package/lib/commands/logs/index.js +1 -1
  152. package/lib/commands/menu/asset-update.js +1 -1
  153. package/lib/commands/menu/delete.js +1 -1
  154. package/lib/commands/menu/external-link-create.js +1 -1
  155. package/lib/commands/menu/external-link-update.js +1 -1
  156. package/lib/commands/menu/group-create.js +1 -1
  157. package/lib/commands/menu/group-update.js +1 -1
  158. package/lib/commands/menu/index.js +1 -1
  159. package/lib/commands/menu/list.js +1 -1
  160. package/lib/commands/menu/move.js +1 -1
  161. package/lib/commands/menu/regroup-start.js +1 -1
  162. package/lib/commands/menu/rename.js +1 -1
  163. package/lib/commands/menu/shared/compare-table.js +1 -1
  164. package/lib/commands/menu/shared/delete-plan.js +1 -1
  165. package/lib/commands/menu/shared/facts.js +1 -1
  166. package/lib/commands/menu/shared/index.js +1 -1
  167. package/lib/commands/menu/shared/inquirer.js +1 -1
  168. package/lib/commands/menu/shared/local-pages.js +1 -1
  169. package/lib/commands/menu/shared/logic.js +1 -1
  170. package/lib/commands/menu/shared/mutations.js +1 -1
  171. package/lib/commands/menu/shared/path.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  174. package/lib/commands/menu/shared/sync-core.js +1 -1
  175. package/lib/commands/menu/shared/update-core.js +1 -1
  176. package/lib/commands/menu/shared/valid-url.js +1 -1
  177. package/lib/commands/menu/subapp-assets-status.js +1 -1
  178. package/lib/commands/menu/subapp-assets-update.js +1 -1
  179. package/lib/commands/menu/sync.js +1 -1
  180. package/lib/commands/menu/visibility-update.js +1 -1
  181. package/lib/commands/notification/config-create.js +1 -1
  182. package/lib/commands/notification/config-delete.js +1 -1
  183. package/lib/commands/notification/config-list.js +1 -1
  184. package/lib/commands/notification/config-update.js +1 -1
  185. package/lib/commands/notification/index.js +1 -1
  186. package/lib/commands/notification/shared.js +1 -1
  187. package/lib/commands/ocr/index.js +1 -1
  188. package/lib/commands/page/create.js +1 -1
  189. package/lib/commands/page/custom/detail.js +1 -1
  190. package/lib/commands/page/custom/list.js +1 -1
  191. package/lib/commands/page/custom/publish.js +1 -1
  192. package/lib/commands/page/custom/shared.js +1 -1
  193. package/lib/commands/page/custom/syntax.js +1 -1
  194. package/lib/commands/page/custom/update.js +1 -1
  195. package/lib/commands/page/data-list-status.js +1 -1
  196. package/lib/commands/page/generate-start.js +1 -1
  197. package/lib/commands/page/generate-status.js +1 -1
  198. package/lib/commands/page/index.js +1 -1
  199. package/lib/commands/page/pull.js +1 -1
  200. package/lib/commands/page/push.js +1 -1
  201. package/lib/commands/page/relation-audit.js +1 -1
  202. package/lib/commands/page/restore.js +1 -1
  203. package/lib/commands/page/shared.js +1 -1
  204. package/lib/commands/page/sync.js +1 -1
  205. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  206. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  207. package/lib/commands/project/create/format-elapsed.js +1 -1
  208. package/lib/commands/project/create/main.js +1 -1
  209. package/lib/commands/project/create/materialize-project-template.js +1 -1
  210. package/lib/commands/project/create/project-name.js +1 -1
  211. package/lib/commands/project/create/project-template-archive.js +1 -1
  212. package/lib/commands/project/create/project-template-path.js +1 -1
  213. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  214. package/lib/commands/project/create/use-format-code.js +1 -1
  215. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  216. package/lib/commands/project/domain-routing-sync.js +1 -1
  217. package/lib/commands/project/index.js +1 -1
  218. package/lib/commands/project/upgrade.js +1 -1
  219. package/lib/commands/registry.js +1 -1
  220. package/lib/commands/role/delete.js +1 -1
  221. package/lib/commands/role/detail.js +1 -1
  222. package/lib/commands/role/index.js +1 -1
  223. package/lib/commands/role/list.js +1 -1
  224. package/lib/commands/role/shared.js +1 -1
  225. package/lib/commands/role/update.js +1 -1
  226. package/lib/commands/role/user-add.js +1 -1
  227. package/lib/commands/role/user-remove.js +1 -1
  228. package/lib/commands/role/user-resolve.js +1 -1
  229. package/lib/commands/rule/get.js +1 -1
  230. package/lib/commands/rule/index.js +1 -1
  231. package/lib/commands/rule/list.js +1 -1
  232. package/lib/commands/rule/set.js +1 -1
  233. package/lib/commands/rule/shared.js +1 -1
  234. package/lib/commands/run/index.js +1 -1
  235. package/lib/commands/schema.js +1 -1
  236. package/lib/commands/sql/create.js +1 -1
  237. package/lib/commands/sql/delete.js +1 -1
  238. package/lib/commands/sql/detail.js +1 -1
  239. package/lib/commands/sql/exec.js +1 -1
  240. package/lib/commands/sql/index.js +1 -1
  241. package/lib/commands/sql/list.js +1 -1
  242. package/lib/commands/sql/pull.js +1 -1
  243. package/lib/commands/sql/push.js +1 -1
  244. package/lib/commands/sql/shared.js +1 -1
  245. package/lib/commands/sql/status.js +1 -1
  246. package/lib/commands/sql/validate.js +1 -1
  247. package/lib/commands/task/index.js +1 -1
  248. package/lib/commands/task/status.js +1 -1
  249. package/lib/commands/tenant/index.js +1 -1
  250. package/lib/commands/tenant/members-list.js +1 -1
  251. package/lib/commands/tenant/shared.js +1 -1
  252. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  253. package/lib/commands/user-account/feishu-bind.js +1 -1
  254. package/lib/commands/user-account/index.js +1 -1
  255. package/lib/commands/workspace/add.js +1 -1
  256. package/lib/commands/workspace/index.js +1 -1
  257. package/lib/commands/workspace/remove.js +1 -1
  258. package/lib/config/domain-config.js +1 -1
  259. package/lib/config/project-domain-routing.js +1 -1
  260. package/lib/config/region-config.js +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.js +1 -1
  266. package/lib/constant/env.js +1 -1
  267. package/lib/constant/output.js +1 -1
  268. package/lib/constant/paths.js +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.js +1 -1
  272. package/lib/context/app-resolver.js +1 -1
  273. package/lib/context/auth-resolver.js +1 -1
  274. package/lib/context/config-loader.js +1 -1
  275. package/lib/context.js +1 -1
  276. package/lib/core/alias-resolver.js +1 -1
  277. package/lib/core/api-client.js +1 -1
  278. package/lib/core/bff/config.js +1 -1
  279. package/lib/core/bff/file-system.js +1 -1
  280. package/lib/core/bff/hash.js +1 -1
  281. package/lib/core/bff/hook-directory.js +1 -1
  282. package/lib/core/bff/lock.js +1 -1
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/cross-db-relation.js +1 -1
  285. package/lib/core/db-resolver.js +1 -1
  286. package/lib/core/flow-config.js +1 -1
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +1 -1
  357. package/skills/rabetbase/SKILL.md +3 -3
  358. package/skills/rabetbase/guides/independent-deployment.md +11 -1
  359. package/skills/rabetbase/references/rabetbase-config.md +16 -19
  360. package/skills/rabetbase/references/rabetbase-menu-visibility-update.md +5 -4
  361. package/skills/rabetbase/references/rabetbase-workspace.md +3 -1
  362. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  363. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a169_0x395969=a169_0x1eab;(function(_0x58f2a4,_0x5b94ee){const _0x244cd0=a169_0x1eab,_0x695d87=_0x58f2a4();while(!![]){try{const _0x923d0f=parseInt(_0x244cd0(0x192))/0x1*(parseInt(_0x244cd0(0x194))/0x2)+-parseInt(_0x244cd0(0x1ba))/0x3*(-parseInt(_0x244cd0(0x1e1))/0x4)+-parseInt(_0x244cd0(0x19c))/0x5+parseInt(_0x244cd0(0x18a))/0x6*(-parseInt(_0x244cd0(0x1cc))/0x7)+parseInt(_0x244cd0(0x1c2))/0x8+-parseInt(_0x244cd0(0x1d1))/0x9+parseInt(_0x244cd0(0x1c0))/0xa;if(_0x923d0f===_0x5b94ee)break;else _0x695d87['push'](_0x695d87['shift']());}catch(_0x141406){_0x695d87['push'](_0x695d87['shift']());}}}(a169_0x4356,0x5e4b7));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a169_0x395969(0x198),'required':!![],'description':a169_0x395969(0x1c8)};export const MENU_SORT_FLAG={'name':a169_0x395969(0x1cd),'type':a169_0x395969(0x198),'description':a169_0x395969(0x1d3)};export const MENU_PARENT_ID_FLAG={'name':a169_0x395969(0x1c3),'type':'string','description':a169_0x395969(0x1f4)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a169_0x395969(0x1ec),'type':a169_0x395969(0x1db),'description':a169_0x395969(0x1be)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a169_0x395969(0x1e7),'type':a169_0x395969(0x1db),'description':a169_0x395969(0x1ef)},{'name':'expected-children-count','type':a169_0x395969(0x198),'description':a169_0x395969(0x1e8)}];function a169_0x1eab(_0x4879de,_0x4a724b){_0x4879de=_0x4879de-0x186;const _0x435682=a169_0x4356();let _0x1eabbd=_0x435682[_0x4879de];return _0x1eabbd;}export function validateExactId(_0x5aef6f){const _0x5e6d3b=a169_0x395969,_0x3d8ff0=_0x5aef6f['num']('id');if(!Number[_0x5e6d3b(0x1f2)](_0x3d8ff0)||_0x3d8ff0<=0x0)throw CliErrors[_0x5e6d3b(0x1a6)](_0x5e6d3b(0x1ee));return _0x3d8ff0;}export function validateSort(_0x305773,_0x2b2193=a169_0x395969(0x1cd)){const _0x4061af=a169_0x395969;if(!hasFlag(_0x305773,_0x2b2193))return undefined;const _0x577517=_0x305773[_0x4061af(0x1b1)](_0x2b2193);if(!Number[_0x4061af(0x1f2)](_0x577517)||_0x577517<0x0||_0x577517>MAX_MENU_SORT)throw menuError(_0x4061af(0x1d4),'--'+_0x2b2193+_0x4061af(0x1e0)+MAX_MENU_SORT+'.',_0x4061af(0x1a2));return _0x577517;}export function nextSiblingSort(_0x2ec4b6,_0x38093c,_0x5b6a84){const _0x3f5ab1=a169_0x395969,_0x3884f4=getChildren(_0x2ec4b6,_0x38093c)[_0x3f5ab1(0x1a5)](_0x161ceb=>_0x161ceb[_0x3f5ab1(0x1cd)])['filter'](_0x2b745e=>typeof _0x2b745e===_0x3f5ab1(0x198));if(_0x3884f4[_0x3f5ab1(0x1a1)]===0x0)return 0x0;const _0x5c497a=Math[_0x3f5ab1(0x1f0)](..._0x3884f4);if(_0x5c497a>=MAX_MENU_SORT)throw menuError(_0x3f5ab1(0x1bb),_0x3f5ab1(0x1d0)+_0x5b6a84+_0x3f5ab1(0x199)+_0x5c497a+'.',_0x3f5ab1(0x1d6)+MAX_MENU_SORT+_0x3f5ab1(0x1e9));return _0x5c497a+0x1;}export function requireExplicitYes(_0x402a76){const _0x55605a=a169_0x395969;if(_0x402a76['bool']('dry-run'))return;if(!_0x402a76[_0x55605a(0x18e)](_0x55605a(0x1a9)))throw menuError(_0x55605a(0x18f),_0x55605a(0x1b8),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export async function fetchMutationSnapshot(_0x34728b,_0x5d8f64,_0x5c5ffc){const _0x1b7715=a169_0x395969;try{return await fetchMenuSnapshot(_0x34728b['appCode'],_0x34728b[_0x1b7715(0x1f3)]);}catch(_0xb8d07d){throw mapMenuApiError(_0xb8d07d,_0x1b7715(0x189)+_0x5d8f64,_0x5c5ffc);}}export async function recheckMutationSnapshot(_0x1b8d90,_0x497db1,_0x50ecaa,_0x5c6cc0){const _0x18c8be=a169_0x395969;let _0x3f900d;try{_0x3f900d=await fetchMenuSnapshot(_0x1b8d90['appCode'],_0x1b8d90[_0x18c8be(0x1f3)]);}catch(_0x135d78){const _0x4b551e=mapMenuApiError(_0x135d78,_0x18c8be(0x1c9)+_0x50ecaa,_0x5c6cc0);throw menuFailure(_0x4b551e,_0x497db1,{'stage':_0x18c8be(0x1ab),'failed':_0x5c6cc0==null?{}:{'id':_0x5c6cc0}});}if(_0x3f900d[_0x18c8be(0x19d)]!==_0x497db1[_0x18c8be(0x1d7)]){const _0x284754=menuError(_0x18c8be(0x1e3),_0x18c8be(0x1ae)+_0x50ecaa+_0x18c8be(0x1c4),_0x18c8be(0x1ca));throw menuFailure(_0x284754,_0x497db1,{'stage':_0x18c8be(0x1ab),'failed':{..._0x5c6cc0==null?{}:{'id':_0x5c6cc0},'expectedSnapshotHash':_0x497db1[_0x18c8be(0x1d7)],'currentSnapshotHash':_0x3f900d[_0x18c8be(0x19d)]}});}return _0x3f900d;}export function parseParentId(_0xb6d708,_0x1e99c1,_0x8b2a31={}){const _0x2e4312=a169_0x395969;if(!hasFlag(_0xb6d708,_0x1e99c1)){if(_0x8b2a31['required'])throw CliErrors['flagMissing'](_0x1e99c1);return undefined;}const _0x2243f6=_0xb6d708[_0x2e4312(0x1ea)](_0x1e99c1)[_0x2e4312(0x1b4)]();if(_0x2243f6[_0x2e4312(0x1c7)]()==='root')return null;if(!/^\d+$/['test'](_0x2243f6))throw CliErrors['validation']('--'+_0x1e99c1+_0x2e4312(0x1bc));const _0x26a11e=Number(_0x2243f6);if(!Number[_0x2e4312(0x1f2)](_0x26a11e)||_0x26a11e<=0x0)throw CliErrors[_0x2e4312(0x1a6)]('--'+_0x1e99c1+_0x2e4312(0x1bc));return _0x26a11e;}export function requireMenu(_0x43d54b,_0x480709){const _0x5e639e=a169_0x395969,_0x1b05c0=_0x43d54b['byId'][_0x5e639e(0x1de)](_0x480709);if(!_0x1b05c0)throw menuError(_0x5e639e(0x1d2),_0x5e639e(0x1cb)+_0x480709,_0x5e639e(0x1d5));return _0x1b05c0;}export function requireFolder(_0x365235,_0x163ec1){const _0x5e1b5b=a169_0x395969,_0x787f6a=requireMenu(_0x365235,_0x163ec1);if(_0x787f6a[_0x5e1b5b(0x188)]!==_0x5e1b5b(0x1f5))throw menuError(_0x5e1b5b(0x1b0),_0x5e1b5b(0x1eb)+_0x163ec1+_0x5e1b5b(0x1dd)+(_0x787f6a[_0x5e1b5b(0x188)]||_0x5e1b5b(0x1a8))+_0x5e1b5b(0x1b7),'Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.');return _0x787f6a;}export function assertExpectedState(_0x24a857,_0xf2aa49){const _0x2c1778=a169_0x395969;if(hasFlag(_0x24a857,_0x2c1778(0x1ec))){const _0x3efee2=parseParentId(_0x24a857,_0x2c1778(0x1ec),{'required':!![]});if(_0xf2aa49[_0x2c1778(0x19e)]!==_0x3efee2)throw stateDrift('Menu\x20'+_0xf2aa49['id']+_0x2c1778(0x187)+formatParent(_0x3efee2)+_0x2c1778(0x1c1)+formatParent(_0xf2aa49[_0x2c1778(0x19e)])+'.');}if(hasFlag(_0x24a857,'expect-path')){const _0xf73add=_0x24a857['str'](_0x2c1778(0x1e7));if(_0xf2aa49[_0x2c1778(0x1a4)]!==_0xf73add)throw stateDrift(_0x2c1778(0x1eb)+_0xf2aa49['id']+_0x2c1778(0x1b2)+JSON[_0x2c1778(0x197)](_0xf73add)+',\x20current\x20'+JSON[_0x2c1778(0x197)](_0xf2aa49[_0x2c1778(0x1a4)])+'.');}if(hasFlag(_0x24a857,_0x2c1778(0x1ad))){const _0x4d10c8=_0x24a857['num'](_0x2c1778(0x1ad));if(!Number[_0x2c1778(0x1f2)](_0x4d10c8)||_0x4d10c8<0x0)throw CliErrors[_0x2c1778(0x1a6)](_0x2c1778(0x1e5));if(_0xf2aa49[_0x2c1778(0x1bd)]!==_0x4d10c8)throw stateDrift(_0x2c1778(0x1eb)+_0xf2aa49['id']+_0x2c1778(0x1bf)+_0x4d10c8+_0x2c1778(0x1c1)+_0xf2aa49[_0x2c1778(0x1bd)]+'.');}}export function assertVerified(_0x557067,_0x186054,_0x365537=a169_0x395969(0x1da)){const _0x246fb6=a169_0x395969;if(!_0x557067)throw menuError(_0x246fb6(0x1e2),_0x186054,_0x365537);}export function mutationResult(_0x34aae0){const _0x3306cb=a169_0x395969;return{'operation':_0x34aae0['operation'],'selector':_0x34aae0[_0x3306cb(0x1e4)],'before':_0x34aae0['before'],'after':_0x34aae0['after'],'dryRun':_0x34aae0[_0x3306cb(0x193)],'backend':_0x34aae0[_0x3306cb(0x1c5)],..._0x34aae0[_0x3306cb(0x191)]?{'plannedActions':_0x34aae0[_0x3306cb(0x191)]}:{},..._0x34aae0['targets']?{'targets':_0x34aae0['targets']}:{},..._0x34aae0[_0x3306cb(0x196)]?{'deleteOrder':_0x34aae0[_0x3306cb(0x196)]}:{},'snapshotHash':_0x34aae0[_0x3306cb(0x1d7)],..._0x34aae0[_0x3306cb(0x19f)]?{'cascade':_0x34aae0[_0x3306cb(0x19f)]}:{},..._0x34aae0['planFile']?{'planFile':_0x34aae0[_0x3306cb(0x18b)]}:{},'succeeded':_0x34aae0[_0x3306cb(0x1a7)]??[],'failed':_0x34aae0['failed']??[],'warnings':_0x34aae0[_0x3306cb(0x1ed)]??[],'verification':_0x34aae0[_0x3306cb(0x1c6)],'error':_0x34aae0[_0x3306cb(0x18d)]};}export function menuDryRunResult(_0x418b23,_0x1f5181){return{..._0x418b23,..._0x1f5181};}export function menuFailure(_0x291ac1,_0x44a578,_0x4c57d6){const _0x2ecb80=a169_0x395969,_0x447872=mutationResult({..._0x44a578,'after':_0x4c57d6['after']===undefined?_0x44a578[_0x2ecb80(0x1d9)]:_0x4c57d6[_0x2ecb80(0x1d9)],'backend':_0x4c57d6[_0x2ecb80(0x1c5)]??_0x44a578[_0x2ecb80(0x1c5)],'dryRun':![],'succeeded':_0x4c57d6['succeeded']??[],'failed':_0x4c57d6[_0x2ecb80(0x1e6)]??[{..._0x4c57d6['failed']??{},'stage':_0x4c57d6[_0x2ecb80(0x195)],'code':_0x291ac1['code'],'message':_0x291ac1[_0x2ecb80(0x1af)]}],'warnings':[..._0x44a578[_0x2ecb80(0x1ed)],..._0x4c57d6[_0x2ecb80(0x1ed)]??[]],'verification':_0x4c57d6[_0x2ecb80(0x1c6)],'error':{'code':_0x291ac1[_0x2ecb80(0x19a)],'message':_0x291ac1[_0x2ecb80(0x1af)],..._0x291ac1[_0x2ecb80(0x1df)]?{'hint':_0x291ac1[_0x2ecb80(0x1df)]}:{}}});return Object[_0x2ecb80(0x1f1)](_0x291ac1,_0x2ecb80(0x18c),{'value':_0x447872,'enumerable':!![],'configurable':!![]}),_0x291ac1;}export function asVerificationError(_0x5e0116,_0x1eded1){const _0x13d4bd=a169_0x395969;if(_0x5e0116 instanceof CliError&&_0x5e0116[_0x13d4bd(0x19a)]===_0x13d4bd(0x1e2))return _0x5e0116;const _0x958d0=_0x5e0116 instanceof Error?_0x5e0116[_0x13d4bd(0x1af)]:String(_0x5e0116);return menuError(_0x13d4bd(0x1e2),''+_0x1eded1+(_0x958d0?':\x20'+_0x958d0:''),_0x13d4bd(0x19b));}function a169_0x4356(){const _0x4fcf50=['Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','Reorder\x20sibling\x20menus\x20below\x20','snapshotHash','api_error','after','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','string','hasOwnProperty','\x20is\x20type\x20\x22','get','hint','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','2336996wqJVsx','menu_verification_failed','menu_state_drift','selector','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','failedRecords','expect-path','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','str','Menu\x20','expect-parent-id','warnings','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','max','defineProperty','isSafeInteger','cookie','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','folder','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','\x20parent\x20changed:\x20expected\x20','type','read\x20online\x20menu\x20facts\x20before\x20','19194GeTVcW','planFile','data','error','bool','menu_confirmation_required','Failed\x20to\x20','plannedActions','3RJABKF','dryRun','107444cliVsm','stage','deleteOrder','stringify','number','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','code','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','1206995ojMqsC','hash','parentId','cascade','prototype','length','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','root','path','map','validation','succeeded','unknown','yes','\x20menu\x20','pre-write-recheck','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','expected-children-count','Online\x20menu\x20state\x20changed\x20before\x20','message','menu_parent_not_folder','num','\x20path\x20changed:\x20expected\x20','test','trim','Permission\x20denied\x20while\x20attempting\x20to\x20','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','\x22,\x20not\x20folder.','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','call','3MTyvVC','menu_sort_overflow','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','childrenCount','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','\x20child\x20count\x20changed:\x20expected\x20','1505040CqrOOu',',\x20current\x20','540248QxqRlx','parent-id',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','backend','verification','toLowerCase','Exact\x20online\x20menu\x20id','recheck\x20online\x20menu\x20facts\x20before\x20','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','Online\x20menu\x20not\x20found:\x20','301xhRiNx','sort','rawFlags','menu_permission_denied','Cannot\x20append\x20a\x20','1784367qFVhLK','menu_not_found','Sibling\x20sort\x20value\x20(non-negative\x20integer)','menu_sort_invalid'];a169_0x4356=function(){return _0x4fcf50;};return a169_0x4356();}export function describeMenuErrorCause(_0x33ad9e,_0x46ca5f,_0x565457){const _0x857d9a=a169_0x395969,_0x836b7c=mapMenuApiError(_0x33ad9e,_0x46ca5f,_0x565457);return{'causeCode':_0x836b7c['code'],'causeMessage':_0x836b7c[_0x857d9a(0x1af)]};}export function hasFlag(_0x282717,_0x5a92ee){const _0x5d7e11=a169_0x395969;return Object[_0x5d7e11(0x1a0)][_0x5d7e11(0x1dc)][_0x5d7e11(0x1b9)](_0x282717['rawFlags'],_0x5a92ee)&&_0x282717[_0x5d7e11(0x1ce)][_0x5a92ee]!==undefined;}export function toApiParentId(_0x2869e6){return _0x2869e6??0x0;}export function formatParent(_0x152920){const _0x2c8c9a=a169_0x395969;return _0x152920==null?_0x2c8c9a(0x1a3):String(_0x152920);}export function menuError(_0x155e5c,_0x5a0705,_0x38e0c2){return new CliError(_0x155e5c,0x1,_0x5a0705,_0x38e0c2);}export function mapMenuApiError(_0xc7f012,_0x411052,_0x3dbbb5){const _0x5d3127=a169_0x395969;if(_0xc7f012 instanceof CliError&&_0xc7f012[_0x5d3127(0x19a)]!==_0x5d3127(0x1d8))return _0xc7f012;const _0xfea93a=_0xc7f012 instanceof Error?_0xc7f012['message']:String(_0xc7f012);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x5d3127(0x1b3)](_0xfea93a))return menuError(_0x5d3127(0x1cf),_0x5d3127(0x1b5)+_0x411052+(_0x3dbbb5?_0x5d3127(0x1aa)+_0x3dbbb5:'')+'.',_0x5d3127(0x1b6));return menuError('menu_mutation_failed',_0x5d3127(0x190)+_0x411052+(_0x3dbbb5?_0x5d3127(0x1aa)+_0x3dbbb5:'')+':\x20'+_0xfea93a,_0x5d3127(0x1ac));}export function isMenuResponseLoss(_0x27e796){const _0x6d3d29=a169_0x395969,_0x288308=_0x27e796 instanceof Error?_0x27e796[_0x6d3d29(0x1af)]:String(_0x27e796);if(_0x27e796 instanceof CliError)return _0x27e796[_0x6d3d29(0x19a)]==='api_error'&&/^Request (?:failed|timeout):/i[_0x6d3d29(0x1b3)](_0x288308);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x6d3d29(0x1b3)](_0x288308);}function stateDrift(_0x12a28b){const _0x33eb72=a169_0x395969;return menuError(_0x33eb72(0x1e3),_0x12a28b,_0x33eb72(0x186));}
1
+ const a169_0x4c9f12=a169_0x3a4e;function a169_0x3a4e(_0x131981,_0x2cc088){_0x131981=_0x131981-0x67;const _0x34e989=a169_0x34e9();let _0x3a4e50=_0x34e989[_0x131981];return _0x3a4e50;}(function(_0x20d884,_0x19f5ee){const _0x172a3e=a169_0x3a4e,_0x456789=_0x20d884();while(!![]){try{const _0x3107a3=-parseInt(_0x172a3e(0xa1))/0x1+parseInt(_0x172a3e(0xa8))/0x2+parseInt(_0x172a3e(0x9a))/0x3+-parseInt(_0x172a3e(0x68))/0x4+parseInt(_0x172a3e(0x6d))/0x5+-parseInt(_0x172a3e(0xc9))/0x6+-parseInt(_0x172a3e(0x71))/0x7*(-parseInt(_0x172a3e(0xb6))/0x8);if(_0x3107a3===_0x19f5ee)break;else _0x456789['push'](_0x456789['shift']());}catch(_0x18ae88){_0x456789['push'](_0x456789['shift']());}}}(a169_0x34e9,0xad58d));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Exact\x20online\x20menu\x20id'};export const MENU_SORT_FLAG={'name':'sort','type':a169_0x4c9f12(0x6f),'description':a169_0x4c9f12(0xc7)};export const MENU_PARENT_ID_FLAG={'name':a169_0x4c9f12(0x91),'type':a169_0x4c9f12(0xa3),'description':'Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node'};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a169_0x4c9f12(0xbb),'type':'string','description':a169_0x4c9f12(0x99)};function a169_0x34e9(){const _0x3239b6=['hasOwnProperty','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','selector','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','planFile','appCode','menu_sort_overflow','rawFlags','menu_not_found','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','cascade','parent-id','byId','call','snapshotHash','dryRun','deleteOrder','Failed\x20to\x20','read\x20online\x20menu\x20facts\x20before\x20','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','3471747ecQeBT','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','length','succeeded','menu_verification_failed','error','\x20parent\x20changed:\x20expected\x20','350007KJolAT','Permission\x20denied\x20while\x20attempting\x20to\x20','string','menu_state_drift','defineProperty','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','message','1218646JmYuKe','num','yes','operation','flagMissing','cookie','unknown','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','get','Reorder\x20sibling\x20menus\x20below\x20','root','hash','\x22,\x20not\x20folder.','stage','3152YWQWtO','verification','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','expected-children-count','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','expect-parent-id','warnings','isSafeInteger',',\x20current\x20','menu_mutation_failed','Cannot\x20append\x20a\x20','menu_sort_invalid','\x20path\x20changed:\x20expected\x20','targets','after','test','folder','Sibling\x20sort\x20value\x20(non-negative\x20integer)','filter','1011300MmWVvZ','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','plannedActions','pre-write-recheck','\x20is\x20type\x20\x22','4345020CRHBuh','bool','dry-run','failed','sort','1525855iUcGMF','toLowerCase','number','backend','4319BKgYVW','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','\x20menu\x20','Menu\x20','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','validation','childrenCount','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','menu_permission_denied','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','api_error','expect-path','str','max','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','parentId','required','recheck\x20online\x20menu\x20facts\x20before\x20','code','Online\x20menu\x20not\x20found:\x20'];a169_0x34e9=function(){return _0x3239b6;};return a169_0x34e9();}export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a169_0x4c9f12(0x7d),'type':a169_0x4c9f12(0xa3),'description':a169_0x4c9f12(0xaf)},{'name':a169_0x4c9f12(0xb9),'type':a169_0x4c9f12(0x6f),'description':a169_0x4c9f12(0x7a)}];export function validateExactId(_0x385d52){const _0x5c962c=a169_0x4c9f12,_0x54cc18=_0x385d52[_0x5c962c(0xa9)]('id');if(!Number[_0x5c962c(0xbd)](_0x54cc18)||_0x54cc18<=0x0)throw CliErrors['validation'](_0x5c962c(0xa6));return _0x54cc18;}export function validateSort(_0x114046,_0x5a3581=a169_0x4c9f12(0x6c)){const _0x2ef5df=a169_0x4c9f12;if(!hasFlag(_0x114046,_0x5a3581))return undefined;const _0x30174c=_0x114046[_0x2ef5df(0xa9)](_0x5a3581);if(!Number[_0x2ef5df(0xbd)](_0x30174c)||_0x30174c<0x0||_0x30174c>MAX_MENU_SORT)throw menuError(_0x2ef5df(0xc1),'--'+_0x5a3581+_0x2ef5df(0x75)+MAX_MENU_SORT+'.',_0x2ef5df(0x8f));return _0x30174c;}export function nextSiblingSort(_0x25c8c9,_0x42a3e2,_0x5345e8){const _0x1087ee=a169_0x4c9f12,_0x2053ef=getChildren(_0x25c8c9,_0x42a3e2)['map'](_0x3c47cf=>_0x3c47cf[_0x1087ee(0x6c)])[_0x1087ee(0xc8)](_0xc9ce2f=>typeof _0xc9ce2f===_0x1087ee(0x6f));if(_0x2053ef[_0x1087ee(0x9c)]===0x0)return 0x0;const _0x53587c=Math[_0x1087ee(0x7f)](..._0x2053ef);if(_0x53587c>=MAX_MENU_SORT)throw menuError(_0x1087ee(0x8c),_0x1087ee(0xc0)+_0x5345e8+_0x1087ee(0x9b)+_0x53587c+'.',_0x1087ee(0xb1)+MAX_MENU_SORT+',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.');return _0x53587c+0x1;}export function requireExplicitYes(_0x55f8b7){const _0x27fed6=a169_0x4c9f12;if(_0x55f8b7[_0x27fed6(0x69)](_0x27fed6(0x6a)))return;if(!_0x55f8b7['bool'](_0x27fed6(0xaa)))throw menuError('menu_confirmation_required',_0x27fed6(0xb8),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export async function fetchMutationSnapshot(_0xe62c62,_0x19bf4f,_0xc1ad5a){const _0x51636e=a169_0x4c9f12;try{return await fetchMenuSnapshot(_0xe62c62[_0x51636e(0x8b)],_0xe62c62[_0x51636e(0xad)]);}catch(_0x5d5a1c){throw mapMenuApiError(_0x5d5a1c,_0x51636e(0x98)+_0x19bf4f,_0xc1ad5a);}}export async function recheckMutationSnapshot(_0x402f91,_0x263cc7,_0x51bb99,_0x49df01){const _0x214d01=a169_0x4c9f12;let _0x4e1e04;try{_0x4e1e04=await fetchMenuSnapshot(_0x402f91[_0x214d01(0x8b)],_0x402f91['cookie']);}catch(_0x1f9747){const _0x24c948=mapMenuApiError(_0x1f9747,_0x214d01(0x83)+_0x51bb99,_0x49df01);throw menuFailure(_0x24c948,_0x263cc7,{'stage':_0x214d01(0xcc),'failed':_0x49df01==null?{}:{'id':_0x49df01}});}if(_0x4e1e04[_0x214d01(0xb3)]!==_0x263cc7[_0x214d01(0x94)]){const _0xf24dbe=menuError(_0x214d01(0xa4),'Online\x20menu\x20state\x20changed\x20before\x20'+_0x51bb99+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.',_0x214d01(0x7b));throw menuFailure(_0xf24dbe,_0x263cc7,{'stage':_0x214d01(0xcc),'failed':{..._0x49df01==null?{}:{'id':_0x49df01},'expectedSnapshotHash':_0x263cc7[_0x214d01(0x94)],'currentSnapshotHash':_0x4e1e04[_0x214d01(0xb3)]}});}return _0x4e1e04;}export function parseParentId(_0x1461c4,_0x27b676,_0x2d9c42={}){const _0x3d6de9=a169_0x4c9f12;if(!hasFlag(_0x1461c4,_0x27b676)){if(_0x2d9c42[_0x3d6de9(0x82)])throw CliErrors[_0x3d6de9(0xac)](_0x27b676);return undefined;}const _0x293bb7=_0x1461c4['str'](_0x27b676)['trim']();if(_0x293bb7[_0x3d6de9(0x6e)]()===_0x3d6de9(0xb2))return null;if(!/^\d+$/[_0x3d6de9(0xc5)](_0x293bb7))throw CliErrors[_0x3d6de9(0x76)]('--'+_0x27b676+_0x3d6de9(0xba));const _0x13d613=Number(_0x293bb7);if(!Number[_0x3d6de9(0xbd)](_0x13d613)||_0x13d613<=0x0)throw CliErrors['validation']('--'+_0x27b676+_0x3d6de9(0xba));return _0x13d613;}export function requireMenu(_0x21ed70,_0x1baea9){const _0x3387cb=a169_0x4c9f12,_0x33d999=_0x21ed70[_0x3387cb(0x92)][_0x3387cb(0xb0)](_0x1baea9);if(!_0x33d999)throw menuError(_0x3387cb(0x8e),_0x3387cb(0x85)+_0x1baea9,_0x3387cb(0x80));return _0x33d999;}export function requireFolder(_0x2e3efb,_0x40b9ee){const _0x180dc6=a169_0x4c9f12,_0x523ab5=requireMenu(_0x2e3efb,_0x40b9ee);if(_0x523ab5['type']!==_0x180dc6(0xc6))throw menuError('menu_parent_not_folder',_0x180dc6(0x74)+_0x40b9ee+_0x180dc6(0x67)+(_0x523ab5['type']||_0x180dc6(0xae))+_0x180dc6(0xb4),_0x180dc6(0xca));return _0x523ab5;}export function assertExpectedState(_0x2971bc,_0x5e5d9d){const _0x3da917=a169_0x4c9f12;if(hasFlag(_0x2971bc,_0x3da917(0xbb))){const _0x1161aa=parseParentId(_0x2971bc,_0x3da917(0xbb),{'required':!![]});if(_0x5e5d9d[_0x3da917(0x81)]!==_0x1161aa)throw stateDrift(_0x3da917(0x74)+_0x5e5d9d['id']+_0x3da917(0xa0)+formatParent(_0x1161aa)+_0x3da917(0xbe)+formatParent(_0x5e5d9d[_0x3da917(0x81)])+'.');}if(hasFlag(_0x2971bc,_0x3da917(0x7d))){const _0x52f654=_0x2971bc[_0x3da917(0x7e)](_0x3da917(0x7d));if(_0x5e5d9d['path']!==_0x52f654)throw stateDrift(_0x3da917(0x74)+_0x5e5d9d['id']+_0x3da917(0xc2)+JSON['stringify'](_0x52f654)+_0x3da917(0xbe)+JSON['stringify'](_0x5e5d9d['path'])+'.');}if(hasFlag(_0x2971bc,_0x3da917(0xb9))){const _0x4656dc=_0x2971bc['num'](_0x3da917(0xb9));if(!Number[_0x3da917(0xbd)](_0x4656dc)||_0x4656dc<0x0)throw CliErrors[_0x3da917(0x76)](_0x3da917(0x78));if(_0x5e5d9d[_0x3da917(0x77)]!==_0x4656dc)throw stateDrift(_0x3da917(0x74)+_0x5e5d9d['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x4656dc+_0x3da917(0xbe)+_0x5e5d9d[_0x3da917(0x77)]+'.');}}export function assertVerified(_0x2fbf49,_0x6ea8f8,_0x2c3644='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){const _0x56400a=a169_0x4c9f12;if(!_0x2fbf49)throw menuError(_0x56400a(0x9e),_0x6ea8f8,_0x2c3644);}export function mutationResult(_0x4e9724){const _0x5c7c84=a169_0x4c9f12;return{'operation':_0x4e9724[_0x5c7c84(0xab)],'selector':_0x4e9724[_0x5c7c84(0x88)],'before':_0x4e9724['before'],'after':_0x4e9724['after'],'dryRun':_0x4e9724[_0x5c7c84(0x95)],'backend':_0x4e9724[_0x5c7c84(0x70)],..._0x4e9724[_0x5c7c84(0xcb)]?{'plannedActions':_0x4e9724[_0x5c7c84(0xcb)]}:{},..._0x4e9724[_0x5c7c84(0xc3)]?{'targets':_0x4e9724[_0x5c7c84(0xc3)]}:{},..._0x4e9724[_0x5c7c84(0x96)]?{'deleteOrder':_0x4e9724[_0x5c7c84(0x96)]}:{},'snapshotHash':_0x4e9724[_0x5c7c84(0x94)],..._0x4e9724[_0x5c7c84(0x90)]?{'cascade':_0x4e9724[_0x5c7c84(0x90)]}:{},..._0x4e9724[_0x5c7c84(0x8a)]?{'planFile':_0x4e9724[_0x5c7c84(0x8a)]}:{},'succeeded':_0x4e9724['succeeded']??[],'failed':_0x4e9724[_0x5c7c84(0x6b)]??[],'warnings':_0x4e9724['warnings']??[],'verification':_0x4e9724[_0x5c7c84(0xb7)],'error':_0x4e9724[_0x5c7c84(0x9f)]};}export function menuDryRunResult(_0x36479f,_0xac0a8a){return{..._0x36479f,..._0xac0a8a};}export function menuFailure(_0x28a2da,_0xafc01b,_0x445015){const _0x2800d7=a169_0x4c9f12,_0x54e987=mutationResult({..._0xafc01b,'after':_0x445015[_0x2800d7(0xc4)]===undefined?_0xafc01b[_0x2800d7(0xc4)]:_0x445015[_0x2800d7(0xc4)],'backend':_0x445015[_0x2800d7(0x70)]??_0xafc01b[_0x2800d7(0x70)],'dryRun':![],'succeeded':_0x445015[_0x2800d7(0x9d)]??[],'failed':_0x445015['failedRecords']??[{..._0x445015[_0x2800d7(0x6b)]??{},'stage':_0x445015[_0x2800d7(0xb5)],'code':_0x28a2da[_0x2800d7(0x84)],'message':_0x28a2da['message']}],'warnings':[..._0xafc01b[_0x2800d7(0xbc)],..._0x445015[_0x2800d7(0xbc)]??[]],'verification':_0x445015[_0x2800d7(0xb7)],'error':{'code':_0x28a2da[_0x2800d7(0x84)],'message':_0x28a2da[_0x2800d7(0xa7)],..._0x28a2da['hint']?{'hint':_0x28a2da['hint']}:{}}});return Object[_0x2800d7(0xa5)](_0x28a2da,'data',{'value':_0x54e987,'enumerable':!![],'configurable':!![]}),_0x28a2da;}export function asVerificationError(_0xc0142f,_0x2ffc83){const _0x5d2a1e=a169_0x4c9f12;if(_0xc0142f instanceof CliError&&_0xc0142f[_0x5d2a1e(0x84)]==='menu_verification_failed')return _0xc0142f;const _0x282dc3=_0xc0142f instanceof Error?_0xc0142f[_0x5d2a1e(0xa7)]:String(_0xc0142f);return menuError(_0x5d2a1e(0x9e),''+_0x2ffc83+(_0x282dc3?':\x20'+_0x282dc3:''),'The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.');}export function describeMenuErrorCause(_0x4a7354,_0x18196d,_0x5b82ac){const _0x4c092c=a169_0x4c9f12,_0x24ff39=mapMenuApiError(_0x4a7354,_0x18196d,_0x5b82ac);return{'causeCode':_0x24ff39[_0x4c092c(0x84)],'causeMessage':_0x24ff39['message']};}export function hasFlag(_0x22c678,_0x1fe898){const _0x36c8c2=a169_0x4c9f12;return Object['prototype'][_0x36c8c2(0x86)][_0x36c8c2(0x93)](_0x22c678[_0x36c8c2(0x8d)],_0x1fe898)&&_0x22c678[_0x36c8c2(0x8d)][_0x1fe898]!==undefined;}export function toApiParentId(_0x19f715){return _0x19f715??0x0;}export function formatParent(_0xeb8519){const _0x37d9c0=a169_0x4c9f12;return _0xeb8519==null?_0x37d9c0(0xb2):String(_0xeb8519);}export function menuError(_0xd10b14,_0x25b9b3,_0x2d9f8e){return new CliError(_0xd10b14,0x1,_0x25b9b3,_0x2d9f8e);}export function mapMenuApiError(_0x3e4bc4,_0x34637d,_0x5d7082){const _0x364149=a169_0x4c9f12;if(_0x3e4bc4 instanceof CliError&&_0x3e4bc4[_0x364149(0x84)]!==_0x364149(0x7c))return _0x3e4bc4;const _0x469f5a=_0x3e4bc4 instanceof Error?_0x3e4bc4[_0x364149(0xa7)]:String(_0x3e4bc4);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x364149(0xc5)](_0x469f5a))return menuError(_0x364149(0x79),_0x364149(0xa2)+_0x34637d+(_0x5d7082?_0x364149(0x73)+_0x5d7082:'')+'.',_0x364149(0x72));return menuError(_0x364149(0xbf),_0x364149(0x97)+_0x34637d+(_0x5d7082?_0x364149(0x73)+_0x5d7082:'')+':\x20'+_0x469f5a,_0x364149(0x89));}export function isMenuResponseLoss(_0x4c0ec8){const _0x430ff2=a169_0x4c9f12,_0x58b1a4=_0x4c0ec8 instanceof Error?_0x4c0ec8['message']:String(_0x4c0ec8);if(_0x4c0ec8 instanceof CliError)return _0x4c0ec8[_0x430ff2(0x84)]==='api_error'&&/^Request (?:failed|timeout):/i[_0x430ff2(0xc5)](_0x58b1a4);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x430ff2(0xc5)](_0x58b1a4);}function stateDrift(_0x48bc8c){const _0x3d4f84=a169_0x4c9f12;return menuError(_0x3d4f84(0xa4),_0x48bc8c,_0x3d4f84(0x87));}
@@ -1 +1 @@
1
- function a170_0x3482(_0xbbb58e,_0x32ef15){_0xbbb58e=_0xbbb58e-0xc1;const _0x306fd1=a170_0x306f();let _0x348266=_0x306fd1[_0xbbb58e];return _0x348266;}(function(_0x17dcf2,_0x1cae7e){const _0x4452e5=a170_0x3482,_0xa58000=_0x17dcf2();while(!![]){try{const _0x161200=parseInt(_0x4452e5(0xc5))/0x1*(-parseInt(_0x4452e5(0xc3))/0x2)+parseInt(_0x4452e5(0xc6))/0x3*(parseInt(_0x4452e5(0xcc))/0x4)+-parseInt(_0x4452e5(0xca))/0x5*(-parseInt(_0x4452e5(0xc8))/0x6)+-parseInt(_0x4452e5(0xc9))/0x7+-parseInt(_0x4452e5(0xc4))/0x8+-parseInt(_0x4452e5(0xcb))/0x9+parseInt(_0x4452e5(0xc7))/0xa;if(_0x161200===_0x1cae7e)break;else _0xa58000['push'](_0xa58000['shift']());}catch(_0x136979){_0xa58000['push'](_0xa58000['shift']());}}}(a170_0x306f,0xc1e51));function a170_0x306f(){const _0x3aa197=['trim','replace','2184328AHpvzu','10623056nmrlZQ','1MtYNSt','896724CiDhCy','42066500iBrRLA','24372tgUBwk','8571808UnRQms','55sMLrAX','11763801HBnEfZ','20BPwzDE'];a170_0x306f=function(){return _0x3aa197;};return a170_0x306f();}export function menuPathKey(_0x52831e){const _0x54f567=a170_0x3482,_0x5a15f2=_0x52831e[_0x54f567(0xc1)]();if(!_0x5a15f2)return'';return _0x5a15f2['replace'](/^\/+/,'')[_0x54f567(0xc2)](/\/+$/,'')||'/';}
1
+ (function(_0x82f79e,_0x36e1f9){const _0x20c6e9=a170_0x2c10,_0x58465f=_0x82f79e();while(!![]){try{const _0x53e1e0=parseInt(_0x20c6e9(0xda))/0x1+parseInt(_0x20c6e9(0xde))/0x2+parseInt(_0x20c6e9(0xd9))/0x3+-parseInt(_0x20c6e9(0xe0))/0x4+-parseInt(_0x20c6e9(0xdb))/0x5+-parseInt(_0x20c6e9(0xdf))/0x6*(-parseInt(_0x20c6e9(0xdd))/0x7)+-parseInt(_0x20c6e9(0xdc))/0x8;if(_0x53e1e0===_0x36e1f9)break;else _0x58465f['push'](_0x58465f['shift']());}catch(_0x369260){_0x58465f['push'](_0x58465f['shift']());}}}(a170_0x1052,0xa11ee));function a170_0x2c10(_0x1fbe48,_0x529a5d){_0x1fbe48=_0x1fbe48-0xd8;const _0x105254=a170_0x1052();let _0x2c101e=_0x105254[_0x1fbe48];return _0x2c101e;}function a170_0x1052(){const _0x51dfaf=['3246175AOwdOu','1249200xfRmYB','922992eSarHA','1416516lwzymZ','48AOvFot','1675696ZGdZNH','replace','trim','51033UyVNLG','104142jtQSYw'];a170_0x1052=function(){return _0x51dfaf;};return a170_0x1052();}export function menuPathKey(_0x1d7384){const _0x587dd5=a170_0x2c10,_0x3822f2=_0x1d7384[_0x587dd5(0xd8)]();if(!_0x3822f2)return'';return _0x3822f2[_0x587dd5(0xe1)](/^\/+/,'')['replace'](/\/+$/,'')||'/';}
@@ -1 +1 @@
1
- (function(_0xc0030b,_0x34cb02){const _0x5aded9=a171_0x4d72,_0x4137ca=_0xc0030b();while(!![]){try{const _0xfac9a1=-parseInt(_0x5aded9(0x7f))/0x1+-parseInt(_0x5aded9(0x77))/0x2+-parseInt(_0x5aded9(0x80))/0x3*(parseInt(_0x5aded9(0x6a))/0x4)+-parseInt(_0x5aded9(0x71))/0x5+-parseInt(_0x5aded9(0x89))/0x6+parseInt(_0x5aded9(0x85))/0x7*(parseInt(_0x5aded9(0x75))/0x8)+parseInt(_0x5aded9(0x87))/0x9;if(_0xfac9a1===_0x34cb02)break;else _0x4137ca['push'](_0x4137ca['shift']());}catch(_0x48af74){_0x4137ca['push'](_0x4137ca['shift']());}}}(a171_0x5b01,0x699b8));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a171_0x592217,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x7ff540,_0x251504){const _0x1dda46=a171_0x4d72,_0xeda938=getEnv();logger['info'](_0x1dda46(0x69),isProduction(_0xeda938)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x7ff540+')':_0x1dda46(0x70)+_0x7ff540+')');const _0xd2c78=await fetchMenuSnapshot(_0x7ff540,_0x251504,{'verbose':!![]});return logger[_0x1dda46(0x6c)](_0x1dda46(0x69),_0x1dda46(0x8b)+_0xd2c78['total']+_0x1dda46(0x76)),_0xd2c78[_0x1dda46(0x7a)][_0x1dda46(0x90)](toProcessedMenuItem);}export async function createMenu(_0x4178fb,_0x1c6b15,_0x46222f){const _0x50503d=a171_0x4d72;logger['info'](_0x50503d(0x88),'Creating\x20menu:\x20'+_0x46222f[_0x50503d(0x8c)]+'\x20('+_0x46222f['path']+')');const _0x457a65={'appCode':_0x4178fb,'type':_0x50503d(0x68),'sort':0x0,'extend':{'loadScriptMode':_0x50503d(0x81),'resources':_0x46222f[_0x50503d(0x73)]?JSON['stringify'](_0x46222f[_0x50503d(0x73)]):undefined},..._0x46222f},_0x414902=await createMenuRecord(_0x457a65,_0x1c6b15,'Create\x20menu\x20\x22'+_0x46222f['label']+'\x22');return logger[_0x50503d(0x6c)](_0x50503d(0x88),_0x50503d(0x72)+_0x46222f[_0x50503d(0x8c)]),_0x414902;}async function createSingleMenu(_0x1fad43,_0x7b87db,_0x23ab33,_0x15b9b5,_0x12c611){const _0x39db43=a171_0x4d72,_0x513d35={'appCode':_0x1fad43,'type':_0x39db43(0x68),'sort':_0x39db43(0x8e)in _0x23ab33&&typeof _0x23ab33[_0x39db43(0x8e)]===_0x39db43(0x84)?_0x23ab33[_0x39db43(0x8e)]:0x0,..._0x39db43(0x6d)in _0x23ab33&&typeof _0x23ab33[_0x39db43(0x6d)]===_0x39db43(0x6f)?{'visible':_0x23ab33[_0x39db43(0x6d)]}:{},...'parentId'in _0x23ab33&&typeof _0x23ab33[_0x39db43(0x6e)]===_0x39db43(0x84)?{'parentId':_0x23ab33[_0x39db43(0x6e)]}:{},'extend':{..._0x12c611?.[_0x39db43(0x83)]?{'appName':_0x12c611['appName']}:{},'loadScriptMode':_0x39db43(0x81),'resources':_0x15b9b5?JSON[_0x39db43(0x8d)](_0x15b9b5):undefined},'label':_0x23ab33[_0x39db43(0x8c)],'path':_0x23ab33['path']},_0x3fa7c0=await createMenuRecord(_0x513d35,_0x7b87db,_0x39db43(0x7d)+_0x23ab33[_0x39db43(0x8c)]+'\x22');return logger[_0x39db43(0x6c)](_0x39db43(0x88),_0x39db43(0x72)+_0x23ab33['label']),_0x3fa7c0;}export async function createMenus(_0x51266b,_0x444c70,_0x3555b2,_0x21510b,_0x4e09fd){const _0x4c0801=a171_0x4d72;logger['info']('create-menus',_0x4c0801(0x8a)+_0x3555b2[_0x4c0801(0x82)]);const _0x1eb1f1=await Promise['all'](_0x3555b2['map'](_0x5a4ba7=>createSingleMenu(_0x51266b,_0x444c70,_0x5a4ba7,_0x21510b,_0x4e09fd)));return logger[_0x4c0801(0x6c)]('create-menus',_0x4c0801(0x78)+_0x3555b2[_0x4c0801(0x82)]),_0x1eb1f1;}export async function updateMenuCdnUrl(_0x5c7d68,_0x3a0712,_0x2e5dab){const _0x5a5826=a171_0x4d72;logger['info'](_0x5a5826(0x6b),_0x5a5826(0x7b)+_0x2e5dab['label']+'\x20('+_0x2e5dab['path']+')');const _0x5ec8ec={'id':_0x2e5dab['id'],'appCode':_0x5c7d68,'extend':{..._0x2e5dab['extend']??{},..._0x2e5dab[_0x5a5826(0x7c)]?{'loadScriptMode':_0x2e5dab[_0x5a5826(0x7c)]}:{},'resources':_0x2e5dab['resources']?JSON[_0x5a5826(0x8d)](_0x2e5dab[_0x5a5826(0x73)]):undefined}},_0x17e68b=await updateMenuRecord(_0x5ec8ec,_0x3a0712,_0x5a5826(0x7e)+_0x2e5dab['label']+'\x22');return logger[_0x5a5826(0x6c)](_0x5a5826(0x6b),'Menu\x20assets\x20synced:\x20'+_0x2e5dab[_0x5a5826(0x8c)],undefined),_0x17e68b;}export async function createMenuEntity(_0x205054,_0x21ac4e,_0xb1c25f){return createMenuRecord({'appCode':_0x205054,..._0xb1c25f},_0x21ac4e,'Create\x20menu\x20\x22'+_0xb1c25f['label']+'\x22');}function a171_0x4d72(_0x41dd9d,_0x4a4df6){_0x41dd9d=_0x41dd9d-0x68;const _0x5b01da=a171_0x5b01();let _0x4d72b6=_0x5b01da[_0x41dd9d];return _0x4d72b6;}export async function updateMenuEntity(_0x2adff6,_0x3ad60b,_0x5740a2){const _0x564c73=a171_0x4d72;return updateMenuRecord({'appCode':_0x2adff6,..._0x5740a2},_0x3ad60b,_0x564c73(0x8f)+_0x5740a2['id']);}export async function batchDeleteMenuEntities(_0x2faa2a,_0x4921f5){const _0x569e29=a171_0x4d72;return batchDeleteMenuRecords(_0x4921f5,_0x2faa2a,_0x569e29(0x86)+_0x4921f5['length']+'\x20menu'+(_0x4921f5['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x55756c,_0x4cd5ea){const _0x2af7c1=a171_0x4d72;return a171_0x592217(_0x4cd5ea,_0x55756c,_0x2af7c1(0x79)+_0x4cd5ea['menuGroups'][_0x2af7c1(0x82)]+_0x2af7c1(0x74));}function a171_0x5b01(){const _0x282716=['visible','parentId','boolean','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','836210BqswjQ','Menu\x20created\x20successfully:\x20','resources','\x20menu\x20group(s)','705384irxSbu','\x20online\x20menus\x20successfully','1142434qEUKtr','Batch\x20menu\x20creation\x20completed,\x20total\x20','Regroup\x20','menus','Updating\x20menu\x20asset\x20links:\x20','loadScriptMode','Create\x20menu\x20\x22','Update\x20menu\x20assets\x20\x22','835524aUXDub','564348VueeLM','import','length','appName','number','14HZtdWq','Delete\x20','26155728DKGBpj','create-menu','4198530FLPzWH','Start\x20batch\x20menu\x20creation,\x20total\x20','Fetched\x20','label','stringify','order','Update\x20menu\x20','map','procode','get-online-menu-list','8XNvSjK','update-menu-cdn-url','info'];a171_0x5b01=function(){return _0x282716;};return a171_0x5b01();}
1
+ (function(_0x5238c4,_0x8ec22b){const _0x531334=a171_0x45c9,_0x5aac76=_0x5238c4();while(!![]){try{const _0x2b020c=-parseInt(_0x531334(0xa8))/0x1*(-parseInt(_0x531334(0xa2))/0x2)+-parseInt(_0x531334(0x98))/0x3+-parseInt(_0x531334(0x81))/0x4+parseInt(_0x531334(0xaa))/0x5+-parseInt(_0x531334(0x96))/0x6+parseInt(_0x531334(0xa7))/0x7*(parseInt(_0x531334(0x88))/0x8)+-parseInt(_0x531334(0xa3))/0x9*(-parseInt(_0x531334(0x8f))/0xa);if(_0x2b020c===_0x8ec22b)break;else _0x5aac76['push'](_0x5aac76['shift']());}catch(_0x248f00){_0x5aac76['push'](_0x5aac76['shift']());}}}(a171_0x53fa,0xe3b13));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';function a171_0x53fa(){const _0x437fac=['4733SwHwzT','visible','4937035CaKFPg','map','3713396bdnioc','resources','info','boolean','path','update-menu-cdn-url','get-online-menu-list','16JboGqJ','appName','Regroup\x20','Create\x20menu\x20\x22','extend','\x20menu\x20group(s)','Menu\x20created\x20successfully:\x20','69770yAqjGU','length','Update\x20menu\x20','\x20menu','import','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Fetched\x20','6894852NYQWwF','label','133131okeZUJ','stringify','Start\x20batch\x20menu\x20creation,\x20total\x20','procode','number','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Menu\x20assets\x20synced:\x20','create-menus','create-menu','Batch\x20menu\x20creation\x20completed,\x20total\x20','100YPKnlT','738iEduau','parentId','loadScriptMode','Updating\x20menu\x20asset\x20links:\x20','4404134NdAfRV'];a171_0x53fa=function(){return _0x437fac;};return a171_0x53fa();}import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a171_0x2a6469,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x327e55,_0x185b9c){const _0x281722=a171_0x45c9,_0x3c665c=getEnv();logger[_0x281722(0x83)](_0x281722(0x87),isProduction(_0x3c665c)?_0x281722(0x9d)+_0x327e55+')':_0x281722(0x94)+_0x327e55+')');const _0x426242=await fetchMenuSnapshot(_0x327e55,_0x185b9c,{'verbose':!![]});return logger[_0x281722(0x83)]('get-online-menu-list',_0x281722(0x95)+_0x426242['total']+'\x20online\x20menus\x20successfully'),_0x426242['menus'][_0x281722(0x80)](toProcessedMenuItem);}export async function createMenu(_0x3f096a,_0x5ca34b,_0x589c3e){const _0x375e1d=a171_0x45c9;logger[_0x375e1d(0x83)](_0x375e1d(0xa0),'Creating\x20menu:\x20'+_0x589c3e['label']+'\x20('+_0x589c3e['path']+')');const _0x59894a={'appCode':_0x3f096a,'type':_0x375e1d(0x9b),'sort':0x0,'extend':{'loadScriptMode':_0x375e1d(0x93),'resources':_0x589c3e[_0x375e1d(0x82)]?JSON[_0x375e1d(0x99)](_0x589c3e[_0x375e1d(0x82)]):undefined},..._0x589c3e},_0x1c9ca0=await createMenuRecord(_0x59894a,_0x5ca34b,'Create\x20menu\x20\x22'+_0x589c3e['label']+'\x22');return logger['info'](_0x375e1d(0xa0),_0x375e1d(0x8e)+_0x589c3e[_0x375e1d(0x97)]),_0x1c9ca0;}async function createSingleMenu(_0x296f34,_0x1d11f4,_0x4426d8,_0x2936c0,_0x42fbbc){const _0x168cc8=a171_0x45c9,_0x19c38b={'appCode':_0x296f34,'type':_0x168cc8(0x9b),'sort':'order'in _0x4426d8&&typeof _0x4426d8['order']===_0x168cc8(0x9c)?_0x4426d8['order']:0x0,..._0x168cc8(0xa9)in _0x4426d8&&typeof _0x4426d8[_0x168cc8(0xa9)]===_0x168cc8(0x84)?{'visible':_0x4426d8[_0x168cc8(0xa9)]}:{},..._0x168cc8(0xa4)in _0x4426d8&&typeof _0x4426d8[_0x168cc8(0xa4)]===_0x168cc8(0x9c)?{'parentId':_0x4426d8[_0x168cc8(0xa4)]}:{},'extend':{..._0x42fbbc?.[_0x168cc8(0x89)]?{'appName':_0x42fbbc[_0x168cc8(0x89)]}:{},'loadScriptMode':'import','resources':_0x2936c0?JSON[_0x168cc8(0x99)](_0x2936c0):undefined},'label':_0x4426d8[_0x168cc8(0x97)],'path':_0x4426d8[_0x168cc8(0x85)]},_0x16c62b=await createMenuRecord(_0x19c38b,_0x1d11f4,_0x168cc8(0x8b)+_0x4426d8['label']+'\x22');return logger[_0x168cc8(0x83)](_0x168cc8(0xa0),'Menu\x20created\x20successfully:\x20'+_0x4426d8['label']),_0x16c62b;}export async function createMenus(_0x1a93a9,_0x6e6c93,_0x39379b,_0x555bb3,_0x21beee){const _0x55b648=a171_0x45c9;logger[_0x55b648(0x83)](_0x55b648(0x9f),_0x55b648(0x9a)+_0x39379b[_0x55b648(0x90)]);const _0x55bd51=await Promise['all'](_0x39379b[_0x55b648(0x80)](_0x4159e2=>createSingleMenu(_0x1a93a9,_0x6e6c93,_0x4159e2,_0x555bb3,_0x21beee)));return logger['info'](_0x55b648(0x9f),_0x55b648(0xa1)+_0x39379b[_0x55b648(0x90)]),_0x55bd51;}function a171_0x45c9(_0x546418,_0x51ed5d){_0x546418=_0x546418-0x80;const _0x53fa68=a171_0x53fa();let _0x45c904=_0x53fa68[_0x546418];return _0x45c904;}export async function updateMenuCdnUrl(_0x558646,_0x188be7,_0x2333f7){const _0x43a295=a171_0x45c9;logger['info']('update-menu-cdn-url',_0x43a295(0xa6)+_0x2333f7[_0x43a295(0x97)]+'\x20('+_0x2333f7['path']+')');const _0x17753c={'id':_0x2333f7['id'],'appCode':_0x558646,'extend':{..._0x2333f7[_0x43a295(0x8c)]??{},..._0x2333f7[_0x43a295(0xa5)]?{'loadScriptMode':_0x2333f7['loadScriptMode']}:{},'resources':_0x2333f7['resources']?JSON[_0x43a295(0x99)](_0x2333f7[_0x43a295(0x82)]):undefined}},_0x2b3d90=await updateMenuRecord(_0x17753c,_0x188be7,'Update\x20menu\x20assets\x20\x22'+_0x2333f7['label']+'\x22');return logger[_0x43a295(0x83)](_0x43a295(0x86),_0x43a295(0x9e)+_0x2333f7[_0x43a295(0x97)],undefined),_0x2b3d90;}export async function createMenuEntity(_0x239099,_0x581140,_0x2abec4){const _0x20d339=a171_0x45c9;return createMenuRecord({'appCode':_0x239099,..._0x2abec4},_0x581140,_0x20d339(0x8b)+_0x2abec4[_0x20d339(0x97)]+'\x22');}export async function updateMenuEntity(_0x4c13f1,_0x432c83,_0x1c8a07){const _0x54da61=a171_0x45c9;return updateMenuRecord({'appCode':_0x4c13f1,..._0x1c8a07},_0x432c83,_0x54da61(0x91)+_0x1c8a07['id']);}export async function batchDeleteMenuEntities(_0x349d46,_0x185aef){const _0x1c9c8f=a171_0x45c9;return batchDeleteMenuRecords(_0x185aef,_0x349d46,'Delete\x20'+_0x185aef[_0x1c9c8f(0x90)]+_0x1c9c8f(0x92)+(_0x185aef[_0x1c9c8f(0x90)]===0x1?'':'s'));}export async function startMenuRegroup(_0x5126b0,_0x2354ea){const _0x45bb6b=a171_0x45c9;return a171_0x2a6469(_0x2354ea,_0x5126b0,_0x45bb6b(0x8a)+_0x2354ea['menuGroups'][_0x45bb6b(0x90)]+_0x45bb6b(0x8d));}
@@ -1 +1 @@
1
- const a172_0x58259e=a172_0x3212;(function(_0x63bef,_0x349252){const _0x4af907=a172_0x3212,_0x3cfe80=_0x63bef();while(!![]){try{const _0x385b18=parseInt(_0x4af907(0x13d))/0x1*(-parseInt(_0x4af907(0x13f))/0x2)+-parseInt(_0x4af907(0x13a))/0x3*(-parseInt(_0x4af907(0x137))/0x4)+parseInt(_0x4af907(0x121))/0x5*(-parseInt(_0x4af907(0x114))/0x6)+parseInt(_0x4af907(0x123))/0x7+parseInt(_0x4af907(0x127))/0x8+parseInt(_0x4af907(0x120))/0x9*(parseInt(_0x4af907(0x116))/0xa)+-parseInt(_0x4af907(0x12a))/0xb;if(_0x385b18===_0x349252)break;else _0x3cfe80['push'](_0x3cfe80['shift']());}catch(_0x420cbb){_0x3cfe80['push'](_0x3cfe80['shift']());}}}(a172_0x42b4,0xe2252));import{getSmartAppRecord}from'../../../core/api-client.js';function a172_0x42b4(){const _0x40b8f1=['\x20contains\x20invalid\x20JSON.','length','message','basename','isArray','\x20must\x20be\x20an\x20array\x20of\x20URLs.','11365569xBEHTk','10NiPMLr','resources','4622548rLTdSs','app.extend.assets[','string','trim','11790144zbmebd','filter','appName','10228889wokgBu','appCode','app','parse','object','loadScriptMode','validation','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','No\x20shared\x20resources\x20configured\x20for\x20','sharedResources','sharedConfigured','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','str','387052BdMkyN','menu\x20','some','15PwJwNV','--app-name\x20is\x20required.','assets','15389gqBwUb','menu','218WHIkZt','path','extend','app.extend.assets','\x20resources','1041594ETOpjP','fallbackDiffers','10LIvdjf','stringify','map','\x20must\x20be\x20a\x20JSON\x20object.'];a172_0x42b4=function(){return _0x40b8f1;};return a172_0x42b4();}import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x207470,_0x5c7b88){const _0x15b15e=a172_0x3212,_0x163b95=typeof _0x207470===_0x15b15e(0x125)?parseJson(_0x207470,_0x5c7b88):_0x207470;if(!_0x163b95||typeof _0x163b95!==_0x15b15e(0x12e)||Array[_0x15b15e(0x11e)](_0x163b95))throw CliErrors[_0x15b15e(0x130)](_0x5c7b88+_0x15b15e(0x119));return _0x163b95;}function a172_0x3212(_0x52d201,_0x45ac0c){_0x52d201=_0x52d201-0x112;const _0x42b4ac=a172_0x42b4();let _0x3212c0=_0x42b4ac[_0x52d201];return _0x3212c0;}function parseJson(_0x40084b,_0x54517c){const _0xebbc74=a172_0x3212;try{return JSON[_0xebbc74(0x12d)](_0x40084b);}catch{throw CliErrors[_0xebbc74(0x130)](_0x54517c+_0xebbc74(0x11a));}}function resourceList(_0x16dc20,_0x4279b8){const _0x283674=a172_0x3212;if(typeof _0x16dc20!==_0x283674(0x125))throw CliErrors[_0x283674(0x130)](_0x4279b8+'\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.');const _0x18d496=parseJson(_0x16dc20,_0x4279b8);if(!Array[_0x283674(0x11e)](_0x18d496)||_0x18d496[_0x283674(0x139)](_0x4b9ec8=>typeof _0x4b9ec8!==_0x283674(0x125)))throw CliErrors[_0x283674(0x130)](_0x4279b8+_0x283674(0x11f));return _0x18d496;}export function buildSubappAssetsStatus(_0x43bed0,_0x1305ff,_0xfd0f34){const _0x5cf808=a172_0x3212,_0x51850d=_0x43bed0['extend']==null?{}:objectValue(_0x43bed0[_0x5cf808(0x141)],'app.extend'),_0x502efc=_0x51850d[_0x5cf808(0x13c)]==null?[]:typeof _0x51850d[_0x5cf808(0x13c)]==='string'?parseJson(_0x51850d[_0x5cf808(0x13c)],_0x5cf808(0x112)):_0x51850d['assets'];if(!Array[_0x5cf808(0x11e)](_0x502efc))throw CliErrors[_0x5cf808(0x130)]('app.extend.assets\x20must\x20be\x20an\x20array.');const _0x15b2c8=_0x502efc[_0x5cf808(0x118)]((_0x391f2d,_0x4253de)=>objectValue(_0x391f2d,_0x5cf808(0x124)+_0x4253de+']')),_0x33f6c9=_0x15b2c8[_0x5cf808(0x128)](_0x5f44ca=>_0x5f44ca[_0x5cf808(0x129)]===_0xfd0f34);if(_0x33f6c9['length']>0x1)throw CliErrors['validation']('Duplicate\x20subapp\x20records\x20for\x20'+_0xfd0f34+'.');const _0x24268e=_0x33f6c9[0x0],_0x108efc=_0x24268e?.['resources']==null?[]:resourceList(_0x24268e['resources'],'subapp.resources'),_0x4605bb=_0x1305ff[_0x5cf808(0x128)](_0x1881b4=>_0x1881b4[_0x5cf808(0x141)]?.['appName']===_0xfd0f34),_0x298fc7=_0x4605bb[_0x5cf808(0x118)](_0x5c6816=>{const _0x22e51b=_0x5cf808;let _0x1b3a31=null,_0x1a9584=null;try{_0x1b3a31=_0x5c6816[_0x22e51b(0x141)]?.['resources']==null?_0x5c6816[_0x22e51b(0x122)]:resourceList(_0x5c6816[_0x22e51b(0x141)]['resources'],_0x22e51b(0x138)+_0x5c6816['id']+_0x22e51b(0x113));}catch(_0x25367e){_0x1a9584=_0x25367e instanceof Error?_0x25367e[_0x22e51b(0x11c)]:String(_0x25367e);}const _0x23de36=_0x108efc[_0x22e51b(0x11b)]>0x0?_0x22e51b(0x12c):_0x22e51b(0x13e),_0x2f5a3f=_0x23de36===_0x22e51b(0x12c)?_0x108efc:_0x1b3a31;return{'id':_0x5c6816['id'],'path':_0x5c6816[_0x22e51b(0x140)],'preferredSourceIfSupported':_0x23de36,'preferredResourcesIfSupported':_0x2f5a3f,'menuFallbackResources':_0x1b3a31,'menuFallbackError':_0x1a9584,'fallbackDiffers':_0x1b3a31===null?null:_0x23de36===_0x22e51b(0x12c)&&_0x1b3a31[_0x22e51b(0x11b)]>0x0&&JSON[_0x22e51b(0x117)](_0x1b3a31)!==JSON[_0x22e51b(0x117)](_0x2f5a3f)};});return{'appName':_0xfd0f34,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x24268e),'sharedResources':_0x108efc,'loadScriptMode':_0x24268e?.[_0x5cf808(0x12f)]??null,'basename':_0x24268e?.[_0x5cf808(0x11d)]??null,'boundMenus':_0x298fc7['length'],'staleMenuFallbacks':_0x298fc7[_0x5cf808(0x128)](_0x49fbe7=>_0x49fbe7[_0x5cf808(0x115)])['length'],'menus':_0x298fc7};}export async function assertSharedResourcesConfigured(_0x20d9e7,_0x234354,_0x2f9cae){const _0x35c276=a172_0x3212,_0x127f3a=await getSmartAppRecord(_0x20d9e7,_0x234354),_0x3aa471=buildSubappAssetsStatus(_0x127f3a,[],_0x2f9cae);if(!_0x3aa471[_0x35c276(0x134)]||_0x3aa471[_0x35c276(0x133)][_0x35c276(0x11b)]===0x0)throw CliErrors[_0x35c276(0x130)](_0x35c276(0x132)+_0x2f9cae+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a172_0x58259e(0x131)},{'name':'app-name','type':'string','required':!![],'description':a172_0x58259e(0x135)}];export function getSubappSelector(_0x187dbc){const _0x2a08c3=a172_0x58259e,_0x40c26f=_0x187dbc[_0x2a08c3(0x12b)],_0x478084=_0x187dbc[_0x2a08c3(0x136)]('app-name')[_0x2a08c3(0x126)]();if(!_0x478084)throw CliErrors[_0x2a08c3(0x130)](_0x2a08c3(0x13b));return{'appCode':_0x40c26f,'appName':_0x478084};}
1
+ const a172_0x3f11b0=a172_0x1695;(function(_0x3ad23d,_0x36a4ce){const _0x1ed0ee=a172_0x1695,_0x163ef6=_0x3ad23d();while(!![]){try{const _0x91831f=parseInt(_0x1ed0ee(0x109))/0x1+parseInt(_0x1ed0ee(0x101))/0x2+-parseInt(_0x1ed0ee(0xe8))/0x3+parseInt(_0x1ed0ee(0xfd))/0x4*(parseInt(_0x1ed0ee(0x10a))/0x5)+parseInt(_0x1ed0ee(0x10c))/0x6+-parseInt(_0x1ed0ee(0xff))/0x7*(-parseInt(_0x1ed0ee(0x10d))/0x8)+parseInt(_0x1ed0ee(0x10e))/0x9*(-parseInt(_0x1ed0ee(0xf9))/0xa);if(_0x91831f===_0x36a4ce)break;else _0x163ef6['push'](_0x163ef6['shift']());}catch(_0x3a1d4a){_0x163ef6['push'](_0x163ef6['shift']());}}}(a172_0x2bb8,0xda853));function a172_0x1695(_0xed62d2,_0x12f211){_0xed62d2=_0xed62d2-0xe8;const _0x2bb82e=a172_0x2bb8();let _0x169550=_0x2bb82e[_0xed62d2];return _0x169550;}import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x44222b,_0x229c77){const _0x5cc332=a172_0x1695,_0x36e70a=typeof _0x44222b==='string'?parseJson(_0x44222b,_0x229c77):_0x44222b;if(!_0x36e70a||typeof _0x36e70a!==_0x5cc332(0xf1)||Array['isArray'](_0x36e70a))throw CliErrors[_0x5cc332(0x115)](_0x229c77+_0x5cc332(0x107));return _0x36e70a;}function parseJson(_0x379bf7,_0x24b02a){const _0x3632bd=a172_0x1695;try{return JSON['parse'](_0x379bf7);}catch{throw CliErrors['validation'](_0x24b02a+_0x3632bd(0xed));}}function resourceList(_0x479646,_0x497fcf){const _0x18eaa2=a172_0x1695;if(typeof _0x479646!==_0x18eaa2(0xea))throw CliErrors[_0x18eaa2(0x115)](_0x497fcf+_0x18eaa2(0xef));const _0xd455bb=parseJson(_0x479646,_0x497fcf);if(!Array[_0x18eaa2(0x10b)](_0xd455bb)||_0xd455bb[_0x18eaa2(0x10f)](_0xa3155a=>typeof _0xa3155a!==_0x18eaa2(0xea)))throw CliErrors[_0x18eaa2(0x115)](_0x497fcf+_0x18eaa2(0xf0));return _0xd455bb;}export function buildSubappAssetsStatus(_0x27b2df,_0x3c5b78,_0x122941){const _0x1bdf0f=a172_0x1695,_0x934f19=_0x27b2df[_0x1bdf0f(0xf3)]==null?{}:objectValue(_0x27b2df[_0x1bdf0f(0xf3)],_0x1bdf0f(0xf4)),_0x476cdf=_0x934f19[_0x1bdf0f(0x104)]==null?[]:typeof _0x934f19[_0x1bdf0f(0x104)]===_0x1bdf0f(0xea)?parseJson(_0x934f19[_0x1bdf0f(0x104)],'app.extend.assets'):_0x934f19[_0x1bdf0f(0x104)];if(!Array[_0x1bdf0f(0x10b)](_0x476cdf))throw CliErrors['validation'](_0x1bdf0f(0x106));const _0x45d44c=_0x476cdf['map']((_0x58c654,_0x4eb861)=>objectValue(_0x58c654,_0x1bdf0f(0xfb)+_0x4eb861+']')),_0x296590=_0x45d44c['filter'](_0x3b68c2=>_0x3b68c2[_0x1bdf0f(0xfa)]===_0x122941);if(_0x296590['length']>0x1)throw CliErrors[_0x1bdf0f(0x115)](_0x1bdf0f(0xf5)+_0x122941+'.');const _0x431732=_0x296590[0x0],_0x5155c1=_0x431732?.[_0x1bdf0f(0xfc)]==null?[]:resourceList(_0x431732[_0x1bdf0f(0xfc)],_0x1bdf0f(0x103)),_0x4b6c48=_0x3c5b78[_0x1bdf0f(0xf6)](_0x4188c7=>_0x4188c7[_0x1bdf0f(0xf3)]?.[_0x1bdf0f(0xfa)]===_0x122941),_0x4e4754=_0x4b6c48[_0x1bdf0f(0x108)](_0x398863=>{const _0x1cb3ae=_0x1bdf0f;let _0x4346b6=null,_0x28c883=null;try{_0x4346b6=_0x398863[_0x1cb3ae(0xf3)]?.[_0x1cb3ae(0xfc)]==null?_0x398863['resources']:resourceList(_0x398863[_0x1cb3ae(0xf3)][_0x1cb3ae(0xfc)],'menu\x20'+_0x398863['id']+_0x1cb3ae(0x105));}catch(_0x325879){_0x28c883=_0x325879 instanceof Error?_0x325879[_0x1cb3ae(0x113)]:String(_0x325879);}const _0x47d5f3=_0x5155c1[_0x1cb3ae(0x102)]>0x0?_0x1cb3ae(0xfe):_0x1cb3ae(0x112),_0x334dca=_0x47d5f3===_0x1cb3ae(0xfe)?_0x5155c1:_0x4346b6;return{'id':_0x398863['id'],'path':_0x398863[_0x1cb3ae(0x111)],'preferredSourceIfSupported':_0x47d5f3,'preferredResourcesIfSupported':_0x334dca,'menuFallbackResources':_0x4346b6,'menuFallbackError':_0x28c883,'fallbackDiffers':_0x4346b6===null?null:_0x47d5f3===_0x1cb3ae(0xfe)&&_0x4346b6[_0x1cb3ae(0x102)]>0x0&&JSON['stringify'](_0x4346b6)!==JSON[_0x1cb3ae(0xee)](_0x334dca)};});return{'appName':_0x122941,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x431732),'sharedResources':_0x5155c1,'loadScriptMode':_0x431732?.[_0x1bdf0f(0x116)]??null,'basename':_0x431732?.[_0x1bdf0f(0x110)]??null,'boundMenus':_0x4e4754['length'],'staleMenuFallbacks':_0x4e4754['filter'](_0x1afee5=>_0x1afee5[_0x1bdf0f(0x100)])[_0x1bdf0f(0x102)],'menus':_0x4e4754};}function a172_0x2bb8(){const _0x4bb7e5=['4786404pLJQkI','316720yHqUKK','2340ZYZTgL','some','basename','path','menu','message','sharedResources','validation','loadScriptMode','317109odcmGy','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','string','--app-name\x20is\x20required.','sharedConfigured','\x20contains\x20invalid\x20JSON.','stringify','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','\x20must\x20be\x20an\x20array\x20of\x20URLs.','object','appCode','extend','app.extend','Duplicate\x20subapp\x20records\x20for\x20','filter','app-name','str','106550kvduaj','appName','app.extend.assets[','resources','112376wSbbuY','app','105dzMcbS','fallbackDiffers','2433740mwuKtU','length','subapp.resources','assets','\x20resources','app.extend.assets\x20must\x20be\x20an\x20array.','\x20must\x20be\x20a\x20JSON\x20object.','map','10754sENrRd','205RcvnVf','isArray'];a172_0x2bb8=function(){return _0x4bb7e5;};return a172_0x2bb8();}export async function assertSharedResourcesConfigured(_0x255a58,_0x5f208c,_0x410ad2){const _0x384e6b=a172_0x1695,_0x3325ce=await getSmartAppRecord(_0x255a58,_0x5f208c),_0x5277f1=buildSubappAssetsStatus(_0x3325ce,[],_0x410ad2);if(!_0x5277f1[_0x384e6b(0xec)]||_0x5277f1[_0x384e6b(0x114)]['length']===0x0)throw CliErrors[_0x384e6b(0x115)]('No\x20shared\x20resources\x20configured\x20for\x20'+_0x410ad2+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':'Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app'},{'name':a172_0x3f11b0(0xf7),'type':a172_0x3f11b0(0xea),'required':!![],'description':a172_0x3f11b0(0xe9)}];export function getSubappSelector(_0x135cda){const _0x8d500c=a172_0x3f11b0,_0x38bf3c=_0x135cda[_0x8d500c(0xf2)],_0x466779=_0x135cda[_0x8d500c(0xf8)]('app-name')['trim']();if(!_0x466779)throw CliErrors['validation'](_0x8d500c(0xeb));return{'appCode':_0x38bf3c,'appName':_0x466779};}
@@ -1 +1 @@
1
- const a173_0x400a3c=a173_0x82c8;(function(_0x11c732,_0x2a528b){const _0x1f827c=a173_0x82c8,_0x4466d9=_0x11c732();while(!![]){try{const _0xc7053e=-parseInt(_0x1f827c(0xac))/0x1*(parseInt(_0x1f827c(0x99))/0x2)+parseInt(_0x1f827c(0x95))/0x3*(-parseInt(_0x1f827c(0xa4))/0x4)+-parseInt(_0x1f827c(0xaa))/0x5+parseInt(_0x1f827c(0xb4))/0x6+-parseInt(_0x1f827c(0x9f))/0x7*(parseInt(_0x1f827c(0xbe))/0x8)+-parseInt(_0x1f827c(0xbb))/0x9+parseInt(_0x1f827c(0xb9))/0xa;if(_0xc7053e===_0x2a528b)break;else _0x4466d9['push'](_0x4466d9['shift']());}catch(_0x2bd7ef){_0x4466d9['push'](_0x4466d9['shift']());}}}(a173_0x1add,0x8a058));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{menuPathKey}from'../../../commands/menu/shared/path.js';import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';const MENU_SYNC_PARAM_KEYS=new Set([a173_0x400a3c(0xc2),a173_0x400a3c(0xbc),a173_0x400a3c(0xa6),'visible',a173_0x400a3c(0x8e)]);function a173_0x1add(){const _0x39ccbc=['jsUrl','Invalid\x20--params\x20JSON.','menu-sync','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','folder','Invalid\x20--params:\x20','parentId','filter',';\x20found\x20','pages','procode','\x0a\x20\x20Available\x20local\x20paths:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','412668xTyJqv','trim','JS\x20URL\x20is\x20unreachable:\x20','get','628206tmviBR','\x22\x20for\x20','path','No\x20local\x20pages\x20matched\x20paths:\x20','type','string','7rxqccS','group','cwd','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','join','16IphAPH','field','appName','info','keys','Menu\x20sync\x20completed','1048620ATLAlG','object','1kINUoB','parse','visible','Parent\x20','push','CSS\x20URL\x20is\x20unreachable:\x20','boolean','Invalid\x20--params\x20fields:\x20','5283654jxSoYj','has','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','number','11923240uDDAwW','length','2994615pvERBX','cssUrl','Invalid\x20--params.','806488ebVfTE','label','map','order'];a173_0x1add=function(){return _0x39ccbc;};return a173_0x1add();}export function resolvePage(_0x5aef15,_0x291118,_0x5113ae){const _0x3c4f99=a173_0x400a3c;let _0x5189dd=_0x291118[_0x3c4f99(0x8e)]??_0x5aef15[_0x3c4f99(0x8e)];if(_0x5189dd===undefined&&_0x5aef15['group']){const _0x1de383=_0x5113ae['filter'](_0x4204c9=>_0x4204c9['type']===_0x3c4f99(0x8c)&&_0x4204c9[_0x3c4f99(0xbf)]===_0x5aef15['group']);if(_0x1de383[_0x3c4f99(0xba)]!==0x1)throw new Error('Expected\x20one\x20folder\x20named\x20\x22'+_0x5aef15[_0x3c4f99(0xa0)]+_0x3c4f99(0x9a)+_0x5aef15[_0x3c4f99(0x9b)]+_0x3c4f99(0x90)+_0x1de383[_0x3c4f99(0xba)]);_0x5189dd=_0x1de383[0x0]['id'];}if(_0x5189dd!==undefined&&_0x5189dd!==0x0&&_0x5113ae['filter'](_0x555dc6=>_0x555dc6['id']===_0x5189dd&&_0x555dc6[_0x3c4f99(0x9d)]===_0x3c4f99(0x8c))[_0x3c4f99(0xba)]!==0x1)throw new Error(_0x3c4f99(0xaf)+_0x5189dd+'\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.');return{..._0x5aef15,..._0x5189dd===undefined?{}:{'parentId':_0x5189dd},..._0x291118[_0x3c4f99(0xae)]===undefined?{}:{'visible':_0x291118['visible']}};}function a173_0x82c8(_0x315e65,_0x3c600a){_0x315e65=_0x315e65-0x8a;const _0x1add80=a173_0x1add();let _0x82c8=_0x1add80[_0x315e65];return _0x82c8;}function validateParams(_0x31e51f){const _0x5cc397=a173_0x400a3c,_0x342269=[];return _0x31e51f[_0x5cc397(0xc2)]&&!isValidJsHttpsUrl(_0x31e51f[_0x5cc397(0xc2)])&&_0x342269[_0x5cc397(0xb0)]({'field':_0x5cc397(0xc2),'message':_0x5cc397(0x94)}),_0x31e51f[_0x5cc397(0xbc)]&&!isValidCssHttpsUrl(_0x31e51f['cssUrl'])&&_0x342269[_0x5cc397(0xb0)]({'field':_0x5cc397(0xbc),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x342269;}export async function runMenuSyncCore(_0xddc55b,_0x325923,_0x1d93c7=[],_0x486429,_0x156bd9={}){const _0x188138=a173_0x400a3c,_0x161de2=parseMenuSyncParams(_0x486429),_0x4904ce=[...new Set(_0x1d93c7[_0x188138(0xc0)](_0x561c79=>_0x561c79[_0x188138(0x96)]())[_0x188138(0x8f)](Boolean)['map'](menuPathKey))],_0x3db513=_0x161de2['jsUrl'],_0x2f3544=_0x161de2['cssUrl'],_0x58d7d4=[];if(_0x3db513)_0x58d7d4[_0x188138(0xb0)](_0x3db513);if(_0x2f3544)_0x58d7d4[_0x188138(0xb0)](_0x2f3544);const _0x2ef5a2=validateParams(_0x161de2);if(_0x2ef5a2[_0x188138(0xba)]>0x0){const _0x509415=_0x2ef5a2[_0x188138(0xc0)](_0x16d6f6=>'--params.'+_0x16d6f6[_0x188138(0xa5)]+':\x20'+_0x16d6f6['message'])['join'](';\x20');throw new Error(_0x188138(0x8d)+_0x509415);}logger['setLogPath'](process[_0x188138(0xa1)]()),logger[_0x188138(0xa7)](_0x188138(0x8a),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0xddc55b,'selectedCount':_0x4904ce[_0x188138(0xba)],'jsUrl':_0x3db513,'cssUrl':_0x2f3544});if(_0x3db513){const _0x3ddda3=await isUrlReachable(_0x3db513);if(!_0x3ddda3)throw new Error(_0x188138(0x97)+_0x3db513);}if(_0x2f3544){const _0x55c930=await isUrlReachable(_0x2f3544);if(!_0x55c930)throw new Error(_0x188138(0xb1)+_0x2f3544);}const _0x533989=getLocalPages();if(_0x533989['length']===0x0){if(_0x4904ce[_0x188138(0xba)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x4904ce[_0x188138(0xa3)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x156bd9['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x374981=await getOnlineMenuList(_0xddc55b,_0x325923),_0x5ae841=new Set(_0x374981['map'](_0x466896=>menuPathKey(_0x466896[_0x188138(0x9b)])));let _0x4cd56f;if(_0x4904ce[_0x188138(0xba)]>0x0){const _0x404731=new Map(_0x533989[_0x188138(0xc0)](_0x5bfdba=>[menuPathKey(_0x5bfdba[_0x188138(0x9b)]),_0x5bfdba])),_0x443c52=_0x4904ce[_0x188138(0x8f)](_0x5f05f0=>!_0x404731['has'](_0x5f05f0));if(_0x443c52['length']>0x0){const _0x49768a=_0x533989[_0x188138(0xc0)](_0x36e77d=>_0x36e77d[_0x188138(0x9b)])[_0x188138(0xa3)](',\x20');throw new Error(_0x188138(0x9c)+_0x443c52[_0x188138(0xa3)](',\x20')+_0x188138(0x93)+_0x49768a);}const _0x4cd4a0=_0x4904ce[_0x188138(0x8f)](_0x243e46=>_0x5ae841[_0x188138(0xb5)](_0x243e46));if(_0x4cd4a0[_0x188138(0xba)]>0x0)throw new Error(_0x188138(0x8b)+_0x4cd4a0[_0x188138(0xa3)](',\x20'));_0x4cd56f=_0x4904ce[_0x188138(0xc0)](_0x53268b=>_0x404731[_0x188138(0x98)](_0x53268b));}else _0x4cd56f=_0x533989[_0x188138(0x8f)](_0x38a783=>!_0x5ae841[_0x188138(0xb5)](menuPathKey(_0x38a783[_0x188138(0x9b)])));if(_0x4cd56f[_0x188138(0xba)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x156bd9['dryRun']===!![],'targetPages':[],'plannedMenus':[]};_0x4cd56f=_0x4cd56f[_0x188138(0xc0)](_0x8a2c0b=>resolvePage(_0x8a2c0b,_0x161de2,_0x374981));_0x161de2[_0x188138(0xa6)]&&_0x58d7d4['length']===0x0&&await assertSharedResourcesConfigured(_0xddc55b,_0x325923,_0x161de2['appName']);const _0x118f91=_0x4cd56f[_0x188138(0xc0)](_0x25e772=>({'type':_0x188138(0x92),'path':_0x25e772['path'],'label':_0x25e772[_0x188138(0xbf)],'loadScriptMode':'import','resources':[..._0x58d7d4],..._0x25e772[_0x188138(0xae)]===undefined?{}:{'visible':_0x25e772[_0x188138(0xae)]},..._0x25e772[_0x188138(0x8e)]===undefined?{}:{'parentId':_0x25e772[_0x188138(0x8e)]},..._0x25e772[_0x188138(0xc1)]===undefined?{}:{'sort':_0x25e772[_0x188138(0xc1)]},..._0x161de2[_0x188138(0xa6)]===undefined?{}:{'appName':_0x161de2[_0x188138(0xa6)]}}));if(_0x156bd9['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x4cd56f,'plannedMenus':_0x118f91};const _0x55c50a=_0x161de2[_0x188138(0xa6)]?await createMenus(_0xddc55b,_0x325923,_0x4cd56f,_0x58d7d4[_0x188138(0xba)]>0x0?_0x58d7d4:undefined,{'appName':_0x161de2[_0x188138(0xa6)]}):await createMenus(_0xddc55b,_0x325923,_0x4cd56f,_0x58d7d4[_0x188138(0xba)]>0x0?_0x58d7d4:undefined);return logger[_0x188138(0xa7)](_0x188138(0x8a),_0x188138(0xa9),{'count':_0x4cd56f[_0x188138(0xba)],'resources':_0x58d7d4}),{'created':_0x55c50a['length'],'skipped':![],'dryRun':![],'targetPages':_0x4cd56f,'plannedMenus':_0x118f91,'menus':_0x55c50a};}export function parseMenuSyncParams(_0x4feab8){const _0x4d3924=a173_0x400a3c;if(!_0x4feab8||typeof _0x4feab8!==_0x4d3924(0x9e))return{};let _0x28f384;try{_0x28f384=JSON[_0x4d3924(0xad)](_0x4feab8);}catch{throw new Error(_0x4d3924(0xc3));}if(typeof _0x28f384!==_0x4d3924(0xab)||_0x28f384===null||Array['isArray'](_0x28f384))throw new Error(_0x4d3924(0xa2));const _0x4df2f2=_0x28f384;if(Object['hasOwn'](_0x4df2f2,_0x4d3924(0x91)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x1d46e7=Object[_0x4d3924(0xa8)](_0x4df2f2)[_0x4d3924(0x8f)](_0x34dcbb=>!MENU_SYNC_PARAM_KEYS[_0x4d3924(0xb5)](_0x34dcbb));if(_0x1d46e7['length']>0x0)throw new Error(_0x4d3924(0xb3)+_0x1d46e7[_0x4d3924(0xa3)](',\x20')+'.');for(const _0x430e5d of[_0x4d3924(0xc2),_0x4d3924(0xbc),'appName']){const _0x2e7740=_0x4df2f2[_0x430e5d];if(_0x2e7740!==undefined&&(typeof _0x2e7740!=='string'||_0x2e7740[_0x4d3924(0x96)]()===''))throw new Error(_0x4d3924(0xbd)+_0x430e5d+':\x20expected\x20a\x20non-empty\x20string.');}if(_0x4df2f2[_0x4d3924(0xae)]!==undefined&&typeof _0x4df2f2[_0x4d3924(0xae)]!=='boolean')throw new Error(_0x4d3924(0xb7));if(_0x4df2f2[_0x4d3924(0x8e)]!==undefined&&(!Number['isInteger'](_0x4df2f2[_0x4d3924(0x8e)])||_0x4df2f2[_0x4d3924(0x8e)]<0x0))throw new Error(_0x4d3924(0xb6));return{'jsUrl':typeof _0x4df2f2['jsUrl']==='string'?_0x4df2f2[_0x4d3924(0xc2)][_0x4d3924(0x96)]():undefined,'cssUrl':typeof _0x4df2f2[_0x4d3924(0xbc)]===_0x4d3924(0x9e)?_0x4df2f2[_0x4d3924(0xbc)][_0x4d3924(0x96)]():undefined,'appName':typeof _0x4df2f2[_0x4d3924(0xa6)]===_0x4d3924(0x9e)?_0x4df2f2['appName'][_0x4d3924(0x96)]():undefined,'visible':typeof _0x4df2f2[_0x4d3924(0xae)]===_0x4d3924(0xb2)?_0x4df2f2[_0x4d3924(0xae)]:undefined,'parentId':typeof _0x4df2f2[_0x4d3924(0x8e)]===_0x4d3924(0xb8)?_0x4df2f2[_0x4d3924(0x8e)]:undefined};}
1
+ const a173_0x27ade8=a173_0x44bb;(function(_0x372853,_0x2a8699){const _0x523bda=a173_0x44bb,_0x221b91=_0x372853();while(!![]){try{const _0x49cfb1=-parseInt(_0x523bda(0x1c5))/0x1*(-parseInt(_0x523bda(0x1be))/0x2)+parseInt(_0x523bda(0x19d))/0x3+-parseInt(_0x523bda(0x1ae))/0x4+-parseInt(_0x523bda(0x1c2))/0x5*(-parseInt(_0x523bda(0x1d5))/0x6)+parseInt(_0x523bda(0x1cd))/0x7*(-parseInt(_0x523bda(0x1ca))/0x8)+-parseInt(_0x523bda(0x19e))/0x9+parseInt(_0x523bda(0x19a))/0xa;if(_0x49cfb1===_0x2a8699)break;else _0x221b91['push'](_0x221b91['shift']());}catch(_0x13c6b0){_0x221b91['push'](_0x221b91['shift']());}}}(a173_0x25f9,0x771c2));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{menuPathKey}from'../../../commands/menu/shared/path.js';import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';function a173_0x44bb(_0x1fb618,_0x350790){_0x1fb618=_0x1fb618-0x196;const _0x25f958=a173_0x25f9();let _0x44bbda=_0x25f958[_0x1fb618];return _0x44bbda;}const MENU_SYNC_PARAM_KEYS=new Set([a173_0x27ade8(0x1d2),a173_0x27ade8(0x1a1),a173_0x27ade8(0x1b6),a173_0x27ade8(0x1a9),a173_0x27ade8(0x1b7)]);export function resolvePage(_0x598a09,_0x5a2ede,_0x555ac1){const _0x2a9834=a173_0x27ade8;let _0x3fa92a=_0x5a2ede[_0x2a9834(0x1b7)]??_0x598a09[_0x2a9834(0x1b7)];if(_0x3fa92a===undefined&&_0x598a09[_0x2a9834(0x199)]){const _0x4b0ed1=_0x555ac1[_0x2a9834(0x1bc)](_0x2d8e03=>_0x2d8e03[_0x2a9834(0x1c9)]==='folder'&&_0x2d8e03['label']===_0x598a09[_0x2a9834(0x199)]);if(_0x4b0ed1[_0x2a9834(0x1c3)]!==0x1)throw new Error(_0x2a9834(0x1af)+_0x598a09[_0x2a9834(0x199)]+_0x2a9834(0x1bb)+_0x598a09[_0x2a9834(0x1bd)]+_0x2a9834(0x1ad)+_0x4b0ed1['length']);_0x3fa92a=_0x4b0ed1[0x0]['id'];}if(_0x3fa92a!==undefined&&_0x3fa92a!==0x0&&_0x555ac1['filter'](_0x1526f2=>_0x1526f2['id']===_0x3fa92a&&_0x1526f2['type']==='folder')[_0x2a9834(0x1c3)]!==0x1)throw new Error(_0x2a9834(0x197)+_0x3fa92a+_0x2a9834(0x1d4));return{..._0x598a09,..._0x3fa92a===undefined?{}:{'parentId':_0x3fa92a},..._0x5a2ede[_0x2a9834(0x1a9)]===undefined?{}:{'visible':_0x5a2ede[_0x2a9834(0x1a9)]}};}function a173_0x25f9(){const _0x5def41=['field','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','Menu\x20sync\x20completed','isArray','push','menu-sync','Invalid\x20--params.','visible','number','trim','Invalid\x20--params:\x20',';\x20found\x20','592176BQfnqJ','Expected\x20one\x20folder\x20named\x20\x22','Invalid\x20--params\x20fields:\x20','get','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','CSS\x20URL\x20is\x20unreachable:\x20','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','appName','parentId','message','map','dryRun','\x22\x20for\x20','filter','path','13778MpsMzV','parse',':\x20expected\x20a\x20non-empty\x20string.','cwd','374625AmIpcX','length','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','115zZFSHq','boolean','info','isInteger','type','16vrQyrM','setLogPath','string','1830073LjxavO','No\x20local\x20pages\x20matched\x20paths:\x20','import','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','jsUrl','label','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','30dzAAry','--params.','Parent\x20','join','group','2429590YnVDbE','hasOwn','Invalid\x20--params\x20JSON.','1099968KLgmcJ','5559111NGUztS','order','has','cssUrl'];a173_0x25f9=function(){return _0x5def41;};return a173_0x25f9();}function validateParams(_0x1009d3){const _0x22a6fe=a173_0x27ade8,_0x7fd481=[];return _0x1009d3[_0x22a6fe(0x1d2)]&&!isValidJsHttpsUrl(_0x1009d3[_0x22a6fe(0x1d2)])&&_0x7fd481[_0x22a6fe(0x1a6)]({'field':_0x22a6fe(0x1d2),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x1009d3[_0x22a6fe(0x1a1)]&&!isValidCssHttpsUrl(_0x1009d3['cssUrl'])&&_0x7fd481[_0x22a6fe(0x1a6)]({'field':'cssUrl','message':_0x22a6fe(0x1d0)}),_0x7fd481;}export async function runMenuSyncCore(_0x2bbbdc,_0x3eac38,_0x58b02e=[],_0x3762c9,_0x3cdebc={}){const _0xfcd1ef=a173_0x27ade8,_0x291bee=parseMenuSyncParams(_0x3762c9),_0xe98e2b=[...new Set(_0x58b02e['map'](_0x8c3d0c=>_0x8c3d0c[_0xfcd1ef(0x1ab)]())[_0xfcd1ef(0x1bc)](Boolean)[_0xfcd1ef(0x1b9)](menuPathKey))],_0x3515a6=_0x291bee[_0xfcd1ef(0x1d2)],_0x5be203=_0x291bee['cssUrl'],_0x2184ce=[];if(_0x3515a6)_0x2184ce['push'](_0x3515a6);if(_0x5be203)_0x2184ce['push'](_0x5be203);const _0xd3eb81=validateParams(_0x291bee);if(_0xd3eb81[_0xfcd1ef(0x1c3)]>0x0){const _0x1ef203=_0xd3eb81[_0xfcd1ef(0x1b9)](_0x5c75c5=>_0xfcd1ef(0x196)+_0x5c75c5[_0xfcd1ef(0x1a2)]+':\x20'+_0x5c75c5[_0xfcd1ef(0x1b8)])[_0xfcd1ef(0x198)](';\x20');throw new Error(_0xfcd1ef(0x1ac)+_0x1ef203);}logger[_0xfcd1ef(0x1cb)](process[_0xfcd1ef(0x1c1)]()),logger[_0xfcd1ef(0x1c7)](_0xfcd1ef(0x1a7),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x2bbbdc,'selectedCount':_0xe98e2b[_0xfcd1ef(0x1c3)],'jsUrl':_0x3515a6,'cssUrl':_0x5be203});if(_0x3515a6){const _0x2ffa33=await isUrlReachable(_0x3515a6);if(!_0x2ffa33)throw new Error(_0xfcd1ef(0x1b4)+_0x3515a6);}if(_0x5be203){const _0x42aeca=await isUrlReachable(_0x5be203);if(!_0x42aeca)throw new Error(_0xfcd1ef(0x1b3)+_0x5be203);}const _0x26ad44=getLocalPages();if(_0x26ad44[_0xfcd1ef(0x1c3)]===0x0){if(_0xe98e2b[_0xfcd1ef(0x1c3)]>0x0)throw new Error(_0xfcd1ef(0x1ce)+_0xe98e2b['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x3cdebc[_0xfcd1ef(0x1ba)]===!![],'targetPages':[],'plannedMenus':[]};}const _0xa200b6=await getOnlineMenuList(_0x2bbbdc,_0x3eac38),_0x1c4b3d=new Set(_0xa200b6[_0xfcd1ef(0x1b9)](_0x1667a7=>menuPathKey(_0x1667a7[_0xfcd1ef(0x1bd)])));let _0x39ee65;if(_0xe98e2b[_0xfcd1ef(0x1c3)]>0x0){const _0x31064a=new Map(_0x26ad44[_0xfcd1ef(0x1b9)](_0xc7950b=>[menuPathKey(_0xc7950b[_0xfcd1ef(0x1bd)]),_0xc7950b])),_0x4dfd20=_0xe98e2b[_0xfcd1ef(0x1bc)](_0x3a7b01=>!_0x31064a[_0xfcd1ef(0x1a0)](_0x3a7b01));if(_0x4dfd20[_0xfcd1ef(0x1c3)]>0x0){const _0x742626=_0x26ad44[_0xfcd1ef(0x1b9)](_0x54984f=>_0x54984f[_0xfcd1ef(0x1bd)])[_0xfcd1ef(0x198)](',\x20');throw new Error(_0xfcd1ef(0x1ce)+_0x4dfd20['join'](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x742626);}const _0xe1be37=_0xe98e2b[_0xfcd1ef(0x1bc)](_0xb8a390=>_0x1c4b3d[_0xfcd1ef(0x1a0)](_0xb8a390));if(_0xe1be37[_0xfcd1ef(0x1c3)]>0x0)throw new Error(_0xfcd1ef(0x1d1)+_0xe1be37[_0xfcd1ef(0x198)](',\x20'));_0x39ee65=_0xe98e2b[_0xfcd1ef(0x1b9)](_0x5a2aaa=>_0x31064a[_0xfcd1ef(0x1b1)](_0x5a2aaa));}else _0x39ee65=_0x26ad44[_0xfcd1ef(0x1bc)](_0x4c08a1=>!_0x1c4b3d['has'](menuPathKey(_0x4c08a1[_0xfcd1ef(0x1bd)])));if(_0x39ee65[_0xfcd1ef(0x1c3)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x3cdebc[_0xfcd1ef(0x1ba)]===!![],'targetPages':[],'plannedMenus':[]};_0x39ee65=_0x39ee65[_0xfcd1ef(0x1b9)](_0x2f897a=>resolvePage(_0x2f897a,_0x291bee,_0xa200b6));_0x291bee[_0xfcd1ef(0x1b6)]&&_0x2184ce[_0xfcd1ef(0x1c3)]===0x0&&await assertSharedResourcesConfigured(_0x2bbbdc,_0x3eac38,_0x291bee[_0xfcd1ef(0x1b6)]);const _0x69d5de=_0x39ee65[_0xfcd1ef(0x1b9)](_0x3d678a=>({'type':'procode','path':_0x3d678a[_0xfcd1ef(0x1bd)],'label':_0x3d678a[_0xfcd1ef(0x1d3)],'loadScriptMode':_0xfcd1ef(0x1cf),'resources':[..._0x2184ce],..._0x3d678a[_0xfcd1ef(0x1a9)]===undefined?{}:{'visible':_0x3d678a['visible']},..._0x3d678a[_0xfcd1ef(0x1b7)]===undefined?{}:{'parentId':_0x3d678a[_0xfcd1ef(0x1b7)]},..._0x3d678a[_0xfcd1ef(0x19f)]===undefined?{}:{'sort':_0x3d678a[_0xfcd1ef(0x19f)]},..._0x291bee[_0xfcd1ef(0x1b6)]===undefined?{}:{'appName':_0x291bee[_0xfcd1ef(0x1b6)]}}));if(_0x3cdebc['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x39ee65,'plannedMenus':_0x69d5de};const _0x4073c0=_0x291bee[_0xfcd1ef(0x1b6)]?await createMenus(_0x2bbbdc,_0x3eac38,_0x39ee65,_0x2184ce[_0xfcd1ef(0x1c3)]>0x0?_0x2184ce:undefined,{'appName':_0x291bee[_0xfcd1ef(0x1b6)]}):await createMenus(_0x2bbbdc,_0x3eac38,_0x39ee65,_0x2184ce[_0xfcd1ef(0x1c3)]>0x0?_0x2184ce:undefined);return logger[_0xfcd1ef(0x1c7)]('menu-sync',_0xfcd1ef(0x1a4),{'count':_0x39ee65['length'],'resources':_0x2184ce}),{'created':_0x4073c0['length'],'skipped':![],'dryRun':![],'targetPages':_0x39ee65,'plannedMenus':_0x69d5de,'menus':_0x4073c0};}export function parseMenuSyncParams(_0x2ea8c9){const _0x230972=a173_0x27ade8;if(!_0x2ea8c9||typeof _0x2ea8c9!==_0x230972(0x1cc))return{};let _0x446ff0;try{_0x446ff0=JSON[_0x230972(0x1bf)](_0x2ea8c9);}catch{throw new Error(_0x230972(0x19c));}if(typeof _0x446ff0!=='object'||_0x446ff0===null||Array[_0x230972(0x1a5)](_0x446ff0))throw new Error(_0x230972(0x1b2));const _0x5085e9=_0x446ff0;if(Object[_0x230972(0x19b)](_0x5085e9,'pages'))throw new Error(_0x230972(0x1c4));const _0x579d06=Object['keys'](_0x5085e9)[_0x230972(0x1bc)](_0x2a2ceb=>!MENU_SYNC_PARAM_KEYS[_0x230972(0x1a0)](_0x2a2ceb));if(_0x579d06[_0x230972(0x1c3)]>0x0)throw new Error(_0x230972(0x1b0)+_0x579d06[_0x230972(0x198)](',\x20')+'.');for(const _0x3c2c31 of['jsUrl',_0x230972(0x1a1),_0x230972(0x1b6)]){const _0x534eae=_0x5085e9[_0x3c2c31];if(_0x534eae!==undefined&&(typeof _0x534eae!=='string'||_0x534eae[_0x230972(0x1ab)]()===''))throw new Error(_0x230972(0x1a8)+_0x3c2c31+_0x230972(0x1c0));}if(_0x5085e9['visible']!==undefined&&typeof _0x5085e9['visible']!==_0x230972(0x1c6))throw new Error(_0x230972(0x1b5));if(_0x5085e9[_0x230972(0x1b7)]!==undefined&&(!Number[_0x230972(0x1c8)](_0x5085e9[_0x230972(0x1b7)])||_0x5085e9['parentId']<0x0))throw new Error(_0x230972(0x1a3));return{'jsUrl':typeof _0x5085e9[_0x230972(0x1d2)]===_0x230972(0x1cc)?_0x5085e9[_0x230972(0x1d2)]['trim']():undefined,'cssUrl':typeof _0x5085e9[_0x230972(0x1a1)]===_0x230972(0x1cc)?_0x5085e9[_0x230972(0x1a1)]['trim']():undefined,'appName':typeof _0x5085e9[_0x230972(0x1b6)]==='string'?_0x5085e9['appName'][_0x230972(0x1ab)]():undefined,'visible':typeof _0x5085e9[_0x230972(0x1a9)]===_0x230972(0x1c6)?_0x5085e9[_0x230972(0x1a9)]:undefined,'parentId':typeof _0x5085e9[_0x230972(0x1b7)]===_0x230972(0x1aa)?_0x5085e9['parentId']:undefined};}
@@ -1 +1 @@
1
- (function(_0xacbf53,_0x42ae51){const _0x3d5033=a175_0x15f7,_0x3297d5=_0xacbf53();while(!![]){try{const _0x227bc5=parseInt(_0x3d5033(0xa1))/0x1*(parseInt(_0x3d5033(0xc6))/0x2)+-parseInt(_0x3d5033(0xdf))/0x3*(parseInt(_0x3d5033(0xd2))/0x4)+parseInt(_0x3d5033(0xc0))/0x5+parseInt(_0x3d5033(0xa8))/0x6+-parseInt(_0x3d5033(0xce))/0x7*(-parseInt(_0x3d5033(0xbb))/0x8)+parseInt(_0x3d5033(0xcb))/0x9*(parseInt(_0x3d5033(0xc2))/0xa)+-parseInt(_0x3d5033(0xa3))/0xb;if(_0x227bc5===_0x42ae51)break;else _0x3297d5['push'](_0x3297d5['shift']());}catch(_0xa5a325){_0x3297d5['push'](_0x3297d5['shift']());}}}(a175_0x1f11,0x841c8));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(_0x4b5bf4){const _0x354fe0=a175_0x15f7,_0x4a2161=[];return _0x4b5bf4[_0x354fe0(0xa0)]&&!isValidJsHttpsUrl(_0x4b5bf4['jsUrl'])&&_0x4a2161['push']({'field':_0x354fe0(0xa0),'message':_0x354fe0(0xa6)}),_0x4b5bf4[_0x354fe0(0xc5)]&&!isValidCssHttpsUrl(_0x4b5bf4[_0x354fe0(0xc5)])&&_0x4a2161[_0x354fe0(0x9e)]({'field':_0x354fe0(0xc5),'message':_0x354fe0(0xab)}),_0x4a2161;}export async function runMenuUpdateCore(_0x5a7d35,_0x4a5fa0,_0x109938,_0x1b56f4={}){const _0x2f6458=a175_0x15f7,_0x195255=parseUpdateParamsFlag(_0x109938),_0x209da5=normalizeMode(_0x1b56f4['mode']);validateSelection(_0x1b56f4[_0x2f6458(0xda)]);const _0x1926a=[];if(_0x195255['jsUrl'])_0x1926a[_0x2f6458(0x9e)](_0x195255[_0x2f6458(0xa0)]);if(_0x195255[_0x2f6458(0xc5)])_0x1926a['push'](_0x195255[_0x2f6458(0xc5)]);const _0x10727b=validateParams(_0x195255);if(_0x10727b[_0x2f6458(0xd9)]>0x0){const _0x48ff7b=_0x10727b[_0x2f6458(0xaa)](_0x4488ea=>_0x2f6458(0xdc)+_0x4488ea['field']+':\x20'+_0x4488ea[_0x2f6458(0xd0)])['join'](';\x20');throw new Error(_0x2f6458(0xca)+_0x48ff7b);}if(_0x1926a[_0x2f6458(0xd9)]===0x0)throw new Error(_0x2f6458(0x9f)+_0x2f6458(0xa7));logger[_0x2f6458(0xae)](process[_0x2f6458(0xe0)]()),logger['info'](_0x2f6458(0xbd),_0x2f6458(0xc7),{'appCode':_0x5a7d35,'jsUrl':_0x195255[_0x2f6458(0xa0)],'cssUrl':_0x195255[_0x2f6458(0xc5)],'mode':_0x209da5,'dryRun':_0x1b56f4[_0x2f6458(0xa5)]===!![]});if(_0x195255[_0x2f6458(0xa0)]){const _0x1bb127=await isUrlReachable(_0x195255[_0x2f6458(0xa0)]);if(!_0x1bb127)throw new Error(_0x2f6458(0xd1)+_0x195255[_0x2f6458(0xa0)]);}if(_0x195255[_0x2f6458(0xc5)]){const _0x3fa8c9=await isUrlReachable(_0x195255[_0x2f6458(0xc5)]);if(!_0x3fa8c9)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x195255[_0x2f6458(0xc5)]);}const _0x2de5fe=await getOnlineMenuList(_0x5a7d35,_0x4a5fa0),_0x260c58=_0x2de5fe[_0x2f6458(0xbf)](_0x344797=>_0x344797[_0x2f6458(0xa2)][_0x2f6458(0xd9)]>0x0),_0xa24995=selectMenusForUpdate(_0x260c58,_0x1b56f4['selection']);if(_0xa24995['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1b56f4['dryRun']===!![]};const _0x505dd6=_0xa24995[_0x2f6458(0xaa)](_0x973b03=>buildMenuUpdateDiff(_0x973b03,_0x195255,_0x209da5,_0x1b56f4[_0x2f6458(0xb8)]===!![],_0x1b56f4[_0x2f6458(0xc1)]));if(_0x1b56f4[_0x2f6458(0xa5)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x505dd6};const _0x5c8771=await Promise[_0x2f6458(0xad)](_0xa24995[_0x2f6458(0xaa)]((_0x559b69,_0x4255f4)=>updateMenuCdnUrl(_0x5a7d35,_0x4a5fa0,{'id':_0x559b69['id'],'label':_0x559b69[_0x2f6458(0xcd)],'path':_0x559b69[_0x2f6458(0xb9)],'resources':_0x505dd6[_0x4255f4]['after'][_0x2f6458(0xa2)],'extend':_0x559b69[_0x2f6458(0xd5)]??null,'loadScriptMode':_0x1b56f4[_0x2f6458(0xc1)]}))),_0x17a6d0=_0x5c8771['filter'](_0x4063b7=>_0x4063b7[_0x2f6458(0xdd)]===_0x2f6458(0x9c))['map'](_0x5c8101=>_0x5c8101[_0x2f6458(0x9d)]),_0x537dde=_0x5c8771[_0x2f6458(0xbf)](_0xaadbcc=>_0xaadbcc[_0x2f6458(0xdd)]==='rejected')[_0x2f6458(0xd9)];return logger[_0x2f6458(0xa9)](_0x2f6458(0xbd),_0x2f6458(0xb5),{'count':_0xa24995[_0x2f6458(0xd9)],'resources':_0x1926a}),{'updated':_0x17a6d0[_0x2f6458(0xd9)],'failed':_0x537dde,'skipped':![],'menus':_0x17a6d0};}function validateSelection(_0x51a989){const _0x4bb447=a175_0x15f7;if(!_0x51a989)throw new Error(_0x4bb447(0xb0));if(_0x51a989['all']&&(_0x51a989[_0x4bb447(0xc3)]['length']>0x0||_0x51a989[_0x4bb447(0xc8)]['length']>0x0))throw new Error(_0x4bb447(0xb1));if(!_0x51a989[_0x4bb447(0xc4)]&&_0x51a989[_0x4bb447(0xc3)]['length']===0x0&&_0x51a989[_0x4bb447(0xc8)]['length']===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x1fca6f,_0x534dda){const _0x121e16=a175_0x15f7;validateSelection(_0x534dda);if(_0x534dda[_0x121e16(0xc4)])return _0x1fca6f;const _0x4851f5=new Set(_0x1fca6f[_0x121e16(0xaa)](_0x47388b=>_0x47388b['id'])),_0x237275=new Set(_0x1fca6f[_0x121e16(0xaa)](_0x1e5d35=>_0x1e5d35[_0x121e16(0xb9)])),_0x2a3bed=_0x534dda['menuIds'][_0x121e16(0xbf)](_0x42e003=>!_0x4851f5[_0x121e16(0xd3)](_0x42e003)),_0x524512=_0x534dda[_0x121e16(0xc8)]['filter'](_0x3d3140=>!_0x237275[_0x121e16(0xd3)](_0x3d3140));if(_0x2a3bed['length']>0x0||_0x524512['length']>0x0){const _0x2adccd=[..._0x2a3bed['map'](_0x280eec=>String(_0x280eec)),..._0x524512][_0x121e16(0xc9)](',\x20');throw new Error(_0x121e16(0xcc)+_0x2adccd);}const _0x25c5c7=new Set(_0x534dda[_0x121e16(0xc3)]),_0x526eec=new Set(_0x534dda['paths']);return _0x1fca6f[_0x121e16(0xbf)](_0x1f335b=>_0x25c5c7[_0x121e16(0xd3)](_0x1f335b['id'])||_0x526eec[_0x121e16(0xd3)](_0x1f335b[_0x121e16(0xb9)]));}function normalizeMode(_0x1a193e){const _0x47ffec=a175_0x15f7;if(!_0x1a193e)return _0x47ffec(0xb4);if(_0x1a193e===_0x47ffec(0xd7)||_0x1a193e===_0x47ffec(0xb4))return _0x1a193e;throw new Error(_0x47ffec(0xd6)+_0x1a193e+_0x47ffec(0xac));}function buildMenuUpdateDiff(_0x21b445,_0x1120c5,_0xf6acf7,_0x238cbc,_0x15d0cd){const _0x3cbe44=a175_0x15f7,_0x292e86=[..._0x21b445[_0x3cbe44(0xa2)]];_0xf6acf7===_0x3cbe44(0xb4)&&assertUnambiguousPatchResources(_0x21b445,_0x292e86,_0x1120c5);const _0x404d3e=_0xf6acf7===_0x3cbe44(0xb4)?patchResources(_0x292e86,_0x1120c5):replaceResources(_0x1120c5),_0x3920a7=[],_0x553371=_0x292e86['some'](isJsResource),_0x1cbc59=_0x404d3e['some'](isJsResource);if(_0x553371&&!_0x1cbc59){const _0x464230='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x21b445[_0x3cbe44(0xcd)]+'\x22\x20('+_0x21b445[_0x3cbe44(0xb9)]+').\x20'+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x238cbc)throw new Error(_0x464230);_0x3920a7[_0x3cbe44(0x9e)](_0x464230);}const _0x2c17e3=_0x292e86[_0x3cbe44(0xdb)](isCssResource),_0x2c8f35=_0x404d3e[_0x3cbe44(0xdb)](isCssResource);_0x2c17e3&&!_0x2c8f35&&_0x3920a7[_0x3cbe44(0x9e)](_0x3cbe44(0xd4)+_0x21b445[_0x3cbe44(0xcd)]+_0x3cbe44(0xcf)+_0x21b445[_0x3cbe44(0xb9)]+').');const _0x2491da=typeof _0x21b445[_0x3cbe44(0xd5)]?.[_0x3cbe44(0xc1)]===_0x3cbe44(0xba)?_0x21b445[_0x3cbe44(0xd5)][_0x3cbe44(0xc1)]:null,_0x6da538=_0x15d0cd?{'loadScriptMode':_0x2491da}:{},_0x19b41e=_0x15d0cd?{'loadScriptMode':_0x15d0cd}:{};return{'id':_0x21b445['id'],'label':_0x21b445[_0x3cbe44(0xcd)],'path':_0x21b445['path'],'mode':_0xf6acf7,'before':{'resources':_0x292e86,..._0x6da538},'after':{'resources':_0x404d3e,..._0x19b41e},'warnings':_0x3920a7};}function replaceResources(_0xab2539){const _0x3f8fe4=a175_0x15f7;return[_0xab2539['jsUrl'],_0xab2539[_0x3f8fe4(0xc5)]][_0x3f8fe4(0xbf)](_0xe999d6=>!!_0xe999d6);}function a175_0x15f7(_0x143fd9,_0x181633){_0x143fd9=_0x143fd9-0x9b;const _0x1f1127=a175_0x1f11();let _0x15f7cd=_0x1f1127[_0x143fd9];return _0x15f7cd;}function assertUnambiguousPatchResources(_0x592aa5,_0x16913a,_0x3d3728){const _0x2b0cd3=a175_0x15f7,_0x3798f4=_0x16913a[_0x2b0cd3(0xbf)](isJsResource)['length'];if(_0x3d3728[_0x2b0cd3(0xa0)]&&_0x3798f4>0x1)throw new Error(_0x2b0cd3(0xde)+_0x3798f4+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x592aa5['label']+_0x2b0cd3(0xcf)+_0x592aa5[_0x2b0cd3(0xb9)]+')\x20'+_0x2b0cd3(0xa4));const _0x412dc1=_0x16913a[_0x2b0cd3(0xbf)](isCssResource)[_0x2b0cd3(0xd9)];if(_0x3d3728[_0x2b0cd3(0xc5)]&&_0x412dc1>0x1)throw new Error(_0x2b0cd3(0xde)+_0x412dc1+_0x2b0cd3(0xaf)+_0x592aa5['label']+_0x2b0cd3(0xcf)+_0x592aa5['path']+')\x20'+_0x2b0cd3(0xb7));}function patchResources(_0x1c9e78,_0x25f623){const _0x52a1cb=a175_0x15f7;let _0x34b652=![],_0x2f62ed=![];const _0x522eb4=[];for(const _0x31cc82 of _0x1c9e78){if(isJsResource(_0x31cc82)){if(_0x25f623[_0x52a1cb(0xa0)]&&!_0x34b652)_0x522eb4[_0x52a1cb(0x9e)](_0x25f623[_0x52a1cb(0xa0)]),_0x34b652=!![];else!_0x25f623[_0x52a1cb(0xa0)]&&_0x522eb4[_0x52a1cb(0x9e)](_0x31cc82);continue;}if(isCssResource(_0x31cc82)){if(_0x25f623[_0x52a1cb(0xc5)]&&!_0x2f62ed)_0x522eb4[_0x52a1cb(0x9e)](_0x25f623[_0x52a1cb(0xc5)]),_0x2f62ed=!![];else!_0x25f623[_0x52a1cb(0xc5)]&&_0x522eb4[_0x52a1cb(0x9e)](_0x31cc82);continue;}_0x522eb4[_0x52a1cb(0x9e)](_0x31cc82);}return _0x25f623[_0x52a1cb(0xa0)]&&!_0x34b652&&_0x522eb4[_0x52a1cb(0xbc)](_0x25f623[_0x52a1cb(0xa0)]),_0x25f623['cssUrl']&&!_0x2f62ed&&_0x522eb4['push'](_0x25f623[_0x52a1cb(0xc5)]),_0x522eb4;}function a175_0x1f11(){const _0x5e9656=['284901BKyHqR','cwd','isArray','fulfilled','value','push','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','jsUrl','1231jrDxor','resources','18205418usmNAr','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','dryRun','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.','5409540FLplLU','info','map','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','.\x20Allowed\x20values:\x20replace,\x20patch','allSettled','setLogPath','\x20existing\x20CSS\x20resources\x20for\x20\x22','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','.js','split','patch','Menu\x20asset\x20update\x20completed','trim','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','force','path','string','8qsaxJd','unshift','menu-asset-update','endsWith','filter','1431530HvAiow','loadScriptMode','20poDFsS','menuIds','all','cssUrl','812RPIjhj','Start\x20non-interactive\x20menu\x20asset\x20update','paths','join','Invalid\x20--params:\x20','2414619xmdIcY','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','label','7115773ZePHyZ','\x22\x20(','message','JS\x20URL\x20is\x20unreachable:\x20','44XgliUZ','has','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','extend','Invalid\x20--mode:\x20','replace','toLowerCase','length','selection','some','--params.','status','menu\x20asset-update\x20cannot\x20patch\x20'];a175_0x1f11=function(){return _0x5e9656;};return a175_0x1f11();}function isJsResource(_0x193117){const _0x58a457=a175_0x15f7;return stripQuery(_0x193117)[_0x58a457(0xd8)]()[_0x58a457(0xbe)](_0x58a457(0xb2));}function isCssResource(_0x3c03dc){const _0x24b347=a175_0x15f7;return stripQuery(_0x3c03dc)[_0x24b347(0xd8)]()[_0x24b347(0xbe)]('.css');}function stripQuery(_0x48ff9a){const _0x12fc73=a175_0x15f7;return _0x48ff9a[_0x12fc73(0xb3)]('?')[0x0]??_0x48ff9a;}function parseUpdateParamsFlag(_0x33bc17){const _0x22c448=a175_0x15f7;if(!_0x33bc17||typeof _0x33bc17!==_0x22c448(0xba))return{};try{const _0x163f1f=JSON['parse'](_0x33bc17);if(typeof _0x163f1f!=='object'||_0x163f1f===null||Array[_0x22c448(0x9b)](_0x163f1f))return{};return{'jsUrl':typeof _0x163f1f[_0x22c448(0xa0)]===_0x22c448(0xba)?_0x163f1f[_0x22c448(0xa0)][_0x22c448(0xb6)]():undefined,'cssUrl':typeof _0x163f1f['cssUrl']===_0x22c448(0xba)?_0x163f1f['cssUrl']['trim']():undefined};}catch{return{};}}
1
+ function a175_0x107d(){const _0x51c74a=['7AJgNIr','Invalid\x20--mode:\x20','55mjuQyX','field','dryRun','replace','.css','selection','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','jsUrl','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menuIds','extend','2117456HggzVN','416720bDhtWG','paths','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','1955784ESBwDJ','some','length','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','\x20existing\x20JS\x20resources\x20for\x20\x22','split','fulfilled','join','after','1028568GvzZLk','toLowerCase','37998jKRgqN','resources','string','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','value','\x22\x20(','filter','.js','force','has','message','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','status','all','map','patch','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','isArray','--params.','endsWith','loadScriptMode','menu\x20asset-update\x20cannot\x20patch\x20','1270tawbPs','object','push','trim','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu-asset-update','cssUrl','.\x20Allowed\x20values:\x20replace,\x20patch','path','1jONLIJ',').\x20','unshift','2323284jahzaW','JS\x20URL\x20is\x20unreachable:\x20','\x20existing\x20CSS\x20resources\x20for\x20\x22','CSS\x20URL\x20is\x20unreachable:\x20','label','parse','cwd','968318WQpJmv','5emtAFZ','rejected','allSettled'];a175_0x107d=function(){return _0x51c74a;};return a175_0x107d();}(function(_0x498db8,_0x580aaf){const _0x3997f5=a175_0x288f,_0x3801ce=_0x498db8();while(!![]){try{const _0x3ad50a=parseInt(_0x3997f5(0xb2))/0x1*(-parseInt(_0x3997f5(0xbc))/0x2)+-parseInt(_0x3997f5(0xda))/0x3+parseInt(_0x3997f5(0xce))/0x4*(-parseInt(_0x3997f5(0xbd))/0x5)+parseInt(_0x3997f5(0xb5))/0x6*(-parseInt(_0x3997f5(0xc0))/0x7)+parseInt(_0x3997f5(0xcd))/0x8+-parseInt(_0x3997f5(0xdc))/0x9*(-parseInt(_0x3997f5(0xa9))/0xa)+-parseInt(_0x3997f5(0xc2))/0xb*(-parseInt(_0x3997f5(0xd1))/0xc);if(_0x3ad50a===_0x580aaf)break;else _0x3801ce['push'](_0x3801ce['shift']());}catch(_0x560bf1){_0x3801ce['push'](_0x3801ce['shift']());}}}(a175_0x107d,0x489a1));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(_0x3f6f99){const _0x435c8c=a175_0x288f,_0x1e26e3=[];return _0x3f6f99['jsUrl']&&!isValidJsHttpsUrl(_0x3f6f99['jsUrl'])&&_0x1e26e3['push']({'field':_0x435c8c(0xc9),'message':_0x435c8c(0xa3)}),_0x3f6f99[_0x435c8c(0xaf)]&&!isValidCssHttpsUrl(_0x3f6f99[_0x435c8c(0xaf)])&&_0x1e26e3[_0x435c8c(0xab)]({'field':_0x435c8c(0xaf),'message':_0x435c8c(0xe0)}),_0x1e26e3;}export async function runMenuUpdateCore(_0x2e425e,_0xf47278,_0x5741db,_0x3862f6={}){const _0x159b95=a175_0x288f,_0x252e00=parseUpdateParamsFlag(_0x5741db),_0x1d8f9d=normalizeMode(_0x3862f6['mode']);validateSelection(_0x3862f6[_0x159b95(0xc7)]);const _0xee96fa=[];if(_0x252e00[_0x159b95(0xc9)])_0xee96fa[_0x159b95(0xab)](_0x252e00[_0x159b95(0xc9)]);if(_0x252e00[_0x159b95(0xaf)])_0xee96fa['push'](_0x252e00[_0x159b95(0xaf)]);const _0x15e7eb=validateParams(_0x252e00);if(_0x15e7eb[_0x159b95(0xd3)]>0x0){const _0x34eb0f=_0x15e7eb[_0x159b95(0xeb)](_0x587068=>_0x159b95(0xa5)+_0x587068[_0x159b95(0xc3)]+':\x20'+_0x587068[_0x159b95(0xe7)])[_0x159b95(0xd8)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x34eb0f);}if(_0xee96fa['length']===0x0)throw new Error(_0x159b95(0xad)+_0x159b95(0xdf));logger['setLogPath'](process[_0x159b95(0xbb)]()),logger['info']('menu-asset-update','Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x2e425e,'jsUrl':_0x252e00[_0x159b95(0xc9)],'cssUrl':_0x252e00['cssUrl'],'mode':_0x1d8f9d,'dryRun':_0x3862f6[_0x159b95(0xc4)]===!![]});if(_0x252e00[_0x159b95(0xc9)]){const _0xc41f50=await isUrlReachable(_0x252e00[_0x159b95(0xc9)]);if(!_0xc41f50)throw new Error(_0x159b95(0xb6)+_0x252e00[_0x159b95(0xc9)]);}if(_0x252e00['cssUrl']){const _0x25a3f4=await isUrlReachable(_0x252e00[_0x159b95(0xaf)]);if(!_0x25a3f4)throw new Error(_0x159b95(0xb8)+_0x252e00[_0x159b95(0xaf)]);}const _0x233b91=await getOnlineMenuList(_0x2e425e,_0xf47278),_0x35df2c=_0x233b91[_0x159b95(0xe3)](_0x36596a=>_0x36596a['resources']['length']>0x0),_0x2d67af=selectMenusForUpdate(_0x35df2c,_0x3862f6[_0x159b95(0xc7)]);if(_0x2d67af[_0x159b95(0xd3)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x3862f6['dryRun']===!![]};const _0x49f86f=_0x2d67af[_0x159b95(0xeb)](_0x107982=>buildMenuUpdateDiff(_0x107982,_0x252e00,_0x1d8f9d,_0x3862f6[_0x159b95(0xe5)]===!![],_0x3862f6[_0x159b95(0xa7)]));if(_0x3862f6['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x49f86f};const _0x249e4e=await Promise[_0x159b95(0xbf)](_0x2d67af[_0x159b95(0xeb)]((_0x151644,_0x47eb08)=>updateMenuCdnUrl(_0x2e425e,_0xf47278,{'id':_0x151644['id'],'label':_0x151644[_0x159b95(0xb9)],'path':_0x151644['path'],'resources':_0x49f86f[_0x47eb08][_0x159b95(0xd9)][_0x159b95(0xdd)],'extend':_0x151644[_0x159b95(0xcc)]??null,'loadScriptMode':_0x3862f6[_0x159b95(0xa7)]}))),_0x2666c3=_0x249e4e['filter'](_0x4e8054=>_0x4e8054[_0x159b95(0xe9)]===_0x159b95(0xd7))[_0x159b95(0xeb)](_0x56cac2=>_0x56cac2[_0x159b95(0xe1)]),_0x4c09d9=_0x249e4e[_0x159b95(0xe3)](_0x1ea2ac=>_0x1ea2ac[_0x159b95(0xe9)]===_0x159b95(0xbe))[_0x159b95(0xd3)];return logger['info'](_0x159b95(0xae),'Menu\x20asset\x20update\x20completed',{'count':_0x2d67af['length'],'resources':_0xee96fa}),{'updated':_0x2666c3[_0x159b95(0xd3)],'failed':_0x4c09d9,'skipped':![],'menus':_0x2666c3};}function validateSelection(_0xae4fbb){const _0x1a9098=a175_0x288f;if(!_0xae4fbb)throw new Error(_0x1a9098(0xd0));if(_0xae4fbb[_0x1a9098(0xea)]&&(_0xae4fbb[_0x1a9098(0xcb)]['length']>0x0||_0xae4fbb[_0x1a9098(0xcf)]['length']>0x0))throw new Error(_0x1a9098(0xc8));if(!_0xae4fbb[_0x1a9098(0xea)]&&_0xae4fbb['menuIds']['length']===0x0&&_0xae4fbb[_0x1a9098(0xcf)][_0x1a9098(0xd3)]===0x0)throw new Error(_0x1a9098(0xd0));}export function selectMenusForUpdate(_0x39fee8,_0x48538b){const _0x325822=a175_0x288f;validateSelection(_0x48538b);if(_0x48538b[_0x325822(0xea)])return _0x39fee8;const _0x59ae13=new Set(_0x39fee8[_0x325822(0xeb)](_0x4e3a37=>_0x4e3a37['id'])),_0x479aaa=new Set(_0x39fee8['map'](_0x4f5ccb=>_0x4f5ccb['path'])),_0x270c11=_0x48538b[_0x325822(0xcb)]['filter'](_0x1dcb64=>!_0x59ae13['has'](_0x1dcb64)),_0x38eaa8=_0x48538b['paths'][_0x325822(0xe3)](_0x4b371c=>!_0x479aaa[_0x325822(0xe6)](_0x4b371c));if(_0x270c11[_0x325822(0xd3)]>0x0||_0x38eaa8['length']>0x0){const _0x42b810=[..._0x270c11[_0x325822(0xeb)](_0x336838=>String(_0x336838)),..._0x38eaa8][_0x325822(0xd8)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x42b810);}const _0x16e19b=new Set(_0x48538b[_0x325822(0xcb)]),_0x5bd187=new Set(_0x48538b[_0x325822(0xcf)]);return _0x39fee8[_0x325822(0xe3)](_0x3bd503=>_0x16e19b[_0x325822(0xe6)](_0x3bd503['id'])||_0x5bd187[_0x325822(0xe6)](_0x3bd503[_0x325822(0xb1)]));}function normalizeMode(_0xfe678d){const _0x50e2bc=a175_0x288f;if(!_0xfe678d)return _0x50e2bc(0xa2);if(_0xfe678d===_0x50e2bc(0xc5)||_0xfe678d===_0x50e2bc(0xa2))return _0xfe678d;throw new Error(_0x50e2bc(0xc1)+_0xfe678d+_0x50e2bc(0xb0));}function buildMenuUpdateDiff(_0x1b3b7f,_0x2b760e,_0x3baf6b,_0x4e315d,_0x41faed){const _0x16fd06=a175_0x288f,_0x6d7605=[..._0x1b3b7f[_0x16fd06(0xdd)]];_0x3baf6b==='patch'&&assertUnambiguousPatchResources(_0x1b3b7f,_0x6d7605,_0x2b760e);const _0x259c0f=_0x3baf6b===_0x16fd06(0xa2)?patchResources(_0x6d7605,_0x2b760e):replaceResources(_0x2b760e),_0x2ad4b8=[],_0x2348f5=_0x6d7605['some'](isJsResource),_0x31abb6=_0x259c0f['some'](isJsResource);if(_0x2348f5&&!_0x31abb6){const _0xf7d8f6='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x1b3b7f['label']+_0x16fd06(0xe2)+_0x1b3b7f['path']+_0x16fd06(0xb3)+_0x16fd06(0xe8);if(!_0x4e315d)throw new Error(_0xf7d8f6);_0x2ad4b8[_0x16fd06(0xab)](_0xf7d8f6);}const _0x51c973=_0x6d7605[_0x16fd06(0xd2)](isCssResource),_0x1e02c3=_0x259c0f['some'](isCssResource);_0x51c973&&!_0x1e02c3&&_0x2ad4b8['push'](_0x16fd06(0xd4)+_0x1b3b7f[_0x16fd06(0xb9)]+_0x16fd06(0xe2)+_0x1b3b7f[_0x16fd06(0xb1)]+').');const _0x59dc63=typeof _0x1b3b7f[_0x16fd06(0xcc)]?.['loadScriptMode']===_0x16fd06(0xde)?_0x1b3b7f['extend'][_0x16fd06(0xa7)]:null,_0x31232c=_0x41faed?{'loadScriptMode':_0x59dc63}:{},_0x1574f3=_0x41faed?{'loadScriptMode':_0x41faed}:{};return{'id':_0x1b3b7f['id'],'label':_0x1b3b7f['label'],'path':_0x1b3b7f[_0x16fd06(0xb1)],'mode':_0x3baf6b,'before':{'resources':_0x6d7605,..._0x31232c},'after':{'resources':_0x259c0f,..._0x1574f3},'warnings':_0x2ad4b8};}function replaceResources(_0x24734d){const _0x1257af=a175_0x288f;return[_0x24734d['jsUrl'],_0x24734d[_0x1257af(0xaf)]][_0x1257af(0xe3)](_0x4ff15d=>!!_0x4ff15d);}function assertUnambiguousPatchResources(_0x3c94c3,_0x1413a6,_0x569d27){const _0x4420ec=a175_0x288f,_0x4207aa=_0x1413a6[_0x4420ec(0xe3)](isJsResource)[_0x4420ec(0xd3)];if(_0x569d27[_0x4420ec(0xc9)]&&_0x4207aa>0x1)throw new Error(_0x4420ec(0xa8)+_0x4207aa+_0x4420ec(0xd5)+_0x3c94c3[_0x4420ec(0xb9)]+_0x4420ec(0xe2)+_0x3c94c3[_0x4420ec(0xb1)]+')\x20'+_0x4420ec(0xca));const _0x2d5e61=_0x1413a6[_0x4420ec(0xe3)](isCssResource)[_0x4420ec(0xd3)];if(_0x569d27[_0x4420ec(0xaf)]&&_0x2d5e61>0x1)throw new Error(_0x4420ec(0xa8)+_0x2d5e61+_0x4420ec(0xb7)+_0x3c94c3[_0x4420ec(0xb9)]+_0x4420ec(0xe2)+_0x3c94c3['path']+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function a175_0x288f(_0x2d01ca,_0x4b7c7d){_0x2d01ca=_0x2d01ca-0xa2;const _0x107d6e=a175_0x107d();let _0x288f19=_0x107d6e[_0x2d01ca];return _0x288f19;}function patchResources(_0x54e522,_0x43593d){const _0x244c60=a175_0x288f;let _0x5867cb=![],_0x345a20=![];const _0xb05852=[];for(const _0x4a1122 of _0x54e522){if(isJsResource(_0x4a1122)){if(_0x43593d['jsUrl']&&!_0x5867cb)_0xb05852['push'](_0x43593d[_0x244c60(0xc9)]),_0x5867cb=!![];else!_0x43593d[_0x244c60(0xc9)]&&_0xb05852[_0x244c60(0xab)](_0x4a1122);continue;}if(isCssResource(_0x4a1122)){if(_0x43593d[_0x244c60(0xaf)]&&!_0x345a20)_0xb05852[_0x244c60(0xab)](_0x43593d[_0x244c60(0xaf)]),_0x345a20=!![];else!_0x43593d[_0x244c60(0xaf)]&&_0xb05852['push'](_0x4a1122);continue;}_0xb05852['push'](_0x4a1122);}return _0x43593d['jsUrl']&&!_0x5867cb&&_0xb05852[_0x244c60(0xb4)](_0x43593d[_0x244c60(0xc9)]),_0x43593d[_0x244c60(0xaf)]&&!_0x345a20&&_0xb05852['push'](_0x43593d[_0x244c60(0xaf)]),_0xb05852;}function isJsResource(_0x2eaa5a){const _0x1847e3=a175_0x288f;return stripQuery(_0x2eaa5a)['toLowerCase']()['endsWith'](_0x1847e3(0xe4));}function isCssResource(_0x216ac2){const _0x14915a=a175_0x288f;return stripQuery(_0x216ac2)[_0x14915a(0xdb)]()[_0x14915a(0xa6)](_0x14915a(0xc6));}function stripQuery(_0x2c9e94){const _0x12210a=a175_0x288f;return _0x2c9e94[_0x12210a(0xd6)]('?')[0x0]??_0x2c9e94;}function parseUpdateParamsFlag(_0x3c9df3){const _0x47cfee=a175_0x288f;if(!_0x3c9df3||typeof _0x3c9df3!==_0x47cfee(0xde))return{};try{const _0x113c54=JSON[_0x47cfee(0xba)](_0x3c9df3);if(typeof _0x113c54!==_0x47cfee(0xaa)||_0x113c54===null||Array[_0x47cfee(0xa4)](_0x113c54))return{};return{'jsUrl':typeof _0x113c54[_0x47cfee(0xc9)]===_0x47cfee(0xde)?_0x113c54[_0x47cfee(0xc9)][_0x47cfee(0xac)]():undefined,'cssUrl':typeof _0x113c54[_0x47cfee(0xaf)]===_0x47cfee(0xde)?_0x113c54[_0x47cfee(0xaf)][_0x47cfee(0xac)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a176_0x3b62(){const _0x28e066=['330anFEWf','21BxxvFE','3340064jwZgTP','trim','63084otWvFK','3082374ztfQWg','test','373293tmIejU','441908GohHDP','bytes=0-0','body','HEAD','722226qVrFMv','1758486KLWVNw'];a176_0x3b62=function(){return _0x28e066;};return a176_0x3b62();}(function(_0x51e6b9,_0x5dd46c){const _0x7d0df4=a176_0x3deb,_0x34d6d0=_0x51e6b9();while(!![]){try{const _0xb3b352=-parseInt(_0x7d0df4(0xe4))/0x1+parseInt(_0x7d0df4(0xee))/0x2+-parseInt(_0x7d0df4(0xed))/0x3+parseInt(_0x7d0df4(0xea))/0x4*(parseInt(_0x7d0df4(0xe6))/0x5)+parseInt(_0x7d0df4(0xe5))/0x6*(parseInt(_0x7d0df4(0xe7))/0x7)+-parseInt(_0x7d0df4(0xe8))/0x8+-parseInt(_0x7d0df4(0xeb))/0x9;if(_0xb3b352===_0x5dd46c)break;else _0x34d6d0['push'](_0x34d6d0['shift']());}catch(_0x25bfc4){_0x34d6d0['push'](_0x34d6d0['shift']());}}}(a176_0x3b62,0x827a0));export function isValidJsHttpsUrl(_0xf4d4d1){const _0x2c14c5=a176_0x3deb;return/^https:\/\/.+\.js(\?.*)?$/[_0x2c14c5(0xec)](_0xf4d4d1[_0x2c14c5(0xe9)]());}function a176_0x3deb(_0x3b2939,_0x203585){_0x3b2939=_0x3b2939-0xe3;const _0x3b6213=a176_0x3b62();let _0x3debd6=_0x3b6213[_0x3b2939];return _0x3debd6;}export function isValidCssHttpsUrl(_0x574c54){const _0x2db354=a176_0x3deb;return/^https:\/\/.+\.css(\?.*)?$/[_0x2db354(0xec)](_0x574c54[_0x2db354(0xe9)]());}export async function isUrlReachable(_0x6a2869){const _0x36fd43=a176_0x3deb;try{const _0x297b58=await fetch(_0x6a2869,{'method':_0x36fd43(0xe3)});if(_0x297b58['ok'])return!![];}catch{}try{const _0x5f30f4=await fetch(_0x6a2869,{'method':'GET','headers':{'Range':_0x36fd43(0xef)}}),_0x2de10e=_0x5f30f4['ok'];try{await _0x5f30f4[_0x36fd43(0xf0)]?.['cancel']();}catch{}return _0x2de10e;}catch{return![];}}
1
+ (function(_0x36e2b9,_0x83c989){const _0x7567c8=a176_0x4d27,_0x8f1228=_0x36e2b9();while(!![]){try{const _0x52ed41=parseInt(_0x7567c8(0x1c6))/0x1*(parseInt(_0x7567c8(0x1cc))/0x2)+-parseInt(_0x7567c8(0x1c0))/0x3+parseInt(_0x7567c8(0x1c8))/0x4+parseInt(_0x7567c8(0x1cb))/0x5+parseInt(_0x7567c8(0x1c5))/0x6+parseInt(_0x7567c8(0x1c7))/0x7*(-parseInt(_0x7567c8(0x1c3))/0x8)+parseInt(_0x7567c8(0x1cd))/0x9;if(_0x52ed41===_0x83c989)break;else _0x8f1228['push'](_0x8f1228['shift']());}catch(_0x2c2240){_0x8f1228['push'](_0x8f1228['shift']());}}}(a176_0x859c,0x74a01));function a176_0x859c(){const _0x3dcb13=['1861380tCGbfu','932oXFiak','7irXfLR','2014272sJeyRS','trim','cancel','4615835PTooSg','208DcZrNQ','1808262XmKZkV','GET','test','2746923OWXQBv','bytes=0-0','body','5131784mFJzzi','HEAD'];a176_0x859c=function(){return _0x3dcb13;};return a176_0x859c();}export function isValidJsHttpsUrl(_0x5c4d81){const _0x3210c9=a176_0x4d27;return/^https:\/\/.+\.js(\?.*)?$/[_0x3210c9(0x1bf)](_0x5c4d81[_0x3210c9(0x1c9)]());}function a176_0x4d27(_0xc060de,_0x294c6a){_0xc060de=_0xc060de-0x1bf;const _0x859c31=a176_0x859c();let _0x4d2750=_0x859c31[_0xc060de];return _0x4d2750;}export function isValidCssHttpsUrl(_0x4bdcf4){const _0x778ae4=a176_0x4d27;return/^https:\/\/.+\.css(\?.*)?$/[_0x778ae4(0x1bf)](_0x4bdcf4[_0x778ae4(0x1c9)]());}export async function isUrlReachable(_0x4102e8){const _0x454d88=a176_0x4d27;try{const _0x19d702=await fetch(_0x4102e8,{'method':_0x454d88(0x1c4)});if(_0x19d702['ok'])return!![];}catch{}try{const _0x10ee84=await fetch(_0x4102e8,{'method':_0x454d88(0x1ce),'headers':{'Range':_0x454d88(0x1c1)}}),_0x1d8890=_0x10ee84['ok'];try{await _0x10ee84[_0x454d88(0x1c2)]?.[_0x454d88(0x1ca)]();}catch{}return _0x1d8890;}catch{return![];}}
@@ -1 +1 @@
1
- const a177_0x335fd0=a177_0x152f;(function(_0x46b264,_0x1ae2cf){const _0x270ba8=a177_0x152f,_0x4c86b3=_0x46b264();while(!![]){try{const _0x5b1d02=-parseInt(_0x270ba8(0x1bf))/0x1+parseInt(_0x270ba8(0x1cb))/0x2*(-parseInt(_0x270ba8(0x1be))/0x3)+parseInt(_0x270ba8(0x1c1))/0x4+parseInt(_0x270ba8(0x1c6))/0x5+-parseInt(_0x270ba8(0x1ca))/0x6+parseInt(_0x270ba8(0x1c8))/0x7*(parseInt(_0x270ba8(0x1c5))/0x8)+parseInt(_0x270ba8(0x1c4))/0x9;if(_0x5b1d02===_0x1ae2cf)break;else _0x4c86b3['push'](_0x4c86b3['shift']());}catch(_0x16ca3d){_0x4c86b3['push'](_0x4c86b3['shift']());}}}(a177_0x1cc9,0xe0866));import{getSmartAppRecord}from'../../core/api-client.js';function a177_0x1cc9(){const _0x355f98=['\x20in\x20menu\x20host\x20','3heMAwU','1192053IOKEaR','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','2384364GVQvfJ','\x20menu(s)\x20for\x20','read','20132352YscQkm','2491144NyzpEH','5660355RrmZHP','Inspected\x20','7zAeEfH','cookie','9015240MNiQvq','1324472eWjrXU','boundMenus'];a177_0x1cc9=function(){return _0x355f98;};return a177_0x1cc9();}function a177_0x152f(_0x2ee4aa,_0x1a9bdf){_0x2ee4aa=_0x2ee4aa-0x1bc;const _0x1cc948=a177_0x1cc9();let _0x152fc3=_0x1cc948[_0x2ee4aa];return _0x152fc3;}import{getOnlineMenuList}from'../../commands/menu/shared/service.js';import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':'menu','command':'subapp-assets-status','description':a177_0x335fd0(0x1c0),'risk':a177_0x335fd0(0x1c3),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x161a78){getSubappSelector(_0x161a78);},async 'execute'(_0x587762){const _0x3c7d7a=a177_0x335fd0,{appCode:_0xb1b7e8,appName:_0x1206cb}=getSubappSelector(_0x587762),[_0x2e72c4,_0x35956a]=await Promise['all']([getSmartAppRecord(_0xb1b7e8,_0x587762[_0x3c7d7a(0x1c9)]),getOnlineMenuList(_0xb1b7e8,_0x587762[_0x3c7d7a(0x1c9)])]),_0x203cce={'appCode':_0xb1b7e8,...buildSubappAssetsStatus(_0x2e72c4,_0x35956a,_0x1206cb)};return{'ok':!![],'data':_0x203cce,'message':_0x3c7d7a(0x1c7)+_0x203cce[_0x3c7d7a(0x1bc)]+_0x3c7d7a(0x1c2)+_0x1206cb+_0x3c7d7a(0x1bd)+_0xb1b7e8+'.'};}};
1
+ const a177_0x25f9da=a177_0x140c;(function(_0x4dfe41,_0x37b60f){const _0xc8badd=a177_0x140c,_0x590d4d=_0x4dfe41();while(!![]){try{const _0x267891=parseInt(_0xc8badd(0x86))/0x1+-parseInt(_0xc8badd(0x8d))/0x2*(parseInt(_0xc8badd(0x95))/0x3)+-parseInt(_0xc8badd(0x89))/0x4+-parseInt(_0xc8badd(0x8e))/0x5*(-parseInt(_0xc8badd(0x92))/0x6)+-parseInt(_0xc8badd(0x84))/0x7*(parseInt(_0xc8badd(0x88))/0x8)+parseInt(_0xc8badd(0x94))/0x9*(-parseInt(_0xc8badd(0x87))/0xa)+-parseInt(_0xc8badd(0x83))/0xb*(-parseInt(_0xc8badd(0x8a))/0xc);if(_0x267891===_0x37b60f)break;else _0x590d4d['push'](_0x590d4d['shift']());}catch(_0x257f1c){_0x590d4d['push'](_0x590d4d['shift']());}}}(a177_0x3ee8,0x835d1));import{getSmartAppRecord}from'../../core/api-client.js';function a177_0x3ee8(){const _0x4acb6a=['read','all','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','48NSLorg','\x20menu(s)\x20for\x20','36nvpZar','1411173EGkGLi','Inspected\x20','2625865bbLiGW','3080WjFRRC','menu','975683IWhuwL','738680Nfunsy','11296XtWRMB','3382752NKDasL','84FhAwVW','boundMenus','cookie','2wEkqRD','77630XObJJA'];a177_0x3ee8=function(){return _0x4acb6a;};return a177_0x3ee8();}function a177_0x140c(_0x4f1e80,_0x46f4a4){_0x4f1e80=_0x4f1e80-0x82;const _0x3ee8e3=a177_0x3ee8();let _0x140cd5=_0x3ee8e3[_0x4f1e80];return _0x140cd5;}import{getOnlineMenuList}from'../../commands/menu/shared/service.js';import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':a177_0x25f9da(0x85),'command':'subapp-assets-status','description':a177_0x25f9da(0x91),'risk':a177_0x25f9da(0x8f),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x2babb9){getSubappSelector(_0x2babb9);},async 'execute'(_0x2aa7f5){const _0x2089ab=a177_0x25f9da,{appCode:_0x30a990,appName:_0x40969a}=getSubappSelector(_0x2aa7f5),[_0x333b59,_0x59f7c9]=await Promise[_0x2089ab(0x90)]([getSmartAppRecord(_0x30a990,_0x2aa7f5['cookie']),getOnlineMenuList(_0x30a990,_0x2aa7f5[_0x2089ab(0x8c)])]),_0xc7ea76={'appCode':_0x30a990,...buildSubappAssetsStatus(_0x333b59,_0x59f7c9,_0x40969a)};return{'ok':!![],'data':_0xc7ea76,'message':_0x2089ab(0x82)+_0xc7ea76[_0x2089ab(0x8b)]+_0x2089ab(0x93)+_0x40969a+'\x20in\x20menu\x20host\x20'+_0x30a990+'.'};}};
@@ -1 +1 @@
1
- const a178_0x4c9f97=a178_0x1be7;(function(_0x4074bc,_0x43ec7a){const _0x2a80a8=a178_0x1be7,_0x2d3fa6=_0x4074bc();while(!![]){try{const _0x209754=parseInt(_0x2a80a8(0x15f))/0x1*(-parseInt(_0x2a80a8(0x18d))/0x2)+-parseInt(_0x2a80a8(0x189))/0x3+parseInt(_0x2a80a8(0x19a))/0x4*(-parseInt(_0x2a80a8(0x159))/0x5)+-parseInt(_0x2a80a8(0x1a3))/0x6*(parseInt(_0x2a80a8(0x17f))/0x7)+-parseInt(_0x2a80a8(0x184))/0x8+-parseInt(_0x2a80a8(0x16c))/0x9+parseInt(_0x2a80a8(0x178))/0xa*(parseInt(_0x2a80a8(0x176))/0xb);if(_0x209754===_0x43ec7a)break;else _0x2d3fa6['push'](_0x2d3fa6['shift']());}catch(_0x2b5a4e){_0x2d3fa6['push'](_0x2d3fa6['shift']());}}}(a178_0x2cc3,0xdc470));function a178_0x2cc3(){const _0x3f5f52=['\x20must\x20be\x20a\x20JSON\x20array.','Unknown\x20app.extend\x20fields:\x20','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','4202511eiUckb','enableSample','object','appPublishStatus','4oWrngh','sha256','update','parse','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','subapp-assets-update','POST','resources','some','unchanged','enableOpenApi','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','appCode','8GcHYJD','string','assets','\x20must\x20be\x20a\x20JSON\x20object.','tenantColumn','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','filter','vipDeploy','verified\x20app.extend','1247718NJuEIY','app.extend','stringify','Would\x20update\x20shared\x20assets\x20for\x20','has','apiError','write','3210755jlQpQp','extend','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.',';\x20found\x20','keys','before','288853CDKGuW','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','str','isSafeInteger','join','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','enableAutoSync','length','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20',';\x20independent\x20deployment\x20not\x20verified.','cookie','validation','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','14817393yTDtCh','.\x20Refusing\x20update.','entries','expectedHash','https:','nextExtend','map','directDbEnabled','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','test','11RtxGKl',']\x20must\x20be\x20a\x20URL\x20string.','76389990Uyhcsi','skinColor','resources[','isArray','trim','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','expected-hash','28CEVmpA','not\x20HTTPS','\x20contains\x20invalid\x20JSON.','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','7965672LveTxf','accessKey'];a178_0x2cc3=function(){return _0x3f5f52;};return a178_0x2cc3();}import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a178_0x4c9f97(0x179),a178_0x4c9f97(0x197),a178_0x4c9f97(0x185),a178_0x4c9f97(0x19c),a178_0x4c9f97(0x19e),a178_0x4c9f97(0x18a),a178_0x4c9f97(0x1a1),a178_0x4c9f97(0x165),'directDbId',a178_0x4c9f97(0x173)]);function parseObject(_0x1593ca,_0x475cd1){const _0xc8935e=a178_0x4c9f97;let _0x5591e6=_0x1593ca;if(typeof _0x1593ca===_0xc8935e(0x19b))try{_0x5591e6=JSON[_0xc8935e(0x190)](_0x1593ca);}catch{throw CliErrors['validation'](_0x475cd1+_0xc8935e(0x181));}if(!_0x5591e6||typeof _0x5591e6!==_0xc8935e(0x18b)||Array[_0xc8935e(0x17b)](_0x5591e6))throw CliErrors[_0xc8935e(0x16a)](_0x475cd1+_0xc8935e(0x19d));return _0x5591e6;}function parseArray(_0x2f1ec0,_0x3c2211){const _0x5e837d=a178_0x4c9f97;let _0x3fbdd5;try{_0x3fbdd5=JSON['parse'](_0x2f1ec0);}catch{throw CliErrors['validation'](_0x3c2211+_0x5e837d(0x181));}if(!Array[_0x5e837d(0x17b)](_0x3fbdd5))throw CliErrors[_0x5e837d(0x16a)](_0x3c2211+_0x5e837d(0x186));return _0x3fbdd5[_0x5e837d(0x172)]((_0x337a64,_0x2ea8cb)=>parseObject(_0x337a64,_0x3c2211+'['+_0x2ea8cb+']'));}function validateResources(_0x374870){const _0x2bf1d8=a178_0x4c9f97;if(_0x374870[_0x2bf1d8(0x166)]===0x0)throw CliErrors[_0x2bf1d8(0x16a)](_0x2bf1d8(0x17d));for(const [_0x229ca8,_0x468fd7]of _0x374870[_0x2bf1d8(0x16e)]()){if(typeof _0x468fd7!==_0x2bf1d8(0x19b))throw CliErrors['validation'](_0x2bf1d8(0x17a)+_0x229ca8+_0x2bf1d8(0x177));try{if(new URL(_0x468fd7)['protocol']!==_0x2bf1d8(0x170))throw new Error(_0x2bf1d8(0x180));}catch{throw CliErrors['validation'](_0x2bf1d8(0x17a)+_0x229ca8+']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.');}}if(new Set(_0x374870)['size']!==_0x374870[_0x2bf1d8(0x166)]||!_0x374870['some'](_0x4dcaa7=>/\.m?js(?:[?#]|$)/i[_0x2bf1d8(0x175)](_0x4dcaa7)))throw CliErrors['validation']('Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.');return _0x374870;}function a178_0x1be7(_0x3fb9f8,_0x197be8){_0x3fb9f8=_0x3fb9f8-0x157;const _0x2cc33a=a178_0x2cc3();let _0x1be7d4=_0x2cc33a[_0x3fb9f8];return _0x1be7d4;}function prepare(_0x3ee00d,_0x516144,_0x4f6076){const _0x270c33=a178_0x4c9f97;if(!Number[_0x270c33(0x162)](_0x3ee00d['id'])||(_0x3ee00d['id']??0x0)<=0x0||typeof _0x3ee00d[_0x270c33(0x18c)]!=='string'||!_0x3ee00d[_0x270c33(0x18c)])throw CliErrors['validation'](_0x270c33(0x16b));const _0x21a477=parseObject(_0x3ee00d[_0x270c33(0x15a)],_0x270c33(0x1a4)),_0x3e679a=Object[_0x270c33(0x15d)](_0x21a477)['filter'](_0xdd65=>!KNOWN_EXTEND_KEYS[_0x270c33(0x1a7)](_0xdd65));if(_0x3e679a[_0x270c33(0x166)])throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x187)+_0x3e679a[_0x270c33(0x163)](',\x20')+_0x270c33(0x16d));if(typeof _0x21a477[_0x270c33(0x19c)]!==_0x270c33(0x19b))throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x182));const _0x257d0e=parseArray(_0x21a477[_0x270c33(0x19c)],'app.extend.assets'),_0x312c53=_0x257d0e[_0x270c33(0x1a0)](_0x2aaafc=>_0x2aaafc['appName']===_0x516144);if(_0x312c53['length']!==0x1)throw CliErrors['validation'](_0x270c33(0x167)+_0x516144+_0x270c33(0x15c)+_0x312c53[_0x270c33(0x166)]+'.');const _0x4721d3=_0x312c53[0x0];if(typeof _0x4721d3['resources']!==_0x270c33(0x19b))throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x164));let _0x582d87;try{_0x582d87=JSON['parse'](_0x4721d3['resources']);}catch{throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x188));}if(!Array[_0x270c33(0x17b)](_0x582d87)||_0x582d87[_0x270c33(0x195)](_0xcf3f38=>typeof _0xcf3f38!=='string'))throw CliErrors['validation'](_0x270c33(0x183));const _0x48b493=_0x257d0e[_0x270c33(0x172)](_0x1fa6f0=>_0x1fa6f0===_0x4721d3?{..._0x1fa6f0,'resources':JSON['stringify'](_0x4f6076)}:_0x1fa6f0),_0x20b384={..._0x21a477,'assets':JSON[_0x270c33(0x1a5)](_0x48b493)},_0x27dbf5=createHash(_0x270c33(0x18e))[_0x270c33(0x18f)](JSON[_0x270c33(0x1a5)]({'appCode':_0x3ee00d[_0x270c33(0x199)],'id':_0x3ee00d['id'],'appPublishStatus':_0x3ee00d['appPublishStatus'],'extend':_0x21a477,'appName':_0x516144,'resources':_0x4f6076}))['digest']('hex');return{'before':_0x582d87,'nextExtend':_0x20b384,'expectedHash':_0x27dbf5,'unchanged':isDeepStrictEqual(_0x582d87,_0x4f6076)};}function flags(_0x57f969){const _0x531113=a178_0x4c9f97,{appCode:_0x339b87,appName:_0x57e1ee}=getSubappSelector(_0x57f969),_0xa55627=_0x57f969[_0x531113(0x161)](_0x531113(0x194))[_0x531113(0x17c)]();if(!_0xa55627)throw CliErrors[_0x531113(0x16a)]('--resources\x20is\x20required.');let _0x469f80;try{_0x469f80=JSON['parse'](_0xa55627);}catch{throw CliErrors[_0x531113(0x16a)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x531113(0x17b)](_0x469f80))throw CliErrors[_0x531113(0x16a)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0x339b87,'appName':_0x57e1ee,'resources':validateResources(_0x469f80)};}export const menuSubappAssetsUpdate={'service':'menu','command':a178_0x4c9f97(0x192),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a178_0x4c9f97(0x158),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a178_0x4c9f97(0x194),'type':a178_0x4c9f97(0x19b),'required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':a178_0x4c9f97(0x17e),'type':a178_0x4c9f97(0x19b),'description':a178_0x4c9f97(0x160)}],async 'validate'(_0x130661){flags(_0x130661);},async 'dryRun'(_0x303526){const _0x36e59c=a178_0x4c9f97,{appCode:_0x4857bf,appName:_0x703dd5,resources:_0x33cba9}=flags(_0x303526),_0x186e61=await getSmartAppRecord(_0x4857bf,_0x303526[_0x36e59c(0x169)]),_0x375fe5=prepare(_0x186e61,_0x703dd5,_0x33cba9);return{'method':_0x36e59c(0x193),'url':'/smartapi/app/update','body':{'preview':{'appCode':_0x4857bf,'appName':_0x703dd5,'before':_0x375fe5[_0x36e59c(0x15e)],'after':_0x33cba9,'expectedHash':_0x375fe5[_0x36e59c(0x16f)],'unchanged':_0x375fe5['unchanged'],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x375fe5[_0x36e59c(0x196)]?_0x36e59c(0x15b):_0x36e59c(0x1a6)+_0x703dd5+'.'};},async 'execute'(_0x3ad7ac){const _0x1ae34d=a178_0x4c9f97,{appCode:_0x40b2dc,appName:_0x130e2b,resources:_0xb1ee7}=flags(_0x3ad7ac),_0x11f02a=_0x3ad7ac['str'](_0x1ae34d(0x17e))['trim']();if(!/^[a-f0-9]{64}$/i['test'](_0x11f02a))throw CliErrors['validation'](_0x1ae34d(0x19f));const _0x2e60d2=await getSmartAppRecord(_0x40b2dc,_0x3ad7ac[_0x1ae34d(0x169)]),_0x11b24e=prepare(_0x2e60d2,_0x130e2b,_0xb1ee7);if(_0x11f02a!==_0x11b24e[_0x1ae34d(0x16f)])throw CliErrors[_0x1ae34d(0x16a)](_0x1ae34d(0x191));if(_0x11b24e[_0x1ae34d(0x196)])return{'ok':!![],'data':{'appCode':_0x40b2dc,'appName':_0x130e2b,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x1ae34d(0x174)};await updateSmartAppRecord({'id':_0x2e60d2['id'],'appCode':_0x40b2dc,'appPublishStatus':_0x2e60d2[_0x1ae34d(0x18c)],'extend':_0x11b24e[_0x1ae34d(0x171)]},_0x3ad7ac[_0x1ae34d(0x169)]);const _0x11eff1=await getSmartAppRecord(_0x40b2dc,_0x3ad7ac['cookie']),_0x4d64d0=parseObject(_0x11eff1[_0x1ae34d(0x15a)],_0x1ae34d(0x1a2));if(_0x11eff1['id']!==_0x2e60d2['id']||_0x11eff1['appPublishStatus']!==_0x2e60d2['appPublishStatus']||!isDeepStrictEqual(_0x4d64d0,_0x11b24e[_0x1ae34d(0x171)]))throw CliErrors[_0x1ae34d(0x157)](_0x1ae34d(0x198));return{'ok':!![],'data':{'appCode':_0x40b2dc,'appName':_0x130e2b,'updated':!![],'resources':_0xb1ee7,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Updated\x20shared\x20resources\x20for\x20'+_0x130e2b+'\x20in\x20menu\x20host\x20'+_0x40b2dc+_0x1ae34d(0x168)};}};
1
+ const a178_0x46700a=a178_0x5829;(function(_0x1ab72e,_0x3c32d0){const _0x4b9bee=a178_0x5829,_0x348dfd=_0x1ab72e();while(!![]){try{const _0x37ff04=parseInt(_0x4b9bee(0x16a))/0x1*(parseInt(_0x4b9bee(0x15d))/0x2)+-parseInt(_0x4b9bee(0x17b))/0x3*(parseInt(_0x4b9bee(0x16c))/0x4)+parseInt(_0x4b9bee(0x15b))/0x5+-parseInt(_0x4b9bee(0x168))/0x6+parseInt(_0x4b9bee(0x14f))/0x7+parseInt(_0x4b9bee(0x172))/0x8+parseInt(_0x4b9bee(0x15e))/0x9;if(_0x37ff04===_0x3c32d0)break;else _0x348dfd['push'](_0x348dfd['shift']());}catch(_0xec819e){_0x348dfd['push'](_0x348dfd['shift']());}}}(a178_0x364e,0x2547b));import{createHash}from'node:crypto';function a178_0x5829(_0x350cb2,_0xa1407d){_0x350cb2=_0x350cb2-0x135;const _0x364e5c=a178_0x364e();let _0x582980=_0x364e5c[_0x350cb2];return _0x582980;}function a178_0x364e(){const _0x12230e=['appCode','671972OnWKhM','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','expectedHash','extend','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','before','apiError','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','\x20must\x20be\x20a\x20JSON\x20object.','object','directDbEnabled','test','41290LcRGVy','str','119046aezhiT','1345149ZWKkDb','string','resources[','keys','menu','skinColor','not\x20HTTPS','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','POST','app.extend.assets','808962maghgJ','some','1KXFOtc','filter','17444ZWrCgC','accessKey','appPublishStatus','parse','/smartapi/app/update','stringify','1957360VQlXjg','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','directDbId','cookie','hex','map','update','https:','protocol','186nGfmXP','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','isArray','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','subapp-assets-update','digest','Updated\x20shared\x20resources\x20for\x20','enableSample','resources','length','isSafeInteger','assets',']\x20must\x20be\x20a\x20URL\x20string.','.\x20Refusing\x20update.','join','enableOpenApi',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','vipDeploy','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','unchanged','validation',';\x20found\x20','expected-hash','trim','tenantColumn'];a178_0x364e=function(){return _0x12230e;};return a178_0x364e();}import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a178_0x46700a(0x163),a178_0x46700a(0x143),a178_0x46700a(0x16d),a178_0x46700a(0x13f),a178_0x46700a(0x14d),a178_0x46700a(0x13b),a178_0x46700a(0x146),'enableAutoSync',a178_0x46700a(0x174),a178_0x46700a(0x159)]);function parseObject(_0x35f6e7,_0x3c14c2){const _0x58c1bf=a178_0x46700a;let _0x4d7460=_0x35f6e7;if(typeof _0x35f6e7===_0x58c1bf(0x15f))try{_0x4d7460=JSON[_0x58c1bf(0x16f)](_0x35f6e7);}catch{throw CliErrors[_0x58c1bf(0x149)](_0x3c14c2+'\x20contains\x20invalid\x20JSON.');}if(!_0x4d7460||typeof _0x4d7460!==_0x58c1bf(0x158)||Array[_0x58c1bf(0x136)](_0x4d7460))throw CliErrors[_0x58c1bf(0x149)](_0x3c14c2+_0x58c1bf(0x157));return _0x4d7460;}function parseArray(_0x273cd2,_0x326d5b){const _0x52144d=a178_0x46700a;let _0x4f32e1;try{_0x4f32e1=JSON['parse'](_0x273cd2);}catch{throw CliErrors[_0x52144d(0x149)](_0x326d5b+'\x20contains\x20invalid\x20JSON.');}if(!Array[_0x52144d(0x136)](_0x4f32e1))throw CliErrors['validation'](_0x326d5b+'\x20must\x20be\x20a\x20JSON\x20array.');return _0x4f32e1[_0x52144d(0x177)]((_0x384a15,_0x37a2d8)=>parseObject(_0x384a15,_0x326d5b+'['+_0x37a2d8+']'));}function validateResources(_0x49a978){const _0x31c291=a178_0x46700a;if(_0x49a978[_0x31c291(0x13d)]===0x0)throw CliErrors[_0x31c291(0x149)](_0x31c291(0x173));for(const [_0x1630a0,_0x58bd58]of _0x49a978['entries']()){if(typeof _0x58bd58!==_0x31c291(0x15f))throw CliErrors[_0x31c291(0x149)](_0x31c291(0x160)+_0x1630a0+_0x31c291(0x140));try{if(new URL(_0x58bd58)[_0x31c291(0x17a)]!==_0x31c291(0x179))throw new Error(_0x31c291(0x164));}catch{throw CliErrors[_0x31c291(0x149)](_0x31c291(0x160)+_0x1630a0+_0x31c291(0x144));}}if(new Set(_0x49a978)['size']!==_0x49a978[_0x31c291(0x13d)]||!_0x49a978[_0x31c291(0x169)](_0x4a4eff=>/\.m?js(?:[?#]|$)/i[_0x31c291(0x15a)](_0x4a4eff)))throw CliErrors['validation']('Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.');return _0x49a978;}function prepare(_0x2212df,_0xdca596,_0x2dc922){const _0x5b6b6e=a178_0x46700a;if(!Number[_0x5b6b6e(0x13e)](_0x2212df['id'])||(_0x2212df['id']??0x0)<=0x0||typeof _0x2212df[_0x5b6b6e(0x16e)]!==_0x5b6b6e(0x15f)||!_0x2212df[_0x5b6b6e(0x16e)])throw CliErrors[_0x5b6b6e(0x149)](_0x5b6b6e(0x153));const _0x4bf997=parseObject(_0x2212df[_0x5b6b6e(0x152)],'app.extend'),_0x417ea8=Object[_0x5b6b6e(0x161)](_0x4bf997)[_0x5b6b6e(0x16b)](_0x3f0394=>!KNOWN_EXTEND_KEYS['has'](_0x3f0394));if(_0x417ea8[_0x5b6b6e(0x13d)])throw CliErrors['validation']('Unknown\x20app.extend\x20fields:\x20'+_0x417ea8[_0x5b6b6e(0x142)](',\x20')+_0x5b6b6e(0x141));if(typeof _0x4bf997['assets']!==_0x5b6b6e(0x15f))throw CliErrors[_0x5b6b6e(0x149)](_0x5b6b6e(0x150));const _0x4ffd52=parseArray(_0x4bf997[_0x5b6b6e(0x13f)],_0x5b6b6e(0x167)),_0x5e9ed1=_0x4ffd52['filter'](_0x4015e3=>_0x4015e3['appName']===_0xdca596);if(_0x5e9ed1[_0x5b6b6e(0x13d)]!==0x1)throw CliErrors[_0x5b6b6e(0x149)]('Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20'+_0xdca596+_0x5b6b6e(0x14a)+_0x5e9ed1['length']+'.');const _0x1d978d=_0x5e9ed1[0x0];if(typeof _0x1d978d['resources']!==_0x5b6b6e(0x15f))throw CliErrors[_0x5b6b6e(0x149)](_0x5b6b6e(0x147));let _0x598ede;try{_0x598ede=JSON[_0x5b6b6e(0x16f)](_0x1d978d['resources']);}catch{throw CliErrors[_0x5b6b6e(0x149)](_0x5b6b6e(0x145));}if(!Array['isArray'](_0x598ede)||_0x598ede['some'](_0x5add4d=>typeof _0x5add4d!=='string'))throw CliErrors[_0x5b6b6e(0x149)]('Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.');const _0x297916=_0x4ffd52[_0x5b6b6e(0x177)](_0x2a915c=>_0x2a915c===_0x1d978d?{..._0x2a915c,'resources':JSON[_0x5b6b6e(0x171)](_0x2dc922)}:_0x2a915c),_0x561d5c={..._0x4bf997,'assets':JSON[_0x5b6b6e(0x171)](_0x297916)},_0x2cd725=createHash('sha256')[_0x5b6b6e(0x178)](JSON[_0x5b6b6e(0x171)]({'appCode':_0x2212df[_0x5b6b6e(0x14e)],'id':_0x2212df['id'],'appPublishStatus':_0x2212df[_0x5b6b6e(0x16e)],'extend':_0x4bf997,'appName':_0xdca596,'resources':_0x2dc922}))[_0x5b6b6e(0x139)](_0x5b6b6e(0x176));return{'before':_0x598ede,'nextExtend':_0x561d5c,'expectedHash':_0x2cd725,'unchanged':isDeepStrictEqual(_0x598ede,_0x2dc922)};}function flags(_0x267744){const _0x98bfa5=a178_0x46700a,{appCode:_0x23e8e1,appName:_0x22a98d}=getSubappSelector(_0x267744),_0x3fc16d=_0x267744['str'](_0x98bfa5(0x13c))[_0x98bfa5(0x14c)]();if(!_0x3fc16d)throw CliErrors[_0x98bfa5(0x149)]('--resources\x20is\x20required.');let _0x50f36f;try{_0x50f36f=JSON[_0x98bfa5(0x16f)](_0x3fc16d);}catch{throw CliErrors[_0x98bfa5(0x149)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x98bfa5(0x136)](_0x50f36f))throw CliErrors[_0x98bfa5(0x149)](_0x98bfa5(0x135));return{'appCode':_0x23e8e1,'appName':_0x22a98d,'resources':validateResources(_0x50f36f)};}export const menuSubappAssetsUpdate={'service':a178_0x46700a(0x162),'command':a178_0x46700a(0x138),'description':a178_0x46700a(0x165),'risk':'write','strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a178_0x46700a(0x13c),'type':a178_0x46700a(0x15f),'required':!![],'description':a178_0x46700a(0x137)},{'name':a178_0x46700a(0x14b),'type':a178_0x46700a(0x15f),'description':'Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes'}],async 'validate'(_0x590f9){flags(_0x590f9);},async 'dryRun'(_0x137b93){const _0x214fc6=a178_0x46700a,{appCode:_0x1bfb05,appName:_0x1d9038,resources:_0x34b746}=flags(_0x137b93),_0x229013=await getSmartAppRecord(_0x1bfb05,_0x137b93[_0x214fc6(0x175)]),_0x4780e7=prepare(_0x229013,_0x1d9038,_0x34b746);return{'method':_0x214fc6(0x166),'url':_0x214fc6(0x170),'body':{'preview':{'appCode':_0x1bfb05,'appName':_0x1d9038,'before':_0x4780e7[_0x214fc6(0x154)],'after':_0x34b746,'expectedHash':_0x4780e7[_0x214fc6(0x151)],'unchanged':_0x4780e7[_0x214fc6(0x148)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x4780e7['unchanged']?_0x214fc6(0x17d):'Would\x20update\x20shared\x20assets\x20for\x20'+_0x1d9038+'.'};},async 'execute'(_0x10b1b0){const _0x524b9b=a178_0x46700a,{appCode:_0x3a727e,appName:_0x477c01,resources:_0x233548}=flags(_0x10b1b0),_0x2af4ee=_0x10b1b0[_0x524b9b(0x15c)](_0x524b9b(0x14b))[_0x524b9b(0x14c)]();if(!/^[a-f0-9]{64}$/i['test'](_0x2af4ee))throw CliErrors[_0x524b9b(0x149)](_0x524b9b(0x17c));const _0x399149=await getSmartAppRecord(_0x3a727e,_0x10b1b0[_0x524b9b(0x175)]),_0x4a3c14=prepare(_0x399149,_0x477c01,_0x233548);if(_0x2af4ee!==_0x4a3c14[_0x524b9b(0x151)])throw CliErrors[_0x524b9b(0x149)]('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0x4a3c14[_0x524b9b(0x148)])return{'ok':!![],'data':{'appCode':_0x3a727e,'appName':_0x477c01,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x524b9b(0x156)};await updateSmartAppRecord({'id':_0x399149['id'],'appCode':_0x3a727e,'appPublishStatus':_0x399149[_0x524b9b(0x16e)],'extend':_0x4a3c14['nextExtend']},_0x10b1b0[_0x524b9b(0x175)]);const _0x247546=await getSmartAppRecord(_0x3a727e,_0x10b1b0[_0x524b9b(0x175)]),_0x2b8253=parseObject(_0x247546[_0x524b9b(0x152)],'verified\x20app.extend');if(_0x247546['id']!==_0x399149['id']||_0x247546[_0x524b9b(0x16e)]!==_0x399149[_0x524b9b(0x16e)]||!isDeepStrictEqual(_0x2b8253,_0x4a3c14['nextExtend']))throw CliErrors[_0x524b9b(0x155)]('App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.');return{'ok':!![],'data':{'appCode':_0x3a727e,'appName':_0x477c01,'updated':!![],'resources':_0x233548,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x524b9b(0x13a)+_0x477c01+'\x20in\x20menu\x20host\x20'+_0x3a727e+';\x20independent\x20deployment\x20not\x20verified.'};}};
@@ -1 +1 @@
1
- const a179_0x1f6886=a179_0x50f5;(function(_0x3d0ac2,_0xb65ea5){const _0x24f006=a179_0x50f5,_0x50f29f=_0x3d0ac2();while(!![]){try{const _0x2c8bcd=parseInt(_0x24f006(0x17d))/0x1+-parseInt(_0x24f006(0x18b))/0x2*(parseInt(_0x24f006(0x159))/0x3)+parseInt(_0x24f006(0x162))/0x4*(parseInt(_0x24f006(0x15d))/0x5)+-parseInt(_0x24f006(0x16a))/0x6+-parseInt(_0x24f006(0x17e))/0x7*(parseInt(_0x24f006(0x171))/0x8)+parseInt(_0x24f006(0x158))/0x9+parseInt(_0x24f006(0x180))/0xa*(-parseInt(_0x24f006(0x194))/0xb);if(_0x2c8bcd===_0xb65ea5)break;else _0x50f29f['push'](_0x50f29f['shift']());}catch(_0x30f3ce){_0x50f29f['push'](_0x50f29f['shift']());}}}(a179_0xa406,0xf1b7d));import a179_0x52b630 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{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a179_0x50f5(_0x1d5650,_0x1dc12b){_0x1d5650=_0x1d5650-0x155;const _0xa40681=a179_0xa406();let _0x50f54b=_0xa40681[_0x1d5650];return _0x50f54b;}function a179_0xa406(){const _0x40428d=['skipped','\x20menu(s)\x20with\x20JS:\x20','\x20created.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','message','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','1507174LRfqtz','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','sync','menu','validation','boolean','string','\x20local\x20microfrontend\x20menu(s).','\x20menu(s)...','15235cyLOtS','\x20\x20Continue\x20with\x20creation?','cookie','length','Menu\x20creation\x20failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','Register\x20local\x20pages\x20as\x20platform\x20menus','rawFlags','selectedAppName','params','jsUrl','appName','POST','5620446dsIhch','3tUwcPV','trim','\x20menu(s)\x20created','Fetching\x20online\x20menu\x20list...','1514305XxuDjx','Failed\x20to\x20fetch\x20online\x20menu\x20list','/smartapi/menu/create','map','\x20\x20Cancelled.','16urUOPy','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Menu\x20sync\x20skipped','created','\x20failed.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','gray','\x20menu(s)\x20bound\x20to\x20','6611664sDkhJZ','\x20and\x20CSS:\x20','paths','Would\x20create\x20','flag','size','filter','136afkTTj','cssUrl','\x20\x20Create\x20','str','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','onlinePaths','\x20\x20✓\x20Selected:\x20','onlineMenuList','cyan','appcode','split','Creating\x20','1848612QAeOQX','55167meitjD','✓\x20Menu\x20sync\x20completed:\x20','5090zHsiWS','Menu\x20sync\x20completed:\x20','yes','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','appCode'];a179_0xa406=function(){return _0x40428d;};return a179_0xa406();}import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a179_0x1f6886(0x18e),'command':a179_0x1f6886(0x18d),'description':a179_0x1f6886(0x19b),'risk':'write','flags':[{'name':a179_0x1f6886(0x19e),'type':a179_0x1f6886(0x191),'description':a179_0x1f6886(0x175)+a179_0x1f6886(0x183)},{'name':a179_0x1f6886(0x16c),'type':a179_0x1f6886(0x191),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':'yes','type':a179_0x1f6886(0x190),'description':a179_0x1f6886(0x19a)}],async 'dryRun'(_0x7ea108){const _0x408571=a179_0x1f6886;ensureRunnableContext(_0x7ea108[_0x408571(0x19c)],_0x7ea108[_0x408571(0x19d)]);const _0x5e3dac=await runMenuSyncCore(_0x7ea108[_0x408571(0x184)],_0x7ea108['cookie'],parsePaths(_0x7ea108[_0x408571(0x174)](_0x408571(0x16c))),_0x7ea108[_0x408571(0x174)](_0x408571(0x19e)),{'dryRun':!![]});return{'method':_0x408571(0x157),'url':_0x408571(0x15f),'body':_0x5e3dac,'description':_0x5e3dac[_0x408571(0x185)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x408571(0x16d)+_0x5e3dac['targetPages']['length']+_0x408571(0x192)};},async 'execute'(_0x1f12f4){const _0x1283c9=a179_0x1f6886;ensureRunnableContext(_0x1f12f4[_0x1283c9(0x19c)],_0x1f12f4[_0x1283c9(0x19d)]);const _0x31ba56=_0x1f12f4[_0x1283c9(0x16e)](_0x1283c9(0x182)),_0x1c2ecc=_0x1f12f4['str']('params'),_0x462a08=parsePaths(_0x1f12f4[_0x1283c9(0x174)]('paths')),_0x4fc88a=parseMenuSyncParams(_0x1c2ecc);if(_0x31ba56){const _0x4a556a=await runMenuSyncCore(_0x1f12f4['appCode'],_0x1f12f4[_0x1283c9(0x196)],_0x462a08,_0x1c2ecc);if(_0x4a556a[_0x1283c9(0x185)]){const _0x3636a7=getLocalPages();_0x3636a7[_0x1283c9(0x197)]===0x0?writeCliSideChannelLine(_0x1283c9(0x199)):writeCliSideChannelLine(_0x1283c9(0x163));}else writeCliSideChannelLine(_0x1283c9(0x17f)+_0x4a556a[_0x1283c9(0x165)]+_0x1283c9(0x15b));return{'ok':!![],'data':_0x4a556a,'message':_0x4a556a['skipped']?_0x1283c9(0x164):_0x1283c9(0x181)+_0x4a556a['created']+_0x1283c9(0x187)};}if(_0x462a08[_0x1283c9(0x197)]>0x0)throw CliErrors[_0x1283c9(0x18f)](_0x1283c9(0x18c),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x1c2ecc)throw CliErrors[_0x1283c9(0x18f)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x1283c9(0x188));requireInteractive(),writeCliSideChannelLine(_0x1283c9(0x18a));const _0x4e901c=startSpinner(_0x1283c9(0x15c));let _0x153cda,_0x59cc5c,_0x331c89;try{const _0x412f54=await fetchMenuData(_0x1f12f4['appCode'],_0x1f12f4[_0x1283c9(0x196)]);_0x153cda=_0x412f54['localPages'],_0x59cc5c=_0x412f54[_0x1283c9(0x176)],_0x331c89=_0x412f54[_0x1283c9(0x178)],stopSpinner(_0x4e901c,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x4e4d3d){stopSpinner(_0x4e901c,_0x1283c9(0x15e),![]);throw CliErrors[_0x1283c9(0x18f)](_0x4e4d3d instanceof Error?_0x4e4d3d[_0x1283c9(0x189)]:_0x1283c9(0x15e));}if(_0x153cda[_0x1283c9(0x197)]===0x0)return writeCliSideChannelLine(a179_0x52b630['yellow'](_0x1283c9(0x167))),{'ok':!![]};const _0x2cc7a3=buildCompareRows(_0x153cda,_0x59cc5c);writeCliSideChannelLine(renderCompareTable(_0x2cc7a3)),writeCliSideChannelLine('');const _0x3b66b1=await selectPages(_0x153cda,_0x59cc5c);writeCliSideChannelLine(''),writeCliSideChannelLine(a179_0x52b630[_0x1283c9(0x179)](_0x1283c9(0x177)+_0x3b66b1[_0x1283c9(0x197)]+'\x20page(s)'));const _0x46e868=_0x4fc88a[_0x1283c9(0x155)]&&_0x4fc88a[_0x1283c9(0x172)];if(!_0x46e868){writeCliSideChannelLine(renderSyncSummary(_0x3b66b1,_0x59cc5c[_0x1283c9(0x16f)]>0x0));const _0x3ef60e=await askConfirm(_0x1283c9(0x195));if(!_0x3ef60e)return writeCliSideChannelLine(a179_0x52b630[_0x1283c9(0x168)](_0x1283c9(0x161))),{'ok':!![]};}let _0x14b6ea=_0x4fc88a[_0x1283c9(0x155)],_0x326076=_0x4fc88a[_0x1283c9(0x172)];!_0x14b6ea&&!_0x4fc88a[_0x1283c9(0x156)]&&(_0x14b6ea=await askJsUrl());!_0x326076&&!_0x4fc88a['appName']&&(_0x326076=await askCssUrl());const _0x4c7cd5=await askConfirm(_0x4fc88a[_0x1283c9(0x156)]?_0x1283c9(0x173)+_0x3b66b1[_0x1283c9(0x197)]+_0x1283c9(0x169)+_0x4fc88a[_0x1283c9(0x156)]+'?':_0x1283c9(0x173)+_0x3b66b1[_0x1283c9(0x197)]+_0x1283c9(0x186)+_0x14b6ea+_0x1283c9(0x16b)+_0x326076+'?');if(!_0x4c7cd5)return writeCliSideChannelLine(a179_0x52b630[_0x1283c9(0x168)](_0x1283c9(0x161))),{'ok':!![]};const _0x5e4a94=[_0x14b6ea,_0x326076][_0x1283c9(0x170)](_0x121713=>Boolean(_0x121713));_0x4fc88a['appName']&&_0x5e4a94[_0x1283c9(0x197)]===0x0&&await assertSharedResourcesConfigured(_0x1f12f4[_0x1283c9(0x184)],_0x1f12f4[_0x1283c9(0x196)],_0x4fc88a['appName']);const _0x29192c=startSpinner(_0x1283c9(0x17c)+_0x3b66b1[_0x1283c9(0x197)]+_0x1283c9(0x193));try{const _0x312372=_0x3b66b1['map'](_0x2a286d=>resolvePage(_0x2a286d,_0x4fc88a,_0x331c89)),_0x44a007=await doCreateMenus(_0x1f12f4[_0x1283c9(0x184)],_0x1f12f4['cookie'],_0x312372,_0x5e4a94,_0x4fc88a[_0x1283c9(0x156)]?{'appName':_0x4fc88a[_0x1283c9(0x156)]}:undefined);return stopSpinner(_0x29192c,'Created\x20'+_0x44a007['created']+'\x20menu(s)',!![]),{'ok':!![],'data':_0x44a007,'message':_0x1283c9(0x181)+_0x44a007[_0x1283c9(0x165)]+'\x20created,\x20'+_0x44a007['failed']+_0x1283c9(0x166)};}catch(_0x5673b7){stopSpinner(_0x29192c,_0x1283c9(0x198),![]);throw CliErrors[_0x1283c9(0x18f)](_0x5673b7 instanceof Error?_0x5673b7[_0x1283c9(0x189)]:_0x1283c9(0x198));}}};function ensureRunnableContext(_0x2cbdcd,_0x1196ef){const _0x5a6d34=a179_0x1f6886,_0x317ed0=_0x2cbdcd[_0x5a6d34(0x17a)]?String(_0x2cbdcd['appcode'])[_0x5a6d34(0x15a)]():'';if(!isInProject()&&!_0x1196ef&&!_0x317ed0)throw CliErrors[_0x5a6d34(0x18f)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x590f5f){const _0xc06e37=a179_0x1f6886;return[...new Set(_0x590f5f[_0xc06e37(0x17b)](',')[_0xc06e37(0x160)](_0x24a0b8=>_0x24a0b8[_0xc06e37(0x15a)]())[_0xc06e37(0x170)](Boolean))];}
1
+ const a179_0x4c767d=a179_0x4705;function a179_0x2dd7(){const _0x206385=['appCode','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','\x20failed.','7NmTbCA','\x20\x20✓\x20Selected:\x20','flag','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Online\x20menu\x20list\x20fetched','1525725qUzfIy','appcode','filter','appName','split','\x20\x20Cancelled.','localPages','\x20menu(s)...','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','POST','177432oIsjyT','targetPages','3229czIaIR','gray','\x20and\x20CSS:\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','created','\x20local\x20microfrontend\x20menu(s).','232557ayWVyL','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','params','16GSDWbi','jsUrl','cyan','cookie','/smartapi/menu/create','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','cssUrl','8QDLjlw','string','Menu\x20sync\x20skipped','map','size','validation','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','paths','failed','Menu\x20sync\x20completed:\x20','message','40jRfzIj','onlineMenuList','Register\x20local\x20pages\x20as\x20platform\x20menus','996UdhvUj','rawFlags','\x20page(s)','Menu\x20creation\x20failed','4773802vKDQPV','trim','5560146fqJlSz','Fetching\x20online\x20menu\x20list...','selectedAppName','Failed\x20to\x20fetch\x20online\x20menu\x20list','9781788ZisUKV','length','\x20created.','\x20\x20Create\x20','\x20menu(s)\x20created','skipped','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','str','\x20menu(s)','write','9gffGgs','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.'];a179_0x2dd7=function(){return _0x206385;};return a179_0x2dd7();}(function(_0x90f871,_0x2b6b78){const _0x23cbc5=a179_0x4705,_0x548b28=_0x90f871();while(!![]){try{const _0x5eda66=-parseInt(_0x23cbc5(0x165))/0x1*(-parseInt(_0x23cbc5(0x16e))/0x2)+parseInt(_0x23cbc5(0x197))/0x3*(-parseInt(_0x23cbc5(0x163))/0x4)+parseInt(_0x23cbc5(0x159))/0x5+-parseInt(_0x23cbc5(0x18d))/0x6*(-parseInt(_0x23cbc5(0x19c))/0x7)+-parseInt(_0x23cbc5(0x175))/0x8*(parseInt(_0x23cbc5(0x189))/0x9)+-parseInt(_0x23cbc5(0x180))/0xa*(parseInt(_0x23cbc5(0x187))/0xb)+parseInt(_0x23cbc5(0x183))/0xc*(parseInt(_0x23cbc5(0x16b))/0xd);if(_0x5eda66===_0x2b6b78)break;else _0x548b28['push'](_0x548b28['shift']());}catch(_0x251bf2){_0x548b28['push'](_0x548b28['shift']());}}}(a179_0x2dd7,0xea322));import a179_0x2dd919 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{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a179_0x4705(_0x554da9,_0x7dffb6){_0x554da9=_0x554da9-0x156;const _0x2dd712=a179_0x2dd7();let _0x470518=_0x2dd712[_0x554da9];return _0x470518;}import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':'menu','command':'sync','description':a179_0x4c767d(0x182),'risk':a179_0x4c767d(0x196),'flags':[{'name':a179_0x4c767d(0x16d),'type':a179_0x4c767d(0x176),'description':'Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20'+a179_0x4c767d(0x173)},{'name':a179_0x4c767d(0x17c),'type':a179_0x4c767d(0x176),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':'yes','type':'boolean','description':a179_0x4c767d(0x19a)}],async 'dryRun'(_0x2ed446){const _0x2dab52=a179_0x4c767d;ensureRunnableContext(_0x2ed446[_0x2dab52(0x184)],_0x2ed446[_0x2dab52(0x18b)]);const _0x1b6589=await runMenuSyncCore(_0x2ed446[_0x2dab52(0x199)],_0x2ed446[_0x2dab52(0x171)],parsePaths(_0x2ed446[_0x2dab52(0x194)](_0x2dab52(0x17c))),_0x2ed446[_0x2dab52(0x194)](_0x2dab52(0x16d)),{'dryRun':!![]});return{'method':_0x2dab52(0x162),'url':_0x2dab52(0x172),'body':_0x1b6589,'description':_0x1b6589[_0x2dab52(0x192)]?_0x2dab52(0x161):'Would\x20create\x20'+_0x1b6589[_0x2dab52(0x164)][_0x2dab52(0x18e)]+_0x2dab52(0x16a)};},async 'execute'(_0x3933ec){const _0xfb56d7=a179_0x4c767d;ensureRunnableContext(_0x3933ec[_0xfb56d7(0x184)],_0x3933ec[_0xfb56d7(0x18b)]);const _0x299fc6=_0x3933ec[_0xfb56d7(0x156)]('yes'),_0x1bbcd4=_0x3933ec[_0xfb56d7(0x194)]('params'),_0x2e7adb=parsePaths(_0x3933ec['str'](_0xfb56d7(0x17c))),_0x144b34=parseMenuSyncParams(_0x1bbcd4);if(_0x299fc6){const _0x1a3704=await runMenuSyncCore(_0x3933ec[_0xfb56d7(0x199)],_0x3933ec['cookie'],_0x2e7adb,_0x1bbcd4);if(_0x1a3704[_0xfb56d7(0x192)]){const _0x31a46c=getLocalPages();_0x31a46c[_0xfb56d7(0x18e)]===0x0?writeCliSideChannelLine(_0xfb56d7(0x16c)):writeCliSideChannelLine(_0xfb56d7(0x157));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x1a3704[_0xfb56d7(0x169)]+_0xfb56d7(0x191));return{'ok':!![],'data':_0x1a3704,'message':_0x1a3704[_0xfb56d7(0x192)]?_0xfb56d7(0x177):_0xfb56d7(0x17e)+_0x1a3704[_0xfb56d7(0x169)]+_0xfb56d7(0x18f)};}if(_0x2e7adb['length']>0x0)throw CliErrors[_0xfb56d7(0x17a)](_0xfb56d7(0x198),_0xfb56d7(0x168));if(!isInteractive()&&_0x1bbcd4)throw CliErrors[_0xfb56d7(0x17a)](_0xfb56d7(0x193),_0xfb56d7(0x168));requireInteractive(),writeCliSideChannelLine(_0xfb56d7(0x17b));const _0x35703c=startSpinner(_0xfb56d7(0x18a));let _0x20db9f,_0x29a3d1,_0x420ffa;try{const _0x5e5bfe=await fetchMenuData(_0x3933ec[_0xfb56d7(0x199)],_0x3933ec[_0xfb56d7(0x171)]);_0x20db9f=_0x5e5bfe[_0xfb56d7(0x15f)],_0x29a3d1=_0x5e5bfe['onlinePaths'],_0x420ffa=_0x5e5bfe[_0xfb56d7(0x181)],stopSpinner(_0x35703c,_0xfb56d7(0x158),!![]);}catch(_0x2be598){stopSpinner(_0x35703c,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0xfb56d7(0x17a)](_0x2be598 instanceof Error?_0x2be598[_0xfb56d7(0x17f)]:_0xfb56d7(0x18c));}if(_0x20db9f[_0xfb56d7(0x18e)]===0x0)return writeCliSideChannelLine(a179_0x2dd919['yellow']('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x12660f=buildCompareRows(_0x20db9f,_0x29a3d1);writeCliSideChannelLine(renderCompareTable(_0x12660f)),writeCliSideChannelLine('');const _0x3813e8=await selectPages(_0x20db9f,_0x29a3d1);writeCliSideChannelLine(''),writeCliSideChannelLine(a179_0x2dd919[_0xfb56d7(0x170)](_0xfb56d7(0x19d)+_0x3813e8[_0xfb56d7(0x18e)]+_0xfb56d7(0x185)));const _0x9e3a2b=_0x144b34[_0xfb56d7(0x16f)]&&_0x144b34[_0xfb56d7(0x174)];if(!_0x9e3a2b){writeCliSideChannelLine(renderSyncSummary(_0x3813e8,_0x29a3d1[_0xfb56d7(0x179)]>0x0));const _0x3e85ba=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x3e85ba)return writeCliSideChannelLine(a179_0x2dd919[_0xfb56d7(0x166)](_0xfb56d7(0x15e))),{'ok':!![]};}let _0x59004b=_0x144b34[_0xfb56d7(0x16f)],_0x26eb07=_0x144b34['cssUrl'];!_0x59004b&&!_0x144b34[_0xfb56d7(0x15c)]&&(_0x59004b=await askJsUrl());!_0x26eb07&&!_0x144b34['appName']&&(_0x26eb07=await askCssUrl());const _0x253c6c=await askConfirm(_0x144b34[_0xfb56d7(0x15c)]?_0xfb56d7(0x190)+_0x3813e8[_0xfb56d7(0x18e)]+'\x20menu(s)\x20bound\x20to\x20'+_0x144b34[_0xfb56d7(0x15c)]+'?':_0xfb56d7(0x190)+_0x3813e8[_0xfb56d7(0x18e)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x59004b+_0xfb56d7(0x167)+_0x26eb07+'?');if(!_0x253c6c)return writeCliSideChannelLine(a179_0x2dd919[_0xfb56d7(0x166)](_0xfb56d7(0x15e))),{'ok':!![]};const _0x8ebaf0=[_0x59004b,_0x26eb07]['filter'](_0x1b2693=>Boolean(_0x1b2693));_0x144b34['appName']&&_0x8ebaf0[_0xfb56d7(0x18e)]===0x0&&await assertSharedResourcesConfigured(_0x3933ec[_0xfb56d7(0x199)],_0x3933ec['cookie'],_0x144b34[_0xfb56d7(0x15c)]);const _0x19cb42=startSpinner('Creating\x20'+_0x3813e8[_0xfb56d7(0x18e)]+_0xfb56d7(0x160));try{const _0x40907d=_0x3813e8[_0xfb56d7(0x178)](_0x5e2dd8=>resolvePage(_0x5e2dd8,_0x144b34,_0x420ffa)),_0x148e2e=await doCreateMenus(_0x3933ec[_0xfb56d7(0x199)],_0x3933ec[_0xfb56d7(0x171)],_0x40907d,_0x8ebaf0,_0x144b34['appName']?{'appName':_0x144b34[_0xfb56d7(0x15c)]}:undefined);return stopSpinner(_0x19cb42,'Created\x20'+_0x148e2e['created']+_0xfb56d7(0x195),!![]),{'ok':!![],'data':_0x148e2e,'message':'Menu\x20sync\x20completed:\x20'+_0x148e2e[_0xfb56d7(0x169)]+'\x20created,\x20'+_0x148e2e[_0xfb56d7(0x17d)]+_0xfb56d7(0x19b)};}catch(_0x596c5f){stopSpinner(_0x19cb42,_0xfb56d7(0x186),![]);throw CliErrors['validation'](_0x596c5f instanceof Error?_0x596c5f[_0xfb56d7(0x17f)]:_0xfb56d7(0x186));}}};function ensureRunnableContext(_0x1184db,_0x268275){const _0x5c00da=a179_0x4c767d,_0x1fba04=_0x1184db[_0x5c00da(0x15a)]?String(_0x1184db[_0x5c00da(0x15a)])['trim']():'';if(!isInProject()&&!_0x268275&&!_0x1fba04)throw CliErrors[_0x5c00da(0x17a)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x1f7bf7){const _0x34ebb6=a179_0x4c767d;return[...new Set(_0x1f7bf7[_0x34ebb6(0x15d)](',')[_0x34ebb6(0x178)](_0x2a3a74=>_0x2a3a74[_0x34ebb6(0x188)]())[_0x34ebb6(0x15b)](Boolean))];}