@lovrabet/rabetbase-cli 2.5.0-beta.6 → 2.5.1-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 (312) 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.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.d.ts +7 -0
  7. package/lib/auth/auth-server.js +1 -1
  8. package/lib/auth/constant.js +1 -1
  9. package/lib/auth/get-cookie.js +1 -1
  10. package/lib/auth/get-session-user.js +1 -1
  11. package/lib/auth/is-session-valid.js +1 -1
  12. package/lib/auth/login-success-html.js +1 -1
  13. package/lib/auth/logout.js +1 -1
  14. package/lib/cli-flags.js +1 -1
  15. package/lib/cli.js +1 -1
  16. package/lib/commands/api/generate.js +1 -1
  17. package/lib/commands/api/index.js +1 -1
  18. package/lib/commands/api/list.js +1 -1
  19. package/lib/commands/api/pull.js +1 -1
  20. package/lib/commands/api/shared.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/members-list.js +1 -1
  24. package/lib/commands/app/remote-directory.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/delete.js +1 -1
  54. package/lib/commands/config/get.js +1 -1
  55. package/lib/commands/config/index.js +1 -1
  56. package/lib/commands/config/init.d.ts +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-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/doctor.js +1 -1
  99. package/lib/commands/file/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/search.js +1 -1
  110. package/lib/commands/kb/shared.js +1 -1
  111. package/lib/commands/kb/update.js +1 -1
  112. package/lib/commands/logs/index.js +1 -1
  113. package/lib/commands/menu/asset-update.js +1 -1
  114. package/lib/commands/menu/delete.js +1 -1
  115. package/lib/commands/menu/external-link-create.js +1 -1
  116. package/lib/commands/menu/external-link-update.js +1 -1
  117. package/lib/commands/menu/group-create.js +1 -1
  118. package/lib/commands/menu/group-update.js +1 -1
  119. package/lib/commands/menu/index.js +1 -1
  120. package/lib/commands/menu/list.js +1 -1
  121. package/lib/commands/menu/move.js +1 -1
  122. package/lib/commands/menu/regroup-start.js +1 -1
  123. package/lib/commands/menu/rename.js +1 -1
  124. package/lib/commands/menu/shared/compare-table.js +1 -1
  125. package/lib/commands/menu/shared/delete-plan.js +1 -1
  126. package/lib/commands/menu/shared/facts.js +1 -1
  127. package/lib/commands/menu/shared/index.js +1 -1
  128. package/lib/commands/menu/shared/inquirer.js +1 -1
  129. package/lib/commands/menu/shared/local-pages.js +1 -1
  130. package/lib/commands/menu/shared/logic.js +1 -1
  131. package/lib/commands/menu/shared/mutations.js +1 -1
  132. package/lib/commands/menu/shared/service.js +1 -1
  133. package/lib/commands/menu/shared/sync-core.js +1 -1
  134. package/lib/commands/menu/shared/update-core.js +1 -1
  135. package/lib/commands/menu/shared/valid-url.js +1 -1
  136. package/lib/commands/menu/sync.js +1 -1
  137. package/lib/commands/menu/visibility-update.js +1 -1
  138. package/lib/commands/notification/config-create.js +1 -1
  139. package/lib/commands/notification/config-delete.js +1 -1
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.js +1 -1
  142. package/lib/commands/notification/index.js +1 -1
  143. package/lib/commands/notification/shared.js +1 -1
  144. package/lib/commands/ocr/index.js +1 -1
  145. package/lib/commands/page/create.js +1 -1
  146. package/lib/commands/page/custom/detail.js +1 -1
  147. package/lib/commands/page/custom/list.js +1 -1
  148. package/lib/commands/page/custom/publish.js +1 -1
  149. package/lib/commands/page/custom/shared.js +1 -1
  150. package/lib/commands/page/custom/syntax.js +1 -1
  151. package/lib/commands/page/custom/template.js +1 -1
  152. package/lib/commands/page/custom/update.js +1 -1
  153. package/lib/commands/page/data-list-status.js +1 -1
  154. package/lib/commands/page/generate-start.js +1 -1
  155. package/lib/commands/page/generate-status.js +1 -1
  156. package/lib/commands/page/index.js +1 -1
  157. package/lib/commands/page/pull.js +1 -1
  158. package/lib/commands/page/push.js +1 -1
  159. package/lib/commands/page/relation-audit.js +1 -1
  160. package/lib/commands/page/restore.js +1 -1
  161. package/lib/commands/page/shared.js +1 -1
  162. package/lib/commands/page/sync.js +1 -1
  163. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  164. package/lib/commands/project/create/format-elapsed.js +1 -1
  165. package/lib/commands/project/create/main.js +1 -1
  166. package/lib/commands/project/create/materialize-project-template.js +1 -1
  167. package/lib/commands/project/create/project-name.js +1 -1
  168. package/lib/commands/project/create/project-template-archive.js +1 -1
  169. package/lib/commands/project/create/project-template-path.js +1 -1
  170. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  171. package/lib/commands/project/create/use-format-code.js +1 -1
  172. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  173. package/lib/commands/project/index.js +1 -1
  174. package/lib/commands/project/upgrade.js +1 -1
  175. package/lib/commands/registry.js +1 -1
  176. package/lib/commands/role/delete.js +1 -1
  177. package/lib/commands/role/detail.js +1 -1
  178. package/lib/commands/role/index.js +1 -1
  179. package/lib/commands/role/list.js +1 -1
  180. package/lib/commands/role/shared.js +1 -1
  181. package/lib/commands/role/update.js +1 -1
  182. package/lib/commands/role/user-add.js +1 -1
  183. package/lib/commands/role/user-remove.js +1 -1
  184. package/lib/commands/role/user-resolve.js +1 -1
  185. package/lib/commands/run/index.js +1 -1
  186. package/lib/commands/schema.js +1 -1
  187. package/lib/commands/sql/create.js +1 -1
  188. package/lib/commands/sql/delete.js +1 -1
  189. package/lib/commands/sql/detail.js +1 -1
  190. package/lib/commands/sql/exec.js +1 -1
  191. package/lib/commands/sql/index.js +1 -1
  192. package/lib/commands/sql/list.js +1 -1
  193. package/lib/commands/sql/pull.js +1 -1
  194. package/lib/commands/sql/push.js +1 -1
  195. package/lib/commands/sql/shared.js +1 -1
  196. package/lib/commands/sql/status.js +1 -1
  197. package/lib/commands/sql/validate.js +1 -1
  198. package/lib/commands/task/index.js +1 -1
  199. package/lib/commands/task/status.js +1 -1
  200. package/lib/commands/tenant/index.js +1 -1
  201. package/lib/commands/tenant/members-list.js +1 -1
  202. package/lib/commands/tenant/shared.js +1 -1
  203. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  204. package/lib/commands/user-account/index.js +1 -1
  205. package/lib/commands/workspace/add.js +1 -1
  206. package/lib/commands/workspace/index.js +1 -1
  207. package/lib/commands/workspace/remove.js +1 -1
  208. package/lib/config/domain-config.d.ts +1 -1
  209. package/lib/config/domain-config.js +1 -1
  210. package/lib/config/project-routing.d.ts +30 -0
  211. package/lib/config/project-routing.js +1 -0
  212. package/lib/config/schema.d.ts +1 -1
  213. package/lib/config/schema.js +1 -1
  214. package/lib/constant/cdn.js +1 -1
  215. package/lib/constant/cli.js +1 -1
  216. package/lib/constant/defaults.js +1 -1
  217. package/lib/constant/domain.d.ts +7 -2
  218. package/lib/constant/domain.js +1 -1
  219. package/lib/constant/env.js +1 -1
  220. package/lib/constant/output.js +1 -1
  221. package/lib/constant/paths.js +1 -1
  222. package/lib/constant/region.d.ts +2 -2
  223. package/lib/constant/region.js +1 -1
  224. package/lib/constant/risk.js +1 -1
  225. package/lib/constant/routing-profile.d.ts +115 -0
  226. package/lib/constant/routing-profile.js +1 -0
  227. package/lib/context/app-resolver.js +1 -1
  228. package/lib/context/auth-resolver.js +1 -1
  229. package/lib/context/config-loader.js +1 -1
  230. package/lib/context.js +1 -1
  231. package/lib/core/alias-resolver.js +1 -1
  232. package/lib/core/api-client.js +1 -1
  233. package/lib/core/bff/config.js +1 -1
  234. package/lib/core/bff/file-system.js +1 -1
  235. package/lib/core/bff/hash.js +1 -1
  236. package/lib/core/bff/lock.js +1 -1
  237. package/lib/core/bff/utils.js +1 -1
  238. package/lib/core/db-resolver.js +1 -1
  239. package/lib/core/page/file-system.js +1 -1
  240. package/lib/core/page/hash.js +1 -1
  241. package/lib/core/page/lock.js +1 -1
  242. package/lib/core/sql-index-auditor.js +1 -1
  243. package/lib/core/sql-sync/config.js +1 -1
  244. package/lib/core/sql-sync/file-system.js +1 -1
  245. package/lib/core/sql-sync/hash.js +1 -1
  246. package/lib/core/sql-sync/lock.js +1 -1
  247. package/lib/core/sql-sync/utils.js +1 -1
  248. package/lib/core/sql-validator.js +1 -1
  249. package/lib/errors.js +1 -1
  250. package/lib/framework/build-all-flags.js +1 -1
  251. package/lib/framework/error-output.js +1 -1
  252. package/lib/framework/explicit-yes.js +1 -1
  253. package/lib/framework/flags.js +1 -1
  254. package/lib/framework/help.js +1 -1
  255. package/lib/framework/index.js +1 -1
  256. package/lib/framework/output.js +1 -1
  257. package/lib/framework/response.js +1 -1
  258. package/lib/framework/runner-alias.js +1 -1
  259. package/lib/framework/runner.js +1 -1
  260. package/lib/framework/schema-export.js +1 -1
  261. package/lib/framework/types.js +1 -1
  262. package/lib/generated/build-info.d.ts +4 -4
  263. package/lib/generated/build-info.js +1 -1
  264. package/lib/help.js +1 -1
  265. package/lib/postinstall.js +1 -1
  266. package/lib/runtime/confirmation.js +1 -1
  267. package/lib/runtime/event.js +1 -1
  268. package/lib/runtime/index.js +1 -1
  269. package/lib/runtime/queue.js +1 -1
  270. package/lib/runtime/resolve.js +1 -1
  271. package/lib/skills/builtin-skill.js +1 -1
  272. package/lib/skills/main.js +1 -1
  273. package/lib/skills/npx-skills-add.js +1 -1
  274. package/lib/skills/skill-presence.js +1 -1
  275. package/lib/telemetry/cli-command-trace.js +1 -1
  276. package/lib/telemetry/cli-help-trace.js +1 -1
  277. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  278. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  279. package/lib/telemetry/send-cli-trace-log.js +1 -1
  280. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  281. package/lib/utils/ai_config.js +1 -1
  282. package/lib/utils/apply-jq-filter.js +1 -1
  283. package/lib/utils/cdn-config.js +1 -1
  284. package/lib/utils/check-sdk-version.js +1 -1
  285. package/lib/utils/cli-version-check.js +1 -1
  286. package/lib/utils/cli-version-policy.js +1 -1
  287. package/lib/utils/config.js +1 -1
  288. package/lib/utils/entity-with-id.js +1 -1
  289. package/lib/utils/file-utils.js +1 -1
  290. package/lib/utils/guides-cdn.js +1 -1
  291. package/lib/utils/http-client.js +1 -1
  292. package/lib/utils/is-non-interactive.js +1 -1
  293. package/lib/utils/logger.js +1 -1
  294. package/lib/utils/params.js +1 -1
  295. package/lib/utils/platform.js +1 -1
  296. package/lib/utils/sleep.js +1 -1
  297. package/lib/utils/template-replacer.js +1 -1
  298. package/lib/utils/update-notice.js +1 -1
  299. package/lib/utils/version.js +1 -1
  300. package/lib/utils/with-active-cookie.js +1 -1
  301. package/lib/utils/write-cli-side-channel.js +1 -1
  302. package/package.json +1 -2
  303. package/skills/rabetbase/SKILL.md +10 -5
  304. package/skills/rabetbase/guides/frontend-development.md +2 -0
  305. package/skills/rabetbase/guides/sdk-client-generation.md +3 -2
  306. package/skills/rabetbase/guides/typescript-sdk.md +42 -0
  307. package/skills/rabetbase/references/rabetbase-api-pull.md +5 -3
  308. package/skills/rabetbase/references/rabetbase-config.md +9 -5
  309. package/skills/rabetbase/references/rabetbase-init.md +11 -5
  310. package/skills/rabetbase/references/rabetbase-project-create.md +6 -5
  311. package/skills/rabetbase.manifest.json +3 -3
  312. package/templates/README.md +13 -17
@@ -1 +1 @@
1
- (function(_0x518fbd,_0x24e600){const _0x3f23c8=a129_0x3eb0,_0x33084a=_0x518fbd();while(!![]){try{const _0x3cb0d7=-parseInt(_0x3f23c8(0x203))/0x1+parseInt(_0x3f23c8(0x200))/0x2+-parseInt(_0x3f23c8(0x1eb))/0x3+parseInt(_0x3f23c8(0x1f1))/0x4*(parseInt(_0x3f23c8(0x1e2))/0x5)+parseInt(_0x3f23c8(0x1fd))/0x6*(-parseInt(_0x3f23c8(0x1f2))/0x7)+parseInt(_0x3f23c8(0x1f7))/0x8*(parseInt(_0x3f23c8(0x1ed))/0x9)+parseInt(_0x3f23c8(0x1f8))/0xa;if(_0x3cb0d7===_0x24e600)break;else _0x33084a['push'](_0x33084a['shift']());}catch(_0x3e35cb){_0x33084a['push'](_0x33084a['shift']());}}}(a129_0x5a76,0x56441));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 a129_0x863005,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x1a8a2d,_0x2f6b9e){const _0x2d6651=a129_0x3eb0,_0xe249be=getEnv();logger[_0x2d6651(0x1fa)](_0x2d6651(0x1ef),isProduction(_0xe249be)?_0x2d6651(0x204)+_0x1a8a2d+')':_0x2d6651(0x1fe)+_0x1a8a2d+')');const _0x55c464=await fetchMenuSnapshot(_0x1a8a2d,_0x2f6b9e,{'verbose':!![]});return logger[_0x2d6651(0x1fa)](_0x2d6651(0x1ef),_0x2d6651(0x1e0)+_0x55c464['total']+'\x20online\x20menus\x20successfully'),_0x55c464[_0x2d6651(0x1e4)][_0x2d6651(0x1e5)](toProcessedMenuItem);}export async function createMenu(_0x259b1c,_0x9ea5c0,_0x3a1668){const _0x2a8050=a129_0x3eb0;logger[_0x2a8050(0x1fa)](_0x2a8050(0x1f4),'Creating\x20menu:\x20'+_0x3a1668[_0x2a8050(0x202)]+'\x20('+_0x3a1668['path']+')');const _0x4d6aae={'appCode':_0x259b1c,'type':_0x2a8050(0x1fb),'sort':0x0,'extend':{'loadScriptMode':_0x2a8050(0x1f3),'resources':_0x3a1668['resources']?JSON['stringify'](_0x3a1668[_0x2a8050(0x205)]):undefined},..._0x3a1668},_0x49a359=await createMenuRecord(_0x4d6aae,_0x9ea5c0,_0x2a8050(0x206)+_0x3a1668[_0x2a8050(0x202)]+'\x22');return logger[_0x2a8050(0x1fa)](_0x2a8050(0x1f4),'Menu\x20created\x20successfully:\x20'+_0x3a1668[_0x2a8050(0x202)]),_0x49a359;}async function createSingleMenu(_0x2fa395,_0xcf3384,_0x391c83,_0x476465){const _0x1886e8=a129_0x3eb0,_0x52234e={'appCode':_0x2fa395,'type':_0x1886e8(0x1fb),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x476465?JSON[_0x1886e8(0x1ea)](_0x476465):undefined},'label':_0x391c83[_0x1886e8(0x202)],'path':_0x391c83[_0x1886e8(0x1ec)]},_0x40b44d=await createMenuRecord(_0x52234e,_0xcf3384,'Create\x20menu\x20\x22'+_0x391c83[_0x1886e8(0x202)]+'\x22');return logger[_0x1886e8(0x1fa)]('create-menu','Menu\x20created\x20successfully:\x20'+_0x391c83[_0x1886e8(0x202)]),_0x40b44d;}export async function createMenus(_0x3418c7,_0x5cabc1,_0x1e3c33,_0x42b875){const _0x2931d3=a129_0x3eb0;logger[_0x2931d3(0x1fa)]('create-menus',_0x2931d3(0x1e8)+_0x1e3c33[_0x2931d3(0x1e1)]);const _0x4a5be9=await Promise[_0x2931d3(0x1e9)](_0x1e3c33[_0x2931d3(0x1e5)](_0x318a6e=>createSingleMenu(_0x3418c7,_0x5cabc1,_0x318a6e,_0x42b875)));return logger['info'](_0x2931d3(0x201),_0x2931d3(0x1ff)+_0x1e3c33[_0x2931d3(0x1e1)]),_0x4a5be9;}export async function updateMenuCdnUrl(_0x236178,_0x4b8464,_0xe6a691){const _0x2deade=a129_0x3eb0;logger[_0x2deade(0x1fa)](_0x2deade(0x207),_0x2deade(0x1ee)+_0xe6a691[_0x2deade(0x202)]+'\x20('+_0xe6a691['path']+')');const _0x45cb51={'id':_0xe6a691['id'],'appCode':_0x236178,'extend':{..._0xe6a691[_0x2deade(0x1f9)]??{},..._0xe6a691[_0x2deade(0x1e3)]?{'loadScriptMode':_0xe6a691[_0x2deade(0x1e3)]}:{},'resources':_0xe6a691['resources']?JSON[_0x2deade(0x1ea)](_0xe6a691[_0x2deade(0x205)]):undefined}},_0x1e490c=await updateMenuRecord(_0x45cb51,_0x4b8464,_0x2deade(0x1fc)+_0xe6a691[_0x2deade(0x202)]+'\x22');return logger[_0x2deade(0x1fa)](_0x2deade(0x207),'Menu\x20assets\x20synced:\x20'+_0xe6a691[_0x2deade(0x202)],undefined),_0x1e490c;}function a129_0x3eb0(_0x10d28a,_0x74f0ee){_0x10d28a=_0x10d28a-0x1e0;const _0x5a7606=a129_0x5a76();let _0x3eb00e=_0x5a7606[_0x10d28a];return _0x3eb00e;}export async function createMenuEntity(_0x5d3666,_0x352916,_0x28da1f){const _0x1d880c=a129_0x3eb0;return createMenuRecord({'appCode':_0x5d3666,..._0x28da1f},_0x352916,_0x1d880c(0x206)+_0x28da1f[_0x1d880c(0x202)]+'\x22');}export async function updateMenuEntity(_0x200eb6,_0x29ea82,_0x45aa24){const _0x39745a=a129_0x3eb0;return updateMenuRecord({'appCode':_0x200eb6,..._0x45aa24},_0x29ea82,_0x39745a(0x1f6)+_0x45aa24['id']);}export async function batchDeleteMenuEntities(_0x419585,_0x4441ac){const _0xd6b96f=a129_0x3eb0;return batchDeleteMenuRecords(_0x4441ac,_0x419585,_0xd6b96f(0x1e6)+_0x4441ac['length']+_0xd6b96f(0x1f0)+(_0x4441ac['length']===0x1?'':'s'));}function a129_0x5a76(){const _0x10e459=['648455yUYKPO','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','resources','Create\x20menu\x20\x22','update-menu-cdn-url','Fetched\x20','length','142605fCGWil','loadScriptMode','menus','map','Delete\x20','Regroup\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','all','stringify','1907625EvkeVa','path','54yvdQNw','Updating\x20menu\x20asset\x20links:\x20','get-online-menu-list','\x20menu','36mZVJcz','7KsRYOh','import','create-menu','\x20menu\x20group(s)','Update\x20menu\x20','476048LEMsWb','14223620Ptldwr','extend','info','procode','Update\x20menu\x20assets\x20\x22','3541788nsiwZQ','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Batch\x20menu\x20creation\x20completed,\x20total\x20','383772INbHOd','create-menus','label'];a129_0x5a76=function(){return _0x10e459;};return a129_0x5a76();}export async function startMenuRegroup(_0x4497be,_0x414fe1){const _0x4703d4=a129_0x3eb0;return a129_0x863005(_0x414fe1,_0x4497be,_0x4703d4(0x1e7)+_0x414fe1['menuGroups'][_0x4703d4(0x1e1)]+_0x4703d4(0x1f5));}
1
+ (function(_0x29bba7,_0x5a6a14){const _0x5cc3b5=a129_0x542a,_0x4e133d=_0x29bba7();while(!![]){try{const _0x17a20b=parseInt(_0x5cc3b5(0xe6))/0x1*(-parseInt(_0x5cc3b5(0xd0))/0x2)+-parseInt(_0x5cc3b5(0xc6))/0x3*(parseInt(_0x5cc3b5(0xd3))/0x4)+-parseInt(_0x5cc3b5(0xd6))/0x5+parseInt(_0x5cc3b5(0xe5))/0x6*(parseInt(_0x5cc3b5(0xd9))/0x7)+parseInt(_0x5cc3b5(0xda))/0x8*(parseInt(_0x5cc3b5(0xc7))/0x9)+parseInt(_0x5cc3b5(0xbd))/0xa*(parseInt(_0x5cc3b5(0xd4))/0xb)+-parseInt(_0x5cc3b5(0xc8))/0xc;if(_0x17a20b===_0x5a6a14)break;else _0x4e133d['push'](_0x4e133d['shift']());}catch(_0x279b85){_0x4e133d['push'](_0x4e133d['shift']());}}}(a129_0x3abb,0x664bf));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 a129_0x588f1d,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x3b202c,_0x2df684){const _0x305517=a129_0x542a,_0x264bd8=getEnv();logger[_0x305517(0xe4)](_0x305517(0xe0),isProduction(_0x264bd8)?_0x305517(0xca)+_0x3b202c+')':_0x305517(0xc2)+_0x3b202c+')');const _0x3e776d=await fetchMenuSnapshot(_0x3b202c,_0x2df684,{'verbose':!![]});return logger[_0x305517(0xe4)](_0x305517(0xe0),_0x305517(0xd1)+_0x3e776d[_0x305517(0xc0)]+_0x305517(0xde)),_0x3e776d[_0x305517(0xe1)][_0x305517(0xc3)](toProcessedMenuItem);}export async function createMenu(_0x24ed42,_0x149589,_0x2301ce){const _0x5954e1=a129_0x542a;logger[_0x5954e1(0xe4)](_0x5954e1(0xd5),_0x5954e1(0xbe)+_0x2301ce[_0x5954e1(0xcd)]+'\x20('+_0x2301ce[_0x5954e1(0xbb)]+')');const _0x52d7af={'appCode':_0x24ed42,'type':_0x5954e1(0xcc),'sort':0x0,'extend':{'loadScriptMode':_0x5954e1(0xcb),'resources':_0x2301ce[_0x5954e1(0xe7)]?JSON[_0x5954e1(0xc5)](_0x2301ce[_0x5954e1(0xe7)]):undefined},..._0x2301ce},_0xf5f978=await createMenuRecord(_0x52d7af,_0x149589,_0x5954e1(0xc9)+_0x2301ce[_0x5954e1(0xcd)]+'\x22');return logger[_0x5954e1(0xe4)](_0x5954e1(0xd5),_0x5954e1(0xd2)+_0x2301ce['label']),_0xf5f978;}async function createSingleMenu(_0x26d5a1,_0x5007d9,_0x2b468b,_0x30f68f){const _0x19d104=a129_0x542a,_0x540302={'appCode':_0x26d5a1,'type':_0x19d104(0xcc),'sort':0x0,'extend':{'loadScriptMode':_0x19d104(0xcb),'resources':_0x30f68f?JSON[_0x19d104(0xc5)](_0x30f68f):undefined},'label':_0x2b468b[_0x19d104(0xcd)],'path':_0x2b468b[_0x19d104(0xbb)]},_0x456c73=await createMenuRecord(_0x540302,_0x5007d9,'Create\x20menu\x20\x22'+_0x2b468b[_0x19d104(0xcd)]+'\x22');return logger[_0x19d104(0xe4)](_0x19d104(0xd5),'Menu\x20created\x20successfully:\x20'+_0x2b468b[_0x19d104(0xcd)]),_0x456c73;}export async function createMenus(_0x5eeb98,_0x1d7ab7,_0xb28de5,_0x24c5d9){const _0x9bca57=a129_0x542a;logger[_0x9bca57(0xe4)](_0x9bca57(0xbc),_0x9bca57(0xdf)+_0xb28de5[_0x9bca57(0xd7)]);const _0x22e3d9=await Promise['all'](_0xb28de5[_0x9bca57(0xc3)](_0x399954=>createSingleMenu(_0x5eeb98,_0x1d7ab7,_0x399954,_0x24c5d9)));return logger[_0x9bca57(0xe4)]('create-menus',_0x9bca57(0xbf)+_0xb28de5[_0x9bca57(0xd7)]),_0x22e3d9;}export async function updateMenuCdnUrl(_0x1a292f,_0x24da20,_0x1d5440){const _0x36144b=a129_0x542a;logger[_0x36144b(0xe4)](_0x36144b(0xcf),_0x36144b(0xdd)+_0x1d5440[_0x36144b(0xcd)]+'\x20('+_0x1d5440[_0x36144b(0xbb)]+')');const _0x5e7a9e={'id':_0x1d5440['id'],'appCode':_0x1a292f,'extend':{..._0x1d5440[_0x36144b(0xce)]??{},..._0x1d5440[_0x36144b(0xc1)]?{'loadScriptMode':_0x1d5440['loadScriptMode']}:{},'resources':_0x1d5440[_0x36144b(0xe7)]?JSON[_0x36144b(0xc5)](_0x1d5440[_0x36144b(0xe7)]):undefined}},_0x497555=await updateMenuRecord(_0x5e7a9e,_0x24da20,'Update\x20menu\x20assets\x20\x22'+_0x1d5440[_0x36144b(0xcd)]+'\x22');return logger['info'](_0x36144b(0xcf),_0x36144b(0xe2)+_0x1d5440['label'],undefined),_0x497555;}export async function createMenuEntity(_0xb9ea2d,_0x48bbd4,_0x64129d){const _0x1f78ad=a129_0x542a;return createMenuRecord({'appCode':_0xb9ea2d,..._0x64129d},_0x48bbd4,'Create\x20menu\x20\x22'+_0x64129d[_0x1f78ad(0xcd)]+'\x22');}function a129_0x3abb(){const _0x498dc1=['6SszwSt','1535pajQOY','resources','\x20menu','path','create-menus','1308100FFRQkr','Creating\x20menu:\x20','Batch\x20menu\x20creation\x20completed,\x20total\x20','total','loadScriptMode','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','map','\x20menu\x20group(s)','stringify','6gNoTdP','9kmIkUp','763740KDokWi','Create\x20menu\x20\x22','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','import','procode','label','extend','update-menu-cdn-url','122VBLBfW','Fetched\x20','Menu\x20created\x20successfully:\x20','742964lMawLv','33puywsR','create-menu','1452375wDyRGC','length','Update\x20menu\x20','812931AaTMZF','5837448UxcJSa','Delete\x20','Regroup\x20','Updating\x20menu\x20asset\x20links:\x20','\x20online\x20menus\x20successfully','Start\x20batch\x20menu\x20creation,\x20total\x20','get-online-menu-list','menus','Menu\x20assets\x20synced:\x20','menuGroups','info'];a129_0x3abb=function(){return _0x498dc1;};return a129_0x3abb();}export async function updateMenuEntity(_0x42d7d6,_0xf65029,_0x16a18c){const _0x30b711=a129_0x542a;return updateMenuRecord({'appCode':_0x42d7d6,..._0x16a18c},_0xf65029,_0x30b711(0xd8)+_0x16a18c['id']);}export async function batchDeleteMenuEntities(_0x4f2c8a,_0x52558b){const _0xb19783=a129_0x542a;return batchDeleteMenuRecords(_0x52558b,_0x4f2c8a,_0xb19783(0xdb)+_0x52558b[_0xb19783(0xd7)]+_0xb19783(0xe8)+(_0x52558b['length']===0x1?'':'s'));}function a129_0x542a(_0x15fa4c,_0x3a6429){_0x15fa4c=_0x15fa4c-0xbb;const _0x3abb12=a129_0x3abb();let _0x542a4a=_0x3abb12[_0x15fa4c];return _0x542a4a;}export async function startMenuRegroup(_0x104441,_0x428cd0){const _0x532e2e=a129_0x542a;return a129_0x588f1d(_0x428cd0,_0x104441,_0x532e2e(0xdc)+_0x428cd0[_0x532e2e(0xe3)][_0x532e2e(0xd7)]+_0x532e2e(0xc4));}
@@ -1 +1 @@
1
- const a130_0x31de9a=a130_0x1cee;function a130_0x1cee(_0x413871,_0x4a34c1){_0x413871=_0x413871-0xff;const _0x175d6c=a130_0x175d();let _0x1cee17=_0x175d6c[_0x413871];return _0x1cee17;}(function(_0x42d02b,_0x41852d){const _0xf83a40=a130_0x1cee,_0x2faaf0=_0x42d02b();while(!![]){try{const _0x246d42=-parseInt(_0xf83a40(0x10c))/0x1+-parseInt(_0xf83a40(0x111))/0x2+-parseInt(_0xf83a40(0x12b))/0x3+-parseInt(_0xf83a40(0x11b))/0x4*(-parseInt(_0xf83a40(0x118))/0x5)+-parseInt(_0xf83a40(0x12d))/0x6*(-parseInt(_0xf83a40(0x123))/0x7)+parseInt(_0xf83a40(0x12c))/0x8*(parseInt(_0xf83a40(0x122))/0x9)+parseInt(_0xf83a40(0x112))/0xa;if(_0x246d42===_0x41852d)break;else _0x2faaf0['push'](_0x2faaf0['shift']());}catch(_0x1efc15){_0x2faaf0['push'](_0x2faaf0['shift']());}}}(a130_0x175d,0x56cab));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a130_0x175d(){const _0x2a7b4f=['parse',':\x20expected\x20a\x20non-empty\x20string.','dryRun','cssUrl','cwd','1835zvusIx','has','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','3200aivDAk','map','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','No\x20local\x20pages\x20matched\x20paths:\x20','keys','--params.','\x0a\x20\x20Available\x20local\x20paths:\x20','109017vgDuDg','7FUseNs','message','filter','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','import','string','CSS\x20URL\x20is\x20unreachable:\x20','hasOwn','534456atjdVf','224xoWGUN','1255698PpzXoi','trim','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Invalid\x20--params\x20fields:\x20','JS\x20URL\x20is\x20unreachable:\x20','Invalid\x20--params.','join','path','info','menu-sync','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','procode','Start\x20non-interactive\x20menu\x20sync','Menu\x20sync\x20completed','69674pDavMm','pages','jsUrl','length','push','664074ewwikZ','933150beYpuG'];a130_0x175d=function(){return _0x2a7b4f;};return a130_0x175d();}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(['jsUrl',a130_0x31de9a(0x116)]);function validateParams(_0x1db3b6){const _0x5977e8=a130_0x31de9a,_0xc25705=[];return _0x1db3b6[_0x5977e8(0x10e)]&&!isValidJsHttpsUrl(_0x1db3b6[_0x5977e8(0x10e)])&&_0xc25705[_0x5977e8(0x110)]({'field':_0x5977e8(0x10e),'message':_0x5977e8(0x108)}),_0x1db3b6[_0x5977e8(0x116)]&&!isValidCssHttpsUrl(_0x1db3b6['cssUrl'])&&_0xc25705[_0x5977e8(0x110)]({'field':'cssUrl','message':_0x5977e8(0x100)}),_0xc25705;}export async function runMenuSyncCore(_0xbc0a3a,_0x171930,_0x13f77d=[],_0x29e5d0,_0x17101b={}){const _0x5c8f96=a130_0x31de9a,_0x1b85e1=parseMenuSyncParams(_0x29e5d0),_0x486ed2=[...new Set(_0x13f77d[_0x5c8f96(0x11c)](_0x2df3c1=>_0x2df3c1[_0x5c8f96(0xff)]())['filter'](Boolean))],_0x465c78=_0x1b85e1[_0x5c8f96(0x10e)],_0x442ab0=_0x1b85e1[_0x5c8f96(0x116)],_0x1db85a=[];if(_0x465c78)_0x1db85a[_0x5c8f96(0x110)](_0x465c78);if(_0x442ab0)_0x1db85a[_0x5c8f96(0x110)](_0x442ab0);const _0x486bb1=validateParams(_0x1b85e1);if(_0x486bb1['length']>0x0){const _0x119e53=_0x486bb1[_0x5c8f96(0x11c)](_0x31f1eb=>_0x5c8f96(0x120)+_0x31f1eb['field']+':\x20'+_0x31f1eb[_0x5c8f96(0x124)])[_0x5c8f96(0x104)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x119e53);}logger['setLogPath'](process[_0x5c8f96(0x117)]()),logger['info']('menu-sync',_0x5c8f96(0x10a),{'appCode':_0xbc0a3a,'selectedCount':_0x486ed2['length'],'jsUrl':_0x465c78,'cssUrl':_0x442ab0});if(_0x465c78){const _0x26e456=await isUrlReachable(_0x465c78);if(!_0x26e456)throw new Error(_0x5c8f96(0x102)+_0x465c78);}if(_0x442ab0){const _0x40cca3=await isUrlReachable(_0x442ab0);if(!_0x40cca3)throw new Error(_0x5c8f96(0x129)+_0x442ab0);}const _0x3ce8af=getLocalPages();if(_0x3ce8af['length']===0x0){if(_0x486ed2[_0x5c8f96(0x10f)]>0x0)throw new Error(_0x5c8f96(0x11e)+_0x486ed2[_0x5c8f96(0x104)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x17101b[_0x5c8f96(0x115)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x3c5c9e=await getOnlineMenuList(_0xbc0a3a,_0x171930),_0x171f06=new Set(_0x3c5c9e['map'](_0x5994b4=>_0x5994b4[_0x5c8f96(0x105)]));let _0x110633;if(_0x486ed2[_0x5c8f96(0x10f)]>0x0){const _0x4b0658=new Map(_0x3ce8af[_0x5c8f96(0x11c)](_0x14ed61=>[_0x14ed61['path'],_0x14ed61])),_0x34d553=_0x486ed2[_0x5c8f96(0x125)](_0x599043=>!_0x4b0658['has'](_0x599043));if(_0x34d553[_0x5c8f96(0x10f)]>0x0){const _0x2d00ea=_0x3ce8af[_0x5c8f96(0x11c)](_0x43cfd3=>_0x43cfd3[_0x5c8f96(0x105)])['join'](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x34d553['join'](',\x20')+_0x5c8f96(0x121)+_0x2d00ea);}const _0x214afd=_0x486ed2['filter'](_0x24611d=>_0x171f06['has'](_0x24611d));if(_0x214afd['length']>0x0)throw new Error(_0x5c8f96(0x11a)+_0x214afd[_0x5c8f96(0x104)](',\x20'));_0x110633=_0x486ed2[_0x5c8f96(0x11c)](_0x35e8e3=>_0x4b0658['get'](_0x35e8e3));}else _0x110633=_0x3ce8af['filter'](_0x332413=>!_0x171f06['has'](_0x332413[_0x5c8f96(0x105)]));if(_0x110633[_0x5c8f96(0x10f)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x17101b[_0x5c8f96(0x115)]===!![],'targetPages':[],'plannedMenus':[]};const _0x295f23=_0x110633[_0x5c8f96(0x11c)](_0x1cd6a3=>({'type':_0x5c8f96(0x109),'path':_0x1cd6a3[_0x5c8f96(0x105)],'label':_0x1cd6a3['label'],'loadScriptMode':_0x5c8f96(0x127),'resources':[..._0x1db85a]}));if(_0x17101b['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x110633,'plannedMenus':_0x295f23};const _0x3da184=await createMenus(_0xbc0a3a,_0x171930,_0x110633,_0x1db85a[_0x5c8f96(0x10f)]>0x0?_0x1db85a:undefined);return logger[_0x5c8f96(0x106)](_0x5c8f96(0x107),_0x5c8f96(0x10b),{'count':_0x110633[_0x5c8f96(0x10f)],'resources':_0x1db85a}),{'created':_0x3da184[_0x5c8f96(0x10f)],'skipped':![],'dryRun':![],'targetPages':_0x110633,'plannedMenus':_0x295f23,'menus':_0x3da184};}export function parseMenuSyncParams(_0x2d3aef){const _0x5e7b72=a130_0x31de9a;if(!_0x2d3aef||typeof _0x2d3aef!=='string')return{};let _0x18dbe7;try{_0x18dbe7=JSON[_0x5e7b72(0x113)](_0x2d3aef);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x18dbe7!=='object'||_0x18dbe7===null||Array['isArray'](_0x18dbe7))throw new Error(_0x5e7b72(0x126));const _0x16670d=_0x18dbe7;if(Object[_0x5e7b72(0x12a)](_0x16670d,_0x5e7b72(0x10d)))throw new Error(_0x5e7b72(0x11d));const _0x438fc0=Object[_0x5e7b72(0x11f)](_0x16670d)[_0x5e7b72(0x125)](_0x579c03=>!MENU_SYNC_PARAM_KEYS[_0x5e7b72(0x119)](_0x579c03));if(_0x438fc0['length']>0x0)throw new Error(_0x5e7b72(0x101)+_0x438fc0['join'](',\x20')+'.');for(const _0x253095 of MENU_SYNC_PARAM_KEYS){const _0x510b9e=_0x16670d[_0x253095];if(_0x510b9e!==undefined&&(typeof _0x510b9e!==_0x5e7b72(0x128)||_0x510b9e[_0x5e7b72(0xff)]()===''))throw new Error(_0x5e7b72(0x103)+_0x253095+_0x5e7b72(0x114));}return{'jsUrl':typeof _0x16670d[_0x5e7b72(0x10e)]===_0x5e7b72(0x128)?_0x16670d['jsUrl'][_0x5e7b72(0xff)]():undefined,'cssUrl':typeof _0x16670d['cssUrl']===_0x5e7b72(0x128)?_0x16670d[_0x5e7b72(0x116)][_0x5e7b72(0xff)]():undefined};}
1
+ (function(_0x5b9acb,_0x4b9621){const _0x54992c=a130_0x2d15,_0x561094=_0x5b9acb();while(!![]){try{const _0x598d47=-parseInt(_0x54992c(0x85))/0x1*(parseInt(_0x54992c(0xa1))/0x2)+-parseInt(_0x54992c(0xa5))/0x3*(parseInt(_0x54992c(0x8a))/0x4)+-parseInt(_0x54992c(0x88))/0x5+-parseInt(_0x54992c(0x9b))/0x6+parseInt(_0x54992c(0x86))/0x7+parseInt(_0x54992c(0x9c))/0x8+parseInt(_0x54992c(0x97))/0x9;if(_0x598d47===_0x4b9621)break;else _0x561094['push'](_0x561094['shift']());}catch(_0x4a55dd){_0x561094['push'](_0x561094['shift']());}}}(a130_0x35d7,0x5f18a));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a130_0x2d15(_0x13db5d,_0xed9ae0){_0x13db5d=_0x13db5d-0x7a;const _0x35d79a=a130_0x35d7();let _0x2d151a=_0x35d79a[_0x13db5d];return _0x2d151a;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set(['jsUrl','cssUrl']);function validateParams(_0x4a1602){const _0x4147f8=a130_0x2d15,_0x176769=[];return _0x4a1602[_0x4147f8(0x90)]&&!isValidJsHttpsUrl(_0x4a1602[_0x4147f8(0x90)])&&_0x176769[_0x4147f8(0x7b)]({'field':'jsUrl','message':_0x4147f8(0x94)}),_0x4a1602[_0x4147f8(0x8e)]&&!isValidCssHttpsUrl(_0x4a1602[_0x4147f8(0x8e)])&&_0x176769['push']({'field':_0x4147f8(0x8e),'message':_0x4147f8(0x8b)}),_0x176769;}function a130_0x35d7(){const _0x214a02=['cwd','jsUrl','parse','info','Invalid\x20--params:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','dryRun','hasOwn','8302239JUebFV','join','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','No\x20local\x20pages\x20matched\x20paths:\x20','1878024kDogsa','5899816fkbjTn','message','Invalid\x20--params.','CSS\x20URL\x20is\x20unreachable:\x20','map','8KPtrUI','isArray','Start\x20non-interactive\x20menu\x20sync','trim','7563WBrOhT','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','filter','menu-sync','has','push','path','pages','string','JS\x20URL\x20is\x20unreachable:\x20','\x0a\x20\x20Available\x20local\x20paths:\x20','get','Menu\x20sync\x20completed','object','--params.','115142ZdfVVv','1627731bucefa','length','205810JidGPv',':\x20expected\x20a\x20non-empty\x20string.','1092YlOest','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','keys','field','cssUrl'];a130_0x35d7=function(){return _0x214a02;};return a130_0x35d7();}export async function runMenuSyncCore(_0x1e7cbd,_0x1a2f3c,_0x38ea3e=[],_0xded714,_0x4f9f00={}){const _0x2cab2f=a130_0x2d15,_0x3fa443=parseMenuSyncParams(_0xded714),_0x5b435e=[...new Set(_0x38ea3e[_0x2cab2f(0xa0)](_0x463b27=>_0x463b27[_0x2cab2f(0xa4)]())[_0x2cab2f(0xa7)](Boolean))],_0x5008ab=_0x3fa443[_0x2cab2f(0x90)],_0x5cf7db=_0x3fa443[_0x2cab2f(0x8e)],_0x58faea=[];if(_0x5008ab)_0x58faea[_0x2cab2f(0x7b)](_0x5008ab);if(_0x5cf7db)_0x58faea['push'](_0x5cf7db);const _0x2f50b4=validateParams(_0x3fa443);if(_0x2f50b4['length']>0x0){const _0x38e36c=_0x2f50b4['map'](_0x3ecdaf=>_0x2cab2f(0x84)+_0x3ecdaf[_0x2cab2f(0x8d)]+':\x20'+_0x3ecdaf[_0x2cab2f(0x9d)])[_0x2cab2f(0x98)](';\x20');throw new Error(_0x2cab2f(0x93)+_0x38e36c);}logger['setLogPath'](process[_0x2cab2f(0x8f)]()),logger[_0x2cab2f(0x92)](_0x2cab2f(0xa8),_0x2cab2f(0xa3),{'appCode':_0x1e7cbd,'selectedCount':_0x5b435e[_0x2cab2f(0x87)],'jsUrl':_0x5008ab,'cssUrl':_0x5cf7db});if(_0x5008ab){const _0x578290=await isUrlReachable(_0x5008ab);if(!_0x578290)throw new Error(_0x2cab2f(0x7f)+_0x5008ab);}if(_0x5cf7db){const _0x3a4ee9=await isUrlReachable(_0x5cf7db);if(!_0x3a4ee9)throw new Error(_0x2cab2f(0x9f)+_0x5cf7db);}const _0x58389f=getLocalPages();if(_0x58389f[_0x2cab2f(0x87)]===0x0){if(_0x5b435e[_0x2cab2f(0x87)]>0x0)throw new Error(_0x2cab2f(0x9a)+_0x5b435e[_0x2cab2f(0x98)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x4f9f00[_0x2cab2f(0x95)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x17ecd4=await getOnlineMenuList(_0x1e7cbd,_0x1a2f3c),_0x4d8262=new Set(_0x17ecd4[_0x2cab2f(0xa0)](_0xba8dbb=>_0xba8dbb['path']));let _0x25f58f;if(_0x5b435e['length']>0x0){const _0x3e536c=new Map(_0x58389f['map'](_0x56e7c8=>[_0x56e7c8[_0x2cab2f(0x7c)],_0x56e7c8])),_0x5a463e=_0x5b435e[_0x2cab2f(0xa7)](_0x36f279=>!_0x3e536c['has'](_0x36f279));if(_0x5a463e[_0x2cab2f(0x87)]>0x0){const _0x48372b=_0x58389f['map'](_0xb8885c=>_0xb8885c[_0x2cab2f(0x7c)])[_0x2cab2f(0x98)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x5a463e[_0x2cab2f(0x98)](',\x20')+_0x2cab2f(0x80)+_0x48372b);}const _0x65e382=_0x5b435e[_0x2cab2f(0xa7)](_0x3e2232=>_0x4d8262[_0x2cab2f(0x7a)](_0x3e2232));if(_0x65e382[_0x2cab2f(0x87)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x65e382[_0x2cab2f(0x98)](',\x20'));_0x25f58f=_0x5b435e['map'](_0x5e7cdc=>_0x3e536c[_0x2cab2f(0x81)](_0x5e7cdc));}else _0x25f58f=_0x58389f[_0x2cab2f(0xa7)](_0x530346=>!_0x4d8262[_0x2cab2f(0x7a)](_0x530346[_0x2cab2f(0x7c)]));if(_0x25f58f[_0x2cab2f(0x87)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x4f9f00[_0x2cab2f(0x95)]===!![],'targetPages':[],'plannedMenus':[]};const _0x1d5250=_0x25f58f['map'](_0x34c7a7=>({'type':'procode','path':_0x34c7a7[_0x2cab2f(0x7c)],'label':_0x34c7a7['label'],'loadScriptMode':'import','resources':[..._0x58faea]}));if(_0x4f9f00[_0x2cab2f(0x95)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x25f58f,'plannedMenus':_0x1d5250};const _0x527d74=await createMenus(_0x1e7cbd,_0x1a2f3c,_0x25f58f,_0x58faea[_0x2cab2f(0x87)]>0x0?_0x58faea:undefined);return logger[_0x2cab2f(0x92)]('menu-sync',_0x2cab2f(0x82),{'count':_0x25f58f[_0x2cab2f(0x87)],'resources':_0x58faea}),{'created':_0x527d74[_0x2cab2f(0x87)],'skipped':![],'dryRun':![],'targetPages':_0x25f58f,'plannedMenus':_0x1d5250,'menus':_0x527d74};}export function parseMenuSyncParams(_0x231ec5){const _0x543a92=a130_0x2d15;if(!_0x231ec5||typeof _0x231ec5!=='string')return{};let _0x29ea98;try{_0x29ea98=JSON[_0x543a92(0x91)](_0x231ec5);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x29ea98!==_0x543a92(0x83)||_0x29ea98===null||Array[_0x543a92(0xa2)](_0x29ea98))throw new Error(_0x543a92(0x99));const _0x45253b=_0x29ea98;if(Object[_0x543a92(0x96)](_0x45253b,_0x543a92(0x7d)))throw new Error(_0x543a92(0xa6));const _0x501f1e=Object[_0x543a92(0x8c)](_0x45253b)['filter'](_0x5b2352=>!MENU_SYNC_PARAM_KEYS[_0x543a92(0x7a)](_0x5b2352));if(_0x501f1e['length']>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x501f1e[_0x543a92(0x98)](',\x20')+'.');for(const _0x130529 of MENU_SYNC_PARAM_KEYS){const _0xd0e3e7=_0x45253b[_0x130529];if(_0xd0e3e7!==undefined&&(typeof _0xd0e3e7!==_0x543a92(0x7e)||_0xd0e3e7[_0x543a92(0xa4)]()===''))throw new Error(_0x543a92(0x9e)+_0x130529+_0x543a92(0x89));}return{'jsUrl':typeof _0x45253b['jsUrl']==='string'?_0x45253b[_0x543a92(0x90)][_0x543a92(0xa4)]():undefined,'cssUrl':typeof _0x45253b['cssUrl']===_0x543a92(0x7e)?_0x45253b['cssUrl']['trim']():undefined};}
@@ -1 +1 @@
1
- (function(_0x298ebf,_0x30be09){const _0x311728=a132_0x5ddc,_0x47c7a6=_0x298ebf();while(!![]){try{const _0x59bb94=-parseInt(_0x311728(0x1e8))/0x1*(-parseInt(_0x311728(0x1d5))/0x2)+-parseInt(_0x311728(0x1b3))/0x3+parseInt(_0x311728(0x1b1))/0x4+-parseInt(_0x311728(0x1c4))/0x5+parseInt(_0x311728(0x1ef))/0x6*(parseInt(_0x311728(0x1d6))/0x7)+parseInt(_0x311728(0x1ee))/0x8+parseInt(_0x311728(0x1f4))/0x9*(-parseInt(_0x311728(0x1f6))/0xa);if(_0x59bb94===_0x30be09)break;else _0x47c7a6['push'](_0x47c7a6['shift']());}catch(_0x8b03d7){_0x47c7a6['push'](_0x47c7a6['shift']());}}}(a132_0x2bef,0xce993));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a132_0x5ddc(_0x4f6ea7,_0x44dde1){_0x4f6ea7=_0x4f6ea7-0x1ad;const _0x2bef14=a132_0x2bef();let _0x5ddc67=_0x2bef14[_0x4f6ea7];return _0x5ddc67;}import{logger}from'../../../utils/logger.js';function validateParams(_0x421053){const _0x4e858e=a132_0x5ddc,_0x529eb1=[];return _0x421053[_0x4e858e(0x1e5)]&&!isValidJsHttpsUrl(_0x421053[_0x4e858e(0x1e5)])&&_0x529eb1[_0x4e858e(0x1f1)]({'field':_0x4e858e(0x1e5),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x421053[_0x4e858e(0x1ce)]&&!isValidCssHttpsUrl(_0x421053[_0x4e858e(0x1ce)])&&_0x529eb1[_0x4e858e(0x1f1)]({'field':_0x4e858e(0x1ce),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x529eb1;}export async function runMenuUpdateCore(_0x4634cf,_0x570801,_0x5a3f2b,_0x3e4515={}){const _0x54686a=a132_0x5ddc,_0x9496a1=parseUpdateParamsFlag(_0x5a3f2b),_0x2cc0cc=normalizeMode(_0x3e4515['mode']);validateSelection(_0x3e4515[_0x54686a(0x1f3)]);const _0xed686c=[];if(_0x9496a1[_0x54686a(0x1e5)])_0xed686c[_0x54686a(0x1f1)](_0x9496a1[_0x54686a(0x1e5)]);if(_0x9496a1[_0x54686a(0x1ce)])_0xed686c[_0x54686a(0x1f1)](_0x9496a1[_0x54686a(0x1ce)]);const _0x387238=validateParams(_0x9496a1);if(_0x387238['length']>0x0){const _0x27cc85=_0x387238[_0x54686a(0x1f5)](_0x3ed811=>'--params.'+_0x3ed811['field']+':\x20'+_0x3ed811[_0x54686a(0x1ed)])[_0x54686a(0x1e4)](';\x20');throw new Error(_0x54686a(0x1e7)+_0x27cc85);}if(_0xed686c[_0x54686a(0x1d9)]===0x0)throw new Error(_0x54686a(0x1d7)+_0x54686a(0x1de));logger[_0x54686a(0x1dd)](process[_0x54686a(0x1ae)]()),logger['info']('menu-asset-update',_0x54686a(0x1c8),{'appCode':_0x4634cf,'jsUrl':_0x9496a1[_0x54686a(0x1e5)],'cssUrl':_0x9496a1[_0x54686a(0x1ce)],'mode':_0x2cc0cc,'dryRun':_0x3e4515[_0x54686a(0x1ca)]===!![]});if(_0x9496a1[_0x54686a(0x1e5)]){const _0x15dee3=await isUrlReachable(_0x9496a1[_0x54686a(0x1e5)]);if(!_0x15dee3)throw new Error(_0x54686a(0x1cc)+_0x9496a1['jsUrl']);}if(_0x9496a1[_0x54686a(0x1ce)]){const _0x24b981=await isUrlReachable(_0x9496a1['cssUrl']);if(!_0x24b981)throw new Error(_0x54686a(0x1c3)+_0x9496a1[_0x54686a(0x1ce)]);}const _0x32586c=await getOnlineMenuList(_0x4634cf,_0x570801),_0x37a338=_0x32586c[_0x54686a(0x1e3)](_0x168cc7=>_0x168cc7[_0x54686a(0x1af)][_0x54686a(0x1d9)]>0x0),_0x42ed21=selectMenusForUpdate(_0x37a338,_0x3e4515['selection']);if(_0x42ed21[_0x54686a(0x1d9)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x3e4515['dryRun']===!![]};const _0x682ed3=_0x42ed21[_0x54686a(0x1f5)](_0x1f7645=>buildMenuUpdateDiff(_0x1f7645,_0x9496a1,_0x2cc0cc,_0x3e4515[_0x54686a(0x1c6)]===!![],_0x3e4515['loadScriptMode']));if(_0x3e4515['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x682ed3};const _0xb69df7=await Promise[_0x54686a(0x1d2)](_0x42ed21['map']((_0x787535,_0x232f34)=>updateMenuCdnUrl(_0x4634cf,_0x570801,{'id':_0x787535['id'],'label':_0x787535[_0x54686a(0x1bf)],'path':_0x787535[_0x54686a(0x1db)],'resources':_0x682ed3[_0x232f34][_0x54686a(0x1c1)][_0x54686a(0x1af)],'extend':_0x787535[_0x54686a(0x1f0)]??null,'loadScriptMode':_0x3e4515[_0x54686a(0x1eb)]}))),_0x1b25b8=_0xb69df7['filter'](_0x1fbcfc=>_0x1fbcfc[_0x54686a(0x1f2)]===_0x54686a(0x1c5))[_0x54686a(0x1f5)](_0x56223f=>_0x56223f[_0x54686a(0x1ea)]),_0x4f1efa=_0xb69df7[_0x54686a(0x1e3)](_0x286c57=>_0x286c57['status']===_0x54686a(0x1c7))['length'];return logger['info'](_0x54686a(0x1c9),_0x54686a(0x1bc),{'count':_0x42ed21['length'],'resources':_0xed686c}),{'updated':_0x1b25b8['length'],'failed':_0x4f1efa,'skipped':![],'menus':_0x1b25b8};}function validateSelection(_0x1cee1f){const _0x35a42e=a132_0x5ddc;if(!_0x1cee1f)throw new Error(_0x35a42e(0x1c2));if(_0x1cee1f[_0x35a42e(0x1cb)]&&(_0x1cee1f[_0x35a42e(0x1e2)][_0x35a42e(0x1d9)]>0x0||_0x1cee1f['paths'][_0x35a42e(0x1d9)]>0x0))throw new Error(_0x35a42e(0x1b4));if(!_0x1cee1f[_0x35a42e(0x1cb)]&&_0x1cee1f[_0x35a42e(0x1e2)][_0x35a42e(0x1d9)]===0x0&&_0x1cee1f['paths'][_0x35a42e(0x1d9)]===0x0)throw new Error(_0x35a42e(0x1c2));}export function selectMenusForUpdate(_0x19c8e1,_0x2ba186){const _0x4fc3bd=a132_0x5ddc;validateSelection(_0x2ba186);if(_0x2ba186[_0x4fc3bd(0x1cb)])return _0x19c8e1;const _0x13b2ef=new Set(_0x19c8e1[_0x4fc3bd(0x1f5)](_0x235a2e=>_0x235a2e['id'])),_0x2d4044=new Set(_0x19c8e1[_0x4fc3bd(0x1f5)](_0x11eaa0=>_0x11eaa0[_0x4fc3bd(0x1db)])),_0x203859=_0x2ba186[_0x4fc3bd(0x1e2)]['filter'](_0x211dd1=>!_0x13b2ef[_0x4fc3bd(0x1d8)](_0x211dd1)),_0x540832=_0x2ba186[_0x4fc3bd(0x1ec)]['filter'](_0x591913=>!_0x2d4044[_0x4fc3bd(0x1d8)](_0x591913));if(_0x203859[_0x4fc3bd(0x1d9)]>0x0||_0x540832['length']>0x0){const _0xccd8cb=[..._0x203859['map'](_0x544690=>String(_0x544690)),..._0x540832][_0x4fc3bd(0x1e4)](',\x20');throw new Error(_0x4fc3bd(0x1d1)+_0xccd8cb);}const _0x44a6d4=new Set(_0x2ba186['menuIds']),_0x5e2d26=new Set(_0x2ba186[_0x4fc3bd(0x1ec)]);return _0x19c8e1[_0x4fc3bd(0x1e3)](_0x1aec83=>_0x44a6d4[_0x4fc3bd(0x1d8)](_0x1aec83['id'])||_0x5e2d26['has'](_0x1aec83[_0x4fc3bd(0x1db)]));}function normalizeMode(_0x447b50){const _0x39f23c=a132_0x5ddc;if(!_0x447b50)return'patch';if(_0x447b50===_0x39f23c(0x1b9)||_0x447b50==='patch')return _0x447b50;throw new Error(_0x39f23c(0x1d3)+_0x447b50+_0x39f23c(0x1b2));}function buildMenuUpdateDiff(_0x586f62,_0x5b387b,_0x287b61,_0x4e9d93,_0x400c1f){const _0x5b3995=a132_0x5ddc,_0x41512a=[..._0x586f62['resources']];_0x287b61==='patch'&&assertUnambiguousPatchResources(_0x586f62,_0x41512a,_0x5b387b);const _0x5e9b85=_0x287b61===_0x5b3995(0x1dc)?patchResources(_0x41512a,_0x5b387b):replaceResources(_0x5b387b),_0x125f7e=[],_0x3b23a5=_0x41512a[_0x5b3995(0x1b7)](isJsResource),_0x356749=_0x5e9b85[_0x5b3995(0x1b7)](isJsResource);if(_0x3b23a5&&!_0x356749){const _0x3bd3a1=_0x5b3995(0x1c0)+_0x586f62[_0x5b3995(0x1bf)]+_0x5b3995(0x1ad)+_0x586f62[_0x5b3995(0x1db)]+_0x5b3995(0x1da)+_0x5b3995(0x1be);if(!_0x4e9d93)throw new Error(_0x3bd3a1);_0x125f7e[_0x5b3995(0x1f1)](_0x3bd3a1);}const _0x930fed=_0x41512a[_0x5b3995(0x1b7)](isCssResource),_0xa3b305=_0x5e9b85[_0x5b3995(0x1b7)](isCssResource);_0x930fed&&!_0xa3b305&&_0x125f7e[_0x5b3995(0x1f1)](_0x5b3995(0x1e6)+_0x586f62[_0x5b3995(0x1bf)]+_0x5b3995(0x1ad)+_0x586f62[_0x5b3995(0x1db)]+').');const _0x3aab7e=typeof _0x586f62[_0x5b3995(0x1f0)]?.[_0x5b3995(0x1eb)]==='string'?_0x586f62['extend'][_0x5b3995(0x1eb)]:null,_0x51eca8=_0x400c1f?{'loadScriptMode':_0x3aab7e}:{},_0x2562d4=_0x400c1f?{'loadScriptMode':_0x400c1f}:{};return{'id':_0x586f62['id'],'label':_0x586f62[_0x5b3995(0x1bf)],'path':_0x586f62['path'],'mode':_0x287b61,'before':{'resources':_0x41512a,..._0x51eca8},'after':{'resources':_0x5e9b85,..._0x2562d4},'warnings':_0x125f7e};}function replaceResources(_0x5089f4){const _0x227af2=a132_0x5ddc;return[_0x5089f4['jsUrl'],_0x5089f4[_0x227af2(0x1ce)]]['filter'](_0x16133b=>!!_0x16133b);}function assertUnambiguousPatchResources(_0x50becb,_0x47bd85,_0x543c60){const _0x3c747f=a132_0x5ddc,_0x3339fd=_0x47bd85[_0x3c747f(0x1e3)](isJsResource)[_0x3c747f(0x1d9)];if(_0x543c60[_0x3c747f(0x1e5)]&&_0x3339fd>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x3339fd+_0x3c747f(0x1cf)+_0x50becb['label']+_0x3c747f(0x1ad)+_0x50becb[_0x3c747f(0x1db)]+')\x20'+_0x3c747f(0x1bb));const _0x2943c6=_0x47bd85[_0x3c747f(0x1e3)](isCssResource)[_0x3c747f(0x1d9)];if(_0x543c60['cssUrl']&&_0x2943c6>0x1)throw new Error(_0x3c747f(0x1b0)+_0x2943c6+_0x3c747f(0x1e9)+_0x50becb[_0x3c747f(0x1bf)]+_0x3c747f(0x1ad)+_0x50becb[_0x3c747f(0x1db)]+')\x20'+_0x3c747f(0x1d0));}function patchResources(_0x5c3f6a,_0x2a55f2){const _0x29c576=a132_0x5ddc;let _0x2bbd53=![],_0xaee4a0=![];const _0x53e9ee=[];for(const _0x1f5aa5 of _0x5c3f6a){if(isJsResource(_0x1f5aa5)){if(_0x2a55f2['jsUrl']&&!_0x2bbd53)_0x53e9ee['push'](_0x2a55f2[_0x29c576(0x1e5)]),_0x2bbd53=!![];else!_0x2a55f2[_0x29c576(0x1e5)]&&_0x53e9ee[_0x29c576(0x1f1)](_0x1f5aa5);continue;}if(isCssResource(_0x1f5aa5)){if(_0x2a55f2['cssUrl']&&!_0xaee4a0)_0x53e9ee[_0x29c576(0x1f1)](_0x2a55f2[_0x29c576(0x1ce)]),_0xaee4a0=!![];else!_0x2a55f2['cssUrl']&&_0x53e9ee[_0x29c576(0x1f1)](_0x1f5aa5);continue;}_0x53e9ee[_0x29c576(0x1f1)](_0x1f5aa5);}return _0x2a55f2[_0x29c576(0x1e5)]&&!_0x2bbd53&&_0x53e9ee[_0x29c576(0x1bd)](_0x2a55f2[_0x29c576(0x1e5)]),_0x2a55f2[_0x29c576(0x1ce)]&&!_0xaee4a0&&_0x53e9ee[_0x29c576(0x1f1)](_0x2a55f2[_0x29c576(0x1ce)]),_0x53e9ee;}function isJsResource(_0x39eea8){const _0x27834b=a132_0x5ddc;return stripQuery(_0x39eea8)[_0x27834b(0x1cd)]()[_0x27834b(0x1d4)](_0x27834b(0x1b5));}function isCssResource(_0x1acfd7){const _0x553f6c=a132_0x5ddc;return stripQuery(_0x1acfd7)[_0x553f6c(0x1cd)]()[_0x553f6c(0x1d4)](_0x553f6c(0x1b8));}function stripQuery(_0x2d81a4){const _0x26cd0f=a132_0x5ddc;return _0x2d81a4[_0x26cd0f(0x1ba)]('?')[0x0]??_0x2d81a4;}function a132_0x2bef(){const _0x3c31dc=['toLowerCase','cssUrl','\x20existing\x20JS\x20resources\x20for\x20\x22','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','allSettled','Invalid\x20--mode:\x20','endsWith','217680ZbgTEQ','8751883XKSZhT','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','has','length',').\x20','path','patch','setLogPath','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','string','trim','parse','menuIds','filter','join','jsUrl','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','Invalid\x20--params:\x20','4agrfdC','\x20existing\x20CSS\x20resources\x20for\x20\x22','value','loadScriptMode','paths','message','1441512pIWfes','6VcNGKu','extend','push','status','selection','45TieHkx','map','1053410RdAngb','\x22\x20(','cwd','resources','menu\x20asset-update\x20cannot\x20patch\x20','4506788UtbDsq','.\x20Allowed\x20values:\x20replace,\x20patch','855390EyLwtY','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','.js','isArray','some','.css','replace','split','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Menu\x20asset\x20update\x20completed','unshift','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','label','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','after','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','CSS\x20URL\x20is\x20unreachable:\x20','6672265nuibJA','fulfilled','force','rejected','Start\x20non-interactive\x20menu\x20asset\x20update','menu-asset-update','dryRun','all','JS\x20URL\x20is\x20unreachable:\x20'];a132_0x2bef=function(){return _0x3c31dc;};return a132_0x2bef();}function parseUpdateParamsFlag(_0x7d52fb){const _0x3576ff=a132_0x5ddc;if(!_0x7d52fb||typeof _0x7d52fb!=='string')return{};try{const _0x1d7483=JSON[_0x3576ff(0x1e1)](_0x7d52fb);if(typeof _0x1d7483!=='object'||_0x1d7483===null||Array[_0x3576ff(0x1b6)](_0x1d7483))return{};return{'jsUrl':typeof _0x1d7483[_0x3576ff(0x1e5)]===_0x3576ff(0x1df)?_0x1d7483[_0x3576ff(0x1e5)]['trim']():undefined,'cssUrl':typeof _0x1d7483[_0x3576ff(0x1ce)]===_0x3576ff(0x1df)?_0x1d7483[_0x3576ff(0x1ce)][_0x3576ff(0x1e0)]():undefined};}catch{return{};}}
1
+ (function(_0x153d3a,_0x950da7){const _0x14a52b=a132_0x21dc,_0x2bcf8c=_0x153d3a();while(!![]){try{const _0x26f563=-parseInt(_0x14a52b(0x8e))/0x1*(parseInt(_0x14a52b(0x84))/0x2)+parseInt(_0x14a52b(0x81))/0x3*(parseInt(_0x14a52b(0x7d))/0x4)+parseInt(_0x14a52b(0x72))/0x5+-parseInt(_0x14a52b(0x8c))/0x6+-parseInt(_0x14a52b(0x8d))/0x7+-parseInt(_0x14a52b(0x7f))/0x8+parseInt(_0x14a52b(0x70))/0x9*(parseInt(_0x14a52b(0x75))/0xa);if(_0x26f563===_0x950da7)break;else _0x2bcf8c['push'](_0x2bcf8c['shift']());}catch(_0x149b74){_0x2bcf8c['push'](_0x2bcf8c['shift']());}}}(a132_0x5ce5,0x718c5));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(_0x305db0){const _0x3ed3b9=a132_0x21dc,_0x317f4c=[];return _0x305db0[_0x3ed3b9(0xa0)]&&!isValidJsHttpsUrl(_0x305db0['jsUrl'])&&_0x317f4c[_0x3ed3b9(0xad)]({'field':'jsUrl','message':_0x3ed3b9(0x87)}),_0x305db0[_0x3ed3b9(0xa1)]&&!isValidCssHttpsUrl(_0x305db0['cssUrl'])&&_0x317f4c[_0x3ed3b9(0xad)]({'field':_0x3ed3b9(0xa1),'message':_0x3ed3b9(0x77)}),_0x317f4c;}export async function runMenuUpdateCore(_0x262ccf,_0x225eef,_0x4f3799,_0x39f9d9={}){const _0x416f2d=a132_0x21dc,_0x49d067=parseUpdateParamsFlag(_0x4f3799),_0x1a6d0e=normalizeMode(_0x39f9d9[_0x416f2d(0x94)]);validateSelection(_0x39f9d9[_0x416f2d(0x80)]);const _0x208310=[];if(_0x49d067[_0x416f2d(0xa0)])_0x208310[_0x416f2d(0xad)](_0x49d067['jsUrl']);if(_0x49d067['cssUrl'])_0x208310[_0x416f2d(0xad)](_0x49d067[_0x416f2d(0xa1)]);const _0x57a5a4=validateParams(_0x49d067);if(_0x57a5a4['length']>0x0){const _0x57015c=_0x57a5a4['map'](_0x53fd0b=>_0x416f2d(0x6b)+_0x53fd0b[_0x416f2d(0x89)]+':\x20'+_0x53fd0b['message'])[_0x416f2d(0x79)](';\x20');throw new Error(_0x416f2d(0xac)+_0x57015c);}if(_0x208310[_0x416f2d(0x7b)]===0x0)throw new Error(_0x416f2d(0x6c)+_0x416f2d(0xb2));logger[_0x416f2d(0x98)](process['cwd']()),logger[_0x416f2d(0xa8)](_0x416f2d(0x6f),_0x416f2d(0x95),{'appCode':_0x262ccf,'jsUrl':_0x49d067[_0x416f2d(0xa0)],'cssUrl':_0x49d067[_0x416f2d(0xa1)],'mode':_0x1a6d0e,'dryRun':_0x39f9d9['dryRun']===!![]});if(_0x49d067[_0x416f2d(0xa0)]){const _0x5a76e2=await isUrlReachable(_0x49d067[_0x416f2d(0xa0)]);if(!_0x5a76e2)throw new Error(_0x416f2d(0x9d)+_0x49d067[_0x416f2d(0xa0)]);}if(_0x49d067[_0x416f2d(0xa1)]){const _0x44da5d=await isUrlReachable(_0x49d067['cssUrl']);if(!_0x44da5d)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x49d067[_0x416f2d(0xa1)]);}const _0x1dc400=await getOnlineMenuList(_0x262ccf,_0x225eef),_0x98738d=_0x1dc400[_0x416f2d(0x97)](_0x51cde7=>_0x51cde7[_0x416f2d(0x71)][_0x416f2d(0x7b)]>0x0),_0x272e5f=selectMenusForUpdate(_0x98738d,_0x39f9d9[_0x416f2d(0x80)]);if(_0x272e5f['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x39f9d9[_0x416f2d(0x9e)]===!![]};const _0xfdf874=_0x272e5f[_0x416f2d(0x78)](_0x55a0d9=>buildMenuUpdateDiff(_0x55a0d9,_0x49d067,_0x1a6d0e,_0x39f9d9[_0x416f2d(0x7e)]===!![],_0x39f9d9['loadScriptMode']));if(_0x39f9d9['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0xfdf874};const _0x3bc843=await Promise[_0x416f2d(0x73)](_0x272e5f[_0x416f2d(0x78)]((_0x227a3e,_0x40afab)=>updateMenuCdnUrl(_0x262ccf,_0x225eef,{'id':_0x227a3e['id'],'label':_0x227a3e['label'],'path':_0x227a3e[_0x416f2d(0x7a)],'resources':_0xfdf874[_0x40afab][_0x416f2d(0xa9)][_0x416f2d(0x71)],'extend':_0x227a3e['extend']??null,'loadScriptMode':_0x39f9d9[_0x416f2d(0x88)]}))),_0x1dd9ba=_0x3bc843[_0x416f2d(0x97)](_0xf158b4=>_0xf158b4[_0x416f2d(0x8b)]==='fulfilled')[_0x416f2d(0x78)](_0x138d77=>_0x138d77[_0x416f2d(0xb0)]),_0x340c4e=_0x3bc843[_0x416f2d(0x97)](_0x1a1ab5=>_0x1a1ab5[_0x416f2d(0x8b)]===_0x416f2d(0x85))[_0x416f2d(0x7b)];return logger[_0x416f2d(0xa8)](_0x416f2d(0x6f),_0x416f2d(0xa4),{'count':_0x272e5f[_0x416f2d(0x7b)],'resources':_0x208310}),{'updated':_0x1dd9ba[_0x416f2d(0x7b)],'failed':_0x340c4e,'skipped':![],'menus':_0x1dd9ba};}function validateSelection(_0xe95751){const _0x426c49=a132_0x21dc;if(!_0xe95751)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0xe95751[_0x426c49(0x6e)]&&(_0xe95751[_0x426c49(0x83)][_0x426c49(0x7b)]>0x0||_0xe95751[_0x426c49(0x96)][_0x426c49(0x7b)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0xe95751[_0x426c49(0x6e)]&&_0xe95751[_0x426c49(0x83)][_0x426c49(0x7b)]===0x0&&_0xe95751[_0x426c49(0x96)][_0x426c49(0x7b)]===0x0)throw new Error(_0x426c49(0xa7));}function a132_0x5ce5(){const _0xb7f944=['length','.css','48896toChWa','force','4189680ZpRwlO','selection','174LQoKPn',').\x20','menuIds','2VYERLr','rejected','trim','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','loadScriptMode','field','menu\x20asset-update\x20cannot\x20patch\x20','status','2364gzwAeV','4309466VVVDlj','540907vioRHF','extend','label','endsWith','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','mode','Start\x20non-interactive\x20menu\x20asset\x20update','paths','filter','setLogPath','.\x20Allowed\x20values:\x20replace,\x20patch','replace','some','patch','JS\x20URL\x20is\x20unreachable:\x20','dryRun','isArray','jsUrl','cssUrl','Invalid\x20--mode:\x20','split','Menu\x20asset\x20update\x20completed','\x20existing\x20JS\x20resources\x20for\x20\x22','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','info','after','string','has','Invalid\x20--params:\x20','push','\x22\x20(','.js','value','toLowerCase','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','--params.','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','parse','all','menu-asset-update','1142082vuPeLD','resources','1473340ZBbsAX','allSettled','unshift','90auiFmx','\x20existing\x20CSS\x20resources\x20for\x20\x22','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','map','join','path'];a132_0x5ce5=function(){return _0xb7f944;};return a132_0x5ce5();}export function selectMenusForUpdate(_0x5252c6,_0x548469){const _0x1c3b2e=a132_0x21dc;validateSelection(_0x548469);if(_0x548469[_0x1c3b2e(0x6e)])return _0x5252c6;const _0x31868c=new Set(_0x5252c6[_0x1c3b2e(0x78)](_0xefbfaf=>_0xefbfaf['id'])),_0x2d7e4f=new Set(_0x5252c6[_0x1c3b2e(0x78)](_0x304ca6=>_0x304ca6[_0x1c3b2e(0x7a)])),_0x3168b2=_0x548469[_0x1c3b2e(0x83)][_0x1c3b2e(0x97)](_0x437ea9=>!_0x31868c[_0x1c3b2e(0xab)](_0x437ea9)),_0x2715e9=_0x548469[_0x1c3b2e(0x96)][_0x1c3b2e(0x97)](_0x1babe2=>!_0x2d7e4f[_0x1c3b2e(0xab)](_0x1babe2));if(_0x3168b2[_0x1c3b2e(0x7b)]>0x0||_0x2715e9[_0x1c3b2e(0x7b)]>0x0){const _0x208b0e=[..._0x3168b2[_0x1c3b2e(0x78)](_0x5e06e7=>String(_0x5e06e7)),..._0x2715e9][_0x1c3b2e(0x79)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x208b0e);}const _0x231d43=new Set(_0x548469[_0x1c3b2e(0x83)]),_0x178a3c=new Set(_0x548469[_0x1c3b2e(0x96)]);return _0x5252c6['filter'](_0x166cd5=>_0x231d43[_0x1c3b2e(0xab)](_0x166cd5['id'])||_0x178a3c[_0x1c3b2e(0xab)](_0x166cd5[_0x1c3b2e(0x7a)]));}function a132_0x21dc(_0x2dce49,_0x4f31b8){_0x2dce49=_0x2dce49-0x6b;const _0x5ce5f2=a132_0x5ce5();let _0x21dcdb=_0x5ce5f2[_0x2dce49];return _0x21dcdb;}function normalizeMode(_0x5cb7c0){const _0x201787=a132_0x21dc;if(!_0x5cb7c0)return _0x201787(0x9c);if(_0x5cb7c0===_0x201787(0x9a)||_0x5cb7c0===_0x201787(0x9c))return _0x5cb7c0;throw new Error(_0x201787(0xa2)+_0x5cb7c0+_0x201787(0x99));}function buildMenuUpdateDiff(_0x2cb592,_0x1dcb7e,_0x3ff1f9,_0xf1c7fb,_0x19ed51){const _0xe8ddbe=a132_0x21dc,_0x1afbba=[..._0x2cb592[_0xe8ddbe(0x71)]];_0x3ff1f9===_0xe8ddbe(0x9c)&&assertUnambiguousPatchResources(_0x2cb592,_0x1afbba,_0x1dcb7e);const _0x458455=_0x3ff1f9===_0xe8ddbe(0x9c)?patchResources(_0x1afbba,_0x1dcb7e):replaceResources(_0x1dcb7e),_0x4866cb=[],_0x5518fa=_0x1afbba['some'](isJsResource),_0xa5ae3c=_0x458455[_0xe8ddbe(0x9b)](isJsResource);if(_0x5518fa&&!_0xa5ae3c){const _0x4ea07d=_0xe8ddbe(0x92)+_0x2cb592[_0xe8ddbe(0x90)]+'\x22\x20('+_0x2cb592['path']+_0xe8ddbe(0x82)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0xf1c7fb)throw new Error(_0x4ea07d);_0x4866cb[_0xe8ddbe(0xad)](_0x4ea07d);}const _0x53b779=_0x1afbba['some'](isCssResource),_0xf6f8ce=_0x458455[_0xe8ddbe(0x9b)](isCssResource);_0x53b779&&!_0xf6f8ce&&_0x4866cb[_0xe8ddbe(0xad)](_0xe8ddbe(0x93)+_0x2cb592['label']+_0xe8ddbe(0xae)+_0x2cb592['path']+').');const _0x5ec862=typeof _0x2cb592[_0xe8ddbe(0x8f)]?.['loadScriptMode']===_0xe8ddbe(0xaa)?_0x2cb592[_0xe8ddbe(0x8f)][_0xe8ddbe(0x88)]:null,_0x2c3b49=_0x19ed51?{'loadScriptMode':_0x5ec862}:{},_0x5c89af=_0x19ed51?{'loadScriptMode':_0x19ed51}:{};return{'id':_0x2cb592['id'],'label':_0x2cb592['label'],'path':_0x2cb592[_0xe8ddbe(0x7a)],'mode':_0x3ff1f9,'before':{'resources':_0x1afbba,..._0x2c3b49},'after':{'resources':_0x458455,..._0x5c89af},'warnings':_0x4866cb};}function replaceResources(_0x2a8673){const _0x4202ac=a132_0x21dc;return[_0x2a8673[_0x4202ac(0xa0)],_0x2a8673[_0x4202ac(0xa1)]][_0x4202ac(0x97)](_0x3f0cfa=>!!_0x3f0cfa);}function assertUnambiguousPatchResources(_0x5af401,_0x3e7c5c,_0x1d3d14){const _0x3f0fb6=a132_0x21dc,_0x4106e4=_0x3e7c5c[_0x3f0fb6(0x97)](isJsResource)['length'];if(_0x1d3d14[_0x3f0fb6(0xa0)]&&_0x4106e4>0x1)throw new Error(_0x3f0fb6(0x8a)+_0x4106e4+_0x3f0fb6(0xa5)+_0x5af401[_0x3f0fb6(0x90)]+_0x3f0fb6(0xae)+_0x5af401['path']+')\x20'+_0x3f0fb6(0xa6));const _0x52e105=_0x3e7c5c['filter'](isCssResource)['length'];if(_0x1d3d14[_0x3f0fb6(0xa1)]&&_0x52e105>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x52e105+_0x3f0fb6(0x76)+_0x5af401[_0x3f0fb6(0x90)]+_0x3f0fb6(0xae)+_0x5af401[_0x3f0fb6(0x7a)]+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function patchResources(_0x491f12,_0x175c11){const _0x3900e3=a132_0x21dc;let _0x57f2d8=![],_0x11e686=![];const _0x478846=[];for(const _0x4ddc1b of _0x491f12){if(isJsResource(_0x4ddc1b)){if(_0x175c11['jsUrl']&&!_0x57f2d8)_0x478846[_0x3900e3(0xad)](_0x175c11['jsUrl']),_0x57f2d8=!![];else!_0x175c11[_0x3900e3(0xa0)]&&_0x478846[_0x3900e3(0xad)](_0x4ddc1b);continue;}if(isCssResource(_0x4ddc1b)){if(_0x175c11['cssUrl']&&!_0x11e686)_0x478846[_0x3900e3(0xad)](_0x175c11[_0x3900e3(0xa1)]),_0x11e686=!![];else!_0x175c11[_0x3900e3(0xa1)]&&_0x478846[_0x3900e3(0xad)](_0x4ddc1b);continue;}_0x478846['push'](_0x4ddc1b);}return _0x175c11[_0x3900e3(0xa0)]&&!_0x57f2d8&&_0x478846[_0x3900e3(0x74)](_0x175c11[_0x3900e3(0xa0)]),_0x175c11[_0x3900e3(0xa1)]&&!_0x11e686&&_0x478846['push'](_0x175c11[_0x3900e3(0xa1)]),_0x478846;}function isJsResource(_0x51f482){const _0x214119=a132_0x21dc;return stripQuery(_0x51f482)[_0x214119(0xb1)]()[_0x214119(0x91)](_0x214119(0xaf));}function isCssResource(_0x4a91fc){const _0x71f381=a132_0x21dc;return stripQuery(_0x4a91fc)[_0x71f381(0xb1)]()[_0x71f381(0x91)](_0x71f381(0x7c));}function stripQuery(_0x1f4f24){const _0x354dc4=a132_0x21dc;return _0x1f4f24[_0x354dc4(0xa3)]('?')[0x0]??_0x1f4f24;}function parseUpdateParamsFlag(_0x52ef60){const _0x729e18=a132_0x21dc;if(!_0x52ef60||typeof _0x52ef60!==_0x729e18(0xaa))return{};try{const _0x1ac332=JSON[_0x729e18(0x6d)](_0x52ef60);if(typeof _0x1ac332!=='object'||_0x1ac332===null||Array[_0x729e18(0x9f)](_0x1ac332))return{};return{'jsUrl':typeof _0x1ac332[_0x729e18(0xa0)]===_0x729e18(0xaa)?_0x1ac332['jsUrl'][_0x729e18(0x86)]():undefined,'cssUrl':typeof _0x1ac332[_0x729e18(0xa1)]===_0x729e18(0xaa)?_0x1ac332['cssUrl'][_0x729e18(0x86)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x285192,_0xe2fe07){const _0x1a8b14=a133_0xf121,_0x3a4916=_0x285192();while(!![]){try{const _0xbb9213=parseInt(_0x1a8b14(0x7f))/0x1+-parseInt(_0x1a8b14(0x7e))/0x2*(parseInt(_0x1a8b14(0x82))/0x3)+parseInt(_0x1a8b14(0x81))/0x4*(parseInt(_0x1a8b14(0x7a))/0x5)+parseInt(_0x1a8b14(0x7b))/0x6*(-parseInt(_0x1a8b14(0x7d))/0x7)+-parseInt(_0x1a8b14(0x80))/0x8*(-parseInt(_0x1a8b14(0x84))/0x9)+-parseInt(_0x1a8b14(0x78))/0xa+parseInt(_0x1a8b14(0x83))/0xb*(parseInt(_0x1a8b14(0x85))/0xc);if(_0xbb9213===_0xe2fe07)break;else _0x3a4916['push'](_0x3a4916['shift']());}catch(_0x3c34e3){_0x3a4916['push'](_0x3a4916['shift']());}}}(a133_0x498a,0xd30f9));function a133_0x498a(){const _0x459f2e=['12649593NLdWkJ','1665eoxuPX','12NthIYc','test','8240700pbREQU','HEAD','20atOCYR','6KGPHSg','trim','4048387uhzngF','4376yCJLMX','318006BBqFKt','54232IDvhHX','656336TrLvnB','1524BwEIWX'];a133_0x498a=function(){return _0x459f2e;};return a133_0x498a();}export function isValidJsHttpsUrl(_0x2b21d5){const _0x43633a=a133_0xf121;return/^https:\/\/.+\.js(\?.*)?$/[_0x43633a(0x77)](_0x2b21d5[_0x43633a(0x7c)]());}export function isValidCssHttpsUrl(_0x11b796){const _0x7216a1=a133_0xf121;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x11b796[_0x7216a1(0x7c)]());}function a133_0xf121(_0x33d6b4,_0xda8cba){_0x33d6b4=_0x33d6b4-0x77;const _0x498aeb=a133_0x498a();let _0xf121f3=_0x498aeb[_0x33d6b4];return _0xf121f3;}export async function isUrlReachable(_0x2b2d5b){const _0x22769a=a133_0xf121;try{const _0x3067f0=await fetch(_0x2b2d5b,{'method':_0x22769a(0x79)});return _0x3067f0['ok'];}catch{return![];}}
1
+ (function(_0x132856,_0x39e76c){const _0x2e13da=a133_0x6d77,_0x46c749=_0x132856();while(!![]){try{const _0x337984=-parseInt(_0x2e13da(0x112))/0x1+parseInt(_0x2e13da(0x11b))/0x2*(parseInt(_0x2e13da(0x113))/0x3)+parseInt(_0x2e13da(0x111))/0x4*(-parseInt(_0x2e13da(0x11d))/0x5)+-parseInt(_0x2e13da(0x119))/0x6+-parseInt(_0x2e13da(0x11c))/0x7+-parseInt(_0x2e13da(0x11a))/0x8*(-parseInt(_0x2e13da(0x11e))/0x9)+parseInt(_0x2e13da(0x115))/0xa*(parseInt(_0x2e13da(0x117))/0xb);if(_0x337984===_0x39e76c)break;else _0x46c749['push'](_0x46c749['shift']());}catch(_0x2cc180){_0x46c749['push'](_0x46c749['shift']());}}}(a133_0x2264,0x62ac3));export function isValidJsHttpsUrl(_0x2aa0fb){const _0xa4e8b9=a133_0x6d77;return/^https:\/\/.+\.js(\?.*)?$/[_0xa4e8b9(0x118)](_0x2aa0fb[_0xa4e8b9(0x116)]());}export function isValidCssHttpsUrl(_0x29edaf){const _0x37d948=a133_0x6d77;return/^https:\/\/.+\.css(\?.*)?$/[_0x37d948(0x118)](_0x29edaf[_0x37d948(0x116)]());}export async function isUrlReachable(_0x11fc5e){const _0x40a19a=a133_0x6d77;try{const _0x44bddb=await fetch(_0x11fc5e,{'method':_0x40a19a(0x114)});return _0x44bddb['ok'];}catch{return![];}}function a133_0x6d77(_0x55b5b9,_0x7c9056){_0x55b5b9=_0x55b5b9-0x111;const _0x2264a4=a133_0x2264();let _0x6d776e=_0x2264a4[_0x55b5b9];return _0x6d776e;}function a133_0x2264(){const _0x16c314=['trim','561zrWINu','test','1617120URfiNv','133576jguHgM','4vabicr','3135846xABzuL','5oHgace','18rAHDTR','2183624tDoFhR','148420MihQCc','384933FSPLqC','HEAD','299210lmAYlm'];a133_0x2264=function(){return _0x16c314;};return a133_0x2264();}
@@ -1 +1 @@
1
- const a134_0xc7259d=a134_0x1a25;(function(_0x3d8d22,_0x1cbe99){const _0x5e1707=a134_0x1a25,_0x38b16d=_0x3d8d22();while(!![]){try{const _0x2ebacc=parseInt(_0x5e1707(0x1ea))/0x1+parseInt(_0x5e1707(0x1c7))/0x2+parseInt(_0x5e1707(0x1c6))/0x3+-parseInt(_0x5e1707(0x1d8))/0x4*(-parseInt(_0x5e1707(0x1de))/0x5)+-parseInt(_0x5e1707(0x1e2))/0x6*(parseInt(_0x5e1707(0x1aa))/0x7)+-parseInt(_0x5e1707(0x1cd))/0x8+-parseInt(_0x5e1707(0x1db))/0x9*(-parseInt(_0x5e1707(0x1af))/0xa);if(_0x2ebacc===_0x1cbe99)break;else _0x38b16d['push'](_0x38b16d['shift']());}catch(_0x1edb77){_0x38b16d['push'](_0x38b16d['shift']());}}}(a134_0x1fc2,0x40afc));import a134_0x2b3dde from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';function a134_0x1a25(_0x2ce062,_0x4dc1be){_0x2ce062=_0x2ce062-0x1a4;const _0x1fc267=a134_0x1fc2();let _0x1a25d9=_0x1fc267[_0x2ce062];return _0x1a25d9;}function a134_0x1fc2(){const _0xa0dab6=['onlineMenuList','\x20menu(s)\x20created','Would\x20create\x20','params','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','failed','paths','15044wiKVKR','\x20created.','flag','477mOHuID','\x20\x20Create\x20','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','365KXjjIF','filter','rawFlags','boolean','6zmjEKs','\x20local\x20microfrontend\x20menu(s).','size','trim','validation','yes','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20menu(s)','375422BzujpL','selectedAppName','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Menu\x20creation\x20failed','message','appCode','cookie','2844884xveUvW','write','length','yellow','Created\x20','32460LJBPbf','\x20created,\x20','string','Failed\x20to\x20fetch\x20online\x20menu\x20list','✓\x20Menu\x20sync\x20completed:\x20','targetPages','\x20menu(s)...','created','cyan','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Sync\x20local\x20pages\x20as\x20platform\x20menus','\x20\x20Cancelled.','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Online\x20menu\x20list\x20fetched','str','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','POST','cssUrl','appcode','\x20menu(s)\x20with\x20JS:\x20','\x20page(s)','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','266034uzMRkQ','275830FzhxiE','skipped','Fetching\x20online\x20menu\x20list...','\x20and\x20CSS:\x20','map','Menu\x20sync\x20completed:\x20','3017904NVnyqG','jsUrl','Creating\x20','\x20\x20Continue\x20with\x20creation?'];a134_0x1fc2=function(){return _0xa0dab6;};return a134_0x1fc2();}import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':'sync','description':a134_0xc7259d(0x1ba),'risk':a134_0xc7259d(0x1ab),'flags':[{'name':a134_0xc7259d(0x1d4),'type':'string','description':a134_0xc7259d(0x1e8)+a134_0xc7259d(0x1c5)},{'name':'paths','type':a134_0xc7259d(0x1b1),'description':a134_0xc7259d(0x1b9)},{'name':a134_0xc7259d(0x1e7),'type':a134_0xc7259d(0x1e1),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x3e3165){const _0x388f93=a134_0xc7259d;ensureRunnableContext(_0x3e3165[_0x388f93(0x1e0)],_0x3e3165[_0x388f93(0x1a4)]);const _0x206587=await runMenuSyncCore(_0x3e3165[_0x388f93(0x1a8)],_0x3e3165[_0x388f93(0x1a9)],parsePaths(_0x3e3165['str']('paths')),_0x3e3165[_0x388f93(0x1be)](_0x388f93(0x1d4)),{'dryRun':!![]});return{'method':_0x388f93(0x1c0),'url':'/smartapi/menu/create','body':_0x206587,'description':_0x206587[_0x388f93(0x1c8)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x388f93(0x1d3)+_0x206587[_0x388f93(0x1b4)][_0x388f93(0x1ac)]+_0x388f93(0x1e3)};},async 'execute'(_0x3fcbf5){const _0x501f19=a134_0xc7259d;ensureRunnableContext(_0x3fcbf5[_0x501f19(0x1e0)],_0x3fcbf5['selectedAppName']);const _0x1cfae0=_0x3fcbf5[_0x501f19(0x1da)](_0x501f19(0x1e7)),_0x27762f=_0x3fcbf5[_0x501f19(0x1be)](_0x501f19(0x1d4)),_0x361e75=parsePaths(_0x3fcbf5[_0x501f19(0x1be)](_0x501f19(0x1d7))),_0x4ce77a=parseMenuSyncParams(_0x27762f);if(_0x1cfae0){const _0x527861=await runMenuSyncCore(_0x3fcbf5[_0x501f19(0x1a8)],_0x3fcbf5[_0x501f19(0x1a9)],_0x361e75,_0x27762f);if(_0x527861[_0x501f19(0x1c8)]){const _0x121243=getLocalPages();_0x121243[_0x501f19(0x1ac)]===0x0?writeCliSideChannelLine(_0x501f19(0x1d5)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x501f19(0x1b3)+_0x527861['created']+_0x501f19(0x1d2));return{'ok':!![],'data':_0x527861,'message':_0x527861[_0x501f19(0x1c8)]?'Menu\x20sync\x20skipped':_0x501f19(0x1cc)+_0x527861['created']+_0x501f19(0x1d9)};}if(_0x361e75[_0x501f19(0x1ac)]>0x0)throw CliErrors[_0x501f19(0x1e6)](_0x501f19(0x1dd),_0x501f19(0x1b8));if(!isInteractive()&&_0x27762f)throw CliErrors[_0x501f19(0x1e6)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x501f19(0x1b8));requireInteractive();const _0x282806=startSpinner(_0x501f19(0x1c9));let _0x6a84b,_0x4fc7c2,_0x381af3;try{const _0x3ed2f0=await fetchMenuData(_0x3fcbf5[_0x501f19(0x1a8)],_0x3fcbf5[_0x501f19(0x1a9)]);_0x6a84b=_0x3ed2f0['localPages'],_0x4fc7c2=_0x3ed2f0['onlinePaths'],_0x381af3=_0x3ed2f0[_0x501f19(0x1d1)],stopSpinner(_0x282806,_0x501f19(0x1bd),!![]);}catch(_0x11936d){stopSpinner(_0x282806,_0x501f19(0x1b2),![]);throw CliErrors[_0x501f19(0x1e6)](_0x11936d instanceof Error?_0x11936d[_0x501f19(0x1a7)]:_0x501f19(0x1b2));}if(_0x6a84b[_0x501f19(0x1ac)]===0x0)return writeCliSideChannelLine(a134_0x2b3dde[_0x501f19(0x1ad)](_0x501f19(0x1bf))),{'ok':!![]};const _0x385a14=buildCompareRows(_0x6a84b,_0x4fc7c2);writeCliSideChannelLine(renderCompareTable(_0x385a14)),writeCliSideChannelLine('');const _0x37d8e5=await selectPages(_0x6a84b,_0x4fc7c2);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0x2b3dde[_0x501f19(0x1b7)]('\x20\x20✓\x20Selected:\x20'+_0x37d8e5[_0x501f19(0x1ac)]+_0x501f19(0x1c4)));const _0x469485=_0x4ce77a[_0x501f19(0x1ce)]&&_0x4ce77a['cssUrl'];if(!_0x469485){writeCliSideChannelLine(renderSyncSummary(_0x37d8e5,_0x4fc7c2[_0x501f19(0x1e4)]>0x0));const _0x4a53b0=await askConfirm(_0x501f19(0x1d0));if(!_0x4a53b0)return writeCliSideChannelLine(a134_0x2b3dde['gray']('\x20\x20Cancelled.')),{'ok':!![]};}let _0x5cc7ae=_0x4ce77a[_0x501f19(0x1ce)],_0x1bc033=_0x4ce77a[_0x501f19(0x1c1)];!_0x5cc7ae&&(_0x5cc7ae=await askJsUrl());!_0x1bc033&&(_0x1bc033=await askCssUrl());const _0x3de8d4=await askConfirm(_0x501f19(0x1dc)+_0x37d8e5[_0x501f19(0x1ac)]+_0x501f19(0x1c3)+_0x5cc7ae+_0x501f19(0x1ca)+_0x1bc033+'?');if(!_0x3de8d4)return writeCliSideChannelLine(a134_0x2b3dde['gray'](_0x501f19(0x1bb))),{'ok':!![]};const _0x5bd7df=[_0x5cc7ae,_0x1bc033],_0x47f8a4=startSpinner(_0x501f19(0x1cf)+_0x37d8e5[_0x501f19(0x1ac)]+_0x501f19(0x1b5));try{const _0x2aecb4=await doCreateMenus(_0x3fcbf5['appCode'],_0x3fcbf5['cookie'],_0x37d8e5,_0x5bd7df);return stopSpinner(_0x47f8a4,_0x501f19(0x1ae)+_0x2aecb4[_0x501f19(0x1b6)]+_0x501f19(0x1e9),!![]),{'ok':!![],'data':_0x2aecb4,'message':_0x501f19(0x1cc)+_0x2aecb4[_0x501f19(0x1b6)]+_0x501f19(0x1b0)+_0x2aecb4[_0x501f19(0x1d6)]+'\x20failed.'};}catch(_0x28e339){stopSpinner(_0x47f8a4,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x501f19(0x1e6)](_0x28e339 instanceof Error?_0x28e339['message']:_0x501f19(0x1a6));}}};function ensureRunnableContext(_0x72754e,_0x34447a){const _0x5c3cac=a134_0xc7259d,_0x5a422b=_0x72754e[_0x5c3cac(0x1c2)]?String(_0x72754e[_0x5c3cac(0x1c2)])[_0x5c3cac(0x1e5)]():'';if(!isInProject()&&!_0x34447a&&!_0x5a422b)throw CliErrors[_0x5c3cac(0x1e6)](_0x5c3cac(0x1a5)+_0x5c3cac(0x1bc));}function parsePaths(_0xa3a0dc){const _0xe84c09=a134_0xc7259d;return[...new Set(_0xa3a0dc['split'](',')[_0xe84c09(0x1cb)](_0xdefd56=>_0xdefd56['trim']())[_0xe84c09(0x1df)](Boolean))];}
1
+ const a134_0x241447=a134_0x4008;(function(_0x72119e,_0x427171){const _0x4b772c=a134_0x4008,_0x2aa627=_0x72119e();while(!![]){try{const _0x115f2f=-parseInt(_0x4b772c(0xe6))/0x1+parseInt(_0x4b772c(0x126))/0x2*(-parseInt(_0x4b772c(0xec))/0x3)+-parseInt(_0x4b772c(0xfd))/0x4+parseInt(_0x4b772c(0xf9))/0x5+parseInt(_0x4b772c(0x105))/0x6*(-parseInt(_0x4b772c(0x124))/0x7)+parseInt(_0x4b772c(0x107))/0x8*(-parseInt(_0x4b772c(0x117))/0x9)+parseInt(_0x4b772c(0x11a))/0xa;if(_0x115f2f===_0x427171)break;else _0x2aa627['push'](_0x2aa627['shift']());}catch(_0x243c79){_0x2aa627['push'](_0x2aa627['shift']());}}}(a134_0x2d63,0xdd872));import a134_0x129a98 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';function a134_0x2d63(){const _0x166f7a=['5959272LsidrR','selectedAppName','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20\x20Cancelled.','onlineMenuList','\x20menu(s)','size','cookie','6JmrtmW','Menu\x20creation\x20failed','776GHVInk','yellow','filter','failed','appCode','\x20\x20Continue\x20with\x20creation?','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','length','gray','Created\x20','str','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','cssUrl','\x20local\x20microfrontend\x20menu(s).','\x20\x20Create\x20','40023bqNulz','flag','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','52544350neFuWp','\x20page(s)','localPages','split','✓\x20Menu\x20sync\x20completed:\x20','\x20created.','Menu\x20sync\x20completed:\x20','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Would\x20create\x20','Sync\x20local\x20pages\x20as\x20platform\x20menus','4756906vrxTgn','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','3742IOGEyr','string','menu','POST','yes','/smartapi/menu/create','params','683620tjpEKi','Creating\x20','appcode','\x20created,\x20','validation','Pre-fill\x20JS/CSS\x20URLs.\x20','2178jwarpM','rawFlags','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','trim','\x20menu(s)...','message','created','paths','\x20menu(s)\x20with\x20JS:\x20','skipped','targetPages','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','\x20menu(s)\x20created','1478220NXsAiI','boolean','Online\x20menu\x20list\x20fetched','cyan'];a134_0x2d63=function(){return _0x166f7a;};return a134_0x2d63();}function a134_0x4008(_0x24b503,_0x33cd25){_0x24b503=_0x24b503-0xe3;const _0x2d6376=a134_0x2d63();let _0x4008b5=_0x2d6376[_0x24b503];return _0x4008b5;}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':a134_0x241447(0x128),'command':'sync','description':a134_0x241447(0x123),'risk':'write','flags':[{'name':a134_0x241447(0xe5),'type':a134_0x241447(0x127),'description':a134_0x241447(0xeb)+a134_0x241447(0x119)},{'name':a134_0x241447(0xf3),'type':a134_0x241447(0x127),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a134_0x241447(0xe3),'type':a134_0x241447(0xfa),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x5de46b){const _0xb2d763=a134_0x241447;ensureRunnableContext(_0x5de46b[_0xb2d763(0xed)],_0x5de46b[_0xb2d763(0xfe)]);const _0x2f5679=await runMenuSyncCore(_0x5de46b[_0xb2d763(0x10b)],_0x5de46b[_0xb2d763(0x104)],parsePaths(_0x5de46b['str'](_0xb2d763(0xf3))),_0x5de46b[_0xb2d763(0x111)](_0xb2d763(0xe5)),{'dryRun':!![]});return{'method':_0xb2d763(0x129),'url':_0xb2d763(0xe4),'body':_0x2f5679,'description':_0x2f5679[_0xb2d763(0xf5)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0xb2d763(0x122)+_0x2f5679[_0xb2d763(0xf6)]['length']+_0xb2d763(0x115)};},async 'execute'(_0x2f5db1){const _0x481ecd=a134_0x241447;ensureRunnableContext(_0x2f5db1[_0x481ecd(0xed)],_0x2f5db1[_0x481ecd(0xfe)]);const _0x2f5f02=_0x2f5db1[_0x481ecd(0x118)](_0x481ecd(0xe3)),_0xa5bae8=_0x2f5db1[_0x481ecd(0x111)](_0x481ecd(0xe5)),_0x42089f=parsePaths(_0x2f5db1[_0x481ecd(0x111)](_0x481ecd(0xf3))),_0x5cc032=parseMenuSyncParams(_0xa5bae8);if(_0x2f5f02){const _0x5f0afc=await runMenuSyncCore(_0x2f5db1[_0x481ecd(0x10b)],_0x2f5db1[_0x481ecd(0x104)],_0x42089f,_0xa5bae8);if(_0x5f0afc[_0x481ecd(0xf5)]){const _0x574c0e=getLocalPages();_0x574c0e[_0x481ecd(0x10e)]===0x0?writeCliSideChannelLine(_0x481ecd(0xee)):writeCliSideChannelLine(_0x481ecd(0x113));}else writeCliSideChannelLine(_0x481ecd(0x11e)+_0x5f0afc[_0x481ecd(0xf2)]+_0x481ecd(0xf8));return{'ok':!![],'data':_0x5f0afc,'message':_0x5f0afc['skipped']?'Menu\x20sync\x20skipped':_0x481ecd(0x120)+_0x5f0afc[_0x481ecd(0xf2)]+_0x481ecd(0x11f)};}if(_0x42089f[_0x481ecd(0x10e)]>0x0)throw CliErrors[_0x481ecd(0xea)](_0x481ecd(0x125),_0x481ecd(0x112));if(!isInteractive()&&_0xa5bae8)throw CliErrors['validation']('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x481ecd(0x112));requireInteractive();const _0x41884e=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x22c397,_0x47aba1,_0x4b15f6;try{const _0x6dc904=await fetchMenuData(_0x2f5db1[_0x481ecd(0x10b)],_0x2f5db1[_0x481ecd(0x104)]);_0x22c397=_0x6dc904[_0x481ecd(0x11c)],_0x47aba1=_0x6dc904['onlinePaths'],_0x4b15f6=_0x6dc904[_0x481ecd(0x101)],stopSpinner(_0x41884e,_0x481ecd(0xfb),!![]);}catch(_0x7d75e4){stopSpinner(_0x41884e,_0x481ecd(0xff),![]);throw CliErrors['validation'](_0x7d75e4 instanceof Error?_0x7d75e4[_0x481ecd(0xf1)]:_0x481ecd(0xff));}if(_0x22c397[_0x481ecd(0x10e)]===0x0)return writeCliSideChannelLine(a134_0x129a98[_0x481ecd(0x108)](_0x481ecd(0x121))),{'ok':!![]};const _0x23cccc=buildCompareRows(_0x22c397,_0x47aba1);writeCliSideChannelLine(renderCompareTable(_0x23cccc)),writeCliSideChannelLine('');const _0x2152c2=await selectPages(_0x22c397,_0x47aba1);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0x129a98[_0x481ecd(0xfc)]('\x20\x20✓\x20Selected:\x20'+_0x2152c2[_0x481ecd(0x10e)]+_0x481ecd(0x11b)));const _0x5cf5ba=_0x5cc032['jsUrl']&&_0x5cc032[_0x481ecd(0x114)];if(!_0x5cf5ba){writeCliSideChannelLine(renderSyncSummary(_0x2152c2,_0x47aba1[_0x481ecd(0x103)]>0x0));const _0x54f6d3=await askConfirm(_0x481ecd(0x10c));if(!_0x54f6d3)return writeCliSideChannelLine(a134_0x129a98[_0x481ecd(0x10f)](_0x481ecd(0x100))),{'ok':!![]};}let _0x1e4af7=_0x5cc032['jsUrl'],_0x564c78=_0x5cc032[_0x481ecd(0x114)];!_0x1e4af7&&(_0x1e4af7=await askJsUrl());!_0x564c78&&(_0x564c78=await askCssUrl());const _0x30b617=await askConfirm(_0x481ecd(0x116)+_0x2152c2[_0x481ecd(0x10e)]+_0x481ecd(0xf4)+_0x1e4af7+'\x20and\x20CSS:\x20'+_0x564c78+'?');if(!_0x30b617)return writeCliSideChannelLine(a134_0x129a98[_0x481ecd(0x10f)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x54e01a=[_0x1e4af7,_0x564c78],_0x199529=startSpinner(_0x481ecd(0xe7)+_0x2152c2[_0x481ecd(0x10e)]+_0x481ecd(0xf0));try{const _0xa00d6=await doCreateMenus(_0x2f5db1[_0x481ecd(0x10b)],_0x2f5db1['cookie'],_0x2152c2,_0x54e01a);return stopSpinner(_0x199529,_0x481ecd(0x110)+_0xa00d6[_0x481ecd(0xf2)]+_0x481ecd(0x102),!![]),{'ok':!![],'data':_0xa00d6,'message':_0x481ecd(0x120)+_0xa00d6[_0x481ecd(0xf2)]+_0x481ecd(0xe9)+_0xa00d6[_0x481ecd(0x10a)]+'\x20failed.'};}catch(_0x1fe3c8){stopSpinner(_0x199529,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x481ecd(0xea)](_0x1fe3c8 instanceof Error?_0x1fe3c8[_0x481ecd(0xf1)]:_0x481ecd(0x106));}}};function ensureRunnableContext(_0x240675,_0x59f2b8){const _0x2e7897=a134_0x241447,_0x30c2d2=_0x240675[_0x2e7897(0xe8)]?String(_0x240675['appcode'])[_0x2e7897(0xef)]():'';if(!isInProject()&&!_0x59f2b8&&!_0x30c2d2)throw CliErrors[_0x2e7897(0xea)](_0x2e7897(0xf7)+_0x2e7897(0x10d));}function parsePaths(_0x55b2b4){const _0x3560e6=a134_0x241447;return[...new Set(_0x55b2b4[_0x3560e6(0x11d)](',')['map'](_0x504ab3=>_0x504ab3['trim']())[_0x3560e6(0x109)](Boolean))];}
@@ -1 +1 @@
1
- const a135_0x18f04c=a135_0x129f;(function(_0x20adbf,_0x2f8c05){const _0x53dcbc=a135_0x129f,_0x4cdbc3=_0x20adbf();while(!![]){try{const _0x591418=-parseInt(_0x53dcbc(0x1ab))/0x1*(-parseInt(_0x53dcbc(0x1c4))/0x2)+parseInt(_0x53dcbc(0x18b))/0x3*(parseInt(_0x53dcbc(0x1e8))/0x4)+parseInt(_0x53dcbc(0x184))/0x5*(-parseInt(_0x53dcbc(0x199))/0x6)+parseInt(_0x53dcbc(0x1b2))/0x7+parseInt(_0x53dcbc(0x1d6))/0x8*(parseInt(_0x53dcbc(0x1ed))/0x9)+parseInt(_0x53dcbc(0x190))/0xa+-parseInt(_0x53dcbc(0x1eb))/0xb;if(_0x591418===_0x2f8c05)break;else _0x4cdbc3['push'](_0x4cdbc3['shift']());}catch(_0x9f2b04){_0x4cdbc3['push'](_0x4cdbc3['shift']());}}}(a135_0x5cd2,0xdc68c));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':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':a135_0x18f04c(0x17a),'command':a135_0x18f04c(0x1e2),'description':a135_0x18f04c(0x1e5),'risk':a135_0x18f04c(0x1a0),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':'string','description':a135_0x18f04c(0x192)},{'name':a135_0x18f04c(0x1d5),'type':a135_0x18f04c(0x197),'description':a135_0x18f04c(0x1a1)},{'name':a135_0x18f04c(0x1ba),'type':a135_0x18f04c(0x1e7),'required':!![],'description':a135_0x18f04c(0x1cd)},{'name':a135_0x18f04c(0x17f),'type':a135_0x18f04c(0x1e7),'description':a135_0x18f04c(0x1e1)},{'name':'expected-count','type':'number','description':a135_0x18f04c(0x186)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x441893){parseInput(_0x441893),requireExplicitYes(_0x441893);},async 'dryRun'(_0x40ef2d){const _0x394449=a135_0x18f04c,_0x22c3a1=await buildPlan(_0x40ef2d,!![]),_0x129466=_0x22c3a1[_0x394449(0x1a2)][_0x394449(0x1a8)]?.['length']??0x0,_0x4789c6=_0x22c3a1[_0x394449(0x1a2)][_0x394449(0x1db)][_0x394449(0x1b8)]-_0x129466;return menuDryRunResult(_0x22c3a1['plan'],{'method':_0x394449(0x19e),'url':_0x394449(0x1d2),'body':{'updates':_0x22c3a1[_0x394449(0x1a2)][_0x394449(0x1a8)]?.[_0x394449(0x195)](_0x5f4044=>_0x5f4044['body'])??[]},'description':_0x394449(0x1c9)+_0x129466+_0x394449(0x1d9)+_0x4789c6+_0x394449(0x1dd)});},async 'execute'(_0x4edce6){const _0x205e9b=a135_0x18f04c;requireExplicitYes(_0x4edce6);const _0x484d47=await buildPlan(_0x4edce6,![]);await recheckMutationSnapshot(_0x4edce6,_0x484d47['plan'],_0x205e9b(0x180));const _0x4bef72=[],_0x5a63f6=[],_0x535a76=[];for(const _0x19a267 of _0x484d47[_0x205e9b(0x1a2)]['targets']){if(_0x19a267[_0x205e9b(0x1c7)][_0x205e9b(0x1ba)]===_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1b9)]){_0x4bef72[_0x205e9b(0x18c)]({'id':_0x19a267['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x4edce6[_0x205e9b(0x17c)],_0x4edce6[_0x205e9b(0x1ef)],{'id':_0x19a267['id'],'visible':_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1b9)]}),_0x4bef72[_0x205e9b(0x18c)]({'id':_0x19a267['id'],'updated':!![],'skipped':![]});}catch(_0x36c23b){const _0x14f8e6=mapMenuApiError(_0x36c23b,'update\x20visibility\x20for',_0x19a267['id']);if(isMenuResponseLoss(_0x36c23b)&&_0x14f8e6[_0x205e9b(0x1df)]!==_0x205e9b(0x182)){_0x535a76['push'](_0x19a267['id']);continue;}_0x5a63f6[_0x205e9b(0x18c)]({'id':_0x19a267['id'],'stage':_0x205e9b(0x1ce),'code':_0x14f8e6['code'],'message':_0x14f8e6[_0x205e9b(0x179)]});}}let _0x3588ea;try{_0x3588ea=await fetchMenuSnapshot(_0x4edce6['appCode'],_0x4edce6[_0x205e9b(0x1ef)]);}catch(_0x15f13d){const _0x546bc0=describeMenuErrorCause(_0x15f13d,'verify\x20menu\x20visibility\x20update'),_0x285e82=_0x535a76[_0x205e9b(0x195)](_0x3efe5f=>({'id':_0x3efe5f,'stage':_0x205e9b(0x1cb),'code':_0x205e9b(0x174),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x3efe5f+_0x205e9b(0x1bd),'requestedStateConfirmed':![],'recovered':![]})),_0x33fed6={'stage':'verification','code':'menu_verification_failed','message':_0x205e9b(0x1de),'targetIds':_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1db)][_0x205e9b(0x195)](_0x189ee5=>_0x189ee5['id']),'requestedStateConfirmed':![],..._0x546bc0};throw menuFailure(asVerificationError(_0x15f13d,_0x205e9b(0x1aa)),_0x484d47['plan'],{'stage':_0x205e9b(0x1dc),'succeeded':_0x4bef72,'failedRecords':[..._0x5a63f6,..._0x285e82,_0x33fed6],'warnings':[_0x205e9b(0x1b3)],'verification':{'status':_0x205e9b(0x1ad),'recoveredCount':0x0,'lookupCommand':_0x205e9b(0x17b)}});}const _0x52801c=[];for(const _0x4de2dd of _0x4bef72){const _0x251dd8=Number(_0x4de2dd['id']),_0x314204=_0x484d47[_0x205e9b(0x176)][_0x205e9b(0x1ec)](_0x251dd8),_0x568f3f=_0x3588ea['byId']['get'](_0x251dd8);try{verifyVisibilityUpdate(_0x314204,_0x568f3f,_0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x1b9)]);}catch(_0x58bb06){const _0x2a618f=asVerificationError(_0x58bb06,_0x205e9b(0x185)+_0x251dd8+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x52801c[_0x205e9b(0x18c)]({'id':_0x251dd8,'stage':_0x205e9b(0x1dc),'code':_0x2a618f[_0x205e9b(0x1df)],'message':_0x2a618f[_0x205e9b(0x179)],'requestedStateConfirmed':![]});}}for(const _0x271302 of _0x535a76){const _0x4ef6c4=_0x484d47[_0x205e9b(0x176)][_0x205e9b(0x1ec)](_0x271302),_0x53c1b1=_0x3588ea[_0x205e9b(0x1c0)][_0x205e9b(0x1ec)](_0x271302);try{verifyVisibilityUpdate(_0x4ef6c4,_0x53c1b1,_0x484d47['plan'][_0x205e9b(0x1b9)]),_0x4bef72[_0x205e9b(0x18c)]({'id':_0x271302,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x39e216){const _0x3ba0db=asVerificationError(_0x39e216,_0x205e9b(0x17d)+_0x271302+_0x205e9b(0x171));_0x52801c['push']({'id':_0x271302,'stage':'update-recovery','code':_0x3ba0db[_0x205e9b(0x1df)],'message':_0x3ba0db[_0x205e9b(0x179)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x52801c['length']>0x0){const _0x3dbdf7=_0x52801c[_0x205e9b(0x195)](_0x3ab6a2=>Number(_0x3ab6a2['id'])),_0x41b075=_0x4bef72[_0x205e9b(0x1c2)](_0xf3ec1f=>_0xf3ec1f[_0x205e9b(0x1b5)]===!![])[_0x205e9b(0x1b8)],_0x2de8e2=menuError(_0x205e9b(0x174),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x3dbdf7[_0x205e9b(0x1ca)](',\x20')+'.',_0x205e9b(0x1e0));throw menuFailure(_0x2de8e2,_0x484d47[_0x205e9b(0x1a2)],{'stage':_0x205e9b(0x1dc),'succeeded':_0x4bef72,'failedRecords':[..._0x5a63f6,..._0x52801c],'warnings':[_0x205e9b(0x1e3)],'verification':{'status':_0x205e9b(0x1ad),..._0x3dbdf7[_0x205e9b(0x1b8)]===0x1?{'targetId':_0x3dbdf7[0x0]}:{'targetIds':_0x3dbdf7},'recoveredCount':_0x41b075,'lookupCommand':_0x205e9b(0x17b)}});}const _0x1db499=_0x4bef72['filter'](_0x197b05=>_0x197b05[_0x205e9b(0x19a)]===!![])['length'],_0x69a064=_0x4bef72[_0x205e9b(0x1b8)]-_0x1db499,_0x29e3dd={..._0x484d47[_0x205e9b(0x1a2)],'succeeded':_0x4bef72,'failed':_0x5a63f6,'warnings':_0x5a63f6[_0x205e9b(0x1b8)]>0x0?[..._0x484d47[_0x205e9b(0x1a2)][_0x205e9b(0x188)],_0x205e9b(0x1d3)]:_0x484d47['plan']['warnings'],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0x3588ea[_0x205e9b(0x1bc)],'matchesRequestedState':_0x5a63f6['length']===0x0,'recoveredCount':_0x535a76[_0x205e9b(0x1b8)]}};return{'ok':_0x5a63f6[_0x205e9b(0x1b8)]===0x0,'data':_0x29e3dd,'message':_0x5a63f6[_0x205e9b(0x1b8)]===0x0?_0x205e9b(0x1a4)+_0x1db499+_0x205e9b(0x175)+_0x69a064+_0x205e9b(0x1dd):_0x205e9b(0x1e4)+_0x1db499+_0x205e9b(0x19b)+_0x69a064+_0x205e9b(0x194)+_0x5a63f6[_0x205e9b(0x1b8)]+_0x205e9b(0x1ae)};}};function parseInput(_0x34138f){const _0x65a998=a135_0x18f04c,_0x4b5e31=parseMenuIds(_0x34138f[_0x65a998(0x18d)](_0x65a998(0x196))),_0x268d27=parseCsv(_0x34138f['str'](_0x65a998(0x1d5)));if(_0x4b5e31['length']===0x0&&_0x268d27[_0x65a998(0x1b8)]===0x0)throw CliErrors['validation'](_0x65a998(0x19d));const _0x5b2ac8=parseBooleanFlag(_0x34138f,_0x65a998(0x1ba),!![]),_0x152cfe=parseBooleanFlag(_0x34138f,'expect-visible',![]);let _0x39cd67;if(hasFlag(_0x34138f,'expected-count')){_0x39cd67=_0x34138f[_0x65a998(0x1d0)](_0x65a998(0x183));if(!Number[_0x65a998(0x1ac)](_0x39cd67)||_0x39cd67<0x0)throw CliErrors[_0x65a998(0x1af)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x4b5e31,'paths':_0x268d27,'visible':_0x5b2ac8,'expectVisible':_0x152cfe,'expectedCount':_0x39cd67};}async function buildPlan(_0x5dd833,_0x35ac7d){const _0x1f3100=a135_0x18f04c,_0x43aa6d=parseInput(_0x5dd833),_0x5a65dc=await fetchMutationSnapshot(_0x5dd833,_0x1f3100(0x180)),_0x2c2cfa=selectTargets(_0x5a65dc[_0x1f3100(0x1c3)],_0x43aa6d[_0x1f3100(0x19f)],_0x43aa6d['paths']);if(_0x43aa6d[_0x1f3100(0x1c5)]!==undefined&&_0x2c2cfa[_0x1f3100(0x1b8)]!==_0x43aa6d[_0x1f3100(0x1c5)])throw menuError(_0x1f3100(0x172),_0x1f3100(0x17e)+_0x2c2cfa[_0x1f3100(0x1b8)]+_0x1f3100(0x1b6)+_0x43aa6d['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x43aa6d[_0x1f3100(0x1bf)]!==undefined){const _0x46a5cb=_0x2c2cfa[_0x1f3100(0x1c2)](_0x1c76c1=>_0x1c76c1[_0x1f3100(0x1ba)]!==_0x43aa6d[_0x1f3100(0x1bf)]);if(_0x46a5cb[_0x1f3100(0x1b8)]>0x0)throw menuError(_0x1f3100(0x1f0),_0x1f3100(0x1a3)+_0x46a5cb[_0x1f3100(0x195)](_0xae104f=>_0xae104f['id'])[_0x1f3100(0x1ca)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x97469d=_0x2c2cfa[_0x1f3100(0x195)](_0x128988=>({'id':_0x128988['id'],'label':_0x128988[_0x1f3100(0x191)],'path':_0x128988[_0x1f3100(0x173)],'before':{'visible':_0x128988[_0x1f3100(0x1ba)]},'after':{'visible':_0x43aa6d[_0x1f3100(0x1ba)]}})),_0x304d38=_0x97469d[_0x1f3100(0x1c2)](_0x48b624=>_0x48b624[_0x1f3100(0x1c7)]['visible']!==_0x43aa6d[_0x1f3100(0x1ba)])[_0x1f3100(0x195)](_0x46139b=>({'stage':_0x1f3100(0x187),'method':_0x1f3100(0x19e),'path':_0x1f3100(0x1d2),'body':{'appCode':_0x5dd833[_0x1f3100(0x17c)],'id':_0x46139b['id'],'visible':_0x43aa6d[_0x1f3100(0x1ba)]}})),_0x3ee618=mutationResult({'operation':_0x1f3100(0x1e2),'selector':{'menuIds':_0x43aa6d['menuIds'],'paths':_0x43aa6d['paths']},'before':{'menus':_0x2c2cfa[_0x1f3100(0x195)](_0x294ab8=>({'id':_0x294ab8['id'],'path':_0x294ab8['path'],'visible':_0x294ab8[_0x1f3100(0x1ba)]}))},'after':{'menus':_0x2c2cfa[_0x1f3100(0x195)](_0x3ce2e9=>({'id':_0x3ce2e9['id'],'path':_0x3ce2e9[_0x1f3100(0x173)],'visible':_0x43aa6d[_0x1f3100(0x1ba)]}))},'dryRun':_0x35ac7d,'backend':[...BACKEND],'plannedActions':_0x304d38,'snapshotHash':_0x5a65dc['hash'],'warnings':_0x304d38[_0x1f3100(0x1b8)]===0x0?[_0x1f3100(0x198)]:[]});return{'plan':{..._0x3ee618,'requestedVisible':_0x43aa6d[_0x1f3100(0x1ba)],'targets':_0x97469d},'beforeById':new Map(_0x2c2cfa[_0x1f3100(0x195)](_0x4ac56e=>[_0x4ac56e['id'],_0x4ac56e]))};}function selectTargets(_0x4bd063,_0x3f90d1,_0x36376b){const _0x96bc91=a135_0x18f04c,_0x516d0f=new Map(_0x4bd063[_0x96bc91(0x195)](_0x26906c=>[_0x26906c['id'],_0x26906c])),_0x553c21=new Map(),_0x21f34c=_0x3f90d1[_0x96bc91(0x1c2)](_0x8f1be1=>!_0x516d0f[_0x96bc91(0x1ea)](_0x8f1be1));if(_0x21f34c[_0x96bc91(0x1b8)]>0x0)throw menuError(_0x96bc91(0x1d1),_0x96bc91(0x1d7)+_0x21f34c[_0x96bc91(0x1ca)](',\x20')+'.',_0x96bc91(0x1b4));for(const _0x45cc6e of _0x3f90d1){_0x553c21[_0x96bc91(0x1bb)](_0x45cc6e,_0x516d0f[_0x96bc91(0x1ec)](_0x45cc6e));}for(const _0x59a884 of _0x36376b){const _0xf080f5=_0x4bd063['filter'](_0x9eab1a=>_0x9eab1a[_0x96bc91(0x173)]===_0x59a884);if(_0xf080f5['length']===0x0)throw menuError(_0x96bc91(0x1d1),_0x96bc91(0x1da)+JSON[_0x96bc91(0x1a9)](_0x59a884)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0xf080f5[_0x96bc91(0x1b8)]>0x1)throw menuError(_0x96bc91(0x18f),_0x96bc91(0x1cf)+JSON[_0x96bc91(0x1a9)](_0x59a884)+'.',_0x96bc91(0x1ee)+_0xf080f5[_0x96bc91(0x195)](_0xcd8936=>_0xcd8936['id'])['join'](',\x20')+'.');const _0x17059a=_0xf080f5[0x0];_0x553c21[_0x96bc91(0x1bb)](_0x17059a['id'],_0x17059a);}return[..._0x553c21['values']()];}function parseMenuIds(_0x530afc){const _0x3faf48=a135_0x18f04c,_0x473b0b=parseCsv(_0x530afc),_0x57271c=_0x473b0b[_0x3faf48(0x195)](Number);if(_0x57271c[_0x3faf48(0x1b7)](_0x11566a=>!Number[_0x3faf48(0x1ac)](_0x11566a)||_0x11566a<=0x0))throw CliErrors[_0x3faf48(0x1af)](_0x3faf48(0x189));return[...new Set(_0x57271c)];}function parseCsv(_0x32e464){const _0x1f82eb=a135_0x18f04c;return[...new Set(_0x32e464[_0x1f82eb(0x19c)](',')[_0x1f82eb(0x195)](_0x403b6f=>_0x403b6f[_0x1f82eb(0x1d4)]())['filter'](Boolean))];}function parseBooleanFlag(_0x49ef2e,_0x641aa2,_0x4adafd){const _0xf9c451=a135_0x18f04c;if(!hasFlag(_0x49ef2e,_0x641aa2)){if(_0x4adafd)throw CliErrors[_0xf9c451(0x1c8)](_0x641aa2);return undefined;}const _0x161572=_0x49ef2e['rawFlags'][_0x641aa2];if(_0x161572===!![]||_0x161572===![])return _0x161572;if(_0x161572===_0xf9c451(0x1a7))return!![];if(_0x161572===_0xf9c451(0x1b1))return![];throw CliErrors[_0xf9c451(0x1af)]('--'+_0x641aa2+'\x20must\x20be\x20true\x20or\x20false.');}function a135_0x129f(_0x1ee465,_0x466bc9){_0x1ee465=_0x1ee465-0x171;const _0x5cd2af=a135_0x5cd2();let _0x129fcb=_0x5cd2af[_0x1ee465];return _0x129fcb;}function verifyVisibilityUpdate(_0x4750ef,_0xe162be,_0x38b0c9){const _0x2b97c4=a135_0x18f04c;assertVerified(!!_0xe162be,_0x2b97c4(0x185)+_0x4750ef['id']+_0x2b97c4(0x1e6)),assertVerified(_0xe162be['visible']===_0x38b0c9,_0x2b97c4(0x185)+_0x4750ef['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x3645b0=[['id',_0xe162be['id'],_0x4750ef['id']],[_0x2b97c4(0x178),_0xe162be['parentId'],_0x4750ef['parentId']],['depth',_0xe162be[_0x2b97c4(0x18e)],_0x4750ef[_0x2b97c4(0x18e)]],[_0x2b97c4(0x191),_0xe162be['label'],_0x4750ef[_0x2b97c4(0x191)]],[_0x2b97c4(0x173),_0xe162be[_0x2b97c4(0x173)],_0x4750ef[_0x2b97c4(0x173)]],[_0x2b97c4(0x181),_0xe162be[_0x2b97c4(0x181)],_0x4750ef['url']],['type',_0xe162be[_0x2b97c4(0x1cc)],_0x4750ef[_0x2b97c4(0x1cc)]],[_0x2b97c4(0x1d8),_0xe162be[_0x2b97c4(0x1d8)],_0x4750ef[_0x2b97c4(0x1d8)]],[_0x2b97c4(0x1c6),_0xe162be[_0x2b97c4(0x1c6)],_0x4750ef[_0x2b97c4(0x1c6)]],[_0x2b97c4(0x1a6),_0xe162be[_0x2b97c4(0x1a6)],_0x4750ef[_0x2b97c4(0x1a6)]],[_0x2b97c4(0x18a),_0xe162be['childrenIds'],_0x4750ef['childrenIds']],[_0x2b97c4(0x1a5),_0xe162be[_0x2b97c4(0x1a5)],_0x4750ef[_0x2b97c4(0x1a5)]],[_0x2b97c4(0x177),_0xe162be['pageId'],_0x4750ef[_0x2b97c4(0x177)]],[_0x2b97c4(0x1b0),_0xe162be[_0x2b97c4(0x1b0)],_0x4750ef[_0x2b97c4(0x1b0)]],[_0x2b97c4(0x1e9),_0xe162be[_0x2b97c4(0x1e9)],_0x4750ef[_0x2b97c4(0x1e9)]],[_0x2b97c4(0x193),_0xe162be[_0x2b97c4(0x193)],_0x4750ef[_0x2b97c4(0x193)]],[_0x2b97c4(0x1be),_0xe162be['datasetCode'],_0x4750ef['datasetCode']]];for(const [_0x34110b,_0xe122bd,_0x3ba3c8]of _0x3645b0){assertVerified(sameValue(_0xe122bd,_0x3ba3c8),_0x2b97c4(0x185)+_0x4750ef['id']+'\x20'+_0x34110b+'\x20changed\x20unexpectedly.');}}function a135_0x5cd2(){const _0x1d7f25=['stringify','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','122311fJDnxQ','isSafeInteger','failed','\x20failed.','validation','pageType','false','11423188ikloYH','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','recovered','\x20menu(s),\x20expected\x20','some','length','requestedVisible','visible','set','hash','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','datasetCode','expectVisible','byId','isArray','filter','menus','28stKbao','expectedCount','resources','before','flagMissing','Would\x20update\x20visibility\x20for\x20','join','update-recovery','type','Requested\x20menu\x20visibility','update','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','num','menu_selector_not_found','/smartapi/menu/update','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','trim','paths','4167816KIEukL','Menu\x20id\x20selector(s)\x20not\x20found:\x20','sort','\x20menu(s);\x20skip\x20','Menu\x20path\x20selector\x20not\x20found:\x20','targets','verification','\x20unchanged\x20menu(s).','Final\x20menu\x20visibility\x20readback\x20failed.','code','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','visibility-update','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Menu\x20visibility\x20update\x20completed:\x20','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','boolean','456392hJIBSA','modelType','has','55805475pezbiQ','get','9guFnkp','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','cookie','menu_state_drift','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu_expected_count_mismatch','path','menu_verification_failed','\x20menu(s);\x20skipped\x20','beforeById','pageId','parentId','message','menu','rabetbase\x20menu\x20list\x20--format\x20compress','appCode','Response\x20was\x20lost\x20and\x20menu\x20','Selected\x20','expect-visible','update\x20menu\x20visibility','url','menu_permission_denied','expected-count','1823695wxGhTv','Menu\x20','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','update-menu-visibility','warnings','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','childrenIds','18PglYNw','push','str','depth','menu_selector_ambiguous','17909570beroSc','label','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','datasetId','\x20skipped,\x20','map','menu-ids','string','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','6pEHOMT','updated','\x20updated,\x20','split','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','POST','menuIds','high-risk-write','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','plan','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Updated\x20visibility\x20for\x20','childrenCount','resourcesValid','true','plannedActions'];a135_0x5cd2=function(){return _0x1d7f25;};return a135_0x5cd2();}function sameValue(_0x7ad9c,_0x5d9f06){const _0xd8c423=a135_0x18f04c;if(Array[_0xd8c423(0x1c1)](_0x7ad9c)||Array[_0xd8c423(0x1c1)](_0x5d9f06))return JSON[_0xd8c423(0x1a9)](_0x7ad9c)===JSON[_0xd8c423(0x1a9)](_0x5d9f06);return _0x7ad9c===_0x5d9f06;}
1
+ function a135_0x3e97(_0x36fde9,_0x44b47b){_0x36fde9=_0x36fde9-0xef;const _0x38307e=a135_0x3830();let _0x3e97d7=_0x38307e[_0x36fde9];return _0x3e97d7;}function a135_0x3830(){const _0xcd8246=['update-recovery','menus','string','\x20updated,\x20','true','isSafeInteger','menuIds','filter','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','updated','beforeById','pageType','update\x20visibility\x20for','label','Menu\x20visibility\x20update\x20completed:\x20','validation','push','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','split','Would\x20update\x20visibility\x20for\x20','expected-count','body','code','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','recovered','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','menu_expected_count_mismatch','plannedActions','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Menu\x20','60002FDKAED','appCode','failed','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','targets','menu_verification_failed','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','depth','values','resources','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','childrenCount','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','2faclTM','message','has','false','47070acQKhp','expect-visible','Response\x20was\x20lost\x20for\x20menu\x20','datasetId','requestedVisible','12282090aWmGvR','Selected\x20','trim','stringify','some','high-risk-write','902084dFCIIg','1174011GdAyLH','5WFjvBc','verification','byId','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','warnings','childrenIds','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','Response\x20was\x20lost\x20and\x20menu\x20','url','menu_selector_not_found','update\x20menu\x20visibility','visible','Updated\x20visibility\x20for\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu\x20list','rabetbase\x20menu\x20list\x20--format\x20compress','path','boolean','visibility-update','pageId','\x20menu(s),\x20expected\x20','update-menu-visibility','Requested\x20menu\x20visibility','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','map','set','get','str','length','modelType','175HsenPC','menu_permission_denied','/smartapi/menu/update','\x20menu(s);\x20skip\x20','\x20skipped,\x20','expectVisible','\x20unchanged\x20menu(s).','3008556TstpxX','hash','Final\x20menu\x20visibility\x20readback\x20failed.','Menu\x20id\x20selector(s)\x20not\x20found:\x20','\x20changed\x20unexpectedly.','join','paths','isArray','cookie','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','type','plan','parentId','verify\x20menu\x20visibility\x20update','menu-ids','number','27032zthBXd','resourcesValid','\x20failed.','expectedCount','sort'];a135_0x3830=function(){return _0xcd8246;};return a135_0x3830();}const a135_0x183e3c=a135_0x3e97;(function(_0x2283ce,_0x4010ae){const _0x36ba00=a135_0x3e97,_0x48c0de=_0x2283ce();while(!![]){try{const _0x4c3504=-parseInt(_0x36ba00(0x11b))/0x1*(-parseInt(_0x36ba00(0x10d))/0x2)+-parseInt(_0x36ba00(0x12b))/0x3+-parseInt(_0x36ba00(0x12a))/0x4*(parseInt(_0x36ba00(0x12c))/0x5)+-parseInt(_0x36ba00(0x11f))/0x6+parseInt(_0x36ba00(0x14b))/0x7*(-parseInt(_0x36ba00(0x162))/0x8)+-parseInt(_0x36ba00(0x152))/0x9+parseInt(_0x36ba00(0x124))/0xa;if(_0x4c3504===_0x4010ae)break;else _0x48c0de['push'](_0x48c0de['shift']());}catch(_0x47e703){_0x48c0de['push'](_0x48c0de['shift']());}}}(a135_0x3830,0x3bc0d));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':a135_0x183e3c(0x14d)}];export const menuVisibilityUpdate={'service':'menu','command':a135_0x183e3c(0x13f),'description':a135_0x183e3c(0xfe),'risk':a135_0x183e3c(0x129),'structuredErrors':!![],'flags':[{'name':a135_0x183e3c(0x160),'type':a135_0x183e3c(0xef),'description':a135_0x183e3c(0x107)},{'name':a135_0x183e3c(0x158),'type':a135_0x183e3c(0xef),'description':a135_0x183e3c(0x15b)},{'name':a135_0x183e3c(0x138),'type':a135_0x183e3c(0x13e),'required':!![],'description':a135_0x183e3c(0x143)},{'name':'expect-visible','type':'boolean','description':a135_0x183e3c(0x105)},{'name':'expected-count','type':a135_0x183e3c(0x161),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1fa4a8){parseInput(_0x1fa4a8),requireExplicitYes(_0x1fa4a8);},async 'dryRun'(_0x4666bb){const _0x38ab84=a135_0x183e3c,_0x7fcd8d=await buildPlan(_0x4666bb,!![]),_0xf1c8be=_0x7fcd8d[_0x38ab84(0x15d)]['plannedActions']?.[_0x38ab84(0x149)]??0x0,_0x3db38f=_0x7fcd8d['plan'][_0x38ab84(0x112)][_0x38ab84(0x149)]-_0xf1c8be;return menuDryRunResult(_0x7fcd8d['plan'],{'method':'POST','url':_0x38ab84(0x14d),'body':{'updates':_0x7fcd8d[_0x38ab84(0x15d)][_0x38ab84(0x109)]?.[_0x38ab84(0x145)](_0x446608=>_0x446608[_0x38ab84(0x102)])??[]},'description':_0x38ab84(0x100)+_0xf1c8be+_0x38ab84(0x14e)+_0x3db38f+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x13eab8){const _0x57adc=a135_0x183e3c;requireExplicitYes(_0x13eab8);const _0x4d59e3=await buildPlan(_0x13eab8,![]);await recheckMutationSnapshot(_0x13eab8,_0x4d59e3[_0x57adc(0x15d)],_0x57adc(0x137));const _0x4e165f=[],_0x3a0c53=[],_0x3d3dc6=[];for(const _0x5f2bd9 of _0x4d59e3[_0x57adc(0x15d)][_0x57adc(0x112)]){if(_0x5f2bd9['before'][_0x57adc(0x138)]===_0x4d59e3['plan'][_0x57adc(0x123)]){_0x4e165f[_0x57adc(0xfd)]({'id':_0x5f2bd9['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x13eab8[_0x57adc(0x10e)],_0x13eab8['cookie'],{'id':_0x5f2bd9['id'],'visible':_0x4d59e3[_0x57adc(0x15d)][_0x57adc(0x123)]}),_0x4e165f['push']({'id':_0x5f2bd9['id'],'updated':!![],'skipped':![]});}catch(_0x4a08c3){const _0x4bba68=mapMenuApiError(_0x4a08c3,_0x57adc(0xf9),_0x5f2bd9['id']);if(isMenuResponseLoss(_0x4a08c3)&&_0x4bba68[_0x57adc(0x103)]!==_0x57adc(0x14c)){_0x3d3dc6[_0x57adc(0xfd)](_0x5f2bd9['id']);continue;}_0x3a0c53[_0x57adc(0xfd)]({'id':_0x5f2bd9['id'],'stage':'update','code':_0x4bba68[_0x57adc(0x103)],'message':_0x4bba68[_0x57adc(0x11c)]});}}let _0x31f93d;try{_0x31f93d=await fetchMenuSnapshot(_0x13eab8[_0x57adc(0x10e)],_0x13eab8[_0x57adc(0x15a)]);}catch(_0x1b9e82){const _0x8dbd8a=describeMenuErrorCause(_0x1b9e82,_0x57adc(0x15f)),_0x55c70a=_0x3d3dc6[_0x57adc(0x145)](_0x23665d=>({'id':_0x23665d,'stage':_0x57adc(0x167),'code':_0x57adc(0x113),'message':_0x57adc(0x121)+_0x23665d+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0xa2097b={'stage':_0x57adc(0x12d),'code':_0x57adc(0x113),'message':_0x57adc(0x154),'targetIds':_0x4d59e3[_0x57adc(0x15d)][_0x57adc(0x112)]['map'](_0x1318d9=>_0x1318d9['id']),'requestedStateConfirmed':![],..._0x8dbd8a};throw menuFailure(asVerificationError(_0x1b9e82,_0x57adc(0x144)),_0x4d59e3['plan'],{'stage':_0x57adc(0x12d),'succeeded':_0x4e165f,'failedRecords':[..._0x3a0c53,..._0x55c70a,_0xa2097b],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x57adc(0x10f),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x2a337b=[];for(const _0x1ca405 of _0x4e165f){const _0x3cb318=Number(_0x1ca405['id']),_0x3c6da9=_0x4d59e3[_0x57adc(0xf7)][_0x57adc(0x147)](_0x3cb318),_0x51fcfa=_0x31f93d['byId'][_0x57adc(0x147)](_0x3cb318);try{verifyVisibilityUpdate(_0x3c6da9,_0x51fcfa,_0x4d59e3[_0x57adc(0x15d)]['requestedVisible']);}catch(_0x18975a){const _0x26f8bb=asVerificationError(_0x18975a,_0x57adc(0x10c)+_0x3cb318+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x2a337b[_0x57adc(0xfd)]({'id':_0x3cb318,'stage':_0x57adc(0x12d),'code':_0x26f8bb[_0x57adc(0x103)],'message':_0x26f8bb['message'],'requestedStateConfirmed':![]});}}for(const _0x2c40bc of _0x3d3dc6){const _0x2e9182=_0x4d59e3[_0x57adc(0xf7)]['get'](_0x2c40bc),_0x4f8831=_0x31f93d[_0x57adc(0x12e)][_0x57adc(0x147)](_0x2c40bc);try{verifyVisibilityUpdate(_0x2e9182,_0x4f8831,_0x4d59e3[_0x57adc(0x15d)][_0x57adc(0x123)]),_0x4e165f['push']({'id':_0x2c40bc,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x57eac7){const _0x4a4d32=asVerificationError(_0x57eac7,_0x57adc(0x134)+_0x2c40bc+_0x57adc(0x13a));_0x2a337b[_0x57adc(0xfd)]({'id':_0x2c40bc,'stage':'update-recovery','code':_0x4a4d32[_0x57adc(0x103)],'message':_0x4a4d32['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x2a337b[_0x57adc(0x149)]>0x0){const _0x34f3e9=_0x2a337b[_0x57adc(0x145)](_0x4e764f=>Number(_0x4e764f['id'])),_0x596676=_0x4e165f[_0x57adc(0xf4)](_0x300389=>_0x300389[_0x57adc(0x106)]===!![])['length'],_0x46af62=menuError(_0x57adc(0x113),_0x57adc(0x118)+_0x34f3e9['join'](',\x20')+'.',_0x57adc(0x10a));throw menuFailure(_0x46af62,_0x4d59e3[_0x57adc(0x15d)],{'stage':_0x57adc(0x12d),'succeeded':_0x4e165f,'failedRecords':[..._0x3a0c53,..._0x2a337b],'warnings':[_0x57adc(0x114)],'verification':{'status':_0x57adc(0x10f),..._0x34f3e9[_0x57adc(0x149)]===0x1?{'targetId':_0x34f3e9[0x0]}:{'targetIds':_0x34f3e9},'recoveredCount':_0x596676,'lookupCommand':_0x57adc(0x13c)}});}const _0x29a464=_0x4e165f[_0x57adc(0xf4)](_0x1ff811=>_0x1ff811[_0x57adc(0xf6)]===!![])[_0x57adc(0x149)],_0x49296b=_0x4e165f[_0x57adc(0x149)]-_0x29a464,_0x58aaed={..._0x4d59e3[_0x57adc(0x15d)],'succeeded':_0x4e165f,'failed':_0x3a0c53,'warnings':_0x3a0c53[_0x57adc(0x149)]>0x0?[..._0x4d59e3[_0x57adc(0x15d)][_0x57adc(0x131)],_0x57adc(0x12f)]:_0x4d59e3[_0x57adc(0x15d)][_0x57adc(0x131)],'verification':{'checkedBy':_0x57adc(0x13b),'snapshotHash':_0x31f93d[_0x57adc(0x153)],'matchesRequestedState':_0x3a0c53['length']===0x0,'recoveredCount':_0x3d3dc6[_0x57adc(0x149)]}};return{'ok':_0x3a0c53['length']===0x0,'data':_0x58aaed,'message':_0x3a0c53['length']===0x0?_0x57adc(0x139)+_0x29a464+'\x20menu(s);\x20skipped\x20'+_0x49296b+_0x57adc(0x151):_0x57adc(0xfb)+_0x29a464+_0x57adc(0xf0)+_0x49296b+_0x57adc(0x14f)+_0x3a0c53[_0x57adc(0x149)]+_0x57adc(0x164)};}};function parseInput(_0xabd4a0){const _0x3ab468=a135_0x183e3c,_0x3eb0ac=parseMenuIds(_0xabd4a0[_0x3ab468(0x148)](_0x3ab468(0x160))),_0x580667=parseCsv(_0xabd4a0[_0x3ab468(0x148)](_0x3ab468(0x158)));if(_0x3eb0ac[_0x3ab468(0x149)]===0x0&&_0x580667[_0x3ab468(0x149)]===0x0)throw CliErrors['validation'](_0x3ab468(0x10b));const _0x193c5f=parseBooleanFlag(_0xabd4a0,_0x3ab468(0x138),!![]),_0x35aad6=parseBooleanFlag(_0xabd4a0,_0x3ab468(0x120),![]);let _0x5393cb;if(hasFlag(_0xabd4a0,_0x3ab468(0x101))){_0x5393cb=_0xabd4a0['num']('expected-count');if(!Number[_0x3ab468(0xf2)](_0x5393cb)||_0x5393cb<0x0)throw CliErrors[_0x3ab468(0xfc)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x3eb0ac,'paths':_0x580667,'visible':_0x193c5f,'expectVisible':_0x35aad6,'expectedCount':_0x5393cb};}async function buildPlan(_0x279f31,_0x40ff41){const _0x1c7fc1=a135_0x183e3c,_0x3d6170=parseInput(_0x279f31),_0x698d11=await fetchMutationSnapshot(_0x279f31,'update\x20menu\x20visibility'),_0x468a61=selectTargets(_0x698d11[_0x1c7fc1(0x168)],_0x3d6170[_0x1c7fc1(0xf3)],_0x3d6170[_0x1c7fc1(0x158)]);if(_0x3d6170[_0x1c7fc1(0x165)]!==undefined&&_0x468a61[_0x1c7fc1(0x149)]!==_0x3d6170[_0x1c7fc1(0x165)])throw menuError(_0x1c7fc1(0x108),_0x1c7fc1(0x125)+_0x468a61[_0x1c7fc1(0x149)]+_0x1c7fc1(0x141)+_0x3d6170[_0x1c7fc1(0x165)]+'.',_0x1c7fc1(0xf5));if(_0x3d6170[_0x1c7fc1(0x150)]!==undefined){const _0x4d140c=_0x468a61['filter'](_0x5a6423=>_0x5a6423[_0x1c7fc1(0x138)]!==_0x3d6170[_0x1c7fc1(0x150)]);if(_0x4d140c[_0x1c7fc1(0x149)]>0x0)throw menuError('menu_state_drift','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x4d140c[_0x1c7fc1(0x145)](_0x23f8bf=>_0x23f8bf['id'])[_0x1c7fc1(0x157)](',\x20')+'.',_0x1c7fc1(0x11a));}const _0x312783=_0x468a61['map'](_0x4fadab=>({'id':_0x4fadab['id'],'label':_0x4fadab[_0x1c7fc1(0xfa)],'path':_0x4fadab[_0x1c7fc1(0x13d)],'before':{'visible':_0x4fadab[_0x1c7fc1(0x138)]},'after':{'visible':_0x3d6170[_0x1c7fc1(0x138)]}})),_0x4011f6=_0x312783[_0x1c7fc1(0xf4)](_0x2ca53f=>_0x2ca53f['before']['visible']!==_0x3d6170[_0x1c7fc1(0x138)])[_0x1c7fc1(0x145)](_0x16dbd8=>({'stage':_0x1c7fc1(0x142),'method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x279f31[_0x1c7fc1(0x10e)],'id':_0x16dbd8['id'],'visible':_0x3d6170[_0x1c7fc1(0x138)]}})),_0x3e5f3b=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x3d6170['menuIds'],'paths':_0x3d6170[_0x1c7fc1(0x158)]},'before':{'menus':_0x468a61[_0x1c7fc1(0x145)](_0x1e3500=>({'id':_0x1e3500['id'],'path':_0x1e3500['path'],'visible':_0x1e3500[_0x1c7fc1(0x138)]}))},'after':{'menus':_0x468a61[_0x1c7fc1(0x145)](_0x23c857=>({'id':_0x23c857['id'],'path':_0x23c857[_0x1c7fc1(0x13d)],'visible':_0x3d6170[_0x1c7fc1(0x138)]}))},'dryRun':_0x40ff41,'backend':[...BACKEND],'plannedActions':_0x4011f6,'snapshotHash':_0x698d11['hash'],'warnings':_0x4011f6[_0x1c7fc1(0x149)]===0x0?['Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.']:[]});return{'plan':{..._0x3e5f3b,'requestedVisible':_0x3d6170[_0x1c7fc1(0x138)],'targets':_0x312783},'beforeById':new Map(_0x468a61['map'](_0x43d96c=>[_0x43d96c['id'],_0x43d96c]))};}function selectTargets(_0x1ab7b8,_0x1cbf97,_0x10cfd7){const _0x3b713c=a135_0x183e3c,_0x253bdb=new Map(_0x1ab7b8[_0x3b713c(0x145)](_0x48845a=>[_0x48845a['id'],_0x48845a])),_0x17b358=new Map(),_0x2e856c=_0x1cbf97[_0x3b713c(0xf4)](_0x550d93=>!_0x253bdb[_0x3b713c(0x11d)](_0x550d93));if(_0x2e856c[_0x3b713c(0x149)]>0x0)throw menuError(_0x3b713c(0x136),_0x3b713c(0x155)+_0x2e856c[_0x3b713c(0x157)](',\x20')+'.',_0x3b713c(0x104));for(const _0x480109 of _0x1cbf97){_0x17b358[_0x3b713c(0x146)](_0x480109,_0x253bdb[_0x3b713c(0x147)](_0x480109));}for(const _0x2783ce of _0x10cfd7){const _0x12c6f3=_0x1ab7b8[_0x3b713c(0xf4)](_0x8943ab=>_0x8943ab[_0x3b713c(0x13d)]===_0x2783ce);if(_0x12c6f3[_0x3b713c(0x149)]===0x0)throw menuError(_0x3b713c(0x136),'Menu\x20path\x20selector\x20not\x20found:\x20'+JSON[_0x3b713c(0x127)](_0x2783ce)+'.',_0x3b713c(0x111));if(_0x12c6f3[_0x3b713c(0x149)]>0x1)throw menuError('menu_selector_ambiguous',_0x3b713c(0x133)+JSON[_0x3b713c(0x127)](_0x2783ce)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x12c6f3['map'](_0x5c86ae=>_0x5c86ae['id'])[_0x3b713c(0x157)](',\x20')+'.');const _0x2825d2=_0x12c6f3[0x0];_0x17b358[_0x3b713c(0x146)](_0x2825d2['id'],_0x2825d2);}return[..._0x17b358[_0x3b713c(0x116)]()];}function parseMenuIds(_0x5787f7){const _0x2c08fd=a135_0x183e3c,_0x26360d=parseCsv(_0x5787f7),_0x27bd94=_0x26360d[_0x2c08fd(0x145)](Number);if(_0x27bd94[_0x2c08fd(0x128)](_0x11f558=>!Number[_0x2c08fd(0xf2)](_0x11f558)||_0x11f558<=0x0))throw CliErrors[_0x2c08fd(0xfc)](_0x2c08fd(0x110));return[...new Set(_0x27bd94)];}function parseCsv(_0x2f5a4a){const _0x46f201=a135_0x183e3c;return[...new Set(_0x2f5a4a[_0x46f201(0xff)](',')[_0x46f201(0x145)](_0x467a3e=>_0x467a3e[_0x46f201(0x126)]())[_0x46f201(0xf4)](Boolean))];}function parseBooleanFlag(_0x150f0f,_0x356830,_0x47ef7c){const _0x396e20=a135_0x183e3c;if(!hasFlag(_0x150f0f,_0x356830)){if(_0x47ef7c)throw CliErrors['flagMissing'](_0x356830);return undefined;}const _0x496c63=_0x150f0f['rawFlags'][_0x356830];if(_0x496c63===!![]||_0x496c63===![])return _0x496c63;if(_0x496c63===_0x396e20(0xf1))return!![];if(_0x496c63===_0x396e20(0x11e))return![];throw CliErrors[_0x396e20(0xfc)]('--'+_0x356830+'\x20must\x20be\x20true\x20or\x20false.');}function verifyVisibilityUpdate(_0x490f32,_0x1e2937,_0x333fe4){const _0x35cc6b=a135_0x183e3c;assertVerified(!!_0x1e2937,_0x35cc6b(0x10c)+_0x490f32['id']+_0x35cc6b(0x130)),assertVerified(_0x1e2937['visible']===_0x333fe4,_0x35cc6b(0x10c)+_0x490f32['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x1ead47=[['id',_0x1e2937['id'],_0x490f32['id']],['parentId',_0x1e2937[_0x35cc6b(0x15e)],_0x490f32[_0x35cc6b(0x15e)]],[_0x35cc6b(0x115),_0x1e2937[_0x35cc6b(0x115)],_0x490f32[_0x35cc6b(0x115)]],['label',_0x1e2937['label'],_0x490f32[_0x35cc6b(0xfa)]],[_0x35cc6b(0x13d),_0x1e2937['path'],_0x490f32[_0x35cc6b(0x13d)]],[_0x35cc6b(0x135),_0x1e2937[_0x35cc6b(0x135)],_0x490f32[_0x35cc6b(0x135)]],[_0x35cc6b(0x15c),_0x1e2937[_0x35cc6b(0x15c)],_0x490f32[_0x35cc6b(0x15c)]],['sort',_0x1e2937['sort'],_0x490f32[_0x35cc6b(0x166)]],['resources',_0x1e2937['resources'],_0x490f32[_0x35cc6b(0x117)]],[_0x35cc6b(0x163),_0x1e2937[_0x35cc6b(0x163)],_0x490f32['resourcesValid']],[_0x35cc6b(0x132),_0x1e2937[_0x35cc6b(0x132)],_0x490f32[_0x35cc6b(0x132)]],['childrenCount',_0x1e2937[_0x35cc6b(0x119)],_0x490f32[_0x35cc6b(0x119)]],[_0x35cc6b(0x140),_0x1e2937[_0x35cc6b(0x140)],_0x490f32['pageId']],[_0x35cc6b(0xf8),_0x1e2937[_0x35cc6b(0xf8)],_0x490f32[_0x35cc6b(0xf8)]],[_0x35cc6b(0x14a),_0x1e2937['modelType'],_0x490f32[_0x35cc6b(0x14a)]],[_0x35cc6b(0x122),_0x1e2937[_0x35cc6b(0x122)],_0x490f32[_0x35cc6b(0x122)]],['datasetCode',_0x1e2937['datasetCode'],_0x490f32['datasetCode']]];for(const [_0x4e5c06,_0xbcbc2c,_0x1b661d]of _0x1ead47){assertVerified(sameValue(_0xbcbc2c,_0x1b661d),_0x35cc6b(0x10c)+_0x490f32['id']+'\x20'+_0x4e5c06+_0x35cc6b(0x156));}}function sameValue(_0x488faf,_0x1d57db){const _0x5f5421=a135_0x183e3c;if(Array[_0x5f5421(0x159)](_0x488faf)||Array[_0x5f5421(0x159)](_0x1d57db))return JSON[_0x5f5421(0x127)](_0x488faf)===JSON[_0x5f5421(0x127)](_0x1d57db);return _0x488faf===_0x1d57db;}
@@ -1 +1 @@
1
- const a136_0xe1cace=a136_0xd5a9;(function(_0x3d9b56,_0x589f36){const _0x4f5fea=a136_0xd5a9,_0x16d48a=_0x3d9b56();while(!![]){try{const _0x198fa9=-parseInt(_0x4f5fea(0x1df))/0x1*(-parseInt(_0x4f5fea(0x1d4))/0x2)+-parseInt(_0x4f5fea(0x1dc))/0x3*(parseInt(_0x4f5fea(0x1ec))/0x4)+-parseInt(_0x4f5fea(0x1cd))/0x5*(parseInt(_0x4f5fea(0x1e8))/0x6)+parseInt(_0x4f5fea(0x1dd))/0x7+-parseInt(_0x4f5fea(0x1ea))/0x8+parseInt(_0x4f5fea(0x1d6))/0x9*(parseInt(_0x4f5fea(0x1eb))/0xa)+-parseInt(_0x4f5fea(0x1e1))/0xb*(-parseInt(_0x4f5fea(0x1ce))/0xc);if(_0x198fa9===_0x589f36)break;else _0x16d48a['push'](_0x16d48a['shift']());}catch(_0x1f77b3){_0x16d48a['push'](_0x16d48a['shift']());}}}(a136_0x440f,0x20e55));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=a136_0xe1cace(0x1e7);async function prepareCreate(_0xd3f076){const _0x4463fa=a136_0xe1cace,_0x5e4a76=await readNotificationDocument(_0xd3f076,_0x4463fa(0x1ee)),_0x1c69e2=createMutationInput(_0xd3f076[_0x4463fa(0x1cb)],_0x5e4a76);return{'document':_0x5e4a76,'input':_0x1c69e2,'planned':projectNotificationConfig({'appCode':_0xd3f076[_0x4463fa(0x1cb)],'configName':_0x5e4a76[_0x4463fa(0x1d9)],'channelType':_0x5e4a76[_0x4463fa(0x1d2)],'endpointUrl':_0x5e4a76[_0x4463fa(0x1d8)],'channelConfig':_0x5e4a76['channelConfig'],'description':_0x5e4a76[_0x4463fa(0x1cc)],'connectTimeout':_0x5e4a76[_0x4463fa(0x1e2)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x5e4a76[_0x4463fa(0x1de)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a136_0xd5a9(_0x26634b,_0x480db0){_0x26634b=_0x26634b-0x1cb;const _0x440fb6=a136_0x440f();let _0xd5a9b=_0x440fb6[_0x26634b];return _0xd5a9b;}function a136_0x440f(){const _0x2d019b=['149996yxeJQC','readTimeout','7QIkhuI',';\x20do\x20not\x20resubmit\x20automatically.','154wFehHs','connectTimeout','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','planned','/notification/channel-config/create','94194SuPXYn','verification','2018760loGMkI','737390kXFewl','292OzwgcW','POST','create','Inspect\x20with\x20','appCode','description','45OrSlyo','431280LYyFbP','configCode',';\x20do\x20not\x20resubmit.','notification','channelType','isSafeInteger','35974ocdAlA','input','9djcBbL','document','endpointUrl','configName','mutation','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','8049jpDSWO'];a136_0x440f=function(){return _0x2d019b;};return a136_0x440f();}export const notificationConfigCreate={'service':a136_0xe1cace(0x1d1),'command':'config-create','description':a136_0xe1cace(0x1db),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x170f11){assertSingleNotificationSource(_0x170f11);},async 'dryRun'(_0x240e15){const _0x32e61c=a136_0xe1cace,_0x3795c6=await prepareCreate(_0x240e15),_0x577c9b=notificationLookupCommand(_0x240e15[_0x32e61c(0x1cb)],_0x3795c6[_0x32e61c(0x1d7)]['channelType']);return asDryRunResult({'operation':_0x32e61c(0x1ee),'selector':{'appCode':_0x240e15[_0x32e61c(0x1cb)],'configName':_0x3795c6[_0x32e61c(0x1d7)]['configName'],'channelType':_0x3795c6[_0x32e61c(0x1d7)][_0x32e61c(0x1d2)]},'before':null,'after':_0x3795c6[_0x32e61c(0x1e6)],'dryRun':!![],'backend':{'method':_0x32e61c(0x1ed),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x32e61c(0x1e6),'lookupCommand':_0x577c9b}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x367872){const _0x2c29ec=a136_0xe1cace,_0x5c6447=await prepareCreate(_0x367872),_0x26fa60=notificationLookupCommand(_0x367872[_0x2c29ec(0x1cb)],_0x5c6447[_0x2c29ec(0x1d7)][_0x2c29ec(0x1d2)]);let _0x43ef30;try{_0x43ef30=await createNotificationChannelConfig(_0x5c6447[_0x2c29ec(0x1d5)]);}catch(_0xeb014b){if(isPlatformTransportFailure(_0xeb014b))throw notificationError('notification_config_create_outcome_unknown',_0x2c29ec(0x1e5),'Inspect\x20with\x20'+_0x26fa60+_0x2c29ec(0x1d0));throw safeApiFailure(_0x2c29ec(0x1ee),_0x2c29ec(0x1da),_0x2c29ec(0x1ef)+_0x26fa60+_0x2c29ec(0x1e4));}if(!Number[_0x2c29ec(0x1d3)](_0x43ef30)||_0x43ef30<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x2c29ec(0x1e3),_0x2c29ec(0x1ef)+_0x26fa60+_0x2c29ec(0x1d0));let _0x360d14;try{const _0x18ca71=await getNotificationChannelConfig(_0x43ef30,_0x367872[_0x2c29ec(0x1cb)]);_0x360d14=normalizeExactNotificationConfig(_0x18ca71,_0x43ef30,_0x367872['appCode']);}catch{throw safeApiFailure(_0x2c29ec(0x1ee),_0x2c29ec(0x1e9),_0x2c29ec(0x1ef)+_0x26fa60+_0x2c29ec(0x1e0));}return{'ok':!![],'data':{'operation':_0x2c29ec(0x1ee),'selector':{'appCode':_0x360d14[_0x2c29ec(0x1cb)],'id':_0x360d14['id'],'configCode':_0x360d14[_0x2c29ec(0x1cf)],'configName':_0x360d14['configName'],'channelType':_0x360d14[_0x2c29ec(0x1d2)]},'before':null,'after':projectNotificationConfig(_0x360d14),'dryRun':![],'backend':{'method':_0x2c29ec(0x1ed),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x26fa60}},'message':'Created\x20notification\x20config\x20'+_0x360d14['id']};}};
1
+ function a136_0x226c(){const _0x2d93e3=['configCode','mutation','8899176GFEbBL','channelType','30iYVJkc',';\x20no\x20automatic\x20retry\x20was\x20attempted.','connectTimeout','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','50488nFOzeT','Inspect\x20with\x20','Created\x20notification\x20config\x20','planned','readTimeout','16286ZSwsYP','629781bCRpAT','create','config-create','verification','678491OcuIdI','configName','2486372FSZSiE','appCode','POST','document','99Dzwcsr','channelConfig','1118805LUmrEZ','endpointUrl','17nBPiSk','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',';\x20do\x20not\x20resubmit.','4uzUEAh','12EgwUaf','write'];a136_0x226c=function(){return _0x2d93e3;};return a136_0x226c();}const a136_0x41766d=a136_0x1045;(function(_0x55dee1,_0x4edb90){const _0x4d5118=a136_0x1045,_0x3cf614=_0x55dee1();while(!![]){try{const _0x16a262=-parseInt(_0x4d5118(0x1cf))/0x1*(parseInt(_0x4d5118(0x1e2))/0x2)+-parseInt(_0x4d5118(0x1e3))/0x3*(parseInt(_0x4d5118(0x1d2))/0x4)+parseInt(_0x4d5118(0x1cd))/0x5*(parseInt(_0x4d5118(0x1d3))/0x6)+-parseInt(_0x4d5118(0x1e9))/0x7+-parseInt(_0x4d5118(0x1dd))/0x8*(parseInt(_0x4d5118(0x1ed))/0x9)+-parseInt(_0x4d5118(0x1d9))/0xa*(parseInt(_0x4d5118(0x1e7))/0xb)+parseInt(_0x4d5118(0x1d7))/0xc;if(_0x16a262===_0x4edb90)break;else _0x3cf614['push'](_0x3cf614['shift']());}catch(_0x3a630c){_0x3cf614['push'](_0x3cf614['shift']());}}}(a136_0x226c,0x386be));function a136_0x1045(_0x1632e0,_0x44ac7b){_0x1632e0=_0x1632e0-0x1cd;const _0x226cbb=a136_0x226c();let _0x104536=_0x226cbb[_0x1632e0];return _0x104536;}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(_0x4c98b5){const _0x17de2e=a136_0x1045,_0x5c1f63=await readNotificationDocument(_0x4c98b5,'create'),_0x30ea2d=createMutationInput(_0x4c98b5[_0x17de2e(0x1ea)],_0x5c1f63);return{'document':_0x5c1f63,'input':_0x30ea2d,'planned':projectNotificationConfig({'appCode':_0x4c98b5['appCode'],'configName':_0x5c1f63[_0x17de2e(0x1e8)],'channelType':_0x5c1f63[_0x17de2e(0x1d8)],'endpointUrl':_0x5c1f63[_0x17de2e(0x1ce)],'channelConfig':_0x5c1f63[_0x17de2e(0x1ee)],'description':_0x5c1f63['description'],'connectTimeout':_0x5c1f63[_0x17de2e(0x1db)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x5c1f63[_0x17de2e(0x1e1)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a136_0x41766d(0x1e5),'description':a136_0x41766d(0x1dc),'risk':a136_0x41766d(0x1d4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x3e4237){assertSingleNotificationSource(_0x3e4237);},async 'dryRun'(_0xe18eef){const _0x406995=a136_0x41766d,_0x3d1598=await prepareCreate(_0xe18eef),_0x4953d2=notificationLookupCommand(_0xe18eef[_0x406995(0x1ea)],_0x3d1598[_0x406995(0x1ec)][_0x406995(0x1d8)]);return asDryRunResult({'operation':_0x406995(0x1e4),'selector':{'appCode':_0xe18eef[_0x406995(0x1ea)],'configName':_0x3d1598['document']['configName'],'channelType':_0x3d1598[_0x406995(0x1ec)][_0x406995(0x1d8)]},'before':null,'after':_0x3d1598[_0x406995(0x1e0)],'dryRun':!![],'backend':{'method':_0x406995(0x1eb),'path':CREATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x4953d2}},{'method':_0x406995(0x1eb),'url':CREATE_PATH});},async 'execute'(_0x16a68f){const _0x142eb4=a136_0x41766d,_0x390e36=await prepareCreate(_0x16a68f),_0x55918c=notificationLookupCommand(_0x16a68f['appCode'],_0x390e36[_0x142eb4(0x1ec)][_0x142eb4(0x1d8)]);let _0x2b22d8;try{_0x2b22d8=await createNotificationChannelConfig(_0x390e36['input']);}catch(_0x576523){if(isPlatformTransportFailure(_0x576523))throw notificationError('notification_config_create_outcome_unknown',_0x142eb4(0x1d0),_0x142eb4(0x1de)+_0x55918c+_0x142eb4(0x1d1));throw safeApiFailure(_0x142eb4(0x1e4),_0x142eb4(0x1d6),_0x142eb4(0x1de)+_0x55918c+_0x142eb4(0x1da));}if(!Number['isSafeInteger'](_0x2b22d8)||_0x2b22d8<=0x0)throw notificationError('notification_config_create_outcome_unknown','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20'+_0x55918c+_0x142eb4(0x1d1));let _0xe2e93b;try{const _0x1c753b=await getNotificationChannelConfig(_0x2b22d8,_0x16a68f['appCode']);_0xe2e93b=normalizeExactNotificationConfig(_0x1c753b,_0x2b22d8,_0x16a68f[_0x142eb4(0x1ea)]);}catch{throw safeApiFailure(_0x142eb4(0x1e4),_0x142eb4(0x1e6),'Inspect\x20with\x20'+_0x55918c+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x142eb4(0x1e4),'selector':{'appCode':_0xe2e93b['appCode'],'id':_0xe2e93b['id'],'configCode':_0xe2e93b[_0x142eb4(0x1d5)],'configName':_0xe2e93b['configName'],'channelType':_0xe2e93b[_0x142eb4(0x1d8)]},'before':null,'after':projectNotificationConfig(_0xe2e93b),'dryRun':![],'backend':{'method':_0x142eb4(0x1eb),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x55918c}},'message':_0x142eb4(0x1df)+_0xe2e93b['id']};}};
@@ -1 +1 @@
1
- const a137_0x42c254=a137_0x55df;(function(_0x58fffd,_0x52c5db){const _0x19bdf6=a137_0x55df,_0x31b3ec=_0x58fffd();while(!![]){try{const _0x4639e4=parseInt(_0x19bdf6(0x16f))/0x1*(-parseInt(_0x19bdf6(0x184))/0x2)+-parseInt(_0x19bdf6(0x185))/0x3*(-parseInt(_0x19bdf6(0x17a))/0x4)+parseInt(_0x19bdf6(0x16e))/0x5+parseInt(_0x19bdf6(0x169))/0x6+-parseInt(_0x19bdf6(0x16b))/0x7+-parseInt(_0x19bdf6(0x17b))/0x8+parseInt(_0x19bdf6(0x171))/0x9*(-parseInt(_0x19bdf6(0x174))/0xa);if(_0x4639e4===_0x52c5db)break;else _0x31b3ec['push'](_0x31b3ec['shift']());}catch(_0x41d063){_0x31b3ec['push'](_0x31b3ec['shift']());}}}(a137_0x2362,0xba644));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a137_0x55df(_0x8e2343,_0x55cd51){_0x8e2343=_0x8e2343-0x169;const _0x2362b3=a137_0x2362();let _0x55df59=_0x2362b3[_0x8e2343];return _0x55df59;}function a137_0x2362(){const _0x427684=['planned','1189260HKWpqX','120026oGaHEB','delete','616176fgaNyY','\x20delete\x20could\x20not\x20be\x20verified.','Notification\x20config\x20','120qgOWlC','appCode',';\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20with\x20','channelType','/notification/channel-config/delete','333192YqpVYh','38624zIqhFR','POST','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','notification','notification_config_delete_outcome_unknown','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','unshift','before','some','2xqJsQO','15lwZjPc','6407994HDJvYu','high-risk-write','87213aaBoJr','config-delete'];a137_0x2362=function(){return _0x427684;};return a137_0x2362();}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a137_0x42c254(0x179),REFERENCE_WARNING=a137_0x42c254(0x180);async function prepareDelete(_0x318eec){const _0x1b8bc8=a137_0x42c254,_0x324c3d=readNotificationId(_0x318eec),_0x4496a5=await requireExactNotificationConfig(_0x318eec[_0x1b8bc8(0x175)],_0x324c3d,_0x1b8bc8(0x170));return{'id':_0x324c3d,'before':_0x4496a5};}export const notificationConfigDelete={'service':a137_0x42c254(0x17e),'command':a137_0x42c254(0x16c),'description':a137_0x42c254(0x17d),'risk':a137_0x42c254(0x16a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x173c8e){readNotificationId(_0x173c8e),requireNotificationExplicitYes(_0x173c8e);},async 'dryRun'(_0x151020){const _0x583079=a137_0x42c254,_0x35e1b7=await prepareDelete(_0x151020),_0x1565ca=notificationLookupCommand(_0x151020[_0x583079(0x175)],_0x35e1b7[_0x583079(0x182)][_0x583079(0x178)]);return asDryRunResult({'operation':_0x583079(0x170),'selector':notificationSelector(_0x35e1b7[_0x583079(0x182)]),'before':projectNotificationConfig(_0x35e1b7[_0x583079(0x182)]),'after':null,'dryRun':!![],'backend':{'method':_0x583079(0x17c),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x583079(0x16d),'lookupCommand':_0x1565ca}},{'method':_0x583079(0x17c),'url':DELETE_PATH});},async 'execute'(_0x7cbf29){const _0x29a04b=a137_0x42c254;requireNotificationExplicitYes(_0x7cbf29);const _0x4e3de0=await prepareDelete(_0x7cbf29),_0x407bb3=notificationLookupCommand(_0x7cbf29['appCode'],_0x4e3de0[_0x29a04b(0x182)]['channelType']);let _0x3cccbd=![];try{await deleteNotificationChannelConfig(_0x4e3de0['id'],_0x7cbf29[_0x29a04b(0x175)]);}catch(_0x1b0dbe){if(!isPlatformTransportFailure(_0x1b0dbe))throw safeApiFailure(_0x29a04b(0x170),'mutation',_0x29a04b(0x177)+_0x407bb3+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x3cccbd=!![];}let _0x243026;try{_0x243026=await listNotificationChannelConfigs(_0x7cbf29[_0x29a04b(0x175)],_0x4e3de0[_0x29a04b(0x182)][_0x29a04b(0x178)]),validateNotificationDeleteReadback(_0x243026,_0x7cbf29[_0x29a04b(0x175)],_0x4e3de0[_0x29a04b(0x182)][_0x29a04b(0x178)]);}catch{throw notificationError(_0x3cccbd?'notification_config_delete_outcome_unknown':'notification_config_delete_verification_unavailable',_0x29a04b(0x173)+_0x4e3de0['id']+_0x29a04b(0x172),_0x29a04b(0x177)+_0x407bb3+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x243026[_0x29a04b(0x183)](_0x567f5e=>_0x567f5e['id']===_0x4e3de0['id']))throw notificationError(_0x3cccbd?_0x29a04b(0x17f):'notification_config_delete_verification_failed',_0x29a04b(0x173)+_0x4e3de0['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x407bb3+_0x29a04b(0x176));const _0x2a1be1=[REFERENCE_WARNING];return _0x3cccbd&&_0x2a1be1[_0x29a04b(0x181)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x29a04b(0x170),'selector':notificationSelector(_0x4e3de0[_0x29a04b(0x182)]),'before':projectNotificationConfig(_0x4e3de0[_0x29a04b(0x182)]),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x2a1be1,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x3cccbd,'lookupCommand':_0x407bb3}},'message':'Deleted\x20notification\x20config\x20'+_0x4e3de0['id']};}};
1
+ const a137_0x358d08=a137_0x1605;(function(_0x3d78f2,_0x2d1505){const _0x4ced55=a137_0x1605,_0x563eec=_0x3d78f2();while(!![]){try{const _0x29e98e=parseInt(_0x4ced55(0x188))/0x1+-parseInt(_0x4ced55(0x19a))/0x2*(parseInt(_0x4ced55(0x195))/0x3)+-parseInt(_0x4ced55(0x186))/0x4+-parseInt(_0x4ced55(0x197))/0x5+-parseInt(_0x4ced55(0x19b))/0x6*(-parseInt(_0x4ced55(0x18e))/0x7)+parseInt(_0x4ced55(0x183))/0x8+parseInt(_0x4ced55(0x189))/0x9*(-parseInt(_0x4ced55(0x18c))/0xa);if(_0x29e98e===_0x2d1505)break;else _0x563eec['push'](_0x563eec['shift']());}catch(_0x39d219){_0x563eec['push'](_0x563eec['shift']());}}}(a137_0x2f25,0x96f29));function a137_0x1605(_0x44ecee,_0x2d9b9b){_0x44ecee=_0x44ecee-0x182;const _0x2f255b=a137_0x2f25();let _0x1605b7=_0x2f255b[_0x44ecee];return _0x1605b7;}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';function a137_0x2f25(){const _0x546e26=['1312680iaLKlb','/notification/channel-config/delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','940CaXaJj','726ZeXkea','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.',';\x20do\x20not\x20resubmit\x20automatically.','7748288uJxpwZ','POST',';\x20no\x20automatic\x20retry\x20was\x20attempted.','1346256xdAYOJ','some','322957DXJJRL','2240739scyZrk','before','delete','30kzFOoa','notification_config_delete_verification_unavailable','61327sutfcB','appCode','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','notification_config_delete_outcome_unknown','Inspect\x20with\x20','notification_config_delete_verification_failed','channelType','2472vZdVQw','high-risk-write'];a137_0x2f25=function(){return _0x546e26;};return a137_0x2f25();}const DELETE_PATH=a137_0x358d08(0x198),REFERENCE_WARNING=a137_0x358d08(0x19c);async function prepareDelete(_0x3883ac){const _0x57ea0d=a137_0x358d08,_0x46202e=readNotificationId(_0x3883ac),_0x389658=await requireExactNotificationConfig(_0x3883ac[_0x57ea0d(0x18f)],_0x46202e,_0x57ea0d(0x18b));return{'id':_0x46202e,'before':_0x389658};}export const notificationConfigDelete={'service':'notification','command':'config-delete','description':a137_0x358d08(0x190),'risk':a137_0x358d08(0x196),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x36eff8){readNotificationId(_0x36eff8),requireNotificationExplicitYes(_0x36eff8);},async 'dryRun'(_0x2dc6a5){const _0x3ca37b=a137_0x358d08,_0x169a87=await prepareDelete(_0x2dc6a5),_0x6e0a32=notificationLookupCommand(_0x2dc6a5['appCode'],_0x169a87['before'][_0x3ca37b(0x194)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x169a87[_0x3ca37b(0x18a)]),'before':projectNotificationConfig(_0x169a87[_0x3ca37b(0x18a)]),'after':null,'dryRun':!![],'backend':{'method':_0x3ca37b(0x184),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x6e0a32}},{'method':_0x3ca37b(0x184),'url':DELETE_PATH});},async 'execute'(_0x3a8e25){const _0x12b665=a137_0x358d08;requireNotificationExplicitYes(_0x3a8e25);const _0x577550=await prepareDelete(_0x3a8e25),_0x75ab8f=notificationLookupCommand(_0x3a8e25[_0x12b665(0x18f)],_0x577550['before'][_0x12b665(0x194)]);let _0x420a2d=![];try{await deleteNotificationChannelConfig(_0x577550['id'],_0x3a8e25['appCode']);}catch(_0xc47397){if(!isPlatformTransportFailure(_0xc47397))throw safeApiFailure('delete','mutation','Inspect\x20with\x20'+_0x75ab8f+_0x12b665(0x185));_0x420a2d=!![];}let _0x5a4cc1;try{_0x5a4cc1=await listNotificationChannelConfigs(_0x3a8e25['appCode'],_0x577550[_0x12b665(0x18a)]['channelType']),validateNotificationDeleteReadback(_0x5a4cc1,_0x3a8e25[_0x12b665(0x18f)],_0x577550['before'][_0x12b665(0x194)]);}catch{throw notificationError(_0x420a2d?_0x12b665(0x191):_0x12b665(0x18d),'Notification\x20config\x20'+_0x577550['id']+'\x20delete\x20could\x20not\x20be\x20verified.','Inspect\x20with\x20'+_0x75ab8f+_0x12b665(0x182));}if(_0x5a4cc1[_0x12b665(0x187)](_0x24cd99=>_0x24cd99['id']===_0x577550['id']))throw notificationError(_0x420a2d?_0x12b665(0x191):_0x12b665(0x193),'Notification\x20config\x20'+_0x577550['id']+'\x20remains\x20present\x20after\x20delete.',_0x12b665(0x192)+_0x75ab8f+_0x12b665(0x182));const _0x19a95a=[REFERENCE_WARNING];return _0x420a2d&&_0x19a95a['unshift'](_0x12b665(0x199)),{'ok':!![],'data':{'operation':_0x12b665(0x18b),'selector':notificationSelector(_0x577550[_0x12b665(0x18a)]),'before':projectNotificationConfig(_0x577550[_0x12b665(0x18a)]),'after':null,'dryRun':![],'backend':{'method':_0x12b665(0x184),'path':DELETE_PATH},'warnings':_0x19a95a,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x420a2d,'lookupCommand':_0x75ab8f}},'message':'Deleted\x20notification\x20config\x20'+_0x577550['id']};}};
@@ -1 +1 @@
1
- const a138_0x51ce9a=a138_0x3348;(function(_0x139611,_0x3cb8ee){const _0x4ede20=a138_0x3348,_0x40d6a4=_0x139611();while(!![]){try{const _0x4f84af=parseInt(_0x4ede20(0x16c))/0x1*(-parseInt(_0x4ede20(0x17c))/0x2)+parseInt(_0x4ede20(0x17d))/0x3+-parseInt(_0x4ede20(0x17e))/0x4+parseInt(_0x4ede20(0x176))/0x5+parseInt(_0x4ede20(0x16d))/0x6*(parseInt(_0x4ede20(0x178))/0x7)+-parseInt(_0x4ede20(0x17a))/0x8+-parseInt(_0x4ede20(0x173))/0x9*(-parseInt(_0x4ede20(0x16e))/0xa);if(_0x4f84af===_0x3cb8ee)break;else _0x40d6a4['push'](_0x40d6a4['shift']());}catch(_0x5513b0){_0x40d6a4['push'](_0x40d6a4['shift']());}}}(a138_0x233f,0xc325e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a138_0x3348(_0x339cbc,_0xf778de){_0x339cbc=_0x339cbc-0x16c;const _0x233f60=a138_0x233f();let _0x3348f1=_0x233f60[_0x339cbc];return _0x3348f1;}import{listNotificationChannelConfigs}from'../../core/api-client.js';function a138_0x233f(){const _0x1d2400=['4446964DDQRpB','11GwgeCA','6otbzAN','3430mdcEXl','map','type','appCode','length','8037FdLeoo','config-list','\x20notification\x20config(s)','5532715PBUlBo','string','6172103VOFcDj','notification','5876000nfThrv','EMAIL','12444juVLqo','1258314iOCXDJ'];a138_0x233f=function(){return _0x1d2400;};return a138_0x233f();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a138_0x51ce9a(0x179),'command':a138_0x51ce9a(0x174),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a138_0x51ce9a(0x170),'type':a138_0x51ce9a(0x177),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':a138_0x51ce9a(0x17b)}],async 'validate'(_0x498233){readNotificationChannelType(_0x498233);},async 'execute'(_0x510dca){const _0x336817=a138_0x51ce9a,_0x439cb8=readNotificationChannelType(_0x510dca),_0x5e5fc9=await listNotificationChannelConfigs(_0x510dca[_0x336817(0x171)],_0x439cb8),_0x16dbdc=_0x5e5fc9[_0x336817(0x16f)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x510dca[_0x336817(0x171)],'channelType':_0x439cb8,'count':_0x16dbdc[_0x336817(0x172)],'configs':_0x16dbdc},'message':'Found\x20'+_0x16dbdc[_0x336817(0x172)]+'\x20'+_0x439cb8+_0x336817(0x175)};}};
1
+ const a138_0x94dabd=a138_0x2c29;(function(_0x163d63,_0x1f32f3){const _0x95a38b=a138_0x2c29,_0xe6e5de=_0x163d63();while(!![]){try{const _0x53fd4e=parseInt(_0x95a38b(0xe3))/0x1*(parseInt(_0x95a38b(0xf4))/0x2)+-parseInt(_0x95a38b(0xea))/0x3*(parseInt(_0x95a38b(0xf3))/0x4)+parseInt(_0x95a38b(0xf0))/0x5+parseInt(_0x95a38b(0xe9))/0x6+-parseInt(_0x95a38b(0xec))/0x7*(parseInt(_0x95a38b(0xed))/0x8)+-parseInt(_0x95a38b(0xf2))/0x9*(parseInt(_0x95a38b(0xef))/0xa)+parseInt(_0x95a38b(0xe5))/0xb;if(_0x53fd4e===_0x1f32f3)break;else _0xe6e5de['push'](_0xe6e5de['shift']());}catch(_0x3add19){_0xe6e5de['push'](_0xe6e5de['shift']());}}}(a138_0x30ea,0xd1172));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';function a138_0x2c29(_0x26da4e,_0x3db0b1){_0x26da4e=_0x26da4e-0xe1;const _0x30ea92=a138_0x30ea();let _0x2c2940=_0x30ea92[_0x26da4e];return _0x2c2940;}export const notificationConfigList={'service':'notification','command':a138_0x94dabd(0xe1),'description':a138_0x94dabd(0xf1),'risk':a138_0x94dabd(0xe7),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a138_0x94dabd(0xee),'type':a138_0x94dabd(0xf5),'description':a138_0x94dabd(0xe4),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a138_0x94dabd(0xeb)}],async 'validate'(_0x2b8430){readNotificationChannelType(_0x2b8430);},async 'execute'(_0x1d3917){const _0x4b81af=a138_0x94dabd,_0x356da8=readNotificationChannelType(_0x1d3917),_0x32c223=await listNotificationChannelConfigs(_0x1d3917[_0x4b81af(0xe2)],_0x356da8),_0x967880=_0x32c223[_0x4b81af(0xe6)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x1d3917[_0x4b81af(0xe2)],'channelType':_0x356da8,'count':_0x967880[_0x4b81af(0xe8)],'configs':_0x967880},'message':'Found\x20'+_0x967880[_0x4b81af(0xe8)]+'\x20'+_0x356da8+'\x20notification\x20config(s)'};}};function a138_0x30ea(){const _0x458687=['53315rFGnak','Notification\x20channel\x20type','2201518JdeIBm','map','read','length','5348946MYzRCD','45GEwsim','EMAIL','91DAGaBt','101272qDTCYy','type','180wEqQXn','5052640WkULVI','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','413073HtRmGS','82220DMNyJC','2UjINcl','string','config-list','appCode'];a138_0x30ea=function(){return _0x458687;};return a138_0x30ea();}
@@ -1 +1 @@
1
- function a139_0x4677(_0x3cde80,_0x49d2ae){_0x3cde80=_0x3cde80-0x147;const _0x27bee0=a139_0x27be();let _0x467751=_0x27bee0[_0x3cde80];return _0x467751;}const a139_0x46e46b=a139_0x4677;(function(_0x2823c4,_0x582cc4){const _0x1e8d0f=a139_0x4677,_0x253395=_0x2823c4();while(!![]){try{const _0x5d80d5=parseInt(_0x1e8d0f(0x150))/0x1+-parseInt(_0x1e8d0f(0x164))/0x2*(-parseInt(_0x1e8d0f(0x14c))/0x3)+-parseInt(_0x1e8d0f(0x154))/0x4*(-parseInt(_0x1e8d0f(0x153))/0x5)+parseInt(_0x1e8d0f(0x167))/0x6+parseInt(_0x1e8d0f(0x148))/0x7*(-parseInt(_0x1e8d0f(0x157))/0x8)+parseInt(_0x1e8d0f(0x16b))/0x9+parseInt(_0x1e8d0f(0x15c))/0xa*(-parseInt(_0x1e8d0f(0x15d))/0xb);if(_0x5d80d5===_0x582cc4)break;else _0x253395['push'](_0x253395['shift']());}catch(_0x2749c9){_0x253395['push'](_0x253395['shift']());}}}(a139_0x27be,0xa5757));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a139_0x27be(){const _0x670593=['Inspect\x20with\x20--id\x20','verified','channelType','50XjqKRX','1992034wsCFls','notification_config_update_outcome_unknown','config-update','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','notification','\x20via\x20','Inspect\x20ID\x20','5950LqpDOS','verifiedFields','Notification\x20config\x20','19128fNzjLY','Updated\x20notification\x20config\x20',';\x20do\x20not\x20resubmit\x20automatically.','appCode','4784193kQdVqM','patch','\x20with\x20','POST','5747WHQHzL','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','provesChange','high-risk-write','678buTtCX',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification_config_update_verification_unavailable','planned','810146jfbUdP','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','before','171025uDzuCY','44edlWoP','update','mutation','7896xAhhNd','/notification/channel-config/update'];a139_0x27be=function(){return _0x670593;};return a139_0x27be();}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=a139_0x46e46b(0x158);async function prepareUpdate(_0x1bd121){const _0x1be50a=a139_0x46e46b,_0x173db7=readNotificationId(_0x1bd121),_0x40b4de=await readNotificationDocument(_0x1bd121,_0x1be50a(0x155)),_0x19978f=await requireExactNotificationConfig(_0x1bd121[_0x1be50a(0x16a)],_0x173db7,'update');return{'id':_0x173db7,'patch':_0x40b4de,'before':_0x19978f,'payload':mergeUpdateInput(_0x19978f,_0x40b4de),'planned':plannedUpdateProjection(_0x19978f,_0x40b4de)};}export const notificationConfigUpdate={'service':a139_0x46e46b(0x161),'command':a139_0x46e46b(0x15f),'description':a139_0x46e46b(0x151),'risk':a139_0x46e46b(0x14b),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x45b2ff){readNotificationId(_0x45b2ff),assertSingleNotificationSource(_0x45b2ff),requireNotificationExplicitYes(_0x45b2ff);},async 'dryRun'(_0x16737f){const _0x3dc6dc=a139_0x46e46b,_0x1f9ec8=await prepareUpdate(_0x16737f),_0x5af83b=notificationLookupCommand(_0x16737f[_0x3dc6dc(0x16a)],_0x1f9ec8['before'][_0x3dc6dc(0x15b)]);return asDryRunResult({'operation':_0x3dc6dc(0x155),'selector':notificationSelector(_0x1f9ec8['before']),'before':projectNotificationConfig(_0x1f9ec8[_0x3dc6dc(0x152)]),'after':_0x1f9ec8[_0x3dc6dc(0x14f)],'dryRun':!![],'backend':{'method':_0x3dc6dc(0x147),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x3dc6dc(0x14f),'lookupCommand':_0x5af83b}},{'method':_0x3dc6dc(0x147),'url':UPDATE_PATH});},async 'execute'(_0xb78177){const _0x1864b8=a139_0x46e46b;requireNotificationExplicitYes(_0xb78177);const _0x49a898=await prepareUpdate(_0xb78177),_0x4e0d5a=notificationLookupCommand(_0xb78177[_0x1864b8(0x16a)],_0x49a898[_0x1864b8(0x152)][_0x1864b8(0x15b)]);let _0x5b5416=![];try{await updateNotificationChannelConfig(_0x49a898['payload']);}catch(_0x351a64){if(!isPlatformTransportFailure(_0x351a64))throw safeApiFailure(_0x1864b8(0x155),_0x1864b8(0x156),_0x1864b8(0x163)+_0x49a898['id']+_0x1864b8(0x16d)+_0x4e0d5a+_0x1864b8(0x14d));_0x5b5416=!![];}let _0x2d84b8;try{const _0x10eebd=await getNotificationChannelConfig(_0x49a898['id'],_0xb78177[_0x1864b8(0x16a)]);_0x2d84b8=normalizeExactNotificationConfig(_0x10eebd,_0x49a898['id'],_0xb78177[_0x1864b8(0x16a)]);}catch{throw notificationError(_0x5b5416?_0x1864b8(0x15e):_0x1864b8(0x14e),_0x1864b8(0x166)+_0x49a898['id']+_0x1864b8(0x149),_0x1864b8(0x159)+_0x49a898['id']+_0x1864b8(0x162)+_0x4e0d5a+_0x1864b8(0x169));}const _0x1e879b=requestedSafeFieldsMatch(_0x49a898[_0x1864b8(0x152)],_0x2d84b8,_0x49a898[_0x1864b8(0x16c)]);if(!_0x1e879b['allMatch']||_0x5b5416&&!_0x1e879b[_0x1864b8(0x14a)])throw notificationError(_0x5b5416?_0x1864b8(0x15e):'notification_config_update_verification_failed',_0x1864b8(0x166)+_0x49a898['id']+_0x1864b8(0x160),_0x1864b8(0x159)+_0x49a898['id']+'\x20via\x20'+_0x4e0d5a+_0x1864b8(0x169));const _0x205d21=_0x5b5416?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x2d84b8),'before':projectNotificationConfig(_0x49a898[_0x1864b8(0x152)]),'after':projectNotificationConfig(_0x2d84b8),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x205d21,'verification':{'status':_0x1864b8(0x15a),'recoveredAfterUnknownResponse':_0x5b5416,'verifiedFields':_0x1e879b[_0x1864b8(0x165)],'lookupCommand':_0x4e0d5a}},'message':_0x1864b8(0x168)+_0x2d84b8['id']};}};
1
+ const a139_0x54bba3=a139_0x2e2b;(function(_0x4b7f1,_0x4417f1){const _0x1b2751=a139_0x2e2b,_0x4bb2b9=_0x4b7f1();while(!![]){try{const _0x1794e1=parseInt(_0x1b2751(0xc3))/0x1+-parseInt(_0x1b2751(0xc1))/0x2+parseInt(_0x1b2751(0xb7))/0x3*(parseInt(_0x1b2751(0xb9))/0x4)+-parseInt(_0x1b2751(0xa6))/0x5+parseInt(_0x1b2751(0xbf))/0x6+-parseInt(_0x1b2751(0xc2))/0x7*(parseInt(_0x1b2751(0xba))/0x8)+parseInt(_0x1b2751(0xae))/0x9*(parseInt(_0x1b2751(0xa8))/0xa);if(_0x1794e1===_0x4417f1)break;else _0x4bb2b9['push'](_0x4bb2b9['shift']());}catch(_0xf65b74){_0x4bb2b9['push'](_0x4bb2b9['shift']());}}}(a139_0x1ccd,0x523d9));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a139_0x2e2b(_0x3b413b,_0x5958a9){_0x3b413b=_0x3b413b-0xa5;const _0x1ccd92=a139_0x1ccd();let _0x2e2b6b=_0x1ccd92[_0x3b413b];return _0x2e2b6b;}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=a139_0x54bba3(0xb8);function a139_0x1ccd(){const _0x5200fc=['Inspect\x20with\x20--id\x20',';\x20do\x20not\x20resubmit\x20automatically.','\x20with\x20','planned','POST','\x20via\x20','provesChange','mutation','3MhzoPW','/notification/channel-config/update','2149556xstrJN','16520rVOsdP','notification_config_update_outcome_unknown','Inspect\x20ID\x20','update','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','1767300CQiFUR','notification','1092460UxjGUu','1967LAzGnr','584838JPnFjr','appCode','notification_config_update_verification_failed','Notification\x20config\x20','payload','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','high-risk-write','notification_config_update_verification_unavailable','2255845KKesbH','config-update','520ISeONR','verified','patch','Updated\x20notification\x20config\x20','before','verifiedFields','86148BjyaRX'];a139_0x1ccd=function(){return _0x5200fc;};return a139_0x1ccd();}async function prepareUpdate(_0x47d9f6){const _0x4c40f6=a139_0x54bba3,_0xb1a96e=readNotificationId(_0x47d9f6),_0x5bac03=await readNotificationDocument(_0x47d9f6,_0x4c40f6(0xbd)),_0x195b19=await requireExactNotificationConfig(_0x47d9f6[_0x4c40f6(0xc4)],_0xb1a96e,_0x4c40f6(0xbd));return{'id':_0xb1a96e,'patch':_0x5bac03,'before':_0x195b19,'payload':mergeUpdateInput(_0x195b19,_0x5bac03),'planned':plannedUpdateProjection(_0x195b19,_0x5bac03)};}export const notificationConfigUpdate={'service':a139_0x54bba3(0xc0),'command':a139_0x54bba3(0xa7),'description':a139_0x54bba3(0xc9),'risk':a139_0x54bba3(0xca),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x5875c9){readNotificationId(_0x5875c9),assertSingleNotificationSource(_0x5875c9),requireNotificationExplicitYes(_0x5875c9);},async 'dryRun'(_0xf780c3){const _0x1e7932=a139_0x54bba3,_0x462bfa=await prepareUpdate(_0xf780c3),_0x18ca64=notificationLookupCommand(_0xf780c3[_0x1e7932(0xc4)],_0x462bfa[_0x1e7932(0xac)]['channelType']);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x462bfa[_0x1e7932(0xac)]),'before':projectNotificationConfig(_0x462bfa[_0x1e7932(0xac)]),'after':_0x462bfa[_0x1e7932(0xb2)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x1e7932(0xb2),'lookupCommand':_0x18ca64}},{'method':_0x1e7932(0xb3),'url':UPDATE_PATH});},async 'execute'(_0x22380b){const _0x5e1ac5=a139_0x54bba3;requireNotificationExplicitYes(_0x22380b);const _0x567e72=await prepareUpdate(_0x22380b),_0x13125a=notificationLookupCommand(_0x22380b[_0x5e1ac5(0xc4)],_0x567e72[_0x5e1ac5(0xac)]['channelType']);let _0x3ef6ef=![];try{await updateNotificationChannelConfig(_0x567e72[_0x5e1ac5(0xc7)]);}catch(_0x2116da){if(!isPlatformTransportFailure(_0x2116da))throw safeApiFailure(_0x5e1ac5(0xbd),_0x5e1ac5(0xb6),_0x5e1ac5(0xbc)+_0x567e72['id']+_0x5e1ac5(0xb1)+_0x13125a+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x3ef6ef=!![];}let _0x23c3f9;try{const _0x45cd3a=await getNotificationChannelConfig(_0x567e72['id'],_0x22380b[_0x5e1ac5(0xc4)]);_0x23c3f9=normalizeExactNotificationConfig(_0x45cd3a,_0x567e72['id'],_0x22380b[_0x5e1ac5(0xc4)]);}catch{throw notificationError(_0x3ef6ef?_0x5e1ac5(0xbb):_0x5e1ac5(0xa5),_0x5e1ac5(0xc6)+_0x567e72['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x5e1ac5(0xaf)+_0x567e72['id']+_0x5e1ac5(0xb4)+_0x13125a+_0x5e1ac5(0xb0));}const _0x1c1979=requestedSafeFieldsMatch(_0x567e72[_0x5e1ac5(0xac)],_0x23c3f9,_0x567e72[_0x5e1ac5(0xaa)]);if(!_0x1c1979['allMatch']||_0x3ef6ef&&!_0x1c1979[_0x5e1ac5(0xb5)])throw notificationError(_0x3ef6ef?_0x5e1ac5(0xbb):_0x5e1ac5(0xc5),_0x5e1ac5(0xc6)+_0x567e72['id']+_0x5e1ac5(0xc8),_0x5e1ac5(0xaf)+_0x567e72['id']+_0x5e1ac5(0xb4)+_0x13125a+_0x5e1ac5(0xb0));const _0xf7bff4=_0x3ef6ef?[_0x5e1ac5(0xbe)]:[];return{'ok':!![],'data':{'operation':_0x5e1ac5(0xbd),'selector':notificationSelector(_0x23c3f9),'before':projectNotificationConfig(_0x567e72[_0x5e1ac5(0xac)]),'after':projectNotificationConfig(_0x23c3f9),'dryRun':![],'backend':{'method':_0x5e1ac5(0xb3),'path':UPDATE_PATH},'warnings':_0xf7bff4,'verification':{'status':_0x5e1ac5(0xa9),'recoveredAfterUnknownResponse':_0x3ef6ef,'verifiedFields':_0x1c1979[_0x5e1ac5(0xad)],'lookupCommand':_0x13125a}},'message':_0x5e1ac5(0xab)+_0x23c3f9['id']};}};
@@ -1 +1 @@
1
- (function(_0x4811bb,_0x22db45){const _0x272e73=a140_0x151c,_0x13d8c4=_0x4811bb();while(!![]){try{const _0x4840c6=parseInt(_0x272e73(0x119))/0x1+-parseInt(_0x272e73(0x11b))/0x2*(-parseInt(_0x272e73(0x11e))/0x3)+parseInt(_0x272e73(0x118))/0x4+parseInt(_0x272e73(0x11d))/0x5+parseInt(_0x272e73(0x11c))/0x6+parseInt(_0x272e73(0x11a))/0x7+-parseInt(_0x272e73(0x11f))/0x8*(parseInt(_0x272e73(0x117))/0x9);if(_0x4840c6===_0x22db45)break;else _0x13d8c4['push'](_0x13d8c4['shift']());}catch(_0x324424){_0x13d8c4['push'](_0x13d8c4['shift']());}}}(a140_0x5e85,0x5249f));import{notificationConfigList}from'../../commands/notification/config-list.js';function a140_0x151c(_0x57f760,_0x108507){_0x57f760=_0x57f760-0x117;const _0x5e85aa=a140_0x5e85();let _0x151c33=_0x5e85aa[_0x57f760];return _0x151c33;}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];function a140_0x5e85(){const _0x5f6dd0=['15374wgXaWT','3645504TGAQcA','1105770tfHGVD','249ehRPCG','3491656CQmjuN','45VjJgby','808216HOzpvF','596453uQVJvv','1778518RqmUJf'];a140_0x5e85=function(){return _0x5f6dd0;};return a140_0x5e85();}
1
+ (function(_0x5dcb99,_0x2b3fff){const _0x364380=a140_0x256a,_0x23a51b=_0x5dcb99();while(!![]){try{const _0xfd88cf=-parseInt(_0x364380(0x6e))/0x1*(parseInt(_0x364380(0x6b))/0x2)+-parseInt(_0x364380(0x6a))/0x3*(-parseInt(_0x364380(0x71))/0x4)+parseInt(_0x364380(0x72))/0x5*(parseInt(_0x364380(0x6f))/0x6)+parseInt(_0x364380(0x69))/0x7+parseInt(_0x364380(0x70))/0x8+parseInt(_0x364380(0x6d))/0x9+-parseInt(_0x364380(0x6c))/0xa;if(_0xfd88cf===_0x2b3fff)break;else _0x23a51b['push'](_0x23a51b['shift']());}catch(_0x3f4c02){_0x23a51b['push'](_0x23a51b['shift']());}}}(a140_0x5131,0x6524d));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a140_0x256a(_0x39c87d,_0x4fac11){_0x39c87d=_0x39c87d-0x69;const _0x5131ec=a140_0x5131();let _0x256a88=_0x5131ec[_0x39c87d];return _0x256a88;}function a140_0x5131(){const _0x502f78=['95KJwwIM','1831529SrLskB','3837CKPFYk','4yWrNzt','11722330dcsPJC','3370869bPzbfg','192431vRLpFJ','222438KnEaPh','554592rQfLSP','1756ZoqcYd'];a140_0x5131=function(){return _0x502f78;};return a140_0x5131();}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];