@lovrabet/rabetbase-cli 2.4.6-beta.2 → 2.4.6-beta.3

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 (294) 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/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/shared.js +1 -1
  109. package/lib/commands/kb/update.js +1 -1
  110. package/lib/commands/logs/index.js +1 -1
  111. package/lib/commands/menu/asset-update.js +1 -1
  112. package/lib/commands/menu/delete.js +1 -1
  113. package/lib/commands/menu/external-link-create.js +1 -1
  114. package/lib/commands/menu/external-link-update.js +1 -1
  115. package/lib/commands/menu/group-create.js +1 -1
  116. package/lib/commands/menu/group-update.js +1 -1
  117. package/lib/commands/menu/index.js +1 -1
  118. package/lib/commands/menu/list.js +1 -1
  119. package/lib/commands/menu/move.js +1 -1
  120. package/lib/commands/menu/regroup-start.js +1 -1
  121. package/lib/commands/menu/rename.js +1 -1
  122. package/lib/commands/menu/shared/compare-table.js +1 -1
  123. package/lib/commands/menu/shared/delete-plan.js +1 -1
  124. package/lib/commands/menu/shared/facts.js +1 -1
  125. package/lib/commands/menu/shared/index.js +1 -1
  126. package/lib/commands/menu/shared/inquirer.js +1 -1
  127. package/lib/commands/menu/shared/local-pages.js +1 -1
  128. package/lib/commands/menu/shared/logic.js +1 -1
  129. package/lib/commands/menu/shared/mutations.js +1 -1
  130. package/lib/commands/menu/shared/service.js +1 -1
  131. package/lib/commands/menu/shared/sync-core.js +1 -1
  132. package/lib/commands/menu/shared/update-core.js +1 -1
  133. package/lib/commands/menu/shared/valid-url.js +1 -1
  134. package/lib/commands/menu/sync.js +1 -1
  135. package/lib/commands/menu/visibility-update.js +1 -1
  136. package/lib/commands/notification/config-create.js +1 -1
  137. package/lib/commands/notification/config-delete.js +1 -1
  138. package/lib/commands/notification/config-list.js +1 -1
  139. package/lib/commands/notification/config-update.js +1 -1
  140. package/lib/commands/notification/index.js +1 -1
  141. package/lib/commands/notification/shared.js +1 -1
  142. package/lib/commands/ocr/index.js +1 -1
  143. package/lib/commands/page/create.js +1 -1
  144. package/lib/commands/page/custom/detail.js +1 -1
  145. package/lib/commands/page/custom/list.js +1 -1
  146. package/lib/commands/page/custom/publish.js +1 -1
  147. package/lib/commands/page/custom/shared.js +1 -1
  148. package/lib/commands/page/custom/syntax.js +1 -1
  149. package/lib/commands/page/custom/template.js +1 -1
  150. package/lib/commands/page/custom/update.js +1 -1
  151. package/lib/commands/page/data-list-status.js +1 -1
  152. package/lib/commands/page/generate-start.js +1 -1
  153. package/lib/commands/page/generate-status.js +1 -1
  154. package/lib/commands/page/index.js +1 -1
  155. package/lib/commands/page/pull.js +1 -1
  156. package/lib/commands/page/push.js +1 -1
  157. package/lib/commands/page/relation-audit.js +1 -1
  158. package/lib/commands/page/restore.js +1 -1
  159. package/lib/commands/page/shared.js +1 -1
  160. package/lib/commands/page/sync.js +1 -1
  161. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  162. package/lib/commands/project/create/format-elapsed.js +1 -1
  163. package/lib/commands/project/create/main.js +1 -1
  164. package/lib/commands/project/create/materialize-project-template.js +1 -1
  165. package/lib/commands/project/create/project-name.js +1 -1
  166. package/lib/commands/project/create/project-template-archive.js +1 -1
  167. package/lib/commands/project/create/project-template-path.js +1 -1
  168. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  169. package/lib/commands/project/create/use-format-code.js +1 -1
  170. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  171. package/lib/commands/project/index.js +1 -1
  172. package/lib/commands/project/upgrade.js +1 -1
  173. package/lib/commands/registry.js +1 -1
  174. package/lib/commands/role/delete.js +1 -1
  175. package/lib/commands/role/detail.js +1 -1
  176. package/lib/commands/role/index.js +1 -1
  177. package/lib/commands/role/list.js +1 -1
  178. package/lib/commands/role/shared.js +1 -1
  179. package/lib/commands/role/update.js +1 -1
  180. package/lib/commands/role/user-add.js +1 -1
  181. package/lib/commands/role/user-remove.js +1 -1
  182. package/lib/commands/role/user-resolve.js +1 -1
  183. package/lib/commands/run/index.js +1 -1
  184. package/lib/commands/schema.js +1 -1
  185. package/lib/commands/sql/create.js +1 -1
  186. package/lib/commands/sql/delete.js +1 -1
  187. package/lib/commands/sql/detail.js +1 -1
  188. package/lib/commands/sql/exec.js +1 -1
  189. package/lib/commands/sql/index.js +1 -1
  190. package/lib/commands/sql/list.js +1 -1
  191. package/lib/commands/sql/pull.js +1 -1
  192. package/lib/commands/sql/push.js +1 -1
  193. package/lib/commands/sql/shared.js +1 -1
  194. package/lib/commands/sql/status.js +1 -1
  195. package/lib/commands/sql/validate.js +1 -1
  196. package/lib/commands/task/index.js +1 -1
  197. package/lib/commands/task/status.js +1 -1
  198. package/lib/commands/tenant/index.js +1 -1
  199. package/lib/commands/tenant/members-list.js +1 -1
  200. package/lib/commands/tenant/shared.js +1 -1
  201. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  202. package/lib/commands/user-account/index.js +1 -1
  203. package/lib/commands/workspace/add.js +1 -1
  204. package/lib/commands/workspace/index.js +1 -1
  205. package/lib/commands/workspace/remove.js +1 -1
  206. package/lib/config/schema.js +1 -1
  207. package/lib/constant/cdn.js +1 -1
  208. package/lib/constant/cli.js +1 -1
  209. package/lib/constant/defaults.js +1 -1
  210. package/lib/constant/domain.js +1 -1
  211. package/lib/constant/env.js +1 -1
  212. package/lib/constant/output.js +1 -1
  213. package/lib/constant/paths.js +1 -1
  214. package/lib/constant/risk.js +1 -1
  215. package/lib/context/app-resolver.js +1 -1
  216. package/lib/context/auth-resolver.js +1 -1
  217. package/lib/context/config-loader.js +1 -1
  218. package/lib/context.js +1 -1
  219. package/lib/core/alias-resolver.js +1 -1
  220. package/lib/core/api-client.js +1 -1
  221. package/lib/core/bff/config.js +1 -1
  222. package/lib/core/bff/file-system.js +1 -1
  223. package/lib/core/bff/hash.js +1 -1
  224. package/lib/core/bff/lock.js +1 -1
  225. package/lib/core/bff/utils.js +1 -1
  226. package/lib/core/db-resolver.js +1 -1
  227. package/lib/core/page/file-system.js +1 -1
  228. package/lib/core/page/hash.js +1 -1
  229. package/lib/core/page/lock.js +1 -1
  230. package/lib/core/sql-index-auditor.js +1 -1
  231. package/lib/core/sql-sync/config.js +1 -1
  232. package/lib/core/sql-sync/file-system.js +1 -1
  233. package/lib/core/sql-sync/hash.js +1 -1
  234. package/lib/core/sql-sync/lock.js +1 -1
  235. package/lib/core/sql-sync/utils.js +1 -1
  236. package/lib/core/sql-validator.js +1 -1
  237. package/lib/errors.js +1 -1
  238. package/lib/framework/build-all-flags.js +1 -1
  239. package/lib/framework/error-output.js +1 -1
  240. package/lib/framework/explicit-yes.js +1 -1
  241. package/lib/framework/flags.js +1 -1
  242. package/lib/framework/help.js +1 -1
  243. package/lib/framework/index.js +1 -1
  244. package/lib/framework/output.js +1 -1
  245. package/lib/framework/response.js +1 -1
  246. package/lib/framework/runner-alias.js +1 -1
  247. package/lib/framework/runner.js +1 -1
  248. package/lib/framework/schema-export.js +1 -1
  249. package/lib/framework/types.js +1 -1
  250. package/lib/generated/build-info.d.ts +4 -4
  251. package/lib/generated/build-info.js +1 -1
  252. package/lib/help.js +1 -1
  253. package/lib/postinstall.js +1 -1
  254. package/lib/runtime/confirmation.js +1 -1
  255. package/lib/runtime/event.js +1 -1
  256. package/lib/runtime/index.js +1 -1
  257. package/lib/runtime/queue.js +1 -1
  258. package/lib/runtime/resolve.js +1 -1
  259. package/lib/skills/builtin-skill.js +1 -1
  260. package/lib/skills/main.js +1 -1
  261. package/lib/skills/npx-skills-add.js +1 -1
  262. package/lib/skills/skill-presence.js +1 -1
  263. package/lib/telemetry/cli-command-trace.js +1 -1
  264. package/lib/telemetry/cli-help-trace.js +1 -1
  265. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  266. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  267. package/lib/telemetry/send-cli-trace-log.js +1 -1
  268. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  269. package/lib/utils/ai_config.js +1 -1
  270. package/lib/utils/apply-jq-filter.js +1 -1
  271. package/lib/utils/cdn-config.js +1 -1
  272. package/lib/utils/check-sdk-version.js +1 -1
  273. package/lib/utils/cli-version-check.js +1 -1
  274. package/lib/utils/cli-version-policy.js +1 -1
  275. package/lib/utils/config.js +1 -1
  276. package/lib/utils/entity-with-id.js +1 -1
  277. package/lib/utils/file-utils.js +1 -1
  278. package/lib/utils/guides-cdn.js +1 -1
  279. package/lib/utils/http-client.js +1 -1
  280. package/lib/utils/is-non-interactive.js +1 -1
  281. package/lib/utils/logger.js +1 -1
  282. package/lib/utils/params.js +1 -1
  283. package/lib/utils/platform.js +1 -1
  284. package/lib/utils/rules-cdn.js +1 -1
  285. package/lib/utils/sleep.js +1 -1
  286. package/lib/utils/template-replacer.js +1 -1
  287. package/lib/utils/update-notice.js +1 -1
  288. package/lib/utils/version.js +1 -1
  289. package/lib/utils/with-active-cookie.js +1 -1
  290. package/lib/utils/write-cli-side-channel.js +1 -1
  291. package/package.json +1 -1
  292. package/skills/rabetbase/SKILL.md +3 -3
  293. package/skills/rabetbase/references/rabetbase-ocr.md +17 -2
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x26aaab,_0x2314a9){const _0x5ef835=a130_0x1620,_0x57ce97=_0x26aaab();while(!![]){try{const _0x6a9255=parseInt(_0x5ef835(0x127))/0x1+parseInt(_0x5ef835(0x126))/0x2*(-parseInt(_0x5ef835(0x12b))/0x3)+-parseInt(_0x5ef835(0x144))/0x4+parseInt(_0x5ef835(0x130))/0x5*(parseInt(_0x5ef835(0x134))/0x6)+parseInt(_0x5ef835(0x12a))/0x7*(-parseInt(_0x5ef835(0x140))/0x8)+-parseInt(_0x5ef835(0x14a))/0x9*(-parseInt(_0x5ef835(0x124))/0xa)+-parseInt(_0x5ef835(0x136))/0xb*(parseInt(_0x5ef835(0x121))/0xc);if(_0x6a9255===_0x2314a9)break;else _0x57ce97['push'](_0x57ce97['shift']());}catch(_0x1b6f6a){_0x57ce97['push'](_0x57ce97['shift']());}}}(a130_0x1547,0xcd311));function a130_0x1547(){const _0x2c4665=['110869eveYAO','hasOwn','message','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','menu-sync','trim','parse','--params.','dryRun','No\x20local\x20pages\x20matched\x20paths:\x20','12341928rVtZhq','join','isArray','has','1680164BbOZYb','path','CSS\x20URL\x20is\x20unreachable:\x20','cssUrl','\x0a\x20\x20Available\x20local\x20paths:\x20','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','9sDGcZi','label','get','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','Start\x20non-interactive\x20menu\x20sync','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Invalid\x20--params\x20JSON.','procode','filter','field','cwd','60iuRLqm','JS\x20URL\x20is\x20unreachable:\x20','map','15909050ctcdHK','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','1003736mWsOXF','1558743diRVKf','import',':\x20expected\x20a\x20non-empty\x20string.','7Kcfadx','3zHpsGn','Invalid\x20--params\x20fields:\x20','jsUrl','push','string','5ODEkZc','info','length','object','1235172ZdFBVo','Invalid\x20--params.'];a130_0x1547=function(){return _0x2c4665;};return a130_0x1547();}function a130_0x1620(_0xa00fc5,_0x4052a3){_0xa00fc5=_0xa00fc5-0x11b;const _0x1547fc=a130_0x1547();let _0x16202b=_0x1547fc[_0xa00fc5];return _0x16202b;}import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set(['jsUrl','cssUrl']);function validateParams(_0x3d2692){const _0x496ae8=a130_0x1620,_0x77c17f=[];return _0x3d2692[_0x496ae8(0x12d)]&&!isValidJsHttpsUrl(_0x3d2692['jsUrl'])&&_0x77c17f[_0x496ae8(0x12e)]({'field':_0x496ae8(0x12d),'message':_0x496ae8(0x11b)}),_0x3d2692['cssUrl']&&!isValidCssHttpsUrl(_0x3d2692[_0x496ae8(0x147)])&&_0x77c17f[_0x496ae8(0x12e)]({'field':_0x496ae8(0x147),'message':_0x496ae8(0x139)}),_0x77c17f;}export async function runMenuSyncCore(_0x11da61,_0x4884bb,_0x2bc497=[],_0x167d6f,_0x4d23ad={}){const _0x7c0c6d=a130_0x1620,_0x2f1c8d=parseMenuSyncParams(_0x167d6f),_0x57b750=[...new Set(_0x2bc497[_0x7c0c6d(0x123)](_0x817e4e=>_0x817e4e[_0x7c0c6d(0x13b)]())[_0x7c0c6d(0x11e)](Boolean))],_0xa5720b=_0x2f1c8d['jsUrl'],_0x54b105=_0x2f1c8d[_0x7c0c6d(0x147)],_0x562f5e=[];if(_0xa5720b)_0x562f5e[_0x7c0c6d(0x12e)](_0xa5720b);if(_0x54b105)_0x562f5e['push'](_0x54b105);const _0x8bb358=validateParams(_0x2f1c8d);if(_0x8bb358['length']>0x0){const _0x229ba5=_0x8bb358['map'](_0x7654d6=>_0x7c0c6d(0x13d)+_0x7654d6[_0x7c0c6d(0x11f)]+':\x20'+_0x7654d6[_0x7c0c6d(0x138)])[_0x7c0c6d(0x141)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x229ba5);}logger['setLogPath'](process[_0x7c0c6d(0x120)]()),logger[_0x7c0c6d(0x131)](_0x7c0c6d(0x13a),_0x7c0c6d(0x14e),{'appCode':_0x11da61,'selectedCount':_0x57b750['length'],'jsUrl':_0xa5720b,'cssUrl':_0x54b105});if(_0xa5720b){const _0xc39727=await isUrlReachable(_0xa5720b);if(!_0xc39727)throw new Error(_0x7c0c6d(0x122)+_0xa5720b);}if(_0x54b105){const _0x2b7fe0=await isUrlReachable(_0x54b105);if(!_0x2b7fe0)throw new Error(_0x7c0c6d(0x146)+_0x54b105);}const _0x17b2af=getLocalPages();if(_0x17b2af['length']===0x0){if(_0x57b750[_0x7c0c6d(0x132)]>0x0)throw new Error(_0x7c0c6d(0x13f)+_0x57b750['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x4d23ad[_0x7c0c6d(0x13e)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x3fa34a=await getOnlineMenuList(_0x11da61,_0x4884bb),_0x27a932=new Set(_0x3fa34a[_0x7c0c6d(0x123)](_0x4f0831=>_0x4f0831[_0x7c0c6d(0x145)]));let _0x556d49;if(_0x57b750['length']>0x0){const _0x3633d2=new Map(_0x17b2af['map'](_0x3f18bb=>[_0x3f18bb['path'],_0x3f18bb])),_0x3e4d91=_0x57b750[_0x7c0c6d(0x11e)](_0x45dda6=>!_0x3633d2['has'](_0x45dda6));if(_0x3e4d91[_0x7c0c6d(0x132)]>0x0){const _0x6360e4=_0x17b2af[_0x7c0c6d(0x123)](_0x25489c=>_0x25489c[_0x7c0c6d(0x145)])[_0x7c0c6d(0x141)](',\x20');throw new Error(_0x7c0c6d(0x13f)+_0x3e4d91[_0x7c0c6d(0x141)](',\x20')+_0x7c0c6d(0x148)+_0x6360e4);}const _0xe7ef1c=_0x57b750[_0x7c0c6d(0x11e)](_0x5775e5=>_0x27a932[_0x7c0c6d(0x143)](_0x5775e5));if(_0xe7ef1c[_0x7c0c6d(0x132)]>0x0)throw new Error(_0x7c0c6d(0x149)+_0xe7ef1c['join'](',\x20'));_0x556d49=_0x57b750[_0x7c0c6d(0x123)](_0x2604d6=>_0x3633d2[_0x7c0c6d(0x14c)](_0x2604d6));}else _0x556d49=_0x17b2af[_0x7c0c6d(0x11e)](_0x11127f=>!_0x27a932[_0x7c0c6d(0x143)](_0x11127f['path']));if(_0x556d49[_0x7c0c6d(0x132)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x4d23ad['dryRun']===!![],'targetPages':[],'plannedMenus':[]};const _0x1bd727=_0x556d49['map'](_0x34a9ac=>({'type':_0x7c0c6d(0x11d),'path':_0x34a9ac['path'],'label':_0x34a9ac[_0x7c0c6d(0x14b)],'loadScriptMode':_0x7c0c6d(0x128),'resources':[..._0x562f5e]}));if(_0x4d23ad[_0x7c0c6d(0x13e)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x556d49,'plannedMenus':_0x1bd727};const _0x2b9fd0=await createMenus(_0x11da61,_0x4884bb,_0x556d49,_0x562f5e[_0x7c0c6d(0x132)]>0x0?_0x562f5e:undefined);return logger[_0x7c0c6d(0x131)]('menu-sync','Menu\x20sync\x20completed',{'count':_0x556d49[_0x7c0c6d(0x132)],'resources':_0x562f5e}),{'created':_0x2b9fd0[_0x7c0c6d(0x132)],'skipped':![],'dryRun':![],'targetPages':_0x556d49,'plannedMenus':_0x1bd727,'menus':_0x2b9fd0};}export function parseMenuSyncParams(_0x2285ab){const _0x24bd18=a130_0x1620;if(!_0x2285ab||typeof _0x2285ab!==_0x24bd18(0x12f))return{};let _0x174ce2;try{_0x174ce2=JSON[_0x24bd18(0x13c)](_0x2285ab);}catch{throw new Error(_0x24bd18(0x11c));}if(typeof _0x174ce2!==_0x24bd18(0x133)||_0x174ce2===null||Array[_0x24bd18(0x142)](_0x174ce2))throw new Error(_0x24bd18(0x14d));const _0x566e2d=_0x174ce2;if(Object[_0x24bd18(0x137)](_0x566e2d,'pages'))throw new Error(_0x24bd18(0x125));const _0x469b51=Object['keys'](_0x566e2d)[_0x24bd18(0x11e)](_0x3ddc31=>!MENU_SYNC_PARAM_KEYS[_0x24bd18(0x143)](_0x3ddc31));if(_0x469b51[_0x24bd18(0x132)]>0x0)throw new Error(_0x24bd18(0x12c)+_0x469b51[_0x24bd18(0x141)](',\x20')+'.');for(const _0x27669f of MENU_SYNC_PARAM_KEYS){const _0x41d772=_0x566e2d[_0x27669f];if(_0x41d772!==undefined&&(typeof _0x41d772!=='string'||_0x41d772[_0x24bd18(0x13b)]()===''))throw new Error(_0x24bd18(0x135)+_0x27669f+_0x24bd18(0x129));}return{'jsUrl':typeof _0x566e2d[_0x24bd18(0x12d)]==='string'?_0x566e2d[_0x24bd18(0x12d)][_0x24bd18(0x13b)]():undefined,'cssUrl':typeof _0x566e2d[_0x24bd18(0x147)]===_0x24bd18(0x12f)?_0x566e2d['cssUrl'][_0x24bd18(0x13b)]():undefined};}
1
+ function a130_0x506a(){const _0x5164eb=['49ScguzB','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','No\x20local\x20pages\x20matched\x20paths:\x20','Invalid\x20--params\x20fields:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','dryRun','Menu\x20sync\x20completed','setLogPath','5777973TTrycZ','191560ZZKYIm','path','filter','2590662mJIFPw','jsUrl','menu-sync','513624bWdBtZ','keys','length','get','join','map','hasOwn','\x0a\x20\x20Available\x20local\x20paths:\x20','84143IgXIgv','push','info','cssUrl',':\x20expected\x20a\x20non-empty\x20string.','label','Invalid\x20--params\x20JSON.','isArray','1602954WlrxNJ','Invalid\x20--params:\x20','Start\x20non-interactive\x20menu\x20sync','trim','string','has','10vzxZjJ','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','186926TBuGtY','object','5aITiyA','--params.','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','parse','Invalid\x20--params.'];a130_0x506a=function(){return _0x5164eb;};return a130_0x506a();}const a130_0x278124=a130_0x4fc4;(function(_0x588656,_0xbd3f8e){const _0x1589b8=a130_0x4fc4,_0x4d3936=_0x588656();while(!![]){try{const _0x5a3c9d=parseInt(_0x1589b8(0xbc))/0x1+parseInt(_0x1589b8(0x9d))/0x2+parseInt(_0x1589b8(0xb1))/0x3+-parseInt(_0x1589b8(0xae))/0x4+-parseInt(_0x1589b8(0x9f))/0x5*(parseInt(_0x1589b8(0x95))/0x6)+parseInt(_0x1589b8(0xa4))/0x7*(parseInt(_0x1589b8(0xb4))/0x8)+-parseInt(_0x1589b8(0xad))/0x9*(parseInt(_0x1589b8(0x9b))/0xa);if(_0x5a3c9d===_0xbd3f8e)break;else _0x4d3936['push'](_0x4d3936['shift']());}catch(_0x4397ff){_0x4d3936['push'](_0x4d3936['shift']());}}}(a130_0x506a,0x8241f));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a130_0x4fc4(_0x526b19,_0x35bdf8){_0x526b19=_0x526b19-0x8e;const _0x506a0c=a130_0x506a();let _0x4fc475=_0x506a0c[_0x526b19];return _0x4fc475;}const MENU_SYNC_PARAM_KEYS=new Set([a130_0x278124(0xb2),a130_0x278124(0x90)]);function validateParams(_0x5ed4b9){const _0x516b82=a130_0x278124,_0x2292a8=[];return _0x5ed4b9[_0x516b82(0xb2)]&&!isValidJsHttpsUrl(_0x5ed4b9[_0x516b82(0xb2)])&&_0x2292a8[_0x516b82(0x8e)]({'field':_0x516b82(0xb2),'message':_0x516b82(0xa1)}),_0x5ed4b9['cssUrl']&&!isValidCssHttpsUrl(_0x5ed4b9[_0x516b82(0x90)])&&_0x2292a8[_0x516b82(0x8e)]({'field':'cssUrl','message':_0x516b82(0xa8)}),_0x2292a8;}export async function runMenuSyncCore(_0x38d8e5,_0x3206e9,_0x23909e=[],_0x48932f,_0x1f62e1={}){const _0x35d049=a130_0x278124,_0x229069=parseMenuSyncParams(_0x48932f),_0x47cd31=[...new Set(_0x23909e[_0x35d049(0xb9)](_0x2f732c=>_0x2f732c[_0x35d049(0x98)]())[_0x35d049(0xb0)](Boolean))],_0x35fd5e=_0x229069['jsUrl'],_0x246ec9=_0x229069[_0x35d049(0x90)],_0x1793fb=[];if(_0x35fd5e)_0x1793fb[_0x35d049(0x8e)](_0x35fd5e);if(_0x246ec9)_0x1793fb[_0x35d049(0x8e)](_0x246ec9);const _0x1d1331=validateParams(_0x229069);if(_0x1d1331[_0x35d049(0xb6)]>0x0){const _0x4eaa8c=_0x1d1331[_0x35d049(0xb9)](_0x2dbd57=>_0x35d049(0xa0)+_0x2dbd57['field']+':\x20'+_0x2dbd57['message'])['join'](';\x20');throw new Error(_0x35d049(0x96)+_0x4eaa8c);}logger[_0x35d049(0xac)](process['cwd']()),logger[_0x35d049(0x8f)](_0x35d049(0xb3),_0x35d049(0x97),{'appCode':_0x38d8e5,'selectedCount':_0x47cd31['length'],'jsUrl':_0x35fd5e,'cssUrl':_0x246ec9});if(_0x35fd5e){const _0x5836f6=await isUrlReachable(_0x35fd5e);if(!_0x5836f6)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x35fd5e);}if(_0x246ec9){const _0x3217ac=await isUrlReachable(_0x246ec9);if(!_0x3217ac)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x246ec9);}const _0x319d6e=getLocalPages();if(_0x319d6e[_0x35d049(0xb6)]===0x0){if(_0x47cd31[_0x35d049(0xb6)]>0x0)throw new Error(_0x35d049(0xa6)+_0x47cd31[_0x35d049(0xb8)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x1f62e1['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x3a2eb0=await getOnlineMenuList(_0x38d8e5,_0x3206e9),_0x432b7d=new Set(_0x3a2eb0[_0x35d049(0xb9)](_0x3e020c=>_0x3e020c[_0x35d049(0xaf)]));let _0x1e7368;if(_0x47cd31[_0x35d049(0xb6)]>0x0){const _0x408a0d=new Map(_0x319d6e[_0x35d049(0xb9)](_0x4db925=>[_0x4db925['path'],_0x4db925])),_0x12ff52=_0x47cd31[_0x35d049(0xb0)](_0x3070bc=>!_0x408a0d[_0x35d049(0x9a)](_0x3070bc));if(_0x12ff52[_0x35d049(0xb6)]>0x0){const _0x4c7f64=_0x319d6e[_0x35d049(0xb9)](_0x312a73=>_0x312a73['path'])['join'](',\x20');throw new Error(_0x35d049(0xa6)+_0x12ff52['join'](',\x20')+_0x35d049(0xbb)+_0x4c7f64);}const _0x5e120b=_0x47cd31['filter'](_0x4fc964=>_0x432b7d[_0x35d049(0x9a)](_0x4fc964));if(_0x5e120b[_0x35d049(0xb6)]>0x0)throw new Error(_0x35d049(0xa9)+_0x5e120b[_0x35d049(0xb8)](',\x20'));_0x1e7368=_0x47cd31[_0x35d049(0xb9)](_0x59db6f=>_0x408a0d[_0x35d049(0xb7)](_0x59db6f));}else _0x1e7368=_0x319d6e[_0x35d049(0xb0)](_0x2499f0=>!_0x432b7d['has'](_0x2499f0[_0x35d049(0xaf)]));if(_0x1e7368[_0x35d049(0xb6)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x1f62e1['dryRun']===!![],'targetPages':[],'plannedMenus':[]};const _0x26235e=_0x1e7368[_0x35d049(0xb9)](_0x41f4bb=>({'type':'procode','path':_0x41f4bb[_0x35d049(0xaf)],'label':_0x41f4bb[_0x35d049(0x92)],'loadScriptMode':'import','resources':[..._0x1793fb]}));if(_0x1f62e1[_0x35d049(0xaa)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x1e7368,'plannedMenus':_0x26235e};const _0xfb3394=await createMenus(_0x38d8e5,_0x3206e9,_0x1e7368,_0x1793fb[_0x35d049(0xb6)]>0x0?_0x1793fb:undefined);return logger['info'](_0x35d049(0xb3),_0x35d049(0xab),{'count':_0x1e7368[_0x35d049(0xb6)],'resources':_0x1793fb}),{'created':_0xfb3394['length'],'skipped':![],'dryRun':![],'targetPages':_0x1e7368,'plannedMenus':_0x26235e,'menus':_0xfb3394};}export function parseMenuSyncParams(_0x3d4635){const _0x1b7af4=a130_0x278124;if(!_0x3d4635||typeof _0x3d4635!==_0x1b7af4(0x99))return{};let _0x435066;try{_0x435066=JSON[_0x1b7af4(0xa2)](_0x3d4635);}catch{throw new Error(_0x1b7af4(0x93));}if(typeof _0x435066!==_0x1b7af4(0x9e)||_0x435066===null||Array[_0x1b7af4(0x94)](_0x435066))throw new Error(_0x1b7af4(0x9c));const _0x1bcc3e=_0x435066;if(Object[_0x1b7af4(0xba)](_0x1bcc3e,'pages'))throw new Error(_0x1b7af4(0xa5));const _0x281e2a=Object[_0x1b7af4(0xb5)](_0x1bcc3e)[_0x1b7af4(0xb0)](_0x304c89=>!MENU_SYNC_PARAM_KEYS['has'](_0x304c89));if(_0x281e2a['length']>0x0)throw new Error(_0x1b7af4(0xa7)+_0x281e2a[_0x1b7af4(0xb8)](',\x20')+'.');for(const _0x587872 of MENU_SYNC_PARAM_KEYS){const _0x13b437=_0x1bcc3e[_0x587872];if(_0x13b437!==undefined&&(typeof _0x13b437!==_0x1b7af4(0x99)||_0x13b437[_0x1b7af4(0x98)]()===''))throw new Error(_0x1b7af4(0xa3)+_0x587872+_0x1b7af4(0x91));}return{'jsUrl':typeof _0x1bcc3e[_0x1b7af4(0xb2)]===_0x1b7af4(0x99)?_0x1bcc3e[_0x1b7af4(0xb2)][_0x1b7af4(0x98)]():undefined,'cssUrl':typeof _0x1bcc3e[_0x1b7af4(0x90)]==='string'?_0x1bcc3e[_0x1b7af4(0x90)][_0x1b7af4(0x98)]():undefined};}
@@ -1 +1 @@
1
- function a132_0xdd16(_0x4bcf68,_0xec0baf){_0x4bcf68=_0x4bcf68-0xbd;const _0x5e19f1=a132_0x5e19();let _0xdd16e8=_0x5e19f1[_0x4bcf68];return _0xdd16e8;}function a132_0x5e19(){const _0x187c1e=['length','trim','string','7964862WCfRHC','120627cnTZJo','path','loadScriptMode','patch','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','584dotDjk','fulfilled','extend','force','\x22\x20(','isArray','map','118678TuDTwv','resources','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','selection','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','menu\x20asset-update\x20cannot\x20patch\x20','1438356bJEtFk','Start\x20non-interactive\x20menu\x20asset\x20update','all','paths','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','some','object','status','endsWith','has','after','setLogPath','menuIds','Invalid\x20--params:\x20','cssUrl','.css','250zIkqvH','toLowerCase','join','unshift','1773240BFWVNb','filter','Invalid\x20--mode:\x20','JS\x20URL\x20is\x20unreachable:\x20','dryRun','push','cwd','3ahnxUg','field','7teCCFJ','info','value','22385eYLVCT','mode','menu-asset-update','9630577PFsjDD','allSettled',').\x20','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','label','jsUrl','CSS\x20URL\x20is\x20unreachable:\x20'];a132_0x5e19=function(){return _0x187c1e;};return a132_0x5e19();}(function(_0x2922b1,_0x11130a){const _0x45704d=a132_0xdd16,_0x170dd8=_0x2922b1();while(!![]){try{const _0x4592d0=-parseInt(_0x45704d(0xe7))/0x1*(-parseInt(_0x45704d(0xc6))/0x2)+-parseInt(_0x45704d(0xcc))/0x3+parseInt(_0x45704d(0xbf))/0x4*(parseInt(_0x45704d(0xec))/0x5)+-parseInt(_0x45704d(0xf9))/0x6*(-parseInt(_0x45704d(0xe9))/0x7)+parseInt(_0x45704d(0xe0))/0x8+-parseInt(_0x45704d(0xfa))/0x9*(parseInt(_0x45704d(0xdc))/0xa)+-parseInt(_0x45704d(0xef))/0xb;if(_0x4592d0===_0x11130a)break;else _0x170dd8['push'](_0x170dd8['shift']());}catch(_0x2dbfd7){_0x170dd8['push'](_0x170dd8['shift']());}}}(a132_0x5e19,0xa8a45));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(_0x58a7b3){const _0x2b7f9a=a132_0xdd16,_0x189679=[];return _0x58a7b3['jsUrl']&&!isValidJsHttpsUrl(_0x58a7b3[_0x2b7f9a(0xf4)])&&_0x189679[_0x2b7f9a(0xe5)]({'field':'jsUrl','message':_0x2b7f9a(0xfe)}),_0x58a7b3[_0x2b7f9a(0xda)]&&!isValidCssHttpsUrl(_0x58a7b3['cssUrl'])&&_0x189679[_0x2b7f9a(0xe5)]({'field':_0x2b7f9a(0xda),'message':_0x2b7f9a(0xbd)}),_0x189679;}export async function runMenuUpdateCore(_0x3760a1,_0x10b4f6,_0x4ea96e,_0x28abf0={}){const _0x3cc1c4=a132_0xdd16,_0x3d99e8=parseUpdateParamsFlag(_0x4ea96e),_0x3e0e6d=normalizeMode(_0x28abf0[_0x3cc1c4(0xed)]);validateSelection(_0x28abf0['selection']);const _0x37cec7=[];if(_0x3d99e8['jsUrl'])_0x37cec7[_0x3cc1c4(0xe5)](_0x3d99e8['jsUrl']);if(_0x3d99e8[_0x3cc1c4(0xda)])_0x37cec7[_0x3cc1c4(0xe5)](_0x3d99e8[_0x3cc1c4(0xda)]);const _0xd801e6=validateParams(_0x3d99e8);if(_0xd801e6['length']>0x0){const _0x28df65=_0xd801e6['map'](_0x4f171b=>'--params.'+_0x4f171b[_0x3cc1c4(0xe8)]+':\x20'+_0x4f171b['message'])[_0x3cc1c4(0xde)](';\x20');throw new Error(_0x3cc1c4(0xd9)+_0x28df65);}if(_0x37cec7['length']===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x3cc1c4(0xf2));logger[_0x3cc1c4(0xd7)](process[_0x3cc1c4(0xe6)]()),logger[_0x3cc1c4(0xea)](_0x3cc1c4(0xee),_0x3cc1c4(0xcd),{'appCode':_0x3760a1,'jsUrl':_0x3d99e8[_0x3cc1c4(0xf4)],'cssUrl':_0x3d99e8[_0x3cc1c4(0xda)],'mode':_0x3e0e6d,'dryRun':_0x28abf0[_0x3cc1c4(0xe4)]===!![]});if(_0x3d99e8['jsUrl']){const _0xaa7cc8=await isUrlReachable(_0x3d99e8[_0x3cc1c4(0xf4)]);if(!_0xaa7cc8)throw new Error(_0x3cc1c4(0xe3)+_0x3d99e8[_0x3cc1c4(0xf4)]);}if(_0x3d99e8['cssUrl']){const _0x4cb8bd=await isUrlReachable(_0x3d99e8['cssUrl']);if(!_0x4cb8bd)throw new Error(_0x3cc1c4(0xf5)+_0x3d99e8['cssUrl']);}const _0x3a1ed7=await getOnlineMenuList(_0x3760a1,_0x10b4f6),_0x78fa84=_0x3a1ed7[_0x3cc1c4(0xe1)](_0x2424dc=>_0x2424dc[_0x3cc1c4(0xc7)][_0x3cc1c4(0xf6)]>0x0),_0xd84b6d=selectMenusForUpdate(_0x78fa84,_0x28abf0[_0x3cc1c4(0xc9)]);if(_0xd84b6d['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x28abf0[_0x3cc1c4(0xe4)]===!![]};const _0x69e693=_0xd84b6d[_0x3cc1c4(0xc5)](_0x27a8d0=>buildMenuUpdateDiff(_0x27a8d0,_0x3d99e8,_0x3e0e6d,_0x28abf0[_0x3cc1c4(0xc2)]===!![],_0x28abf0['loadScriptMode']));if(_0x28abf0['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x69e693};const _0x4a0329=await Promise[_0x3cc1c4(0xf0)](_0xd84b6d[_0x3cc1c4(0xc5)]((_0x4d7f1c,_0xa25ccc)=>updateMenuCdnUrl(_0x3760a1,_0x10b4f6,{'id':_0x4d7f1c['id'],'label':_0x4d7f1c[_0x3cc1c4(0xf3)],'path':_0x4d7f1c[_0x3cc1c4(0xfb)],'resources':_0x69e693[_0xa25ccc][_0x3cc1c4(0xd6)]['resources'],'extend':_0x4d7f1c[_0x3cc1c4(0xc1)]??null,'loadScriptMode':_0x28abf0['loadScriptMode']}))),_0x2105dc=_0x4a0329[_0x3cc1c4(0xe1)](_0x4244f5=>_0x4244f5[_0x3cc1c4(0xd3)]===_0x3cc1c4(0xc0))[_0x3cc1c4(0xc5)](_0x979f5a=>_0x979f5a[_0x3cc1c4(0xeb)]),_0x959064=_0x4a0329[_0x3cc1c4(0xe1)](_0x452895=>_0x452895[_0x3cc1c4(0xd3)]==='rejected')[_0x3cc1c4(0xf6)];return logger[_0x3cc1c4(0xea)](_0x3cc1c4(0xee),'Menu\x20asset\x20update\x20completed',{'count':_0xd84b6d[_0x3cc1c4(0xf6)],'resources':_0x37cec7}),{'updated':_0x2105dc[_0x3cc1c4(0xf6)],'failed':_0x959064,'skipped':![],'menus':_0x2105dc};}function validateSelection(_0x37fc62){const _0x432a3f=a132_0xdd16;if(!_0x37fc62)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x37fc62['all']&&(_0x37fc62['menuIds'][_0x432a3f(0xf6)]>0x0||_0x37fc62[_0x432a3f(0xcf)][_0x432a3f(0xf6)]>0x0))throw new Error(_0x432a3f(0xc8));if(!_0x37fc62['all']&&_0x37fc62['menuIds'][_0x432a3f(0xf6)]===0x0&&_0x37fc62[_0x432a3f(0xcf)][_0x432a3f(0xf6)]===0x0)throw new Error(_0x432a3f(0xff));}export function selectMenusForUpdate(_0x25a82b,_0xde221b){const _0x2d3913=a132_0xdd16;validateSelection(_0xde221b);if(_0xde221b[_0x2d3913(0xce)])return _0x25a82b;const _0x458d86=new Set(_0x25a82b[_0x2d3913(0xc5)](_0x2a2979=>_0x2a2979['id'])),_0x24c102=new Set(_0x25a82b['map'](_0x3b82bb=>_0x3b82bb['path'])),_0x28aeca=_0xde221b[_0x2d3913(0xd8)][_0x2d3913(0xe1)](_0x4ddc76=>!_0x458d86['has'](_0x4ddc76)),_0x4bd4b2=_0xde221b['paths'][_0x2d3913(0xe1)](_0x56770d=>!_0x24c102[_0x2d3913(0xd5)](_0x56770d));if(_0x28aeca['length']>0x0||_0x4bd4b2[_0x2d3913(0xf6)]>0x0){const _0x233b3c=[..._0x28aeca[_0x2d3913(0xc5)](_0x68d8fc=>String(_0x68d8fc)),..._0x4bd4b2][_0x2d3913(0xde)](',\x20');throw new Error(_0x2d3913(0xbe)+_0x233b3c);}const _0x3fc423=new Set(_0xde221b[_0x2d3913(0xd8)]),_0x12e3fd=new Set(_0xde221b['paths']);return _0x25a82b[_0x2d3913(0xe1)](_0x47fbc1=>_0x3fc423[_0x2d3913(0xd5)](_0x47fbc1['id'])||_0x12e3fd[_0x2d3913(0xd5)](_0x47fbc1[_0x2d3913(0xfb)]));}function normalizeMode(_0x3b7cdd){const _0x18d165=a132_0xdd16;if(!_0x3b7cdd)return _0x18d165(0xfd);if(_0x3b7cdd==='replace'||_0x3b7cdd===_0x18d165(0xfd))return _0x3b7cdd;throw new Error(_0x18d165(0xe2)+_0x3b7cdd+'.\x20Allowed\x20values:\x20replace,\x20patch');}function buildMenuUpdateDiff(_0x41dc5e,_0x47d555,_0x327194,_0x516d7a,_0x3fbb2a){const _0x188631=a132_0xdd16,_0x37ecf5=[..._0x41dc5e[_0x188631(0xc7)]];_0x327194===_0x188631(0xfd)&&assertUnambiguousPatchResources(_0x41dc5e,_0x37ecf5,_0x47d555);const _0x397e0e=_0x327194===_0x188631(0xfd)?patchResources(_0x37ecf5,_0x47d555):replaceResources(_0x47d555),_0x3822b0=[],_0x23aaac=_0x37ecf5[_0x188631(0xd1)](isJsResource),_0x1a2fe8=_0x397e0e['some'](isJsResource);if(_0x23aaac&&!_0x1a2fe8){const _0x14a0c3=_0x188631(0xca)+_0x41dc5e[_0x188631(0xf3)]+'\x22\x20('+_0x41dc5e[_0x188631(0xfb)]+_0x188631(0xf1)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x516d7a)throw new Error(_0x14a0c3);_0x3822b0[_0x188631(0xe5)](_0x14a0c3);}const _0x50bef1=_0x37ecf5[_0x188631(0xd1)](isCssResource),_0xf2023c=_0x397e0e[_0x188631(0xd1)](isCssResource);_0x50bef1&&!_0xf2023c&&_0x3822b0[_0x188631(0xe5)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x41dc5e['label']+_0x188631(0xc3)+_0x41dc5e[_0x188631(0xfb)]+').');const _0x17443e=typeof _0x41dc5e[_0x188631(0xc1)]?.[_0x188631(0xfc)]===_0x188631(0xf8)?_0x41dc5e[_0x188631(0xc1)][_0x188631(0xfc)]:null,_0x3fb414=_0x3fbb2a?{'loadScriptMode':_0x17443e}:{},_0xc97ca9=_0x3fbb2a?{'loadScriptMode':_0x3fbb2a}:{};return{'id':_0x41dc5e['id'],'label':_0x41dc5e['label'],'path':_0x41dc5e['path'],'mode':_0x327194,'before':{'resources':_0x37ecf5,..._0x3fb414},'after':{'resources':_0x397e0e,..._0xc97ca9},'warnings':_0x3822b0};}function replaceResources(_0x526045){const _0x1f90ed=a132_0xdd16;return[_0x526045['jsUrl'],_0x526045['cssUrl']][_0x1f90ed(0xe1)](_0x2cdbda=>!!_0x2cdbda);}function assertUnambiguousPatchResources(_0x4106e2,_0x1a60bd,_0x5d4abc){const _0x6cb55b=a132_0xdd16,_0x1166c8=_0x1a60bd[_0x6cb55b(0xe1)](isJsResource)[_0x6cb55b(0xf6)];if(_0x5d4abc[_0x6cb55b(0xf4)]&&_0x1166c8>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x1166c8+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x4106e2['label']+_0x6cb55b(0xc3)+_0x4106e2[_0x6cb55b(0xfb)]+')\x20'+_0x6cb55b(0xd0));const _0x26f3e3=_0x1a60bd[_0x6cb55b(0xe1)](isCssResource)['length'];if(_0x5d4abc['cssUrl']&&_0x26f3e3>0x1)throw new Error(_0x6cb55b(0xcb)+_0x26f3e3+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x4106e2[_0x6cb55b(0xf3)]+'\x22\x20('+_0x4106e2[_0x6cb55b(0xfb)]+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function patchResources(_0x3af289,_0xc32684){const _0x3e19fb=a132_0xdd16;let _0x3f946c=![],_0x3d96ba=![];const _0x5cc2a1=[];for(const _0x2aeef4 of _0x3af289){if(isJsResource(_0x2aeef4)){if(_0xc32684['jsUrl']&&!_0x3f946c)_0x5cc2a1[_0x3e19fb(0xe5)](_0xc32684['jsUrl']),_0x3f946c=!![];else!_0xc32684[_0x3e19fb(0xf4)]&&_0x5cc2a1[_0x3e19fb(0xe5)](_0x2aeef4);continue;}if(isCssResource(_0x2aeef4)){if(_0xc32684[_0x3e19fb(0xda)]&&!_0x3d96ba)_0x5cc2a1[_0x3e19fb(0xe5)](_0xc32684['cssUrl']),_0x3d96ba=!![];else!_0xc32684['cssUrl']&&_0x5cc2a1[_0x3e19fb(0xe5)](_0x2aeef4);continue;}_0x5cc2a1[_0x3e19fb(0xe5)](_0x2aeef4);}return _0xc32684[_0x3e19fb(0xf4)]&&!_0x3f946c&&_0x5cc2a1[_0x3e19fb(0xdf)](_0xc32684[_0x3e19fb(0xf4)]),_0xc32684[_0x3e19fb(0xda)]&&!_0x3d96ba&&_0x5cc2a1['push'](_0xc32684[_0x3e19fb(0xda)]),_0x5cc2a1;}function isJsResource(_0x16bcb0){const _0x2aa4fb=a132_0xdd16;return stripQuery(_0x16bcb0)[_0x2aa4fb(0xdd)]()[_0x2aa4fb(0xd4)]('.js');}function isCssResource(_0x271b5f){const _0x34f596=a132_0xdd16;return stripQuery(_0x271b5f)[_0x34f596(0xdd)]()[_0x34f596(0xd4)](_0x34f596(0xdb));}function stripQuery(_0x4d59ed){return _0x4d59ed['split']('?')[0x0]??_0x4d59ed;}function parseUpdateParamsFlag(_0x4a29e6){const _0x5609bb=a132_0xdd16;if(!_0x4a29e6||typeof _0x4a29e6!==_0x5609bb(0xf8))return{};try{const _0x3caaaa=JSON['parse'](_0x4a29e6);if(typeof _0x3caaaa!==_0x5609bb(0xd2)||_0x3caaaa===null||Array[_0x5609bb(0xc4)](_0x3caaaa))return{};return{'jsUrl':typeof _0x3caaaa[_0x5609bb(0xf4)]===_0x5609bb(0xf8)?_0x3caaaa[_0x5609bb(0xf4)]['trim']():undefined,'cssUrl':typeof _0x3caaaa[_0x5609bb(0xda)]==='string'?_0x3caaaa['cssUrl'][_0x5609bb(0xf7)]():undefined};}catch{return{};}}
1
+ (function(_0x302642,_0x3f13ef){const _0x110609=a132_0x41e1,_0x2df9ed=_0x302642();while(!![]){try{const _0x571d10=-parseInt(_0x110609(0x159))/0x1+parseInt(_0x110609(0x153))/0x2*(parseInt(_0x110609(0x168))/0x3)+parseInt(_0x110609(0x14f))/0x4*(-parseInt(_0x110609(0x12a))/0x5)+-parseInt(_0x110609(0x169))/0x6*(parseInt(_0x110609(0x151))/0x7)+parseInt(_0x110609(0x12b))/0x8+-parseInt(_0x110609(0x13d))/0x9*(-parseInt(_0x110609(0x130))/0xa)+-parseInt(_0x110609(0x12f))/0xb;if(_0x571d10===_0x3f13ef)break;else _0x2df9ed['push'](_0x2df9ed['shift']());}catch(_0x51d456){_0x2df9ed['push'](_0x2df9ed['shift']());}}}(a132_0x319b,0x99f4e));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(_0x715869){const _0xb602fa=a132_0x41e1,_0x418e18=[];return _0x715869[_0xb602fa(0x125)]&&!isValidJsHttpsUrl(_0x715869[_0xb602fa(0x125)])&&_0x418e18[_0xb602fa(0x13f)]({'field':_0xb602fa(0x125),'message':_0xb602fa(0x15a)}),_0x715869[_0xb602fa(0x154)]&&!isValidCssHttpsUrl(_0x715869[_0xb602fa(0x154)])&&_0x418e18[_0xb602fa(0x13f)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x418e18;}function a132_0x319b(){const _0x4ca1d8=['445867rKyVvi','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','menuIds','selection','join','.js','\x22\x20(','rejected','field','split','parse','all','replace','Invalid\x20--params:\x20','111gEyUIP','12MPIfSQ','value','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','jsUrl','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','filter','some','82745keHHDs','2714056LYoGhk','object','length','dryRun','5666287UkPuub','1050vKoPIS','label','trim','path','info','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','.\x20Allowed\x20values:\x20replace,\x20patch','toLowerCase','JS\x20URL\x20is\x20unreachable:\x20',').\x20','paths','unshift','fulfilled','87111lTyUIR','patch','push','map','--params.','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','.css','after','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','force','extend','resources','\x20existing\x20CSS\x20resources\x20for\x20\x22','string','has','Invalid\x20--mode:\x20','menu-asset-update','loadScriptMode','28GqAglx','status','1721146utxFrW','mode','45602wonLrb','cssUrl','endsWith','\x20existing\x20JS\x20resources\x20for\x20\x22','message','CSS\x20URL\x20is\x20unreachable:\x20'];a132_0x319b=function(){return _0x4ca1d8;};return a132_0x319b();}export async function runMenuUpdateCore(_0x112b48,_0x58e91d,_0x5a37df,_0x415582={}){const _0x11be5a=a132_0x41e1,_0x237cb5=parseUpdateParamsFlag(_0x5a37df),_0x5b488a=normalizeMode(_0x415582[_0x11be5a(0x152)]);validateSelection(_0x415582['selection']);const _0x387931=[];if(_0x237cb5[_0x11be5a(0x125)])_0x387931[_0x11be5a(0x13f)](_0x237cb5[_0x11be5a(0x125)]);if(_0x237cb5[_0x11be5a(0x154)])_0x387931['push'](_0x237cb5['cssUrl']);const _0xbdecfc=validateParams(_0x237cb5);if(_0xbdecfc[_0x11be5a(0x12d)]>0x0){const _0x2f174a=_0xbdecfc[_0x11be5a(0x140)](_0x12351a=>_0x11be5a(0x141)+_0x12351a[_0x11be5a(0x162)]+':\x20'+_0x12351a[_0x11be5a(0x157)])[_0x11be5a(0x15e)](';\x20');throw new Error(_0x11be5a(0x167)+_0x2f174a);}if(_0x387931[_0x11be5a(0x12d)]===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger['setLogPath'](process['cwd']()),logger['info'](_0x11be5a(0x14d),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x112b48,'jsUrl':_0x237cb5[_0x11be5a(0x125)],'cssUrl':_0x237cb5['cssUrl'],'mode':_0x5b488a,'dryRun':_0x415582[_0x11be5a(0x12e)]===!![]});if(_0x237cb5[_0x11be5a(0x125)]){const _0x528153=await isUrlReachable(_0x237cb5[_0x11be5a(0x125)]);if(!_0x528153)throw new Error(_0x11be5a(0x138)+_0x237cb5[_0x11be5a(0x125)]);}if(_0x237cb5[_0x11be5a(0x154)]){const _0x1aae70=await isUrlReachable(_0x237cb5[_0x11be5a(0x154)]);if(!_0x1aae70)throw new Error(_0x11be5a(0x158)+_0x237cb5[_0x11be5a(0x154)]);}const _0x39195e=await getOnlineMenuList(_0x112b48,_0x58e91d),_0x447dd6=_0x39195e['filter'](_0xaedc09=>_0xaedc09[_0x11be5a(0x148)][_0x11be5a(0x12d)]>0x0),_0x4aa5f5=selectMenusForUpdate(_0x447dd6,_0x415582[_0x11be5a(0x15d)]);if(_0x4aa5f5[_0x11be5a(0x12d)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x415582['dryRun']===!![]};const _0xca8efd=_0x4aa5f5[_0x11be5a(0x140)](_0x2f5bc6=>buildMenuUpdateDiff(_0x2f5bc6,_0x237cb5,_0x5b488a,_0x415582[_0x11be5a(0x146)]===!![],_0x415582[_0x11be5a(0x14e)]));if(_0x415582[_0x11be5a(0x12e)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0xca8efd};const _0x459242=await Promise['allSettled'](_0x4aa5f5[_0x11be5a(0x140)]((_0x411a51,_0x1cc0f3)=>updateMenuCdnUrl(_0x112b48,_0x58e91d,{'id':_0x411a51['id'],'label':_0x411a51[_0x11be5a(0x131)],'path':_0x411a51[_0x11be5a(0x133)],'resources':_0xca8efd[_0x1cc0f3][_0x11be5a(0x144)]['resources'],'extend':_0x411a51[_0x11be5a(0x147)]??null,'loadScriptMode':_0x415582['loadScriptMode']}))),_0x48f7a1=_0x459242[_0x11be5a(0x128)](_0xd6edf3=>_0xd6edf3[_0x11be5a(0x150)]===_0x11be5a(0x13c))[_0x11be5a(0x140)](_0x86568d=>_0x86568d[_0x11be5a(0x16a)]),_0x3f2f21=_0x459242[_0x11be5a(0x128)](_0xaba312=>_0xaba312[_0x11be5a(0x150)]===_0x11be5a(0x161))[_0x11be5a(0x12d)];return logger[_0x11be5a(0x134)]('menu-asset-update','Menu\x20asset\x20update\x20completed',{'count':_0x4aa5f5[_0x11be5a(0x12d)],'resources':_0x387931}),{'updated':_0x48f7a1[_0x11be5a(0x12d)],'failed':_0x3f2f21,'skipped':![],'menus':_0x48f7a1};}function validateSelection(_0x31710d){const _0x2e4656=a132_0x41e1;if(!_0x31710d)throw new Error(_0x2e4656(0x126));if(_0x31710d[_0x2e4656(0x165)]&&(_0x31710d[_0x2e4656(0x15c)]['length']>0x0||_0x31710d[_0x2e4656(0x13a)][_0x2e4656(0x12d)]>0x0))throw new Error(_0x2e4656(0x15b));if(!_0x31710d[_0x2e4656(0x165)]&&_0x31710d[_0x2e4656(0x15c)][_0x2e4656(0x12d)]===0x0&&_0x31710d['paths']['length']===0x0)throw new Error(_0x2e4656(0x126));}export function selectMenusForUpdate(_0x182f8d,_0xf07744){const _0x2b97ba=a132_0x41e1;validateSelection(_0xf07744);if(_0xf07744[_0x2b97ba(0x165)])return _0x182f8d;const _0x3218b5=new Set(_0x182f8d[_0x2b97ba(0x140)](_0x38c892=>_0x38c892['id'])),_0x15ae84=new Set(_0x182f8d[_0x2b97ba(0x140)](_0x42945f=>_0x42945f['path'])),_0x58b22e=_0xf07744[_0x2b97ba(0x15c)][_0x2b97ba(0x128)](_0x47e38d=>!_0x3218b5[_0x2b97ba(0x14b)](_0x47e38d)),_0x1ebfaa=_0xf07744[_0x2b97ba(0x13a)][_0x2b97ba(0x128)](_0x12abc3=>!_0x15ae84[_0x2b97ba(0x14b)](_0x12abc3));if(_0x58b22e['length']>0x0||_0x1ebfaa[_0x2b97ba(0x12d)]>0x0){const _0x116dbe=[..._0x58b22e[_0x2b97ba(0x140)](_0x2ba9eb=>String(_0x2ba9eb)),..._0x1ebfaa][_0x2b97ba(0x15e)](',\x20');throw new Error(_0x2b97ba(0x142)+_0x116dbe);}const _0x367e4e=new Set(_0xf07744[_0x2b97ba(0x15c)]),_0x1dcb13=new Set(_0xf07744['paths']);return _0x182f8d['filter'](_0x37533d=>_0x367e4e[_0x2b97ba(0x14b)](_0x37533d['id'])||_0x1dcb13[_0x2b97ba(0x14b)](_0x37533d[_0x2b97ba(0x133)]));}function normalizeMode(_0x57ca92){const _0x2dd838=a132_0x41e1;if(!_0x57ca92)return _0x2dd838(0x13e);if(_0x57ca92===_0x2dd838(0x166)||_0x57ca92===_0x2dd838(0x13e))return _0x57ca92;throw new Error(_0x2dd838(0x14c)+_0x57ca92+_0x2dd838(0x136));}function buildMenuUpdateDiff(_0x4c71c5,_0x4063dd,_0x1f0c60,_0x578acf,_0xd2c1b8){const _0x5e89a8=a132_0x41e1,_0x2a639b=[..._0x4c71c5[_0x5e89a8(0x148)]];_0x1f0c60===_0x5e89a8(0x13e)&&assertUnambiguousPatchResources(_0x4c71c5,_0x2a639b,_0x4063dd);const _0x438e22=_0x1f0c60===_0x5e89a8(0x13e)?patchResources(_0x2a639b,_0x4063dd):replaceResources(_0x4063dd),_0x4bbf14=[],_0x146090=_0x2a639b['some'](isJsResource),_0x4d877b=_0x438e22[_0x5e89a8(0x129)](isJsResource);if(_0x146090&&!_0x4d877b){const _0xc02b1f=_0x5e89a8(0x135)+_0x4c71c5['label']+_0x5e89a8(0x160)+_0x4c71c5[_0x5e89a8(0x133)]+_0x5e89a8(0x139)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x578acf)throw new Error(_0xc02b1f);_0x4bbf14['push'](_0xc02b1f);}const _0x2f88e8=_0x2a639b[_0x5e89a8(0x129)](isCssResource),_0x26ae3d=_0x438e22[_0x5e89a8(0x129)](isCssResource);_0x2f88e8&&!_0x26ae3d&&_0x4bbf14['push'](_0x5e89a8(0x16b)+_0x4c71c5[_0x5e89a8(0x131)]+_0x5e89a8(0x160)+_0x4c71c5[_0x5e89a8(0x133)]+').');const _0x3cec74=typeof _0x4c71c5[_0x5e89a8(0x147)]?.['loadScriptMode']==='string'?_0x4c71c5[_0x5e89a8(0x147)][_0x5e89a8(0x14e)]:null,_0x4292d0=_0xd2c1b8?{'loadScriptMode':_0x3cec74}:{},_0x23cc81=_0xd2c1b8?{'loadScriptMode':_0xd2c1b8}:{};return{'id':_0x4c71c5['id'],'label':_0x4c71c5['label'],'path':_0x4c71c5[_0x5e89a8(0x133)],'mode':_0x1f0c60,'before':{'resources':_0x2a639b,..._0x4292d0},'after':{'resources':_0x438e22,..._0x23cc81},'warnings':_0x4bbf14};}function a132_0x41e1(_0x2865c4,_0x2397d1){_0x2865c4=_0x2865c4-0x125;const _0x319bf4=a132_0x319b();let _0x41e1d9=_0x319bf4[_0x2865c4];return _0x41e1d9;}function replaceResources(_0x3cb561){const _0x186ebd=a132_0x41e1;return[_0x3cb561['jsUrl'],_0x3cb561[_0x186ebd(0x154)]]['filter'](_0x61758c=>!!_0x61758c);}function assertUnambiguousPatchResources(_0x4d7855,_0x34102b,_0x32c441){const _0x55cd9e=a132_0x41e1,_0x1f03dc=_0x34102b[_0x55cd9e(0x128)](isJsResource)[_0x55cd9e(0x12d)];if(_0x32c441[_0x55cd9e(0x125)]&&_0x1f03dc>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x1f03dc+_0x55cd9e(0x156)+_0x4d7855[_0x55cd9e(0x131)]+_0x55cd9e(0x160)+_0x4d7855[_0x55cd9e(0x133)]+')\x20'+_0x55cd9e(0x127));const _0x3f7e80=_0x34102b[_0x55cd9e(0x128)](isCssResource)[_0x55cd9e(0x12d)];if(_0x32c441[_0x55cd9e(0x154)]&&_0x3f7e80>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x3f7e80+_0x55cd9e(0x149)+_0x4d7855[_0x55cd9e(0x131)]+_0x55cd9e(0x160)+_0x4d7855[_0x55cd9e(0x133)]+')\x20'+_0x55cd9e(0x145));}function patchResources(_0x2c8b54,_0x213ceb){const _0x124f54=a132_0x41e1;let _0x5eb68a=![],_0x248802=![];const _0x2c5b8d=[];for(const _0xe3ce6a of _0x2c8b54){if(isJsResource(_0xe3ce6a)){if(_0x213ceb[_0x124f54(0x125)]&&!_0x5eb68a)_0x2c5b8d[_0x124f54(0x13f)](_0x213ceb[_0x124f54(0x125)]),_0x5eb68a=!![];else!_0x213ceb['jsUrl']&&_0x2c5b8d[_0x124f54(0x13f)](_0xe3ce6a);continue;}if(isCssResource(_0xe3ce6a)){if(_0x213ceb[_0x124f54(0x154)]&&!_0x248802)_0x2c5b8d[_0x124f54(0x13f)](_0x213ceb[_0x124f54(0x154)]),_0x248802=!![];else!_0x213ceb[_0x124f54(0x154)]&&_0x2c5b8d[_0x124f54(0x13f)](_0xe3ce6a);continue;}_0x2c5b8d[_0x124f54(0x13f)](_0xe3ce6a);}return _0x213ceb['jsUrl']&&!_0x5eb68a&&_0x2c5b8d[_0x124f54(0x13b)](_0x213ceb['jsUrl']),_0x213ceb[_0x124f54(0x154)]&&!_0x248802&&_0x2c5b8d[_0x124f54(0x13f)](_0x213ceb['cssUrl']),_0x2c5b8d;}function isJsResource(_0x1451fe){const _0x3f7b1b=a132_0x41e1;return stripQuery(_0x1451fe)[_0x3f7b1b(0x137)]()['endsWith'](_0x3f7b1b(0x15f));}function isCssResource(_0x476749){const _0x5cbb25=a132_0x41e1;return stripQuery(_0x476749)[_0x5cbb25(0x137)]()[_0x5cbb25(0x155)](_0x5cbb25(0x143));}function stripQuery(_0x1054b9){const _0x10bbcd=a132_0x41e1;return _0x1054b9[_0x10bbcd(0x163)]('?')[0x0]??_0x1054b9;}function parseUpdateParamsFlag(_0x5057c3){const _0x1770fc=a132_0x41e1;if(!_0x5057c3||typeof _0x5057c3!=='string')return{};try{const _0x4ba715=JSON[_0x1770fc(0x164)](_0x5057c3);if(typeof _0x4ba715!==_0x1770fc(0x12c)||_0x4ba715===null||Array['isArray'](_0x4ba715))return{};return{'jsUrl':typeof _0x4ba715['jsUrl']==='string'?_0x4ba715[_0x1770fc(0x125)]['trim']():undefined,'cssUrl':typeof _0x4ba715[_0x1770fc(0x154)]===_0x1770fc(0x14a)?_0x4ba715['cssUrl'][_0x1770fc(0x132)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a133_0x118b(_0x2100a4,_0x13f32d){_0x2100a4=_0x2100a4-0xb9;const _0xb48779=a133_0xb487();let _0x118b0c=_0xb48779[_0x2100a4];return _0x118b0c;}function a133_0xb487(){const _0x1d72d0=['3549415LtCgIs','2492384wZwPVV','736048ZfaBdn','120FiBsdO','test','729248vvczws','trim','34870AYyoUN','3141YZwXPh','413fByonV','19138yHStzN','36618bHgoEj'];a133_0xb487=function(){return _0x1d72d0;};return a133_0xb487();}(function(_0x7a9b9d,_0x2e7647){const _0x1e59fa=a133_0x118b,_0x166731=_0x7a9b9d();while(!![]){try{const _0x43e25a=-parseInt(_0x1e59fa(0xbb))/0x1+-parseInt(_0x1e59fa(0xc0))/0x2*(-parseInt(_0x1e59fa(0xb9))/0x3)+-parseInt(_0x1e59fa(0xc4))/0x4+-parseInt(_0x1e59fa(0xc2))/0x5+-parseInt(_0x1e59fa(0xc1))/0x6*(-parseInt(_0x1e59fa(0xbf))/0x7)+parseInt(_0x1e59fa(0xc3))/0x8+parseInt(_0x1e59fa(0xbe))/0x9*(parseInt(_0x1e59fa(0xbd))/0xa);if(_0x43e25a===_0x2e7647)break;else _0x166731['push'](_0x166731['shift']());}catch(_0xe69294){_0x166731['push'](_0x166731['shift']());}}}(a133_0xb487,0x9e40d));export function isValidJsHttpsUrl(_0xf4d90a){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0xf4d90a['trim']());}export function isValidCssHttpsUrl(_0x52e0e9){const _0x1e1587=a133_0x118b;return/^https:\/\/.+\.css(\?.*)?$/[_0x1e1587(0xba)](_0x52e0e9[_0x1e1587(0xbc)]());}export async function isUrlReachable(_0x386097){try{const _0x22fcec=await fetch(_0x386097,{'method':'HEAD'});return _0x22fcec['ok'];}catch{return![];}}
1
+ (function(_0x7a744a,_0x344bc8){const _0xf50d1f=a133_0x3141,_0x19aa01=_0x7a744a();while(!![]){try{const _0x4573a2=parseInt(_0xf50d1f(0xe1))/0x1*(parseInt(_0xf50d1f(0xd9))/0x2)+parseInt(_0xf50d1f(0xdb))/0x3+parseInt(_0xf50d1f(0xdd))/0x4*(parseInt(_0xf50d1f(0xe2))/0x5)+parseInt(_0xf50d1f(0xd7))/0x6+-parseInt(_0xf50d1f(0xd8))/0x7+-parseInt(_0xf50d1f(0xdf))/0x8+parseInt(_0xf50d1f(0xda))/0x9;if(_0x4573a2===_0x344bc8)break;else _0x19aa01['push'](_0x19aa01['shift']());}catch(_0x3df1f3){_0x19aa01['push'](_0x19aa01['shift']());}}}(a133_0x50e0,0xd64d1));export function isValidJsHttpsUrl(_0x3f4b6c){const _0x2dfd26=a133_0x3141;return/^https:\/\/.+\.js(\?.*)?$/[_0x2dfd26(0xe0)](_0x3f4b6c[_0x2dfd26(0xde)]());}export function isValidCssHttpsUrl(_0x491396){const _0x5b2c7c=a133_0x3141;return/^https:\/\/.+\.css(\?.*)?$/[_0x5b2c7c(0xe0)](_0x491396['trim']());}function a133_0x3141(_0x583ab4,_0x3aa4a9){_0x583ab4=_0x583ab4-0xd7;const _0x50e0c5=a133_0x50e0();let _0x314186=_0x50e0c5[_0x583ab4];return _0x314186;}function a133_0x50e0(){const _0x5a0a66=['13839488GZMxIx','test','7493ySXBSs','1050ZapQHK','4781346TKUDrJ','6283865bWecuG','72cceUwA','897489vfnIdr','4192854QKVikr','HEAD','17932JeIHDc','trim'];a133_0x50e0=function(){return _0x5a0a66;};return a133_0x50e0();}export async function isUrlReachable(_0x55aac6){const _0x42ba1b=a133_0x3141;try{const _0x258dcc=await fetch(_0x55aac6,{'method':_0x42ba1b(0xdc)});return _0x258dcc['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a134_0x58a356=a134_0x1271;(function(_0x575ad6,_0x6980f0){const _0x5be1ca=a134_0x1271,_0x2c638a=_0x575ad6();while(!![]){try{const _0x2e358b=parseInt(_0x5be1ca(0xdb))/0x1+parseInt(_0x5be1ca(0xcc))/0x2+parseInt(_0x5be1ca(0xd3))/0x3+parseInt(_0x5be1ca(0xef))/0x4+parseInt(_0x5be1ca(0xf7))/0x5+-parseInt(_0x5be1ca(0xde))/0x6+-parseInt(_0x5be1ca(0xcf))/0x7*(parseInt(_0x5be1ca(0x103))/0x8);if(_0x2e358b===_0x6980f0)break;else _0x2c638a['push'](_0x2c638a['shift']());}catch(_0x35c602){_0x2c638a['push'](_0x2c638a['shift']());}}}(a134_0x4d4e,0xec728));import a134_0x20aa8d 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_0x1271(_0x5a5bb5,_0xfd4286){_0x5a5bb5=_0x5a5bb5-0xc6;const _0x4d4ec9=a134_0x4d4e();let _0x12718e=_0x4d4ec9[_0x5a5bb5];return _0x12718e;}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';function a134_0x4d4e(){const _0x5201e0=['Created\x20','message','jsUrl','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','onlinePaths','map','\x20\x20Cancelled.','\x20created,\x20','skipped','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','paths','496JgzMZD','params','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','/smartapi/menu/create','✓\x20Menu\x20sync\x20completed:\x20','Menu\x20creation\x20failed','Fetching\x20online\x20menu\x20list...','Online\x20menu\x20list\x20fetched','appCode','rawFlags','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','3870742GlkyTl','trim','size','192899nnulcm','Menu\x20sync\x20completed:\x20','\x20menu(s)\x20with\x20JS:\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','2833689orYnCQ','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','created','split','Sync\x20local\x20pages\x20as\x20platform\x20menus','Creating\x20','Menu\x20sync\x20skipped','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','22737CLOMGL','POST','\x20\x20Create\x20','8586702HPPMGD','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','cssUrl','failed','length','gray','\x20failed.','flag','validation','sync','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','appcode','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20\x20✓\x20Selected:\x20','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','string','yellow','2659660nceKxR','\x20and\x20CSS:\x20','cookie','boolean','\x20created.','yes','str','menu','2702765qjqywj'];a134_0x4d4e=function(){return _0x5201e0;};return a134_0x4d4e();}import{isInProject}from'../../context.js';export const menuSync={'service':a134_0x58a356(0xf6),'command':a134_0x58a356(0xe7),'description':a134_0x58a356(0xd7),'risk':'write','flags':[{'name':a134_0x58a356(0x104),'type':a134_0x58a356(0xed),'description':'Pre-fill\x20JS/CSS\x20URLs.\x20'+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a134_0x58a356(0x102),'type':a134_0x58a356(0xed),'description':a134_0x58a356(0xd2)},{'name':a134_0x58a356(0xf4),'type':a134_0x58a356(0xf2),'description':a134_0x58a356(0xda)}],async 'dryRun'(_0xd17ade){const _0x5d0e01=a134_0x58a356;ensureRunnableContext(_0xd17ade[_0x5d0e01(0xca)],_0xd17ade['selectedAppName']);const _0x51adc2=await runMenuSyncCore(_0xd17ade['appCode'],_0xd17ade[_0x5d0e01(0xf1)],parsePaths(_0xd17ade[_0x5d0e01(0xf5)](_0x5d0e01(0x102))),_0xd17ade[_0x5d0e01(0xf5)]('params'),{'dryRun':!![]});return{'method':_0x5d0e01(0xdc),'url':_0x5d0e01(0x106),'body':_0x51adc2,'description':_0x51adc2[_0x5d0e01(0x100)]?_0x5d0e01(0x105):'Would\x20create\x20'+_0x51adc2['targetPages'][_0x5d0e01(0xe2)]+'\x20local\x20microfrontend\x20menu(s).'};},async 'execute'(_0x12d040){const _0x37b177=a134_0x58a356;ensureRunnableContext(_0x12d040['rawFlags'],_0x12d040['selectedAppName']);const _0x16c5a5=_0x12d040[_0x37b177(0xe5)](_0x37b177(0xf4)),_0x1958be=_0x12d040[_0x37b177(0xf5)](_0x37b177(0x104)),_0x1751b5=parsePaths(_0x12d040['str'](_0x37b177(0x102))),_0x4d0e7f=parseMenuSyncParams(_0x1958be);if(_0x16c5a5){const _0x642d10=await runMenuSyncCore(_0x12d040[_0x37b177(0xc9)],_0x12d040[_0x37b177(0xf1)],_0x1751b5,_0x1958be);if(_0x642d10[_0x37b177(0x100)]){const _0x1feb2c=getLocalPages();_0x1feb2c[_0x37b177(0xe2)]===0x0?writeCliSideChannelLine(_0x37b177(0xe8)):writeCliSideChannelLine(_0x37b177(0xdf));}else writeCliSideChannelLine(_0x37b177(0x107)+_0x642d10['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x642d10,'message':_0x642d10[_0x37b177(0x100)]?_0x37b177(0xd9):_0x37b177(0xd0)+_0x642d10[_0x37b177(0xd5)]+_0x37b177(0xf3)};}if(_0x1751b5[_0x37b177(0xe2)]>0x0)throw CliErrors[_0x37b177(0xe6)](_0x37b177(0x101),_0x37b177(0xcb));if(!isInteractive()&&_0x1958be)throw CliErrors[_0x37b177(0xe6)](_0x37b177(0xd4),_0x37b177(0xcb));requireInteractive();const _0x51e922=startSpinner(_0x37b177(0xc7));let _0x4900d2,_0x19b21f,_0x4da321;try{const _0x44101c=await fetchMenuData(_0x12d040[_0x37b177(0xc9)],_0x12d040[_0x37b177(0xf1)]);_0x4900d2=_0x44101c['localPages'],_0x19b21f=_0x44101c[_0x37b177(0xfc)],_0x4da321=_0x44101c['onlineMenuList'],stopSpinner(_0x51e922,_0x37b177(0xc8),!![]);}catch(_0x537b0b){stopSpinner(_0x51e922,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x37b177(0xe6)](_0x537b0b instanceof Error?_0x537b0b[_0x37b177(0xf9)]:_0x37b177(0xea));}if(_0x4900d2['length']===0x0)return writeCliSideChannelLine(a134_0x20aa8d[_0x37b177(0xee)](_0x37b177(0xfb))),{'ok':!![]};const _0xb24d63=buildCompareRows(_0x4900d2,_0x19b21f);writeCliSideChannelLine(renderCompareTable(_0xb24d63)),writeCliSideChannelLine('');const _0x5d32fe=await selectPages(_0x4900d2,_0x19b21f);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0x20aa8d['cyan'](_0x37b177(0xeb)+_0x5d32fe[_0x37b177(0xe2)]+'\x20page(s)'));const _0x453fa4=_0x4d0e7f[_0x37b177(0xfa)]&&_0x4d0e7f[_0x37b177(0xe0)];if(!_0x453fa4){writeCliSideChannelLine(renderSyncSummary(_0x5d32fe,_0x19b21f[_0x37b177(0xce)]>0x0));const _0x274c3f=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x274c3f)return writeCliSideChannelLine(a134_0x20aa8d[_0x37b177(0xe3)](_0x37b177(0xfe))),{'ok':!![]};}let _0x24f1d7=_0x4d0e7f['jsUrl'],_0x57ef04=_0x4d0e7f[_0x37b177(0xe0)];!_0x24f1d7&&(_0x24f1d7=await askJsUrl());!_0x57ef04&&(_0x57ef04=await askCssUrl());const _0x18e48b=await askConfirm(_0x37b177(0xdd)+_0x5d32fe['length']+_0x37b177(0xd1)+_0x24f1d7+_0x37b177(0xf0)+_0x57ef04+'?');if(!_0x18e48b)return writeCliSideChannelLine(a134_0x20aa8d[_0x37b177(0xe3)](_0x37b177(0xfe))),{'ok':!![]};const _0x323c95=[_0x24f1d7,_0x57ef04],_0x40b340=startSpinner(_0x37b177(0xd8)+_0x5d32fe['length']+'\x20menu(s)...');try{const _0x2a4b22=await doCreateMenus(_0x12d040[_0x37b177(0xc9)],_0x12d040[_0x37b177(0xf1)],_0x5d32fe,_0x323c95);return stopSpinner(_0x40b340,_0x37b177(0xf8)+_0x2a4b22[_0x37b177(0xd5)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x2a4b22,'message':_0x37b177(0xd0)+_0x2a4b22['created']+_0x37b177(0xff)+_0x2a4b22[_0x37b177(0xe1)]+_0x37b177(0xe4)};}catch(_0x1c729d){stopSpinner(_0x40b340,_0x37b177(0xc6),![]);throw CliErrors[_0x37b177(0xe6)](_0x1c729d instanceof Error?_0x1c729d[_0x37b177(0xf9)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x33dd03,_0x9fe50a){const _0x3397fa=a134_0x58a356,_0x3ccf87=_0x33dd03[_0x3397fa(0xe9)]?String(_0x33dd03[_0x3397fa(0xe9)])[_0x3397fa(0xcd)]():'';if(!isInProject()&&!_0x9fe50a&&!_0x3ccf87)throw CliErrors[_0x3397fa(0xe6)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x3397fa(0xec));}function parsePaths(_0x3278c3){const _0x4379c2=a134_0x58a356;return[...new Set(_0x3278c3[_0x4379c2(0xd6)](',')[_0x4379c2(0xfd)](_0xb237ec=>_0xb237ec['trim']())['filter'](Boolean))];}
1
+ const a134_0x201f50=a134_0x48a9;(function(_0x4adf0a,_0x278e4e){const _0xb5b8fb=a134_0x48a9,_0x2df970=_0x4adf0a();while(!![]){try{const _0x4b83bf=-parseInt(_0xb5b8fb(0x1d3))/0x1*(parseInt(_0xb5b8fb(0x1d8))/0x2)+-parseInt(_0xb5b8fb(0x1e3))/0x3*(-parseInt(_0xb5b8fb(0x1af))/0x4)+-parseInt(_0xb5b8fb(0x1c4))/0x5*(parseInt(_0xb5b8fb(0x1c7))/0x6)+-parseInt(_0xb5b8fb(0x1b5))/0x7*(parseInt(_0xb5b8fb(0x1f3))/0x8)+parseInt(_0xb5b8fb(0x1d5))/0x9+-parseInt(_0xb5b8fb(0x1e4))/0xa*(parseInt(_0xb5b8fb(0x1ec))/0xb)+parseInt(_0xb5b8fb(0x1c1))/0xc;if(_0x4b83bf===_0x278e4e)break;else _0x2df970['push'](_0x2df970['shift']());}catch(_0x1fe6bd){_0x2df970['push'](_0x2df970['shift']());}}}(a134_0x2ebe,0x62783));function a134_0x2ebe(){const _0x55e2a8=['\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20created.','appcode','cyan','21645024ZWUbfs','map','\x20menu(s)','3426450PoAvVn','POST','sync','6bdZzpt','Menu\x20sync\x20completed:\x20','size','skipped','Menu\x20sync\x20skipped','created','\x20local\x20microfrontend\x20menu(s).','flag','boolean','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','paths','✓\x20Menu\x20sync\x20completed:\x20','311CWDMYP','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','1267983NaGEHI','\x20menu(s)\x20created','Sync\x20local\x20pages\x20as\x20platform\x20menus','592BMCwjr','write','filter','trim','Menu\x20creation\x20failed','Failed\x20to\x20fetch\x20online\x20menu\x20list','Created\x20','length','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','yellow','cssUrl','324741YzbfRY','196090AMihJN','Would\x20create\x20','message','gray','\x20\x20Continue\x20with\x20creation?','\x20and\x20CSS:\x20','validation','menu','99LOctjX','\x20\x20Cancelled.','Fetching\x20online\x20menu\x20list...','\x20created,\x20','cookie','string','params','6431800vOEdBc','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','8efRVfP','onlineMenuList','localPages','selectedAppName','Creating\x20','appCode','7jagLQU','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20\x20Create\x20','/smartapi/menu/create','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','jsUrl','str','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.'];a134_0x2ebe=function(){return _0x55e2a8;};return a134_0x2ebe();}import a134_0x3fcd8d from'chalk';function a134_0x48a9(_0x4dff09,_0x5943ed){_0x4dff09=_0x4dff09-0x1af;const _0x2ebe11=a134_0x2ebe();let _0x48a9b7=_0x2ebe11[_0x4dff09];return _0x48a9b7;}import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a134_0x201f50(0x1eb),'command':a134_0x201f50(0x1c6),'description':a134_0x201f50(0x1d7),'risk':a134_0x201f50(0x1d9),'flags':[{'name':a134_0x201f50(0x1f2),'type':'string','description':a134_0x201f50(0x1b6)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':'paths','type':a134_0x201f50(0x1f1),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':'yes','type':a134_0x201f50(0x1cf),'description':a134_0x201f50(0x1d0)}],async 'dryRun'(_0x20a8da){const _0x460881=a134_0x201f50;ensureRunnableContext(_0x20a8da['rawFlags'],_0x20a8da[_0x460881(0x1b2)]);const _0x283760=await runMenuSyncCore(_0x20a8da['appCode'],_0x20a8da[_0x460881(0x1f0)],parsePaths(_0x20a8da[_0x460881(0x1bb)](_0x460881(0x1d1))),_0x20a8da[_0x460881(0x1bb)]('params'),{'dryRun':!![]});return{'method':_0x460881(0x1c5),'url':_0x460881(0x1b8),'body':_0x283760,'description':_0x283760[_0x460881(0x1ca)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x460881(0x1e5)+_0x283760['targetPages'][_0x460881(0x1df)]+_0x460881(0x1cd)};},async 'execute'(_0x4f566d){const _0x24862f=a134_0x201f50;ensureRunnableContext(_0x4f566d['rawFlags'],_0x4f566d[_0x24862f(0x1b2)]);const _0x501b23=_0x4f566d[_0x24862f(0x1ce)]('yes'),_0x17bc0e=_0x4f566d['str'](_0x24862f(0x1f2)),_0x51881f=parsePaths(_0x4f566d[_0x24862f(0x1bb)](_0x24862f(0x1d1))),_0x530f48=parseMenuSyncParams(_0x17bc0e);if(_0x501b23){const _0x1329e7=await runMenuSyncCore(_0x4f566d['appCode'],_0x4f566d['cookie'],_0x51881f,_0x17bc0e);if(_0x1329e7['skipped']){const _0x36d61d=getLocalPages();_0x36d61d[_0x24862f(0x1df)]===0x0?writeCliSideChannelLine(_0x24862f(0x1b9)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x24862f(0x1d2)+_0x1329e7[_0x24862f(0x1cc)]+_0x24862f(0x1d6));return{'ok':!![],'data':_0x1329e7,'message':_0x1329e7[_0x24862f(0x1ca)]?_0x24862f(0x1cb):_0x24862f(0x1c8)+_0x1329e7['created']+_0x24862f(0x1be)};}if(_0x51881f[_0x24862f(0x1df)]>0x0)throw CliErrors[_0x24862f(0x1ea)](_0x24862f(0x1bc),_0x24862f(0x1f4));if(!isInteractive()&&_0x17bc0e)throw CliErrors['validation'](_0x24862f(0x1d4),_0x24862f(0x1f4));requireInteractive();const _0x1f2094=startSpinner(_0x24862f(0x1ee));let _0x4cce82,_0x544c1f,_0x42f8c7;try{const _0x426e40=await fetchMenuData(_0x4f566d[_0x24862f(0x1b4)],_0x4f566d[_0x24862f(0x1f0)]);_0x4cce82=_0x426e40[_0x24862f(0x1b1)],_0x544c1f=_0x426e40['onlinePaths'],_0x42f8c7=_0x426e40[_0x24862f(0x1b0)],stopSpinner(_0x1f2094,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x5debc5){stopSpinner(_0x1f2094,_0x24862f(0x1dd),![]);throw CliErrors['validation'](_0x5debc5 instanceof Error?_0x5debc5[_0x24862f(0x1e6)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x4cce82[_0x24862f(0x1df)]===0x0)return writeCliSideChannelLine(a134_0x3fcd8d[_0x24862f(0x1e1)](_0x24862f(0x1bd))),{'ok':!![]};const _0x52f74e=buildCompareRows(_0x4cce82,_0x544c1f);writeCliSideChannelLine(renderCompareTable(_0x52f74e)),writeCliSideChannelLine('');const _0x11abf2=await selectPages(_0x4cce82,_0x544c1f);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0x3fcd8d[_0x24862f(0x1c0)]('\x20\x20✓\x20Selected:\x20'+_0x11abf2[_0x24862f(0x1df)]+'\x20page(s)'));const _0x48da1c=_0x530f48[_0x24862f(0x1ba)]&&_0x530f48[_0x24862f(0x1e2)];if(!_0x48da1c){writeCliSideChannelLine(renderSyncSummary(_0x11abf2,_0x544c1f[_0x24862f(0x1c9)]>0x0));const _0x576cdf=await askConfirm(_0x24862f(0x1e8));if(!_0x576cdf)return writeCliSideChannelLine(a134_0x3fcd8d[_0x24862f(0x1e7)](_0x24862f(0x1ed))),{'ok':!![]};}let _0x5a2d99=_0x530f48[_0x24862f(0x1ba)],_0x2b1ea3=_0x530f48[_0x24862f(0x1e2)];!_0x5a2d99&&(_0x5a2d99=await askJsUrl());!_0x2b1ea3&&(_0x2b1ea3=await askCssUrl());const _0x34f510=await askConfirm(_0x24862f(0x1b7)+_0x11abf2[_0x24862f(0x1df)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x5a2d99+_0x24862f(0x1e9)+_0x2b1ea3+'?');if(!_0x34f510)return writeCliSideChannelLine(a134_0x3fcd8d[_0x24862f(0x1e7)](_0x24862f(0x1ed))),{'ok':!![]};const _0x40346f=[_0x5a2d99,_0x2b1ea3],_0x46dfaf=startSpinner(_0x24862f(0x1b3)+_0x11abf2[_0x24862f(0x1df)]+'\x20menu(s)...');try{const _0x1533b7=await doCreateMenus(_0x4f566d['appCode'],_0x4f566d['cookie'],_0x11abf2,_0x40346f);return stopSpinner(_0x46dfaf,_0x24862f(0x1de)+_0x1533b7[_0x24862f(0x1cc)]+_0x24862f(0x1c3),!![]),{'ok':!![],'data':_0x1533b7,'message':_0x24862f(0x1c8)+_0x1533b7[_0x24862f(0x1cc)]+_0x24862f(0x1ef)+_0x1533b7['failed']+'\x20failed.'};}catch(_0x252af5){stopSpinner(_0x46dfaf,_0x24862f(0x1dc),![]);throw CliErrors['validation'](_0x252af5 instanceof Error?_0x252af5[_0x24862f(0x1e6)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x414564,_0x33d4c9){const _0x425900=a134_0x201f50,_0x2d389c=_0x414564[_0x425900(0x1bf)]?String(_0x414564['appcode'])[_0x425900(0x1db)]():'';if(!isInProject()&&!_0x33d4c9&&!_0x2d389c)throw CliErrors[_0x425900(0x1ea)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x425900(0x1e0));}function parsePaths(_0x251762){const _0x262359=a134_0x201f50;return[...new Set(_0x251762['split'](',')[_0x262359(0x1c2)](_0x96f428=>_0x96f428['trim']())[_0x262359(0x1da)](Boolean))];}
@@ -1 +1 @@
1
- const a135_0x23d9fb=a135_0x4928;function a135_0x4818(){const _0x58c841=['parentId','menu_expected_count_mismatch','hash','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','values','Updated\x20visibility\x20for\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','depth','resourcesValid','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','28258OstIIM','Menu\x20id\x20selector(s)\x20not\x20found:\x20','pageId','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','isArray','datasetId','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','\x20skipped,\x20','264OxUtdJ','Requested\x20menu\x20visibility','validation','Menu\x20visibility\x20update\x20completed:\x20','str','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','menu_verification_failed','menuIds','verify\x20menu\x20visibility\x20update','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Menu\x20','pageType','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','Final\x20menu\x20visibility\x20readback\x20failed.','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','sort','menu_selector_not_found','\x20changed\x20unexpectedly.','\x20must\x20be\x20true\x20or\x20false.','expectedCount','modelType','before','expectVisible','failed','6989274sfXJlJ','false','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','visibility-update','verification','set','filter','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','join','/smartapi/menu/update','Response\x20was\x20lost\x20and\x20menu\x20','stringify','\x20unchanged\x20menu(s).','true','paths','byId','isSafeInteger','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','some','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','\x20menu(s);\x20skipped\x20','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','\x20menu(s);\x20skip\x20','593997PrJRHD','\x20visibility\x20update\x20could\x20not\x20be\x20verified','menu-ids','visible','rabetbase\x20menu\x20list\x20--format\x20compress','message','url','menu_permission_denied','update-menu-visibility','map','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','update\x20visibility\x20for','updated','cookie','Would\x20update\x20visibility\x20for\x20','push','Menu\x20path\x20selector\x20not\x20found:\x20','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','number','num','165020TuxQsx','childrenCount','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','\x20failed.','appCode','beforeById','label','update\x20menu\x20visibility','get','warnings','requestedVisible','high-risk-write','body','796948TFgevk','split','3243306pTDQDT','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','boolean','childrenIds','menu\x20list','Selected\x20','plan','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','trim','length','menu_selector_ambiguous','path','29071jFEyHM','expected-count','POST','code','string','225UWQJcP','resources','targets','plannedActions','rawFlags','expect-visible','update','datasetCode'];a135_0x4818=function(){return _0x58c841;};return a135_0x4818();}(function(_0x3e8996,_0x2b68d8){const _0x42152b=a135_0x4928,_0x599fd3=_0x3e8996();while(!![]){try{const _0x5537a6=-parseInt(_0x42152b(0xfa))/0x1+-parseInt(_0x42152b(0xc2))/0x2*(-parseInt(_0x42152b(0xaf))/0x3)+parseInt(_0x42152b(0x9b))/0x4+parseInt(_0x42152b(0x10f))/0x5+parseInt(_0x42152b(0x9d))/0x6+parseInt(_0x42152b(0xaa))/0x7*(parseInt(_0x42152b(0xca))/0x8)+-parseInt(_0x42152b(0xe3))/0x9;if(_0x5537a6===_0x2b68d8)break;else _0x599fd3['push'](_0x599fd3['shift']());}catch(_0xcc2f71){_0x599fd3['push'](_0x599fd3['shift']());}}}(a135_0x4818,0x92395));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';function a135_0x4928(_0x56b4ef,_0x4b01c0){_0x56b4ef=_0x56b4ef-0x99;const _0x481839=a135_0x4818();let _0x4928c0=_0x481839[_0x56b4ef];return _0x4928c0;}import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a135_0x23d9fb(0xac),'path':a135_0x23d9fb(0xec)}];export const menuVisibilityUpdate={'service':'menu','command':a135_0x23d9fb(0xe6),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a135_0x23d9fb(0x99),'structuredErrors':!![],'flags':[{'name':a135_0x23d9fb(0xfc),'type':'string','description':a135_0x23d9fb(0xa5)},{'name':'paths','type':a135_0x23d9fb(0xae),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a135_0x23d9fb(0xfd),'type':a135_0x23d9fb(0x9f),'required':!![],'description':a135_0x23d9fb(0xcb)},{'name':'expect-visible','type':'boolean','description':a135_0x23d9fb(0xba)},{'name':a135_0x23d9fb(0xab),'type':a135_0x23d9fb(0x10d),'description':'Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1374c7){parseInput(_0x1374c7),requireExplicitYes(_0x1374c7);},async 'dryRun'(_0x4b3d71){const _0x243fc7=a135_0x23d9fb,_0x7aefc4=await buildPlan(_0x4b3d71,!![]),_0x32e5ff=_0x7aefc4[_0x243fc7(0xa3)][_0x243fc7(0xb2)]?.[_0x243fc7(0xa7)]??0x0,_0x418123=_0x7aefc4[_0x243fc7(0xa3)][_0x243fc7(0xb1)][_0x243fc7(0xa7)]-_0x32e5ff;return menuDryRunResult(_0x7aefc4['plan'],{'method':_0x243fc7(0xac),'url':'/smartapi/menu/update','body':{'updates':_0x7aefc4[_0x243fc7(0xa3)][_0x243fc7(0xb2)]?.[_0x243fc7(0x103)](_0x4a751f=>_0x4a751f[_0x243fc7(0x9a)])??[]},'description':_0x243fc7(0x109)+_0x32e5ff+_0x243fc7(0xf9)+_0x418123+'\x20unchanged\x20menu(s).'});},async 'execute'(_0xa9f06a){const _0x2c3edb=a135_0x23d9fb;requireExplicitYes(_0xa9f06a);const _0x5ce83b=await buildPlan(_0xa9f06a,![]);await recheckMutationSnapshot(_0xa9f06a,_0x5ce83b[_0x2c3edb(0xa3)],_0x2c3edb(0x116));const _0x1d86e9=[],_0x5b27a3=[],_0x15cc59=[];for(const _0x14d34b of _0x5ce83b[_0x2c3edb(0xa3)][_0x2c3edb(0xb1)]){if(_0x14d34b[_0x2c3edb(0xe0)][_0x2c3edb(0xfd)]===_0x5ce83b[_0x2c3edb(0xa3)][_0x2c3edb(0x119)]){_0x1d86e9['push']({'id':_0x14d34b['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xa9f06a['appCode'],_0xa9f06a[_0x2c3edb(0x108)],{'id':_0x14d34b['id'],'visible':_0x5ce83b[_0x2c3edb(0xa3)][_0x2c3edb(0x119)]}),_0x1d86e9[_0x2c3edb(0x10a)]({'id':_0x14d34b['id'],'updated':!![],'skipped':![]});}catch(_0x35b0a4){const _0x3f21a2=mapMenuApiError(_0x35b0a4,_0x2c3edb(0x106),_0x14d34b['id']);if(isMenuResponseLoss(_0x35b0a4)&&_0x3f21a2['code']!==_0x2c3edb(0x101)){_0x15cc59[_0x2c3edb(0x10a)](_0x14d34b['id']);continue;}_0x5b27a3[_0x2c3edb(0x10a)]({'id':_0x14d34b['id'],'stage':_0x2c3edb(0xb5),'code':_0x3f21a2[_0x2c3edb(0xad)],'message':_0x3f21a2[_0x2c3edb(0xff)]});}}let _0x291735;try{_0x291735=await fetchMenuSnapshot(_0xa9f06a['appCode'],_0xa9f06a[_0x2c3edb(0x108)]);}catch(_0x4d2cc4){const _0x479b17=describeMenuErrorCause(_0x4d2cc4,_0x2c3edb(0xd2)),_0x2c6c8a=_0x15cc59[_0x2c3edb(0x103)](_0x1754fa=>({'id':_0x1754fa,'stage':'update-recovery','code':'menu_verification_failed','message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x1754fa+_0x2c3edb(0xf4),'requestedStateConfirmed':![],'recovered':![]})),_0x16329d={'stage':_0x2c3edb(0xe7),'code':'menu_verification_failed','message':_0x2c3edb(0xd7),'targetIds':_0x5ce83b[_0x2c3edb(0xa3)][_0x2c3edb(0xb1)][_0x2c3edb(0x103)](_0x275bfe=>_0x275bfe['id']),'requestedStateConfirmed':![],..._0x479b17};throw menuFailure(asVerificationError(_0x4d2cc4,_0x2c3edb(0xd6)),_0x5ce83b['plan'],{'stage':_0x2c3edb(0xe7),'succeeded':_0x1d86e9,'failedRecords':[..._0x5b27a3,..._0x2c6c8a,_0x16329d],'warnings':[_0x2c3edb(0xd3)],'verification':{'status':_0x2c3edb(0xe2),'recoveredCount':0x0,'lookupCommand':_0x2c3edb(0xfe)}});}const _0x41f0ee=[];for(const _0x50f592 of _0x1d86e9){const _0x3d8800=Number(_0x50f592['id']),_0x5ccdb6=_0x5ce83b[_0x2c3edb(0x114)][_0x2c3edb(0x117)](_0x3d8800),_0x5acaab=_0x291735[_0x2c3edb(0xf2)]['get'](_0x3d8800);try{verifyVisibilityUpdate(_0x5ccdb6,_0x5acaab,_0x5ce83b['plan'][_0x2c3edb(0x119)]);}catch(_0x52fa63){const _0x58b266=asVerificationError(_0x52fa63,'Menu\x20'+_0x3d8800+_0x2c3edb(0xfb));_0x41f0ee[_0x2c3edb(0x10a)]({'id':_0x3d8800,'stage':'verification','code':_0x58b266['code'],'message':_0x58b266[_0x2c3edb(0xff)],'requestedStateConfirmed':![]});}}for(const _0x3be6eb of _0x15cc59){const _0x34b073=_0x5ce83b[_0x2c3edb(0x114)][_0x2c3edb(0x117)](_0x3be6eb),_0x91c0bf=_0x291735[_0x2c3edb(0xf2)]['get'](_0x3be6eb);try{verifyVisibilityUpdate(_0x34b073,_0x91c0bf,_0x5ce83b[_0x2c3edb(0xa3)][_0x2c3edb(0x119)]),_0x1d86e9[_0x2c3edb(0x10a)]({'id':_0x3be6eb,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x3b2084){const _0x99ac07=asVerificationError(_0x3b2084,_0x2c3edb(0xed)+_0x3be6eb+_0x2c3edb(0xbe));_0x41f0ee[_0x2c3edb(0x10a)]({'id':_0x3be6eb,'stage':'update-recovery','code':_0x99ac07[_0x2c3edb(0xad)],'message':_0x99ac07[_0x2c3edb(0xff)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x41f0ee[_0x2c3edb(0xa7)]>0x0){const _0x4d5b29=_0x41f0ee['map'](_0x1e3a5b=>Number(_0x1e3a5b['id'])),_0xc78f67=_0x1d86e9[_0x2c3edb(0xe9)](_0x3379b0=>_0x3379b0['recovered']===!![])[_0x2c3edb(0xa7)],_0x4bc6d3=menuError(_0x2c3edb(0xd0),_0x2c3edb(0xf6)+_0x4d5b29[_0x2c3edb(0xeb)](',\x20')+'.',_0x2c3edb(0x10c));throw menuFailure(_0x4bc6d3,_0x5ce83b[_0x2c3edb(0xa3)],{'stage':'verification','succeeded':_0x1d86e9,'failedRecords':[..._0x5b27a3,..._0x41f0ee],'warnings':[_0x2c3edb(0xd8)],'verification':{'status':_0x2c3edb(0xe2),..._0x4d5b29[_0x2c3edb(0xa7)]===0x1?{'targetId':_0x4d5b29[0x0]}:{'targetIds':_0x4d5b29},'recoveredCount':_0xc78f67,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x51ba89=_0x1d86e9[_0x2c3edb(0xe9)](_0x1a3475=>_0x1a3475[_0x2c3edb(0x107)]===!![])[_0x2c3edb(0xa7)],_0x4bbba2=_0x1d86e9['length']-_0x51ba89,_0x1d49b5={..._0x5ce83b[_0x2c3edb(0xa3)],'succeeded':_0x1d86e9,'failed':_0x5b27a3,'warnings':_0x5b27a3['length']>0x0?[..._0x5ce83b[_0x2c3edb(0xa3)][_0x2c3edb(0x118)],_0x2c3edb(0xcf)]:_0x5ce83b['plan'][_0x2c3edb(0x118)],'verification':{'checkedBy':_0x2c3edb(0xa1),'snapshotHash':_0x291735[_0x2c3edb(0xb9)],'matchesRequestedState':_0x5b27a3[_0x2c3edb(0xa7)]===0x0,'recoveredCount':_0x15cc59['length']}};return{'ok':_0x5b27a3[_0x2c3edb(0xa7)]===0x0,'data':_0x1d49b5,'message':_0x5b27a3['length']===0x0?_0x2c3edb(0xbd)+_0x51ba89+_0x2c3edb(0xf7)+_0x4bbba2+_0x2c3edb(0xef):_0x2c3edb(0xcd)+_0x51ba89+'\x20updated,\x20'+_0x4bbba2+_0x2c3edb(0xc9)+_0x5b27a3['length']+_0x2c3edb(0x112)};}};function parseInput(_0x6c36a6){const _0x75c895=a135_0x23d9fb,_0x1d1e07=parseMenuIds(_0x6c36a6[_0x75c895(0xce)]('menu-ids')),_0x1c9a1f=parseCsv(_0x6c36a6[_0x75c895(0xce)](_0x75c895(0xf1)));if(_0x1d1e07[_0x75c895(0xa7)]===0x0&&_0x1c9a1f[_0x75c895(0xa7)]===0x0)throw CliErrors[_0x75c895(0xcc)](_0x75c895(0x111));const _0x504d9a=parseBooleanFlag(_0x6c36a6,'visible',!![]),_0x5340d1=parseBooleanFlag(_0x6c36a6,_0x75c895(0xb4),![]);let _0xd2d814;if(hasFlag(_0x6c36a6,_0x75c895(0xab))){_0xd2d814=_0x6c36a6[_0x75c895(0x10e)](_0x75c895(0xab));if(!Number[_0x75c895(0xf3)](_0xd2d814)||_0xd2d814<0x0)throw CliErrors['validation'](_0x75c895(0xc5));}return{'menuIds':_0x1d1e07,'paths':_0x1c9a1f,'visible':_0x504d9a,'expectVisible':_0x5340d1,'expectedCount':_0xd2d814};}async function buildPlan(_0x2c0ada,_0x45be9f){const _0x420572=a135_0x23d9fb,_0x22fa79=parseInput(_0x2c0ada),_0x147a26=await fetchMutationSnapshot(_0x2c0ada,_0x420572(0x116)),_0x2fbfc7=selectTargets(_0x147a26['menus'],_0x22fa79['menuIds'],_0x22fa79['paths']);if(_0x22fa79[_0x420572(0xde)]!==undefined&&_0x2fbfc7[_0x420572(0xa7)]!==_0x22fa79[_0x420572(0xde)])throw menuError(_0x420572(0xb8),_0x420572(0xa2)+_0x2fbfc7[_0x420572(0xa7)]+'\x20menu(s),\x20expected\x20'+_0x22fa79[_0x420572(0xde)]+'.',_0x420572(0xd9));if(_0x22fa79[_0x420572(0xe1)]!==undefined){const _0x48ae57=_0x2fbfc7[_0x420572(0xe9)](_0x1ae088=>_0x1ae088[_0x420572(0xfd)]!==_0x22fa79['expectVisible']);if(_0x48ae57[_0x420572(0xa7)]>0x0)throw menuError('menu_state_drift',_0x420572(0xbb)+_0x48ae57[_0x420572(0x103)](_0x3b35b7=>_0x3b35b7['id'])[_0x420572(0xeb)](',\x20')+'.',_0x420572(0x105));}const _0x582737=_0x2fbfc7[_0x420572(0x103)](_0x114648=>({'id':_0x114648['id'],'label':_0x114648[_0x420572(0x115)],'path':_0x114648[_0x420572(0xa9)],'before':{'visible':_0x114648['visible']},'after':{'visible':_0x22fa79[_0x420572(0xfd)]}})),_0x5b5e7f=_0x582737[_0x420572(0xe9)](_0xc893ec=>_0xc893ec[_0x420572(0xe0)][_0x420572(0xfd)]!==_0x22fa79['visible'])['map'](_0x3c7b5f=>({'stage':_0x420572(0x102),'method':_0x420572(0xac),'path':_0x420572(0xec),'body':{'appCode':_0x2c0ada[_0x420572(0x113)],'id':_0x3c7b5f['id'],'visible':_0x22fa79[_0x420572(0xfd)]}})),_0x52314e=mutationResult({'operation':_0x420572(0xe6),'selector':{'menuIds':_0x22fa79[_0x420572(0xd1)],'paths':_0x22fa79[_0x420572(0xf1)]},'before':{'menus':_0x2fbfc7[_0x420572(0x103)](_0x2d480c=>({'id':_0x2d480c['id'],'path':_0x2d480c['path'],'visible':_0x2d480c[_0x420572(0xfd)]}))},'after':{'menus':_0x2fbfc7['map'](_0x4ae47b=>({'id':_0x4ae47b['id'],'path':_0x4ae47b[_0x420572(0xa9)],'visible':_0x22fa79[_0x420572(0xfd)]}))},'dryRun':_0x45be9f,'backend':[...BACKEND],'plannedActions':_0x5b5e7f,'snapshotHash':_0x147a26[_0x420572(0xb9)],'warnings':_0x5b5e7f['length']===0x0?[_0x420572(0xc8)]:[]});return{'plan':{..._0x52314e,'requestedVisible':_0x22fa79[_0x420572(0xfd)],'targets':_0x582737},'beforeById':new Map(_0x2fbfc7['map'](_0x5aaafa=>[_0x5aaafa['id'],_0x5aaafa]))};}function selectTargets(_0x41b790,_0x1a280f,_0x25e35c){const _0x554e6d=a135_0x23d9fb,_0x59315b=new Map(_0x41b790[_0x554e6d(0x103)](_0x3f1cf5=>[_0x3f1cf5['id'],_0x3f1cf5])),_0x22d5f8=new Map(),_0x54fa3b=_0x1a280f[_0x554e6d(0xe9)](_0x33b8a7=>!_0x59315b['has'](_0x33b8a7));if(_0x54fa3b[_0x554e6d(0xa7)]>0x0)throw menuError(_0x554e6d(0xdb),_0x554e6d(0xc3)+_0x54fa3b[_0x554e6d(0xeb)](',\x20')+'.',_0x554e6d(0x9e));for(const _0x269f14 of _0x1a280f){_0x22d5f8[_0x554e6d(0xe8)](_0x269f14,_0x59315b['get'](_0x269f14));}for(const _0x37aae9 of _0x25e35c){const _0x34fc9f=_0x41b790[_0x554e6d(0xe9)](_0x248f40=>_0x248f40[_0x554e6d(0xa9)]===_0x37aae9);if(_0x34fc9f[_0x554e6d(0xa7)]===0x0)throw menuError(_0x554e6d(0xdb),_0x554e6d(0x10b)+JSON[_0x554e6d(0xee)](_0x37aae9)+'.',_0x554e6d(0x104));if(_0x34fc9f['length']>0x1)throw menuError(_0x554e6d(0xa8),_0x554e6d(0xe5)+JSON['stringify'](_0x37aae9)+'.',_0x554e6d(0xea)+_0x34fc9f[_0x554e6d(0x103)](_0x354889=>_0x354889['id'])[_0x554e6d(0xeb)](',\x20')+'.');const _0x4b5c63=_0x34fc9f[0x0];_0x22d5f8[_0x554e6d(0xe8)](_0x4b5c63['id'],_0x4b5c63);}return[..._0x22d5f8[_0x554e6d(0xbc)]()];}function parseMenuIds(_0x44294d){const _0x3a7246=a135_0x23d9fb,_0x1ae329=parseCsv(_0x44294d),_0x31fec9=_0x1ae329[_0x3a7246(0x103)](Number);if(_0x31fec9[_0x3a7246(0xf5)](_0x1e18bd=>!Number[_0x3a7246(0xf3)](_0x1e18bd)||_0x1e18bd<=0x0))throw CliErrors[_0x3a7246(0xcc)](_0x3a7246(0xf8));return[...new Set(_0x31fec9)];}function parseCsv(_0x36bc20){const _0xc273f2=a135_0x23d9fb;return[...new Set(_0x36bc20[_0xc273f2(0x9c)](',')[_0xc273f2(0x103)](_0x3e8a37=>_0x3e8a37[_0xc273f2(0xa6)]())['filter'](Boolean))];}function parseBooleanFlag(_0x18d825,_0x68f698,_0x539dae){const _0xfd2edc=a135_0x23d9fb;if(!hasFlag(_0x18d825,_0x68f698)){if(_0x539dae)throw CliErrors['flagMissing'](_0x68f698);return undefined;}const _0x30e8f3=_0x18d825[_0xfd2edc(0xb3)][_0x68f698];if(_0x30e8f3===!![]||_0x30e8f3===![])return _0x30e8f3;if(_0x30e8f3===_0xfd2edc(0xf0))return!![];if(_0x30e8f3===_0xfd2edc(0xe4))return![];throw CliErrors[_0xfd2edc(0xcc)]('--'+_0x68f698+_0xfd2edc(0xdd));}function verifyVisibilityUpdate(_0x955258,_0x888713,_0x3a0c06){const _0x10bdf9=a135_0x23d9fb;assertVerified(!!_0x888713,_0x10bdf9(0xd4)+_0x955258['id']+_0x10bdf9(0xa4)),assertVerified(_0x888713[_0x10bdf9(0xfd)]===_0x3a0c06,'Menu\x20'+_0x955258['id']+_0x10bdf9(0xc1));const _0x563b54=[['id',_0x888713['id'],_0x955258['id']],[_0x10bdf9(0xb7),_0x888713[_0x10bdf9(0xb7)],_0x955258[_0x10bdf9(0xb7)]],[_0x10bdf9(0xbf),_0x888713[_0x10bdf9(0xbf)],_0x955258[_0x10bdf9(0xbf)]],[_0x10bdf9(0x115),_0x888713['label'],_0x955258['label']],[_0x10bdf9(0xa9),_0x888713['path'],_0x955258[_0x10bdf9(0xa9)]],['url',_0x888713['url'],_0x955258[_0x10bdf9(0x100)]],['type',_0x888713['type'],_0x955258['type']],['sort',_0x888713[_0x10bdf9(0xda)],_0x955258[_0x10bdf9(0xda)]],['resources',_0x888713[_0x10bdf9(0xb0)],_0x955258[_0x10bdf9(0xb0)]],[_0x10bdf9(0xc0),_0x888713['resourcesValid'],_0x955258['resourcesValid']],[_0x10bdf9(0xa0),_0x888713[_0x10bdf9(0xa0)],_0x955258['childrenIds']],[_0x10bdf9(0x110),_0x888713[_0x10bdf9(0x110)],_0x955258[_0x10bdf9(0x110)]],[_0x10bdf9(0xc4),_0x888713[_0x10bdf9(0xc4)],_0x955258[_0x10bdf9(0xc4)]],[_0x10bdf9(0xd5),_0x888713['pageType'],_0x955258['pageType']],[_0x10bdf9(0xdf),_0x888713[_0x10bdf9(0xdf)],_0x955258['modelType']],[_0x10bdf9(0xc7),_0x888713['datasetId'],_0x955258[_0x10bdf9(0xc7)]],['datasetCode',_0x888713['datasetCode'],_0x955258[_0x10bdf9(0xb6)]]];for(const [_0x47a7ce,_0x417b67,_0x15a643]of _0x563b54){assertVerified(sameValue(_0x417b67,_0x15a643),'Menu\x20'+_0x955258['id']+'\x20'+_0x47a7ce+_0x10bdf9(0xdc));}}function sameValue(_0x4a0c60,_0x2432df){const _0x2dfb70=a135_0x23d9fb;if(Array[_0x2dfb70(0xc6)](_0x4a0c60)||Array['isArray'](_0x2432df))return JSON[_0x2dfb70(0xee)](_0x4a0c60)===JSON['stringify'](_0x2432df);return _0x4a0c60===_0x2432df;}
1
+ const a135_0x461eec=a135_0x247f;function a135_0x3776(){const _0x4fdd60=['Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','294GzDLxM','\x20unchanged\x20menu(s).','368487JeyoPe','\x20failed.','appCode','update\x20visibility\x20for','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','1595046odrQuE','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','true','276568YygvsY','Menu\x20','recovered','menu_state_drift','menu\x20list','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','update-menu-visibility','validation','message','paths','beforeById','expected-count','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','filter','childrenIds','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','childrenCount','updated','\x20skipped,\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','\x20updated,\x20','resourcesValid','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','verify\x20menu\x20visibility\x20update','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','627012IONzvS','menu','type','requestedVisible','stringify','192Mcjcvr','num','sort','rabetbase\x20menu\x20list\x20--format\x20compress','menu-ids','visible','path','menu_selector_not_found','menus','warnings','expect-visible','datasetCode','Selected\x20','split','POST','set','resources','pageType','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','cookie','datasetId','\x20changed\x20unexpectedly.','expectedCount','plan','menu_expected_count_mismatch','length','update\x20menu\x20visibility','Response\x20was\x20lost\x20for\x20menu\x20','update-recovery','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','targets','\x20must\x20be\x20true\x20or\x20false.','Response\x20was\x20lost\x20and\x20menu\x20','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','5oPOuad','plannedActions','visibility-update','menu_selector_ambiguous','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','has','\x20menu(s);\x20skipped\x20','modelType','flagMissing','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','depth','code','isArray','byId','/smartapi/menu/update','before','boolean','get','menu_verification_failed','str','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','parentId','number','body','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','hash','32058qJGhKW','menuIds','26826RPOUtM','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','verification','3650610JyJbiR','Menu\x20id\x20selector(s)\x20not\x20found:\x20','push','expectVisible','Menu\x20path\x20selector\x20not\x20found:\x20','failed','string','map','pageId','join','label','some','isSafeInteger','values','high-risk-write','false','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.'];a135_0x3776=function(){return _0x4fdd60;};return a135_0x3776();}(function(_0x3eb2eb,_0xb3ca19){const _0x4e311a=a135_0x247f,_0x1776b4=_0x3eb2eb();while(!![]){try{const _0x5995c5=parseInt(_0x4e311a(0x72))/0x1+-parseInt(_0x4e311a(0x92))/0x2+-parseInt(_0x4e311a(0xae))/0x3+parseInt(_0x4e311a(0x95))/0x4*(-parseInt(_0x4e311a(0xd6))/0x5)+-parseInt(_0x4e311a(0x74))/0x6*(-parseInt(_0x4e311a(0x8a))/0x7)+-parseInt(_0x4e311a(0xb3))/0x8*(-parseInt(_0x4e311a(0x8c))/0x9)+parseInt(_0x4e311a(0x77))/0xa;if(_0x5995c5===_0xb3ca19)break;else _0x1776b4['push'](_0x1776b4['shift']());}catch(_0x3fbe74){_0x1776b4['push'](_0x1776b4['shift']());}}}(a135_0x3776,0x78158));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a135_0x247f(_0x44654b,_0x3d8775){_0x44654b=_0x44654b-0x6e;const _0x377618=a135_0x3776();let _0x247fb9=_0x377618[_0x44654b];return _0x247fb9;}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':a135_0x461eec(0xc1),'path':a135_0x461eec(0xe4)}];export const menuVisibilityUpdate={'service':a135_0x461eec(0xaf),'command':a135_0x461eec(0xd8),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a135_0x461eec(0x85),'structuredErrors':!![],'flags':[{'name':a135_0x461eec(0xb7),'type':'string','description':a135_0x461eec(0x87)},{'name':a135_0x461eec(0x9e),'type':a135_0x461eec(0x7d),'description':a135_0x461eec(0x89)},{'name':'visible','type':a135_0x461eec(0xe6),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a135_0x461eec(0xbd),'type':a135_0x461eec(0xe6),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':'expected-count','type':a135_0x461eec(0x6e),'description':a135_0x461eec(0xd0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x21bec5){parseInput(_0x21bec5),requireExplicitYes(_0x21bec5);},async 'dryRun'(_0x19fac3){const _0x207901=a135_0x461eec,_0x792ee8=await buildPlan(_0x19fac3,!![]),_0x4a9b6d=_0x792ee8[_0x207901(0xca)][_0x207901(0xd7)]?.['length']??0x0,_0x124aff=_0x792ee8[_0x207901(0xca)]['targets'][_0x207901(0xcc)]-_0x4a9b6d;return menuDryRunResult(_0x792ee8[_0x207901(0xca)],{'method':_0x207901(0xc1),'url':_0x207901(0xe4),'body':{'updates':_0x792ee8[_0x207901(0xca)][_0x207901(0xd7)]?.['map'](_0x437ab8=>_0x437ab8[_0x207901(0x6f)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x4a9b6d+'\x20menu(s);\x20skip\x20'+_0x124aff+_0x207901(0x8b)});},async 'execute'(_0xb6f688){const _0x349c16=a135_0x461eec;requireExplicitYes(_0xb6f688);const _0x1b982e=await buildPlan(_0xb6f688,![]);await recheckMutationSnapshot(_0xb6f688,_0x1b982e[_0x349c16(0xca)],_0x349c16(0xcd));const _0x5c4237=[],_0x37182f=[],_0xd663e=[];for(const _0x56efcd of _0x1b982e[_0x349c16(0xca)][_0x349c16(0xd1)]){if(_0x56efcd[_0x349c16(0xe5)][_0x349c16(0xb8)]===_0x1b982e['plan'][_0x349c16(0xb1)]){_0x5c4237['push']({'id':_0x56efcd['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xb6f688[_0x349c16(0x8e)],_0xb6f688['cookie'],{'id':_0x56efcd['id'],'visible':_0x1b982e[_0x349c16(0xca)][_0x349c16(0xb1)]}),_0x5c4237['push']({'id':_0x56efcd['id'],'updated':!![],'skipped':![]});}catch(_0xbfa55e){const _0x319936=mapMenuApiError(_0xbfa55e,_0x349c16(0x8f),_0x56efcd['id']);if(isMenuResponseLoss(_0xbfa55e)&&_0x319936[_0x349c16(0xe1)]!=='menu_permission_denied'){_0xd663e[_0x349c16(0x79)](_0x56efcd['id']);continue;}_0x37182f[_0x349c16(0x79)]({'id':_0x56efcd['id'],'stage':'update','code':_0x319936[_0x349c16(0xe1)],'message':_0x319936[_0x349c16(0x9d)]});}}let _0x432e6c;try{_0x432e6c=await fetchMenuSnapshot(_0xb6f688[_0x349c16(0x8e)],_0xb6f688[_0x349c16(0xc6)]);}catch(_0x46fbe6){const _0x45a3cb=describeMenuErrorCause(_0x46fbe6,_0x349c16(0xac)),_0x18135f=_0xd663e[_0x349c16(0x7e)](_0x4f9ac6=>({'id':_0x4f9ac6,'stage':'update-recovery','code':_0x349c16(0xe8),'message':_0x349c16(0xce)+_0x4f9ac6+_0x349c16(0xd5),'requestedStateConfirmed':![],'recovered':![]})),_0x489dee={'stage':_0x349c16(0x76),'code':_0x349c16(0xe8),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x1b982e['plan'][_0x349c16(0xd1)][_0x349c16(0x7e)](_0x404d7c=>_0x404d7c['id']),'requestedStateConfirmed':![],..._0x45a3cb};throw menuFailure(asVerificationError(_0x46fbe6,_0x349c16(0x70)),_0x1b982e[_0x349c16(0xca)],{'stage':_0x349c16(0x76),'succeeded':_0x5c4237,'failedRecords':[..._0x37182f,..._0x18135f,_0x489dee],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x349c16(0x7c),'recoveredCount':0x0,'lookupCommand':_0x349c16(0xb6)}});}const _0x31cf78=[];for(const _0x1d28e9 of _0x5c4237){const _0x33ce34=Number(_0x1d28e9['id']),_0x47eb80=_0x1b982e[_0x349c16(0x9f)][_0x349c16(0xe7)](_0x33ce34),_0x4efbae=_0x432e6c[_0x349c16(0xe3)][_0x349c16(0xe7)](_0x33ce34);try{verifyVisibilityUpdate(_0x47eb80,_0x4efbae,_0x1b982e[_0x349c16(0xca)]['requestedVisible']);}catch(_0x132ba0){const _0x290037=asVerificationError(_0x132ba0,_0x349c16(0x96)+_0x33ce34+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x31cf78[_0x349c16(0x79)]({'id':_0x33ce34,'stage':_0x349c16(0x76),'code':_0x290037[_0x349c16(0xe1)],'message':_0x290037[_0x349c16(0x9d)],'requestedStateConfirmed':![]});}}for(const _0x59f2af of _0xd663e){const _0x22b6cb=_0x1b982e[_0x349c16(0x9f)]['get'](_0x59f2af),_0x4072f0=_0x432e6c[_0x349c16(0xe3)]['get'](_0x59f2af);try{verifyVisibilityUpdate(_0x22b6cb,_0x4072f0,_0x1b982e['plan']['requestedVisible']),_0x5c4237[_0x349c16(0x79)]({'id':_0x59f2af,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x17a6cf){const _0x45408f=asVerificationError(_0x17a6cf,_0x349c16(0xd3)+_0x59f2af+_0x349c16(0xda));_0x31cf78[_0x349c16(0x79)]({'id':_0x59f2af,'stage':_0x349c16(0xcf),'code':_0x45408f[_0x349c16(0xe1)],'message':_0x45408f[_0x349c16(0x9d)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x31cf78[_0x349c16(0xcc)]>0x0){const _0x44573b=_0x31cf78[_0x349c16(0x7e)](_0x55a78c=>Number(_0x55a78c['id'])),_0x297a80=_0x5c4237[_0x349c16(0xa2)](_0x1ab595=>_0x1ab595[_0x349c16(0x97)]===!![])[_0x349c16(0xcc)],_0x5e4772=menuError(_0x349c16(0xe8),_0x349c16(0xea)+_0x44573b['join'](',\x20')+'.',_0x349c16(0xad));throw menuFailure(_0x5e4772,_0x1b982e[_0x349c16(0xca)],{'stage':_0x349c16(0x76),'succeeded':_0x5c4237,'failedRecords':[..._0x37182f,..._0x31cf78],'warnings':[_0x349c16(0xa4)],'verification':{'status':'failed',..._0x44573b['length']===0x1?{'targetId':_0x44573b[0x0]}:{'targetIds':_0x44573b},'recoveredCount':_0x297a80,'lookupCommand':_0x349c16(0xb6)}});}const _0x599066=_0x5c4237[_0x349c16(0xa2)](_0x116ce9=>_0x116ce9[_0x349c16(0xa6)]===!![])[_0x349c16(0xcc)],_0x396f4e=_0x5c4237[_0x349c16(0xcc)]-_0x599066,_0x81e03a={..._0x1b982e[_0x349c16(0xca)],'succeeded':_0x5c4237,'failed':_0x37182f,'warnings':_0x37182f[_0x349c16(0xcc)]>0x0?[..._0x1b982e['plan'][_0x349c16(0xbc)],_0x349c16(0xd4)]:_0x1b982e[_0x349c16(0xca)][_0x349c16(0xbc)],'verification':{'checkedBy':_0x349c16(0x99),'snapshotHash':_0x432e6c[_0x349c16(0x71)],'matchesRequestedState':_0x37182f[_0x349c16(0xcc)]===0x0,'recoveredCount':_0xd663e['length']}};return{'ok':_0x37182f[_0x349c16(0xcc)]===0x0,'data':_0x81e03a,'message':_0x37182f[_0x349c16(0xcc)]===0x0?'Updated\x20visibility\x20for\x20'+_0x599066+_0x349c16(0xdc)+_0x396f4e+_0x349c16(0x8b):'Menu\x20visibility\x20update\x20completed:\x20'+_0x599066+_0x349c16(0xa9)+_0x396f4e+_0x349c16(0xa7)+_0x37182f[_0x349c16(0xcc)]+_0x349c16(0x8d)};}};function parseInput(_0x51f9d1){const _0x1c273d=a135_0x461eec,_0x278771=parseMenuIds(_0x51f9d1[_0x1c273d(0xe9)]('menu-ids')),_0x4adcc6=parseCsv(_0x51f9d1[_0x1c273d(0xe9)]('paths'));if(_0x278771[_0x1c273d(0xcc)]===0x0&&_0x4adcc6[_0x1c273d(0xcc)]===0x0)throw CliErrors[_0x1c273d(0x9c)](_0x1c273d(0x90));const _0x3a4d5b=parseBooleanFlag(_0x51f9d1,'visible',!![]),_0x51c66e=parseBooleanFlag(_0x51f9d1,_0x1c273d(0xbd),![]);let _0x57ccea;if(hasFlag(_0x51f9d1,_0x1c273d(0xa0))){_0x57ccea=_0x51f9d1[_0x1c273d(0xb4)]('expected-count');if(!Number[_0x1c273d(0x83)](_0x57ccea)||_0x57ccea<0x0)throw CliErrors[_0x1c273d(0x9c)](_0x1c273d(0xdf));}return{'menuIds':_0x278771,'paths':_0x4adcc6,'visible':_0x3a4d5b,'expectVisible':_0x51c66e,'expectedCount':_0x57ccea};}async function buildPlan(_0x1971c5,_0x22ea98){const _0x36a876=a135_0x461eec,_0x28dec3=parseInput(_0x1971c5),_0x1adae3=await fetchMutationSnapshot(_0x1971c5,_0x36a876(0xcd)),_0x4c0a19=selectTargets(_0x1adae3[_0x36a876(0xbb)],_0x28dec3['menuIds'],_0x28dec3['paths']);if(_0x28dec3[_0x36a876(0xc9)]!==undefined&&_0x4c0a19[_0x36a876(0xcc)]!==_0x28dec3[_0x36a876(0xc9)])throw menuError(_0x36a876(0xcb),_0x36a876(0xbf)+_0x4c0a19[_0x36a876(0xcc)]+'\x20menu(s),\x20expected\x20'+_0x28dec3[_0x36a876(0xc9)]+'.',_0x36a876(0xa1));if(_0x28dec3[_0x36a876(0x7a)]!==undefined){const _0x84ddd6=_0x4c0a19[_0x36a876(0xa2)](_0x52b0c5=>_0x52b0c5[_0x36a876(0xb8)]!==_0x28dec3[_0x36a876(0x7a)]);if(_0x84ddd6[_0x36a876(0xcc)]>0x0)throw menuError(_0x36a876(0x98),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x84ddd6[_0x36a876(0x7e)](_0x1e9cb7=>_0x1e9cb7['id'])['join'](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x1c41a6=_0x4c0a19[_0x36a876(0x7e)](_0xf873dc=>({'id':_0xf873dc['id'],'label':_0xf873dc[_0x36a876(0x81)],'path':_0xf873dc[_0x36a876(0xb9)],'before':{'visible':_0xf873dc[_0x36a876(0xb8)]},'after':{'visible':_0x28dec3['visible']}})),_0x7fd66c=_0x1c41a6[_0x36a876(0xa2)](_0x2e9b64=>_0x2e9b64['before'][_0x36a876(0xb8)]!==_0x28dec3['visible'])['map'](_0x190de1=>({'stage':_0x36a876(0x9b),'method':_0x36a876(0xc1),'path':_0x36a876(0xe4),'body':{'appCode':_0x1971c5[_0x36a876(0x8e)],'id':_0x190de1['id'],'visible':_0x28dec3[_0x36a876(0xb8)]}})),_0x958d25=mutationResult({'operation':_0x36a876(0xd8),'selector':{'menuIds':_0x28dec3[_0x36a876(0x73)],'paths':_0x28dec3['paths']},'before':{'menus':_0x4c0a19[_0x36a876(0x7e)](_0x489811=>({'id':_0x489811['id'],'path':_0x489811[_0x36a876(0xb9)],'visible':_0x489811['visible']}))},'after':{'menus':_0x4c0a19['map'](_0x5ac948=>({'id':_0x5ac948['id'],'path':_0x5ac948['path'],'visible':_0x28dec3[_0x36a876(0xb8)]}))},'dryRun':_0x22ea98,'backend':[...BACKEND],'plannedActions':_0x7fd66c,'snapshotHash':_0x1adae3['hash'],'warnings':_0x7fd66c[_0x36a876(0xcc)]===0x0?[_0x36a876(0x91)]:[]});return{'plan':{..._0x958d25,'requestedVisible':_0x28dec3[_0x36a876(0xb8)],'targets':_0x1c41a6},'beforeById':new Map(_0x4c0a19[_0x36a876(0x7e)](_0x357135=>[_0x357135['id'],_0x357135]))};}function selectTargets(_0x6d4a34,_0x2f10f3,_0x559155){const _0xe7e6fd=a135_0x461eec,_0x440371=new Map(_0x6d4a34[_0xe7e6fd(0x7e)](_0x398ffe=>[_0x398ffe['id'],_0x398ffe])),_0x515670=new Map(),_0x409366=_0x2f10f3[_0xe7e6fd(0xa2)](_0x5d0bfd=>!_0x440371[_0xe7e6fd(0xdb)](_0x5d0bfd));if(_0x409366[_0xe7e6fd(0xcc)]>0x0)throw menuError(_0xe7e6fd(0xba),_0xe7e6fd(0x78)+_0x409366['join'](',\x20')+'.',_0xe7e6fd(0x93));for(const _0x5259c7 of _0x2f10f3){_0x515670[_0xe7e6fd(0xc2)](_0x5259c7,_0x440371['get'](_0x5259c7));}for(const _0x3d756a of _0x559155){const _0x4b67a1=_0x6d4a34['filter'](_0x271d8b=>_0x271d8b[_0xe7e6fd(0xb9)]===_0x3d756a);if(_0x4b67a1[_0xe7e6fd(0xcc)]===0x0)throw menuError(_0xe7e6fd(0xba),_0xe7e6fd(0x7b)+JSON['stringify'](_0x3d756a)+'.',_0xe7e6fd(0x9a));if(_0x4b67a1['length']>0x1)throw menuError(_0xe7e6fd(0xd9),_0xe7e6fd(0xab)+JSON[_0xe7e6fd(0xb2)](_0x3d756a)+'.',_0xe7e6fd(0xa8)+_0x4b67a1[_0xe7e6fd(0x7e)](_0x3f5e8d=>_0x3f5e8d['id'])[_0xe7e6fd(0x80)](',\x20')+'.');const _0x23fa41=_0x4b67a1[0x0];_0x515670[_0xe7e6fd(0xc2)](_0x23fa41['id'],_0x23fa41);}return[..._0x515670[_0xe7e6fd(0x84)]()];}function parseMenuIds(_0x28253a){const _0x3ebe0c=a135_0x461eec,_0x1891f0=parseCsv(_0x28253a),_0x361faa=_0x1891f0[_0x3ebe0c(0x7e)](Number);if(_0x361faa[_0x3ebe0c(0x82)](_0x18a43b=>!Number[_0x3ebe0c(0x83)](_0x18a43b)||_0x18a43b<=0x0))throw CliErrors['validation'](_0x3ebe0c(0x75));return[...new Set(_0x361faa)];}function parseCsv(_0x2dd719){const _0x255045=a135_0x461eec;return[...new Set(_0x2dd719[_0x255045(0xc0)](',')[_0x255045(0x7e)](_0x4ad687=>_0x4ad687['trim']())['filter'](Boolean))];}function parseBooleanFlag(_0x2f58eb,_0x313263,_0x3a6ddc){const _0x59e4ca=a135_0x461eec;if(!hasFlag(_0x2f58eb,_0x313263)){if(_0x3a6ddc)throw CliErrors[_0x59e4ca(0xde)](_0x313263);return undefined;}const _0x123890=_0x2f58eb['rawFlags'][_0x313263];if(_0x123890===!![]||_0x123890===![])return _0x123890;if(_0x123890===_0x59e4ca(0x94))return!![];if(_0x123890===_0x59e4ca(0x86))return![];throw CliErrors[_0x59e4ca(0x9c)]('--'+_0x313263+_0x59e4ca(0xd2));}function verifyVisibilityUpdate(_0x2f9ce4,_0x1e735f,_0x261bcc){const _0x2eb79b=a135_0x461eec;assertVerified(!!_0x1e735f,'Menu\x20'+_0x2f9ce4['id']+_0x2eb79b(0xc5)),assertVerified(_0x1e735f[_0x2eb79b(0xb8)]===_0x261bcc,_0x2eb79b(0x96)+_0x2f9ce4['id']+_0x2eb79b(0x88));const _0x2c8871=[['id',_0x1e735f['id'],_0x2f9ce4['id']],[_0x2eb79b(0xeb),_0x1e735f['parentId'],_0x2f9ce4[_0x2eb79b(0xeb)]],[_0x2eb79b(0xe0),_0x1e735f[_0x2eb79b(0xe0)],_0x2f9ce4[_0x2eb79b(0xe0)]],[_0x2eb79b(0x81),_0x1e735f[_0x2eb79b(0x81)],_0x2f9ce4[_0x2eb79b(0x81)]],[_0x2eb79b(0xb9),_0x1e735f['path'],_0x2f9ce4[_0x2eb79b(0xb9)]],['url',_0x1e735f['url'],_0x2f9ce4['url']],[_0x2eb79b(0xb0),_0x1e735f[_0x2eb79b(0xb0)],_0x2f9ce4['type']],[_0x2eb79b(0xb5),_0x1e735f['sort'],_0x2f9ce4[_0x2eb79b(0xb5)]],[_0x2eb79b(0xc3),_0x1e735f['resources'],_0x2f9ce4['resources']],['resourcesValid',_0x1e735f[_0x2eb79b(0xaa)],_0x2f9ce4[_0x2eb79b(0xaa)]],[_0x2eb79b(0xa3),_0x1e735f[_0x2eb79b(0xa3)],_0x2f9ce4[_0x2eb79b(0xa3)]],['childrenCount',_0x1e735f[_0x2eb79b(0xa5)],_0x2f9ce4[_0x2eb79b(0xa5)]],['pageId',_0x1e735f[_0x2eb79b(0x7f)],_0x2f9ce4[_0x2eb79b(0x7f)]],['pageType',_0x1e735f[_0x2eb79b(0xc4)],_0x2f9ce4['pageType']],[_0x2eb79b(0xdd),_0x1e735f[_0x2eb79b(0xdd)],_0x2f9ce4[_0x2eb79b(0xdd)]],[_0x2eb79b(0xc7),_0x1e735f[_0x2eb79b(0xc7)],_0x2f9ce4['datasetId']],[_0x2eb79b(0xbe),_0x1e735f['datasetCode'],_0x2f9ce4[_0x2eb79b(0xbe)]]];for(const [_0x38616a,_0x233bd3,_0x2cdb58]of _0x2c8871){assertVerified(sameValue(_0x233bd3,_0x2cdb58),'Menu\x20'+_0x2f9ce4['id']+'\x20'+_0x38616a+_0x2eb79b(0xc8));}}function sameValue(_0x47fe14,_0x1ac27b){const _0x14363b=a135_0x461eec;if(Array[_0x14363b(0xe2)](_0x47fe14)||Array[_0x14363b(0xe2)](_0x1ac27b))return JSON[_0x14363b(0xb2)](_0x47fe14)===JSON[_0x14363b(0xb2)](_0x1ac27b);return _0x47fe14===_0x1ac27b;}
@@ -1 +1 @@
1
- function a136_0x5f49(_0x4b9fe8,_0x29a51e){_0x4b9fe8=_0x4b9fe8-0x152;const _0x128738=a136_0x1287();let _0x5f4948=_0x128738[_0x4b9fe8];return _0x5f4948;}const a136_0xd3d0fd=a136_0x5f49;(function(_0x28f068,_0x1ef1c2){const _0x212650=a136_0x5f49,_0x5d766a=_0x28f068();while(!![]){try{const _0x4eb1e4=parseInt(_0x212650(0x162))/0x1*(-parseInt(_0x212650(0x16d))/0x2)+-parseInt(_0x212650(0x157))/0x3*(-parseInt(_0x212650(0x178))/0x4)+-parseInt(_0x212650(0x164))/0x5*(-parseInt(_0x212650(0x177))/0x6)+-parseInt(_0x212650(0x15d))/0x7*(-parseInt(_0x212650(0x172))/0x8)+-parseInt(_0x212650(0x153))/0x9*(-parseInt(_0x212650(0x15f))/0xa)+-parseInt(_0x212650(0x15e))/0xb*(-parseInt(_0x212650(0x15a))/0xc)+-parseInt(_0x212650(0x176))/0xd;if(_0x4eb1e4===_0x1ef1c2)break;else _0x5d766a['push'](_0x5d766a['shift']());}catch(_0x446715){_0x5d766a['push'](_0x5d766a['shift']());}}}(a136_0x1287,0xbb745));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';function a136_0x1287(){const _0x4bd55b=['connectTimeout','planned','channelConfig','9296nAkrmS','description','isSafeInteger','appCode','29145298MAZHgA','517014OmPNBJ','32aLhfnF','/notification/channel-config/create',';\x20no\x20automatic\x20retry\x20was\x20attempted.','verified','608760jCvOcD','verification',';\x20do\x20not\x20resubmit.','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','165063laqOqh','readTimeout','channelType','7104aHREIc','configName','configCode','4690DjUkLt','18095eaXBMZ','40mIzEUl','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','36aVGxOC','mutation','75HtSBvX','notification_config_create_outcome_unknown','POST','config-create','document','Inspect\x20with\x20',';\x20do\x20not\x20resubmit\x20automatically.','endpointUrl','input','41438HovmVP','create'];a136_0x1287=function(){return _0x4bd55b;};return a136_0x1287();}const CREATE_PATH=a136_0xd3d0fd(0x179);async function prepareCreate(_0x35c461){const _0x3689de=a136_0xd3d0fd,_0x4c7c37=await readNotificationDocument(_0x35c461,'create'),_0x41129c=createMutationInput(_0x35c461[_0x3689de(0x175)],_0x4c7c37);return{'document':_0x4c7c37,'input':_0x41129c,'planned':projectNotificationConfig({'appCode':_0x35c461[_0x3689de(0x175)],'configName':_0x4c7c37[_0x3689de(0x15b)],'channelType':_0x4c7c37[_0x3689de(0x159)],'endpointUrl':_0x4c7c37[_0x3689de(0x16b)],'channelConfig':_0x4c7c37[_0x3689de(0x171)],'description':_0x4c7c37[_0x3689de(0x173)],'connectTimeout':_0x4c7c37[_0x3689de(0x16f)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x4c7c37[_0x3689de(0x158)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a136_0xd3d0fd(0x167),'description':a136_0xd3d0fd(0x161),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2b6583){assertSingleNotificationSource(_0x2b6583);},async 'dryRun'(_0x2cd396){const _0x3fa447=a136_0xd3d0fd,_0x2a54e0=await prepareCreate(_0x2cd396),_0x1a9d71=notificationLookupCommand(_0x2cd396['appCode'],_0x2a54e0[_0x3fa447(0x168)][_0x3fa447(0x159)]);return asDryRunResult({'operation':_0x3fa447(0x16e),'selector':{'appCode':_0x2cd396[_0x3fa447(0x175)],'configName':_0x2a54e0[_0x3fa447(0x168)][_0x3fa447(0x15b)],'channelType':_0x2a54e0[_0x3fa447(0x168)][_0x3fa447(0x159)]},'before':null,'after':_0x2a54e0[_0x3fa447(0x170)],'dryRun':!![],'backend':{'method':_0x3fa447(0x166),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3fa447(0x170),'lookupCommand':_0x1a9d71}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0xd7f6e9){const _0x3a2977=a136_0xd3d0fd,_0x53256c=await prepareCreate(_0xd7f6e9),_0x3759e4=notificationLookupCommand(_0xd7f6e9['appCode'],_0x53256c[_0x3a2977(0x168)][_0x3a2977(0x159)]);let _0x58d7f3;try{_0x58d7f3=await createNotificationChannelConfig(_0x53256c[_0x3a2977(0x16c)]);}catch(_0x8e2979){if(isPlatformTransportFailure(_0x8e2979))throw notificationError(_0x3a2977(0x165),_0x3a2977(0x160),_0x3a2977(0x169)+_0x3759e4+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x3a2977(0x16e),_0x3a2977(0x163),_0x3a2977(0x169)+_0x3759e4+_0x3a2977(0x17a));}if(!Number[_0x3a2977(0x174)](_0x58d7f3)||_0x58d7f3<=0x0)throw notificationError(_0x3a2977(0x165),_0x3a2977(0x156),_0x3a2977(0x169)+_0x3759e4+_0x3a2977(0x155));let _0x1b3e49;try{const _0x453997=await getNotificationChannelConfig(_0x58d7f3,_0xd7f6e9[_0x3a2977(0x175)]);_0x1b3e49=normalizeExactNotificationConfig(_0x453997,_0x58d7f3,_0xd7f6e9['appCode']);}catch{throw safeApiFailure('create',_0x3a2977(0x154),_0x3a2977(0x169)+_0x3759e4+_0x3a2977(0x16a));}return{'ok':!![],'data':{'operation':_0x3a2977(0x16e),'selector':{'appCode':_0x1b3e49['appCode'],'id':_0x1b3e49['id'],'configCode':_0x1b3e49[_0x3a2977(0x15c)],'configName':_0x1b3e49[_0x3a2977(0x15b)],'channelType':_0x1b3e49[_0x3a2977(0x159)]},'before':null,'after':projectNotificationConfig(_0x1b3e49),'dryRun':![],'backend':{'method':_0x3a2977(0x166),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3a2977(0x152),'lookupCommand':_0x3759e4}},'message':'Created\x20notification\x20config\x20'+_0x1b3e49['id']};}};
1
+ const a136_0x2d04c6=a136_0x301d;function a136_0x301d(_0x2af32e,_0x207557){_0x2af32e=_0x2af32e-0xd4;const _0x291ec6=a136_0x291e();let _0x301d35=_0x291ec6[_0x2af32e];return _0x301d35;}(function(_0x14788a,_0x25f278){const _0xf48a2=a136_0x301d,_0x100377=_0x14788a();while(!![]){try{const _0x26b43e=-parseInt(_0xf48a2(0xed))/0x1+-parseInt(_0xf48a2(0xd6))/0x2*(parseInt(_0xf48a2(0xea))/0x3)+parseInt(_0xf48a2(0xd7))/0x4*(-parseInt(_0xf48a2(0xeb))/0x5)+-parseInt(_0xf48a2(0xdf))/0x6*(parseInt(_0xf48a2(0xdb))/0x7)+-parseInt(_0xf48a2(0xe7))/0x8+-parseInt(_0xf48a2(0xda))/0x9*(-parseInt(_0xf48a2(0xe1))/0xa)+parseInt(_0xf48a2(0xe4))/0xb*(parseInt(_0xf48a2(0xe0))/0xc);if(_0x26b43e===_0x25f278)break;else _0x100377['push'](_0x100377['shift']());}catch(_0x31629a){_0x100377['push'](_0x100377['shift']());}}}(a136_0x291e,0x4151f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a136_0x291e(){const _0x1bb211=['12mqnxqb','3110MttycM',';\x20do\x20not\x20resubmit.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','10047917WKgHag','endpointUrl','verified','133688KFfPQp','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20','11031fhsFVs','300305uEonCY',';\x20no\x20automatic\x20retry\x20was\x20attempted.','217040nTxrRr','appCode','config-create','mutation','Created\x20notification\x20config\x20','document','configName','notification_config_create_outcome_unknown','channelType','notification','36JwyWvq','4AVSLKr',';\x20do\x20not\x20resubmit\x20automatically.','create','549OOwVXr','2134083UdtOdd','POST','input','planned','6KpvRfS'];a136_0x291e=function(){return _0x1bb211;};return a136_0x291e();}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(_0x1d7f1f){const _0x1afcb1=a136_0x301d,_0x1164f3=await readNotificationDocument(_0x1d7f1f,_0x1afcb1(0xd9)),_0x267bc9=createMutationInput(_0x1d7f1f[_0x1afcb1(0xee)],_0x1164f3);return{'document':_0x1164f3,'input':_0x267bc9,'planned':projectNotificationConfig({'appCode':_0x1d7f1f[_0x1afcb1(0xee)],'configName':_0x1164f3[_0x1afcb1(0xf3)],'channelType':_0x1164f3[_0x1afcb1(0xd4)],'endpointUrl':_0x1164f3[_0x1afcb1(0xe5)],'channelConfig':_0x1164f3['channelConfig'],'description':_0x1164f3['description'],'connectTimeout':_0x1164f3['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1164f3['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a136_0x2d04c6(0xd5),'command':a136_0x2d04c6(0xef),'description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2edefc){assertSingleNotificationSource(_0x2edefc);},async 'dryRun'(_0x19fc98){const _0x2dfe03=a136_0x2d04c6,_0x2545d2=await prepareCreate(_0x19fc98),_0x30c141=notificationLookupCommand(_0x19fc98['appCode'],_0x2545d2[_0x2dfe03(0xf2)][_0x2dfe03(0xd4)]);return asDryRunResult({'operation':_0x2dfe03(0xd9),'selector':{'appCode':_0x19fc98[_0x2dfe03(0xee)],'configName':_0x2545d2[_0x2dfe03(0xf2)][_0x2dfe03(0xf3)],'channelType':_0x2545d2[_0x2dfe03(0xf2)][_0x2dfe03(0xd4)]},'before':null,'after':_0x2545d2[_0x2dfe03(0xde)],'dryRun':!![],'backend':{'method':_0x2dfe03(0xdc),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2dfe03(0xde),'lookupCommand':_0x30c141}},{'method':_0x2dfe03(0xdc),'url':CREATE_PATH});},async 'execute'(_0x2156ad){const _0x2d77fa=a136_0x2d04c6,_0x260019=await prepareCreate(_0x2156ad),_0x3a5bd0=notificationLookupCommand(_0x2156ad[_0x2d77fa(0xee)],_0x260019[_0x2d77fa(0xf2)][_0x2d77fa(0xd4)]);let _0x1e7730;try{_0x1e7730=await createNotificationChannelConfig(_0x260019[_0x2d77fa(0xdd)]);}catch(_0x2b0a55){if(isPlatformTransportFailure(_0x2b0a55))throw notificationError(_0x2d77fa(0xf4),_0x2d77fa(0xe3),_0x2d77fa(0xe9)+_0x3a5bd0+_0x2d77fa(0xe2));throw safeApiFailure('create',_0x2d77fa(0xf0),'Inspect\x20with\x20'+_0x3a5bd0+_0x2d77fa(0xec));}if(!Number['isSafeInteger'](_0x1e7730)||_0x1e7730<=0x0)throw notificationError(_0x2d77fa(0xf4),_0x2d77fa(0xe8),_0x2d77fa(0xe9)+_0x3a5bd0+';\x20do\x20not\x20resubmit.');let _0x1c507b;try{const _0x2e4876=await getNotificationChannelConfig(_0x1e7730,_0x2156ad['appCode']);_0x1c507b=normalizeExactNotificationConfig(_0x2e4876,_0x1e7730,_0x2156ad[_0x2d77fa(0xee)]);}catch{throw safeApiFailure(_0x2d77fa(0xd9),'verification',_0x2d77fa(0xe9)+_0x3a5bd0+_0x2d77fa(0xd8));}return{'ok':!![],'data':{'operation':_0x2d77fa(0xd9),'selector':{'appCode':_0x1c507b[_0x2d77fa(0xee)],'id':_0x1c507b['id'],'configCode':_0x1c507b['configCode'],'configName':_0x1c507b[_0x2d77fa(0xf3)],'channelType':_0x1c507b['channelType']},'before':null,'after':projectNotificationConfig(_0x1c507b),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2d77fa(0xe6),'lookupCommand':_0x3a5bd0}},'message':_0x2d77fa(0xf1)+_0x1c507b['id']};}};
@@ -1 +1 @@
1
- const a137_0x15a15d=a137_0x3b5c;function a137_0x2da2(){const _0x3accf6=['Inspect\x20with\x20','high-risk-write','1418709rBIHIx','\x20remains\x20present\x20after\x20delete.',';\x20do\x20not\x20resubmit\x20automatically.','/notification/channel-config/delete','POST','62936TzonYX','appCode','2775390QeTKKm','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','notification_config_delete_outcome_unknown','9242730rXDBeM','Notification\x20config\x20','994MsfaOM','mutation','notification','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight',';\x20no\x20automatic\x20retry\x20was\x20attempted.','4epUUTi','delete','3035169ZHMAIT','notification_config_delete_verification_unavailable','channelType','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','planned','15gpUWHS','notification_config_delete_verification_failed','before','26260880MdSiDy','1801546BEOdqL'];a137_0x2da2=function(){return _0x3accf6;};return a137_0x2da2();}(function(_0x554108,_0x2ced7e){const _0x43445f=a137_0x3b5c,_0x2a7cc1=_0x554108();while(!![]){try{const _0x25176c=-parseInt(_0x43445f(0x20d))/0x1+-parseInt(_0x43445f(0x20a))/0x2+-parseInt(_0x43445f(0x201))/0x3*(parseInt(_0x43445f(0x1ff))/0x4)+parseInt(_0x43445f(0x206))/0x5*(parseInt(_0x43445f(0x1f5))/0x6)+-parseInt(_0x43445f(0x1fa))/0x7*(-parseInt(_0x43445f(0x1f3))/0x8)+-parseInt(_0x43445f(0x1f8))/0x9+parseInt(_0x43445f(0x209))/0xa;if(_0x25176c===_0x2ced7e)break;else _0x2a7cc1['push'](_0x2a7cc1['shift']());}catch(_0x3773ec){_0x2a7cc1['push'](_0x2a7cc1['shift']());}}}(a137_0x2da2,0xbca72));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a137_0x15a15d(0x210),REFERENCE_WARNING=a137_0x15a15d(0x204);function a137_0x3b5c(_0x9eea9,_0x3f5cf4){_0x9eea9=_0x9eea9-0x1f2;const _0x2da26f=a137_0x2da2();let _0x3b5cda=_0x2da26f[_0x9eea9];return _0x3b5cda;}async function prepareDelete(_0x2218a6){const _0x57d09e=a137_0x15a15d,_0x690be0=readNotificationId(_0x2218a6),_0x10a312=await requireExactNotificationConfig(_0x2218a6[_0x57d09e(0x1f4)],_0x690be0,_0x57d09e(0x200));return{'id':_0x690be0,'before':_0x10a312};}export const notificationConfigDelete={'service':a137_0x15a15d(0x1fc),'command':'config-delete','description':a137_0x15a15d(0x1fd),'risk':a137_0x15a15d(0x20c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x3b6c35){readNotificationId(_0x3b6c35),requireNotificationExplicitYes(_0x3b6c35);},async 'dryRun'(_0x295f0d){const _0x3982c4=a137_0x15a15d,_0x320df8=await prepareDelete(_0x295f0d),_0x4723e9=notificationLookupCommand(_0x295f0d[_0x3982c4(0x1f4)],_0x320df8[_0x3982c4(0x208)]['channelType']);return asDryRunResult({'operation':_0x3982c4(0x200),'selector':notificationSelector(_0x320df8[_0x3982c4(0x208)]),'before':projectNotificationConfig(_0x320df8[_0x3982c4(0x208)]),'after':null,'dryRun':!![],'backend':{'method':_0x3982c4(0x1f2),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x3982c4(0x205),'lookupCommand':_0x4723e9}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x45a9bb){const _0x56146b=a137_0x15a15d;requireNotificationExplicitYes(_0x45a9bb);const _0x28d099=await prepareDelete(_0x45a9bb),_0x420a34=notificationLookupCommand(_0x45a9bb[_0x56146b(0x1f4)],_0x28d099[_0x56146b(0x208)]['channelType']);let _0x22b72e=![];try{await deleteNotificationChannelConfig(_0x28d099['id'],_0x45a9bb[_0x56146b(0x1f4)]);}catch(_0x27c320){if(!isPlatformTransportFailure(_0x27c320))throw safeApiFailure(_0x56146b(0x200),_0x56146b(0x1fb),_0x56146b(0x20b)+_0x420a34+_0x56146b(0x1fe));_0x22b72e=!![];}let _0x4f17cf;try{_0x4f17cf=await listNotificationChannelConfigs(_0x45a9bb['appCode'],_0x28d099['before']['channelType']),validateNotificationDeleteReadback(_0x4f17cf,_0x45a9bb[_0x56146b(0x1f4)],_0x28d099[_0x56146b(0x208)][_0x56146b(0x203)]);}catch{throw notificationError(_0x22b72e?'notification_config_delete_outcome_unknown':_0x56146b(0x202),_0x56146b(0x1f9)+_0x28d099['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x56146b(0x20b)+_0x420a34+_0x56146b(0x20f));}if(_0x4f17cf['some'](_0x39ff95=>_0x39ff95['id']===_0x28d099['id']))throw notificationError(_0x22b72e?_0x56146b(0x1f7):_0x56146b(0x207),_0x56146b(0x1f9)+_0x28d099['id']+_0x56146b(0x20e),_0x56146b(0x20b)+_0x420a34+';\x20do\x20not\x20resubmit\x20automatically.');const _0x21cbb5=[REFERENCE_WARNING];return _0x22b72e&&_0x21cbb5['unshift'](_0x56146b(0x1f6)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x28d099[_0x56146b(0x208)]),'before':projectNotificationConfig(_0x28d099[_0x56146b(0x208)]),'after':null,'dryRun':![],'backend':{'method':_0x56146b(0x1f2),'path':DELETE_PATH},'warnings':_0x21cbb5,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x22b72e,'lookupCommand':_0x420a34}},'message':'Deleted\x20notification\x20config\x20'+_0x28d099['id']};}};
1
+ const a137_0x5c08dd=a137_0xdd87;(function(_0x5f5108,_0x55d722){const _0xb492d7=a137_0xdd87,_0x4ef900=_0x5f5108();while(!![]){try{const _0x2a5e30=-parseInt(_0xb492d7(0x83))/0x1*(-parseInt(_0xb492d7(0x84))/0x2)+-parseInt(_0xb492d7(0x80))/0x3*(parseInt(_0xb492d7(0x8a))/0x4)+parseInt(_0xb492d7(0x9a))/0x5*(-parseInt(_0xb492d7(0x8d))/0x6)+-parseInt(_0xb492d7(0x7f))/0x7+-parseInt(_0xb492d7(0x87))/0x8*(parseInt(_0xb492d7(0x93))/0x9)+parseInt(_0xb492d7(0x99))/0xa+parseInt(_0xb492d7(0x97))/0xb;if(_0x2a5e30===_0x55d722)break;else _0x4ef900['push'](_0x4ef900['shift']());}catch(_0x442479){_0x4ef900['push'](_0x4ef900['shift']());}}}(a137_0x4578,0xad61c));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_0xdd87(_0x5b0eef,_0x5c9f11){_0x5b0eef=_0x5b0eef-0x7c;const _0x4578bc=a137_0x4578();let _0xdd8743=_0x4578bc[_0x5b0eef];return _0xdd8743;}const DELETE_PATH=a137_0x5c08dd(0x8f),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';function a137_0x4578(){const _0x5c15fd=['\x20remains\x20present\x20after\x20delete.','appCode','27yPpDMW','notification_config_delete_verification_failed',';\x20do\x20not\x20resubmit\x20automatically.','channelType','23014211RbBwrd','delete','1498510QXgynr','5pakahq','verified','Notification\x20config\x20','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','unshift','POST','3893848fKjZYP','190083dBMgQh','Inspect\x20with\x20','some','1109npuGgg','1358rItwNo','high-risk-write','Deleted\x20notification\x20config\x20','860648tyJOVS','mutation',';\x20no\x20automatic\x20retry\x20was\x20attempted.','68egmugk','before','notification_config_delete_outcome_unknown','1972482BnMwLR','notification_config_delete_verification_unavailable','/notification/channel-config/delete','notification'];a137_0x4578=function(){return _0x5c15fd;};return a137_0x4578();}async function prepareDelete(_0x2ce6bc){const _0x2c6e05=a137_0x5c08dd,_0x129dc4=readNotificationId(_0x2ce6bc),_0xa772c7=await requireExactNotificationConfig(_0x2ce6bc[_0x2c6e05(0x92)],_0x129dc4,_0x2c6e05(0x98));return{'id':_0x129dc4,'before':_0xa772c7};}export const notificationConfigDelete={'service':a137_0x5c08dd(0x90),'command':'config-delete','description':a137_0x5c08dd(0x7c),'risk':a137_0x5c08dd(0x85),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xed0021){readNotificationId(_0xed0021),requireNotificationExplicitYes(_0xed0021);},async 'dryRun'(_0x2d6a8d){const _0x2b904f=a137_0x5c08dd,_0x3c8564=await prepareDelete(_0x2d6a8d),_0x232c4e=notificationLookupCommand(_0x2d6a8d[_0x2b904f(0x92)],_0x3c8564[_0x2b904f(0x8b)]['channelType']);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x3c8564['before']),'before':projectNotificationConfig(_0x3c8564[_0x2b904f(0x8b)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x232c4e}},{'method':_0x2b904f(0x7e),'url':DELETE_PATH});},async 'execute'(_0x4e2737){const _0x2e1cc4=a137_0x5c08dd;requireNotificationExplicitYes(_0x4e2737);const _0x4a1e5b=await prepareDelete(_0x4e2737),_0x104265=notificationLookupCommand(_0x4e2737[_0x2e1cc4(0x92)],_0x4a1e5b[_0x2e1cc4(0x8b)][_0x2e1cc4(0x96)]);let _0x3857ab=![];try{await deleteNotificationChannelConfig(_0x4a1e5b['id'],_0x4e2737['appCode']);}catch(_0x35d89a){if(!isPlatformTransportFailure(_0x35d89a))throw safeApiFailure(_0x2e1cc4(0x98),_0x2e1cc4(0x88),_0x2e1cc4(0x81)+_0x104265+_0x2e1cc4(0x89));_0x3857ab=!![];}let _0x44a7be;try{_0x44a7be=await listNotificationChannelConfigs(_0x4e2737[_0x2e1cc4(0x92)],_0x4a1e5b[_0x2e1cc4(0x8b)]['channelType']),validateNotificationDeleteReadback(_0x44a7be,_0x4e2737[_0x2e1cc4(0x92)],_0x4a1e5b[_0x2e1cc4(0x8b)][_0x2e1cc4(0x96)]);}catch{throw notificationError(_0x3857ab?_0x2e1cc4(0x8c):_0x2e1cc4(0x8e),_0x2e1cc4(0x9c)+_0x4a1e5b['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x2e1cc4(0x81)+_0x104265+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x44a7be[_0x2e1cc4(0x82)](_0x1f34bc=>_0x1f34bc['id']===_0x4a1e5b['id']))throw notificationError(_0x3857ab?_0x2e1cc4(0x8c):_0x2e1cc4(0x94),'Notification\x20config\x20'+_0x4a1e5b['id']+_0x2e1cc4(0x91),'Inspect\x20with\x20'+_0x104265+_0x2e1cc4(0x95));const _0x40f54a=[REFERENCE_WARNING];return _0x3857ab&&_0x40f54a[_0x2e1cc4(0x7d)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x4a1e5b[_0x2e1cc4(0x8b)]),'before':projectNotificationConfig(_0x4a1e5b[_0x2e1cc4(0x8b)]),'after':null,'dryRun':![],'backend':{'method':_0x2e1cc4(0x7e),'path':DELETE_PATH},'warnings':_0x40f54a,'verification':{'status':_0x2e1cc4(0x9b),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x3857ab,'lookupCommand':_0x104265}},'message':_0x2e1cc4(0x86)+_0x4a1e5b['id']};}};
@@ -1 +1 @@
1
- const a138_0x50ce04=a138_0x1860;(function(_0x238377,_0x1fb33d){const _0x219988=a138_0x1860,_0x44a984=_0x238377();while(!![]){try{const _0x572113=-parseInt(_0x219988(0xc3))/0x1*(-parseInt(_0x219988(0xc7))/0x2)+-parseInt(_0x219988(0xb8))/0x3*(-parseInt(_0x219988(0xc5))/0x4)+parseInt(_0x219988(0xba))/0x5+-parseInt(_0x219988(0xbe))/0x6*(parseInt(_0x219988(0xb5))/0x7)+-parseInt(_0x219988(0xc8))/0x8*(-parseInt(_0x219988(0xc0))/0x9)+-parseInt(_0x219988(0xb9))/0xa+-parseInt(_0x219988(0xbd))/0xb;if(_0x572113===_0x1fb33d)break;else _0x44a984['push'](_0x44a984['shift']());}catch(_0x3791c7){_0x44a984['push'](_0x44a984['shift']());}}}(a138_0x1e47,0xe018d));function a138_0x1e47(){const _0x51ade7=['3WzAVOv','6147870ZYEVHp','6351610QkHpER','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','appCode','31875569rRPfjj','3653532aSIOYA','type','14112468SyzqDE','Notification\x20channel\x20type','Found\x20','43vtZVEN','string','3391908EevBLF','EMAIL','62932ihQjkK','8nFArba','7glhMZS','read','config-list'];a138_0x1e47=function(){return _0x51ade7;};return a138_0x1e47();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a138_0x1860(_0x481bc7,_0x1aec28){_0x481bc7=_0x481bc7-0xb5;const _0x1e4711=a138_0x1e47();let _0x186010=_0x1e4711[_0x481bc7];return _0x186010;}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a138_0x50ce04(0xb7),'description':a138_0x50ce04(0xbb),'risk':a138_0x50ce04(0xb6),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a138_0x50ce04(0xbf),'type':a138_0x50ce04(0xc4),'description':a138_0x50ce04(0xc1),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a138_0x50ce04(0xc6)}],async 'validate'(_0x57e4b6){readNotificationChannelType(_0x57e4b6);},async 'execute'(_0x3dafdc){const _0xf4ad48=a138_0x50ce04,_0x7e510=readNotificationChannelType(_0x3dafdc),_0x62ef68=await listNotificationChannelConfigs(_0x3dafdc[_0xf4ad48(0xbc)],_0x7e510),_0x2ef30c=_0x62ef68['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x3dafdc[_0xf4ad48(0xbc)],'channelType':_0x7e510,'count':_0x2ef30c['length'],'configs':_0x2ef30c},'message':_0xf4ad48(0xc2)+_0x2ef30c['length']+'\x20'+_0x7e510+'\x20notification\x20config(s)'};}};
1
+ const a138_0x54cefe=a138_0x2f52;(function(_0x2c184b,_0x506e88){const _0x46d39=a138_0x2f52,_0x149374=_0x2c184b();while(!![]){try{const _0x175d23=-parseInt(_0x46d39(0x1a2))/0x1*(parseInt(_0x46d39(0x1a3))/0x2)+parseInt(_0x46d39(0x199))/0x3+parseInt(_0x46d39(0x198))/0x4+-parseInt(_0x46d39(0x1a6))/0x5*(-parseInt(_0x46d39(0x1a5))/0x6)+-parseInt(_0x46d39(0x19a))/0x7+parseInt(_0x46d39(0x1aa))/0x8*(parseInt(_0x46d39(0x1a4))/0x9)+-parseInt(_0x46d39(0x1a8))/0xa;if(_0x175d23===_0x506e88)break;else _0x149374['push'](_0x149374['shift']());}catch(_0x3356da){_0x149374['push'](_0x149374['shift']());}}}(a138_0x2a11,0x2de11));function a138_0x2a11(){const _0x2b47b2=['370488rDngEr','1005018TgNVGb','Notification\x20channel\x20type','notification','map','string','length','EMAIL','appCode','1TfnWPJ','692006PnPalX','1461933yuTsUg','98442yFMphR','65MvYyiy','type','2409020pDIiXr','Found\x20','16EycmQs','1026956WnvXYw'];a138_0x2a11=function(){return _0x2b47b2;};return a138_0x2a11();}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_0x2f52(_0x597073,_0x1eda1c){_0x597073=_0x597073-0x198;const _0x2a1181=a138_0x2a11();let _0x2f52c7=_0x2a1181[_0x597073];return _0x2f52c7;}export const notificationConfigList={'service':a138_0x54cefe(0x19c),'command':'config-list','description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a138_0x54cefe(0x1a7),'type':a138_0x54cefe(0x19e),'description':a138_0x54cefe(0x19b),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a138_0x54cefe(0x1a0)}],async 'validate'(_0x2ed386){readNotificationChannelType(_0x2ed386);},async 'execute'(_0x396417){const _0x4444d7=a138_0x54cefe,_0x8e1295=readNotificationChannelType(_0x396417),_0x4a7429=await listNotificationChannelConfigs(_0x396417[_0x4444d7(0x1a1)],_0x8e1295),_0xfb7edd=_0x4a7429[_0x4444d7(0x19d)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x396417[_0x4444d7(0x1a1)],'channelType':_0x8e1295,'count':_0xfb7edd[_0x4444d7(0x19f)],'configs':_0xfb7edd},'message':_0x4444d7(0x1a9)+_0xfb7edd[_0x4444d7(0x19f)]+'\x20'+_0x8e1295+'\x20notification\x20config(s)'};}};
@@ -1 +1 @@
1
- const a139_0x268228=a139_0x4c33;(function(_0x42566c,_0x405662){const _0x164d48=a139_0x4c33,_0x5991ff=_0x42566c();while(!![]){try{const _0x16e050=parseInt(_0x164d48(0x162))/0x1+parseInt(_0x164d48(0x150))/0x2*(parseInt(_0x164d48(0x14b))/0x3)+-parseInt(_0x164d48(0x13d))/0x4*(-parseInt(_0x164d48(0x142))/0x5)+parseInt(_0x164d48(0x157))/0x6+parseInt(_0x164d48(0x15c))/0x7*(-parseInt(_0x164d48(0x141))/0x8)+parseInt(_0x164d48(0x161))/0x9*(-parseInt(_0x164d48(0x151))/0xa)+-parseInt(_0x164d48(0x147))/0xb;if(_0x16e050===_0x405662)break;else _0x5991ff['push'](_0x5991ff['shift']());}catch(_0x23a09c){_0x5991ff['push'](_0x5991ff['shift']());}}}(a139_0x4a42,0x1dd4d));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';function a139_0x4c33(_0x3b595a,_0x2dec82){_0x3b595a=_0x3b595a-0x13d;const _0x4a4238=a139_0x4a42();let _0x4c3319=_0x4a4238[_0x3b595a];return _0x4c3319;}function a139_0x4a42(){const _0xc59aae=['Inspect\x20with\x20--id\x20','payload','2106247EOQubO','\x20via\x20','Inspect\x20ID\x20','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','55761ZJKoEy','before','Notification\x20config\x20','high-risk-write','planned','6CTcEbq','435790mNnGTP','allMatch','notification','Updated\x20notification\x20config\x20','provesChange','mutation','824898dxJJjf','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','update','POST','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','7CidYsc','channelType','notification_config_update_verification_failed',';\x20do\x20not\x20resubmit\x20automatically.','verifiedFields','9sqLWMq','158687AoxHXD','108jLMmdx','notification_config_update_outcome_unknown','patch','appCode','300496hBWDeg','7940ZIdFpx','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','config-update'];a139_0x4a42=function(){return _0xc59aae;};return a139_0x4a42();}const UPDATE_PATH='/notification/channel-config/update';async function prepareUpdate(_0x11680b){const _0x3c5a60=a139_0x4c33,_0x4a0db1=readNotificationId(_0x11680b),_0x3c5928=await readNotificationDocument(_0x11680b,_0x3c5a60(0x159)),_0xa4a6de=await requireExactNotificationConfig(_0x11680b[_0x3c5a60(0x140)],_0x4a0db1,'update');return{'id':_0x4a0db1,'patch':_0x3c5928,'before':_0xa4a6de,'payload':mergeUpdateInput(_0xa4a6de,_0x3c5928),'planned':plannedUpdateProjection(_0xa4a6de,_0x3c5928)};}export const notificationConfigUpdate={'service':a139_0x268228(0x153),'command':a139_0x268228(0x144),'description':a139_0x268228(0x158),'risk':a139_0x268228(0x14e),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4618fa){readNotificationId(_0x4618fa),assertSingleNotificationSource(_0x4618fa),requireNotificationExplicitYes(_0x4618fa);},async 'dryRun'(_0x28d550){const _0x4fb257=a139_0x268228,_0x3ca33c=await prepareUpdate(_0x28d550),_0x589a96=notificationLookupCommand(_0x28d550[_0x4fb257(0x140)],_0x3ca33c[_0x4fb257(0x14c)]['channelType']);return asDryRunResult({'operation':_0x4fb257(0x159),'selector':notificationSelector(_0x3ca33c[_0x4fb257(0x14c)]),'before':projectNotificationConfig(_0x3ca33c[_0x4fb257(0x14c)]),'after':_0x3ca33c[_0x4fb257(0x14f)],'dryRun':!![],'backend':{'method':_0x4fb257(0x15a),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x589a96}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0xaaedf7){const _0x383b5c=a139_0x268228;requireNotificationExplicitYes(_0xaaedf7);const _0x5b4fd7=await prepareUpdate(_0xaaedf7),_0x2c4829=notificationLookupCommand(_0xaaedf7['appCode'],_0x5b4fd7[_0x383b5c(0x14c)][_0x383b5c(0x15d)]);let _0x288b0b=![];try{await updateNotificationChannelConfig(_0x5b4fd7[_0x383b5c(0x146)]);}catch(_0x4e1d7f){if(!isPlatformTransportFailure(_0x4e1d7f))throw safeApiFailure(_0x383b5c(0x159),_0x383b5c(0x156),_0x383b5c(0x149)+_0x5b4fd7['id']+'\x20with\x20'+_0x2c4829+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x288b0b=!![];}let _0x5ce1ff;try{const _0x30b8fa=await getNotificationChannelConfig(_0x5b4fd7['id'],_0xaaedf7['appCode']);_0x5ce1ff=normalizeExactNotificationConfig(_0x30b8fa,_0x5b4fd7['id'],_0xaaedf7[_0x383b5c(0x140)]);}catch{throw notificationError(_0x288b0b?_0x383b5c(0x13e):'notification_config_update_verification_unavailable',_0x383b5c(0x14d)+_0x5b4fd7['id']+_0x383b5c(0x15b),_0x383b5c(0x145)+_0x5b4fd7['id']+_0x383b5c(0x148)+_0x2c4829+_0x383b5c(0x15f));}const _0x228604=requestedSafeFieldsMatch(_0x5b4fd7[_0x383b5c(0x14c)],_0x5ce1ff,_0x5b4fd7[_0x383b5c(0x13f)]);if(!_0x228604[_0x383b5c(0x152)]||_0x288b0b&&!_0x228604[_0x383b5c(0x155)])throw notificationError(_0x288b0b?_0x383b5c(0x13e):_0x383b5c(0x15e),'Notification\x20config\x20'+_0x5b4fd7['id']+_0x383b5c(0x14a),_0x383b5c(0x145)+_0x5b4fd7['id']+_0x383b5c(0x148)+_0x2c4829+_0x383b5c(0x15f));const _0xbbf87d=_0x288b0b?[_0x383b5c(0x143)]:[];return{'ok':!![],'data':{'operation':_0x383b5c(0x159),'selector':notificationSelector(_0x5ce1ff),'before':projectNotificationConfig(_0x5b4fd7['before']),'after':projectNotificationConfig(_0x5ce1ff),'dryRun':![],'backend':{'method':_0x383b5c(0x15a),'path':UPDATE_PATH},'warnings':_0xbbf87d,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x288b0b,'verifiedFields':_0x228604[_0x383b5c(0x160)],'lookupCommand':_0x2c4829}},'message':_0x383b5c(0x154)+_0x5ce1ff['id']};}};
1
+ const a139_0x2fc38f=a139_0xc508;(function(_0x3ad950,_0x2c0aa9){const _0x2ffbff=a139_0xc508,_0x48e786=_0x3ad950();while(!![]){try{const _0x2a6e12=parseInt(_0x2ffbff(0x148))/0x1*(parseInt(_0x2ffbff(0x136))/0x2)+-parseInt(_0x2ffbff(0x12b))/0x3+parseInt(_0x2ffbff(0x127))/0x4*(-parseInt(_0x2ffbff(0x143))/0x5)+-parseInt(_0x2ffbff(0x132))/0x6*(parseInt(_0x2ffbff(0x138))/0x7)+-parseInt(_0x2ffbff(0x135))/0x8*(-parseInt(_0x2ffbff(0x144))/0x9)+parseInt(_0x2ffbff(0x149))/0xa+parseInt(_0x2ffbff(0x13d))/0xb;if(_0x2a6e12===_0x2c0aa9)break;else _0x48e786['push'](_0x48e786['shift']());}catch(_0x35e640){_0x48e786['push'](_0x48e786['shift']());}}}(a139_0x189b,0xc407a));function a139_0xc508(_0x3aa374,_0x4493a3){_0x3aa374=_0x3aa374-0x127;const _0x189b3b=a139_0x189b();let _0xc5081f=_0x189b3b[_0x3aa374];return _0xc5081f;}function a139_0x189b(){const _0xe9a955=['14400930qLSPgv','188zPvYBE','\x20with\x20','config-update','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','2172801KNTUPC','verified','Inspect\x20ID\x20','patch','channelType','\x20via\x20','update','62154jBQocx','mutation','POST','20248cwlbxF','226xvATzF','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','973pIfzQN','provesChange','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',';\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20with\x20--id\x20','25284985ZHnheK','before','/notification/channel-config/update','allMatch','Notification\x20config\x20','payload','125530GCyAzR','990yYMwqD','notification_config_update_outcome_unknown',';\x20no\x20automatic\x20retry\x20was\x20attempted.','appCode','1150CeHRaz'];a139_0x189b=function(){return _0xe9a955;};return a139_0x189b();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a139_0x2fc38f(0x13f);async function prepareUpdate(_0x9ba265){const _0x2bcac5=a139_0x2fc38f,_0x24f800=readNotificationId(_0x9ba265),_0x5b6950=await readNotificationDocument(_0x9ba265,_0x2bcac5(0x131)),_0x35a4be=await requireExactNotificationConfig(_0x9ba265['appCode'],_0x24f800,_0x2bcac5(0x131));return{'id':_0x24f800,'patch':_0x5b6950,'before':_0x35a4be,'payload':mergeUpdateInput(_0x35a4be,_0x5b6950),'planned':plannedUpdateProjection(_0x35a4be,_0x5b6950)};}export const notificationConfigUpdate={'service':'notification','command':a139_0x2fc38f(0x129),'description':a139_0x2fc38f(0x12a),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4017d5){readNotificationId(_0x4017d5),assertSingleNotificationSource(_0x4017d5),requireNotificationExplicitYes(_0x4017d5);},async 'dryRun'(_0x1d1bc0){const _0x2c0440=a139_0x2fc38f,_0x56d509=await prepareUpdate(_0x1d1bc0),_0x44e5f=notificationLookupCommand(_0x1d1bc0[_0x2c0440(0x147)],_0x56d509[_0x2c0440(0x13e)][_0x2c0440(0x12f)]);return asDryRunResult({'operation':_0x2c0440(0x131),'selector':notificationSelector(_0x56d509[_0x2c0440(0x13e)]),'before':projectNotificationConfig(_0x56d509[_0x2c0440(0x13e)]),'after':_0x56d509['planned'],'dryRun':!![],'backend':{'method':_0x2c0440(0x134),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x44e5f}},{'method':_0x2c0440(0x134),'url':UPDATE_PATH});},async 'execute'(_0x1849bd){const _0x365d7a=a139_0x2fc38f;requireNotificationExplicitYes(_0x1849bd);const _0x25d2d8=await prepareUpdate(_0x1849bd),_0x57f357=notificationLookupCommand(_0x1849bd[_0x365d7a(0x147)],_0x25d2d8['before'][_0x365d7a(0x12f)]);let _0x52947b=![];try{await updateNotificationChannelConfig(_0x25d2d8[_0x365d7a(0x142)]);}catch(_0x2e73b1){if(!isPlatformTransportFailure(_0x2e73b1))throw safeApiFailure('update',_0x365d7a(0x133),_0x365d7a(0x12d)+_0x25d2d8['id']+_0x365d7a(0x128)+_0x57f357+_0x365d7a(0x146));_0x52947b=!![];}let _0x4e2561;try{const _0x1d96c3=await getNotificationChannelConfig(_0x25d2d8['id'],_0x1849bd[_0x365d7a(0x147)]);_0x4e2561=normalizeExactNotificationConfig(_0x1d96c3,_0x25d2d8['id'],_0x1849bd['appCode']);}catch{throw notificationError(_0x52947b?_0x365d7a(0x145):'notification_config_update_verification_unavailable',_0x365d7a(0x141)+_0x25d2d8['id']+_0x365d7a(0x137),'Inspect\x20with\x20--id\x20'+_0x25d2d8['id']+_0x365d7a(0x130)+_0x57f357+_0x365d7a(0x13b));}const _0x538c73=requestedSafeFieldsMatch(_0x25d2d8[_0x365d7a(0x13e)],_0x4e2561,_0x25d2d8[_0x365d7a(0x12e)]);if(!_0x538c73[_0x365d7a(0x140)]||_0x52947b&&!_0x538c73[_0x365d7a(0x139)])throw notificationError(_0x52947b?'notification_config_update_outcome_unknown':'notification_config_update_verification_failed',_0x365d7a(0x141)+_0x25d2d8['id']+_0x365d7a(0x13a),_0x365d7a(0x13c)+_0x25d2d8['id']+_0x365d7a(0x130)+_0x57f357+_0x365d7a(0x13b));const _0x9962a7=_0x52947b?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x4e2561),'before':projectNotificationConfig(_0x25d2d8['before']),'after':projectNotificationConfig(_0x4e2561),'dryRun':![],'backend':{'method':_0x365d7a(0x134),'path':UPDATE_PATH},'warnings':_0x9962a7,'verification':{'status':_0x365d7a(0x12c),'recoveredAfterUnknownResponse':_0x52947b,'verifiedFields':_0x538c73['verifiedFields'],'lookupCommand':_0x57f357}},'message':'Updated\x20notification\x20config\x20'+_0x4e2561['id']};}};
@@ -1 +1 @@
1
- (function(_0x1d67a7,_0x4b5e37){const _0x3bac44=a140_0x260e,_0x11b6fb=_0x1d67a7();while(!![]){try{const _0x3ec499=parseInt(_0x3bac44(0x15c))/0x1+parseInt(_0x3bac44(0x15b))/0x2+parseInt(_0x3bac44(0x15e))/0x3*(-parseInt(_0x3bac44(0x15d))/0x4)+-parseInt(_0x3bac44(0x162))/0x5*(-parseInt(_0x3bac44(0x158))/0x6)+-parseInt(_0x3bac44(0x15f))/0x7*(-parseInt(_0x3bac44(0x159))/0x8)+-parseInt(_0x3bac44(0x163))/0x9*(parseInt(_0x3bac44(0x160))/0xa)+-parseInt(_0x3bac44(0x161))/0xb*(parseInt(_0x3bac44(0x15a))/0xc);if(_0x3ec499===_0x4b5e37)break;else _0x11b6fb['push'](_0x11b6fb['shift']());}catch(_0x43127f){_0x11b6fb['push'](_0x11b6fb['shift']());}}}(a140_0xb613,0xc4dcf));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a140_0x260e(_0x8d9858,_0x2a6a6f){_0x8d9858=_0x8d9858-0x158;const _0xb613d6=a140_0xb613();let _0x260ef9=_0xb613d6[_0x8d9858];return _0x260ef9;}function a140_0xb613(){const _0x2d972b=['188qetLxT','7269pJIQWc','4273066kIfTyp','20MWjuPr','11mxJFGR','236035HbLvbW','1088433sFeKJB','84TrgkfX','8dFWgKr','16764864SVfWlC','2010402EBXcpa','282641EYBdjP'];a140_0xb613=function(){return _0x2d972b;};return a140_0xb613();}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ (function(_0xb832ee,_0x4cd220){const _0x42179c=a140_0x33b3,_0x5db454=_0xb832ee();while(!![]){try{const _0x2c71d0=parseInt(_0x42179c(0x1da))/0x1*(parseInt(_0x42179c(0x1d9))/0x2)+parseInt(_0x42179c(0x1dc))/0x3+-parseInt(_0x42179c(0x1de))/0x4*(parseInt(_0x42179c(0x1df))/0x5)+-parseInt(_0x42179c(0x1db))/0x6*(parseInt(_0x42179c(0x1d6))/0x7)+parseInt(_0x42179c(0x1d8))/0x8*(parseInt(_0x42179c(0x1d7))/0x9)+-parseInt(_0x42179c(0x1d5))/0xa*(-parseInt(_0x42179c(0x1d4))/0xb)+-parseInt(_0x42179c(0x1dd))/0xc;if(_0x2c71d0===_0x4cd220)break;else _0x5db454['push'](_0x5db454['shift']());}catch(_0x520aad){_0x5db454['push'](_0x5db454['shift']());}}}(a140_0x589b,0x794c3));function a140_0x33b3(_0xb61b80,_0x21181d){_0xb61b80=_0xb61b80-0x1d4;const _0x589b7e=a140_0x589b();let _0x33b384=_0x589b7e[_0xb61b80];return _0x33b384;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a140_0x589b(){const _0x44ce68=['1233501WkETRG','5753880HFsptR','33844CHiqKE','555PdmMSJ','1989922hHcayX','30MTpQva','5145252XeUmeM','3926511TtGxrT','16elQkpD','2kJUoep','824101jWnyat','6mvhmbE'];a140_0x589b=function(){return _0x44ce68;};return a140_0x589b();}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];