@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.d.ts +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.d.ts +2 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/auth/auth-server-ui.js +1 -1
  8. package/lib/auth/auth-server.js +1 -1
  9. package/lib/auth/constant.js +1 -1
  10. package/lib/auth/get-cookie.js +1 -1
  11. package/lib/auth/get-session-user.js +1 -1
  12. package/lib/auth/is-session-valid.js +1 -1
  13. package/lib/auth/login-success-html.js +1 -1
  14. package/lib/auth/logout.js +1 -1
  15. package/lib/cli-flags.js +1 -1
  16. package/lib/cli.js +1 -1
  17. package/lib/commands/api/generate.js +1 -1
  18. package/lib/commands/api/index.js +1 -1
  19. package/lib/commands/api/list.js +1 -1
  20. package/lib/commands/api/pull.js +1 -1
  21. package/lib/commands/api/shared.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/members-list.js +1 -1
  25. package/lib/commands/app/remote-directory.js +1 -1
  26. package/lib/commands/app/shared.js +1 -1
  27. package/lib/commands/app-config/delete.js +1 -1
  28. package/lib/commands/app-config/get.js +1 -1
  29. package/lib/commands/app-config/index.js +1 -1
  30. package/lib/commands/app-config/list.js +1 -1
  31. package/lib/commands/app-config/set.js +1 -1
  32. package/lib/commands/app-config/shared.js +1 -1
  33. package/lib/commands/auth/index.js +1 -1
  34. package/lib/commands/bff/create.js +1 -1
  35. package/lib/commands/bff/delete.js +1 -1
  36. package/lib/commands/bff/detail.js +1 -1
  37. package/lib/commands/bff/index.js +1 -1
  38. package/lib/commands/bff/list.js +1 -1
  39. package/lib/commands/bff/pull.js +1 -1
  40. package/lib/commands/bff/push.js +1 -1
  41. package/lib/commands/bff/status.js +1 -1
  42. package/lib/commands/cli-skill/index.js +1 -1
  43. package/lib/commands/cli-update.js +1 -1
  44. package/lib/commands/codegen/index.js +1 -1
  45. package/lib/commands/codegen/sdk.js +1 -1
  46. package/lib/commands/codegen/sql.js +1 -1
  47. package/lib/commands/common/app-registry.js +1 -1
  48. package/lib/commands/common/app-selector.js +1 -1
  49. package/lib/commands/common/async-task.js +1 -1
  50. package/lib/commands/common/dry-run.js +1 -1
  51. package/lib/commands/common/flags.js +1 -1
  52. package/lib/commands/common/local-file.js +1 -1
  53. package/lib/commands/common/validate.js +1 -1
  54. package/lib/commands/config/delete.js +1 -1
  55. package/lib/commands/config/get.js +1 -1
  56. package/lib/commands/config/index.js +1 -1
  57. package/lib/commands/config/init.js +1 -1
  58. package/lib/commands/config/list.js +1 -1
  59. package/lib/commands/config/set.js +1 -1
  60. package/lib/commands/config/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/business-groups.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-restore.js +1 -1
  68. package/lib/commands/dataset/field-update.js +1 -1
  69. package/lib/commands/dataset/generate.js +1 -1
  70. package/lib/commands/dataset/index.js +1 -1
  71. package/lib/commands/dataset/list.js +1 -1
  72. package/lib/commands/dataset/operations.js +1 -1
  73. package/lib/commands/dataset/relation-audit.js +1 -1
  74. package/lib/commands/dataset/relation-create.js +1 -1
  75. package/lib/commands/dataset/relation-delete.js +1 -1
  76. package/lib/commands/dataset/relation-shared.js +1 -1
  77. package/lib/commands/dataset/relation-update.js +1 -1
  78. package/lib/commands/dataset/relations.js +1 -1
  79. package/lib/commands/dataset/rename.js +1 -1
  80. package/lib/commands/dataset/restore.js +1 -1
  81. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  82. package/lib/commands/db/analysis-batching.js +1 -1
  83. package/lib/commands/db/analyze-batch-plan.js +1 -1
  84. package/lib/commands/db/analyze-cancel.js +1 -1
  85. package/lib/commands/db/analyze-start.js +1 -1
  86. package/lib/commands/db/analyze-status.js +1 -1
  87. package/lib/commands/db/create.js +1 -1
  88. package/lib/commands/db/delete.js +1 -1
  89. package/lib/commands/db/detail.js +1 -1
  90. package/lib/commands/db/diff-refresh-start.js +1 -1
  91. package/lib/commands/db/diff-refresh-status.js +1 -1
  92. package/lib/commands/db/diff.js +1 -1
  93. package/lib/commands/db/index.js +1 -1
  94. package/lib/commands/db/list.js +1 -1
  95. package/lib/commands/db/shared.js +1 -1
  96. package/lib/commands/db/table-diff-shared.js +1 -1
  97. package/lib/commands/db/tables.js +1 -1
  98. package/lib/commands/db/test.js +1 -1
  99. package/lib/commands/db/update.js +1 -1
  100. package/lib/commands/deployment/index.js +1 -1
  101. package/lib/commands/deployment/sync-all.js +1 -1
  102. package/lib/commands/deployment/sync-jobs.js +1 -1
  103. package/lib/commands/deployment/sync-status.js +1 -1
  104. package/lib/commands/doctor.js +1 -1
  105. package/lib/commands/file/index.js +1 -1
  106. package/lib/commands/instant-api-policy/current.js +1 -1
  107. package/lib/commands/instant-api-policy/index.js +1 -1
  108. package/lib/commands/instant-api-policy/init.js +1 -1
  109. package/lib/commands/instant-api-policy/publish.js +1 -1
  110. package/lib/commands/instant-api-policy/pull.js +1 -1
  111. package/lib/commands/instant-api-policy/revision.js +1 -1
  112. package/lib/commands/instant-api-policy/revisions.js +1 -1
  113. package/lib/commands/instant-api-policy/rollback.js +1 -1
  114. package/lib/commands/instant-api-policy/shared.js +1 -1
  115. package/lib/commands/instant-api-policy/validate.js +1 -1
  116. package/lib/commands/issue/index.js +1 -1
  117. package/lib/commands/issue/nudge.js +1 -1
  118. package/lib/commands/issue/report.js +1 -1
  119. package/lib/commands/issue/shared.js +1 -1
  120. package/lib/commands/kb/create.js +1 -1
  121. package/lib/commands/kb/delete.js +1 -1
  122. package/lib/commands/kb/detail.js +1 -1
  123. package/lib/commands/kb/index.js +1 -1
  124. package/lib/commands/kb/list.js +1 -1
  125. package/lib/commands/kb/search.js +1 -1
  126. package/lib/commands/kb/shared.js +1 -1
  127. package/lib/commands/kb/update.js +1 -1
  128. package/lib/commands/logs/index.js +1 -1
  129. package/lib/commands/menu/asset-update.js +1 -1
  130. package/lib/commands/menu/delete.js +1 -1
  131. package/lib/commands/menu/external-link-create.js +1 -1
  132. package/lib/commands/menu/external-link-update.js +1 -1
  133. package/lib/commands/menu/group-create.js +1 -1
  134. package/lib/commands/menu/group-update.js +1 -1
  135. package/lib/commands/menu/index.js +1 -1
  136. package/lib/commands/menu/list.js +1 -1
  137. package/lib/commands/menu/move.js +1 -1
  138. package/lib/commands/menu/regroup-start.js +1 -1
  139. package/lib/commands/menu/rename.js +1 -1
  140. package/lib/commands/menu/shared/compare-table.js +1 -1
  141. package/lib/commands/menu/shared/delete-plan.js +1 -1
  142. package/lib/commands/menu/shared/facts.js +1 -1
  143. package/lib/commands/menu/shared/index.js +1 -1
  144. package/lib/commands/menu/shared/inquirer.js +1 -1
  145. package/lib/commands/menu/shared/local-pages.js +1 -1
  146. package/lib/commands/menu/shared/logic.js +1 -1
  147. package/lib/commands/menu/shared/mutations.js +1 -1
  148. package/lib/commands/menu/shared/service.js +1 -1
  149. package/lib/commands/menu/shared/sync-core.js +1 -1
  150. package/lib/commands/menu/shared/update-core.js +1 -1
  151. package/lib/commands/menu/shared/valid-url.js +1 -1
  152. package/lib/commands/menu/sync.js +1 -1
  153. package/lib/commands/menu/visibility-update.js +1 -1
  154. package/lib/commands/notification/config-create.js +1 -1
  155. package/lib/commands/notification/config-delete.js +1 -1
  156. package/lib/commands/notification/config-list.js +1 -1
  157. package/lib/commands/notification/config-update.js +1 -1
  158. package/lib/commands/notification/index.js +1 -1
  159. package/lib/commands/notification/shared.js +1 -1
  160. package/lib/commands/ocr/index.js +1 -1
  161. package/lib/commands/page/create.js +1 -1
  162. package/lib/commands/page/custom/detail.js +1 -1
  163. package/lib/commands/page/custom/list.js +1 -1
  164. package/lib/commands/page/custom/publish.js +1 -1
  165. package/lib/commands/page/custom/shared.js +1 -1
  166. package/lib/commands/page/custom/syntax.js +1 -1
  167. package/lib/commands/page/custom/update.js +1 -1
  168. package/lib/commands/page/data-list-status.js +1 -1
  169. package/lib/commands/page/generate-start.js +1 -1
  170. package/lib/commands/page/generate-status.js +1 -1
  171. package/lib/commands/page/index.js +1 -1
  172. package/lib/commands/page/pull.js +1 -1
  173. package/lib/commands/page/push.js +1 -1
  174. package/lib/commands/page/relation-audit.js +1 -1
  175. package/lib/commands/page/restore.js +1 -1
  176. package/lib/commands/page/shared.js +1 -1
  177. package/lib/commands/page/sync.js +1 -1
  178. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  179. package/lib/commands/project/create/format-elapsed.js +1 -1
  180. package/lib/commands/project/create/main.js +1 -1
  181. package/lib/commands/project/create/materialize-project-template.js +1 -1
  182. package/lib/commands/project/create/project-name.js +1 -1
  183. package/lib/commands/project/create/project-template-archive.js +1 -1
  184. package/lib/commands/project/create/project-template-path.js +1 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/domain-routing-sync.js +1 -1
  189. package/lib/commands/project/index.js +1 -1
  190. package/lib/commands/project/upgrade.js +1 -1
  191. package/lib/commands/registry.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/rule/get.js +1 -1
  202. package/lib/commands/rule/index.js +1 -1
  203. package/lib/commands/rule/list.js +1 -1
  204. package/lib/commands/rule/set.js +1 -1
  205. package/lib/commands/rule/shared.js +1 -1
  206. package/lib/commands/run/index.js +1 -1
  207. package/lib/commands/schema.js +1 -1
  208. package/lib/commands/sql/create.js +1 -1
  209. package/lib/commands/sql/delete.js +1 -1
  210. package/lib/commands/sql/detail.js +1 -1
  211. package/lib/commands/sql/exec.js +1 -1
  212. package/lib/commands/sql/index.js +1 -1
  213. package/lib/commands/sql/list.js +1 -1
  214. package/lib/commands/sql/pull.js +1 -1
  215. package/lib/commands/sql/push.js +1 -1
  216. package/lib/commands/sql/shared.js +1 -1
  217. package/lib/commands/sql/status.js +1 -1
  218. package/lib/commands/sql/validate.js +1 -1
  219. package/lib/commands/task/index.js +1 -1
  220. package/lib/commands/task/status.js +1 -1
  221. package/lib/commands/tenant/index.js +1 -1
  222. package/lib/commands/tenant/members-list.js +1 -1
  223. package/lib/commands/tenant/shared.js +1 -1
  224. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  225. package/lib/commands/user-account/index.js +1 -1
  226. package/lib/commands/workspace/add.js +1 -1
  227. package/lib/commands/workspace/index.js +1 -1
  228. package/lib/commands/workspace/remove.js +1 -1
  229. package/lib/config/domain-config.js +1 -1
  230. package/lib/config/project-domain-routing.js +1 -1
  231. package/lib/config/region-config.d.ts +23 -0
  232. package/lib/config/region-config.js +1 -0
  233. package/lib/config/schema.d.ts +15 -0
  234. package/lib/config/schema.js +1 -1
  235. package/lib/constant/cdn.js +1 -1
  236. package/lib/constant/cli.js +1 -1
  237. package/lib/constant/defaults.js +1 -1
  238. package/lib/constant/domain.js +1 -1
  239. package/lib/constant/env.js +1 -1
  240. package/lib/constant/output.js +1 -1
  241. package/lib/constant/paths.js +1 -1
  242. package/lib/constant/region.js +1 -1
  243. package/lib/constant/risk.js +1 -1
  244. package/lib/constant/routing-profile.js +1 -1
  245. package/lib/context/app-resolver.d.ts +6 -0
  246. package/lib/context/app-resolver.js +1 -1
  247. package/lib/context/auth-resolver.js +1 -1
  248. package/lib/context/config-loader.js +1 -1
  249. package/lib/context.d.ts +13 -0
  250. package/lib/context.js +1 -1
  251. package/lib/core/alias-resolver.js +1 -1
  252. package/lib/core/api-client.d.ts +2 -0
  253. package/lib/core/api-client.js +1 -1
  254. package/lib/core/bff/config.js +1 -1
  255. package/lib/core/bff/file-system.js +1 -1
  256. package/lib/core/bff/hash.js +1 -1
  257. package/lib/core/bff/lock.js +1 -1
  258. package/lib/core/bff/utils.js +1 -1
  259. package/lib/core/db-resolver.js +1 -1
  260. package/lib/core/instant-api-policy/config.js +1 -1
  261. package/lib/core/kb-search-client.js +1 -1
  262. package/lib/core/page/file-system.js +1 -1
  263. package/lib/core/page/hash.js +1 -1
  264. package/lib/core/page/lock.js +1 -1
  265. package/lib/core/page/lr-smart-jsx.d.ts +6 -0
  266. package/lib/core/page/lr-smart-jsx.js +1 -0
  267. package/lib/core/sql-index-auditor.js +1 -1
  268. package/lib/core/sql-sync/config.js +1 -1
  269. package/lib/core/sql-sync/file-system.js +1 -1
  270. package/lib/core/sql-sync/hash.js +1 -1
  271. package/lib/core/sql-sync/lock.js +1 -1
  272. package/lib/core/sql-sync/utils.js +1 -1
  273. package/lib/core/sql-validator.js +1 -1
  274. package/lib/errors.js +1 -1
  275. package/lib/framework/build-all-flags.js +1 -1
  276. package/lib/framework/error-output.js +1 -1
  277. package/lib/framework/explicit-yes.js +1 -1
  278. package/lib/framework/flags.js +1 -1
  279. package/lib/framework/help.js +1 -1
  280. package/lib/framework/index.js +1 -1
  281. package/lib/framework/output.js +1 -1
  282. package/lib/framework/response.js +1 -1
  283. package/lib/framework/runner-alias.js +1 -1
  284. package/lib/framework/runner.js +1 -1
  285. package/lib/framework/schema-export.js +1 -1
  286. package/lib/framework/supported-flags.js +1 -1
  287. package/lib/framework/types.js +1 -1
  288. package/lib/generated/build-info.d.ts +4 -4
  289. package/lib/generated/build-info.js +1 -1
  290. package/lib/generated/official-routing.js +1 -1
  291. package/lib/generated/routing-contract.js +1 -1
  292. package/lib/help.js +1 -1
  293. package/lib/postinstall.js +1 -1
  294. package/lib/runtime/confirmation.js +1 -1
  295. package/lib/runtime/event.js +1 -1
  296. package/lib/runtime/index.js +1 -1
  297. package/lib/runtime/queue.js +1 -1
  298. package/lib/runtime/resolve.js +1 -1
  299. package/lib/skills/builtin-skill.js +1 -1
  300. package/lib/skills/main.js +1 -1
  301. package/lib/skills/npx-skills-add.js +1 -1
  302. package/lib/skills/skill-presence.js +1 -1
  303. package/lib/telemetry/cli-command-trace.js +1 -1
  304. package/lib/telemetry/cli-help-trace.js +1 -1
  305. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  306. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  307. package/lib/telemetry/send-cli-trace-log.js +1 -1
  308. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  309. package/lib/types/index.d.ts +1 -1
  310. package/lib/utils/ai_config.js +1 -1
  311. package/lib/utils/apply-jq-filter.js +1 -1
  312. package/lib/utils/cdn-config.js +1 -1
  313. package/lib/utils/check-sdk-version.js +1 -1
  314. package/lib/utils/cli-version-check.js +1 -1
  315. package/lib/utils/cli-version-policy.js +1 -1
  316. package/lib/utils/config.d.ts +2 -8
  317. package/lib/utils/config.js +1 -1
  318. package/lib/utils/entity-with-id.js +1 -1
  319. package/lib/utils/file-utils.js +1 -1
  320. package/lib/utils/guides-cdn.js +1 -1
  321. package/lib/utils/http-client.js +1 -1
  322. package/lib/utils/is-non-interactive.js +1 -1
  323. package/lib/utils/logger.js +1 -1
  324. package/lib/utils/params.js +1 -1
  325. package/lib/utils/platform.js +1 -1
  326. package/lib/utils/sleep.js +1 -1
  327. package/lib/utils/template-replacer.d.ts +2 -1
  328. package/lib/utils/template-replacer.js +1 -1
  329. package/lib/utils/update-notice.js +1 -1
  330. package/lib/utils/version.js +1 -1
  331. package/lib/utils/with-active-cookie.js +1 -1
  332. package/lib/utils/write-cli-side-channel.js +1 -1
  333. package/package.json +1 -1
  334. package/skills/rabetbase/SKILL.md +6 -5
  335. package/skills/rabetbase/guides/page-development-workflow.md +3 -0
  336. package/skills/rabetbase/guides/sdk-client-generation.md +5 -5
  337. package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
  338. package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
  339. package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
  340. package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-bff-pull.md +2 -0
  342. package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
  343. package/skills/rabetbase/references/rabetbase-config.md +10 -9
  344. package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
  345. package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
  346. package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
  347. package/skills/rabetbase.manifest.json +3 -3
  348. package/templates/generate-api/client.ts.tpl +1 -1
@@ -1 +1 @@
1
- (function(_0xbf1f4f,_0x4c5b4c){const _0x52c743=a145_0x43db,_0x6db1de=_0xbf1f4f();while(!![]){try{const _0x26ae3a=-parseInt(_0x52c743(0x101))/0x1*(-parseInt(_0x52c743(0xff))/0x2)+parseInt(_0x52c743(0x100))/0x3+-parseInt(_0x52c743(0xf1))/0x4+parseInt(_0x52c743(0xf6))/0x5*(-parseInt(_0x52c743(0x112))/0x6)+parseInt(_0x52c743(0x10f))/0x7+-parseInt(_0x52c743(0x10d))/0x8+-parseInt(_0x52c743(0xf2))/0x9;if(_0x26ae3a===_0x4c5b4c)break;else _0x6db1de['push'](_0x6db1de['shift']());}catch(_0x33d41c){_0x6db1de['push'](_0x6db1de['shift']());}}}(a145_0x3f91,0xcdb90));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 a145_0x544804,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x203136,_0x89d458){const _0x4fcecc=a145_0x43db,_0xa2b658=getEnv();logger['info'](_0x4fcecc(0x107),isProduction(_0xa2b658)?_0x4fcecc(0xfa)+_0x203136+')':_0x4fcecc(0x10b)+_0x203136+')');const _0x54ad77=await fetchMenuSnapshot(_0x203136,_0x89d458,{'verbose':!![]});return logger['info'](_0x4fcecc(0x107),_0x4fcecc(0x113)+_0x54ad77[_0x4fcecc(0xf3)]+_0x4fcecc(0x10c)),_0x54ad77[_0x4fcecc(0x106)][_0x4fcecc(0x115)](toProcessedMenuItem);}export async function createMenu(_0x44b8a6,_0xbca3a3,_0x11fa27){const _0x2e7e45=a145_0x43db;logger[_0x2e7e45(0xf4)](_0x2e7e45(0x111),_0x2e7e45(0x109)+_0x11fa27['label']+'\x20('+_0x11fa27[_0x2e7e45(0xfb)]+')');const _0x54a6d2={'appCode':_0x44b8a6,'type':_0x2e7e45(0x104),'sort':0x0,'extend':{'loadScriptMode':_0x2e7e45(0xf8),'resources':_0x11fa27[_0x2e7e45(0x103)]?JSON[_0x2e7e45(0x114)](_0x11fa27[_0x2e7e45(0x103)]):undefined},..._0x11fa27},_0x1b2078=await createMenuRecord(_0x54a6d2,_0xbca3a3,_0x2e7e45(0xef)+_0x11fa27[_0x2e7e45(0x105)]+'\x22');return logger[_0x2e7e45(0xf4)](_0x2e7e45(0x111),_0x2e7e45(0x108)+_0x11fa27[_0x2e7e45(0x105)]),_0x1b2078;}async function createSingleMenu(_0x2f5f54,_0x3fb37a,_0x6ea4f3,_0x313946){const _0x59f5d9=a145_0x43db,_0x28f93b={'appCode':_0x2f5f54,'type':_0x59f5d9(0x104),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x313946?JSON[_0x59f5d9(0x114)](_0x313946):undefined},'label':_0x6ea4f3[_0x59f5d9(0x105)],'path':_0x6ea4f3[_0x59f5d9(0xfb)]},_0x291ac8=await createMenuRecord(_0x28f93b,_0x3fb37a,_0x59f5d9(0xef)+_0x6ea4f3['label']+'\x22');return logger['info'](_0x59f5d9(0x111),_0x59f5d9(0x108)+_0x6ea4f3['label']),_0x291ac8;}export async function createMenus(_0x359147,_0x491e70,_0x488d91,_0x241ee3){const _0x46c6e3=a145_0x43db;logger[_0x46c6e3(0xf4)](_0x46c6e3(0xf5),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x488d91[_0x46c6e3(0xfe)]);const _0x3bf108=await Promise['all'](_0x488d91['map'](_0x5d95b7=>createSingleMenu(_0x359147,_0x491e70,_0x5d95b7,_0x241ee3)));return logger[_0x46c6e3(0xf4)](_0x46c6e3(0xf5),_0x46c6e3(0x102)+_0x488d91[_0x46c6e3(0xfe)]),_0x3bf108;}export async function updateMenuCdnUrl(_0x58a05c,_0x6a7930,_0x4d0082){const _0x7aa96f=a145_0x43db;logger[_0x7aa96f(0xf4)]('update-menu-cdn-url',_0x7aa96f(0xf7)+_0x4d0082[_0x7aa96f(0x105)]+'\x20('+_0x4d0082[_0x7aa96f(0xfb)]+')');const _0x2cfae6={'id':_0x4d0082['id'],'appCode':_0x58a05c,'extend':{..._0x4d0082[_0x7aa96f(0xee)]??{},..._0x4d0082[_0x7aa96f(0xf9)]?{'loadScriptMode':_0x4d0082['loadScriptMode']}:{},'resources':_0x4d0082[_0x7aa96f(0x103)]?JSON[_0x7aa96f(0x114)](_0x4d0082[_0x7aa96f(0x103)]):undefined}},_0x478e36=await updateMenuRecord(_0x2cfae6,_0x6a7930,_0x7aa96f(0xfd)+_0x4d0082['label']+'\x22');return logger[_0x7aa96f(0xf4)](_0x7aa96f(0x10a),_0x7aa96f(0xf0)+_0x4d0082[_0x7aa96f(0x105)],undefined),_0x478e36;}export async function createMenuEntity(_0x58a41c,_0x5c79fb,_0x4c5edd){const _0x65615c=a145_0x43db;return createMenuRecord({'appCode':_0x58a41c,..._0x4c5edd},_0x5c79fb,_0x65615c(0xef)+_0x4c5edd['label']+'\x22');}function a145_0x3f91(){const _0xf830c5=['create-menu','762UCcCvC','Fetched\x20','stringify','map','extend','Create\x20menu\x20\x22','Menu\x20assets\x20synced:\x20','4144016lRVApP','8588160nnAbZi','total','info','create-menus','1235PSprSx','Updating\x20menu\x20asset\x20links:\x20','import','loadScriptMode','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','path','Regroup\x20','Update\x20menu\x20assets\x20\x22','length','296966LdbWXD','3034815vdPdFo','7LbvppE','Batch\x20menu\x20creation\x20completed,\x20total\x20','resources','procode','label','menus','get-online-menu-list','Menu\x20created\x20successfully:\x20','Creating\x20menu:\x20','update-menu-cdn-url','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','\x20online\x20menus\x20successfully','3145576eUEAJp','Delete\x20','8445248cOwrGw','\x20menu'];a145_0x3f91=function(){return _0xf830c5;};return a145_0x3f91();}export async function updateMenuEntity(_0x8b8956,_0x533235,_0x567946){return updateMenuRecord({'appCode':_0x8b8956,..._0x567946},_0x533235,'Update\x20menu\x20'+_0x567946['id']);}function a145_0x43db(_0x1bb06,_0x1b108a){_0x1bb06=_0x1bb06-0xee;const _0x3f912e=a145_0x3f91();let _0x43db4a=_0x3f912e[_0x1bb06];return _0x43db4a;}export async function batchDeleteMenuEntities(_0x1ceb0b,_0x5853e8){const _0xd8fce9=a145_0x43db;return batchDeleteMenuRecords(_0x5853e8,_0x1ceb0b,_0xd8fce9(0x10e)+_0x5853e8['length']+_0xd8fce9(0x110)+(_0x5853e8['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x31776d,_0x39f61b){const _0x1f73c4=a145_0x43db;return a145_0x544804(_0x39f61b,_0x31776d,_0x1f73c4(0xfc)+_0x39f61b['menuGroups'][_0x1f73c4(0xfe)]+'\x20menu\x20group(s)');}
1
+ (function(_0x500ef2,_0x22e705){const _0x2a28a7=a145_0x4ca5,_0x9d0271=_0x500ef2();while(!![]){try{const _0x4c8335=-parseInt(_0x2a28a7(0x161))/0x1+parseInt(_0x2a28a7(0x15d))/0x2+parseInt(_0x2a28a7(0x13f))/0x3*(-parseInt(_0x2a28a7(0x141))/0x4)+-parseInt(_0x2a28a7(0x14f))/0x5+parseInt(_0x2a28a7(0x15b))/0x6+parseInt(_0x2a28a7(0x142))/0x7*(parseInt(_0x2a28a7(0x15a))/0x8)+parseInt(_0x2a28a7(0x163))/0x9;if(_0x4c8335===_0x22e705)break;else _0x9d0271['push'](_0x9d0271['shift']());}catch(_0xbe088b){_0x9d0271['push'](_0x9d0271['shift']());}}}(a145_0x28f0,0x6cf3f));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 a145_0x1c06bc,updateMenuRecord}from'../../../core/api-client.js';function a145_0x28f0(){const _0x2f90a1=['extend','Update\x20menu\x20','Menu\x20created\x20successfully:\x20','Fetched\x20','55200ZojhvI','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','total','create-menus','menuGroups','path','Delete\x20','import','update-menu-cdn-url','Regroup\x20','Create\x20menu\x20\x22','16wakAnh','2214522Wfhiei','menus','566082iupBUI','info','Creating\x20menu:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','535341dLUtjB','Menu\x20assets\x20synced:\x20','617733nSsaKB','resources','map','label','all','Updating\x20menu\x20asset\x20links:\x20','3RtHUZU','create-menu','1602364aHqwfD','2353673qSgfra','\x20menu\x20group(s)','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','\x20online\x20menus\x20successfully','get-online-menu-list','procode','stringify','\x20menu','length'];a145_0x28f0=function(){return _0x2f90a1;};return a145_0x28f0();}export async function getOnlineMenuList(_0x5e3edf,_0x561df4){const _0x551bc9=a145_0x4ca5,_0x1ef929=getEnv();logger[_0x551bc9(0x15e)]('get-online-menu-list',isProduction(_0x1ef929)?_0x551bc9(0x150)+_0x5e3edf+')':_0x551bc9(0x144)+_0x5e3edf+')');const _0x24cbab=await fetchMenuSnapshot(_0x5e3edf,_0x561df4,{'verbose':!![]});return logger[_0x551bc9(0x15e)](_0x551bc9(0x146),_0x551bc9(0x14e)+_0x24cbab[_0x551bc9(0x151)]+_0x551bc9(0x145)),_0x24cbab[_0x551bc9(0x15c)][_0x551bc9(0x165)](toProcessedMenuItem);}export async function createMenu(_0xf9b452,_0x27eb53,_0x227ae1){const _0x349bbb=a145_0x4ca5;logger[_0x349bbb(0x15e)](_0x349bbb(0x140),_0x349bbb(0x15f)+_0x227ae1[_0x349bbb(0x13c)]+'\x20('+_0x227ae1[_0x349bbb(0x154)]+')');const _0x183ed4={'appCode':_0xf9b452,'type':_0x349bbb(0x147),'sort':0x0,'extend':{'loadScriptMode':_0x349bbb(0x156),'resources':_0x227ae1['resources']?JSON[_0x349bbb(0x148)](_0x227ae1['resources']):undefined},..._0x227ae1},_0x5c0568=await createMenuRecord(_0x183ed4,_0x27eb53,'Create\x20menu\x20\x22'+_0x227ae1[_0x349bbb(0x13c)]+'\x22');return logger[_0x349bbb(0x15e)]('create-menu','Menu\x20created\x20successfully:\x20'+_0x227ae1[_0x349bbb(0x13c)]),_0x5c0568;}async function createSingleMenu(_0x5a9402,_0x54a3d1,_0x341f40,_0x28e4d1){const _0x282db4=a145_0x4ca5,_0x333101={'appCode':_0x5a9402,'type':_0x282db4(0x147),'sort':0x0,'extend':{'loadScriptMode':_0x282db4(0x156),'resources':_0x28e4d1?JSON[_0x282db4(0x148)](_0x28e4d1):undefined},'label':_0x341f40[_0x282db4(0x13c)],'path':_0x341f40[_0x282db4(0x154)]},_0x5e2453=await createMenuRecord(_0x333101,_0x54a3d1,_0x282db4(0x159)+_0x341f40[_0x282db4(0x13c)]+'\x22');return logger[_0x282db4(0x15e)](_0x282db4(0x140),_0x282db4(0x14d)+_0x341f40[_0x282db4(0x13c)]),_0x5e2453;}export async function createMenus(_0x591c06,_0xc2bab9,_0xc5ee9f,_0x1f6c98){const _0x4937b2=a145_0x4ca5;logger[_0x4937b2(0x15e)](_0x4937b2(0x152),_0x4937b2(0x160)+_0xc5ee9f[_0x4937b2(0x14a)]);const _0x132034=await Promise[_0x4937b2(0x13d)](_0xc5ee9f[_0x4937b2(0x165)](_0x401559=>createSingleMenu(_0x591c06,_0xc2bab9,_0x401559,_0x1f6c98)));return logger['info']('create-menus','Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0xc5ee9f[_0x4937b2(0x14a)]),_0x132034;}export async function updateMenuCdnUrl(_0x5f037a,_0x21714f,_0x2cde15){const _0x3f745=a145_0x4ca5;logger[_0x3f745(0x15e)]('update-menu-cdn-url',_0x3f745(0x13e)+_0x2cde15[_0x3f745(0x13c)]+'\x20('+_0x2cde15[_0x3f745(0x154)]+')');const _0x2f5c6e={'id':_0x2cde15['id'],'appCode':_0x5f037a,'extend':{..._0x2cde15[_0x3f745(0x14b)]??{},..._0x2cde15['loadScriptMode']?{'loadScriptMode':_0x2cde15['loadScriptMode']}:{},'resources':_0x2cde15[_0x3f745(0x164)]?JSON['stringify'](_0x2cde15[_0x3f745(0x164)]):undefined}},_0x11e6b2=await updateMenuRecord(_0x2f5c6e,_0x21714f,'Update\x20menu\x20assets\x20\x22'+_0x2cde15[_0x3f745(0x13c)]+'\x22');return logger[_0x3f745(0x15e)](_0x3f745(0x157),_0x3f745(0x162)+_0x2cde15['label'],undefined),_0x11e6b2;}export async function createMenuEntity(_0x5cccfd,_0x4bc594,_0x509937){const _0x2817be=a145_0x4ca5;return createMenuRecord({'appCode':_0x5cccfd,..._0x509937},_0x4bc594,_0x2817be(0x159)+_0x509937[_0x2817be(0x13c)]+'\x22');}function a145_0x4ca5(_0x256b1f,_0x399e6b){_0x256b1f=_0x256b1f-0x13c;const _0x28f081=a145_0x28f0();let _0x4ca521=_0x28f081[_0x256b1f];return _0x4ca521;}export async function updateMenuEntity(_0x3f363a,_0x255b34,_0xc2e040){const _0x7a1a8e=a145_0x4ca5;return updateMenuRecord({'appCode':_0x3f363a,..._0xc2e040},_0x255b34,_0x7a1a8e(0x14c)+_0xc2e040['id']);}export async function batchDeleteMenuEntities(_0x161ef2,_0x2d8526){const _0x3bc685=a145_0x4ca5;return batchDeleteMenuRecords(_0x2d8526,_0x161ef2,_0x3bc685(0x155)+_0x2d8526[_0x3bc685(0x14a)]+_0x3bc685(0x149)+(_0x2d8526['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x3ab32a,_0x2b9f0c){const _0x1c1de6=a145_0x4ca5;return a145_0x1c06bc(_0x2b9f0c,_0x3ab32a,_0x1c1de6(0x158)+_0x2b9f0c[_0x1c1de6(0x153)]['length']+_0x1c1de6(0x143));}
@@ -1 +1 @@
1
- function a146_0x3bb7(){const _0x4278c3=['116uNznLD','No\x20local\x20pages\x20matched\x20paths:\x20','2250117RrnsWR','map','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','CSS\x20URL\x20is\x20unreachable:\x20','filter','import','516344ArxGFO','length','2585808nRWZjn','dryRun','Start\x20non-interactive\x20menu\x20sync','JS\x20URL\x20is\x20unreachable:\x20','has','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','path','parse',':\x20expected\x20a\x20non-empty\x20string.','759390YrEIwd','join','Invalid\x20--params.','cssUrl','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','hasOwn','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','procode','--params.','pages','2217GzeTxH','isArray','info','push','Invalid\x20--params\x20fields:\x20','message','trim','object','10TrNjlf','cwd','87661XNdDsz','Invalid\x20--params:\x20','jsUrl','597562IqnmwB','string'];a146_0x3bb7=function(){return _0x4278c3;};return a146_0x3bb7();}const a146_0x3052b0=a146_0x4c03;(function(_0x2fb214,_0x1aedce){const _0x38f59f=a146_0x4c03,_0x4b54ee=_0x2fb214();while(!![]){try{const _0x547fb7=parseInt(_0x38f59f(0xc5))/0x1*(-parseInt(_0x38f59f(0xc3))/0x2)+parseInt(_0x38f59f(0xbb))/0x3*(-parseInt(_0x38f59f(0xca))/0x4)+parseInt(_0x38f59f(0xb1))/0x5+parseInt(_0x38f59f(0xd4))/0x6+-parseInt(_0x38f59f(0xc8))/0x7+-parseInt(_0x38f59f(0xd2))/0x8+parseInt(_0x38f59f(0xcc))/0x9;if(_0x547fb7===_0x1aedce)break;else _0x4b54ee['push'](_0x4b54ee['shift']());}catch(_0x56405e){_0x4b54ee['push'](_0x4b54ee['shift']());}}}(a146_0x3bb7,0x367ee));function a146_0x4c03(_0x317389,_0x385eee){_0x317389=_0x317389-0xaa;const _0x3bb78f=a146_0x3bb7();let _0x4c032e=_0x3bb78f[_0x317389];return _0x4c032e;}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([a146_0x3052b0(0xc7),a146_0x3052b0(0xb4)]);function validateParams(_0x1fe99b){const _0x5799a3=a146_0x3052b0,_0xd9cb68=[];return _0x1fe99b['jsUrl']&&!isValidJsHttpsUrl(_0x1fe99b[_0x5799a3(0xc7)])&&_0xd9cb68['push']({'field':_0x5799a3(0xc7),'message':_0x5799a3(0xb5)}),_0x1fe99b[_0x5799a3(0xb4)]&&!isValidCssHttpsUrl(_0x1fe99b[_0x5799a3(0xb4)])&&_0xd9cb68['push']({'field':_0x5799a3(0xb4),'message':_0x5799a3(0xce)}),_0xd9cb68;}export async function runMenuSyncCore(_0x37e5f8,_0x29378d,_0x4ad5e8=[],_0x52f449,_0x3bbcd8={}){const _0x54475f=a146_0x3052b0,_0x2a509c=parseMenuSyncParams(_0x52f449),_0x3e53a5=[...new Set(_0x4ad5e8['map'](_0x127bb0=>_0x127bb0[_0x54475f(0xc1)]())[_0x54475f(0xd0)](Boolean))],_0x396c8d=_0x2a509c['jsUrl'],_0x57d508=_0x2a509c['cssUrl'],_0x3d96af=[];if(_0x396c8d)_0x3d96af['push'](_0x396c8d);if(_0x57d508)_0x3d96af[_0x54475f(0xbe)](_0x57d508);const _0x21079e=validateParams(_0x2a509c);if(_0x21079e[_0x54475f(0xd3)]>0x0){const _0x3baa5d=_0x21079e[_0x54475f(0xcd)](_0x12d332=>_0x54475f(0xb9)+_0x12d332['field']+':\x20'+_0x12d332[_0x54475f(0xc0)])[_0x54475f(0xb2)](';\x20');throw new Error(_0x54475f(0xc6)+_0x3baa5d);}logger['setLogPath'](process[_0x54475f(0xc4)]()),logger[_0x54475f(0xbd)]('menu-sync',_0x54475f(0xaa),{'appCode':_0x37e5f8,'selectedCount':_0x3e53a5[_0x54475f(0xd3)],'jsUrl':_0x396c8d,'cssUrl':_0x57d508});if(_0x396c8d){const _0x131d3c=await isUrlReachable(_0x396c8d);if(!_0x131d3c)throw new Error(_0x54475f(0xab)+_0x396c8d);}if(_0x57d508){const _0x5df0bb=await isUrlReachable(_0x57d508);if(!_0x5df0bb)throw new Error(_0x54475f(0xcf)+_0x57d508);}const _0x46aa24=getLocalPages();if(_0x46aa24[_0x54475f(0xd3)]===0x0){if(_0x3e53a5[_0x54475f(0xd3)]>0x0)throw new Error(_0x54475f(0xcb)+_0x3e53a5[_0x54475f(0xb2)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x3bbcd8['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x33f5a2=await getOnlineMenuList(_0x37e5f8,_0x29378d),_0x2277bb=new Set(_0x33f5a2[_0x54475f(0xcd)](_0x46bab5=>_0x46bab5[_0x54475f(0xae)]));let _0x264a44;if(_0x3e53a5[_0x54475f(0xd3)]>0x0){const _0x39a596=new Map(_0x46aa24['map'](_0x40ca7f=>[_0x40ca7f['path'],_0x40ca7f])),_0x25ea58=_0x3e53a5['filter'](_0x23ad4f=>!_0x39a596[_0x54475f(0xac)](_0x23ad4f));if(_0x25ea58[_0x54475f(0xd3)]>0x0){const _0x155977=_0x46aa24[_0x54475f(0xcd)](_0x1b88c3=>_0x1b88c3[_0x54475f(0xae)])['join'](',\x20');throw new Error(_0x54475f(0xcb)+_0x25ea58[_0x54475f(0xb2)](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x155977);}const _0x1f0ab2=_0x3e53a5[_0x54475f(0xd0)](_0x7e217=>_0x2277bb['has'](_0x7e217));if(_0x1f0ab2[_0x54475f(0xd3)]>0x0)throw new Error(_0x54475f(0xb7)+_0x1f0ab2[_0x54475f(0xb2)](',\x20'));_0x264a44=_0x3e53a5[_0x54475f(0xcd)](_0x2f0808=>_0x39a596['get'](_0x2f0808));}else _0x264a44=_0x46aa24[_0x54475f(0xd0)](_0x4314a8=>!_0x2277bb['has'](_0x4314a8[_0x54475f(0xae)]));if(_0x264a44[_0x54475f(0xd3)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x3bbcd8[_0x54475f(0xd5)]===!![],'targetPages':[],'plannedMenus':[]};const _0x2db3f1=_0x264a44[_0x54475f(0xcd)](_0x349a70=>({'type':_0x54475f(0xb8),'path':_0x349a70[_0x54475f(0xae)],'label':_0x349a70['label'],'loadScriptMode':_0x54475f(0xd1),'resources':[..._0x3d96af]}));if(_0x3bbcd8[_0x54475f(0xd5)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x264a44,'plannedMenus':_0x2db3f1};const _0x4f9848=await createMenus(_0x37e5f8,_0x29378d,_0x264a44,_0x3d96af[_0x54475f(0xd3)]>0x0?_0x3d96af:undefined);return logger[_0x54475f(0xbd)]('menu-sync','Menu\x20sync\x20completed',{'count':_0x264a44['length'],'resources':_0x3d96af}),{'created':_0x4f9848[_0x54475f(0xd3)],'skipped':![],'dryRun':![],'targetPages':_0x264a44,'plannedMenus':_0x2db3f1,'menus':_0x4f9848};}export function parseMenuSyncParams(_0x88cd52){const _0x529645=a146_0x3052b0;if(!_0x88cd52||typeof _0x88cd52!==_0x529645(0xc9))return{};let _0xab9e32;try{_0xab9e32=JSON[_0x529645(0xaf)](_0x88cd52);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0xab9e32!==_0x529645(0xc2)||_0xab9e32===null||Array[_0x529645(0xbc)](_0xab9e32))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x1602c8=_0xab9e32;if(Object[_0x529645(0xb6)](_0x1602c8,_0x529645(0xba)))throw new Error(_0x529645(0xad));const _0x491c1f=Object['keys'](_0x1602c8)[_0x529645(0xd0)](_0x5a0c65=>!MENU_SYNC_PARAM_KEYS[_0x529645(0xac)](_0x5a0c65));if(_0x491c1f[_0x529645(0xd3)]>0x0)throw new Error(_0x529645(0xbf)+_0x491c1f['join'](',\x20')+'.');for(const _0x526be6 of MENU_SYNC_PARAM_KEYS){const _0x31f02f=_0x1602c8[_0x526be6];if(_0x31f02f!==undefined&&(typeof _0x31f02f!=='string'||_0x31f02f[_0x529645(0xc1)]()===''))throw new Error(_0x529645(0xb3)+_0x526be6+_0x529645(0xb0));}return{'jsUrl':typeof _0x1602c8[_0x529645(0xc7)]===_0x529645(0xc9)?_0x1602c8[_0x529645(0xc7)][_0x529645(0xc1)]():undefined,'cssUrl':typeof _0x1602c8[_0x529645(0xb4)]==='string'?_0x1602c8[_0x529645(0xb4)][_0x529645(0xc1)]():undefined};}
1
+ const a146_0x367fe8=a146_0x3e57;function a146_0x3e57(_0x3e0ba1,_0x3ce28e){_0x3e0ba1=_0x3e0ba1-0x13b;const _0x2e7b28=a146_0x2e7b();let _0x3e5711=_0x2e7b28[_0x3e0ba1];return _0x3e5711;}(function(_0x3932dd,_0x152572){const _0x34a441=a146_0x3e57,_0x32ca28=_0x3932dd();while(!![]){try{const _0x3b2350=-parseInt(_0x34a441(0x157))/0x1+parseInt(_0x34a441(0x14e))/0x2+-parseInt(_0x34a441(0x15f))/0x3*(-parseInt(_0x34a441(0x164))/0x4)+parseInt(_0x34a441(0x14b))/0x5+parseInt(_0x34a441(0x148))/0x6*(-parseInt(_0x34a441(0x146))/0x7)+-parseInt(_0x34a441(0x15c))/0x8+parseInt(_0x34a441(0x15d))/0x9*(-parseInt(_0x34a441(0x150))/0xa);if(_0x3b2350===_0x152572)break;else _0x32ca28['push'](_0x32ca28['shift']());}catch(_0x10b0ae){_0x32ca28['push'](_0x32ca28['shift']());}}}(a146_0x2e7b,0x445c0));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([a146_0x367fe8(0x163),'cssUrl']);function a146_0x2e7b(){const _0x5f1e32=['setLogPath','cwd',':\x20expected\x20a\x20non-empty\x20string.','map','import','Start\x20non-interactive\x20menu\x20sync','71940QhbczP','length','pages','has','filter','3028008BhGsJf','9OOjKAv','Invalid\x20--params\x20JSON.','18pyxXMB','hasOwn','push','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','jsUrl','24716SDByPq','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','\x0a\x20\x20Available\x20local\x20paths:\x20','--params.','label','dryRun','keys','message','isArray','get','procode','path','object','string','443289LLJviW','trim','24jwmwyI','No\x20local\x20pages\x20matched\x20paths:\x20','cssUrl','2707490WPwjQK','Invalid\x20--params\x20fields:\x20','join','1042904YYFvtK','info','1162750MmTbxa'];a146_0x2e7b=function(){return _0x5f1e32;};return a146_0x2e7b();}function validateParams(_0x2a4a94){const _0x160af7=a146_0x367fe8,_0x576292=[];return _0x2a4a94[_0x160af7(0x163)]&&!isValidJsHttpsUrl(_0x2a4a94['jsUrl'])&&_0x576292[_0x160af7(0x161)]({'field':_0x160af7(0x163),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x2a4a94[_0x160af7(0x14a)]&&!isValidCssHttpsUrl(_0x2a4a94[_0x160af7(0x14a)])&&_0x576292['push']({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x576292;}export async function runMenuSyncCore(_0x424d67,_0x3d3809,_0x53c94d=[],_0x29b56c,_0x449173={}){const _0x3719d5=a146_0x367fe8,_0x241232=parseMenuSyncParams(_0x29b56c),_0x5c5aec=[...new Set(_0x53c94d['map'](_0x4a1ffd=>_0x4a1ffd[_0x3719d5(0x147)]())['filter'](Boolean))],_0x976ed2=_0x241232[_0x3719d5(0x163)],_0x31285a=_0x241232['cssUrl'],_0x49a8e2=[];if(_0x976ed2)_0x49a8e2[_0x3719d5(0x161)](_0x976ed2);if(_0x31285a)_0x49a8e2[_0x3719d5(0x161)](_0x31285a);const _0x5ad31f=validateParams(_0x241232);if(_0x5ad31f['length']>0x0){const _0xe0b7e3=_0x5ad31f['map'](_0x584494=>_0x3719d5(0x13b)+_0x584494['field']+':\x20'+_0x584494[_0x3719d5(0x13f)])[_0x3719d5(0x14d)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0xe0b7e3);}logger[_0x3719d5(0x151)](process[_0x3719d5(0x152)]()),logger[_0x3719d5(0x14f)]('menu-sync',_0x3719d5(0x156),{'appCode':_0x424d67,'selectedCount':_0x5c5aec[_0x3719d5(0x158)],'jsUrl':_0x976ed2,'cssUrl':_0x31285a});if(_0x976ed2){const _0x1de57e=await isUrlReachable(_0x976ed2);if(!_0x1de57e)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x976ed2);}if(_0x31285a){const _0x10aeb2=await isUrlReachable(_0x31285a);if(!_0x10aeb2)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x31285a);}const _0x5e0d2c=getLocalPages();if(_0x5e0d2c[_0x3719d5(0x158)]===0x0){if(_0x5c5aec[_0x3719d5(0x158)]>0x0)throw new Error(_0x3719d5(0x149)+_0x5c5aec[_0x3719d5(0x14d)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x449173[_0x3719d5(0x13d)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x3f7d41=await getOnlineMenuList(_0x424d67,_0x3d3809),_0x4f2e40=new Set(_0x3f7d41[_0x3719d5(0x154)](_0x3f01da=>_0x3f01da[_0x3719d5(0x143)]));let _0x1bf1df;if(_0x5c5aec[_0x3719d5(0x158)]>0x0){const _0x4392fa=new Map(_0x5e0d2c[_0x3719d5(0x154)](_0x34af5b=>[_0x34af5b['path'],_0x34af5b])),_0x47b2f4=_0x5c5aec['filter'](_0x51dad0=>!_0x4392fa[_0x3719d5(0x15a)](_0x51dad0));if(_0x47b2f4[_0x3719d5(0x158)]>0x0){const _0x237374=_0x5e0d2c[_0x3719d5(0x154)](_0x1e1d6b=>_0x1e1d6b[_0x3719d5(0x143)])[_0x3719d5(0x14d)](',\x20');throw new Error(_0x3719d5(0x149)+_0x47b2f4[_0x3719d5(0x14d)](',\x20')+_0x3719d5(0x166)+_0x237374);}const _0x11eadc=_0x5c5aec[_0x3719d5(0x15b)](_0x7d96b1=>_0x4f2e40[_0x3719d5(0x15a)](_0x7d96b1));if(_0x11eadc[_0x3719d5(0x158)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x11eadc[_0x3719d5(0x14d)](',\x20'));_0x1bf1df=_0x5c5aec['map'](_0x37122d=>_0x4392fa[_0x3719d5(0x141)](_0x37122d));}else _0x1bf1df=_0x5e0d2c[_0x3719d5(0x15b)](_0x19cd04=>!_0x4f2e40[_0x3719d5(0x15a)](_0x19cd04[_0x3719d5(0x143)]));if(_0x1bf1df[_0x3719d5(0x158)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x449173[_0x3719d5(0x13d)]===!![],'targetPages':[],'plannedMenus':[]};const _0x58314d=_0x1bf1df[_0x3719d5(0x154)](_0x4f6651=>({'type':_0x3719d5(0x142),'path':_0x4f6651[_0x3719d5(0x143)],'label':_0x4f6651[_0x3719d5(0x13c)],'loadScriptMode':_0x3719d5(0x155),'resources':[..._0x49a8e2]}));if(_0x449173[_0x3719d5(0x13d)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x1bf1df,'plannedMenus':_0x58314d};const _0x51c444=await createMenus(_0x424d67,_0x3d3809,_0x1bf1df,_0x49a8e2['length']>0x0?_0x49a8e2:undefined);return logger['info']('menu-sync','Menu\x20sync\x20completed',{'count':_0x1bf1df[_0x3719d5(0x158)],'resources':_0x49a8e2}),{'created':_0x51c444['length'],'skipped':![],'dryRun':![],'targetPages':_0x1bf1df,'plannedMenus':_0x58314d,'menus':_0x51c444};}export function parseMenuSyncParams(_0x3fc9cd){const _0x435c21=a146_0x367fe8;if(!_0x3fc9cd||typeof _0x3fc9cd!==_0x435c21(0x145))return{};let _0x11cdfc;try{_0x11cdfc=JSON['parse'](_0x3fc9cd);}catch{throw new Error(_0x435c21(0x15e));}if(typeof _0x11cdfc!==_0x435c21(0x144)||_0x11cdfc===null||Array[_0x435c21(0x140)](_0x11cdfc))throw new Error(_0x435c21(0x162));const _0x296648=_0x11cdfc;if(Object[_0x435c21(0x160)](_0x296648,_0x435c21(0x159)))throw new Error(_0x435c21(0x165));const _0x4badec=Object[_0x435c21(0x13e)](_0x296648)[_0x435c21(0x15b)](_0x3812d4=>!MENU_SYNC_PARAM_KEYS[_0x435c21(0x15a)](_0x3812d4));if(_0x4badec['length']>0x0)throw new Error(_0x435c21(0x14c)+_0x4badec[_0x435c21(0x14d)](',\x20')+'.');for(const _0x3dec6d of MENU_SYNC_PARAM_KEYS){const _0x27dd5e=_0x296648[_0x3dec6d];if(_0x27dd5e!==undefined&&(typeof _0x27dd5e!==_0x435c21(0x145)||_0x27dd5e['trim']()===''))throw new Error('Invalid\x20--params.'+_0x3dec6d+_0x435c21(0x153));}return{'jsUrl':typeof _0x296648[_0x435c21(0x163)]===_0x435c21(0x145)?_0x296648[_0x435c21(0x163)][_0x435c21(0x147)]():undefined,'cssUrl':typeof _0x296648['cssUrl']===_0x435c21(0x145)?_0x296648[_0x435c21(0x14a)][_0x435c21(0x147)]():undefined};}
@@ -1 +1 @@
1
- (function(_0xe8d328,_0x58dd3b){const _0x510c65=a148_0x324b,_0x563f4a=_0xe8d328();while(!![]){try{const _0x31d20d=-parseInt(_0x510c65(0xc7))/0x1+-parseInt(_0x510c65(0xaf))/0x2+-parseInt(_0x510c65(0x97))/0x3*(-parseInt(_0x510c65(0x93))/0x4)+parseInt(_0x510c65(0xce))/0x5*(parseInt(_0x510c65(0x9e))/0x6)+-parseInt(_0x510c65(0xbb))/0x7*(parseInt(_0x510c65(0xa5))/0x8)+parseInt(_0x510c65(0xb0))/0x9+parseInt(_0x510c65(0xc0))/0xa;if(_0x31d20d===_0x58dd3b)break;else _0x563f4a['push'](_0x563f4a['shift']());}catch(_0x44e681){_0x563f4a['push'](_0x563f4a['shift']());}}}(a148_0x95ea,0xaea67));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x36a0e4){const _0x5bbd74=a148_0x324b,_0x1f55b7=[];return _0x36a0e4[_0x5bbd74(0x9c)]&&!isValidJsHttpsUrl(_0x36a0e4[_0x5bbd74(0x9c)])&&_0x1f55b7[_0x5bbd74(0xbf)]({'field':_0x5bbd74(0x9c),'message':_0x5bbd74(0xb4)}),_0x36a0e4['cssUrl']&&!isValidCssHttpsUrl(_0x36a0e4[_0x5bbd74(0x9b)])&&_0x1f55b7['push']({'field':'cssUrl','message':_0x5bbd74(0xc9)}),_0x1f55b7;}export async function runMenuUpdateCore(_0x27af06,_0x3976bd,_0x1e99f4,_0xa6e424={}){const _0x57a962=a148_0x324b,_0x3bc2c7=parseUpdateParamsFlag(_0x1e99f4),_0x4b8cad=normalizeMode(_0xa6e424['mode']);validateSelection(_0xa6e424[_0x57a962(0x94)]);const _0x5c9f5d=[];if(_0x3bc2c7[_0x57a962(0x9c)])_0x5c9f5d[_0x57a962(0xbf)](_0x3bc2c7[_0x57a962(0x9c)]);if(_0x3bc2c7[_0x57a962(0x9b)])_0x5c9f5d['push'](_0x3bc2c7['cssUrl']);const _0x573f87=validateParams(_0x3bc2c7);if(_0x573f87[_0x57a962(0xcb)]>0x0){const _0x1f63ef=_0x573f87[_0x57a962(0xca)](_0x3804a0=>_0x57a962(0xbd)+_0x3804a0[_0x57a962(0xd0)]+':\x20'+_0x3804a0[_0x57a962(0xb5)])[_0x57a962(0x9a)](';\x20');throw new Error(_0x57a962(0xa6)+_0x1f63ef);}if(_0x5c9f5d[_0x57a962(0xcb)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x57a962(0xab)](process['cwd']()),logger['info'](_0x57a962(0xcf),_0x57a962(0xc4),{'appCode':_0x27af06,'jsUrl':_0x3bc2c7['jsUrl'],'cssUrl':_0x3bc2c7['cssUrl'],'mode':_0x4b8cad,'dryRun':_0xa6e424[_0x57a962(0xc2)]===!![]});if(_0x3bc2c7['jsUrl']){const _0x55d88d=await isUrlReachable(_0x3bc2c7[_0x57a962(0x9c)]);if(!_0x55d88d)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x3bc2c7['jsUrl']);}if(_0x3bc2c7[_0x57a962(0x9b)]){const _0x2e6103=await isUrlReachable(_0x3bc2c7[_0x57a962(0x9b)]);if(!_0x2e6103)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x3bc2c7[_0x57a962(0x9b)]);}const _0x4114d2=await getOnlineMenuList(_0x27af06,_0x3976bd),_0x326b3f=_0x4114d2[_0x57a962(0xba)](_0x596ffa=>_0x596ffa[_0x57a962(0xd1)]['length']>0x0),_0x98a17b=selectMenusForUpdate(_0x326b3f,_0xa6e424['selection']);if(_0x98a17b[_0x57a962(0xcb)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0xa6e424['dryRun']===!![]};const _0x4c8dfd=_0x98a17b[_0x57a962(0xca)](_0x31bc2d=>buildMenuUpdateDiff(_0x31bc2d,_0x3bc2c7,_0x4b8cad,_0xa6e424[_0x57a962(0x9f)]===!![],_0xa6e424[_0x57a962(0xa1)]));if(_0xa6e424[_0x57a962(0xc2)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4c8dfd};const _0x3d0978=await Promise[_0x57a962(0xb2)](_0x98a17b[_0x57a962(0xca)]((_0x14b7ff,_0x1a6b0b)=>updateMenuCdnUrl(_0x27af06,_0x3976bd,{'id':_0x14b7ff['id'],'label':_0x14b7ff[_0x57a962(0x98)],'path':_0x14b7ff[_0x57a962(0xb6)],'resources':_0x4c8dfd[_0x1a6b0b][_0x57a962(0x95)][_0x57a962(0xd1)],'extend':_0x14b7ff['extend']??null,'loadScriptMode':_0xa6e424[_0x57a962(0xa1)]}))),_0x2f1808=_0x3d0978[_0x57a962(0xba)](_0x5279e1=>_0x5279e1[_0x57a962(0x92)]==='fulfilled')[_0x57a962(0xca)](_0x1d72ce=>_0x1d72ce['value']),_0x20eb3e=_0x3d0978['filter'](_0x2fd2e6=>_0x2fd2e6[_0x57a962(0x92)]===_0x57a962(0xc3))[_0x57a962(0xcb)];return logger[_0x57a962(0xc8)](_0x57a962(0xcf),'Menu\x20asset\x20update\x20completed',{'count':_0x98a17b['length'],'resources':_0x5c9f5d}),{'updated':_0x2f1808[_0x57a962(0xcb)],'failed':_0x20eb3e,'skipped':![],'menus':_0x2f1808};}function validateSelection(_0xf8e631){const _0x29b126=a148_0x324b;if(!_0xf8e631)throw new Error(_0x29b126(0xcd));if(_0xf8e631[_0x29b126(0xac)]&&(_0xf8e631[_0x29b126(0xb8)]['length']>0x0||_0xf8e631[_0x29b126(0xcc)][_0x29b126(0xcb)]>0x0))throw new Error(_0x29b126(0xc5));if(!_0xf8e631[_0x29b126(0xac)]&&_0xf8e631[_0x29b126(0xb8)][_0x29b126(0xcb)]===0x0&&_0xf8e631['paths']['length']===0x0)throw new Error(_0x29b126(0xcd));}export function selectMenusForUpdate(_0x4d35e7,_0x49e0e2){const _0x18e5ca=a148_0x324b;validateSelection(_0x49e0e2);if(_0x49e0e2[_0x18e5ca(0xac)])return _0x4d35e7;const _0x11902b=new Set(_0x4d35e7[_0x18e5ca(0xca)](_0x214ed2=>_0x214ed2['id'])),_0x1bcdfb=new Set(_0x4d35e7['map'](_0x5e3503=>_0x5e3503[_0x18e5ca(0xb6)])),_0x37d8d2=_0x49e0e2['menuIds'][_0x18e5ca(0xba)](_0x2aac79=>!_0x11902b[_0x18e5ca(0x96)](_0x2aac79)),_0xf8941c=_0x49e0e2[_0x18e5ca(0xcc)][_0x18e5ca(0xba)](_0x51baec=>!_0x1bcdfb[_0x18e5ca(0x96)](_0x51baec));if(_0x37d8d2[_0x18e5ca(0xcb)]>0x0||_0xf8941c[_0x18e5ca(0xcb)]>0x0){const _0x1b4f35=[..._0x37d8d2[_0x18e5ca(0xca)](_0x5e0ded=>String(_0x5e0ded)),..._0xf8941c]['join'](',\x20');throw new Error(_0x18e5ca(0xc6)+_0x1b4f35);}const _0x499f0b=new Set(_0x49e0e2[_0x18e5ca(0xb8)]),_0x23c6c8=new Set(_0x49e0e2[_0x18e5ca(0xcc)]);return _0x4d35e7[_0x18e5ca(0xba)](_0x2fb53e=>_0x499f0b['has'](_0x2fb53e['id'])||_0x23c6c8[_0x18e5ca(0x96)](_0x2fb53e[_0x18e5ca(0xb6)]));}function normalizeMode(_0x134016){const _0x21c8c0=a148_0x324b;if(!_0x134016)return _0x21c8c0(0xb9);if(_0x134016===_0x21c8c0(0xb7)||_0x134016===_0x21c8c0(0xb9))return _0x134016;throw new Error('Invalid\x20--mode:\x20'+_0x134016+_0x21c8c0(0xc1));}function a148_0x95ea(){const _0x58bf07=['55eIOvAh','menu-asset-update','field','resources','menu\x20asset-update\x20cannot\x20patch\x20','status','433572eyEUgJ','selection','after','has','18EfnmkT','label','.css','join','cssUrl','jsUrl','\x20existing\x20JS\x20resources\x20for\x20\x22','161052SwRvQI','force','string','loadScriptMode','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','endsWith','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','8kECCeo','Invalid\x20--params:\x20','isArray','trim','\x22\x20(','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','setLogPath','all','extend','toLowerCase','1354718sKmZsr','4282191cnyPnf','some','allSettled','split','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','message','path','replace','menuIds','patch','filter','2590322UpJqlE',').\x20','--params.','\x20existing\x20CSS\x20resources\x20for\x20\x22','push','15472040eSRGqP','.\x20Allowed\x20values:\x20replace,\x20patch','dryRun','rejected','Start\x20non-interactive\x20menu\x20asset\x20update','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','1205851xsMBri','info','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','map','length','paths','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.'];a148_0x95ea=function(){return _0x58bf07;};return a148_0x95ea();}function buildMenuUpdateDiff(_0x2d0f8f,_0x12185c,_0x132939,_0x29b73a,_0x4d82db){const _0xa993b5=a148_0x324b,_0x1f61fa=[..._0x2d0f8f[_0xa993b5(0xd1)]];_0x132939==='patch'&&assertUnambiguousPatchResources(_0x2d0f8f,_0x1f61fa,_0x12185c);const _0x511da=_0x132939===_0xa993b5(0xb9)?patchResources(_0x1f61fa,_0x12185c):replaceResources(_0x12185c),_0x3c872b=[],_0x4fbe08=_0x1f61fa[_0xa993b5(0xb1)](isJsResource),_0xc866d7=_0x511da[_0xa993b5(0xb1)](isJsResource);if(_0x4fbe08&&!_0xc866d7){const _0x2f01a2='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x2d0f8f[_0xa993b5(0x98)]+'\x22\x20('+_0x2d0f8f['path']+_0xa993b5(0xbc)+_0xa993b5(0xa2);if(!_0x29b73a)throw new Error(_0x2f01a2);_0x3c872b['push'](_0x2f01a2);}const _0x4da7ef=_0x1f61fa[_0xa993b5(0xb1)](isCssResource),_0x4a5a10=_0x511da[_0xa993b5(0xb1)](isCssResource);_0x4da7ef&&!_0x4a5a10&&_0x3c872b[_0xa993b5(0xbf)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x2d0f8f[_0xa993b5(0x98)]+_0xa993b5(0xa9)+_0x2d0f8f[_0xa993b5(0xb6)]+').');const _0x486b8e=typeof _0x2d0f8f['extend']?.[_0xa993b5(0xa1)]==='string'?_0x2d0f8f[_0xa993b5(0xad)]['loadScriptMode']:null,_0x15a305=_0x4d82db?{'loadScriptMode':_0x486b8e}:{},_0x5dfdbb=_0x4d82db?{'loadScriptMode':_0x4d82db}:{};return{'id':_0x2d0f8f['id'],'label':_0x2d0f8f[_0xa993b5(0x98)],'path':_0x2d0f8f[_0xa993b5(0xb6)],'mode':_0x132939,'before':{'resources':_0x1f61fa,..._0x15a305},'after':{'resources':_0x511da,..._0x5dfdbb},'warnings':_0x3c872b};}function replaceResources(_0x276bfb){const _0x58c725=a148_0x324b;return[_0x276bfb[_0x58c725(0x9c)],_0x276bfb['cssUrl']][_0x58c725(0xba)](_0xcbb716=>!!_0xcbb716);}function assertUnambiguousPatchResources(_0x1ee664,_0xc14448,_0x35f74e){const _0x946f90=a148_0x324b,_0x289611=_0xc14448[_0x946f90(0xba)](isJsResource)[_0x946f90(0xcb)];if(_0x35f74e[_0x946f90(0x9c)]&&_0x289611>0x1)throw new Error(_0x946f90(0xd2)+_0x289611+_0x946f90(0x9d)+_0x1ee664[_0x946f90(0x98)]+_0x946f90(0xa9)+_0x1ee664[_0x946f90(0xb6)]+')\x20'+_0x946f90(0xaa));const _0x406174=_0xc14448[_0x946f90(0xba)](isCssResource)[_0x946f90(0xcb)];if(_0x35f74e[_0x946f90(0x9b)]&&_0x406174>0x1)throw new Error(_0x946f90(0xd2)+_0x406174+_0x946f90(0xbe)+_0x1ee664[_0x946f90(0x98)]+_0x946f90(0xa9)+_0x1ee664[_0x946f90(0xb6)]+')\x20'+_0x946f90(0xa4));}function patchResources(_0x5c9a33,_0x2a93a9){const _0x1f81d8=a148_0x324b;let _0x33800=![],_0x3690b5=![];const _0x816e67=[];for(const _0x346b1e of _0x5c9a33){if(isJsResource(_0x346b1e)){if(_0x2a93a9[_0x1f81d8(0x9c)]&&!_0x33800)_0x816e67['push'](_0x2a93a9[_0x1f81d8(0x9c)]),_0x33800=!![];else!_0x2a93a9[_0x1f81d8(0x9c)]&&_0x816e67[_0x1f81d8(0xbf)](_0x346b1e);continue;}if(isCssResource(_0x346b1e)){if(_0x2a93a9[_0x1f81d8(0x9b)]&&!_0x3690b5)_0x816e67['push'](_0x2a93a9[_0x1f81d8(0x9b)]),_0x3690b5=!![];else!_0x2a93a9['cssUrl']&&_0x816e67[_0x1f81d8(0xbf)](_0x346b1e);continue;}_0x816e67['push'](_0x346b1e);}return _0x2a93a9[_0x1f81d8(0x9c)]&&!_0x33800&&_0x816e67['unshift'](_0x2a93a9[_0x1f81d8(0x9c)]),_0x2a93a9[_0x1f81d8(0x9b)]&&!_0x3690b5&&_0x816e67[_0x1f81d8(0xbf)](_0x2a93a9['cssUrl']),_0x816e67;}function isJsResource(_0x30d5a8){const _0x4dd95c=a148_0x324b;return stripQuery(_0x30d5a8)[_0x4dd95c(0xae)]()[_0x4dd95c(0xa3)]('.js');}function isCssResource(_0x272b94){const _0x1414c9=a148_0x324b;return stripQuery(_0x272b94)['toLowerCase']()[_0x1414c9(0xa3)](_0x1414c9(0x99));}function stripQuery(_0x35f997){const _0x2a0be6=a148_0x324b;return _0x35f997[_0x2a0be6(0xb3)]('?')[0x0]??_0x35f997;}function a148_0x324b(_0x1dc2e5,_0x585df3){_0x1dc2e5=_0x1dc2e5-0x92;const _0x95eabc=a148_0x95ea();let _0x324bc6=_0x95eabc[_0x1dc2e5];return _0x324bc6;}function parseUpdateParamsFlag(_0x4e27b0){const _0x2d8376=a148_0x324b;if(!_0x4e27b0||typeof _0x4e27b0!==_0x2d8376(0xa0))return{};try{const _0x151a4e=JSON['parse'](_0x4e27b0);if(typeof _0x151a4e!=='object'||_0x151a4e===null||Array[_0x2d8376(0xa7)](_0x151a4e))return{};return{'jsUrl':typeof _0x151a4e[_0x2d8376(0x9c)]==='string'?_0x151a4e['jsUrl']['trim']():undefined,'cssUrl':typeof _0x151a4e[_0x2d8376(0x9b)]===_0x2d8376(0xa0)?_0x151a4e[_0x2d8376(0x9b)][_0x2d8376(0xa8)]():undefined};}catch{return{};}}
1
+ function a148_0x529f(){const _0x41d682=['menu\x20asset-update\x20cannot\x20patch\x20','path','selection','isArray','status','trim','join','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.js','all','resources','map','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','unshift','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','fulfilled','patch','length','toLowerCase','dryRun','164880ifjxRe','split','551562ZEOUlA','setLogPath','endsWith','menu-asset-update','info','jsUrl','after','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','CSS\x20URL\x20is\x20unreachable:\x20','parse','some','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','Start\x20non-interactive\x20menu\x20asset\x20update','mode','string','Invalid\x20--params:\x20','664348NNkvmq','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','message','paths','label','force','object','93476RHyHMU',').\x20','extend','rejected','has','field','push','5yMFlsE','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','loadScriptMode','388866kpYbpZ','cssUrl','779191jJMrEM','\x20existing\x20CSS\x20resources\x20for\x20\x22','\x22\x20(','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','--params.','replace','.\x20Allowed\x20values:\x20replace,\x20patch','cwd','495752GYgSiD','filter','menuIds'];a148_0x529f=function(){return _0x41d682;};return a148_0x529f();}(function(_0x45b725,_0x2dc8ed){const _0x53392c=a148_0x1dbb,_0x52aa7d=_0x45b725();while(!![]){try{const _0x3d0209=-parseInt(_0x53392c(0x1a5))/0x1+parseInt(_0x53392c(0x178))/0x2+-parseInt(_0x53392c(0x1a7))/0x3+parseInt(_0x53392c(0x171))/0x4+-parseInt(_0x53392c(0x17f))/0x5*(-parseInt(_0x53392c(0x182))/0x6)+parseInt(_0x53392c(0x184))/0x7+parseInt(_0x53392c(0x18c))/0x8;if(_0x3d0209===_0x2dc8ed)break;else _0x52aa7d['push'](_0x52aa7d['shift']());}catch(_0x50d07c){_0x52aa7d['push'](_0x52aa7d['shift']());}}}(a148_0x529f,0x18f28));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0xa78aaf){const _0x302167=a148_0x1dbb,_0x2ac09c=[];return _0xa78aaf['jsUrl']&&!isValidJsHttpsUrl(_0xa78aaf[_0x302167(0x1ac)])&&_0x2ac09c[_0x302167(0x17e)]({'field':_0x302167(0x1ac),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0xa78aaf['cssUrl']&&!isValidCssHttpsUrl(_0xa78aaf[_0x302167(0x183)])&&_0x2ac09c[_0x302167(0x17e)]({'field':_0x302167(0x183),'message':_0x302167(0x172)}),_0x2ac09c;}export async function runMenuUpdateCore(_0x184b39,_0x445c05,_0x100486,_0x38bfd6={}){const _0x30c130=a148_0x1dbb,_0x4cb2ce=parseUpdateParamsFlag(_0x100486),_0xd59190=normalizeMode(_0x38bfd6[_0x30c130(0x16e)]);validateSelection(_0x38bfd6['selection']);const _0x239c97=[];if(_0x4cb2ce[_0x30c130(0x1ac)])_0x239c97['push'](_0x4cb2ce['jsUrl']);if(_0x4cb2ce[_0x30c130(0x183)])_0x239c97[_0x30c130(0x17e)](_0x4cb2ce[_0x30c130(0x183)]);const _0x68efcc=validateParams(_0x4cb2ce);if(_0x68efcc[_0x30c130(0x1a2)]>0x0){const _0x1d5f0b=_0x68efcc[_0x30c130(0x19b)](_0x317869=>_0x30c130(0x188)+_0x317869[_0x30c130(0x17d)]+':\x20'+_0x317869[_0x30c130(0x173)])[_0x30c130(0x195)](';\x20');throw new Error(_0x30c130(0x170)+_0x1d5f0b);}if(_0x239c97['length']===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x30c130(0x16c));logger[_0x30c130(0x1a8)](process[_0x30c130(0x18b)]()),logger['info'](_0x30c130(0x1aa),_0x30c130(0x16d),{'appCode':_0x184b39,'jsUrl':_0x4cb2ce[_0x30c130(0x1ac)],'cssUrl':_0x4cb2ce[_0x30c130(0x183)],'mode':_0xd59190,'dryRun':_0x38bfd6['dryRun']===!![]});if(_0x4cb2ce[_0x30c130(0x1ac)]){const _0x5edb44=await isUrlReachable(_0x4cb2ce[_0x30c130(0x1ac)]);if(!_0x5edb44)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x4cb2ce['jsUrl']);}if(_0x4cb2ce[_0x30c130(0x183)]){const _0x31b5bc=await isUrlReachable(_0x4cb2ce['cssUrl']);if(!_0x31b5bc)throw new Error(_0x30c130(0x169)+_0x4cb2ce[_0x30c130(0x183)]);}const _0x305e6e=await getOnlineMenuList(_0x184b39,_0x445c05),_0x13ab68=_0x305e6e[_0x30c130(0x18d)](_0x4f839a=>_0x4f839a[_0x30c130(0x19a)][_0x30c130(0x1a2)]>0x0),_0x722e6d=selectMenusForUpdate(_0x13ab68,_0x38bfd6[_0x30c130(0x191)]);if(_0x722e6d['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x38bfd6[_0x30c130(0x1a4)]===!![]};const _0x4fb0a6=_0x722e6d['map'](_0x2c0069=>buildMenuUpdateDiff(_0x2c0069,_0x4cb2ce,_0xd59190,_0x38bfd6[_0x30c130(0x176)]===!![],_0x38bfd6[_0x30c130(0x181)]));if(_0x38bfd6['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4fb0a6};const _0x8ab554=await Promise['allSettled'](_0x722e6d['map']((_0x6be084,_0x3c2e7d)=>updateMenuCdnUrl(_0x184b39,_0x445c05,{'id':_0x6be084['id'],'label':_0x6be084[_0x30c130(0x175)],'path':_0x6be084[_0x30c130(0x190)],'resources':_0x4fb0a6[_0x3c2e7d][_0x30c130(0x1ad)][_0x30c130(0x19a)],'extend':_0x6be084['extend']??null,'loadScriptMode':_0x38bfd6[_0x30c130(0x181)]}))),_0x4901c9=_0x8ab554['filter'](_0x18dfab=>_0x18dfab[_0x30c130(0x193)]===_0x30c130(0x1a0))[_0x30c130(0x19b)](_0x149ff1=>_0x149ff1['value']),_0x537778=_0x8ab554[_0x30c130(0x18d)](_0x56ba58=>_0x56ba58[_0x30c130(0x193)]===_0x30c130(0x17b))['length'];return logger[_0x30c130(0x1ab)](_0x30c130(0x1aa),'Menu\x20asset\x20update\x20completed',{'count':_0x722e6d[_0x30c130(0x1a2)],'resources':_0x239c97}),{'updated':_0x4901c9['length'],'failed':_0x537778,'skipped':![],'menus':_0x4901c9};}function validateSelection(_0x14c710){const _0xa47cba=a148_0x1dbb;if(!_0x14c710)throw new Error(_0xa47cba(0x19f));if(_0x14c710[_0xa47cba(0x199)]&&(_0x14c710[_0xa47cba(0x18e)][_0xa47cba(0x1a2)]>0x0||_0x14c710[_0xa47cba(0x174)][_0xa47cba(0x1a2)]>0x0))throw new Error(_0xa47cba(0x187));if(!_0x14c710[_0xa47cba(0x199)]&&_0x14c710[_0xa47cba(0x18e)][_0xa47cba(0x1a2)]===0x0&&_0x14c710['paths']['length']===0x0)throw new Error(_0xa47cba(0x19f));}export function selectMenusForUpdate(_0x26a003,_0x995ec0){const _0x3b27bb=a148_0x1dbb;validateSelection(_0x995ec0);if(_0x995ec0[_0x3b27bb(0x199)])return _0x26a003;const _0x1ff9b2=new Set(_0x26a003[_0x3b27bb(0x19b)](_0x443ec4=>_0x443ec4['id'])),_0x34bf2b=new Set(_0x26a003[_0x3b27bb(0x19b)](_0x28e24a=>_0x28e24a[_0x3b27bb(0x190)])),_0x40dea8=_0x995ec0[_0x3b27bb(0x18e)]['filter'](_0x5807f6=>!_0x1ff9b2['has'](_0x5807f6)),_0x5084f3=_0x995ec0[_0x3b27bb(0x174)][_0x3b27bb(0x18d)](_0x5d6f3b=>!_0x34bf2b[_0x3b27bb(0x17c)](_0x5d6f3b));if(_0x40dea8[_0x3b27bb(0x1a2)]>0x0||_0x5084f3[_0x3b27bb(0x1a2)]>0x0){const _0x467b54=[..._0x40dea8[_0x3b27bb(0x19b)](_0x6b7e48=>String(_0x6b7e48)),..._0x5084f3][_0x3b27bb(0x195)](',\x20');throw new Error(_0x3b27bb(0x19c)+_0x467b54);}const _0xcd16d6=new Set(_0x995ec0[_0x3b27bb(0x18e)]),_0x567cb9=new Set(_0x995ec0[_0x3b27bb(0x174)]);return _0x26a003[_0x3b27bb(0x18d)](_0x415fb3=>_0xcd16d6[_0x3b27bb(0x17c)](_0x415fb3['id'])||_0x567cb9[_0x3b27bb(0x17c)](_0x415fb3[_0x3b27bb(0x190)]));}function a148_0x1dbb(_0x19c5e9,_0x38fba1){_0x19c5e9=_0x19c5e9-0x169;const _0x529f33=a148_0x529f();let _0x1dbb22=_0x529f33[_0x19c5e9];return _0x1dbb22;}function normalizeMode(_0xa339ef){const _0xbc6586=a148_0x1dbb;if(!_0xa339ef)return'patch';if(_0xa339ef===_0xbc6586(0x189)||_0xa339ef==='patch')return _0xa339ef;throw new Error('Invalid\x20--mode:\x20'+_0xa339ef+_0xbc6586(0x18a));}function buildMenuUpdateDiff(_0x60486a,_0x282edc,_0x1ad1ff,_0x5fa568,_0x345bff){const _0x3777f5=a148_0x1dbb,_0x19b008=[..._0x60486a[_0x3777f5(0x19a)]];_0x1ad1ff===_0x3777f5(0x1a1)&&assertUnambiguousPatchResources(_0x60486a,_0x19b008,_0x282edc);const _0x481cd5=_0x1ad1ff===_0x3777f5(0x1a1)?patchResources(_0x19b008,_0x282edc):replaceResources(_0x282edc),_0x149dd7=[],_0xc51c56=_0x19b008[_0x3777f5(0x16b)](isJsResource),_0x3c33fc=_0x481cd5['some'](isJsResource);if(_0xc51c56&&!_0x3c33fc){const _0x2dc10f=_0x3777f5(0x196)+_0x60486a[_0x3777f5(0x175)]+'\x22\x20('+_0x60486a[_0x3777f5(0x190)]+_0x3777f5(0x179)+_0x3777f5(0x19d);if(!_0x5fa568)throw new Error(_0x2dc10f);_0x149dd7[_0x3777f5(0x17e)](_0x2dc10f);}const _0x33b8b1=_0x19b008[_0x3777f5(0x16b)](isCssResource),_0x950487=_0x481cd5['some'](isCssResource);_0x33b8b1&&!_0x950487&&_0x149dd7[_0x3777f5(0x17e)](_0x3777f5(0x180)+_0x60486a[_0x3777f5(0x175)]+_0x3777f5(0x186)+_0x60486a[_0x3777f5(0x190)]+').');const _0x4bbada=typeof _0x60486a[_0x3777f5(0x17a)]?.[_0x3777f5(0x181)]===_0x3777f5(0x16f)?_0x60486a[_0x3777f5(0x17a)][_0x3777f5(0x181)]:null,_0x18e760=_0x345bff?{'loadScriptMode':_0x4bbada}:{},_0x4c7bbd=_0x345bff?{'loadScriptMode':_0x345bff}:{};return{'id':_0x60486a['id'],'label':_0x60486a[_0x3777f5(0x175)],'path':_0x60486a[_0x3777f5(0x190)],'mode':_0x1ad1ff,'before':{'resources':_0x19b008,..._0x18e760},'after':{'resources':_0x481cd5,..._0x4c7bbd},'warnings':_0x149dd7};}function replaceResources(_0x239cf9){const _0x317135=a148_0x1dbb;return[_0x239cf9['jsUrl'],_0x239cf9[_0x317135(0x183)]][_0x317135(0x18d)](_0x354011=>!!_0x354011);}function assertUnambiguousPatchResources(_0xa466dd,_0x3e2f8e,_0xe1c5fd){const _0x156e5a=a148_0x1dbb,_0x2f9cb2=_0x3e2f8e['filter'](isJsResource)['length'];if(_0xe1c5fd[_0x156e5a(0x1ac)]&&_0x2f9cb2>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x2f9cb2+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0xa466dd[_0x156e5a(0x175)]+_0x156e5a(0x186)+_0xa466dd[_0x156e5a(0x190)]+')\x20'+_0x156e5a(0x197));const _0xb246d0=_0x3e2f8e['filter'](isCssResource)[_0x156e5a(0x1a2)];if(_0xe1c5fd['cssUrl']&&_0xb246d0>0x1)throw new Error(_0x156e5a(0x18f)+_0xb246d0+_0x156e5a(0x185)+_0xa466dd[_0x156e5a(0x175)]+'\x22\x20('+_0xa466dd[_0x156e5a(0x190)]+')\x20'+_0x156e5a(0x1ae));}function patchResources(_0x21bca9,_0x2d4f76){const _0x1d0cd0=a148_0x1dbb;let _0xc0c30c=![],_0x1a0f45=![];const _0x3ba28c=[];for(const _0x3737ea of _0x21bca9){if(isJsResource(_0x3737ea)){if(_0x2d4f76['jsUrl']&&!_0xc0c30c)_0x3ba28c[_0x1d0cd0(0x17e)](_0x2d4f76['jsUrl']),_0xc0c30c=!![];else!_0x2d4f76[_0x1d0cd0(0x1ac)]&&_0x3ba28c[_0x1d0cd0(0x17e)](_0x3737ea);continue;}if(isCssResource(_0x3737ea)){if(_0x2d4f76[_0x1d0cd0(0x183)]&&!_0x1a0f45)_0x3ba28c[_0x1d0cd0(0x17e)](_0x2d4f76[_0x1d0cd0(0x183)]),_0x1a0f45=!![];else!_0x2d4f76[_0x1d0cd0(0x183)]&&_0x3ba28c[_0x1d0cd0(0x17e)](_0x3737ea);continue;}_0x3ba28c[_0x1d0cd0(0x17e)](_0x3737ea);}return _0x2d4f76[_0x1d0cd0(0x1ac)]&&!_0xc0c30c&&_0x3ba28c[_0x1d0cd0(0x19e)](_0x2d4f76[_0x1d0cd0(0x1ac)]),_0x2d4f76[_0x1d0cd0(0x183)]&&!_0x1a0f45&&_0x3ba28c[_0x1d0cd0(0x17e)](_0x2d4f76[_0x1d0cd0(0x183)]),_0x3ba28c;}function isJsResource(_0x2988c2){const _0x1dcfb5=a148_0x1dbb;return stripQuery(_0x2988c2)['toLowerCase']()[_0x1dcfb5(0x1a9)](_0x1dcfb5(0x198));}function isCssResource(_0x2ddb96){const _0x39871d=a148_0x1dbb;return stripQuery(_0x2ddb96)[_0x39871d(0x1a3)]()['endsWith']('.css');}function stripQuery(_0xf49b52){const _0x34a90e=a148_0x1dbb;return _0xf49b52[_0x34a90e(0x1a6)]('?')[0x0]??_0xf49b52;}function parseUpdateParamsFlag(_0xf535da){const _0x18e4fb=a148_0x1dbb;if(!_0xf535da||typeof _0xf535da!==_0x18e4fb(0x16f))return{};try{const _0x59a782=JSON[_0x18e4fb(0x16a)](_0xf535da);if(typeof _0x59a782!==_0x18e4fb(0x177)||_0x59a782===null||Array[_0x18e4fb(0x192)](_0x59a782))return{};return{'jsUrl':typeof _0x59a782[_0x18e4fb(0x1ac)]===_0x18e4fb(0x16f)?_0x59a782['jsUrl'][_0x18e4fb(0x194)]():undefined,'cssUrl':typeof _0x59a782[_0x18e4fb(0x183)]===_0x18e4fb(0x16f)?_0x59a782['cssUrl'][_0x18e4fb(0x194)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a149_0x3577(){const _0x5600d1=['31256UTqvmE','HEAD','10PBOgGA','801693ksrHiw','4788745NGSObA','5322132uVcAIa','3NSJjbX','9157862GxZOei','104qoKzQG','test','7987529jmuueT','282IUcuuF','6oXRYtM','15242nakZVP'];a149_0x3577=function(){return _0x5600d1;};return a149_0x3577();}(function(_0x361165,_0x42780a){const _0x26898b=a149_0x1097,_0x35b963=_0x361165();while(!![]){try{const _0x1e9a10=parseInt(_0x26898b(0xa8))/0x1*(parseInt(_0x26898b(0xaf))/0x2)+-parseInt(_0x26898b(0xad))/0x3*(parseInt(_0x26898b(0xb0))/0x4)+parseInt(_0x26898b(0xa6))/0x5+parseInt(_0x26898b(0xae))/0x6*(parseInt(_0x26898b(0xa9))/0x7)+parseInt(_0x26898b(0xaa))/0x8*(-parseInt(_0x26898b(0xb3))/0x9)+parseInt(_0x26898b(0xb2))/0xa*(parseInt(_0x26898b(0xac))/0xb)+-parseInt(_0x26898b(0xa7))/0xc;if(_0x1e9a10===_0x42780a)break;else _0x35b963['push'](_0x35b963['shift']());}catch(_0x1fc85f){_0x35b963['push'](_0x35b963['shift']());}}}(a149_0x3577,0xa5c4d));export function isValidJsHttpsUrl(_0x5e80dc){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x5e80dc['trim']());}export function isValidCssHttpsUrl(_0x16a0ee){const _0x2b76a9=a149_0x1097;return/^https:\/\/.+\.css(\?.*)?$/[_0x2b76a9(0xab)](_0x16a0ee['trim']());}function a149_0x1097(_0x4a4e9c,_0x3d1776){_0x4a4e9c=_0x4a4e9c-0xa6;const _0x357752=a149_0x3577();let _0x10978a=_0x357752[_0x4a4e9c];return _0x10978a;}export async function isUrlReachable(_0x2a301c){const _0x54b53a=a149_0x1097;try{const _0x28b9c2=await fetch(_0x2a301c,{'method':_0x54b53a(0xb1)});return _0x28b9c2['ok'];}catch{return![];}}
1
+ (function(_0x147d8f,_0x3c8094){const _0x2cd3b5=a149_0x4531,_0x31cab3=_0x147d8f();while(!![]){try{const _0x3a9ae2=parseInt(_0x2cd3b5(0x157))/0x1*(-parseInt(_0x2cd3b5(0x158))/0x2)+parseInt(_0x2cd3b5(0x154))/0x3*(-parseInt(_0x2cd3b5(0x159))/0x4)+-parseInt(_0x2cd3b5(0x153))/0x5+-parseInt(_0x2cd3b5(0x15d))/0x6*(parseInt(_0x2cd3b5(0x15b))/0x7)+-parseInt(_0x2cd3b5(0x156))/0x8+-parseInt(_0x2cd3b5(0x15e))/0x9+parseInt(_0x2cd3b5(0x152))/0xa;if(_0x3a9ae2===_0x3c8094)break;else _0x31cab3['push'](_0x31cab3['shift']());}catch(_0x3849b2){_0x31cab3['push'](_0x31cab3['shift']());}}}(a149_0x4194,0xcf0ab));function a149_0x4194(){const _0x239e32=['11911689ZYxBxf','61748250sNGZoD','6250365argSqv','381YfnvpF','test','6806336PLhqrc','41USUMhS','61416SFPqWr','13976nVIcFH','trim','1397410WofJNL','HEAD','6xmNPQs'];a149_0x4194=function(){return _0x239e32;};return a149_0x4194();}function a149_0x4531(_0x59de5c,_0x2e7b7d){_0x59de5c=_0x59de5c-0x152;const _0x41949b=a149_0x4194();let _0x45313d=_0x41949b[_0x59de5c];return _0x45313d;}export function isValidJsHttpsUrl(_0x3bce5b){const _0xdd63ea=a149_0x4531;return/^https:\/\/.+\.js(\?.*)?$/[_0xdd63ea(0x155)](_0x3bce5b['trim']());}export function isValidCssHttpsUrl(_0x56200e){const _0x381ae1=a149_0x4531;return/^https:\/\/.+\.css(\?.*)?$/[_0x381ae1(0x155)](_0x56200e[_0x381ae1(0x15a)]());}export async function isUrlReachable(_0x394826){const _0x2037b1=a149_0x4531;try{const _0x1f9df6=await fetch(_0x394826,{'method':_0x2037b1(0x15c)});return _0x1f9df6['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- function a150_0x3b6b(_0x28c3b3,_0x4890ec){_0x28c3b3=_0x28c3b3-0xc7;const _0x11be77=a150_0x11be();let _0x3b6b2d=_0x11be77[_0x28c3b3];return _0x3b6b2d;}const a150_0x571824=a150_0x3b6b;(function(_0x57a8d1,_0x5730e4){const _0x3c1085=a150_0x3b6b,_0x3907dd=_0x57a8d1();while(!![]){try{const _0x573785=-parseInt(_0x3c1085(0xcd))/0x1*(parseInt(_0x3c1085(0xfa))/0x2)+parseInt(_0x3c1085(0x102))/0x3*(parseInt(_0x3c1085(0xe3))/0x4)+parseInt(_0x3c1085(0x10c))/0x5*(parseInt(_0x3c1085(0xde))/0x6)+parseInt(_0x3c1085(0x109))/0x7+parseInt(_0x3c1085(0xdf))/0x8*(-parseInt(_0x3c1085(0xec))/0x9)+-parseInt(_0x3c1085(0xca))/0xa+-parseInt(_0x3c1085(0x104))/0xb*(-parseInt(_0x3c1085(0x103))/0xc);if(_0x573785===_0x5730e4)break;else _0x3907dd['push'](_0x3907dd['shift']());}catch(_0x5be0d3){_0x3907dd['push'](_0x3907dd['shift']());}}}(a150_0x11be,0x83374));import a150_0x2198d7 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';function a150_0x11be(){const _0x340290=['paths','43374PQpBdX','252RIJVbg','1034198BAnOiX','gray','yellow','Would\x20create\x20','yes','3159373lUjjWp','rawFlags','appCode','145880QuyiFh','\x20menu(s)\x20with\x20JS:\x20','Creating\x20','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','skipped','validation','sync','Online\x20menu\x20list\x20fetched','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','5543510hLjeaj','\x20\x20Continue\x20with\x20creation?','str','366959dzVHVy','\x20\x20Cancelled.','cookie','split','message','boolean','created','\x20menu(s)','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','size','failed','map','Menu\x20creation\x20failed','\x20menu(s)...','\x20and\x20CSS:\x20','Fetching\x20online\x20menu\x20list...','params','12lshaGa','8549384qfbuhZ','menu','\x20created.','trim','12MdBiMw','\x20menu(s)\x20created','\x20page(s)','onlinePaths','\x20local\x20microfrontend\x20menu(s).','localPages','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','jsUrl','9AjoLmp','length','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','\x20created,\x20','selectedAppName','\x20\x20✓\x20Selected:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','targetPages','Pre-fill\x20JS/CSS\x20URLs.\x20','Menu\x20sync\x20skipped','Sync\x20local\x20pages\x20as\x20platform\x20menus','appcode','Menu\x20sync\x20completed:\x20','2psSpVQ','cssUrl','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','cyan','\x20failed.','string','write'];a150_0x11be=function(){return _0x340290;};return a150_0x11be();}import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a150_0x571824(0xe0),'command':a150_0x571824(0xc7),'description':a150_0x571824(0xf7),'risk':a150_0x571824(0x100),'flags':[{'name':'params','type':a150_0x571824(0xff),'description':a150_0x571824(0xf5)+a150_0x571824(0xd5)},{'name':a150_0x571824(0x101),'type':a150_0x571824(0xff),'description':a150_0x571824(0xee)},{'name':a150_0x571824(0x108),'type':a150_0x571824(0xd2),'description':a150_0x571824(0xe9)}],async 'dryRun'(_0x31b7c3){const _0x28811c=a150_0x571824;ensureRunnableContext(_0x31b7c3['rawFlags'],_0x31b7c3[_0x28811c(0xf0)]);const _0x4d062b=await runMenuSyncCore(_0x31b7c3[_0x28811c(0x10b)],_0x31b7c3['cookie'],parsePaths(_0x31b7c3[_0x28811c(0xcc)]('paths')),_0x31b7c3[_0x28811c(0xcc)](_0x28811c(0xdd)),{'dryRun':!![]});return{'method':'POST','url':'/smartapi/menu/create','body':_0x4d062b,'description':_0x4d062b[_0x28811c(0x110)]?_0x28811c(0xf3):_0x28811c(0x107)+_0x4d062b[_0x28811c(0xf4)][_0x28811c(0xed)]+_0x28811c(0xe7)};},async 'execute'(_0xad9f0b){const _0x2c634c=a150_0x571824;ensureRunnableContext(_0xad9f0b[_0x2c634c(0x10a)],_0xad9f0b['selectedAppName']);const _0xc6f594=_0xad9f0b['flag'](_0x2c634c(0x108)),_0x44e152=_0xad9f0b[_0x2c634c(0xcc)]('params'),_0x416421=parsePaths(_0xad9f0b['str'](_0x2c634c(0x101))),_0x7929e8=parseMenuSyncParams(_0x44e152);if(_0xc6f594){const _0x2d9323=await runMenuSyncCore(_0xad9f0b['appCode'],_0xad9f0b[_0x2c634c(0xcf)],_0x416421,_0x44e152);if(_0x2d9323[_0x2c634c(0x110)]){const _0x4a8bc5=getLocalPages();_0x4a8bc5[_0x2c634c(0xed)]===0x0?writeCliSideChannelLine('!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'):writeCliSideChannelLine(_0x2c634c(0xea));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x2d9323[_0x2c634c(0xd3)]+_0x2c634c(0xe4));return{'ok':!![],'data':_0x2d9323,'message':_0x2d9323[_0x2c634c(0x110)]?_0x2c634c(0xf6):'Menu\x20sync\x20completed:\x20'+_0x2d9323['created']+_0x2c634c(0xe1)};}if(_0x416421[_0x2c634c(0xed)]>0x0)throw CliErrors[_0x2c634c(0x111)](_0x2c634c(0xfc),_0x2c634c(0xc9));if(!isInteractive()&&_0x44e152)throw CliErrors[_0x2c634c(0x111)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive();const _0x459d25=startSpinner(_0x2c634c(0xdc));let _0xf8c044,_0x3657ac,_0x168ad8;try{const _0x58ca22=await fetchMenuData(_0xad9f0b[_0x2c634c(0x10b)],_0xad9f0b[_0x2c634c(0xcf)]);_0xf8c044=_0x58ca22[_0x2c634c(0xe8)],_0x3657ac=_0x58ca22[_0x2c634c(0xe6)],_0x168ad8=_0x58ca22['onlineMenuList'],stopSpinner(_0x459d25,_0x2c634c(0xc8),!![]);}catch(_0x2ce7f7){stopSpinner(_0x459d25,_0x2c634c(0xf2),![]);throw CliErrors[_0x2c634c(0x111)](_0x2ce7f7 instanceof Error?_0x2ce7f7['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0xf8c044[_0x2c634c(0xed)]===0x0)return writeCliSideChannelLine(a150_0x2198d7[_0x2c634c(0x106)](_0x2c634c(0x10f))),{'ok':!![]};const _0x4c2a0c=buildCompareRows(_0xf8c044,_0x3657ac);writeCliSideChannelLine(renderCompareTable(_0x4c2a0c)),writeCliSideChannelLine('');const _0x21bf97=await selectPages(_0xf8c044,_0x3657ac);writeCliSideChannelLine(''),writeCliSideChannelLine(a150_0x2198d7[_0x2c634c(0xfd)](_0x2c634c(0xf1)+_0x21bf97['length']+_0x2c634c(0xe5)));const _0x2edb41=_0x7929e8['jsUrl']&&_0x7929e8[_0x2c634c(0xfb)];if(!_0x2edb41){writeCliSideChannelLine(renderSyncSummary(_0x21bf97,_0x3657ac[_0x2c634c(0xd6)]>0x0));const _0x5968ce=await askConfirm(_0x2c634c(0xcb));if(!_0x5968ce)return writeCliSideChannelLine(a150_0x2198d7[_0x2c634c(0x105)](_0x2c634c(0xce))),{'ok':!![]};}let _0x5ce829=_0x7929e8[_0x2c634c(0xeb)],_0x75108f=_0x7929e8[_0x2c634c(0xfb)];!_0x5ce829&&(_0x5ce829=await askJsUrl());!_0x75108f&&(_0x75108f=await askCssUrl());const _0x2fbc89=await askConfirm('\x20\x20Create\x20'+_0x21bf97[_0x2c634c(0xed)]+_0x2c634c(0x10d)+_0x5ce829+_0x2c634c(0xdb)+_0x75108f+'?');if(!_0x2fbc89)return writeCliSideChannelLine(a150_0x2198d7[_0x2c634c(0x105)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x5d03d0=[_0x5ce829,_0x75108f],_0x12d1d5=startSpinner(_0x2c634c(0x10e)+_0x21bf97[_0x2c634c(0xed)]+_0x2c634c(0xda));try{const _0x1976ab=await doCreateMenus(_0xad9f0b[_0x2c634c(0x10b)],_0xad9f0b['cookie'],_0x21bf97,_0x5d03d0);return stopSpinner(_0x12d1d5,'Created\x20'+_0x1976ab['created']+_0x2c634c(0xd4),!![]),{'ok':!![],'data':_0x1976ab,'message':_0x2c634c(0xf9)+_0x1976ab[_0x2c634c(0xd3)]+_0x2c634c(0xef)+_0x1976ab[_0x2c634c(0xd7)]+_0x2c634c(0xfe)};}catch(_0x33afa2){stopSpinner(_0x12d1d5,_0x2c634c(0xd9),![]);throw CliErrors[_0x2c634c(0x111)](_0x33afa2 instanceof Error?_0x33afa2[_0x2c634c(0xd1)]:_0x2c634c(0xd9));}}};function ensureRunnableContext(_0x5c51a3,_0x76f5d2){const _0x2db984=a150_0x571824,_0x213a3e=_0x5c51a3[_0x2db984(0xf8)]?String(_0x5c51a3[_0x2db984(0xf8)])[_0x2db984(0xe2)]():'';if(!isInProject()&&!_0x76f5d2&&!_0x213a3e)throw CliErrors[_0x2db984(0x111)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x550a76){const _0xb20d8b=a150_0x571824;return[...new Set(_0x550a76[_0xb20d8b(0xd0)](',')[_0xb20d8b(0xd8)](_0x3c9747=>_0x3c9747[_0xb20d8b(0xe2)]())['filter'](Boolean))];}
1
+ const a150_0x1810e1=a150_0x4036;(function(_0x271224,_0x110b7d){const _0xd3d01b=a150_0x4036,_0x361414=_0x271224();while(!![]){try{const _0x197391=-parseInt(_0xd3d01b(0x1a8))/0x1*(-parseInt(_0xd3d01b(0x1be))/0x2)+-parseInt(_0xd3d01b(0x193))/0x3*(parseInt(_0xd3d01b(0x183))/0x4)+parseInt(_0xd3d01b(0x181))/0x5+-parseInt(_0xd3d01b(0x195))/0x6+-parseInt(_0xd3d01b(0x19e))/0x7+-parseInt(_0xd3d01b(0x18f))/0x8*(parseInt(_0xd3d01b(0x194))/0x9)+parseInt(_0xd3d01b(0x1b3))/0xa;if(_0x197391===_0x110b7d)break;else _0x361414['push'](_0x361414['shift']());}catch(_0x5837d6){_0x361414['push'](_0x361414['shift']());}}}(a150_0x35f9,0x93219));function a150_0x4036(_0x187f1c,_0x2b82ae){_0x187f1c=_0x187f1c-0x17b;const _0x35f94f=a150_0x35f9();let _0x40364b=_0x35f94f[_0x187f1c];return _0x40364b;}import a150_0x156b10 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a150_0x35f9(){const _0x546bb5=['params','flag','771177TYjHqE','4421286pBgMSL','991956gAEPfm','appCode','Fetching\x20online\x20menu\x20list...','✓\x20Menu\x20sync\x20completed:\x20','\x20\x20✓\x20Selected:\x20','cyan','Would\x20create\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','\x20\x20Create\x20','1101660MKmwRU','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','created','appcode','Menu\x20creation\x20failed','Menu\x20sync\x20completed:\x20','Created\x20','\x20created.','Creating\x20','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','3123XSgbkN','localPages','\x20menu(s)...','skipped','POST','length','Failed\x20to\x20fetch\x20online\x20menu\x20list','sync','\x20\x20Cancelled.','\x20failed.','\x20and\x20CSS:\x20','16245000DzMUag','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','message','\x20local\x20microfrontend\x20menu(s).','jsUrl','string','menu','rawFlags','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','\x20menu(s)\x20created','onlineMenuList','268YWxYlI','gray','write','paths','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','size','\x20menu(s)','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','cookie','map','3180290lWcVPo','targetPages','12gBJuZU','yes','/smartapi/menu/create','onlinePaths','filter','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','cssUrl','Menu\x20sync\x20skipped','\x20page(s)','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','trim','validation','16zuYwgW','selectedAppName'];a150_0x35f9=function(){return _0x546bb5;};return a150_0x35f9();}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':a150_0x1810e1(0x1b9),'command':a150_0x1810e1(0x1af),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a150_0x1810e1(0x1c0),'flags':[{'name':a150_0x1810e1(0x191),'type':a150_0x1810e1(0x1b8),'description':'Pre-fill\x20JS/CSS\x20URLs.\x20'+a150_0x1810e1(0x18c)},{'name':a150_0x1810e1(0x1c1),'type':'string','description':a150_0x1810e1(0x1bb)},{'name':a150_0x1810e1(0x184),'type':'boolean','description':a150_0x1810e1(0x188)}],async 'dryRun'(_0x5126bb){const _0x5485c4=a150_0x1810e1;ensureRunnableContext(_0x5126bb[_0x5485c4(0x1ba)],_0x5126bb[_0x5485c4(0x190)]);const _0x5efbbe=await runMenuSyncCore(_0x5126bb[_0x5485c4(0x196)],_0x5126bb['cookie'],parsePaths(_0x5126bb['str']('paths')),_0x5126bb['str']('params'),{'dryRun':!![]});return{'method':_0x5485c4(0x1ac),'url':_0x5485c4(0x185),'body':_0x5efbbe,'description':_0x5efbbe[_0x5485c4(0x1ab)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x5485c4(0x19b)+_0x5efbbe[_0x5485c4(0x182)][_0x5485c4(0x1ad)]+_0x5485c4(0x1b6)};},async 'execute'(_0xc58c0d){const _0x2bad8a=a150_0x1810e1;ensureRunnableContext(_0xc58c0d[_0x2bad8a(0x1ba)],_0xc58c0d[_0x2bad8a(0x190)]);const _0x305e4e=_0xc58c0d[_0x2bad8a(0x192)](_0x2bad8a(0x184)),_0x2914f9=_0xc58c0d['str'](_0x2bad8a(0x191)),_0x3a8243=parsePaths(_0xc58c0d['str'](_0x2bad8a(0x1c1))),_0x38cbca=parseMenuSyncParams(_0x2914f9);if(_0x305e4e){const _0x4727bf=await runMenuSyncCore(_0xc58c0d['appCode'],_0xc58c0d[_0x2bad8a(0x17f)],_0x3a8243,_0x2914f9);if(_0x4727bf[_0x2bad8a(0x1ab)]){const _0x1da0e3=getLocalPages();_0x1da0e3[_0x2bad8a(0x1ad)]===0x0?writeCliSideChannelLine(_0x2bad8a(0x19c)):writeCliSideChannelLine(_0x2bad8a(0x17e));}else writeCliSideChannelLine(_0x2bad8a(0x198)+_0x4727bf['created']+_0x2bad8a(0x1bc));return{'ok':!![],'data':_0x4727bf,'message':_0x4727bf[_0x2bad8a(0x1ab)]?_0x2bad8a(0x18a):_0x2bad8a(0x1a3)+_0x4727bf[_0x2bad8a(0x1a0)]+_0x2bad8a(0x1a5)};}if(_0x3a8243[_0x2bad8a(0x1ad)]>0x0)throw CliErrors[_0x2bad8a(0x18e)]('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x2bad8a(0x1b4));if(!isInteractive()&&_0x2914f9)throw CliErrors[_0x2bad8a(0x18e)](_0x2bad8a(0x1a7),_0x2bad8a(0x1b4));requireInteractive();const _0x53b3de=startSpinner(_0x2bad8a(0x197));let _0x3f20a0,_0x1b4b54,_0x2819f0;try{const _0x9a4654=await fetchMenuData(_0xc58c0d[_0x2bad8a(0x196)],_0xc58c0d[_0x2bad8a(0x17f)]);_0x3f20a0=_0x9a4654[_0x2bad8a(0x1a9)],_0x1b4b54=_0x9a4654[_0x2bad8a(0x186)],_0x2819f0=_0x9a4654[_0x2bad8a(0x1bd)],stopSpinner(_0x53b3de,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x85f045){stopSpinner(_0x53b3de,_0x2bad8a(0x1ae),![]);throw CliErrors[_0x2bad8a(0x18e)](_0x85f045 instanceof Error?_0x85f045[_0x2bad8a(0x1b5)]:_0x2bad8a(0x1ae));}if(_0x3f20a0[_0x2bad8a(0x1ad)]===0x0)return writeCliSideChannelLine(a150_0x156b10['yellow'](_0x2bad8a(0x17b))),{'ok':!![]};const _0x56e435=buildCompareRows(_0x3f20a0,_0x1b4b54);writeCliSideChannelLine(renderCompareTable(_0x56e435)),writeCliSideChannelLine('');const _0x3d40f5=await selectPages(_0x3f20a0,_0x1b4b54);writeCliSideChannelLine(''),writeCliSideChannelLine(a150_0x156b10[_0x2bad8a(0x19a)](_0x2bad8a(0x199)+_0x3d40f5['length']+_0x2bad8a(0x18b)));const _0x4904f9=_0x38cbca[_0x2bad8a(0x1b7)]&&_0x38cbca['cssUrl'];if(!_0x4904f9){writeCliSideChannelLine(renderSyncSummary(_0x3d40f5,_0x1b4b54[_0x2bad8a(0x17c)]>0x0));const _0x34ae7f=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x34ae7f)return writeCliSideChannelLine(a150_0x156b10[_0x2bad8a(0x1bf)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0xbfcfdd=_0x38cbca[_0x2bad8a(0x1b7)],_0x26d1b4=_0x38cbca[_0x2bad8a(0x189)];!_0xbfcfdd&&(_0xbfcfdd=await askJsUrl());!_0x26d1b4&&(_0x26d1b4=await askCssUrl());const _0x3d994c=await askConfirm(_0x2bad8a(0x19d)+_0x3d40f5[_0x2bad8a(0x1ad)]+'\x20menu(s)\x20with\x20JS:\x20'+_0xbfcfdd+_0x2bad8a(0x1b2)+_0x26d1b4+'?');if(!_0x3d994c)return writeCliSideChannelLine(a150_0x156b10['gray'](_0x2bad8a(0x1b0))),{'ok':!![]};const _0x126729=[_0xbfcfdd,_0x26d1b4],_0x45b573=startSpinner(_0x2bad8a(0x1a6)+_0x3d40f5[_0x2bad8a(0x1ad)]+_0x2bad8a(0x1aa));try{const _0x2aa464=await doCreateMenus(_0xc58c0d[_0x2bad8a(0x196)],_0xc58c0d[_0x2bad8a(0x17f)],_0x3d40f5,_0x126729);return stopSpinner(_0x45b573,_0x2bad8a(0x1a4)+_0x2aa464['created']+_0x2bad8a(0x17d),!![]),{'ok':!![],'data':_0x2aa464,'message':_0x2bad8a(0x1a3)+_0x2aa464['created']+'\x20created,\x20'+_0x2aa464['failed']+_0x2bad8a(0x1b1)};}catch(_0x29f4e6){stopSpinner(_0x45b573,_0x2bad8a(0x1a2),![]);throw CliErrors[_0x2bad8a(0x18e)](_0x29f4e6 instanceof Error?_0x29f4e6[_0x2bad8a(0x1b5)]:_0x2bad8a(0x1a2));}}};function ensureRunnableContext(_0x3d50a7,_0x41c69e){const _0x205a5c=a150_0x1810e1,_0x1de975=_0x3d50a7[_0x205a5c(0x1a1)]?String(_0x3d50a7[_0x205a5c(0x1a1)])['trim']():'';if(!isInProject()&&!_0x41c69e&&!_0x1de975)throw CliErrors['validation']('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x205a5c(0x19f));}function parsePaths(_0x450f6c){const _0x871525=a150_0x1810e1;return[...new Set(_0x450f6c['split'](',')[_0x871525(0x180)](_0x4b3fcf=>_0x4b3fcf[_0x871525(0x18d)]())[_0x871525(0x187)](Boolean))];}
@@ -1 +1 @@
1
- const a151_0x1434c8=a151_0x355f;(function(_0x4ba6b9,_0x5ca7d7){const _0x343ee3=a151_0x355f,_0x191e3f=_0x4ba6b9();while(!![]){try{const _0x162cd1=-parseInt(_0x343ee3(0x113))/0x1+parseInt(_0x343ee3(0x149))/0x2+parseInt(_0x343ee3(0x155))/0x3+parseInt(_0x343ee3(0x14f))/0x4+parseInt(_0x343ee3(0x15f))/0x5*(-parseInt(_0x343ee3(0x176))/0x6)+parseInt(_0x343ee3(0x172))/0x7*(parseInt(_0x343ee3(0x10f))/0x8)+parseInt(_0x343ee3(0x108))/0x9*(-parseInt(_0x343ee3(0x17a))/0xa);if(_0x162cd1===_0x5ca7d7)break;else _0x191e3f['push'](_0x191e3f['shift']());}catch(_0x2b3aef){_0x191e3f['push'](_0x191e3f['shift']());}}}(a151_0x2188,0xd41d9));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':'POST','path':a151_0x1434c8(0x132)}];export const menuVisibilityUpdate={'service':a151_0x1434c8(0x17d),'command':a151_0x1434c8(0x11d),'description':a151_0x1434c8(0x119),'risk':a151_0x1434c8(0x12b),'structuredErrors':!![],'flags':[{'name':a151_0x1434c8(0x163),'type':a151_0x1434c8(0x12a),'description':a151_0x1434c8(0x16a)},{'name':'paths','type':'string','description':a151_0x1434c8(0x17e)},{'name':a151_0x1434c8(0x150),'type':a151_0x1434c8(0x16c),'required':!![],'description':a151_0x1434c8(0x153)},{'name':a151_0x1434c8(0x130),'type':a151_0x1434c8(0x16c),'description':a151_0x1434c8(0x14c)},{'name':'expected-count','type':a151_0x1434c8(0x16e),'description':a151_0x1434c8(0x177)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x319ceb){parseInput(_0x319ceb),requireExplicitYes(_0x319ceb);},async 'dryRun'(_0x110529){const _0x3d838b=a151_0x1434c8,_0x84a1e=await buildPlan(_0x110529,!![]),_0x5266c4=_0x84a1e[_0x3d838b(0x114)][_0x3d838b(0x178)]?.[_0x3d838b(0x15d)]??0x0,_0x67d16e=_0x84a1e[_0x3d838b(0x114)][_0x3d838b(0x13f)][_0x3d838b(0x15d)]-_0x5266c4;return menuDryRunResult(_0x84a1e[_0x3d838b(0x114)],{'method':'POST','url':_0x3d838b(0x132),'body':{'updates':_0x84a1e['plan'][_0x3d838b(0x178)]?.[_0x3d838b(0x117)](_0x149785=>_0x149785[_0x3d838b(0x14e)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x5266c4+_0x3d838b(0x11a)+_0x67d16e+_0x3d838b(0x164)});},async 'execute'(_0xebb376){const _0xfe707f=a151_0x1434c8;requireExplicitYes(_0xebb376);const _0x435fa2=await buildPlan(_0xebb376,![]);await recheckMutationSnapshot(_0xebb376,_0x435fa2['plan'],_0xfe707f(0x122));const _0x452750=[],_0x57f931=[],_0x4abcf5=[];for(const _0x5ce168 of _0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x13f)]){if(_0x5ce168[_0xfe707f(0x10e)]['visible']===_0x435fa2['plan']['requestedVisible']){_0x452750[_0xfe707f(0x156)]({'id':_0x5ce168['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xebb376['appCode'],_0xebb376[_0xfe707f(0x137)],{'id':_0x5ce168['id'],'visible':_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x180)]}),_0x452750[_0xfe707f(0x156)]({'id':_0x5ce168['id'],'updated':!![],'skipped':![]});}catch(_0x37aea2){const _0x1e7d21=mapMenuApiError(_0x37aea2,'update\x20visibility\x20for',_0x5ce168['id']);if(isMenuResponseLoss(_0x37aea2)&&_0x1e7d21['code']!=='menu_permission_denied'){_0x4abcf5[_0xfe707f(0x156)](_0x5ce168['id']);continue;}_0x57f931['push']({'id':_0x5ce168['id'],'stage':_0xfe707f(0x112),'code':_0x1e7d21['code'],'message':_0x1e7d21['message']});}}let _0x529aa0;try{_0x529aa0=await fetchMenuSnapshot(_0xebb376['appCode'],_0xebb376[_0xfe707f(0x137)]);}catch(_0x538f9d){const _0x4dd1dc=describeMenuErrorCause(_0x538f9d,'verify\x20menu\x20visibility\x20update'),_0x2b72d2=_0x4abcf5[_0xfe707f(0x117)](_0x153f8f=>({'id':_0x153f8f,'stage':_0xfe707f(0x175),'code':_0xfe707f(0x135),'message':_0xfe707f(0x13d)+_0x153f8f+_0xfe707f(0x134),'requestedStateConfirmed':![],'recovered':![]})),_0x3709b3={'stage':'verification','code':_0xfe707f(0x135),'message':_0xfe707f(0x17b),'targetIds':_0x435fa2[_0xfe707f(0x114)]['targets']['map'](_0x5b9fb2=>_0x5b9fb2['id']),'requestedStateConfirmed':![],..._0x4dd1dc};throw menuFailure(asVerificationError(_0x538f9d,_0xfe707f(0x13a)),_0x435fa2[_0xfe707f(0x114)],{'stage':_0xfe707f(0x14b),'succeeded':_0x452750,'failedRecords':[..._0x57f931,..._0x2b72d2,_0x3709b3],'warnings':[_0xfe707f(0x157)],'verification':{'status':_0xfe707f(0x15c),'recoveredCount':0x0,'lookupCommand':_0xfe707f(0x127)}});}const _0x4e7dbc=[];for(const _0x2d7757 of _0x452750){const _0x5b4d8a=Number(_0x2d7757['id']),_0x554253=_0x435fa2[_0xfe707f(0x161)][_0xfe707f(0x123)](_0x5b4d8a),_0x1e32d5=_0x529aa0[_0xfe707f(0x159)][_0xfe707f(0x123)](_0x5b4d8a);try{verifyVisibilityUpdate(_0x554253,_0x1e32d5,_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x180)]);}catch(_0x1e7e54){const _0xfc31b7=asVerificationError(_0x1e7e54,_0xfe707f(0x11b)+_0x5b4d8a+_0xfe707f(0x115));_0x4e7dbc['push']({'id':_0x5b4d8a,'stage':_0xfe707f(0x14b),'code':_0xfc31b7[_0xfe707f(0x148)],'message':_0xfc31b7[_0xfe707f(0x160)],'requestedStateConfirmed':![]});}}for(const _0x5c4a90 of _0x4abcf5){const _0x212cc0=_0x435fa2[_0xfe707f(0x161)]['get'](_0x5c4a90),_0x1f43ff=_0x529aa0[_0xfe707f(0x159)][_0xfe707f(0x123)](_0x5c4a90);try{verifyVisibilityUpdate(_0x212cc0,_0x1f43ff,_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x180)]),_0x452750[_0xfe707f(0x156)]({'id':_0x5c4a90,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x3205d6){const _0x3cd0b1=asVerificationError(_0x3205d6,_0xfe707f(0x14d)+_0x5c4a90+_0xfe707f(0x17f));_0x4e7dbc[_0xfe707f(0x156)]({'id':_0x5c4a90,'stage':_0xfe707f(0x175),'code':_0x3cd0b1[_0xfe707f(0x148)],'message':_0x3cd0b1[_0xfe707f(0x160)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4e7dbc[_0xfe707f(0x15d)]>0x0){const _0x1c0284=_0x4e7dbc[_0xfe707f(0x117)](_0x445425=>Number(_0x445425['id'])),_0x53b08a=_0x452750[_0xfe707f(0x15a)](_0x32ec10=>_0x32ec10['recovered']===!![])[_0xfe707f(0x15d)],_0x1521d2=menuError(_0xfe707f(0x135),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x1c0284[_0xfe707f(0x12c)](',\x20')+'.',_0xfe707f(0x179));throw menuFailure(_0x1521d2,_0x435fa2[_0xfe707f(0x114)],{'stage':_0xfe707f(0x14b),'succeeded':_0x452750,'failedRecords':[..._0x57f931,..._0x4e7dbc],'warnings':[_0xfe707f(0x131)],'verification':{'status':_0xfe707f(0x15c),..._0x1c0284['length']===0x1?{'targetId':_0x1c0284[0x0]}:{'targetIds':_0x1c0284},'recoveredCount':_0x53b08a,'lookupCommand':_0xfe707f(0x127)}});}const _0x2085fb=_0x452750[_0xfe707f(0x15a)](_0x4df252=>_0x4df252['updated']===!![])['length'],_0x1ab325=_0x452750[_0xfe707f(0x15d)]-_0x2085fb,_0x3cf9f2={..._0x435fa2[_0xfe707f(0x114)],'succeeded':_0x452750,'failed':_0x57f931,'warnings':_0x57f931[_0xfe707f(0x15d)]>0x0?[..._0x435fa2['plan'][_0xfe707f(0x133)],_0xfe707f(0x10a)]:_0x435fa2[_0xfe707f(0x114)][_0xfe707f(0x133)],'verification':{'checkedBy':_0xfe707f(0x181),'snapshotHash':_0x529aa0['hash'],'matchesRequestedState':_0x57f931[_0xfe707f(0x15d)]===0x0,'recoveredCount':_0x4abcf5[_0xfe707f(0x15d)]}};return{'ok':_0x57f931[_0xfe707f(0x15d)]===0x0,'data':_0x3cf9f2,'message':_0x57f931[_0xfe707f(0x15d)]===0x0?_0xfe707f(0x12e)+_0x2085fb+_0xfe707f(0x15e)+_0x1ab325+_0xfe707f(0x164):'Menu\x20visibility\x20update\x20completed:\x20'+_0x2085fb+'\x20updated,\x20'+_0x1ab325+_0xfe707f(0x11e)+_0x57f931[_0xfe707f(0x15d)]+_0xfe707f(0x173)};}};function a151_0x355f(_0x1b78ad,_0x35c544){_0x1b78ad=_0x1b78ad-0x107;const _0x218845=a151_0x2188();let _0x355fff=_0x218845[_0x1b78ad];return _0x355fff;}function parseInput(_0x3d6962){const _0x511761=a151_0x1434c8,_0x2789c0=parseMenuIds(_0x3d6962['str'](_0x511761(0x163))),_0x4e8ead=parseCsv(_0x3d6962[_0x511761(0x12d)]('paths'));if(_0x2789c0[_0x511761(0x15d)]===0x0&&_0x4e8ead[_0x511761(0x15d)]===0x0)throw CliErrors[_0x511761(0x10b)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x3cf9ea=parseBooleanFlag(_0x3d6962,_0x511761(0x150),!![]),_0xab8bea=parseBooleanFlag(_0x3d6962,_0x511761(0x130),![]);let _0xa39c74;if(hasFlag(_0x3d6962,_0x511761(0x15b))){_0xa39c74=_0x3d6962[_0x511761(0x167)](_0x511761(0x15b));if(!Number[_0x511761(0x10c)](_0xa39c74)||_0xa39c74<0x0)throw CliErrors['validation'](_0x511761(0x11f));}return{'menuIds':_0x2789c0,'paths':_0x4e8ead,'visible':_0x3cf9ea,'expectVisible':_0xab8bea,'expectedCount':_0xa39c74};}async function buildPlan(_0x371710,_0x1c8fbf){const _0x5a0067=a151_0x1434c8,_0x2b7e91=parseInput(_0x371710),_0x180275=await fetchMutationSnapshot(_0x371710,_0x5a0067(0x122)),_0x2c930d=selectTargets(_0x180275[_0x5a0067(0x107)],_0x2b7e91[_0x5a0067(0x125)],_0x2b7e91[_0x5a0067(0x144)]);if(_0x2b7e91['expectedCount']!==undefined&&_0x2c930d['length']!==_0x2b7e91[_0x5a0067(0x169)])throw menuError('menu_expected_count_mismatch','Selected\x20'+_0x2c930d['length']+_0x5a0067(0x128)+_0x2b7e91['expectedCount']+'.',_0x5a0067(0x109));if(_0x2b7e91[_0x5a0067(0x120)]!==undefined){const _0x2a836d=_0x2c930d[_0x5a0067(0x15a)](_0x6753c9=>_0x6753c9[_0x5a0067(0x150)]!==_0x2b7e91[_0x5a0067(0x120)]);if(_0x2a836d[_0x5a0067(0x15d)]>0x0)throw menuError(_0x5a0067(0x126),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x2a836d[_0x5a0067(0x117)](_0x5e6dee=>_0x5e6dee['id'])[_0x5a0067(0x12c)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x237198=_0x2c930d[_0x5a0067(0x117)](_0x3096fb=>({'id':_0x3096fb['id'],'label':_0x3096fb[_0x5a0067(0x111)],'path':_0x3096fb[_0x5a0067(0x12f)],'before':{'visible':_0x3096fb[_0x5a0067(0x150)]},'after':{'visible':_0x2b7e91[_0x5a0067(0x150)]}})),_0x4e24bf=_0x237198[_0x5a0067(0x15a)](_0x27d004=>_0x27d004[_0x5a0067(0x10e)]['visible']!==_0x2b7e91[_0x5a0067(0x150)])[_0x5a0067(0x117)](_0xe48776=>({'stage':_0x5a0067(0x14a),'method':_0x5a0067(0x13b),'path':_0x5a0067(0x132),'body':{'appCode':_0x371710['appCode'],'id':_0xe48776['id'],'visible':_0x2b7e91[_0x5a0067(0x150)]}})),_0x52fff6=mutationResult({'operation':_0x5a0067(0x11d),'selector':{'menuIds':_0x2b7e91['menuIds'],'paths':_0x2b7e91[_0x5a0067(0x144)]},'before':{'menus':_0x2c930d[_0x5a0067(0x117)](_0x1c64ff=>({'id':_0x1c64ff['id'],'path':_0x1c64ff[_0x5a0067(0x12f)],'visible':_0x1c64ff[_0x5a0067(0x150)]}))},'after':{'menus':_0x2c930d[_0x5a0067(0x117)](_0x3ef778=>({'id':_0x3ef778['id'],'path':_0x3ef778['path'],'visible':_0x2b7e91[_0x5a0067(0x150)]}))},'dryRun':_0x1c8fbf,'backend':[...BACKEND],'plannedActions':_0x4e24bf,'snapshotHash':_0x180275[_0x5a0067(0x138)],'warnings':_0x4e24bf['length']===0x0?[_0x5a0067(0x118)]:[]});return{'plan':{..._0x52fff6,'requestedVisible':_0x2b7e91[_0x5a0067(0x150)],'targets':_0x237198},'beforeById':new Map(_0x2c930d['map'](_0x1e82e0=>[_0x1e82e0['id'],_0x1e82e0]))};}function selectTargets(_0x1b9fea,_0x3a840e,_0x1b1934){const _0x2a85cb=a151_0x1434c8,_0x18e524=new Map(_0x1b9fea[_0x2a85cb(0x117)](_0xde8168=>[_0xde8168['id'],_0xde8168])),_0x31d170=new Map(),_0x55f879=_0x3a840e[_0x2a85cb(0x15a)](_0xa7d43d=>!_0x18e524[_0x2a85cb(0x139)](_0xa7d43d));if(_0x55f879[_0x2a85cb(0x15d)]>0x0)throw menuError(_0x2a85cb(0x145),_0x2a85cb(0x158)+_0x55f879[_0x2a85cb(0x12c)](',\x20')+'.',_0x2a85cb(0x143));for(const _0x388315 of _0x3a840e){_0x31d170[_0x2a85cb(0x141)](_0x388315,_0x18e524['get'](_0x388315));}for(const _0x35325b of _0x1b1934){const _0x28965d=_0x1b9fea['filter'](_0x3ec924=>_0x3ec924['path']===_0x35325b);if(_0x28965d[_0x2a85cb(0x15d)]===0x0)throw menuError(_0x2a85cb(0x145),_0x2a85cb(0x154)+JSON[_0x2a85cb(0x16b)](_0x35325b)+'.',_0x2a85cb(0x110));if(_0x28965d[_0x2a85cb(0x15d)]>0x1)throw menuError(_0x2a85cb(0x17c),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x35325b)+'.',_0x2a85cb(0x151)+_0x28965d[_0x2a85cb(0x117)](_0x9624e7=>_0x9624e7['id'])['join'](',\x20')+'.');const _0x4d51f4=_0x28965d[0x0];_0x31d170[_0x2a85cb(0x141)](_0x4d51f4['id'],_0x4d51f4);}return[..._0x31d170[_0x2a85cb(0x136)]()];}function parseMenuIds(_0x57cd61){const _0x2baff2=a151_0x1434c8,_0x10eec2=parseCsv(_0x57cd61),_0x32a2f2=_0x10eec2['map'](Number);if(_0x32a2f2[_0x2baff2(0x11c)](_0x18284a=>!Number['isSafeInteger'](_0x18284a)||_0x18284a<=0x0))throw CliErrors[_0x2baff2(0x10b)](_0x2baff2(0x171));return[...new Set(_0x32a2f2)];}function parseCsv(_0x1f41ff){const _0x217ef5=a151_0x1434c8;return[...new Set(_0x1f41ff['split'](',')[_0x217ef5(0x117)](_0x29f064=>_0x29f064[_0x217ef5(0x140)]())[_0x217ef5(0x15a)](Boolean))];}function a151_0x2188(){const _0x3e9faf=['path','expect-visible','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','/smartapi/menu/update','warnings','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','menu_verification_failed','values','cookie','hash','has','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','POST','resources','Response\x20was\x20lost\x20for\x20menu\x20','rawFlags','targets','trim','set','pageId','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','paths','menu_selector_not_found','\x20must\x20be\x20true\x20or\x20false.','false','code','3450676FBlbdj','update-menu-visibility','verification','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Response\x20was\x20lost\x20and\x20menu\x20','body','5054448arRYbQ','visible','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','sort','Requested\x20menu\x20visibility','Menu\x20path\x20selector\x20not\x20found:\x20','3623871qeTDPo','push','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Menu\x20id\x20selector(s)\x20not\x20found:\x20','byId','filter','expected-count','failed','length','\x20menu(s);\x20skipped\x20','5CwohXU','message','beforeById','resourcesValid','menu-ids','\x20unchanged\x20menu(s).','childrenIds','depth','num','isArray','expectedCount','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','stringify','boolean','url','number','datasetCode','flagMissing','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','98ywDtcP','\x20failed.','type','update-recovery','5742834VJxgmJ','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','plannedActions','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','5270eWinCk','Final\x20menu\x20visibility\x20readback\x20failed.','menu_selector_ambiguous','menu','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','requestedVisible','menu\x20list','menus','15633nWVFbI','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','validation','isSafeInteger','childrenCount','before','40808tULFIv','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','label','update','1526958WxJQeN','plan','\x20visibility\x20update\x20could\x20not\x20be\x20verified','datasetId','map','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','\x20menu(s);\x20skip\x20','Menu\x20','some','visibility-update','\x20skipped,\x20','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','expectVisible','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','update\x20menu\x20visibility','get','modelType','menuIds','menu_state_drift','rabetbase\x20menu\x20list\x20--format\x20compress','\x20menu(s),\x20expected\x20','pageType','string','high-risk-write','join','str','Updated\x20visibility\x20for\x20'];a151_0x2188=function(){return _0x3e9faf;};return a151_0x2188();}function parseBooleanFlag(_0x3558cc,_0x2976af,_0x584331){const _0x1b5c9d=a151_0x1434c8;if(!hasFlag(_0x3558cc,_0x2976af)){if(_0x584331)throw CliErrors[_0x1b5c9d(0x170)](_0x2976af);return undefined;}const _0x2c257a=_0x3558cc[_0x1b5c9d(0x13e)][_0x2976af];if(_0x2c257a===!![]||_0x2c257a===![])return _0x2c257a;if(_0x2c257a==='true')return!![];if(_0x2c257a===_0x1b5c9d(0x147))return![];throw CliErrors[_0x1b5c9d(0x10b)]('--'+_0x2976af+_0x1b5c9d(0x146));}function verifyVisibilityUpdate(_0x345c87,_0x4e763e,_0x1c90f4){const _0x1a8d73=a151_0x1434c8;assertVerified(!!_0x4e763e,_0x1a8d73(0x11b)+_0x345c87['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x4e763e[_0x1a8d73(0x150)]===_0x1c90f4,_0x1a8d73(0x11b)+_0x345c87['id']+_0x1a8d73(0x121));const _0x4d51da=[['id',_0x4e763e['id'],_0x345c87['id']],['parentId',_0x4e763e['parentId'],_0x345c87['parentId']],[_0x1a8d73(0x166),_0x4e763e['depth'],_0x345c87['depth']],['label',_0x4e763e['label'],_0x345c87['label']],[_0x1a8d73(0x12f),_0x4e763e[_0x1a8d73(0x12f)],_0x345c87[_0x1a8d73(0x12f)]],[_0x1a8d73(0x16d),_0x4e763e['url'],_0x345c87[_0x1a8d73(0x16d)]],[_0x1a8d73(0x174),_0x4e763e[_0x1a8d73(0x174)],_0x345c87[_0x1a8d73(0x174)]],['sort',_0x4e763e['sort'],_0x345c87[_0x1a8d73(0x152)]],['resources',_0x4e763e[_0x1a8d73(0x13c)],_0x345c87[_0x1a8d73(0x13c)]],[_0x1a8d73(0x162),_0x4e763e[_0x1a8d73(0x162)],_0x345c87[_0x1a8d73(0x162)]],['childrenIds',_0x4e763e[_0x1a8d73(0x165)],_0x345c87[_0x1a8d73(0x165)]],[_0x1a8d73(0x10d),_0x4e763e['childrenCount'],_0x345c87[_0x1a8d73(0x10d)]],[_0x1a8d73(0x142),_0x4e763e[_0x1a8d73(0x142)],_0x345c87['pageId']],[_0x1a8d73(0x129),_0x4e763e[_0x1a8d73(0x129)],_0x345c87[_0x1a8d73(0x129)]],[_0x1a8d73(0x124),_0x4e763e[_0x1a8d73(0x124)],_0x345c87[_0x1a8d73(0x124)]],[_0x1a8d73(0x116),_0x4e763e[_0x1a8d73(0x116)],_0x345c87['datasetId']],[_0x1a8d73(0x16f),_0x4e763e[_0x1a8d73(0x16f)],_0x345c87[_0x1a8d73(0x16f)]]];for(const [_0x427080,_0x5e328b,_0x1520e3]of _0x4d51da){assertVerified(sameValue(_0x5e328b,_0x1520e3),_0x1a8d73(0x11b)+_0x345c87['id']+'\x20'+_0x427080+'\x20changed\x20unexpectedly.');}}function sameValue(_0x324994,_0x379a67){const _0x1319c7=a151_0x1434c8;if(Array[_0x1319c7(0x168)](_0x324994)||Array[_0x1319c7(0x168)](_0x379a67))return JSON[_0x1319c7(0x16b)](_0x324994)===JSON[_0x1319c7(0x16b)](_0x379a67);return _0x324994===_0x379a67;}
1
+ const a151_0x2c6522=a151_0x2465;function a151_0x2465(_0x422b47,_0x3ddec8){_0x422b47=_0x422b47-0x1d9;const _0x25ab1f=a151_0x25ab();let _0x24651d=_0x25ab1f[_0x422b47];return _0x24651d;}(function(_0x282213,_0x47b120){const _0x4309e=a151_0x2465,_0x5a1092=_0x282213();while(!![]){try{const _0x2088cd=-parseInt(_0x4309e(0x22b))/0x1+parseInt(_0x4309e(0x21f))/0x2*(-parseInt(_0x4309e(0x208))/0x3)+parseInt(_0x4309e(0x230))/0x4*(parseInt(_0x4309e(0x214))/0x5)+-parseInt(_0x4309e(0x250))/0x6*(-parseInt(_0x4309e(0x24b))/0x7)+-parseInt(_0x4309e(0x23b))/0x8+-parseInt(_0x4309e(0x238))/0x9+parseInt(_0x4309e(0x203))/0xa*(parseInt(_0x4309e(0x228))/0xb);if(_0x2088cd===_0x47b120)break;else _0x5a1092['push'](_0x5a1092['shift']());}catch(_0x1f7b08){_0x5a1092['push'](_0x5a1092['shift']());}}}(a151_0x25ab,0x57b41));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a151_0x25ab(){const _0x4d4aa7=['rabetbase\x20menu\x20list\x20--format\x20compress','expected-count','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','pageType','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','141197CsTHrT','childrenCount','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu-ids','datasetCode','144xSRhph','values','stringify','url','expect-visible','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','menu_permission_denied','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','updated','expectVisible','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','menu_expected_count_mismatch','depth','Menu\x20id\x20selector(s)\x20not\x20found:\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20failed.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','menu','verification','paths','split','str','visible','\x20unchanged\x20menu(s).','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','path','visibility-update','update-recovery','map','Menu\x20path\x20selector\x20not\x20found:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','flagMissing','warnings','failed','cookie','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','length','high-risk-write','\x20updated,\x20','false','byId','filter','menuIds','boolean','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','80jMCbhY','appCode','POST','menu_verification_failed','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','307947DmZIfS','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20menu(s),\x20expected\x20','childrenIds','/smartapi/menu/update','\x20must\x20be\x20true\x20or\x20false.','Response\x20was\x20lost\x20for\x20menu\x20','before','parentId','Selected\x20','plan','type','635AQzYIV','\x20menu(s);\x20skipped\x20','resourcesValid','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','isSafeInteger','sort','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','push','menus','menu_selector_ambiguous','num','6Ptbxag','\x20changed\x20unexpectedly.','pageId','plannedActions','menu_selector_not_found','resources','set','code','get','1564585FJkrPb','message','join','301522UZeelR','isArray','\x20skipped,\x20','beforeById','Updated\x20visibility\x20for\x20','2728pkXRpu','Would\x20update\x20visibility\x20for\x20','label','datasetId','number','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','update\x20menu\x20visibility','requestedVisible','3597669zKZUPU','recovered','validation','2721240NEWPOr','update','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','targets','update-menu-visibility','expectedCount','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','modelType','Menu\x20','has','string'];a151_0x25ab=function(){return _0x4d4aa7;};return a151_0x25ab();}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':a151_0x2c6522(0x205),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a151_0x2c6522(0x1e6),'command':'visibility-update','description':a151_0x2c6522(0x1f3),'risk':a151_0x2c6522(0x1fb),'structuredErrors':!![],'flags':[{'name':a151_0x2c6522(0x24e),'type':'string','description':a151_0x2c6522(0x24a)},{'name':a151_0x2c6522(0x1e8),'type':a151_0x2c6522(0x245),'description':a151_0x2c6522(0x1f4)},{'name':a151_0x2c6522(0x1eb),'type':'boolean','required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a151_0x2c6522(0x254),'type':a151_0x2c6522(0x201),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a151_0x2c6522(0x247),'type':a151_0x2c6522(0x234),'description':a151_0x2c6522(0x23d)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3ddda8){parseInput(_0x3ddda8),requireExplicitYes(_0x3ddda8);},async 'dryRun'(_0x2ae315){const _0x1c8ec2=a151_0x2c6522,_0x38f408=await buildPlan(_0x2ae315,!![]),_0x1b5fcc=_0x38f408['plan'][_0x1c8ec2(0x222)]?.[_0x1c8ec2(0x1fa)]??0x0,_0x3fb311=_0x38f408['plan'][_0x1c8ec2(0x23e)][_0x1c8ec2(0x1fa)]-_0x1b5fcc;return menuDryRunResult(_0x38f408[_0x1c8ec2(0x212)],{'method':_0x1c8ec2(0x205),'url':_0x1c8ec2(0x20c),'body':{'updates':_0x38f408[_0x1c8ec2(0x212)][_0x1c8ec2(0x222)]?.[_0x1c8ec2(0x1f1)](_0x315490=>_0x315490['body'])??[]},'description':_0x1c8ec2(0x231)+_0x1b5fcc+'\x20menu(s);\x20skip\x20'+_0x3fb311+_0x1c8ec2(0x1ec)});},async 'execute'(_0x5e759b){const _0x10a077=a151_0x2c6522;requireExplicitYes(_0x5e759b);const _0x287d15=await buildPlan(_0x5e759b,![]);await recheckMutationSnapshot(_0x5e759b,_0x287d15['plan'],_0x10a077(0x236));const _0x2e519c=[],_0x13230d=[],_0x13a818=[];for(const _0x38893a of _0x287d15[_0x10a077(0x212)][_0x10a077(0x23e)]){if(_0x38893a[_0x10a077(0x20f)][_0x10a077(0x1eb)]===_0x287d15[_0x10a077(0x212)][_0x10a077(0x237)]){_0x2e519c[_0x10a077(0x21b)]({'id':_0x38893a['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x5e759b['appCode'],_0x5e759b[_0x10a077(0x1f8)],{'id':_0x38893a['id'],'visible':_0x287d15['plan'][_0x10a077(0x237)]}),_0x2e519c[_0x10a077(0x21b)]({'id':_0x38893a['id'],'updated':!![],'skipped':![]});}catch(_0x1ecfe5){const _0x46d529=mapMenuApiError(_0x1ecfe5,'update\x20visibility\x20for',_0x38893a['id']);if(isMenuResponseLoss(_0x1ecfe5)&&_0x46d529[_0x10a077(0x226)]!==_0x10a077(0x1d9)){_0x13a818['push'](_0x38893a['id']);continue;}_0x13230d[_0x10a077(0x21b)]({'id':_0x38893a['id'],'stage':_0x10a077(0x23c),'code':_0x46d529[_0x10a077(0x226)],'message':_0x46d529['message']});}}let _0x223952;try{_0x223952=await fetchMenuSnapshot(_0x5e759b[_0x10a077(0x204)],_0x5e759b[_0x10a077(0x1f8)]);}catch(_0xe0c97d){const _0x4c1354=describeMenuErrorCause(_0xe0c97d,'verify\x20menu\x20visibility\x20update'),_0x473565=_0x13a818[_0x10a077(0x1f1)](_0x10d03d=>({'id':_0x10d03d,'stage':_0x10a077(0x1f0),'code':_0x10a077(0x206),'message':_0x10a077(0x20e)+_0x10d03d+_0x10a077(0x1e4),'requestedStateConfirmed':![],'recovered':![]})),_0x84f14={'stage':_0x10a077(0x1e7),'code':_0x10a077(0x206),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x287d15[_0x10a077(0x212)]['targets'][_0x10a077(0x1f1)](_0x60b8f4=>_0x60b8f4['id']),'requestedStateConfirmed':![],..._0x4c1354};throw menuFailure(asVerificationError(_0xe0c97d,_0x10a077(0x207)),_0x287d15['plan'],{'stage':_0x10a077(0x1e7),'succeeded':_0x2e519c,'failedRecords':[..._0x13230d,..._0x473565,_0x84f14],'warnings':[_0x10a077(0x202)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':_0x10a077(0x246)}});}const _0x4a4ca7=[];for(const _0x492bac of _0x2e519c){const _0x5b7604=Number(_0x492bac['id']),_0x3f069f=_0x287d15[_0x10a077(0x22e)]['get'](_0x5b7604),_0x59f101=_0x223952[_0x10a077(0x1fe)][_0x10a077(0x227)](_0x5b7604);try{verifyVisibilityUpdate(_0x3f069f,_0x59f101,_0x287d15[_0x10a077(0x212)][_0x10a077(0x237)]);}catch(_0x3e4bf5){const _0x10c4c5=asVerificationError(_0x3e4bf5,_0x10a077(0x243)+_0x5b7604+_0x10a077(0x1de));_0x4a4ca7[_0x10a077(0x21b)]({'id':_0x5b7604,'stage':_0x10a077(0x1e7),'code':_0x10c4c5[_0x10a077(0x226)],'message':_0x10c4c5[_0x10a077(0x229)],'requestedStateConfirmed':![]});}}for(const _0x2f37f4 of _0x13a818){const _0x15c66f=_0x287d15['beforeById'][_0x10a077(0x227)](_0x2f37f4),_0x4a726b=_0x223952[_0x10a077(0x1fe)][_0x10a077(0x227)](_0x2f37f4);try{verifyVisibilityUpdate(_0x15c66f,_0x4a726b,_0x287d15['plan'][_0x10a077(0x237)]),_0x2e519c[_0x10a077(0x21b)]({'id':_0x2f37f4,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x4f15bd){const _0x5a03ce=asVerificationError(_0x4f15bd,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x2f37f4+_0x10a077(0x24d));_0x4a4ca7[_0x10a077(0x21b)]({'id':_0x2f37f4,'stage':_0x10a077(0x1f0),'code':_0x5a03ce['code'],'message':_0x5a03ce[_0x10a077(0x229)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4a4ca7[_0x10a077(0x1fa)]>0x0){const _0x5cd76d=_0x4a4ca7['map'](_0x4f827d=>Number(_0x4f827d['id'])),_0x4fd200=_0x2e519c['filter'](_0x2533d8=>_0x2533d8[_0x10a077(0x239)]===!![])[_0x10a077(0x1fa)],_0x56c295=menuError('menu_verification_failed',_0x10a077(0x255)+_0x5cd76d[_0x10a077(0x22a)](',\x20')+'.',_0x10a077(0x248));throw menuFailure(_0x56c295,_0x287d15[_0x10a077(0x212)],{'stage':_0x10a077(0x1e7),'succeeded':_0x2e519c,'failedRecords':[..._0x13230d,..._0x4a4ca7],'warnings':[_0x10a077(0x209)],'verification':{'status':_0x10a077(0x1f7),..._0x5cd76d[_0x10a077(0x1fa)]===0x1?{'targetId':_0x5cd76d[0x0]}:{'targetIds':_0x5cd76d},'recoveredCount':_0x4fd200,'lookupCommand':_0x10a077(0x246)}});}const _0x31c125=_0x2e519c['filter'](_0x2b2043=>_0x2b2043[_0x10a077(0x1db)]===!![])[_0x10a077(0x1fa)],_0x32b0c4=_0x2e519c[_0x10a077(0x1fa)]-_0x31c125,_0x566329={..._0x287d15['plan'],'succeeded':_0x2e519c,'failed':_0x13230d,'warnings':_0x13230d[_0x10a077(0x1fa)]>0x0?[..._0x287d15[_0x10a077(0x212)][_0x10a077(0x1f6)],_0x10a077(0x217)]:_0x287d15[_0x10a077(0x212)][_0x10a077(0x1f6)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x223952['hash'],'matchesRequestedState':_0x13230d[_0x10a077(0x1fa)]===0x0,'recoveredCount':_0x13a818['length']}};return{'ok':_0x13230d[_0x10a077(0x1fa)]===0x0,'data':_0x566329,'message':_0x13230d[_0x10a077(0x1fa)]===0x0?_0x10a077(0x22f)+_0x31c125+_0x10a077(0x215)+_0x32b0c4+_0x10a077(0x1ec):'Menu\x20visibility\x20update\x20completed:\x20'+_0x31c125+_0x10a077(0x1fc)+_0x32b0c4+_0x10a077(0x22d)+_0x13230d[_0x10a077(0x1fa)]+_0x10a077(0x1e3)};}};function parseInput(_0x2d944f){const _0x15bbc8=a151_0x2c6522,_0x50676b=parseMenuIds(_0x2d944f[_0x15bbc8(0x1ea)](_0x15bbc8(0x24e))),_0x3d9b34=parseCsv(_0x2d944f[_0x15bbc8(0x1ea)](_0x15bbc8(0x1e8)));if(_0x50676b[_0x15bbc8(0x1fa)]===0x0&&_0x3d9b34[_0x15bbc8(0x1fa)]===0x0)throw CliErrors[_0x15bbc8(0x23a)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x4e7150=parseBooleanFlag(_0x2d944f,_0x15bbc8(0x1eb),!![]),_0xa8881e=parseBooleanFlag(_0x2d944f,'expect-visible',![]);let _0xec3f11;if(hasFlag(_0x2d944f,_0x15bbc8(0x247))){_0xec3f11=_0x2d944f[_0x15bbc8(0x21e)](_0x15bbc8(0x247));if(!Number[_0x15bbc8(0x218)](_0xec3f11)||_0xec3f11<0x0)throw CliErrors[_0x15bbc8(0x23a)](_0x15bbc8(0x235));}return{'menuIds':_0x50676b,'paths':_0x3d9b34,'visible':_0x4e7150,'expectVisible':_0xa8881e,'expectedCount':_0xec3f11};}async function buildPlan(_0x3f4267,_0x1cd4d7){const _0x4dc8ca=a151_0x2c6522,_0x4817d9=parseInput(_0x3f4267),_0x2ec0ae=await fetchMutationSnapshot(_0x3f4267,_0x4dc8ca(0x236)),_0x3e263e=selectTargets(_0x2ec0ae[_0x4dc8ca(0x21c)],_0x4817d9[_0x4dc8ca(0x200)],_0x4817d9[_0x4dc8ca(0x1e8)]);if(_0x4817d9['expectedCount']!==undefined&&_0x3e263e[_0x4dc8ca(0x1fa)]!==_0x4817d9[_0x4dc8ca(0x240)])throw menuError(_0x4dc8ca(0x1df),_0x4dc8ca(0x211)+_0x3e263e[_0x4dc8ca(0x1fa)]+_0x4dc8ca(0x20a)+_0x4817d9[_0x4dc8ca(0x240)]+'.',_0x4dc8ca(0x1da));if(_0x4817d9[_0x4dc8ca(0x1dc)]!==undefined){const _0x28fd95=_0x3e263e[_0x4dc8ca(0x1ff)](_0x529453=>_0x529453['visible']!==_0x4817d9[_0x4dc8ca(0x1dc)]);if(_0x28fd95[_0x4dc8ca(0x1fa)]>0x0)throw menuError('menu_state_drift',_0x4dc8ca(0x1e2)+_0x28fd95['map'](_0x52314b=>_0x52314b['id'])[_0x4dc8ca(0x22a)](',\x20')+'.',_0x4dc8ca(0x1f9));}const _0x823447=_0x3e263e[_0x4dc8ca(0x1f1)](_0x12b6ad=>({'id':_0x12b6ad['id'],'label':_0x12b6ad[_0x4dc8ca(0x232)],'path':_0x12b6ad['path'],'before':{'visible':_0x12b6ad[_0x4dc8ca(0x1eb)]},'after':{'visible':_0x4817d9[_0x4dc8ca(0x1eb)]}})),_0x4eb27a=_0x823447[_0x4dc8ca(0x1ff)](_0x58d73f=>_0x58d73f[_0x4dc8ca(0x20f)][_0x4dc8ca(0x1eb)]!==_0x4817d9[_0x4dc8ca(0x1eb)])['map'](_0x37a78f=>({'stage':_0x4dc8ca(0x23f),'method':_0x4dc8ca(0x205),'path':'/smartapi/menu/update','body':{'appCode':_0x3f4267[_0x4dc8ca(0x204)],'id':_0x37a78f['id'],'visible':_0x4817d9[_0x4dc8ca(0x1eb)]}})),_0x5279a8=mutationResult({'operation':_0x4dc8ca(0x1ef),'selector':{'menuIds':_0x4817d9['menuIds'],'paths':_0x4817d9['paths']},'before':{'menus':_0x3e263e[_0x4dc8ca(0x1f1)](_0x25477d=>({'id':_0x25477d['id'],'path':_0x25477d[_0x4dc8ca(0x1ee)],'visible':_0x25477d['visible']}))},'after':{'menus':_0x3e263e[_0x4dc8ca(0x1f1)](_0x37443e=>({'id':_0x37443e['id'],'path':_0x37443e[_0x4dc8ca(0x1ee)],'visible':_0x4817d9['visible']}))},'dryRun':_0x1cd4d7,'backend':[...BACKEND],'plannedActions':_0x4eb27a,'snapshotHash':_0x2ec0ae['hash'],'warnings':_0x4eb27a['length']===0x0?[_0x4dc8ca(0x1dd)]:[]});return{'plan':{..._0x5279a8,'requestedVisible':_0x4817d9[_0x4dc8ca(0x1eb)],'targets':_0x823447},'beforeById':new Map(_0x3e263e[_0x4dc8ca(0x1f1)](_0x1c0f08=>[_0x1c0f08['id'],_0x1c0f08]))};}function selectTargets(_0x130f36,_0x55d3f3,_0x3359d3){const _0x5e5b25=a151_0x2c6522,_0x29baf9=new Map(_0x130f36[_0x5e5b25(0x1f1)](_0x2cbc66=>[_0x2cbc66['id'],_0x2cbc66])),_0x3148c5=new Map(),_0x342a43=_0x55d3f3[_0x5e5b25(0x1ff)](_0x368c33=>!_0x29baf9[_0x5e5b25(0x244)](_0x368c33));if(_0x342a43[_0x5e5b25(0x1fa)]>0x0)throw menuError(_0x5e5b25(0x223),_0x5e5b25(0x1e1)+_0x342a43[_0x5e5b25(0x22a)](',\x20')+'.',_0x5e5b25(0x21a));for(const _0x3ff442 of _0x55d3f3){_0x3148c5['set'](_0x3ff442,_0x29baf9['get'](_0x3ff442));}for(const _0x572306 of _0x3359d3){const _0x475b30=_0x130f36[_0x5e5b25(0x1ff)](_0x34d681=>_0x34d681['path']===_0x572306);if(_0x475b30['length']===0x0)throw menuError(_0x5e5b25(0x223),_0x5e5b25(0x1f2)+JSON['stringify'](_0x572306)+'.',_0x5e5b25(0x1ed));if(_0x475b30[_0x5e5b25(0x1fa)]>0x1)throw menuError(_0x5e5b25(0x21d),_0x5e5b25(0x241)+JSON[_0x5e5b25(0x252)](_0x572306)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x475b30[_0x5e5b25(0x1f1)](_0x2ab42a=>_0x2ab42a['id'])[_0x5e5b25(0x22a)](',\x20')+'.');const _0x2fe32e=_0x475b30[0x0];_0x3148c5[_0x5e5b25(0x225)](_0x2fe32e['id'],_0x2fe32e);}return[..._0x3148c5[_0x5e5b25(0x251)]()];}function parseMenuIds(_0x492da8){const _0x3c580d=a151_0x2c6522,_0x343c66=parseCsv(_0x492da8),_0x536145=_0x343c66[_0x3c580d(0x1f1)](Number);if(_0x536145['some'](_0x590f5b=>!Number[_0x3c580d(0x218)](_0x590f5b)||_0x590f5b<=0x0))throw CliErrors[_0x3c580d(0x23a)]('--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.');return[...new Set(_0x536145)];}function parseCsv(_0x36817d){const _0x171900=a151_0x2c6522;return[...new Set(_0x36817d[_0x171900(0x1e9)](',')[_0x171900(0x1f1)](_0x45422c=>_0x45422c['trim']())[_0x171900(0x1ff)](Boolean))];}function parseBooleanFlag(_0x185301,_0x26b517,_0x50e992){const _0x38ce60=a151_0x2c6522;if(!hasFlag(_0x185301,_0x26b517)){if(_0x50e992)throw CliErrors[_0x38ce60(0x1f5)](_0x26b517);return undefined;}const _0x598476=_0x185301['rawFlags'][_0x26b517];if(_0x598476===!![]||_0x598476===![])return _0x598476;if(_0x598476==='true')return!![];if(_0x598476===_0x38ce60(0x1fd))return![];throw CliErrors['validation']('--'+_0x26b517+_0x38ce60(0x20d));}function verifyVisibilityUpdate(_0x5ac038,_0x268908,_0x488acb){const _0x28d42a=a151_0x2c6522;assertVerified(!!_0x268908,_0x28d42a(0x243)+_0x5ac038['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x268908[_0x28d42a(0x1eb)]===_0x488acb,_0x28d42a(0x243)+_0x5ac038['id']+_0x28d42a(0x1e5));const _0x172d7e=[['id',_0x268908['id'],_0x5ac038['id']],[_0x28d42a(0x210),_0x268908[_0x28d42a(0x210)],_0x5ac038[_0x28d42a(0x210)]],['depth',_0x268908['depth'],_0x5ac038[_0x28d42a(0x1e0)]],[_0x28d42a(0x232),_0x268908['label'],_0x5ac038['label']],[_0x28d42a(0x1ee),_0x268908['path'],_0x5ac038[_0x28d42a(0x1ee)]],[_0x28d42a(0x253),_0x268908[_0x28d42a(0x253)],_0x5ac038['url']],[_0x28d42a(0x213),_0x268908[_0x28d42a(0x213)],_0x5ac038[_0x28d42a(0x213)]],[_0x28d42a(0x219),_0x268908[_0x28d42a(0x219)],_0x5ac038[_0x28d42a(0x219)]],[_0x28d42a(0x224),_0x268908[_0x28d42a(0x224)],_0x5ac038[_0x28d42a(0x224)]],[_0x28d42a(0x216),_0x268908[_0x28d42a(0x216)],_0x5ac038[_0x28d42a(0x216)]],[_0x28d42a(0x20b),_0x268908[_0x28d42a(0x20b)],_0x5ac038[_0x28d42a(0x20b)]],[_0x28d42a(0x24c),_0x268908[_0x28d42a(0x24c)],_0x5ac038[_0x28d42a(0x24c)]],['pageId',_0x268908[_0x28d42a(0x221)],_0x5ac038[_0x28d42a(0x221)]],[_0x28d42a(0x249),_0x268908[_0x28d42a(0x249)],_0x5ac038[_0x28d42a(0x249)]],[_0x28d42a(0x242),_0x268908[_0x28d42a(0x242)],_0x5ac038['modelType']],[_0x28d42a(0x233),_0x268908[_0x28d42a(0x233)],_0x5ac038['datasetId']],[_0x28d42a(0x24f),_0x268908['datasetCode'],_0x5ac038['datasetCode']]];for(const [_0x3b1f98,_0x163bd9,_0x4b7e69]of _0x172d7e){assertVerified(sameValue(_0x163bd9,_0x4b7e69),_0x28d42a(0x243)+_0x5ac038['id']+'\x20'+_0x3b1f98+_0x28d42a(0x220));}}function sameValue(_0x3f7698,_0x35e613){const _0x264e01=a151_0x2c6522;if(Array[_0x264e01(0x22c)](_0x3f7698)||Array[_0x264e01(0x22c)](_0x35e613))return JSON[_0x264e01(0x252)](_0x3f7698)===JSON['stringify'](_0x35e613);return _0x3f7698===_0x35e613;}
@@ -1 +1 @@
1
- function a152_0x2605(_0x65c252,_0x3527c8){_0x65c252=_0x65c252-0xee;const _0x2367ef=a152_0x2367();let _0x2605c9=_0x2367ef[_0x65c252];return _0x2605c9;}const a152_0x51e70a=a152_0x2605;(function(_0x4e5696,_0x34fe8a){const _0x58b797=a152_0x2605,_0x52881f=_0x4e5696();while(!![]){try{const _0x2cbc18=parseInt(_0x58b797(0xf9))/0x1+parseInt(_0x58b797(0xfe))/0x2*(parseInt(_0x58b797(0x100))/0x3)+-parseInt(_0x58b797(0x102))/0x4*(parseInt(_0x58b797(0xfd))/0x5)+-parseInt(_0x58b797(0xfa))/0x6*(-parseInt(_0x58b797(0x10c))/0x7)+-parseInt(_0x58b797(0x10e))/0x8*(-parseInt(_0x58b797(0x101))/0x9)+-parseInt(_0x58b797(0xf5))/0xa*(parseInt(_0x58b797(0x10b))/0xb)+parseInt(_0x58b797(0xf7))/0xc;if(_0x2cbc18===_0x34fe8a)break;else _0x52881f['push'](_0x52881f['shift']());}catch(_0x3c7a90){_0x52881f['push'](_0x52881f['shift']());}}}(a152_0x2367,0x995d3));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x51bd64){const _0x485059=a152_0x2605,_0x58debc=await readNotificationDocument(_0x51bd64,_0x485059(0xfc)),_0x50101f=createMutationInput(_0x51bd64[_0x485059(0x110)],_0x58debc);return{'document':_0x58debc,'input':_0x50101f,'planned':projectNotificationConfig({'appCode':_0x51bd64[_0x485059(0x110)],'configName':_0x58debc[_0x485059(0x109)],'channelType':_0x58debc[_0x485059(0xef)],'endpointUrl':_0x58debc['endpointUrl'],'channelConfig':_0x58debc[_0x485059(0xfb)],'description':_0x58debc['description'],'connectTimeout':_0x58debc[_0x485059(0x10f)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x58debc['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a152_0x2367(){const _0x36fc8=['document','8wTFiso','connectTimeout','appCode','Inspect\x20with\x20',';\x20do\x20not\x20resubmit.','channelType','POST','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','write',';\x20no\x20automatic\x20retry\x20was\x20attempted.',';\x20do\x20not\x20resubmit\x20automatically.','6704790YZVctz','config-create','3056400DYegUU','planned','233551KyBLbF','42816iDqKFW','channelConfig','create','5trwJYu','190766swEvkN','Created\x20notification\x20config\x20','3HWpjls','9125847LohmCi','3108284dHoQtR','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','input','verified','notification','notification_config_create_outcome_unknown','configName','configCode','11RmNhQm','469LJAJyL'];a152_0x2367=function(){return _0x36fc8;};return a152_0x2367();}export const notificationConfigCreate={'service':a152_0x51e70a(0x107),'command':a152_0x51e70a(0xf6),'description':a152_0x51e70a(0xf1),'risk':a152_0x51e70a(0xf2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x50eb84){assertSingleNotificationSource(_0x50eb84);},async 'dryRun'(_0x55339c){const _0x245732=a152_0x51e70a,_0x5c6e36=await prepareCreate(_0x55339c),_0xd494fa=notificationLookupCommand(_0x55339c[_0x245732(0x110)],_0x5c6e36[_0x245732(0x10d)][_0x245732(0xef)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x55339c[_0x245732(0x110)],'configName':_0x5c6e36[_0x245732(0x10d)]['configName'],'channelType':_0x5c6e36['document']['channelType']},'before':null,'after':_0x5c6e36[_0x245732(0xf8)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0xd494fa}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x3e3e27){const _0x510459=a152_0x51e70a,_0x369e65=await prepareCreate(_0x3e3e27),_0x2d209d=notificationLookupCommand(_0x3e3e27[_0x510459(0x110)],_0x369e65[_0x510459(0x10d)][_0x510459(0xef)]);let _0x3b686b;try{_0x3b686b=await createNotificationChannelConfig(_0x369e65[_0x510459(0x105)]);}catch(_0x2a8074){if(isPlatformTransportFailure(_0x2a8074))throw notificationError(_0x510459(0x108),_0x510459(0x104),_0x510459(0x111)+_0x2d209d+_0x510459(0xee));throw safeApiFailure('create','mutation',_0x510459(0x111)+_0x2d209d+_0x510459(0xf3));}if(!Number['isSafeInteger'](_0x3b686b)||_0x3b686b<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x510459(0x103),_0x510459(0x111)+_0x2d209d+_0x510459(0xee));let _0x4fc952;try{const _0x5d953c=await getNotificationChannelConfig(_0x3b686b,_0x3e3e27[_0x510459(0x110)]);_0x4fc952=normalizeExactNotificationConfig(_0x5d953c,_0x3b686b,_0x3e3e27[_0x510459(0x110)]);}catch{throw safeApiFailure(_0x510459(0xfc),'verification','Inspect\x20with\x20'+_0x2d209d+_0x510459(0xf4));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x4fc952['appCode'],'id':_0x4fc952['id'],'configCode':_0x4fc952[_0x510459(0x10a)],'configName':_0x4fc952[_0x510459(0x109)],'channelType':_0x4fc952[_0x510459(0xef)]},'before':null,'after':projectNotificationConfig(_0x4fc952),'dryRun':![],'backend':{'method':_0x510459(0xf0),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x510459(0x106),'lookupCommand':_0x2d209d}},'message':_0x510459(0xff)+_0x4fc952['id']};}};
1
+ function a152_0x2360(_0x1cbcc0,_0x1e1a8c){_0x1cbcc0=_0x1cbcc0-0x157;const _0x26aa6d=a152_0x26aa();let _0x236068=_0x26aa6d[_0x1cbcc0];return _0x236068;}const a152_0x31dda0=a152_0x2360;(function(_0x593ff8,_0x511443){const _0x129013=a152_0x2360,_0x12cf3e=_0x593ff8();while(!![]){try{const _0x5a71fe=parseInt(_0x129013(0x173))/0x1*(parseInt(_0x129013(0x15b))/0x2)+parseInt(_0x129013(0x15e))/0x3+-parseInt(_0x129013(0x161))/0x4+-parseInt(_0x129013(0x164))/0x5+parseInt(_0x129013(0x175))/0x6*(-parseInt(_0x129013(0x159))/0x7)+-parseInt(_0x129013(0x157))/0x8+parseInt(_0x129013(0x158))/0x9;if(_0x5a71fe===_0x511443)break;else _0x12cf3e['push'](_0x12cf3e['shift']());}catch(_0x4c2887){_0x12cf3e['push'](_0x12cf3e['shift']());}}}(a152_0x26aa,0xe2127));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a152_0x31dda0(0x15c);async function prepareCreate(_0x57cca9){const _0x1b7949=a152_0x31dda0,_0x212f56=await readNotificationDocument(_0x57cca9,'create'),_0x5b6a31=createMutationInput(_0x57cca9[_0x1b7949(0x168)],_0x212f56);return{'document':_0x212f56,'input':_0x5b6a31,'planned':projectNotificationConfig({'appCode':_0x57cca9['appCode'],'configName':_0x212f56['configName'],'channelType':_0x212f56['channelType'],'endpointUrl':_0x212f56[_0x1b7949(0x179)],'channelConfig':_0x212f56[_0x1b7949(0x169)],'description':_0x212f56[_0x1b7949(0x15f)],'connectTimeout':_0x212f56['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x212f56['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a152_0x26aa(){const _0x3f72d6=['isSafeInteger',';\x20do\x20not\x20resubmit.','appCode','channelConfig','configName','channelType','Inspect\x20with\x20','configCode','verification','notification',';\x20no\x20automatic\x20retry\x20was\x20attempted.','write','planned','7THnFjY',';\x20do\x20not\x20resubmit\x20automatically.','5514TOWRVK','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','config-create','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','endpointUrl','10672232ELeOXn','49424706OqRRVG','11767zjHcoM','POST','62926aVyjAs','/notification/channel-config/create','document','1819212fevtdp','description','create','5927116NajITR','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','notification_config_create_outcome_unknown','5158205qMBneU','mutation'];a152_0x26aa=function(){return _0x3f72d6;};return a152_0x26aa();}export const notificationConfigCreate={'service':a152_0x31dda0(0x16f),'command':a152_0x31dda0(0x177),'description':a152_0x31dda0(0x162),'risk':a152_0x31dda0(0x171),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x615730){assertSingleNotificationSource(_0x615730);},async 'dryRun'(_0x3667e9){const _0x563dfa=a152_0x31dda0,_0x274676=await prepareCreate(_0x3667e9),_0x523053=notificationLookupCommand(_0x3667e9[_0x563dfa(0x168)],_0x274676['document']['channelType']);return asDryRunResult({'operation':_0x563dfa(0x160),'selector':{'appCode':_0x3667e9['appCode'],'configName':_0x274676['document']['configName'],'channelType':_0x274676[_0x563dfa(0x15d)]['channelType']},'before':null,'after':_0x274676[_0x563dfa(0x172)],'dryRun':!![],'backend':{'method':_0x563dfa(0x15a),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x563dfa(0x172),'lookupCommand':_0x523053}},{'method':_0x563dfa(0x15a),'url':CREATE_PATH});},async 'execute'(_0x15fe7d){const _0x2aa801=a152_0x31dda0,_0x4cd41e=await prepareCreate(_0x15fe7d),_0x11f192=notificationLookupCommand(_0x15fe7d[_0x2aa801(0x168)],_0x4cd41e[_0x2aa801(0x15d)][_0x2aa801(0x16b)]);let _0x2de3d5;try{_0x2de3d5=await createNotificationChannelConfig(_0x4cd41e['input']);}catch(_0x5e4454){if(isPlatformTransportFailure(_0x5e4454))throw notificationError(_0x2aa801(0x163),_0x2aa801(0x176),_0x2aa801(0x16c)+_0x11f192+_0x2aa801(0x167));throw safeApiFailure(_0x2aa801(0x160),_0x2aa801(0x165),'Inspect\x20with\x20'+_0x11f192+_0x2aa801(0x170));}if(!Number[_0x2aa801(0x166)](_0x2de3d5)||_0x2de3d5<=0x0)throw notificationError(_0x2aa801(0x163),_0x2aa801(0x178),'Inspect\x20with\x20'+_0x11f192+';\x20do\x20not\x20resubmit.');let _0x34c728;try{const _0x399949=await getNotificationChannelConfig(_0x2de3d5,_0x15fe7d[_0x2aa801(0x168)]);_0x34c728=normalizeExactNotificationConfig(_0x399949,_0x2de3d5,_0x15fe7d[_0x2aa801(0x168)]);}catch{throw safeApiFailure(_0x2aa801(0x160),_0x2aa801(0x16e),_0x2aa801(0x16c)+_0x11f192+_0x2aa801(0x174));}return{'ok':!![],'data':{'operation':_0x2aa801(0x160),'selector':{'appCode':_0x34c728[_0x2aa801(0x168)],'id':_0x34c728['id'],'configCode':_0x34c728[_0x2aa801(0x16d)],'configName':_0x34c728[_0x2aa801(0x16a)],'channelType':_0x34c728['channelType']},'before':null,'after':projectNotificationConfig(_0x34c728),'dryRun':![],'backend':{'method':_0x2aa801(0x15a),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x11f192}},'message':'Created\x20notification\x20config\x20'+_0x34c728['id']};}};
@@ -1 +1 @@
1
- const a153_0x1ffc5f=a153_0x31af;function a153_0xbe07(){const _0x59da23=['notification','2115056pbQnsK','POST','notification_config_delete_verification_failed','config-delete','before','\x20remains\x20present\x20after\x20delete.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','140571cJBZdx','Notification\x20config\x20','762192teUdfJ','14nsOKFN','planned','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight',';\x20do\x20not\x20resubmit\x20automatically.','\x20delete\x20could\x20not\x20be\x20verified.','19088ggmXFc','1810kMbvKb','762942QsCfue','channelType','/notification/channel-config/delete','notification_config_delete_verification_unavailable','814362JKiZTq','notification_config_delete_outcome_unknown','Inspect\x20with\x20','appCode','mutation','3330516iaHxZX','1290ITnsWG','delete',';\x20no\x20automatic\x20retry\x20was\x20attempted.'];a153_0xbe07=function(){return _0x59da23;};return a153_0xbe07();}(function(_0x230c3f,_0x1a6d69){const _0x47a4f6=a153_0x31af,_0x7c755c=_0x230c3f();while(!![]){try{const _0x28c659=parseInt(_0x47a4f6(0x1b0))/0x1+parseInt(_0x47a4f6(0x1a8))/0x2+-parseInt(_0x47a4f6(0x19a))/0x3+parseInt(_0x47a4f6(0x1ae))/0x4*(-parseInt(_0x47a4f6(0x1af))/0x5)+parseInt(_0x47a4f6(0x1b4))/0x6+-parseInt(_0x47a4f6(0x1a9))/0x7*(-parseInt(_0x47a4f6(0x19f))/0x8)+-parseInt(_0x47a4f6(0x1a6))/0x9*(-parseInt(_0x47a4f6(0x19b))/0xa);if(_0x28c659===_0x1a6d69)break;else _0x7c755c['push'](_0x7c755c['shift']());}catch(_0x59498d){_0x7c755c['push'](_0x7c755c['shift']());}}}(a153_0xbe07,0xf0a90));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=a153_0x1ffc5f(0x1b2),REFERENCE_WARNING=a153_0x1ffc5f(0x1a5);async function prepareDelete(_0x414d96){const _0x5d602e=readNotificationId(_0x414d96),_0x4cab7a=await requireExactNotificationConfig(_0x414d96['appCode'],_0x5d602e,'delete');return{'id':_0x5d602e,'before':_0x4cab7a};}function a153_0x31af(_0x3e9404,_0x347fab){_0x3e9404=_0x3e9404-0x19a;const _0xbe077c=a153_0xbe07();let _0x31af7a=_0xbe077c[_0x3e9404];return _0x31af7a;}export const notificationConfigDelete={'service':a153_0x1ffc5f(0x19e),'command':a153_0x1ffc5f(0x1a2),'description':a153_0x1ffc5f(0x1ab),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xf0e32){readNotificationId(_0xf0e32),requireNotificationExplicitYes(_0xf0e32);},async 'dryRun'(_0x250e13){const _0x1af787=a153_0x1ffc5f,_0x2563bd=await prepareDelete(_0x250e13),_0x55a939=notificationLookupCommand(_0x250e13[_0x1af787(0x1b7)],_0x2563bd[_0x1af787(0x1a3)][_0x1af787(0x1b1)]);return asDryRunResult({'operation':_0x1af787(0x19c),'selector':notificationSelector(_0x2563bd[_0x1af787(0x1a3)]),'before':projectNotificationConfig(_0x2563bd[_0x1af787(0x1a3)]),'after':null,'dryRun':!![],'backend':{'method':_0x1af787(0x1a0),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x1af787(0x1aa),'lookupCommand':_0x55a939}},{'method':_0x1af787(0x1a0),'url':DELETE_PATH});},async 'execute'(_0x3a1392){const _0x1268d2=a153_0x1ffc5f;requireNotificationExplicitYes(_0x3a1392);const _0x1b7cfc=await prepareDelete(_0x3a1392),_0x74975e=notificationLookupCommand(_0x3a1392[_0x1268d2(0x1b7)],_0x1b7cfc[_0x1268d2(0x1a3)][_0x1268d2(0x1b1)]);let _0x2c09f5=![];try{await deleteNotificationChannelConfig(_0x1b7cfc['id'],_0x3a1392[_0x1268d2(0x1b7)]);}catch(_0x29af88){if(!isPlatformTransportFailure(_0x29af88))throw safeApiFailure('delete',_0x1268d2(0x1b8),_0x1268d2(0x1b6)+_0x74975e+_0x1268d2(0x19d));_0x2c09f5=!![];}let _0xf8c325;try{_0xf8c325=await listNotificationChannelConfigs(_0x3a1392[_0x1268d2(0x1b7)],_0x1b7cfc['before'][_0x1268d2(0x1b1)]),validateNotificationDeleteReadback(_0xf8c325,_0x3a1392[_0x1268d2(0x1b7)],_0x1b7cfc[_0x1268d2(0x1a3)][_0x1268d2(0x1b1)]);}catch{throw notificationError(_0x2c09f5?_0x1268d2(0x1b5):_0x1268d2(0x1b3),_0x1268d2(0x1a7)+_0x1b7cfc['id']+_0x1268d2(0x1ad),'Inspect\x20with\x20'+_0x74975e+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0xf8c325['some'](_0x166630=>_0x166630['id']===_0x1b7cfc['id']))throw notificationError(_0x2c09f5?'notification_config_delete_outcome_unknown':_0x1268d2(0x1a1),_0x1268d2(0x1a7)+_0x1b7cfc['id']+_0x1268d2(0x1a4),'Inspect\x20with\x20'+_0x74975e+_0x1268d2(0x1ac));const _0x3f9ea6=[REFERENCE_WARNING];return _0x2c09f5&&_0x3f9ea6['unshift']('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x1268d2(0x19c),'selector':notificationSelector(_0x1b7cfc['before']),'before':projectNotificationConfig(_0x1b7cfc[_0x1268d2(0x1a3)]),'after':null,'dryRun':![],'backend':{'method':_0x1268d2(0x1a0),'path':DELETE_PATH},'warnings':_0x3f9ea6,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2c09f5,'lookupCommand':_0x74975e}},'message':'Deleted\x20notification\x20config\x20'+_0x1b7cfc['id']};}};
1
+ const a153_0x529a9e=a153_0x3526;(function(_0x53a350,_0x3a2856){const _0x22e206=a153_0x3526,_0x273053=_0x53a350();while(!![]){try{const _0x46b4c7=parseInt(_0x22e206(0x11a))/0x1+-parseInt(_0x22e206(0x105))/0x2*(-parseInt(_0x22e206(0x115))/0x3)+-parseInt(_0x22e206(0x10f))/0x4*(-parseInt(_0x22e206(0x102))/0x5)+-parseInt(_0x22e206(0x10c))/0x6+parseInt(_0x22e206(0x109))/0x7+-parseInt(_0x22e206(0x10d))/0x8+parseInt(_0x22e206(0x110))/0x9;if(_0x46b4c7===_0x3a2856)break;else _0x273053['push'](_0x273053['shift']());}catch(_0x3269ff){_0x273053['push'](_0x273053['shift']());}}}(a153_0x50f8,0xa6810));import{asDryRunResult}from'../../commands/common/dry-run.js';function a153_0x3526(_0x3429eb,_0x282efe){_0x3429eb=_0x3429eb-0xff;const _0x50f8a7=a153_0x50f8();let _0x35264e=_0x50f8a7[_0x3429eb];return _0x35264e;}function a153_0x50f8(){const _0x368f8d=['high-risk-write','169097rNGjaH','Notification\x20config\x20','channelType','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','notification_config_delete_verification_failed','Deleted\x20notification\x20config\x20','5WtYauI','/notification/channel-config/delete','delete','4XZQOXT','notification_config_delete_outcome_unknown','verified',';\x20no\x20automatic\x20retry\x20was\x20attempted.','3586765bdVziU','planned','before','3624840AVoIEs','4818128LJDzpp','config-delete','748164LfNDnb','2055483tlLTGa','appCode',';\x20do\x20not\x20resubmit\x20automatically.','\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20','1187229fwrMFt','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','POST','\x20delete\x20could\x20not\x20be\x20verified.'];a153_0x50f8=function(){return _0x368f8d;};return a153_0x50f8();}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=a153_0x529a9e(0x103),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(_0x57c579){const _0xefd15=a153_0x529a9e,_0x42fd4b=readNotificationId(_0x57c579),_0x3f48f5=await requireExactNotificationConfig(_0x57c579[_0xefd15(0x111)],_0x42fd4b,'delete');return{'id':_0x42fd4b,'before':_0x3f48f5};}export const notificationConfigDelete={'service':'notification','command':a153_0x529a9e(0x10e),'description':a153_0x529a9e(0x116),'risk':a153_0x529a9e(0x119),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x437996){readNotificationId(_0x437996),requireNotificationExplicitYes(_0x437996);},async 'dryRun'(_0x4757c4){const _0x6f144a=a153_0x529a9e,_0x5e45bd=await prepareDelete(_0x4757c4),_0xd1a2d2=notificationLookupCommand(_0x4757c4['appCode'],_0x5e45bd[_0x6f144a(0x10b)][_0x6f144a(0x11c)]);return asDryRunResult({'operation':_0x6f144a(0x104),'selector':notificationSelector(_0x5e45bd[_0x6f144a(0x10b)]),'before':projectNotificationConfig(_0x5e45bd[_0x6f144a(0x10b)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x6f144a(0x10a),'lookupCommand':_0xd1a2d2}},{'method':_0x6f144a(0x117),'url':DELETE_PATH});},async 'execute'(_0x5b7dd5){const _0x118147=a153_0x529a9e;requireNotificationExplicitYes(_0x5b7dd5);const _0x327500=await prepareDelete(_0x5b7dd5),_0x199031=notificationLookupCommand(_0x5b7dd5['appCode'],_0x327500[_0x118147(0x10b)][_0x118147(0x11c)]);let _0x2e6d0c=![];try{await deleteNotificationChannelConfig(_0x327500['id'],_0x5b7dd5['appCode']);}catch(_0x4ef996){if(!isPlatformTransportFailure(_0x4ef996))throw safeApiFailure(_0x118147(0x104),'mutation','Inspect\x20with\x20'+_0x199031+_0x118147(0x108));_0x2e6d0c=!![];}let _0x35b75f;try{_0x35b75f=await listNotificationChannelConfigs(_0x5b7dd5['appCode'],_0x327500[_0x118147(0x10b)][_0x118147(0x11c)]),validateNotificationDeleteReadback(_0x35b75f,_0x5b7dd5['appCode'],_0x327500[_0x118147(0x10b)][_0x118147(0x11c)]);}catch{throw notificationError(_0x2e6d0c?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable','Notification\x20config\x20'+_0x327500['id']+_0x118147(0x118),_0x118147(0x114)+_0x199031+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x35b75f['some'](_0xe53c20=>_0xe53c20['id']===_0x327500['id']))throw notificationError(_0x2e6d0c?_0x118147(0x106):_0x118147(0x100),_0x118147(0x11b)+_0x327500['id']+_0x118147(0x113),_0x118147(0x114)+_0x199031+_0x118147(0x112));const _0xb3f90d=[REFERENCE_WARNING];return _0x2e6d0c&&_0xb3f90d['unshift'](_0x118147(0xff)),{'ok':!![],'data':{'operation':_0x118147(0x104),'selector':notificationSelector(_0x327500[_0x118147(0x10b)]),'before':projectNotificationConfig(_0x327500['before']),'after':null,'dryRun':![],'backend':{'method':_0x118147(0x117),'path':DELETE_PATH},'warnings':_0xb3f90d,'verification':{'status':_0x118147(0x107),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2e6d0c,'lookupCommand':_0x199031}},'message':_0x118147(0x101)+_0x327500['id']};}};
@@ -1 +1 @@
1
- const a154_0x256fc6=a154_0x30aa;(function(_0x29e142,_0x5f48bb){const _0x3be5b5=a154_0x30aa,_0x43084f=_0x29e142();while(!![]){try{const _0x46360d=parseInt(_0x3be5b5(0x141))/0x1*(-parseInt(_0x3be5b5(0x140))/0x2)+-parseInt(_0x3be5b5(0x134))/0x3+-parseInt(_0x3be5b5(0x132))/0x4*(parseInt(_0x3be5b5(0x136))/0x5)+parseInt(_0x3be5b5(0x12e))/0x6*(-parseInt(_0x3be5b5(0x133))/0x7)+parseInt(_0x3be5b5(0x143))/0x8*(-parseInt(_0x3be5b5(0x13c))/0x9)+-parseInt(_0x3be5b5(0x144))/0xa*(parseInt(_0x3be5b5(0x139))/0xb)+parseInt(_0x3be5b5(0x13b))/0xc;if(_0x46360d===_0x5f48bb)break;else _0x43084f['push'](_0x43084f['shift']());}catch(_0x5d699b){_0x43084f['push'](_0x43084f['shift']());}}}(a154_0x4a7a,0xe615a));function a154_0x4a7a(){const _0x5aeba5=['string','1170568FIHcDY','10qmBWFA','6xlQWyn','EMAIL','Found\x20','length','144916tbKfki','10755402svjzvD','2427714MVQhaN','map','245exBpcg','type','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','16461907ViedZi','read','92485068UBQbbb','9uAzgLE','notification','Notification\x20channel\x20type','appCode','19064IoivYD','105XPotEP'];a154_0x4a7a=function(){return _0x5aeba5;};return a154_0x4a7a();}function a154_0x30aa(_0x2197eb,_0x10d277){_0x2197eb=_0x2197eb-0x12e;const _0x4a7a9f=a154_0x4a7a();let _0x30aa36=_0x4a7a9f[_0x2197eb];return _0x30aa36;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a154_0x256fc6(0x13d),'command':'config-list','description':a154_0x256fc6(0x138),'risk':a154_0x256fc6(0x13a),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a154_0x256fc6(0x137),'type':a154_0x256fc6(0x142),'description':a154_0x256fc6(0x13e),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a154_0x256fc6(0x12f)}],async 'validate'(_0x54d7f3){readNotificationChannelType(_0x54d7f3);},async 'execute'(_0x24023e){const _0x16c7aa=a154_0x256fc6,_0x263bd8=readNotificationChannelType(_0x24023e),_0x38fa3a=await listNotificationChannelConfigs(_0x24023e[_0x16c7aa(0x13f)],_0x263bd8),_0x55f84d=_0x38fa3a[_0x16c7aa(0x135)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x24023e[_0x16c7aa(0x13f)],'channelType':_0x263bd8,'count':_0x55f84d[_0x16c7aa(0x131)],'configs':_0x55f84d},'message':_0x16c7aa(0x130)+_0x55f84d[_0x16c7aa(0x131)]+'\x20'+_0x263bd8+'\x20notification\x20config(s)'};}};
1
+ const a154_0x5ea31c=a154_0x194d;(function(_0x3e2af8,_0x545d47){const _0x4ad711=a154_0x194d,_0x5a5d1d=_0x3e2af8();while(!![]){try{const _0x285645=-parseInt(_0x4ad711(0x134))/0x1*(-parseInt(_0x4ad711(0x13e))/0x2)+parseInt(_0x4ad711(0x139))/0x3+-parseInt(_0x4ad711(0x135))/0x4*(parseInt(_0x4ad711(0x13c))/0x5)+-parseInt(_0x4ad711(0x136))/0x6+-parseInt(_0x4ad711(0x13b))/0x7+-parseInt(_0x4ad711(0x137))/0x8+parseInt(_0x4ad711(0x141))/0x9;if(_0x285645===_0x545d47)break;else _0x5a5d1d['push'](_0x5a5d1d['shift']());}catch(_0x4ecdbf){_0x5a5d1d['push'](_0x5a5d1d['shift']());}}}(a154_0x5524,0xbb3c5));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a154_0x5524(){const _0x6299f4=['\x20notification\x20config(s)','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','Found\x20','length','type','appCode','3dfKENd','1296608sefEDE','2990886IPeLFN','5033728qSnGFw','map','1767411KwLShI','Notification\x20channel\x20type','3394573SfPxEO','5JYgHNW','config-list','30398juxVPh','read','string','18620739GwZhaV'];a154_0x5524=function(){return _0x6299f4;};return a154_0x5524();}function a154_0x194d(_0x45cf6e,_0x269cec){_0x45cf6e=_0x45cf6e-0x12e;const _0x5524e6=a154_0x5524();let _0x194d1c=_0x5524e6[_0x45cf6e];return _0x194d1c;}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a154_0x5ea31c(0x13d),'description':a154_0x5ea31c(0x12f),'risk':a154_0x5ea31c(0x13f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a154_0x5ea31c(0x132),'type':a154_0x5ea31c(0x140),'description':a154_0x5ea31c(0x13a),'enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x4b2aa1){readNotificationChannelType(_0x4b2aa1);},async 'execute'(_0x39e735){const _0x50d969=a154_0x5ea31c,_0x26c6f6=readNotificationChannelType(_0x39e735),_0x33944a=await listNotificationChannelConfigs(_0x39e735[_0x50d969(0x133)],_0x26c6f6),_0x1baa9c=_0x33944a[_0x50d969(0x138)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x39e735[_0x50d969(0x133)],'channelType':_0x26c6f6,'count':_0x1baa9c[_0x50d969(0x131)],'configs':_0x1baa9c},'message':_0x50d969(0x130)+_0x1baa9c[_0x50d969(0x131)]+'\x20'+_0x26c6f6+_0x50d969(0x12e)};}};
@@ -1 +1 @@
1
- const a155_0x4a02ab=a155_0x4e70;(function(_0x2fa9c5,_0x5d8056){const _0x5c4e21=a155_0x4e70,_0x47cfbd=_0x2fa9c5();while(!![]){try{const _0x589651=-parseInt(_0x5c4e21(0x1fa))/0x1+-parseInt(_0x5c4e21(0x210))/0x2*(parseInt(_0x5c4e21(0x1f3))/0x3)+-parseInt(_0x5c4e21(0x20a))/0x4+parseInt(_0x5c4e21(0x212))/0x5*(parseInt(_0x5c4e21(0x201))/0x6)+-parseInt(_0x5c4e21(0x211))/0x7*(parseInt(_0x5c4e21(0x209))/0x8)+parseInt(_0x5c4e21(0x205))/0x9*(-parseInt(_0x5c4e21(0x1f9))/0xa)+parseInt(_0x5c4e21(0x1fb))/0xb;if(_0x589651===_0x5d8056)break;else _0x47cfbd['push'](_0x47cfbd['shift']());}catch(_0x51a47e){_0x47cfbd['push'](_0x47cfbd['shift']());}}}(a155_0x9b67,0xa6ff0));import{asDryRunResult}from'../../commands/common/dry-run.js';function a155_0x4e70(_0x27dbee,_0x5b4c17){_0x27dbee=_0x27dbee-0x1f3;const _0x9b6736=a155_0x9b67();let _0x4e707c=_0x9b6736[_0x27dbee];return _0x4e707c;}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=a155_0x4a02ab(0x1f7);async function prepareUpdate(_0x455ce2){const _0x56b6e6=a155_0x4a02ab,_0x370ae2=readNotificationId(_0x455ce2),_0x19e0ed=await readNotificationDocument(_0x455ce2,_0x56b6e6(0x208)),_0x4a4018=await requireExactNotificationConfig(_0x455ce2[_0x56b6e6(0x206)],_0x370ae2,_0x56b6e6(0x208));return{'id':_0x370ae2,'patch':_0x19e0ed,'before':_0x4a4018,'payload':mergeUpdateInput(_0x4a4018,_0x19e0ed),'planned':plannedUpdateProjection(_0x4a4018,_0x19e0ed)};}function a155_0x9b67(){const _0x5862a3=['/notification/channel-config/update','high-risk-write','877390NHLDcz','1021727vObLkB','43904751khxpue','Updated\x20notification\x20config\x20','payload',';\x20do\x20not\x20resubmit\x20automatically.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','\x20via\x20','34512LFxhNh','mutation','channelType','planned','72IuvvuM','appCode','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','update','8NZIDQD','3606784BMzLmD','Inspect\x20ID\x20','verified','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','before','verifiedFields','2LDbaQp','5273947mmmUtw','240gJuApu',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','Inspect\x20with\x20--id\x20','notification_config_update_verification_unavailable','613995urrMcp','POST','config-update','notification_config_update_outcome_unknown'];a155_0x9b67=function(){return _0x5862a3;};return a155_0x9b67();}export const notificationConfigUpdate={'service':'notification','command':a155_0x4a02ab(0x1f5),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a155_0x4a02ab(0x1f8),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3927bf){readNotificationId(_0x3927bf),assertSingleNotificationSource(_0x3927bf),requireNotificationExplicitYes(_0x3927bf);},async 'dryRun'(_0x3f5b26){const _0x3a951b=a155_0x4a02ab,_0x366073=await prepareUpdate(_0x3f5b26),_0xb3ccda=notificationLookupCommand(_0x3f5b26['appCode'],_0x366073[_0x3a951b(0x20e)][_0x3a951b(0x203)]);return asDryRunResult({'operation':_0x3a951b(0x208),'selector':notificationSelector(_0x366073['before']),'before':projectNotificationConfig(_0x366073[_0x3a951b(0x20e)]),'after':_0x366073['planned'],'dryRun':!![],'backend':{'method':_0x3a951b(0x1f4),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x3a951b(0x204),'lookupCommand':_0xb3ccda}},{'method':_0x3a951b(0x1f4),'url':UPDATE_PATH});},async 'execute'(_0xc911c4){const _0x469921=a155_0x4a02ab;requireNotificationExplicitYes(_0xc911c4);const _0xb6c14=await prepareUpdate(_0xc911c4),_0x2f183c=notificationLookupCommand(_0xc911c4[_0x469921(0x206)],_0xb6c14[_0x469921(0x20e)]['channelType']);let _0x281486=![];try{await updateNotificationChannelConfig(_0xb6c14[_0x469921(0x1fd)]);}catch(_0x1e2d17){if(!isPlatformTransportFailure(_0x1e2d17))throw safeApiFailure(_0x469921(0x208),_0x469921(0x202),_0x469921(0x20b)+_0xb6c14['id']+'\x20with\x20'+_0x2f183c+_0x469921(0x213));_0x281486=!![];}let _0x17addb;try{const _0x1c7a83=await getNotificationChannelConfig(_0xb6c14['id'],_0xc911c4[_0x469921(0x206)]);_0x17addb=normalizeExactNotificationConfig(_0x1c7a83,_0xb6c14['id'],_0xc911c4[_0x469921(0x206)]);}catch{throw notificationError(_0x281486?_0x469921(0x1f6):_0x469921(0x216),_0x469921(0x214)+_0xb6c14['id']+_0x469921(0x1ff),_0x469921(0x215)+_0xb6c14['id']+_0x469921(0x200)+_0x2f183c+_0x469921(0x1fe));}const _0x5701af=requestedSafeFieldsMatch(_0xb6c14['before'],_0x17addb,_0xb6c14['patch']);if(!_0x5701af['allMatch']||_0x281486&&!_0x5701af['provesChange'])throw notificationError(_0x281486?_0x469921(0x1f6):'notification_config_update_verification_failed',_0x469921(0x214)+_0xb6c14['id']+_0x469921(0x207),_0x469921(0x215)+_0xb6c14['id']+_0x469921(0x200)+_0x2f183c+_0x469921(0x1fe));const _0x5de06f=_0x281486?[_0x469921(0x20d)]:[];return{'ok':!![],'data':{'operation':_0x469921(0x208),'selector':notificationSelector(_0x17addb),'before':projectNotificationConfig(_0xb6c14['before']),'after':projectNotificationConfig(_0x17addb),'dryRun':![],'backend':{'method':_0x469921(0x1f4),'path':UPDATE_PATH},'warnings':_0x5de06f,'verification':{'status':_0x469921(0x20c),'recoveredAfterUnknownResponse':_0x281486,'verifiedFields':_0x5701af[_0x469921(0x20f)],'lookupCommand':_0x2f183c}},'message':_0x469921(0x1fc)+_0x17addb['id']};}};
1
+ const a155_0x36b166=a155_0x49f7;function a155_0x7311(){const _0x4dfbbe=['Inspect\x20ID\x20','update','447426gQZTlk','1830356WfTQsb','32rXfngv','5hlNuUg','config-update','1208604oOyKnY','verified','\x20with\x20','notification_config_update_outcome_unknown',';\x20do\x20not\x20resubmit\x20automatically.','before','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','2526582gyEOmE','channelType','patch','187958dJRDkc','appCode','5DZzgtL','Inspect\x20with\x20--id\x20','mutation','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','verifiedFields','planned','allMatch','\x20via\x20','high-risk-write','notification_config_update_verification_unavailable','41228sfVPgN','POST','1435791oTOsYC','330IXEWQj'];a155_0x7311=function(){return _0x4dfbbe;};return a155_0x7311();}(function(_0x516cbe,_0x436301){const _0x31869f=a155_0x49f7,_0x264b00=_0x516cbe();while(!![]){try{const _0x438cda=parseInt(_0x31869f(0xf6))/0x1*(-parseInt(_0x31869f(0xf4))/0x2)+-parseInt(_0x31869f(0xea))/0x3+parseInt(_0x31869f(0x107))/0x4+-parseInt(_0x31869f(0xe8))/0x5*(-parseInt(_0x31869f(0xf1))/0x6)+parseInt(_0x31869f(0x102))/0x7+parseInt(_0x31869f(0xe7))/0x8*(parseInt(_0x31869f(0x106))/0x9)+parseInt(_0x31869f(0x103))/0xa*(-parseInt(_0x31869f(0x100))/0xb);if(_0x438cda===_0x436301)break;else _0x264b00['push'](_0x264b00['shift']());}catch(_0x1d645e){_0x264b00['push'](_0x264b00['shift']());}}}(a155_0x7311,0x45e00));import{asDryRunResult}from'../../commands/common/dry-run.js';function a155_0x49f7(_0x8f5c68,_0x555b41){_0x8f5c68=_0x8f5c68-0xe7;const _0x731131=a155_0x7311();let _0x49f721=_0x731131[_0x8f5c68];return _0x49f721;}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(_0x511e57){const _0x48f06f=a155_0x49f7,_0x46fd22=readNotificationId(_0x511e57),_0x2f93b4=await readNotificationDocument(_0x511e57,_0x48f06f(0x105)),_0xde2398=await requireExactNotificationConfig(_0x511e57['appCode'],_0x46fd22,_0x48f06f(0x105));return{'id':_0x46fd22,'patch':_0x2f93b4,'before':_0xde2398,'payload':mergeUpdateInput(_0xde2398,_0x2f93b4),'planned':plannedUpdateProjection(_0xde2398,_0x2f93b4)};}export const notificationConfigUpdate={'service':'notification','command':a155_0x36b166(0xe9),'description':a155_0x36b166(0xf0),'risk':a155_0x36b166(0xfe),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2bd65e){readNotificationId(_0x2bd65e),assertSingleNotificationSource(_0x2bd65e),requireNotificationExplicitYes(_0x2bd65e);},async 'dryRun'(_0xf07a01){const _0xf0421=a155_0x36b166,_0x481331=await prepareUpdate(_0xf07a01),_0x1dd3fa=notificationLookupCommand(_0xf07a01[_0xf0421(0xf5)],_0x481331['before'][_0xf0421(0xf2)]);return asDryRunResult({'operation':_0xf0421(0x105),'selector':notificationSelector(_0x481331[_0xf0421(0xef)]),'before':projectNotificationConfig(_0x481331[_0xf0421(0xef)]),'after':_0x481331[_0xf0421(0xfb)],'dryRun':!![],'backend':{'method':_0xf0421(0x101),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x1dd3fa}},{'method':_0xf0421(0x101),'url':UPDATE_PATH});},async 'execute'(_0x30a288){const _0x4b3a07=a155_0x36b166;requireNotificationExplicitYes(_0x30a288);const _0xf4a094=await prepareUpdate(_0x30a288),_0x138413=notificationLookupCommand(_0x30a288[_0x4b3a07(0xf5)],_0xf4a094['before'][_0x4b3a07(0xf2)]);let _0x3adc65=![];try{await updateNotificationChannelConfig(_0xf4a094['payload']);}catch(_0x11e64c){if(!isPlatformTransportFailure(_0x11e64c))throw safeApiFailure('update',_0x4b3a07(0xf8),_0x4b3a07(0x104)+_0xf4a094['id']+_0x4b3a07(0xec)+_0x138413+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x3adc65=!![];}let _0xc6b917;try{const _0x383c6b=await getNotificationChannelConfig(_0xf4a094['id'],_0x30a288['appCode']);_0xc6b917=normalizeExactNotificationConfig(_0x383c6b,_0xf4a094['id'],_0x30a288['appCode']);}catch{throw notificationError(_0x3adc65?'notification_config_update_outcome_unknown':_0x4b3a07(0xff),'Notification\x20config\x20'+_0xf4a094['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x4b3a07(0xf7)+_0xf4a094['id']+_0x4b3a07(0xfd)+_0x138413+';\x20do\x20not\x20resubmit\x20automatically.');}const _0x116848=requestedSafeFieldsMatch(_0xf4a094[_0x4b3a07(0xef)],_0xc6b917,_0xf4a094[_0x4b3a07(0xf3)]);if(!_0x116848[_0x4b3a07(0xfc)]||_0x3adc65&&!_0x116848['provesChange'])throw notificationError(_0x3adc65?_0x4b3a07(0xed):'notification_config_update_verification_failed','Notification\x20config\x20'+_0xf4a094['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x4b3a07(0xf7)+_0xf4a094['id']+_0x4b3a07(0xfd)+_0x138413+_0x4b3a07(0xee));const _0x4e73c0=_0x3adc65?[_0x4b3a07(0xf9)]:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0xc6b917),'before':projectNotificationConfig(_0xf4a094[_0x4b3a07(0xef)]),'after':projectNotificationConfig(_0xc6b917),'dryRun':![],'backend':{'method':_0x4b3a07(0x101),'path':UPDATE_PATH},'warnings':_0x4e73c0,'verification':{'status':_0x4b3a07(0xeb),'recoveredAfterUnknownResponse':_0x3adc65,'verifiedFields':_0x116848[_0x4b3a07(0xfa)],'lookupCommand':_0x138413}},'message':'Updated\x20notification\x20config\x20'+_0xc6b917['id']};}};
@@ -1 +1 @@
1
- function a156_0x2485(_0x3a259e,_0xa11e36){_0x3a259e=_0x3a259e-0x1c8;const _0x46f371=a156_0x46f3();let _0x2485c5=_0x46f371[_0x3a259e];return _0x2485c5;}function a156_0x46f3(){const _0x5b60a2=['1971065ZHcgmm','68298YoqeNp','913408QYPjYc','6436ZMBVzm','1285220xsYYpV','2538GvLCKd','99NEYOoM','9596951GAcJrs','6mUBMoF','6373728BNhUMv'];a156_0x46f3=function(){return _0x5b60a2;};return a156_0x46f3();}(function(_0x221110,_0x5a5c5a){const _0x1fb973=a156_0x2485,_0x527386=_0x221110();while(!![]){try{const _0x323b72=parseInt(_0x1fb973(0x1cd))/0x1+-parseInt(_0x1fb973(0x1cc))/0x2+parseInt(_0x1fb973(0x1d0))/0x3*(-parseInt(_0x1fb973(0x1ce))/0x4)+parseInt(_0x1fb973(0x1cb))/0x5+-parseInt(_0x1fb973(0x1c9))/0x6*(parseInt(_0x1fb973(0x1c8))/0x7)+parseInt(_0x1fb973(0x1ca))/0x8+parseInt(_0x1fb973(0x1d1))/0x9*(parseInt(_0x1fb973(0x1cf))/0xa);if(_0x323b72===_0x5a5c5a)break;else _0x527386['push'](_0x527386['shift']());}catch(_0x515249){_0x527386['push'](_0x527386['shift']());}}}(a156_0x46f3,0xb786b));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];
1
+ (function(_0x4a2228,_0x4f5da0){const _0x4ad5f2=a156_0x3c92,_0x2fd9f2=_0x4a2228();while(!![]){try{const _0x453ae9=parseInt(_0x4ad5f2(0x136))/0x1*(-parseInt(_0x4ad5f2(0x135))/0x2)+parseInt(_0x4ad5f2(0x12e))/0x3*(-parseInt(_0x4ad5f2(0x12d))/0x4)+parseInt(_0x4ad5f2(0x132))/0x5+parseInt(_0x4ad5f2(0x12c))/0x6*(parseInt(_0x4ad5f2(0x131))/0x7)+parseInt(_0x4ad5f2(0x133))/0x8+parseInt(_0x4ad5f2(0x130))/0x9*(-parseInt(_0x4ad5f2(0x134))/0xa)+-parseInt(_0x4ad5f2(0x12f))/0xb;if(_0x453ae9===_0x4f5da0)break;else _0x2fd9f2['push'](_0x2fd9f2['shift']());}catch(_0x3924ee){_0x2fd9f2['push'](_0x2fd9f2['shift']());}}}(a156_0x165c,0x739c3));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a156_0x165c(){const _0x3257dc=['109710AwWIYP','3343632HZkENn','16370jumsXV','1646qohOaF','94dGieqU','6RrLHso','576412OFINus','6eZuvwN','2837879HPTzCZ','873KCpvRc','5711923AMmVko'];a156_0x165c=function(){return _0x3257dc;};return a156_0x165c();}function a156_0x3c92(_0xb0b440,_0x483dd2){_0xb0b440=_0xb0b440-0x12c;const _0x165c9a=a156_0x165c();let _0x3c923a=_0x165c9a[_0xb0b440];return _0x3c923a;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];