@lovrabet/rabetbase-cli 2.5.4-beta.1 → 2.5.4-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/README.md +4 -3
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/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.d.ts +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/detail.js +1 -1
  78. package/lib/commands/dataset/extend-update.js +1 -1
  79. package/lib/commands/dataset/field-restore.js +1 -1
  80. package/lib/commands/dataset/field-update.js +1 -1
  81. package/lib/commands/dataset/generate.js +1 -1
  82. package/lib/commands/dataset/index.js +1 -1
  83. package/lib/commands/dataset/list.js +1 -1
  84. package/lib/commands/dataset/operations.js +1 -1
  85. package/lib/commands/dataset/relation-audit.js +1 -1
  86. package/lib/commands/dataset/relation-create.js +1 -1
  87. package/lib/commands/dataset/relation-delete.js +1 -1
  88. package/lib/commands/dataset/relation-shared.js +1 -1
  89. package/lib/commands/dataset/relation-update.js +1 -1
  90. package/lib/commands/dataset/relations.js +1 -1
  91. package/lib/commands/dataset/rename.js +1 -1
  92. package/lib/commands/dataset/restore.js +1 -1
  93. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  94. package/lib/commands/db/analysis-batching.js +1 -1
  95. package/lib/commands/db/analyze-batch-plan.js +1 -1
  96. package/lib/commands/db/analyze-cancel.js +1 -1
  97. package/lib/commands/db/analyze-start.js +1 -1
  98. package/lib/commands/db/analyze-status.js +1 -1
  99. package/lib/commands/db/create.js +1 -1
  100. package/lib/commands/db/delete.js +1 -1
  101. package/lib/commands/db/detail.js +1 -1
  102. package/lib/commands/db/diff-refresh-start.js +1 -1
  103. package/lib/commands/db/diff-refresh-status.js +1 -1
  104. package/lib/commands/db/diff.js +1 -1
  105. package/lib/commands/db/index.js +1 -1
  106. package/lib/commands/db/list.js +1 -1
  107. package/lib/commands/db/shared.js +1 -1
  108. package/lib/commands/db/table-diff-shared.js +1 -1
  109. package/lib/commands/db/tables.js +1 -1
  110. package/lib/commands/db/test.js +1 -1
  111. package/lib/commands/db/update.js +1 -1
  112. package/lib/commands/deployment/index.js +1 -1
  113. package/lib/commands/deployment/sync-all.js +1 -1
  114. package/lib/commands/deployment/sync-jobs.js +1 -1
  115. package/lib/commands/deployment/sync-status.js +1 -1
  116. package/lib/commands/doctor.js +1 -1
  117. package/lib/commands/file/index.js +1 -1
  118. package/lib/commands/flow/create.js +1 -1
  119. package/lib/commands/flow/detail.js +1 -1
  120. package/lib/commands/flow/index.js +1 -1
  121. package/lib/commands/flow/list.js +1 -1
  122. package/lib/commands/flow/publish.js +1 -1
  123. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  124. package/lib/commands/flow/runtime-role-list.js +1 -1
  125. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  126. package/lib/commands/flow/runtime-user-search.js +1 -1
  127. package/lib/commands/flow/shared.js +1 -1
  128. package/lib/commands/flow/update.js +1 -1
  129. package/lib/commands/flow/validate.js +1 -1
  130. package/lib/commands/instant-api-policy/current.js +1 -1
  131. package/lib/commands/instant-api-policy/index.js +1 -1
  132. package/lib/commands/instant-api-policy/init.js +1 -1
  133. package/lib/commands/instant-api-policy/publish.js +1 -1
  134. package/lib/commands/instant-api-policy/pull.js +1 -1
  135. package/lib/commands/instant-api-policy/revision.js +1 -1
  136. package/lib/commands/instant-api-policy/revisions.js +1 -1
  137. package/lib/commands/instant-api-policy/rollback.js +1 -1
  138. package/lib/commands/instant-api-policy/shared.js +1 -1
  139. package/lib/commands/instant-api-policy/validate.js +1 -1
  140. package/lib/commands/issue/index.js +1 -1
  141. package/lib/commands/issue/nudge.js +1 -1
  142. package/lib/commands/issue/report.js +1 -1
  143. package/lib/commands/issue/shared.js +1 -1
  144. package/lib/commands/kb/create.js +1 -1
  145. package/lib/commands/kb/delete.js +1 -1
  146. package/lib/commands/kb/detail.js +1 -1
  147. package/lib/commands/kb/index.js +1 -1
  148. package/lib/commands/kb/list.js +1 -1
  149. package/lib/commands/kb/search.js +1 -1
  150. package/lib/commands/kb/shared.js +1 -1
  151. package/lib/commands/kb/update.js +1 -1
  152. package/lib/commands/logs/index.js +1 -1
  153. package/lib/commands/menu/asset-update.js +1 -1
  154. package/lib/commands/menu/delete.js +1 -1
  155. package/lib/commands/menu/external-link-create.js +1 -1
  156. package/lib/commands/menu/external-link-update.js +1 -1
  157. package/lib/commands/menu/group-create.js +1 -1
  158. package/lib/commands/menu/group-update.js +1 -1
  159. package/lib/commands/menu/index.js +1 -1
  160. package/lib/commands/menu/list.js +1 -1
  161. package/lib/commands/menu/move.js +1 -1
  162. package/lib/commands/menu/regroup-start.js +1 -1
  163. package/lib/commands/menu/rename.js +1 -1
  164. package/lib/commands/menu/shared/compare-table.js +1 -1
  165. package/lib/commands/menu/shared/delete-plan.js +1 -1
  166. package/lib/commands/menu/shared/facts.js +1 -1
  167. package/lib/commands/menu/shared/index.js +1 -1
  168. package/lib/commands/menu/shared/inquirer.js +1 -1
  169. package/lib/commands/menu/shared/local-pages.js +1 -1
  170. package/lib/commands/menu/shared/logic.js +1 -1
  171. package/lib/commands/menu/shared/mutations.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/sync-core.js +1 -1
  174. package/lib/commands/menu/shared/update-core.js +1 -1
  175. package/lib/commands/menu/shared/valid-url.js +1 -1
  176. package/lib/commands/menu/sync.js +1 -1
  177. package/lib/commands/menu/visibility-update.js +1 -1
  178. package/lib/commands/notification/config-create.js +1 -1
  179. package/lib/commands/notification/config-delete.js +1 -1
  180. package/lib/commands/notification/config-list.js +1 -1
  181. package/lib/commands/notification/config-update.js +1 -1
  182. package/lib/commands/notification/index.js +1 -1
  183. package/lib/commands/notification/shared.js +1 -1
  184. package/lib/commands/ocr/index.js +1 -1
  185. package/lib/commands/page/create.js +1 -1
  186. package/lib/commands/page/custom/detail.js +1 -1
  187. package/lib/commands/page/custom/list.js +1 -1
  188. package/lib/commands/page/custom/publish.js +1 -1
  189. package/lib/commands/page/custom/shared.js +1 -1
  190. package/lib/commands/page/custom/syntax.js +1 -1
  191. package/lib/commands/page/custom/update.js +1 -1
  192. package/lib/commands/page/data-list-status.js +1 -1
  193. package/lib/commands/page/generate-start.js +1 -1
  194. package/lib/commands/page/generate-status.js +1 -1
  195. package/lib/commands/page/index.js +1 -1
  196. package/lib/commands/page/pull.js +1 -1
  197. package/lib/commands/page/push.js +1 -1
  198. package/lib/commands/page/relation-audit.js +1 -1
  199. package/lib/commands/page/restore.js +1 -1
  200. package/lib/commands/page/shared.js +1 -1
  201. package/lib/commands/page/sync.js +1 -1
  202. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  203. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  204. package/lib/commands/project/create/format-elapsed.js +1 -1
  205. package/lib/commands/project/create/main.js +1 -1
  206. package/lib/commands/project/create/materialize-project-template.js +1 -1
  207. package/lib/commands/project/create/project-name.js +1 -1
  208. package/lib/commands/project/create/project-template-archive.js +1 -1
  209. package/lib/commands/project/create/project-template-path.js +1 -1
  210. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  211. package/lib/commands/project/create/use-format-code.js +1 -1
  212. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  213. package/lib/commands/project/domain-routing-sync.js +1 -1
  214. package/lib/commands/project/index.js +1 -1
  215. package/lib/commands/project/upgrade.js +1 -1
  216. package/lib/commands/registry.js +1 -1
  217. package/lib/commands/role/delete.js +1 -1
  218. package/lib/commands/role/detail.js +1 -1
  219. package/lib/commands/role/index.js +1 -1
  220. package/lib/commands/role/list.js +1 -1
  221. package/lib/commands/role/shared.js +1 -1
  222. package/lib/commands/role/update.js +1 -1
  223. package/lib/commands/role/user-add.js +1 -1
  224. package/lib/commands/role/user-remove.js +1 -1
  225. package/lib/commands/role/user-resolve.js +1 -1
  226. package/lib/commands/rule/get.js +1 -1
  227. package/lib/commands/rule/index.js +1 -1
  228. package/lib/commands/rule/list.js +1 -1
  229. package/lib/commands/rule/set.js +1 -1
  230. package/lib/commands/rule/shared.js +1 -1
  231. package/lib/commands/run/index.js +1 -1
  232. package/lib/commands/schema.js +1 -1
  233. package/lib/commands/sql/create.js +1 -1
  234. package/lib/commands/sql/delete.js +1 -1
  235. package/lib/commands/sql/detail.js +1 -1
  236. package/lib/commands/sql/exec.js +1 -1
  237. package/lib/commands/sql/index.js +1 -1
  238. package/lib/commands/sql/list.js +1 -1
  239. package/lib/commands/sql/pull.js +1 -1
  240. package/lib/commands/sql/push.js +1 -1
  241. package/lib/commands/sql/shared.js +1 -1
  242. package/lib/commands/sql/status.js +1 -1
  243. package/lib/commands/sql/validate.js +1 -1
  244. package/lib/commands/task/index.js +1 -1
  245. package/lib/commands/task/status.js +1 -1
  246. package/lib/commands/tenant/index.js +1 -1
  247. package/lib/commands/tenant/members-list.js +1 -1
  248. package/lib/commands/tenant/shared.js +1 -1
  249. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  250. package/lib/commands/user-account/index.js +1 -1
  251. package/lib/commands/workspace/add.js +1 -1
  252. package/lib/commands/workspace/index.js +1 -1
  253. package/lib/commands/workspace/remove.js +1 -1
  254. package/lib/config/domain-config.d.ts +1 -1
  255. package/lib/config/domain-config.js +1 -1
  256. package/lib/config/project-domain-routing.js +1 -1
  257. package/lib/config/region-config.js +1 -1
  258. package/lib/config/schema.d.ts +1 -1
  259. package/lib/config/schema.js +1 -1
  260. package/lib/constant/cdn.js +1 -1
  261. package/lib/constant/cli.js +1 -1
  262. package/lib/constant/defaults.js +1 -1
  263. package/lib/constant/domain.d.ts +4 -0
  264. package/lib/constant/domain.js +1 -1
  265. package/lib/constant/env.js +1 -1
  266. package/lib/constant/output.js +1 -1
  267. package/lib/constant/paths.js +1 -1
  268. package/lib/constant/region.d.ts +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.d.ts +14 -1
  272. package/lib/constant/routing-profile.js +1 -1
  273. package/lib/context/app-resolver.d.ts +1 -0
  274. package/lib/context/app-resolver.js +1 -1
  275. package/lib/context/auth-resolver.js +1 -1
  276. package/lib/context/config-loader.js +1 -1
  277. package/lib/context.js +1 -1
  278. package/lib/core/alias-resolver.js +1 -1
  279. package/lib/core/api-client.js +1 -1
  280. package/lib/core/bff/config.js +1 -1
  281. package/lib/core/bff/file-system.js +1 -1
  282. package/lib/core/bff/hash.js +1 -1
  283. package/lib/core/bff/hook-directory.js +1 -1
  284. package/lib/core/bff/lock.js +1 -1
  285. package/lib/core/bff/utils.js +1 -1
  286. package/lib/core/cross-db-relation.js +1 -1
  287. package/lib/core/db-resolver.js +1 -1
  288. package/lib/core/flow-config.js +1 -1
  289. package/lib/core/instant-api-policy/config.js +1 -1
  290. package/lib/core/kb-search-client.js +1 -1
  291. package/lib/core/page/file-system.js +1 -1
  292. package/lib/core/page/hash.js +1 -1
  293. package/lib/core/page/lock.js +1 -1
  294. package/lib/core/page/lr-smart-jsx.js +1 -1
  295. package/lib/core/sql-index-auditor.js +1 -1
  296. package/lib/core/sql-sync/config.js +1 -1
  297. package/lib/core/sql-sync/file-system.js +1 -1
  298. package/lib/core/sql-sync/hash.js +1 -1
  299. package/lib/core/sql-sync/lock.js +1 -1
  300. package/lib/core/sql-sync/utils.js +1 -1
  301. package/lib/core/sql-validator.js +1 -1
  302. package/lib/errors.js +1 -1
  303. package/lib/framework/build-all-flags.js +1 -1
  304. package/lib/framework/error-output.js +1 -1
  305. package/lib/framework/explicit-yes.js +1 -1
  306. package/lib/framework/flags.js +1 -1
  307. package/lib/framework/help.js +1 -1
  308. package/lib/framework/index.js +1 -1
  309. package/lib/framework/output.js +1 -1
  310. package/lib/framework/response.js +1 -1
  311. package/lib/framework/runner-alias.js +1 -1
  312. package/lib/framework/runner.js +1 -1
  313. package/lib/framework/schema-export.js +1 -1
  314. package/lib/framework/supported-flags.js +1 -1
  315. package/lib/framework/types.js +1 -1
  316. package/lib/generated/build-info.d.ts +4 -4
  317. package/lib/generated/build-info.js +1 -1
  318. package/lib/generated/official-routing.d.ts +15 -3
  319. package/lib/generated/official-routing.js +1 -1
  320. package/lib/generated/routing-contract.d.ts +2 -2
  321. package/lib/generated/routing-contract.js +1 -1
  322. package/lib/help.js +1 -1
  323. package/lib/postinstall.js +1 -1
  324. package/lib/runtime/confirmation.js +1 -1
  325. package/lib/runtime/event.js +1 -1
  326. package/lib/runtime/index.js +1 -1
  327. package/lib/runtime/queue.js +1 -1
  328. package/lib/runtime/resolve.js +1 -1
  329. package/lib/skills/builtin-skill.js +1 -1
  330. package/lib/skills/main.js +1 -1
  331. package/lib/skills/npx-skills-add.d.ts +5 -0
  332. package/lib/skills/npx-skills-add.js +1 -1
  333. package/lib/skills/skill-presence.js +1 -1
  334. package/lib/telemetry/cli-command-trace.js +1 -1
  335. package/lib/telemetry/cli-help-trace.js +1 -1
  336. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  337. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  338. package/lib/telemetry/send-cli-trace-log.js +1 -1
  339. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  340. package/lib/utils/ai_config.js +1 -1
  341. package/lib/utils/apply-jq-filter.js +1 -1
  342. package/lib/utils/cdn-config.js +1 -1
  343. package/lib/utils/check-sdk-version.js +1 -1
  344. package/lib/utils/cli-version-check.js +1 -1
  345. package/lib/utils/cli-version-policy.js +1 -1
  346. package/lib/utils/config.js +1 -1
  347. package/lib/utils/entity-with-id.js +1 -1
  348. package/lib/utils/file-utils.js +1 -1
  349. package/lib/utils/guides-cdn.js +1 -1
  350. package/lib/utils/http-client.js +1 -1
  351. package/lib/utils/is-non-interactive.js +1 -1
  352. package/lib/utils/logger.js +1 -1
  353. package/lib/utils/params.js +1 -1
  354. package/lib/utils/platform.js +1 -1
  355. package/lib/utils/sleep.js +1 -1
  356. package/lib/utils/template-replacer.js +1 -1
  357. package/lib/utils/update-notice.js +1 -1
  358. package/lib/utils/version.js +1 -1
  359. package/lib/utils/with-active-cookie.js +1 -1
  360. package/lib/utils/write-cli-side-channel.js +1 -1
  361. package/package.json +1 -1
  362. package/skills/rabetbase/SKILL.md +2 -2
  363. package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
  364. package/skills/rabetbase/guides/sql-mybatis.md +12 -8
  365. package/skills/rabetbase/references/rabetbase-config.md +6 -4
  366. package/skills/rabetbase/references/rabetbase-init.md +7 -5
  367. package/skills/rabetbase/references/rabetbase-kb.md +8 -6
  368. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0xf5ad1f,_0x766239){const _0x59a86b=a169_0x284c,_0x21a413=_0xf5ad1f();while(!![]){try{const _0x1938f5=-parseInt(_0x59a86b(0x1ac))/0x1*(parseInt(_0x59a86b(0x1c1))/0x2)+-parseInt(_0x59a86b(0x1a2))/0x3*(-parseInt(_0x59a86b(0x1bc))/0x4)+-parseInt(_0x59a86b(0x19d))/0x5+parseInt(_0x59a86b(0x1b3))/0x6+-parseInt(_0x59a86b(0x1bf))/0x7+-parseInt(_0x59a86b(0x1ba))/0x8*(-parseInt(_0x59a86b(0x1a7))/0x9)+parseInt(_0x59a86b(0x1ae))/0xa;if(_0x1938f5===_0x766239)break;else _0x21a413['push'](_0x21a413['shift']());}catch(_0x4bd22e){_0x21a413['push'](_0x21a413['shift']());}}}(a169_0x83e2,0xa27d3));function a169_0x83e2(){const _0x4426f7=['procode','path','1OVVexG','Create\x20menu\x20\x22','12336000XjJEFv','Menu\x20created\x20successfully:\x20','update-menu-cdn-url','Menu\x20assets\x20synced:\x20','Fetched\x20','6455058Qvekft','create-menu','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Update\x20menu\x20assets\x20\x22','\x20menu','menus','Update\x20menu\x20','16eJssSC','import','6476BpEyBw','total','info','8027194JnBhwi','extend','211346BKBKAM','loadScriptMode','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','6514955uZSApt','stringify','map','Updating\x20menu\x20asset\x20links:\x20','menuGroups','1404KnxIVn','resources','Delete\x20','length','label','692217RluDeq','Batch\x20menu\x20creation\x20completed,\x20total\x20','Start\x20batch\x20menu\x20creation,\x20total\x20'];a169_0x83e2=function(){return _0x4426f7;};return a169_0x83e2();}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a169_0x19375a,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0xf9e83e,_0x33785a){const _0x3bc450=a169_0x284c,_0x41150d=getEnv();logger[_0x3bc450(0x1be)]('get-online-menu-list',isProduction(_0x41150d)?_0x3bc450(0x19c)+_0xf9e83e+')':_0x3bc450(0x1b5)+_0xf9e83e+')');const _0x173fb=await fetchMenuSnapshot(_0xf9e83e,_0x33785a,{'verbose':!![]});return logger['info']('get-online-menu-list',_0x3bc450(0x1b2)+_0x173fb[_0x3bc450(0x1bd)]+'\x20online\x20menus\x20successfully'),_0x173fb[_0x3bc450(0x1b8)][_0x3bc450(0x19f)](toProcessedMenuItem);}export async function createMenu(_0x33cb38,_0x22c9c8,_0x4016ae){const _0x241802=a169_0x284c;logger['info'](_0x241802(0x1b4),'Creating\x20menu:\x20'+_0x4016ae[_0x241802(0x1a6)]+'\x20('+_0x4016ae['path']+')');const _0x12e36d={'appCode':_0x33cb38,'type':_0x241802(0x1aa),'sort':0x0,'extend':{'loadScriptMode':_0x241802(0x1bb),'resources':_0x4016ae[_0x241802(0x1a3)]?JSON[_0x241802(0x19e)](_0x4016ae[_0x241802(0x1a3)]):undefined},..._0x4016ae},_0x25f36d=await createMenuRecord(_0x12e36d,_0x22c9c8,_0x241802(0x1ad)+_0x4016ae['label']+'\x22');return logger['info'](_0x241802(0x1b4),_0x241802(0x1af)+_0x4016ae[_0x241802(0x1a6)]),_0x25f36d;}function a169_0x284c(_0x48f362,_0x3ec76a){_0x48f362=_0x48f362-0x19c;const _0x83e231=a169_0x83e2();let _0x284ce2=_0x83e231[_0x48f362];return _0x284ce2;}async function createSingleMenu(_0xae657e,_0x4381ee,_0x45df16,_0x55cce6){const _0x112519=a169_0x284c,_0x53dfa8={'appCode':_0xae657e,'type':_0x112519(0x1aa),'sort':0x0,'extend':{'loadScriptMode':_0x112519(0x1bb),'resources':_0x55cce6?JSON[_0x112519(0x19e)](_0x55cce6):undefined},'label':_0x45df16[_0x112519(0x1a6)],'path':_0x45df16['path']},_0x5a5c7c=await createMenuRecord(_0x53dfa8,_0x4381ee,_0x112519(0x1ad)+_0x45df16['label']+'\x22');return logger[_0x112519(0x1be)](_0x112519(0x1b4),_0x112519(0x1af)+_0x45df16[_0x112519(0x1a6)]),_0x5a5c7c;}export async function createMenus(_0x1740b3,_0x5e1c81,_0x1cb2a7,_0x44e1eb){const _0x409a10=a169_0x284c;logger[_0x409a10(0x1be)]('create-menus',_0x409a10(0x1a9)+_0x1cb2a7[_0x409a10(0x1a5)]);const _0x78e111=await Promise['all'](_0x1cb2a7['map'](_0x1d8bcd=>createSingleMenu(_0x1740b3,_0x5e1c81,_0x1d8bcd,_0x44e1eb)));return logger[_0x409a10(0x1be)]('create-menus',_0x409a10(0x1a8)+_0x1cb2a7[_0x409a10(0x1a5)]),_0x78e111;}export async function updateMenuCdnUrl(_0x5a4c3b,_0x42b921,_0x152047){const _0x5eb58a=a169_0x284c;logger[_0x5eb58a(0x1be)](_0x5eb58a(0x1b0),_0x5eb58a(0x1a0)+_0x152047[_0x5eb58a(0x1a6)]+'\x20('+_0x152047[_0x5eb58a(0x1ab)]+')');const _0x26486e={'id':_0x152047['id'],'appCode':_0x5a4c3b,'extend':{..._0x152047[_0x5eb58a(0x1c0)]??{},..._0x152047[_0x5eb58a(0x1c2)]?{'loadScriptMode':_0x152047[_0x5eb58a(0x1c2)]}:{},'resources':_0x152047['resources']?JSON[_0x5eb58a(0x19e)](_0x152047[_0x5eb58a(0x1a3)]):undefined}},_0x3a0352=await updateMenuRecord(_0x26486e,_0x42b921,_0x5eb58a(0x1b6)+_0x152047[_0x5eb58a(0x1a6)]+'\x22');return logger[_0x5eb58a(0x1be)]('update-menu-cdn-url',_0x5eb58a(0x1b1)+_0x152047[_0x5eb58a(0x1a6)],undefined),_0x3a0352;}export async function createMenuEntity(_0x4d4b5a,_0x14fac7,_0x2e7013){const _0x37820d=a169_0x284c;return createMenuRecord({'appCode':_0x4d4b5a,..._0x2e7013},_0x14fac7,_0x37820d(0x1ad)+_0x2e7013[_0x37820d(0x1a6)]+'\x22');}export async function updateMenuEntity(_0x420376,_0x259306,_0x57acdd){const _0x2c4e12=a169_0x284c;return updateMenuRecord({'appCode':_0x420376,..._0x57acdd},_0x259306,_0x2c4e12(0x1b9)+_0x57acdd['id']);}export async function batchDeleteMenuEntities(_0x15b2d7,_0x1976a8){const _0x1f2c45=a169_0x284c;return batchDeleteMenuRecords(_0x1976a8,_0x15b2d7,_0x1f2c45(0x1a4)+_0x1976a8['length']+_0x1f2c45(0x1b7)+(_0x1976a8[_0x1f2c45(0x1a5)]===0x1?'':'s'));}export async function startMenuRegroup(_0xa34e6a,_0x303510){const _0xa00a56=a169_0x284c;return a169_0x19375a(_0x303510,_0xa34e6a,'Regroup\x20'+_0x303510[_0xa00a56(0x1a1)][_0xa00a56(0x1a5)]+'\x20menu\x20group(s)');}
1
+ (function(_0x40907c,_0xd64309){const _0x57d187=a169_0x5b27,_0x3b9e62=_0x40907c();while(!![]){try{const _0x3d78fd=parseInt(_0x57d187(0xa7))/0x1+-parseInt(_0x57d187(0x8b))/0x2*(-parseInt(_0x57d187(0xa8))/0x3)+parseInt(_0x57d187(0x96))/0x4*(parseInt(_0x57d187(0x92))/0x5)+parseInt(_0x57d187(0xa4))/0x6*(parseInt(_0x57d187(0x8a))/0x7)+parseInt(_0x57d187(0x86))/0x8*(-parseInt(_0x57d187(0x9c))/0x9)+-parseInt(_0x57d187(0x88))/0xa+-parseInt(_0x57d187(0x87))/0xb;if(_0x3d78fd===_0xd64309)break;else _0x3b9e62['push'](_0x3b9e62['shift']());}catch(_0x384ade){_0x3b9e62['push'](_0x3b9e62['shift']());}}}(a169_0x41a8,0xd56ef));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a169_0x3f5873,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x1160a2,_0x30ddc7){const _0x32930b=a169_0x5b27,_0x40b70b=getEnv();logger['info'](_0x32930b(0x81),isProduction(_0x40b70b)?_0x32930b(0xa5)+_0x1160a2+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x1160a2+')');const _0x1a66d1=await fetchMenuSnapshot(_0x1160a2,_0x30ddc7,{'verbose':!![]});return logger['info'](_0x32930b(0x81),'Fetched\x20'+_0x1a66d1[_0x32930b(0x9a)]+'\x20online\x20menus\x20successfully'),_0x1a66d1[_0x32930b(0x97)][_0x32930b(0x91)](toProcessedMenuItem);}export async function createMenu(_0x3d4129,_0x5c60d1,_0x216954){const _0x108327=a169_0x5b27;logger[_0x108327(0xa0)](_0x108327(0x94),_0x108327(0x9b)+_0x216954['label']+'\x20('+_0x216954[_0x108327(0x8f)]+')');const _0x51916a={'appCode':_0x3d4129,'type':_0x108327(0x80),'sort':0x0,'extend':{'loadScriptMode':_0x108327(0xa6),'resources':_0x216954[_0x108327(0x8c)]?JSON[_0x108327(0x93)](_0x216954['resources']):undefined},..._0x216954},_0x2388eb=await createMenuRecord(_0x51916a,_0x5c60d1,_0x108327(0x98)+_0x216954['label']+'\x22');return logger[_0x108327(0xa0)](_0x108327(0x94),_0x108327(0xa1)+_0x216954['label']),_0x2388eb;}async function createSingleMenu(_0x540242,_0x2f4877,_0x588fdc,_0xa71315){const _0x26761c=a169_0x5b27,_0x1652da={'appCode':_0x540242,'type':_0x26761c(0x80),'sort':0x0,'extend':{'loadScriptMode':_0x26761c(0xa6),'resources':_0xa71315?JSON[_0x26761c(0x93)](_0xa71315):undefined},'label':_0x588fdc['label'],'path':_0x588fdc[_0x26761c(0x8f)]},_0xd987ad=await createMenuRecord(_0x1652da,_0x2f4877,_0x26761c(0x98)+_0x588fdc[_0x26761c(0x95)]+'\x22');return logger[_0x26761c(0xa0)](_0x26761c(0x94),_0x26761c(0xa1)+_0x588fdc[_0x26761c(0x95)]),_0xd987ad;}function a169_0x5b27(_0x43b930,_0x44688b){_0x43b930=_0x43b930-0x80;const _0x41a8d5=a169_0x41a8();let _0x5b27b7=_0x41a8d5[_0x43b930];return _0x5b27b7;}export async function createMenus(_0x2b5034,_0x5b91be,_0x41ee56,_0x17e5f9){const _0x18ea0f=a169_0x5b27;logger[_0x18ea0f(0xa0)](_0x18ea0f(0x99),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x41ee56[_0x18ea0f(0x84)]);const _0x572dd1=await Promise[_0x18ea0f(0x90)](_0x41ee56[_0x18ea0f(0x91)](_0x2332fa=>createSingleMenu(_0x2b5034,_0x5b91be,_0x2332fa,_0x17e5f9)));return logger[_0x18ea0f(0xa0)](_0x18ea0f(0x99),_0x18ea0f(0x85)+_0x41ee56['length']),_0x572dd1;}export async function updateMenuCdnUrl(_0x509298,_0x3fec21,_0x3afc07){const _0x198278=a169_0x5b27;logger[_0x198278(0xa0)](_0x198278(0xa3),_0x198278(0x83)+_0x3afc07['label']+'\x20('+_0x3afc07['path']+')');const _0x4c4deb={'id':_0x3afc07['id'],'appCode':_0x509298,'extend':{..._0x3afc07[_0x198278(0x9d)]??{},..._0x3afc07[_0x198278(0x8e)]?{'loadScriptMode':_0x3afc07[_0x198278(0x8e)]}:{},'resources':_0x3afc07['resources']?JSON[_0x198278(0x93)](_0x3afc07[_0x198278(0x8c)]):undefined}},_0x4e2986=await updateMenuRecord(_0x4c4deb,_0x3fec21,'Update\x20menu\x20assets\x20\x22'+_0x3afc07['label']+'\x22');return logger[_0x198278(0xa0)](_0x198278(0xa3),'Menu\x20assets\x20synced:\x20'+_0x3afc07['label'],undefined),_0x4e2986;}export async function createMenuEntity(_0x505ab2,_0x1daf0e,_0x59c3d8){const _0xc0773c=a169_0x5b27;return createMenuRecord({'appCode':_0x505ab2,..._0x59c3d8},_0x1daf0e,_0xc0773c(0x98)+_0x59c3d8[_0xc0773c(0x95)]+'\x22');}function a169_0x41a8(){const _0x304a1a=['create-menus','total','Creating\x20menu:\x20','1235511qZtBjW','extend','menuGroups','Update\x20menu\x20','info','Menu\x20created\x20successfully:\x20','\x20menu\x20group(s)','update-menu-cdn-url','8966538dcLFUw','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','import','1543708NEuriE','2580927cHqcGv','procode','get-online-menu-list','Regroup\x20','Updating\x20menu\x20asset\x20links:\x20','length','Batch\x20menu\x20creation\x20completed,\x20total\x20','16GnMYfb','39027505caAkMb','3322210TPdeYX','Delete\x20','7sNtGSu','2jLKoev','resources','\x20menu','loadScriptMode','path','all','map','69785NgNWmM','stringify','create-menu','label','324GIiNbk','menus','Create\x20menu\x20\x22'];a169_0x41a8=function(){return _0x304a1a;};return a169_0x41a8();}export async function updateMenuEntity(_0x4f2f87,_0x3c2f3d,_0x2b5d4f){const _0x3af177=a169_0x5b27;return updateMenuRecord({'appCode':_0x4f2f87,..._0x2b5d4f},_0x3c2f3d,_0x3af177(0x9f)+_0x2b5d4f['id']);}export async function batchDeleteMenuEntities(_0x4e4f95,_0x26dc64){const _0x3b239a=a169_0x5b27;return batchDeleteMenuRecords(_0x26dc64,_0x4e4f95,_0x3b239a(0x89)+_0x26dc64['length']+_0x3b239a(0x8d)+(_0x26dc64['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x28a653,_0x51697a){const _0x15acb3=a169_0x5b27;return a169_0x3f5873(_0x51697a,_0x28a653,_0x15acb3(0x82)+_0x51697a[_0x15acb3(0x9e)][_0x15acb3(0x84)]+_0x15acb3(0xa2));}
@@ -1 +1 @@
1
- function a170_0x40ff(){const _0x2489d6=['info','Invalid\x20--params\x20JSON.','map','Invalid\x20--params.','get','length','JS\x20URL\x20is\x20unreachable:\x20','string','4763075KXRGlH','Invalid\x20--params\x20fields:\x20','--params.','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.',':\x20expected\x20a\x20non-empty\x20string.','726784LqreXO','135753SeFFFv','3193428UoqPSO','144gyQPxd','procode','No\x20local\x20pages\x20matched\x20paths:\x20','544704iovCGB','setLogPath','30177pjvhdx','field','push','cssUrl','\x0a\x20\x20Available\x20local\x20paths:\x20','7201035KbvyBI','menu-sync','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','CSS\x20URL\x20is\x20unreachable:\x20','Menu\x20sync\x20completed','filter','trim','jsUrl','has','join','pages','path','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','dryRun','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','isArray','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','32DPlEht'];a170_0x40ff=function(){return _0x2489d6;};return a170_0x40ff();}const a170_0x563147=a170_0x3e82;(function(_0x2e9bd1,_0x371f44){const _0x4465d1=a170_0x3e82,_0x3f048a=_0x2e9bd1();while(!![]){try{const _0x3381b3=parseInt(_0x4465d1(0x194))/0x1+-parseInt(_0x4465d1(0x19a))/0x2+-parseInt(_0x4465d1(0x195))/0x3*(parseInt(_0x4465d1(0x186))/0x4)+-parseInt(_0x4465d1(0x18f))/0x5+parseInt(_0x4465d1(0x196))/0x6+-parseInt(_0x4465d1(0x19c))/0x7*(-parseInt(_0x4465d1(0x197))/0x8)+parseInt(_0x4465d1(0x1a1))/0x9;if(_0x3381b3===_0x371f44)break;else _0x3f048a['push'](_0x3f048a['shift']());}catch(_0x596ee0){_0x3f048a['push'](_0x3f048a['shift']());}}}(a170_0x40ff,0x86380));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a170_0x563147(0x1a8),a170_0x563147(0x19f)]);function a170_0x3e82(_0x3ffae9,_0x2eee94){_0x3ffae9=_0x3ffae9-0x186;const _0x40ff1f=a170_0x40ff();let _0x3e825d=_0x40ff1f[_0x3ffae9];return _0x3e825d;}function validateParams(_0x17eb7a){const _0x3ce9ca=a170_0x563147,_0x2acdb5=[];return _0x17eb7a[_0x3ce9ca(0x1a8)]&&!isValidJsHttpsUrl(_0x17eb7a[_0x3ce9ca(0x1a8)])&&_0x2acdb5['push']({'field':_0x3ce9ca(0x1a8),'message':_0x3ce9ca(0x1b1)}),_0x17eb7a[_0x3ce9ca(0x19f)]&&!isValidCssHttpsUrl(_0x17eb7a[_0x3ce9ca(0x19f)])&&_0x2acdb5[_0x3ce9ca(0x19e)]({'field':_0x3ce9ca(0x19f),'message':_0x3ce9ca(0x1ad)}),_0x2acdb5;}export async function runMenuSyncCore(_0x2777b3,_0x2a4748,_0x33cfd2=[],_0x417c62,_0x531804={}){const _0x559a42=a170_0x563147,_0x115689=parseMenuSyncParams(_0x417c62),_0x207fc2=[...new Set(_0x33cfd2[_0x559a42(0x189)](_0xb6947b=>_0xb6947b[_0x559a42(0x1a7)]())['filter'](Boolean))],_0x5f3872=_0x115689['jsUrl'],_0x48ffa0=_0x115689[_0x559a42(0x19f)],_0x316450=[];if(_0x5f3872)_0x316450[_0x559a42(0x19e)](_0x5f3872);if(_0x48ffa0)_0x316450[_0x559a42(0x19e)](_0x48ffa0);const _0x440482=validateParams(_0x115689);if(_0x440482[_0x559a42(0x18c)]>0x0){const _0x3b065a=_0x440482[_0x559a42(0x189)](_0x534aad=>_0x559a42(0x191)+_0x534aad[_0x559a42(0x19d)]+':\x20'+_0x534aad['message'])[_0x559a42(0x1aa)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x3b065a);}logger[_0x559a42(0x19b)](process['cwd']()),logger['info'](_0x559a42(0x1a2),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x2777b3,'selectedCount':_0x207fc2[_0x559a42(0x18c)],'jsUrl':_0x5f3872,'cssUrl':_0x48ffa0});if(_0x5f3872){const _0xf0d9e7=await isUrlReachable(_0x5f3872);if(!_0xf0d9e7)throw new Error(_0x559a42(0x18d)+_0x5f3872);}if(_0x48ffa0){const _0x3aec90=await isUrlReachable(_0x48ffa0);if(!_0x3aec90)throw new Error(_0x559a42(0x1a4)+_0x48ffa0);}const _0x446fe9=getLocalPages();if(_0x446fe9[_0x559a42(0x18c)]===0x0){if(_0x207fc2['length']>0x0)throw new Error(_0x559a42(0x199)+_0x207fc2['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x531804[_0x559a42(0x1ae)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x3373b2=await getOnlineMenuList(_0x2777b3,_0x2a4748),_0x44d8bd=new Set(_0x3373b2[_0x559a42(0x189)](_0x3ffd81=>_0x3ffd81[_0x559a42(0x1ac)]));let _0x5c2aaa;if(_0x207fc2[_0x559a42(0x18c)]>0x0){const _0x57c43a=new Map(_0x446fe9[_0x559a42(0x189)](_0x41b5a8=>[_0x41b5a8[_0x559a42(0x1ac)],_0x41b5a8])),_0x432ce4=_0x207fc2[_0x559a42(0x1a6)](_0x2ed0b4=>!_0x57c43a[_0x559a42(0x1a9)](_0x2ed0b4));if(_0x432ce4[_0x559a42(0x18c)]>0x0){const _0x58b582=_0x446fe9[_0x559a42(0x189)](_0x5c22f8=>_0x5c22f8['path'])[_0x559a42(0x1aa)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x432ce4[_0x559a42(0x1aa)](',\x20')+_0x559a42(0x1a0)+_0x58b582);}const _0x436b9b=_0x207fc2[_0x559a42(0x1a6)](_0x392a64=>_0x44d8bd[_0x559a42(0x1a9)](_0x392a64));if(_0x436b9b['length']>0x0)throw new Error(_0x559a42(0x1af)+_0x436b9b[_0x559a42(0x1aa)](',\x20'));_0x5c2aaa=_0x207fc2[_0x559a42(0x189)](_0x3e33a4=>_0x57c43a[_0x559a42(0x18b)](_0x3e33a4));}else _0x5c2aaa=_0x446fe9[_0x559a42(0x1a6)](_0x267348=>!_0x44d8bd[_0x559a42(0x1a9)](_0x267348[_0x559a42(0x1ac)]));if(_0x5c2aaa[_0x559a42(0x18c)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x531804[_0x559a42(0x1ae)]===!![],'targetPages':[],'plannedMenus':[]};const _0x1f9aa7=_0x5c2aaa[_0x559a42(0x189)](_0x4c39f6=>({'type':_0x559a42(0x198),'path':_0x4c39f6[_0x559a42(0x1ac)],'label':_0x4c39f6['label'],'loadScriptMode':'import','resources':[..._0x316450]}));if(_0x531804[_0x559a42(0x1ae)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x5c2aaa,'plannedMenus':_0x1f9aa7};const _0x211589=await createMenus(_0x2777b3,_0x2a4748,_0x5c2aaa,_0x316450['length']>0x0?_0x316450:undefined);return logger[_0x559a42(0x187)](_0x559a42(0x1a2),_0x559a42(0x1a5),{'count':_0x5c2aaa[_0x559a42(0x18c)],'resources':_0x316450}),{'created':_0x211589[_0x559a42(0x18c)],'skipped':![],'dryRun':![],'targetPages':_0x5c2aaa,'plannedMenus':_0x1f9aa7,'menus':_0x211589};}export function parseMenuSyncParams(_0x3108d0){const _0x41370b=a170_0x563147;if(!_0x3108d0||typeof _0x3108d0!==_0x41370b(0x18e))return{};let _0x2c9de4;try{_0x2c9de4=JSON['parse'](_0x3108d0);}catch{throw new Error(_0x41370b(0x188));}if(typeof _0x2c9de4!=='object'||_0x2c9de4===null||Array[_0x41370b(0x1b0)](_0x2c9de4))throw new Error(_0x41370b(0x1a3));const _0x33a6dc=_0x2c9de4;if(Object['hasOwn'](_0x33a6dc,_0x41370b(0x1ab)))throw new Error(_0x41370b(0x192));const _0x5d6284=Object['keys'](_0x33a6dc)[_0x41370b(0x1a6)](_0x1e49b8=>!MENU_SYNC_PARAM_KEYS[_0x41370b(0x1a9)](_0x1e49b8));if(_0x5d6284[_0x41370b(0x18c)]>0x0)throw new Error(_0x41370b(0x190)+_0x5d6284[_0x41370b(0x1aa)](',\x20')+'.');for(const _0x2fd85c of MENU_SYNC_PARAM_KEYS){const _0x278af0=_0x33a6dc[_0x2fd85c];if(_0x278af0!==undefined&&(typeof _0x278af0!==_0x41370b(0x18e)||_0x278af0[_0x41370b(0x1a7)]()===''))throw new Error(_0x41370b(0x18a)+_0x2fd85c+_0x41370b(0x193));}return{'jsUrl':typeof _0x33a6dc[_0x41370b(0x1a8)]==='string'?_0x33a6dc[_0x41370b(0x1a8)][_0x41370b(0x1a7)]():undefined,'cssUrl':typeof _0x33a6dc[_0x41370b(0x19f)]===_0x41370b(0x18e)?_0x33a6dc['cssUrl'][_0x41370b(0x1a7)]():undefined};}
1
+ const a170_0x1823af=a170_0x151b;(function(_0x2eb75c,_0x31bf7a){const _0x19b586=a170_0x151b,_0x57b7aa=_0x2eb75c();while(!![]){try{const _0x29bc6b=parseInt(_0x19b586(0x15a))/0x1*(parseInt(_0x19b586(0x16b))/0x2)+-parseInt(_0x19b586(0x169))/0x3*(-parseInt(_0x19b586(0x15d))/0x4)+-parseInt(_0x19b586(0x142))/0x5+parseInt(_0x19b586(0x14c))/0x6*(-parseInt(_0x19b586(0x15c))/0x7)+-parseInt(_0x19b586(0x153))/0x8+parseInt(_0x19b586(0x158))/0x9*(-parseInt(_0x19b586(0x146))/0xa)+parseInt(_0x19b586(0x16d))/0xb;if(_0x29bc6b===_0x31bf7a)break;else _0x57b7aa['push'](_0x57b7aa['shift']());}catch(_0x10b45c){_0x57b7aa['push'](_0x57b7aa['shift']());}}}(a170_0x2bc1,0xee71e));function a170_0x151b(_0x43b3c9,_0x1329cd){_0x43b3c9=_0x43b3c9-0x140;const _0x2bc169=a170_0x2bc1();let _0x151b3c=_0x2bc169[_0x43b3c9];return _0x151b3c;}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a170_0x2bc1(){const _0x2a3202=['pages','Menu\x20sync\x20completed','dryRun','length','jsUrl','cwd','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','label','setLogPath','trim','field','3bHBaCt','filter','6KsyRfx','isArray','22328053AtsDvv','path','import','1675345emyKVI','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','CSS\x20URL\x20is\x20unreachable:\x20','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','10KtvCbW','cssUrl','hasOwn','get','push','No\x20local\x20pages\x20matched\x20paths:\x20','78BRLtqE','menu-sync','map','Invalid\x20--params\x20fields:\x20','procode','info','join','2817936RoWDna','message','has','string','Invalid\x20--params.','16785666recroS','keys','538247XbHpXN','parse','827491HmPRaN','5685040LHwzEe'];a170_0x2bc1=function(){return _0x2a3202;};return a170_0x2bc1();}import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set([a170_0x1823af(0x162),a170_0x1823af(0x147)]);function validateParams(_0x2c1645){const _0x2e3c1e=a170_0x1823af,_0x50fc85=[];return _0x2c1645['jsUrl']&&!isValidJsHttpsUrl(_0x2c1645[_0x2e3c1e(0x162)])&&_0x50fc85[_0x2e3c1e(0x14a)]({'field':_0x2e3c1e(0x162),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x2c1645[_0x2e3c1e(0x147)]&&!isValidCssHttpsUrl(_0x2c1645[_0x2e3c1e(0x147)])&&_0x50fc85[_0x2e3c1e(0x14a)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x50fc85;}export async function runMenuSyncCore(_0x27706e,_0x21f65b,_0x293d01=[],_0x204773,_0x90ef74={}){const _0x29ed5a=a170_0x1823af,_0x3757ab=parseMenuSyncParams(_0x204773),_0x3314bb=[...new Set(_0x293d01['map'](_0x1cfaac=>_0x1cfaac['trim']())[_0x29ed5a(0x16a)](Boolean))],_0x19e7bc=_0x3757ab[_0x29ed5a(0x162)],_0x8d1641=_0x3757ab['cssUrl'],_0x2651e8=[];if(_0x19e7bc)_0x2651e8['push'](_0x19e7bc);if(_0x8d1641)_0x2651e8['push'](_0x8d1641);const _0x4a38ed=validateParams(_0x3757ab);if(_0x4a38ed[_0x29ed5a(0x161)]>0x0){const _0x3d0001=_0x4a38ed['map'](_0x2e4f9a=>'--params.'+_0x2e4f9a[_0x29ed5a(0x168)]+':\x20'+_0x2e4f9a[_0x29ed5a(0x154)])[_0x29ed5a(0x152)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x3d0001);}logger[_0x29ed5a(0x166)](process[_0x29ed5a(0x163)]()),logger[_0x29ed5a(0x151)](_0x29ed5a(0x14d),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x27706e,'selectedCount':_0x3314bb[_0x29ed5a(0x161)],'jsUrl':_0x19e7bc,'cssUrl':_0x8d1641});if(_0x19e7bc){const _0x5084ac=await isUrlReachable(_0x19e7bc);if(!_0x5084ac)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x19e7bc);}if(_0x8d1641){const _0x26a1de=await isUrlReachable(_0x8d1641);if(!_0x26a1de)throw new Error(_0x29ed5a(0x144)+_0x8d1641);}const _0x528c5e=getLocalPages();if(_0x528c5e[_0x29ed5a(0x161)]===0x0){if(_0x3314bb['length']>0x0)throw new Error(_0x29ed5a(0x14b)+_0x3314bb['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x90ef74['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x1052f5=await getOnlineMenuList(_0x27706e,_0x21f65b),_0x3f176f=new Set(_0x1052f5[_0x29ed5a(0x14e)](_0x26f763=>_0x26f763[_0x29ed5a(0x140)]));let _0x1c83b1;if(_0x3314bb[_0x29ed5a(0x161)]>0x0){const _0x4d33b0=new Map(_0x528c5e['map'](_0x2ad2cb=>[_0x2ad2cb[_0x29ed5a(0x140)],_0x2ad2cb])),_0x1b8508=_0x3314bb[_0x29ed5a(0x16a)](_0x17cac7=>!_0x4d33b0[_0x29ed5a(0x155)](_0x17cac7));if(_0x1b8508[_0x29ed5a(0x161)]>0x0){const _0x34ce1b=_0x528c5e[_0x29ed5a(0x14e)](_0x106c1d=>_0x106c1d[_0x29ed5a(0x140)])[_0x29ed5a(0x152)](',\x20');throw new Error(_0x29ed5a(0x14b)+_0x1b8508['join'](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x34ce1b);}const _0x17c330=_0x3314bb[_0x29ed5a(0x16a)](_0x231cb7=>_0x3f176f[_0x29ed5a(0x155)](_0x231cb7));if(_0x17c330[_0x29ed5a(0x161)]>0x0)throw new Error(_0x29ed5a(0x143)+_0x17c330['join'](',\x20'));_0x1c83b1=_0x3314bb[_0x29ed5a(0x14e)](_0x29e654=>_0x4d33b0[_0x29ed5a(0x149)](_0x29e654));}else _0x1c83b1=_0x528c5e['filter'](_0x480239=>!_0x3f176f[_0x29ed5a(0x155)](_0x480239[_0x29ed5a(0x140)]));if(_0x1c83b1[_0x29ed5a(0x161)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x90ef74[_0x29ed5a(0x160)]===!![],'targetPages':[],'plannedMenus':[]};const _0x28d0ae=_0x1c83b1[_0x29ed5a(0x14e)](_0x50b95d=>({'type':_0x29ed5a(0x150),'path':_0x50b95d[_0x29ed5a(0x140)],'label':_0x50b95d[_0x29ed5a(0x165)],'loadScriptMode':_0x29ed5a(0x141),'resources':[..._0x2651e8]}));if(_0x90ef74[_0x29ed5a(0x160)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x1c83b1,'plannedMenus':_0x28d0ae};const _0x5e081a=await createMenus(_0x27706e,_0x21f65b,_0x1c83b1,_0x2651e8[_0x29ed5a(0x161)]>0x0?_0x2651e8:undefined);return logger[_0x29ed5a(0x151)](_0x29ed5a(0x14d),_0x29ed5a(0x15f),{'count':_0x1c83b1[_0x29ed5a(0x161)],'resources':_0x2651e8}),{'created':_0x5e081a['length'],'skipped':![],'dryRun':![],'targetPages':_0x1c83b1,'plannedMenus':_0x28d0ae,'menus':_0x5e081a};}export function parseMenuSyncParams(_0x300eef){const _0x2a9136=a170_0x1823af;if(!_0x300eef||typeof _0x300eef!==_0x2a9136(0x156))return{};let _0x1a88fe;try{_0x1a88fe=JSON[_0x2a9136(0x15b)](_0x300eef);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x1a88fe!=='object'||_0x1a88fe===null||Array[_0x2a9136(0x16c)](_0x1a88fe))throw new Error(_0x2a9136(0x164));const _0x5630c2=_0x1a88fe;if(Object[_0x2a9136(0x148)](_0x5630c2,_0x2a9136(0x15e)))throw new Error(_0x2a9136(0x145));const _0x1932d3=Object[_0x2a9136(0x159)](_0x5630c2)[_0x2a9136(0x16a)](_0x4fad8b=>!MENU_SYNC_PARAM_KEYS[_0x2a9136(0x155)](_0x4fad8b));if(_0x1932d3[_0x2a9136(0x161)]>0x0)throw new Error(_0x2a9136(0x14f)+_0x1932d3[_0x2a9136(0x152)](',\x20')+'.');for(const _0x171a70 of MENU_SYNC_PARAM_KEYS){const _0x1f0a31=_0x5630c2[_0x171a70];if(_0x1f0a31!==undefined&&(typeof _0x1f0a31!==_0x2a9136(0x156)||_0x1f0a31[_0x2a9136(0x167)]()===''))throw new Error(_0x2a9136(0x157)+_0x171a70+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x5630c2[_0x2a9136(0x162)]===_0x2a9136(0x156)?_0x5630c2[_0x2a9136(0x162)][_0x2a9136(0x167)]():undefined,'cssUrl':typeof _0x5630c2['cssUrl']===_0x2a9136(0x156)?_0x5630c2[_0x2a9136(0x147)]['trim']():undefined};}
@@ -1 +1 @@
1
- (function(_0x497ad2,_0x257fb1){const _0x3ba66e=a172_0x1579,_0x1d4353=_0x497ad2();while(!![]){try{const _0x59fed4=parseInt(_0x3ba66e(0x84))/0x1*(-parseInt(_0x3ba66e(0x9e))/0x2)+parseInt(_0x3ba66e(0x9d))/0x3+-parseInt(_0x3ba66e(0x7d))/0x4+-parseInt(_0x3ba66e(0xa4))/0x5+parseInt(_0x3ba66e(0x9a))/0x6*(parseInt(_0x3ba66e(0x77))/0x7)+parseInt(_0x3ba66e(0x7b))/0x8*(-parseInt(_0x3ba66e(0x98))/0x9)+parseInt(_0x3ba66e(0xb2))/0xa*(parseInt(_0x3ba66e(0x95))/0xb);if(_0x59fed4===_0x257fb1)break;else _0x1d4353['push'](_0x1d4353['shift']());}catch(_0xd72253){_0x1d4353['push'](_0x1d4353['shift']());}}}(a172_0x56a8,0x403c4));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a172_0x56a8(){const _0xb46b39=['resources','732tnRZIN','.\x20Allowed\x20values:\x20replace,\x20patch','field','1108323FxaPMq','293690hWhugZ','has','all','isArray','patch','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','1574610eMWYoY','Invalid\x20--mode:\x20','Start\x20non-interactive\x20menu\x20asset\x20update','trim','replace','.css','.js','map','CSS\x20URL\x20is\x20unreachable:\x20','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','\x22\x20(','length','join','parse','2690RGWWyJ','--params.','menuIds','unshift','allSettled','Menu\x20asset\x20update\x20completed','jsUrl','filter','menu\x20asset-update\x20cannot\x20patch\x20','loadScriptMode','JS\x20URL\x20is\x20unreachable:\x20','label','Invalid\x20--params:\x20','toLowerCase','15911fVmJnt','info','cssUrl','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','324072bJjHou','push','485280JHxEXV','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','after','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','string','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','force','3dMgInZ','endsWith','split','status','fulfilled','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','paths','selection','menu-asset-update','some','dryRun','\x20existing\x20CSS\x20resources\x20for\x20\x22',').\x20','path','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','setLogPath','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','25135uXvykr','extend','object','27KNKxpI'];a172_0x56a8=function(){return _0xb46b39;};return a172_0x56a8();}import{logger}from'../../../utils/logger.js';function validateParams(_0x3f9fbb){const _0x10740b=a172_0x1579,_0x2eb057=[];return _0x3f9fbb[_0x10740b(0x6f)]&&!isValidJsHttpsUrl(_0x3f9fbb['jsUrl'])&&_0x2eb057['push']({'field':_0x10740b(0x6f),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x3f9fbb[_0x10740b(0x79)]&&!isValidCssHttpsUrl(_0x3f9fbb[_0x10740b(0x79)])&&_0x2eb057[_0x10740b(0x7c)]({'field':_0x10740b(0x79),'message':_0x10740b(0x92)}),_0x2eb057;}export async function runMenuUpdateCore(_0x3a098e,_0x5066d8,_0x3ddebd,_0x44238e={}){const _0x2185e8=a172_0x1579,_0x2cef67=parseUpdateParamsFlag(_0x3ddebd),_0x1f52c8=normalizeMode(_0x44238e['mode']);validateSelection(_0x44238e[_0x2185e8(0x8b)]);const _0xc2675b=[];if(_0x2cef67[_0x2185e8(0x6f)])_0xc2675b[_0x2185e8(0x7c)](_0x2cef67['jsUrl']);if(_0x2cef67[_0x2185e8(0x79)])_0xc2675b[_0x2185e8(0x7c)](_0x2cef67[_0x2185e8(0x79)]);const _0x5e9e66=validateParams(_0x2cef67);if(_0x5e9e66['length']>0x0){const _0x4727a0=_0x5e9e66[_0x2185e8(0xab)](_0x7d3f13=>_0x2185e8(0xb3)+_0x7d3f13[_0x2185e8(0x9c)]+':\x20'+_0x7d3f13['message'])[_0x2185e8(0xb0)](';\x20');throw new Error(_0x2185e8(0x75)+_0x4727a0);}if(_0xc2675b[_0x2185e8(0xaf)]===0x0)throw new Error(_0x2185e8(0x7e)+_0x2185e8(0x89));logger[_0x2185e8(0x93)](process['cwd']()),logger[_0x2185e8(0x78)]('menu-asset-update',_0x2185e8(0xa6),{'appCode':_0x3a098e,'jsUrl':_0x2cef67[_0x2185e8(0x6f)],'cssUrl':_0x2cef67[_0x2185e8(0x79)],'mode':_0x1f52c8,'dryRun':_0x44238e['dryRun']===!![]});if(_0x2cef67[_0x2185e8(0x6f)]){const _0x3020a0=await isUrlReachable(_0x2cef67[_0x2185e8(0x6f)]);if(!_0x3020a0)throw new Error(_0x2185e8(0x73)+_0x2cef67[_0x2185e8(0x6f)]);}if(_0x2cef67[_0x2185e8(0x79)]){const _0x389c64=await isUrlReachable(_0x2cef67['cssUrl']);if(!_0x389c64)throw new Error(_0x2185e8(0xac)+_0x2cef67[_0x2185e8(0x79)]);}const _0xf04e7e=await getOnlineMenuList(_0x3a098e,_0x5066d8),_0x362480=_0xf04e7e[_0x2185e8(0x70)](_0x46a210=>_0x46a210[_0x2185e8(0x99)][_0x2185e8(0xaf)]>0x0),_0x2ceb9b=selectMenusForUpdate(_0x362480,_0x44238e[_0x2185e8(0x8b)]);if(_0x2ceb9b[_0x2185e8(0xaf)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x44238e[_0x2185e8(0x8e)]===!![]};const _0x4e9b7a=_0x2ceb9b[_0x2185e8(0xab)](_0x9f62b6=>buildMenuUpdateDiff(_0x9f62b6,_0x2cef67,_0x1f52c8,_0x44238e[_0x2185e8(0x83)]===!![],_0x44238e[_0x2185e8(0x72)]));if(_0x44238e[_0x2185e8(0x8e)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4e9b7a};const _0x54791c=await Promise[_0x2185e8(0x6d)](_0x2ceb9b['map']((_0x5c0285,_0x3d0630)=>updateMenuCdnUrl(_0x3a098e,_0x5066d8,{'id':_0x5c0285['id'],'label':_0x5c0285['label'],'path':_0x5c0285[_0x2185e8(0x91)],'resources':_0x4e9b7a[_0x3d0630][_0x2185e8(0x7f)][_0x2185e8(0x99)],'extend':_0x5c0285[_0x2185e8(0x96)]??null,'loadScriptMode':_0x44238e[_0x2185e8(0x72)]}))),_0x1edd78=_0x54791c[_0x2185e8(0x70)](_0x510994=>_0x510994[_0x2185e8(0x87)]===_0x2185e8(0x88))[_0x2185e8(0xab)](_0x2c0ad7=>_0x2c0ad7['value']),_0x2c4b7a=_0x54791c[_0x2185e8(0x70)](_0x1dfa52=>_0x1dfa52[_0x2185e8(0x87)]==='rejected')[_0x2185e8(0xaf)];return logger['info'](_0x2185e8(0x8c),_0x2185e8(0x6e),{'count':_0x2ceb9b['length'],'resources':_0xc2675b}),{'updated':_0x1edd78[_0x2185e8(0xaf)],'failed':_0x2c4b7a,'skipped':![],'menus':_0x1edd78};}function validateSelection(_0x1a55d6){const _0x37ca73=a172_0x1579;if(!_0x1a55d6)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x1a55d6[_0x37ca73(0xa0)]&&(_0x1a55d6[_0x37ca73(0x6b)][_0x37ca73(0xaf)]>0x0||_0x1a55d6[_0x37ca73(0x8a)][_0x37ca73(0xaf)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x1a55d6[_0x37ca73(0xa0)]&&_0x1a55d6[_0x37ca73(0x6b)]['length']===0x0&&_0x1a55d6[_0x37ca73(0x8a)][_0x37ca73(0xaf)]===0x0)throw new Error(_0x37ca73(0x94));}export function selectMenusForUpdate(_0x5985bd,_0x3b9e5b){const _0x59b6cf=a172_0x1579;validateSelection(_0x3b9e5b);if(_0x3b9e5b['all'])return _0x5985bd;const _0x1d1d37=new Set(_0x5985bd[_0x59b6cf(0xab)](_0x5b0fb8=>_0x5b0fb8['id'])),_0xa0dab3=new Set(_0x5985bd['map'](_0x1d927b=>_0x1d927b[_0x59b6cf(0x91)])),_0x1dd401=_0x3b9e5b['menuIds'][_0x59b6cf(0x70)](_0x149d44=>!_0x1d1d37[_0x59b6cf(0x9f)](_0x149d44)),_0x22b1eb=_0x3b9e5b[_0x59b6cf(0x8a)][_0x59b6cf(0x70)](_0x2cab34=>!_0xa0dab3[_0x59b6cf(0x9f)](_0x2cab34));if(_0x1dd401[_0x59b6cf(0xaf)]>0x0||_0x22b1eb['length']>0x0){const _0x99e202=[..._0x1dd401[_0x59b6cf(0xab)](_0x1f6b70=>String(_0x1f6b70)),..._0x22b1eb][_0x59b6cf(0xb0)](',\x20');throw new Error(_0x59b6cf(0x82)+_0x99e202);}const _0xe8a21b=new Set(_0x3b9e5b[_0x59b6cf(0x6b)]),_0x26364b=new Set(_0x3b9e5b[_0x59b6cf(0x8a)]);return _0x5985bd[_0x59b6cf(0x70)](_0x5e5b8e=>_0xe8a21b[_0x59b6cf(0x9f)](_0x5e5b8e['id'])||_0x26364b[_0x59b6cf(0x9f)](_0x5e5b8e['path']));}function normalizeMode(_0x1a8480){const _0x465626=a172_0x1579;if(!_0x1a8480)return'patch';if(_0x1a8480===_0x465626(0xa8)||_0x1a8480===_0x465626(0xa2))return _0x1a8480;throw new Error(_0x465626(0xa5)+_0x1a8480+_0x465626(0x9b));}function buildMenuUpdateDiff(_0x33e83b,_0x18c40a,_0x588c9f,_0x3dd320,_0x3e749b){const _0x56aeda=a172_0x1579,_0x12aa12=[..._0x33e83b['resources']];_0x588c9f===_0x56aeda(0xa2)&&assertUnambiguousPatchResources(_0x33e83b,_0x12aa12,_0x18c40a);const _0x5712e1=_0x588c9f===_0x56aeda(0xa2)?patchResources(_0x12aa12,_0x18c40a):replaceResources(_0x18c40a),_0x30395c=[],_0x387819=_0x12aa12['some'](isJsResource),_0x118ed0=_0x5712e1[_0x56aeda(0x8d)](isJsResource);if(_0x387819&&!_0x118ed0){const _0x6be26=_0x56aeda(0xad)+_0x33e83b[_0x56aeda(0x74)]+_0x56aeda(0xae)+_0x33e83b[_0x56aeda(0x91)]+_0x56aeda(0x90)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x3dd320)throw new Error(_0x6be26);_0x30395c[_0x56aeda(0x7c)](_0x6be26);}const _0x3eba63=_0x12aa12[_0x56aeda(0x8d)](isCssResource),_0x99fe9a=_0x5712e1[_0x56aeda(0x8d)](isCssResource);_0x3eba63&&!_0x99fe9a&&_0x30395c[_0x56aeda(0x7c)](_0x56aeda(0x80)+_0x33e83b[_0x56aeda(0x74)]+_0x56aeda(0xae)+_0x33e83b['path']+').');const _0x3af63f=typeof _0x33e83b[_0x56aeda(0x96)]?.[_0x56aeda(0x72)]===_0x56aeda(0x81)?_0x33e83b['extend'][_0x56aeda(0x72)]:null,_0x10e67b=_0x3e749b?{'loadScriptMode':_0x3af63f}:{},_0x7f0cbb=_0x3e749b?{'loadScriptMode':_0x3e749b}:{};return{'id':_0x33e83b['id'],'label':_0x33e83b['label'],'path':_0x33e83b['path'],'mode':_0x588c9f,'before':{'resources':_0x12aa12,..._0x10e67b},'after':{'resources':_0x5712e1,..._0x7f0cbb},'warnings':_0x30395c};}function replaceResources(_0x4d7c25){const _0x5eb5ba=a172_0x1579;return[_0x4d7c25['jsUrl'],_0x4d7c25[_0x5eb5ba(0x79)]][_0x5eb5ba(0x70)](_0x318b33=>!!_0x318b33);}function assertUnambiguousPatchResources(_0x22853c,_0x45636d,_0x40f3d9){const _0x236ed2=a172_0x1579,_0x4281f3=_0x45636d[_0x236ed2(0x70)](isJsResource)[_0x236ed2(0xaf)];if(_0x40f3d9[_0x236ed2(0x6f)]&&_0x4281f3>0x1)throw new Error(_0x236ed2(0x71)+_0x4281f3+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x22853c[_0x236ed2(0x74)]+_0x236ed2(0xae)+_0x22853c[_0x236ed2(0x91)]+')\x20'+_0x236ed2(0xa3));const _0x8fdd5b=_0x45636d['filter'](isCssResource)[_0x236ed2(0xaf)];if(_0x40f3d9[_0x236ed2(0x79)]&&_0x8fdd5b>0x1)throw new Error(_0x236ed2(0x71)+_0x8fdd5b+_0x236ed2(0x8f)+_0x22853c[_0x236ed2(0x74)]+_0x236ed2(0xae)+_0x22853c[_0x236ed2(0x91)]+')\x20'+_0x236ed2(0x7a));}function patchResources(_0xf291e5,_0x1e8182){const _0x434fea=a172_0x1579;let _0x653662=![],_0x168274=![];const _0x5c857b=[];for(const _0x556e30 of _0xf291e5){if(isJsResource(_0x556e30)){if(_0x1e8182['jsUrl']&&!_0x653662)_0x5c857b['push'](_0x1e8182[_0x434fea(0x6f)]),_0x653662=!![];else!_0x1e8182[_0x434fea(0x6f)]&&_0x5c857b[_0x434fea(0x7c)](_0x556e30);continue;}if(isCssResource(_0x556e30)){if(_0x1e8182[_0x434fea(0x79)]&&!_0x168274)_0x5c857b[_0x434fea(0x7c)](_0x1e8182['cssUrl']),_0x168274=!![];else!_0x1e8182[_0x434fea(0x79)]&&_0x5c857b[_0x434fea(0x7c)](_0x556e30);continue;}_0x5c857b['push'](_0x556e30);}return _0x1e8182['jsUrl']&&!_0x653662&&_0x5c857b[_0x434fea(0x6c)](_0x1e8182['jsUrl']),_0x1e8182['cssUrl']&&!_0x168274&&_0x5c857b[_0x434fea(0x7c)](_0x1e8182[_0x434fea(0x79)]),_0x5c857b;}function a172_0x1579(_0x29e782,_0x1d78ea){_0x29e782=_0x29e782-0x6b;const _0x56a87c=a172_0x56a8();let _0x157997=_0x56a87c[_0x29e782];return _0x157997;}function isJsResource(_0x1cae6c){const _0x12e9e6=a172_0x1579;return stripQuery(_0x1cae6c)[_0x12e9e6(0x76)]()[_0x12e9e6(0x85)](_0x12e9e6(0xaa));}function isCssResource(_0x49f1e7){const _0x379854=a172_0x1579;return stripQuery(_0x49f1e7)[_0x379854(0x76)]()[_0x379854(0x85)](_0x379854(0xa9));}function stripQuery(_0x1bb5ea){const _0x335a20=a172_0x1579;return _0x1bb5ea[_0x335a20(0x86)]('?')[0x0]??_0x1bb5ea;}function parseUpdateParamsFlag(_0x1d90a8){const _0x55481b=a172_0x1579;if(!_0x1d90a8||typeof _0x1d90a8!==_0x55481b(0x81))return{};try{const _0x4ed2f0=JSON[_0x55481b(0xb1)](_0x1d90a8);if(typeof _0x4ed2f0!==_0x55481b(0x97)||_0x4ed2f0===null||Array[_0x55481b(0xa1)](_0x4ed2f0))return{};return{'jsUrl':typeof _0x4ed2f0[_0x55481b(0x6f)]===_0x55481b(0x81)?_0x4ed2f0[_0x55481b(0x6f)][_0x55481b(0xa7)]():undefined,'cssUrl':typeof _0x4ed2f0['cssUrl']===_0x55481b(0x81)?_0x4ed2f0[_0x55481b(0x79)][_0x55481b(0xa7)]():undefined};}catch{return{};}}
1
+ (function(_0x1570d9,_0x1a90da){const _0x15d637=a172_0x370b,_0x5de6f2=_0x1570d9();while(!![]){try{const _0x33b88d=-parseInt(_0x15d637(0x170))/0x1*(parseInt(_0x15d637(0x160))/0x2)+parseInt(_0x15d637(0x173))/0x3+parseInt(_0x15d637(0x15f))/0x4*(-parseInt(_0x15d637(0x147))/0x5)+-parseInt(_0x15d637(0x149))/0x6*(-parseInt(_0x15d637(0x164))/0x7)+parseInt(_0x15d637(0x15a))/0x8+parseInt(_0x15d637(0x13d))/0x9*(parseInt(_0x15d637(0x16f))/0xa)+-parseInt(_0x15d637(0x139))/0xb;if(_0x33b88d===_0x1a90da)break;else _0x5de6f2['push'](_0x5de6f2['shift']());}catch(_0x43417a){_0x5de6f2['push'](_0x5de6f2['shift']());}}}(a172_0x43a8,0x66efe));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a172_0x370b(_0x581435,_0x2cbc7b){_0x581435=_0x581435-0x12d;const _0x43a8e3=a172_0x43a8();let _0x370b17=_0x43a8e3[_0x581435];return _0x370b17;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x1bb97d){const _0x58b232=a172_0x370b,_0x1f8bd0=[];return _0x1bb97d[_0x58b232(0x14f)]&&!isValidJsHttpsUrl(_0x1bb97d['jsUrl'])&&_0x1f8bd0[_0x58b232(0x145)]({'field':_0x58b232(0x14f),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x1bb97d[_0x58b232(0x148)]&&!isValidCssHttpsUrl(_0x1bb97d['cssUrl'])&&_0x1f8bd0[_0x58b232(0x145)]({'field':_0x58b232(0x148),'message':_0x58b232(0x167)}),_0x1f8bd0;}export async function runMenuUpdateCore(_0x2cfa5e,_0x537370,_0x38499b,_0x43dad8={}){const _0x1101cb=a172_0x370b,_0x12b644=parseUpdateParamsFlag(_0x38499b),_0x5de3af=normalizeMode(_0x43dad8['mode']);validateSelection(_0x43dad8[_0x1101cb(0x157)]);const _0x2813c3=[];if(_0x12b644[_0x1101cb(0x14f)])_0x2813c3[_0x1101cb(0x145)](_0x12b644[_0x1101cb(0x14f)]);if(_0x12b644[_0x1101cb(0x148)])_0x2813c3[_0x1101cb(0x145)](_0x12b644[_0x1101cb(0x148)]);const _0x51ab75=validateParams(_0x12b644);if(_0x51ab75['length']>0x0){const _0x2d6767=_0x51ab75[_0x1101cb(0x140)](_0x3b2376=>_0x1101cb(0x171)+_0x3b2376[_0x1101cb(0x142)]+':\x20'+_0x3b2376['message'])[_0x1101cb(0x159)](';\x20');throw new Error(_0x1101cb(0x12e)+_0x2d6767);}if(_0x2813c3[_0x1101cb(0x150)]===0x0)throw new Error(_0x1101cb(0x172)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger['setLogPath'](process[_0x1101cb(0x152)]()),logger[_0x1101cb(0x165)](_0x1101cb(0x162),_0x1101cb(0x14e),{'appCode':_0x2cfa5e,'jsUrl':_0x12b644[_0x1101cb(0x14f)],'cssUrl':_0x12b644[_0x1101cb(0x148)],'mode':_0x5de3af,'dryRun':_0x43dad8[_0x1101cb(0x13b)]===!![]});if(_0x12b644[_0x1101cb(0x14f)]){const _0x21bd2c=await isUrlReachable(_0x12b644['jsUrl']);if(!_0x21bd2c)throw new Error(_0x1101cb(0x158)+_0x12b644[_0x1101cb(0x14f)]);}if(_0x12b644[_0x1101cb(0x148)]){const _0x1756b3=await isUrlReachable(_0x12b644[_0x1101cb(0x148)]);if(!_0x1756b3)throw new Error(_0x1101cb(0x166)+_0x12b644[_0x1101cb(0x148)]);}const _0x3259c5=await getOnlineMenuList(_0x2cfa5e,_0x537370),_0x184e47=_0x3259c5[_0x1101cb(0x169)](_0x3eb938=>_0x3eb938[_0x1101cb(0x131)][_0x1101cb(0x150)]>0x0),_0x1ae6bb=selectMenusForUpdate(_0x184e47,_0x43dad8[_0x1101cb(0x157)]);if(_0x1ae6bb[_0x1101cb(0x150)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x43dad8[_0x1101cb(0x13b)]===!![]};const _0x1806af=_0x1ae6bb[_0x1101cb(0x140)](_0x3530b8=>buildMenuUpdateDiff(_0x3530b8,_0x12b644,_0x5de3af,_0x43dad8[_0x1101cb(0x12d)]===!![],_0x43dad8[_0x1101cb(0x15d)]));if(_0x43dad8[_0x1101cb(0x13b)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x1806af};const _0x93d0e1=await Promise[_0x1101cb(0x13c)](_0x1ae6bb[_0x1101cb(0x140)]((_0x1dc2ea,_0x3e59c8)=>updateMenuCdnUrl(_0x2cfa5e,_0x537370,{'id':_0x1dc2ea['id'],'label':_0x1dc2ea[_0x1101cb(0x161)],'path':_0x1dc2ea['path'],'resources':_0x1806af[_0x3e59c8]['after'][_0x1101cb(0x131)],'extend':_0x1dc2ea['extend']??null,'loadScriptMode':_0x43dad8['loadScriptMode']}))),_0x46affe=_0x93d0e1[_0x1101cb(0x169)](_0x24ee1e=>_0x24ee1e[_0x1101cb(0x134)]===_0x1101cb(0x16c))[_0x1101cb(0x140)](_0x32104d=>_0x32104d['value']),_0x362a4a=_0x93d0e1[_0x1101cb(0x169)](_0x5782ac=>_0x5782ac[_0x1101cb(0x134)]===_0x1101cb(0x15c))[_0x1101cb(0x150)];return logger[_0x1101cb(0x165)](_0x1101cb(0x162),_0x1101cb(0x14a),{'count':_0x1ae6bb[_0x1101cb(0x150)],'resources':_0x2813c3}),{'updated':_0x46affe[_0x1101cb(0x150)],'failed':_0x362a4a,'skipped':![],'menus':_0x46affe};}function validateSelection(_0x1977e1){const _0x23273c=a172_0x370b;if(!_0x1977e1)throw new Error(_0x23273c(0x174));if(_0x1977e1[_0x23273c(0x16e)]&&(_0x1977e1[_0x23273c(0x146)]['length']>0x0||_0x1977e1[_0x23273c(0x13f)][_0x23273c(0x150)]>0x0))throw new Error(_0x23273c(0x16d));if(!_0x1977e1[_0x23273c(0x16e)]&&_0x1977e1[_0x23273c(0x146)][_0x23273c(0x150)]===0x0&&_0x1977e1['paths']['length']===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x4fb056,_0xe34ed8){const _0x534cf5=a172_0x370b;validateSelection(_0xe34ed8);if(_0xe34ed8['all'])return _0x4fb056;const _0x547158=new Set(_0x4fb056[_0x534cf5(0x140)](_0x4478e5=>_0x4478e5['id'])),_0x359c72=new Set(_0x4fb056[_0x534cf5(0x140)](_0x1dcaf9=>_0x1dcaf9['path'])),_0x107eb1=_0xe34ed8[_0x534cf5(0x146)][_0x534cf5(0x169)](_0x1f3cb1=>!_0x547158[_0x534cf5(0x12f)](_0x1f3cb1)),_0x1a2ef9=_0xe34ed8[_0x534cf5(0x13f)][_0x534cf5(0x169)](_0xf7a993=>!_0x359c72['has'](_0xf7a993));if(_0x107eb1[_0x534cf5(0x150)]>0x0||_0x1a2ef9[_0x534cf5(0x150)]>0x0){const _0xcb57e2=[..._0x107eb1['map'](_0x47d723=>String(_0x47d723)),..._0x1a2ef9][_0x534cf5(0x159)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0xcb57e2);}const _0x2beec6=new Set(_0xe34ed8[_0x534cf5(0x146)]),_0x4ef857=new Set(_0xe34ed8[_0x534cf5(0x13f)]);return _0x4fb056[_0x534cf5(0x169)](_0x24ca20=>_0x2beec6['has'](_0x24ca20['id'])||_0x4ef857[_0x534cf5(0x12f)](_0x24ca20[_0x534cf5(0x15b)]));}function a172_0x43a8(){const _0x6765d4=['paths','map','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','field','endsWith','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','push','menuIds','5ysOniN','cssUrl','668208UfAUWk','Menu\x20asset\x20update\x20completed','parse','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','.\x20Allowed\x20values:\x20replace,\x20patch','Start\x20non-interactive\x20menu\x20asset\x20update','jsUrl','length','replace','cwd','unshift','object','.js','\x20existing\x20CSS\x20resources\x20for\x20\x22','selection','JS\x20URL\x20is\x20unreachable:\x20','join','3491864yTpMtr','path','rejected','loadScriptMode','menu\x20asset-update\x20cannot\x20patch\x20','1359192FwhSgG','1042066TwALyy','label','menu-asset-update','patch','14RSGVNN','info','CSS\x20URL\x20is\x20unreachable:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','some','filter','string','extend','fulfilled','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','all','58010nfjxom','1uxwLkm','--params.','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','365616peEHNQ','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','force','Invalid\x20--params:\x20','has',').\x20','resources','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','trim','status','isArray','\x22\x20(','split','Invalid\x20--mode:\x20','2844171MwVaHU','toLowerCase','dryRun','allSettled','1179YsdUgc','\x20existing\x20JS\x20resources\x20for\x20\x22'];a172_0x43a8=function(){return _0x6765d4;};return a172_0x43a8();}function normalizeMode(_0x4485ff){const _0x42fdd8=a172_0x370b;if(!_0x4485ff)return'patch';if(_0x4485ff===_0x42fdd8(0x151)||_0x4485ff===_0x42fdd8(0x163))return _0x4485ff;throw new Error(_0x42fdd8(0x138)+_0x4485ff+_0x42fdd8(0x14d));}function buildMenuUpdateDiff(_0x54ca6a,_0x55e1bd,_0x3d8448,_0x14ed3e,_0x336ea0){const _0x3bfc2e=a172_0x370b,_0x459289=[..._0x54ca6a[_0x3bfc2e(0x131)]];_0x3d8448===_0x3bfc2e(0x163)&&assertUnambiguousPatchResources(_0x54ca6a,_0x459289,_0x55e1bd);const _0xf9926f=_0x3d8448===_0x3bfc2e(0x163)?patchResources(_0x459289,_0x55e1bd):replaceResources(_0x55e1bd),_0x8674b=[],_0x5f4a08=_0x459289['some'](isJsResource),_0x226c6a=_0xf9926f['some'](isJsResource);if(_0x5f4a08&&!_0x226c6a){const _0xb397a6=_0x3bfc2e(0x14c)+_0x54ca6a[_0x3bfc2e(0x161)]+_0x3bfc2e(0x136)+_0x54ca6a['path']+_0x3bfc2e(0x130)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x14ed3e)throw new Error(_0xb397a6);_0x8674b[_0x3bfc2e(0x145)](_0xb397a6);}const _0x53e245=_0x459289[_0x3bfc2e(0x168)](isCssResource),_0x1e3147=_0xf9926f[_0x3bfc2e(0x168)](isCssResource);_0x53e245&&!_0x1e3147&&_0x8674b[_0x3bfc2e(0x145)](_0x3bfc2e(0x132)+_0x54ca6a[_0x3bfc2e(0x161)]+_0x3bfc2e(0x136)+_0x54ca6a[_0x3bfc2e(0x15b)]+').');const _0x5c67b8=typeof _0x54ca6a['extend']?.[_0x3bfc2e(0x15d)]===_0x3bfc2e(0x16a)?_0x54ca6a[_0x3bfc2e(0x16b)][_0x3bfc2e(0x15d)]:null,_0x2361f2=_0x336ea0?{'loadScriptMode':_0x5c67b8}:{},_0x5070b6=_0x336ea0?{'loadScriptMode':_0x336ea0}:{};return{'id':_0x54ca6a['id'],'label':_0x54ca6a['label'],'path':_0x54ca6a[_0x3bfc2e(0x15b)],'mode':_0x3d8448,'before':{'resources':_0x459289,..._0x2361f2},'after':{'resources':_0xf9926f,..._0x5070b6},'warnings':_0x8674b};}function replaceResources(_0x1cb1d9){const _0x4e1b73=a172_0x370b;return[_0x1cb1d9[_0x4e1b73(0x14f)],_0x1cb1d9[_0x4e1b73(0x148)]][_0x4e1b73(0x169)](_0xc88d6d=>!!_0xc88d6d);}function assertUnambiguousPatchResources(_0x2b673e,_0xd83722,_0x211dc9){const _0x57b3f6=a172_0x370b,_0x1f0c80=_0xd83722[_0x57b3f6(0x169)](isJsResource)[_0x57b3f6(0x150)];if(_0x211dc9[_0x57b3f6(0x14f)]&&_0x1f0c80>0x1)throw new Error(_0x57b3f6(0x15e)+_0x1f0c80+_0x57b3f6(0x13e)+_0x2b673e[_0x57b3f6(0x161)]+_0x57b3f6(0x136)+_0x2b673e[_0x57b3f6(0x15b)]+')\x20'+_0x57b3f6(0x141));const _0x4ef42b=_0xd83722[_0x57b3f6(0x169)](isCssResource)['length'];if(_0x211dc9[_0x57b3f6(0x148)]&&_0x4ef42b>0x1)throw new Error(_0x57b3f6(0x15e)+_0x4ef42b+_0x57b3f6(0x156)+_0x2b673e[_0x57b3f6(0x161)]+_0x57b3f6(0x136)+_0x2b673e['path']+')\x20'+_0x57b3f6(0x144));}function patchResources(_0x19b45d,_0x47dcec){const _0x576a9d=a172_0x370b;let _0x530eab=![],_0x366fcc=![];const _0x37fd48=[];for(const _0x1a7e7f of _0x19b45d){if(isJsResource(_0x1a7e7f)){if(_0x47dcec[_0x576a9d(0x14f)]&&!_0x530eab)_0x37fd48['push'](_0x47dcec[_0x576a9d(0x14f)]),_0x530eab=!![];else!_0x47dcec[_0x576a9d(0x14f)]&&_0x37fd48[_0x576a9d(0x145)](_0x1a7e7f);continue;}if(isCssResource(_0x1a7e7f)){if(_0x47dcec[_0x576a9d(0x148)]&&!_0x366fcc)_0x37fd48[_0x576a9d(0x145)](_0x47dcec[_0x576a9d(0x148)]),_0x366fcc=!![];else!_0x47dcec['cssUrl']&&_0x37fd48[_0x576a9d(0x145)](_0x1a7e7f);continue;}_0x37fd48[_0x576a9d(0x145)](_0x1a7e7f);}return _0x47dcec[_0x576a9d(0x14f)]&&!_0x530eab&&_0x37fd48[_0x576a9d(0x153)](_0x47dcec[_0x576a9d(0x14f)]),_0x47dcec['cssUrl']&&!_0x366fcc&&_0x37fd48[_0x576a9d(0x145)](_0x47dcec[_0x576a9d(0x148)]),_0x37fd48;}function isJsResource(_0x1331d7){const _0x142367=a172_0x370b;return stripQuery(_0x1331d7)['toLowerCase']()[_0x142367(0x143)](_0x142367(0x155));}function isCssResource(_0x4f0b9b){const _0x44c51f=a172_0x370b;return stripQuery(_0x4f0b9b)[_0x44c51f(0x13a)]()[_0x44c51f(0x143)]('.css');}function stripQuery(_0x35633d){const _0x7c2bc0=a172_0x370b;return _0x35633d[_0x7c2bc0(0x137)]('?')[0x0]??_0x35633d;}function parseUpdateParamsFlag(_0x413df6){const _0x15e071=a172_0x370b;if(!_0x413df6||typeof _0x413df6!==_0x15e071(0x16a))return{};try{const _0x4b4067=JSON[_0x15e071(0x14b)](_0x413df6);if(typeof _0x4b4067!==_0x15e071(0x154)||_0x4b4067===null||Array[_0x15e071(0x135)](_0x4b4067))return{};return{'jsUrl':typeof _0x4b4067[_0x15e071(0x14f)]==='string'?_0x4b4067[_0x15e071(0x14f)][_0x15e071(0x133)]():undefined,'cssUrl':typeof _0x4b4067['cssUrl']==='string'?_0x4b4067['cssUrl']['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a173_0x201c(){const _0x41928f=['5ELFWoM','2555248NyqlGA','trim','bytes=0-0','HEAD','1571226bIfCzw','cancel','GET','5425725cGrYlm','26002503fXPrmp','14lfQelk','body','603512dCEfsS','1732953WAigPb','test','441256RZvPGd'];a173_0x201c=function(){return _0x41928f;};return a173_0x201c();}function a173_0x33ce(_0xafabb7,_0x563aeb){_0xafabb7=_0xafabb7-0x18b;const _0x201c6d=a173_0x201c();let _0x33cea2=_0x201c6d[_0xafabb7];return _0x33cea2;}(function(_0x2bf163,_0x428812){const _0x2c6e19=a173_0x33ce,_0x205ac7=_0x2bf163();while(!![]){try{const _0x974769=parseInt(_0x2c6e19(0x191))/0x1*(parseInt(_0x2c6e19(0x190))/0x2)+parseInt(_0x2c6e19(0x18e))/0x3+-parseInt(_0x2c6e19(0x18d))/0x4+parseInt(_0x2c6e19(0x199))/0x5+parseInt(_0x2c6e19(0x196))/0x6+-parseInt(_0x2c6e19(0x18b))/0x7*(-parseInt(_0x2c6e19(0x192))/0x8)+-parseInt(_0x2c6e19(0x19a))/0x9;if(_0x974769===_0x428812)break;else _0x205ac7['push'](_0x205ac7['shift']());}catch(_0x4461e8){_0x205ac7['push'](_0x205ac7['shift']());}}}(a173_0x201c,0x98f8e));export function isValidJsHttpsUrl(_0x57add7){const _0x203db4=a173_0x33ce;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x57add7[_0x203db4(0x193)]());}export function isValidCssHttpsUrl(_0x116d59){const _0x40b938=a173_0x33ce;return/^https:\/\/.+\.css(\?.*)?$/[_0x40b938(0x18f)](_0x116d59['trim']());}export async function isUrlReachable(_0x385507){const _0x245c20=a173_0x33ce;try{const _0x52244e=await fetch(_0x385507,{'method':_0x245c20(0x195)});if(_0x52244e['ok'])return!![];}catch{}try{const _0x4385c4=await fetch(_0x385507,{'method':_0x245c20(0x198),'headers':{'Range':_0x245c20(0x194)}}),_0x3282c7=_0x4385c4['ok'];try{await _0x4385c4[_0x245c20(0x18c)]?.[_0x245c20(0x197)]();}catch{}return _0x3282c7;}catch{return![];}}
1
+ function a173_0x1ea1(){const _0x5b5ca5=['135004XVHULZ','922wbHtia','662PubfQA','bytes=0-0','81570mcfsJF','7TYSXFh','test','trim','body','2364010lhSDyF','52092ZhBXHB','55NiceBj','3345606fMEVVp','3916UKaJwv','24YMIcsR','195368QljNQy'];a173_0x1ea1=function(){return _0x5b5ca5;};return a173_0x1ea1();}function a173_0x59f6(_0x5396cb,_0x1c1393){_0x5396cb=_0x5396cb-0x1ac;const _0x1ea1d1=a173_0x1ea1();let _0x59f641=_0x1ea1d1[_0x5396cb];return _0x59f641;}(function(_0x23fb0b,_0xd977c6){const _0x643df0=a173_0x59f6,_0x5d3b75=_0x23fb0b();while(!![]){try{const _0x4a5014=-parseInt(_0x643df0(0x1b6))/0x1*(parseInt(_0x643df0(0x1b5))/0x2)+parseInt(_0x643df0(0x1b2))/0x3*(-parseInt(_0x643df0(0x1b4))/0x4)+parseInt(_0x643df0(0x1af))/0x5*(-parseInt(_0x643df0(0x1b8))/0x6)+-parseInt(_0x643df0(0x1b9))/0x7*(parseInt(_0x643df0(0x1b3))/0x8)+-parseInt(_0x643df0(0x1b0))/0x9+-parseInt(_0x643df0(0x1ad))/0xa+-parseInt(_0x643df0(0x1b1))/0xb*(-parseInt(_0x643df0(0x1ae))/0xc);if(_0x4a5014===_0xd977c6)break;else _0x5d3b75['push'](_0x5d3b75['shift']());}catch(_0x21b3f1){_0x5d3b75['push'](_0x5d3b75['shift']());}}}(a173_0x1ea1,0x2dec9));export function isValidJsHttpsUrl(_0x433bd4){const _0x55a29f=a173_0x59f6;return/^https:\/\/.+\.js(\?.*)?$/[_0x55a29f(0x1ba)](_0x433bd4[_0x55a29f(0x1bb)]());}export function isValidCssHttpsUrl(_0x587c02){const _0x4283c1=a173_0x59f6;return/^https:\/\/.+\.css(\?.*)?$/[_0x4283c1(0x1ba)](_0x587c02[_0x4283c1(0x1bb)]());}export async function isUrlReachable(_0x263af7){const _0x462fa3=a173_0x59f6;try{const _0x4abe05=await fetch(_0x263af7,{'method':'HEAD'});if(_0x4abe05['ok'])return!![];}catch{}try{const _0x251595=await fetch(_0x263af7,{'method':'GET','headers':{'Range':_0x462fa3(0x1b7)}}),_0x5104e5=_0x251595['ok'];try{await _0x251595[_0x462fa3(0x1ac)]?.['cancel']();}catch{}return _0x5104e5;}catch{return![];}}
@@ -1 +1 @@
1
- const a174_0x1bdb1b=a174_0x2d77;(function(_0x4ac07d,_0x1ef61f){const _0x1657c7=a174_0x2d77,_0x360a89=_0x4ac07d();while(!![]){try{const _0x26d9b8=parseInt(_0x1657c7(0x19f))/0x1+-parseInt(_0x1657c7(0x192))/0x2*(parseInt(_0x1657c7(0x1ae))/0x3)+parseInt(_0x1657c7(0x198))/0x4*(-parseInt(_0x1657c7(0x187))/0x5)+-parseInt(_0x1657c7(0x193))/0x6*(parseInt(_0x1657c7(0x1a9))/0x7)+parseInt(_0x1657c7(0x1af))/0x8+-parseInt(_0x1657c7(0x19b))/0x9*(parseInt(_0x1657c7(0x186))/0xa)+-parseInt(_0x1657c7(0x194))/0xb*(-parseInt(_0x1657c7(0x195))/0xc);if(_0x26d9b8===_0x1ef61f)break;else _0x360a89['push'](_0x360a89['shift']());}catch(_0x1736ce){_0x360a89['push'](_0x360a89['shift']());}}}(a174_0x51da,0x96a25));import a174_0x10a148 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a174_0x51da(){const _0x3e5545=['params','\x20menu(s)\x20created','Menu\x20creation\x20failed','rawFlags','validation','split','filter','355964MSCQTJ','60wYtKxM','224642RmshAA','1452khuzSD','Would\x20create\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','3731552kpKYph','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','\x20created,\x20','1629wPzSwi','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','menu','\x20local\x20microfrontend\x20menu(s).','260849JzMXPX','cssUrl','\x20\x20✓\x20Selected:\x20','map','onlinePaths','appcode','jsUrl','trim','skipped','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','456519LgRVMC','Sync\x20local\x20pages\x20as\x20platform\x20menus','Menu\x20sync\x20completed:\x20','POST','\x20and\x20CSS:\x20','12AcqUCJ','2034328mLgOqG','Failed\x20to\x20fetch\x20online\x20menu\x20list','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','onlineMenuList','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20\x20Continue\x20with\x20creation?','Creating\x20','length','str','localPages','string','\x20menu(s)\x20with\x20JS:\x20','created','flag','\x20failed.','appCode','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20\x20Cancelled.','sync','paths','\x20menu(s)','message','write','yes','gray','\x20\x20Create\x20','Pre-fill\x20JS/CSS\x20URLs.\x20','targetPages','3990beFMmt','5ZJUqpv','selectedAppName','cookie','Online\x20menu\x20list\x20fetched'];a174_0x51da=function(){return _0x3e5545;};return a174_0x51da();}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,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a174_0x1bdb1b(0x19d),'command':a174_0x1bdb1b(0x17c),'description':a174_0x1bdb1b(0x1aa),'risk':a174_0x1bdb1b(0x180),'flags':[{'name':a174_0x1bdb1b(0x18b),'type':'string','description':a174_0x1bdb1b(0x184)+a174_0x1bdb1b(0x1c0)},{'name':'paths','type':a174_0x1bdb1b(0x1ba),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a174_0x1bdb1b(0x181),'type':'boolean','description':a174_0x1bdb1b(0x199)}],async 'dryRun'(_0x340e40){const _0x1fec6c=a174_0x1bdb1b;ensureRunnableContext(_0x340e40[_0x1fec6c(0x18e)],_0x340e40[_0x1fec6c(0x188)]);const _0x4ee722=await runMenuSyncCore(_0x340e40[_0x1fec6c(0x1bf)],_0x340e40[_0x1fec6c(0x189)],parsePaths(_0x340e40[_0x1fec6c(0x1b8)](_0x1fec6c(0x17d))),_0x340e40[_0x1fec6c(0x1b8)]('params'),{'dryRun':!![]});return{'method':_0x1fec6c(0x1ac),'url':'/smartapi/menu/create','body':_0x4ee722,'description':_0x4ee722['skipped']?_0x1fec6c(0x1a8):_0x1fec6c(0x196)+_0x4ee722[_0x1fec6c(0x185)][_0x1fec6c(0x1b7)]+_0x1fec6c(0x19e)};},async 'execute'(_0x2a9a3f){const _0x211028=a174_0x1bdb1b;ensureRunnableContext(_0x2a9a3f[_0x211028(0x18e)],_0x2a9a3f[_0x211028(0x188)]);const _0x3e80d6=_0x2a9a3f[_0x211028(0x1bd)](_0x211028(0x181)),_0x34106a=_0x2a9a3f[_0x211028(0x1b8)](_0x211028(0x18b)),_0x576aa5=parsePaths(_0x2a9a3f['str'](_0x211028(0x17d))),_0x2840cf=parseMenuSyncParams(_0x34106a);if(_0x3e80d6){const _0x38afbc=await runMenuSyncCore(_0x2a9a3f[_0x211028(0x1bf)],_0x2a9a3f[_0x211028(0x189)],_0x576aa5,_0x34106a);if(_0x38afbc[_0x211028(0x1a7)]){const _0x336fcb=getLocalPages();_0x336fcb[_0x211028(0x1b7)]===0x0?writeCliSideChannelLine(_0x211028(0x197)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x38afbc[_0x211028(0x1bc)]+_0x211028(0x18c));return{'ok':!![],'data':_0x38afbc,'message':_0x38afbc[_0x211028(0x1a7)]?'Menu\x20sync\x20skipped':_0x211028(0x1ab)+_0x38afbc[_0x211028(0x1bc)]+'\x20created.'};}if(_0x576aa5[_0x211028(0x1b7)]>0x0)throw CliErrors[_0x211028(0x18f)](_0x211028(0x1b1),_0x211028(0x1b4));if(!isInteractive()&&_0x34106a)throw CliErrors['validation'](_0x211028(0x19c),_0x211028(0x1b4));requireInteractive();const _0x2c07c8=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x2fa4aa,_0x2be29e,_0x4364db;try{const _0x432530=await fetchMenuData(_0x2a9a3f[_0x211028(0x1bf)],_0x2a9a3f[_0x211028(0x189)]);_0x2fa4aa=_0x432530[_0x211028(0x1b9)],_0x2be29e=_0x432530[_0x211028(0x1a3)],_0x4364db=_0x432530[_0x211028(0x1b3)],stopSpinner(_0x2c07c8,_0x211028(0x18a),!![]);}catch(_0x25845c){stopSpinner(_0x2c07c8,_0x211028(0x1b0),![]);throw CliErrors[_0x211028(0x18f)](_0x25845c instanceof Error?_0x25845c[_0x211028(0x17f)]:_0x211028(0x1b0));}if(_0x2fa4aa[_0x211028(0x1b7)]===0x0)return writeCliSideChannelLine(a174_0x10a148['yellow'](_0x211028(0x1b2))),{'ok':!![]};const _0x135818=buildCompareRows(_0x2fa4aa,_0x2be29e);writeCliSideChannelLine(renderCompareTable(_0x135818)),writeCliSideChannelLine('');const _0x472f13=await selectPages(_0x2fa4aa,_0x2be29e);writeCliSideChannelLine(''),writeCliSideChannelLine(a174_0x10a148['cyan'](_0x211028(0x1a1)+_0x472f13[_0x211028(0x1b7)]+'\x20page(s)'));const _0x4a87ad=_0x2840cf['jsUrl']&&_0x2840cf[_0x211028(0x1a0)];if(!_0x4a87ad){writeCliSideChannelLine(renderSyncSummary(_0x472f13,_0x2be29e['size']>0x0));const _0x3ea762=await askConfirm(_0x211028(0x1b5));if(!_0x3ea762)return writeCliSideChannelLine(a174_0x10a148[_0x211028(0x182)](_0x211028(0x1c1))),{'ok':!![]};}let _0x309e63=_0x2840cf[_0x211028(0x1a5)],_0xde1c42=_0x2840cf[_0x211028(0x1a0)];!_0x309e63&&(_0x309e63=await askJsUrl());!_0xde1c42&&(_0xde1c42=await askCssUrl());const _0x1a7cb1=await askConfirm(_0x211028(0x183)+_0x472f13[_0x211028(0x1b7)]+_0x211028(0x1bb)+_0x309e63+_0x211028(0x1ad)+_0xde1c42+'?');if(!_0x1a7cb1)return writeCliSideChannelLine(a174_0x10a148[_0x211028(0x182)](_0x211028(0x1c1))),{'ok':!![]};const _0x26e958=[_0x309e63,_0xde1c42],_0x488241=startSpinner(_0x211028(0x1b6)+_0x472f13[_0x211028(0x1b7)]+'\x20menu(s)...');try{const _0x29ba04=await doCreateMenus(_0x2a9a3f[_0x211028(0x1bf)],_0x2a9a3f[_0x211028(0x189)],_0x472f13,_0x26e958);return stopSpinner(_0x488241,'Created\x20'+_0x29ba04[_0x211028(0x1bc)]+_0x211028(0x17e),!![]),{'ok':!![],'data':_0x29ba04,'message':_0x211028(0x1ab)+_0x29ba04['created']+_0x211028(0x19a)+_0x29ba04['failed']+_0x211028(0x1be)};}catch(_0x2b4b29){stopSpinner(_0x488241,_0x211028(0x18d),![]);throw CliErrors['validation'](_0x2b4b29 instanceof Error?_0x2b4b29[_0x211028(0x17f)]:_0x211028(0x18d));}}};function ensureRunnableContext(_0x45e73c,_0x47eacc){const _0x202ae9=a174_0x1bdb1b,_0x33c291=_0x45e73c['appcode']?String(_0x45e73c[_0x202ae9(0x1a4)])[_0x202ae9(0x1a6)]():'';if(!isInProject()&&!_0x47eacc&&!_0x33c291)throw CliErrors[_0x202ae9(0x18f)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function a174_0x2d77(_0x289f57,_0x2b7906){_0x289f57=_0x289f57-0x17c;const _0x51da70=a174_0x51da();let _0x2d774c=_0x51da70[_0x289f57];return _0x2d774c;}function parsePaths(_0x5cf101){const _0x31ca93=a174_0x1bdb1b;return[...new Set(_0x5cf101[_0x31ca93(0x190)](',')[_0x31ca93(0x1a2)](_0x3b6ffc=>_0x3b6ffc[_0x31ca93(0x1a6)]())[_0x31ca93(0x191)](Boolean))];}
1
+ const a174_0x4f792b=a174_0x27af;(function(_0x3ee2a0,_0x559fd9){const _0x5ab393=a174_0x27af,_0x7caac6=_0x3ee2a0();while(!![]){try{const _0x6864a0=-parseInt(_0x5ab393(0x70))/0x1+parseInt(_0x5ab393(0xa1))/0x2+-parseInt(_0x5ab393(0x68))/0x3+-parseInt(_0x5ab393(0x95))/0x4*(-parseInt(_0x5ab393(0x8b))/0x5)+-parseInt(_0x5ab393(0xa7))/0x6+parseInt(_0x5ab393(0x8c))/0x7+parseInt(_0x5ab393(0x97))/0x8*(parseInt(_0x5ab393(0x6f))/0x9);if(_0x6864a0===_0x559fd9)break;else _0x7caac6['push'](_0x7caac6['shift']());}catch(_0x3b5c3d){_0x7caac6['push'](_0x7caac6['shift']());}}}(a174_0x33e6,0xabf94));function a174_0x33e6(){const _0x254f33=['cookie','4959ltySBz','691948iemDnK','sync','message','Creating\x20','Menu\x20sync\x20completed:\x20','Created\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','skipped','POST','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20page(s)','\x20\x20Cancelled.','Menu\x20creation\x20failed','onlinePaths','length','Sync\x20local\x20pages\x20as\x20platform\x20menus','trim','selectedAppName','boolean','\x20\x20Continue\x20with\x20creation?','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','cssUrl','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','\x20created.','\x20and\x20CSS:\x20','size','\x20\x20✓\x20Selected:\x20','12605AZEjUU','2676030KOAtHh','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20local\x20microfrontend\x20menu(s).','\x20\x20Create\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','failed','appcode','str','cyan','148nZnwMj','paths','21872XyTPpY','split','yellow','Online\x20menu\x20list\x20fetched','jsUrl','\x20failed.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','✓\x20Menu\x20sync\x20completed:\x20','Fetching\x20online\x20menu\x20list...','validation','348626PgWdGh','\x20menu(s)\x20with\x20JS:\x20','\x20created,\x20','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','params','appCode','138648eLrqaD','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','2210562crxkGo','string','created','yes','Failed\x20to\x20fetch\x20online\x20menu\x20list','targetPages'];a174_0x33e6=function(){return _0x254f33;};return a174_0x33e6();}import a174_0x46a43d from'chalk';function a174_0x27af(_0x4f5071,_0x2f267e){_0x4f5071=_0x4f5071-0x67;const _0x33e602=a174_0x33e6();let _0x27af7d=_0x33e602[_0x4f5071];return _0x27af7d;}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,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':a174_0x4f792b(0x71),'description':a174_0x4f792b(0x7f),'risk':'write','flags':[{'name':a174_0x4f792b(0xa5),'type':a174_0x4f792b(0x69),'description':a174_0x4f792b(0x8d)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a174_0x4f792b(0x96),'type':a174_0x4f792b(0x69),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a174_0x4f792b(0x6b),'type':a174_0x4f792b(0x82),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x20c6af){const _0x4c24af=a174_0x4f792b;ensureRunnableContext(_0x20c6af['rawFlags'],_0x20c6af[_0x4c24af(0x81)]);const _0x52b796=await runMenuSyncCore(_0x20c6af['appCode'],_0x20c6af[_0x4c24af(0x6e)],parsePaths(_0x20c6af['str'](_0x4c24af(0x96))),_0x20c6af[_0x4c24af(0x93)](_0x4c24af(0xa5)),{'dryRun':!![]});return{'method':_0x4c24af(0x78),'url':'/smartapi/menu/create','body':_0x52b796,'description':_0x52b796[_0x4c24af(0x77)]?_0x4c24af(0x84):'Would\x20create\x20'+_0x52b796[_0x4c24af(0x6d)][_0x4c24af(0x7e)]+_0x4c24af(0x8e)};},async 'execute'(_0x2725ad){const _0x38e112=a174_0x4f792b;ensureRunnableContext(_0x2725ad['rawFlags'],_0x2725ad[_0x38e112(0x81)]);const _0x21a673=_0x2725ad['flag'](_0x38e112(0x6b)),_0x23c35f=_0x2725ad['str'](_0x38e112(0xa5)),_0x5ee6b5=parsePaths(_0x2725ad[_0x38e112(0x93)](_0x38e112(0x96))),_0xe4550b=parseMenuSyncParams(_0x23c35f);if(_0x21a673){const _0x2e6c20=await runMenuSyncCore(_0x2725ad[_0x38e112(0xa6)],_0x2725ad['cookie'],_0x5ee6b5,_0x23c35f);if(_0x2e6c20[_0x38e112(0x77)]){const _0xd2b2c6=getLocalPages();_0xd2b2c6[_0x38e112(0x7e)]===0x0?writeCliSideChannelLine(_0x38e112(0x90)):writeCliSideChannelLine(_0x38e112(0x67));}else writeCliSideChannelLine(_0x38e112(0x9e)+_0x2e6c20[_0x38e112(0x6a)]+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x2e6c20,'message':_0x2e6c20[_0x38e112(0x77)]?'Menu\x20sync\x20skipped':_0x38e112(0x74)+_0x2e6c20[_0x38e112(0x6a)]+_0x38e112(0x87)};}if(_0x5ee6b5[_0x38e112(0x7e)]>0x0)throw CliErrors[_0x38e112(0xa0)]('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x38e112(0x9d));if(!isInteractive()&&_0x23c35f)throw CliErrors[_0x38e112(0xa0)](_0x38e112(0xa4),_0x38e112(0x9d));requireInteractive();const _0x2ed76d=startSpinner(_0x38e112(0x9f));let _0x4b5d76,_0x1944f1,_0x3fd304;try{const _0x218952=await fetchMenuData(_0x2725ad[_0x38e112(0xa6)],_0x2725ad[_0x38e112(0x6e)]);_0x4b5d76=_0x218952['localPages'],_0x1944f1=_0x218952[_0x38e112(0x7d)],_0x3fd304=_0x218952['onlineMenuList'],stopSpinner(_0x2ed76d,_0x38e112(0x9a),!![]);}catch(_0x50a2cf){stopSpinner(_0x2ed76d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x38e112(0xa0)](_0x50a2cf instanceof Error?_0x50a2cf[_0x38e112(0x72)]:_0x38e112(0x6c));}if(_0x4b5d76['length']===0x0)return writeCliSideChannelLine(a174_0x46a43d[_0x38e112(0x99)](_0x38e112(0x79))),{'ok':!![]};const _0x2231d1=buildCompareRows(_0x4b5d76,_0x1944f1);writeCliSideChannelLine(renderCompareTable(_0x2231d1)),writeCliSideChannelLine('');const _0x4c6fbe=await selectPages(_0x4b5d76,_0x1944f1);writeCliSideChannelLine(''),writeCliSideChannelLine(a174_0x46a43d[_0x38e112(0x94)](_0x38e112(0x8a)+_0x4c6fbe[_0x38e112(0x7e)]+_0x38e112(0x7a)));const _0x491188=_0xe4550b[_0x38e112(0x9b)]&&_0xe4550b['cssUrl'];if(!_0x491188){writeCliSideChannelLine(renderSyncSummary(_0x4c6fbe,_0x1944f1[_0x38e112(0x89)]>0x0));const _0x298b83=await askConfirm(_0x38e112(0x83));if(!_0x298b83)return writeCliSideChannelLine(a174_0x46a43d['gray'](_0x38e112(0x7b))),{'ok':!![]};}let _0x32db9a=_0xe4550b[_0x38e112(0x9b)],_0x2a215d=_0xe4550b[_0x38e112(0x85)];!_0x32db9a&&(_0x32db9a=await askJsUrl());!_0x2a215d&&(_0x2a215d=await askCssUrl());const _0x42f7b0=await askConfirm(_0x38e112(0x8f)+_0x4c6fbe[_0x38e112(0x7e)]+_0x38e112(0xa2)+_0x32db9a+_0x38e112(0x88)+_0x2a215d+'?');if(!_0x42f7b0)return writeCliSideChannelLine(a174_0x46a43d['gray'](_0x38e112(0x7b))),{'ok':!![]};const _0x24d1de=[_0x32db9a,_0x2a215d],_0xd093b8=startSpinner(_0x38e112(0x73)+_0x4c6fbe[_0x38e112(0x7e)]+'\x20menu(s)...');try{const _0x2346b0=await doCreateMenus(_0x2725ad[_0x38e112(0xa6)],_0x2725ad['cookie'],_0x4c6fbe,_0x24d1de);return stopSpinner(_0xd093b8,_0x38e112(0x75)+_0x2346b0['created']+'\x20menu(s)',!![]),{'ok':!![],'data':_0x2346b0,'message':_0x38e112(0x74)+_0x2346b0[_0x38e112(0x6a)]+_0x38e112(0xa3)+_0x2346b0[_0x38e112(0x91)]+_0x38e112(0x9c)};}catch(_0x440e81){stopSpinner(_0xd093b8,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x38e112(0xa0)](_0x440e81 instanceof Error?_0x440e81[_0x38e112(0x72)]:_0x38e112(0x7c));}}};function ensureRunnableContext(_0x45219e,_0x21b0dc){const _0x5d86a7=a174_0x4f792b,_0x3d22f8=_0x45219e[_0x5d86a7(0x92)]?String(_0x45219e[_0x5d86a7(0x92)])[_0x5d86a7(0x80)]():'';if(!isInProject()&&!_0x21b0dc&&!_0x3d22f8)throw CliErrors[_0x5d86a7(0xa0)](_0x5d86a7(0x86)+_0x5d86a7(0x76));}function parsePaths(_0x1be0d3){const _0x1d1d86=a174_0x4f792b;return[...new Set(_0x1be0d3[_0x1d1d86(0x98)](',')['map'](_0x15a12e=>_0x15a12e[_0x1d1d86(0x80)]())['filter'](Boolean))];}
@@ -1 +1 @@
1
- function a175_0x3e28(){const _0x30a676=['\x20skipped,\x20','plan','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','\x20menu(s);\x20skipped\x20','parentId','\x20updated,\x20','childrenCount','isSafeInteger','84heqPvm','menu-ids','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_selector_not_found','update\x20visibility\x20for','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','expect-visible','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','2448550FBCBpO','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Menu\x20','menuIds','289zsJxTh','get','label','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','body','10dPmCNY','expectedCount','type','string','push','\x20failed.','sort','3xYffDn','6923213ZoTmks','2090064msQojC','update-recovery','Response\x20was\x20lost\x20and\x20menu\x20','url','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','path','verification','datasetCode','childrenIds','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20unchanged\x20menu(s).','visible','Would\x20update\x20visibility\x20for\x20','7318EuAUID','rabetbase\x20menu\x20list\x20--format\x20compress','menu_state_drift','hash','Final\x20menu\x20visibility\x20readback\x20failed.','boolean','\x20visibility\x20update\x20could\x20not\x20be\x20verified','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','paths','modelType','beforeById','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','before','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','byId','num','message','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu','1543628pWBOoa','updated','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','failed','appCode','pageType','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','menu_expected_count_mismatch','Requested\x20menu\x20visibility','set','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','depth','resourcesValid','update-menu-visibility','high-risk-write','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','map','\x20menu(s);\x20skip\x20','some','POST','update\x20menu\x20visibility','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','7QZWkSS','cookie','datasetId','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','verify\x20menu\x20visibility\x20update','flagMissing','\x20menu(s),\x20expected\x20','18wQMFhz','visibility-update','split','validation','resources','/smartapi/menu/update','Updated\x20visibility\x20for\x20','requestedVisible','5077989tgnMgv','length','Menu\x20path\x20selector\x20not\x20found:\x20','update','pageId','\x20changed\x20unexpectedly.','Menu\x20visibility\x20update\x20completed:\x20','menu_verification_failed','Response\x20was\x20lost\x20for\x20menu\x20','stringify','number','rawFlags','plannedActions','join','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','warnings','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','2084295mlBRDS','code','filter','trim','targets','expected-count','str','menu_selector_ambiguous','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','isArray','menus','expectVisible'];a175_0x3e28=function(){return _0x30a676;};return a175_0x3e28();}const a175_0x58a28d=a175_0x1e2c;(function(_0x41b13b,_0x2f72cc){const _0x5d5b5a=a175_0x1e2c,_0x4d662c=_0x41b13b();while(!![]){try{const _0x110549=parseInt(_0x5d5b5a(0x142))/0x1*(parseInt(_0x5d5b5a(0x15d))/0x2)+parseInt(_0x5d5b5a(0x14e))/0x3*(-parseInt(_0x5d5b5a(0x170))/0x4)+parseInt(_0x5d5b5a(0x121))/0x5*(parseInt(_0x5d5b5a(0x18d))/0x6)+parseInt(_0x5d5b5a(0x186))/0x7*(parseInt(_0x5d5b5a(0x150))/0x8)+-parseInt(_0x5d5b5a(0x195))/0x9*(parseInt(_0x5d5b5a(0x147))/0xa)+parseInt(_0x5d5b5a(0x14f))/0xb+parseInt(_0x5d5b5a(0x135))/0xc*(-parseInt(_0x5d5b5a(0x13d))/0xd);if(_0x110549===_0x2f72cc)break;else _0x4d662c['push'](_0x4d662c['shift']());}catch(_0x1f7c55){_0x4d662c['push'](_0x4d662c['shift']());}}}(a175_0x3e28,0xe312b));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,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a175_0x58a28d(0x183),'path':a175_0x58a28d(0x192)}];export const menuVisibilityUpdate={'service':a175_0x58a28d(0x16f),'command':a175_0x58a28d(0x18e),'description':a175_0x58a28d(0x16a),'risk':a175_0x58a28d(0x17e),'structuredErrors':!![],'flags':[{'name':a175_0x58a28d(0x136),'type':a175_0x58a28d(0x14a),'description':a175_0x58a28d(0x154)},{'name':a175_0x58a28d(0x165),'type':'string','description':a175_0x58a28d(0x185)},{'name':'visible','type':'boolean','required':!![],'description':a175_0x58a28d(0x178)},{'name':a175_0x58a28d(0x13b),'type':a175_0x58a28d(0x162),'description':a175_0x58a28d(0x17f)},{'name':'expected-count','type':a175_0x58a28d(0x19f),'description':a175_0x58a28d(0x1a3)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4b1a35){parseInput(_0x4b1a35),requireExplicitYes(_0x4b1a35);},async 'dryRun'(_0x7a011f){const _0x4262a8=a175_0x58a28d,_0x40f102=await buildPlan(_0x7a011f,!![]),_0x16b203=_0x40f102[_0x4262a8(0x12e)]['plannedActions']?.[_0x4262a8(0x196)]??0x0,_0x1c0401=_0x40f102[_0x4262a8(0x12e)][_0x4262a8(0x125)]['length']-_0x16b203;return menuDryRunResult(_0x40f102[_0x4262a8(0x12e)],{'method':_0x4262a8(0x183),'url':_0x4262a8(0x192),'body':{'updates':_0x40f102['plan'][_0x4262a8(0x1a1)]?.[_0x4262a8(0x180)](_0xa1ebbd=>_0xa1ebbd[_0x4262a8(0x146)])??[]},'description':_0x4262a8(0x15c)+_0x16b203+_0x4262a8(0x181)+_0x1c0401+_0x4262a8(0x15a)});},async 'execute'(_0x6c659e){const _0x20bd0e=a175_0x58a28d;requireExplicitYes(_0x6c659e);const _0x1302ba=await buildPlan(_0x6c659e,![]);await recheckMutationSnapshot(_0x6c659e,_0x1302ba[_0x20bd0e(0x12e)],_0x20bd0e(0x184));const _0x4843ee=[],_0x1f67ca=[],_0x1ff524=[];for(const _0x50c31b of _0x1302ba['plan'][_0x20bd0e(0x125)]){if(_0x50c31b[_0x20bd0e(0x169)][_0x20bd0e(0x15b)]===_0x1302ba[_0x20bd0e(0x12e)]['requestedVisible']){_0x4843ee[_0x20bd0e(0x14b)]({'id':_0x50c31b['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x6c659e[_0x20bd0e(0x174)],_0x6c659e['cookie'],{'id':_0x50c31b['id'],'visible':_0x1302ba[_0x20bd0e(0x12e)][_0x20bd0e(0x194)]}),_0x4843ee[_0x20bd0e(0x14b)]({'id':_0x50c31b['id'],'updated':!![],'skipped':![]});}catch(_0x2fe774){const _0x4ed4ad=mapMenuApiError(_0x2fe774,_0x20bd0e(0x139),_0x50c31b['id']);if(isMenuResponseLoss(_0x2fe774)&&_0x4ed4ad[_0x20bd0e(0x122)]!=='menu_permission_denied'){_0x1ff524[_0x20bd0e(0x14b)](_0x50c31b['id']);continue;}_0x1f67ca[_0x20bd0e(0x14b)]({'id':_0x50c31b['id'],'stage':_0x20bd0e(0x198),'code':_0x4ed4ad['code'],'message':_0x4ed4ad['message']});}}let _0x3eadb6;try{_0x3eadb6=await fetchMenuSnapshot(_0x6c659e['appCode'],_0x6c659e[_0x20bd0e(0x187)]);}catch(_0x40d975){const _0x379aa8=describeMenuErrorCause(_0x40d975,_0x20bd0e(0x18a)),_0x1a030a=_0x1ff524[_0x20bd0e(0x180)](_0x26f589=>({'id':_0x26f589,'stage':_0x20bd0e(0x151),'code':_0x20bd0e(0x19c),'message':_0x20bd0e(0x19d)+_0x26f589+_0x20bd0e(0x176),'requestedStateConfirmed':![],'recovered':![]})),_0x4ec063={'stage':_0x20bd0e(0x156),'code':_0x20bd0e(0x19c),'message':_0x20bd0e(0x161),'targetIds':_0x1302ba[_0x20bd0e(0x12e)][_0x20bd0e(0x125)][_0x20bd0e(0x180)](_0x3e6f78=>_0x3e6f78['id']),'requestedStateConfirmed':![],..._0x379aa8};throw menuFailure(asVerificationError(_0x40d975,_0x20bd0e(0x13a)),_0x1302ba[_0x20bd0e(0x12e)],{'stage':_0x20bd0e(0x156),'succeeded':_0x4843ee,'failedRecords':[..._0x1f67ca,..._0x1a030a,_0x4ec063],'warnings':[_0x20bd0e(0x164)],'verification':{'status':_0x20bd0e(0x173),'recoveredCount':0x0,'lookupCommand':_0x20bd0e(0x15e)}});}const _0x54600b=[];for(const _0x599572 of _0x4843ee){const _0x125795=Number(_0x599572['id']),_0x5486cd=_0x1302ba[_0x20bd0e(0x167)][_0x20bd0e(0x143)](_0x125795),_0x8c37f7=_0x3eadb6[_0x20bd0e(0x16b)][_0x20bd0e(0x143)](_0x125795);try{verifyVisibilityUpdate(_0x5486cd,_0x8c37f7,_0x1302ba[_0x20bd0e(0x12e)][_0x20bd0e(0x194)]);}catch(_0x28ae24){const _0x334c77=asVerificationError(_0x28ae24,_0x20bd0e(0x140)+_0x125795+_0x20bd0e(0x163));_0x54600b[_0x20bd0e(0x14b)]({'id':_0x125795,'stage':_0x20bd0e(0x156),'code':_0x334c77[_0x20bd0e(0x122)],'message':_0x334c77[_0x20bd0e(0x16d)],'requestedStateConfirmed':![]});}}for(const _0x2d0eea of _0x1ff524){const _0x4eb6cc=_0x1302ba[_0x20bd0e(0x167)][_0x20bd0e(0x143)](_0x2d0eea),_0x5e2a99=_0x3eadb6[_0x20bd0e(0x16b)][_0x20bd0e(0x143)](_0x2d0eea);try{verifyVisibilityUpdate(_0x4eb6cc,_0x5e2a99,_0x1302ba['plan']['requestedVisible']),_0x4843ee[_0x20bd0e(0x14b)]({'id':_0x2d0eea,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x5ad0d3){const _0x5d0ccd=asVerificationError(_0x5ad0d3,_0x20bd0e(0x152)+_0x2d0eea+_0x20bd0e(0x16e));_0x54600b[_0x20bd0e(0x14b)]({'id':_0x2d0eea,'stage':_0x20bd0e(0x151),'code':_0x5d0ccd[_0x20bd0e(0x122)],'message':_0x5d0ccd[_0x20bd0e(0x16d)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x54600b[_0x20bd0e(0x196)]>0x0){const _0x2fc672=_0x54600b['map'](_0x540e25=>Number(_0x540e25['id'])),_0x377b9a=_0x4843ee[_0x20bd0e(0x123)](_0xa0a2af=>_0xa0a2af['recovered']===!![])[_0x20bd0e(0x196)],_0x59cf9b=menuError('menu_verification_failed',_0x20bd0e(0x120)+_0x2fc672[_0x20bd0e(0x1a2)](',\x20')+'.',_0x20bd0e(0x17a));throw menuFailure(_0x59cf9b,_0x1302ba[_0x20bd0e(0x12e)],{'stage':'verification','succeeded':_0x4843ee,'failedRecords':[..._0x1f67ca,..._0x54600b],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x20bd0e(0x173),..._0x2fc672[_0x20bd0e(0x196)]===0x1?{'targetId':_0x2fc672[0x0]}:{'targetIds':_0x2fc672},'recoveredCount':_0x377b9a,'lookupCommand':_0x20bd0e(0x15e)}});}const _0x38310d=_0x4843ee[_0x20bd0e(0x123)](_0x216fa0=>_0x216fa0[_0x20bd0e(0x171)]===!![])[_0x20bd0e(0x196)],_0x3f9a05=_0x4843ee[_0x20bd0e(0x196)]-_0x38310d,_0x5c7260={..._0x1302ba[_0x20bd0e(0x12e)],'succeeded':_0x4843ee,'failed':_0x1f67ca,'warnings':_0x1f67ca[_0x20bd0e(0x196)]>0x0?[..._0x1302ba[_0x20bd0e(0x12e)][_0x20bd0e(0x11f)],_0x20bd0e(0x137)]:_0x1302ba['plan'][_0x20bd0e(0x11f)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x3eadb6[_0x20bd0e(0x160)],'matchesRequestedState':_0x1f67ca[_0x20bd0e(0x196)]===0x0,'recoveredCount':_0x1ff524[_0x20bd0e(0x196)]}};return{'ok':_0x1f67ca[_0x20bd0e(0x196)]===0x0,'data':_0x5c7260,'message':_0x1f67ca[_0x20bd0e(0x196)]===0x0?_0x20bd0e(0x193)+_0x38310d+_0x20bd0e(0x130)+_0x3f9a05+'\x20unchanged\x20menu(s).':_0x20bd0e(0x19b)+_0x38310d+_0x20bd0e(0x132)+_0x3f9a05+_0x20bd0e(0x12d)+_0x1f67ca[_0x20bd0e(0x196)]+_0x20bd0e(0x14c)};}};function parseInput(_0x575371){const _0x2f866a=a175_0x58a28d,_0xcb68a8=parseMenuIds(_0x575371[_0x2f866a(0x127)](_0x2f866a(0x136))),_0x10ab03=parseCsv(_0x575371['str'](_0x2f866a(0x165)));if(_0xcb68a8['length']===0x0&&_0x10ab03['length']===0x0)throw CliErrors[_0x2f866a(0x190)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0xf1d2f6=parseBooleanFlag(_0x575371,'visible',!![]),_0x5c33a3=parseBooleanFlag(_0x575371,_0x2f866a(0x13b),![]);let _0x3d4d60;if(hasFlag(_0x575371,_0x2f866a(0x126))){_0x3d4d60=_0x575371[_0x2f866a(0x16c)](_0x2f866a(0x126));if(!Number[_0x2f866a(0x134)](_0x3d4d60)||_0x3d4d60<0x0)throw CliErrors[_0x2f866a(0x190)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0xcb68a8,'paths':_0x10ab03,'visible':_0xf1d2f6,'expectVisible':_0x5c33a3,'expectedCount':_0x3d4d60};}async function buildPlan(_0x478d27,_0x3751b1){const _0x3e1b81=a175_0x58a28d,_0x1ca2ce=parseInput(_0x478d27),_0x1b8e29=await fetchMutationSnapshot(_0x478d27,_0x3e1b81(0x184)),_0x2cddcc=selectTargets(_0x1b8e29[_0x3e1b81(0x12b)],_0x1ca2ce[_0x3e1b81(0x141)],_0x1ca2ce[_0x3e1b81(0x165)]);if(_0x1ca2ce[_0x3e1b81(0x148)]!==undefined&&_0x2cddcc[_0x3e1b81(0x196)]!==_0x1ca2ce['expectedCount'])throw menuError(_0x3e1b81(0x177),'Selected\x20'+_0x2cddcc[_0x3e1b81(0x196)]+_0x3e1b81(0x18c)+_0x1ca2ce[_0x3e1b81(0x148)]+'.',_0x3e1b81(0x13c));if(_0x1ca2ce[_0x3e1b81(0x12c)]!==undefined){const _0x40cfaf=_0x2cddcc[_0x3e1b81(0x123)](_0x2ca852=>_0x2ca852[_0x3e1b81(0x15b)]!==_0x1ca2ce['expectVisible']);if(_0x40cfaf[_0x3e1b81(0x196)]>0x0)throw menuError(_0x3e1b81(0x15f),_0x3e1b81(0x145)+_0x40cfaf[_0x3e1b81(0x180)](_0x50e912=>_0x50e912['id'])['join'](',\x20')+'.',_0x3e1b81(0x159));}const _0x4fea85=_0x2cddcc[_0x3e1b81(0x180)](_0x2ca53b=>({'id':_0x2ca53b['id'],'label':_0x2ca53b[_0x3e1b81(0x144)],'path':_0x2ca53b[_0x3e1b81(0x155)],'before':{'visible':_0x2ca53b[_0x3e1b81(0x15b)]},'after':{'visible':_0x1ca2ce['visible']}})),_0x2a19f7=_0x4fea85[_0x3e1b81(0x123)](_0x1e3bd1=>_0x1e3bd1['before'][_0x3e1b81(0x15b)]!==_0x1ca2ce[_0x3e1b81(0x15b)])[_0x3e1b81(0x180)](_0x4ab062=>({'stage':_0x3e1b81(0x17d),'method':_0x3e1b81(0x183),'path':_0x3e1b81(0x192),'body':{'appCode':_0x478d27['appCode'],'id':_0x4ab062['id'],'visible':_0x1ca2ce[_0x3e1b81(0x15b)]}})),_0x4aa7a2=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x1ca2ce[_0x3e1b81(0x141)],'paths':_0x1ca2ce['paths']},'before':{'menus':_0x2cddcc[_0x3e1b81(0x180)](_0x472f9b=>({'id':_0x472f9b['id'],'path':_0x472f9b[_0x3e1b81(0x155)],'visible':_0x472f9b[_0x3e1b81(0x15b)]}))},'after':{'menus':_0x2cddcc[_0x3e1b81(0x180)](_0x3704fe=>({'id':_0x3704fe['id'],'path':_0x3704fe[_0x3e1b81(0x155)],'visible':_0x1ca2ce[_0x3e1b81(0x15b)]}))},'dryRun':_0x3751b1,'backend':[...BACKEND],'plannedActions':_0x2a19f7,'snapshotHash':_0x1b8e29[_0x3e1b81(0x160)],'warnings':_0x2a19f7['length']===0x0?[_0x3e1b81(0x172)]:[]});return{'plan':{..._0x4aa7a2,'requestedVisible':_0x1ca2ce[_0x3e1b81(0x15b)],'targets':_0x4fea85},'beforeById':new Map(_0x2cddcc['map'](_0x4718bb=>[_0x4718bb['id'],_0x4718bb]))};}function selectTargets(_0x89ff17,_0x2a5798,_0x12fc2d){const _0x538c38=a175_0x58a28d,_0x45cb9a=new Map(_0x89ff17[_0x538c38(0x180)](_0x8bd71=>[_0x8bd71['id'],_0x8bd71])),_0x58e2de=new Map(),_0xd82da4=_0x2a5798[_0x538c38(0x123)](_0x22b214=>!_0x45cb9a['has'](_0x22b214));if(_0xd82da4[_0x538c38(0x196)]>0x0)throw menuError(_0x538c38(0x138),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0xd82da4['join'](',\x20')+'.',_0x538c38(0x13e));for(const _0x41f51c of _0x2a5798){_0x58e2de[_0x538c38(0x179)](_0x41f51c,_0x45cb9a[_0x538c38(0x143)](_0x41f51c));}for(const _0x13d3d0 of _0x12fc2d){const _0x2dc6bc=_0x89ff17['filter'](_0x453599=>_0x453599[_0x538c38(0x155)]===_0x13d3d0);if(_0x2dc6bc['length']===0x0)throw menuError(_0x538c38(0x138),_0x538c38(0x197)+JSON[_0x538c38(0x19e)](_0x13d3d0)+'.',_0x538c38(0x168));if(_0x2dc6bc['length']>0x1)throw menuError(_0x538c38(0x128),_0x538c38(0x13f)+JSON[_0x538c38(0x19e)](_0x13d3d0)+'.',_0x538c38(0x189)+_0x2dc6bc[_0x538c38(0x180)](_0x33ebd6=>_0x33ebd6['id'])[_0x538c38(0x1a2)](',\x20')+'.');const _0xe6b38b=_0x2dc6bc[0x0];_0x58e2de[_0x538c38(0x179)](_0xe6b38b['id'],_0xe6b38b);}return[..._0x58e2de['values']()];}function parseMenuIds(_0xe3fbce){const _0x5e9fb8=a175_0x58a28d,_0x1531a3=parseCsv(_0xe3fbce),_0x333977=_0x1531a3[_0x5e9fb8(0x180)](Number);if(_0x333977[_0x5e9fb8(0x182)](_0x3387de=>!Number[_0x5e9fb8(0x134)](_0x3387de)||_0x3387de<=0x0))throw CliErrors[_0x5e9fb8(0x190)](_0x5e9fb8(0x12f));return[...new Set(_0x333977)];}function parseCsv(_0x3050ae){const _0x39a1d9=a175_0x58a28d;return[...new Set(_0x3050ae[_0x39a1d9(0x18f)](',')[_0x39a1d9(0x180)](_0x9676d9=>_0x9676d9[_0x39a1d9(0x124)]())[_0x39a1d9(0x123)](Boolean))];}function parseBooleanFlag(_0xa0fa65,_0xa8e160,_0x5c376f){const _0xbbd29e=a175_0x58a28d;if(!hasFlag(_0xa0fa65,_0xa8e160)){if(_0x5c376f)throw CliErrors[_0xbbd29e(0x18b)](_0xa8e160);return undefined;}const _0x352a3b=_0xa0fa65[_0xbbd29e(0x1a0)][_0xa8e160];if(_0x352a3b===!![]||_0x352a3b===![])return _0x352a3b;if(_0x352a3b==='true')return!![];if(_0x352a3b==='false')return![];throw CliErrors['validation']('--'+_0xa8e160+'\x20must\x20be\x20true\x20or\x20false.');}function a175_0x1e2c(_0x5bb3d4,_0xbb42ec){_0x5bb3d4=_0x5bb3d4-0x11f;const _0x3e2820=a175_0x3e28();let _0x1e2c64=_0x3e2820[_0x5bb3d4];return _0x1e2c64;}function verifyVisibilityUpdate(_0xd084ab,_0x416823,_0x3985e5){const _0x26dc58=a175_0x58a28d;assertVerified(!!_0x416823,_0x26dc58(0x140)+_0xd084ab['id']+_0x26dc58(0x129)),assertVerified(_0x416823[_0x26dc58(0x15b)]===_0x3985e5,'Menu\x20'+_0xd084ab['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x20ee6a=[['id',_0x416823['id'],_0xd084ab['id']],[_0x26dc58(0x131),_0x416823['parentId'],_0xd084ab[_0x26dc58(0x131)]],[_0x26dc58(0x17b),_0x416823['depth'],_0xd084ab[_0x26dc58(0x17b)]],[_0x26dc58(0x144),_0x416823[_0x26dc58(0x144)],_0xd084ab[_0x26dc58(0x144)]],['path',_0x416823['path'],_0xd084ab[_0x26dc58(0x155)]],[_0x26dc58(0x153),_0x416823[_0x26dc58(0x153)],_0xd084ab[_0x26dc58(0x153)]],[_0x26dc58(0x149),_0x416823[_0x26dc58(0x149)],_0xd084ab['type']],[_0x26dc58(0x14d),_0x416823[_0x26dc58(0x14d)],_0xd084ab['sort']],[_0x26dc58(0x191),_0x416823[_0x26dc58(0x191)],_0xd084ab[_0x26dc58(0x191)]],[_0x26dc58(0x17c),_0x416823['resourcesValid'],_0xd084ab[_0x26dc58(0x17c)]],['childrenIds',_0x416823[_0x26dc58(0x158)],_0xd084ab[_0x26dc58(0x158)]],[_0x26dc58(0x133),_0x416823[_0x26dc58(0x133)],_0xd084ab['childrenCount']],[_0x26dc58(0x199),_0x416823[_0x26dc58(0x199)],_0xd084ab[_0x26dc58(0x199)]],[_0x26dc58(0x175),_0x416823['pageType'],_0xd084ab[_0x26dc58(0x175)]],['modelType',_0x416823[_0x26dc58(0x166)],_0xd084ab[_0x26dc58(0x166)]],[_0x26dc58(0x188),_0x416823['datasetId'],_0xd084ab[_0x26dc58(0x188)]],[_0x26dc58(0x157),_0x416823[_0x26dc58(0x157)],_0xd084ab['datasetCode']]];for(const [_0x3a1968,_0x26f819,_0x23e0af]of _0x20ee6a){assertVerified(sameValue(_0x26f819,_0x23e0af),_0x26dc58(0x140)+_0xd084ab['id']+'\x20'+_0x3a1968+_0x26dc58(0x19a));}}function sameValue(_0x1ff1bb,_0x4061c9){const _0x1f548f=a175_0x58a28d;if(Array['isArray'](_0x1ff1bb)||Array[_0x1f548f(0x12a)](_0x4061c9))return JSON[_0x1f548f(0x19e)](_0x1ff1bb)===JSON[_0x1f548f(0x19e)](_0x4061c9);return _0x1ff1bb===_0x4061c9;}
1
+ const a175_0x89fa30=a175_0x1248;(function(_0xd1e7bb,_0x4a9868){const _0x599e2b=a175_0x1248,_0x1c6136=_0xd1e7bb();while(!![]){try{const _0x148317=-parseInt(_0x599e2b(0x1dd))/0x1+-parseInt(_0x599e2b(0x1b6))/0x2+-parseInt(_0x599e2b(0x1b5))/0x3*(parseInt(_0x599e2b(0x1c9))/0x4)+-parseInt(_0x599e2b(0x16b))/0x5+-parseInt(_0x599e2b(0x1de))/0x6*(-parseInt(_0x599e2b(0x1d9))/0x7)+parseInt(_0x599e2b(0x16e))/0x8*(-parseInt(_0x599e2b(0x1e1))/0x9)+-parseInt(_0x599e2b(0x19c))/0xa*(-parseInt(_0x599e2b(0x1dc))/0xb);if(_0x148317===_0x4a9868)break;else _0x1c6136['push'](_0x1c6136['shift']());}catch(_0xb293cf){_0x1c6136['push'](_0x1c6136['shift']());}}}(a175_0x53b9,0xe20fe));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,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a175_0x89fa30(0x17a),'path':a175_0x89fa30(0x171)}];export const menuVisibilityUpdate={'service':a175_0x89fa30(0x169),'command':a175_0x89fa30(0x1a3),'description':a175_0x89fa30(0x1e6),'risk':a175_0x89fa30(0x190),'structuredErrors':!![],'flags':[{'name':a175_0x89fa30(0x1d0),'type':'string','description':a175_0x89fa30(0x196)},{'name':a175_0x89fa30(0x1a0),'type':a175_0x89fa30(0x1a1),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a175_0x89fa30(0x1e4),'type':a175_0x89fa30(0x1bd),'required':!![],'description':a175_0x89fa30(0x195)},{'name':a175_0x89fa30(0x1e8),'type':'boolean','description':a175_0x89fa30(0x1a5)},{'name':a175_0x89fa30(0x1ab),'type':a175_0x89fa30(0x1e7),'description':a175_0x89fa30(0x19b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x47a532){parseInput(_0x47a532),requireExplicitYes(_0x47a532);},async 'dryRun'(_0x17c8ad){const _0x56dd0c=a175_0x89fa30,_0x5bedd9=await buildPlan(_0x17c8ad,!![]),_0x20c19f=_0x5bedd9[_0x56dd0c(0x1df)][_0x56dd0c(0x1cc)]?.[_0x56dd0c(0x19e)]??0x0,_0x529fb0=_0x5bedd9['plan'][_0x56dd0c(0x1a6)][_0x56dd0c(0x19e)]-_0x20c19f;return menuDryRunResult(_0x5bedd9[_0x56dd0c(0x1df)],{'method':_0x56dd0c(0x17a),'url':'/smartapi/menu/update','body':{'updates':_0x5bedd9[_0x56dd0c(0x1df)][_0x56dd0c(0x1cc)]?.[_0x56dd0c(0x189)](_0x5785e7=>_0x5785e7[_0x56dd0c(0x1cb)])??[]},'description':_0x56dd0c(0x1c1)+_0x20c19f+_0x56dd0c(0x1d2)+_0x529fb0+_0x56dd0c(0x1b3)});},async 'execute'(_0xccd406){const _0x9108c9=a175_0x89fa30;requireExplicitYes(_0xccd406);const _0x3e4225=await buildPlan(_0xccd406,![]);await recheckMutationSnapshot(_0xccd406,_0x3e4225['plan'],_0x9108c9(0x16d));const _0x43d08c=[],_0x2e4604=[],_0x474631=[];for(const _0x5de2ab of _0x3e4225[_0x9108c9(0x1df)][_0x9108c9(0x1a6)]){if(_0x5de2ab[_0x9108c9(0x1ea)][_0x9108c9(0x1e4)]===_0x3e4225['plan'][_0x9108c9(0x1bc)]){_0x43d08c['push']({'id':_0x5de2ab['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xccd406[_0x9108c9(0x182)],_0xccd406[_0x9108c9(0x184)],{'id':_0x5de2ab['id'],'visible':_0x3e4225[_0x9108c9(0x1df)][_0x9108c9(0x1bc)]}),_0x43d08c[_0x9108c9(0x1a7)]({'id':_0x5de2ab['id'],'updated':!![],'skipped':![]});}catch(_0x400739){const _0x1f1b9a=mapMenuApiError(_0x400739,_0x9108c9(0x1bb),_0x5de2ab['id']);if(isMenuResponseLoss(_0x400739)&&_0x1f1b9a[_0x9108c9(0x197)]!=='menu_permission_denied'){_0x474631[_0x9108c9(0x1a7)](_0x5de2ab['id']);continue;}_0x2e4604['push']({'id':_0x5de2ab['id'],'stage':_0x9108c9(0x1b1),'code':_0x1f1b9a[_0x9108c9(0x197)],'message':_0x1f1b9a[_0x9108c9(0x1af)]});}}let _0x548cbf;try{_0x548cbf=await fetchMenuSnapshot(_0xccd406['appCode'],_0xccd406[_0x9108c9(0x184)]);}catch(_0xfa05bd){const _0x3f14d3=describeMenuErrorCause(_0xfa05bd,_0x9108c9(0x180)),_0x401a57=_0x474631[_0x9108c9(0x189)](_0x133415=>({'id':_0x133415,'stage':_0x9108c9(0x19d),'code':'menu_verification_failed','message':_0x9108c9(0x17f)+_0x133415+_0x9108c9(0x191),'requestedStateConfirmed':![],'recovered':![]})),_0x1fb0f9={'stage':'verification','code':_0x9108c9(0x18f),'message':_0x9108c9(0x183),'targetIds':_0x3e4225['plan'][_0x9108c9(0x1a6)][_0x9108c9(0x189)](_0x3629fc=>_0x3629fc['id']),'requestedStateConfirmed':![],..._0x3f14d3};throw menuFailure(asVerificationError(_0xfa05bd,_0x9108c9(0x1c4)),_0x3e4225[_0x9108c9(0x1df)],{'stage':_0x9108c9(0x1cd),'succeeded':_0x43d08c,'failedRecords':[..._0x2e4604,..._0x401a57,_0x1fb0f9],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x9108c9(0x16c),'recoveredCount':0x0,'lookupCommand':_0x9108c9(0x1db)}});}const _0x22ea2e=[];for(const _0x7a343c of _0x43d08c){const _0x17800a=Number(_0x7a343c['id']),_0x44437b=_0x3e4225[_0x9108c9(0x186)][_0x9108c9(0x175)](_0x17800a),_0x3f5ce4=_0x548cbf[_0x9108c9(0x1be)]['get'](_0x17800a);try{verifyVisibilityUpdate(_0x44437b,_0x3f5ce4,_0x3e4225['plan'][_0x9108c9(0x1bc)]);}catch(_0x5b415f){const _0x33da1c=asVerificationError(_0x5b415f,_0x9108c9(0x198)+_0x17800a+_0x9108c9(0x172));_0x22ea2e[_0x9108c9(0x1a7)]({'id':_0x17800a,'stage':'verification','code':_0x33da1c[_0x9108c9(0x197)],'message':_0x33da1c[_0x9108c9(0x1af)],'requestedStateConfirmed':![]});}}for(const _0xe5dad1 of _0x474631){const _0x349724=_0x3e4225[_0x9108c9(0x186)][_0x9108c9(0x175)](_0xe5dad1),_0x57409b=_0x548cbf[_0x9108c9(0x1be)][_0x9108c9(0x175)](_0xe5dad1);try{verifyVisibilityUpdate(_0x349724,_0x57409b,_0x3e4225[_0x9108c9(0x1df)]['requestedVisible']),_0x43d08c[_0x9108c9(0x1a7)]({'id':_0xe5dad1,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x2eaa64){const _0x58d6d3=asVerificationError(_0x2eaa64,_0x9108c9(0x1e0)+_0xe5dad1+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x22ea2e['push']({'id':_0xe5dad1,'stage':_0x9108c9(0x19d),'code':_0x58d6d3[_0x9108c9(0x197)],'message':_0x58d6d3[_0x9108c9(0x1af)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x22ea2e[_0x9108c9(0x19e)]>0x0){const _0x375698=_0x22ea2e[_0x9108c9(0x189)](_0x48d381=>Number(_0x48d381['id'])),_0x2937b1=_0x43d08c['filter'](_0x5ba761=>_0x5ba761['recovered']===!![])[_0x9108c9(0x19e)],_0x2bc940=menuError(_0x9108c9(0x18f),_0x9108c9(0x17e)+_0x375698[_0x9108c9(0x170)](',\x20')+'.',_0x9108c9(0x188));throw menuFailure(_0x2bc940,_0x3e4225[_0x9108c9(0x1df)],{'stage':_0x9108c9(0x1cd),'succeeded':_0x43d08c,'failedRecords':[..._0x2e4604,..._0x22ea2e],'warnings':[_0x9108c9(0x1c3)],'verification':{'status':_0x9108c9(0x16c),..._0x375698[_0x9108c9(0x19e)]===0x1?{'targetId':_0x375698[0x0]}:{'targetIds':_0x375698},'recoveredCount':_0x2937b1,'lookupCommand':_0x9108c9(0x1db)}});}const _0x53e6db=_0x43d08c[_0x9108c9(0x1b7)](_0x4ef243=>_0x4ef243[_0x9108c9(0x185)]===!![])[_0x9108c9(0x19e)],_0x49cb73=_0x43d08c[_0x9108c9(0x19e)]-_0x53e6db,_0x46dfcf={..._0x3e4225['plan'],'succeeded':_0x43d08c,'failed':_0x2e4604,'warnings':_0x2e4604[_0x9108c9(0x19e)]>0x0?[..._0x3e4225[_0x9108c9(0x1df)]['warnings'],_0x9108c9(0x1b8)]:_0x3e4225['plan'][_0x9108c9(0x1a8)],'verification':{'checkedBy':_0x9108c9(0x17c),'snapshotHash':_0x548cbf[_0x9108c9(0x1d4)],'matchesRequestedState':_0x2e4604[_0x9108c9(0x19e)]===0x0,'recoveredCount':_0x474631[_0x9108c9(0x19e)]}};return{'ok':_0x2e4604['length']===0x0,'data':_0x46dfcf,'message':_0x2e4604['length']===0x0?'Updated\x20visibility\x20for\x20'+_0x53e6db+_0x9108c9(0x1ca)+_0x49cb73+'\x20unchanged\x20menu(s).':_0x9108c9(0x194)+_0x53e6db+'\x20updated,\x20'+_0x49cb73+_0x9108c9(0x1d8)+_0x2e4604['length']+'\x20failed.'};}};function parseInput(_0x36fd1d){const _0x1a5272=a175_0x89fa30,_0x4a11be=parseMenuIds(_0x36fd1d[_0x1a5272(0x1da)](_0x1a5272(0x1d0))),_0x365865=parseCsv(_0x36fd1d[_0x1a5272(0x1da)](_0x1a5272(0x1a0)));if(_0x4a11be[_0x1a5272(0x19e)]===0x0&&_0x365865['length']===0x0)throw CliErrors['validation'](_0x1a5272(0x1ae));const _0x2accf3=parseBooleanFlag(_0x36fd1d,_0x1a5272(0x1e4),!![]),_0x311d3b=parseBooleanFlag(_0x36fd1d,_0x1a5272(0x1e8),![]);let _0x54af29;if(hasFlag(_0x36fd1d,_0x1a5272(0x1ab))){_0x54af29=_0x36fd1d[_0x1a5272(0x192)]('expected-count');if(!Number[_0x1a5272(0x1e3)](_0x54af29)||_0x54af29<0x0)throw CliErrors['validation'](_0x1a5272(0x1d6));}return{'menuIds':_0x4a11be,'paths':_0x365865,'visible':_0x2accf3,'expectVisible':_0x311d3b,'expectedCount':_0x54af29};}async function buildPlan(_0x3c1187,_0x5dfe93){const _0x10aba7=a175_0x89fa30,_0x256b83=parseInput(_0x3c1187),_0x30858f=await fetchMutationSnapshot(_0x3c1187,_0x10aba7(0x16d)),_0xe8a933=selectTargets(_0x30858f[_0x10aba7(0x1d3)],_0x256b83[_0x10aba7(0x1c0)],_0x256b83[_0x10aba7(0x1a0)]);if(_0x256b83[_0x10aba7(0x18c)]!==undefined&&_0xe8a933[_0x10aba7(0x19e)]!==_0x256b83[_0x10aba7(0x18c)])throw menuError(_0x10aba7(0x168),_0x10aba7(0x1ad)+_0xe8a933[_0x10aba7(0x19e)]+'\x20menu(s),\x20expected\x20'+_0x256b83[_0x10aba7(0x18c)]+'.',_0x10aba7(0x178));if(_0x256b83[_0x10aba7(0x1c2)]!==undefined){const _0x20f951=_0xe8a933[_0x10aba7(0x1b7)](_0x2c1739=>_0x2c1739[_0x10aba7(0x1e4)]!==_0x256b83[_0x10aba7(0x1c2)]);if(_0x20f951[_0x10aba7(0x19e)]>0x0)throw menuError(_0x10aba7(0x1b2),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x20f951[_0x10aba7(0x189)](_0x5bc1f6=>_0x5bc1f6['id'])[_0x10aba7(0x170)](',\x20')+'.',_0x10aba7(0x1d7));}const _0x3b5bc1=_0xe8a933[_0x10aba7(0x189)](_0x32c86f=>({'id':_0x32c86f['id'],'label':_0x32c86f['label'],'path':_0x32c86f[_0x10aba7(0x1b9)],'before':{'visible':_0x32c86f[_0x10aba7(0x1e4)]},'after':{'visible':_0x256b83[_0x10aba7(0x1e4)]}})),_0x24c069=_0x3b5bc1['filter'](_0x5be85b=>_0x5be85b['before']['visible']!==_0x256b83['visible'])[_0x10aba7(0x189)](_0x1de679=>({'stage':_0x10aba7(0x1aa),'method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x3c1187[_0x10aba7(0x182)],'id':_0x1de679['id'],'visible':_0x256b83['visible']}})),_0x2270a6=mutationResult({'operation':_0x10aba7(0x1a3),'selector':{'menuIds':_0x256b83[_0x10aba7(0x1c0)],'paths':_0x256b83[_0x10aba7(0x1a0)]},'before':{'menus':_0xe8a933[_0x10aba7(0x189)](_0x481cbc=>({'id':_0x481cbc['id'],'path':_0x481cbc[_0x10aba7(0x1b9)],'visible':_0x481cbc['visible']}))},'after':{'menus':_0xe8a933[_0x10aba7(0x189)](_0x1996fe=>({'id':_0x1996fe['id'],'path':_0x1996fe['path'],'visible':_0x256b83[_0x10aba7(0x1e4)]}))},'dryRun':_0x5dfe93,'backend':[...BACKEND],'plannedActions':_0x24c069,'snapshotHash':_0x30858f[_0x10aba7(0x1d4)],'warnings':_0x24c069[_0x10aba7(0x19e)]===0x0?[_0x10aba7(0x1c6)]:[]});return{'plan':{..._0x2270a6,'requestedVisible':_0x256b83[_0x10aba7(0x1e4)],'targets':_0x3b5bc1},'beforeById':new Map(_0xe8a933[_0x10aba7(0x189)](_0x18df3a=>[_0x18df3a['id'],_0x18df3a]))};}function a175_0x1248(_0x3cac4f,_0x8f8a8){_0x3cac4f=_0x3cac4f-0x168;const _0x53b92b=a175_0x53b9();let _0x124873=_0x53b92b[_0x3cac4f];return _0x124873;}function selectTargets(_0x3646dd,_0x39f9d4,_0x42d454){const _0x5300f5=a175_0x89fa30,_0x3fd79f=new Map(_0x3646dd[_0x5300f5(0x189)](_0x41a177=>[_0x41a177['id'],_0x41a177])),_0x593c24=new Map(),_0x48a1de=_0x39f9d4['filter'](_0x18f2c7=>!_0x3fd79f[_0x5300f5(0x1e9)](_0x18f2c7));if(_0x48a1de['length']>0x0)throw menuError(_0x5300f5(0x18a),_0x5300f5(0x17d)+_0x48a1de['join'](',\x20')+'.',_0x5300f5(0x1cf));for(const _0x3488c9 of _0x39f9d4){_0x593c24[_0x5300f5(0x174)](_0x3488c9,_0x3fd79f['get'](_0x3488c9));}for(const _0x33b58d of _0x42d454){const _0x592992=_0x3646dd[_0x5300f5(0x1b7)](_0x5d5a2d=>_0x5d5a2d['path']===_0x33b58d);if(_0x592992[_0x5300f5(0x19e)]===0x0)throw menuError('menu_selector_not_found',_0x5300f5(0x1ba)+JSON[_0x5300f5(0x179)](_0x33b58d)+'.',_0x5300f5(0x16a));if(_0x592992[_0x5300f5(0x19e)]>0x1)throw menuError(_0x5300f5(0x199),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x5300f5(0x179)](_0x33b58d)+'.',_0x5300f5(0x1a9)+_0x592992[_0x5300f5(0x189)](_0x8a2256=>_0x8a2256['id'])[_0x5300f5(0x170)](',\x20')+'.');const _0x4efd1d=_0x592992[0x0];_0x593c24[_0x5300f5(0x174)](_0x4efd1d['id'],_0x4efd1d);}return[..._0x593c24[_0x5300f5(0x1b4)]()];}function a175_0x53b9(){const _0x510981=['get','childrenCount','datasetId','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','stringify','POST','isArray','menu\x20list','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','Response\x20was\x20lost\x20for\x20menu\x20','verify\x20menu\x20visibility\x20update','modelType','appCode','Final\x20menu\x20visibility\x20readback\x20failed.','cookie','updated','beforeById','sort','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','map','menu_selector_not_found','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','expectedCount','url','split','menu_verification_failed','high-risk-write','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','num','\x20must\x20be\x20true\x20or\x20false.','Menu\x20visibility\x20update\x20completed:\x20','Requested\x20menu\x20visibility','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','code','Menu\x20','menu_selector_ambiguous','resourcesValid','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','1630TWjlKI','update-recovery','length','rawFlags','paths','string','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','visibility-update','trim','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','targets','push','warnings','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','update-menu-visibility','expected-count','resources','Selected\x20','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','message','datasetCode','update','menu_state_drift','\x20unchanged\x20menu(s).','values','337188Ochrco','1597676mFVZZs','filter','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','path','Menu\x20path\x20selector\x20not\x20found:\x20','update\x20visibility\x20for','requestedVisible','boolean','byId','pageType','menuIds','Would\x20update\x20visibility\x20for\x20','expectVisible','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','pageId','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','flagMissing','childrenIds','4SpzfWN','\x20menu(s);\x20skipped\x20','body','plannedActions','verification','type','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','menu-ids','true','\x20menu(s);\x20skip\x20','menus','hash','validation','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','\x20skipped,\x20','136003YBYlOo','str','rabetbase\x20menu\x20list\x20--format\x20compress','176803pLSrmw','690866bXdMox','522xjeAXO','plan','Response\x20was\x20lost\x20and\x20menu\x20','1595898cPCsKw','label','isSafeInteger','visible','depth','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','number','expect-visible','has','before','menu_expected_count_mismatch','menu','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','931370DLmUPh','failed','update\x20menu\x20visibility','72ApgGdl','parentId','join','/smartapi/menu/update','\x20visibility\x20update\x20could\x20not\x20be\x20verified','\x20changed\x20unexpectedly.','set'];a175_0x53b9=function(){return _0x510981;};return a175_0x53b9();}function parseMenuIds(_0x2a6ac4){const _0x25df92=a175_0x89fa30,_0x5727ae=parseCsv(_0x2a6ac4),_0x23e761=_0x5727ae[_0x25df92(0x189)](Number);if(_0x23e761['some'](_0x403639=>!Number[_0x25df92(0x1e3)](_0x403639)||_0x403639<=0x0))throw CliErrors[_0x25df92(0x1d5)](_0x25df92(0x18b));return[...new Set(_0x23e761)];}function parseCsv(_0xbe1327){const _0x43bd8a=a175_0x89fa30;return[...new Set(_0xbe1327[_0x43bd8a(0x18e)](',')[_0x43bd8a(0x189)](_0x52b6ff=>_0x52b6ff[_0x43bd8a(0x1a4)]())[_0x43bd8a(0x1b7)](Boolean))];}function parseBooleanFlag(_0x52a4bd,_0x1d05b4,_0x157824){const _0x1c0a89=a175_0x89fa30;if(!hasFlag(_0x52a4bd,_0x1d05b4)){if(_0x157824)throw CliErrors[_0x1c0a89(0x1c7)](_0x1d05b4);return undefined;}const _0x1c54c3=_0x52a4bd[_0x1c0a89(0x19f)][_0x1d05b4];if(_0x1c54c3===!![]||_0x1c54c3===![])return _0x1c54c3;if(_0x1c54c3===_0x1c0a89(0x1d1))return!![];if(_0x1c54c3==='false')return![];throw CliErrors[_0x1c0a89(0x1d5)]('--'+_0x1d05b4+_0x1c0a89(0x193));}function verifyVisibilityUpdate(_0x408ed8,_0x33d499,_0x3182d6){const _0x23660=a175_0x89fa30;assertVerified(!!_0x33d499,_0x23660(0x198)+_0x408ed8['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x33d499['visible']===_0x3182d6,_0x23660(0x198)+_0x408ed8['id']+_0x23660(0x1a2));const _0x216971=[['id',_0x33d499['id'],_0x408ed8['id']],[_0x23660(0x16f),_0x33d499[_0x23660(0x16f)],_0x408ed8[_0x23660(0x16f)]],[_0x23660(0x1e5),_0x33d499[_0x23660(0x1e5)],_0x408ed8[_0x23660(0x1e5)]],[_0x23660(0x1e2),_0x33d499['label'],_0x408ed8[_0x23660(0x1e2)]],[_0x23660(0x1b9),_0x33d499['path'],_0x408ed8['path']],['url',_0x33d499[_0x23660(0x18d)],_0x408ed8['url']],[_0x23660(0x1ce),_0x33d499[_0x23660(0x1ce)],_0x408ed8[_0x23660(0x1ce)]],[_0x23660(0x187),_0x33d499[_0x23660(0x187)],_0x408ed8[_0x23660(0x187)]],[_0x23660(0x1ac),_0x33d499['resources'],_0x408ed8[_0x23660(0x1ac)]],[_0x23660(0x19a),_0x33d499[_0x23660(0x19a)],_0x408ed8[_0x23660(0x19a)]],[_0x23660(0x1c8),_0x33d499[_0x23660(0x1c8)],_0x408ed8[_0x23660(0x1c8)]],[_0x23660(0x176),_0x33d499[_0x23660(0x176)],_0x408ed8[_0x23660(0x176)]],[_0x23660(0x1c5),_0x33d499[_0x23660(0x1c5)],_0x408ed8[_0x23660(0x1c5)]],[_0x23660(0x1bf),_0x33d499[_0x23660(0x1bf)],_0x408ed8['pageType']],[_0x23660(0x181),_0x33d499['modelType'],_0x408ed8[_0x23660(0x181)]],[_0x23660(0x177),_0x33d499['datasetId'],_0x408ed8[_0x23660(0x177)]],['datasetCode',_0x33d499[_0x23660(0x1b0)],_0x408ed8[_0x23660(0x1b0)]]];for(const [_0x55188f,_0x1989cf,_0x17be25]of _0x216971){assertVerified(sameValue(_0x1989cf,_0x17be25),_0x23660(0x198)+_0x408ed8['id']+'\x20'+_0x55188f+_0x23660(0x173));}}function sameValue(_0x4c2c9a,_0x2ee336){const _0xe05847=a175_0x89fa30;if(Array[_0xe05847(0x17b)](_0x4c2c9a)||Array[_0xe05847(0x17b)](_0x2ee336))return JSON[_0xe05847(0x179)](_0x4c2c9a)===JSON['stringify'](_0x2ee336);return _0x4c2c9a===_0x2ee336;}
@@ -1 +1 @@
1
- const a176_0x177c89=a176_0x5af3;(function(_0x6cb1bd,_0x213b51){const _0xe47ef6=a176_0x5af3,_0x12e65e=_0x6cb1bd();while(!![]){try{const _0x18e71e=-parseInt(_0xe47ef6(0x127))/0x1+parseInt(_0xe47ef6(0x12f))/0x2+-parseInt(_0xe47ef6(0x11c))/0x3+parseInt(_0xe47ef6(0x12e))/0x4+-parseInt(_0xe47ef6(0x130))/0x5+parseInt(_0xe47ef6(0x122))/0x6+parseInt(_0xe47ef6(0x126))/0x7*(parseInt(_0xe47ef6(0x123))/0x8);if(_0x18e71e===_0x213b51)break;else _0x12e65e['push'](_0x12e65e['shift']());}catch(_0x2db569){_0x12e65e['push'](_0x12e65e['shift']());}}}(a176_0x52a3,0xd025f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a176_0x5af3(_0x225d3e,_0x1738a8){_0x225d3e=_0x225d3e-0x114;const _0x52a304=a176_0x52a3();let _0x5af33a=_0x52a304[_0x225d3e];return _0x5af33a;}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=a176_0x177c89(0x120);async function prepareCreate(_0x42ab17){const _0x94fc1e=a176_0x177c89,_0x481659=await readNotificationDocument(_0x42ab17,_0x94fc1e(0x125)),_0x52f906=createMutationInput(_0x42ab17['appCode'],_0x481659);return{'document':_0x481659,'input':_0x52f906,'planned':projectNotificationConfig({'appCode':_0x42ab17['appCode'],'configName':_0x481659[_0x94fc1e(0x132)],'channelType':_0x481659[_0x94fc1e(0x128)],'endpointUrl':_0x481659[_0x94fc1e(0x117)],'channelConfig':_0x481659[_0x94fc1e(0x133)],'description':_0x481659[_0x94fc1e(0x131)],'connectTimeout':_0x481659[_0x94fc1e(0x12a)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x481659[_0x94fc1e(0x12c)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a176_0x52a3(){const _0x30805a=['config-create','notification','1606890QTjXgp','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','configCode','notification_config_create_outcome_unknown','/notification/channel-config/create','planned','6077004kURNnI','3280szqFbg','mutation','create','4214TJzXVT','827543cliYEb','channelType','verification','connectTimeout','appCode','readTimeout','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','3015696kWKZIT','2880194YukGnU','6189635KyYvbL','description','configName','channelConfig','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',';\x20no\x20automatic\x20retry\x20was\x20attempted.',';\x20do\x20not\x20resubmit.','write',';\x20do\x20not\x20resubmit\x20automatically.','document','verified','POST','endpointUrl','Inspect\x20with\x20','isSafeInteger'];a176_0x52a3=function(){return _0x30805a;};return a176_0x52a3();}export const notificationConfigCreate={'service':a176_0x177c89(0x11b),'command':a176_0x177c89(0x11a),'description':a176_0x177c89(0x12d),'risk':a176_0x177c89(0x137),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x5907d3){assertSingleNotificationSource(_0x5907d3);},async 'dryRun'(_0x55cbe4){const _0x101559=a176_0x177c89,_0x2e0fe8=await prepareCreate(_0x55cbe4),_0x2ae1ac=notificationLookupCommand(_0x55cbe4['appCode'],_0x2e0fe8[_0x101559(0x114)][_0x101559(0x128)]);return asDryRunResult({'operation':_0x101559(0x125),'selector':{'appCode':_0x55cbe4[_0x101559(0x12b)],'configName':_0x2e0fe8[_0x101559(0x114)][_0x101559(0x132)],'channelType':_0x2e0fe8[_0x101559(0x114)][_0x101559(0x128)]},'before':null,'after':_0x2e0fe8['planned'],'dryRun':!![],'backend':{'method':_0x101559(0x116),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x101559(0x121),'lookupCommand':_0x2ae1ac}},{'method':_0x101559(0x116),'url':CREATE_PATH});},async 'execute'(_0x2f1c4b){const _0x1adf52=a176_0x177c89,_0x27acea=await prepareCreate(_0x2f1c4b),_0x3dc9bf=notificationLookupCommand(_0x2f1c4b[_0x1adf52(0x12b)],_0x27acea[_0x1adf52(0x114)][_0x1adf52(0x128)]);let _0x5f51dd;try{_0x5f51dd=await createNotificationChannelConfig(_0x27acea['input']);}catch(_0x5efa62){if(isPlatformTransportFailure(_0x5efa62))throw notificationError('notification_config_create_outcome_unknown',_0x1adf52(0x134),'Inspect\x20with\x20'+_0x3dc9bf+_0x1adf52(0x136));throw safeApiFailure('create',_0x1adf52(0x124),_0x1adf52(0x118)+_0x3dc9bf+_0x1adf52(0x135));}if(!Number[_0x1adf52(0x119)](_0x5f51dd)||_0x5f51dd<=0x0)throw notificationError(_0x1adf52(0x11f),_0x1adf52(0x11d),'Inspect\x20with\x20'+_0x3dc9bf+_0x1adf52(0x136));let _0x52fea2;try{const _0x11172c=await getNotificationChannelConfig(_0x5f51dd,_0x2f1c4b[_0x1adf52(0x12b)]);_0x52fea2=normalizeExactNotificationConfig(_0x11172c,_0x5f51dd,_0x2f1c4b[_0x1adf52(0x12b)]);}catch{throw safeApiFailure(_0x1adf52(0x125),_0x1adf52(0x129),_0x1adf52(0x118)+_0x3dc9bf+_0x1adf52(0x138));}return{'ok':!![],'data':{'operation':_0x1adf52(0x125),'selector':{'appCode':_0x52fea2[_0x1adf52(0x12b)],'id':_0x52fea2['id'],'configCode':_0x52fea2[_0x1adf52(0x11e)],'configName':_0x52fea2[_0x1adf52(0x132)],'channelType':_0x52fea2[_0x1adf52(0x128)]},'before':null,'after':projectNotificationConfig(_0x52fea2),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x1adf52(0x115),'lookupCommand':_0x3dc9bf}},'message':'Created\x20notification\x20config\x20'+_0x52fea2['id']};}};
1
+ const a176_0x1bd309=a176_0x2b88;function a176_0x2b88(_0x318da5,_0x50ed7b){_0x318da5=_0x318da5-0xfa;const _0x505520=a176_0x5055();let _0x2b88f1=_0x505520[_0x318da5];return _0x2b88f1;}(function(_0x26b857,_0x25ae5e){const _0xaf3ca2=a176_0x2b88,_0x594c18=_0x26b857();while(!![]){try{const _0xbdbe4=-parseInt(_0xaf3ca2(0x11e))/0x1+-parseInt(_0xaf3ca2(0x10d))/0x2*(-parseInt(_0xaf3ca2(0x109))/0x3)+parseInt(_0xaf3ca2(0x120))/0x4+-parseInt(_0xaf3ca2(0x101))/0x5+parseInt(_0xaf3ca2(0x115))/0x6*(-parseInt(_0xaf3ca2(0x10a))/0x7)+parseInt(_0xaf3ca2(0x103))/0x8*(parseInt(_0xaf3ca2(0x114))/0x9)+-parseInt(_0xaf3ca2(0x10b))/0xa*(-parseInt(_0xaf3ca2(0x117))/0xb);if(_0xbdbe4===_0x25ae5e)break;else _0x594c18['push'](_0x594c18['shift']());}catch(_0x33ddac){_0x594c18['push'](_0x594c18['shift']());}}}(a176_0x5055,0x34a02));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a176_0x5055(){const _0x3d584b=['Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','readTimeout','planned','228248yMNvfJ','POST','47616OfAKgr','verified','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','config-create','endpointUrl','description','notification','connectTimeout','1143525iLBhpQ','notification_config_create_outcome_unknown','8SnpFPp','configCode','configName',';\x20no\x20automatic\x20retry\x20was\x20attempted.',';\x20do\x20not\x20resubmit.','create','28140FRCksn','21RicbVy','4128490sMAhMF','isSafeInteger','52oumPnn','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','write','mutation','verification','channelConfig','Inspect\x20with\x20','2209689XfQhGQ','483294RwsAep','channelType','11tlpRKt','/notification/channel-config/create','appCode','document'];a176_0x5055=function(){return _0x3d584b;};return a176_0x5055();}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=a176_0x1bd309(0x118);async function prepareCreate(_0x1622bf){const _0x4cf6f0=a176_0x1bd309,_0x11e9fa=await readNotificationDocument(_0x1622bf,_0x4cf6f0(0x108)),_0x3e2736=createMutationInput(_0x1622bf[_0x4cf6f0(0x119)],_0x11e9fa);return{'document':_0x11e9fa,'input':_0x3e2736,'planned':projectNotificationConfig({'appCode':_0x1622bf[_0x4cf6f0(0x119)],'configName':_0x11e9fa['configName'],'channelType':_0x11e9fa[_0x4cf6f0(0x116)],'endpointUrl':_0x11e9fa[_0x4cf6f0(0xfd)],'channelConfig':_0x11e9fa[_0x4cf6f0(0x112)],'description':_0x11e9fa[_0x4cf6f0(0xfe)],'connectTimeout':_0x11e9fa[_0x4cf6f0(0x100)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x11e9fa[_0x4cf6f0(0x11c)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a176_0x1bd309(0xff),'command':a176_0x1bd309(0xfc),'description':a176_0x1bd309(0x11b),'risk':a176_0x1bd309(0x10f),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x21a9fa){assertSingleNotificationSource(_0x21a9fa);},async 'dryRun'(_0x187e46){const _0x3401a9=a176_0x1bd309,_0x587647=await prepareCreate(_0x187e46),_0x1398c3=notificationLookupCommand(_0x187e46[_0x3401a9(0x119)],_0x587647[_0x3401a9(0x11a)][_0x3401a9(0x116)]);return asDryRunResult({'operation':_0x3401a9(0x108),'selector':{'appCode':_0x187e46[_0x3401a9(0x119)],'configName':_0x587647[_0x3401a9(0x11a)][_0x3401a9(0x105)],'channelType':_0x587647[_0x3401a9(0x11a)][_0x3401a9(0x116)]},'before':null,'after':_0x587647[_0x3401a9(0x11d)],'dryRun':!![],'backend':{'method':_0x3401a9(0x11f),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3401a9(0x11d),'lookupCommand':_0x1398c3}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x22bedd){const _0x23db57=a176_0x1bd309,_0x4224ad=await prepareCreate(_0x22bedd),_0x4ca087=notificationLookupCommand(_0x22bedd['appCode'],_0x4224ad[_0x23db57(0x11a)]['channelType']);let _0x389540;try{_0x389540=await createNotificationChannelConfig(_0x4224ad['input']);}catch(_0x387d98){if(isPlatformTransportFailure(_0x387d98))throw notificationError('notification_config_create_outcome_unknown',_0x23db57(0x10e),'Inspect\x20with\x20'+_0x4ca087+_0x23db57(0x107));throw safeApiFailure(_0x23db57(0x108),_0x23db57(0x110),_0x23db57(0x113)+_0x4ca087+_0x23db57(0x106));}if(!Number[_0x23db57(0x10c)](_0x389540)||_0x389540<=0x0)throw notificationError(_0x23db57(0x102),_0x23db57(0xfb),_0x23db57(0x113)+_0x4ca087+';\x20do\x20not\x20resubmit.');let _0x7d1a00;try{const _0x38140e=await getNotificationChannelConfig(_0x389540,_0x22bedd['appCode']);_0x7d1a00=normalizeExactNotificationConfig(_0x38140e,_0x389540,_0x22bedd[_0x23db57(0x119)]);}catch{throw safeApiFailure(_0x23db57(0x108),_0x23db57(0x111),'Inspect\x20with\x20'+_0x4ca087+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x23db57(0x108),'selector':{'appCode':_0x7d1a00[_0x23db57(0x119)],'id':_0x7d1a00['id'],'configCode':_0x7d1a00[_0x23db57(0x104)],'configName':_0x7d1a00[_0x23db57(0x105)],'channelType':_0x7d1a00['channelType']},'before':null,'after':projectNotificationConfig(_0x7d1a00),'dryRun':![],'backend':{'method':_0x23db57(0x11f),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x23db57(0xfa),'lookupCommand':_0x4ca087}},'message':'Created\x20notification\x20config\x20'+_0x7d1a00['id']};}};
@@ -1 +1 @@
1
- const a177_0x4cc068=a177_0x3d80;(function(_0x12589f,_0x596f5f){const _0x3cf1fc=a177_0x3d80,_0x20430b=_0x12589f();while(!![]){try{const _0x1fc3f5=-parseInt(_0x3cf1fc(0x71))/0x1*(parseInt(_0x3cf1fc(0x7b))/0x2)+-parseInt(_0x3cf1fc(0x91))/0x3+parseInt(_0x3cf1fc(0x79))/0x4+parseInt(_0x3cf1fc(0x88))/0x5+parseInt(_0x3cf1fc(0x7a))/0x6+parseInt(_0x3cf1fc(0x80))/0x7*(parseInt(_0x3cf1fc(0x89))/0x8)+parseInt(_0x3cf1fc(0x83))/0x9*(-parseInt(_0x3cf1fc(0x8d))/0xa);if(_0x1fc3f5===_0x596f5f)break;else _0x20430b['push'](_0x20430b['shift']());}catch(_0x1c2a29){_0x20430b['push'](_0x20430b['shift']());}}}(a177_0x35d4,0x544f7));import{asDryRunResult}from'../../commands/common/dry-run.js';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=a177_0x4cc068(0x7c),REFERENCE_WARNING=a177_0x4cc068(0x8f);async function prepareDelete(_0x4503f5){const _0x41e192=a177_0x4cc068,_0xabefb4=readNotificationId(_0x4503f5),_0x29b31a=await requireExactNotificationConfig(_0x4503f5[_0x41e192(0x76)],_0xabefb4,_0x41e192(0x8a));return{'id':_0xabefb4,'before':_0x29b31a};}function a177_0x3d80(_0x9421e7,_0x1e15b8){_0x9421e7=_0x9421e7-0x71;const _0x35d433=a177_0x35d4();let _0x3d8079=_0x35d433[_0x9421e7];return _0x3d8079;}export const notificationConfigDelete={'service':a177_0x4cc068(0x85),'command':a177_0x4cc068(0x82),'description':a177_0x4cc068(0x72),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x393541){readNotificationId(_0x393541),requireNotificationExplicitYes(_0x393541);},async 'dryRun'(_0x24f212){const _0xad9583=a177_0x4cc068,_0x596ab9=await prepareDelete(_0x24f212),_0x587c7b=notificationLookupCommand(_0x24f212[_0xad9583(0x76)],_0x596ab9[_0xad9583(0x74)][_0xad9583(0x77)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x596ab9[_0xad9583(0x74)]),'before':projectNotificationConfig(_0x596ab9[_0xad9583(0x74)]),'after':null,'dryRun':!![],'backend':{'method':_0xad9583(0x8b),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x587c7b}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x23186e){const _0x34d2d7=a177_0x4cc068;requireNotificationExplicitYes(_0x23186e);const _0x333cff=await prepareDelete(_0x23186e),_0x5ed94d=notificationLookupCommand(_0x23186e[_0x34d2d7(0x76)],_0x333cff[_0x34d2d7(0x74)]['channelType']);let _0x1b32f0=![];try{await deleteNotificationChannelConfig(_0x333cff['id'],_0x23186e[_0x34d2d7(0x76)]);}catch(_0x14b9d6){if(!isPlatformTransportFailure(_0x14b9d6))throw safeApiFailure('delete',_0x34d2d7(0x84),_0x34d2d7(0x78)+_0x5ed94d+_0x34d2d7(0x8c));_0x1b32f0=!![];}let _0x3e703f;try{_0x3e703f=await listNotificationChannelConfigs(_0x23186e['appCode'],_0x333cff[_0x34d2d7(0x74)][_0x34d2d7(0x77)]),validateNotificationDeleteReadback(_0x3e703f,_0x23186e[_0x34d2d7(0x76)],_0x333cff['before']['channelType']);}catch{throw notificationError(_0x1b32f0?'notification_config_delete_outcome_unknown':_0x34d2d7(0x7e),_0x34d2d7(0x8e)+_0x333cff['id']+_0x34d2d7(0x75),_0x34d2d7(0x78)+_0x5ed94d+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x3e703f['some'](_0x2d8dbc=>_0x2d8dbc['id']===_0x333cff['id']))throw notificationError(_0x1b32f0?_0x34d2d7(0x86):_0x34d2d7(0x73),_0x34d2d7(0x8e)+_0x333cff['id']+_0x34d2d7(0x90),'Inspect\x20with\x20'+_0x5ed94d+';\x20do\x20not\x20resubmit\x20automatically.');const _0x29a8aa=[REFERENCE_WARNING];return _0x1b32f0&&_0x29a8aa[_0x34d2d7(0x81)](_0x34d2d7(0x7d)),{'ok':!![],'data':{'operation':_0x34d2d7(0x8a),'selector':notificationSelector(_0x333cff[_0x34d2d7(0x74)]),'before':projectNotificationConfig(_0x333cff['before']),'after':null,'dryRun':![],'backend':{'method':_0x34d2d7(0x8b),'path':DELETE_PATH},'warnings':_0x29a8aa,'verification':{'status':_0x34d2d7(0x7f),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1b32f0,'lookupCommand':_0x5ed94d}},'message':_0x34d2d7(0x87)+_0x333cff['id']};}};function a177_0x35d4(){const _0x2f84ed=['appCode','channelType','Inspect\x20with\x20','203324NAuVTM','2320680snRRdY','33634gcOcmO','/notification/channel-config/delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','notification_config_delete_verification_unavailable','verified','7vFadCT','unshift','config-delete','5067VLpQeS','mutation','notification','notification_config_delete_outcome_unknown','Deleted\x20notification\x20config\x20','2600920RmqWxy','1531520WuADzZ','delete','POST',';\x20no\x20automatic\x20retry\x20was\x20attempted.','6100zgIBUC','Notification\x20config\x20','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','\x20remains\x20present\x20after\x20delete.','221037nRLWEK','23IiYqYi','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','notification_config_delete_verification_failed','before','\x20delete\x20could\x20not\x20be\x20verified.'];a177_0x35d4=function(){return _0x2f84ed;};return a177_0x35d4();}
1
+ function a177_0x340a(){const _0x12723e=['114bgVirD','Deleted\x20notification\x20config\x20','delete','7UVrByj','unshift','/notification/channel-config/delete','1107128YvUWUh','some','verified','64475hjkTpx','config-delete','22koTrvI','notification_config_delete_outcome_unknown','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Inspect\x20with\x20','347556xkOEbx','before','2871132lZwqit','POST','611343NTkfIS','notification_config_delete_verification_failed','mutation','high-risk-write',';\x20do\x20not\x20resubmit\x20automatically.','planned','8rsjjeK','538890wiWFkL','90yPTEeR','2396728ZOiDYl','channelType','Notification\x20config\x20','appCode'];a177_0x340a=function(){return _0x12723e;};return a177_0x340a();}const a177_0x6c2391=a177_0x44a3;(function(_0x5e24a3,_0x526632){const _0x18d39c=a177_0x44a3,_0x58bb82=_0x5e24a3();while(!![]){try{const _0x396c69=-parseInt(_0x18d39c(0x10c))/0x1+parseInt(_0x18d39c(0x10b))/0x2*(parseInt(_0x18d39c(0x101))/0x3)+-parseInt(_0x18d39c(0x10e))/0x4+parseInt(_0x18d39c(0x11b))/0x5*(parseInt(_0x18d39c(0x112))/0x6)+-parseInt(_0x18d39c(0x115))/0x7*(parseInt(_0x18d39c(0x118))/0x8)+parseInt(_0x18d39c(0x105))/0x9*(parseInt(_0x18d39c(0x10d))/0xa)+-parseInt(_0x18d39c(0x11d))/0xb*(-parseInt(_0x18d39c(0x103))/0xc);if(_0x396c69===_0x526632)break;else _0x58bb82['push'](_0x58bb82['shift']());}catch(_0x1db78d){_0x58bb82['push'](_0x58bb82['shift']());}}}(a177_0x340a,0x7f657));import{asDryRunResult}from'../../commands/common/dry-run.js';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=a177_0x6c2391(0x117),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x4e8dae){const _0x3ecb4a=a177_0x6c2391,_0x188f8c=readNotificationId(_0x4e8dae),_0x191ef5=await requireExactNotificationConfig(_0x4e8dae[_0x3ecb4a(0x111)],_0x188f8c,_0x3ecb4a(0x114));return{'id':_0x188f8c,'before':_0x191ef5};}function a177_0x44a3(_0x178693,_0x1b138c){_0x178693=_0x178693-0x100;const _0x340aa3=a177_0x340a();let _0x44a31a=_0x340aa3[_0x178693];return _0x44a31a;}export const notificationConfigDelete={'service':'notification','command':a177_0x6c2391(0x11c),'description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a177_0x6c2391(0x108),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x264316){readNotificationId(_0x264316),requireNotificationExplicitYes(_0x264316);},async 'dryRun'(_0x2b9eec){const _0x5864da=a177_0x6c2391,_0x417ab2=await prepareDelete(_0x2b9eec),_0x4451bf=notificationLookupCommand(_0x2b9eec[_0x5864da(0x111)],_0x417ab2[_0x5864da(0x102)]['channelType']);return asDryRunResult({'operation':_0x5864da(0x114),'selector':notificationSelector(_0x417ab2[_0x5864da(0x102)]),'before':projectNotificationConfig(_0x417ab2[_0x5864da(0x102)]),'after':null,'dryRun':!![],'backend':{'method':_0x5864da(0x104),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x5864da(0x10a),'lookupCommand':_0x4451bf}},{'method':_0x5864da(0x104),'url':DELETE_PATH});},async 'execute'(_0x476d6e){const _0x32aacb=a177_0x6c2391;requireNotificationExplicitYes(_0x476d6e);const _0x45f182=await prepareDelete(_0x476d6e),_0x594939=notificationLookupCommand(_0x476d6e[_0x32aacb(0x111)],_0x45f182[_0x32aacb(0x102)]['channelType']);let _0x25afd9=![];try{await deleteNotificationChannelConfig(_0x45f182['id'],_0x476d6e[_0x32aacb(0x111)]);}catch(_0x5e0ca6){if(!isPlatformTransportFailure(_0x5e0ca6))throw safeApiFailure(_0x32aacb(0x114),_0x32aacb(0x107),_0x32aacb(0x100)+_0x594939+_0x32aacb(0x120));_0x25afd9=!![];}let _0x363850;try{_0x363850=await listNotificationChannelConfigs(_0x476d6e[_0x32aacb(0x111)],_0x45f182[_0x32aacb(0x102)][_0x32aacb(0x10f)]),validateNotificationDeleteReadback(_0x363850,_0x476d6e['appCode'],_0x45f182[_0x32aacb(0x102)][_0x32aacb(0x10f)]);}catch{throw notificationError(_0x25afd9?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x32aacb(0x110)+_0x45f182['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x32aacb(0x100)+_0x594939+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x363850[_0x32aacb(0x119)](_0x3a1f12=>_0x3a1f12['id']===_0x45f182['id']))throw notificationError(_0x25afd9?_0x32aacb(0x11e):_0x32aacb(0x106),_0x32aacb(0x110)+_0x45f182['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x594939+_0x32aacb(0x109));const _0x13551d=[REFERENCE_WARNING];return _0x25afd9&&_0x13551d[_0x32aacb(0x116)](_0x32aacb(0x11f)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x45f182[_0x32aacb(0x102)]),'before':projectNotificationConfig(_0x45f182[_0x32aacb(0x102)]),'after':null,'dryRun':![],'backend':{'method':_0x32aacb(0x104),'path':DELETE_PATH},'warnings':_0x13551d,'verification':{'status':_0x32aacb(0x11a),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x25afd9,'lookupCommand':_0x594939}},'message':_0x32aacb(0x113)+_0x45f182['id']};}};
@@ -1 +1 @@
1
- function a178_0x3280(_0x3fd8c9,_0x2ffad9){_0x3fd8c9=_0x3fd8c9-0x1e5;const _0x20097b=a178_0x2009();let _0x3280b6=_0x20097b[_0x3fd8c9];return _0x3280b6;}const a178_0x258217=a178_0x3280;function a178_0x2009(){const _0x9e28f8=['\x20notification\x20config(s)','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','2263032xtZAhh','read','Notification\x20channel\x20type','bool','str','map','type','flat','Found\x20','1775184dUAWAP','2145003GOlcPE','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','string','validation','164760mwPMLH','3644kEAyGb','boolean','1775orKvMS','934VsPQnG','all','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','notification','822AAxBFD','config-list','140MyZNeH','trim','appCode','length','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','534168MwbESU'];a178_0x2009=function(){return _0x9e28f8;};return a178_0x2009();}(function(_0xa0bb7f,_0x50074c){const _0x2e27fc=a178_0x3280,_0x207445=_0xa0bb7f();while(!![]){try{const _0x4c716d=parseInt(_0x2e27fc(0x201))/0x1*(parseInt(_0x2e27fc(0x1fd))/0x2)+parseInt(_0x2e27fc(0x1f9))/0x3+parseInt(_0x2e27fc(0x1fa))/0x4*(parseInt(_0x2e27fc(0x1fc))/0x5)+-parseInt(_0x2e27fc(0x1f4))/0x6+parseInt(_0x2e27fc(0x1f5))/0x7+parseInt(_0x2e27fc(0x1eb))/0x8+parseInt(_0x2e27fc(0x1e7))/0x9*(-parseInt(_0x2e27fc(0x203))/0xa);if(_0x4c716d===_0x50074c)break;else _0x207445['push'](_0x207445['shift']());}catch(_0x5e752f){_0x207445['push'](_0x207445['shift']());}}}(a178_0x2009,0x36dcb));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a178_0x258217(0x200),'command':a178_0x258217(0x202),'description':a178_0x258217(0x1e6),'risk':a178_0x258217(0x1ec),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a178_0x258217(0x1f1),'type':a178_0x258217(0x1f7),'description':a178_0x258217(0x1ed),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a178_0x258217(0x1fe),'type':a178_0x258217(0x1fb),'default':![],'description':a178_0x258217(0x1e9)}],async 'validate'(_0xcddecd){const _0x308297=a178_0x258217;if(_0xcddecd[_0x308297(0x1ee)](_0x308297(0x1fe))&&_0xcddecd[_0x308297(0x1ef)](_0x308297(0x1f1))[_0x308297(0x204)]())throw CliErrors[_0x308297(0x1f8)](_0x308297(0x1ff),_0x308297(0x1f6));if(_0xcddecd[_0x308297(0x1ee)](_0x308297(0x1fe)))return;readNotificationChannelType(_0xcddecd);},async 'execute'(_0x2625f5){const _0x8f77ef=a178_0x258217;if(_0x2625f5['bool'](_0x8f77ef(0x1fe))){const _0x20ca1d=await Promise[_0x8f77ef(0x1fe)](NOTIFICATION_CHANNEL_TYPES['map'](_0x3a246c=>listNotificationChannelConfigs(_0x2625f5[_0x8f77ef(0x205)],_0x3a246c))),_0x53d29e=_0x20ca1d[_0x8f77ef(0x1f2)]()[_0x8f77ef(0x1f0)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2625f5[_0x8f77ef(0x205)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x53d29e[_0x8f77ef(0x1e5)],'configs':_0x53d29e},'message':_0x8f77ef(0x1f3)+_0x53d29e[_0x8f77ef(0x1e5)]+_0x8f77ef(0x1ea)};}const _0x55e1b0=readNotificationChannelType(_0x2625f5),_0x424e71=await listNotificationChannelConfigs(_0x2625f5[_0x8f77ef(0x205)],_0x55e1b0),_0x5f2839=_0x424e71[_0x8f77ef(0x1f0)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2625f5['appCode'],'channelType':_0x55e1b0,'count':_0x5f2839[_0x8f77ef(0x1e5)],'configs':_0x5f2839},'message':_0x8f77ef(0x1f3)+_0x5f2839[_0x8f77ef(0x1e5)]+'\x20'+_0x55e1b0+_0x8f77ef(0x1e8)};}};
1
+ function a178_0x516e(){const _0x314b5b=['read','504102arbnzX','8802800UMeJcd','appCode','type','notification','string','Found\x20','1uzWJPp','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','319574qePUye','4607226oNuOpu','4068776YBYNha','map','length','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','boolean','2443200eCdPHT','str','config-list','all','trim','flat','validation','35DUEWEs','bool','2748pKKVFv','849VloxvP'];a178_0x516e=function(){return _0x314b5b;};return a178_0x516e();}const a178_0x5b708f=a178_0x393b;(function(_0x566e01,_0x38e253){const _0x23383e=a178_0x393b,_0x5648c8=_0x566e01();while(!![]){try{const _0x139dda=-parseInt(_0x23383e(0x203))/0x1*(-parseInt(_0x23383e(0x205))/0x2)+-parseInt(_0x23383e(0x1fa))/0x3*(-parseInt(_0x23383e(0x1f9))/0x4)+parseInt(_0x23383e(0x1f0))/0x5+parseInt(_0x23383e(0x1fc))/0x6*(-parseInt(_0x23383e(0x1f7))/0x7)+-parseInt(_0x23383e(0x1eb))/0x8+-parseInt(_0x23383e(0x206))/0x9+parseInt(_0x23383e(0x1fd))/0xa;if(_0x139dda===_0x38e253)break;else _0x5648c8['push'](_0x5648c8['shift']());}catch(_0x5f29b3){_0x5648c8['push'](_0x5648c8['shift']());}}}(a178_0x516e,0x44fa4));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a178_0x393b(_0x27f72c,_0x282bc2){_0x27f72c=_0x27f72c-0x1eb;const _0x516e81=a178_0x516e();let _0x393b55=_0x516e81[_0x27f72c];return _0x393b55;}export const notificationConfigList={'service':a178_0x5b708f(0x200),'command':a178_0x5b708f(0x1f2),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a178_0x5b708f(0x1fb),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a178_0x5b708f(0x1ff),'type':a178_0x5b708f(0x201),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':a178_0x5b708f(0x1f3),'type':a178_0x5b708f(0x1ef),'default':![],'description':a178_0x5b708f(0x1ee)}],async 'validate'(_0x29262e){const _0x53112e=a178_0x5b708f;if(_0x29262e[_0x53112e(0x1f8)](_0x53112e(0x1f3))&&_0x29262e[_0x53112e(0x1f1)](_0x53112e(0x1ff))[_0x53112e(0x1f4)]())throw CliErrors[_0x53112e(0x1f6)](_0x53112e(0x204),'Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0x29262e['bool'](_0x53112e(0x1f3)))return;readNotificationChannelType(_0x29262e);},async 'execute'(_0x3f4666){const _0x1aa8b7=a178_0x5b708f;if(_0x3f4666['bool'](_0x1aa8b7(0x1f3))){const _0x33ddb6=await Promise[_0x1aa8b7(0x1f3)](NOTIFICATION_CHANNEL_TYPES[_0x1aa8b7(0x1ec)](_0x41ce07=>listNotificationChannelConfigs(_0x3f4666[_0x1aa8b7(0x1fe)],_0x41ce07))),_0x8eb712=_0x33ddb6[_0x1aa8b7(0x1f5)]()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3f4666[_0x1aa8b7(0x1fe)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x8eb712[_0x1aa8b7(0x1ed)],'configs':_0x8eb712},'message':_0x1aa8b7(0x202)+_0x8eb712[_0x1aa8b7(0x1ed)]+'\x20notification\x20config(s)\x20across\x20all\x20channel\x20types'};}const _0x32639a=readNotificationChannelType(_0x3f4666),_0x43fc64=await listNotificationChannelConfigs(_0x3f4666[_0x1aa8b7(0x1fe)],_0x32639a),_0x2a9d1f=_0x43fc64[_0x1aa8b7(0x1ec)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3f4666[_0x1aa8b7(0x1fe)],'channelType':_0x32639a,'count':_0x2a9d1f[_0x1aa8b7(0x1ed)],'configs':_0x2a9d1f},'message':_0x1aa8b7(0x202)+_0x2a9d1f['length']+'\x20'+_0x32639a+'\x20notification\x20config(s)'};}};
@@ -1 +1 @@
1
- const a179_0x583a3d=a179_0x3ee4;(function(_0x1c1b57,_0x4e1f05){const _0x426a54=a179_0x3ee4,_0x1b7577=_0x1c1b57();while(!![]){try{const _0x3ebea1=-parseInt(_0x426a54(0x17d))/0x1*(parseInt(_0x426a54(0x167))/0x2)+parseInt(_0x426a54(0x16f))/0x3+-parseInt(_0x426a54(0x16d))/0x4*(-parseInt(_0x426a54(0x16c))/0x5)+parseInt(_0x426a54(0x179))/0x6+-parseInt(_0x426a54(0x171))/0x7*(parseInt(_0x426a54(0x181))/0x8)+-parseInt(_0x426a54(0x15e))/0x9+-parseInt(_0x426a54(0x172))/0xa*(-parseInt(_0x426a54(0x17e))/0xb);if(_0x3ebea1===_0x4e1f05)break;else _0x1b7577['push'](_0x1b7577['shift']());}catch(_0x253416){_0x1b7577['push'](_0x1b7577['shift']());}}}(a179_0x303f,0x18b85));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0x487192){const _0x2aa760=a179_0x3ee4,_0x4ac6ab=readNotificationId(_0x487192),_0x4e534d=await readNotificationDocument(_0x487192,_0x2aa760(0x164)),_0x5b1983=await requireExactNotificationConfig(_0x487192[_0x2aa760(0x166)],_0x4ac6ab,'update');return{'id':_0x4ac6ab,'patch':_0x4e534d,'before':_0x5b1983,'payload':mergeUpdateInput(_0x5b1983,_0x4e534d),'planned':plannedUpdateProjection(_0x5b1983,_0x4e534d)};}export const notificationConfigUpdate={'service':a179_0x583a3d(0x17c),'command':a179_0x583a3d(0x15f),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a179_0x583a3d(0x170),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x5189f6){readNotificationId(_0x5189f6),assertSingleNotificationSource(_0x5189f6),requireNotificationExplicitYes(_0x5189f6);},async 'dryRun'(_0x48798f){const _0x470b17=a179_0x583a3d,_0x41a0d9=await prepareUpdate(_0x48798f),_0x11697f=notificationLookupCommand(_0x48798f[_0x470b17(0x166)],_0x41a0d9['before'][_0x470b17(0x178)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x41a0d9[_0x470b17(0x16a)]),'before':projectNotificationConfig(_0x41a0d9['before']),'after':_0x41a0d9[_0x470b17(0x175)],'dryRun':!![],'backend':{'method':_0x470b17(0x176),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x470b17(0x175),'lookupCommand':_0x11697f}},{'method':_0x470b17(0x176),'url':UPDATE_PATH});},async 'execute'(_0x167234){const _0x49c2d5=a179_0x583a3d;requireNotificationExplicitYes(_0x167234);const _0x29c097=await prepareUpdate(_0x167234),_0x21c0f4=notificationLookupCommand(_0x167234[_0x49c2d5(0x166)],_0x29c097[_0x49c2d5(0x16a)]['channelType']);let _0x5e4ba8=![];try{await updateNotificationChannelConfig(_0x29c097[_0x49c2d5(0x161)]);}catch(_0x49e6e8){if(!isPlatformTransportFailure(_0x49e6e8))throw safeApiFailure(_0x49c2d5(0x164),_0x49c2d5(0x160),_0x49c2d5(0x177)+_0x29c097['id']+_0x49c2d5(0x173)+_0x21c0f4+_0x49c2d5(0x165));_0x5e4ba8=!![];}let _0x416c46;try{const _0x8e0183=await getNotificationChannelConfig(_0x29c097['id'],_0x167234['appCode']);_0x416c46=normalizeExactNotificationConfig(_0x8e0183,_0x29c097['id'],_0x167234['appCode']);}catch{throw notificationError(_0x5e4ba8?_0x49c2d5(0x174):_0x49c2d5(0x180),_0x49c2d5(0x168)+_0x29c097['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x49c2d5(0x169)+_0x29c097['id']+'\x20via\x20'+_0x21c0f4+_0x49c2d5(0x16e));}const _0x54fcc1=requestedSafeFieldsMatch(_0x29c097['before'],_0x416c46,_0x29c097[_0x49c2d5(0x15d)]);if(!_0x54fcc1[_0x49c2d5(0x163)]||_0x5e4ba8&&!_0x54fcc1['provesChange'])throw notificationError(_0x5e4ba8?'notification_config_update_outcome_unknown':_0x49c2d5(0x16b),_0x49c2d5(0x168)+_0x29c097['id']+_0x49c2d5(0x17b),_0x49c2d5(0x169)+_0x29c097['id']+_0x49c2d5(0x162)+_0x21c0f4+';\x20do\x20not\x20resubmit\x20automatically.');const _0x3e90a5=_0x5e4ba8?[_0x49c2d5(0x17f)]:[];return{'ok':!![],'data':{'operation':_0x49c2d5(0x164),'selector':notificationSelector(_0x416c46),'before':projectNotificationConfig(_0x29c097[_0x49c2d5(0x16a)]),'after':projectNotificationConfig(_0x416c46),'dryRun':![],'backend':{'method':_0x49c2d5(0x176),'path':UPDATE_PATH},'warnings':_0x3e90a5,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x5e4ba8,'verifiedFields':_0x54fcc1['verifiedFields'],'lookupCommand':_0x21c0f4}},'message':_0x49c2d5(0x17a)+_0x416c46['id']};}};function a179_0x3ee4(_0x179796,_0x541d2a){_0x179796=_0x179796-0x15d;const _0x303f4f=a179_0x303f();let _0x3ee414=_0x303f4f[_0x179796];return _0x3ee414;}function a179_0x303f(){const _0x52a521=['44370oVtEpL','\x20with\x20','notification_config_update_outcome_unknown','planned','POST','Inspect\x20ID\x20','channelType','439992yccvdV','Updated\x20notification\x20config\x20','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','notification','7asqorb','814pmXmXc','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','notification_config_update_verification_unavailable','10040joyAjg','patch','1646046vOIZlj','config-update','mutation','payload','\x20via\x20','allMatch','update',';\x20no\x20automatic\x20retry\x20was\x20attempted.','appCode','31746dQEJsh','Notification\x20config\x20','Inspect\x20with\x20--id\x20','before','notification_config_update_verification_failed','100825weleDA','4xubKlR',';\x20do\x20not\x20resubmit\x20automatically.','93459aRjbuN','high-risk-write','322YXoJXS'];a179_0x303f=function(){return _0x52a521;};return a179_0x303f();}
1
+ const a179_0x40db9a=a179_0x5204;function a179_0x5204(_0x54fbbc,_0x314740){_0x54fbbc=_0x54fbbc-0x85;const _0x94ffee=a179_0x94ff();let _0x5204f1=_0x94ffee[_0x54fbbc];return _0x5204f1;}(function(_0x7897cb,_0x1fc11a){const _0x1bacf1=a179_0x5204,_0x57d550=_0x7897cb();while(!![]){try{const _0x7ef2dc=parseInt(_0x1bacf1(0x8e))/0x1*(-parseInt(_0x1bacf1(0x9c))/0x2)+parseInt(_0x1bacf1(0xa4))/0x3+-parseInt(_0x1bacf1(0x92))/0x4*(parseInt(_0x1bacf1(0x8b))/0x5)+-parseInt(_0x1bacf1(0xa9))/0x6+parseInt(_0x1bacf1(0x96))/0x7*(parseInt(_0x1bacf1(0xa2))/0x8)+-parseInt(_0x1bacf1(0x9d))/0x9*(parseInt(_0x1bacf1(0x97))/0xa)+-parseInt(_0x1bacf1(0xa6))/0xb*(-parseInt(_0x1bacf1(0x8c))/0xc);if(_0x7ef2dc===_0x1fc11a)break;else _0x57d550['push'](_0x57d550['shift']());}catch(_0x98f10){_0x57d550['push'](_0x57d550['shift']());}}}(a179_0x94ff,0x79972));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a179_0x40db9a(0x9b);async function prepareUpdate(_0x38c2e3){const _0x2ea40b=a179_0x40db9a,_0x13b676=readNotificationId(_0x38c2e3),_0x3ed932=await readNotificationDocument(_0x38c2e3,'update'),_0x2e5b39=await requireExactNotificationConfig(_0x38c2e3[_0x2ea40b(0xa5)],_0x13b676,_0x2ea40b(0x98));return{'id':_0x13b676,'patch':_0x3ed932,'before':_0x2e5b39,'payload':mergeUpdateInput(_0x2e5b39,_0x3ed932),'planned':plannedUpdateProjection(_0x2e5b39,_0x3ed932)};}export const notificationConfigUpdate={'service':a179_0x40db9a(0x94),'command':a179_0x40db9a(0xaa),'description':a179_0x40db9a(0x90),'risk':a179_0x40db9a(0xa8),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x393b1a){readNotificationId(_0x393b1a),assertSingleNotificationSource(_0x393b1a),requireNotificationExplicitYes(_0x393b1a);},async 'dryRun'(_0xea34b1){const _0x383137=a179_0x40db9a,_0x100c66=await prepareUpdate(_0xea34b1),_0x59b9f7=notificationLookupCommand(_0xea34b1[_0x383137(0xa5)],_0x100c66[_0x383137(0x87)][_0x383137(0xac)]);return asDryRunResult({'operation':_0x383137(0x98),'selector':notificationSelector(_0x100c66['before']),'before':projectNotificationConfig(_0x100c66[_0x383137(0x87)]),'after':_0x100c66[_0x383137(0xa7)],'dryRun':!![],'backend':{'method':_0x383137(0xa0),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x383137(0xa7),'lookupCommand':_0x59b9f7}},{'method':_0x383137(0xa0),'url':UPDATE_PATH});},async 'execute'(_0x451a6e){const _0x1d67d4=a179_0x40db9a;requireNotificationExplicitYes(_0x451a6e);const _0x2ce655=await prepareUpdate(_0x451a6e),_0x274759=notificationLookupCommand(_0x451a6e[_0x1d67d4(0xa5)],_0x2ce655[_0x1d67d4(0x87)]['channelType']);let _0x230963=![];try{await updateNotificationChannelConfig(_0x2ce655[_0x1d67d4(0x89)]);}catch(_0x4fddc7){if(!isPlatformTransportFailure(_0x4fddc7))throw safeApiFailure(_0x1d67d4(0x98),_0x1d67d4(0x9e),_0x1d67d4(0xa1)+_0x2ce655['id']+_0x1d67d4(0xab)+_0x274759+_0x1d67d4(0x8f));_0x230963=!![];}let _0x4ee8b3;try{const _0xe935fb=await getNotificationChannelConfig(_0x2ce655['id'],_0x451a6e[_0x1d67d4(0xa5)]);_0x4ee8b3=normalizeExactNotificationConfig(_0xe935fb,_0x2ce655['id'],_0x451a6e[_0x1d67d4(0xa5)]);}catch{throw notificationError(_0x230963?_0x1d67d4(0x93):'notification_config_update_verification_unavailable','Notification\x20config\x20'+_0x2ce655['id']+_0x1d67d4(0x86),_0x1d67d4(0x95)+_0x2ce655['id']+_0x1d67d4(0x88)+_0x274759+_0x1d67d4(0x99));}const _0x4cf534=requestedSafeFieldsMatch(_0x2ce655[_0x1d67d4(0x87)],_0x4ee8b3,_0x2ce655[_0x1d67d4(0x91)]);if(!_0x4cf534[_0x1d67d4(0x85)]||_0x230963&&!_0x4cf534['provesChange'])throw notificationError(_0x230963?_0x1d67d4(0x93):_0x1d67d4(0xa3),_0x1d67d4(0x8a)+_0x2ce655['id']+_0x1d67d4(0x8d),_0x1d67d4(0x95)+_0x2ce655['id']+_0x1d67d4(0x88)+_0x274759+_0x1d67d4(0x99));const _0x1e03eb=_0x230963?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x1d67d4(0x98),'selector':notificationSelector(_0x4ee8b3),'before':projectNotificationConfig(_0x2ce655['before']),'after':projectNotificationConfig(_0x4ee8b3),'dryRun':![],'backend':{'method':_0x1d67d4(0xa0),'path':UPDATE_PATH},'warnings':_0x1e03eb,'verification':{'status':_0x1d67d4(0x9a),'recoveredAfterUnknownResponse':_0x230963,'verifiedFields':_0x4cf534['verifiedFields'],'lookupCommand':_0x274759}},'message':_0x1d67d4(0x9f)+_0x4ee8b3['id']};}};function a179_0x94ff(){const _0x2fafff=['\x20via\x20','payload','Notification\x20config\x20','146415sPOWUF','131184uUtTtc','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','1cgndAb',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','patch','24ZOCOLf','notification_config_update_outcome_unknown','notification','Inspect\x20with\x20--id\x20','4429852TyccjS','317270FCQIXS','update',';\x20do\x20not\x20resubmit\x20automatically.','verified','/notification/channel-config/update','1493658NYjmPU','243khhZBm','mutation','Updated\x20notification\x20config\x20','POST','Inspect\x20ID\x20','8WYKVtH','notification_config_update_verification_failed','254232bNJHQg','appCode','2101gMBrst','planned','high-risk-write','3170412lgQYiH','config-update','\x20with\x20','channelType','allMatch','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','before'];a179_0x94ff=function(){return _0x2fafff;};return a179_0x94ff();}
@@ -1 +1 @@
1
- (function(_0x47883e,_0x366a46){const _0x44e6c6=a180_0x1181,_0x204468=_0x47883e();while(!![]){try{const _0x40d345=parseInt(_0x44e6c6(0x124))/0x1+parseInt(_0x44e6c6(0x122))/0x2+-parseInt(_0x44e6c6(0x127))/0x3+parseInt(_0x44e6c6(0x12a))/0x4*(-parseInt(_0x44e6c6(0x123))/0x5)+-parseInt(_0x44e6c6(0x125))/0x6*(parseInt(_0x44e6c6(0x12b))/0x7)+parseInt(_0x44e6c6(0x126))/0x8+parseInt(_0x44e6c6(0x129))/0x9*(parseInt(_0x44e6c6(0x128))/0xa);if(_0x40d345===_0x366a46)break;else _0x204468['push'](_0x204468['shift']());}catch(_0x598fbd){_0x204468['push'](_0x204468['shift']());}}}(a180_0x4eb7,0xf32d7));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a180_0x1181(_0x2e4634,_0x33f0f6){_0x2e4634=_0x2e4634-0x122;const _0x4eb755=a180_0x4eb7();let _0x118181=_0x4eb755[_0x2e4634];return _0x118181;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];function a180_0x4eb7(){const _0x7c2a83=['4159413LxFKUv','610uIWzLB','626283SgaKkT','28PNTVVm','189tgeUhM','289018oginvk','1176475UHQdMg','953935uehgHI','325356LIczxE','1203536DTHwfX'];a180_0x4eb7=function(){return _0x7c2a83;};return a180_0x4eb7();}
1
+ (function(_0x349402,_0x43e662){const _0x47815b=a180_0x8d08,_0x4ee278=_0x349402();while(!![]){try{const _0x10373f=-parseInt(_0x47815b(0x108))/0x1*(-parseInt(_0x47815b(0x103))/0x2)+-parseInt(_0x47815b(0x107))/0x3+-parseInt(_0x47815b(0xff))/0x4*(parseInt(_0x47815b(0x10a))/0x5)+parseInt(_0x47815b(0x102))/0x6*(parseInt(_0x47815b(0x109))/0x7)+parseInt(_0x47815b(0x100))/0x8*(-parseInt(_0x47815b(0x105))/0x9)+parseInt(_0x47815b(0x106))/0xa+-parseInt(_0x47815b(0x101))/0xb*(parseInt(_0x47815b(0x104))/0xc);if(_0x10373f===_0x43e662)break;else _0x4ee278['push'](_0x4ee278['shift']());}catch(_0x2d8a07){_0x4ee278['push'](_0x4ee278['shift']());}}}(a180_0x1f4a,0x7e9df));function a180_0x1f4a(){const _0x42b1a2=['65kilJTi','183364ddzavv','24phXXpK','66zhydGV','12QlFgKL','248ywzzaF','98160xfqJWH','427842qygifv','4537850FmJFCo','1784991WpHxjd','6803MTySAv','2113615UMrYGi'];a180_0x1f4a=function(){return _0x42b1a2;};return a180_0x1f4a();}function a180_0x8d08(_0xe9d8c,_0x589f8e){_0xe9d8c=_0xe9d8c-0xff;const _0x1f4ae6=a180_0x1f4a();let _0x8d08b5=_0x1f4ae6[_0xe9d8c];return _0x8d08b5;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];