@lovrabet/rabetbase-cli 2.5.11 → 2.5.12-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 (379) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.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/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.d.ts +1 -0
  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/instant-api-policy/endpoints.js +1 -1
  302. package/lib/core/kb-management-client.js +1 -1
  303. package/lib/core/kb-search-client.js +1 -1
  304. package/lib/core/page/file-system.js +1 -1
  305. package/lib/core/page/hash.js +1 -1
  306. package/lib/core/page/lock.js +1 -1
  307. package/lib/core/page/lr-smart-jsx.js +1 -1
  308. package/lib/core/sql-index-auditor.js +1 -1
  309. package/lib/core/sql-sync/config.js +1 -1
  310. package/lib/core/sql-sync/file-system.js +1 -1
  311. package/lib/core/sql-sync/hash.js +1 -1
  312. package/lib/core/sql-sync/lock.js +1 -1
  313. package/lib/core/sql-sync/utils.js +1 -1
  314. package/lib/core/sql-validator.js +1 -1
  315. package/lib/errors.js +1 -1
  316. package/lib/framework/build-all-flags.js +1 -1
  317. package/lib/framework/error-output.js +1 -1
  318. package/lib/framework/explicit-yes.js +1 -1
  319. package/lib/framework/flags.js +1 -1
  320. package/lib/framework/help.js +1 -1
  321. package/lib/framework/index.js +1 -1
  322. package/lib/framework/output.js +1 -1
  323. package/lib/framework/response.js +1 -1
  324. package/lib/framework/runner-alias.js +1 -1
  325. package/lib/framework/runner.js +1 -1
  326. package/lib/framework/schema-export.js +1 -1
  327. package/lib/framework/supported-flags.js +1 -1
  328. package/lib/framework/types.js +1 -1
  329. package/lib/generated/build-info.d.ts +4 -4
  330. package/lib/generated/build-info.js +1 -1
  331. package/lib/generated/official-routing.d.ts +2 -1
  332. package/lib/generated/official-routing.js +1 -1
  333. package/lib/generated/routing-contract.js +1 -1
  334. package/lib/help.js +1 -1
  335. package/lib/postinstall.js +1 -1
  336. package/lib/runtime/confirmation.js +1 -1
  337. package/lib/runtime/event.js +1 -1
  338. package/lib/runtime/index.js +1 -1
  339. package/lib/runtime/queue.js +1 -1
  340. package/lib/runtime/resolve.js +1 -1
  341. package/lib/services/dataset-design/checkpoint.js +1 -1
  342. package/lib/services/dataset-design/commands.js +1 -1
  343. package/lib/services/dataset-design/contract.js +1 -1
  344. package/lib/skills/builtin-skill.js +1 -1
  345. package/lib/skills/main.js +1 -1
  346. package/lib/skills/npx-skills-add.js +1 -1
  347. package/lib/skills/skill-presence.js +1 -1
  348. package/lib/telemetry/cli-command-trace.js +1 -1
  349. package/lib/telemetry/cli-help-trace.js +1 -1
  350. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  351. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  352. package/lib/telemetry/send-cli-trace-log.js +1 -1
  353. package/lib/utils/ai_config.js +1 -1
  354. package/lib/utils/apply-jq-filter.js +1 -1
  355. package/lib/utils/cdn-config.js +1 -1
  356. package/lib/utils/check-sdk-version.js +1 -1
  357. package/lib/utils/cli-version-check.js +1 -1
  358. package/lib/utils/cli-version-policy.js +1 -1
  359. package/lib/utils/config.js +1 -1
  360. package/lib/utils/entity-with-id.js +1 -1
  361. package/lib/utils/file-utils.js +1 -1
  362. package/lib/utils/guides-cdn.js +1 -1
  363. package/lib/utils/http-client.js +1 -1
  364. package/lib/utils/is-non-interactive.js +1 -1
  365. package/lib/utils/logger.js +1 -1
  366. package/lib/utils/params.js +1 -1
  367. package/lib/utils/platform.js +1 -1
  368. package/lib/utils/sleep.js +1 -1
  369. package/lib/utils/template-replacer.js +1 -1
  370. package/lib/utils/update-notice.js +1 -1
  371. package/lib/utils/version.js +1 -1
  372. package/lib/utils/with-active-cookie.js +1 -1
  373. package/lib/utils/write-cli-side-channel.js +1 -1
  374. package/package.json +1 -1
  375. package/skills/rabetbase/SKILL.md +1 -1
  376. package/skills/rabetbase/references/rabetbase-kb.md +1 -1
  377. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  378. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  379. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a183_0x2c5dcd=a183_0x2d4c;(function(_0x3cb3aa,_0xe4a1eb){const _0x38a654=a183_0x2d4c,_0x3ff0d8=_0x3cb3aa();while(!![]){try{const _0x4d4a54=-parseInt(_0x38a654(0x98))/0x1+-parseInt(_0x38a654(0x8e))/0x2*(parseInt(_0x38a654(0x94))/0x3)+parseInt(_0x38a654(0x7b))/0x4*(-parseInt(_0x38a654(0x84))/0x5)+parseInt(_0x38a654(0x73))/0x6+-parseInt(_0x38a654(0x9a))/0x7*(-parseInt(_0x38a654(0x7e))/0x8)+parseInt(_0x38a654(0x81))/0x9*(parseInt(_0x38a654(0x99))/0xa)+parseInt(_0x38a654(0x83))/0xb;if(_0x4d4a54===_0xe4a1eb)break;else _0x3ff0d8['push'](_0x3ff0d8['shift']());}catch(_0x3bb48e){_0x3ff0d8['push'](_0x3ff0d8['shift']());}}}(a183_0x382a,0x48b17));function a183_0x2d4c(_0x2e52ea,_0xfa3cd2){_0x2e52ea=_0x2e52ea-0x72;const _0x382a8f=a183_0x382a();let _0x2d4cbb=_0x382a8f[_0x2e52ea];return _0x2d4cbb;}import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function a183_0x382a(){const _0x207918=['assets','length','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','No\x20shared\x20resources\x20configured\x20for\x20','message','some','app','956vwBUDw','string','resources','1997272Pkydfh','map','isArray','289161odlJeF','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','1091409atchLn','605JsCIeP','sharedResources','appCode','object','path','filter','appName','fallbackDiffers','app.extend.assets\x20must\x20be\x20an\x20array.','extend','2VMIoaY','str','app-name','\x20contains\x20invalid\x20JSON.','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','\x20must\x20be\x20an\x20array\x20of\x20URLs.','1159455zxRHeo','\x20resources','stringify','validation','361601HvUXYD','10iuoNyK','14uhwFVA','loadScriptMode','\x20must\x20be\x20a\x20JSON\x20object.','parse','menu','2664540FtoiAa'];a183_0x382a=function(){return _0x207918;};return a183_0x382a();}function objectValue(_0x28fb66,_0x47c8a5){const _0x8b5eb=a183_0x2d4c,_0x582b61=typeof _0x28fb66===_0x8b5eb(0x7c)?parseJson(_0x28fb66,_0x47c8a5):_0x28fb66;if(!_0x582b61||typeof _0x582b61!==_0x8b5eb(0x87)||Array[_0x8b5eb(0x80)](_0x582b61))throw CliErrors[_0x8b5eb(0x97)](_0x47c8a5+_0x8b5eb(0x9c));return _0x582b61;}function parseJson(_0x10f98a,_0x4cffc0){const _0x2fe1ea=a183_0x2d4c;try{return JSON[_0x2fe1ea(0x9d)](_0x10f98a);}catch{throw CliErrors[_0x2fe1ea(0x97)](_0x4cffc0+_0x2fe1ea(0x91));}}function resourceList(_0x4273e2,_0xf8bc9c){const _0x73ab97=a183_0x2d4c;if(typeof _0x4273e2!==_0x73ab97(0x7c))throw CliErrors[_0x73ab97(0x97)](_0xf8bc9c+_0x73ab97(0x82));const _0x363712=parseJson(_0x4273e2,_0xf8bc9c);if(!Array[_0x73ab97(0x80)](_0x363712)||_0x363712[_0x73ab97(0x79)](_0x2591c5=>typeof _0x2591c5!=='string'))throw CliErrors[_0x73ab97(0x97)](_0xf8bc9c+_0x73ab97(0x93));return _0x363712;}export function buildSubappAssetsStatus(_0x594317,_0x501db9,_0xd6b1f5){const _0x1bf198=a183_0x2d4c,_0x47843f=_0x594317[_0x1bf198(0x8d)]==null?{}:objectValue(_0x594317[_0x1bf198(0x8d)],'app.extend'),_0x3cbcc3=_0x47843f['assets']==null?[]:typeof _0x47843f['assets']===_0x1bf198(0x7c)?parseJson(_0x47843f[_0x1bf198(0x74)],'app.extend.assets'):_0x47843f['assets'];if(!Array['isArray'](_0x3cbcc3))throw CliErrors[_0x1bf198(0x97)](_0x1bf198(0x8c));const _0x51ed66=_0x3cbcc3[_0x1bf198(0x7f)]((_0x472129,_0x30114e)=>objectValue(_0x472129,'app.extend.assets['+_0x30114e+']')),_0x59986d=_0x51ed66[_0x1bf198(0x89)](_0x3fb3c9=>_0x3fb3c9[_0x1bf198(0x8a)]===_0xd6b1f5);if(_0x59986d['length']>0x1)throw CliErrors[_0x1bf198(0x97)]('Duplicate\x20subapp\x20records\x20for\x20'+_0xd6b1f5+'.');const _0x59bdbf=_0x59986d[0x0],_0x1c8f56=_0x59bdbf?.['resources']==null?[]:resourceList(_0x59bdbf[_0x1bf198(0x7d)],'subapp.resources'),_0x5c202a=_0x501db9[_0x1bf198(0x89)](_0x468bed=>_0x468bed['extend']?.[_0x1bf198(0x8a)]===_0xd6b1f5),_0x23d301=_0x5c202a[_0x1bf198(0x7f)](_0x2219e3=>{const _0x3b34df=_0x1bf198;let _0xa44d59=null,_0xe79158=null;try{_0xa44d59=_0x2219e3[_0x3b34df(0x8d)]?.[_0x3b34df(0x7d)]==null?_0x2219e3[_0x3b34df(0x7d)]:resourceList(_0x2219e3[_0x3b34df(0x8d)][_0x3b34df(0x7d)],'menu\x20'+_0x2219e3['id']+_0x3b34df(0x95));}catch(_0x2aeae1){_0xe79158=_0x2aeae1 instanceof Error?_0x2aeae1[_0x3b34df(0x78)]:String(_0x2aeae1);}const _0x11aa43=_0x1c8f56[_0x3b34df(0x75)]>0x0?'app':_0x3b34df(0x72),_0xca079=_0x11aa43===_0x3b34df(0x7a)?_0x1c8f56:_0xa44d59;return{'id':_0x2219e3['id'],'path':_0x2219e3[_0x3b34df(0x88)],'preferredSourceIfSupported':_0x11aa43,'preferredResourcesIfSupported':_0xca079,'menuFallbackResources':_0xa44d59,'menuFallbackError':_0xe79158,'fallbackDiffers':_0xa44d59===null?null:_0x11aa43===_0x3b34df(0x7a)&&_0xa44d59[_0x3b34df(0x75)]>0x0&&JSON[_0x3b34df(0x96)](_0xa44d59)!==JSON['stringify'](_0xca079)};});return{'appName':_0xd6b1f5,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x59bdbf),'sharedResources':_0x1c8f56,'loadScriptMode':_0x59bdbf?.[_0x1bf198(0x9b)]??null,'basename':_0x59bdbf?.['basename']??null,'boundMenus':_0x23d301[_0x1bf198(0x75)],'staleMenuFallbacks':_0x23d301[_0x1bf198(0x89)](_0x50e110=>_0x50e110[_0x1bf198(0x8b)])['length'],'menus':_0x23d301};}export async function assertSharedResourcesConfigured(_0x2286c2,_0x2429c4,_0x8e1e12){const _0x574ed8=a183_0x2d4c,_0x4a85d0=await getSmartAppRecord(_0x2286c2,_0x2429c4),_0x2e8f49=buildSubappAssetsStatus(_0x4a85d0,[],_0x8e1e12);if(!_0x2e8f49['sharedConfigured']||_0x2e8f49[_0x574ed8(0x85)][_0x574ed8(0x75)]===0x0)throw CliErrors[_0x574ed8(0x97)](_0x574ed8(0x77)+_0x8e1e12+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a183_0x2c5dcd(0x76)},{'name':'app-name','type':a183_0x2c5dcd(0x7c),'required':!![],'description':a183_0x2c5dcd(0x92)}];export function getSubappSelector(_0x257321){const _0x4d59e6=a183_0x2c5dcd,_0xedfcf1=_0x257321[_0x4d59e6(0x86)],_0x507364=_0x257321[_0x4d59e6(0x8f)](_0x4d59e6(0x90))['trim']();if(!_0x507364)throw CliErrors[_0x4d59e6(0x97)]('--app-name\x20is\x20required.');return{'appCode':_0xedfcf1,'appName':_0x507364};}
1
+ const a183_0x5bd2bc=a183_0x3ad2;(function(_0x497acd,_0x544c67){const _0x3d942e=a183_0x3ad2,_0x177070=_0x497acd();while(!![]){try{const _0x761272=-parseInt(_0x3d942e(0x19c))/0x1*(-parseInt(_0x3d942e(0x1a6))/0x2)+parseInt(_0x3d942e(0x18a))/0x3*(parseInt(_0x3d942e(0x1af))/0x4)+parseInt(_0x3d942e(0x190))/0x5+parseInt(_0x3d942e(0x1ac))/0x6+parseInt(_0x3d942e(0x1aa))/0x7*(parseInt(_0x3d942e(0x1a9))/0x8)+parseInt(_0x3d942e(0x18b))/0x9+-parseInt(_0x3d942e(0x1a0))/0xa*(parseInt(_0x3d942e(0x192))/0xb);if(_0x761272===_0x544c67)break;else _0x177070['push'](_0x177070['shift']());}catch(_0x4d9568){_0x177070['push'](_0x177070['shift']());}}}(a183_0x26e0,0x5f86b));import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x37a02f,_0x11a463){const _0x1ac1b3=a183_0x3ad2,_0x2f1546=typeof _0x37a02f===_0x1ac1b3(0x1a8)?parseJson(_0x37a02f,_0x11a463):_0x37a02f;if(!_0x2f1546||typeof _0x2f1546!=='object'||Array['isArray'](_0x2f1546))throw CliErrors[_0x1ac1b3(0x1a4)](_0x11a463+_0x1ac1b3(0x18c));return _0x2f1546;}function parseJson(_0x39effd,_0x1642c7){const _0x352784=a183_0x3ad2;try{return JSON[_0x352784(0x195)](_0x39effd);}catch{throw CliErrors['validation'](_0x1642c7+_0x352784(0x187));}}function resourceList(_0x3cd3a8,_0xfe6943){const _0x2af944=a183_0x3ad2;if(typeof _0x3cd3a8!==_0x2af944(0x1a8))throw CliErrors[_0x2af944(0x1a4)](_0xfe6943+'\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.');const _0x5ab69d=parseJson(_0x3cd3a8,_0xfe6943);if(!Array['isArray'](_0x5ab69d)||_0x5ab69d[_0x2af944(0x1a5)](_0x479a0b=>typeof _0x479a0b!=='string'))throw CliErrors[_0x2af944(0x1a4)](_0xfe6943+'\x20must\x20be\x20an\x20array\x20of\x20URLs.');return _0x5ab69d;}export function buildSubappAssetsStatus(_0x149f46,_0x1f5dbc,_0x47c15c){const _0x5f050f=a183_0x3ad2,_0x43ae28=_0x149f46[_0x5f050f(0x188)]==null?{}:objectValue(_0x149f46[_0x5f050f(0x188)],_0x5f050f(0x19e)),_0x7d7a22=_0x43ae28[_0x5f050f(0x189)]==null?[]:typeof _0x43ae28[_0x5f050f(0x189)]===_0x5f050f(0x1a8)?parseJson(_0x43ae28[_0x5f050f(0x189)],_0x5f050f(0x196)):_0x43ae28[_0x5f050f(0x189)];if(!Array['isArray'](_0x7d7a22))throw CliErrors[_0x5f050f(0x1a4)](_0x5f050f(0x1a7));const _0x5600e8=_0x7d7a22['map']((_0xa3103b,_0x5f5473)=>objectValue(_0xa3103b,'app.extend.assets['+_0x5f5473+']')),_0x340bf7=_0x5600e8['filter'](_0x552841=>_0x552841[_0x5f050f(0x1ad)]===_0x47c15c);if(_0x340bf7[_0x5f050f(0x18f)]>0x1)throw CliErrors[_0x5f050f(0x1a4)]('Duplicate\x20subapp\x20records\x20for\x20'+_0x47c15c+'.');const _0x351491=_0x340bf7[0x0],_0x330647=_0x351491?.[_0x5f050f(0x197)]==null?[]:resourceList(_0x351491['resources'],_0x5f050f(0x1a2)),_0x5da1bd=_0x1f5dbc['filter'](_0x355871=>_0x355871['extend']?.[_0x5f050f(0x1ad)]===_0x47c15c),_0x42a849=_0x5da1bd[_0x5f050f(0x199)](_0x29f607=>{const _0x34975c=_0x5f050f;let _0x412fe1=null,_0x4c5a3c=null;try{_0x412fe1=_0x29f607['extend']?.[_0x34975c(0x197)]==null?_0x29f607[_0x34975c(0x197)]:resourceList(_0x29f607[_0x34975c(0x188)][_0x34975c(0x197)],_0x34975c(0x191)+_0x29f607['id']+_0x34975c(0x19d));}catch(_0x5e8ade){_0x4c5a3c=_0x5e8ade instanceof Error?_0x5e8ade[_0x34975c(0x194)]:String(_0x5e8ade);}const _0xf26f55=_0x330647[_0x34975c(0x18f)]>0x0?'app':'menu',_0x2416d2=_0xf26f55===_0x34975c(0x1ae)?_0x330647:_0x412fe1;return{'id':_0x29f607['id'],'path':_0x29f607['path'],'preferredSourceIfSupported':_0xf26f55,'preferredResourcesIfSupported':_0x2416d2,'menuFallbackResources':_0x412fe1,'menuFallbackError':_0x4c5a3c,'fallbackDiffers':_0x412fe1===null?null:_0xf26f55===_0x34975c(0x1ae)&&_0x412fe1[_0x34975c(0x18f)]>0x0&&JSON['stringify'](_0x412fe1)!==JSON['stringify'](_0x2416d2)};});return{'appName':_0x47c15c,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x351491),'sharedResources':_0x330647,'loadScriptMode':_0x351491?.[_0x5f050f(0x19f)]??null,'basename':_0x351491?.[_0x5f050f(0x1a1)]??null,'boundMenus':_0x42a849['length'],'staleMenuFallbacks':_0x42a849[_0x5f050f(0x19a)](_0x3507d2=>_0x3507d2['fallbackDiffers'])[_0x5f050f(0x18f)],'menus':_0x42a849};}function a183_0x3ad2(_0x51376a,_0x38c713){_0x51376a=_0x51376a-0x187;const _0x26e0d8=a183_0x26e0();let _0x3ad299=_0x26e0d8[_0x51376a];return _0x3ad299;}export async function assertSharedResourcesConfigured(_0x273109,_0x565f22,_0x49d059){const _0xc0d0af=a183_0x3ad2,_0x2942e3=await getSmartAppRecord(_0x273109,_0x565f22),_0x2eecc8=buildSubappAssetsStatus(_0x2942e3,[],_0x49d059);if(!_0x2eecc8[_0xc0d0af(0x19b)]||_0x2eecc8[_0xc0d0af(0x198)][_0xc0d0af(0x18f)]===0x0)throw CliErrors[_0xc0d0af(0x1a4)](_0xc0d0af(0x18d)+_0x49d059+'.');}function a183_0x26e0(){const _0x570cc1=['string','11624txqtmJ','3164fSvMPp','appCode','3937446DunjFZ','appName','app','5108NpkIVZ','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','\x20contains\x20invalid\x20JSON.','extend','assets','1413vqlcOc','3414474LJYCXK','\x20must\x20be\x20a\x20JSON\x20object.','No\x20shared\x20resources\x20configured\x20for\x20','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','length','1606025vRDXXW','menu\x20','8965YiCkuA','trim','message','parse','app.extend.assets','resources','sharedResources','map','filter','sharedConfigured','165zVAazG','\x20resources','app.extend','loadScriptMode','31110HDBjUt','basename','subapp.resources','app-name','validation','some','3778ovORjK','app.extend.assets\x20must\x20be\x20an\x20array.'];a183_0x26e0=function(){return _0x570cc1;};return a183_0x26e0();}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a183_0x5bd2bc(0x1b0)},{'name':a183_0x5bd2bc(0x1a3),'type':'string','required':!![],'description':a183_0x5bd2bc(0x18e)}];export function getSubappSelector(_0x7f42d3){const _0x1e031b=a183_0x5bd2bc,_0x4d2e40=_0x7f42d3[_0x1e031b(0x1ab)],_0x51b9c0=_0x7f42d3['str'](_0x1e031b(0x1a3))[_0x1e031b(0x193)]();if(!_0x51b9c0)throw CliErrors[_0x1e031b(0x1a4)]('--app-name\x20is\x20required.');return{'appCode':_0x4d2e40,'appName':_0x51b9c0};}
@@ -1 +1 @@
1
- const a184_0x3190dc=a184_0x54fc;(function(_0x108b64,_0x1fe0c1){const _0x3661d4=a184_0x54fc,_0x22af4e=_0x108b64();while(!![]){try{const _0x4ac731=parseInt(_0x3661d4(0x71))/0x1+parseInt(_0x3661d4(0x6a))/0x2+-parseInt(_0x3661d4(0x77))/0x3*(-parseInt(_0x3661d4(0xa6))/0x4)+parseInt(_0x3661d4(0x8a))/0x5*(parseInt(_0x3661d4(0x81))/0x6)+parseInt(_0x3661d4(0x78))/0x7*(parseInt(_0x3661d4(0x9a))/0x8)+parseInt(_0x3661d4(0x76))/0x9+-parseInt(_0x3661d4(0x91))/0xa;if(_0x4ac731===_0x1fe0c1)break;else _0x22af4e['push'](_0x22af4e['shift']());}catch(_0x3a1297){_0x22af4e['push'](_0x22af4e['shift']());}}}(a184_0x50e0,0xf2283));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([a184_0x3190dc(0x88),'cssUrl',a184_0x3190dc(0x8e),a184_0x3190dc(0x7b),a184_0x3190dc(0x70)]);function a184_0x50e0(){const _0x22c696=['cwd','Invalid\x20--params.','trim','Invalid\x20--params\x20JSON.','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','push','number','JS\x20URL\x20is\x20unreachable:\x20','1775768CqSWgf','label','get','No\x20local\x20pages\x20matched\x20paths:\x20','has','hasOwn','info','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','message','Start\x20non-interactive\x20menu\x20sync','folder','boolean','195968OFjIhB','field','Invalid\x20--params:\x20',':\x20expected\x20a\x20non-empty\x20string.',';\x20found\x20','Invalid\x20--params\x20fields:\x20','Parent\x20','2096624zBleLG','dryRun','parse','filter','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','path','parentId','1915394nqTpFw','\x0a\x20\x20Available\x20local\x20paths:\x20','--params.','keys','CSS\x20URL\x20is\x20unreachable:\x20','8448939rRvghO','111QPirmK','35uJRskq','cssUrl','length','visible','group','order','type','isArray','isInteger','6gHevaI','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','import','string','Menu\x20sync\x20completed','object','map','jsUrl','\x22\x20for\x20','2695855hpzfjR','menu-sync','join','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','appName','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','setLogPath','63723320YmBXQD'];a184_0x50e0=function(){return _0x22c696;};return a184_0x50e0();}export function resolvePage(_0x66b299,_0x19aab5,_0x4b357a){const _0x177592=a184_0x3190dc;let _0x5e3b41=_0x19aab5[_0x177592(0x70)]??_0x66b299['parentId'];if(_0x5e3b41===undefined&&_0x66b299[_0x177592(0x7c)]){const _0x5e830b=_0x4b357a[_0x177592(0x6d)](_0x2f2047=>_0x2f2047[_0x177592(0x7e)]===_0x177592(0xa4)&&_0x2f2047['label']===_0x66b299[_0x177592(0x7c)]);if(_0x5e830b[_0x177592(0x7a)]!==0x1)throw new Error('Expected\x20one\x20folder\x20named\x20\x22'+_0x66b299[_0x177592(0x7c)]+_0x177592(0x89)+_0x66b299[_0x177592(0x6f)]+_0x177592(0x67)+_0x5e830b['length']);_0x5e3b41=_0x5e830b[0x0]['id'];}if(_0x5e3b41!==undefined&&_0x5e3b41!==0x0&&_0x4b357a[_0x177592(0x6d)](_0x3f92eb=>_0x3f92eb['id']===_0x5e3b41&&_0x3f92eb[_0x177592(0x7e)]==='folder')['length']!==0x1)throw new Error(_0x177592(0x69)+_0x5e3b41+_0x177592(0x6e));return{..._0x66b299,..._0x5e3b41===undefined?{}:{'parentId':_0x5e3b41},..._0x19aab5['visible']===undefined?{}:{'visible':_0x19aab5[_0x177592(0x7b)]}};}function validateParams(_0xae7607){const _0x442112=a184_0x3190dc,_0x5798c0=[];return _0xae7607[_0x442112(0x88)]&&!isValidJsHttpsUrl(_0xae7607[_0x442112(0x88)])&&_0x5798c0[_0x442112(0x97)]({'field':_0x442112(0x88),'message':_0x442112(0x8f)}),_0xae7607[_0x442112(0x79)]&&!isValidCssHttpsUrl(_0xae7607[_0x442112(0x79)])&&_0x5798c0[_0x442112(0x97)]({'field':_0x442112(0x79),'message':_0x442112(0x8d)}),_0x5798c0;}export async function runMenuSyncCore(_0x5862ce,_0x4b390a,_0x4ec8bc=[],_0xbb59a7,_0x808c91={}){const _0x581fb2=a184_0x3190dc,_0x5f0e78=parseMenuSyncParams(_0xbb59a7),_0x4a73df=[...new Set(_0x4ec8bc[_0x581fb2(0x87)](_0xd0a716=>_0xd0a716[_0x581fb2(0x94)]())[_0x581fb2(0x6d)](Boolean)[_0x581fb2(0x87)](menuPathKey))],_0x479caa=_0x5f0e78[_0x581fb2(0x88)],_0x230f2b=_0x5f0e78[_0x581fb2(0x79)],_0xbafe48=[];if(_0x479caa)_0xbafe48['push'](_0x479caa);if(_0x230f2b)_0xbafe48[_0x581fb2(0x97)](_0x230f2b);const _0x5319d7=validateParams(_0x5f0e78);if(_0x5319d7[_0x581fb2(0x7a)]>0x0){const _0x5456f1=_0x5319d7[_0x581fb2(0x87)](_0x5c6033=>_0x581fb2(0x73)+_0x5c6033[_0x581fb2(0xa7)]+':\x20'+_0x5c6033[_0x581fb2(0xa2)])[_0x581fb2(0x8c)](';\x20');throw new Error(_0x581fb2(0x65)+_0x5456f1);}logger[_0x581fb2(0x90)](process[_0x581fb2(0x92)]()),logger[_0x581fb2(0xa0)](_0x581fb2(0x8b),_0x581fb2(0xa3),{'appCode':_0x5862ce,'selectedCount':_0x4a73df[_0x581fb2(0x7a)],'jsUrl':_0x479caa,'cssUrl':_0x230f2b});if(_0x479caa){const _0x98e82=await isUrlReachable(_0x479caa);if(!_0x98e82)throw new Error(_0x581fb2(0x99)+_0x479caa);}if(_0x230f2b){const _0x2437fd=await isUrlReachable(_0x230f2b);if(!_0x2437fd)throw new Error(_0x581fb2(0x75)+_0x230f2b);}const _0x18a124=getLocalPages();if(_0x18a124[_0x581fb2(0x7a)]===0x0){if(_0x4a73df[_0x581fb2(0x7a)]>0x0)throw new Error(_0x581fb2(0x9d)+_0x4a73df[_0x581fb2(0x8c)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x808c91[_0x581fb2(0x6b)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x18b848=await getOnlineMenuList(_0x5862ce,_0x4b390a),_0x430c11=new Set(_0x18b848[_0x581fb2(0x87)](_0x5ef0de=>menuPathKey(_0x5ef0de[_0x581fb2(0x6f)])));let _0x3bf7ab;if(_0x4a73df['length']>0x0){const _0x1bac45=new Map(_0x18a124[_0x581fb2(0x87)](_0x5ee9d9=>[menuPathKey(_0x5ee9d9['path']),_0x5ee9d9])),_0x3b0dcc=_0x4a73df[_0x581fb2(0x6d)](_0x34f312=>!_0x1bac45[_0x581fb2(0x9e)](_0x34f312));if(_0x3b0dcc[_0x581fb2(0x7a)]>0x0){const _0xe983ed=_0x18a124[_0x581fb2(0x87)](_0x22c634=>_0x22c634[_0x581fb2(0x6f)])[_0x581fb2(0x8c)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x3b0dcc[_0x581fb2(0x8c)](',\x20')+_0x581fb2(0x72)+_0xe983ed);}const _0x14faa5=_0x4a73df[_0x581fb2(0x6d)](_0x178444=>_0x430c11[_0x581fb2(0x9e)](_0x178444));if(_0x14faa5[_0x581fb2(0x7a)]>0x0)throw new Error(_0x581fb2(0x96)+_0x14faa5[_0x581fb2(0x8c)](',\x20'));_0x3bf7ab=_0x4a73df[_0x581fb2(0x87)](_0x292d05=>_0x1bac45[_0x581fb2(0x9c)](_0x292d05));}else _0x3bf7ab=_0x18a124['filter'](_0xd0d625=>!_0x430c11[_0x581fb2(0x9e)](menuPathKey(_0xd0d625[_0x581fb2(0x6f)])));if(_0x3bf7ab[_0x581fb2(0x7a)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x808c91[_0x581fb2(0x6b)]===!![],'targetPages':[],'plannedMenus':[]};_0x3bf7ab=_0x3bf7ab[_0x581fb2(0x87)](_0x3aeb8c=>resolvePage(_0x3aeb8c,_0x5f0e78,_0x18b848));_0x5f0e78[_0x581fb2(0x8e)]&&_0xbafe48[_0x581fb2(0x7a)]===0x0&&await assertSharedResourcesConfigured(_0x5862ce,_0x4b390a,_0x5f0e78[_0x581fb2(0x8e)]);const _0x106191=_0x3bf7ab[_0x581fb2(0x87)](_0x3ce96c=>({'type':'procode','path':_0x3ce96c[_0x581fb2(0x6f)],'label':_0x3ce96c[_0x581fb2(0x9b)],'loadScriptMode':_0x581fb2(0x83),'resources':[..._0xbafe48],..._0x3ce96c[_0x581fb2(0x7b)]===undefined?{}:{'visible':_0x3ce96c[_0x581fb2(0x7b)]},..._0x3ce96c[_0x581fb2(0x70)]===undefined?{}:{'parentId':_0x3ce96c[_0x581fb2(0x70)]},..._0x3ce96c[_0x581fb2(0x7d)]===undefined?{}:{'sort':_0x3ce96c['order']},..._0x5f0e78[_0x581fb2(0x8e)]===undefined?{}:{'appName':_0x5f0e78[_0x581fb2(0x8e)]}}));if(_0x808c91[_0x581fb2(0x6b)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x3bf7ab,'plannedMenus':_0x106191};const _0x371766=_0x5f0e78[_0x581fb2(0x8e)]?await createMenus(_0x5862ce,_0x4b390a,_0x3bf7ab,_0xbafe48['length']>0x0?_0xbafe48:undefined,{'appName':_0x5f0e78[_0x581fb2(0x8e)]}):await createMenus(_0x5862ce,_0x4b390a,_0x3bf7ab,_0xbafe48[_0x581fb2(0x7a)]>0x0?_0xbafe48:undefined);return logger[_0x581fb2(0xa0)](_0x581fb2(0x8b),_0x581fb2(0x85),{'count':_0x3bf7ab['length'],'resources':_0xbafe48}),{'created':_0x371766[_0x581fb2(0x7a)],'skipped':![],'dryRun':![],'targetPages':_0x3bf7ab,'plannedMenus':_0x106191,'menus':_0x371766};}function a184_0x54fc(_0x136246,_0x3887b0){_0x136246=_0x136246-0x65;const _0x50e09f=a184_0x50e0();let _0x54fc14=_0x50e09f[_0x136246];return _0x54fc14;}export function parseMenuSyncParams(_0x3fd2a9){const _0x12bd0c=a184_0x3190dc;if(!_0x3fd2a9||typeof _0x3fd2a9!==_0x12bd0c(0x84))return{};let _0x3a6e6c;try{_0x3a6e6c=JSON[_0x12bd0c(0x6c)](_0x3fd2a9);}catch{throw new Error(_0x12bd0c(0x95));}if(typeof _0x3a6e6c!==_0x12bd0c(0x86)||_0x3a6e6c===null||Array[_0x12bd0c(0x7f)](_0x3a6e6c))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x4ddc2f=_0x3a6e6c;if(Object[_0x12bd0c(0x9f)](_0x4ddc2f,'pages'))throw new Error(_0x12bd0c(0xa1));const _0x300136=Object[_0x12bd0c(0x74)](_0x4ddc2f)[_0x12bd0c(0x6d)](_0x3d5e98=>!MENU_SYNC_PARAM_KEYS[_0x12bd0c(0x9e)](_0x3d5e98));if(_0x300136[_0x12bd0c(0x7a)]>0x0)throw new Error(_0x12bd0c(0x68)+_0x300136['join'](',\x20')+'.');for(const _0x29702a of[_0x12bd0c(0x88),_0x12bd0c(0x79),_0x12bd0c(0x8e)]){const _0xb27d3b=_0x4ddc2f[_0x29702a];if(_0xb27d3b!==undefined&&(typeof _0xb27d3b!==_0x12bd0c(0x84)||_0xb27d3b[_0x12bd0c(0x94)]()===''))throw new Error(_0x12bd0c(0x93)+_0x29702a+_0x12bd0c(0x66));}if(_0x4ddc2f[_0x12bd0c(0x7b)]!==undefined&&typeof _0x4ddc2f[_0x12bd0c(0x7b)]!==_0x12bd0c(0xa5))throw new Error('Invalid\x20--params.visible:\x20expected\x20a\x20boolean.');if(_0x4ddc2f[_0x12bd0c(0x70)]!==undefined&&(!Number[_0x12bd0c(0x80)](_0x4ddc2f[_0x12bd0c(0x70)])||_0x4ddc2f[_0x12bd0c(0x70)]<0x0))throw new Error(_0x12bd0c(0x82));return{'jsUrl':typeof _0x4ddc2f[_0x12bd0c(0x88)]===_0x12bd0c(0x84)?_0x4ddc2f[_0x12bd0c(0x88)][_0x12bd0c(0x94)]():undefined,'cssUrl':typeof _0x4ddc2f[_0x12bd0c(0x79)]==='string'?_0x4ddc2f[_0x12bd0c(0x79)][_0x12bd0c(0x94)]():undefined,'appName':typeof _0x4ddc2f[_0x12bd0c(0x8e)]===_0x12bd0c(0x84)?_0x4ddc2f[_0x12bd0c(0x8e)][_0x12bd0c(0x94)]():undefined,'visible':typeof _0x4ddc2f['visible']==='boolean'?_0x4ddc2f[_0x12bd0c(0x7b)]:undefined,'parentId':typeof _0x4ddc2f['parentId']===_0x12bd0c(0x98)?_0x4ddc2f['parentId']:undefined};}
1
+ const a184_0x302f46=a184_0x235b;(function(_0x19f8a7,_0x783e67){const _0x41ad2a=a184_0x235b,_0x5e541f=_0x19f8a7();while(!![]){try{const _0xea53c5=parseInt(_0x41ad2a(0xc7))/0x1+parseInt(_0x41ad2a(0xa5))/0x2*(-parseInt(_0x41ad2a(0xa8))/0x3)+parseInt(_0x41ad2a(0xa2))/0x4+parseInt(_0x41ad2a(0xba))/0x5*(parseInt(_0x41ad2a(0xaa))/0x6)+parseInt(_0x41ad2a(0xcf))/0x7+parseInt(_0x41ad2a(0xd3))/0x8*(parseInt(_0x41ad2a(0xc8))/0x9)+-parseInt(_0x41ad2a(0xd1))/0xa;if(_0xea53c5===_0x783e67)break;else _0x5e541f['push'](_0x5e541f['shift']());}catch(_0xf20e5){_0x5e541f['push'](_0x5e541f['shift']());}}}(a184_0x2c70,0x48b8d));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a184_0x235b(_0x4380bf,_0x11d696){_0x4380bf=_0x4380bf-0xa1;const _0x2c701d=a184_0x2c70();let _0x235b57=_0x2c701d[_0x4380bf];return _0x235b57;}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([a184_0x302f46(0xbb),a184_0x302f46(0xc6),a184_0x302f46(0xbe),a184_0x302f46(0xb2),a184_0x302f46(0xaf)]);export function resolvePage(_0x3584a9,_0x14a249,_0x36c04d){const _0x10f6d5=a184_0x302f46;let _0x3434b4=_0x14a249[_0x10f6d5(0xaf)]??_0x3584a9[_0x10f6d5(0xaf)];if(_0x3434b4===undefined&&_0x3584a9[_0x10f6d5(0xc3)]){const _0x20f83f=_0x36c04d[_0x10f6d5(0xdb)](_0x1a5377=>_0x1a5377[_0x10f6d5(0xcb)]===_0x10f6d5(0xc2)&&_0x1a5377['label']===_0x3584a9[_0x10f6d5(0xc3)]);if(_0x20f83f[_0x10f6d5(0xc9)]!==0x1)throw new Error('Expected\x20one\x20folder\x20named\x20\x22'+_0x3584a9[_0x10f6d5(0xc3)]+_0x10f6d5(0xc1)+_0x3584a9[_0x10f6d5(0xb0)]+_0x10f6d5(0xdc)+_0x20f83f[_0x10f6d5(0xc9)]);_0x3434b4=_0x20f83f[0x0]['id'];}if(_0x3434b4!==undefined&&_0x3434b4!==0x0&&_0x36c04d[_0x10f6d5(0xdb)](_0xde007b=>_0xde007b['id']===_0x3434b4&&_0xde007b['type']==='folder')[_0x10f6d5(0xc9)]!==0x1)throw new Error('Parent\x20'+_0x3434b4+'\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.');return{..._0x3584a9,..._0x3434b4===undefined?{}:{'parentId':_0x3434b4},..._0x14a249[_0x10f6d5(0xb2)]===undefined?{}:{'visible':_0x14a249[_0x10f6d5(0xb2)]}};}function validateParams(_0x5f1123){const _0x5f1d2a=a184_0x302f46,_0x5213a8=[];return _0x5f1123['jsUrl']&&!isValidJsHttpsUrl(_0x5f1123[_0x5f1d2a(0xbb)])&&_0x5213a8[_0x5f1d2a(0xbf)]({'field':'jsUrl','message':_0x5f1d2a(0xae)}),_0x5f1123[_0x5f1d2a(0xc6)]&&!isValidCssHttpsUrl(_0x5f1123['cssUrl'])&&_0x5213a8[_0x5f1d2a(0xbf)]({'field':_0x5f1d2a(0xc6),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x5213a8;}export async function runMenuSyncCore(_0x13edcc,_0x3b5dbc,_0x41dacb=[],_0x24019c,_0x269ad4={}){const _0x2ccc8b=a184_0x302f46,_0x3880fc=parseMenuSyncParams(_0x24019c),_0x4cec5e=[...new Set(_0x41dacb[_0x2ccc8b(0xa9)](_0x3e7238=>_0x3e7238[_0x2ccc8b(0xde)]())[_0x2ccc8b(0xdb)](Boolean)[_0x2ccc8b(0xa9)](menuPathKey))],_0x2795aa=_0x3880fc['jsUrl'],_0x540966=_0x3880fc[_0x2ccc8b(0xc6)],_0x35bbe9=[];if(_0x2795aa)_0x35bbe9[_0x2ccc8b(0xbf)](_0x2795aa);if(_0x540966)_0x35bbe9['push'](_0x540966);const _0x1d5e44=validateParams(_0x3880fc);if(_0x1d5e44['length']>0x0){const _0x17293c=_0x1d5e44['map'](_0x3a7963=>_0x2ccc8b(0xc0)+_0x3a7963[_0x2ccc8b(0xce)]+':\x20'+_0x3a7963[_0x2ccc8b(0xab)])[_0x2ccc8b(0xb7)](';\x20');throw new Error(_0x2ccc8b(0xd5)+_0x17293c);}logger[_0x2ccc8b(0xb9)](process['cwd']()),logger[_0x2ccc8b(0xd0)](_0x2ccc8b(0xb8),_0x2ccc8b(0xc4),{'appCode':_0x13edcc,'selectedCount':_0x4cec5e[_0x2ccc8b(0xc9)],'jsUrl':_0x2795aa,'cssUrl':_0x540966});if(_0x2795aa){const _0x1a1b3a=await isUrlReachable(_0x2795aa);if(!_0x1a1b3a)throw new Error(_0x2ccc8b(0xd4)+_0x2795aa);}if(_0x540966){const _0x392d19=await isUrlReachable(_0x540966);if(!_0x392d19)throw new Error(_0x2ccc8b(0xd9)+_0x540966);}const _0xf8f615=getLocalPages();if(_0xf8f615[_0x2ccc8b(0xc9)]===0x0){if(_0x4cec5e[_0x2ccc8b(0xc9)]>0x0)throw new Error(_0x2ccc8b(0xcd)+_0x4cec5e[_0x2ccc8b(0xb7)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x269ad4['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x14f725=await getOnlineMenuList(_0x13edcc,_0x3b5dbc),_0x55ee76=new Set(_0x14f725[_0x2ccc8b(0xa9)](_0x5f54e0=>menuPathKey(_0x5f54e0[_0x2ccc8b(0xb0)])));let _0x215388;if(_0x4cec5e[_0x2ccc8b(0xc9)]>0x0){const _0x262097=new Map(_0xf8f615[_0x2ccc8b(0xa9)](_0x33bd52=>[menuPathKey(_0x33bd52[_0x2ccc8b(0xb0)]),_0x33bd52])),_0x2468ad=_0x4cec5e[_0x2ccc8b(0xdb)](_0x4e026b=>!_0x262097['has'](_0x4e026b));if(_0x2468ad[_0x2ccc8b(0xc9)]>0x0){const _0x3f25cc=_0xf8f615[_0x2ccc8b(0xa9)](_0x4e2d33=>_0x4e2d33[_0x2ccc8b(0xb0)])[_0x2ccc8b(0xb7)](',\x20');throw new Error(_0x2ccc8b(0xcd)+_0x2468ad['join'](',\x20')+_0x2ccc8b(0xd6)+_0x3f25cc);}const _0x272f59=_0x4cec5e['filter'](_0x3f7271=>_0x55ee76[_0x2ccc8b(0xb6)](_0x3f7271));if(_0x272f59[_0x2ccc8b(0xc9)]>0x0)throw new Error(_0x2ccc8b(0xbc)+_0x272f59[_0x2ccc8b(0xb7)](',\x20'));_0x215388=_0x4cec5e[_0x2ccc8b(0xa9)](_0x370ac2=>_0x262097[_0x2ccc8b(0xac)](_0x370ac2));}else _0x215388=_0xf8f615[_0x2ccc8b(0xdb)](_0xc4d529=>!_0x55ee76[_0x2ccc8b(0xb6)](menuPathKey(_0xc4d529[_0x2ccc8b(0xb0)])));if(_0x215388[_0x2ccc8b(0xc9)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x269ad4[_0x2ccc8b(0xca)]===!![],'targetPages':[],'plannedMenus':[]};_0x215388=_0x215388[_0x2ccc8b(0xa9)](_0x14daff=>resolvePage(_0x14daff,_0x3880fc,_0x14f725));_0x3880fc['appName']&&_0x35bbe9['length']===0x0&&await assertSharedResourcesConfigured(_0x13edcc,_0x3b5dbc,_0x3880fc[_0x2ccc8b(0xbe)]);const _0x4ad8c5=_0x215388[_0x2ccc8b(0xa9)](_0x307787=>({'type':_0x2ccc8b(0xc5),'path':_0x307787[_0x2ccc8b(0xb0)],'label':_0x307787[_0x2ccc8b(0xb1)],'loadScriptMode':_0x2ccc8b(0xa3),'resources':[..._0x35bbe9],..._0x307787[_0x2ccc8b(0xb2)]===undefined?{}:{'visible':_0x307787[_0x2ccc8b(0xb2)]},..._0x307787[_0x2ccc8b(0xaf)]===undefined?{}:{'parentId':_0x307787['parentId']},..._0x307787[_0x2ccc8b(0xa1)]===undefined?{}:{'sort':_0x307787[_0x2ccc8b(0xa1)]},..._0x3880fc['appName']===undefined?{}:{'appName':_0x3880fc[_0x2ccc8b(0xbe)]}}));if(_0x269ad4['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x215388,'plannedMenus':_0x4ad8c5};const _0x338f10=_0x3880fc[_0x2ccc8b(0xbe)]?await createMenus(_0x13edcc,_0x3b5dbc,_0x215388,_0x35bbe9['length']>0x0?_0x35bbe9:undefined,{'appName':_0x3880fc[_0x2ccc8b(0xbe)]}):await createMenus(_0x13edcc,_0x3b5dbc,_0x215388,_0x35bbe9[_0x2ccc8b(0xc9)]>0x0?_0x35bbe9:undefined);return logger['info']('menu-sync','Menu\x20sync\x20completed',{'count':_0x215388[_0x2ccc8b(0xc9)],'resources':_0x35bbe9}),{'created':_0x338f10['length'],'skipped':![],'dryRun':![],'targetPages':_0x215388,'plannedMenus':_0x4ad8c5,'menus':_0x338f10};}export function parseMenuSyncParams(_0x2ad0ad){const _0x6a56d0=a184_0x302f46;if(!_0x2ad0ad||typeof _0x2ad0ad!==_0x6a56d0(0xa4))return{};let _0xbb5ea2;try{_0xbb5ea2=JSON[_0x6a56d0(0xcc)](_0x2ad0ad);}catch{throw new Error(_0x6a56d0(0xad));}if(typeof _0xbb5ea2!=='object'||_0xbb5ea2===null||Array[_0x6a56d0(0xa6)](_0xbb5ea2))throw new Error(_0x6a56d0(0xd2));const _0x2d1372=_0xbb5ea2;if(Object[_0x6a56d0(0xb3)](_0x2d1372,_0x6a56d0(0xd7)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x21a5b8=Object[_0x6a56d0(0xbd)](_0x2d1372)[_0x6a56d0(0xdb)](_0x478086=>!MENU_SYNC_PARAM_KEYS[_0x6a56d0(0xb6)](_0x478086));if(_0x21a5b8['length']>0x0)throw new Error(_0x6a56d0(0xd8)+_0x21a5b8[_0x6a56d0(0xb7)](',\x20')+'.');for(const _0x2da8b1 of['jsUrl',_0x6a56d0(0xc6),_0x6a56d0(0xbe)]){const _0x32d039=_0x2d1372[_0x2da8b1];if(_0x32d039!==undefined&&(typeof _0x32d039!==_0x6a56d0(0xa4)||_0x32d039[_0x6a56d0(0xde)]()===''))throw new Error('Invalid\x20--params.'+_0x2da8b1+_0x6a56d0(0xa7));}if(_0x2d1372[_0x6a56d0(0xb2)]!==undefined&&typeof _0x2d1372[_0x6a56d0(0xb2)]!=='boolean')throw new Error(_0x6a56d0(0xb5));if(_0x2d1372['parentId']!==undefined&&(!Number['isInteger'](_0x2d1372[_0x6a56d0(0xaf)])||_0x2d1372[_0x6a56d0(0xaf)]<0x0))throw new Error(_0x6a56d0(0xda));return{'jsUrl':typeof _0x2d1372[_0x6a56d0(0xbb)]===_0x6a56d0(0xa4)?_0x2d1372['jsUrl'][_0x6a56d0(0xde)]():undefined,'cssUrl':typeof _0x2d1372['cssUrl']==='string'?_0x2d1372[_0x6a56d0(0xc6)][_0x6a56d0(0xde)]():undefined,'appName':typeof _0x2d1372['appName']==='string'?_0x2d1372[_0x6a56d0(0xbe)]['trim']():undefined,'visible':typeof _0x2d1372[_0x6a56d0(0xb2)]===_0x6a56d0(0xb4)?_0x2d1372[_0x6a56d0(0xb2)]:undefined,'parentId':typeof _0x2d1372[_0x6a56d0(0xaf)]===_0x6a56d0(0xdd)?_0x2d1372['parentId']:undefined};}function a184_0x2c70(){const _0x5a016b=['790604vlNEad','import','string','18KjXNHm','isArray',':\x20expected\x20a\x20non-empty\x20string.','68583fLmVnY','map','2274mrHlup','message','get','Invalid\x20--params\x20JSON.','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','parentId','path','label','visible','hasOwn','boolean','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','has','join','menu-sync','setLogPath','2965dcDrLu','jsUrl','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','keys','appName','push','--params.','\x22\x20for\x20','folder','group','Start\x20non-interactive\x20menu\x20sync','procode','cssUrl','392850GcyBlv','166896FAVWEQ','length','dryRun','type','parse','No\x20local\x20pages\x20matched\x20paths:\x20','field','1007552KqCGTb','info','5297420NzqmRA','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','32EiEzcl','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params:\x20','\x0a\x20\x20Available\x20local\x20paths:\x20','pages','Invalid\x20--params\x20fields:\x20','CSS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','filter',';\x20found\x20','number','trim','order'];a184_0x2c70=function(){return _0x5a016b;};return a184_0x2c70();}
@@ -1 +1 @@
1
- (function(_0x1e09d1,_0x34d4b2){const _0x4b5aed=a186_0x3229,_0x9cd3fd=_0x1e09d1();while(!![]){try{const _0x21de5d=-parseInt(_0x4b5aed(0x1bb))/0x1*(-parseInt(_0x4b5aed(0x1d2))/0x2)+-parseInt(_0x4b5aed(0x1de))/0x3+-parseInt(_0x4b5aed(0x1ec))/0x4+-parseInt(_0x4b5aed(0x1e7))/0x5+-parseInt(_0x4b5aed(0x1b2))/0x6*(-parseInt(_0x4b5aed(0x1cc))/0x7)+-parseInt(_0x4b5aed(0x1dc))/0x8+-parseInt(_0x4b5aed(0x1ab))/0x9*(-parseInt(_0x4b5aed(0x1ba))/0xa);if(_0x21de5d===_0x34d4b2)break;else _0x9cd3fd['push'](_0x9cd3fd['shift']());}catch(_0x55b107){_0x9cd3fd['push'](_0x9cd3fd['shift']());}}}(a186_0xe837,0x5b7be));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x2c4bbf){const _0x341de7=a186_0x3229,_0x43346c=[];return _0x2c4bbf[_0x341de7(0x1cb)]&&!isValidJsHttpsUrl(_0x2c4bbf[_0x341de7(0x1cb)])&&_0x43346c['push']({'field':_0x341de7(0x1cb),'message':_0x341de7(0x1ce)}),_0x2c4bbf[_0x341de7(0x1ac)]&&!isValidCssHttpsUrl(_0x2c4bbf[_0x341de7(0x1ac)])&&_0x43346c[_0x341de7(0x1f0)]({'field':_0x341de7(0x1ac),'message':_0x341de7(0x1d5)}),_0x43346c;}function a186_0x3229(_0x2b0191,_0x399b2b){_0x2b0191=_0x2b0191-0x1ab;const _0xe8377d=a186_0xe837();let _0x3229a7=_0xe8377d[_0x2b0191];return _0x3229a7;}export async function runMenuUpdateCore(_0x4835f0,_0x1e9a34,_0x176bfb,_0x5ca46d={}){const _0x4c9f58=a186_0x3229,_0x33a355=parseUpdateParamsFlag(_0x176bfb),_0x207a56=normalizeMode(_0x5ca46d['mode']);validateSelection(_0x5ca46d[_0x4c9f58(0x1cf)]);const _0xcbb278=[];if(_0x33a355[_0x4c9f58(0x1cb)])_0xcbb278[_0x4c9f58(0x1f0)](_0x33a355[_0x4c9f58(0x1cb)]);if(_0x33a355['cssUrl'])_0xcbb278[_0x4c9f58(0x1f0)](_0x33a355['cssUrl']);const _0xd3f731=validateParams(_0x33a355);if(_0xd3f731[_0x4c9f58(0x1b7)]>0x0){const _0x4ce144=_0xd3f731[_0x4c9f58(0x1c7)](_0x23d87a=>'--params.'+_0x23d87a[_0x4c9f58(0x1ef)]+':\x20'+_0x23d87a[_0x4c9f58(0x1ed)])[_0x4c9f58(0x1e6)](';\x20');throw new Error(_0x4c9f58(0x1af)+_0x4ce144);}if(_0xcbb278[_0x4c9f58(0x1b7)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x4c9f58(0x1b0));logger[_0x4c9f58(0x1c0)](process[_0x4c9f58(0x1d6)]()),logger[_0x4c9f58(0x1ee)](_0x4c9f58(0x1c1),_0x4c9f58(0x1b5),{'appCode':_0x4835f0,'jsUrl':_0x33a355[_0x4c9f58(0x1cb)],'cssUrl':_0x33a355[_0x4c9f58(0x1ac)],'mode':_0x207a56,'dryRun':_0x5ca46d[_0x4c9f58(0x1dd)]===!![]});if(_0x33a355['jsUrl']){const _0x497a0e=await isUrlReachable(_0x33a355['jsUrl']);if(!_0x497a0e)throw new Error(_0x4c9f58(0x1b6)+_0x33a355[_0x4c9f58(0x1cb)]);}if(_0x33a355[_0x4c9f58(0x1ac)]){const _0xf38206=await isUrlReachable(_0x33a355[_0x4c9f58(0x1ac)]);if(!_0xf38206)throw new Error(_0x4c9f58(0x1e4)+_0x33a355[_0x4c9f58(0x1ac)]);}const _0x4b2b1b=await getOnlineMenuList(_0x4835f0,_0x1e9a34),_0x32d6fe=_0x4b2b1b[_0x4c9f58(0x1c5)](_0xd04889=>_0xd04889['resources']['length']>0x0),_0x48d887=selectMenusForUpdate(_0x32d6fe,_0x5ca46d['selection']);if(_0x48d887['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x5ca46d['dryRun']===!![]};const _0x34df92=_0x48d887[_0x4c9f58(0x1c7)](_0x23f6fc=>buildMenuUpdateDiff(_0x23f6fc,_0x33a355,_0x207a56,_0x5ca46d['force']===!![],_0x5ca46d[_0x4c9f58(0x1df)]));if(_0x5ca46d[_0x4c9f58(0x1dd)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x34df92};const _0x416c1b=await Promise[_0x4c9f58(0x1b4)](_0x48d887[_0x4c9f58(0x1c7)]((_0x174d4a,_0x201448)=>updateMenuCdnUrl(_0x4835f0,_0x1e9a34,{'id':_0x174d4a['id'],'label':_0x174d4a[_0x4c9f58(0x1ea)],'path':_0x174d4a['path'],'resources':_0x34df92[_0x201448][_0x4c9f58(0x1f1)]['resources'],'extend':_0x174d4a['extend']??null,'loadScriptMode':_0x5ca46d[_0x4c9f58(0x1df)]}))),_0x32967f=_0x416c1b[_0x4c9f58(0x1c5)](_0x439e21=>_0x439e21[_0x4c9f58(0x1c3)]===_0x4c9f58(0x1e9))['map'](_0x33f77b=>_0x33f77b[_0x4c9f58(0x1be)]),_0x4e275e=_0x416c1b['filter'](_0x8f97ed=>_0x8f97ed[_0x4c9f58(0x1c3)]===_0x4c9f58(0x1d4))['length'];return logger[_0x4c9f58(0x1ee)](_0x4c9f58(0x1c1),_0x4c9f58(0x1d9),{'count':_0x48d887[_0x4c9f58(0x1b7)],'resources':_0xcbb278}),{'updated':_0x32967f[_0x4c9f58(0x1b7)],'failed':_0x4e275e,'skipped':![],'menus':_0x32967f};}function validateSelection(_0x1baeb6){const _0x3b47cd=a186_0x3229;if(!_0x1baeb6)throw new Error(_0x3b47cd(0x1c2));if(_0x1baeb6[_0x3b47cd(0x1ca)]&&(_0x1baeb6[_0x3b47cd(0x1c9)]['length']>0x0||_0x1baeb6[_0x3b47cd(0x1db)][_0x3b47cd(0x1b7)]>0x0))throw new Error(_0x3b47cd(0x1da));if(!_0x1baeb6[_0x3b47cd(0x1ca)]&&_0x1baeb6[_0x3b47cd(0x1c9)]['length']===0x0&&_0x1baeb6[_0x3b47cd(0x1db)][_0x3b47cd(0x1b7)]===0x0)throw new Error(_0x3b47cd(0x1c2));}export function selectMenusForUpdate(_0x4ce004,_0xca4992){const _0x289550=a186_0x3229;validateSelection(_0xca4992);if(_0xca4992[_0x289550(0x1ca)])return _0x4ce004;const _0x19d661=new Set(_0x4ce004[_0x289550(0x1c7)](_0x179030=>_0x179030['id'])),_0x29be22=new Set(_0x4ce004[_0x289550(0x1c7)](_0x2ab60f=>_0x2ab60f[_0x289550(0x1bd)])),_0x345ba0=_0xca4992[_0x289550(0x1c9)][_0x289550(0x1c5)](_0x4ec539=>!_0x19d661[_0x289550(0x1b9)](_0x4ec539)),_0x294b7b=_0xca4992[_0x289550(0x1db)][_0x289550(0x1c5)](_0x22f332=>!_0x29be22[_0x289550(0x1b9)](_0x22f332));if(_0x345ba0[_0x289550(0x1b7)]>0x0||_0x294b7b[_0x289550(0x1b7)]>0x0){const _0x3fab76=[..._0x345ba0[_0x289550(0x1c7)](_0x42a2c9=>String(_0x42a2c9)),..._0x294b7b]['join'](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x3fab76);}const _0x471d75=new Set(_0xca4992[_0x289550(0x1c9)]),_0x1f4e2a=new Set(_0xca4992['paths']);return _0x4ce004[_0x289550(0x1c5)](_0x254eb3=>_0x471d75['has'](_0x254eb3['id'])||_0x1f4e2a['has'](_0x254eb3['path']));}function normalizeMode(_0x2f0116){const _0x5b52a5=a186_0x3229;if(!_0x2f0116)return _0x5b52a5(0x1b3);if(_0x2f0116==='replace'||_0x2f0116===_0x5b52a5(0x1b3))return _0x2f0116;throw new Error(_0x5b52a5(0x1e0)+_0x2f0116+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x115930,_0x2b3975,_0x4233ff,_0x11529b,_0x46e34c){const _0x51c23a=a186_0x3229,_0x33a150=[..._0x115930[_0x51c23a(0x1c6)]];_0x4233ff===_0x51c23a(0x1b3)&&assertUnambiguousPatchResources(_0x115930,_0x33a150,_0x2b3975);const _0x428e11=_0x4233ff==='patch'?patchResources(_0x33a150,_0x2b3975):replaceResources(_0x2b3975),_0xd44033=[],_0x28093c=_0x33a150[_0x51c23a(0x1bf)](isJsResource),_0x98e7d1=_0x428e11[_0x51c23a(0x1bf)](isJsResource);if(_0x28093c&&!_0x98e7d1){const _0x4f3adf=_0x51c23a(0x1ad)+_0x115930[_0x51c23a(0x1ea)]+_0x51c23a(0x1bc)+_0x115930[_0x51c23a(0x1bd)]+_0x51c23a(0x1c4)+_0x51c23a(0x1d3);if(!_0x11529b)throw new Error(_0x4f3adf);_0xd44033['push'](_0x4f3adf);}const _0x2674d4=_0x33a150[_0x51c23a(0x1bf)](isCssResource),_0x221403=_0x428e11[_0x51c23a(0x1bf)](isCssResource);_0x2674d4&&!_0x221403&&_0xd44033[_0x51c23a(0x1f0)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x115930[_0x51c23a(0x1ea)]+_0x51c23a(0x1bc)+_0x115930[_0x51c23a(0x1bd)]+').');const _0x1e2658=typeof _0x115930[_0x51c23a(0x1d1)]?.[_0x51c23a(0x1df)]===_0x51c23a(0x1e5)?_0x115930[_0x51c23a(0x1d1)][_0x51c23a(0x1df)]:null,_0xacbcfd=_0x46e34c?{'loadScriptMode':_0x1e2658}:{},_0x3788d9=_0x46e34c?{'loadScriptMode':_0x46e34c}:{};return{'id':_0x115930['id'],'label':_0x115930[_0x51c23a(0x1ea)],'path':_0x115930['path'],'mode':_0x4233ff,'before':{'resources':_0x33a150,..._0xacbcfd},'after':{'resources':_0x428e11,..._0x3788d9},'warnings':_0xd44033};}function a186_0xe837(){const _0x4a6419=['with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','fulfilled','label','object','2032212RBScJQ','message','info','field','push','after','menu\x20asset-update\x20cannot\x20patch\x20','34281xkHsPx','cssUrl','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','\x20existing\x20CSS\x20resources\x20for\x20\x22','Invalid\x20--params:\x20','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','toLowerCase','1308IEGJnJ','patch','allSettled','Start\x20non-interactive\x20menu\x20asset\x20update','JS\x20URL\x20is\x20unreachable:\x20','length','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','has','2410FzcGpk','24PzbPDj','\x22\x20(','path','value','some','setLogPath','menu-asset-update','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','status',').\x20','filter','resources','map','trim','menuIds','all','jsUrl','17640kLcJTb','split','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','selection','\x20existing\x20JS\x20resources\x20for\x20\x22','extend','40892lssTfj','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','rejected','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','cwd','endsWith','parse','Menu\x20asset\x20update\x20completed','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','paths','4022704ZcUKIP','dryRun','301986OAppax','loadScriptMode','Invalid\x20--mode:\x20','.css','unshift','isArray','CSS\x20URL\x20is\x20unreachable:\x20','string','join','2358810fneEYd'];a186_0xe837=function(){return _0x4a6419;};return a186_0xe837();}function replaceResources(_0x13d3df){const _0x37662b=a186_0x3229;return[_0x13d3df['jsUrl'],_0x13d3df[_0x37662b(0x1ac)]]['filter'](_0x5e41d6=>!!_0x5e41d6);}function assertUnambiguousPatchResources(_0xafa88,_0x5b8521,_0x16a317){const _0x2ff87b=a186_0x3229,_0x3daf15=_0x5b8521[_0x2ff87b(0x1c5)](isJsResource)[_0x2ff87b(0x1b7)];if(_0x16a317['jsUrl']&&_0x3daf15>0x1)throw new Error(_0x2ff87b(0x1f2)+_0x3daf15+_0x2ff87b(0x1d0)+_0xafa88[_0x2ff87b(0x1ea)]+_0x2ff87b(0x1bc)+_0xafa88['path']+')\x20'+_0x2ff87b(0x1e8));const _0x261322=_0x5b8521[_0x2ff87b(0x1c5)](isCssResource)[_0x2ff87b(0x1b7)];if(_0x16a317[_0x2ff87b(0x1ac)]&&_0x261322>0x1)throw new Error(_0x2ff87b(0x1f2)+_0x261322+_0x2ff87b(0x1ae)+_0xafa88[_0x2ff87b(0x1ea)]+_0x2ff87b(0x1bc)+_0xafa88[_0x2ff87b(0x1bd)]+')\x20'+_0x2ff87b(0x1b8));}function patchResources(_0x4832d1,_0x5974a6){const _0x2552b3=a186_0x3229;let _0x121340=![],_0x4b0bb8=![];const _0x1292d6=[];for(const _0x3f5bf6 of _0x4832d1){if(isJsResource(_0x3f5bf6)){if(_0x5974a6[_0x2552b3(0x1cb)]&&!_0x121340)_0x1292d6[_0x2552b3(0x1f0)](_0x5974a6[_0x2552b3(0x1cb)]),_0x121340=!![];else!_0x5974a6[_0x2552b3(0x1cb)]&&_0x1292d6['push'](_0x3f5bf6);continue;}if(isCssResource(_0x3f5bf6)){if(_0x5974a6[_0x2552b3(0x1ac)]&&!_0x4b0bb8)_0x1292d6['push'](_0x5974a6[_0x2552b3(0x1ac)]),_0x4b0bb8=!![];else!_0x5974a6[_0x2552b3(0x1ac)]&&_0x1292d6[_0x2552b3(0x1f0)](_0x3f5bf6);continue;}_0x1292d6[_0x2552b3(0x1f0)](_0x3f5bf6);}return _0x5974a6[_0x2552b3(0x1cb)]&&!_0x121340&&_0x1292d6[_0x2552b3(0x1e2)](_0x5974a6['jsUrl']),_0x5974a6[_0x2552b3(0x1ac)]&&!_0x4b0bb8&&_0x1292d6[_0x2552b3(0x1f0)](_0x5974a6[_0x2552b3(0x1ac)]),_0x1292d6;}function isJsResource(_0x2f782b){const _0x77aa4b=a186_0x3229;return stripQuery(_0x2f782b)['toLowerCase']()[_0x77aa4b(0x1d7)]('.js');}function isCssResource(_0x222432){const _0x10799c=a186_0x3229;return stripQuery(_0x222432)[_0x10799c(0x1b1)]()[_0x10799c(0x1d7)](_0x10799c(0x1e1));}function stripQuery(_0xc71e2f){const _0x3508dc=a186_0x3229;return _0xc71e2f[_0x3508dc(0x1cd)]('?')[0x0]??_0xc71e2f;}function parseUpdateParamsFlag(_0x4527ad){const _0x5d9da0=a186_0x3229;if(!_0x4527ad||typeof _0x4527ad!==_0x5d9da0(0x1e5))return{};try{const _0x305749=JSON[_0x5d9da0(0x1d8)](_0x4527ad);if(typeof _0x305749!==_0x5d9da0(0x1eb)||_0x305749===null||Array[_0x5d9da0(0x1e3)](_0x305749))return{};return{'jsUrl':typeof _0x305749[_0x5d9da0(0x1cb)]===_0x5d9da0(0x1e5)?_0x305749[_0x5d9da0(0x1cb)][_0x5d9da0(0x1c8)]():undefined,'cssUrl':typeof _0x305749[_0x5d9da0(0x1ac)]===_0x5d9da0(0x1e5)?_0x305749[_0x5d9da0(0x1ac)][_0x5d9da0(0x1c8)]():undefined};}catch{return{};}}
1
+ (function(_0x124620,_0x2bf25f){const _0x1fc506=a186_0x405d,_0x301fa1=_0x124620();while(!![]){try{const _0x251317=-parseInt(_0x1fc506(0x181))/0x1*(-parseInt(_0x1fc506(0x17d))/0x2)+-parseInt(_0x1fc506(0x1a1))/0x3*(-parseInt(_0x1fc506(0x1a6))/0x4)+-parseInt(_0x1fc506(0x1a7))/0x5*(-parseInt(_0x1fc506(0x182))/0x6)+parseInt(_0x1fc506(0x16a))/0x7+parseInt(_0x1fc506(0x17e))/0x8*(-parseInt(_0x1fc506(0x1a9))/0x9)+parseInt(_0x1fc506(0x18e))/0xa*(parseInt(_0x1fc506(0x19c))/0xb)+parseInt(_0x1fc506(0x1ab))/0xc*(-parseInt(_0x1fc506(0x19a))/0xd);if(_0x251317===_0x2bf25f)break;else _0x301fa1['push'](_0x301fa1['shift']());}catch(_0x59e445){_0x301fa1['push'](_0x301fa1['shift']());}}}(a186_0x1f53,0xf3075));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x4b9010){const _0x1f365a=a186_0x405d,_0x516565=[];return _0x4b9010[_0x1f365a(0x1ae)]&&!isValidJsHttpsUrl(_0x4b9010[_0x1f365a(0x1ae)])&&_0x516565[_0x1f365a(0x19d)]({'field':'jsUrl','message':_0x1f365a(0x19f)}),_0x4b9010['cssUrl']&&!isValidCssHttpsUrl(_0x4b9010[_0x1f365a(0x185)])&&_0x516565[_0x1f365a(0x19d)]({'field':_0x1f365a(0x185),'message':_0x1f365a(0x19e)}),_0x516565;}export async function runMenuUpdateCore(_0x53bd69,_0x15f0cb,_0x2829bf,_0x5a49c3={}){const _0x19f0bd=a186_0x405d,_0x525944=parseUpdateParamsFlag(_0x2829bf),_0x480155=normalizeMode(_0x5a49c3['mode']);validateSelection(_0x5a49c3[_0x19f0bd(0x18b)]);const _0x1fdafa=[];if(_0x525944[_0x19f0bd(0x1ae)])_0x1fdafa['push'](_0x525944[_0x19f0bd(0x1ae)]);if(_0x525944[_0x19f0bd(0x185)])_0x1fdafa[_0x19f0bd(0x19d)](_0x525944[_0x19f0bd(0x185)]);const _0x34b2ee=validateParams(_0x525944);if(_0x34b2ee[_0x19f0bd(0x1a5)]>0x0){const _0x21b41c=_0x34b2ee['map'](_0x16b054=>_0x19f0bd(0x173)+_0x16b054[_0x19f0bd(0x180)]+':\x20'+_0x16b054[_0x19f0bd(0x195)])[_0x19f0bd(0x1b0)](';\x20');throw new Error(_0x19f0bd(0x189)+_0x21b41c);}if(_0x1fdafa['length']===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x19f0bd(0x187));logger[_0x19f0bd(0x1a8)](process[_0x19f0bd(0x168)]()),logger[_0x19f0bd(0x17f)]('menu-asset-update','Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x53bd69,'jsUrl':_0x525944[_0x19f0bd(0x1ae)],'cssUrl':_0x525944['cssUrl'],'mode':_0x480155,'dryRun':_0x5a49c3[_0x19f0bd(0x174)]===!![]});if(_0x525944[_0x19f0bd(0x1ae)]){const _0x5a9ace=await isUrlReachable(_0x525944['jsUrl']);if(!_0x5a9ace)throw new Error(_0x19f0bd(0x196)+_0x525944[_0x19f0bd(0x1ae)]);}if(_0x525944[_0x19f0bd(0x185)]){const _0x2a84af=await isUrlReachable(_0x525944[_0x19f0bd(0x185)]);if(!_0x2a84af)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x525944[_0x19f0bd(0x185)]);}const _0x45b6d4=await getOnlineMenuList(_0x53bd69,_0x15f0cb),_0x16e488=_0x45b6d4[_0x19f0bd(0x17a)](_0x1b1ba0=>_0x1b1ba0[_0x19f0bd(0x193)]['length']>0x0),_0x5d55c5=selectMenusForUpdate(_0x16e488,_0x5a49c3[_0x19f0bd(0x18b)]);if(_0x5d55c5[_0x19f0bd(0x1a5)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x5a49c3[_0x19f0bd(0x174)]===!![]};const _0x1d9a09=_0x5d55c5[_0x19f0bd(0x18c)](_0x377dbd=>buildMenuUpdateDiff(_0x377dbd,_0x525944,_0x480155,_0x5a49c3['force']===!![],_0x5a49c3['loadScriptMode']));if(_0x5a49c3[_0x19f0bd(0x174)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x1d9a09};const _0x2052da=await Promise[_0x19f0bd(0x19b)](_0x5d55c5[_0x19f0bd(0x18c)]((_0x48235d,_0x27cbe3)=>updateMenuCdnUrl(_0x53bd69,_0x15f0cb,{'id':_0x48235d['id'],'label':_0x48235d[_0x19f0bd(0x1a3)],'path':_0x48235d[_0x19f0bd(0x1aa)],'resources':_0x1d9a09[_0x27cbe3][_0x19f0bd(0x1a2)][_0x19f0bd(0x193)],'extend':_0x48235d[_0x19f0bd(0x1ad)]??null,'loadScriptMode':_0x5a49c3[_0x19f0bd(0x184)]}))),_0x1c1134=_0x2052da[_0x19f0bd(0x17a)](_0x11dbb8=>_0x11dbb8['status']===_0x19f0bd(0x18d))['map'](_0x1f800b=>_0x1f800b[_0x19f0bd(0x16e)]),_0x25b0dd=_0x2052da[_0x19f0bd(0x17a)](_0x4582fd=>_0x4582fd['status']===_0x19f0bd(0x175))[_0x19f0bd(0x1a5)];return logger[_0x19f0bd(0x17f)](_0x19f0bd(0x171),_0x19f0bd(0x186),{'count':_0x5d55c5[_0x19f0bd(0x1a5)],'resources':_0x1fdafa}),{'updated':_0x1c1134[_0x19f0bd(0x1a5)],'failed':_0x25b0dd,'skipped':![],'menus':_0x1c1134};}function validateSelection(_0x5a296c){const _0x4362d8=a186_0x405d;if(!_0x5a296c)throw new Error(_0x4362d8(0x172));if(_0x5a296c[_0x4362d8(0x16c)]&&(_0x5a296c[_0x4362d8(0x183)][_0x4362d8(0x1a5)]>0x0||_0x5a296c[_0x4362d8(0x17c)]['length']>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x5a296c['all']&&_0x5a296c[_0x4362d8(0x183)][_0x4362d8(0x1a5)]===0x0&&_0x5a296c[_0x4362d8(0x17c)]['length']===0x0)throw new Error(_0x4362d8(0x172));}export function selectMenusForUpdate(_0x323a22,_0xdc4030){const _0x202c60=a186_0x405d;validateSelection(_0xdc4030);if(_0xdc4030[_0x202c60(0x16c)])return _0x323a22;const _0x2b2bed=new Set(_0x323a22['map'](_0x4362f2=>_0x4362f2['id'])),_0x2c36a6=new Set(_0x323a22[_0x202c60(0x18c)](_0x41908e=>_0x41908e['path'])),_0x27bc91=_0xdc4030[_0x202c60(0x183)][_0x202c60(0x17a)](_0x4754f8=>!_0x2b2bed[_0x202c60(0x199)](_0x4754f8)),_0x47cbcd=_0xdc4030[_0x202c60(0x17c)]['filter'](_0x1e9a4e=>!_0x2c36a6[_0x202c60(0x199)](_0x1e9a4e));if(_0x27bc91[_0x202c60(0x1a5)]>0x0||_0x47cbcd[_0x202c60(0x1a5)]>0x0){const _0xeef05f=[..._0x27bc91[_0x202c60(0x18c)](_0x4992e2=>String(_0x4992e2)),..._0x47cbcd]['join'](',\x20');throw new Error(_0x202c60(0x179)+_0xeef05f);}const _0x5680f3=new Set(_0xdc4030[_0x202c60(0x183)]),_0xd48758=new Set(_0xdc4030[_0x202c60(0x17c)]);return _0x323a22[_0x202c60(0x17a)](_0x3d4d21=>_0x5680f3[_0x202c60(0x199)](_0x3d4d21['id'])||_0xd48758['has'](_0x3d4d21[_0x202c60(0x1aa)]));}function a186_0x405d(_0xcc36c1,_0x58bbab){_0xcc36c1=_0xcc36c1-0x168;const _0x1f53c1=a186_0x1f53();let _0x405d59=_0x1f53c1[_0xcc36c1];return _0x405d59;}function a186_0x1f53(){const _0x1e12e0=['message','JS\x20URL\x20is\x20unreachable:\x20','replace',').\x20','has','2673385OiSRHq','allSettled','110UPVYKF','push','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','menu\x20asset-update\x20cannot\x20patch\x20','42345yKdzPN','after','label','some','length','296FXjREZ','130pXUeIu','setLogPath','198puNwpV','path','204raEWgX','patch','extend','jsUrl','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','join','cwd','split','11207042QKejDR','string','all','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','value','.js','\x20existing\x20JS\x20resources\x20for\x20\x22','menu-asset-update','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','--params.','dryRun','rejected','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','.css','\x20existing\x20CSS\x20resources\x20for\x20\x22','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','filter','toLowerCase','paths','69728cUELTN','494704HUfdMI','info','field','48AcEXuM','352668GnMHMi','menuIds','loadScriptMode','cssUrl','Menu\x20asset\x20update\x20completed','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','parse','Invalid\x20--params:\x20','isArray','selection','map','fulfilled','4630lTEDbK','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','Invalid\x20--mode:\x20','unshift','endsWith','resources','\x22\x20('];a186_0x1f53=function(){return _0x1e12e0;};return a186_0x1f53();}function normalizeMode(_0x365d82){const _0xd00a00=a186_0x405d;if(!_0x365d82)return _0xd00a00(0x1ac);if(_0x365d82===_0xd00a00(0x197)||_0x365d82===_0xd00a00(0x1ac))return _0x365d82;throw new Error(_0xd00a00(0x190)+_0x365d82+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x52c7e0,_0x5d6647,_0x8dc88e,_0x11c5e9,_0x11661d){const _0x3ac6d5=a186_0x405d,_0xf4dfd7=[..._0x52c7e0[_0x3ac6d5(0x193)]];_0x8dc88e===_0x3ac6d5(0x1ac)&&assertUnambiguousPatchResources(_0x52c7e0,_0xf4dfd7,_0x5d6647);const _0x48eea2=_0x8dc88e===_0x3ac6d5(0x1ac)?patchResources(_0xf4dfd7,_0x5d6647):replaceResources(_0x5d6647),_0x329658=[],_0x124add=_0xf4dfd7[_0x3ac6d5(0x1a4)](isJsResource),_0x899c59=_0x48eea2[_0x3ac6d5(0x1a4)](isJsResource);if(_0x124add&&!_0x899c59){const _0x35f01c=_0x3ac6d5(0x18f)+_0x52c7e0['label']+'\x22\x20('+_0x52c7e0[_0x3ac6d5(0x1aa)]+_0x3ac6d5(0x198)+_0x3ac6d5(0x176);if(!_0x11c5e9)throw new Error(_0x35f01c);_0x329658[_0x3ac6d5(0x19d)](_0x35f01c);}const _0x55ba5a=_0xf4dfd7[_0x3ac6d5(0x1a4)](isCssResource),_0x5134aa=_0x48eea2[_0x3ac6d5(0x1a4)](isCssResource);_0x55ba5a&&!_0x5134aa&&_0x329658['push'](_0x3ac6d5(0x16d)+_0x52c7e0[_0x3ac6d5(0x1a3)]+'\x22\x20('+_0x52c7e0[_0x3ac6d5(0x1aa)]+').');const _0x16424e=typeof _0x52c7e0[_0x3ac6d5(0x1ad)]?.[_0x3ac6d5(0x184)]===_0x3ac6d5(0x16b)?_0x52c7e0[_0x3ac6d5(0x1ad)]['loadScriptMode']:null,_0x2abe0e=_0x11661d?{'loadScriptMode':_0x16424e}:{},_0x4e66c6=_0x11661d?{'loadScriptMode':_0x11661d}:{};return{'id':_0x52c7e0['id'],'label':_0x52c7e0['label'],'path':_0x52c7e0[_0x3ac6d5(0x1aa)],'mode':_0x8dc88e,'before':{'resources':_0xf4dfd7,..._0x2abe0e},'after':{'resources':_0x48eea2,..._0x4e66c6},'warnings':_0x329658};}function replaceResources(_0x21b3c6){const _0x43bdea=a186_0x405d;return[_0x21b3c6[_0x43bdea(0x1ae)],_0x21b3c6[_0x43bdea(0x185)]][_0x43bdea(0x17a)](_0x3dc971=>!!_0x3dc971);}function assertUnambiguousPatchResources(_0x5532d8,_0x580d58,_0x1dd543){const _0x382334=a186_0x405d,_0x35320b=_0x580d58[_0x382334(0x17a)](isJsResource)['length'];if(_0x1dd543[_0x382334(0x1ae)]&&_0x35320b>0x1)throw new Error(_0x382334(0x1a0)+_0x35320b+_0x382334(0x170)+_0x5532d8[_0x382334(0x1a3)]+_0x382334(0x194)+_0x5532d8[_0x382334(0x1aa)]+')\x20'+'with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');const _0x5e047f=_0x580d58[_0x382334(0x17a)](isCssResource)[_0x382334(0x1a5)];if(_0x1dd543['cssUrl']&&_0x5e047f>0x1)throw new Error(_0x382334(0x1a0)+_0x5e047f+_0x382334(0x178)+_0x5532d8['label']+_0x382334(0x194)+_0x5532d8['path']+')\x20'+_0x382334(0x1af));}function patchResources(_0x2dbde5,_0x5a90cc){const _0x52d18e=a186_0x405d;let _0x2f0793=![],_0x53b72c=![];const _0x33cccb=[];for(const _0x140cb9 of _0x2dbde5){if(isJsResource(_0x140cb9)){if(_0x5a90cc['jsUrl']&&!_0x2f0793)_0x33cccb[_0x52d18e(0x19d)](_0x5a90cc[_0x52d18e(0x1ae)]),_0x2f0793=!![];else!_0x5a90cc[_0x52d18e(0x1ae)]&&_0x33cccb[_0x52d18e(0x19d)](_0x140cb9);continue;}if(isCssResource(_0x140cb9)){if(_0x5a90cc[_0x52d18e(0x185)]&&!_0x53b72c)_0x33cccb[_0x52d18e(0x19d)](_0x5a90cc[_0x52d18e(0x185)]),_0x53b72c=!![];else!_0x5a90cc[_0x52d18e(0x185)]&&_0x33cccb[_0x52d18e(0x19d)](_0x140cb9);continue;}_0x33cccb[_0x52d18e(0x19d)](_0x140cb9);}return _0x5a90cc['jsUrl']&&!_0x2f0793&&_0x33cccb[_0x52d18e(0x191)](_0x5a90cc[_0x52d18e(0x1ae)]),_0x5a90cc[_0x52d18e(0x185)]&&!_0x53b72c&&_0x33cccb[_0x52d18e(0x19d)](_0x5a90cc[_0x52d18e(0x185)]),_0x33cccb;}function isJsResource(_0x2d5a33){const _0x399764=a186_0x405d;return stripQuery(_0x2d5a33)[_0x399764(0x17b)]()['endsWith'](_0x399764(0x16f));}function isCssResource(_0x4cc66f){const _0x589c3a=a186_0x405d;return stripQuery(_0x4cc66f)[_0x589c3a(0x17b)]()[_0x589c3a(0x192)](_0x589c3a(0x177));}function stripQuery(_0x22fa3d){const _0x3b055c=a186_0x405d;return _0x22fa3d[_0x3b055c(0x169)]('?')[0x0]??_0x22fa3d;}function parseUpdateParamsFlag(_0x47b5fc){const _0xb818b2=a186_0x405d;if(!_0x47b5fc||typeof _0x47b5fc!==_0xb818b2(0x16b))return{};try{const _0x3548a2=JSON[_0xb818b2(0x188)](_0x47b5fc);if(typeof _0x3548a2!=='object'||_0x3548a2===null||Array[_0xb818b2(0x18a)](_0x3548a2))return{};return{'jsUrl':typeof _0x3548a2[_0xb818b2(0x1ae)]===_0xb818b2(0x16b)?_0x3548a2[_0xb818b2(0x1ae)]['trim']():undefined,'cssUrl':typeof _0x3548a2[_0xb818b2(0x185)]===_0xb818b2(0x16b)?_0x3548a2['cssUrl']['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x26756c,_0x3d132a){const _0x5424ec=a187_0x4857,_0x5cf3ba=_0x26756c();while(!![]){try{const _0x4d776f=-parseInt(_0x5424ec(0xc0))/0x1*(parseInt(_0x5424ec(0xbb))/0x2)+parseInt(_0x5424ec(0xc2))/0x3*(parseInt(_0x5424ec(0xbf))/0x4)+-parseInt(_0x5424ec(0xbd))/0x5*(-parseInt(_0x5424ec(0xb9))/0x6)+-parseInt(_0x5424ec(0xbe))/0x7*(-parseInt(_0x5424ec(0xb8))/0x8)+-parseInt(_0x5424ec(0xbc))/0x9*(parseInt(_0x5424ec(0xc1))/0xa)+parseInt(_0x5424ec(0xb3))/0xb*(parseInt(_0x5424ec(0xb5))/0xc)+-parseInt(_0x5424ec(0xba))/0xd;if(_0x4d776f===_0x3d132a)break;else _0x5cf3ba['push'](_0x5cf3ba['shift']());}catch(_0x5dff91){_0x5cf3ba['push'](_0x5cf3ba['shift']());}}}(a187_0x559c,0x48e24));export function isValidJsHttpsUrl(_0x1029b1){const _0x499537=a187_0x4857;return/^https:\/\/.+\.js(\?.*)?$/[_0x499537(0xb1)](_0x1029b1[_0x499537(0xb6)]());}function a187_0x559c(){const _0x417db3=['417830rlxUGV','344qYBJuJ','2tvtbpZ','160VoNRDf','18738LjJoZV','GET','test','bytes=0-0','204017hhiHpe','body','348FEFodw','trim','HEAD','40PURlQT','361356NPfsAw','9074221XqqofF','46298wmQFpi','219852CkkbJy','5adRMAG'];a187_0x559c=function(){return _0x417db3;};return a187_0x559c();}export function isValidCssHttpsUrl(_0x3732fa){const _0x499eb6=a187_0x4857;return/^https:\/\/.+\.css(\?.*)?$/[_0x499eb6(0xb1)](_0x3732fa[_0x499eb6(0xb6)]());}function a187_0x4857(_0x2d4533,_0x3f137c){_0x2d4533=_0x2d4533-0xb1;const _0x559c1b=a187_0x559c();let _0x48578b=_0x559c1b[_0x2d4533];return _0x48578b;}export async function isUrlReachable(_0x3c65a6){const _0x45cdb0=a187_0x4857;try{const _0x3e5fe3=await fetch(_0x3c65a6,{'method':_0x45cdb0(0xb7)});if(_0x3e5fe3['ok'])return!![];}catch{}try{const _0x32c56e=await fetch(_0x3c65a6,{'method':_0x45cdb0(0xc3),'headers':{'Range':_0x45cdb0(0xb2)}}),_0x1f2e11=_0x32c56e['ok'];try{await _0x32c56e[_0x45cdb0(0xb4)]?.['cancel']();}catch{}return _0x1f2e11;}catch{return![];}}
1
+ (function(_0x3d2987,_0x2147eb){const _0x43a17c=a187_0x4645,_0x5b894b=_0x3d2987();while(!![]){try{const _0x477394=parseInt(_0x43a17c(0x9a))/0x1*(-parseInt(_0x43a17c(0x8e))/0x2)+-parseInt(_0x43a17c(0x8c))/0x3*(parseInt(_0x43a17c(0x97))/0x4)+-parseInt(_0x43a17c(0x8f))/0x5+-parseInt(_0x43a17c(0x95))/0x6+parseInt(_0x43a17c(0x96))/0x7+parseInt(_0x43a17c(0x8d))/0x8*(-parseInt(_0x43a17c(0x92))/0x9)+parseInt(_0x43a17c(0x98))/0xa;if(_0x477394===_0x2147eb)break;else _0x5b894b['push'](_0x5b894b['shift']());}catch(_0x11e674){_0x5b894b['push'](_0x5b894b['shift']());}}}(a187_0x2cd6,0x7e90c));function a187_0x4645(_0x14e6c9,_0x3146b1){_0x14e6c9=_0x14e6c9-0x8a;const _0x2cd67c=a187_0x2cd6();let _0x46451b=_0x2cd67c[_0x14e6c9];return _0x46451b;}function a187_0x2cd6(){const _0x2fab99=['cancel','326583TPchHO','bytes=0-0','trim','1604634zBkDzb','754362UidphB','16396ePtmFT','18828670YQATRc','body','6487eRzYGS','test','HEAD','537taeOPW','16TqDqng','106MbKqYP','273380bHpvgw','GET'];a187_0x2cd6=function(){return _0x2fab99;};return a187_0x2cd6();}export function isValidJsHttpsUrl(_0x110ecc){const _0x346191=a187_0x4645;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x110ecc[_0x346191(0x94)]());}export function isValidCssHttpsUrl(_0x3dcf46){const _0x5c5ec8=a187_0x4645;return/^https:\/\/.+\.css(\?.*)?$/[_0x5c5ec8(0x8a)](_0x3dcf46[_0x5c5ec8(0x94)]());}export async function isUrlReachable(_0x11b76e){const _0x10e588=a187_0x4645;try{const _0x23bbfa=await fetch(_0x11b76e,{'method':_0x10e588(0x8b)});if(_0x23bbfa['ok'])return!![];}catch{}try{const _0x1a5545=await fetch(_0x11b76e,{'method':_0x10e588(0x90),'headers':{'Range':_0x10e588(0x93)}}),_0x17bbbd=_0x1a5545['ok'];try{await _0x1a5545[_0x10e588(0x99)]?.[_0x10e588(0x91)]();}catch{}return _0x17bbbd;}catch{return![];}}
@@ -1 +1 @@
1
- const a188_0x4084a1=a188_0x59b0;(function(_0x2b9c53,_0x3cf9e1){const _0x5008b3=a188_0x59b0,_0x3a0c71=_0x2b9c53();while(!![]){try{const _0x369052=-parseInt(_0x5008b3(0x1c0))/0x1*(parseInt(_0x5008b3(0x1c9))/0x2)+parseInt(_0x5008b3(0x1be))/0x3*(parseInt(_0x5008b3(0x1c5))/0x4)+parseInt(_0x5008b3(0x1cd))/0x5*(-parseInt(_0x5008b3(0x1c4))/0x6)+parseInt(_0x5008b3(0x1c7))/0x7+parseInt(_0x5008b3(0x1c6))/0x8*(-parseInt(_0x5008b3(0x1b9))/0x9)+parseInt(_0x5008b3(0x1b8))/0xa*(parseInt(_0x5008b3(0x1bd))/0xb)+-parseInt(_0x5008b3(0x1cb))/0xc*(parseInt(_0x5008b3(0x1c8))/0xd);if(_0x369052===_0x3cf9e1)break;else _0x3a0c71['push'](_0x3a0c71['shift']());}catch(_0x4e436a){_0x3a0c71['push'](_0x3a0c71['shift']());}}}(a188_0xbfc8,0x1fa85));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_0x59b0(_0x38c1f1,_0x14fe54){_0x38c1f1=_0x38c1f1-0x1b7;const _0xbfc83f=a188_0xbfc8();let _0x59b073=_0xbfc83f[_0x38c1f1];return _0x59b073;}export const menuSubappAssetsStatus={'service':a188_0x4084a1(0x1cc),'command':a188_0x4084a1(0x1c2),'description':a188_0x4084a1(0x1bb),'risk':a188_0x4084a1(0x1ba),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x57d6a9){getSubappSelector(_0x57d6a9);},async 'execute'(_0x2e2b62){const _0x313402=a188_0x4084a1,{appCode:_0x531124,appName:_0xc4401b}=getSubappSelector(_0x2e2b62),[_0x174af3,_0x1e994e]=await Promise[_0x313402(0x1c1)]([getSmartAppRecord(_0x531124,_0x2e2b62[_0x313402(0x1ca)]),getOnlineMenuList(_0x531124,_0x2e2b62[_0x313402(0x1ca)])]),_0x5d13bc={'appCode':_0x531124,...buildSubappAssetsStatus(_0x174af3,_0x1e994e,_0xc4401b)};return{'ok':!![],'data':_0x5d13bc,'message':_0x313402(0x1b7)+_0x5d13bc[_0x313402(0x1c3)]+_0x313402(0x1bc)+_0xc4401b+_0x313402(0x1bf)+_0x531124+'.'};}};function a188_0xbfc8(){const _0x896b49=['all','subapp-assets-status','boundMenus','203742povoqA','41604jkXreq','80cnCoRx','1716589Lnmqtn','13uVYdME','8uvGuUR','cookie','1495716mxzKLV','menu','20MkLlKm','Inspected\x20','10qAlqby','92520WbELpn','read','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','\x20menu(s)\x20for\x20','1607221ceSgZA','66SuNJOh','\x20in\x20menu\x20host\x20','31805ZVnAjM'];a188_0xbfc8=function(){return _0x896b49;};return a188_0xbfc8();}
1
+ const a188_0x44b7ff=a188_0x564c;(function(_0xb8dbdd,_0x1e7160){const _0x59acc5=a188_0x564c,_0x337ab4=_0xb8dbdd();while(!![]){try{const _0xbf24a2=parseInt(_0x59acc5(0x1e3))/0x1*(-parseInt(_0x59acc5(0x1e1))/0x2)+-parseInt(_0x59acc5(0x1e4))/0x3*(-parseInt(_0x59acc5(0x1ef))/0x4)+parseInt(_0x59acc5(0x1e0))/0x5*(parseInt(_0x59acc5(0x1dd))/0x6)+parseInt(_0x59acc5(0x1e6))/0x7*(parseInt(_0x59acc5(0x1de))/0x8)+parseInt(_0x59acc5(0x1ed))/0x9+-parseInt(_0x59acc5(0x1e5))/0xa*(-parseInt(_0x59acc5(0x1df))/0xb)+parseInt(_0x59acc5(0x1e8))/0xc*(-parseInt(_0x59acc5(0x1eb))/0xd);if(_0xbf24a2===_0x1e7160)break;else _0x337ab4['push'](_0x337ab4['shift']());}catch(_0x4612e5){_0x337ab4['push'](_0x337ab4['shift']());}}}(a188_0x5b8a,0xcf6ee));function a188_0x564c(_0x20da3d,_0x41c551){_0x20da3d=_0x20da3d-0x1da;const _0x5b8a76=a188_0x5b8a();let _0x564c3d=_0x5b8a76[_0x20da3d];return _0x564c3d;}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_0x5b8a(){const _0x38a027=['1022607lQRWeE','9870dxDLxd','2586150AUWMpS','read','36udGtRS','all','\x20in\x20menu\x20host\x20','2602028cWYnxB','menu','5676012itxSIt','subapp-assets-status','4VBZGcW','cookie','boundMenus','\x20menu(s)\x20for\x20','1068fqKUVG','8cysdJG','9493xtySuD','23860VjwlFT','1592070Cvordi','Inspected\x20','2YAydKU'];a188_0x5b8a=function(){return _0x38a027;};return a188_0x5b8a();}export const menuSubappAssetsStatus={'service':a188_0x44b7ff(0x1ec),'command':a188_0x44b7ff(0x1ee),'description':'Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','risk':a188_0x44b7ff(0x1e7),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x350cb2){getSubappSelector(_0x350cb2);},async 'execute'(_0x2d4738){const _0xa071b=a188_0x44b7ff,{appCode:_0x488592,appName:_0x2bbd41}=getSubappSelector(_0x2d4738),[_0x1146dd,_0x46070a]=await Promise[_0xa071b(0x1e9)]([getSmartAppRecord(_0x488592,_0x2d4738['cookie']),getOnlineMenuList(_0x488592,_0x2d4738[_0xa071b(0x1da)])]),_0x3a90b2={'appCode':_0x488592,...buildSubappAssetsStatus(_0x1146dd,_0x46070a,_0x2bbd41)};return{'ok':!![],'data':_0x3a90b2,'message':_0xa071b(0x1e2)+_0x3a90b2[_0xa071b(0x1db)]+_0xa071b(0x1dc)+_0x2bbd41+_0xa071b(0x1ea)+_0x488592+'.'};}};
@@ -1 +1 @@
1
- const a189_0x57552e=a189_0x13d3;(function(_0x4eba67,_0xf22bc5){const _0x2b50a9=a189_0x13d3,_0x5e03ed=_0x4eba67();while(!![]){try{const _0x570b73=-parseInt(_0x2b50a9(0x9a))/0x1+parseInt(_0x2b50a9(0x8b))/0x2+parseInt(_0x2b50a9(0xc8))/0x3*(-parseInt(_0x2b50a9(0xa7))/0x4)+-parseInt(_0x2b50a9(0xbc))/0x5+parseInt(_0x2b50a9(0xb3))/0x6*(-parseInt(_0x2b50a9(0xa5))/0x7)+-parseInt(_0x2b50a9(0xc0))/0x8+parseInt(_0x2b50a9(0x99))/0x9*(parseInt(_0x2b50a9(0xb7))/0xa);if(_0x570b73===_0xf22bc5)break;else _0x5e03ed['push'](_0x5e03ed['shift']());}catch(_0x2c039b){_0x5e03ed['push'](_0x5e03ed['shift']());}}}(a189_0x178b,0xa55db));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';function a189_0x178b(){const _0x343e1a=['apiError','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','7379072XmEMew','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.',']\x20must\x20be\x20a\x20URL\x20string.','string','accessKey','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','validation','some','3SFicbU','update','directDbId','subapp-assets-update','resources[','appName','cookie','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','verified\x20app.extend','hex','str','join','\x20must\x20be\x20a\x20JSON\x20array.','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','entries',';\x20independent\x20deployment\x20not\x20verified.','object',';\x20found\x20','--resources\x20is\x20required.','expected-hash','vipDeploy','2674594mwExFE','enableOpenApi','unchanged','length','enableSample','trim','appCode','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','app.extend','Would\x20update\x20shared\x20assets\x20for\x20','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','sha256','https:','protocol','9CXfqqB','1300268gRTErM','expectedHash','test','assets','isArray','resources','Unknown\x20app.extend\x20fields:\x20','stringify','before','POST','nextExtend','575078tNyabe','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','2633460lvicaA','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','.\x20Refusing\x20update.','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.','\x20contains\x20invalid\x20JSON.','appPublishStatus','parse','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','enableAutoSync','write','not\x20HTTPS','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','6LQlEKF','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','filter','\x20in\x20menu\x20host\x20','31778990ivTVbs','tenantColumn','size','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','/smartapi/app/update','4373430LykGEw',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.'];a189_0x178b=function(){return _0x343e1a;};return a189_0x178b();}import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set(['skinColor',a189_0x57552e(0x8c),a189_0x57552e(0xc4),a189_0x57552e(0x9d),a189_0x57552e(0xb8),a189_0x57552e(0x8f),a189_0x57552e(0x8a),a189_0x57552e(0xaf),a189_0x57552e(0xca),'directDbEnabled']);function parseObject(_0x141cb6,_0xf06a60){const _0x3975eb=a189_0x57552e;let _0x3d49d0=_0x141cb6;if(typeof _0x141cb6===_0x3975eb(0xc3))try{_0x3d49d0=JSON['parse'](_0x141cb6);}catch{throw CliErrors[_0x3975eb(0xc6)](_0xf06a60+'\x20contains\x20invalid\x20JSON.');}if(!_0x3d49d0||typeof _0x3d49d0!==_0x3975eb(0x86)||Array['isArray'](_0x3d49d0))throw CliErrors[_0x3975eb(0xc6)](_0xf06a60+'\x20must\x20be\x20a\x20JSON\x20object.');return _0x3d49d0;}function parseArray(_0x51ca5d,_0x4ecd38){const _0x38f4a9=a189_0x57552e;let _0x267b6d;try{_0x267b6d=JSON[_0x38f4a9(0xad)](_0x51ca5d);}catch{throw CliErrors[_0x38f4a9(0xc6)](_0x4ecd38+_0x38f4a9(0xab));}if(!Array[_0x38f4a9(0x9e)](_0x267b6d))throw CliErrors[_0x38f4a9(0xc6)](_0x4ecd38+_0x38f4a9(0xd4));return _0x267b6d['map']((_0x677261,_0x3af693)=>parseObject(_0x677261,_0x4ecd38+'['+_0x3af693+']'));}function validateResources(_0x3b19f9){const _0x4b5cea=a189_0x57552e;if(_0x3b19f9['length']===0x0)throw CliErrors[_0x4b5cea(0xc6)](_0x4b5cea(0xa8));for(const [_0x38bc07,_0x1740df]of _0x3b19f9[_0x4b5cea(0xd6)]()){if(typeof _0x1740df!==_0x4b5cea(0xc3))throw CliErrors[_0x4b5cea(0xc6)](_0x4b5cea(0xcc)+_0x38bc07+_0x4b5cea(0xc2));try{if(new URL(_0x1740df)[_0x4b5cea(0x98)]!==_0x4b5cea(0x97))throw new Error(_0x4b5cea(0xb1));}catch{throw CliErrors[_0x4b5cea(0xc6)](_0x4b5cea(0xcc)+_0x38bc07+_0x4b5cea(0xbd));}}if(new Set(_0x3b19f9)[_0x4b5cea(0xb9)]!==_0x3b19f9['length']||!_0x3b19f9['some'](_0xbd4e67=>/\.m?js(?:[?#]|$)/i[_0x4b5cea(0x9c)](_0xbd4e67)))throw CliErrors[_0x4b5cea(0xc6)](_0x4b5cea(0xae));return _0x3b19f9;}function a189_0x13d3(_0x22c229,_0x5f34aa){_0x22c229=_0x22c229-0x86;const _0x178b89=a189_0x178b();let _0x13d335=_0x178b89[_0x22c229];return _0x13d335;}function prepare(_0x38bdea,_0x197d1d,_0x4f55f9){const _0x42c380=a189_0x57552e;if(!Number['isSafeInteger'](_0x38bdea['id'])||(_0x38bdea['id']??0x0)<=0x0||typeof _0x38bdea[_0x42c380(0xac)]!==_0x42c380(0xc3)||!_0x38bdea[_0x42c380(0xac)])throw CliErrors['validation'](_0x42c380(0xc1));const _0x550db1=parseObject(_0x38bdea['extend'],_0x42c380(0x93)),_0x256297=Object['keys'](_0x550db1)[_0x42c380(0xb5)](_0x197faa=>!KNOWN_EXTEND_KEYS['has'](_0x197faa));if(_0x256297[_0x42c380(0x8e)])throw CliErrors[_0x42c380(0xc6)](_0x42c380(0xa0)+_0x256297[_0x42c380(0xd3)](',\x20')+_0x42c380(0xa9));if(typeof _0x550db1[_0x42c380(0x9d)]!==_0x42c380(0xc3))throw CliErrors['validation'](_0x42c380(0xa6));const _0x318ff1=parseArray(_0x550db1[_0x42c380(0x9d)],'app.extend.assets'),_0x282022=_0x318ff1['filter'](_0x2a7114=>_0x2a7114[_0x42c380(0xcd)]===_0x197d1d);if(_0x282022[_0x42c380(0x8e)]!==0x1)throw CliErrors[_0x42c380(0xc6)](_0x42c380(0xd5)+_0x197d1d+_0x42c380(0x87)+_0x282022['length']+'.');const _0x1ee04d=_0x282022[0x0];if(typeof _0x1ee04d[_0x42c380(0x9f)]!=='string')throw CliErrors[_0x42c380(0xc6)](_0x42c380(0xb4));let _0x16d8d8;try{_0x16d8d8=JSON[_0x42c380(0xad)](_0x1ee04d[_0x42c380(0x9f)]);}catch{throw CliErrors[_0x42c380(0xc6)]('Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.');}if(!Array[_0x42c380(0x9e)](_0x16d8d8)||_0x16d8d8[_0x42c380(0xc7)](_0x2d6793=>typeof _0x2d6793!==_0x42c380(0xc3)))throw CliErrors[_0x42c380(0xc6)](_0x42c380(0xbf));const _0x2e0a84=_0x318ff1['map'](_0x34c229=>_0x34c229===_0x1ee04d?{..._0x34c229,'resources':JSON[_0x42c380(0xa1)](_0x4f55f9)}:_0x34c229),_0x5f2276={..._0x550db1,'assets':JSON[_0x42c380(0xa1)](_0x2e0a84)},_0x953500=createHash(_0x42c380(0x96))[_0x42c380(0xc9)](JSON[_0x42c380(0xa1)]({'appCode':_0x38bdea[_0x42c380(0x91)],'id':_0x38bdea['id'],'appPublishStatus':_0x38bdea[_0x42c380(0xac)],'extend':_0x550db1,'appName':_0x197d1d,'resources':_0x4f55f9}))['digest'](_0x42c380(0xd1));return{'before':_0x16d8d8,'nextExtend':_0x5f2276,'expectedHash':_0x953500,'unchanged':isDeepStrictEqual(_0x16d8d8,_0x4f55f9)};}function flags(_0xa5694e){const _0x23e4c1=a189_0x57552e,{appCode:_0x2a070e,appName:_0x4f5f82}=getSubappSelector(_0xa5694e),_0x30c328=_0xa5694e[_0x23e4c1(0xd2)](_0x23e4c1(0x9f))[_0x23e4c1(0x90)]();if(!_0x30c328)throw CliErrors[_0x23e4c1(0xc6)](_0x23e4c1(0x88));let _0x5874c5;try{_0x5874c5=JSON[_0x23e4c1(0xad)](_0x30c328);}catch{throw CliErrors['validation'](_0x23e4c1(0xb2));}if(!Array[_0x23e4c1(0x9e)](_0x5874c5))throw CliErrors[_0x23e4c1(0xc6)](_0x23e4c1(0xb2));return{'appCode':_0x2a070e,'appName':_0x4f5f82,'resources':validateResources(_0x5874c5)};}export const menuSubappAssetsUpdate={'service':'menu','command':a189_0x57552e(0xcb),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a189_0x57552e(0xb0),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a189_0x57552e(0x9f),'type':a189_0x57552e(0xc3),'required':!![],'description':a189_0x57552e(0xba)},{'name':a189_0x57552e(0x89),'type':a189_0x57552e(0xc3),'description':a189_0x57552e(0xc5)}],async 'validate'(_0x40537c){flags(_0x40537c);},async 'dryRun'(_0x2321a1){const _0x23ed04=a189_0x57552e,{appCode:_0x17cb5a,appName:_0x2df66c,resources:_0x3e854b}=flags(_0x2321a1),_0x53e455=await getSmartAppRecord(_0x17cb5a,_0x2321a1['cookie']),_0x57baf3=prepare(_0x53e455,_0x2df66c,_0x3e854b);return{'method':_0x23ed04(0xa3),'url':_0x23ed04(0xbb),'body':{'preview':{'appCode':_0x17cb5a,'appName':_0x2df66c,'before':_0x57baf3[_0x23ed04(0xa2)],'after':_0x3e854b,'expectedHash':_0x57baf3[_0x23ed04(0x9b)],'unchanged':_0x57baf3[_0x23ed04(0x8d)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x57baf3[_0x23ed04(0x8d)]?_0x23ed04(0xaa):_0x23ed04(0x94)+_0x2df66c+'.'};},async 'execute'(_0x481ead){const _0x17745b=a189_0x57552e,{appCode:_0x1ef3b4,appName:_0x24c6b1,resources:_0xb1d853}=flags(_0x481ead),_0x36247e=_0x481ead['str'](_0x17745b(0x89))[_0x17745b(0x90)]();if(!/^[a-f0-9]{64}$/i[_0x17745b(0x9c)](_0x36247e))throw CliErrors[_0x17745b(0xc6)](_0x17745b(0x95));const _0x3c4942=await getSmartAppRecord(_0x1ef3b4,_0x481ead[_0x17745b(0xce)]),_0x27afc2=prepare(_0x3c4942,_0x24c6b1,_0xb1d853);if(_0x36247e!==_0x27afc2[_0x17745b(0x9b)])throw CliErrors[_0x17745b(0xc6)]('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0x27afc2[_0x17745b(0x8d)])return{'ok':!![],'data':{'appCode':_0x1ef3b4,'appName':_0x24c6b1,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x17745b(0xcf)};await updateSmartAppRecord({'id':_0x3c4942['id'],'appCode':_0x1ef3b4,'appPublishStatus':_0x3c4942[_0x17745b(0xac)],'extend':_0x27afc2['nextExtend']},_0x481ead[_0x17745b(0xce)]);const _0xd116b=await getSmartAppRecord(_0x1ef3b4,_0x481ead[_0x17745b(0xce)]),_0xd7945f=parseObject(_0xd116b['extend'],_0x17745b(0xd0));if(_0xd116b['id']!==_0x3c4942['id']||_0xd116b[_0x17745b(0xac)]!==_0x3c4942[_0x17745b(0xac)]||!isDeepStrictEqual(_0xd7945f,_0x27afc2[_0x17745b(0xa4)]))throw CliErrors[_0x17745b(0xbe)](_0x17745b(0x92));return{'ok':!![],'data':{'appCode':_0x1ef3b4,'appName':_0x24c6b1,'updated':!![],'resources':_0xb1d853,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Updated\x20shared\x20resources\x20for\x20'+_0x24c6b1+_0x17745b(0xb6)+_0x1ef3b4+_0x17745b(0xd7)};}};
1
+ const a189_0x184da3=a189_0xfe87;(function(_0x122866,_0x212b7d){const _0xbada69=a189_0xfe87,_0x217715=_0x122866();while(!![]){try{const _0x139191=parseInt(_0xbada69(0x1ec))/0x1+parseInt(_0xbada69(0x1ef))/0x2*(-parseInt(_0xbada69(0x225))/0x3)+-parseInt(_0xbada69(0x21e))/0x4*(parseInt(_0xbada69(0x201))/0x5)+parseInt(_0xbada69(0x1e0))/0x6*(-parseInt(_0xbada69(0x21f))/0x7)+-parseInt(_0xbada69(0x1df))/0x8+parseInt(_0xbada69(0x1eb))/0x9+parseInt(_0xbada69(0x20b))/0xa*(parseInt(_0xbada69(0x204))/0xb);if(_0x139191===_0x212b7d)break;else _0x217715['push'](_0x217715['shift']());}catch(_0x32f854){_0x217715['push'](_0x217715['shift']());}}}(a189_0xbcf0,0x505c3));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a189_0x184da3(0x216),a189_0x184da3(0x1e3),'accessKey',a189_0x184da3(0x223),a189_0x184da3(0x1fe),'enableSample','vipDeploy',a189_0x184da3(0x219),a189_0x184da3(0x1e7),'directDbEnabled']);function parseObject(_0x4a8f36,_0x5b00a7){const _0xd6aaf0=a189_0x184da3;let _0x39109a=_0x4a8f36;if(typeof _0x4a8f36==='string')try{_0x39109a=JSON['parse'](_0x4a8f36);}catch{throw CliErrors[_0xd6aaf0(0x208)](_0x5b00a7+_0xd6aaf0(0x1f5));}if(!_0x39109a||typeof _0x39109a!==_0xd6aaf0(0x1f8)||Array[_0xd6aaf0(0x1dc)](_0x39109a))throw CliErrors[_0xd6aaf0(0x208)](_0x5b00a7+'\x20must\x20be\x20a\x20JSON\x20object.');return _0x39109a;}function a189_0xfe87(_0x10b76a,_0x10562e){_0x10b76a=_0x10b76a-0x1da;const _0xbcf0bc=a189_0xbcf0();let _0xfe87c9=_0xbcf0bc[_0x10b76a];return _0xfe87c9;}function a189_0xbcf0(){const _0x15a80f=['Unknown\x20app.extend\x20fields:\x20','\x20contains\x20invalid\x20JSON.','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','object','digest','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','str','appPublishStatus','tenantColumn','length','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','309535uzIrhJ',';\x20found\x20','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','11lnknSj','https:','resources[','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','validation','hex','nextExtend','2700980LlFJNO','appName','POST','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','extend','Would\x20update\x20shared\x20assets\x20for\x20','join','expected-hash','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','/smartapi/app/update','some','skinColor','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','menu','enableAutoSync','verified\x20app.extend','entries','expectedHash','parse','8xLQnwR','7658rhSOjQ','keys','map','test','assets','not\x20HTTPS','7503KKAjsT','isSafeInteger','--resources\x20is\x20required.','app.extend','unchanged','stringify','subapp-assets-update','isArray','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','protocol','1422440RuHsNF','1662NlhvFY','cookie','Updated\x20shared\x20resources\x20for\x20','enableOpenApi',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','trim','string','directDbId','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','update','4464396pPJapO','180175sZICXd',']\x20must\x20be\x20a\x20URL\x20string.','filter','10zNrHnj','has','resources','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','\x20must\x20be\x20a\x20JSON\x20array.'];a189_0xbcf0=function(){return _0x15a80f;};return a189_0xbcf0();}function parseArray(_0x45f798,_0x15fdfe){const _0x431e6c=a189_0x184da3;let _0x1a4868;try{_0x1a4868=JSON[_0x431e6c(0x21d)](_0x45f798);}catch{throw CliErrors[_0x431e6c(0x208)](_0x15fdfe+_0x431e6c(0x1f5));}if(!Array[_0x431e6c(0x1dc)](_0x1a4868))throw CliErrors['validation'](_0x15fdfe+_0x431e6c(0x1f3));return _0x1a4868['map']((_0x3b8cbd,_0x1cab96)=>parseObject(_0x3b8cbd,_0x15fdfe+'['+_0x1cab96+']'));}function validateResources(_0x47b8f8){const _0x13ed1e=a189_0x184da3;if(_0x47b8f8[_0x13ed1e(0x1ff)]===0x0)throw CliErrors[_0x13ed1e(0x208)](_0x13ed1e(0x1e9));for(const [_0x39c6ec,_0x3c546c]of _0x47b8f8[_0x13ed1e(0x21b)]()){if(typeof _0x3c546c!=='string')throw CliErrors[_0x13ed1e(0x208)]('resources['+_0x39c6ec+_0x13ed1e(0x1ed));try{if(new URL(_0x3c546c)[_0x13ed1e(0x1de)]!==_0x13ed1e(0x205))throw new Error(_0x13ed1e(0x224));}catch{throw CliErrors[_0x13ed1e(0x208)](_0x13ed1e(0x206)+_0x39c6ec+_0x13ed1e(0x1e4));}}if(new Set(_0x47b8f8)['size']!==_0x47b8f8[_0x13ed1e(0x1ff)]||!_0x47b8f8[_0x13ed1e(0x215)](_0xb4c0d5=>/\.m?js(?:[?#]|$)/i[_0x13ed1e(0x222)](_0xb4c0d5)))throw CliErrors[_0x13ed1e(0x208)](_0x13ed1e(0x20e));return _0x47b8f8;}function prepare(_0x3f24e2,_0xf6b253,_0x1a3416){const _0x106ace=a189_0x184da3;if(!Number[_0x106ace(0x226)](_0x3f24e2['id'])||(_0x3f24e2['id']??0x0)<=0x0||typeof _0x3f24e2[_0x106ace(0x1fd)]!==_0x106ace(0x1e6)||!_0x3f24e2[_0x106ace(0x1fd)])throw CliErrors[_0x106ace(0x208)](_0x106ace(0x1dd));const _0x40ac7b=parseObject(_0x3f24e2[_0x106ace(0x20f)],_0x106ace(0x228)),_0x3b4a24=Object[_0x106ace(0x220)](_0x40ac7b)[_0x106ace(0x1ee)](_0x4c24df=>!KNOWN_EXTEND_KEYS[_0x106ace(0x1f0)](_0x4c24df));if(_0x3b4a24[_0x106ace(0x1ff)])throw CliErrors[_0x106ace(0x208)](_0x106ace(0x1f4)+_0x3b4a24[_0x106ace(0x211)](',\x20')+'.\x20Refusing\x20update.');if(typeof _0x40ac7b[_0x106ace(0x223)]!==_0x106ace(0x1e6))throw CliErrors['validation'](_0x106ace(0x1f7));const _0x478569=parseArray(_0x40ac7b[_0x106ace(0x223)],'app.extend.assets'),_0x45974e=_0x478569['filter'](_0x1e6966=>_0x1e6966[_0x106ace(0x20c)]===_0xf6b253);if(_0x45974e[_0x106ace(0x1ff)]!==0x1)throw CliErrors[_0x106ace(0x208)](_0x106ace(0x1f2)+_0xf6b253+_0x106ace(0x202)+_0x45974e[_0x106ace(0x1ff)]+'.');const _0x4b7a4c=_0x45974e[0x0];if(typeof _0x4b7a4c['resources']!==_0x106ace(0x1e6))throw CliErrors[_0x106ace(0x208)](_0x106ace(0x217));let _0x589d70;try{_0x589d70=JSON['parse'](_0x4b7a4c[_0x106ace(0x1f1)]);}catch{throw CliErrors[_0x106ace(0x208)](_0x106ace(0x1fb));}if(!Array[_0x106ace(0x1dc)](_0x589d70)||_0x589d70['some'](_0x2573d8=>typeof _0x2573d8!==_0x106ace(0x1e6)))throw CliErrors[_0x106ace(0x208)]('Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.');const _0xa62d4f=_0x478569[_0x106ace(0x221)](_0x24be7e=>_0x24be7e===_0x4b7a4c?{..._0x24be7e,'resources':JSON['stringify'](_0x1a3416)}:_0x24be7e),_0x53ce49={..._0x40ac7b,'assets':JSON[_0x106ace(0x1da)](_0xa62d4f)},_0x2bb50b=createHash('sha256')[_0x106ace(0x1ea)](JSON['stringify']({'appCode':_0x3f24e2['appCode'],'id':_0x3f24e2['id'],'appPublishStatus':_0x3f24e2['appPublishStatus'],'extend':_0x40ac7b,'appName':_0xf6b253,'resources':_0x1a3416}))[_0x106ace(0x1f9)](_0x106ace(0x209));return{'before':_0x589d70,'nextExtend':_0x53ce49,'expectedHash':_0x2bb50b,'unchanged':isDeepStrictEqual(_0x589d70,_0x1a3416)};}function flags(_0x25a49b){const _0x20fe0a=a189_0x184da3,{appCode:_0x362d04,appName:_0x342b12}=getSubappSelector(_0x25a49b),_0x479fda=_0x25a49b[_0x20fe0a(0x1fc)](_0x20fe0a(0x1f1))[_0x20fe0a(0x1e5)]();if(!_0x479fda)throw CliErrors[_0x20fe0a(0x208)](_0x20fe0a(0x227));let _0xab45d9;try{_0xab45d9=JSON['parse'](_0x479fda);}catch{throw CliErrors[_0x20fe0a(0x208)](_0x20fe0a(0x213));}if(!Array[_0x20fe0a(0x1dc)](_0xab45d9))throw CliErrors[_0x20fe0a(0x208)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0x362d04,'appName':_0x342b12,'resources':validateResources(_0xab45d9)};}export const menuSubappAssetsUpdate={'service':a189_0x184da3(0x218),'command':a189_0x184da3(0x1db),'description':a189_0x184da3(0x203),'risk':'write','strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':'resources','type':a189_0x184da3(0x1e6),'required':!![],'description':a189_0x184da3(0x1f6)},{'name':a189_0x184da3(0x212),'type':a189_0x184da3(0x1e6),'description':a189_0x184da3(0x200)}],async 'validate'(_0x557d83){flags(_0x557d83);},async 'dryRun'(_0x3cfae8){const _0x2a9f1f=a189_0x184da3,{appCode:_0x9679da,appName:_0x2dc619,resources:_0x414369}=flags(_0x3cfae8),_0x3f2381=await getSmartAppRecord(_0x9679da,_0x3cfae8[_0x2a9f1f(0x1e1)]),_0x1ab9d9=prepare(_0x3f2381,_0x2dc619,_0x414369);return{'method':_0x2a9f1f(0x20d),'url':_0x2a9f1f(0x214),'body':{'preview':{'appCode':_0x9679da,'appName':_0x2dc619,'before':_0x1ab9d9['before'],'after':_0x414369,'expectedHash':_0x1ab9d9[_0x2a9f1f(0x21c)],'unchanged':_0x1ab9d9[_0x2a9f1f(0x229)],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x1ab9d9[_0x2a9f1f(0x229)]?'Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.':_0x2a9f1f(0x210)+_0x2dc619+'.'};},async 'execute'(_0x136115){const _0x3cf0c7=a189_0x184da3,{appCode:_0x58ad4f,appName:_0x305bfe,resources:_0x3c774f}=flags(_0x136115),_0x5901ec=_0x136115[_0x3cf0c7(0x1fc)](_0x3cf0c7(0x212))[_0x3cf0c7(0x1e5)]();if(!/^[a-f0-9]{64}$/i['test'](_0x5901ec))throw CliErrors['validation']('--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.');const _0x258f61=await getSmartAppRecord(_0x58ad4f,_0x136115[_0x3cf0c7(0x1e1)]),_0x343836=prepare(_0x258f61,_0x305bfe,_0x3c774f);if(_0x5901ec!==_0x343836[_0x3cf0c7(0x21c)])throw CliErrors['validation'](_0x3cf0c7(0x207));if(_0x343836[_0x3cf0c7(0x229)])return{'ok':!![],'data':{'appCode':_0x58ad4f,'appName':_0x305bfe,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x3cf0c7(0x1fa)};await updateSmartAppRecord({'id':_0x258f61['id'],'appCode':_0x58ad4f,'appPublishStatus':_0x258f61[_0x3cf0c7(0x1fd)],'extend':_0x343836[_0x3cf0c7(0x20a)]},_0x136115[_0x3cf0c7(0x1e1)]);const _0x4ea1f8=await getSmartAppRecord(_0x58ad4f,_0x136115[_0x3cf0c7(0x1e1)]),_0x3cfce2=parseObject(_0x4ea1f8[_0x3cf0c7(0x20f)],_0x3cf0c7(0x21a));if(_0x4ea1f8['id']!==_0x258f61['id']||_0x4ea1f8['appPublishStatus']!==_0x258f61['appPublishStatus']||!isDeepStrictEqual(_0x3cfce2,_0x343836[_0x3cf0c7(0x20a)]))throw CliErrors['apiError'](_0x3cf0c7(0x1e8));return{'ok':!![],'data':{'appCode':_0x58ad4f,'appName':_0x305bfe,'updated':!![],'resources':_0x3c774f,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x3cf0c7(0x1e2)+_0x305bfe+'\x20in\x20menu\x20host\x20'+_0x58ad4f+';\x20independent\x20deployment\x20not\x20verified.'};}};
@@ -1 +1 @@
1
- const a190_0xb9417a=a190_0x5965;(function(_0x3be949,_0x3511f8){const _0x16eff1=a190_0x5965,_0x55b120=_0x3be949();while(!![]){try{const _0x203a32=-parseInt(_0x16eff1(0x177))/0x1+parseInt(_0x16eff1(0x159))/0x2*(parseInt(_0x16eff1(0x15c))/0x3)+parseInt(_0x16eff1(0x12e))/0x4+parseInt(_0x16eff1(0x171))/0x5*(-parseInt(_0x16eff1(0x150))/0x6)+-parseInt(_0x16eff1(0x160))/0x7*(-parseInt(_0x16eff1(0x15f))/0x8)+-parseInt(_0x16eff1(0x14d))/0x9+parseInt(_0x16eff1(0x15b))/0xa;if(_0x203a32===_0x3511f8)break;else _0x55b120['push'](_0x55b120['shift']());}catch(_0x39a26b){_0x55b120['push'](_0x55b120['shift']());}}}(a190_0x18b7,0x9df2b));function a190_0x5965(_0x542884,_0x374aff){_0x542884=_0x542884-0x12e;const _0x18b747=a190_0x18b7();let _0x5965af=_0x18b747[_0x542884];return _0x5965af;}import a190_0x4c8e0a from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0xb9417a(0x15e),'command':a190_0xb9417a(0x168),'description':a190_0xb9417a(0x16c),'risk':a190_0xb9417a(0x16d),'flags':[{'name':'params','type':a190_0xb9417a(0x15a),'description':a190_0xb9417a(0x169)+'JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.'},{'name':'paths','type':a190_0xb9417a(0x15a),'description':a190_0xb9417a(0x158)},{'name':a190_0xb9417a(0x164),'type':a190_0xb9417a(0x143),'description':a190_0xb9417a(0x16e)}],async 'dryRun'(_0x2e8006){const _0x1d8018=a190_0xb9417a;ensureRunnableContext(_0x2e8006[_0x1d8018(0x178)],_0x2e8006[_0x1d8018(0x139)]);const _0x54714e=await runMenuSyncCore(_0x2e8006['appCode'],_0x2e8006[_0x1d8018(0x144)],parsePaths(_0x2e8006[_0x1d8018(0x134)](_0x1d8018(0x14b))),_0x2e8006[_0x1d8018(0x134)](_0x1d8018(0x16b)),{'dryRun':!![]});return{'method':_0x1d8018(0x12f),'url':_0x1d8018(0x176),'body':_0x54714e,'description':_0x54714e['skipped']?_0x1d8018(0x147):'Would\x20create\x20'+_0x54714e[_0x1d8018(0x174)][_0x1d8018(0x16a)]+_0x1d8018(0x154)};},async 'execute'(_0x297a80){const _0x105f93=a190_0xb9417a;ensureRunnableContext(_0x297a80[_0x105f93(0x178)],_0x297a80[_0x105f93(0x139)]);const _0x24b7ff=_0x297a80[_0x105f93(0x156)]('yes'),_0x5d305f=_0x297a80[_0x105f93(0x134)](_0x105f93(0x16b)),_0x250f7a=parsePaths(_0x297a80[_0x105f93(0x134)](_0x105f93(0x14b))),_0x5ee48d=parseMenuSyncParams(_0x5d305f);if(_0x24b7ff){const _0xaa5c9=await runMenuSyncCore(_0x297a80[_0x105f93(0x151)],_0x297a80['cookie'],_0x250f7a,_0x5d305f);if(_0xaa5c9['skipped']){const _0x851b78=getLocalPages();_0x851b78['length']===0x0?writeCliSideChannelLine(_0x105f93(0x167)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x105f93(0x163)+_0xaa5c9['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0xaa5c9,'message':_0xaa5c9[_0x105f93(0x166)]?_0x105f93(0x162):'Menu\x20sync\x20completed:\x20'+_0xaa5c9[_0x105f93(0x146)]+_0x105f93(0x141)};}if(_0x250f7a[_0x105f93(0x16a)]>0x0)throw CliErrors['validation'](_0x105f93(0x138),_0x105f93(0x175));if(!isInteractive()&&_0x5d305f)throw CliErrors[_0x105f93(0x153)](_0x105f93(0x149),_0x105f93(0x175));requireInteractive(),writeCliSideChannelLine('Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.');const _0x105e75=startSpinner(_0x105f93(0x155));let _0x5bda50,_0x4d0959,_0x200d9b;try{const _0x4d59dc=await fetchMenuData(_0x297a80[_0x105f93(0x151)],_0x297a80[_0x105f93(0x144)]);_0x5bda50=_0x4d59dc[_0x105f93(0x135)],_0x4d0959=_0x4d59dc[_0x105f93(0x15d)],_0x200d9b=_0x4d59dc[_0x105f93(0x13e)],stopSpinner(_0x105e75,_0x105f93(0x13b),!![]);}catch(_0x307c84){stopSpinner(_0x105e75,_0x105f93(0x152),![]);throw CliErrors[_0x105f93(0x153)](_0x307c84 instanceof Error?_0x307c84[_0x105f93(0x172)]:_0x105f93(0x152));}if(_0x5bda50[_0x105f93(0x16a)]===0x0)return writeCliSideChannelLine(a190_0x4c8e0a[_0x105f93(0x13d)](_0x105f93(0x157))),{'ok':!![]};const _0x23855e=buildCompareRows(_0x5bda50,_0x4d0959);writeCliSideChannelLine(renderCompareTable(_0x23855e)),writeCliSideChannelLine('');const _0x5131a0=await selectPages(_0x5bda50,_0x4d0959);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x4c8e0a['cyan'](_0x105f93(0x13f)+_0x5131a0[_0x105f93(0x16a)]+_0x105f93(0x136)));const _0x435bef=_0x5ee48d[_0x105f93(0x133)]&&_0x5ee48d[_0x105f93(0x131)];if(!_0x435bef){writeCliSideChannelLine(renderSyncSummary(_0x5131a0,_0x4d0959['size']>0x0));const _0x1688bf=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x1688bf)return writeCliSideChannelLine(a190_0x4c8e0a['gray'](_0x105f93(0x14a))),{'ok':!![]};}let _0x2f93e2=_0x5ee48d[_0x105f93(0x133)],_0xf0c188=_0x5ee48d['cssUrl'];!_0x2f93e2&&!_0x5ee48d[_0x105f93(0x14c)]&&(_0x2f93e2=await askJsUrl());!_0xf0c188&&!_0x5ee48d[_0x105f93(0x14c)]&&(_0xf0c188=await askCssUrl());const _0xbce99f=await askConfirm(_0x5ee48d[_0x105f93(0x14c)]?_0x105f93(0x165)+_0x5131a0[_0x105f93(0x16a)]+_0x105f93(0x16f)+_0x5ee48d[_0x105f93(0x14c)]+'?':_0x105f93(0x165)+_0x5131a0[_0x105f93(0x16a)]+_0x105f93(0x137)+_0x2f93e2+_0x105f93(0x170)+_0xf0c188+'?');if(!_0xbce99f)return writeCliSideChannelLine(a190_0x4c8e0a['gray'](_0x105f93(0x14a))),{'ok':!![]};const _0xe53d24=[_0x2f93e2,_0xf0c188]['filter'](_0x21b739=>Boolean(_0x21b739));_0x5ee48d[_0x105f93(0x14c)]&&_0xe53d24[_0x105f93(0x16a)]===0x0&&await assertSharedResourcesConfigured(_0x297a80[_0x105f93(0x151)],_0x297a80[_0x105f93(0x144)],_0x5ee48d[_0x105f93(0x14c)]);const _0x424eb8=startSpinner(_0x105f93(0x13a)+_0x5131a0['length']+_0x105f93(0x140));try{const _0x5f0d97=_0x5131a0[_0x105f93(0x179)](_0x509bdf=>resolvePage(_0x509bdf,_0x5ee48d,_0x200d9b)),_0x2d8dec=await doCreateMenus(_0x297a80[_0x105f93(0x151)],_0x297a80[_0x105f93(0x144)],_0x5f0d97,_0xe53d24,_0x5ee48d[_0x105f93(0x14c)]?{'appName':_0x5ee48d[_0x105f93(0x14c)]}:undefined);return stopSpinner(_0x424eb8,_0x105f93(0x130)+_0x2d8dec[_0x105f93(0x146)]+_0x105f93(0x13c),!![]),{'ok':!![],'data':_0x2d8dec,'message':'Menu\x20sync\x20completed:\x20'+_0x2d8dec[_0x105f93(0x146)]+_0x105f93(0x148)+_0x2d8dec[_0x105f93(0x132)]+'\x20failed.'};}catch(_0x51dbfe){stopSpinner(_0x424eb8,_0x105f93(0x161),![]);throw CliErrors['validation'](_0x51dbfe instanceof Error?_0x51dbfe[_0x105f93(0x172)]:_0x105f93(0x161));}}};function ensureRunnableContext(_0x304f97,_0x54ecf9){const _0x15dd93=a190_0xb9417a,_0xb74320=_0x304f97[_0x15dd93(0x145)]?String(_0x304f97['appcode'])[_0x15dd93(0x14f)]():'';if(!isInProject()&&!_0x54ecf9&&!_0xb74320)throw CliErrors[_0x15dd93(0x153)](_0x15dd93(0x173)+_0x15dd93(0x142));}function a190_0x18b7(){const _0x209261=['appcode','created','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','\x20created,\x20','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','\x20\x20Cancelled.','paths','appName','2599137yhQIsY','filter','trim','12WxfDuU','appCode','Failed\x20to\x20fetch\x20online\x20menu\x20list','validation','\x20local\x20microfrontend\x20menu(s).','Fetching\x20online\x20menu\x20list...','flag','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','336208NPPhKl','string','17680650HwkGFe','12cIVDUY','onlinePaths','menu','8SBbpNL','917455xzptCU','Menu\x20creation\x20failed','Menu\x20sync\x20skipped','✓\x20Menu\x20sync\x20completed:\x20','yes','\x20\x20Create\x20','skipped','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','sync','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','length','params','Register\x20local\x20pages\x20as\x20platform\x20menus','write','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','\x20menu(s)\x20bound\x20to\x20','\x20and\x20CSS:\x20','2915030TTfrZd','message','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','targetPages','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','/smartapi/menu/create','1046567fpoOEw','rawFlags','map','2307124yTCajB','POST','Created\x20','cssUrl','failed','jsUrl','str','localPages','\x20page(s)','\x20menu(s)\x20with\x20JS:\x20','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','selectedAppName','Creating\x20','Online\x20menu\x20list\x20fetched','\x20menu(s)','yellow','onlineMenuList','\x20\x20✓\x20Selected:\x20','\x20menu(s)...','\x20created.','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','boolean','cookie'];a190_0x18b7=function(){return _0x209261;};return a190_0x18b7();}function parsePaths(_0x4e86ad){const _0x10e2fc=a190_0xb9417a;return[...new Set(_0x4e86ad['split'](',')[_0x10e2fc(0x179)](_0xf7b6df=>_0xf7b6df[_0x10e2fc(0x14f)]())[_0x10e2fc(0x14e)](Boolean))];}
1
+ function a190_0x275f(){const _0x19cc78=['✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20menu(s)','jsUrl','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','write','Failed\x20to\x20fetch\x20online\x20menu\x20list','cookie','appcode','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','1298718aQslJJ','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','onlinePaths','str','\x20menu(s)\x20with\x20JS:\x20','length','gray','validation','\x20failed.','created','params','1450408nXzUma','skipped','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','yes','Menu\x20sync\x20completed:\x20','string','\x20menu(s)...','2997ohrEHh','menu','Created\x20','Menu\x20creation\x20failed','cssUrl','Register\x20local\x20pages\x20as\x20platform\x20menus','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','selectedAppName','cyan','paths','targetPages','split','POST','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','message','rawFlags','sync','7OQluxP','122046QxUPSh','\x20created.','filter','\x20menu(s)\x20created','appCode','/smartapi/menu/create','appName','\x20created,\x20','\x20local\x20microfrontend\x20menu(s).','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','✓\x20Menu\x20sync\x20completed:\x20','yellow','map','23900iAMxYX','764632KPtHQW','926118toOrgw','failed','Would\x20create\x20','3948296PfXRoX','flag','20YoEPnv','size','Menu\x20sync\x20skipped','\x20menu(s)\x20bound\x20to\x20','trim','localPages','boolean','\x20and\x20CSS:\x20'];a190_0x275f=function(){return _0x19cc78;};return a190_0x275f();}const a190_0x24b48a=a190_0x508f;(function(_0x3ba8be,_0x5c800a){const _0x37746e=a190_0x508f,_0x98c81f=_0x3ba8be();while(!![]){try{const _0x189308=-parseInt(_0x37746e(0x160))/0x1+parseInt(_0x37746e(0x177))/0x2+-parseInt(_0x37746e(0x161))/0x3+-parseInt(_0x37746e(0x182))/0x4+-parseInt(_0x37746e(0x166))/0x5*(parseInt(_0x37746e(0x152))/0x6)+parseInt(_0x37746e(0x151))/0x7*(parseInt(_0x37746e(0x164))/0x8)+-parseInt(_0x37746e(0x189))/0x9*(-parseInt(_0x37746e(0x15f))/0xa);if(_0x189308===_0x5c800a)break;else _0x98c81f['push'](_0x98c81f['shift']());}catch(_0x35533b){_0x98c81f['push'](_0x98c81f['shift']());}}}(a190_0x275f,0x66e56));import a190_0x39bec0 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a190_0x508f(_0x54737f,_0x354d39){_0x54737f=_0x54737f-0x148;const _0x275fea=a190_0x275f();let _0x508ffc=_0x275fea[_0x54737f];return _0x508ffc;}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0x24b48a(0x18a),'command':a190_0x24b48a(0x150),'description':a190_0x24b48a(0x18e),'risk':a190_0x24b48a(0x172),'flags':[{'name':a190_0x24b48a(0x181),'type':'string','description':'Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20'+a190_0x24b48a(0x14d)},{'name':'paths','type':a190_0x24b48a(0x187),'description':a190_0x24b48a(0x15b)},{'name':a190_0x24b48a(0x185),'type':a190_0x24b48a(0x16c),'description':a190_0x24b48a(0x184)}],async 'dryRun'(_0x335b1a){const _0x339971=a190_0x24b48a;ensureRunnableContext(_0x335b1a[_0x339971(0x14f)],_0x335b1a[_0x339971(0x190)]);const _0x27853a=await runMenuSyncCore(_0x335b1a[_0x339971(0x156)],_0x335b1a[_0x339971(0x174)],parsePaths(_0x335b1a[_0x339971(0x17a)](_0x339971(0x149))),_0x335b1a['str'](_0x339971(0x181)),{'dryRun':!![]});return{'method':_0x339971(0x14c),'url':_0x339971(0x157),'body':_0x27853a,'description':_0x27853a[_0x339971(0x183)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x339971(0x163)+_0x27853a[_0x339971(0x14a)][_0x339971(0x17c)]+_0x339971(0x15a)};},async 'execute'(_0x545443){const _0x2f20c6=a190_0x24b48a;ensureRunnableContext(_0x545443[_0x2f20c6(0x14f)],_0x545443[_0x2f20c6(0x190)]);const _0x2b1f1b=_0x545443[_0x2f20c6(0x165)](_0x2f20c6(0x185)),_0x655ae6=_0x545443[_0x2f20c6(0x17a)](_0x2f20c6(0x181)),_0x4ce475=parsePaths(_0x545443['str'](_0x2f20c6(0x149))),_0x233b1c=parseMenuSyncParams(_0x655ae6);if(_0x2b1f1b){const _0x2a71ec=await runMenuSyncCore(_0x545443[_0x2f20c6(0x156)],_0x545443[_0x2f20c6(0x174)],_0x4ce475,_0x655ae6);if(_0x2a71ec['skipped']){const _0x4f4fd7=getLocalPages();_0x4f4fd7[_0x2f20c6(0x17c)]===0x0?writeCliSideChannelLine(_0x2f20c6(0x176)):writeCliSideChannelLine(_0x2f20c6(0x16e));}else writeCliSideChannelLine(_0x2f20c6(0x15c)+_0x2a71ec['created']+_0x2f20c6(0x155));return{'ok':!![],'data':_0x2a71ec,'message':_0x2a71ec[_0x2f20c6(0x183)]?_0x2f20c6(0x168):_0x2f20c6(0x186)+_0x2a71ec[_0x2f20c6(0x180)]+_0x2f20c6(0x153)};}if(_0x4ce475[_0x2f20c6(0x17c)]>0x0)throw CliErrors[_0x2f20c6(0x17e)](_0x2f20c6(0x18f),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x655ae6)throw CliErrors['validation']('Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive(),writeCliSideChannelLine('Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.');const _0x13f029=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x3bece2,_0x5d080c,_0x4cd7ad;try{const _0x2761e0=await fetchMenuData(_0x545443[_0x2f20c6(0x156)],_0x545443[_0x2f20c6(0x174)]);_0x3bece2=_0x2761e0[_0x2f20c6(0x16b)],_0x5d080c=_0x2761e0[_0x2f20c6(0x179)],_0x4cd7ad=_0x2761e0['onlineMenuList'],stopSpinner(_0x13f029,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x590c43){stopSpinner(_0x13f029,_0x2f20c6(0x173),![]);throw CliErrors[_0x2f20c6(0x17e)](_0x590c43 instanceof Error?_0x590c43['message']:_0x2f20c6(0x173));}if(_0x3bece2[_0x2f20c6(0x17c)]===0x0)return writeCliSideChannelLine(a190_0x39bec0[_0x2f20c6(0x15d)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x56477c=buildCompareRows(_0x3bece2,_0x5d080c);writeCliSideChannelLine(renderCompareTable(_0x56477c)),writeCliSideChannelLine('');const _0x522829=await selectPages(_0x3bece2,_0x5d080c);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x39bec0[_0x2f20c6(0x148)]('\x20\x20✓\x20Selected:\x20'+_0x522829[_0x2f20c6(0x17c)]+'\x20page(s)'));const _0x547211=_0x233b1c[_0x2f20c6(0x170)]&&_0x233b1c['cssUrl'];if(!_0x547211){writeCliSideChannelLine(renderSyncSummary(_0x522829,_0x5d080c[_0x2f20c6(0x167)]>0x0));const _0x780aa5=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x780aa5)return writeCliSideChannelLine(a190_0x39bec0[_0x2f20c6(0x17d)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x1e7f5b=_0x233b1c[_0x2f20c6(0x170)],_0x219860=_0x233b1c[_0x2f20c6(0x18d)];!_0x1e7f5b&&!_0x233b1c['appName']&&(_0x1e7f5b=await askJsUrl());!_0x219860&&!_0x233b1c['appName']&&(_0x219860=await askCssUrl());const _0x21014d=await askConfirm(_0x233b1c[_0x2f20c6(0x158)]?'\x20\x20Create\x20'+_0x522829[_0x2f20c6(0x17c)]+_0x2f20c6(0x169)+_0x233b1c[_0x2f20c6(0x158)]+'?':'\x20\x20Create\x20'+_0x522829[_0x2f20c6(0x17c)]+_0x2f20c6(0x17b)+_0x1e7f5b+_0x2f20c6(0x16d)+_0x219860+'?');if(!_0x21014d)return writeCliSideChannelLine(a190_0x39bec0[_0x2f20c6(0x17d)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x55fec2=[_0x1e7f5b,_0x219860]['filter'](_0x31a1ac=>Boolean(_0x31a1ac));_0x233b1c[_0x2f20c6(0x158)]&&_0x55fec2[_0x2f20c6(0x17c)]===0x0&&await assertSharedResourcesConfigured(_0x545443[_0x2f20c6(0x156)],_0x545443[_0x2f20c6(0x174)],_0x233b1c['appName']);const _0x3f54fc=startSpinner('Creating\x20'+_0x522829[_0x2f20c6(0x17c)]+_0x2f20c6(0x188));try{const _0x48353f=_0x522829[_0x2f20c6(0x15e)](_0x4c1bc7=>resolvePage(_0x4c1bc7,_0x233b1c,_0x4cd7ad)),_0x4c68e6=await doCreateMenus(_0x545443[_0x2f20c6(0x156)],_0x545443[_0x2f20c6(0x174)],_0x48353f,_0x55fec2,_0x233b1c[_0x2f20c6(0x158)]?{'appName':_0x233b1c[_0x2f20c6(0x158)]}:undefined);return stopSpinner(_0x3f54fc,_0x2f20c6(0x18b)+_0x4c68e6[_0x2f20c6(0x180)]+_0x2f20c6(0x16f),!![]),{'ok':!![],'data':_0x4c68e6,'message':_0x2f20c6(0x186)+_0x4c68e6['created']+_0x2f20c6(0x159)+_0x4c68e6[_0x2f20c6(0x162)]+_0x2f20c6(0x17f)};}catch(_0x2590d5){stopSpinner(_0x3f54fc,_0x2f20c6(0x18c),![]);throw CliErrors['validation'](_0x2590d5 instanceof Error?_0x2590d5[_0x2f20c6(0x14e)]:_0x2f20c6(0x18c));}}};function ensureRunnableContext(_0x514f7c,_0xc0f1ba){const _0x1d3470=a190_0x24b48a,_0x152811=_0x514f7c[_0x1d3470(0x175)]?String(_0x514f7c['appcode'])[_0x1d3470(0x16a)]():'';if(!isInProject()&&!_0xc0f1ba&&!_0x152811)throw CliErrors[_0x1d3470(0x17e)](_0x1d3470(0x178)+_0x1d3470(0x171));}function parsePaths(_0x21f4b5){const _0x4f46f3=a190_0x24b48a;return[...new Set(_0x21f4b5[_0x4f46f3(0x14b)](',')['map'](_0x1498cc=>_0x1498cc['trim']())[_0x4f46f3(0x154)](Boolean))];}
@@ -1 +1 @@
1
- const a191_0x5e6a12=a191_0x4a5e;(function(_0x5033b0,_0x4376c8){const _0x20830f=a191_0x4a5e,_0x3185a2=_0x5033b0();while(!![]){try{const _0x5cb63f=parseInt(_0x20830f(0x19f))/0x1*(-parseInt(_0x20830f(0x178))/0x2)+-parseInt(_0x20830f(0x1dc))/0x3+parseInt(_0x20830f(0x1b8))/0x4+-parseInt(_0x20830f(0x1ce))/0x5+parseInt(_0x20830f(0x19d))/0x6+-parseInt(_0x20830f(0x1c7))/0x7*(-parseInt(_0x20830f(0x1a0))/0x8)+parseInt(_0x20830f(0x199))/0x9;if(_0x5cb63f===_0x4376c8)break;else _0x3185a2['push'](_0x3185a2['shift']());}catch(_0x1c0573){_0x3185a2['push'](_0x3185a2['shift']());}}}(a191_0xbe67,0x98908));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a191_0xbe67(){const _0x225ebf=['cookie','resourcesValid','plannedActions','menu_permission_denied','boolean','byId','\x20failed.','pageId','pageType','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu-ids','verification','menuIds','childrenCount','menu','Response\x20was\x20lost\x20and\x20menu\x20','split','paths','\x20menu(s);\x20skip\x20','label','updated','hash','rabetbase\x20menu\x20list\x20--format\x20compress','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','set','640292WMFzUB','resources','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','expectedCount','update\x20visibility\x20for','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','path','update','Menu\x20id\x20selector(s)\x20not\x20found:\x20','stringify','Menu\x20visibility\x20update\x20completed:\x20','Final\x20menu\x20visibility\x20readback\x20failed.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20','recovered','has','code','requestedVisible','\x20menu(s),\x20expected\x20','expected-count','length','menu\x20list','str','warnings','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','menu_state_drift','\x20updated,\x20','map','message','menus','join','menu_selector_ambiguous','7235235xHgKuk','type','update-recovery','Menu\x20path\x20selector\x20not\x20found:\x20','4728738HorbTy','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','3VmJomM','16elNxAW','get','expectVisible','isArray','sort','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_verification_failed','Response\x20was\x20lost\x20for\x20menu\x20','\x20must\x20be\x20true\x20or\x20false.','modelType','menu_expected_count_mismatch','datasetCode','true','number','visibility-update','plan','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','datasetId','failed','Would\x20update\x20visibility\x20for\x20','trim','string','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','2034188uTzyFp','expect-visible','some','body','/smartapi/menu/update','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','POST','rawFlags','filter','write','\x20skipped,\x20','verify\x20menu\x20visibility\x20update','targets','beforeById','58163daKHla','menu_selector_not_found','Selected\x20','flagMissing','before','update\x20menu\x20visibility','push','2288900hxFsqt','\x20unchanged\x20menu(s).','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','values','validation','appCode','isSafeInteger','url','depth','childrenIds','visible','parentId','\x20visibility\x20update\x20could\x20not\x20be\x20verified','222243QUahAW'];a191_0xbe67=function(){return _0x225ebf;};return a191_0xbe67();}function a191_0x4a5e(_0x158d66,_0x530721){_0x158d66=_0x158d66-0x162;const _0xbe678e=a191_0xbe67();let _0x4a5ebf=_0xbe678e[_0x158d66];return _0x4a5ebf;}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x5e6a12(0x1bf),'path':a191_0x5e6a12(0x1bc)}];export const menuVisibilityUpdate={'service':a191_0x5e6a12(0x16d),'command':a191_0x5e6a12(0x1ae),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a191_0x5e6a12(0x1c2),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a191_0x5e6a12(0x1b5),'description':a191_0x5e6a12(0x1b6)},{'name':a191_0x5e6a12(0x170),'type':a191_0x5e6a12(0x1b5),'description':a191_0x5e6a12(0x167)},{'name':a191_0x5e6a12(0x1d9),'type':'boolean','required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a191_0x5e6a12(0x1b9),'type':a191_0x5e6a12(0x162),'description':a191_0x5e6a12(0x17d)},{'name':a191_0x5e6a12(0x18b),'type':a191_0x5e6a12(0x1ad),'description':a191_0x5e6a12(0x1b0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3aefde){parseInput(_0x3aefde);},async 'dryRun'(_0x4b96fa){const _0x4299e9=a191_0x5e6a12,_0x59b7ff=await buildPlan(_0x4b96fa,!![]),_0x2e4132=_0x59b7ff[_0x4299e9(0x1af)][_0x4299e9(0x1df)]?.[_0x4299e9(0x18c)]??0x0,_0x597160=_0x59b7ff[_0x4299e9(0x1af)][_0x4299e9(0x1c5)][_0x4299e9(0x18c)]-_0x2e4132;return menuDryRunResult(_0x59b7ff[_0x4299e9(0x1af)],{'method':'POST','url':'/smartapi/menu/update','body':{'updates':_0x59b7ff[_0x4299e9(0x1af)][_0x4299e9(0x1df)]?.['map'](_0x13a5a0=>_0x13a5a0[_0x4299e9(0x1bb)])??[]},'description':_0x4299e9(0x1b3)+_0x2e4132+_0x4299e9(0x171)+_0x597160+_0x4299e9(0x1cf)});},async 'execute'(_0x2ce898){const _0x4d062f=a191_0x5e6a12,_0xb77a34=await buildPlan(_0x2ce898,![]);await recheckMutationSnapshot(_0x2ce898,_0xb77a34['plan'],_0x4d062f(0x1cc));const _0x1ecaf5=[],_0x4283ab=[],_0x2b4979=[];for(const _0x4c98ef of _0xb77a34[_0x4d062f(0x1af)][_0x4d062f(0x1c5)]){if(_0x4c98ef[_0x4d062f(0x1cb)][_0x4d062f(0x1d9)]===_0xb77a34['plan'][_0x4d062f(0x189)]){_0x1ecaf5[_0x4d062f(0x1cd)]({'id':_0x4c98ef['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2ce898[_0x4d062f(0x1d4)],_0x2ce898[_0x4d062f(0x1dd)],{'id':_0x4c98ef['id'],'visible':_0xb77a34[_0x4d062f(0x1af)][_0x4d062f(0x189)]}),_0x1ecaf5[_0x4d062f(0x1cd)]({'id':_0x4c98ef['id'],'updated':!![],'skipped':![]});}catch(_0x19b94f){const _0x525b02=mapMenuApiError(_0x19b94f,_0x4d062f(0x17c),_0x4c98ef['id']);if(isMenuResponseLoss(_0x19b94f)&&_0x525b02[_0x4d062f(0x188)]!==_0x4d062f(0x1e0)){_0x2b4979[_0x4d062f(0x1cd)](_0x4c98ef['id']);continue;}_0x4283ab[_0x4d062f(0x1cd)]({'id':_0x4c98ef['id'],'stage':_0x4d062f(0x17f),'code':_0x525b02[_0x4d062f(0x188)],'message':_0x525b02[_0x4d062f(0x195)]});}}let _0x56111c;try{_0x56111c=await fetchMenuSnapshot(_0x2ce898[_0x4d062f(0x1d4)],_0x2ce898['cookie']);}catch(_0xc2426){const _0x41e70c=describeMenuErrorCause(_0xc2426,_0x4d062f(0x1c4)),_0x39c025=_0x2b4979[_0x4d062f(0x194)](_0x334e20=>({'id':_0x334e20,'stage':_0x4d062f(0x19b),'code':_0x4d062f(0x1a6),'message':_0x4d062f(0x1a7)+_0x334e20+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x8cf39c={'stage':'verification','code':_0x4d062f(0x1a6),'message':_0x4d062f(0x183),'targetIds':_0xb77a34[_0x4d062f(0x1af)][_0x4d062f(0x1c5)][_0x4d062f(0x194)](_0x429732=>_0x429732['id']),'requestedStateConfirmed':![],..._0x41e70c};throw menuFailure(asVerificationError(_0xc2426,_0x4d062f(0x1bd)),_0xb77a34[_0x4d062f(0x1af)],{'stage':_0x4d062f(0x16a),'succeeded':_0x1ecaf5,'failedRecords':[..._0x4283ab,..._0x39c025,_0x8cf39c],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x4d062f(0x1b2),'recoveredCount':0x0,'lookupCommand':_0x4d062f(0x175)}});}const _0x119393=[];for(const _0x4abbaf of _0x1ecaf5){const _0x46f727=Number(_0x4abbaf['id']),_0x2d242a=_0xb77a34[_0x4d062f(0x1c6)][_0x4d062f(0x1a1)](_0x46f727),_0xc6e2f3=_0x56111c[_0x4d062f(0x163)][_0x4d062f(0x1a1)](_0x46f727);try{verifyVisibilityUpdate(_0x2d242a,_0xc6e2f3,_0xb77a34['plan']['requestedVisible']);}catch(_0xe500a9){const _0x116bb8=asVerificationError(_0xe500a9,'Menu\x20'+_0x46f727+_0x4d062f(0x1db));_0x119393[_0x4d062f(0x1cd)]({'id':_0x46f727,'stage':_0x4d062f(0x16a),'code':_0x116bb8[_0x4d062f(0x188)],'message':_0x116bb8['message'],'requestedStateConfirmed':![]});}}for(const _0x52932d of _0x2b4979){const _0x4bee2f=_0xb77a34[_0x4d062f(0x1c6)][_0x4d062f(0x1a1)](_0x52932d),_0x5607a7=_0x56111c['byId'][_0x4d062f(0x1a1)](_0x52932d);try{verifyVisibilityUpdate(_0x4bee2f,_0x5607a7,_0xb77a34['plan'][_0x4d062f(0x189)]),_0x1ecaf5[_0x4d062f(0x1cd)]({'id':_0x52932d,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x55c39a){const _0x9f1ccc=asVerificationError(_0x55c39a,_0x4d062f(0x16e)+_0x52932d+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x119393['push']({'id':_0x52932d,'stage':_0x4d062f(0x19b),'code':_0x9f1ccc['code'],'message':_0x9f1ccc[_0x4d062f(0x195)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x119393[_0x4d062f(0x18c)]>0x0){const _0x1b19d6=_0x119393['map'](_0x3f51b9=>Number(_0x3f51b9['id'])),_0x25960b=_0x1ecaf5[_0x4d062f(0x1c1)](_0x3ef50b=>_0x3ef50b[_0x4d062f(0x186)]===!![])[_0x4d062f(0x18c)],_0x25cc3e=menuError(_0x4d062f(0x1a6),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x1b19d6[_0x4d062f(0x197)](',\x20')+'.',_0x4d062f(0x176));throw menuFailure(_0x25cc3e,_0xb77a34[_0x4d062f(0x1af)],{'stage':_0x4d062f(0x16a),'succeeded':_0x1ecaf5,'failedRecords':[..._0x4283ab,..._0x119393],'warnings':[_0x4d062f(0x1d0)],'verification':{'status':_0x4d062f(0x1b2),..._0x1b19d6['length']===0x1?{'targetId':_0x1b19d6[0x0]}:{'targetIds':_0x1b19d6},'recoveredCount':_0x25960b,'lookupCommand':_0x4d062f(0x175)}});}const _0x3a9813=_0x1ecaf5[_0x4d062f(0x1c1)](_0x153c6b=>_0x153c6b[_0x4d062f(0x173)]===!![])[_0x4d062f(0x18c)],_0x33465b=_0x1ecaf5[_0x4d062f(0x18c)]-_0x3a9813,_0x5a34f8={..._0xb77a34['plan'],'succeeded':_0x1ecaf5,'failed':_0x4283ab,'warnings':_0x4283ab[_0x4d062f(0x18c)]>0x0?[..._0xb77a34['plan'][_0x4d062f(0x18f)],_0x4d062f(0x1a5)]:_0xb77a34[_0x4d062f(0x1af)][_0x4d062f(0x18f)],'verification':{'checkedBy':_0x4d062f(0x18d),'snapshotHash':_0x56111c[_0x4d062f(0x174)],'matchesRequestedState':_0x4283ab[_0x4d062f(0x18c)]===0x0,'recoveredCount':_0x2b4979['length']}};return{'ok':_0x4283ab[_0x4d062f(0x18c)]===0x0,'data':_0x5a34f8,'message':_0x4283ab['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x3a9813+'\x20menu(s);\x20skipped\x20'+_0x33465b+'\x20unchanged\x20menu(s).':_0x4d062f(0x182)+_0x3a9813+_0x4d062f(0x193)+_0x33465b+_0x4d062f(0x1c3)+_0x4283ab[_0x4d062f(0x18c)]+_0x4d062f(0x164)};}};function parseInput(_0x41b1f0){const _0x23f306=a191_0x5e6a12,_0xce1704=parseMenuIds(_0x41b1f0[_0x23f306(0x18e)](_0x23f306(0x169))),_0x57aebc=parseCsv(_0x41b1f0[_0x23f306(0x18e)](_0x23f306(0x170)));if(_0xce1704[_0x23f306(0x18c)]===0x0&&_0x57aebc[_0x23f306(0x18c)]===0x0)throw CliErrors[_0x23f306(0x1d3)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x548452=parseBooleanFlag(_0x41b1f0,_0x23f306(0x1d9),!![]),_0x2e6618=parseBooleanFlag(_0x41b1f0,_0x23f306(0x1b9),![]);let _0x3a412a;if(hasFlag(_0x41b1f0,_0x23f306(0x18b))){_0x3a412a=_0x41b1f0['num'](_0x23f306(0x18b));if(!Number['isSafeInteger'](_0x3a412a)||_0x3a412a<0x0)throw CliErrors[_0x23f306(0x1d3)](_0x23f306(0x191));}return{'menuIds':_0xce1704,'paths':_0x57aebc,'visible':_0x548452,'expectVisible':_0x2e6618,'expectedCount':_0x3a412a};}async function buildPlan(_0x4779d8,_0x4738c3){const _0x448620=a191_0x5e6a12,_0x46c616=parseInput(_0x4779d8),_0x443dad=await fetchMutationSnapshot(_0x4779d8,_0x448620(0x1cc)),_0x2cea96=selectTargets(_0x443dad[_0x448620(0x196)],_0x46c616['menuIds'],_0x46c616[_0x448620(0x170)]);if(_0x46c616[_0x448620(0x17b)]!==undefined&&_0x2cea96['length']!==_0x46c616[_0x448620(0x17b)])throw menuError(_0x448620(0x1aa),_0x448620(0x1c9)+_0x2cea96['length']+_0x448620(0x18a)+_0x46c616[_0x448620(0x17b)]+'.',_0x448620(0x1b7));if(_0x46c616[_0x448620(0x1a2)]!==undefined){const _0x469c37=_0x2cea96[_0x448620(0x1c1)](_0x192c57=>_0x192c57['visible']!==_0x46c616[_0x448620(0x1a2)]);if(_0x469c37['length']>0x0)throw menuError(_0x448620(0x192),_0x448620(0x17a)+_0x469c37['map'](_0x2b6f48=>_0x2b6f48['id'])[_0x448620(0x197)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x565bc0=_0x2cea96[_0x448620(0x194)](_0x1ae733=>({'id':_0x1ae733['id'],'label':_0x1ae733['label'],'path':_0x1ae733['path'],'before':{'visible':_0x1ae733[_0x448620(0x1d9)]},'after':{'visible':_0x46c616[_0x448620(0x1d9)]}})),_0x1efd96=_0x565bc0[_0x448620(0x1c1)](_0x1c5a7a=>_0x1c5a7a[_0x448620(0x1cb)][_0x448620(0x1d9)]!==_0x46c616[_0x448620(0x1d9)])[_0x448620(0x194)](_0xf6a801=>({'stage':'update-menu-visibility','method':_0x448620(0x1bf),'path':_0x448620(0x1bc),'body':{'appCode':_0x4779d8[_0x448620(0x1d4)],'id':_0xf6a801['id'],'visible':_0x46c616[_0x448620(0x1d9)]}})),_0x49e520=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x46c616[_0x448620(0x16b)],'paths':_0x46c616['paths']},'before':{'menus':_0x2cea96[_0x448620(0x194)](_0x241274=>({'id':_0x241274['id'],'path':_0x241274[_0x448620(0x17e)],'visible':_0x241274[_0x448620(0x1d9)]}))},'after':{'menus':_0x2cea96['map'](_0x5bb820=>({'id':_0x5bb820['id'],'path':_0x5bb820['path'],'visible':_0x46c616[_0x448620(0x1d9)]}))},'dryRun':_0x4738c3,'backend':[...BACKEND],'plannedActions':_0x1efd96,'snapshotHash':_0x443dad[_0x448620(0x174)],'warnings':_0x1efd96[_0x448620(0x18c)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x49e520,'requestedVisible':_0x46c616[_0x448620(0x1d9)],'targets':_0x565bc0},'beforeById':new Map(_0x2cea96[_0x448620(0x194)](_0x3b00a9=>[_0x3b00a9['id'],_0x3b00a9]))};}function selectTargets(_0x389724,_0x54c46d,_0x36c102){const _0x328824=a191_0x5e6a12,_0x3da0e4=new Map(_0x389724[_0x328824(0x194)](_0x1385fb=>[_0x1385fb['id'],_0x1385fb])),_0x5c969b=new Map(),_0x13327b=_0x54c46d[_0x328824(0x1c1)](_0x11716e=>!_0x3da0e4[_0x328824(0x187)](_0x11716e));if(_0x13327b[_0x328824(0x18c)]>0x0)throw menuError(_0x328824(0x1c8),_0x328824(0x180)+_0x13327b['join'](',\x20')+'.',_0x328824(0x184));for(const _0x55fd61 of _0x54c46d){_0x5c969b[_0x328824(0x177)](_0x55fd61,_0x3da0e4[_0x328824(0x1a1)](_0x55fd61));}for(const _0x5283b2 of _0x36c102){const _0x472f0c=_0x389724['filter'](_0x12922b=>_0x12922b[_0x328824(0x17e)]===_0x5283b2);if(_0x472f0c['length']===0x0)throw menuError(_0x328824(0x1c8),_0x328824(0x19c)+JSON[_0x328824(0x181)](_0x5283b2)+'.',_0x328824(0x1d1));if(_0x472f0c[_0x328824(0x18c)]>0x1)throw menuError(_0x328824(0x198),_0x328824(0x19e)+JSON[_0x328824(0x181)](_0x5283b2)+'.',_0x328824(0x190)+_0x472f0c['map'](_0x28ebc6=>_0x28ebc6['id'])[_0x328824(0x197)](',\x20')+'.');const _0x391e59=_0x472f0c[0x0];_0x5c969b[_0x328824(0x177)](_0x391e59['id'],_0x391e59);}return[..._0x5c969b[_0x328824(0x1d2)]()];}function parseMenuIds(_0x593c94){const _0x4ac829=a191_0x5e6a12,_0x110090=parseCsv(_0x593c94),_0x355a90=_0x110090[_0x4ac829(0x194)](Number);if(_0x355a90[_0x4ac829(0x1ba)](_0x2e927b=>!Number[_0x4ac829(0x1d5)](_0x2e927b)||_0x2e927b<=0x0))throw CliErrors[_0x4ac829(0x1d3)](_0x4ac829(0x1be));return[...new Set(_0x355a90)];}function parseCsv(_0x34c720){const _0x5ebba5=a191_0x5e6a12;return[...new Set(_0x34c720[_0x5ebba5(0x16f)](',')[_0x5ebba5(0x194)](_0x59da20=>_0x59da20[_0x5ebba5(0x1b4)]())[_0x5ebba5(0x1c1)](Boolean))];}function parseBooleanFlag(_0x31b04d,_0x23786a,_0x416695){const _0x3eb18e=a191_0x5e6a12;if(!hasFlag(_0x31b04d,_0x23786a)){if(_0x416695)throw CliErrors[_0x3eb18e(0x1ca)](_0x23786a);return undefined;}const _0x136424=_0x31b04d[_0x3eb18e(0x1c0)][_0x23786a];if(_0x136424===!![]||_0x136424===![])return _0x136424;if(_0x136424===_0x3eb18e(0x1ac))return!![];if(_0x136424==='false')return![];throw CliErrors['validation']('--'+_0x23786a+_0x3eb18e(0x1a8));}function verifyVisibilityUpdate(_0x178141,_0xdf922a,_0x5f1cec){const _0x2347b7=a191_0x5e6a12;assertVerified(!!_0xdf922a,_0x2347b7(0x185)+_0x178141['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0xdf922a['visible']===_0x5f1cec,_0x2347b7(0x185)+_0x178141['id']+_0x2347b7(0x168));const _0x18c74f=[['id',_0xdf922a['id'],_0x178141['id']],[_0x2347b7(0x1da),_0xdf922a[_0x2347b7(0x1da)],_0x178141[_0x2347b7(0x1da)]],[_0x2347b7(0x1d7),_0xdf922a[_0x2347b7(0x1d7)],_0x178141['depth']],[_0x2347b7(0x172),_0xdf922a[_0x2347b7(0x172)],_0x178141[_0x2347b7(0x172)]],[_0x2347b7(0x17e),_0xdf922a[_0x2347b7(0x17e)],_0x178141['path']],[_0x2347b7(0x1d6),_0xdf922a[_0x2347b7(0x1d6)],_0x178141[_0x2347b7(0x1d6)]],[_0x2347b7(0x19a),_0xdf922a[_0x2347b7(0x19a)],_0x178141[_0x2347b7(0x19a)]],[_0x2347b7(0x1a4),_0xdf922a[_0x2347b7(0x1a4)],_0x178141[_0x2347b7(0x1a4)]],['resources',_0xdf922a[_0x2347b7(0x179)],_0x178141[_0x2347b7(0x179)]],['resourcesValid',_0xdf922a[_0x2347b7(0x1de)],_0x178141[_0x2347b7(0x1de)]],[_0x2347b7(0x1d8),_0xdf922a['childrenIds'],_0x178141[_0x2347b7(0x1d8)]],['childrenCount',_0xdf922a[_0x2347b7(0x16c)],_0x178141['childrenCount']],[_0x2347b7(0x165),_0xdf922a['pageId'],_0x178141[_0x2347b7(0x165)]],['pageType',_0xdf922a[_0x2347b7(0x166)],_0x178141[_0x2347b7(0x166)]],[_0x2347b7(0x1a9),_0xdf922a[_0x2347b7(0x1a9)],_0x178141[_0x2347b7(0x1a9)]],[_0x2347b7(0x1b1),_0xdf922a[_0x2347b7(0x1b1)],_0x178141['datasetId']],[_0x2347b7(0x1ab),_0xdf922a[_0x2347b7(0x1ab)],_0x178141[_0x2347b7(0x1ab)]]];for(const [_0x234174,_0x39a5f8,_0x1ca580]of _0x18c74f){assertVerified(sameValue(_0x39a5f8,_0x1ca580),_0x2347b7(0x185)+_0x178141['id']+'\x20'+_0x234174+'\x20changed\x20unexpectedly.');}}function sameValue(_0x3d90a6,_0x27322a){const _0x29dbb3=a191_0x5e6a12;if(Array[_0x29dbb3(0x1a3)](_0x3d90a6)||Array[_0x29dbb3(0x1a3)](_0x27322a))return JSON[_0x29dbb3(0x181)](_0x3d90a6)===JSON[_0x29dbb3(0x181)](_0x27322a);return _0x3d90a6===_0x27322a;}
1
+ const a191_0x1efda6=a191_0x8e7c;(function(_0x3ca620,_0x28a51a){const _0x99d016=a191_0x8e7c,_0x5094f1=_0x3ca620();while(!![]){try{const _0xf78971=-parseInt(_0x99d016(0x153))/0x1+-parseInt(_0x99d016(0xe7))/0x2+parseInt(_0x99d016(0x120))/0x3+parseInt(_0x99d016(0x147))/0x4+parseInt(_0x99d016(0x152))/0x5+-parseInt(_0x99d016(0x10f))/0x6*(-parseInt(_0x99d016(0x12e))/0x7)+-parseInt(_0x99d016(0x154))/0x8*(-parseInt(_0x99d016(0x141))/0x9);if(_0xf78971===_0x28a51a)break;else _0x5094f1['push'](_0x5094f1['shift']());}catch(_0x4b4375){_0x5094f1['push'](_0x5094f1['shift']());}}}(a191_0x26fc,0x1957b));function a191_0x8e7c(_0x4f3d57,_0x42333b){_0x4f3d57=_0x4f3d57-0xe7;const _0x26fcd1=a191_0x26fc();let _0x8e7ccf=_0x26fcd1[_0x4f3d57];return _0x8e7ccf;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';function a191_0x26fc(){const _0x9fd5d1=['\x20was\x20not\x20found\x20during\x20visibility\x20verification.','Requested\x20menu\x20visibility','failed','menu-ids','get','message','values','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','push','451602PejVdl','resources','\x20must\x20be\x20true\x20or\x20false.','depth','recovered','expected-count','452744qKGKUn','parentId','label','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','join','write','update','hash','Response\x20was\x20lost\x20and\x20menu\x20','set','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','61300lPJETW','103525pBkdPr','16lKRPtS','pageId','expectVisible','num','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','has','datasetCode','391034uHDXgG','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Updated\x20visibility\x20for\x20','validation','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','isArray','visibility-update','str','map','Menu\x20','resourcesValid','boolean','\x20menu(s);\x20skipped\x20','beforeById','plannedActions','code','\x20changed\x20unexpectedly.','verify\x20menu\x20visibility\x20update','update-recovery','\x20visibility\x20update\x20could\x20not\x20be\x20verified','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','type','menuIds','menu_verification_failed','\x20unchanged\x20menu(s).','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu\x20list','rawFlags','menu_permission_denied','visible','requestedVisible','updated','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','some','Response\x20was\x20lost\x20for\x20menu\x20','plan','paths','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','datasetId','Menu\x20id\x20selector(s)\x20not\x20found:\x20','426KulEnN','modelType','true','POST','appCode','verification','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','/smartapi/menu/update','childrenIds','isSafeInteger','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','path','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','url','filter','449337eIrZNW','rabetbase\x20menu\x20list\x20--format\x20compress','before','length','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','childrenCount','menu_selector_not_found','targets','sort','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','update\x20menu\x20visibility','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','cookie','menu_expected_count_mismatch','2688agJcTu','stringify','byId','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Menu\x20path\x20selector\x20not\x20found:\x20','expectedCount','\x20failed.','warnings','pageType'];a191_0x26fc=function(){return _0x9fd5d1;};return a191_0x26fc();}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':'POST','path':a191_0x1efda6(0x117)}];export const menuVisibilityUpdate={'service':'menu','command':a191_0x1efda6(0xed),'description':a191_0x1efda6(0x132),'risk':a191_0x1efda6(0x14c),'structuredErrors':!![],'flags':[{'name':a191_0x1efda6(0x13b),'type':'string','description':a191_0x1efda6(0x14a)},{'name':a191_0x1efda6(0x10b),'type':'string','description':a191_0x1efda6(0x11b)},{'name':a191_0x1efda6(0x104),'type':a191_0x1efda6(0xf2),'required':!![],'description':a191_0x1efda6(0x139)},{'name':'expect-visible','type':a191_0x1efda6(0xf2),'description':a191_0x1efda6(0xfb)},{'name':a191_0x1efda6(0x146),'type':'number','description':a191_0x1efda6(0x11a)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5bb464){parseInput(_0x5bb464);},async 'dryRun'(_0x1eee65){const _0x1a37aa=a191_0x1efda6,_0x1766b=await buildPlan(_0x1eee65,!![]),_0x4a7a68=_0x1766b[_0x1a37aa(0x10a)]['plannedActions']?.[_0x1a37aa(0x123)]??0x0,_0x4465b8=_0x1766b[_0x1a37aa(0x10a)][_0x1a37aa(0x127)][_0x1a37aa(0x123)]-_0x4a7a68;return menuDryRunResult(_0x1766b[_0x1a37aa(0x10a)],{'method':_0x1a37aa(0x112),'url':_0x1a37aa(0x117),'body':{'updates':_0x1766b[_0x1a37aa(0x10a)][_0x1a37aa(0xf5)]?.[_0x1a37aa(0xef)](_0x23b46d=>_0x23b46d['body'])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x4a7a68+'\x20menu(s);\x20skip\x20'+_0x4465b8+_0x1a37aa(0xff)});},async 'execute'(_0x5b7b90){const _0x3ba34e=a191_0x1efda6,_0x3c8f4b=await buildPlan(_0x5b7b90,![]);await recheckMutationSnapshot(_0x5b7b90,_0x3c8f4b[_0x3ba34e(0x10a)],_0x3ba34e(0x12a));const _0x227bbb=[],_0xb28554=[],_0x2fe22b=[];for(const _0x1c73ca of _0x3c8f4b[_0x3ba34e(0x10a)][_0x3ba34e(0x127)]){if(_0x1c73ca[_0x3ba34e(0x122)][_0x3ba34e(0x104)]===_0x3c8f4b['plan'][_0x3ba34e(0x105)]){_0x227bbb[_0x3ba34e(0x140)]({'id':_0x1c73ca['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5b7b90[_0x3ba34e(0x113)],_0x5b7b90[_0x3ba34e(0x12c)],{'id':_0x1c73ca['id'],'visible':_0x3c8f4b[_0x3ba34e(0x10a)][_0x3ba34e(0x105)]}),_0x227bbb[_0x3ba34e(0x140)]({'id':_0x1c73ca['id'],'updated':!![],'skipped':![]});}catch(_0x11f016){const _0x5b7dcb=mapMenuApiError(_0x11f016,'update\x20visibility\x20for',_0x1c73ca['id']);if(isMenuResponseLoss(_0x11f016)&&_0x5b7dcb[_0x3ba34e(0xf6)]!==_0x3ba34e(0x103)){_0x2fe22b[_0x3ba34e(0x140)](_0x1c73ca['id']);continue;}_0xb28554[_0x3ba34e(0x140)]({'id':_0x1c73ca['id'],'stage':_0x3ba34e(0x14d),'code':_0x5b7dcb['code'],'message':_0x5b7dcb[_0x3ba34e(0x13d)]});}}let _0x88e348;try{_0x88e348=await fetchMenuSnapshot(_0x5b7b90[_0x3ba34e(0x113)],_0x5b7b90[_0x3ba34e(0x12c)]);}catch(_0x253612){const _0x236b24=describeMenuErrorCause(_0x253612,_0x3ba34e(0xf8)),_0x218d85=_0x2fe22b[_0x3ba34e(0xef)](_0x47a604=>({'id':_0x47a604,'stage':_0x3ba34e(0xf9),'code':_0x3ba34e(0xfe),'message':_0x3ba34e(0x109)+_0x47a604+_0x3ba34e(0x129),'requestedStateConfirmed':![],'recovered':![]})),_0x18adc2={'stage':_0x3ba34e(0x114),'code':'menu_verification_failed','message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x3c8f4b[_0x3ba34e(0x10a)][_0x3ba34e(0x127)][_0x3ba34e(0xef)](_0x2b23e7=>_0x2b23e7['id']),'requestedStateConfirmed':![],..._0x236b24};throw menuFailure(asVerificationError(_0x253612,_0x3ba34e(0x10c)),_0x3c8f4b['plan'],{'stage':'verification','succeeded':_0x227bbb,'failedRecords':[..._0xb28554,..._0x218d85,_0x18adc2],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x3ba34e(0x13a),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x1b9dad=[];for(const _0x2b7ca4 of _0x227bbb){const _0x5541be=Number(_0x2b7ca4['id']),_0x1ba472=_0x3c8f4b[_0x3ba34e(0xf4)]['get'](_0x5541be),_0x4c1604=_0x88e348[_0x3ba34e(0x130)][_0x3ba34e(0x13c)](_0x5541be);try{verifyVisibilityUpdate(_0x1ba472,_0x4c1604,_0x3c8f4b[_0x3ba34e(0x10a)][_0x3ba34e(0x105)]);}catch(_0x3cc35d){const _0x4d6d09=asVerificationError(_0x3cc35d,'Menu\x20'+_0x5541be+_0x3ba34e(0xfa));_0x1b9dad['push']({'id':_0x5541be,'stage':_0x3ba34e(0x114),'code':_0x4d6d09['code'],'message':_0x4d6d09[_0x3ba34e(0x13d)],'requestedStateConfirmed':![]});}}for(const _0x250855 of _0x2fe22b){const _0x3d9a11=_0x3c8f4b['beforeById'][_0x3ba34e(0x13c)](_0x250855),_0x1305b7=_0x88e348[_0x3ba34e(0x130)]['get'](_0x250855);try{verifyVisibilityUpdate(_0x3d9a11,_0x1305b7,_0x3c8f4b[_0x3ba34e(0x10a)][_0x3ba34e(0x105)]),_0x227bbb['push']({'id':_0x250855,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x4d02dd){const _0x33e461=asVerificationError(_0x4d02dd,_0x3ba34e(0x14f)+_0x250855+_0x3ba34e(0x158));_0x1b9dad['push']({'id':_0x250855,'stage':_0x3ba34e(0xf9),'code':_0x33e461['code'],'message':_0x33e461[_0x3ba34e(0x13d)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x1b9dad[_0x3ba34e(0x123)]>0x0){const _0x6497d6=_0x1b9dad[_0x3ba34e(0xef)](_0x328b1a=>Number(_0x328b1a['id'])),_0x2229bc=_0x227bbb[_0x3ba34e(0x11f)](_0x144159=>_0x144159[_0x3ba34e(0x145)]===!![])[_0x3ba34e(0x123)],_0x2c687c=menuError(_0x3ba34e(0xfe),_0x3ba34e(0x12b)+_0x6497d6[_0x3ba34e(0x14b)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x2c687c,_0x3c8f4b['plan'],{'stage':_0x3ba34e(0x114),'succeeded':_0x227bbb,'failedRecords':[..._0xb28554,..._0x1b9dad],'warnings':[_0x3ba34e(0x13f)],'verification':{'status':_0x3ba34e(0x13a),..._0x6497d6[_0x3ba34e(0x123)]===0x1?{'targetId':_0x6497d6[0x0]}:{'targetIds':_0x6497d6},'recoveredCount':_0x2229bc,'lookupCommand':_0x3ba34e(0x121)}});}const _0x56b69e=_0x227bbb[_0x3ba34e(0x11f)](_0x3adb25=>_0x3adb25[_0x3ba34e(0x106)]===!![])['length'],_0x4963a0=_0x227bbb['length']-_0x56b69e,_0x1eb0da={..._0x3c8f4b['plan'],'succeeded':_0x227bbb,'failed':_0xb28554,'warnings':_0xb28554[_0x3ba34e(0x123)]>0x0?[..._0x3c8f4b['plan'][_0x3ba34e(0x136)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x3c8f4b['plan'][_0x3ba34e(0x136)],'verification':{'checkedBy':_0x3ba34e(0x101),'snapshotHash':_0x88e348[_0x3ba34e(0x14e)],'matchesRequestedState':_0xb28554[_0x3ba34e(0x123)]===0x0,'recoveredCount':_0x2fe22b[_0x3ba34e(0x123)]}};return{'ok':_0xb28554['length']===0x0,'data':_0x1eb0da,'message':_0xb28554['length']===0x0?_0x3ba34e(0xe9)+_0x56b69e+_0x3ba34e(0xf3)+_0x4963a0+_0x3ba34e(0xff):'Menu\x20visibility\x20update\x20completed:\x20'+_0x56b69e+'\x20updated,\x20'+_0x4963a0+'\x20skipped,\x20'+_0xb28554['length']+_0x3ba34e(0x135)};}};function parseInput(_0x108bf3){const _0x5061f7=a191_0x1efda6,_0xb8a5b3=parseMenuIds(_0x108bf3[_0x5061f7(0xee)](_0x5061f7(0x13b))),_0x574f43=parseCsv(_0x108bf3['str'](_0x5061f7(0x10b)));if(_0xb8a5b3['length']===0x0&&_0x574f43[_0x5061f7(0x123)]===0x0)throw CliErrors['validation'](_0x5061f7(0x124));const _0x27c85a=parseBooleanFlag(_0x108bf3,'visible',!![]),_0x289cff=parseBooleanFlag(_0x108bf3,'expect-visible',![]);let _0x346757;if(hasFlag(_0x108bf3,_0x5061f7(0x146))){_0x346757=_0x108bf3[_0x5061f7(0x157)](_0x5061f7(0x146));if(!Number[_0x5061f7(0x119)](_0x346757)||_0x346757<0x0)throw CliErrors[_0x5061f7(0xea)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0xb8a5b3,'paths':_0x574f43,'visible':_0x27c85a,'expectVisible':_0x289cff,'expectedCount':_0x346757};}async function buildPlan(_0x4e5422,_0x3655e7){const _0x44c562=a191_0x1efda6,_0x39978c=parseInput(_0x4e5422),_0x917481=await fetchMutationSnapshot(_0x4e5422,'update\x20menu\x20visibility'),_0x198483=selectTargets(_0x917481['menus'],_0x39978c['menuIds'],_0x39978c['paths']);if(_0x39978c[_0x44c562(0x134)]!==undefined&&_0x198483[_0x44c562(0x123)]!==_0x39978c['expectedCount'])throw menuError(_0x44c562(0x12d),'Selected\x20'+_0x198483[_0x44c562(0x123)]+'\x20menu(s),\x20expected\x20'+_0x39978c[_0x44c562(0x134)]+'.',_0x44c562(0x11d));if(_0x39978c['expectVisible']!==undefined){const _0x42c3de=_0x198483['filter'](_0x23c30e=>_0x23c30e[_0x44c562(0x104)]!==_0x39978c[_0x44c562(0x156)]);if(_0x42c3de['length']>0x0)throw menuError('menu_state_drift',_0x44c562(0x107)+_0x42c3de[_0x44c562(0xef)](_0x45ca4e=>_0x45ca4e['id'])['join'](',\x20')+'.',_0x44c562(0x115));}const _0x9d8af9=_0x198483['map'](_0x5bcbe9=>({'id':_0x5bcbe9['id'],'label':_0x5bcbe9[_0x44c562(0x149)],'path':_0x5bcbe9['path'],'before':{'visible':_0x5bcbe9['visible']},'after':{'visible':_0x39978c[_0x44c562(0x104)]}})),_0x45b285=_0x9d8af9[_0x44c562(0x11f)](_0x49dd03=>_0x49dd03[_0x44c562(0x122)][_0x44c562(0x104)]!==_0x39978c['visible'])['map'](_0x40ef39=>({'stage':'update-menu-visibility','method':_0x44c562(0x112),'path':_0x44c562(0x117),'body':{'appCode':_0x4e5422[_0x44c562(0x113)],'id':_0x40ef39['id'],'visible':_0x39978c[_0x44c562(0x104)]}})),_0x711515=mutationResult({'operation':_0x44c562(0xed),'selector':{'menuIds':_0x39978c[_0x44c562(0xfd)],'paths':_0x39978c[_0x44c562(0x10b)]},'before':{'menus':_0x198483[_0x44c562(0xef)](_0x5f2ed2=>({'id':_0x5f2ed2['id'],'path':_0x5f2ed2[_0x44c562(0x11c)],'visible':_0x5f2ed2[_0x44c562(0x104)]}))},'after':{'menus':_0x198483[_0x44c562(0xef)](_0x23e0ac=>({'id':_0x23e0ac['id'],'path':_0x23e0ac[_0x44c562(0x11c)],'visible':_0x39978c[_0x44c562(0x104)]}))},'dryRun':_0x3655e7,'backend':[...BACKEND],'plannedActions':_0x45b285,'snapshotHash':_0x917481[_0x44c562(0x14e)],'warnings':_0x45b285['length']===0x0?[_0x44c562(0xe8)]:[]});return{'plan':{..._0x711515,'requestedVisible':_0x39978c[_0x44c562(0x104)],'targets':_0x9d8af9},'beforeById':new Map(_0x198483[_0x44c562(0xef)](_0x5608eb=>[_0x5608eb['id'],_0x5608eb]))};}function selectTargets(_0x29327a,_0x28ce7f,_0x55aad5){const _0x259903=a191_0x1efda6,_0x40f235=new Map(_0x29327a[_0x259903(0xef)](_0x5c3232=>[_0x5c3232['id'],_0x5c3232])),_0x29d265=new Map(),_0x1aa463=_0x28ce7f[_0x259903(0x11f)](_0x1ac5f1=>!_0x40f235[_0x259903(0x159)](_0x1ac5f1));if(_0x1aa463[_0x259903(0x123)]>0x0)throw menuError(_0x259903(0x126),_0x259903(0x10e)+_0x1aa463['join'](',\x20')+'.',_0x259903(0x151));for(const _0x2fb990 of _0x28ce7f){_0x29d265[_0x259903(0x150)](_0x2fb990,_0x40f235[_0x259903(0x13c)](_0x2fb990));}for(const _0x5b0e02 of _0x55aad5){const _0x7ce4ab=_0x29327a['filter'](_0x531493=>_0x531493[_0x259903(0x11c)]===_0x5b0e02);if(_0x7ce4ab[_0x259903(0x123)]===0x0)throw menuError('menu_selector_not_found',_0x259903(0x133)+JSON[_0x259903(0x12f)](_0x5b0e02)+'.',_0x259903(0xeb));if(_0x7ce4ab[_0x259903(0x123)]>0x1)throw menuError('menu_selector_ambiguous',_0x259903(0x131)+JSON[_0x259903(0x12f)](_0x5b0e02)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x7ce4ab[_0x259903(0xef)](_0x5dbf72=>_0x5dbf72['id'])['join'](',\x20')+'.');const _0x278c20=_0x7ce4ab[0x0];_0x29d265[_0x259903(0x150)](_0x278c20['id'],_0x278c20);}return[..._0x29d265[_0x259903(0x13e)]()];}function parseMenuIds(_0x36c3bd){const _0x4abc5e=a191_0x1efda6,_0x474611=parseCsv(_0x36c3bd),_0x4cd9e4=_0x474611[_0x4abc5e(0xef)](Number);if(_0x4cd9e4[_0x4abc5e(0x108)](_0x7b5e52=>!Number[_0x4abc5e(0x119)](_0x7b5e52)||_0x7b5e52<=0x0))throw CliErrors[_0x4abc5e(0xea)](_0x4abc5e(0x100));return[...new Set(_0x4cd9e4)];}function parseCsv(_0x3f05b7){const _0x15b339=a191_0x1efda6;return[...new Set(_0x3f05b7['split'](',')['map'](_0x25cac7=>_0x25cac7['trim']())[_0x15b339(0x11f)](Boolean))];}function parseBooleanFlag(_0x22dd74,_0x5d1df6,_0x386765){const _0x398240=a191_0x1efda6;if(!hasFlag(_0x22dd74,_0x5d1df6)){if(_0x386765)throw CliErrors['flagMissing'](_0x5d1df6);return undefined;}const _0x53db0c=_0x22dd74[_0x398240(0x102)][_0x5d1df6];if(_0x53db0c===!![]||_0x53db0c===![])return _0x53db0c;if(_0x53db0c===_0x398240(0x111))return!![];if(_0x53db0c==='false')return![];throw CliErrors[_0x398240(0xea)]('--'+_0x5d1df6+_0x398240(0x143));}function verifyVisibilityUpdate(_0x297283,_0x45d322,_0x37623a){const _0x3af63b=a191_0x1efda6;assertVerified(!!_0x45d322,'Menu\x20'+_0x297283['id']+_0x3af63b(0x138)),assertVerified(_0x45d322[_0x3af63b(0x104)]===_0x37623a,_0x3af63b(0xf0)+_0x297283['id']+_0x3af63b(0x116));const _0x1cca4f=[['id',_0x45d322['id'],_0x297283['id']],[_0x3af63b(0x148),_0x45d322[_0x3af63b(0x148)],_0x297283[_0x3af63b(0x148)]],['depth',_0x45d322['depth'],_0x297283[_0x3af63b(0x144)]],[_0x3af63b(0x149),_0x45d322[_0x3af63b(0x149)],_0x297283[_0x3af63b(0x149)]],[_0x3af63b(0x11c),_0x45d322[_0x3af63b(0x11c)],_0x297283['path']],[_0x3af63b(0x11e),_0x45d322[_0x3af63b(0x11e)],_0x297283[_0x3af63b(0x11e)]],['type',_0x45d322[_0x3af63b(0xfc)],_0x297283[_0x3af63b(0xfc)]],[_0x3af63b(0x128),_0x45d322[_0x3af63b(0x128)],_0x297283[_0x3af63b(0x128)]],[_0x3af63b(0x142),_0x45d322[_0x3af63b(0x142)],_0x297283[_0x3af63b(0x142)]],['resourcesValid',_0x45d322[_0x3af63b(0xf1)],_0x297283[_0x3af63b(0xf1)]],[_0x3af63b(0x118),_0x45d322['childrenIds'],_0x297283['childrenIds']],[_0x3af63b(0x125),_0x45d322['childrenCount'],_0x297283['childrenCount']],[_0x3af63b(0x155),_0x45d322[_0x3af63b(0x155)],_0x297283['pageId']],[_0x3af63b(0x137),_0x45d322[_0x3af63b(0x137)],_0x297283['pageType']],[_0x3af63b(0x110),_0x45d322[_0x3af63b(0x110)],_0x297283[_0x3af63b(0x110)]],[_0x3af63b(0x10d),_0x45d322[_0x3af63b(0x10d)],_0x297283[_0x3af63b(0x10d)]],['datasetCode',_0x45d322[_0x3af63b(0x15a)],_0x297283[_0x3af63b(0x15a)]]];for(const [_0x123d2e,_0x2ec60d,_0x4b2e04]of _0x1cca4f){assertVerified(sameValue(_0x2ec60d,_0x4b2e04),_0x3af63b(0xf0)+_0x297283['id']+'\x20'+_0x123d2e+_0x3af63b(0xf7));}}function sameValue(_0x39f304,_0x4ad479){const _0xbdd474=a191_0x1efda6;if(Array[_0xbdd474(0xec)](_0x39f304)||Array[_0xbdd474(0xec)](_0x4ad479))return JSON[_0xbdd474(0x12f)](_0x39f304)===JSON['stringify'](_0x4ad479);return _0x39f304===_0x4ad479;}
@@ -1 +1 @@
1
- function a192_0xab5d(){const _0x591680=['notification',';\x20do\x20not\x20resubmit\x20automatically.','POST','planned','9wvGfnt','channelConfig','6veUDQz','130mXjpoH','verified','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','channelType','8284445idPgar','notification_config_create_outcome_unknown','readTimeout','mutation','161gGzWjI','create',';\x20do\x20not\x20resubmit.','document','5tESzug','485656LrxWhw','2069016sVeuEh','/notification/channel-config/create','isSafeInteger','599005CAfcUO','description','verification','29510844tuKDfb','endpointUrl','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','appCode','13PxBdHy','8202879rAmSVQ','723950lmkOCM','input','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20','configName'];a192_0xab5d=function(){return _0x591680;};return a192_0xab5d();}const a192_0x42e5a3=a192_0x1125;(function(_0x9d9213,_0x4b6c5c){const _0x84d640=a192_0x1125,_0x3ed46d=_0x9d9213();while(!![]){try{const _0xbed404=-parseInt(_0x84d640(0x1fa))/0x1*(parseInt(_0x84d640(0x208))/0x2)+parseInt(_0x84d640(0x211))/0x3*(-parseInt(_0x84d640(0x1fc))/0x4)+parseInt(_0x84d640(0x1f2))/0x5*(parseInt(_0x84d640(0x1ed))/0x6)+-parseInt(_0x84d640(0x1f6))/0x7*(parseInt(_0x84d640(0x1fb))/0x8)+parseInt(_0x84d640(0x207))/0x9+-parseInt(_0x84d640(0x1ee))/0xa*(-parseInt(_0x84d640(0x1ff))/0xb)+parseInt(_0x84d640(0x202))/0xc*(parseInt(_0x84d640(0x206))/0xd);if(_0xbed404===_0x4b6c5c)break;else _0x3ed46d['push'](_0x3ed46d['shift']());}catch(_0x2c8a66){_0x3ed46d['push'](_0x3ed46d['shift']());}}}(a192_0xab5d,0xeeaa6));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a192_0x42e5a3(0x1fd);function a192_0x1125(_0x364795,_0x1d2a8f){_0x364795=_0x364795-0x1ec;const _0xab5d1d=a192_0xab5d();let _0x1125d4=_0xab5d1d[_0x364795];return _0x1125d4;}async function prepareCreate(_0x5a22b3){const _0x2e2c9d=a192_0x42e5a3,_0x582214=await readNotificationDocument(_0x5a22b3,_0x2e2c9d(0x1f7)),_0x487b70=createMutationInput(_0x5a22b3[_0x2e2c9d(0x205)],_0x582214);return{'document':_0x582214,'input':_0x487b70,'planned':projectNotificationConfig({'appCode':_0x5a22b3[_0x2e2c9d(0x205)],'configName':_0x582214['configName'],'channelType':_0x582214['channelType'],'endpointUrl':_0x582214[_0x2e2c9d(0x203)],'channelConfig':_0x582214[_0x2e2c9d(0x1ec)],'description':_0x582214[_0x2e2c9d(0x200)],'connectTimeout':_0x582214['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x582214[_0x2e2c9d(0x1f4)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x42e5a3(0x20d),'command':'config-create','description':a192_0x42e5a3(0x1f0),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2dffd7){assertSingleNotificationSource(_0x2dffd7);},async 'dryRun'(_0x37dfdc){const _0x65c4bb=a192_0x42e5a3,_0x39bf70=await prepareCreate(_0x37dfdc),_0xcbd697=notificationLookupCommand(_0x37dfdc[_0x65c4bb(0x205)],_0x39bf70['document'][_0x65c4bb(0x1f1)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x37dfdc['appCode'],'configName':_0x39bf70[_0x65c4bb(0x1f9)][_0x65c4bb(0x20c)],'channelType':_0x39bf70[_0x65c4bb(0x1f9)][_0x65c4bb(0x1f1)]},'before':null,'after':_0x39bf70['planned'],'dryRun':!![],'backend':{'method':_0x65c4bb(0x20f),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x65c4bb(0x210),'lookupCommand':_0xcbd697}},{'method':_0x65c4bb(0x20f),'url':CREATE_PATH});},async 'execute'(_0x31ea01){const _0x4d2d81=a192_0x42e5a3,_0x5495a0=await prepareCreate(_0x31ea01),_0x433b03=notificationLookupCommand(_0x31ea01['appCode'],_0x5495a0['document'][_0x4d2d81(0x1f1)]);let _0x39f5da;try{_0x39f5da=await createNotificationChannelConfig(_0x5495a0[_0x4d2d81(0x209)]);}catch(_0x7574c){if(isPlatformTransportFailure(_0x7574c))throw notificationError('notification_config_create_outcome_unknown',_0x4d2d81(0x204),_0x4d2d81(0x20b)+_0x433b03+_0x4d2d81(0x1f8));throw safeApiFailure('create',_0x4d2d81(0x1f5),_0x4d2d81(0x20b)+_0x433b03+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x4d2d81(0x1fe)](_0x39f5da)||_0x39f5da<=0x0)throw notificationError(_0x4d2d81(0x1f3),_0x4d2d81(0x20a),_0x4d2d81(0x20b)+_0x433b03+';\x20do\x20not\x20resubmit.');let _0x4ce5c2;try{const _0x2812c0=await getNotificationChannelConfig(_0x39f5da,_0x31ea01[_0x4d2d81(0x205)]);_0x4ce5c2=normalizeExactNotificationConfig(_0x2812c0,_0x39f5da,_0x31ea01[_0x4d2d81(0x205)]);}catch{throw safeApiFailure(_0x4d2d81(0x1f7),_0x4d2d81(0x201),_0x4d2d81(0x20b)+_0x433b03+_0x4d2d81(0x20e));}return{'ok':!![],'data':{'operation':_0x4d2d81(0x1f7),'selector':{'appCode':_0x4ce5c2[_0x4d2d81(0x205)],'id':_0x4ce5c2['id'],'configCode':_0x4ce5c2['configCode'],'configName':_0x4ce5c2[_0x4d2d81(0x20c)],'channelType':_0x4ce5c2[_0x4d2d81(0x1f1)]},'before':null,'after':projectNotificationConfig(_0x4ce5c2),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4d2d81(0x1ef),'lookupCommand':_0x433b03}},'message':'Created\x20notification\x20config\x20'+_0x4ce5c2['id']};}};
1
+ const a192_0x34ba27=a192_0x6936;(function(_0x50cb96,_0x2474ba){const _0x33188f=a192_0x6936,_0xd3dcb5=_0x50cb96();while(!![]){try{const _0xbd98dd=-parseInt(_0x33188f(0x1e1))/0x1*(parseInt(_0x33188f(0x1d4))/0x2)+parseInt(_0x33188f(0x1f3))/0x3+parseInt(_0x33188f(0x1d3))/0x4*(-parseInt(_0x33188f(0x1ea))/0x5)+-parseInt(_0x33188f(0x1e6))/0x6+parseInt(_0x33188f(0x1e7))/0x7+-parseInt(_0x33188f(0x1cf))/0x8*(-parseInt(_0x33188f(0x1eb))/0x9)+parseInt(_0x33188f(0x1da))/0xa;if(_0xbd98dd===_0x2474ba)break;else _0xd3dcb5['push'](_0xd3dcb5['shift']());}catch(_0x1fe524){_0xd3dcb5['push'](_0xd3dcb5['shift']());}}}(a192_0xa197,0x46921));import{asDryRunResult}from'../../commands/common/dry-run.js';function a192_0x6936(_0x4ab70a,_0xb749dd){_0x4ab70a=_0x4ab70a-0x1ce;const _0xa19737=a192_0xa197();let _0x6936cb=_0xa19737[_0x4ab70a];return _0x6936cb;}import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a192_0x34ba27(0x1e4);async function prepareCreate(_0x2a8320){const _0x14a1f3=a192_0x34ba27,_0x522eea=await readNotificationDocument(_0x2a8320,_0x14a1f3(0x1f1)),_0x2e2531=createMutationInput(_0x2a8320['appCode'],_0x522eea);return{'document':_0x522eea,'input':_0x2e2531,'planned':projectNotificationConfig({'appCode':_0x2a8320[_0x14a1f3(0x1db)],'configName':_0x522eea[_0x14a1f3(0x1d8)],'channelType':_0x522eea[_0x14a1f3(0x1d1)],'endpointUrl':_0x522eea[_0x14a1f3(0x1e3)],'channelConfig':_0x522eea[_0x14a1f3(0x1f4)],'description':_0x522eea[_0x14a1f3(0x1df)],'connectTimeout':_0x522eea[_0x14a1f3(0x1ed)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x522eea[_0x14a1f3(0x1ee)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a192_0xa197(){const _0x17e6ae=[';\x20no\x20automatic\x20retry\x20was\x20attempted.','endpointUrl','/notification/channel-config/create',';\x20do\x20not\x20resubmit\x20automatically.','2165058aiEVDS','3212587TGrdhX','Inspect\x20with\x20','isSafeInteger','1387525tGHyyb','931626ttucMJ','notification_config_create_outcome_unknown','connectTimeout','readTimeout','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','verification','create','verified','757734cIdhBy','channelConfig','document','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Created\x20notification\x20config\x20','8URVomx',';\x20do\x20not\x20resubmit.','channelType','configCode','8ssufJg','224SBysML','planned','write','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','configName','POST','9628690MoWIqc','appCode','notification','mutation','config-create','description','input','5116KvjPFl'];a192_0xa197=function(){return _0x17e6ae;};return a192_0xa197();}export const notificationConfigCreate={'service':a192_0x34ba27(0x1dc),'command':a192_0x34ba27(0x1de),'description':a192_0x34ba27(0x1d7),'risk':a192_0x34ba27(0x1d6),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x33c97b){assertSingleNotificationSource(_0x33c97b);},async 'dryRun'(_0x46d597){const _0x36866b=a192_0x34ba27,_0x2be6a6=await prepareCreate(_0x46d597),_0x5e635f=notificationLookupCommand(_0x46d597[_0x36866b(0x1db)],_0x2be6a6[_0x36866b(0x1f5)][_0x36866b(0x1d1)]);return asDryRunResult({'operation':_0x36866b(0x1f1),'selector':{'appCode':_0x46d597[_0x36866b(0x1db)],'configName':_0x2be6a6[_0x36866b(0x1f5)][_0x36866b(0x1d8)],'channelType':_0x2be6a6[_0x36866b(0x1f5)]['channelType']},'before':null,'after':_0x2be6a6[_0x36866b(0x1d5)],'dryRun':!![],'backend':{'method':_0x36866b(0x1d9),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x36866b(0x1d5),'lookupCommand':_0x5e635f}},{'method':_0x36866b(0x1d9),'url':CREATE_PATH});},async 'execute'(_0x4237e0){const _0x277f6c=a192_0x34ba27,_0x55c368=await prepareCreate(_0x4237e0),_0x5093d1=notificationLookupCommand(_0x4237e0[_0x277f6c(0x1db)],_0x55c368['document'][_0x277f6c(0x1d1)]);let _0x2f076e;try{_0x2f076e=await createNotificationChannelConfig(_0x55c368[_0x277f6c(0x1e0)]);}catch(_0x587ab9){if(isPlatformTransportFailure(_0x587ab9))throw notificationError('notification_config_create_outcome_unknown',_0x277f6c(0x1f6),'Inspect\x20with\x20'+_0x5093d1+_0x277f6c(0x1d0));throw safeApiFailure('create',_0x277f6c(0x1dd),_0x277f6c(0x1e8)+_0x5093d1+_0x277f6c(0x1e2));}if(!Number[_0x277f6c(0x1e9)](_0x2f076e)||_0x2f076e<=0x0)throw notificationError(_0x277f6c(0x1ec),_0x277f6c(0x1ef),_0x277f6c(0x1e8)+_0x5093d1+';\x20do\x20not\x20resubmit.');let _0x66b932;try{const _0x51fbb5=await getNotificationChannelConfig(_0x2f076e,_0x4237e0['appCode']);_0x66b932=normalizeExactNotificationConfig(_0x51fbb5,_0x2f076e,_0x4237e0[_0x277f6c(0x1db)]);}catch{throw safeApiFailure(_0x277f6c(0x1f1),_0x277f6c(0x1f0),'Inspect\x20with\x20'+_0x5093d1+_0x277f6c(0x1e5));}return{'ok':!![],'data':{'operation':_0x277f6c(0x1f1),'selector':{'appCode':_0x66b932[_0x277f6c(0x1db)],'id':_0x66b932['id'],'configCode':_0x66b932[_0x277f6c(0x1d2)],'configName':_0x66b932[_0x277f6c(0x1d8)],'channelType':_0x66b932['channelType']},'before':null,'after':projectNotificationConfig(_0x66b932),'dryRun':![],'backend':{'method':_0x277f6c(0x1d9),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x277f6c(0x1f2),'lookupCommand':_0x5093d1}},'message':_0x277f6c(0x1ce)+_0x66b932['id']};}};
@@ -1 +1 @@
1
- const a193_0xed5ad1=a193_0x47ac;function a193_0x47ac(_0x46bf41,_0x40a1bf){_0x46bf41=_0x46bf41-0x15d;const _0x33c3c0=a193_0x33c3();let _0x47acaf=_0x33c3c0[_0x46bf41];return _0x47acaf;}(function(_0x437d9b,_0x3b7d2a){const _0x135341=a193_0x47ac,_0x164071=_0x437d9b();while(!![]){try{const _0x1d18a1=-parseInt(_0x135341(0x16a))/0x1+parseInt(_0x135341(0x162))/0x2*(parseInt(_0x135341(0x179))/0x3)+parseInt(_0x135341(0x15e))/0x4*(-parseInt(_0x135341(0x161))/0x5)+parseInt(_0x135341(0x170))/0x6*(parseInt(_0x135341(0x15f))/0x7)+-parseInt(_0x135341(0x174))/0x8+parseInt(_0x135341(0x172))/0x9+parseInt(_0x135341(0x16f))/0xa;if(_0x1d18a1===_0x3b7d2a)break;else _0x164071['push'](_0x164071['shift']());}catch(_0x229ca4){_0x164071['push'](_0x164071['shift']());}}}(a193_0x33c3,0x3e51d));import{asDryRunResult}from'../../commands/common/dry-run.js';function a193_0x33c3(){const _0x7cdf2b=['175EtFKLy','378086oquVaB','Inspect\x20with\x20','Notification\x20config\x20','\x20delete\x20could\x20not\x20be\x20verified.','notification_config_delete_verification_failed','/notification/channel-config/delete',';\x20do\x20not\x20resubmit\x20automatically.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','233965gVuQxj','appCode','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','notification','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','3331640nhUXqz','60vLhqCO','config-delete','2957013PvGiJb','delete','2077664sJurlI','high-risk-write','channelType','mutation','before','3bdqhnm','verified','Deleted\x20notification\x20config\x20','POST','planned','36072sloUTO','149660UalMal','some'];a193_0x33c3=function(){return _0x7cdf2b;};return a193_0x33c3();}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0xed5ad1(0x167),REFERENCE_WARNING=a193_0xed5ad1(0x169);async function prepareDelete(_0x9e0d05){const _0x448081=a193_0xed5ad1,_0x1a730b=readNotificationId(_0x9e0d05),_0x407f3d=await requireExactNotificationConfig(_0x9e0d05['appCode'],_0x1a730b,_0x448081(0x173));return{'id':_0x1a730b,'before':_0x407f3d};}export const notificationConfigDelete={'service':a193_0xed5ad1(0x16d),'command':a193_0xed5ad1(0x171),'description':a193_0xed5ad1(0x16e),'risk':a193_0xed5ad1(0x175),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x1eafc8){readNotificationId(_0x1eafc8),requireNotificationExplicitYes(_0x1eafc8);},async 'dryRun'(_0x4af073){const _0x3d37d5=a193_0xed5ad1,_0x525d03=await prepareDelete(_0x4af073),_0x19d977=notificationLookupCommand(_0x4af073[_0x3d37d5(0x16b)],_0x525d03[_0x3d37d5(0x178)]['channelType']);return asDryRunResult({'operation':_0x3d37d5(0x173),'selector':notificationSelector(_0x525d03['before']),'before':projectNotificationConfig(_0x525d03['before']),'after':null,'dryRun':!![],'backend':{'method':_0x3d37d5(0x17c),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x3d37d5(0x15d),'lookupCommand':_0x19d977}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0xaece31){const _0x4aca33=a193_0xed5ad1;requireNotificationExplicitYes(_0xaece31);const _0x157a38=await prepareDelete(_0xaece31),_0x610d3d=notificationLookupCommand(_0xaece31[_0x4aca33(0x16b)],_0x157a38[_0x4aca33(0x178)]['channelType']);let _0x42c099=![];try{await deleteNotificationChannelConfig(_0x157a38['id'],_0xaece31[_0x4aca33(0x16b)]);}catch(_0x3c7780){if(!isPlatformTransportFailure(_0x3c7780))throw safeApiFailure(_0x4aca33(0x173),_0x4aca33(0x177),_0x4aca33(0x163)+_0x610d3d+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x42c099=!![];}let _0x44c511;try{_0x44c511=await listNotificationChannelConfigs(_0xaece31['appCode'],_0x157a38[_0x4aca33(0x178)]['channelType']),validateNotificationDeleteReadback(_0x44c511,_0xaece31[_0x4aca33(0x16b)],_0x157a38[_0x4aca33(0x178)][_0x4aca33(0x176)]);}catch{throw notificationError(_0x42c099?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x4aca33(0x164)+_0x157a38['id']+_0x4aca33(0x165),_0x4aca33(0x163)+_0x610d3d+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x44c511[_0x4aca33(0x160)](_0xcefdd2=>_0xcefdd2['id']===_0x157a38['id']))throw notificationError(_0x42c099?'notification_config_delete_outcome_unknown':_0x4aca33(0x166),_0x4aca33(0x164)+_0x157a38['id']+'\x20remains\x20present\x20after\x20delete.',_0x4aca33(0x163)+_0x610d3d+_0x4aca33(0x168));const _0x41a30c=[REFERENCE_WARNING];return _0x42c099&&_0x41a30c['unshift'](_0x4aca33(0x16c)),{'ok':!![],'data':{'operation':_0x4aca33(0x173),'selector':notificationSelector(_0x157a38[_0x4aca33(0x178)]),'before':projectNotificationConfig(_0x157a38['before']),'after':null,'dryRun':![],'backend':{'method':_0x4aca33(0x17c),'path':DELETE_PATH},'warnings':_0x41a30c,'verification':{'status':_0x4aca33(0x17a),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x42c099,'lookupCommand':_0x610d3d}},'message':_0x4aca33(0x17b)+_0x157a38['id']};}};
1
+ const a193_0x3363e7=a193_0x95f0;function a193_0x95f0(_0x585b1a,_0x426720){_0x585b1a=_0x585b1a-0xd2;const _0x377331=a193_0x3773();let _0x95f037=_0x377331[_0x585b1a];return _0x95f037;}(function(_0x2a0671,_0x3563fd){const _0x381a08=a193_0x95f0,_0x54a5a1=_0x2a0671();while(!![]){try{const _0x3c940a=parseInt(_0x381a08(0xee))/0x1*(-parseInt(_0x381a08(0xdb))/0x2)+parseInt(_0x381a08(0xe9))/0x3*(-parseInt(_0x381a08(0xe7))/0x4)+parseInt(_0x381a08(0xef))/0x5*(-parseInt(_0x381a08(0xda))/0x6)+-parseInt(_0x381a08(0xe0))/0x7*(parseInt(_0x381a08(0xde))/0x8)+-parseInt(_0x381a08(0xe3))/0x9+-parseInt(_0x381a08(0xd5))/0xa+-parseInt(_0x381a08(0xdc))/0xb*(-parseInt(_0x381a08(0xe5))/0xc);if(_0x3c940a===_0x3563fd)break;else _0x54a5a1['push'](_0x54a5a1['shift']());}catch(_0x1b39aa){_0x54a5a1['push'](_0x54a5a1['shift']());}}}(a193_0x3773,0xb295f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a193_0x3773(){const _0x4eb53e=['delete','1rFiiXb','45rOVjTV','notification_config_delete_verification_unavailable','notification_config_delete_outcome_unknown','before','notification','/notification/channel-config/delete','9865330viUtrC','Notification\x20config\x20','Inspect\x20with\x20','appCode','POST','567126PipZTX','1905712JsPmbd','28525838KTgdJg','channelType','16VUoiFy','mutation','1792070BNoYoV','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','8929008cocxiT','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','24uQUDAh',';\x20do\x20not\x20resubmit\x20automatically.','4xPHFto','some','482457NVWkdv','planned','notification_config_delete_verification_failed','verified'];a193_0x3773=function(){return _0x4eb53e;};return a193_0x3773();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0x3363e7(0xd4),REFERENCE_WARNING=a193_0x3363e7(0xe1);async function prepareDelete(_0x3732fc){const _0x4ba61a=a193_0x3363e7,_0x2d1e8e=readNotificationId(_0x3732fc),_0x1dc5d5=await requireExactNotificationConfig(_0x3732fc[_0x4ba61a(0xd8)],_0x2d1e8e,'delete');return{'id':_0x2d1e8e,'before':_0x1dc5d5};}export const notificationConfigDelete={'service':a193_0x3363e7(0xd3),'command':'config-delete','description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x29d7b4){readNotificationId(_0x29d7b4),requireNotificationExplicitYes(_0x29d7b4);},async 'dryRun'(_0x3ef52b){const _0x21054b=a193_0x3363e7,_0x2961ec=await prepareDelete(_0x3ef52b),_0x3195f1=notificationLookupCommand(_0x3ef52b[_0x21054b(0xd8)],_0x2961ec['before'][_0x21054b(0xdd)]);return asDryRunResult({'operation':_0x21054b(0xed),'selector':notificationSelector(_0x2961ec[_0x21054b(0xd2)]),'before':projectNotificationConfig(_0x2961ec[_0x21054b(0xd2)]),'after':null,'dryRun':!![],'backend':{'method':_0x21054b(0xd9),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x21054b(0xea),'lookupCommand':_0x3195f1}},{'method':_0x21054b(0xd9),'url':DELETE_PATH});},async 'execute'(_0x54023d){const _0xe7f4c8=a193_0x3363e7;requireNotificationExplicitYes(_0x54023d);const _0x1aa5b9=await prepareDelete(_0x54023d),_0x9981a6=notificationLookupCommand(_0x54023d[_0xe7f4c8(0xd8)],_0x1aa5b9['before'][_0xe7f4c8(0xdd)]);let _0x1b93df=![];try{await deleteNotificationChannelConfig(_0x1aa5b9['id'],_0x54023d[_0xe7f4c8(0xd8)]);}catch(_0xfaa8a3){if(!isPlatformTransportFailure(_0xfaa8a3))throw safeApiFailure(_0xe7f4c8(0xed),_0xe7f4c8(0xdf),'Inspect\x20with\x20'+_0x9981a6+_0xe7f4c8(0xe2));_0x1b93df=!![];}let _0x21c4ef;try{_0x21c4ef=await listNotificationChannelConfigs(_0x54023d[_0xe7f4c8(0xd8)],_0x1aa5b9[_0xe7f4c8(0xd2)]['channelType']),validateNotificationDeleteReadback(_0x21c4ef,_0x54023d[_0xe7f4c8(0xd8)],_0x1aa5b9[_0xe7f4c8(0xd2)][_0xe7f4c8(0xdd)]);}catch{throw notificationError(_0x1b93df?_0xe7f4c8(0xf1):_0xe7f4c8(0xf0),_0xe7f4c8(0xd6)+_0x1aa5b9['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0xe7f4c8(0xd7)+_0x9981a6+_0xe7f4c8(0xe6));}if(_0x21c4ef[_0xe7f4c8(0xe8)](_0x4ece44=>_0x4ece44['id']===_0x1aa5b9['id']))throw notificationError(_0x1b93df?'notification_config_delete_outcome_unknown':_0xe7f4c8(0xeb),_0xe7f4c8(0xd6)+_0x1aa5b9['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x9981a6+_0xe7f4c8(0xe6));const _0xd33cd=[REFERENCE_WARNING];return _0x1b93df&&_0xd33cd['unshift'](_0xe7f4c8(0xe4)),{'ok':!![],'data':{'operation':_0xe7f4c8(0xed),'selector':notificationSelector(_0x1aa5b9[_0xe7f4c8(0xd2)]),'before':projectNotificationConfig(_0x1aa5b9[_0xe7f4c8(0xd2)]),'after':null,'dryRun':![],'backend':{'method':_0xe7f4c8(0xd9),'path':DELETE_PATH},'warnings':_0xd33cd,'verification':{'status':_0xe7f4c8(0xec),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1b93df,'lookupCommand':_0x9981a6}},'message':'Deleted\x20notification\x20config\x20'+_0x1aa5b9['id']};}};