@lovrabet/rabetbase-cli 2.5.9-beta.1 → 2.5.10-beta.1

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 (377) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +1 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +1 -1
  32. package/lib/commands/app-config/delete.js +1 -1
  33. package/lib/commands/app-config/get.js +1 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +1 -1
  36. package/lib/commands/app-config/set.js +1 -1
  37. package/lib/commands/app-config/shared.js +1 -1
  38. package/lib/commands/auth/index.js +1 -1
  39. package/lib/commands/bff/create.js +1 -1
  40. package/lib/commands/bff/delete.js +1 -1
  41. package/lib/commands/bff/detail.js +1 -1
  42. package/lib/commands/bff/index.js +1 -1
  43. package/lib/commands/bff/list.js +1 -1
  44. package/lib/commands/bff/logs.js +1 -1
  45. package/lib/commands/bff/pull.js +1 -1
  46. package/lib/commands/bff/push.js +1 -1
  47. package/lib/commands/bff/status.js +1 -1
  48. package/lib/commands/cli-skill/index.js +1 -1
  49. package/lib/commands/cli-update.js +1 -1
  50. package/lib/commands/codegen/index.js +1 -1
  51. package/lib/commands/codegen/sdk.js +1 -1
  52. package/lib/commands/codegen/sql.js +1 -1
  53. package/lib/commands/common/app-registry.js +1 -1
  54. package/lib/commands/common/app-selector.js +1 -1
  55. package/lib/commands/common/async-task.js +1 -1
  56. package/lib/commands/common/dry-run.js +1 -1
  57. package/lib/commands/common/flags.js +1 -1
  58. package/lib/commands/common/local-file.js +1 -1
  59. package/lib/commands/common/validate.js +1 -1
  60. package/lib/commands/config/delete.js +1 -1
  61. package/lib/commands/config/get.js +1 -1
  62. package/lib/commands/config/index.js +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/design-context.js +1 -1
  78. package/lib/commands/dataset/design-start.js +1 -1
  79. package/lib/commands/dataset/design-status.js +1 -1
  80. package/lib/commands/dataset/design-sync-retry.js +1 -1
  81. package/lib/commands/dataset/design-sync-status.js +1 -1
  82. package/lib/commands/dataset/design-validate.js +1 -1
  83. package/lib/commands/dataset/detail.js +1 -1
  84. package/lib/commands/dataset/extend-update.js +1 -1
  85. package/lib/commands/dataset/field-restore.js +1 -1
  86. package/lib/commands/dataset/field-update.js +1 -1
  87. package/lib/commands/dataset/generate.js +1 -1
  88. package/lib/commands/dataset/index.js +1 -1
  89. package/lib/commands/dataset/list.js +1 -1
  90. package/lib/commands/dataset/operations.js +1 -1
  91. package/lib/commands/dataset/relation-audit.js +1 -1
  92. package/lib/commands/dataset/relation-create.js +1 -1
  93. package/lib/commands/dataset/relation-delete.js +1 -1
  94. package/lib/commands/dataset/relation-shared.js +1 -1
  95. package/lib/commands/dataset/relation-update.js +1 -1
  96. package/lib/commands/dataset/relations.js +1 -1
  97. package/lib/commands/dataset/rename.js +1 -1
  98. package/lib/commands/dataset/restore.js +1 -1
  99. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  100. package/lib/commands/db/analysis-batching.js +1 -1
  101. package/lib/commands/db/analyze-batch-plan.js +1 -1
  102. package/lib/commands/db/analyze-cancel.js +1 -1
  103. package/lib/commands/db/analyze-start.js +1 -1
  104. package/lib/commands/db/analyze-status.js +1 -1
  105. package/lib/commands/db/create.js +1 -1
  106. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  110. package/lib/commands/db/delete.js +1 -1
  111. package/lib/commands/db/detail.js +1 -1
  112. package/lib/commands/db/diff-refresh-start.js +1 -1
  113. package/lib/commands/db/diff-refresh-status.js +1 -1
  114. package/lib/commands/db/diff.js +1 -1
  115. package/lib/commands/db/index.js +1 -1
  116. package/lib/commands/db/list.js +1 -1
  117. package/lib/commands/db/shared.js +1 -1
  118. package/lib/commands/db/table-diff-shared.js +1 -1
  119. package/lib/commands/db/tables.js +1 -1
  120. package/lib/commands/db/test.js +1 -1
  121. package/lib/commands/db/update.js +1 -1
  122. package/lib/commands/deployment/index.js +1 -1
  123. package/lib/commands/deployment/sync-all.js +1 -1
  124. package/lib/commands/deployment/sync-jobs.js +1 -1
  125. package/lib/commands/deployment/sync-status.js +1 -1
  126. package/lib/commands/doctor.js +1 -1
  127. package/lib/commands/file/index.js +1 -1
  128. package/lib/commands/flow/create.js +1 -1
  129. package/lib/commands/flow/detail.js +1 -1
  130. package/lib/commands/flow/index.js +1 -1
  131. package/lib/commands/flow/list.js +1 -1
  132. package/lib/commands/flow/page-list.js +1 -1
  133. package/lib/commands/flow/publish.js +1 -1
  134. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  135. package/lib/commands/flow/runtime-role-list.js +1 -1
  136. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  137. package/lib/commands/flow/runtime-user-search.js +1 -1
  138. package/lib/commands/flow/shared.js +1 -1
  139. package/lib/commands/flow/update.js +1 -1
  140. package/lib/commands/flow/validate.js +1 -1
  141. package/lib/commands/instant-api-policy/current.js +1 -1
  142. package/lib/commands/instant-api-policy/index.js +1 -1
  143. package/lib/commands/instant-api-policy/init.js +1 -1
  144. package/lib/commands/instant-api-policy/publish.js +1 -1
  145. package/lib/commands/instant-api-policy/pull.js +1 -1
  146. package/lib/commands/instant-api-policy/revision.js +1 -1
  147. package/lib/commands/instant-api-policy/revisions.js +1 -1
  148. package/lib/commands/instant-api-policy/rollback.js +1 -1
  149. package/lib/commands/instant-api-policy/shared.js +1 -1
  150. package/lib/commands/instant-api-policy/validate.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/issue/shared.js +1 -1
  155. package/lib/commands/kb/create.js +1 -1
  156. package/lib/commands/kb/delete.js +1 -1
  157. package/lib/commands/kb/detail.js +1 -1
  158. package/lib/commands/kb/index.js +1 -1
  159. package/lib/commands/kb/list.js +1 -1
  160. package/lib/commands/kb/search.js +1 -1
  161. package/lib/commands/kb/shared.js +1 -1
  162. package/lib/commands/kb/update.js +1 -1
  163. package/lib/commands/logs/index.js +1 -1
  164. package/lib/commands/menu/asset-update.js +1 -1
  165. package/lib/commands/menu/delete.js +1 -1
  166. package/lib/commands/menu/external-link-create.js +1 -1
  167. package/lib/commands/menu/external-link-update.js +1 -1
  168. package/lib/commands/menu/group-create.js +1 -1
  169. package/lib/commands/menu/group-update.js +1 -1
  170. package/lib/commands/menu/index.js +1 -1
  171. package/lib/commands/menu/list.js +1 -1
  172. package/lib/commands/menu/move.js +1 -1
  173. package/lib/commands/menu/regroup-start.js +1 -1
  174. package/lib/commands/menu/rename.js +1 -1
  175. package/lib/commands/menu/shared/compare-table.js +1 -1
  176. package/lib/commands/menu/shared/delete-plan.js +1 -1
  177. package/lib/commands/menu/shared/facts.js +1 -1
  178. package/lib/commands/menu/shared/index.js +1 -1
  179. package/lib/commands/menu/shared/inquirer.js +1 -1
  180. package/lib/commands/menu/shared/local-pages.js +1 -1
  181. package/lib/commands/menu/shared/logic.js +1 -1
  182. package/lib/commands/menu/shared/mutations.js +1 -1
  183. package/lib/commands/menu/shared/path.js +1 -1
  184. package/lib/commands/menu/shared/service.js +1 -1
  185. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  186. package/lib/commands/menu/shared/sync-core.js +1 -1
  187. package/lib/commands/menu/shared/update-core.js +1 -1
  188. package/lib/commands/menu/shared/valid-url.js +1 -1
  189. package/lib/commands/menu/subapp-assets-status.js +1 -1
  190. package/lib/commands/menu/subapp-assets-update.js +1 -1
  191. package/lib/commands/menu/sync.js +1 -1
  192. package/lib/commands/menu/visibility-update.js +1 -1
  193. package/lib/commands/notification/config-create.js +1 -1
  194. package/lib/commands/notification/config-delete.js +1 -1
  195. package/lib/commands/notification/config-list.js +1 -1
  196. package/lib/commands/notification/config-update.js +1 -1
  197. package/lib/commands/notification/index.js +1 -1
  198. package/lib/commands/notification/shared.js +1 -1
  199. package/lib/commands/ocr/index.js +1 -1
  200. package/lib/commands/page/create.js +1 -1
  201. package/lib/commands/page/custom/detail.js +1 -1
  202. package/lib/commands/page/custom/list.js +1 -1
  203. package/lib/commands/page/custom/publish.js +1 -1
  204. package/lib/commands/page/custom/shared.js +1 -1
  205. package/lib/commands/page/custom/syntax.js +1 -1
  206. package/lib/commands/page/custom/update.js +1 -1
  207. package/lib/commands/page/data-list-status.js +1 -1
  208. package/lib/commands/page/generate-start.js +1 -1
  209. package/lib/commands/page/generate-status.js +1 -1
  210. package/lib/commands/page/index.js +1 -1
  211. package/lib/commands/page/pull.js +1 -1
  212. package/lib/commands/page/push.js +1 -1
  213. package/lib/commands/page/relation-audit.js +1 -1
  214. package/lib/commands/page/restore.js +1 -1
  215. package/lib/commands/page/shared.js +1 -1
  216. package/lib/commands/page/sync.js +1 -1
  217. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  218. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  219. package/lib/commands/project/create/format-elapsed.js +1 -1
  220. package/lib/commands/project/create/main.js +1 -1
  221. package/lib/commands/project/create/materialize-project-template.js +1 -1
  222. package/lib/commands/project/create/project-name.js +1 -1
  223. package/lib/commands/project/create/project-template-archive.js +1 -1
  224. package/lib/commands/project/create/project-template-path.js +1 -1
  225. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  226. package/lib/commands/project/create/use-format-code.js +1 -1
  227. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  228. package/lib/commands/project/domain-routing-sync.js +1 -1
  229. package/lib/commands/project/index.js +1 -1
  230. package/lib/commands/project/upgrade.js +1 -1
  231. package/lib/commands/registry.js +1 -1
  232. package/lib/commands/role/delete.js +1 -1
  233. package/lib/commands/role/detail.js +1 -1
  234. package/lib/commands/role/index.js +1 -1
  235. package/lib/commands/role/list.js +1 -1
  236. package/lib/commands/role/shared.js +1 -1
  237. package/lib/commands/role/update.js +1 -1
  238. package/lib/commands/role/user-add.js +1 -1
  239. package/lib/commands/role/user-remove.js +1 -1
  240. package/lib/commands/role/user-resolve.js +1 -1
  241. package/lib/commands/rule/get.js +1 -1
  242. package/lib/commands/rule/index.js +1 -1
  243. package/lib/commands/rule/list.js +1 -1
  244. package/lib/commands/rule/set.js +1 -1
  245. package/lib/commands/rule/shared.js +1 -1
  246. package/lib/commands/run/index.js +1 -1
  247. package/lib/commands/schema.js +1 -1
  248. package/lib/commands/sql/create.js +1 -1
  249. package/lib/commands/sql/delete.js +1 -1
  250. package/lib/commands/sql/detail.js +1 -1
  251. package/lib/commands/sql/exec.js +1 -1
  252. package/lib/commands/sql/index.js +1 -1
  253. package/lib/commands/sql/list.js +1 -1
  254. package/lib/commands/sql/pull.js +1 -1
  255. package/lib/commands/sql/push.js +1 -1
  256. package/lib/commands/sql/shared.js +1 -1
  257. package/lib/commands/sql/status.js +1 -1
  258. package/lib/commands/sql/validate.js +1 -1
  259. package/lib/commands/task/index.js +1 -1
  260. package/lib/commands/task/status.js +1 -1
  261. package/lib/commands/tenant/index.js +1 -1
  262. package/lib/commands/tenant/members-list.js +1 -1
  263. package/lib/commands/tenant/shared.js +1 -1
  264. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  265. package/lib/commands/user-account/feishu-bind.js +1 -1
  266. package/lib/commands/user-account/index.js +1 -1
  267. package/lib/commands/workspace/add.js +1 -1
  268. package/lib/commands/workspace/index.js +1 -1
  269. package/lib/commands/workspace/remove.js +1 -1
  270. package/lib/config/domain-config.js +1 -1
  271. package/lib/config/project-domain-routing.js +1 -1
  272. package/lib/config/region-config.js +1 -1
  273. package/lib/config/schema.js +1 -1
  274. package/lib/constant/cdn.js +1 -1
  275. package/lib/constant/cli.js +1 -1
  276. package/lib/constant/defaults.js +1 -1
  277. package/lib/constant/domain.js +1 -1
  278. package/lib/constant/env.js +1 -1
  279. package/lib/constant/output.js +1 -1
  280. package/lib/constant/paths.js +1 -1
  281. package/lib/constant/region.js +1 -1
  282. package/lib/constant/risk.js +1 -1
  283. package/lib/constant/routing-profile.js +1 -1
  284. package/lib/context/app-resolver.js +1 -1
  285. package/lib/context/auth-resolver.js +1 -1
  286. package/lib/context/config-loader.js +1 -1
  287. package/lib/context.js +1 -1
  288. package/lib/core/alias-resolver.js +1 -1
  289. package/lib/core/api-client.js +1 -1
  290. package/lib/core/bff/config.js +1 -1
  291. package/lib/core/bff/file-system.js +1 -1
  292. package/lib/core/bff/hash.js +1 -1
  293. package/lib/core/bff/hook-directory.js +1 -1
  294. package/lib/core/bff/lock.js +1 -1
  295. package/lib/core/bff/utils.js +1 -1
  296. package/lib/core/cross-db-analysis.js +1 -1
  297. package/lib/core/cross-db-relation.js +1 -1
  298. package/lib/core/db-resolver.js +1 -1
  299. package/lib/core/flow-config.js +1 -1
  300. package/lib/core/instant-api-policy/config.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  352. package/lib/utils/ai_config.js +1 -1
  353. package/lib/utils/apply-jq-filter.js +1 -1
  354. package/lib/utils/cdn-config.js +1 -1
  355. package/lib/utils/check-sdk-version.js +1 -1
  356. package/lib/utils/cli-version-check.js +1 -1
  357. package/lib/utils/cli-version-policy.js +1 -1
  358. package/lib/utils/config.js +1 -1
  359. package/lib/utils/entity-with-id.js +1 -1
  360. package/lib/utils/file-utils.js +1 -1
  361. package/lib/utils/guides-cdn.js +1 -1
  362. package/lib/utils/http-client.js +1 -1
  363. package/lib/utils/is-non-interactive.js +1 -1
  364. package/lib/utils/logger.js +1 -1
  365. package/lib/utils/params.js +1 -1
  366. package/lib/utils/platform.js +1 -1
  367. package/lib/utils/sleep.js +1 -1
  368. package/lib/utils/template-replacer.js +1 -1
  369. package/lib/utils/update-notice.js +1 -1
  370. package/lib/utils/version.js +1 -1
  371. package/lib/utils/with-active-cookie.js +1 -1
  372. package/lib/utils/write-cli-side-channel.js +1 -1
  373. package/package.json +2 -2
  374. package/skills/rabetbase/SKILL.md +2 -2
  375. package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
  376. package/skills/rabetbase-page-generation/SKILL.md +2 -2
  377. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x1a9b27,_0xad9bce){const _0x88805a=a177_0x28b9,_0xc14766=_0x1a9b27();while(!![]){try{const _0x354c85=parseInt(_0x88805a(0x167))/0x1*(parseInt(_0x88805a(0x163))/0x2)+parseInt(_0x88805a(0x172))/0x3+-parseInt(_0x88805a(0x14b))/0x4+parseInt(_0x88805a(0x154))/0x5+-parseInt(_0x88805a(0x14a))/0x6+parseInt(_0x88805a(0x14f))/0x7*(parseInt(_0x88805a(0x15f))/0x8)+parseInt(_0x88805a(0x153))/0x9*(-parseInt(_0x88805a(0x164))/0xa);if(_0x354c85===_0xad9bce)break;else _0xc14766['push'](_0xc14766['shift']());}catch(_0x2bf322){_0xc14766['push'](_0xc14766['shift']());}}}(a177_0x46d4,0xae5ba));import a177_0x11e6c5 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a177_0x189ad1 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x11a9ed){const _0x4138ba=a177_0x28b9;return _0x11a9ed[_0x4138ba(0x170)](_0x5778cb=>{const _0x1b73c1=_0x4138ba;if(_0x5778cb?.[_0x1b73c1(0x169)]===_0x1b73c1(0x15b))throw CliErrors['cancelled'](_0x1b73c1(0x173));throw _0x5778cb;});}export function startSpinner(_0xc15ed6){const _0x5a6457=a177_0x28b9;return a177_0x189ad1({'text':_0xc15ed6,'color':_0x5a6457(0x15c)})[_0x5a6457(0x159)]();}function a177_0x46d4(){const _0xf72501=['14ltzLWd','749690zpwnFK','map','green','200597stvgeG','\x20\x20CSS\x20URL:','name','No\x20menus\x20selected.','[new]','path','isTTY','JS\x20URL\x20checked','[already\x20on\x20platform]','catch','error','2718867FATpYT','Cancelled.','test','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','2733510ATAZBk','5111876tNlOIP','CSS\x20URL\x20check\x20failed','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','filter','3080btuFDB','gray','red','\x20\x20Checking\x20JS\x20URL\x20reachability...','207YICuWt','4727315axuvfF','No\x20local\x20pages\x20found.','cancelled','includes','length','start','label','ExitPromptError','cyan','trim','CSS\x20URL\x20checked','16656PdTRCi','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','has','fail'];a177_0x46d4=function(){return _0xf72501;};return a177_0x46d4();}export function stopSpinner(_0x3cc811,_0x130ad5,_0x20f98b){const _0x3d6082=a177_0x28b9;_0x20f98b?_0x3cc811['succeed'](_0x130ad5):_0x3cc811[_0x3d6082(0x162)](_0x130ad5);}export async function askConfirm(_0x478f02){return onCancel(confirm({'message':_0x478f02,'theme':{'prefix':''}}));}export async function askJsUrl(_0x42c11d){const _0x583903=a177_0x28b9;while(!![]){const _0x415989=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x42c11d,'theme':{'prefix':''}}));if(_0x415989[_0x583903(0x15d)]()==='')throw CliErrors[_0x583903(0x156)]('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x415989[_0x583903(0x15d)]())){console['error'](a177_0x11e6c5['red'](_0x583903(0x14d)));continue;}const _0x2db331=startSpinner(_0x583903(0x152));try{const _0x264232=await isUrlReachable(_0x415989['trim']());stopSpinner(_0x2db331,_0x583903(0x16e),_0x264232);if(!_0x264232){console[_0x583903(0x171)](a177_0x11e6c5['red']('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x415989['trim']();}catch(_0x30bb55){stopSpinner(_0x2db331,'JS\x20URL\x20check\x20failed',![]);throw _0x30bb55;}}}export async function askCssUrl(_0x5f41fd){const _0x5aa20a=a177_0x28b9;while(!![]){const _0x1c93d4=await onCancel(input({'message':_0x5aa20a(0x168),'default':_0x5f41fd,'theme':{'prefix':''}}));if(_0x1c93d4[_0x5aa20a(0x15d)]()==='')throw CliErrors[_0x5aa20a(0x156)](_0x5aa20a(0x173));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x5aa20a(0x174)](_0x1c93d4[_0x5aa20a(0x15d)]())){console[_0x5aa20a(0x171)](a177_0x11e6c5[_0x5aa20a(0x151)](_0x5aa20a(0x160)));continue;}const _0x26a934=startSpinner('\x20\x20Checking\x20CSS\x20URL\x20reachability...');try{const _0x538590=await isUrlReachable(_0x1c93d4[_0x5aa20a(0x15d)]());stopSpinner(_0x26a934,_0x5aa20a(0x15e),_0x538590);if(!_0x538590){console[_0x5aa20a(0x171)](a177_0x11e6c5[_0x5aa20a(0x151)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x1c93d4[_0x5aa20a(0x15d)]();}catch(_0x31a765){stopSpinner(_0x26a934,_0x5aa20a(0x14c),![]);throw _0x31a765;}}}function a177_0x28b9(_0x358f91,_0x43084d){_0x358f91=_0x358f91-0x14a;const _0x46d448=a177_0x46d4();let _0x28b9c1=_0x46d448[_0x358f91];return _0x28b9c1;}export async function selectPages(_0xe7601f,_0x40ec84){const _0x537286=a177_0x28b9,_0x438800=_0xe7601f[_0x537286(0x165)](_0x218786=>{const _0x4ff4b7=_0x537286,_0xf34813=_0x40ec84[_0x4ff4b7(0x161)](menuPathKey(_0x218786[_0x4ff4b7(0x16c)]));return{'name':_0x218786[_0x4ff4b7(0x15a)]+'\x20\x20'+a177_0x11e6c5[_0x4ff4b7(0x150)](_0x218786[_0x4ff4b7(0x16c)])+'\x20\x20'+(_0xf34813?a177_0x11e6c5[_0x4ff4b7(0x150)](_0x4ff4b7(0x16f)):a177_0x11e6c5[_0x4ff4b7(0x166)](_0x4ff4b7(0x16b))),'value':_0x218786[_0x4ff4b7(0x16c)],'checked':!_0xf34813,'disabled':_0xf34813};});if(_0x438800[_0x537286(0x158)]===0x0)throw new Error(_0x537286(0x155));const _0x538a15=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x438800,'loop':![],'theme':{'prefix':''}}));if(_0x538a15[_0x537286(0x158)]===0x0)throw new Error(_0x537286(0x16a));return _0xe7601f[_0x537286(0x14e)](_0x4af014=>_0x538a15[_0x537286(0x157)](_0x4af014[_0x537286(0x16c)]));}export function isInteractive(){const _0x572fed=a177_0x28b9;return process['stdin'][_0x572fed(0x16d)]===!![];}export function requireInteractive(){const _0x179af9=a177_0x28b9;if(!isInteractive())throw new Error('This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'+_0x179af9(0x175));}
1
+ (function(_0x1f19bd,_0x130d7b){const _0x398599=a177_0x2176,_0x4c32b2=_0x1f19bd();while(!![]){try{const _0x2ebe1b=-parseInt(_0x398599(0x181))/0x1*(-parseInt(_0x398599(0x193))/0x2)+parseInt(_0x398599(0x188))/0x3+parseInt(_0x398599(0x183))/0x4+-parseInt(_0x398599(0x189))/0x5+-parseInt(_0x398599(0x180))/0x6+-parseInt(_0x398599(0x18d))/0x7+-parseInt(_0x398599(0x18b))/0x8*(parseInt(_0x398599(0x178))/0x9);if(_0x2ebe1b===_0x130d7b)break;else _0x4c32b2['push'](_0x4c32b2['shift']());}catch(_0x9e5531){_0x4c32b2['push'](_0x4c32b2['shift']());}}}(a177_0x343f,0x5c82f));function a177_0x2176(_0x566aa5,_0x4ec805){_0x566aa5=_0x566aa5-0x177;const _0x343f36=a177_0x343f();let _0x217650=_0x343f36[_0x566aa5];return _0x217650;}import a177_0x3f04c0 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a177_0x10121d from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{CliErrors}from'../../../errors.js';function a177_0x343f(){const _0x86679a=['\x20\x20CSS\x20URL:','gray','703632vnnmJE','1xhFWhh','Cancelled.','1009812bMFuXj','trim','has','map','fail','1467264kEawjp','436375jjsMEu','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','3447744qpAySv','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','3043383ZyVTRR','green','start','length','filter','path','1415340mXjgeI','ExitPromptError','succeed','No\x20menus\x20selected.','includes','CSS\x20URL\x20checked','isTTY','cyan','cancelled','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','test','9bNEuxa','[already\x20on\x20platform]','red','catch','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','error'];a177_0x343f=function(){return _0x86679a;};return a177_0x343f();}function onCancel(_0x36df02){const _0x294a09=a177_0x2176;return _0x36df02[_0x294a09(0x17b)](_0xd16672=>{const _0x545fff=_0x294a09;if(_0xd16672?.['name']===_0x545fff(0x194))throw CliErrors['cancelled'](_0x545fff(0x182));throw _0xd16672;});}export function startSpinner(_0x26b571){const _0x4301ad=a177_0x2176;return a177_0x10121d({'text':_0x26b571,'color':_0x4301ad(0x19a)})[_0x4301ad(0x18f)]();}export function stopSpinner(_0x5b0e83,_0x363eae,_0x4c0d41){const _0x34d184=a177_0x2176;_0x4c0d41?_0x5b0e83[_0x34d184(0x195)](_0x363eae):_0x5b0e83[_0x34d184(0x187)](_0x363eae);}export async function askConfirm(_0x4a656c){return onCancel(confirm({'message':_0x4a656c,'theme':{'prefix':''}}));}export async function askJsUrl(_0x9b88da){const _0x515033=a177_0x2176;while(!![]){const _0x1348c6=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x9b88da,'theme':{'prefix':''}}));if(_0x1348c6['trim']()==='')throw CliErrors[_0x515033(0x19b)](_0x515033(0x182));if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x1348c6['trim']())){console[_0x515033(0x17d)](a177_0x3f04c0['red']('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x400f49=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x4d6149=await isUrlReachable(_0x1348c6[_0x515033(0x184)]());stopSpinner(_0x400f49,'JS\x20URL\x20checked',_0x4d6149);if(!_0x4d6149){console[_0x515033(0x17d)](a177_0x3f04c0[_0x515033(0x17a)](_0x515033(0x19c)));continue;}return _0x1348c6[_0x515033(0x184)]();}catch(_0x2b9f83){stopSpinner(_0x400f49,'JS\x20URL\x20check\x20failed',![]);throw _0x2b9f83;}}}export async function askCssUrl(_0x25755e){const _0x35855b=a177_0x2176;while(!![]){const _0x5a2064=await onCancel(input({'message':_0x35855b(0x17e),'default':_0x25755e,'theme':{'prefix':''}}));if(_0x5a2064[_0x35855b(0x184)]()==='')throw CliErrors[_0x35855b(0x19b)](_0x35855b(0x182));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x35855b(0x177)](_0x5a2064[_0x35855b(0x184)]())){console[_0x35855b(0x17d)](a177_0x3f04c0[_0x35855b(0x17a)]('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0x1120d0=startSpinner('\x20\x20Checking\x20CSS\x20URL\x20reachability...');try{const _0x2b8dea=await isUrlReachable(_0x5a2064[_0x35855b(0x184)]());stopSpinner(_0x1120d0,_0x35855b(0x198),_0x2b8dea);if(!_0x2b8dea){console['error'](a177_0x3f04c0['red']('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x5a2064[_0x35855b(0x184)]();}catch(_0x35331b){stopSpinner(_0x1120d0,'CSS\x20URL\x20check\x20failed',![]);throw _0x35331b;}}}export async function selectPages(_0x57a524,_0x1c5280){const _0x50ec71=a177_0x2176,_0xc29622=_0x57a524[_0x50ec71(0x186)](_0x52f274=>{const _0xd3d4ff=_0x50ec71,_0x3fa93b=_0x1c5280[_0xd3d4ff(0x185)](menuPathKey(_0x52f274[_0xd3d4ff(0x192)]));return{'name':_0x52f274['label']+'\x20\x20'+a177_0x3f04c0[_0xd3d4ff(0x17f)](_0x52f274[_0xd3d4ff(0x192)])+'\x20\x20'+(_0x3fa93b?a177_0x3f04c0['gray'](_0xd3d4ff(0x179)):a177_0x3f04c0[_0xd3d4ff(0x18e)]('[new]')),'value':_0x52f274[_0xd3d4ff(0x192)],'checked':!_0x3fa93b,'disabled':_0x3fa93b};});if(_0xc29622[_0x50ec71(0x190)]===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x37bbf1=await onCancel(checkbox({'message':_0x50ec71(0x17c),'choices':_0xc29622,'loop':![],'theme':{'prefix':''}}));if(_0x37bbf1[_0x50ec71(0x190)]===0x0)throw new Error(_0x50ec71(0x196));return _0x57a524[_0x50ec71(0x191)](_0x4fcc7a=>_0x37bbf1[_0x50ec71(0x197)](_0x4fcc7a['path']));}export function isInteractive(){const _0x1294fe=a177_0x2176;return process['stdin'][_0x1294fe(0x199)]===!![];}export function requireInteractive(){const _0x25473b=a177_0x2176;if(!isInteractive())throw new Error(_0x25473b(0x18a)+_0x25473b(0x18c));}
@@ -1 +1 @@
1
- const a178_0x34be6c=a178_0x4072;(function(_0x16b4bd,_0x5f4d10){const _0xf651dd=a178_0x4072,_0x510d6b=_0x16b4bd();while(!![]){try{const _0x28aa94=parseInt(_0xf651dd(0xc9))/0x1+-parseInt(_0xf651dd(0xf5))/0x2*(-parseInt(_0xf651dd(0xf4))/0x3)+parseInt(_0xf651dd(0xcf))/0x4+-parseInt(_0xf651dd(0xc1))/0x5+-parseInt(_0xf651dd(0xd5))/0x6*(-parseInt(_0xf651dd(0xe9))/0x7)+parseInt(_0xf651dd(0xd2))/0x8*(parseInt(_0xf651dd(0xe5))/0x9)+-parseInt(_0xf651dd(0xcb))/0xa;if(_0x28aa94===_0x5f4d10)break;else _0x510d6b['push'](_0x510d6b['shift']());}catch(_0x56dcb6){_0x510d6b['push'](_0x510d6b['shift']());}}}(a178_0x40d9,0x4a8e2));import{existsSync,readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a178_0x34be6c(0xf3)](),a178_0x34be6c(0xc7));export function extractTitleFromComment(_0x16f929){const _0x3076f7=a178_0x34be6c;try{const _0x57b886=readFileSync(_0x16f929,_0x3076f7(0xeb)),_0x2c6175=_0x57b886[_0x3076f7(0xe0)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x2c6175&&_0x2c6175[0x1]){const _0x29a005=_0x2c6175[0x1],_0x54509e=_0x29a005[_0x3076f7(0xe0)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x54509e&&_0x54509e[0x1])return _0x54509e[0x1][_0x3076f7(0xcc)]();}let _0x425eaf=null;const _0x18f24e=_0x57b886['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x18f24e&&_0x18f24e[0x1]&&(_0x425eaf=_0x18f24e[0x1]);if(!_0x425eaf){const _0x4143c6=_0x57b886['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4143c6&&_0x4143c6[0x1]&&(_0x425eaf=_0x4143c6[0x1]);}if(_0x425eaf){const _0x377abc=new RegExp('\x5cb'+_0x425eaf+_0x3076f7(0xd7)),_0x49eafc=_0x57b886['match'](_0x377abc);if(_0x49eafc&&_0x49eafc[0x1])return _0x49eafc[0x1];return _0x425eaf;}return null;}catch(_0x33ed56){return null;}}export function getLocalPages(_0x105bc0=pagesDir,_0x588b41=pagesDir,_0xba5acf=process['cwd']()){const _0x29d18b=a178_0x34be6c;if(resolve(_0x105bc0)===resolve(_0x588b41)){const _0x3d01b7=join(_0xba5acf,_0x29d18b(0xf2));if(existsSync(_0x3d01b7))return getDeclaredPages(_0x3d01b7,_0xba5acf);}let _0x44c0d8=[];const _0x435e3d=readdirSync(_0x105bc0);return _0x435e3d[_0x29d18b(0xee)](_0x4cd04e=>{const _0x1bb6fc=_0x29d18b,_0x351c52=join(_0x105bc0,_0x4cd04e),_0x3d9259=statSync(_0x351c52);if(_0x3d9259&&_0x3d9259[_0x1bb6fc(0xda)]())_0x44c0d8=_0x44c0d8[_0x1bb6fc(0xce)](getLocalPages(_0x351c52,_0x588b41,_0xba5acf));else{if(_0x4cd04e[_0x1bb6fc(0xc4)]('.tsx')){let _0x33ff0b=relative(_0x588b41,_0x351c52);_0x33ff0b['endsWith'](_0x1bb6fc(0xdd))?_0x33ff0b=_0x33ff0b[_0x1bb6fc(0xc2)](/index\.tsx$/,''):_0x33ff0b=_0x33ff0b[_0x1bb6fc(0xc2)](/\.tsx$/,'');_0x33ff0b[_0x1bb6fc(0xc4)](sep)&&(_0x33ff0b=_0x33ff0b[_0x1bb6fc(0xc3)](0x0,-0x1));const _0x894872=_0x33ff0b[_0x1bb6fc(0xc8)](sep)[_0x1bb6fc(0xde)]('/'),_0x33548c=extractTitleFromComment(_0x351c52),_0x23b174=_0x33548c||_0x894872;_0x44c0d8[_0x1bb6fc(0xd3)]({'path':_0x894872[_0x1bb6fc(0xed)]('$',':'),'label':_0x23b174});}}}),_0x44c0d8[_0x29d18b(0xc0)](_0x415a25=>_0x415a25[_0x29d18b(0xd8)]!=='');}function a178_0x4072(_0xe553bf,_0x4c443d){_0xe553bf=_0xe553bf-0xc0;const _0x40d9d8=a178_0x40d9();let _0x407209=_0x40d9d8[_0xe553bf];return _0x407209;}function a178_0x40d9(){const _0x34f784=['Invalid\x20route\x20group\x20for\x20','Route\x20page\x20file\x20does\x20not\x20exist:\x20','has','12168FAgCig',';\x20expected\x20','string','isArray','12271YWdIlQ','order','utf-8','pageFile','replaceAll','forEach','add',':$1','label','src/features/routing/routes.json','cwd','1655226TykCAN','2RexMaE','filter','1386280AZeBin','replace','slice','endsWith','object','boolean','src/pages','split','296250YIcLhy','Invalid\x20route\x20manifest\x20row\x20','9673340MQFlvD','trim','visible','concat','1729888taibnZ','group','test','184joiJnx','push','src/pages/','816jJJAve','\x20disagrees\x20with\x20pageFile\x20','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','path',':\x20path,\x20label,\x20pageFile\x20and\x20visible\x20are\x20required','isDirectory','Duplicate\x20route\x20path\x20in\x20manifest:\x20','Invalid\x20route\x20manifest\x20','index.tsx','join','utf8','match','index'];a178_0x40d9=function(){return _0x34f784;};return a178_0x40d9();}function getDeclaredPages(_0x17095f,_0x5c7617){const _0x5affef=a178_0x34be6c;let _0x1ba165;try{_0x1ba165=JSON['parse'](readFileSync(_0x17095f,_0x5affef(0xdf)));}catch(_0x8f99ee){throw new Error(_0x5affef(0xdc)+_0x17095f+':\x20'+String(_0x8f99ee));}if(!Array[_0x5affef(0xe8)](_0x1ba165))throw new Error('Route\x20manifest\x20must\x20contain\x20an\x20array:\x20'+_0x17095f);const _0x96704e=new Set();return _0x1ba165['map']((_0x4e71ec,_0x13a437)=>{const _0x14162c=_0x5affef;if(!_0x4e71ec||typeof _0x4e71ec!==_0x14162c(0xc5)||Array['isArray'](_0x4e71ec))throw new Error(_0x14162c(0xca)+(_0x13a437+0x1));const _0x5a0894=_0x4e71ec,_0x42e2b9=_0x5a0894[_0x14162c(0xd8)],_0x13c0f1=_0x5a0894[_0x14162c(0xf1)],_0x2a6fcd=_0x5a0894[_0x14162c(0xec)];if(typeof _0x42e2b9!==_0x14162c(0xe7)||!/^\/(?!\/)[^?#]*$/[_0x14162c(0xd1)](_0x42e2b9)||typeof _0x13c0f1!=='string'||!_0x13c0f1[_0x14162c(0xcc)]()||typeof _0x2a6fcd!==_0x14162c(0xe7)||!/^src\/pages\/(?!.*\.\.)[^/].*\.tsx$/[_0x14162c(0xd1)](_0x2a6fcd)||typeof _0x5a0894[_0x14162c(0xcd)]!==_0x14162c(0xc6))throw new Error(_0x14162c(0xca)+(_0x13a437+0x1)+_0x14162c(0xd9));if(_0x96704e[_0x14162c(0xe4)](_0x42e2b9))throw new Error(_0x14162c(0xdb)+_0x42e2b9);_0x96704e[_0x14162c(0xef)](_0x42e2b9);if(!existsSync(resolve(_0x5c7617,_0x2a6fcd)))throw new Error(_0x14162c(0xe3)+_0x2a6fcd);const _0x542400=_0x2a6fcd[_0x14162c(0xc3)](_0x14162c(0xd4)['length'])[_0x14162c(0xc2)](/\/index\.tsx$/,'')[_0x14162c(0xc2)](/\.tsx$/,'')[_0x14162c(0xed)]('$',':')['replace'](/\[([^/\]]+)\]/g,_0x14162c(0xf0)),_0x516844=_0x542400===_0x14162c(0xe1)?'/':'/'+_0x542400;if(_0x42e2b9!==_0x516844)throw new Error('Route\x20'+_0x42e2b9+_0x14162c(0xd6)+_0x2a6fcd+_0x14162c(0xe6)+_0x516844);if(_0x5a0894[_0x14162c(0xd0)]!==undefined&&(typeof _0x5a0894[_0x14162c(0xd0)]!==_0x14162c(0xe7)||!_0x5a0894[_0x14162c(0xd0)]['trim']()))throw new Error(_0x14162c(0xe2)+_0x42e2b9);if(_0x5a0894['order']!==undefined&&(!Number['isInteger'](_0x5a0894[_0x14162c(0xea)])||_0x5a0894[_0x14162c(0xea)]<0x0))throw new Error('Invalid\x20route\x20order\x20for\x20'+_0x42e2b9);return{'path':_0x42e2b9,'label':_0x13c0f1[_0x14162c(0xcc)](),'visible':_0x5a0894[_0x14162c(0xcd)],..._0x5a0894[_0x14162c(0xd0)]===undefined?{}:{'group':_0x5a0894[_0x14162c(0xd0)][_0x14162c(0xcc)]()},..._0x5a0894[_0x14162c(0xea)]===undefined?{}:{'order':_0x5a0894[_0x14162c(0xea)]}};});}
1
+ const a178_0x1a445b=a178_0x2555;(function(_0x2d5e6a,_0x567096){const _0x39ae2a=a178_0x2555,_0x3cc8e2=_0x2d5e6a();while(!![]){try{const _0x16aed4=-parseInt(_0x39ae2a(0x9c))/0x1*(-parseInt(_0x39ae2a(0xaf))/0x2)+-parseInt(_0x39ae2a(0xaa))/0x3+-parseInt(_0x39ae2a(0xa2))/0x4*(parseInt(_0x39ae2a(0x9f))/0x5)+parseInt(_0x39ae2a(0x90))/0x6+-parseInt(_0x39ae2a(0x97))/0x7*(parseInt(_0x39ae2a(0x98))/0x8)+parseInt(_0x39ae2a(0x85))/0x9+-parseInt(_0x39ae2a(0x84))/0xa;if(_0x16aed4===_0x567096)break;else _0x3cc8e2['push'](_0x3cc8e2['shift']());}catch(_0x3a0e59){_0x3cc8e2['push'](_0x3cc8e2['shift']());}}}(a178_0x10f5,0xe3ac2));function a178_0x2555(_0x3bbf0f,_0xa77e89){_0x3bbf0f=_0x3bbf0f-0x7b;const _0x10f5e1=a178_0x10f5();let _0x2555a7=_0x10f5e1[_0x3bbf0f];return _0x2555a7;}import{existsSync,readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a178_0x1a445b(0x92)](),a178_0x1a445b(0x82));function a178_0x10f5(){const _0x45f10a=['5UpzSav','utf8',':\x20path,\x20label,\x20pageFile\x20and\x20visible\x20are\x20required','1113612iXhroK','Invalid\x20route\x20manifest\x20','trim','Invalid\x20route\x20group\x20for\x20','.tsx','label','endsWith','join','1130004wIvzsB','isArray','path','group','string','2534JkoZLI','pageFile','\x20disagrees\x20with\x20pageFile\x20','src/pages/','Route\x20manifest\x20must\x20contain\x20an\x20array:\x20','concat','slice','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','map','Invalid\x20route\x20order\x20for\x20','visible','src/pages','Route\x20page\x20file\x20does\x20not\x20exist:\x20','15437590lorgHK','12685554VhYQze','test','order','replaceAll','index','utf-8',':$1','Route\x20',';\x20expected\x20','isInteger','Invalid\x20route\x20manifest\x20row\x20','7329516xdKuEp','replace','cwd','Duplicate\x20route\x20path\x20in\x20manifest:\x20','forEach','boolean','split','11249MANxmr','2896AsbNbV','has','isDirectory','index.tsx','854wQPpyM','match','src/features/routing/routes.json'];a178_0x10f5=function(){return _0x45f10a;};return a178_0x10f5();}export function extractTitleFromComment(_0x104a6f){const _0x411b99=a178_0x1a445b;try{const _0x5eb6d1=readFileSync(_0x104a6f,_0x411b99(0x8a)),_0x51b91b=_0x5eb6d1[_0x411b99(0x9d)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x51b91b&&_0x51b91b[0x1]){const _0x17fb19=_0x51b91b[0x1],_0x4015ad=_0x17fb19['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4015ad&&_0x4015ad[0x1])return _0x4015ad[0x1]['trim']();}let _0x5b5078=null;const _0x422321=_0x5eb6d1[_0x411b99(0x9d)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x422321&&_0x422321[0x1]&&(_0x5b5078=_0x422321[0x1]);if(!_0x5b5078){const _0x46aa6b=_0x5eb6d1[_0x411b99(0x9d)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x46aa6b&&_0x46aa6b[0x1]&&(_0x5b5078=_0x46aa6b[0x1]);}if(_0x5b5078){const _0x4f4d9a=new RegExp('\x5cb'+_0x5b5078+_0x411b99(0x7e)),_0x3ed171=_0x5eb6d1[_0x411b99(0x9d)](_0x4f4d9a);if(_0x3ed171&&_0x3ed171[0x1])return _0x3ed171[0x1];return _0x5b5078;}return null;}catch(_0x5201af){return null;}}export function getLocalPages(_0x5f4f9d=pagesDir,_0x3af38f=pagesDir,_0x33f057=process[a178_0x1a445b(0x92)]()){const _0x59ed86=a178_0x1a445b;if(resolve(_0x5f4f9d)===resolve(_0x3af38f)){const _0x5044ad=join(_0x33f057,_0x59ed86(0x9e));if(existsSync(_0x5044ad))return getDeclaredPages(_0x5044ad,_0x33f057);}let _0x5ab5b2=[];const _0x86459f=readdirSync(_0x5f4f9d);return _0x86459f[_0x59ed86(0x94)](_0x29b13a=>{const _0x5f441e=_0x59ed86,_0x3afd1c=join(_0x5f4f9d,_0x29b13a),_0x193235=statSync(_0x3afd1c);if(_0x193235&&_0x193235[_0x5f441e(0x9a)]())_0x5ab5b2=_0x5ab5b2[_0x5f441e(0x7c)](getLocalPages(_0x3afd1c,_0x3af38f,_0x33f057));else{if(_0x29b13a['endsWith'](_0x5f441e(0xa6))){let _0x24fc38=relative(_0x3af38f,_0x3afd1c);_0x24fc38[_0x5f441e(0xa8)](_0x5f441e(0x9b))?_0x24fc38=_0x24fc38['replace'](/index\.tsx$/,''):_0x24fc38=_0x24fc38[_0x5f441e(0x91)](/\.tsx$/,'');_0x24fc38[_0x5f441e(0xa8)](sep)&&(_0x24fc38=_0x24fc38[_0x5f441e(0x7d)](0x0,-0x1));const _0x5c3cd4=_0x24fc38[_0x5f441e(0x96)](sep)[_0x5f441e(0xa9)]('/'),_0xb82897=extractTitleFromComment(_0x3afd1c),_0x4ca1db=_0xb82897||_0x5c3cd4;_0x5ab5b2['push']({'path':_0x5c3cd4['replaceAll']('$',':'),'label':_0x4ca1db});}}}),_0x5ab5b2['filter'](_0x42f3f3=>_0x42f3f3[_0x59ed86(0xac)]!=='');}function getDeclaredPages(_0x1946ca,_0x23600e){const _0x3f0da8=a178_0x1a445b;let _0x5f5823;try{_0x5f5823=JSON['parse'](readFileSync(_0x1946ca,_0x3f0da8(0xa0)));}catch(_0x21658c){throw new Error(_0x3f0da8(0xa3)+_0x1946ca+':\x20'+String(_0x21658c));}if(!Array[_0x3f0da8(0xab)](_0x5f5823))throw new Error(_0x3f0da8(0x7b)+_0x1946ca);const _0x4f1b52=new Set();return _0x5f5823[_0x3f0da8(0x7f)]((_0x2491f8,_0x13c39a)=>{const _0x1dd7ac=_0x3f0da8;if(!_0x2491f8||typeof _0x2491f8!=='object'||Array[_0x1dd7ac(0xab)](_0x2491f8))throw new Error(_0x1dd7ac(0x8f)+(_0x13c39a+0x1));const _0x3819bd=_0x2491f8,_0x1155c5=_0x3819bd[_0x1dd7ac(0xac)],_0x5211f4=_0x3819bd[_0x1dd7ac(0xa7)],_0x3906e8=_0x3819bd[_0x1dd7ac(0xb0)];if(typeof _0x1155c5!==_0x1dd7ac(0xae)||!/^\/(?!\/)[^?#]*$/[_0x1dd7ac(0x86)](_0x1155c5)||typeof _0x5211f4!=='string'||!_0x5211f4[_0x1dd7ac(0xa4)]()||typeof _0x3906e8!==_0x1dd7ac(0xae)||!/^src\/pages\/(?!.*\.\.)[^/].*\.tsx$/[_0x1dd7ac(0x86)](_0x3906e8)||typeof _0x3819bd['visible']!==_0x1dd7ac(0x95))throw new Error(_0x1dd7ac(0x8f)+(_0x13c39a+0x1)+_0x1dd7ac(0xa1));if(_0x4f1b52[_0x1dd7ac(0x99)](_0x1155c5))throw new Error(_0x1dd7ac(0x93)+_0x1155c5);_0x4f1b52['add'](_0x1155c5);if(!existsSync(resolve(_0x23600e,_0x3906e8)))throw new Error(_0x1dd7ac(0x83)+_0x3906e8);const _0x314f89=_0x3906e8[_0x1dd7ac(0x7d)](_0x1dd7ac(0xb2)['length'])[_0x1dd7ac(0x91)](/\/index\.tsx$/,'')['replace'](/\.tsx$/,'')[_0x1dd7ac(0x88)]('$',':')['replace'](/\[([^/\]]+)\]/g,_0x1dd7ac(0x8b)),_0x493005=_0x314f89===_0x1dd7ac(0x89)?'/':'/'+_0x314f89;if(_0x1155c5!==_0x493005)throw new Error(_0x1dd7ac(0x8c)+_0x1155c5+_0x1dd7ac(0xb1)+_0x3906e8+_0x1dd7ac(0x8d)+_0x493005);if(_0x3819bd['group']!==undefined&&(typeof _0x3819bd[_0x1dd7ac(0xad)]!==_0x1dd7ac(0xae)||!_0x3819bd[_0x1dd7ac(0xad)][_0x1dd7ac(0xa4)]()))throw new Error(_0x1dd7ac(0xa5)+_0x1155c5);if(_0x3819bd[_0x1dd7ac(0x87)]!==undefined&&(!Number[_0x1dd7ac(0x8e)](_0x3819bd[_0x1dd7ac(0x87)])||_0x3819bd[_0x1dd7ac(0x87)]<0x0))throw new Error(_0x1dd7ac(0x80)+_0x1155c5);return{'path':_0x1155c5,'label':_0x5211f4['trim'](),'visible':_0x3819bd[_0x1dd7ac(0x81)],..._0x3819bd['group']===undefined?{}:{'group':_0x3819bd['group']['trim']()},..._0x3819bd[_0x1dd7ac(0x87)]===undefined?{}:{'order':_0x3819bd[_0x1dd7ac(0x87)]}};});}
@@ -1 +1 @@
1
- (function(_0x2da5b1,_0x590769){const _0x2b988e=a179_0x2f54,_0x2e173e=_0x2da5b1();while(!![]){try{const _0x3555d3=-parseInt(_0x2b988e(0xa4))/0x1+-parseInt(_0x2b988e(0xb4))/0x2*(-parseInt(_0x2b988e(0x9e))/0x3)+parseInt(_0x2b988e(0xab))/0x4+parseInt(_0x2b988e(0xb0))/0x5*(parseInt(_0x2b988e(0xa1))/0x6)+-parseInt(_0x2b988e(0xb1))/0x7*(parseInt(_0x2b988e(0xb3))/0x8)+parseInt(_0x2b988e(0x9f))/0x9*(parseInt(_0x2b988e(0xa8))/0xa)+-parseInt(_0x2b988e(0xaa))/0xb*(parseInt(_0x2b988e(0xae))/0xc);if(_0x3555d3===_0x590769)break;else _0x2e173e['push'](_0x2e173e['shift']());}catch(_0x608e89){_0x2e173e['push'](_0x2e173e['shift']());}}}(a179_0x39dd,0xbebd4));import{menuPathKey}from'../../../commands/menu/shared/path.js';import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a179_0x39dd(){const _0x50aef0=['2NsQogD','length','errors','903183aVQjan','9JAgqyP','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','62076EDJytf','filter','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','2094AZwVpx','label','JS\x20URL\x20is\x20unreachable','resources','7746710guIrZr','CSS\x20URL\x20is\x20unreachable','1716xBVuum','3931212eplonh','path','map','68844DbrJru','push','470qjPpBf','35GApAtq','has','2164360zGooYC'];a179_0x39dd=function(){return _0x50aef0;};return a179_0x39dd();}export function validateJsUrl(_0x183461){const _0x35a276=a179_0x2f54,_0x37eb9c=[];return!isValidJsHttpsUrl(_0x183461)&&_0x37eb9c[_0x35a276(0xaf)](_0x35a276(0xa0)),{'ok':_0x37eb9c['length']===0x0,'errors':_0x37eb9c};}export function validateCssUrl(_0x3abb45){const _0x5254b6=a179_0x2f54,_0x388e15=[];return!isValidCssHttpsUrl(_0x3abb45)&&_0x388e15['push'](_0x5254b6(0xa3)),{'ok':_0x388e15[_0x5254b6(0xb5)]===0x0,'errors':_0x388e15};}export async function validateJsUrlReachable(_0x57a55){const _0x4690f8=a179_0x2f54,_0x371ebd=validateJsUrl(_0x57a55);if(!_0x371ebd['ok'])return _0x371ebd;const _0x10ba1a=await isUrlReachable(_0x57a55);if(!_0x10ba1a)_0x371ebd[_0x4690f8(0x9d)]['push'](_0x4690f8(0xa6));return{'ok':_0x371ebd[_0x4690f8(0x9d)]['length']===0x0,'errors':_0x371ebd[_0x4690f8(0x9d)]};}export async function validateCssUrlReachable(_0x1d83a2){const _0x3ce582=a179_0x2f54,_0x2c8aac=validateCssUrl(_0x1d83a2);if(!_0x2c8aac['ok'])return _0x2c8aac;const _0x1fd38f=await isUrlReachable(_0x1d83a2);if(!_0x1fd38f)_0x2c8aac[_0x3ce582(0x9d)]['push'](_0x3ce582(0xa9));return{'ok':_0x2c8aac['errors'][_0x3ce582(0xb5)]===0x0,'errors':_0x2c8aac['errors']};}export function buildCompareRows(_0xb7cc3a,_0x4e5928){const _0x572db1=a179_0x2f54;return _0xb7cc3a[_0x572db1(0xad)](_0x4d9da3=>({'label':_0x4d9da3['label'],'path':_0x4d9da3['path'],'local':!![],'online':_0x4e5928[_0x572db1(0xb2)](menuPathKey(_0x4d9da3['path']))}));}function a179_0x2f54(_0x5eddae,_0x8afd94){_0x5eddae=_0x5eddae-0x9d;const _0x39dd92=a179_0x39dd();let _0x2f5463=_0x39dd92[_0x5eddae];return _0x2f5463;}export async function doCreateMenus(_0x2feafc,_0x1a467f,_0x1331f1,_0x52511e,_0x14ca15){const _0x486a9f=a179_0x2f54,_0x72807c=_0x14ca15?await createMenus(_0x2feafc,_0x1a467f,_0x1331f1,_0x52511e,_0x14ca15):await createMenus(_0x2feafc,_0x1a467f,_0x1331f1,_0x52511e);return{'created':_0x72807c[_0x486a9f(0xb5)],'failed':0x0,'labels':_0x1331f1[_0x486a9f(0xad)](_0x1ff1d6=>_0x1ff1d6[_0x486a9f(0xa5)]),'menus':_0x72807c};}export function filterMenusWithResources(_0x2e538c){const _0x29c997=a179_0x2f54;return _0x2e538c[_0x29c997(0xa2)](_0x371e72=>_0x371e72[_0x29c997(0xa7)]['length']>0x0);}export async function fetchMenuData(_0x5831b7,_0x1ce13e){const _0x405b5d=a179_0x2f54,_0x2cabec=getLocalPages(),_0x35b941=await getOnlineMenuList(_0x5831b7,_0x1ce13e),_0x4a34bd=new Set(_0x35b941[_0x405b5d(0xad)](_0x38c536=>menuPathKey(_0x38c536[_0x405b5d(0xac)])));return{'localPages':_0x2cabec,'onlineMenuList':_0x35b941,'onlinePaths':_0x4a34bd};}export async function fetchOnlineMenuList(_0x3de1da,_0x12b4a0){return getOnlineMenuList(_0x3de1da,_0x12b4a0);}
1
+ (function(_0x5e7917,_0x1c8a03){const _0xd40843=a179_0x2ce5,_0x2b495c=_0x5e7917();while(!![]){try{const _0x52808a=-parseInt(_0xd40843(0x9e))/0x1+parseInt(_0xd40843(0x96))/0x2*(-parseInt(_0xd40843(0x9f))/0x3)+-parseInt(_0xd40843(0x94))/0x4+parseInt(_0xd40843(0x98))/0x5+parseInt(_0xd40843(0x92))/0x6*(parseInt(_0xd40843(0x93))/0x7)+parseInt(_0xd40843(0xa2))/0x8+parseInt(_0xd40843(0xa1))/0x9;if(_0x52808a===_0x1c8a03)break;else _0x2b495c['push'](_0x2b495c['shift']());}catch(_0x5e9218){_0x2b495c['push'](_0x2b495c['shift']());}}}(a179_0x1056,0xe07e6));import{menuPathKey}from'../../../commands/menu/shared/path.js';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';export function validateJsUrl(_0x587db7){const _0xafc7f2=a179_0x2ce5,_0x3d4397=[];return!isValidJsHttpsUrl(_0x587db7)&&_0x3d4397[_0xafc7f2(0xa4)](_0xafc7f2(0x91)),{'ok':_0x3d4397[_0xafc7f2(0x9a)]===0x0,'errors':_0x3d4397};}export function validateCssUrl(_0x1a8b46){const _0x2d50c6=a179_0x2ce5,_0x9a9f27=[];return!isValidCssHttpsUrl(_0x1a8b46)&&_0x9a9f27[_0x2d50c6(0xa4)](_0x2d50c6(0x9b)),{'ok':_0x9a9f27[_0x2d50c6(0x9a)]===0x0,'errors':_0x9a9f27};}export async function validateJsUrlReachable(_0x420bc8){const _0x2d46d1=a179_0x2ce5,_0x376113=validateJsUrl(_0x420bc8);if(!_0x376113['ok'])return _0x376113;const _0x4d5955=await isUrlReachable(_0x420bc8);if(!_0x4d5955)_0x376113['errors'][_0x2d46d1(0xa4)]('JS\x20URL\x20is\x20unreachable');return{'ok':_0x376113[_0x2d46d1(0x9d)][_0x2d46d1(0x9a)]===0x0,'errors':_0x376113[_0x2d46d1(0x9d)]};}function a179_0x2ce5(_0x2d59b1,_0x23f58f){_0x2d59b1=_0x2d59b1-0x91;const _0x105610=a179_0x1056();let _0x2ce5d9=_0x105610[_0x2d59b1];return _0x2ce5d9;}export async function validateCssUrlReachable(_0x2e2849){const _0x435b10=a179_0x2ce5,_0x47389b=validateCssUrl(_0x2e2849);if(!_0x47389b['ok'])return _0x47389b;const _0x88d584=await isUrlReachable(_0x2e2849);if(!_0x88d584)_0x47389b['errors'][_0x435b10(0xa4)]('CSS\x20URL\x20is\x20unreachable');return{'ok':_0x47389b[_0x435b10(0x9d)]['length']===0x0,'errors':_0x47389b[_0x435b10(0x9d)]};}export function buildCompareRows(_0x394960,_0x466d02){const _0x1a8cc2=a179_0x2ce5;return _0x394960[_0x1a8cc2(0xa0)](_0x472484=>({'label':_0x472484[_0x1a8cc2(0x97)],'path':_0x472484['path'],'local':!![],'online':_0x466d02[_0x1a8cc2(0x99)](menuPathKey(_0x472484[_0x1a8cc2(0xa3)]))}));}export async function doCreateMenus(_0x4f7558,_0x3523c3,_0x2acc78,_0x59e0d6,_0x2eba6b){const _0x5b7095=a179_0x2ce5,_0x5f0855=_0x2eba6b?await createMenus(_0x4f7558,_0x3523c3,_0x2acc78,_0x59e0d6,_0x2eba6b):await createMenus(_0x4f7558,_0x3523c3,_0x2acc78,_0x59e0d6);return{'created':_0x5f0855[_0x5b7095(0x9a)],'failed':0x0,'labels':_0x2acc78[_0x5b7095(0xa0)](_0x185f8d=>_0x185f8d[_0x5b7095(0x97)]),'menus':_0x5f0855};}export function filterMenusWithResources(_0x44a161){const _0xb977fc=a179_0x2ce5;return _0x44a161[_0xb977fc(0x9c)](_0x5026be=>_0x5026be[_0xb977fc(0x95)][_0xb977fc(0x9a)]>0x0);}export async function fetchMenuData(_0xca013b,_0x767f12){const _0x5638ef=a179_0x2ce5,_0xc45bd4=getLocalPages(),_0x33dadb=await getOnlineMenuList(_0xca013b,_0x767f12),_0x242e65=new Set(_0x33dadb[_0x5638ef(0xa0)](_0x2ad716=>menuPathKey(_0x2ad716[_0x5638ef(0xa3)])));return{'localPages':_0xc45bd4,'onlineMenuList':_0x33dadb,'onlinePaths':_0x242e65};}export async function fetchOnlineMenuList(_0x3d3067,_0x4fb558){return getOnlineMenuList(_0x3d3067,_0x4fb558);}function a179_0x1056(){const _0xc2f66b=['6656844zZJqeT','resources','2811874rYSMgs','label','6344385WeGxuU','has','length','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','filter','errors','988593TkRSjV','3kFbgEu','map','17320968iXYhUb','3997048xZvJJS','path','push','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','462rgVIeP','116837NUVNKf'];a179_0x1056=function(){return _0xc2f66b;};return a179_0x1056();}
@@ -1 +1 @@
1
- const a180_0x58dae7=a180_0x3f02;(function(_0x470dc5,_0x55bd0c){const _0x4660f6=a180_0x3f02,_0x51589c=_0x470dc5();while(!![]){try{const _0x2a4aba=-parseInt(_0x4660f6(0xfa))/0x1*(-parseInt(_0x4660f6(0x129))/0x2)+-parseInt(_0x4660f6(0x157))/0x3*(-parseInt(_0x4660f6(0x10e))/0x4)+parseInt(_0x4660f6(0x156))/0x5+-parseInt(_0x4660f6(0x131))/0x6+-parseInt(_0x4660f6(0x146))/0x7+-parseInt(_0x4660f6(0xf9))/0x8+-parseInt(_0x4660f6(0x153))/0x9*(-parseInt(_0x4660f6(0x111))/0xa);if(_0x2a4aba===_0x55bd0c)break;else _0x51589c['push'](_0x51589c['shift']());}catch(_0x47bc3c){_0x51589c['push'](_0x51589c['shift']());}}}(a180_0x2f22,0x9374a));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':a180_0x58dae7(0x13f),'required':!![],'description':'Exact\x20online\x20menu\x20id'};export const MENU_SORT_FLAG={'name':a180_0x58dae7(0x13a),'type':a180_0x58dae7(0x13f),'description':a180_0x58dae7(0xf5)};export const MENU_PARENT_ID_FLAG={'name':a180_0x58dae7(0x119),'type':a180_0x58dae7(0x12c),'description':a180_0x58dae7(0x11c)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a180_0x58dae7(0x118),'type':a180_0x58dae7(0x12c),'description':a180_0x58dae7(0x10c)};function a180_0x3f02(_0x429378,_0x410907){_0x429378=_0x429378-0xe7;const _0x2f22f2=a180_0x2f22();let _0x3f02a4=_0x2f22f2[_0x429378];return _0x3f02a4;}export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a180_0x58dae7(0xe8),'type':a180_0x58dae7(0x12c),'description':a180_0x58dae7(0x107)},{'name':'expected-children-count','type':a180_0x58dae7(0x13f),'description':a180_0x58dae7(0x12d)}];export function validateExactId(_0xd161c){const _0x3c5a38=a180_0x58dae7,_0x434430=_0xd161c[_0x3c5a38(0x13b)]('id');if(!Number[_0x3c5a38(0x103)](_0x434430)||_0x434430<=0x0)throw CliErrors[_0x3c5a38(0x116)](_0x3c5a38(0xef));return _0x434430;}export function validateSort(_0x1f2453,_0x3e93bf='sort'){const _0xf15a63=a180_0x58dae7;if(!hasFlag(_0x1f2453,_0x3e93bf))return undefined;const _0x3add5c=_0x1f2453['num'](_0x3e93bf);if(!Number['isSafeInteger'](_0x3add5c)||_0x3add5c<0x0||_0x3add5c>MAX_MENU_SORT)throw menuError(_0xf15a63(0x126),'--'+_0x3e93bf+_0xf15a63(0x10a)+MAX_MENU_SORT+'.',_0xf15a63(0x140));return _0x3add5c;}export function nextSiblingSort(_0x2b825,_0x29b2bb,_0x1520d9){const _0x4fb7c4=a180_0x58dae7,_0x2a8966=getChildren(_0x2b825,_0x29b2bb)[_0x4fb7c4(0xed)](_0x34f59d=>_0x34f59d[_0x4fb7c4(0x13a)])[_0x4fb7c4(0xec)](_0x1b9ba9=>typeof _0x1b9ba9==='number');if(_0x2a8966[_0x4fb7c4(0x11e)]===0x0)return 0x0;const _0x14d6d0=Math[_0x4fb7c4(0xf1)](..._0x2a8966);if(_0x14d6d0>=MAX_MENU_SORT)throw menuError('menu_sort_overflow',_0x4fb7c4(0x14c)+_0x1520d9+_0x4fb7c4(0x149)+_0x14d6d0+'.',_0x4fb7c4(0x155)+MAX_MENU_SORT+_0x4fb7c4(0x100));return _0x14d6d0+0x1;}export function requireExplicitYes(_0x5689e0){const _0x1f2b8d=a180_0x58dae7;if(_0x5689e0[_0x1f2b8d(0x133)](_0x1f2b8d(0x14e)))return;if(!_0x5689e0[_0x1f2b8d(0x133)](_0x1f2b8d(0xf3)))throw menuError(_0x1f2b8d(0x108),_0x1f2b8d(0x138),_0x1f2b8d(0x10f));}export async function fetchMutationSnapshot(_0x561b1f,_0x42906f,_0x34c7d4){const _0x4414e0=a180_0x58dae7;try{return await fetchMenuSnapshot(_0x561b1f[_0x4414e0(0x143)],_0x561b1f[_0x4414e0(0xff)]);}catch(_0x1b5b21){throw mapMenuApiError(_0x1b5b21,_0x4414e0(0x11f)+_0x42906f,_0x34c7d4);}}export async function recheckMutationSnapshot(_0x1e1dd5,_0x4a2209,_0x189f7f,_0x252521){const _0x23d734=a180_0x58dae7;let _0x51ab36;try{_0x51ab36=await fetchMenuSnapshot(_0x1e1dd5[_0x23d734(0x143)],_0x1e1dd5[_0x23d734(0xff)]);}catch(_0x319267){const _0xa84306=mapMenuApiError(_0x319267,_0x23d734(0xeb)+_0x189f7f,_0x252521);throw menuFailure(_0xa84306,_0x4a2209,{'stage':_0x23d734(0x154),'failed':_0x252521==null?{}:{'id':_0x252521}});}if(_0x51ab36['hash']!==_0x4a2209['snapshotHash']){const _0x121cce=menuError(_0x23d734(0x151),'Online\x20menu\x20state\x20changed\x20before\x20'+_0x189f7f+_0x23d734(0x102),_0x23d734(0xe7));throw menuFailure(_0x121cce,_0x4a2209,{'stage':_0x23d734(0x154),'failed':{..._0x252521==null?{}:{'id':_0x252521},'expectedSnapshotHash':_0x4a2209['snapshotHash'],'currentSnapshotHash':_0x51ab36[_0x23d734(0x12e)]}});}return _0x51ab36;}export function parseParentId(_0x25d5c9,_0x420f15,_0x5499a0={}){const _0x646085=a180_0x58dae7;if(!hasFlag(_0x25d5c9,_0x420f15)){if(_0x5499a0[_0x646085(0x152)])throw CliErrors[_0x646085(0x104)](_0x420f15);return undefined;}const _0x48cc0a=_0x25d5c9[_0x646085(0x145)](_0x420f15)[_0x646085(0xfc)]();if(_0x48cc0a['toLowerCase']()===_0x646085(0xe9))return null;if(!/^\d+$/['test'](_0x48cc0a))throw CliErrors[_0x646085(0x116)]('--'+_0x420f15+_0x646085(0x14a));const _0x482266=Number(_0x48cc0a);if(!Number[_0x646085(0x103)](_0x482266)||_0x482266<=0x0)throw CliErrors['validation']('--'+_0x420f15+_0x646085(0x14a));return _0x482266;}export function requireMenu(_0x5457c8,_0x4df839){const _0x482b93=a180_0x58dae7,_0xf0a9b9=_0x5457c8['byId'][_0x482b93(0x114)](_0x4df839);if(!_0xf0a9b9)throw menuError(_0x482b93(0x14b),_0x482b93(0xf0)+_0x4df839,'Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.');return _0xf0a9b9;}export function requireFolder(_0x5c2da7,_0x2ab8cc){const _0x18fcce=a180_0x58dae7,_0x485220=requireMenu(_0x5c2da7,_0x2ab8cc);if(_0x485220[_0x18fcce(0x13d)]!==_0x18fcce(0x121))throw menuError(_0x18fcce(0x134),'Menu\x20'+_0x2ab8cc+_0x18fcce(0x109)+(_0x485220[_0x18fcce(0x13d)]||_0x18fcce(0xf2))+_0x18fcce(0x117),_0x18fcce(0x139));return _0x485220;}function a180_0x2f22(){const _0x3a83a6=['Cannot\x20append\x20a\x20','error','dry-run','after','snapshotHash','menu_state_drift','required','225fVCbpS','pre-write-recheck','Reorder\x20sibling\x20menus\x20below\x20','905900czPCVh','31854qCYpvT','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','expect-path','root','\x20path\x20changed:\x20expected\x20','recheck\x20online\x20menu\x20facts\x20before\x20','filter','map','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','Online\x20menu\x20not\x20found:\x20','max','unknown','yes','plannedActions','Sibling\x20sort\x20value\x20(non-negative\x20integer)','cascade','parentId','failed','3106448lyOWya','1GgzxXR','data','trim','backend','\x20child\x20count\x20changed:\x20expected\x20','cookie',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','menu_permission_denied',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','isSafeInteger','flagMissing','test','\x20menu\x20','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','menu_confirmation_required','\x20is\x20type\x20\x22','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','planFile','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','message','52oQpdwX','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Failed\x20to\x20','95120CXHbCM','deleteOrder',',\x20current\x20','get','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','validation','\x22,\x20not\x20folder.','expect-parent-id','parent-id','failedRecords','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','length','read\x20online\x20menu\x20facts\x20before\x20','warnings','folder','prototype','defineProperty','menu_mutation_failed','stage','menu_sort_invalid','Menu\x20','dryRun','1500702KZILWE','api_error','childrenCount','string','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','hash','rawFlags','verification','988698TQFtwx','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','bool','menu_parent_not_folder','code','selector','hint','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','sort','num','operation','type','targets','number','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','menu_verification_failed','path','appCode','expected-children-count','str','1052086wcDdoj','before','stringify','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','menu_not_found'];a180_0x2f22=function(){return _0x3a83a6;};return a180_0x2f22();}export function assertExpectedState(_0x44762e,_0x219216){const _0x2977b7=a180_0x58dae7;if(hasFlag(_0x44762e,_0x2977b7(0x118))){const _0x55f8bc=parseParentId(_0x44762e,'expect-parent-id',{'required':!![]});if(_0x219216[_0x2977b7(0xf7)]!==_0x55f8bc)throw stateDrift('Menu\x20'+_0x219216['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x55f8bc)+',\x20current\x20'+formatParent(_0x219216['parentId'])+'.');}if(hasFlag(_0x44762e,'expect-path')){const _0x3bb491=_0x44762e['str'](_0x2977b7(0xe8));if(_0x219216[_0x2977b7(0x142)]!==_0x3bb491)throw stateDrift('Menu\x20'+_0x219216['id']+_0x2977b7(0xea)+JSON[_0x2977b7(0x148)](_0x3bb491)+_0x2977b7(0x113)+JSON['stringify'](_0x219216[_0x2977b7(0x142)])+'.');}if(hasFlag(_0x44762e,_0x2977b7(0x144))){const _0x1dbc90=_0x44762e[_0x2977b7(0x13b)](_0x2977b7(0x144));if(!Number[_0x2977b7(0x103)](_0x1dbc90)||_0x1dbc90<0x0)throw CliErrors['validation'](_0x2977b7(0x115));if(_0x219216['childrenCount']!==_0x1dbc90)throw stateDrift(_0x2977b7(0x127)+_0x219216['id']+_0x2977b7(0xfe)+_0x1dbc90+_0x2977b7(0x113)+_0x219216[_0x2977b7(0x12b)]+'.');}}export function assertVerified(_0x5d38fa,_0x4d7a05,_0x2829f4='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){const _0x216cba=a180_0x58dae7;if(!_0x5d38fa)throw menuError(_0x216cba(0x141),_0x4d7a05,_0x2829f4);}export function mutationResult(_0x3e4d1b){const _0x31d42e=a180_0x58dae7;return{'operation':_0x3e4d1b[_0x31d42e(0x13c)],'selector':_0x3e4d1b[_0x31d42e(0x136)],'before':_0x3e4d1b[_0x31d42e(0x147)],'after':_0x3e4d1b[_0x31d42e(0x14f)],'dryRun':_0x3e4d1b[_0x31d42e(0x128)],'backend':_0x3e4d1b[_0x31d42e(0xfd)],..._0x3e4d1b[_0x31d42e(0xf4)]?{'plannedActions':_0x3e4d1b[_0x31d42e(0xf4)]}:{},..._0x3e4d1b[_0x31d42e(0x13e)]?{'targets':_0x3e4d1b['targets']}:{},..._0x3e4d1b[_0x31d42e(0x112)]?{'deleteOrder':_0x3e4d1b[_0x31d42e(0x112)]}:{},'snapshotHash':_0x3e4d1b[_0x31d42e(0x150)],..._0x3e4d1b[_0x31d42e(0xf6)]?{'cascade':_0x3e4d1b[_0x31d42e(0xf6)]}:{},..._0x3e4d1b[_0x31d42e(0x10b)]?{'planFile':_0x3e4d1b[_0x31d42e(0x10b)]}:{},'succeeded':_0x3e4d1b['succeeded']??[],'failed':_0x3e4d1b[_0x31d42e(0xf8)]??[],'warnings':_0x3e4d1b[_0x31d42e(0x120)]??[],'verification':_0x3e4d1b['verification'],'error':_0x3e4d1b[_0x31d42e(0x14d)]};}export function menuDryRunResult(_0x10352e,_0x4156cc){return{..._0x10352e,..._0x4156cc};}export function menuFailure(_0x23c2e2,_0x53ab12,_0x1a7bc7){const _0x224b4d=a180_0x58dae7,_0xe23e79=mutationResult({..._0x53ab12,'after':_0x1a7bc7[_0x224b4d(0x14f)]===undefined?_0x53ab12['after']:_0x1a7bc7['after'],'backend':_0x1a7bc7[_0x224b4d(0xfd)]??_0x53ab12[_0x224b4d(0xfd)],'dryRun':![],'succeeded':_0x1a7bc7['succeeded']??[],'failed':_0x1a7bc7[_0x224b4d(0x11a)]??[{..._0x1a7bc7[_0x224b4d(0xf8)]??{},'stage':_0x1a7bc7[_0x224b4d(0x125)],'code':_0x23c2e2[_0x224b4d(0x135)],'message':_0x23c2e2[_0x224b4d(0x10d)]}],'warnings':[..._0x53ab12[_0x224b4d(0x120)],..._0x1a7bc7[_0x224b4d(0x120)]??[]],'verification':_0x1a7bc7[_0x224b4d(0x130)],'error':{'code':_0x23c2e2[_0x224b4d(0x135)],'message':_0x23c2e2[_0x224b4d(0x10d)],..._0x23c2e2[_0x224b4d(0x137)]?{'hint':_0x23c2e2[_0x224b4d(0x137)]}:{}}});return Object[_0x224b4d(0x123)](_0x23c2e2,_0x224b4d(0xfb),{'value':_0xe23e79,'enumerable':!![],'configurable':!![]}),_0x23c2e2;}export function asVerificationError(_0x4a76ca,_0x5481a3){const _0x14414e=a180_0x58dae7;if(_0x4a76ca instanceof CliError&&_0x4a76ca[_0x14414e(0x135)]==='menu_verification_failed')return _0x4a76ca;const _0x48113c=_0x4a76ca instanceof Error?_0x4a76ca[_0x14414e(0x10d)]:String(_0x4a76ca);return menuError(_0x14414e(0x141),''+_0x5481a3+(_0x48113c?':\x20'+_0x48113c:''),_0x14414e(0xee));}export function describeMenuErrorCause(_0x459901,_0x18fe49,_0x444562){const _0x5a59a2=a180_0x58dae7,_0x2d4543=mapMenuApiError(_0x459901,_0x18fe49,_0x444562);return{'causeCode':_0x2d4543[_0x5a59a2(0x135)],'causeMessage':_0x2d4543[_0x5a59a2(0x10d)]};}export function hasFlag(_0x171cf2,_0x1bcafe){const _0x24005e=a180_0x58dae7;return Object[_0x24005e(0x122)]['hasOwnProperty']['call'](_0x171cf2[_0x24005e(0x12f)],_0x1bcafe)&&_0x171cf2[_0x24005e(0x12f)][_0x1bcafe]!==undefined;}export function toApiParentId(_0x13008a){return _0x13008a??0x0;}export function formatParent(_0x572151){const _0x2e83e6=a180_0x58dae7;return _0x572151==null?_0x2e83e6(0xe9):String(_0x572151);}export function menuError(_0x567eb5,_0x504cea,_0x47a8b5){return new CliError(_0x567eb5,0x1,_0x504cea,_0x47a8b5);}export function mapMenuApiError(_0x1c0155,_0x2678b6,_0x2393c9){const _0x2682b1=a180_0x58dae7;if(_0x1c0155 instanceof CliError&&_0x1c0155[_0x2682b1(0x135)]!=='api_error')return _0x1c0155;const _0x4850cf=_0x1c0155 instanceof Error?_0x1c0155[_0x2682b1(0x10d)]:String(_0x1c0155);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x2682b1(0x105)](_0x4850cf))return menuError(_0x2682b1(0x101),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x2678b6+(_0x2393c9?_0x2682b1(0x106)+_0x2393c9:'')+'.',_0x2682b1(0x11b));return menuError(_0x2682b1(0x124),_0x2682b1(0x110)+_0x2678b6+(_0x2393c9?_0x2682b1(0x106)+_0x2393c9:'')+':\x20'+_0x4850cf,_0x2682b1(0x132));}export function isMenuResponseLoss(_0x30f6db){const _0x1bda4f=a180_0x58dae7,_0x23c7ac=_0x30f6db instanceof Error?_0x30f6db['message']:String(_0x30f6db);if(_0x30f6db instanceof CliError)return _0x30f6db[_0x1bda4f(0x135)]===_0x1bda4f(0x12a)&&/^Request (?:failed|timeout):/i[_0x1bda4f(0x105)](_0x23c7ac);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x1bda4f(0x105)](_0x23c7ac);}function stateDrift(_0x20720d){const _0x334c42=a180_0x58dae7;return menuError(_0x334c42(0x151),_0x20720d,_0x334c42(0x11d));}
1
+ const a180_0x32a490=a180_0x408b;(function(_0x4124da,_0x5e3ba2){const _0x199dc7=a180_0x408b,_0x83b068=_0x4124da();while(!![]){try{const _0x472699=parseInt(_0x199dc7(0x108))/0x1+-parseInt(_0x199dc7(0xf2))/0x2*(parseInt(_0x199dc7(0xf7))/0x3)+parseInt(_0x199dc7(0xc5))/0x4+-parseInt(_0x199dc7(0x114))/0x5+parseInt(_0x199dc7(0xe7))/0x6*(-parseInt(_0x199dc7(0xf1))/0x7)+-parseInt(_0x199dc7(0xe3))/0x8*(-parseInt(_0x199dc7(0xf3))/0x9)+parseInt(_0x199dc7(0x115))/0xa;if(_0x472699===_0x5e3ba2)break;else _0x83b068['push'](_0x83b068['shift']());}catch(_0x2f6232){_0x83b068['push'](_0x83b068['shift']());}}}(a180_0x112c,0x6dbfe));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':a180_0x32a490(0x110),'required':!![],'description':a180_0x32a490(0xb6)};export const MENU_SORT_FLAG={'name':a180_0x32a490(0x106),'type':a180_0x32a490(0x110),'description':a180_0x32a490(0x105)};export const MENU_PARENT_ID_FLAG={'name':'parent-id','type':a180_0x32a490(0x112),'description':'Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node'};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a180_0x32a490(0xc2),'type':a180_0x32a490(0x112),'description':a180_0x32a490(0xb7)};function a180_0x112c(){const _0x4d7990=['stage','rawFlags','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','plannedActions','Exact\x20online\x20menu\x20id','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','operation','code','dryRun','planFile','Menu\x20','max','menu_confirmation_required','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','appCode','cascade','expect-parent-id','menu_sort_overflow',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','500896ZnAisL','message','childrenCount','cookie','error','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','yes','length','expect-path','hint','prototype','failedRecords','isSafeInteger','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','str','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','\x20is\x20type\x20\x22','test',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','hash','defineProperty','Failed\x20to\x20','targets','folder','call','selector','stringify','parentId','succeeded','byId','4432uvQfyM','api_error','expected-children-count','menu_not_found','852MDoSos','num','validation','menu_state_drift','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','Permission\x20denied\x20while\x20attempting\x20to\x20','\x20path\x20changed:\x20expected\x20','backend','22036lmUJhX','1264eMavUk','11250Lcqayo','get','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','menu_verification_failed','3669SAmBwv','recheck\x20online\x20menu\x20facts\x20before\x20','snapshotHash','warnings','pre-write-recheck','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','root','trim','read\x20online\x20menu\x20facts\x20before\x20','menu_mutation_failed','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','dry-run','\x20parent\x20changed:\x20expected\x20','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','Sibling\x20sort\x20value\x20(non-negative\x20integer)','sort','required','563770mGbAbi','Reorder\x20sibling\x20menus\x20below\x20','path','after',',\x20current\x20','type','flagMissing','Cannot\x20append\x20a\x20','number','bool','string','unknown','2055095PBjQGS','6990110tWRNXz'];a180_0x112c=function(){return _0x4d7990;};return a180_0x112c();}export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a180_0x32a490(0xcd),'type':a180_0x32a490(0x112),'description':'Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches'},{'name':a180_0x32a490(0xe5),'type':'number','description':a180_0x32a490(0xca)}];export function validateExactId(_0x31de5e){const _0x3c5c08=a180_0x32a490,_0x4ed583=_0x31de5e['num']('id');if(!Number[_0x3c5c08(0xd1)](_0x4ed583)||_0x4ed583<=0x0)throw CliErrors[_0x3c5c08(0xe9)](_0x3c5c08(0xd4));return _0x4ed583;}export function validateSort(_0x3dd585,_0x45f4ec=a180_0x32a490(0x106)){const _0x5888d5=a180_0x32a490;if(!hasFlag(_0x3dd585,_0x45f4ec))return undefined;const _0x3890c8=_0x3dd585['num'](_0x45f4ec);if(!Number['isSafeInteger'](_0x3890c8)||_0x3890c8<0x0||_0x3890c8>MAX_MENU_SORT)throw menuError('menu_sort_invalid','--'+_0x45f4ec+_0x5888d5(0x101)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x3890c8;}export function nextSiblingSort(_0x32f1db,_0x21fcc7,_0x5aff9d){const _0x15a088=a180_0x32a490,_0x310000=getChildren(_0x32f1db,_0x21fcc7)['map'](_0x3b6b8c=>_0x3b6b8c[_0x15a088(0x106)])['filter'](_0x3ebd5c=>typeof _0x3ebd5c===_0x15a088(0x110));if(_0x310000[_0x15a088(0xcc)]===0x0)return 0x0;const _0x5e84df=Math[_0x15a088(0xbd)](..._0x310000);if(_0x5e84df>=MAX_MENU_SORT)throw menuError(_0x15a088(0xc3),_0x15a088(0x10f)+_0x5aff9d+'\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20'+_0x5e84df+'.',_0x15a088(0x109)+MAX_MENU_SORT+_0x15a088(0xd7));return _0x5e84df+0x1;}export function requireExplicitYes(_0x14be74){const _0x15dd54=a180_0x32a490;if(_0x14be74['bool'](_0x15dd54(0x102)))return;if(!_0x14be74[_0x15dd54(0x111)](_0x15dd54(0xcb)))throw menuError(_0x15dd54(0xbe),_0x15dd54(0xed),_0x15dd54(0xd2));}export async function fetchMutationSnapshot(_0x4ffbed,_0x4ac05c,_0x50d223){const _0x344172=a180_0x32a490;try{return await fetchMenuSnapshot(_0x4ffbed['appCode'],_0x4ffbed[_0x344172(0xc8)]);}catch(_0x374286){throw mapMenuApiError(_0x374286,_0x344172(0xff)+_0x4ac05c,_0x50d223);}}function a180_0x408b(_0x166a8c,_0x51c64a){_0x166a8c=_0x166a8c-0xb4;const _0x112c82=a180_0x112c();let _0x408b95=_0x112c82[_0x166a8c];return _0x408b95;}export async function recheckMutationSnapshot(_0x229833,_0x330195,_0x2a614a,_0x49d507){const _0x85031f=a180_0x32a490;let _0x42e9c2;try{_0x42e9c2=await fetchMenuSnapshot(_0x229833[_0x85031f(0xc0)],_0x229833['cookie']);}catch(_0x517d50){const _0xc9697d=mapMenuApiError(_0x517d50,_0x85031f(0xf8)+_0x2a614a,_0x49d507);throw menuFailure(_0xc9697d,_0x330195,{'stage':_0x85031f(0xfb),'failed':_0x49d507==null?{}:{'id':_0x49d507}});}if(_0x42e9c2[_0x85031f(0xd8)]!==_0x330195[_0x85031f(0xf9)]){const _0xb9be9b=menuError(_0x85031f(0xea),'Online\x20menu\x20state\x20changed\x20before\x20'+_0x2a614a+_0x85031f(0xc4),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.');throw menuFailure(_0xb9be9b,_0x330195,{'stage':_0x85031f(0xfb),'failed':{..._0x49d507==null?{}:{'id':_0x49d507},'expectedSnapshotHash':_0x330195[_0x85031f(0xf9)],'currentSnapshotHash':_0x42e9c2['hash']}});}return _0x42e9c2;}export function parseParentId(_0x44d26b,_0x5878b4,_0x531499={}){const _0x38caaf=a180_0x32a490;if(!hasFlag(_0x44d26b,_0x5878b4)){if(_0x531499[_0x38caaf(0x107)])throw CliErrors[_0x38caaf(0x10e)](_0x5878b4);return undefined;}const _0x10a92c=_0x44d26b[_0x38caaf(0xd3)](_0x5878b4)[_0x38caaf(0xfe)]();if(_0x10a92c['toLowerCase']()==='root')return null;if(!/^\d+$/[_0x38caaf(0xd6)](_0x10a92c))throw CliErrors['validation']('--'+_0x5878b4+_0x38caaf(0xeb));const _0x382e29=Number(_0x10a92c);if(!Number[_0x38caaf(0xd1)](_0x382e29)||_0x382e29<=0x0)throw CliErrors[_0x38caaf(0xe9)]('--'+_0x5878b4+_0x38caaf(0xeb));return _0x382e29;}export function requireMenu(_0x1a09b2,_0x5aec43){const _0xb49343=a180_0x32a490,_0x39746f=_0x1a09b2[_0xb49343(0xe2)][_0xb49343(0xf4)](_0x5aec43);if(!_0x39746f)throw menuError(_0xb49343(0xe6),'Online\x20menu\x20not\x20found:\x20'+_0x5aec43,_0xb49343(0xbf));return _0x39746f;}export function requireFolder(_0x11a174,_0x455c6c){const _0x151cbb=a180_0x32a490,_0x5ead72=requireMenu(_0x11a174,_0x455c6c);if(_0x5ead72[_0x151cbb(0x10d)]!==_0x151cbb(0xdc))throw menuError('menu_parent_not_folder',_0x151cbb(0xbc)+_0x455c6c+_0x151cbb(0xd5)+(_0x5ead72['type']||_0x151cbb(0x113))+'\x22,\x20not\x20folder.',_0x151cbb(0xb4));return _0x5ead72;}export function assertExpectedState(_0x364e92,_0x31ea45){const _0x219fcb=a180_0x32a490;if(hasFlag(_0x364e92,_0x219fcb(0xc2))){const _0x530484=parseParentId(_0x364e92,_0x219fcb(0xc2),{'required':!![]});if(_0x31ea45[_0x219fcb(0xe0)]!==_0x530484)throw stateDrift(_0x219fcb(0xbc)+_0x31ea45['id']+_0x219fcb(0x103)+formatParent(_0x530484)+_0x219fcb(0x10c)+formatParent(_0x31ea45[_0x219fcb(0xe0)])+'.');}if(hasFlag(_0x364e92,'expect-path')){const _0x3f5b24=_0x364e92[_0x219fcb(0xd3)]('expect-path');if(_0x31ea45['path']!==_0x3f5b24)throw stateDrift(_0x219fcb(0xbc)+_0x31ea45['id']+_0x219fcb(0xef)+JSON[_0x219fcb(0xdf)](_0x3f5b24)+',\x20current\x20'+JSON[_0x219fcb(0xdf)](_0x31ea45[_0x219fcb(0x10a)])+'.');}if(hasFlag(_0x364e92,_0x219fcb(0xe5))){const _0x2b57ee=_0x364e92[_0x219fcb(0xe8)]('expected-children-count');if(!Number[_0x219fcb(0xd1)](_0x2b57ee)||_0x2b57ee<0x0)throw CliErrors[_0x219fcb(0xe9)](_0x219fcb(0xec));if(_0x31ea45[_0x219fcb(0xc7)]!==_0x2b57ee)throw stateDrift(_0x219fcb(0xbc)+_0x31ea45['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x2b57ee+_0x219fcb(0x10c)+_0x31ea45[_0x219fcb(0xc7)]+'.');}}export function assertVerified(_0x29be26,_0x5122a4,_0x50e06b=a180_0x32a490(0xfc)){const _0x35e3ab=a180_0x32a490;if(!_0x29be26)throw menuError(_0x35e3ab(0xf6),_0x5122a4,_0x50e06b);}export function mutationResult(_0x5aa7b8){const _0xd425aa=a180_0x32a490;return{'operation':_0x5aa7b8[_0xd425aa(0xb8)],'selector':_0x5aa7b8[_0xd425aa(0xde)],'before':_0x5aa7b8['before'],'after':_0x5aa7b8[_0xd425aa(0x10b)],'dryRun':_0x5aa7b8[_0xd425aa(0xba)],'backend':_0x5aa7b8[_0xd425aa(0xf0)],..._0x5aa7b8[_0xd425aa(0xb5)]?{'plannedActions':_0x5aa7b8[_0xd425aa(0xb5)]}:{},..._0x5aa7b8[_0xd425aa(0xdb)]?{'targets':_0x5aa7b8[_0xd425aa(0xdb)]}:{},..._0x5aa7b8['deleteOrder']?{'deleteOrder':_0x5aa7b8['deleteOrder']}:{},'snapshotHash':_0x5aa7b8['snapshotHash'],..._0x5aa7b8['cascade']?{'cascade':_0x5aa7b8[_0xd425aa(0xc1)]}:{},..._0x5aa7b8[_0xd425aa(0xbb)]?{'planFile':_0x5aa7b8['planFile']}:{},'succeeded':_0x5aa7b8['succeeded']??[],'failed':_0x5aa7b8['failed']??[],'warnings':_0x5aa7b8['warnings']??[],'verification':_0x5aa7b8['verification'],'error':_0x5aa7b8[_0xd425aa(0xc9)]};}export function menuDryRunResult(_0x28728d,_0x56b232){return{..._0x28728d,..._0x56b232};}export function menuFailure(_0x2b4646,_0x59744c,_0xfe9beb){const _0x3d2615=a180_0x32a490,_0x3287cc=mutationResult({..._0x59744c,'after':_0xfe9beb['after']===undefined?_0x59744c[_0x3d2615(0x10b)]:_0xfe9beb['after'],'backend':_0xfe9beb[_0x3d2615(0xf0)]??_0x59744c[_0x3d2615(0xf0)],'dryRun':![],'succeeded':_0xfe9beb[_0x3d2615(0xe1)]??[],'failed':_0xfe9beb[_0x3d2615(0xd0)]??[{..._0xfe9beb['failed']??{},'stage':_0xfe9beb[_0x3d2615(0x116)],'code':_0x2b4646[_0x3d2615(0xb9)],'message':_0x2b4646['message']}],'warnings':[..._0x59744c[_0x3d2615(0xfa)],..._0xfe9beb[_0x3d2615(0xfa)]??[]],'verification':_0xfe9beb['verification'],'error':{'code':_0x2b4646['code'],'message':_0x2b4646[_0x3d2615(0xc6)],..._0x2b4646[_0x3d2615(0xce)]?{'hint':_0x2b4646['hint']}:{}}});return Object[_0x3d2615(0xd9)](_0x2b4646,'data',{'value':_0x3287cc,'enumerable':!![],'configurable':!![]}),_0x2b4646;}export function asVerificationError(_0x481471,_0x1e0f0b){const _0x13a372=a180_0x32a490;if(_0x481471 instanceof CliError&&_0x481471['code']===_0x13a372(0xf6))return _0x481471;const _0x2ceb7b=_0x481471 instanceof Error?_0x481471[_0x13a372(0xc6)]:String(_0x481471);return menuError(_0x13a372(0xf6),''+_0x1e0f0b+(_0x2ceb7b?':\x20'+_0x2ceb7b:''),_0x13a372(0xf5));}export function describeMenuErrorCause(_0x7c2544,_0x26b842,_0x2f54c0){const _0x26e282=a180_0x32a490,_0x127aa6=mapMenuApiError(_0x7c2544,_0x26b842,_0x2f54c0);return{'causeCode':_0x127aa6[_0x26e282(0xb9)],'causeMessage':_0x127aa6[_0x26e282(0xc6)]};}export function hasFlag(_0x57b9c8,_0x3fb28e){const _0x532288=a180_0x32a490;return Object[_0x532288(0xcf)]['hasOwnProperty'][_0x532288(0xdd)](_0x57b9c8['rawFlags'],_0x3fb28e)&&_0x57b9c8[_0x532288(0x117)][_0x3fb28e]!==undefined;}export function toApiParentId(_0x2b7820){return _0x2b7820??0x0;}export function formatParent(_0x3ad12f){const _0x33c0cd=a180_0x32a490;return _0x3ad12f==null?_0x33c0cd(0xfd):String(_0x3ad12f);}export function menuError(_0x16e162,_0x2775fc,_0x248967){return new CliError(_0x16e162,0x1,_0x2775fc,_0x248967);}export function mapMenuApiError(_0xc8d962,_0x285826,_0x3a528b){const _0x30621c=a180_0x32a490;if(_0xc8d962 instanceof CliError&&_0xc8d962[_0x30621c(0xb9)]!=='api_error')return _0xc8d962;const _0x29e345=_0xc8d962 instanceof Error?_0xc8d962[_0x30621c(0xc6)]:String(_0xc8d962);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x30621c(0xd6)](_0x29e345))return menuError('menu_permission_denied',_0x30621c(0xee)+_0x285826+(_0x3a528b?'\x20menu\x20'+_0x3a528b:'')+'.','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.');return menuError(_0x30621c(0x100),_0x30621c(0xda)+_0x285826+(_0x3a528b?'\x20menu\x20'+_0x3a528b:'')+':\x20'+_0x29e345,_0x30621c(0x104));}export function isMenuResponseLoss(_0x5642e2){const _0x28fe6f=a180_0x32a490,_0x35e16a=_0x5642e2 instanceof Error?_0x5642e2[_0x28fe6f(0xc6)]:String(_0x5642e2);if(_0x5642e2 instanceof CliError)return _0x5642e2[_0x28fe6f(0xb9)]===_0x28fe6f(0xe4)&&/^Request (?:failed|timeout):/i[_0x28fe6f(0xd6)](_0x35e16a);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i['test'](_0x35e16a);}function stateDrift(_0x4055dd){return menuError('menu_state_drift',_0x4055dd,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}
@@ -1 +1 @@
1
- function a181_0x2cf4(_0x72b45b,_0x14afb5){_0x72b45b=_0x72b45b-0x16e;const _0x550eae=a181_0x550e();let _0x2cf432=_0x550eae[_0x72b45b];return _0x2cf432;}(function(_0x3a9953,_0x4654d3){const _0x5091fe=a181_0x2cf4,_0xd36b11=_0x3a9953();while(!![]){try{const _0x56aede=parseInt(_0x5091fe(0x16e))/0x1+parseInt(_0x5091fe(0x173))/0x2*(-parseInt(_0x5091fe(0x176))/0x3)+parseInt(_0x5091fe(0x174))/0x4+parseInt(_0x5091fe(0x179))/0x5*(-parseInt(_0x5091fe(0x175))/0x6)+-parseInt(_0x5091fe(0x178))/0x7+parseInt(_0x5091fe(0x177))/0x8*(parseInt(_0x5091fe(0x171))/0x9)+-parseInt(_0x5091fe(0x16f))/0xa*(-parseInt(_0x5091fe(0x172))/0xb);if(_0x56aede===_0x4654d3)break;else _0xd36b11['push'](_0xd36b11['shift']());}catch(_0x345349){_0xd36b11['push'](_0xd36b11['shift']());}}}(a181_0x550e,0x90b58));export function menuPathKey(_0x3e01d4){const _0x4e5088=a181_0x2cf4,_0x50851f=_0x3e01d4[_0x4e5088(0x17a)]();if(!_0x50851f)return'';return _0x50851f[_0x4e5088(0x170)](/^\/+/,'')[_0x4e5088(0x170)](/\/+$/,'')||'/';}function a181_0x550e(){const _0x4b94d9=['2283149WMTovH','2622FfBXhf','3197332VAtZvg','115458kkAtuk','1209tnWoye','4558616yYWjMA','5981150SdmMmf','65PMZnCE','trim','648951TVGXNe','10zqABAP','replace','9QBimYS'];a181_0x550e=function(){return _0x4b94d9;};return a181_0x550e();}
1
+ function a181_0x1ae2(){const _0x248947=['122124bvXjNx','2426949vNBAns','150379eQMFEB','121272vKqBWz','4FpVIzf','replace','3137872JNtLCo','11492478yhqWfF','trim','35MITwGA','1425500qxWxvB'];a181_0x1ae2=function(){return _0x248947;};return a181_0x1ae2();}(function(_0x83412c,_0x3e9ad9){const _0x1b6e37=a181_0x3272,_0x55608f=_0x83412c();while(!![]){try{const _0x1b977a=parseInt(_0x1b6e37(0x1cd))/0x1*(parseInt(_0x1b6e37(0x1cf))/0x2)+-parseInt(_0x1b6e37(0x1ce))/0x3+parseInt(_0x1b6e37(0x1ca))/0x4+-parseInt(_0x1b6e37(0x1d4))/0x5*(-parseInt(_0x1b6e37(0x1cb))/0x6)+parseInt(_0x1b6e37(0x1cc))/0x7+parseInt(_0x1b6e37(0x1d1))/0x8+-parseInt(_0x1b6e37(0x1d2))/0x9;if(_0x1b977a===_0x3e9ad9)break;else _0x55608f['push'](_0x55608f['shift']());}catch(_0x88308e){_0x55608f['push'](_0x55608f['shift']());}}}(a181_0x1ae2,0x36002));function a181_0x3272(_0x409199,_0x8892e){_0x409199=_0x409199-0x1ca;const _0x1ae2a4=a181_0x1ae2();let _0x327212=_0x1ae2a4[_0x409199];return _0x327212;}export function menuPathKey(_0x11ffac){const _0x2a010a=a181_0x3272,_0x445e70=_0x11ffac[_0x2a010a(0x1d3)]();if(!_0x445e70)return'';return _0x445e70[_0x2a010a(0x1d0)](/^\/+/,'')[_0x2a010a(0x1d0)](/\/+$/,'')||'/';}
@@ -1 +1 @@
1
- (function(_0x431d01,_0x264d67){const _0x27fc5d=a182_0x20dd,_0x653f38=_0x431d01();while(!![]){try{const _0x11fbbe=parseInt(_0x27fc5d(0x164))/0x1*(-parseInt(_0x27fc5d(0x169))/0x2)+-parseInt(_0x27fc5d(0x16d))/0x3*(parseInt(_0x27fc5d(0x171))/0x4)+parseInt(_0x27fc5d(0x157))/0x5+-parseInt(_0x27fc5d(0x167))/0x6+-parseInt(_0x27fc5d(0x172))/0x7*(-parseInt(_0x27fc5d(0x17c))/0x8)+-parseInt(_0x27fc5d(0x159))/0x9*(-parseInt(_0x27fc5d(0x168))/0xa)+-parseInt(_0x27fc5d(0x165))/0xb*(-parseInt(_0x27fc5d(0x15e))/0xc);if(_0x11fbbe===_0x264d67)break;else _0x653f38['push'](_0x653f38['shift']());}catch(_0x3b1d70){_0x653f38['push'](_0x653f38['shift']());}}}(a182_0x1e2d,0x73106));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 a182_0x21ad8f,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x1d73eb,_0x1ec66b){const _0x61d94b=a182_0x20dd,_0x1b480a=getEnv();logger['info'](_0x61d94b(0x156),isProduction(_0x1b480a)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x1d73eb+')':_0x61d94b(0x173)+_0x1d73eb+')');const _0x225572=await fetchMenuSnapshot(_0x1d73eb,_0x1ec66b,{'verbose':!![]});return logger[_0x61d94b(0x174)](_0x61d94b(0x156),_0x61d94b(0x17a)+_0x225572[_0x61d94b(0x184)]+_0x61d94b(0x180)),_0x225572[_0x61d94b(0x16b)][_0x61d94b(0x16a)](toProcessedMenuItem);}export async function createMenu(_0xe7e295,_0x1990a6,_0x21186c){const _0x55862c=a182_0x20dd;logger[_0x55862c(0x174)]('create-menu',_0x55862c(0x160)+_0x21186c['label']+'\x20('+_0x21186c['path']+')');const _0x5abc63={'appCode':_0xe7e295,'type':_0x55862c(0x16e),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x21186c[_0x55862c(0x15b)]?JSON[_0x55862c(0x162)](_0x21186c[_0x55862c(0x15b)]):undefined},..._0x21186c},_0x1a2505=await createMenuRecord(_0x5abc63,_0x1990a6,_0x55862c(0x16f)+_0x21186c[_0x55862c(0x17d)]+'\x22');return logger['info'](_0x55862c(0x176),'Menu\x20created\x20successfully:\x20'+_0x21186c['label']),_0x1a2505;}function a182_0x1e2d(){const _0x8262e0=['number','328797Yixwhi','Batch\x20menu\x20creation\x20completed,\x20total\x20','resources','Update\x20menu\x20assets\x20\x22','update-menu-cdn-url','24ORddaH','create-menus','Creating\x20menu:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','stringify','parentId','103TqxsuL','593549zvJMJk','import','4218216rEKJfk','210FUOtko','10966MonLZN','map','menus','\x20menu','9249uleEpW','procode','Create\x20menu\x20\x22','order','184bLXGHA','826kNPiPd','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','info','appName','create-menu','Delete\x20','all','path','Fetched\x20','menuGroups','60728XyYzWf','label','Updating\x20menu\x20asset\x20links:\x20','\x20menu\x20group(s)','\x20online\x20menus\x20successfully','length','Menu\x20assets\x20synced:\x20','visible','total','extend','get-online-menu-list','550280icYWtt'];a182_0x1e2d=function(){return _0x8262e0;};return a182_0x1e2d();}async function createSingleMenu(_0x5cf440,_0x577b82,_0x42879e,_0x337efc,_0x517c32){const _0xfc5f3f=a182_0x20dd,_0x4a506d={'appCode':_0x5cf440,'type':_0xfc5f3f(0x16e),'sort':_0xfc5f3f(0x170)in _0x42879e&&typeof _0x42879e['order']===_0xfc5f3f(0x158)?_0x42879e[_0xfc5f3f(0x170)]:0x0,..._0xfc5f3f(0x183)in _0x42879e&&typeof _0x42879e[_0xfc5f3f(0x183)]==='boolean'?{'visible':_0x42879e[_0xfc5f3f(0x183)]}:{},..._0xfc5f3f(0x163)in _0x42879e&&typeof _0x42879e[_0xfc5f3f(0x163)]===_0xfc5f3f(0x158)?{'parentId':_0x42879e['parentId']}:{},'extend':{..._0x517c32?.[_0xfc5f3f(0x175)]?{'appName':_0x517c32['appName']}:{},'loadScriptMode':_0xfc5f3f(0x166),'resources':_0x337efc?JSON[_0xfc5f3f(0x162)](_0x337efc):undefined},'label':_0x42879e[_0xfc5f3f(0x17d)],'path':_0x42879e[_0xfc5f3f(0x179)]},_0x5959e3=await createMenuRecord(_0x4a506d,_0x577b82,'Create\x20menu\x20\x22'+_0x42879e['label']+'\x22');return logger[_0xfc5f3f(0x174)](_0xfc5f3f(0x176),'Menu\x20created\x20successfully:\x20'+_0x42879e[_0xfc5f3f(0x17d)]),_0x5959e3;}export async function createMenus(_0x28a530,_0x287831,_0x31144a,_0x549357,_0xdefc7d){const _0x25f7f3=a182_0x20dd;logger[_0x25f7f3(0x174)]('create-menus',_0x25f7f3(0x161)+_0x31144a[_0x25f7f3(0x181)]);const _0xf77d65=await Promise[_0x25f7f3(0x178)](_0x31144a[_0x25f7f3(0x16a)](_0x48657a=>createSingleMenu(_0x28a530,_0x287831,_0x48657a,_0x549357,_0xdefc7d)));return logger['info'](_0x25f7f3(0x15f),_0x25f7f3(0x15a)+_0x31144a[_0x25f7f3(0x181)]),_0xf77d65;}export async function updateMenuCdnUrl(_0x2f335e,_0x18d089,_0x48b06d){const _0x1ba2ff=a182_0x20dd;logger['info'](_0x1ba2ff(0x15d),_0x1ba2ff(0x17e)+_0x48b06d['label']+'\x20('+_0x48b06d[_0x1ba2ff(0x179)]+')');const _0x5d6082={'id':_0x48b06d['id'],'appCode':_0x2f335e,'extend':{..._0x48b06d[_0x1ba2ff(0x155)]??{},..._0x48b06d['loadScriptMode']?{'loadScriptMode':_0x48b06d['loadScriptMode']}:{},'resources':_0x48b06d[_0x1ba2ff(0x15b)]?JSON['stringify'](_0x48b06d[_0x1ba2ff(0x15b)]):undefined}},_0x46670e=await updateMenuRecord(_0x5d6082,_0x18d089,_0x1ba2ff(0x15c)+_0x48b06d['label']+'\x22');return logger[_0x1ba2ff(0x174)](_0x1ba2ff(0x15d),_0x1ba2ff(0x182)+_0x48b06d[_0x1ba2ff(0x17d)],undefined),_0x46670e;}function a182_0x20dd(_0xed1924,_0x1af1c1){_0xed1924=_0xed1924-0x155;const _0x1e2d37=a182_0x1e2d();let _0x20dd2a=_0x1e2d37[_0xed1924];return _0x20dd2a;}export async function createMenuEntity(_0x92c2f7,_0x4a9599,_0x4dae40){const _0x930796=a182_0x20dd;return createMenuRecord({'appCode':_0x92c2f7,..._0x4dae40},_0x4a9599,'Create\x20menu\x20\x22'+_0x4dae40[_0x930796(0x17d)]+'\x22');}export async function updateMenuEntity(_0x346625,_0x1df40c,_0x192738){return updateMenuRecord({'appCode':_0x346625,..._0x192738},_0x1df40c,'Update\x20menu\x20'+_0x192738['id']);}export async function batchDeleteMenuEntities(_0x2732e9,_0x14081b){const _0x5b9eb6=a182_0x20dd;return batchDeleteMenuRecords(_0x14081b,_0x2732e9,_0x5b9eb6(0x177)+_0x14081b[_0x5b9eb6(0x181)]+_0x5b9eb6(0x16c)+(_0x14081b[_0x5b9eb6(0x181)]===0x1?'':'s'));}export async function startMenuRegroup(_0x55a35d,_0x2cdac9){const _0x27a928=a182_0x20dd;return a182_0x21ad8f(_0x2cdac9,_0x55a35d,'Regroup\x20'+_0x2cdac9[_0x27a928(0x17b)]['length']+_0x27a928(0x17f));}
1
+ (function(_0x578fa4,_0x254dd9){const _0x1e2fe6=a182_0x11cb,_0x105eb3=_0x578fa4();while(!![]){try{const _0x29ece1=-parseInt(_0x1e2fe6(0x15c))/0x1*(parseInt(_0x1e2fe6(0x155))/0x2)+parseInt(_0x1e2fe6(0x136))/0x3*(parseInt(_0x1e2fe6(0x14c))/0x4)+parseInt(_0x1e2fe6(0x131))/0x5*(parseInt(_0x1e2fe6(0x132))/0x6)+-parseInt(_0x1e2fe6(0x15f))/0x7+-parseInt(_0x1e2fe6(0x135))/0x8+-parseInt(_0x1e2fe6(0x147))/0x9+-parseInt(_0x1e2fe6(0x134))/0xa*(-parseInt(_0x1e2fe6(0x15a))/0xb);if(_0x29ece1===_0x254dd9)break;else _0x105eb3['push'](_0x105eb3['shift']());}catch(_0xf43465){_0x105eb3['push'](_0x105eb3['shift']());}}}(a182_0x11e1,0xeab0d));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 a182_0x3c6fea,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x27701a,_0x4b1411){const _0x226137=a182_0x11cb,_0x57dbc1=getEnv();logger[_0x226137(0x14f)]('get-online-menu-list',isProduction(_0x57dbc1)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x27701a+')':_0x226137(0x143)+_0x27701a+')');const _0x24b79f=await fetchMenuSnapshot(_0x27701a,_0x4b1411,{'verbose':!![]});return logger[_0x226137(0x14f)](_0x226137(0x14a),_0x226137(0x157)+_0x24b79f[_0x226137(0x12f)]+_0x226137(0x153)),_0x24b79f[_0x226137(0x145)]['map'](toProcessedMenuItem);}function a182_0x11cb(_0x52494b,_0x4e914c){_0x52494b=_0x52494b-0x12f;const _0x11e156=a182_0x11e1();let _0x11cb31=_0x11e156[_0x52494b];return _0x11cb31;}export async function createMenu(_0x76a410,_0x36304b,_0x6b747b){const _0x7f7dd1=a182_0x11cb;logger[_0x7f7dd1(0x14f)](_0x7f7dd1(0x14b),_0x7f7dd1(0x141)+_0x6b747b[_0x7f7dd1(0x13c)]+'\x20('+_0x6b747b[_0x7f7dd1(0x13e)]+')');const _0x4a9039={'appCode':_0x76a410,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x7f7dd1(0x13b),'resources':_0x6b747b['resources']?JSON[_0x7f7dd1(0x151)](_0x6b747b[_0x7f7dd1(0x146)]):undefined},..._0x6b747b},_0x947f84=await createMenuRecord(_0x4a9039,_0x36304b,_0x7f7dd1(0x137)+_0x6b747b[_0x7f7dd1(0x13c)]+'\x22');return logger[_0x7f7dd1(0x14f)](_0x7f7dd1(0x14b),_0x7f7dd1(0x149)+_0x6b747b['label']),_0x947f84;}async function createSingleMenu(_0x579a09,_0x4a1584,_0x238ac4,_0x12ecbe,_0x45793a){const _0x5bbc5e=a182_0x11cb,_0x1889a5={'appCode':_0x579a09,'type':_0x5bbc5e(0x133),'sort':_0x5bbc5e(0x140)in _0x238ac4&&typeof _0x238ac4[_0x5bbc5e(0x140)]===_0x5bbc5e(0x130)?_0x238ac4['order']:0x0,..._0x5bbc5e(0x139)in _0x238ac4&&typeof _0x238ac4[_0x5bbc5e(0x139)]===_0x5bbc5e(0x15e)?{'visible':_0x238ac4[_0x5bbc5e(0x139)]}:{},..._0x5bbc5e(0x15d)in _0x238ac4&&typeof _0x238ac4[_0x5bbc5e(0x15d)]===_0x5bbc5e(0x130)?{'parentId':_0x238ac4[_0x5bbc5e(0x15d)]}:{},'extend':{..._0x45793a?.[_0x5bbc5e(0x15b)]?{'appName':_0x45793a[_0x5bbc5e(0x15b)]}:{},'loadScriptMode':_0x5bbc5e(0x13b),'resources':_0x12ecbe?JSON[_0x5bbc5e(0x151)](_0x12ecbe):undefined},'label':_0x238ac4[_0x5bbc5e(0x13c)],'path':_0x238ac4[_0x5bbc5e(0x13e)]},_0x518f44=await createMenuRecord(_0x1889a5,_0x4a1584,_0x5bbc5e(0x137)+_0x238ac4[_0x5bbc5e(0x13c)]+'\x22');return logger['info'](_0x5bbc5e(0x14b),_0x5bbc5e(0x149)+_0x238ac4[_0x5bbc5e(0x13c)]),_0x518f44;}export async function createMenus(_0x5bf6c9,_0x327867,_0x28abf2,_0x4dccd7,_0x9d2b04){const _0x2d8fa5=a182_0x11cb;logger[_0x2d8fa5(0x14f)](_0x2d8fa5(0x138),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x28abf2[_0x2d8fa5(0x148)]);const _0x3a9971=await Promise[_0x2d8fa5(0x152)](_0x28abf2[_0x2d8fa5(0x150)](_0x3cff92=>createSingleMenu(_0x5bf6c9,_0x327867,_0x3cff92,_0x4dccd7,_0x9d2b04)));return logger[_0x2d8fa5(0x14f)](_0x2d8fa5(0x138),_0x2d8fa5(0x154)+_0x28abf2['length']),_0x3a9971;}export async function updateMenuCdnUrl(_0x3d1de1,_0xad1782,_0x558bc1){const _0x4209f3=a182_0x11cb;logger[_0x4209f3(0x14f)](_0x4209f3(0x13f),_0x4209f3(0x13a)+_0x558bc1['label']+'\x20('+_0x558bc1[_0x4209f3(0x13e)]+')');const _0x5da3e0={'id':_0x558bc1['id'],'appCode':_0x3d1de1,'extend':{..._0x558bc1[_0x4209f3(0x14d)]??{},..._0x558bc1[_0x4209f3(0x142)]?{'loadScriptMode':_0x558bc1[_0x4209f3(0x142)]}:{},'resources':_0x558bc1[_0x4209f3(0x146)]?JSON[_0x4209f3(0x151)](_0x558bc1['resources']):undefined}},_0x5ed816=await updateMenuRecord(_0x5da3e0,_0xad1782,'Update\x20menu\x20assets\x20\x22'+_0x558bc1[_0x4209f3(0x13c)]+'\x22');return logger[_0x4209f3(0x14f)](_0x4209f3(0x13f),_0x4209f3(0x13d)+_0x558bc1[_0x4209f3(0x13c)],undefined),_0x5ed816;}export async function createMenuEntity(_0x20dd8f,_0xdfe07,_0x1e914f){const _0x428eb5=a182_0x11cb;return createMenuRecord({'appCode':_0x20dd8f,..._0x1e914f},_0xdfe07,_0x428eb5(0x137)+_0x1e914f[_0x428eb5(0x13c)]+'\x22');}export async function updateMenuEntity(_0x3cb0f1,_0x5891bd,_0x4e77d2){return updateMenuRecord({'appCode':_0x3cb0f1,..._0x4e77d2},_0x5891bd,'Update\x20menu\x20'+_0x4e77d2['id']);}function a182_0x11e1(){const _0x4c4479=['Creating\x20menu:\x20','loadScriptMode','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','menuGroups','menus','resources','9716418mFlwfn','length','Menu\x20created\x20successfully:\x20','get-online-menu-list','create-menu','8fwuJet','extend','Delete\x20','info','map','stringify','all','\x20online\x20menus\x20successfully','Batch\x20menu\x20creation\x20completed,\x20total\x20','900362zeMCfM','Regroup\x20','Fetched\x20','\x20menu\x20group(s)','\x20menu','11ayBWUH','appName','2RhnqKS','parentId','boolean','394009fWDNXY','total','number','5DRyxMU','5658972VGBiVf','procode','19046430URbQVS','7682040ldJsfe','1664991bGYMWj','Create\x20menu\x20\x22','create-menus','visible','Updating\x20menu\x20asset\x20links:\x20','import','label','Menu\x20assets\x20synced:\x20','path','update-menu-cdn-url','order'];a182_0x11e1=function(){return _0x4c4479;};return a182_0x11e1();}export async function batchDeleteMenuEntities(_0x5f386f,_0x1f1c39){const _0x24a7ac=a182_0x11cb;return batchDeleteMenuRecords(_0x1f1c39,_0x5f386f,_0x24a7ac(0x14e)+_0x1f1c39[_0x24a7ac(0x148)]+_0x24a7ac(0x159)+(_0x1f1c39[_0x24a7ac(0x148)]===0x1?'':'s'));}export async function startMenuRegroup(_0x568e64,_0x134159){const _0x41af3c=a182_0x11cb;return a182_0x3c6fea(_0x134159,_0x568e64,_0x41af3c(0x156)+_0x134159[_0x41af3c(0x144)]['length']+_0x41af3c(0x158));}
@@ -1 +1 @@
1
- const a183_0x3bdeac=a183_0x4241;(function(_0x484128,_0x326be9){const _0x578931=a183_0x4241,_0x5a1f30=_0x484128();while(!![]){try{const _0x208825=-parseInt(_0x578931(0x182))/0x1+parseInt(_0x578931(0x19a))/0x2*(-parseInt(_0x578931(0x175))/0x3)+parseInt(_0x578931(0x198))/0x4*(parseInt(_0x578931(0x19b))/0x5)+parseInt(_0x578931(0x183))/0x6*(parseInt(_0x578931(0x18c))/0x7)+-parseInt(_0x578931(0x189))/0x8*(-parseInt(_0x578931(0x192))/0x9)+parseInt(_0x578931(0x188))/0xa+parseInt(_0x578931(0x172))/0xb*(-parseInt(_0x578931(0x18f))/0xc);if(_0x208825===_0x326be9)break;else _0x5a1f30['push'](_0x5a1f30['shift']());}catch(_0x309b74){_0x5a1f30['push'](_0x5a1f30['shift']());}}}(a183_0x5256,0x90faa));import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x175959,_0x32bea5){const _0x256b2f=a183_0x4241,_0x31b98e=typeof _0x175959===_0x256b2f(0x17c)?parseJson(_0x175959,_0x32bea5):_0x175959;if(!_0x31b98e||typeof _0x31b98e!==_0x256b2f(0x173)||Array['isArray'](_0x31b98e))throw CliErrors[_0x256b2f(0x180)](_0x32bea5+'\x20must\x20be\x20a\x20JSON\x20object.');return _0x31b98e;}function parseJson(_0xc55fc3,_0xb3c5f1){const _0x2546fd=a183_0x4241;try{return JSON[_0x2546fd(0x193)](_0xc55fc3);}catch{throw CliErrors[_0x2546fd(0x180)](_0xb3c5f1+_0x2546fd(0x197));}}function resourceList(_0x4dd0f4,_0x3ac3e2){const _0x1c77aa=a183_0x4241;if(typeof _0x4dd0f4!==_0x1c77aa(0x17c))throw CliErrors[_0x1c77aa(0x180)](_0x3ac3e2+_0x1c77aa(0x178));const _0x578efa=parseJson(_0x4dd0f4,_0x3ac3e2);if(!Array[_0x1c77aa(0x194)](_0x578efa)||_0x578efa[_0x1c77aa(0x184)](_0x10da92=>typeof _0x10da92!==_0x1c77aa(0x17c)))throw CliErrors[_0x1c77aa(0x180)](_0x3ac3e2+_0x1c77aa(0x177));return _0x578efa;}export function buildSubappAssetsStatus(_0x1d43c7,_0x523708,_0x164048){const _0x160612=a183_0x4241,_0x14fe47=_0x1d43c7['extend']==null?{}:objectValue(_0x1d43c7[_0x160612(0x17e)],'app.extend'),_0xe6f797=_0x14fe47[_0x160612(0x19d)]==null?[]:typeof _0x14fe47[_0x160612(0x19d)]===_0x160612(0x17c)?parseJson(_0x14fe47['assets'],_0x160612(0x18a)):_0x14fe47[_0x160612(0x19d)];if(!Array[_0x160612(0x194)](_0xe6f797))throw CliErrors[_0x160612(0x180)](_0x160612(0x16f));const _0x5be829=_0xe6f797[_0x160612(0x16e)]((_0x1b36a9,_0x3f00f0)=>objectValue(_0x1b36a9,_0x160612(0x185)+_0x3f00f0+']')),_0x151461=_0x5be829[_0x160612(0x195)](_0x345bbc=>_0x345bbc[_0x160612(0x176)]===_0x164048);if(_0x151461[_0x160612(0x187)]>0x1)throw CliErrors[_0x160612(0x180)](_0x160612(0x170)+_0x164048+'.');const _0x2f7330=_0x151461[0x0],_0x17ddae=_0x2f7330?.[_0x160612(0x191)]==null?[]:resourceList(_0x2f7330[_0x160612(0x191)],_0x160612(0x19c)),_0xac7e94=_0x523708[_0x160612(0x195)](_0x1b0d7e=>_0x1b0d7e[_0x160612(0x17e)]?.[_0x160612(0x176)]===_0x164048),_0x2b3de7=_0xac7e94[_0x160612(0x16e)](_0x584cb5=>{const _0x2a1c53=_0x160612;let _0x5ea37c=null,_0x369219=null;try{_0x5ea37c=_0x584cb5[_0x2a1c53(0x17e)]?.[_0x2a1c53(0x191)]==null?_0x584cb5['resources']:resourceList(_0x584cb5['extend'][_0x2a1c53(0x191)],'menu\x20'+_0x584cb5['id']+_0x2a1c53(0x199));}catch(_0x33b126){_0x369219=_0x33b126 instanceof Error?_0x33b126[_0x2a1c53(0x196)]:String(_0x33b126);}const _0xc31d7=_0x17ddae[_0x2a1c53(0x187)]>0x0?_0x2a1c53(0x179):_0x2a1c53(0x186),_0xd00b24=_0xc31d7===_0x2a1c53(0x179)?_0x17ddae:_0x5ea37c;return{'id':_0x584cb5['id'],'path':_0x584cb5['path'],'preferredSourceIfSupported':_0xc31d7,'preferredResourcesIfSupported':_0xd00b24,'menuFallbackResources':_0x5ea37c,'menuFallbackError':_0x369219,'fallbackDiffers':_0x5ea37c===null?null:_0xc31d7===_0x2a1c53(0x179)&&_0x5ea37c['length']>0x0&&JSON[_0x2a1c53(0x17d)](_0x5ea37c)!==JSON[_0x2a1c53(0x17d)](_0xd00b24)};});return{'appName':_0x164048,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x2f7330),'sharedResources':_0x17ddae,'loadScriptMode':_0x2f7330?.[_0x160612(0x171)]??null,'basename':_0x2f7330?.[_0x160612(0x18b)]??null,'boundMenus':_0x2b3de7['length'],'staleMenuFallbacks':_0x2b3de7[_0x160612(0x195)](_0x14fc97=>_0x14fc97[_0x160612(0x181)])[_0x160612(0x187)],'menus':_0x2b3de7};}function a183_0x5256(){const _0x481b64=['length','4915630EKAzfa','1112EYIXJd','app.extend.assets','basename','1681141YGXFpd','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','--app-name\x20is\x20required.','1149204wEKrzc','No\x20shared\x20resources\x20configured\x20for\x20','resources','38322WYQtPl','parse','isArray','filter','message','\x20contains\x20invalid\x20JSON.','345248fxKYyO','\x20resources','2vUmYwi','65WLXAGJ','subapp.resources','assets','trim','map','app.extend.assets\x20must\x20be\x20an\x20array.','Duplicate\x20subapp\x20records\x20for\x20','loadScriptMode','121uNweRj','object','sharedResources','3120030LvcLZk','appName','\x20must\x20be\x20an\x20array\x20of\x20URLs.','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','app','app-name','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','string','stringify','extend','sharedConfigured','validation','fallbackDiffers','478852daZyKL','24DqmiWE','some','app.extend.assets[','menu'];a183_0x5256=function(){return _0x481b64;};return a183_0x5256();}function a183_0x4241(_0x328226,_0x48de77){_0x328226=_0x328226-0x16e;const _0x525697=a183_0x5256();let _0x424134=_0x525697[_0x328226];return _0x424134;}export async function assertSharedResourcesConfigured(_0x3e5c9f,_0x16d02a,_0x8c6ca1){const _0x4e4a11=a183_0x4241,_0x263421=await getSmartAppRecord(_0x3e5c9f,_0x16d02a),_0x1a6007=buildSubappAssetsStatus(_0x263421,[],_0x8c6ca1);if(!_0x1a6007[_0x4e4a11(0x17f)]||_0x1a6007[_0x4e4a11(0x174)]['length']===0x0)throw CliErrors[_0x4e4a11(0x180)](_0x4e4a11(0x190)+_0x8c6ca1+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a183_0x3bdeac(0x17b)},{'name':'app-name','type':a183_0x3bdeac(0x17c),'required':!![],'description':a183_0x3bdeac(0x18d)}];export function getSubappSelector(_0x56754d){const _0x33afa1=a183_0x3bdeac,_0xe4a403=_0x56754d['appCode'],_0x16eb47=_0x56754d['str'](_0x33afa1(0x17a))[_0x33afa1(0x19e)]();if(!_0x16eb47)throw CliErrors['validation'](_0x33afa1(0x18e));return{'appCode':_0xe4a403,'appName':_0x16eb47};}
1
+ const a183_0x140c59=a183_0x4447;(function(_0x432459,_0x10831a){const _0xee88d5=a183_0x4447,_0x4dbc64=_0x432459();while(!![]){try{const _0x126b99=-parseInt(_0xee88d5(0x11b))/0x1+parseInt(_0xee88d5(0x115))/0x2*(parseInt(_0xee88d5(0x128))/0x3)+-parseInt(_0xee88d5(0x114))/0x4+-parseInt(_0xee88d5(0xfc))/0x5*(parseInt(_0xee88d5(0x10b))/0x6)+parseInt(_0xee88d5(0x123))/0x7*(parseInt(_0xee88d5(0x11f))/0x8)+-parseInt(_0xee88d5(0x11c))/0x9*(-parseInt(_0xee88d5(0x125))/0xa)+-parseInt(_0xee88d5(0x106))/0xb;if(_0x126b99===_0x10831a)break;else _0x4dbc64['push'](_0x4dbc64['shift']());}catch(_0x94fe){_0x4dbc64['push'](_0x4dbc64['shift']());}}}(a183_0x15cb,0x2b9fc));function a183_0x4447(_0x56eee4,_0x7978ec){_0x56eee4=_0x56eee4-0xfc;const _0x15cba5=a183_0x15cb();let _0x444761=_0x15cba5[_0x56eee4];return _0x444761;}import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x3cda1d,_0x2e9741){const _0x27d75e=a183_0x4447,_0x575dab=typeof _0x3cda1d==='string'?parseJson(_0x3cda1d,_0x2e9741):_0x3cda1d;if(!_0x575dab||typeof _0x575dab!==_0x27d75e(0x105)||Array[_0x27d75e(0x117)](_0x575dab))throw CliErrors['validation'](_0x2e9741+_0x27d75e(0x109));return _0x575dab;}function parseJson(_0xe3dff0,_0x245a5c){const _0x2f2355=a183_0x4447;try{return JSON['parse'](_0xe3dff0);}catch{throw CliErrors[_0x2f2355(0x122)](_0x245a5c+_0x2f2355(0x100));}}function resourceList(_0x120d42,_0x51eba4){const _0x66ccaa=a183_0x4447;if(typeof _0x120d42!==_0x66ccaa(0x110))throw CliErrors[_0x66ccaa(0x122)](_0x51eba4+_0x66ccaa(0x101));const _0x1fdfea=parseJson(_0x120d42,_0x51eba4);if(!Array['isArray'](_0x1fdfea)||_0x1fdfea[_0x66ccaa(0x116)](_0x122b8d=>typeof _0x122b8d!==_0x66ccaa(0x110)))throw CliErrors[_0x66ccaa(0x122)](_0x51eba4+_0x66ccaa(0x10d));return _0x1fdfea;}export function buildSubappAssetsStatus(_0x122976,_0x3ae0f4,_0x5b48a0){const _0x4071ef=a183_0x4447,_0x34a3ed=_0x122976[_0x4071ef(0x121)]==null?{}:objectValue(_0x122976[_0x4071ef(0x121)],_0x4071ef(0x107)),_0x144df5=_0x34a3ed[_0x4071ef(0x126)]==null?[]:typeof _0x34a3ed[_0x4071ef(0x126)]===_0x4071ef(0x110)?parseJson(_0x34a3ed[_0x4071ef(0x126)],_0x4071ef(0xfe)):_0x34a3ed[_0x4071ef(0x126)];if(!Array[_0x4071ef(0x117)](_0x144df5))throw CliErrors[_0x4071ef(0x122)](_0x4071ef(0x120));const _0x15665c=_0x144df5[_0x4071ef(0x113)]((_0x1da990,_0x4bc4e8)=>objectValue(_0x1da990,_0x4071ef(0x124)+_0x4bc4e8+']')),_0x34e6d2=_0x15665c['filter'](_0x1d56f6=>_0x1d56f6['appName']===_0x5b48a0);if(_0x34e6d2[_0x4071ef(0x10a)]>0x1)throw CliErrors[_0x4071ef(0x122)](_0x4071ef(0x127)+_0x5b48a0+'.');const _0x66349d=_0x34e6d2[0x0],_0x2bfd4c=_0x66349d?.['resources']==null?[]:resourceList(_0x66349d['resources'],_0x4071ef(0x118)),_0x4f2371=_0x3ae0f4['filter'](_0x2243bf=>_0x2243bf[_0x4071ef(0x121)]?.[_0x4071ef(0x104)]===_0x5b48a0),_0x36f25f=_0x4f2371['map'](_0x2a5f41=>{const _0x556b85=_0x4071ef;let _0x14948c=null,_0x7fb7cf=null;try{_0x14948c=_0x2a5f41['extend']?.[_0x556b85(0xff)]==null?_0x2a5f41[_0x556b85(0xff)]:resourceList(_0x2a5f41['extend'][_0x556b85(0xff)],'menu\x20'+_0x2a5f41['id']+_0x556b85(0x10f));}catch(_0x537552){_0x7fb7cf=_0x537552 instanceof Error?_0x537552[_0x556b85(0xfd)]:String(_0x537552);}const _0x395efd=_0x2bfd4c['length']>0x0?_0x556b85(0x111):'menu',_0x58b3b5=_0x395efd===_0x556b85(0x111)?_0x2bfd4c:_0x14948c;return{'id':_0x2a5f41['id'],'path':_0x2a5f41['path'],'preferredSourceIfSupported':_0x395efd,'preferredResourcesIfSupported':_0x58b3b5,'menuFallbackResources':_0x14948c,'menuFallbackError':_0x7fb7cf,'fallbackDiffers':_0x14948c===null?null:_0x395efd===_0x556b85(0x111)&&_0x14948c[_0x556b85(0x10a)]>0x0&&JSON[_0x556b85(0x102)](_0x14948c)!==JSON[_0x556b85(0x102)](_0x58b3b5)};});return{'appName':_0x5b48a0,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x66349d),'sharedResources':_0x2bfd4c,'loadScriptMode':_0x66349d?.['loadScriptMode']??null,'basename':_0x66349d?.[_0x4071ef(0x10e)]??null,'boundMenus':_0x36f25f['length'],'staleMenuFallbacks':_0x36f25f[_0x4071ef(0x112)](_0x31e4b9=>_0x31e4b9['fallbackDiffers'])[_0x4071ef(0x10a)],'menus':_0x36f25f};}function a183_0x15cb(){const _0x3d278b=['app.extend.assets[','951310CYoZhn','assets','Duplicate\x20subapp\x20records\x20for\x20','1044825bKeCNb','sharedResources','145OBunXR','message','app.extend.assets','resources','\x20contains\x20invalid\x20JSON.','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','stringify','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','appName','object','2512114TdcUKs','app.extend','appCode','\x20must\x20be\x20a\x20JSON\x20object.','length','14982CTKVev','str','\x20must\x20be\x20an\x20array\x20of\x20URLs.','basename','\x20resources','string','app','filter','map','957516oPgGnu','2OdVCKQ','some','isArray','subapp.resources','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','trim','14469gsOERl','18XDuWrN','No\x20shared\x20resources\x20configured\x20for\x20','app-name','112WvXkbF','app.extend.assets\x20must\x20be\x20an\x20array.','extend','validation','97391UShtff'];a183_0x15cb=function(){return _0x3d278b;};return a183_0x15cb();}export async function assertSharedResourcesConfigured(_0x2e11e3,_0xad686c,_0x1dd279){const _0x4fbb5d=a183_0x4447,_0x1bf368=await getSmartAppRecord(_0x2e11e3,_0xad686c),_0x4a2311=buildSubappAssetsStatus(_0x1bf368,[],_0x1dd279);if(!_0x4a2311['sharedConfigured']||_0x4a2311[_0x4fbb5d(0x129)][_0x4fbb5d(0x10a)]===0x0)throw CliErrors[_0x4fbb5d(0x122)](_0x4fbb5d(0x11d)+_0x1dd279+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a183_0x140c59(0x103)},{'name':a183_0x140c59(0x11e),'type':'string','required':!![],'description':a183_0x140c59(0x119)}];export function getSubappSelector(_0x379420){const _0x2c627d=a183_0x140c59,_0x51d5ac=_0x379420[_0x2c627d(0x108)],_0x1f15df=_0x379420[_0x2c627d(0x10c)](_0x2c627d(0x11e))[_0x2c627d(0x11a)]();if(!_0x1f15df)throw CliErrors[_0x2c627d(0x122)]('--app-name\x20is\x20required.');return{'appCode':_0x51d5ac,'appName':_0x1f15df};}
@@ -1 +1 @@
1
- const a184_0x5e1d43=a184_0x5034;(function(_0x869ccc,_0x236276){const _0x2d9807=a184_0x5034,_0x20bce2=_0x869ccc();while(!![]){try{const _0x2932a4=-parseInt(_0x2d9807(0x1c2))/0x1+-parseInt(_0x2d9807(0x1dd))/0x2+parseInt(_0x2d9807(0x1be))/0x3*(parseInt(_0x2d9807(0x1e9))/0x4)+parseInt(_0x2d9807(0x1d5))/0x5*(-parseInt(_0x2d9807(0x1b3))/0x6)+-parseInt(_0x2d9807(0x1d2))/0x7+parseInt(_0x2d9807(0x1ca))/0x8+-parseInt(_0x2d9807(0x1c6))/0x9*(-parseInt(_0x2d9807(0x1b9))/0xa);if(_0x2932a4===_0x236276)break;else _0x20bce2['push'](_0x20bce2['shift']());}catch(_0x451146){_0x20bce2['push'](_0x20bce2['shift']());}}}(a184_0x51c1,0xc14f0));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a184_0x5034(_0x1f3a01,_0x7fd4b4){_0x1f3a01=_0x1f3a01-0x1b2;const _0x51c1aa=a184_0x51c1();let _0x5034eb=_0x51c1aa[_0x1f3a01];return _0x5034eb;}function a184_0x51c1(){const _0x1e60b8=['string','hasOwn','5879736nRXfqg','Expected\x20one\x20folder\x20named\x20\x22','isArray','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','boolean','folder','parse','--params.','3727738unugVh','appName','\x22\x20for\x20','404450uwQCjm','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','object','cssUrl','Start\x20non-interactive\x20menu\x20sync',';\x20found\x20','import','Parent\x20','2901136vYNrmV','has','visible','join','\x0a\x20\x20Available\x20local\x20paths:\x20','Invalid\x20--params:\x20','filter','pages','Invalid\x20--params.','dryRun','menu-sync','map','28Mvbviv','jsUrl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','30fYyLCJ','path','info','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','parentId','push','25455020oDalwm','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','trim','keys','No\x20local\x20pages\x20matched\x20paths:\x20','231909OkCLcr','length','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','label','642246ZMZZXm','procode','group','order','9enojur','type'];a184_0x51c1=function(){return _0x1e60b8;};return a184_0x51c1();}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([a184_0x5e1d43(0x1ea),a184_0x5e1d43(0x1d8),'appName','visible','parentId']);export function resolvePage(_0x2d9f51,_0x1c82cf,_0x58c8b2){const _0x5c684f=a184_0x5e1d43;let _0x21f6ee=_0x1c82cf[_0x5c684f(0x1b7)]??_0x2d9f51['parentId'];if(_0x21f6ee===undefined&&_0x2d9f51[_0x5c684f(0x1c4)]){const _0x211a92=_0x58c8b2['filter'](_0x3b70b2=>_0x3b70b2[_0x5c684f(0x1c7)]==='folder'&&_0x3b70b2[_0x5c684f(0x1c1)]===_0x2d9f51[_0x5c684f(0x1c4)]);if(_0x211a92[_0x5c684f(0x1bf)]!==0x1)throw new Error(_0x5c684f(0x1cb)+_0x2d9f51[_0x5c684f(0x1c4)]+_0x5c684f(0x1d4)+_0x2d9f51[_0x5c684f(0x1b4)]+_0x5c684f(0x1da)+_0x211a92[_0x5c684f(0x1bf)]);_0x21f6ee=_0x211a92[0x0]['id'];}if(_0x21f6ee!==undefined&&_0x21f6ee!==0x0&&_0x58c8b2['filter'](_0x125cf2=>_0x125cf2['id']===_0x21f6ee&&_0x125cf2['type']===_0x5c684f(0x1cf))[_0x5c684f(0x1bf)]!==0x1)throw new Error(_0x5c684f(0x1dc)+_0x21f6ee+_0x5c684f(0x1c0));return{..._0x2d9f51,..._0x21f6ee===undefined?{}:{'parentId':_0x21f6ee},..._0x1c82cf[_0x5c684f(0x1df)]===undefined?{}:{'visible':_0x1c82cf[_0x5c684f(0x1df)]}};}function validateParams(_0x479f65){const _0x4ff065=a184_0x5e1d43,_0x5759bd=[];return _0x479f65['jsUrl']&&!isValidJsHttpsUrl(_0x479f65['jsUrl'])&&_0x5759bd['push']({'field':_0x4ff065(0x1ea),'message':_0x4ff065(0x1d6)}),_0x479f65[_0x4ff065(0x1d8)]&&!isValidCssHttpsUrl(_0x479f65['cssUrl'])&&_0x5759bd[_0x4ff065(0x1b8)]({'field':_0x4ff065(0x1d8),'message':_0x4ff065(0x1b2)}),_0x5759bd;}export async function runMenuSyncCore(_0x38d510,_0x507cab,_0x3f2e55=[],_0x452ab6,_0x23cdce={}){const _0x147c8f=a184_0x5e1d43,_0x507354=parseMenuSyncParams(_0x452ab6),_0x12279f=[...new Set(_0x3f2e55[_0x147c8f(0x1e8)](_0x36ad64=>_0x36ad64['trim']())['filter'](Boolean)[_0x147c8f(0x1e8)](menuPathKey))],_0x4ede5c=_0x507354[_0x147c8f(0x1ea)],_0x4a5ca8=_0x507354['cssUrl'],_0x568470=[];if(_0x4ede5c)_0x568470[_0x147c8f(0x1b8)](_0x4ede5c);if(_0x4a5ca8)_0x568470[_0x147c8f(0x1b8)](_0x4a5ca8);const _0x3501df=validateParams(_0x507354);if(_0x3501df['length']>0x0){const _0x2f5b4d=_0x3501df['map'](_0x454518=>_0x147c8f(0x1d1)+_0x454518['field']+':\x20'+_0x454518['message'])['join'](';\x20');throw new Error(_0x147c8f(0x1e2)+_0x2f5b4d);}logger['setLogPath'](process['cwd']()),logger[_0x147c8f(0x1b5)](_0x147c8f(0x1e7),_0x147c8f(0x1d9),{'appCode':_0x38d510,'selectedCount':_0x12279f['length'],'jsUrl':_0x4ede5c,'cssUrl':_0x4a5ca8});if(_0x4ede5c){const _0x4afdfc=await isUrlReachable(_0x4ede5c);if(!_0x4afdfc)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x4ede5c);}if(_0x4a5ca8){const _0x11328c=await isUrlReachable(_0x4a5ca8);if(!_0x11328c)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x4a5ca8);}const _0x104ad7=getLocalPages();if(_0x104ad7[_0x147c8f(0x1bf)]===0x0){if(_0x12279f['length']>0x0)throw new Error(_0x147c8f(0x1bd)+_0x12279f[_0x147c8f(0x1e0)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x23cdce[_0x147c8f(0x1e6)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x5f55ac=await getOnlineMenuList(_0x38d510,_0x507cab),_0x21d2b8=new Set(_0x5f55ac['map'](_0x1c5dc2=>menuPathKey(_0x1c5dc2[_0x147c8f(0x1b4)])));let _0x5e987b;if(_0x12279f[_0x147c8f(0x1bf)]>0x0){const _0x134b9d=new Map(_0x104ad7[_0x147c8f(0x1e8)](_0x31e774=>[menuPathKey(_0x31e774[_0x147c8f(0x1b4)]),_0x31e774])),_0x1abd54=_0x12279f['filter'](_0x18508a=>!_0x134b9d['has'](_0x18508a));if(_0x1abd54[_0x147c8f(0x1bf)]>0x0){const _0x26e386=_0x104ad7[_0x147c8f(0x1e8)](_0x52dcb3=>_0x52dcb3['path'])[_0x147c8f(0x1e0)](',\x20');throw new Error(_0x147c8f(0x1bd)+_0x1abd54[_0x147c8f(0x1e0)](',\x20')+_0x147c8f(0x1e1)+_0x26e386);}const _0x309166=_0x12279f[_0x147c8f(0x1e3)](_0x4bc524=>_0x21d2b8[_0x147c8f(0x1de)](_0x4bc524));if(_0x309166[_0x147c8f(0x1bf)]>0x0)throw new Error(_0x147c8f(0x1cd)+_0x309166[_0x147c8f(0x1e0)](',\x20'));_0x5e987b=_0x12279f[_0x147c8f(0x1e8)](_0x3a1c1b=>_0x134b9d['get'](_0x3a1c1b));}else _0x5e987b=_0x104ad7[_0x147c8f(0x1e3)](_0x555f43=>!_0x21d2b8[_0x147c8f(0x1de)](menuPathKey(_0x555f43[_0x147c8f(0x1b4)])));if(_0x5e987b[_0x147c8f(0x1bf)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x23cdce['dryRun']===!![],'targetPages':[],'plannedMenus':[]};_0x5e987b=_0x5e987b['map'](_0x5b41b0=>resolvePage(_0x5b41b0,_0x507354,_0x5f55ac));_0x507354['appName']&&_0x568470[_0x147c8f(0x1bf)]===0x0&&await assertSharedResourcesConfigured(_0x38d510,_0x507cab,_0x507354['appName']);const _0x9d592f=_0x5e987b[_0x147c8f(0x1e8)](_0x4f1e6f=>({'type':_0x147c8f(0x1c3),'path':_0x4f1e6f['path'],'label':_0x4f1e6f['label'],'loadScriptMode':_0x147c8f(0x1db),'resources':[..._0x568470],..._0x4f1e6f['visible']===undefined?{}:{'visible':_0x4f1e6f[_0x147c8f(0x1df)]},..._0x4f1e6f['parentId']===undefined?{}:{'parentId':_0x4f1e6f[_0x147c8f(0x1b7)]},..._0x4f1e6f[_0x147c8f(0x1c5)]===undefined?{}:{'sort':_0x4f1e6f['order']},..._0x507354[_0x147c8f(0x1d3)]===undefined?{}:{'appName':_0x507354[_0x147c8f(0x1d3)]}}));if(_0x23cdce[_0x147c8f(0x1e6)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x5e987b,'plannedMenus':_0x9d592f};const _0x29660f=_0x507354[_0x147c8f(0x1d3)]?await createMenus(_0x38d510,_0x507cab,_0x5e987b,_0x568470[_0x147c8f(0x1bf)]>0x0?_0x568470:undefined,{'appName':_0x507354[_0x147c8f(0x1d3)]}):await createMenus(_0x38d510,_0x507cab,_0x5e987b,_0x568470['length']>0x0?_0x568470:undefined);return logger[_0x147c8f(0x1b5)](_0x147c8f(0x1e7),'Menu\x20sync\x20completed',{'count':_0x5e987b['length'],'resources':_0x568470}),{'created':_0x29660f['length'],'skipped':![],'dryRun':![],'targetPages':_0x5e987b,'plannedMenus':_0x9d592f,'menus':_0x29660f};}export function parseMenuSyncParams(_0x1b5e96){const _0x1ac044=a184_0x5e1d43;if(!_0x1b5e96||typeof _0x1b5e96!=='string')return{};let _0x217f4b;try{_0x217f4b=JSON[_0x1ac044(0x1d0)](_0x1b5e96);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x217f4b!==_0x1ac044(0x1d7)||_0x217f4b===null||Array[_0x1ac044(0x1cc)](_0x217f4b))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x1b0218=_0x217f4b;if(Object[_0x1ac044(0x1c9)](_0x1b0218,_0x1ac044(0x1e4)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x1fabca=Object[_0x1ac044(0x1bc)](_0x1b0218)['filter'](_0x5c430c=>!MENU_SYNC_PARAM_KEYS[_0x1ac044(0x1de)](_0x5c430c));if(_0x1fabca[_0x1ac044(0x1bf)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x1fabca[_0x1ac044(0x1e0)](',\x20')+'.');for(const _0x37b61d of[_0x1ac044(0x1ea),_0x1ac044(0x1d8),_0x1ac044(0x1d3)]){const _0x2a5147=_0x1b0218[_0x37b61d];if(_0x2a5147!==undefined&&(typeof _0x2a5147!==_0x1ac044(0x1c8)||_0x2a5147[_0x1ac044(0x1bb)]()===''))throw new Error(_0x1ac044(0x1e5)+_0x37b61d+':\x20expected\x20a\x20non-empty\x20string.');}if(_0x1b0218['visible']!==undefined&&typeof _0x1b0218[_0x1ac044(0x1df)]!==_0x1ac044(0x1ce))throw new Error(_0x1ac044(0x1b6));if(_0x1b0218[_0x1ac044(0x1b7)]!==undefined&&(!Number['isInteger'](_0x1b0218[_0x1ac044(0x1b7)])||_0x1b0218[_0x1ac044(0x1b7)]<0x0))throw new Error(_0x1ac044(0x1ba));return{'jsUrl':typeof _0x1b0218['jsUrl']===_0x1ac044(0x1c8)?_0x1b0218['jsUrl'][_0x1ac044(0x1bb)]():undefined,'cssUrl':typeof _0x1b0218['cssUrl']===_0x1ac044(0x1c8)?_0x1b0218['cssUrl']['trim']():undefined,'appName':typeof _0x1b0218[_0x1ac044(0x1d3)]===_0x1ac044(0x1c8)?_0x1b0218[_0x1ac044(0x1d3)][_0x1ac044(0x1bb)]():undefined,'visible':typeof _0x1b0218[_0x1ac044(0x1df)]===_0x1ac044(0x1ce)?_0x1b0218[_0x1ac044(0x1df)]:undefined,'parentId':typeof _0x1b0218[_0x1ac044(0x1b7)]==='number'?_0x1b0218[_0x1ac044(0x1b7)]:undefined};}
1
+ const a184_0x2e0340=a184_0x5991;function a184_0x5e9f(){const _0x23960e=['\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','390209iuWHxS','info',':\x20expected\x20a\x20non-empty\x20string.','1472064ERSWEW','get','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','label','\x22\x20for\x20','--params.','314235GGYYJz','2ZXZmvD','push','jsUrl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Menu\x20sync\x20completed','pages','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','Parent\x20','dryRun','765400dilzfo','string','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','421253MfjLFZ','boolean','join','Invalid\x20--params.','\x0a\x20\x20Available\x20local\x20paths:\x20','JS\x20URL\x20is\x20unreachable:\x20','isArray','597306ajchqm','No\x20local\x20pages\x20matched\x20paths:\x20','folder','Start\x20non-interactive\x20menu\x20sync','filter','has','procode','setLogPath','map','Invalid\x20--params:\x20','path','Expected\x20one\x20folder\x20named\x20\x22','import','message','isInteger','cssUrl','keys','group',';\x20found\x20','Invalid\x20--params\x20fields:\x20','length','appName','parentId','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','trim','visible','Invalid\x20--params\x20JSON.','4379336WOnSBQ','order'];a184_0x5e9f=function(){return _0x23960e;};return a184_0x5e9f();}(function(_0x580c93,_0x47dbdf){const _0x499ddc=a184_0x5991,_0x4a7ac9=_0x580c93();while(!![]){try{const _0x20a683=-parseInt(_0x499ddc(0x122))/0x1*(-parseInt(_0x499ddc(0x12c))/0x2)+parseInt(_0x499ddc(0x12b))/0x3+parseInt(_0x499ddc(0x125))/0x4+-parseInt(_0x499ddc(0xfa))/0x5+parseInt(_0x499ddc(0x104))/0x6+-parseInt(_0x499ddc(0xfd))/0x7+-parseInt(_0x499ddc(0x11f))/0x8;if(_0x20a683===_0x47dbdf)break;else _0x4a7ac9['push'](_0x4a7ac9['shift']());}catch(_0x4bf8f1){_0x4a7ac9['push'](_0x4a7ac9['shift']());}}}(a184_0x5e9f,0x31475));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(['jsUrl',a184_0x2e0340(0x113),'appName','visible',a184_0x2e0340(0x11a)]);function a184_0x5991(_0x155ff7,_0x5944e0){_0x155ff7=_0x155ff7-0xfa;const _0x5e9fce=a184_0x5e9f();let _0x5991e8=_0x5e9fce[_0x155ff7];return _0x5991e8;}export function resolvePage(_0x2291f2,_0x3edfc,_0x10e570){const _0x3c1ef5=a184_0x2e0340;let _0x113fcb=_0x3edfc[_0x3c1ef5(0x11a)]??_0x2291f2['parentId'];if(_0x113fcb===undefined&&_0x2291f2[_0x3c1ef5(0x115)]){const _0x3af29f=_0x10e570[_0x3c1ef5(0x108)](_0xdbcc10=>_0xdbcc10['type']===_0x3c1ef5(0x106)&&_0xdbcc10[_0x3c1ef5(0x128)]===_0x2291f2[_0x3c1ef5(0x115)]);if(_0x3af29f['length']!==0x1)throw new Error(_0x3c1ef5(0x10f)+_0x2291f2['group']+_0x3c1ef5(0x129)+_0x2291f2[_0x3c1ef5(0x10e)]+_0x3c1ef5(0x116)+_0x3af29f[_0x3c1ef5(0x118)]);_0x113fcb=_0x3af29f[0x0]['id'];}if(_0x113fcb!==undefined&&_0x113fcb!==0x0&&_0x10e570[_0x3c1ef5(0x108)](_0x3c3465=>_0x3c3465['id']===_0x113fcb&&_0x3c3465['type']===_0x3c1ef5(0x106))[_0x3c1ef5(0x118)]!==0x1)throw new Error(_0x3c1ef5(0x133)+_0x113fcb+_0x3c1ef5(0x121));return{..._0x2291f2,..._0x113fcb===undefined?{}:{'parentId':_0x113fcb},..._0x3edfc[_0x3c1ef5(0x11d)]===undefined?{}:{'visible':_0x3edfc[_0x3c1ef5(0x11d)]}};}function validateParams(_0x12d86a){const _0x19ce4d=a184_0x2e0340,_0x43a4e9=[];return _0x12d86a[_0x19ce4d(0x12e)]&&!isValidJsHttpsUrl(_0x12d86a[_0x19ce4d(0x12e)])&&_0x43a4e9[_0x19ce4d(0x12d)]({'field':_0x19ce4d(0x12e),'message':_0x19ce4d(0x11b)}),_0x12d86a[_0x19ce4d(0x113)]&&!isValidCssHttpsUrl(_0x12d86a[_0x19ce4d(0x113)])&&_0x43a4e9[_0x19ce4d(0x12d)]({'field':_0x19ce4d(0x113),'message':_0x19ce4d(0x12f)}),_0x43a4e9;}export async function runMenuSyncCore(_0x1c6db9,_0x45656b,_0x5ce146=[],_0x35cc34,_0x4bf515={}){const _0x55097c=a184_0x2e0340,_0x112a00=parseMenuSyncParams(_0x35cc34),_0x56a2f6=[...new Set(_0x5ce146[_0x55097c(0x10c)](_0x2265f1=>_0x2265f1[_0x55097c(0x11c)]())[_0x55097c(0x108)](Boolean)[_0x55097c(0x10c)](menuPathKey))],_0x2f4726=_0x112a00[_0x55097c(0x12e)],_0x558d0e=_0x112a00['cssUrl'],_0x1fb754=[];if(_0x2f4726)_0x1fb754[_0x55097c(0x12d)](_0x2f4726);if(_0x558d0e)_0x1fb754[_0x55097c(0x12d)](_0x558d0e);const _0x1d1b09=validateParams(_0x112a00);if(_0x1d1b09[_0x55097c(0x118)]>0x0){const _0x537544=_0x1d1b09[_0x55097c(0x10c)](_0x56b115=>_0x55097c(0x12a)+_0x56b115['field']+':\x20'+_0x56b115[_0x55097c(0x111)])[_0x55097c(0xff)](';\x20');throw new Error(_0x55097c(0x10d)+_0x537544);}logger[_0x55097c(0x10b)](process['cwd']()),logger[_0x55097c(0x123)]('menu-sync',_0x55097c(0x107),{'appCode':_0x1c6db9,'selectedCount':_0x56a2f6[_0x55097c(0x118)],'jsUrl':_0x2f4726,'cssUrl':_0x558d0e});if(_0x2f4726){const _0x193d83=await isUrlReachable(_0x2f4726);if(!_0x193d83)throw new Error(_0x55097c(0x102)+_0x2f4726);}if(_0x558d0e){const _0x18ac27=await isUrlReachable(_0x558d0e);if(!_0x18ac27)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x558d0e);}const _0xf337ca=getLocalPages();if(_0xf337ca[_0x55097c(0x118)]===0x0){if(_0x56a2f6[_0x55097c(0x118)]>0x0)throw new Error(_0x55097c(0x105)+_0x56a2f6[_0x55097c(0xff)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x4bf515[_0x55097c(0x134)]===!![],'targetPages':[],'plannedMenus':[]};}const _0xf54f51=await getOnlineMenuList(_0x1c6db9,_0x45656b),_0x2a5fc4=new Set(_0xf54f51[_0x55097c(0x10c)](_0x18662b=>menuPathKey(_0x18662b[_0x55097c(0x10e)])));let _0x52e0c1;if(_0x56a2f6[_0x55097c(0x118)]>0x0){const _0x574887=new Map(_0xf337ca[_0x55097c(0x10c)](_0x5394fc=>[menuPathKey(_0x5394fc[_0x55097c(0x10e)]),_0x5394fc])),_0x4edd39=_0x56a2f6[_0x55097c(0x108)](_0x4dca47=>!_0x574887['has'](_0x4dca47));if(_0x4edd39[_0x55097c(0x118)]>0x0){const _0x57d57b=_0xf337ca['map'](_0x3d9c01=>_0x3d9c01['path'])[_0x55097c(0xff)](',\x20');throw new Error(_0x55097c(0x105)+_0x4edd39[_0x55097c(0xff)](',\x20')+_0x55097c(0x101)+_0x57d57b);}const _0x8bf74d=_0x56a2f6[_0x55097c(0x108)](_0x1de664=>_0x2a5fc4[_0x55097c(0x109)](_0x1de664));if(_0x8bf74d[_0x55097c(0x118)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x8bf74d[_0x55097c(0xff)](',\x20'));_0x52e0c1=_0x56a2f6[_0x55097c(0x10c)](_0x40c498=>_0x574887[_0x55097c(0x126)](_0x40c498));}else _0x52e0c1=_0xf337ca[_0x55097c(0x108)](_0x237b13=>!_0x2a5fc4[_0x55097c(0x109)](menuPathKey(_0x237b13[_0x55097c(0x10e)])));if(_0x52e0c1['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x4bf515[_0x55097c(0x134)]===!![],'targetPages':[],'plannedMenus':[]};_0x52e0c1=_0x52e0c1[_0x55097c(0x10c)](_0x3c129d=>resolvePage(_0x3c129d,_0x112a00,_0xf54f51));_0x112a00[_0x55097c(0x119)]&&_0x1fb754['length']===0x0&&await assertSharedResourcesConfigured(_0x1c6db9,_0x45656b,_0x112a00[_0x55097c(0x119)]);const _0x590d44=_0x52e0c1[_0x55097c(0x10c)](_0x113838=>({'type':_0x55097c(0x10a),'path':_0x113838[_0x55097c(0x10e)],'label':_0x113838[_0x55097c(0x128)],'loadScriptMode':_0x55097c(0x110),'resources':[..._0x1fb754],..._0x113838[_0x55097c(0x11d)]===undefined?{}:{'visible':_0x113838['visible']},..._0x113838[_0x55097c(0x11a)]===undefined?{}:{'parentId':_0x113838[_0x55097c(0x11a)]},..._0x113838[_0x55097c(0x120)]===undefined?{}:{'sort':_0x113838['order']},..._0x112a00[_0x55097c(0x119)]===undefined?{}:{'appName':_0x112a00[_0x55097c(0x119)]}}));if(_0x4bf515[_0x55097c(0x134)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x52e0c1,'plannedMenus':_0x590d44};const _0x402501=_0x112a00['appName']?await createMenus(_0x1c6db9,_0x45656b,_0x52e0c1,_0x1fb754[_0x55097c(0x118)]>0x0?_0x1fb754:undefined,{'appName':_0x112a00[_0x55097c(0x119)]}):await createMenus(_0x1c6db9,_0x45656b,_0x52e0c1,_0x1fb754[_0x55097c(0x118)]>0x0?_0x1fb754:undefined);return logger[_0x55097c(0x123)]('menu-sync',_0x55097c(0x130),{'count':_0x52e0c1['length'],'resources':_0x1fb754}),{'created':_0x402501[_0x55097c(0x118)],'skipped':![],'dryRun':![],'targetPages':_0x52e0c1,'plannedMenus':_0x590d44,'menus':_0x402501};}export function parseMenuSyncParams(_0x2bc024){const _0x12514e=a184_0x2e0340;if(!_0x2bc024||typeof _0x2bc024!==_0x12514e(0xfb))return{};let _0x595736;try{_0x595736=JSON['parse'](_0x2bc024);}catch{throw new Error(_0x12514e(0x11e));}if(typeof _0x595736!=='object'||_0x595736===null||Array[_0x12514e(0x103)](_0x595736))throw new Error(_0x12514e(0x127));const _0x666114=_0x595736;if(Object['hasOwn'](_0x666114,_0x12514e(0x131)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x135b83=Object[_0x12514e(0x114)](_0x666114)[_0x12514e(0x108)](_0xba79c8=>!MENU_SYNC_PARAM_KEYS[_0x12514e(0x109)](_0xba79c8));if(_0x135b83[_0x12514e(0x118)]>0x0)throw new Error(_0x12514e(0x117)+_0x135b83[_0x12514e(0xff)](',\x20')+'.');for(const _0x32dfb3 of[_0x12514e(0x12e),_0x12514e(0x113),_0x12514e(0x119)]){const _0x341ff7=_0x666114[_0x32dfb3];if(_0x341ff7!==undefined&&(typeof _0x341ff7!==_0x12514e(0xfb)||_0x341ff7[_0x12514e(0x11c)]()===''))throw new Error(_0x12514e(0x100)+_0x32dfb3+_0x12514e(0x124));}if(_0x666114['visible']!==undefined&&typeof _0x666114['visible']!==_0x12514e(0xfe))throw new Error(_0x12514e(0x132));if(_0x666114[_0x12514e(0x11a)]!==undefined&&(!Number[_0x12514e(0x112)](_0x666114[_0x12514e(0x11a)])||_0x666114[_0x12514e(0x11a)]<0x0))throw new Error(_0x12514e(0xfc));return{'jsUrl':typeof _0x666114[_0x12514e(0x12e)]===_0x12514e(0xfb)?_0x666114['jsUrl']['trim']():undefined,'cssUrl':typeof _0x666114[_0x12514e(0x113)]===_0x12514e(0xfb)?_0x666114[_0x12514e(0x113)][_0x12514e(0x11c)]():undefined,'appName':typeof _0x666114[_0x12514e(0x119)]===_0x12514e(0xfb)?_0x666114[_0x12514e(0x119)]['trim']():undefined,'visible':typeof _0x666114[_0x12514e(0x11d)]===_0x12514e(0xfe)?_0x666114['visible']:undefined,'parentId':typeof _0x666114['parentId']==='number'?_0x666114['parentId']:undefined};}
@@ -1 +1 @@
1
- (function(_0x32302f,_0x2a570f){const _0x4f638d=a186_0x21e5,_0x53660c=_0x32302f();while(!![]){try{const _0x32bb87=-parseInt(_0x4f638d(0x1a4))/0x1*(parseInt(_0x4f638d(0x1b3))/0x2)+-parseInt(_0x4f638d(0x1b9))/0x3*(parseInt(_0x4f638d(0x1e1))/0x4)+parseInt(_0x4f638d(0x1b2))/0x5*(-parseInt(_0x4f638d(0x1a5))/0x6)+-parseInt(_0x4f638d(0x1c5))/0x7+parseInt(_0x4f638d(0x1c7))/0x8+-parseInt(_0x4f638d(0x1d7))/0x9+parseInt(_0x4f638d(0x1c2))/0xa*(parseInt(_0x4f638d(0x1d4))/0xb);if(_0x32bb87===_0x2a570f)break;else _0x53660c['push'](_0x53660c['shift']());}catch(_0x1d8fc4){_0x53660c['push'](_0x53660c['shift']());}}}(a186_0x4475,0x5d404));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 a186_0x4475(){const _0x2ba635=['all','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','resources','object','toLowerCase',').\x20','some','info','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','force','length','dryRun','80DJuMdI','8HLXcNz','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','trim','rejected','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','menu\x20asset-update\x20cannot\x20patch\x20','172332xaNisC','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','extend','.css','\x22\x20(','fulfilled','CSS\x20URL\x20is\x20unreachable:\x20','map','.\x20Allowed\x20values:\x20replace,\x20patch','1681180UHbeMU','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','setLogPath','2609201EjOyUc','cssUrl','1116336WHjveu','menuIds','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','field','after','status','jsUrl','loadScriptMode','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','path','Menu\x20asset\x20update\x20completed','\x20existing\x20CSS\x20resources\x20for\x20\x22','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','88HMscXP','menu-asset-update','paths','2895651nAxvqy','label','endsWith','split','unshift','string','message','join','isArray','.js','4fihqir','parse','JS\x20URL\x20is\x20unreachable:\x20','patch','push','Invalid\x20--params:\x20','has','filter','Invalid\x20--mode:\x20','--params.','allSettled','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','28947hBqclO','88056EnbwPv'];a186_0x4475=function(){return _0x2ba635;};return a186_0x4475();}function validateParams(_0x36fb0d){const _0x158dc5=a186_0x21e5,_0x5740fe=[];return _0x36fb0d[_0x158dc5(0x1cd)]&&!isValidJsHttpsUrl(_0x36fb0d[_0x158dc5(0x1cd)])&&_0x5740fe[_0x158dc5(0x1e5)]({'field':_0x158dc5(0x1cd),'message':_0x158dc5(0x1ae)}),_0x36fb0d[_0x158dc5(0x1c6)]&&!isValidCssHttpsUrl(_0x36fb0d['cssUrl'])&&_0x5740fe[_0x158dc5(0x1e5)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x5740fe;}export async function runMenuUpdateCore(_0xfc3039,_0x43d29e,_0x3e12eb,_0x31ca9b={}){const _0x49df87=a186_0x21e5,_0x5eb037=parseUpdateParamsFlag(_0x3e12eb),_0x535677=normalizeMode(_0x31ca9b['mode']);validateSelection(_0x31ca9b['selection']);const _0x5a341b=[];if(_0x5eb037[_0x49df87(0x1cd)])_0x5a341b[_0x49df87(0x1e5)](_0x5eb037[_0x49df87(0x1cd)]);if(_0x5eb037['cssUrl'])_0x5a341b[_0x49df87(0x1e5)](_0x5eb037[_0x49df87(0x1c6)]);const _0xcb298c=validateParams(_0x5eb037);if(_0xcb298c[_0x49df87(0x1b0)]>0x0){const _0x1d961b=_0xcb298c[_0x49df87(0x1c0)](_0x95534b=>_0x49df87(0x1ea)+_0x95534b[_0x49df87(0x1ca)]+':\x20'+_0x95534b[_0x49df87(0x1dd)])[_0x49df87(0x1de)](';\x20');throw new Error(_0x49df87(0x1e6)+_0x1d961b);}if(_0x5a341b['length']===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x49df87(0x1c9));logger[_0x49df87(0x1c4)](process['cwd']()),logger[_0x49df87(0x1ad)](_0x49df87(0x1d5),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0xfc3039,'jsUrl':_0x5eb037['jsUrl'],'cssUrl':_0x5eb037[_0x49df87(0x1c6)],'mode':_0x535677,'dryRun':_0x31ca9b['dryRun']===!![]});if(_0x5eb037[_0x49df87(0x1cd)]){const _0x4826c3=await isUrlReachable(_0x5eb037[_0x49df87(0x1cd)]);if(!_0x4826c3)throw new Error(_0x49df87(0x1e3)+_0x5eb037['jsUrl']);}if(_0x5eb037[_0x49df87(0x1c6)]){const _0x56ac3c=await isUrlReachable(_0x5eb037[_0x49df87(0x1c6)]);if(!_0x56ac3c)throw new Error(_0x49df87(0x1bf)+_0x5eb037[_0x49df87(0x1c6)]);}const _0x366000=await getOnlineMenuList(_0xfc3039,_0x43d29e),_0x59cd68=_0x366000[_0x49df87(0x1e8)](_0x1cff40=>_0x1cff40[_0x49df87(0x1a8)][_0x49df87(0x1b0)]>0x0),_0x1d1d5a=selectMenusForUpdate(_0x59cd68,_0x31ca9b['selection']);if(_0x1d1d5a[_0x49df87(0x1b0)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x31ca9b[_0x49df87(0x1b1)]===!![]};const _0x40c4c8=_0x1d1d5a[_0x49df87(0x1c0)](_0x57bdcd=>buildMenuUpdateDiff(_0x57bdcd,_0x5eb037,_0x535677,_0x31ca9b[_0x49df87(0x1af)]===!![],_0x31ca9b[_0x49df87(0x1ce)]));if(_0x31ca9b[_0x49df87(0x1b1)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x40c4c8};const _0x1e5c52=await Promise[_0x49df87(0x1eb)](_0x1d1d5a[_0x49df87(0x1c0)]((_0x2537ae,_0x1ccb50)=>updateMenuCdnUrl(_0xfc3039,_0x43d29e,{'id':_0x2537ae['id'],'label':_0x2537ae[_0x49df87(0x1d8)],'path':_0x2537ae[_0x49df87(0x1d0)],'resources':_0x40c4c8[_0x1ccb50][_0x49df87(0x1cb)]['resources'],'extend':_0x2537ae[_0x49df87(0x1bb)]??null,'loadScriptMode':_0x31ca9b[_0x49df87(0x1ce)]}))),_0x151417=_0x1e5c52['filter'](_0x22f53e=>_0x22f53e[_0x49df87(0x1cc)]===_0x49df87(0x1be))[_0x49df87(0x1c0)](_0x5db50d=>_0x5db50d['value']),_0x522906=_0x1e5c52[_0x49df87(0x1e8)](_0x49d01d=>_0x49d01d[_0x49df87(0x1cc)]===_0x49df87(0x1b6))[_0x49df87(0x1b0)];return logger[_0x49df87(0x1ad)]('menu-asset-update',_0x49df87(0x1d1),{'count':_0x1d1d5a['length'],'resources':_0x5a341b}),{'updated':_0x151417['length'],'failed':_0x522906,'skipped':![],'menus':_0x151417};}function validateSelection(_0x383ec8){const _0x354363=a186_0x21e5;if(!_0x383ec8)throw new Error(_0x354363(0x1a7));if(_0x383ec8[_0x354363(0x1a6)]&&(_0x383ec8[_0x354363(0x1c8)]['length']>0x0||_0x383ec8['paths'][_0x354363(0x1b0)]>0x0))throw new Error(_0x354363(0x1b7));if(!_0x383ec8[_0x354363(0x1a6)]&&_0x383ec8['menuIds']['length']===0x0&&_0x383ec8['paths'][_0x354363(0x1b0)]===0x0)throw new Error(_0x354363(0x1a7));}export function selectMenusForUpdate(_0x37f05e,_0x4b568c){const _0x206fd4=a186_0x21e5;validateSelection(_0x4b568c);if(_0x4b568c[_0x206fd4(0x1a6)])return _0x37f05e;const _0x380319=new Set(_0x37f05e[_0x206fd4(0x1c0)](_0xb0e38a=>_0xb0e38a['id'])),_0x4e2bc8=new Set(_0x37f05e[_0x206fd4(0x1c0)](_0x42b4c2=>_0x42b4c2['path'])),_0x24e1fa=_0x4b568c[_0x206fd4(0x1c8)][_0x206fd4(0x1e8)](_0xefa729=>!_0x380319[_0x206fd4(0x1e7)](_0xefa729)),_0x26b937=_0x4b568c[_0x206fd4(0x1d6)]['filter'](_0x23b34e=>!_0x4e2bc8[_0x206fd4(0x1e7)](_0x23b34e));if(_0x24e1fa[_0x206fd4(0x1b0)]>0x0||_0x26b937[_0x206fd4(0x1b0)]>0x0){const _0x3a5484=[..._0x24e1fa[_0x206fd4(0x1c0)](_0x4c57da=>String(_0x4c57da)),..._0x26b937][_0x206fd4(0x1de)](',\x20');throw new Error(_0x206fd4(0x1c3)+_0x3a5484);}const _0x154cd6=new Set(_0x4b568c[_0x206fd4(0x1c8)]),_0x293442=new Set(_0x4b568c[_0x206fd4(0x1d6)]);return _0x37f05e['filter'](_0x40f55e=>_0x154cd6[_0x206fd4(0x1e7)](_0x40f55e['id'])||_0x293442[_0x206fd4(0x1e7)](_0x40f55e[_0x206fd4(0x1d0)]));}function normalizeMode(_0x331001){const _0x4ccc0e=a186_0x21e5;if(!_0x331001)return _0x4ccc0e(0x1e4);if(_0x331001==='replace'||_0x331001===_0x4ccc0e(0x1e4))return _0x331001;throw new Error(_0x4ccc0e(0x1e9)+_0x331001+_0x4ccc0e(0x1c1));}function buildMenuUpdateDiff(_0x491df0,_0x5d6782,_0x547d3a,_0x95a37f,_0x24fc75){const _0x2dbf67=a186_0x21e5,_0x37f7ff=[..._0x491df0[_0x2dbf67(0x1a8)]];_0x547d3a===_0x2dbf67(0x1e4)&&assertUnambiguousPatchResources(_0x491df0,_0x37f7ff,_0x5d6782);const _0x244cd3=_0x547d3a===_0x2dbf67(0x1e4)?patchResources(_0x37f7ff,_0x5d6782):replaceResources(_0x5d6782),_0x176eec=[],_0x3c6c79=_0x37f7ff[_0x2dbf67(0x1ac)](isJsResource),_0x418a33=_0x244cd3['some'](isJsResource);if(_0x3c6c79&&!_0x418a33){const _0x24b958=_0x2dbf67(0x1ec)+_0x491df0[_0x2dbf67(0x1d8)]+_0x2dbf67(0x1bd)+_0x491df0[_0x2dbf67(0x1d0)]+_0x2dbf67(0x1ab)+_0x2dbf67(0x1b4);if(!_0x95a37f)throw new Error(_0x24b958);_0x176eec[_0x2dbf67(0x1e5)](_0x24b958);}const _0x12ccec=_0x37f7ff[_0x2dbf67(0x1ac)](isCssResource),_0x290f9f=_0x244cd3[_0x2dbf67(0x1ac)](isCssResource);_0x12ccec&&!_0x290f9f&&_0x176eec['push'](_0x2dbf67(0x1cf)+_0x491df0[_0x2dbf67(0x1d8)]+_0x2dbf67(0x1bd)+_0x491df0[_0x2dbf67(0x1d0)]+').');const _0x44f5c2=typeof _0x491df0[_0x2dbf67(0x1bb)]?.[_0x2dbf67(0x1ce)]===_0x2dbf67(0x1dc)?_0x491df0['extend']['loadScriptMode']:null,_0x174288=_0x24fc75?{'loadScriptMode':_0x44f5c2}:{},_0x5d192c=_0x24fc75?{'loadScriptMode':_0x24fc75}:{};return{'id':_0x491df0['id'],'label':_0x491df0['label'],'path':_0x491df0[_0x2dbf67(0x1d0)],'mode':_0x547d3a,'before':{'resources':_0x37f7ff,..._0x174288},'after':{'resources':_0x244cd3,..._0x5d192c},'warnings':_0x176eec};}function replaceResources(_0x465669){const _0x55e29=a186_0x21e5;return[_0x465669[_0x55e29(0x1cd)],_0x465669[_0x55e29(0x1c6)]]['filter'](_0x4d4698=>!!_0x4d4698);}function assertUnambiguousPatchResources(_0x386619,_0x406bbf,_0x3a7967){const _0x31cfb9=a186_0x21e5,_0x5cbd15=_0x406bbf['filter'](isJsResource)[_0x31cfb9(0x1b0)];if(_0x3a7967['jsUrl']&&_0x5cbd15>0x1)throw new Error(_0x31cfb9(0x1b8)+_0x5cbd15+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x386619['label']+_0x31cfb9(0x1bd)+_0x386619[_0x31cfb9(0x1d0)]+')\x20'+_0x31cfb9(0x1ba));const _0xc1a54e=_0x406bbf[_0x31cfb9(0x1e8)](isCssResource)['length'];if(_0x3a7967[_0x31cfb9(0x1c6)]&&_0xc1a54e>0x1)throw new Error(_0x31cfb9(0x1b8)+_0xc1a54e+_0x31cfb9(0x1d2)+_0x386619[_0x31cfb9(0x1d8)]+_0x31cfb9(0x1bd)+_0x386619['path']+')\x20'+_0x31cfb9(0x1d3));}function patchResources(_0x334037,_0x1e6ef2){const _0x443b88=a186_0x21e5;let _0x1fe90e=![],_0x1469c6=![];const _0xa75ef7=[];for(const _0x589465 of _0x334037){if(isJsResource(_0x589465)){if(_0x1e6ef2[_0x443b88(0x1cd)]&&!_0x1fe90e)_0xa75ef7[_0x443b88(0x1e5)](_0x1e6ef2[_0x443b88(0x1cd)]),_0x1fe90e=!![];else!_0x1e6ef2[_0x443b88(0x1cd)]&&_0xa75ef7[_0x443b88(0x1e5)](_0x589465);continue;}if(isCssResource(_0x589465)){if(_0x1e6ef2['cssUrl']&&!_0x1469c6)_0xa75ef7['push'](_0x1e6ef2[_0x443b88(0x1c6)]),_0x1469c6=!![];else!_0x1e6ef2['cssUrl']&&_0xa75ef7[_0x443b88(0x1e5)](_0x589465);continue;}_0xa75ef7[_0x443b88(0x1e5)](_0x589465);}return _0x1e6ef2[_0x443b88(0x1cd)]&&!_0x1fe90e&&_0xa75ef7[_0x443b88(0x1db)](_0x1e6ef2[_0x443b88(0x1cd)]),_0x1e6ef2[_0x443b88(0x1c6)]&&!_0x1469c6&&_0xa75ef7[_0x443b88(0x1e5)](_0x1e6ef2['cssUrl']),_0xa75ef7;}function isJsResource(_0xaadd28){const _0xce7451=a186_0x21e5;return stripQuery(_0xaadd28)[_0xce7451(0x1aa)]()[_0xce7451(0x1d9)](_0xce7451(0x1e0));}function a186_0x21e5(_0x402a43,_0x38aa5d){_0x402a43=_0x402a43-0x1a4;const _0x447572=a186_0x4475();let _0x21e5ed=_0x447572[_0x402a43];return _0x21e5ed;}function isCssResource(_0x5c16cb){const _0x5c1824=a186_0x21e5;return stripQuery(_0x5c16cb)['toLowerCase']()[_0x5c1824(0x1d9)](_0x5c1824(0x1bc));}function stripQuery(_0xfce4e3){const _0x2d0a4d=a186_0x21e5;return _0xfce4e3[_0x2d0a4d(0x1da)]('?')[0x0]??_0xfce4e3;}function parseUpdateParamsFlag(_0x247a95){const _0x275f80=a186_0x21e5;if(!_0x247a95||typeof _0x247a95!=='string')return{};try{const _0x117035=JSON[_0x275f80(0x1e2)](_0x247a95);if(typeof _0x117035!==_0x275f80(0x1a9)||_0x117035===null||Array[_0x275f80(0x1df)](_0x117035))return{};return{'jsUrl':typeof _0x117035[_0x275f80(0x1cd)]===_0x275f80(0x1dc)?_0x117035[_0x275f80(0x1cd)][_0x275f80(0x1b5)]():undefined,'cssUrl':typeof _0x117035[_0x275f80(0x1c6)]===_0x275f80(0x1dc)?_0x117035['cssUrl'][_0x275f80(0x1b5)]():undefined};}catch{return{};}}
1
+ (function(_0x1ab9af,_0x3b9f1b){const _0x22cff7=a186_0x587d,_0x44dab4=_0x1ab9af();while(!![]){try{const _0x4befb5=parseInt(_0x22cff7(0x124))/0x1+parseInt(_0x22cff7(0x119))/0x2+-parseInt(_0x22cff7(0x101))/0x3+parseInt(_0x22cff7(0x13a))/0x4*(parseInt(_0x22cff7(0x11b))/0x5)+-parseInt(_0x22cff7(0x118))/0x6*(-parseInt(_0x22cff7(0x11d))/0x7)+-parseInt(_0x22cff7(0x10d))/0x8*(-parseInt(_0x22cff7(0x10f))/0x9)+-parseInt(_0x22cff7(0x12b))/0xa*(parseInt(_0x22cff7(0x130))/0xb);if(_0x4befb5===_0x3b9f1b)break;else _0x44dab4['push'](_0x44dab4['shift']());}catch(_0x512e79){_0x44dab4['push'](_0x44dab4['shift']());}}}(a186_0x3cc3,0xa9ee5));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a186_0x587d(_0x2b0773,_0x1ee50b){_0x2b0773=_0x2b0773-0x100;const _0x3cc3fa=a186_0x3cc3();let _0x587da7=_0x3cc3fa[_0x2b0773];return _0x587da7;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x357e40){const _0x6f03e1=a186_0x587d,_0xc5e3bd=[];return _0x357e40[_0x6f03e1(0x143)]&&!isValidJsHttpsUrl(_0x357e40[_0x6f03e1(0x143)])&&_0xc5e3bd['push']({'field':_0x6f03e1(0x143),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x357e40[_0x6f03e1(0x146)]&&!isValidCssHttpsUrl(_0x357e40['cssUrl'])&&_0xc5e3bd['push']({'field':'cssUrl','message':_0x6f03e1(0x126)}),_0xc5e3bd;}export async function runMenuUpdateCore(_0x553bee,_0x2ce326,_0x56b467,_0x471cbd={}){const _0x4cf071=a186_0x587d,_0x2f7d45=parseUpdateParamsFlag(_0x56b467),_0x40841b=normalizeMode(_0x471cbd[_0x4cf071(0x128)]);validateSelection(_0x471cbd[_0x4cf071(0x109)]);const _0x4e8886=[];if(_0x2f7d45[_0x4cf071(0x143)])_0x4e8886['push'](_0x2f7d45[_0x4cf071(0x143)]);if(_0x2f7d45[_0x4cf071(0x146)])_0x4e8886[_0x4cf071(0x132)](_0x2f7d45[_0x4cf071(0x146)]);const _0xe8f9b1=validateParams(_0x2f7d45);if(_0xe8f9b1[_0x4cf071(0x127)]>0x0){const _0x5d7485=_0xe8f9b1['map'](_0x452f66=>_0x4cf071(0x123)+_0x452f66[_0x4cf071(0x138)]+':\x20'+_0x452f66[_0x4cf071(0x134)])[_0x4cf071(0x120)](';\x20');throw new Error(_0x4cf071(0x147)+_0x5d7485);}if(_0x4e8886[_0x4cf071(0x127)]===0x0)throw new Error(_0x4cf071(0x12e)+_0x4cf071(0x14c));logger[_0x4cf071(0x149)](process[_0x4cf071(0x14a)]()),logger[_0x4cf071(0x13c)](_0x4cf071(0x110),_0x4cf071(0x14b),{'appCode':_0x553bee,'jsUrl':_0x2f7d45['jsUrl'],'cssUrl':_0x2f7d45[_0x4cf071(0x146)],'mode':_0x40841b,'dryRun':_0x471cbd['dryRun']===!![]});if(_0x2f7d45[_0x4cf071(0x143)]){const _0x12cc29=await isUrlReachable(_0x2f7d45[_0x4cf071(0x143)]);if(!_0x12cc29)throw new Error(_0x4cf071(0x100)+_0x2f7d45[_0x4cf071(0x143)]);}if(_0x2f7d45[_0x4cf071(0x146)]){const _0x52c8d4=await isUrlReachable(_0x2f7d45['cssUrl']);if(!_0x52c8d4)throw new Error(_0x4cf071(0x136)+_0x2f7d45[_0x4cf071(0x146)]);}const _0x15ab7b=await getOnlineMenuList(_0x553bee,_0x2ce326),_0x2f825c=_0x15ab7b['filter'](_0x5c81d6=>_0x5c81d6['resources'][_0x4cf071(0x127)]>0x0),_0x1bc672=selectMenusForUpdate(_0x2f825c,_0x471cbd['selection']);if(_0x1bc672[_0x4cf071(0x127)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x471cbd[_0x4cf071(0x10e)]===!![]};const _0x30b6e3=_0x1bc672[_0x4cf071(0x145)](_0x585e97=>buildMenuUpdateDiff(_0x585e97,_0x2f7d45,_0x40841b,_0x471cbd[_0x4cf071(0x13b)]===!![],_0x471cbd[_0x4cf071(0x148)]));if(_0x471cbd[_0x4cf071(0x10e)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x30b6e3};const _0x801fd6=await Promise[_0x4cf071(0x105)](_0x1bc672[_0x4cf071(0x145)]((_0x32645f,_0x2ecf47)=>updateMenuCdnUrl(_0x553bee,_0x2ce326,{'id':_0x32645f['id'],'label':_0x32645f[_0x4cf071(0x114)],'path':_0x32645f[_0x4cf071(0x11e)],'resources':_0x30b6e3[_0x2ecf47][_0x4cf071(0x12a)][_0x4cf071(0x103)],'extend':_0x32645f[_0x4cf071(0x10b)]??null,'loadScriptMode':_0x471cbd[_0x4cf071(0x148)]}))),_0x2d61f9=_0x801fd6['filter'](_0x263023=>_0x263023[_0x4cf071(0x115)]===_0x4cf071(0x131))['map'](_0x2dd8cd=>_0x2dd8cd[_0x4cf071(0x11c)]),_0x37ca97=_0x801fd6[_0x4cf071(0x137)](_0x2d4e41=>_0x2d4e41[_0x4cf071(0x115)]===_0x4cf071(0x13f))[_0x4cf071(0x127)];return logger[_0x4cf071(0x13c)](_0x4cf071(0x110),_0x4cf071(0x11f),{'count':_0x1bc672[_0x4cf071(0x127)],'resources':_0x4e8886}),{'updated':_0x2d61f9['length'],'failed':_0x37ca97,'skipped':![],'menus':_0x2d61f9};}function validateSelection(_0x41c715){const _0x3b1826=a186_0x587d;if(!_0x41c715)throw new Error(_0x3b1826(0x14d));if(_0x41c715[_0x3b1826(0x11a)]&&(_0x41c715[_0x3b1826(0x117)][_0x3b1826(0x127)]>0x0||_0x41c715['paths']['length']>0x0))throw new Error(_0x3b1826(0x102));if(!_0x41c715[_0x3b1826(0x11a)]&&_0x41c715[_0x3b1826(0x117)][_0x3b1826(0x127)]===0x0&&_0x41c715[_0x3b1826(0x141)][_0x3b1826(0x127)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0xaf744c,_0x178587){const _0x347dd4=a186_0x587d;validateSelection(_0x178587);if(_0x178587['all'])return _0xaf744c;const _0x183032=new Set(_0xaf744c[_0x347dd4(0x145)](_0x37fc6f=>_0x37fc6f['id'])),_0x36645f=new Set(_0xaf744c[_0x347dd4(0x145)](_0x34da18=>_0x34da18['path'])),_0x15c2b8=_0x178587[_0x347dd4(0x117)][_0x347dd4(0x137)](_0x151581=>!_0x183032[_0x347dd4(0x12f)](_0x151581)),_0x39aa9a=_0x178587[_0x347dd4(0x141)][_0x347dd4(0x137)](_0x251f3c=>!_0x36645f['has'](_0x251f3c));if(_0x15c2b8[_0x347dd4(0x127)]>0x0||_0x39aa9a[_0x347dd4(0x127)]>0x0){const _0xd78ce3=[..._0x15c2b8[_0x347dd4(0x145)](_0x4562b6=>String(_0x4562b6)),..._0x39aa9a][_0x347dd4(0x120)](',\x20');throw new Error(_0x347dd4(0x142)+_0xd78ce3);}const _0x227a46=new Set(_0x178587[_0x347dd4(0x117)]),_0x24082c=new Set(_0x178587[_0x347dd4(0x141)]);return _0xaf744c[_0x347dd4(0x137)](_0x50c0d4=>_0x227a46[_0x347dd4(0x12f)](_0x50c0d4['id'])||_0x24082c[_0x347dd4(0x12f)](_0x50c0d4[_0x347dd4(0x11e)]));}function normalizeMode(_0x24439d){const _0x2d10b7=a186_0x587d;if(!_0x24439d)return _0x2d10b7(0x10a);if(_0x24439d==='replace'||_0x24439d===_0x2d10b7(0x10a))return _0x24439d;throw new Error(_0x2d10b7(0x135)+_0x24439d+_0x2d10b7(0x12d));}function buildMenuUpdateDiff(_0x299af8,_0x4690fa,_0x275d49,_0x251a85,_0x51512a){const _0x5c3d57=a186_0x587d,_0x1f07fa=[..._0x299af8[_0x5c3d57(0x103)]];_0x275d49===_0x5c3d57(0x10a)&&assertUnambiguousPatchResources(_0x299af8,_0x1f07fa,_0x4690fa);const _0x20eaa5=_0x275d49===_0x5c3d57(0x10a)?patchResources(_0x1f07fa,_0x4690fa):replaceResources(_0x4690fa),_0x113f86=[],_0x3e3553=_0x1f07fa['some'](isJsResource),_0x40f40f=_0x20eaa5['some'](isJsResource);if(_0x3e3553&&!_0x40f40f){const _0x1d6142=_0x5c3d57(0x106)+_0x299af8[_0x5c3d57(0x114)]+_0x5c3d57(0x112)+_0x299af8['path']+_0x5c3d57(0x133)+_0x5c3d57(0x121);if(!_0x251a85)throw new Error(_0x1d6142);_0x113f86[_0x5c3d57(0x132)](_0x1d6142);}const _0x582533=_0x1f07fa[_0x5c3d57(0x113)](isCssResource),_0x33603f=_0x20eaa5[_0x5c3d57(0x113)](isCssResource);_0x582533&&!_0x33603f&&_0x113f86[_0x5c3d57(0x132)](_0x5c3d57(0x107)+_0x299af8[_0x5c3d57(0x114)]+'\x22\x20('+_0x299af8[_0x5c3d57(0x11e)]+').');const _0x52c0c5=typeof _0x299af8['extend']?.[_0x5c3d57(0x148)]==='string'?_0x299af8[_0x5c3d57(0x10b)]['loadScriptMode']:null,_0x5b9d4f=_0x51512a?{'loadScriptMode':_0x52c0c5}:{},_0x46d194=_0x51512a?{'loadScriptMode':_0x51512a}:{};return{'id':_0x299af8['id'],'label':_0x299af8[_0x5c3d57(0x114)],'path':_0x299af8[_0x5c3d57(0x11e)],'mode':_0x275d49,'before':{'resources':_0x1f07fa,..._0x5b9d4f},'after':{'resources':_0x20eaa5,..._0x46d194},'warnings':_0x113f86};}function replaceResources(_0x520fba){const _0x45345f=a186_0x587d;return[_0x520fba['jsUrl'],_0x520fba[_0x45345f(0x146)]][_0x45345f(0x137)](_0x2df204=>!!_0x2df204);}function assertUnambiguousPatchResources(_0x55d473,_0x1b444d,_0x5227b7){const _0x58c293=a186_0x587d,_0x25ec50=_0x1b444d['filter'](isJsResource)[_0x58c293(0x127)];if(_0x5227b7[_0x58c293(0x143)]&&_0x25ec50>0x1)throw new Error(_0x58c293(0x122)+_0x25ec50+_0x58c293(0x125)+_0x55d473[_0x58c293(0x114)]+_0x58c293(0x112)+_0x55d473['path']+')\x20'+_0x58c293(0x13e));const _0x31a0de=_0x1b444d['filter'](isCssResource)[_0x58c293(0x127)];if(_0x5227b7['cssUrl']&&_0x31a0de>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x31a0de+_0x58c293(0x10c)+_0x55d473[_0x58c293(0x114)]+_0x58c293(0x112)+_0x55d473['path']+')\x20'+_0x58c293(0x108));}function patchResources(_0xd7ac01,_0x312e0c){const _0xae60fb=a186_0x587d;let _0x2055ac=![],_0x2309b2=![];const _0x3614a2=[];for(const _0x4bfa9a of _0xd7ac01){if(isJsResource(_0x4bfa9a)){if(_0x312e0c[_0xae60fb(0x143)]&&!_0x2055ac)_0x3614a2[_0xae60fb(0x132)](_0x312e0c['jsUrl']),_0x2055ac=!![];else!_0x312e0c[_0xae60fb(0x143)]&&_0x3614a2[_0xae60fb(0x132)](_0x4bfa9a);continue;}if(isCssResource(_0x4bfa9a)){if(_0x312e0c[_0xae60fb(0x146)]&&!_0x2309b2)_0x3614a2['push'](_0x312e0c['cssUrl']),_0x2309b2=!![];else!_0x312e0c['cssUrl']&&_0x3614a2[_0xae60fb(0x132)](_0x4bfa9a);continue;}_0x3614a2[_0xae60fb(0x132)](_0x4bfa9a);}return _0x312e0c[_0xae60fb(0x143)]&&!_0x2055ac&&_0x3614a2[_0xae60fb(0x13d)](_0x312e0c[_0xae60fb(0x143)]),_0x312e0c[_0xae60fb(0x146)]&&!_0x2309b2&&_0x3614a2[_0xae60fb(0x132)](_0x312e0c['cssUrl']),_0x3614a2;}function isJsResource(_0x2c29f3){const _0x51bf07=a186_0x587d;return stripQuery(_0x2c29f3)[_0x51bf07(0x129)]()[_0x51bf07(0x116)](_0x51bf07(0x144));}function a186_0x3cc3(){const _0x5499e6=['Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','menu\x20asset-update\x20cannot\x20patch\x20','--params.','454142wejspY','\x20existing\x20JS\x20resources\x20for\x20\x22','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','length','mode','toLowerCase','after','10DsjZCD','string','.\x20Allowed\x20values:\x20replace,\x20patch','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','has','14336223FMFclM','fulfilled','push',').\x20','message','Invalid\x20--mode:\x20','CSS\x20URL\x20is\x20unreachable:\x20','filter','field','trim','35572wFYpIQ','force','info','unshift','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','rejected','split','paths','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','jsUrl','.js','map','cssUrl','Invalid\x20--params:\x20','loadScriptMode','setLogPath','cwd','Start\x20non-interactive\x20menu\x20asset\x20update','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','JS\x20URL\x20is\x20unreachable:\x20','2433684YLQAgW','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','resources','object','allSettled','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','selection','patch','extend','\x20existing\x20CSS\x20resources\x20for\x20\x22','224Eqokpw','dryRun','133668VwocFT','menu-asset-update','.css','\x22\x20(','some','label','status','endsWith','menuIds','19362ujMBrO','308758ZRMQaP','all','440ZHWFZC','value','2177zMxRfd','path','Menu\x20asset\x20update\x20completed','join'];a186_0x3cc3=function(){return _0x5499e6;};return a186_0x3cc3();}function isCssResource(_0x8bbdd1){const _0x3f1983=a186_0x587d;return stripQuery(_0x8bbdd1)[_0x3f1983(0x129)]()[_0x3f1983(0x116)](_0x3f1983(0x111));}function stripQuery(_0x2f378d){const _0x511e84=a186_0x587d;return _0x2f378d[_0x511e84(0x140)]('?')[0x0]??_0x2f378d;}function parseUpdateParamsFlag(_0x4477a0){const _0x18ca4e=a186_0x587d;if(!_0x4477a0||typeof _0x4477a0!==_0x18ca4e(0x12c))return{};try{const _0x298b7d=JSON['parse'](_0x4477a0);if(typeof _0x298b7d!==_0x18ca4e(0x104)||_0x298b7d===null||Array['isArray'](_0x298b7d))return{};return{'jsUrl':typeof _0x298b7d[_0x18ca4e(0x143)]===_0x18ca4e(0x12c)?_0x298b7d[_0x18ca4e(0x143)][_0x18ca4e(0x139)]():undefined,'cssUrl':typeof _0x298b7d['cssUrl']===_0x18ca4e(0x12c)?_0x298b7d[_0x18ca4e(0x146)][_0x18ca4e(0x139)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x480563,_0x26d363){const _0x41feb6=a187_0x37fb,_0x259622=_0x480563();while(!![]){try{const _0x3e64c5=-parseInt(_0x41feb6(0x1cb))/0x1*(-parseInt(_0x41feb6(0x1c5))/0x2)+parseInt(_0x41feb6(0x1ca))/0x3*(parseInt(_0x41feb6(0x1c7))/0x4)+parseInt(_0x41feb6(0x1d2))/0x5+parseInt(_0x41feb6(0x1cf))/0x6*(parseInt(_0x41feb6(0x1ce))/0x7)+parseInt(_0x41feb6(0x1d3))/0x8+-parseInt(_0x41feb6(0x1c9))/0x9+-parseInt(_0x41feb6(0x1d1))/0xa*(parseInt(_0x41feb6(0x1cc))/0xb);if(_0x3e64c5===_0x26d363)break;else _0x259622['push'](_0x259622['shift']());}catch(_0xa341d4){_0x259622['push'](_0x259622['shift']());}}}(a187_0x246e,0x4a311));export function isValidJsHttpsUrl(_0x4a6c1a){const _0x2b6fd2=a187_0x37fb;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x4a6c1a[_0x2b6fd2(0x1c6)]());}function a187_0x246e(){const _0x17d2e3=['400qJEvEZ','trim','152dvmavL','HEAD','5324346YAMYPI','8529cnVtkK','1042bgwOsI','11xCtFdo','body','7WjJUpJ','3172446YlSaYv','bytes=0-0','2033820quBJZr','839190QnlQqT','686816jWZAwH','test'];a187_0x246e=function(){return _0x17d2e3;};return a187_0x246e();}export function isValidCssHttpsUrl(_0x4fc51e){const _0x3af5d0=a187_0x37fb;return/^https:\/\/.+\.css(\?.*)?$/[_0x3af5d0(0x1c4)](_0x4fc51e['trim']());}function a187_0x37fb(_0x150bf6,_0x32863e){_0x150bf6=_0x150bf6-0x1c4;const _0x246e95=a187_0x246e();let _0x37fb1c=_0x246e95[_0x150bf6];return _0x37fb1c;}export async function isUrlReachable(_0x22bce5){const _0x2a198d=a187_0x37fb;try{const _0xa28e9b=await fetch(_0x22bce5,{'method':_0x2a198d(0x1c8)});if(_0xa28e9b['ok'])return!![];}catch{}try{const _0x1e2e44=await fetch(_0x22bce5,{'method':'GET','headers':{'Range':_0x2a198d(0x1d0)}}),_0x5a4bf5=_0x1e2e44['ok'];try{await _0x1e2e44[_0x2a198d(0x1cd)]?.['cancel']();}catch{}return _0x5a4bf5;}catch{return![];}}
1
+ function a187_0x1a74(){const _0x56d73d=['trim','6UMYFdU','3818682ApHzAj','GET','8tVDNeU','bytes=0-0','1246348Hxgesg','cancel','test','3029845fMlHDJ','16383069bJjLya','3594832hIvkUk','358373aaxhJs','432357yXJCMf'];a187_0x1a74=function(){return _0x56d73d;};return a187_0x1a74();}(function(_0x6f5ab,_0x3ae708){const _0x4f46c8=a187_0x1bd6,_0x428b91=_0x6f5ab();while(!![]){try{const _0x3179ce=parseInt(_0x4f46c8(0x6b))/0x1+-parseInt(_0x4f46c8(0x73))/0x2+-parseInt(_0x4f46c8(0x6c))/0x3+-parseInt(_0x4f46c8(0x6a))/0x4+parseInt(_0x4f46c8(0x76))/0x5*(-parseInt(_0x4f46c8(0x6e))/0x6)+parseInt(_0x4f46c8(0x6f))/0x7+-parseInt(_0x4f46c8(0x71))/0x8*(-parseInt(_0x4f46c8(0x77))/0x9);if(_0x3179ce===_0x3ae708)break;else _0x428b91['push'](_0x428b91['shift']());}catch(_0x4a4f7d){_0x428b91['push'](_0x428b91['shift']());}}}(a187_0x1a74,0x6e6ae));function a187_0x1bd6(_0x3d0197,_0x555061){_0x3d0197=_0x3d0197-0x6a;const _0x1a74ce=a187_0x1a74();let _0x1bd6c0=_0x1a74ce[_0x3d0197];return _0x1bd6c0;}export function isValidJsHttpsUrl(_0xe7d473){const _0x50ccb5=a187_0x1bd6;return/^https:\/\/.+\.js(\?.*)?$/[_0x50ccb5(0x75)](_0xe7d473[_0x50ccb5(0x6d)]());}export function isValidCssHttpsUrl(_0x4a2421){const _0x1e7dff=a187_0x1bd6;return/^https:\/\/.+\.css(\?.*)?$/[_0x1e7dff(0x75)](_0x4a2421['trim']());}export async function isUrlReachable(_0x280323){const _0x2b4d6b=a187_0x1bd6;try{const _0x29410d=await fetch(_0x280323,{'method':'HEAD'});if(_0x29410d['ok'])return!![];}catch{}try{const _0x3ede46=await fetch(_0x280323,{'method':_0x2b4d6b(0x70),'headers':{'Range':_0x2b4d6b(0x72)}}),_0x4535ce=_0x3ede46['ok'];try{await _0x3ede46['body']?.[_0x2b4d6b(0x74)]();}catch{}return _0x4535ce;}catch{return![];}}
@@ -1 +1 @@
1
- const a188_0x1e3e4a=a188_0x2378;function a188_0x64fe(){const _0x2f9dbf=['\x20menu(s)\x20for\x20','all','cookie','3075292BBAUVM','\x20in\x20menu\x20host\x20','Inspected\x20','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','3rFKFkc','138RHOzkc','283260JsclLq','242669pqzJKE','menu','70kIFqud','4076664DCbotk','127676EUjBDK','2789586sBbbji','481282ihUGXc','80YrEcwo'];a188_0x64fe=function(){return _0x2f9dbf;};return a188_0x64fe();}(function(_0x1e86c5,_0x51a99c){const _0x1b20af=a188_0x2378,_0x33f897=_0x1e86c5();while(!![]){try{const _0xeba50f=-parseInt(_0x1b20af(0x15d))/0x1+parseInt(_0x1b20af(0x156))/0x2*(parseInt(_0x1b20af(0x154))/0x3)+parseInt(_0x1b20af(0x15b))/0x4*(-parseInt(_0x1b20af(0x159))/0x5)+parseInt(_0x1b20af(0x155))/0x6*(-parseInt(_0x1b20af(0x157))/0x7)+-parseInt(_0x1b20af(0x15a))/0x8+parseInt(_0x1b20af(0x15c))/0x9+parseInt(_0x1b20af(0x14c))/0xa*(parseInt(_0x1b20af(0x150))/0xb);if(_0xeba50f===_0x51a99c)break;else _0x33f897['push'](_0x33f897['shift']());}catch(_0x5c94b8){_0x33f897['push'](_0x33f897['shift']());}}}(a188_0x64fe,0x6e9e0));import{getSmartAppRecord}from'../../core/api-client.js';import{getOnlineMenuList}from'../../commands/menu/shared/service.js';import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';function a188_0x2378(_0x1dd1e5,_0x375f00){_0x1dd1e5=_0x1dd1e5-0x14c;const _0x64fe45=a188_0x64fe();let _0x237898=_0x64fe45[_0x1dd1e5];return _0x237898;}export const menuSubappAssetsStatus={'service':a188_0x1e3e4a(0x158),'command':'subapp-assets-status','description':a188_0x1e3e4a(0x153),'risk':'read','strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x95b5f1){getSubappSelector(_0x95b5f1);},async 'execute'(_0x45c98b){const _0x562122=a188_0x1e3e4a,{appCode:_0x4a002b,appName:_0x1e49b7}=getSubappSelector(_0x45c98b),[_0x56a460,_0x10a444]=await Promise[_0x562122(0x14e)]([getSmartAppRecord(_0x4a002b,_0x45c98b[_0x562122(0x14f)]),getOnlineMenuList(_0x4a002b,_0x45c98b[_0x562122(0x14f)])]),_0x11de13={'appCode':_0x4a002b,...buildSubappAssetsStatus(_0x56a460,_0x10a444,_0x1e49b7)};return{'ok':!![],'data':_0x11de13,'message':_0x562122(0x152)+_0x11de13['boundMenus']+_0x562122(0x14d)+_0x1e49b7+_0x562122(0x151)+_0x4a002b+'.'};}};
1
+ function a188_0x4a2c(_0x117c6b,_0x12b626){_0x117c6b=_0x117c6b-0x7b;const _0x227add=a188_0x227a();let _0x4a2c93=_0x227add[_0x117c6b];return _0x4a2c93;}const a188_0x47a082=a188_0x4a2c;(function(_0x1daeef,_0x2a813d){const _0x2a5c22=a188_0x4a2c,_0x48e359=_0x1daeef();while(!![]){try{const _0x3adfec=parseInt(_0x2a5c22(0x81))/0x1*(parseInt(_0x2a5c22(0x89))/0x2)+parseInt(_0x2a5c22(0x7b))/0x3+parseInt(_0x2a5c22(0x87))/0x4+-parseInt(_0x2a5c22(0x85))/0x5+-parseInt(_0x2a5c22(0x7c))/0x6*(parseInt(_0x2a5c22(0x7f))/0x7)+parseInt(_0x2a5c22(0x88))/0x8+-parseInt(_0x2a5c22(0x7e))/0x9;if(_0x3adfec===_0x2a813d)break;else _0x48e359['push'](_0x48e359['shift']());}catch(_0x58536b){_0x48e359['push'](_0x48e359['shift']());}}}(a188_0x227a,0x28efd));import{getSmartAppRecord}from'../../core/api-client.js';function a188_0x227a(){const _0x5aa573=['234xoFckB','Inspected\x20','1901583OMzRKT','24269dRKKpw','boundMenus','16610cWtEXf','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','\x20menu(s)\x20for\x20','menu','943410ThpnLw','cookie','780396KrXomL','2399560oOHLjv','18WXkqzd','174975UAhFib'];a188_0x227a=function(){return _0x5aa573;};return a188_0x227a();}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':a188_0x47a082(0x84),'command':'subapp-assets-status','description':a188_0x47a082(0x82),'risk':'read','strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x1af213){getSubappSelector(_0x1af213);},async 'execute'(_0x3ff8da){const _0x100650=a188_0x47a082,{appCode:_0x2f6dd7,appName:_0x54ff51}=getSubappSelector(_0x3ff8da),[_0x394100,_0x3b39e9]=await Promise['all']([getSmartAppRecord(_0x2f6dd7,_0x3ff8da[_0x100650(0x86)]),getOnlineMenuList(_0x2f6dd7,_0x3ff8da[_0x100650(0x86)])]),_0x30c657={'appCode':_0x2f6dd7,...buildSubappAssetsStatus(_0x394100,_0x3b39e9,_0x54ff51)};return{'ok':!![],'data':_0x30c657,'message':_0x100650(0x7d)+_0x30c657[_0x100650(0x80)]+_0x100650(0x83)+_0x54ff51+'\x20in\x20menu\x20host\x20'+_0x2f6dd7+'.'};}};
@@ -1 +1 @@
1
- const a189_0x5c143e=a189_0x107f;(function(_0x156091,_0x304683){const _0x2bb03e=a189_0x107f,_0xa2f6f6=_0x156091();while(!![]){try{const _0xa9e90f=parseInt(_0x2bb03e(0x10c))/0x1+parseInt(_0x2bb03e(0xce))/0x2+parseInt(_0x2bb03e(0xc3))/0x3+parseInt(_0x2bb03e(0xf4))/0x4+-parseInt(_0x2bb03e(0xdf))/0x5*(parseInt(_0x2bb03e(0xe8))/0x6)+-parseInt(_0x2bb03e(0xe4))/0x7*(parseInt(_0x2bb03e(0x100))/0x8)+-parseInt(_0x2bb03e(0xc1))/0x9;if(_0xa9e90f===_0x304683)break;else _0xa2f6f6['push'](_0xa2f6f6['shift']());}catch(_0x339221){_0xa2f6f6['push'](_0xa2f6f6['shift']());}}}(a189_0x4b02,0x70119));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';function a189_0x107f(_0x5deed0,_0x2e62bd){_0x5deed0=_0x5deed0-0xbd;const _0x4b02c1=a189_0x4b02();let _0x107ffd=_0x4b02c1[_0x5deed0];return _0x107ffd;}import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a189_0x4b02(){const _0x365a20=['app.extend.assets','enableAutoSync','assets','string','isSafeInteger','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','490PVtDjd','--resources\x20is\x20required.','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','length','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','6594yEixXg','enableSample','entries','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','20970cyRChP','\x20must\x20be\x20a\x20JSON\x20array.','/smartapi/app/update','expectedHash','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','\x20contains\x20invalid\x20JSON.','\x20in\x20menu\x20host\x20',';\x20found\x20',';\x20independent\x20deployment\x20not\x20verified.','apiError','parse','stringify','198848bvhYXs','directDbId','.\x20Refusing\x20update.','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','trim','test','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','appName','str','update','expected-hash','size','6376BneOBy','POST','write','isArray','resources[','Unknown\x20app.extend\x20fields:\x20','Would\x20update\x20shared\x20assets\x20for\x20','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','Updated\x20shared\x20resources\x20for\x20','697658ytymzs','object','nextExtend','filter','appPublishStatus','unchanged','1226736liBwcs','sha256','2197401wDjROY','join',']\x20must\x20be\x20a\x20URL\x20string.','not\x20HTTPS','has','cookie','extend','some','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','\x20must\x20be\x20a\x20JSON\x20object.','enableOpenApi','417568QMJIlG','appCode','resources','subapp-assets-update','before','vipDeploy','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','validation','menu','https:','map'];a189_0x4b02=function(){return _0x365a20;};return a189_0x4b02();}import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set(['skinColor',a189_0x5c143e(0xcd),'accessKey',a189_0x5c143e(0xdb),'tenantColumn',a189_0x5c143e(0xe5),a189_0x5c143e(0xd3),a189_0x5c143e(0xda),a189_0x5c143e(0xf5),'directDbEnabled']);function parseObject(_0x1ff76f,_0x1a9d38){const _0x5476cc=a189_0x5c143e;let _0x47a87f=_0x1ff76f;if(typeof _0x1ff76f===_0x5476cc(0xdc))try{_0x47a87f=JSON[_0x5476cc(0xf2)](_0x1ff76f);}catch{throw CliErrors['validation'](_0x1a9d38+_0x5476cc(0xed));}if(!_0x47a87f||typeof _0x47a87f!==_0x5476cc(0x10d)||Array[_0x5476cc(0x103)](_0x47a87f))throw CliErrors[_0x5476cc(0xd5)](_0x1a9d38+_0x5476cc(0xcc));return _0x47a87f;}function parseArray(_0x553938,_0x20620c){const _0x4bee16=a189_0x5c143e;let _0xe2748;try{_0xe2748=JSON[_0x4bee16(0xf2)](_0x553938);}catch{throw CliErrors['validation'](_0x20620c+_0x4bee16(0xed));}if(!Array[_0x4bee16(0x103)](_0xe2748))throw CliErrors['validation'](_0x20620c+_0x4bee16(0xe9));return _0xe2748['map']((_0x57f06b,_0x3077de)=>parseObject(_0x57f06b,_0x20620c+'['+_0x3077de+']'));}function validateResources(_0x43c09b){const _0x5a31d7=a189_0x5c143e;if(_0x43c09b[_0x5a31d7(0xe2)]===0x0)throw CliErrors[_0x5a31d7(0xd5)](_0x5a31d7(0xf7));for(const [_0x7d3a1,_0x55f450]of _0x43c09b[_0x5a31d7(0xe6)]()){if(typeof _0x55f450!==_0x5a31d7(0xdc))throw CliErrors[_0x5a31d7(0xd5)](_0x5a31d7(0x104)+_0x7d3a1+_0x5a31d7(0xc5));try{if(new URL(_0x55f450)['protocol']!==_0x5a31d7(0xd7))throw new Error(_0x5a31d7(0xc6));}catch{throw CliErrors[_0x5a31d7(0xd5)](_0x5a31d7(0x104)+_0x7d3a1+_0x5a31d7(0x10a));}}if(new Set(_0x43c09b)[_0x5a31d7(0xff)]!==_0x43c09b['length']||!_0x43c09b['some'](_0x449e60=>/\.m?js(?:[?#]|$)/i[_0x5a31d7(0xf9)](_0x449e60)))throw CliErrors['validation'](_0x5a31d7(0xec));return _0x43c09b;}function prepare(_0x38f8dd,_0x1e1efc,_0x3fe0ad){const _0x41f86f=a189_0x5c143e;if(!Number[_0x41f86f(0xdd)](_0x38f8dd['id'])||(_0x38f8dd['id']??0x0)<=0x0||typeof _0x38f8dd[_0x41f86f(0xbf)]!==_0x41f86f(0xdc)||!_0x38f8dd[_0x41f86f(0xbf)])throw CliErrors['validation'](_0x41f86f(0xfa));const _0x9ff0f5=parseObject(_0x38f8dd[_0x41f86f(0xc9)],'app.extend'),_0x872af8=Object['keys'](_0x9ff0f5)[_0x41f86f(0xbe)](_0x2e71b7=>!KNOWN_EXTEND_KEYS[_0x41f86f(0xc7)](_0x2e71b7));if(_0x872af8[_0x41f86f(0xe2)])throw CliErrors[_0x41f86f(0xd5)](_0x41f86f(0x105)+_0x872af8[_0x41f86f(0xc4)](',\x20')+_0x41f86f(0xf6));if(typeof _0x9ff0f5['assets']!=='string')throw CliErrors[_0x41f86f(0xd5)](_0x41f86f(0x107));const _0x1d39a8=parseArray(_0x9ff0f5[_0x41f86f(0xdb)],_0x41f86f(0xd9)),_0x102a6b=_0x1d39a8[_0x41f86f(0xbe)](_0x49e41b=>_0x49e41b[_0x41f86f(0xfb)]===_0x1e1efc);if(_0x102a6b[_0x41f86f(0xe2)]!==0x1)throw CliErrors['validation'](_0x41f86f(0x109)+_0x1e1efc+_0x41f86f(0xef)+_0x102a6b['length']+'.');const _0x86eda7=_0x102a6b[0x0];if(typeof _0x86eda7[_0x41f86f(0xd0)]!==_0x41f86f(0xdc))throw CliErrors[_0x41f86f(0xd5)](_0x41f86f(0x108));let _0x276233;try{_0x276233=JSON[_0x41f86f(0xf2)](_0x86eda7[_0x41f86f(0xd0)]);}catch{throw CliErrors['validation'](_0x41f86f(0xd4));}if(!Array['isArray'](_0x276233)||_0x276233[_0x41f86f(0xca)](_0x4f1915=>typeof _0x4f1915!=='string'))throw CliErrors[_0x41f86f(0xd5)](_0x41f86f(0xcb));const _0x3cb4cd=_0x1d39a8[_0x41f86f(0xd8)](_0x1942a6=>_0x1942a6===_0x86eda7?{..._0x1942a6,'resources':JSON[_0x41f86f(0xf3)](_0x3fe0ad)}:_0x1942a6),_0x2a65df={..._0x9ff0f5,'assets':JSON[_0x41f86f(0xf3)](_0x3cb4cd)},_0x3afb0b=createHash(_0x41f86f(0xc2))[_0x41f86f(0xfd)](JSON[_0x41f86f(0xf3)]({'appCode':_0x38f8dd[_0x41f86f(0xcf)],'id':_0x38f8dd['id'],'appPublishStatus':_0x38f8dd[_0x41f86f(0xbf)],'extend':_0x9ff0f5,'appName':_0x1e1efc,'resources':_0x3fe0ad}))['digest']('hex');return{'before':_0x276233,'nextExtend':_0x2a65df,'expectedHash':_0x3afb0b,'unchanged':isDeepStrictEqual(_0x276233,_0x3fe0ad)};}function flags(_0x5e57ee){const _0x562618=a189_0x5c143e,{appCode:_0x1aa203,appName:_0x519bf6}=getSubappSelector(_0x5e57ee),_0x49893b=_0x5e57ee[_0x562618(0xfc)](_0x562618(0xd0))[_0x562618(0xf8)]();if(!_0x49893b)throw CliErrors[_0x562618(0xd5)](_0x562618(0xe0));let _0xc53497;try{_0xc53497=JSON[_0x562618(0xf2)](_0x49893b);}catch{throw CliErrors['validation'](_0x562618(0xe3));}if(!Array[_0x562618(0x103)](_0xc53497))throw CliErrors['validation'](_0x562618(0xe3));return{'appCode':_0x1aa203,'appName':_0x519bf6,'resources':validateResources(_0xc53497)};}export const menuSubappAssetsUpdate={'service':a189_0x5c143e(0xd6),'command':a189_0x5c143e(0xd1),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a189_0x5c143e(0x102),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':'resources','type':'string','required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':a189_0x5c143e(0xfe),'type':'string','description':'Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes'}],async 'validate'(_0x3f6286){flags(_0x3f6286);},async 'dryRun'(_0x394b59){const _0x488667=a189_0x5c143e,{appCode:_0x441268,appName:_0x33dee8,resources:_0x884014}=flags(_0x394b59),_0x2a5fbc=await getSmartAppRecord(_0x441268,_0x394b59['cookie']),_0x183e42=prepare(_0x2a5fbc,_0x33dee8,_0x884014);return{'method':_0x488667(0x101),'url':_0x488667(0xea),'body':{'preview':{'appCode':_0x441268,'appName':_0x33dee8,'before':_0x183e42[_0x488667(0xd2)],'after':_0x884014,'expectedHash':_0x183e42[_0x488667(0xeb)],'unchanged':_0x183e42[_0x488667(0xc0)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x183e42[_0x488667(0xc0)]?'Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.':_0x488667(0x106)+_0x33dee8+'.'};},async 'execute'(_0x50a53d){const _0x527e41=a189_0x5c143e,{appCode:_0x7220ed,appName:_0x8a17c1,resources:_0x5234ef}=flags(_0x50a53d),_0x18f5ad=_0x50a53d[_0x527e41(0xfc)](_0x527e41(0xfe))[_0x527e41(0xf8)]();if(!/^[a-f0-9]{64}$/i[_0x527e41(0xf9)](_0x18f5ad))throw CliErrors['validation'](_0x527e41(0xde));const _0x508b54=await getSmartAppRecord(_0x7220ed,_0x50a53d[_0x527e41(0xc8)]),_0x57ffd8=prepare(_0x508b54,_0x8a17c1,_0x5234ef);if(_0x18f5ad!==_0x57ffd8['expectedHash'])throw CliErrors[_0x527e41(0xd5)]('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0x57ffd8[_0x527e41(0xc0)])return{'ok':!![],'data':{'appCode':_0x7220ed,'appName':_0x8a17c1,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x527e41(0xe1)};await updateSmartAppRecord({'id':_0x508b54['id'],'appCode':_0x7220ed,'appPublishStatus':_0x508b54['appPublishStatus'],'extend':_0x57ffd8[_0x527e41(0xbd)]},_0x50a53d[_0x527e41(0xc8)]);const _0x509a94=await getSmartAppRecord(_0x7220ed,_0x50a53d[_0x527e41(0xc8)]),_0x53f264=parseObject(_0x509a94[_0x527e41(0xc9)],'verified\x20app.extend');if(_0x509a94['id']!==_0x508b54['id']||_0x509a94[_0x527e41(0xbf)]!==_0x508b54[_0x527e41(0xbf)]||!isDeepStrictEqual(_0x53f264,_0x57ffd8[_0x527e41(0xbd)]))throw CliErrors[_0x527e41(0xf1)](_0x527e41(0xe7));return{'ok':!![],'data':{'appCode':_0x7220ed,'appName':_0x8a17c1,'updated':!![],'resources':_0x5234ef,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x527e41(0x10b)+_0x8a17c1+_0x527e41(0xee)+_0x7220ed+_0x527e41(0xf0)};}};
1
+ const a189_0x5d9452=a189_0x237d;(function(_0x27dd60,_0x52a51a){const _0x695b9=a189_0x237d,_0x2e478f=_0x27dd60();while(!![]){try{const _0x1bc54b=-parseInt(_0x695b9(0x71))/0x1+parseInt(_0x695b9(0x7d))/0x2+-parseInt(_0x695b9(0xb4))/0x3+-parseInt(_0x695b9(0x92))/0x4+parseInt(_0x695b9(0xb0))/0x5*(parseInt(_0x695b9(0x98))/0x6)+-parseInt(_0x695b9(0xa6))/0x7*(parseInt(_0x695b9(0xa5))/0x8)+parseInt(_0x695b9(0xaf))/0x9;if(_0x1bc54b===_0x52a51a)break;else _0x2e478f['push'](_0x2e478f['shift']());}catch(_0x286ccc){_0x2e478f['push'](_0x2e478f['shift']());}}}(a189_0x15f2,0xe9d0d));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';function a189_0x237d(_0x36471b,_0x49822c){_0x36471b=_0x36471b-0x70;const _0x15f297=a189_0x15f2();let _0x237db0=_0x15f297[_0x36471b];return _0x237db0;}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([a189_0x5d9452(0xab),a189_0x5d9452(0xaa),'accessKey',a189_0x5d9452(0x8c),a189_0x5d9452(0xb3),'enableSample',a189_0x5d9452(0xa7),a189_0x5d9452(0x7f),'directDbId','directDbEnabled']);function parseObject(_0x3febf0,_0x8ac8bd){const _0x414cf3=a189_0x5d9452;let _0x894538=_0x3febf0;if(typeof _0x3febf0===_0x414cf3(0x93))try{_0x894538=JSON[_0x414cf3(0x7c)](_0x3febf0);}catch{throw CliErrors[_0x414cf3(0x8a)](_0x8ac8bd+'\x20contains\x20invalid\x20JSON.');}if(!_0x894538||typeof _0x894538!=='object'||Array[_0x414cf3(0xa9)](_0x894538))throw CliErrors[_0x414cf3(0x8a)](_0x8ac8bd+_0x414cf3(0x79));return _0x894538;}function parseArray(_0x9c8fc5,_0x428603){const _0x273918=a189_0x5d9452;let _0x1c5a81;try{_0x1c5a81=JSON['parse'](_0x9c8fc5);}catch{throw CliErrors['validation'](_0x428603+_0x273918(0x74));}if(!Array[_0x273918(0xa9)](_0x1c5a81))throw CliErrors[_0x273918(0x8a)](_0x428603+'\x20must\x20be\x20a\x20JSON\x20array.');return _0x1c5a81[_0x273918(0x87)]((_0x5eb4ca,_0x26343f)=>parseObject(_0x5eb4ca,_0x428603+'['+_0x26343f+']'));}function validateResources(_0x2b6e95){const _0x267d9f=a189_0x5d9452;if(_0x2b6e95[_0x267d9f(0xb8)]===0x0)throw CliErrors['validation']('At\x20least\x20one\x20resource\x20URL\x20is\x20required.');for(const [_0x30c47d,_0x92b5d0]of _0x2b6e95[_0x267d9f(0xa1)]()){if(typeof _0x92b5d0!=='string')throw CliErrors[_0x267d9f(0x8a)](_0x267d9f(0xa8)+_0x30c47d+_0x267d9f(0x7b));try{if(new URL(_0x92b5d0)[_0x267d9f(0xbd)]!=='https:')throw new Error(_0x267d9f(0xc0));}catch{throw CliErrors[_0x267d9f(0x8a)](_0x267d9f(0xa8)+_0x30c47d+_0x267d9f(0xb9));}}if(new Set(_0x2b6e95)[_0x267d9f(0x70)]!==_0x2b6e95[_0x267d9f(0xb8)]||!_0x2b6e95[_0x267d9f(0x9b)](_0xca7cdb=>/\.m?js(?:[?#]|$)/i[_0x267d9f(0xc2)](_0xca7cdb)))throw CliErrors['validation'](_0x267d9f(0x86));return _0x2b6e95;}function prepare(_0x4d5465,_0x4eb738,_0x13339c){const _0x33b1b5=a189_0x5d9452;if(!Number[_0x33b1b5(0x73)](_0x4d5465['id'])||(_0x4d5465['id']??0x0)<=0x0||typeof _0x4d5465[_0x33b1b5(0x91)]!==_0x33b1b5(0x93)||!_0x4d5465[_0x33b1b5(0x91)])throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xad));const _0x153b5b=parseObject(_0x4d5465[_0x33b1b5(0x96)],_0x33b1b5(0x90)),_0x2d1ff6=Object[_0x33b1b5(0x9c)](_0x153b5b)[_0x33b1b5(0x72)](_0x1acf5e=>!KNOWN_EXTEND_KEYS[_0x33b1b5(0x84)](_0x1acf5e));if(_0x2d1ff6[_0x33b1b5(0xb8)])throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0x9d)+_0x2d1ff6[_0x33b1b5(0x8b)](',\x20')+_0x33b1b5(0x83));if(typeof _0x153b5b[_0x33b1b5(0x8c)]!==_0x33b1b5(0x93))throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xb2));const _0x280241=parseArray(_0x153b5b[_0x33b1b5(0x8c)],_0x33b1b5(0xbc)),_0x5bec1a=_0x280241[_0x33b1b5(0x72)](_0x4995ab=>_0x4995ab[_0x33b1b5(0x80)]===_0x4eb738);if(_0x5bec1a[_0x33b1b5(0xb8)]!==0x1)throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xc1)+_0x4eb738+_0x33b1b5(0xac)+_0x5bec1a[_0x33b1b5(0xb8)]+'.');const _0x4ba31a=_0x5bec1a[0x0];if(typeof _0x4ba31a[_0x33b1b5(0xb5)]!==_0x33b1b5(0x93))throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0xae));let _0x415a2d;try{_0x415a2d=JSON[_0x33b1b5(0x7c)](_0x4ba31a[_0x33b1b5(0xb5)]);}catch{throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0x77));}if(!Array['isArray'](_0x415a2d)||_0x415a2d['some'](_0x4bbc5b=>typeof _0x4bbc5b!==_0x33b1b5(0x93)))throw CliErrors[_0x33b1b5(0x8a)](_0x33b1b5(0x8f));const _0x24b13f=_0x280241['map'](_0x512cfc=>_0x512cfc===_0x4ba31a?{..._0x512cfc,'resources':JSON[_0x33b1b5(0xa2)](_0x13339c)}:_0x512cfc),_0x4b8500={..._0x153b5b,'assets':JSON[_0x33b1b5(0xa2)](_0x24b13f)},_0x261f88=createHash(_0x33b1b5(0x94))[_0x33b1b5(0x7a)](JSON[_0x33b1b5(0xa2)]({'appCode':_0x4d5465[_0x33b1b5(0xbb)],'id':_0x4d5465['id'],'appPublishStatus':_0x4d5465['appPublishStatus'],'extend':_0x153b5b,'appName':_0x4eb738,'resources':_0x13339c}))[_0x33b1b5(0x81)](_0x33b1b5(0x99));return{'before':_0x415a2d,'nextExtend':_0x4b8500,'expectedHash':_0x261f88,'unchanged':isDeepStrictEqual(_0x415a2d,_0x13339c)};}function flags(_0x1c2ad0){const _0x4997ad=a189_0x5d9452,{appCode:_0x5199c9,appName:_0x3cc79e}=getSubappSelector(_0x1c2ad0),_0x525c49=_0x1c2ad0[_0x4997ad(0x7e)](_0x4997ad(0xb5))['trim']();if(!_0x525c49)throw CliErrors[_0x4997ad(0x8a)](_0x4997ad(0x78));let _0x94fbee;try{_0x94fbee=JSON[_0x4997ad(0x7c)](_0x525c49);}catch{throw CliErrors[_0x4997ad(0x8a)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x4997ad(0xa9)](_0x94fbee))throw CliErrors['validation'](_0x4997ad(0xa4));return{'appCode':_0x5199c9,'appName':_0x3cc79e,'resources':validateResources(_0x94fbee)};}export const menuSubappAssetsUpdate={'service':'menu','command':a189_0x5d9452(0xa3),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a189_0x5d9452(0xbe),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x5d9452(0xb5),'type':'string','required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':'expected-hash','type':a189_0x5d9452(0x93),'description':a189_0x5d9452(0xba)}],async 'validate'(_0x3e3e18){flags(_0x3e3e18);},async 'dryRun'(_0x4fb3c4){const _0x480f7a=a189_0x5d9452,{appCode:_0x2c397e,appName:_0x51107d,resources:_0x789c0d}=flags(_0x4fb3c4),_0x6f95af=await getSmartAppRecord(_0x2c397e,_0x4fb3c4[_0x480f7a(0x76)]),_0x3891b4=prepare(_0x6f95af,_0x51107d,_0x789c0d);return{'method':_0x480f7a(0xb7),'url':_0x480f7a(0xbf),'body':{'preview':{'appCode':_0x2c397e,'appName':_0x51107d,'before':_0x3891b4[_0x480f7a(0x8d)],'after':_0x789c0d,'expectedHash':_0x3891b4[_0x480f7a(0x9a)],'unchanged':_0x3891b4[_0x480f7a(0x88)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x3891b4[_0x480f7a(0x88)]?_0x480f7a(0x9e):_0x480f7a(0xa0)+_0x51107d+'.'};},async 'execute'(_0x2ea8cf){const _0x365bd5=a189_0x5d9452,{appCode:_0x40e591,appName:_0x114849,resources:_0x5e5704}=flags(_0x2ea8cf),_0x57a12d=_0x2ea8cf[_0x365bd5(0x7e)](_0x365bd5(0x82))['trim']();if(!/^[a-f0-9]{64}$/i[_0x365bd5(0xc2)](_0x57a12d))throw CliErrors[_0x365bd5(0x8a)](_0x365bd5(0x75));const _0x44dd66=await getSmartAppRecord(_0x40e591,_0x2ea8cf['cookie']),_0x4e528b=prepare(_0x44dd66,_0x114849,_0x5e5704);if(_0x57a12d!==_0x4e528b[_0x365bd5(0x9a)])throw CliErrors['validation'](_0x365bd5(0xb6));if(_0x4e528b[_0x365bd5(0x88)])return{'ok':!![],'data':{'appCode':_0x40e591,'appName':_0x114849,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x365bd5(0x97)};await updateSmartAppRecord({'id':_0x44dd66['id'],'appCode':_0x40e591,'appPublishStatus':_0x44dd66[_0x365bd5(0x91)],'extend':_0x4e528b['nextExtend']},_0x2ea8cf[_0x365bd5(0x76)]);const _0x54e47c=await getSmartAppRecord(_0x40e591,_0x2ea8cf[_0x365bd5(0x76)]),_0x645258=parseObject(_0x54e47c[_0x365bd5(0x96)],_0x365bd5(0xb1));if(_0x54e47c['id']!==_0x44dd66['id']||_0x54e47c[_0x365bd5(0x91)]!==_0x44dd66[_0x365bd5(0x91)]||!isDeepStrictEqual(_0x645258,_0x4e528b[_0x365bd5(0x95)]))throw CliErrors[_0x365bd5(0x8e)]('App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.');return{'ok':!![],'data':{'appCode':_0x40e591,'appName':_0x114849,'updated':!![],'resources':_0x5e5704,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x365bd5(0x9f)+_0x114849+_0x365bd5(0x89)+_0x40e591+_0x365bd5(0x85)};}};function a189_0x15f2(){const _0x21157f=['test','size','1153913apinot','filter','isSafeInteger','\x20contains\x20invalid\x20JSON.','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','cookie','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','--resources\x20is\x20required.','\x20must\x20be\x20a\x20JSON\x20object.','update',']\x20must\x20be\x20a\x20URL\x20string.','parse','2901276byNcTp','str','enableAutoSync','appName','digest','expected-hash','.\x20Refusing\x20update.','has',';\x20independent\x20deployment\x20not\x20verified.','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','map','unchanged','\x20in\x20menu\x20host\x20','validation','join','assets','before','apiError','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','app.extend','appPublishStatus','3326020ARYvff','string','sha256','nextExtend','extend','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','11301486YtJhkk','hex','expectedHash','some','keys','Unknown\x20app.extend\x20fields:\x20','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','Updated\x20shared\x20resources\x20for\x20','Would\x20update\x20shared\x20assets\x20for\x20','entries','stringify','subapp-assets-update','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','2488jsfHRd','23555nrttFL','vipDeploy','resources[','isArray','enableOpenApi','skinColor',';\x20found\x20','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','19201095vBEjuY','5MgPHcu','verified\x20app.extend','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','tenantColumn','4434096ptQLXT','resources','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','POST','length',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','appCode','app.extend.assets','protocol','write','/smartapi/app/update','not\x20HTTPS','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20'];a189_0x15f2=function(){return _0x21157f;};return a189_0x15f2();}