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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/README.md +4 -4
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.d.ts +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/list.js +1 -1
  56. package/lib/commands/config/set.js +1 -1
  57. package/lib/commands/config/shared.js +1 -1
  58. package/lib/commands/data/filter.js +1 -1
  59. package/lib/commands/data/getOne.js +1 -1
  60. package/lib/commands/data/index.js +1 -1
  61. package/lib/commands/data/shared.js +1 -1
  62. package/lib/commands/dataset/business-group-update.js +1 -1
  63. package/lib/commands/dataset/business-groups.js +1 -1
  64. package/lib/commands/dataset/capability.js +1 -1
  65. package/lib/commands/dataset/delete.js +1 -1
  66. package/lib/commands/dataset/detail.js +1 -1
  67. package/lib/commands/dataset/extend-update.js +1 -1
  68. package/lib/commands/dataset/field-update.js +1 -1
  69. package/lib/commands/dataset/generate.js +1 -1
  70. package/lib/commands/dataset/index.js +1 -1
  71. package/lib/commands/dataset/list.js +1 -1
  72. package/lib/commands/dataset/operations.js +1 -1
  73. package/lib/commands/dataset/relation-audit.js +1 -1
  74. package/lib/commands/dataset/relation-create.js +1 -1
  75. package/lib/commands/dataset/relation-delete.js +1 -1
  76. package/lib/commands/dataset/relation-shared.js +1 -1
  77. package/lib/commands/dataset/relation-update.js +1 -1
  78. package/lib/commands/dataset/relations.js +1 -1
  79. package/lib/commands/dataset/rename.js +1 -1
  80. package/lib/commands/dataset/restore.js +1 -1
  81. package/lib/commands/db/analysis-batching.js +1 -1
  82. package/lib/commands/db/analyze-batch-plan.js +1 -1
  83. package/lib/commands/db/analyze-cancel.js +1 -1
  84. package/lib/commands/db/analyze-start.js +1 -1
  85. package/lib/commands/db/analyze-status.js +1 -1
  86. package/lib/commands/db/create.js +1 -1
  87. package/lib/commands/db/delete.js +1 -1
  88. package/lib/commands/db/detail.js +1 -1
  89. package/lib/commands/db/diff-refresh-start.js +1 -1
  90. package/lib/commands/db/diff-refresh-status.js +1 -1
  91. package/lib/commands/db/diff.js +1 -1
  92. package/lib/commands/db/index.js +1 -1
  93. package/lib/commands/db/list.js +1 -1
  94. package/lib/commands/db/shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/doctor.js +1 -1
  99. package/lib/commands/file/index.js +1 -1
  100. package/lib/commands/init/index.js +1 -1
  101. package/lib/commands/issue/index.js +1 -1
  102. package/lib/commands/issue/nudge.js +1 -1
  103. package/lib/commands/issue/report.js +1 -1
  104. package/lib/commands/issue/shared.js +1 -1
  105. package/lib/commands/kb/create.js +1 -1
  106. package/lib/commands/kb/delete.js +1 -1
  107. package/lib/commands/kb/detail.js +1 -1
  108. package/lib/commands/kb/index.js +1 -1
  109. package/lib/commands/kb/list.js +1 -1
  110. package/lib/commands/kb/search.d.ts +2 -0
  111. package/lib/commands/kb/search.js +1 -0
  112. package/lib/commands/kb/shared.js +1 -1
  113. package/lib/commands/kb/update.js +1 -1
  114. package/lib/commands/logs/index.js +1 -1
  115. package/lib/commands/menu/asset-update.js +1 -1
  116. package/lib/commands/menu/delete.js +1 -1
  117. package/lib/commands/menu/external-link-create.js +1 -1
  118. package/lib/commands/menu/external-link-update.js +1 -1
  119. package/lib/commands/menu/group-create.js +1 -1
  120. package/lib/commands/menu/group-update.js +1 -1
  121. package/lib/commands/menu/index.js +1 -1
  122. package/lib/commands/menu/list.js +1 -1
  123. package/lib/commands/menu/move.js +1 -1
  124. package/lib/commands/menu/regroup-start.js +1 -1
  125. package/lib/commands/menu/rename.js +1 -1
  126. package/lib/commands/menu/shared/compare-table.js +1 -1
  127. package/lib/commands/menu/shared/delete-plan.js +1 -1
  128. package/lib/commands/menu/shared/facts.js +1 -1
  129. package/lib/commands/menu/shared/index.js +1 -1
  130. package/lib/commands/menu/shared/inquirer.js +1 -1
  131. package/lib/commands/menu/shared/local-pages.js +1 -1
  132. package/lib/commands/menu/shared/logic.js +1 -1
  133. package/lib/commands/menu/shared/mutations.js +1 -1
  134. package/lib/commands/menu/shared/service.js +1 -1
  135. package/lib/commands/menu/shared/sync-core.js +1 -1
  136. package/lib/commands/menu/shared/update-core.js +1 -1
  137. package/lib/commands/menu/shared/valid-url.js +1 -1
  138. package/lib/commands/menu/sync.js +1 -1
  139. package/lib/commands/menu/visibility-update.js +1 -1
  140. package/lib/commands/notification/config-create.js +1 -1
  141. package/lib/commands/notification/config-delete.js +1 -1
  142. package/lib/commands/notification/config-list.js +1 -1
  143. package/lib/commands/notification/config-update.js +1 -1
  144. package/lib/commands/notification/index.js +1 -1
  145. package/lib/commands/notification/shared.js +1 -1
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/create.js +1 -1
  148. package/lib/commands/page/custom/detail.js +1 -1
  149. package/lib/commands/page/custom/list.js +1 -1
  150. package/lib/commands/page/custom/publish.js +1 -1
  151. package/lib/commands/page/custom/shared.js +1 -1
  152. package/lib/commands/page/custom/syntax.js +1 -1
  153. package/lib/commands/page/custom/template.js +1 -1
  154. package/lib/commands/page/custom/update.js +1 -1
  155. package/lib/commands/page/data-list-status.js +1 -1
  156. package/lib/commands/page/generate-start.js +1 -1
  157. package/lib/commands/page/generate-status.js +1 -1
  158. package/lib/commands/page/index.js +1 -1
  159. package/lib/commands/page/pull.js +1 -1
  160. package/lib/commands/page/push.js +1 -1
  161. package/lib/commands/page/relation-audit.js +1 -1
  162. package/lib/commands/page/restore.js +1 -1
  163. package/lib/commands/page/shared.js +1 -1
  164. package/lib/commands/page/sync.js +1 -1
  165. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  166. package/lib/commands/project/create/format-elapsed.js +1 -1
  167. package/lib/commands/project/create/main.js +1 -1
  168. package/lib/commands/project/create/materialize-project-template.js +1 -1
  169. package/lib/commands/project/create/project-name.js +1 -1
  170. package/lib/commands/project/create/project-template-archive.js +1 -1
  171. package/lib/commands/project/create/project-template-path.js +1 -1
  172. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  173. package/lib/commands/project/create/use-format-code.js +1 -1
  174. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  175. package/lib/commands/project/index.js +1 -1
  176. package/lib/commands/project/upgrade.js +1 -1
  177. package/lib/commands/registry.js +1 -1
  178. package/lib/commands/role/delete.js +1 -1
  179. package/lib/commands/role/detail.js +1 -1
  180. package/lib/commands/role/index.js +1 -1
  181. package/lib/commands/role/list.js +1 -1
  182. package/lib/commands/role/shared.js +1 -1
  183. package/lib/commands/role/update.js +1 -1
  184. package/lib/commands/role/user-add.js +1 -1
  185. package/lib/commands/role/user-remove.js +1 -1
  186. package/lib/commands/role/user-resolve.js +1 -1
  187. package/lib/commands/run/index.js +1 -1
  188. package/lib/commands/schema.js +1 -1
  189. package/lib/commands/sql/create.js +1 -1
  190. package/lib/commands/sql/delete.js +1 -1
  191. package/lib/commands/sql/detail.js +1 -1
  192. package/lib/commands/sql/exec.js +1 -1
  193. package/lib/commands/sql/index.js +1 -1
  194. package/lib/commands/sql/list.js +1 -1
  195. package/lib/commands/sql/pull.js +1 -1
  196. package/lib/commands/sql/push.js +1 -1
  197. package/lib/commands/sql/shared.js +1 -1
  198. package/lib/commands/sql/status.js +1 -1
  199. package/lib/commands/sql/validate.js +1 -1
  200. package/lib/commands/task/index.js +1 -1
  201. package/lib/commands/task/status.js +1 -1
  202. package/lib/commands/tenant/index.js +1 -1
  203. package/lib/commands/tenant/members-list.js +1 -1
  204. package/lib/commands/tenant/shared.js +1 -1
  205. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  206. package/lib/commands/user-account/index.js +1 -1
  207. package/lib/commands/workspace/add.js +1 -1
  208. package/lib/commands/workspace/index.js +1 -1
  209. package/lib/commands/workspace/remove.js +1 -1
  210. package/lib/config/schema.js +1 -1
  211. package/lib/constant/cdn.js +1 -1
  212. package/lib/constant/cli.js +1 -1
  213. package/lib/constant/defaults.js +1 -1
  214. package/lib/constant/domain.js +1 -1
  215. package/lib/constant/env.js +1 -1
  216. package/lib/constant/output.js +1 -1
  217. package/lib/constant/paths.js +1 -1
  218. package/lib/constant/risk.js +1 -1
  219. package/lib/context/app-resolver.js +1 -1
  220. package/lib/context/auth-resolver.js +1 -1
  221. package/lib/context/config-loader.js +1 -1
  222. package/lib/context.js +1 -1
  223. package/lib/core/alias-resolver.js +1 -1
  224. package/lib/core/api-client.d.ts +17 -1
  225. package/lib/core/api-client.js +1 -1
  226. package/lib/core/bff/config.d.ts +1 -1
  227. package/lib/core/bff/config.js +1 -1
  228. package/lib/core/bff/file-system.d.ts +1 -1
  229. package/lib/core/bff/file-system.js +1 -1
  230. package/lib/core/bff/hash.d.ts +1 -1
  231. package/lib/core/bff/hash.js +1 -1
  232. package/lib/core/bff/lock.d.ts +2 -2
  233. package/lib/core/bff/lock.js +1 -1
  234. package/lib/core/bff/types.d.ts +1 -1
  235. package/lib/core/bff/utils.d.ts +2 -2
  236. package/lib/core/bff/utils.js +1 -1
  237. package/lib/core/db-resolver.js +1 -1
  238. package/lib/core/page/file-system.js +1 -1
  239. package/lib/core/page/hash.js +1 -1
  240. package/lib/core/page/lock.js +1 -1
  241. package/lib/core/sql-index-auditor.js +1 -1
  242. package/lib/core/sql-sync/config.js +1 -1
  243. package/lib/core/sql-sync/file-system.js +1 -1
  244. package/lib/core/sql-sync/hash.js +1 -1
  245. package/lib/core/sql-sync/lock.js +1 -1
  246. package/lib/core/sql-sync/utils.js +1 -1
  247. package/lib/core/sql-validator.js +1 -1
  248. package/lib/errors.js +1 -1
  249. package/lib/framework/build-all-flags.js +1 -1
  250. package/lib/framework/error-output.js +1 -1
  251. package/lib/framework/explicit-yes.js +1 -1
  252. package/lib/framework/flags.js +1 -1
  253. package/lib/framework/help.js +1 -1
  254. package/lib/framework/index.js +1 -1
  255. package/lib/framework/output.js +1 -1
  256. package/lib/framework/response.js +1 -1
  257. package/lib/framework/runner-alias.js +1 -1
  258. package/lib/framework/runner.js +1 -1
  259. package/lib/framework/schema-export.js +1 -1
  260. package/lib/framework/types.js +1 -1
  261. package/lib/generated/build-info.d.ts +4 -4
  262. package/lib/generated/build-info.js +1 -1
  263. package/lib/help.js +1 -1
  264. package/lib/postinstall.js +1 -1
  265. package/lib/runtime/confirmation.js +1 -1
  266. package/lib/runtime/event.js +1 -1
  267. package/lib/runtime/index.js +1 -1
  268. package/lib/runtime/queue.js +1 -1
  269. package/lib/runtime/resolve.js +1 -1
  270. package/lib/skills/builtin-skill.js +1 -1
  271. package/lib/skills/main.js +1 -1
  272. package/lib/skills/npx-skills-add.js +1 -1
  273. package/lib/skills/skill-presence.js +1 -1
  274. package/lib/telemetry/cli-command-trace.js +1 -1
  275. package/lib/telemetry/cli-help-trace.js +1 -1
  276. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  277. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  278. package/lib/telemetry/send-cli-trace-log.js +1 -1
  279. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  280. package/lib/utils/ai_config.js +1 -1
  281. package/lib/utils/apply-jq-filter.js +1 -1
  282. package/lib/utils/cdn-config.js +1 -1
  283. package/lib/utils/check-sdk-version.js +1 -1
  284. package/lib/utils/cli-version-check.js +1 -1
  285. package/lib/utils/cli-version-policy.js +1 -1
  286. package/lib/utils/config.js +1 -1
  287. package/lib/utils/entity-with-id.js +1 -1
  288. package/lib/utils/file-utils.js +1 -1
  289. package/lib/utils/guides-cdn.js +1 -1
  290. package/lib/utils/http-client.js +1 -1
  291. package/lib/utils/is-non-interactive.js +1 -1
  292. package/lib/utils/logger.js +1 -1
  293. package/lib/utils/params.js +1 -1
  294. package/lib/utils/platform.js +1 -1
  295. package/lib/utils/rules-cdn.js +1 -1
  296. package/lib/utils/sleep.js +1 -1
  297. package/lib/utils/template-replacer.js +1 -1
  298. package/lib/utils/update-notice.js +1 -1
  299. package/lib/utils/version.js +1 -1
  300. package/lib/utils/with-active-cookie.js +1 -1
  301. package/lib/utils/write-cli-side-channel.js +1 -1
  302. package/package.json +2 -2
  303. package/sidecar/flags.json +1 -1
  304. package/skills/rabetbase/SKILL.md +30 -30
  305. package/skills/rabetbase/guides/backend-function.md +30 -30
  306. package/skills/rabetbase/guides/best-practices.md +8 -8
  307. package/skills/rabetbase/guides/bff-creation-workflow.md +16 -16
  308. package/skills/rabetbase/guides/conflict-detection.md +3 -3
  309. package/skills/rabetbase/guides/custom-page-workflow.md +8 -8
  310. package/skills/rabetbase/guides/data-api-guidelines.md +6 -6
  311. package/skills/rabetbase/guides/legacy-application-blueprint-workflow.md +8 -8
  312. package/skills/rabetbase/guides/sql-creation-workflow.md +2 -2
  313. package/skills/rabetbase/guides/troubleshooting.md +6 -6
  314. package/skills/rabetbase/guides/typescript-sdk.md +10 -10
  315. package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +1 -1
  316. package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +10 -10
  317. package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
  318. package/skills/rabetbase/references/rabetbase-bff-create.md +3 -3
  319. package/skills/rabetbase/references/rabetbase-bff-delete.md +1 -1
  320. package/skills/rabetbase/references/rabetbase-bff-detail.md +4 -4
  321. package/skills/rabetbase/references/rabetbase-bff-list.md +8 -8
  322. package/skills/rabetbase/references/rabetbase-bff-pull.md +1 -1
  323. package/skills/rabetbase/references/rabetbase-bff-push.md +3 -3
  324. package/skills/rabetbase/references/rabetbase-bff-status.md +1 -1
  325. package/skills/rabetbase/references/rabetbase-codegen-sql.md +3 -3
  326. package/skills/rabetbase/references/rabetbase-dataset-detail.md +1 -1
  327. package/skills/rabetbase/references/rabetbase-kb.md +13 -3
  328. package/skills/rabetbase/references/rabetbase-notification-config-list.md +3 -3
  329. package/skills/rabetbase.manifest.json +3 -3
  330. package/templates/rules/lovrabet_rules.mdc.tpl +7 -7
  331. package/templates/skill/SKILL.md.tpl +12 -12
@@ -1 +1 @@
1
- const a130_0x3adbb4=a130_0x5ca8;function a130_0x5ca8(_0x56b3ef,_0x446e3){_0x56b3ef=_0x56b3ef-0xd8;const _0xfa2453=a130_0xfa24();let _0x5ca8bf=_0xfa2453[_0x56b3ef];return _0x5ca8bf;}function a130_0xfa24(){const _0xf5443d=['object','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','4554291vdjXic','path','\x0a\x20\x20Available\x20local\x20paths:\x20','cwd',':\x20expected\x20a\x20non-empty\x20string.','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','jsUrl','trim','1132112mzdZeL','map','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','info','No\x20local\x20pages\x20matched\x20paths:\x20','join','length','message','dryRun','field','procode','filter','175650tSecbk','CSS\x20URL\x20is\x20unreachable:\x20','2cXnqVF','label','Start\x20non-interactive\x20menu\x20sync','get','Invalid\x20--params.','import','push','Invalid\x20--params:\x20','3343836fNHfBD','727825CBTqgu','keys','menu-sync','string','Menu\x20sync\x20completed','195212SltHXl','has','isArray','cssUrl','setLogPath','1665OSRPGn','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','pages','64392QXGcpW','parse','Invalid\x20--params\x20JSON.'];a130_0xfa24=function(){return _0xf5443d;};return a130_0xfa24();}(function(_0x2adcb8,_0x371a7b){const _0x3f50db=a130_0x5ca8,_0x31db43=_0x2adcb8();while(!![]){try{const _0x4b16ad=parseInt(_0x3f50db(0xe2))/0x1*(parseInt(_0x3f50db(0xf0))/0x2)+parseInt(_0x3f50db(0xe0))/0x3+parseInt(_0x3f50db(0x105))/0x4+parseInt(_0x3f50db(0xeb))/0x5+parseInt(_0x3f50db(0xea))/0x6+parseInt(_0x3f50db(0xfd))/0x7+-parseInt(_0x3f50db(0xf8))/0x8*(parseInt(_0x3f50db(0xf5))/0x9);if(_0x4b16ad===_0x371a7b)break;else _0x31db43['push'](_0x31db43['shift']());}catch(_0x1fd99e){_0x31db43['push'](_0x31db43['shift']());}}}(a130_0xfa24,0x61f39));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([a130_0x3adbb4(0x103),a130_0x3adbb4(0xf3)]);function validateParams(_0x46d7f3){const _0x99300f=a130_0x3adbb4,_0x7b7f8d=[];return _0x46d7f3['jsUrl']&&!isValidJsHttpsUrl(_0x46d7f3[_0x99300f(0x103)])&&_0x7b7f8d[_0x99300f(0xe8)]({'field':_0x99300f(0x103),'message':_0x99300f(0xfc)}),_0x46d7f3[_0x99300f(0xf3)]&&!isValidCssHttpsUrl(_0x46d7f3[_0x99300f(0xf3)])&&_0x7b7f8d['push']({'field':_0x99300f(0xf3),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x7b7f8d;}export async function runMenuSyncCore(_0x5de23f,_0x4766cb,_0x542563=[],_0x1d4a3a,_0x21a7c5={}){const _0x3909b2=a130_0x3adbb4,_0x1b7a45=parseMenuSyncParams(_0x1d4a3a),_0x580773=[...new Set(_0x542563['map'](_0x5b6a6f=>_0x5b6a6f['trim']())['filter'](Boolean))],_0x475b2b=_0x1b7a45[_0x3909b2(0x103)],_0x53c95b=_0x1b7a45['cssUrl'],_0x4191bc=[];if(_0x475b2b)_0x4191bc['push'](_0x475b2b);if(_0x53c95b)_0x4191bc[_0x3909b2(0xe8)](_0x53c95b);const _0x5aede7=validateParams(_0x1b7a45);if(_0x5aede7[_0x3909b2(0xda)]>0x0){const _0x4c6db1=_0x5aede7[_0x3909b2(0x106)](_0x23895b=>'--params.'+_0x23895b[_0x3909b2(0xdd)]+':\x20'+_0x23895b[_0x3909b2(0xdb)])[_0x3909b2(0xd9)](';\x20');throw new Error(_0x3909b2(0xe9)+_0x4c6db1);}logger[_0x3909b2(0xf4)](process[_0x3909b2(0x100)]()),logger[_0x3909b2(0x108)](_0x3909b2(0xed),_0x3909b2(0xe4),{'appCode':_0x5de23f,'selectedCount':_0x580773[_0x3909b2(0xda)],'jsUrl':_0x475b2b,'cssUrl':_0x53c95b});if(_0x475b2b){const _0x603ade=await isUrlReachable(_0x475b2b);if(!_0x603ade)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x475b2b);}if(_0x53c95b){const _0x4af25c=await isUrlReachable(_0x53c95b);if(!_0x4af25c)throw new Error(_0x3909b2(0xe1)+_0x53c95b);}const _0x288d93=getLocalPages();if(_0x288d93[_0x3909b2(0xda)]===0x0){if(_0x580773[_0x3909b2(0xda)]>0x0)throw new Error(_0x3909b2(0xd8)+_0x580773[_0x3909b2(0xd9)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x21a7c5[_0x3909b2(0xdc)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x41ab73=await getOnlineMenuList(_0x5de23f,_0x4766cb),_0x4d80e0=new Set(_0x41ab73['map'](_0x2fd41b=>_0x2fd41b[_0x3909b2(0xfe)]));let _0x57b319;if(_0x580773[_0x3909b2(0xda)]>0x0){const _0x6edf9c=new Map(_0x288d93[_0x3909b2(0x106)](_0x56e668=>[_0x56e668[_0x3909b2(0xfe)],_0x56e668])),_0x2d3f27=_0x580773[_0x3909b2(0xdf)](_0x517676=>!_0x6edf9c[_0x3909b2(0xf1)](_0x517676));if(_0x2d3f27[_0x3909b2(0xda)]>0x0){const _0x106ae0=_0x288d93['map'](_0x503b31=>_0x503b31[_0x3909b2(0xfe)])[_0x3909b2(0xd9)](',\x20');throw new Error(_0x3909b2(0xd8)+_0x2d3f27[_0x3909b2(0xd9)](',\x20')+_0x3909b2(0xff)+_0x106ae0);}const _0x11a9a6=_0x580773[_0x3909b2(0xdf)](_0x387e74=>_0x4d80e0[_0x3909b2(0xf1)](_0x387e74));if(_0x11a9a6[_0x3909b2(0xda)]>0x0)throw new Error(_0x3909b2(0xf6)+_0x11a9a6['join'](',\x20'));_0x57b319=_0x580773[_0x3909b2(0x106)](_0x3d58b6=>_0x6edf9c[_0x3909b2(0xe5)](_0x3d58b6));}else _0x57b319=_0x288d93['filter'](_0x34cdfd=>!_0x4d80e0[_0x3909b2(0xf1)](_0x34cdfd['path']));if(_0x57b319['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x21a7c5[_0x3909b2(0xdc)]===!![],'targetPages':[],'plannedMenus':[]};const _0x26798e=_0x57b319[_0x3909b2(0x106)](_0x353ade=>({'type':_0x3909b2(0xde),'path':_0x353ade['path'],'label':_0x353ade[_0x3909b2(0xe3)],'loadScriptMode':_0x3909b2(0xe7),'resources':[..._0x4191bc]}));if(_0x21a7c5[_0x3909b2(0xdc)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x57b319,'plannedMenus':_0x26798e};const _0x52ad54=await createMenus(_0x5de23f,_0x4766cb,_0x57b319,_0x4191bc[_0x3909b2(0xda)]>0x0?_0x4191bc:undefined);return logger[_0x3909b2(0x108)](_0x3909b2(0xed),_0x3909b2(0xef),{'count':_0x57b319['length'],'resources':_0x4191bc}),{'created':_0x52ad54['length'],'skipped':![],'dryRun':![],'targetPages':_0x57b319,'plannedMenus':_0x26798e,'menus':_0x52ad54};}export function parseMenuSyncParams(_0x50a4fd){const _0xa5efce=a130_0x3adbb4;if(!_0x50a4fd||typeof _0x50a4fd!==_0xa5efce(0xee))return{};let _0x57eca2;try{_0x57eca2=JSON[_0xa5efce(0xf9)](_0x50a4fd);}catch{throw new Error(_0xa5efce(0xfa));}if(typeof _0x57eca2!==_0xa5efce(0xfb)||_0x57eca2===null||Array[_0xa5efce(0xf2)](_0x57eca2))throw new Error(_0xa5efce(0x107));const _0x4e2949=_0x57eca2;if(Object['hasOwn'](_0x4e2949,_0xa5efce(0xf7)))throw new Error(_0xa5efce(0x102));const _0x2f607a=Object[_0xa5efce(0xec)](_0x4e2949)['filter'](_0x190fb6=>!MENU_SYNC_PARAM_KEYS[_0xa5efce(0xf1)](_0x190fb6));if(_0x2f607a[_0xa5efce(0xda)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x2f607a[_0xa5efce(0xd9)](',\x20')+'.');for(const _0x345291 of MENU_SYNC_PARAM_KEYS){const _0x521934=_0x4e2949[_0x345291];if(_0x521934!==undefined&&(typeof _0x521934!==_0xa5efce(0xee)||_0x521934[_0xa5efce(0x104)]()===''))throw new Error(_0xa5efce(0xe6)+_0x345291+_0xa5efce(0x101));}return{'jsUrl':typeof _0x4e2949['jsUrl']==='string'?_0x4e2949[_0xa5efce(0x103)][_0xa5efce(0x104)]():undefined,'cssUrl':typeof _0x4e2949['cssUrl']===_0xa5efce(0xee)?_0x4e2949['cssUrl'][_0xa5efce(0x104)]():undefined};}
1
+ function a131_0x3202(_0x1a0a5a,_0x3f31ff){_0x1a0a5a=_0x1a0a5a-0xfd;const _0x1be5dd=a131_0x1be5();let _0x320276=_0x1be5dd[_0x1a0a5a];return _0x320276;}const a131_0x11a497=a131_0x3202;(function(_0x82cb67,_0xea66f5){const _0x14840e=a131_0x3202,_0x5a18d5=_0x82cb67();while(!![]){try{const _0x41687f=parseInt(_0x14840e(0x103))/0x1*(-parseInt(_0x14840e(0x105))/0x2)+-parseInt(_0x14840e(0x112))/0x3+-parseInt(_0x14840e(0x10e))/0x4*(parseInt(_0x14840e(0x100))/0x5)+-parseInt(_0x14840e(0x117))/0x6*(-parseInt(_0x14840e(0x114))/0x7)+parseInt(_0x14840e(0xff))/0x8+parseInt(_0x14840e(0x10a))/0x9+-parseInt(_0x14840e(0x11c))/0xa;if(_0x41687f===_0xea66f5)break;else _0x5a18d5['push'](_0x5a18d5['shift']());}catch(_0x421937){_0x5a18d5['push'](_0x5a18d5['shift']());}}}(a131_0x1be5,0xd8cc8));function a131_0x1be5(){const _0x37c1e6=['--params.','2DtMclq','get','length','dryRun','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','12182148MIgazF','filter','menu-sync','push','12AZlBeU','trim','\x0a\x20\x20Available\x20local\x20paths:\x20','import','5295573IRmOiZ','keys','476525HAJtKv','parse','No\x20local\x20pages\x20matched\x20paths:\x20','102eJGZyj','path','Invalid\x20--params.','Invalid\x20--params\x20fields:\x20','map','2582680QWotPb','field','string','procode','Invalid\x20--params:\x20','info','join','Invalid\x20--params\x20JSON.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Start\x20non-interactive\x20menu\x20sync','has','cssUrl','cwd','hasOwn','CSS\x20URL\x20is\x20unreachable:\x20','6312024dlybjo','330320SDTjGS','Menu\x20sync\x20completed','jsUrl','190191XPatBl'];a131_0x1be5=function(){return _0x37c1e6;};return a131_0x1be5();}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([a131_0x11a497(0x102),a131_0x11a497(0x127)]);function validateParams(_0x357d40){const _0x5e7124=a131_0x11a497,_0x2d4876=[];return _0x357d40['jsUrl']&&!isValidJsHttpsUrl(_0x357d40['jsUrl'])&&_0x2d4876[_0x5e7124(0x10d)]({'field':_0x5e7124(0x102),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x357d40[_0x5e7124(0x127)]&&!isValidCssHttpsUrl(_0x357d40[_0x5e7124(0x127)])&&_0x2d4876[_0x5e7124(0x10d)]({'field':_0x5e7124(0x127),'message':_0x5e7124(0x124)}),_0x2d4876;}export async function runMenuSyncCore(_0xce842a,_0x405404,_0x3c79cd=[],_0x4dff82,_0x2a2756={}){const _0x2098cd=a131_0x11a497,_0x5958dd=parseMenuSyncParams(_0x4dff82),_0x7473c6=[...new Set(_0x3c79cd[_0x2098cd(0x11b)](_0xc0e16f=>_0xc0e16f[_0x2098cd(0x10f)]())['filter'](Boolean))],_0x195eb3=_0x5958dd['jsUrl'],_0x396c42=_0x5958dd['cssUrl'],_0x144510=[];if(_0x195eb3)_0x144510['push'](_0x195eb3);if(_0x396c42)_0x144510[_0x2098cd(0x10d)](_0x396c42);const _0x5c71f6=validateParams(_0x5958dd);if(_0x5c71f6[_0x2098cd(0x107)]>0x0){const _0x36a43b=_0x5c71f6[_0x2098cd(0x11b)](_0x1be1c8=>_0x2098cd(0x104)+_0x1be1c8[_0x2098cd(0x11d)]+':\x20'+_0x1be1c8['message'])[_0x2098cd(0x122)](';\x20');throw new Error(_0x2098cd(0x120)+_0x36a43b);}logger['setLogPath'](process[_0x2098cd(0x128)]()),logger[_0x2098cd(0x121)](_0x2098cd(0x10c),_0x2098cd(0x125),{'appCode':_0xce842a,'selectedCount':_0x7473c6[_0x2098cd(0x107)],'jsUrl':_0x195eb3,'cssUrl':_0x396c42});if(_0x195eb3){const _0x52b54b=await isUrlReachable(_0x195eb3);if(!_0x52b54b)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x195eb3);}if(_0x396c42){const _0x109204=await isUrlReachable(_0x396c42);if(!_0x109204)throw new Error(_0x2098cd(0xfe)+_0x396c42);}const _0x9e3846=getLocalPages();if(_0x9e3846['length']===0x0){if(_0x7473c6[_0x2098cd(0x107)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x7473c6[_0x2098cd(0x122)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x2a2756[_0x2098cd(0x108)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x5e8440=await getOnlineMenuList(_0xce842a,_0x405404),_0x536ee4=new Set(_0x5e8440[_0x2098cd(0x11b)](_0x1e1573=>_0x1e1573[_0x2098cd(0x118)]));let _0x37db85;if(_0x7473c6[_0x2098cd(0x107)]>0x0){const _0x5a199c=new Map(_0x9e3846[_0x2098cd(0x11b)](_0x13ac79=>[_0x13ac79[_0x2098cd(0x118)],_0x13ac79])),_0x3cd13d=_0x7473c6['filter'](_0x3480e7=>!_0x5a199c[_0x2098cd(0x126)](_0x3480e7));if(_0x3cd13d['length']>0x0){const _0x38bae2=_0x9e3846[_0x2098cd(0x11b)](_0x2aa4b1=>_0x2aa4b1[_0x2098cd(0x118)])['join'](',\x20');throw new Error(_0x2098cd(0x116)+_0x3cd13d[_0x2098cd(0x122)](',\x20')+_0x2098cd(0x110)+_0x38bae2);}const _0x4a0ee8=_0x7473c6[_0x2098cd(0x10b)](_0x3dc890=>_0x536ee4[_0x2098cd(0x126)](_0x3dc890));if(_0x4a0ee8[_0x2098cd(0x107)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x4a0ee8[_0x2098cd(0x122)](',\x20'));_0x37db85=_0x7473c6[_0x2098cd(0x11b)](_0xf200f4=>_0x5a199c[_0x2098cd(0x106)](_0xf200f4));}else _0x37db85=_0x9e3846[_0x2098cd(0x10b)](_0x40adeb=>!_0x536ee4[_0x2098cd(0x126)](_0x40adeb[_0x2098cd(0x118)]));if(_0x37db85['length']===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x2a2756[_0x2098cd(0x108)]===!![],'targetPages':[],'plannedMenus':[]};const _0x58c05c=_0x37db85[_0x2098cd(0x11b)](_0x340dd6=>({'type':_0x2098cd(0x11f),'path':_0x340dd6['path'],'label':_0x340dd6['label'],'loadScriptMode':_0x2098cd(0x111),'resources':[..._0x144510]}));if(_0x2a2756['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x37db85,'plannedMenus':_0x58c05c};const _0x28f89f=await createMenus(_0xce842a,_0x405404,_0x37db85,_0x144510['length']>0x0?_0x144510:undefined);return logger[_0x2098cd(0x121)](_0x2098cd(0x10c),_0x2098cd(0x101),{'count':_0x37db85['length'],'resources':_0x144510}),{'created':_0x28f89f[_0x2098cd(0x107)],'skipped':![],'dryRun':![],'targetPages':_0x37db85,'plannedMenus':_0x58c05c,'menus':_0x28f89f};}export function parseMenuSyncParams(_0x207e50){const _0x45690f=a131_0x11a497;if(!_0x207e50||typeof _0x207e50!==_0x45690f(0x11e))return{};let _0x544894;try{_0x544894=JSON[_0x45690f(0x115)](_0x207e50);}catch{throw new Error(_0x45690f(0x123));}if(typeof _0x544894!=='object'||_0x544894===null||Array['isArray'](_0x544894))throw new Error(_0x45690f(0x109));const _0x1ea32b=_0x544894;if(Object[_0x45690f(0xfd)](_0x1ea32b,'pages'))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x19c43e=Object[_0x45690f(0x113)](_0x1ea32b)[_0x45690f(0x10b)](_0x586f83=>!MENU_SYNC_PARAM_KEYS[_0x45690f(0x126)](_0x586f83));if(_0x19c43e['length']>0x0)throw new Error(_0x45690f(0x11a)+_0x19c43e[_0x45690f(0x122)](',\x20')+'.');for(const _0xef093e of MENU_SYNC_PARAM_KEYS){const _0x318279=_0x1ea32b[_0xef093e];if(_0x318279!==undefined&&(typeof _0x318279!==_0x45690f(0x11e)||_0x318279[_0x45690f(0x10f)]()===''))throw new Error(_0x45690f(0x119)+_0xef093e+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x1ea32b[_0x45690f(0x102)]===_0x45690f(0x11e)?_0x1ea32b['jsUrl'][_0x45690f(0x10f)]():undefined,'cssUrl':typeof _0x1ea32b[_0x45690f(0x127)]==='string'?_0x1ea32b[_0x45690f(0x127)][_0x45690f(0x10f)]():undefined};}
@@ -1 +1 @@
1
- (function(_0x356e4e,_0x1c0636){const _0x453d63=a132_0x2496,_0x4c8299=_0x356e4e();while(!![]){try{const _0x33ad06=-parseInt(_0x453d63(0x96))/0x1*(-parseInt(_0x453d63(0xba))/0x2)+parseInt(_0x453d63(0xad))/0x3+parseInt(_0x453d63(0x9e))/0x4*(parseInt(_0x453d63(0xc1))/0x5)+-parseInt(_0x453d63(0xb3))/0x6+parseInt(_0x453d63(0xb8))/0x7*(-parseInt(_0x453d63(0x90))/0x8)+-parseInt(_0x453d63(0xb4))/0x9+parseInt(_0x453d63(0xbc))/0xa*(-parseInt(_0x453d63(0xbf))/0xb);if(_0x33ad06===_0x1c0636)break;else _0x4c8299['push'](_0x4c8299['shift']());}catch(_0x497e1c){_0x4c8299['push'](_0x4c8299['shift']());}}}(a132_0x49de,0x890de));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(_0x2fec40){const _0xbc3de1=a132_0x2496,_0x50f8cf=[];return _0x2fec40[_0xbc3de1(0xbb)]&&!isValidJsHttpsUrl(_0x2fec40[_0xbc3de1(0xbb)])&&_0x50f8cf[_0xbc3de1(0x91)]({'field':_0xbc3de1(0xbb),'message':_0xbc3de1(0xc5)}),_0x2fec40[_0xbc3de1(0xaf)]&&!isValidCssHttpsUrl(_0x2fec40[_0xbc3de1(0xaf)])&&_0x50f8cf['push']({'field':_0xbc3de1(0xaf),'message':_0xbc3de1(0xa7)}),_0x50f8cf;}export async function runMenuUpdateCore(_0x45f820,_0x5a533b,_0x27d741,_0x345447={}){const _0x5d705c=a132_0x2496,_0x525a1c=parseUpdateParamsFlag(_0x27d741),_0x4e5ee9=normalizeMode(_0x345447['mode']);validateSelection(_0x345447['selection']);const _0x29f401=[];if(_0x525a1c['jsUrl'])_0x29f401[_0x5d705c(0x91)](_0x525a1c[_0x5d705c(0xbb)]);if(_0x525a1c[_0x5d705c(0xaf)])_0x29f401['push'](_0x525a1c[_0x5d705c(0xaf)]);const _0x4ff265=validateParams(_0x525a1c);if(_0x4ff265[_0x5d705c(0xab)]>0x0){const _0x7670bc=_0x4ff265[_0x5d705c(0x88)](_0x55f87e=>'--params.'+_0x55f87e[_0x5d705c(0xc2)]+':\x20'+_0x55f87e[_0x5d705c(0xae)])[_0x5d705c(0x87)](';\x20');throw new Error(_0x5d705c(0x9f)+_0x7670bc);}if(_0x29f401['length']===0x0)throw new Error(_0x5d705c(0xa3)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0x5d705c(0xa9)](process['cwd']()),logger['info'](_0x5d705c(0x9d),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x45f820,'jsUrl':_0x525a1c[_0x5d705c(0xbb)],'cssUrl':_0x525a1c['cssUrl'],'mode':_0x4e5ee9,'dryRun':_0x345447['dryRun']===!![]});if(_0x525a1c[_0x5d705c(0xbb)]){const _0x3cfdfd=await isUrlReachable(_0x525a1c['jsUrl']);if(!_0x3cfdfd)throw new Error(_0x5d705c(0xc0)+_0x525a1c[_0x5d705c(0xbb)]);}if(_0x525a1c['cssUrl']){const _0x1d5fb0=await isUrlReachable(_0x525a1c['cssUrl']);if(!_0x1d5fb0)throw new Error(_0x5d705c(0x94)+_0x525a1c['cssUrl']);}const _0x2d6af5=await getOnlineMenuList(_0x45f820,_0x5a533b),_0x4dba17=_0x2d6af5[_0x5d705c(0xc7)](_0x221d65=>_0x221d65[_0x5d705c(0xb5)][_0x5d705c(0xab)]>0x0),_0x629aca=selectMenusForUpdate(_0x4dba17,_0x345447[_0x5d705c(0xb9)]);if(_0x629aca['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x345447['dryRun']===!![]};const _0x9d9d1e=_0x629aca[_0x5d705c(0x88)](_0x4d8f2d=>buildMenuUpdateDiff(_0x4d8f2d,_0x525a1c,_0x4e5ee9,_0x345447[_0x5d705c(0xc8)]===!![],_0x345447[_0x5d705c(0x8c)]));if(_0x345447[_0x5d705c(0x98)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x9d9d1e};const _0x567b19=await Promise['allSettled'](_0x629aca['map']((_0x3497c3,_0x53e316)=>updateMenuCdnUrl(_0x45f820,_0x5a533b,{'id':_0x3497c3['id'],'label':_0x3497c3[_0x5d705c(0xbe)],'path':_0x3497c3[_0x5d705c(0xb2)],'resources':_0x9d9d1e[_0x53e316][_0x5d705c(0xa2)][_0x5d705c(0xb5)],'extend':_0x3497c3['extend']??null,'loadScriptMode':_0x345447['loadScriptMode']}))),_0x4cf800=_0x567b19[_0x5d705c(0xc7)](_0x2d7f61=>_0x2d7f61[_0x5d705c(0xac)]==='fulfilled')[_0x5d705c(0x88)](_0x7c0277=>_0x7c0277['value']),_0x5a71ef=_0x567b19[_0x5d705c(0xc7)](_0xd12b67=>_0xd12b67[_0x5d705c(0xac)]===_0x5d705c(0xb7))['length'];return logger[_0x5d705c(0x84)](_0x5d705c(0x9d),_0x5d705c(0xb0),{'count':_0x629aca[_0x5d705c(0xab)],'resources':_0x29f401}),{'updated':_0x4cf800[_0x5d705c(0xab)],'failed':_0x5a71ef,'skipped':![],'menus':_0x4cf800};}function validateSelection(_0x514c86){const _0x412d78=a132_0x2496;if(!_0x514c86)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x514c86[_0x412d78(0xc4)]&&(_0x514c86[_0x412d78(0xa5)]['length']>0x0||_0x514c86['paths'][_0x412d78(0xab)]>0x0))throw new Error(_0x412d78(0x89));if(!_0x514c86[_0x412d78(0xc4)]&&_0x514c86['menuIds'][_0x412d78(0xab)]===0x0&&_0x514c86[_0x412d78(0x8f)][_0x412d78(0xab)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}function a132_0x2496(_0x4f46fc,_0x370857){_0x4f46fc=_0x4f46fc-0x84;const _0x49de86=a132_0x49de();let _0x2496f4=_0x49de86[_0x4f46fc];return _0x2496f4;}export function selectMenusForUpdate(_0x11a626,_0x820446){const _0x48f8a7=a132_0x2496;validateSelection(_0x820446);if(_0x820446[_0x48f8a7(0xc4)])return _0x11a626;const _0x3af562=new Set(_0x11a626[_0x48f8a7(0x88)](_0x1d9aa5=>_0x1d9aa5['id'])),_0x48721b=new Set(_0x11a626[_0x48f8a7(0x88)](_0x582b65=>_0x582b65[_0x48f8a7(0xb2)])),_0x4c7a17=_0x820446[_0x48f8a7(0xa5)][_0x48f8a7(0xc7)](_0x4e063e=>!_0x3af562[_0x48f8a7(0xa1)](_0x4e063e)),_0x275454=_0x820446['paths'][_0x48f8a7(0xc7)](_0x55f5c0=>!_0x48721b['has'](_0x55f5c0));if(_0x4c7a17[_0x48f8a7(0xab)]>0x0||_0x275454['length']>0x0){const _0x53baf1=[..._0x4c7a17[_0x48f8a7(0x88)](_0x4a5ddf=>String(_0x4a5ddf)),..._0x275454][_0x48f8a7(0x87)](',\x20');throw new Error(_0x48f8a7(0xa4)+_0x53baf1);}const _0x56edf3=new Set(_0x820446[_0x48f8a7(0xa5)]),_0x35f392=new Set(_0x820446['paths']);return _0x11a626['filter'](_0x5566bd=>_0x56edf3['has'](_0x5566bd['id'])||_0x35f392[_0x48f8a7(0xa1)](_0x5566bd[_0x48f8a7(0xb2)]));}function normalizeMode(_0x5ed497){const _0x532b42=a132_0x2496;if(!_0x5ed497)return'patch';if(_0x5ed497===_0x532b42(0x86)||_0x5ed497===_0x532b42(0x99))return _0x5ed497;throw new Error(_0x532b42(0xaa)+_0x5ed497+_0x532b42(0xa8));}function a132_0x49de(){const _0x3fc20a=['12260IeAFUL','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','label','9658gZLAIx','JS\x20URL\x20is\x20unreachable:\x20','20MRfOdT','field','string','all','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','.css','filter','force','object','info','\x20existing\x20JS\x20resources\x20for\x20\x22','replace','join','map','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','isArray','.js','loadScriptMode','some','endsWith','paths','48wGkzlD','push','\x20existing\x20CSS\x20resources\x20for\x20\x22','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','CSS\x20URL\x20is\x20unreachable:\x20','parse','227EiQIXy','\x22\x20(','dryRun','patch','toLowerCase','menu\x20asset-update\x20cannot\x20patch\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menu-asset-update','273332Vobczu','Invalid\x20--params:\x20','split','has','after','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','menuIds','trim','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','.\x20Allowed\x20values:\x20replace,\x20patch','setLogPath','Invalid\x20--mode:\x20','length','status','2217897PSOpWO','message','cssUrl','Menu\x20asset\x20update\x20completed','unshift','path','1217376AfSszV','1260198DIzHTL','resources','extend','rejected','1666gRQhQe','selection','8542UERDkO','jsUrl'];a132_0x49de=function(){return _0x3fc20a;};return a132_0x49de();}function buildMenuUpdateDiff(_0x46b726,_0x3c4dd2,_0x3b063c,_0x28f063,_0xd6f9fb){const _0x3dc277=a132_0x2496,_0x2df3d9=[..._0x46b726[_0x3dc277(0xb5)]];_0x3b063c===_0x3dc277(0x99)&&assertUnambiguousPatchResources(_0x46b726,_0x2df3d9,_0x3c4dd2);const _0x5b96e1=_0x3b063c==='patch'?patchResources(_0x2df3d9,_0x3c4dd2):replaceResources(_0x3c4dd2),_0x34f871=[],_0x12482e=_0x2df3d9['some'](isJsResource),_0x39cca8=_0x5b96e1[_0x3dc277(0x8d)](isJsResource);if(_0x12482e&&!_0x39cca8){const _0x288006='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x46b726['label']+_0x3dc277(0x97)+_0x46b726[_0x3dc277(0xb2)]+').\x20'+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x28f063)throw new Error(_0x288006);_0x34f871['push'](_0x288006);}const _0x27eef9=_0x2df3d9['some'](isCssResource),_0xd11074=_0x5b96e1[_0x3dc277(0x8d)](isCssResource);_0x27eef9&&!_0xd11074&&_0x34f871[_0x3dc277(0x91)](_0x3dc277(0x93)+_0x46b726[_0x3dc277(0xbe)]+_0x3dc277(0x97)+_0x46b726[_0x3dc277(0xb2)]+').');const _0x577526=typeof _0x46b726[_0x3dc277(0xb6)]?.[_0x3dc277(0x8c)]===_0x3dc277(0xc3)?_0x46b726['extend'][_0x3dc277(0x8c)]:null,_0x330698=_0xd6f9fb?{'loadScriptMode':_0x577526}:{},_0x58f6ee=_0xd6f9fb?{'loadScriptMode':_0xd6f9fb}:{};return{'id':_0x46b726['id'],'label':_0x46b726['label'],'path':_0x46b726[_0x3dc277(0xb2)],'mode':_0x3b063c,'before':{'resources':_0x2df3d9,..._0x330698},'after':{'resources':_0x5b96e1,..._0x58f6ee},'warnings':_0x34f871};}function replaceResources(_0x32ccf6){const _0x4e6d5e=a132_0x2496;return[_0x32ccf6['jsUrl'],_0x32ccf6[_0x4e6d5e(0xaf)]]['filter'](_0x2198c3=>!!_0x2198c3);}function assertUnambiguousPatchResources(_0x3d1d8b,_0x1cde27,_0x427cbd){const _0x4b66e1=a132_0x2496,_0x1fb101=_0x1cde27[_0x4b66e1(0xc7)](isJsResource)[_0x4b66e1(0xab)];if(_0x427cbd[_0x4b66e1(0xbb)]&&_0x1fb101>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x1fb101+_0x4b66e1(0x85)+_0x3d1d8b[_0x4b66e1(0xbe)]+_0x4b66e1(0x97)+_0x3d1d8b[_0x4b66e1(0xb2)]+')\x20'+_0x4b66e1(0xbd));const _0xa7f814=_0x1cde27[_0x4b66e1(0xc7)](isCssResource)['length'];if(_0x427cbd['cssUrl']&&_0xa7f814>0x1)throw new Error(_0x4b66e1(0x9b)+_0xa7f814+_0x4b66e1(0x92)+_0x3d1d8b['label']+_0x4b66e1(0x97)+_0x3d1d8b[_0x4b66e1(0xb2)]+')\x20'+_0x4b66e1(0x9c));}function patchResources(_0x42c4a6,_0x5576d9){const _0x3b6d64=a132_0x2496;let _0x162d16=![],_0x122499=![];const _0x448441=[];for(const _0x4e0cc9 of _0x42c4a6){if(isJsResource(_0x4e0cc9)){if(_0x5576d9[_0x3b6d64(0xbb)]&&!_0x162d16)_0x448441['push'](_0x5576d9['jsUrl']),_0x162d16=!![];else!_0x5576d9['jsUrl']&&_0x448441[_0x3b6d64(0x91)](_0x4e0cc9);continue;}if(isCssResource(_0x4e0cc9)){if(_0x5576d9[_0x3b6d64(0xaf)]&&!_0x122499)_0x448441[_0x3b6d64(0x91)](_0x5576d9[_0x3b6d64(0xaf)]),_0x122499=!![];else!_0x5576d9[_0x3b6d64(0xaf)]&&_0x448441[_0x3b6d64(0x91)](_0x4e0cc9);continue;}_0x448441[_0x3b6d64(0x91)](_0x4e0cc9);}return _0x5576d9[_0x3b6d64(0xbb)]&&!_0x162d16&&_0x448441[_0x3b6d64(0xb1)](_0x5576d9[_0x3b6d64(0xbb)]),_0x5576d9[_0x3b6d64(0xaf)]&&!_0x122499&&_0x448441[_0x3b6d64(0x91)](_0x5576d9[_0x3b6d64(0xaf)]),_0x448441;}function isJsResource(_0xff5b58){const _0x1056a5=a132_0x2496;return stripQuery(_0xff5b58)[_0x1056a5(0x9a)]()['endsWith'](_0x1056a5(0x8b));}function isCssResource(_0x15b20c){const _0x455867=a132_0x2496;return stripQuery(_0x15b20c)[_0x455867(0x9a)]()[_0x455867(0x8e)](_0x455867(0xc6));}function stripQuery(_0x1369ee){const _0x6b2bf7=a132_0x2496;return _0x1369ee[_0x6b2bf7(0xa0)]('?')[0x0]??_0x1369ee;}function parseUpdateParamsFlag(_0x1639cc){const _0x5bd86b=a132_0x2496;if(!_0x1639cc||typeof _0x1639cc!==_0x5bd86b(0xc3))return{};try{const _0x464967=JSON[_0x5bd86b(0x95)](_0x1639cc);if(typeof _0x464967!==_0x5bd86b(0xc9)||_0x464967===null||Array[_0x5bd86b(0x8a)](_0x464967))return{};return{'jsUrl':typeof _0x464967['jsUrl']===_0x5bd86b(0xc3)?_0x464967[_0x5bd86b(0xbb)][_0x5bd86b(0xa6)]():undefined,'cssUrl':typeof _0x464967[_0x5bd86b(0xaf)]===_0x5bd86b(0xc3)?_0x464967['cssUrl'][_0x5bd86b(0xa6)]():undefined};}catch{return{};}}
1
+ (function(_0x25cab8,_0x267ee9){const _0x2df8db=a133_0x5472,_0x19b3d3=_0x25cab8();while(!![]){try{const _0x32e3b9=-parseInt(_0x2df8db(0x229))/0x1+-parseInt(_0x2df8db(0x204))/0x2*(parseInt(_0x2df8db(0x212))/0x3)+-parseInt(_0x2df8db(0x21c))/0x4+parseInt(_0x2df8db(0x211))/0x5*(-parseInt(_0x2df8db(0x225))/0x6)+parseInt(_0x2df8db(0x208))/0x7+-parseInt(_0x2df8db(0x219))/0x8*(-parseInt(_0x2df8db(0x20f))/0x9)+parseInt(_0x2df8db(0x22e))/0xa;if(_0x32e3b9===_0x267ee9)break;else _0x19b3d3['push'](_0x19b3d3['shift']());}catch(_0x4411fe){_0x19b3d3['push'](_0x19b3d3['shift']());}}}(a133_0xb428,0xe339b));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';function a133_0xb428(){const _0x2c3432=['3676162LGJuAR','status','JS\x20URL\x20is\x20unreachable:\x20','jsUrl','4954803EdHaVJ','.\x20Allowed\x20values:\x20replace,\x20patch','object','.css','menu-asset-update','menu\x20asset-update\x20cannot\x20patch\x20','dryRun','639VRwbYS','\x22\x20(','580WrZBQJ','3RuqOkg','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','trim','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','--params.','label','menuIds','176856DueyXY','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','endsWith','2097384WSKYin','isArray','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','extend','length','path','paths','has','allSettled','22890slLcRq','join','map','push','258679LdqyRi','patch','mode','loadScriptMode','setLogPath','17169350KNXcJB','after','resources','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','message','cssUrl','\x20existing\x20JS\x20resources\x20for\x20\x22','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','Menu\x20asset\x20update\x20completed','some','value','filter','Start\x20non-interactive\x20menu\x20asset\x20update','parse','selection','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22',').\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','toLowerCase','string','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','all'];a133_0xb428=function(){return _0x2c3432;};return a133_0xb428();}function a133_0x5472(_0x156fd7,_0x32cd93){_0x156fd7=_0x156fd7-0x1ec;const _0xb42864=a133_0xb428();let _0x547219=_0xb42864[_0x156fd7];return _0x547219;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x1bf5c2){const _0x450367=a133_0x5472,_0x565948=[];return _0x1bf5c2[_0x450367(0x207)]&&!isValidJsHttpsUrl(_0x1bf5c2['jsUrl'])&&_0x565948[_0x450367(0x228)]({'field':'jsUrl','message':_0x450367(0x1ee)}),_0x1bf5c2[_0x450367(0x1f0)]&&!isValidCssHttpsUrl(_0x1bf5c2[_0x450367(0x1f0)])&&_0x565948[_0x450367(0x228)]({'field':'cssUrl','message':_0x450367(0x1ff)}),_0x565948;}export async function runMenuUpdateCore(_0x394d4e,_0x5111f3,_0x35e15d,_0x2759c8={}){const _0x3735bc=a133_0x5472,_0xb4cc83=parseUpdateParamsFlag(_0x35e15d),_0x105e31=normalizeMode(_0x2759c8[_0x3735bc(0x22b)]);validateSelection(_0x2759c8['selection']);const _0x112786=[];if(_0xb4cc83[_0x3735bc(0x207)])_0x112786[_0x3735bc(0x228)](_0xb4cc83['jsUrl']);if(_0xb4cc83[_0x3735bc(0x1f0)])_0x112786[_0x3735bc(0x228)](_0xb4cc83[_0x3735bc(0x1f0)]);const _0x36b699=validateParams(_0xb4cc83);if(_0x36b699[_0x3735bc(0x220)]>0x0){const _0x38a571=_0x36b699[_0x3735bc(0x227)](_0x1b96fa=>_0x3735bc(0x216)+_0x1b96fa['field']+':\x20'+_0x1b96fa[_0x3735bc(0x1ef)])[_0x3735bc(0x226)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x38a571);}if(_0x112786[_0x3735bc(0x220)]===0x0)throw new Error(_0x3735bc(0x202)+_0x3735bc(0x1f2));logger[_0x3735bc(0x22d)](process['cwd']()),logger['info']('menu-asset-update',_0x3735bc(0x1f9),{'appCode':_0x394d4e,'jsUrl':_0xb4cc83[_0x3735bc(0x207)],'cssUrl':_0xb4cc83[_0x3735bc(0x1f0)],'mode':_0x105e31,'dryRun':_0x2759c8[_0x3735bc(0x20e)]===!![]});if(_0xb4cc83[_0x3735bc(0x207)]){const _0x4f7e15=await isUrlReachable(_0xb4cc83[_0x3735bc(0x207)]);if(!_0x4f7e15)throw new Error(_0x3735bc(0x206)+_0xb4cc83['jsUrl']);}if(_0xb4cc83[_0x3735bc(0x1f0)]){const _0x558baa=await isUrlReachable(_0xb4cc83['cssUrl']);if(!_0x558baa)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0xb4cc83[_0x3735bc(0x1f0)]);}const _0x286437=await getOnlineMenuList(_0x394d4e,_0x5111f3),_0x3b4d83=_0x286437[_0x3735bc(0x1f8)](_0x1307f6=>_0x1307f6['resources'][_0x3735bc(0x220)]>0x0),_0x2b3690=selectMenusForUpdate(_0x3b4d83,_0x2759c8[_0x3735bc(0x1fb)]);if(_0x2b3690[_0x3735bc(0x220)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x2759c8['dryRun']===!![]};const _0x4b508c=_0x2b3690[_0x3735bc(0x227)](_0xb090ee=>buildMenuUpdateDiff(_0xb090ee,_0xb4cc83,_0x105e31,_0x2759c8['force']===!![],_0x2759c8[_0x3735bc(0x22c)]));if(_0x2759c8['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x4b508c};const _0x5cff2c=await Promise[_0x3735bc(0x224)](_0x2b3690[_0x3735bc(0x227)]((_0x1b7484,_0x5bd79e)=>updateMenuCdnUrl(_0x394d4e,_0x5111f3,{'id':_0x1b7484['id'],'label':_0x1b7484[_0x3735bc(0x217)],'path':_0x1b7484[_0x3735bc(0x221)],'resources':_0x4b508c[_0x5bd79e][_0x3735bc(0x1ec)]['resources'],'extend':_0x1b7484[_0x3735bc(0x21f)]??null,'loadScriptMode':_0x2759c8[_0x3735bc(0x22c)]}))),_0x1b56ae=_0x5cff2c[_0x3735bc(0x1f8)](_0x1388b8=>_0x1388b8['status']==='fulfilled')[_0x3735bc(0x227)](_0xe5b30c=>_0xe5b30c[_0x3735bc(0x1f7)]),_0x280d54=_0x5cff2c[_0x3735bc(0x1f8)](_0x3f6dcf=>_0x3f6dcf[_0x3735bc(0x205)]==='rejected')['length'];return logger['info'](_0x3735bc(0x20c),_0x3735bc(0x1f5),{'count':_0x2b3690[_0x3735bc(0x220)],'resources':_0x112786}),{'updated':_0x1b56ae[_0x3735bc(0x220)],'failed':_0x280d54,'skipped':![],'menus':_0x1b56ae};}function validateSelection(_0x3eac65){const _0x3d5019=a133_0x5472;if(!_0x3eac65)throw new Error(_0x3d5019(0x21a));if(_0x3eac65[_0x3d5019(0x203)]&&(_0x3eac65[_0x3d5019(0x218)][_0x3d5019(0x220)]>0x0||_0x3eac65[_0x3d5019(0x222)][_0x3d5019(0x220)]>0x0))throw new Error(_0x3d5019(0x1f4));if(!_0x3eac65[_0x3d5019(0x203)]&&_0x3eac65[_0x3d5019(0x218)][_0x3d5019(0x220)]===0x0&&_0x3eac65[_0x3d5019(0x222)][_0x3d5019(0x220)]===0x0)throw new Error(_0x3d5019(0x21a));}export function selectMenusForUpdate(_0x520b76,_0x401147){const _0x2e036f=a133_0x5472;validateSelection(_0x401147);if(_0x401147[_0x2e036f(0x203)])return _0x520b76;const _0x2b5959=new Set(_0x520b76[_0x2e036f(0x227)](_0x3f392e=>_0x3f392e['id'])),_0x5b714c=new Set(_0x520b76['map'](_0x1c5b85=>_0x1c5b85['path'])),_0x525413=_0x401147['menuIds'][_0x2e036f(0x1f8)](_0x696433=>!_0x2b5959[_0x2e036f(0x223)](_0x696433)),_0xc93528=_0x401147[_0x2e036f(0x222)][_0x2e036f(0x1f8)](_0x54ca20=>!_0x5b714c[_0x2e036f(0x223)](_0x54ca20));if(_0x525413[_0x2e036f(0x220)]>0x0||_0xc93528[_0x2e036f(0x220)]>0x0){const _0xa320b7=[..._0x525413[_0x2e036f(0x227)](_0x9a0078=>String(_0x9a0078)),..._0xc93528][_0x2e036f(0x226)](',\x20');throw new Error(_0x2e036f(0x215)+_0xa320b7);}const _0x5bb2b2=new Set(_0x401147[_0x2e036f(0x218)]),_0x506099=new Set(_0x401147[_0x2e036f(0x222)]);return _0x520b76[_0x2e036f(0x1f8)](_0x181d0e=>_0x5bb2b2[_0x2e036f(0x223)](_0x181d0e['id'])||_0x506099[_0x2e036f(0x223)](_0x181d0e['path']));}function normalizeMode(_0x5b0b63){const _0x4b9cb3=a133_0x5472;if(!_0x5b0b63)return'patch';if(_0x5b0b63==='replace'||_0x5b0b63===_0x4b9cb3(0x22a))return _0x5b0b63;throw new Error('Invalid\x20--mode:\x20'+_0x5b0b63+_0x4b9cb3(0x209));}function buildMenuUpdateDiff(_0x2c69bc,_0x330315,_0x550309,_0x76ffca,_0x22fcd3){const _0x47859d=a133_0x5472,_0x473fab=[..._0x2c69bc[_0x47859d(0x1ed)]];_0x550309===_0x47859d(0x22a)&&assertUnambiguousPatchResources(_0x2c69bc,_0x473fab,_0x330315);const _0x45cbc9=_0x550309===_0x47859d(0x22a)?patchResources(_0x473fab,_0x330315):replaceResources(_0x330315),_0x4413e0=[],_0x4f5b0b=_0x473fab['some'](isJsResource),_0x181b0c=_0x45cbc9[_0x47859d(0x1f6)](isJsResource);if(_0x4f5b0b&&!_0x181b0c){const _0x8cf551=_0x47859d(0x1fd)+_0x2c69bc[_0x47859d(0x217)]+_0x47859d(0x210)+_0x2c69bc['path']+_0x47859d(0x1fe)+_0x47859d(0x21e);if(!_0x76ffca)throw new Error(_0x8cf551);_0x4413e0[_0x47859d(0x228)](_0x8cf551);}const _0x5b1e26=_0x473fab[_0x47859d(0x1f6)](isCssResource),_0x3650e2=_0x45cbc9[_0x47859d(0x1f6)](isCssResource);_0x5b1e26&&!_0x3650e2&&_0x4413e0['push'](_0x47859d(0x1f3)+_0x2c69bc[_0x47859d(0x217)]+_0x47859d(0x210)+_0x2c69bc['path']+').');const _0x1fd3f9=typeof _0x2c69bc[_0x47859d(0x21f)]?.['loadScriptMode']===_0x47859d(0x201)?_0x2c69bc[_0x47859d(0x21f)][_0x47859d(0x22c)]:null,_0x583d29=_0x22fcd3?{'loadScriptMode':_0x1fd3f9}:{},_0x320dbe=_0x22fcd3?{'loadScriptMode':_0x22fcd3}:{};return{'id':_0x2c69bc['id'],'label':_0x2c69bc['label'],'path':_0x2c69bc[_0x47859d(0x221)],'mode':_0x550309,'before':{'resources':_0x473fab,..._0x583d29},'after':{'resources':_0x45cbc9,..._0x320dbe},'warnings':_0x4413e0};}function replaceResources(_0x456577){const _0x399d81=a133_0x5472;return[_0x456577[_0x399d81(0x207)],_0x456577[_0x399d81(0x1f0)]]['filter'](_0x5e0f15=>!!_0x5e0f15);}function assertUnambiguousPatchResources(_0x29e298,_0x2aefb3,_0x6e4fa2){const _0x16adbf=a133_0x5472,_0x2c2661=_0x2aefb3[_0x16adbf(0x1f8)](isJsResource)[_0x16adbf(0x220)];if(_0x6e4fa2[_0x16adbf(0x207)]&&_0x2c2661>0x1)throw new Error(_0x16adbf(0x20d)+_0x2c2661+_0x16adbf(0x1f1)+_0x29e298['label']+_0x16adbf(0x210)+_0x29e298[_0x16adbf(0x221)]+')\x20'+_0x16adbf(0x1fc));const _0x2a1ec8=_0x2aefb3[_0x16adbf(0x1f8)](isCssResource)[_0x16adbf(0x220)];if(_0x6e4fa2[_0x16adbf(0x1f0)]&&_0x2a1ec8>0x1)throw new Error(_0x16adbf(0x20d)+_0x2a1ec8+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x29e298[_0x16adbf(0x217)]+'\x22\x20('+_0x29e298[_0x16adbf(0x221)]+')\x20'+_0x16adbf(0x213));}function patchResources(_0x4b908f,_0x2afe9a){const _0x20fbcd=a133_0x5472;let _0x3c5b85=![],_0x1c8ee2=![];const _0x79c28c=[];for(const _0x3f30e8 of _0x4b908f){if(isJsResource(_0x3f30e8)){if(_0x2afe9a[_0x20fbcd(0x207)]&&!_0x3c5b85)_0x79c28c[_0x20fbcd(0x228)](_0x2afe9a['jsUrl']),_0x3c5b85=!![];else!_0x2afe9a['jsUrl']&&_0x79c28c[_0x20fbcd(0x228)](_0x3f30e8);continue;}if(isCssResource(_0x3f30e8)){if(_0x2afe9a['cssUrl']&&!_0x1c8ee2)_0x79c28c[_0x20fbcd(0x228)](_0x2afe9a[_0x20fbcd(0x1f0)]),_0x1c8ee2=!![];else!_0x2afe9a[_0x20fbcd(0x1f0)]&&_0x79c28c['push'](_0x3f30e8);continue;}_0x79c28c[_0x20fbcd(0x228)](_0x3f30e8);}return _0x2afe9a[_0x20fbcd(0x207)]&&!_0x3c5b85&&_0x79c28c['unshift'](_0x2afe9a[_0x20fbcd(0x207)]),_0x2afe9a[_0x20fbcd(0x1f0)]&&!_0x1c8ee2&&_0x79c28c[_0x20fbcd(0x228)](_0x2afe9a[_0x20fbcd(0x1f0)]),_0x79c28c;}function isJsResource(_0x22c97a){const _0x5d6508=a133_0x5472;return stripQuery(_0x22c97a)[_0x5d6508(0x200)]()[_0x5d6508(0x21b)]('.js');}function isCssResource(_0x58c022){const _0x54c439=a133_0x5472;return stripQuery(_0x58c022)[_0x54c439(0x200)]()[_0x54c439(0x21b)](_0x54c439(0x20b));}function stripQuery(_0x5d74be){return _0x5d74be['split']('?')[0x0]??_0x5d74be;}function parseUpdateParamsFlag(_0x2560ec){const _0x4f0155=a133_0x5472;if(!_0x2560ec||typeof _0x2560ec!==_0x4f0155(0x201))return{};try{const _0x1eab1b=JSON[_0x4f0155(0x1fa)](_0x2560ec);if(typeof _0x1eab1b!==_0x4f0155(0x20a)||_0x1eab1b===null||Array[_0x4f0155(0x21d)](_0x1eab1b))return{};return{'jsUrl':typeof _0x1eab1b[_0x4f0155(0x207)]===_0x4f0155(0x201)?_0x1eab1b['jsUrl'][_0x4f0155(0x214)]():undefined,'cssUrl':typeof _0x1eab1b[_0x4f0155(0x1f0)]===_0x4f0155(0x201)?_0x1eab1b[_0x4f0155(0x1f0)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a133_0x2183(_0x5127b4,_0x7c6223){_0x5127b4=_0x5127b4-0x1cc;const _0x542d7b=a133_0x542d();let _0x2183db=_0x542d7b[_0x5127b4];return _0x2183db;}(function(_0x338dae,_0x36f6bf){const _0xa99d7c=a133_0x2183,_0x2d97f3=_0x338dae();while(!![]){try{const _0x4704de=-parseInt(_0xa99d7c(0x1d0))/0x1*(-parseInt(_0xa99d7c(0x1d7))/0x2)+-parseInt(_0xa99d7c(0x1d6))/0x3*(-parseInt(_0xa99d7c(0x1d2))/0x4)+-parseInt(_0xa99d7c(0x1d5))/0x5+-parseInt(_0xa99d7c(0x1ce))/0x6*(-parseInt(_0xa99d7c(0x1d1))/0x7)+parseInt(_0xa99d7c(0x1cc))/0x8+parseInt(_0xa99d7c(0x1d3))/0x9*(parseInt(_0xa99d7c(0x1cd))/0xa)+-parseInt(_0xa99d7c(0x1d4))/0xb;if(_0x4704de===_0x36f6bf)break;else _0x2d97f3['push'](_0x2d97f3['shift']());}catch(_0x395b63){_0x2d97f3['push'](_0x2d97f3['shift']());}}}(a133_0x542d,0x60ca3));export function isValidJsHttpsUrl(_0x1f64d5){const _0x4c3e79=a133_0x2183;return/^https:\/\/.+\.js(\?.*)?$/[_0x4c3e79(0x1cf)](_0x1f64d5['trim']());}function a133_0x542d(){const _0x14a6ce=['942WlnVnD','84iOZOsD','2827432shHJlT','10zOfBko','2925822IJNFbi','test','11608UtcsNU','7hmPfab','6464MIGHDZ','3378834zYMccE','12484065lIJlHX','3400430NhQsSd'];a133_0x542d=function(){return _0x14a6ce;};return a133_0x542d();}export function isValidCssHttpsUrl(_0x108285){return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x108285['trim']());}export async function isUrlReachable(_0x44ca1f){try{const _0x376640=await fetch(_0x44ca1f,{'method':'HEAD'});return _0x376640['ok'];}catch{return![];}}
1
+ function a134_0x415f(_0x559f72,_0x1d1633){_0x559f72=_0x559f72-0x137;const _0x51be83=a134_0x51be();let _0x415fc2=_0x51be83[_0x559f72];return _0x415fc2;}function a134_0x51be(){const _0x436b56=['2mccilc','5DEGnTi','138348GSjOQX','3231846SXJJTP','1051687JFoEMw','824920vxipOl','trim','1126060qsKhrY','3KrgWZH','228393XiBzAt','test','4100320KMPrQT'];a134_0x51be=function(){return _0x436b56;};return a134_0x51be();}(function(_0x14a231,_0x555ebb){const _0x5bf7ed=a134_0x415f,_0x29c895=_0x14a231();while(!![]){try{const _0x24dd20=parseInt(_0x5bf7ed(0x142))/0x1*(parseInt(_0x5bf7ed(0x139))/0x2)+-parseInt(_0x5bf7ed(0x141))/0x3*(-parseInt(_0x5bf7ed(0x140))/0x4)+parseInt(_0x5bf7ed(0x13a))/0x5*(parseInt(_0x5bf7ed(0x13c))/0x6)+-parseInt(_0x5bf7ed(0x13d))/0x7+-parseInt(_0x5bf7ed(0x138))/0x8+-parseInt(_0x5bf7ed(0x13b))/0x9+-parseInt(_0x5bf7ed(0x13e))/0xa;if(_0x24dd20===_0x555ebb)break;else _0x29c895['push'](_0x29c895['shift']());}catch(_0x336439){_0x29c895['push'](_0x29c895['shift']());}}}(a134_0x51be,0x464a0));export function isValidJsHttpsUrl(_0x18da05){const _0x404a88=a134_0x415f;return/^https:\/\/.+\.js(\?.*)?$/[_0x404a88(0x137)](_0x18da05['trim']());}export function isValidCssHttpsUrl(_0x284fb9){const _0x1d415f=a134_0x415f;return/^https:\/\/.+\.css(\?.*)?$/[_0x1d415f(0x137)](_0x284fb9[_0x1d415f(0x13f)]());}export async function isUrlReachable(_0x4c2e97){try{const _0x3e2285=await fetch(_0x4c2e97,{'method':'HEAD'});return _0x3e2285['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- function a134_0x2835(){const _0x1237ef=['\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','appCode','paths','Failed\x20to\x20fetch\x20online\x20menu\x20list','targetPages','Menu\x20sync\x20completed:\x20','onlineMenuList','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','\x20menu(s)\x20with\x20JS:\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','11122580soSgsh','\x20menu(s)...','cookie','yes','str','4bvernz','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','localPages','boolean','1583631amvkZk','params','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20menu(s)','\x20and\x20CSS:\x20','validation','length','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','cssUrl','cyan','2355358nkLfJH','24lSMyVD','string','15Cfytiq','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','Menu\x20creation\x20failed','3016948ttUImi','rawFlags','split','1BLnQFH','1473992KsttfO','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','onlinePaths','1545228TopiMX','\x20local\x20microfrontend\x20menu(s).','Sync\x20local\x20pages\x20as\x20platform\x20menus','18zERqZR','\x20failed.','flag','gray','Creating\x20','\x20created,\x20','\x20page(s)','size','\x20created.','\x20\x20✓\x20Selected:\x20','/smartapi/menu/create','selectedAppName','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Would\x20create\x20','write','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','created','\x20\x20Cancelled.','Menu\x20sync\x20skipped','skipped','trim','appcode','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','190563ETAtvD'];a134_0x2835=function(){return _0x1237ef;};return a134_0x2835();}const a134_0x1432f5=a134_0xa9bd;(function(_0x366856,_0x251e4f){const _0x2fbc8a=a134_0xa9bd,_0x52454d=_0x366856();while(!![]){try{const _0x5e4a0b=parseInt(_0x2fbc8a(0x9f))/0x1*(-parseInt(_0x2fbc8a(0x96))/0x2)+-parseInt(_0x2fbc8a(0xbe))/0x3*(-parseInt(_0x2fbc8a(0xce))/0x4)+parseInt(_0x2fbc8a(0x99))/0x5*(parseInt(_0x2fbc8a(0xa3))/0x6)+-parseInt(_0x2fbc8a(0xd2))/0x7+parseInt(_0x2fbc8a(0xa0))/0x8*(-parseInt(_0x2fbc8a(0xa6))/0x9)+parseInt(_0x2fbc8a(0xc9))/0xa+-parseInt(_0x2fbc8a(0x9c))/0xb*(-parseInt(_0x2fbc8a(0x97))/0xc);if(_0x5e4a0b===_0x251e4f)break;else _0x52454d['push'](_0x52454d['shift']());}catch(_0x29a90d){_0x52454d['push'](_0x52454d['shift']());}}}(a134_0x2835,0xb0e27));import a134_0x2f891c from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';function a134_0xa9bd(_0x1c4803,_0x1b3bd3){_0x1c4803=_0x1c4803-0x8d;const _0x283525=a134_0x2835();let _0xa9bdb9=_0x283525[_0x1c4803];return _0xa9bdb9;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':'sync','description':a134_0x1432f5(0xa5),'risk':a134_0x1432f5(0xb4),'flags':[{'name':a134_0x1432f5(0x8d),'type':a134_0x1432f5(0x98),'description':'Pre-fill\x20JS/CSS\x20URLs.\x20'+a134_0x1432f5(0xa1)},{'name':a134_0x1432f5(0xc1),'type':'string','description':a134_0x1432f5(0xb2)},{'name':'yes','type':a134_0x1432f5(0xd1),'description':a134_0x1432f5(0xcf)}],async 'dryRun'(_0x266182){const _0xa45651=a134_0x1432f5;ensureRunnableContext(_0x266182[_0xa45651(0x9d)],_0x266182[_0xa45651(0xb1)]);const _0x1485a1=await runMenuSyncCore(_0x266182['appCode'],_0x266182[_0xa45651(0xcb)],parsePaths(_0x266182[_0xa45651(0xcd)](_0xa45651(0xc1))),_0x266182['str'](_0xa45651(0x8d)),{'dryRun':!![]});return{'method':'POST','url':_0xa45651(0xb0),'body':_0x1485a1,'description':_0x1485a1[_0xa45651(0xba)]?_0xa45651(0x9a):_0xa45651(0xb3)+_0x1485a1[_0xa45651(0xc3)][_0xa45651(0x92)]+_0xa45651(0xa4)};},async 'execute'(_0xecd4c3){const _0x14baba=a134_0x1432f5;ensureRunnableContext(_0xecd4c3[_0x14baba(0x9d)],_0xecd4c3[_0x14baba(0xb1)]);const _0x21191a=_0xecd4c3[_0x14baba(0xa8)](_0x14baba(0xcc)),_0x28b1b0=_0xecd4c3[_0x14baba(0xcd)](_0x14baba(0x8d)),_0x23ab8b=parsePaths(_0xecd4c3[_0x14baba(0xcd)]('paths')),_0x586ee1=parseMenuSyncParams(_0x28b1b0);if(_0x21191a){const _0x39b5a0=await runMenuSyncCore(_0xecd4c3[_0x14baba(0xc0)],_0xecd4c3['cookie'],_0x23ab8b,_0x28b1b0);if(_0x39b5a0['skipped']){const _0x1fd246=getLocalPages();_0x1fd246[_0x14baba(0x92)]===0x0?writeCliSideChannelLine(_0x14baba(0xc8)):writeCliSideChannelLine(_0x14baba(0xb6));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x39b5a0[_0x14baba(0xb7)]+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x39b5a0,'message':_0x39b5a0[_0x14baba(0xba)]?_0x14baba(0xb9):_0x14baba(0xc4)+_0x39b5a0[_0x14baba(0xb7)]+_0x14baba(0xae)};}if(_0x23ab8b['length']>0x0)throw CliErrors[_0x14baba(0x91)](_0x14baba(0xbd),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x28b1b0)throw CliErrors[_0x14baba(0x91)](_0x14baba(0xc6),_0x14baba(0x8e));requireInteractive();const _0x2954a6=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x3ba698,_0x2e597c,_0x1f9a25;try{const _0x1cfd57=await fetchMenuData(_0xecd4c3['appCode'],_0xecd4c3[_0x14baba(0xcb)]);_0x3ba698=_0x1cfd57[_0x14baba(0xd0)],_0x2e597c=_0x1cfd57[_0x14baba(0xa2)],_0x1f9a25=_0x1cfd57[_0x14baba(0xc5)],stopSpinner(_0x2954a6,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x4dc71d){stopSpinner(_0x2954a6,_0x14baba(0xc2),![]);throw CliErrors[_0x14baba(0x91)](_0x4dc71d instanceof Error?_0x4dc71d['message']:_0x14baba(0xc2));}if(_0x3ba698[_0x14baba(0x92)]===0x0)return writeCliSideChannelLine(a134_0x2f891c['yellow'](_0x14baba(0xbf))),{'ok':!![]};const _0x20f22a=buildCompareRows(_0x3ba698,_0x2e597c);writeCliSideChannelLine(renderCompareTable(_0x20f22a)),writeCliSideChannelLine('');const _0x294887=await selectPages(_0x3ba698,_0x2e597c);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0x2f891c[_0x14baba(0x95)](_0x14baba(0xaf)+_0x294887['length']+_0x14baba(0xac)));const _0x23da08=_0x586ee1['jsUrl']&&_0x586ee1[_0x14baba(0x94)];if(!_0x23da08){writeCliSideChannelLine(renderSyncSummary(_0x294887,_0x2e597c[_0x14baba(0xad)]>0x0));const _0x22f3fb=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x22f3fb)return writeCliSideChannelLine(a134_0x2f891c[_0x14baba(0xa9)](_0x14baba(0xb8))),{'ok':!![]};}let _0x50c081=_0x586ee1['jsUrl'],_0x430c89=_0x586ee1[_0x14baba(0x94)];!_0x50c081&&(_0x50c081=await askJsUrl());!_0x430c89&&(_0x430c89=await askCssUrl());const _0xa0d1b3=await askConfirm('\x20\x20Create\x20'+_0x294887[_0x14baba(0x92)]+_0x14baba(0xc7)+_0x50c081+_0x14baba(0x90)+_0x430c89+'?');if(!_0xa0d1b3)return writeCliSideChannelLine(a134_0x2f891c[_0x14baba(0xa9)](_0x14baba(0xb8))),{'ok':!![]};const _0x9df6c4=[_0x50c081,_0x430c89],_0x35b817=startSpinner(_0x14baba(0xaa)+_0x294887[_0x14baba(0x92)]+_0x14baba(0xca));try{const _0x35da49=await doCreateMenus(_0xecd4c3['appCode'],_0xecd4c3[_0x14baba(0xcb)],_0x294887,_0x9df6c4);return stopSpinner(_0x35b817,'Created\x20'+_0x35da49[_0x14baba(0xb7)]+_0x14baba(0x8f),!![]),{'ok':!![],'data':_0x35da49,'message':_0x14baba(0xc4)+_0x35da49[_0x14baba(0xb7)]+_0x14baba(0xab)+_0x35da49['failed']+_0x14baba(0xa7)};}catch(_0x576d16){stopSpinner(_0x35b817,_0x14baba(0x9b),![]);throw CliErrors['validation'](_0x576d16 instanceof Error?_0x576d16['message']:_0x14baba(0x9b));}}};function ensureRunnableContext(_0x473ec6,_0x32c813){const _0xacc70=a134_0x1432f5,_0x330f78=_0x473ec6[_0xacc70(0xbc)]?String(_0x473ec6[_0xacc70(0xbc)])[_0xacc70(0xbb)]():'';if(!isInProject()&&!_0x32c813&&!_0x330f78)throw CliErrors[_0xacc70(0x91)](_0xacc70(0x93)+_0xacc70(0xb5));}function parsePaths(_0x157a1a){const _0x54b82a=a134_0x1432f5;return[...new Set(_0x157a1a[_0x54b82a(0x9e)](',')['map'](_0x1d5be3=>_0x1d5be3[_0x54b82a(0xbb)]())['filter'](Boolean))];}
1
+ const a135_0x5b2b64=a135_0x47aa;(function(_0x10e495,_0x29ae32){const _0x24146e=a135_0x47aa,_0x5b28e8=_0x10e495();while(!![]){try{const _0x30c4e0=parseInt(_0x24146e(0x14b))/0x1+parseInt(_0x24146e(0x12b))/0x2+-parseInt(_0x24146e(0x14a))/0x3*(parseInt(_0x24146e(0x125))/0x4)+-parseInt(_0x24146e(0x13b))/0x5*(parseInt(_0x24146e(0x12d))/0x6)+parseInt(_0x24146e(0x149))/0x7*(parseInt(_0x24146e(0x10d))/0x8)+-parseInt(_0x24146e(0x112))/0x9+parseInt(_0x24146e(0x118))/0xa;if(_0x30c4e0===_0x29ae32)break;else _0x5b28e8['push'](_0x5b28e8['shift']());}catch(_0x2cc44e){_0x5b28e8['push'](_0x5b28e8['shift']());}}}(a135_0x1a76,0x80154));function a135_0x47aa(_0x540dd0,_0x4c50e5){_0x540dd0=_0x540dd0-0x10d;const _0x1a768b=a135_0x1a76();let _0x47aace=_0x1a768b[_0x540dd0];return _0x47aace;}import a135_0x22d6ed from'chalk';function a135_0x1a76(){const _0x42b8c3=['\x20page(s)','targetPages','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','110873lwccfo','25239AbPYSZ','240259YmcJhC','\x20menu(s)\x20with\x20JS:\x20','cyan','Online\x20menu\x20list\x20fetched','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','str','gray','split','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','136zHMxSe','trim','cookie','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','localPages','1179855GXFCYb','\x20menu(s)...','\x20menu(s)','cssUrl','size','Menu\x20sync\x20completed:\x20','7176630NqMuDH','onlinePaths','skipped','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20created.','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','validation','\x20\x20Continue\x20with\x20creation?','flag','\x20menu(s)\x20created','Failed\x20to\x20fetch\x20online\x20menu\x20list','map','rawFlags','48SvCeVJ','write','POST','Menu\x20sync\x20skipped','Fetching\x20online\x20menu\x20list...','onlineMenuList','1083774dxtyGc','yes','6074358BhigWA','appCode','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','/smartapi/menu/create','boolean','✓\x20Menu\x20sync\x20completed:\x20','menu','jsUrl','\x20local\x20microfrontend\x20menu(s).','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','message','\x20\x20Cancelled.','params','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','5kNpMye','length','created','Menu\x20creation\x20failed','filter','selectedAppName','yellow','paths','\x20\x20Create\x20','appcode','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages'];a135_0x1a76=function(){return _0x42b8c3;};return a135_0x1a76();}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':a135_0x5b2b64(0x133),'command':'sync','description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a135_0x5b2b64(0x126),'flags':[{'name':a135_0x5b2b64(0x139),'type':'string','description':a135_0x5b2b64(0x11b)+a135_0x5b2b64(0x110)},{'name':a135_0x5b2b64(0x142),'type':'string','description':a135_0x5b2b64(0x14f)},{'name':a135_0x5b2b64(0x12c),'type':a135_0x5b2b64(0x131),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0x2d48ee){const _0x3a2c32=a135_0x5b2b64;ensureRunnableContext(_0x2d48ee[_0x3a2c32(0x124)],_0x2d48ee[_0x3a2c32(0x140)]);const _0x19cbd8=await runMenuSyncCore(_0x2d48ee[_0x3a2c32(0x12e)],_0x2d48ee[_0x3a2c32(0x10f)],parsePaths(_0x2d48ee[_0x3a2c32(0x150)]('paths')),_0x2d48ee[_0x3a2c32(0x150)](_0x3a2c32(0x139)),{'dryRun':!![]});return{'method':_0x3a2c32(0x127),'url':_0x3a2c32(0x130),'body':_0x19cbd8,'description':_0x19cbd8[_0x3a2c32(0x11a)]?_0x3a2c32(0x13a):'Would\x20create\x20'+_0x19cbd8[_0x3a2c32(0x147)][_0x3a2c32(0x13c)]+_0x3a2c32(0x135)};},async 'execute'(_0x50bc0c){const _0x38356c=a135_0x5b2b64;ensureRunnableContext(_0x50bc0c[_0x38356c(0x124)],_0x50bc0c[_0x38356c(0x140)]);const _0x580760=_0x50bc0c[_0x38356c(0x120)](_0x38356c(0x12c)),_0x2e316f=_0x50bc0c[_0x38356c(0x150)](_0x38356c(0x139)),_0x378b3f=parsePaths(_0x50bc0c[_0x38356c(0x150)]('paths')),_0x3e63bb=parseMenuSyncParams(_0x2e316f);if(_0x580760){const _0x2a09d8=await runMenuSyncCore(_0x50bc0c[_0x38356c(0x12e)],_0x50bc0c[_0x38356c(0x10f)],_0x378b3f,_0x2e316f);if(_0x2a09d8['skipped']){const _0x1d1e90=getLocalPages();_0x1d1e90['length']===0x0?writeCliSideChannelLine(_0x38356c(0x145)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x38356c(0x132)+_0x2a09d8[_0x38356c(0x13d)]+_0x38356c(0x121));return{'ok':!![],'data':_0x2a09d8,'message':_0x2a09d8[_0x38356c(0x11a)]?_0x38356c(0x128):_0x38356c(0x117)+_0x2a09d8[_0x38356c(0x13d)]+_0x38356c(0x11c)};}if(_0x378b3f[_0x38356c(0x13c)]>0x0)throw CliErrors[_0x38356c(0x11e)](_0x38356c(0x11d),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x2e316f)throw CliErrors[_0x38356c(0x11e)](_0x38356c(0x12f),_0x38356c(0x154));requireInteractive();const _0x1afb82=startSpinner(_0x38356c(0x129));let _0x59b05d,_0x3e46e2,_0xe260b1;try{const _0x2c5561=await fetchMenuData(_0x50bc0c[_0x38356c(0x12e)],_0x50bc0c['cookie']);_0x59b05d=_0x2c5561[_0x38356c(0x111)],_0x3e46e2=_0x2c5561[_0x38356c(0x119)],_0xe260b1=_0x2c5561[_0x38356c(0x12a)],stopSpinner(_0x1afb82,_0x38356c(0x14e),!![]);}catch(_0xa88c6a){stopSpinner(_0x1afb82,_0x38356c(0x122),![]);throw CliErrors[_0x38356c(0x11e)](_0xa88c6a instanceof Error?_0xa88c6a[_0x38356c(0x137)]:_0x38356c(0x122));}if(_0x59b05d[_0x38356c(0x13c)]===0x0)return writeCliSideChannelLine(a135_0x22d6ed[_0x38356c(0x141)](_0x38356c(0x136))),{'ok':!![]};const _0x40cf39=buildCompareRows(_0x59b05d,_0x3e46e2);writeCliSideChannelLine(renderCompareTable(_0x40cf39)),writeCliSideChannelLine('');const _0x1d8bf6=await selectPages(_0x59b05d,_0x3e46e2);writeCliSideChannelLine(''),writeCliSideChannelLine(a135_0x22d6ed[_0x38356c(0x14d)]('\x20\x20✓\x20Selected:\x20'+_0x1d8bf6[_0x38356c(0x13c)]+_0x38356c(0x146)));const _0x40656d=_0x3e63bb['jsUrl']&&_0x3e63bb[_0x38356c(0x115)];if(!_0x40656d){writeCliSideChannelLine(renderSyncSummary(_0x1d8bf6,_0x3e46e2[_0x38356c(0x116)]>0x0));const _0x7f1992=await askConfirm(_0x38356c(0x11f));if(!_0x7f1992)return writeCliSideChannelLine(a135_0x22d6ed['gray'](_0x38356c(0x138))),{'ok':!![]};}let _0xe042dc=_0x3e63bb[_0x38356c(0x134)],_0x4daf10=_0x3e63bb[_0x38356c(0x115)];!_0xe042dc&&(_0xe042dc=await askJsUrl());!_0x4daf10&&(_0x4daf10=await askCssUrl());const _0xca97c=await askConfirm(_0x38356c(0x143)+_0x1d8bf6[_0x38356c(0x13c)]+_0x38356c(0x14c)+_0xe042dc+'\x20and\x20CSS:\x20'+_0x4daf10+'?');if(!_0xca97c)return writeCliSideChannelLine(a135_0x22d6ed[_0x38356c(0x151)](_0x38356c(0x138))),{'ok':!![]};const _0x4d5315=[_0xe042dc,_0x4daf10],_0x39c1b6=startSpinner('Creating\x20'+_0x1d8bf6[_0x38356c(0x13c)]+_0x38356c(0x113));try{const _0x416bf0=await doCreateMenus(_0x50bc0c[_0x38356c(0x12e)],_0x50bc0c[_0x38356c(0x10f)],_0x1d8bf6,_0x4d5315);return stopSpinner(_0x39c1b6,'Created\x20'+_0x416bf0['created']+_0x38356c(0x114),!![]),{'ok':!![],'data':_0x416bf0,'message':_0x38356c(0x117)+_0x416bf0[_0x38356c(0x13d)]+'\x20created,\x20'+_0x416bf0['failed']+'\x20failed.'};}catch(_0x539454){stopSpinner(_0x39c1b6,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x38356c(0x11e)](_0x539454 instanceof Error?_0x539454[_0x38356c(0x137)]:_0x38356c(0x13e));}}};function ensureRunnableContext(_0x154a82,_0x3eb49a){const _0x1e8a4c=a135_0x5b2b64,_0x2cc1db=_0x154a82['appcode']?String(_0x154a82[_0x1e8a4c(0x144)])[_0x1e8a4c(0x10e)]():'';if(!isInProject()&&!_0x3eb49a&&!_0x2cc1db)throw CliErrors[_0x1e8a4c(0x11e)](_0x1e8a4c(0x148)+_0x1e8a4c(0x153));}function parsePaths(_0xf424e5){const _0x4d3cd5=a135_0x5b2b64;return[...new Set(_0xf424e5[_0x4d3cd5(0x152)](',')[_0x4d3cd5(0x123)](_0x495834=>_0x495834['trim']())[_0x4d3cd5(0x13f)](Boolean))];}
@@ -1 +1 @@
1
- const a135_0x2120ce=a135_0x4a9f;(function(_0x3494a0,_0xb94942){const _0x58fe6b=a135_0x4a9f,_0xb38a5f=_0x3494a0();while(!![]){try{const _0x2c8f94=parseInt(_0x58fe6b(0x135))/0x1*(parseInt(_0x58fe6b(0x13a))/0x2)+-parseInt(_0x58fe6b(0x107))/0x3*(-parseInt(_0x58fe6b(0x112))/0x4)+-parseInt(_0x58fe6b(0x110))/0x5+parseInt(_0x58fe6b(0x136))/0x6*(parseInt(_0x58fe6b(0x144))/0x7)+parseInt(_0x58fe6b(0x11d))/0x8*(-parseInt(_0x58fe6b(0x165))/0x9)+-parseInt(_0x58fe6b(0x11f))/0xa+parseInt(_0x58fe6b(0x155))/0xb*(-parseInt(_0x58fe6b(0x106))/0xc);if(_0x2c8f94===_0xb94942)break;else _0xb38a5f['push'](_0xb38a5f['shift']());}catch(_0x1545de){_0xb38a5f['push'](_0xb38a5f['shift']());}}}(a135_0x1773,0x7a936));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a135_0x2120ce(0x105),'path':a135_0x2120ce(0x139)}];export const menuVisibilityUpdate={'service':'menu','command':a135_0x2120ce(0x120),'description':a135_0x2120ce(0xfb),'risk':a135_0x2120ce(0x14f),'structuredErrors':!![],'flags':[{'name':a135_0x2120ce(0x130),'type':a135_0x2120ce(0x14c),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a135_0x2120ce(0x127),'type':a135_0x2120ce(0x14c),'description':a135_0x2120ce(0x16e)},{'name':a135_0x2120ce(0x13d),'type':'boolean','required':!![],'description':a135_0x2120ce(0x154)},{'name':a135_0x2120ce(0x150),'type':a135_0x2120ce(0x125),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':'expected-count','type':a135_0x2120ce(0x174),'description':a135_0x2120ce(0x163)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1bde33){parseInput(_0x1bde33),requireExplicitYes(_0x1bde33);},async 'dryRun'(_0x2ea41f){const _0x4b70d6=a135_0x2120ce,_0x5c296d=await buildPlan(_0x2ea41f,!![]),_0x574b2f=_0x5c296d['plan'][_0x4b70d6(0x15f)]?.[_0x4b70d6(0x160)]??0x0,_0x41c15e=_0x5c296d['plan'][_0x4b70d6(0x151)][_0x4b70d6(0x160)]-_0x574b2f;return menuDryRunResult(_0x5c296d[_0x4b70d6(0x149)],{'method':_0x4b70d6(0x105),'url':_0x4b70d6(0x139),'body':{'updates':_0x5c296d[_0x4b70d6(0x149)][_0x4b70d6(0x15f)]?.[_0x4b70d6(0x158)](_0x2516bd=>_0x2516bd[_0x4b70d6(0x159)])??[]},'description':_0x4b70d6(0x15d)+_0x574b2f+_0x4b70d6(0x12d)+_0x41c15e+_0x4b70d6(0x103)});},async 'execute'(_0x7a7cee){const _0x1f6607=a135_0x2120ce;requireExplicitYes(_0x7a7cee);const _0x3c412f=await buildPlan(_0x7a7cee,![]);await recheckMutationSnapshot(_0x7a7cee,_0x3c412f['plan'],'update\x20menu\x20visibility');const _0x23330b=[],_0x57d6c3=[],_0x2aff0d=[];for(const _0x5ebc15 of _0x3c412f['plan'][_0x1f6607(0x151)]){if(_0x5ebc15['before']['visible']===_0x3c412f[_0x1f6607(0x149)][_0x1f6607(0x13f)]){_0x23330b['push']({'id':_0x5ebc15['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x7a7cee[_0x1f6607(0x11c)],_0x7a7cee[_0x1f6607(0x13c)],{'id':_0x5ebc15['id'],'visible':_0x3c412f[_0x1f6607(0x149)][_0x1f6607(0x13f)]}),_0x23330b[_0x1f6607(0x102)]({'id':_0x5ebc15['id'],'updated':!![],'skipped':![]});}catch(_0x484cf4){const _0x5bfab9=mapMenuApiError(_0x484cf4,_0x1f6607(0x13e),_0x5ebc15['id']);if(isMenuResponseLoss(_0x484cf4)&&_0x5bfab9[_0x1f6607(0x161)]!==_0x1f6607(0x10d)){_0x2aff0d['push'](_0x5ebc15['id']);continue;}_0x57d6c3[_0x1f6607(0x102)]({'id':_0x5ebc15['id'],'stage':_0x1f6607(0x138),'code':_0x5bfab9[_0x1f6607(0x161)],'message':_0x5bfab9['message']});}}let _0x5ad2a6;try{_0x5ad2a6=await fetchMenuSnapshot(_0x7a7cee['appCode'],_0x7a7cee[_0x1f6607(0x13c)]);}catch(_0x4cf1bd){const _0x528100=describeMenuErrorCause(_0x4cf1bd,'verify\x20menu\x20visibility\x20update'),_0x387847=_0x2aff0d[_0x1f6607(0x158)](_0x96ea99=>({'id':_0x96ea99,'stage':'update-recovery','code':_0x1f6607(0x10b),'message':'Response\x20was\x20lost\x20for\x20menu\x20'+_0x96ea99+_0x1f6607(0x118),'requestedStateConfirmed':![],'recovered':![]})),_0x489983={'stage':'verification','code':_0x1f6607(0x10b),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x3c412f['plan']['targets'][_0x1f6607(0x158)](_0xb44ffc=>_0xb44ffc['id']),'requestedStateConfirmed':![],..._0x528100};throw menuFailure(asVerificationError(_0x4cf1bd,_0x1f6607(0x12b)),_0x3c412f['plan'],{'stage':_0x1f6607(0x146),'succeeded':_0x23330b,'failedRecords':[..._0x57d6c3,..._0x387847,_0x489983],'warnings':[_0x1f6607(0xf7)],'verification':{'status':_0x1f6607(0x108),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x1dc741=[];for(const _0x345c8a of _0x23330b){const _0x36946e=Number(_0x345c8a['id']),_0xb7c010=_0x3c412f[_0x1f6607(0x12a)]['get'](_0x36946e),_0x1624d8=_0x5ad2a6[_0x1f6607(0x15e)][_0x1f6607(0x15c)](_0x36946e);try{verifyVisibilityUpdate(_0xb7c010,_0x1624d8,_0x3c412f[_0x1f6607(0x149)][_0x1f6607(0x13f)]);}catch(_0x5a87c6){const _0x4f990e=asVerificationError(_0x5a87c6,'Menu\x20'+_0x36946e+_0x1f6607(0x117));_0x1dc741[_0x1f6607(0x102)]({'id':_0x36946e,'stage':_0x1f6607(0x146),'code':_0x4f990e[_0x1f6607(0x161)],'message':_0x4f990e[_0x1f6607(0x121)],'requestedStateConfirmed':![]});}}for(const _0x59bc25 of _0x2aff0d){const _0x5cec4f=_0x3c412f[_0x1f6607(0x12a)][_0x1f6607(0x15c)](_0x59bc25),_0x297572=_0x5ad2a6[_0x1f6607(0x15e)]['get'](_0x59bc25);try{verifyVisibilityUpdate(_0x5cec4f,_0x297572,_0x3c412f['plan'][_0x1f6607(0x13f)]),_0x23330b[_0x1f6607(0x102)]({'id':_0x59bc25,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x36a74a){const _0x5a0dd7=asVerificationError(_0x36a74a,'Response\x20was\x20lost\x20and\x20menu\x20'+_0x59bc25+_0x1f6607(0x169));_0x1dc741[_0x1f6607(0x102)]({'id':_0x59bc25,'stage':_0x1f6607(0x12c),'code':_0x5a0dd7['code'],'message':_0x5a0dd7['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x1dc741[_0x1f6607(0x160)]>0x0){const _0x139839=_0x1dc741[_0x1f6607(0x158)](_0x5304ce=>Number(_0x5304ce['id'])),_0x5d2a82=_0x23330b['filter'](_0x205593=>_0x205593[_0x1f6607(0x126)]===!![])['length'],_0x37638e=menuError(_0x1f6607(0x10b),_0x1f6607(0x16d)+_0x139839[_0x1f6607(0x15a)](',\x20')+'.',_0x1f6607(0x16b));throw menuFailure(_0x37638e,_0x3c412f['plan'],{'stage':_0x1f6607(0x146),'succeeded':_0x23330b,'failedRecords':[..._0x57d6c3,..._0x1dc741],'warnings':[_0x1f6607(0x166)],'verification':{'status':'failed',..._0x139839['length']===0x1?{'targetId':_0x139839[0x0]}:{'targetIds':_0x139839},'recoveredCount':_0x5d2a82,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x3242eb=_0x23330b[_0x1f6607(0x10a)](_0x555403=>_0x555403[_0x1f6607(0x148)]===!![])[_0x1f6607(0x160)],_0x22ae05=_0x23330b[_0x1f6607(0x160)]-_0x3242eb,_0x176705={..._0x3c412f[_0x1f6607(0x149)],'succeeded':_0x23330b,'failed':_0x57d6c3,'warnings':_0x57d6c3['length']>0x0?[..._0x3c412f['plan'][_0x1f6607(0x162)],_0x1f6607(0x14d)]:_0x3c412f[_0x1f6607(0x149)][_0x1f6607(0x162)],'verification':{'checkedBy':_0x1f6607(0x16a),'snapshotHash':_0x5ad2a6[_0x1f6607(0x175)],'matchesRequestedState':_0x57d6c3[_0x1f6607(0x160)]===0x0,'recoveredCount':_0x2aff0d['length']}};return{'ok':_0x57d6c3[_0x1f6607(0x160)]===0x0,'data':_0x176705,'message':_0x57d6c3[_0x1f6607(0x160)]===0x0?'Updated\x20visibility\x20for\x20'+_0x3242eb+_0x1f6607(0x13b)+_0x22ae05+_0x1f6607(0x103):_0x1f6607(0x147)+_0x3242eb+_0x1f6607(0x153)+_0x22ae05+_0x1f6607(0xff)+_0x57d6c3['length']+_0x1f6607(0x131)};}};function parseInput(_0x1f5652){const _0x50c767=a135_0x2120ce,_0x1cefd0=parseMenuIds(_0x1f5652[_0x50c767(0x176)](_0x50c767(0x130))),_0x2b0dc5=parseCsv(_0x1f5652['str']('paths'));if(_0x1cefd0[_0x50c767(0x160)]===0x0&&_0x2b0dc5['length']===0x0)throw CliErrors[_0x50c767(0x11b)](_0x50c767(0x145));const _0x49a121=parseBooleanFlag(_0x1f5652,'visible',!![]),_0x1fddd8=parseBooleanFlag(_0x1f5652,'expect-visible',![]);let _0x3b5c7c;if(hasFlag(_0x1f5652,_0x50c767(0x113))){_0x3b5c7c=_0x1f5652[_0x50c767(0x109)](_0x50c767(0x113));if(!Number[_0x50c767(0x142)](_0x3b5c7c)||_0x3b5c7c<0x0)throw CliErrors[_0x50c767(0x11b)](_0x50c767(0x128));}return{'menuIds':_0x1cefd0,'paths':_0x2b0dc5,'visible':_0x49a121,'expectVisible':_0x1fddd8,'expectedCount':_0x3b5c7c};}async function buildPlan(_0x480bfb,_0x442477){const _0x4f5cd7=a135_0x2120ce,_0x53c9c6=parseInput(_0x480bfb),_0x306a38=await fetchMutationSnapshot(_0x480bfb,_0x4f5cd7(0x12e)),_0x364b23=selectTargets(_0x306a38[_0x4f5cd7(0xf9)],_0x53c9c6[_0x4f5cd7(0x10c)],_0x53c9c6[_0x4f5cd7(0x127)]);if(_0x53c9c6[_0x4f5cd7(0xfc)]!==undefined&&_0x364b23[_0x4f5cd7(0x160)]!==_0x53c9c6[_0x4f5cd7(0xfc)])throw menuError(_0x4f5cd7(0x14a),_0x4f5cd7(0x171)+_0x364b23[_0x4f5cd7(0x160)]+_0x4f5cd7(0x11a)+_0x53c9c6['expectedCount']+'.',_0x4f5cd7(0x172));if(_0x53c9c6[_0x4f5cd7(0x137)]!==undefined){const _0x599cd9=_0x364b23['filter'](_0x222285=>_0x222285['visible']!==_0x53c9c6[_0x4f5cd7(0x137)]);if(_0x599cd9[_0x4f5cd7(0x160)]>0x0)throw menuError('menu_state_drift',_0x4f5cd7(0x164)+_0x599cd9[_0x4f5cd7(0x158)](_0x26d650=>_0x26d650['id'])[_0x4f5cd7(0x15a)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x437260=_0x364b23['map'](_0x3ebf55=>({'id':_0x3ebf55['id'],'label':_0x3ebf55[_0x4f5cd7(0xfe)],'path':_0x3ebf55[_0x4f5cd7(0x14e)],'before':{'visible':_0x3ebf55[_0x4f5cd7(0x13d)]},'after':{'visible':_0x53c9c6[_0x4f5cd7(0x13d)]}})),_0x2e4b10=_0x437260[_0x4f5cd7(0x10a)](_0x99451c=>_0x99451c['before']['visible']!==_0x53c9c6['visible'])[_0x4f5cd7(0x158)](_0x16370f=>({'stage':'update-menu-visibility','method':_0x4f5cd7(0x105),'path':_0x4f5cd7(0x139),'body':{'appCode':_0x480bfb[_0x4f5cd7(0x11c)],'id':_0x16370f['id'],'visible':_0x53c9c6['visible']}})),_0x28f023=mutationResult({'operation':_0x4f5cd7(0x120),'selector':{'menuIds':_0x53c9c6['menuIds'],'paths':_0x53c9c6[_0x4f5cd7(0x127)]},'before':{'menus':_0x364b23[_0x4f5cd7(0x158)](_0xcd5f2f=>({'id':_0xcd5f2f['id'],'path':_0xcd5f2f[_0x4f5cd7(0x14e)],'visible':_0xcd5f2f['visible']}))},'after':{'menus':_0x364b23[_0x4f5cd7(0x158)](_0x365bd3=>({'id':_0x365bd3['id'],'path':_0x365bd3[_0x4f5cd7(0x14e)],'visible':_0x53c9c6[_0x4f5cd7(0x13d)]}))},'dryRun':_0x442477,'backend':[...BACKEND],'plannedActions':_0x2e4b10,'snapshotHash':_0x306a38[_0x4f5cd7(0x175)],'warnings':_0x2e4b10[_0x4f5cd7(0x160)]===0x0?[_0x4f5cd7(0xf8)]:[]});return{'plan':{..._0x28f023,'requestedVisible':_0x53c9c6['visible'],'targets':_0x437260},'beforeById':new Map(_0x364b23[_0x4f5cd7(0x158)](_0x3e7db=>[_0x3e7db['id'],_0x3e7db]))};}function selectTargets(_0x566c13,_0x1ef52d,_0x3a05a4){const _0x4942f2=a135_0x2120ce,_0x10525b=new Map(_0x566c13['map'](_0x1dd37e=>[_0x1dd37e['id'],_0x1dd37e])),_0x340924=new Map(),_0x117602=_0x1ef52d[_0x4942f2(0x10a)](_0x3f7755=>!_0x10525b[_0x4942f2(0x115)](_0x3f7755));if(_0x117602[_0x4942f2(0x160)]>0x0)throw menuError('menu_selector_not_found',_0x4942f2(0x10e)+_0x117602[_0x4942f2(0x15a)](',\x20')+'.',_0x4942f2(0x129));for(const _0x273fb3 of _0x1ef52d){_0x340924[_0x4942f2(0x168)](_0x273fb3,_0x10525b[_0x4942f2(0x15c)](_0x273fb3));}for(const _0xb56f5a of _0x3a05a4){const _0x27063a=_0x566c13[_0x4942f2(0x10a)](_0x30cc8f=>_0x30cc8f['path']===_0xb56f5a);if(_0x27063a[_0x4942f2(0x160)]===0x0)throw menuError(_0x4942f2(0x100),_0x4942f2(0x134)+JSON[_0x4942f2(0x116)](_0xb56f5a)+'.',_0x4942f2(0x124));if(_0x27063a[_0x4942f2(0x160)]>0x1)throw menuError('menu_selector_ambiguous','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON[_0x4942f2(0x116)](_0xb56f5a)+'.',_0x4942f2(0x173)+_0x27063a[_0x4942f2(0x158)](_0x476c4d=>_0x476c4d['id'])['join'](',\x20')+'.');const _0x2f6e14=_0x27063a[0x0];_0x340924['set'](_0x2f6e14['id'],_0x2f6e14);}return[..._0x340924[_0x4942f2(0x140)]()];}function a135_0x1773(){const _0x1bf69d=['update\x20menu\x20visibility','sort','menu-ids','\x20failed.','rawFlags','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','Menu\x20path\x20selector\x20not\x20found:\x20','100052QQzrGV','6rzvmRD','expectVisible','update','/smartapi/menu/update','14HSxhVI','\x20menu(s);\x20skipped\x20','cookie','visible','update\x20visibility\x20for','requestedVisible','values','resources','isSafeInteger','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','168497DhHqBw','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','verification','Menu\x20visibility\x20update\x20completed:\x20','updated','plan','menu_expected_count_mismatch','datasetCode','string','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','path','high-risk-write','expect-visible','targets','false','\x20updated,\x20','Requested\x20menu\x20visibility','49258aAxEPD','type','Menu\x20','map','body','join','flagMissing','get','Would\x20update\x20visibility\x20for\x20','byId','plannedActions','length','code','warnings','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','18UGgNsQ','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','resourcesValid','set','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','menu\x20list','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','pageId','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','true','childrenCount','Selected\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','number','hash','str','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','menus','datasetId','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','expectedCount','url','label','\x20skipped,\x20','menu_selector_not_found','depth','push','\x20unchanged\x20menu(s).','trim','POST','2640BzgcSJ','709377EIdtGh','failed','num','filter','menu_verification_failed','menuIds','menu_permission_denied','Menu\x20id\x20selector(s)\x20not\x20found:\x20','parentId','754115KElkTS','split','16OYdkZt','expected-count','pageType','has','stringify','\x20visibility\x20update\x20could\x20not\x20be\x20verified','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','childrenIds','\x20menu(s),\x20expected\x20','validation','appCode','38576zjWBfR','\x20changed\x20unexpectedly.','225740tsAZAP','visibility-update','message','\x20must\x20be\x20true\x20or\x20false.','isArray','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','boolean','recovered','paths','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','beforeById','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','update-recovery','\x20menu(s);\x20skip\x20'];a135_0x1773=function(){return _0x1bf69d;};return a135_0x1773();}function parseMenuIds(_0xa793e){const _0x3a3cb8=a135_0x2120ce,_0x5d8e69=parseCsv(_0xa793e),_0x3e438b=_0x5d8e69[_0x3a3cb8(0x158)](Number);if(_0x3e438b['some'](_0x5abe1a=>!Number[_0x3a3cb8(0x142)](_0x5abe1a)||_0x5abe1a<=0x0))throw CliErrors[_0x3a3cb8(0x11b)](_0x3a3cb8(0x143));return[...new Set(_0x3e438b)];}function parseCsv(_0x4d5b81){const _0x32ed0b=a135_0x2120ce;return[...new Set(_0x4d5b81[_0x32ed0b(0x111)](',')['map'](_0xbb7813=>_0xbb7813[_0x32ed0b(0x104)]())[_0x32ed0b(0x10a)](Boolean))];}function a135_0x4a9f(_0x3df24e,_0x4fe8c7){_0x3df24e=_0x3df24e-0xf7;const _0x17730d=a135_0x1773();let _0x4a9f18=_0x17730d[_0x3df24e];return _0x4a9f18;}function parseBooleanFlag(_0x46ea6c,_0x521d53,_0x4b606f){const _0x571691=a135_0x2120ce;if(!hasFlag(_0x46ea6c,_0x521d53)){if(_0x4b606f)throw CliErrors[_0x571691(0x15b)](_0x521d53);return undefined;}const _0x2bd071=_0x46ea6c[_0x571691(0x132)][_0x521d53];if(_0x2bd071===!![]||_0x2bd071===![])return _0x2bd071;if(_0x2bd071===_0x571691(0x16f))return!![];if(_0x2bd071===_0x571691(0x152))return![];throw CliErrors[_0x571691(0x11b)]('--'+_0x521d53+_0x571691(0x122));}function verifyVisibilityUpdate(_0xffa525,_0x392e23,_0x5ec446){const _0x2b3cc5=a135_0x2120ce;assertVerified(!!_0x392e23,_0x2b3cc5(0x157)+_0xffa525['id']+_0x2b3cc5(0x133)),assertVerified(_0x392e23[_0x2b3cc5(0x13d)]===_0x5ec446,_0x2b3cc5(0x157)+_0xffa525['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x5c733b=[['id',_0x392e23['id'],_0xffa525['id']],[_0x2b3cc5(0x10f),_0x392e23[_0x2b3cc5(0x10f)],_0xffa525[_0x2b3cc5(0x10f)]],[_0x2b3cc5(0x101),_0x392e23[_0x2b3cc5(0x101)],_0xffa525['depth']],[_0x2b3cc5(0xfe),_0x392e23[_0x2b3cc5(0xfe)],_0xffa525[_0x2b3cc5(0xfe)]],[_0x2b3cc5(0x14e),_0x392e23['path'],_0xffa525[_0x2b3cc5(0x14e)]],['url',_0x392e23['url'],_0xffa525[_0x2b3cc5(0xfd)]],[_0x2b3cc5(0x156),_0x392e23[_0x2b3cc5(0x156)],_0xffa525[_0x2b3cc5(0x156)]],[_0x2b3cc5(0x12f),_0x392e23[_0x2b3cc5(0x12f)],_0xffa525[_0x2b3cc5(0x12f)]],['resources',_0x392e23[_0x2b3cc5(0x141)],_0xffa525[_0x2b3cc5(0x141)]],['resourcesValid',_0x392e23[_0x2b3cc5(0x167)],_0xffa525[_0x2b3cc5(0x167)]],[_0x2b3cc5(0x119),_0x392e23[_0x2b3cc5(0x119)],_0xffa525[_0x2b3cc5(0x119)]],[_0x2b3cc5(0x170),_0x392e23['childrenCount'],_0xffa525['childrenCount']],[_0x2b3cc5(0x16c),_0x392e23['pageId'],_0xffa525['pageId']],[_0x2b3cc5(0x114),_0x392e23['pageType'],_0xffa525[_0x2b3cc5(0x114)]],['modelType',_0x392e23['modelType'],_0xffa525['modelType']],[_0x2b3cc5(0xfa),_0x392e23[_0x2b3cc5(0xfa)],_0xffa525[_0x2b3cc5(0xfa)]],[_0x2b3cc5(0x14b),_0x392e23[_0x2b3cc5(0x14b)],_0xffa525['datasetCode']]];for(const [_0x92c007,_0xa233e8,_0x20caea]of _0x5c733b){assertVerified(sameValue(_0xa233e8,_0x20caea),_0x2b3cc5(0x157)+_0xffa525['id']+'\x20'+_0x92c007+_0x2b3cc5(0x11e));}}function sameValue(_0x13a9c7,_0x2ca8e8){const _0x525b9c=a135_0x2120ce;if(Array['isArray'](_0x13a9c7)||Array[_0x525b9c(0x123)](_0x2ca8e8))return JSON[_0x525b9c(0x116)](_0x13a9c7)===JSON[_0x525b9c(0x116)](_0x2ca8e8);return _0x13a9c7===_0x2ca8e8;}
1
+ const a136_0x5d0509=a136_0x362f;(function(_0x2828c2,_0x5f3507){const _0x88af15=a136_0x362f,_0x276516=_0x2828c2();while(!![]){try{const _0x3385f0=-parseInt(_0x88af15(0x142))/0x1*(parseInt(_0x88af15(0x102))/0x2)+-parseInt(_0x88af15(0x12d))/0x3*(parseInt(_0x88af15(0x104))/0x4)+-parseInt(_0x88af15(0x11d))/0x5+parseInt(_0x88af15(0x11a))/0x6*(parseInt(_0x88af15(0x112))/0x7)+parseInt(_0x88af15(0x110))/0x8+-parseInt(_0x88af15(0x12a))/0x9*(parseInt(_0x88af15(0x136))/0xa)+parseInt(_0x88af15(0xe6))/0xb;if(_0x3385f0===_0x5f3507)break;else _0x276516['push'](_0x276516['shift']());}catch(_0x5216f5){_0x276516['push'](_0x276516['shift']());}}}(a136_0x9554,0xb180e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a136_0x5d0509(0xe7),'path':a136_0x5d0509(0x106)}];export const menuVisibilityUpdate={'service':a136_0x5d0509(0x10e),'command':a136_0x5d0509(0x10c),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a136_0x5d0509(0x101),'structuredErrors':!![],'flags':[{'name':a136_0x5d0509(0xe4),'type':a136_0x5d0509(0x14c),'description':a136_0x5d0509(0x141)},{'name':'paths','type':'string','description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':'visible','type':a136_0x5d0509(0x119),'required':!![],'description':a136_0x5d0509(0x14d)},{'name':a136_0x5d0509(0xed),'type':a136_0x5d0509(0x119),'description':a136_0x5d0509(0x134)},{'name':a136_0x5d0509(0x145),'type':a136_0x5d0509(0x12f),'description':a136_0x5d0509(0xeb)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5e82d7){parseInput(_0x5e82d7),requireExplicitYes(_0x5e82d7);},async 'dryRun'(_0x35867c){const _0x53a568=a136_0x5d0509,_0x4a1580=await buildPlan(_0x35867c,!![]),_0x2e7c25=_0x4a1580[_0x53a568(0x11b)]['plannedActions']?.['length']??0x0,_0x10d886=_0x4a1580[_0x53a568(0x11b)][_0x53a568(0x11c)]['length']-_0x2e7c25;return menuDryRunResult(_0x4a1580[_0x53a568(0x11b)],{'method':_0x53a568(0xe7),'url':'/smartapi/menu/update','body':{'updates':_0x4a1580[_0x53a568(0x11b)][_0x53a568(0x127)]?.['map'](_0x3d21c3=>_0x3d21c3[_0x53a568(0x122)])??[]},'description':_0x53a568(0x140)+_0x2e7c25+'\x20menu(s);\x20skip\x20'+_0x10d886+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x4dd662){const _0x330b04=a136_0x5d0509;requireExplicitYes(_0x4dd662);const _0x553617=await buildPlan(_0x4dd662,![]);await recheckMutationSnapshot(_0x4dd662,_0x553617['plan'],_0x330b04(0xfe));const _0x57521b=[],_0x2e8285=[],_0x212a7c=[];for(const _0x46062f of _0x553617[_0x330b04(0x11b)]['targets']){if(_0x46062f[_0x330b04(0xf7)][_0x330b04(0xf4)]===_0x553617['plan']['requestedVisible']){_0x57521b[_0x330b04(0x148)]({'id':_0x46062f['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x4dd662[_0x330b04(0x107)],_0x4dd662[_0x330b04(0xf9)],{'id':_0x46062f['id'],'visible':_0x553617[_0x330b04(0x11b)][_0x330b04(0x120)]}),_0x57521b[_0x330b04(0x148)]({'id':_0x46062f['id'],'updated':!![],'skipped':![]});}catch(_0x536fd7){const _0x7ef503=mapMenuApiError(_0x536fd7,_0x330b04(0x158),_0x46062f['id']);if(isMenuResponseLoss(_0x536fd7)&&_0x7ef503['code']!==_0x330b04(0x12e)){_0x212a7c[_0x330b04(0x148)](_0x46062f['id']);continue;}_0x2e8285[_0x330b04(0x148)]({'id':_0x46062f['id'],'stage':'update','code':_0x7ef503[_0x330b04(0xee)],'message':_0x7ef503[_0x330b04(0x156)]});}}let _0x387cab;try{_0x387cab=await fetchMenuSnapshot(_0x4dd662['appCode'],_0x4dd662[_0x330b04(0xf9)]);}catch(_0x45f768){const _0x35c15a=describeMenuErrorCause(_0x45f768,'verify\x20menu\x20visibility\x20update'),_0x7122e0=_0x212a7c['map'](_0x47f4a0=>({'id':_0x47f4a0,'stage':_0x330b04(0x128),'code':'menu_verification_failed','message':_0x330b04(0xf8)+_0x47f4a0+_0x330b04(0x13d),'requestedStateConfirmed':![],'recovered':![]})),_0x2c49c2={'stage':_0x330b04(0xf6),'code':'menu_verification_failed','message':_0x330b04(0x10a),'targetIds':_0x553617[_0x330b04(0x11b)]['targets'][_0x330b04(0x129)](_0x17ee47=>_0x17ee47['id']),'requestedStateConfirmed':![],..._0x35c15a};throw menuFailure(asVerificationError(_0x45f768,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x553617[_0x330b04(0x11b)],{'stage':'verification','succeeded':_0x57521b,'failedRecords':[..._0x2e8285,..._0x7122e0,_0x2c49c2],'warnings':[_0x330b04(0x12c)],'verification':{'status':'failed','recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x14f710=[];for(const _0x339279 of _0x57521b){const _0x3e31b1=Number(_0x339279['id']),_0x526f20=_0x553617[_0x330b04(0x13e)][_0x330b04(0x151)](_0x3e31b1),_0x290dad=_0x387cab[_0x330b04(0x159)][_0x330b04(0x151)](_0x3e31b1);try{verifyVisibilityUpdate(_0x526f20,_0x290dad,_0x553617['plan'][_0x330b04(0x120)]);}catch(_0x28a69b){const _0x483dfa=asVerificationError(_0x28a69b,_0x330b04(0x10f)+_0x3e31b1+_0x330b04(0x115));_0x14f710['push']({'id':_0x3e31b1,'stage':_0x330b04(0xf6),'code':_0x483dfa['code'],'message':_0x483dfa['message'],'requestedStateConfirmed':![]});}}for(const _0x26d2e8 of _0x212a7c){const _0x1c8f82=_0x553617[_0x330b04(0x13e)][_0x330b04(0x151)](_0x26d2e8),_0x499d53=_0x387cab[_0x330b04(0x159)][_0x330b04(0x151)](_0x26d2e8);try{verifyVisibilityUpdate(_0x1c8f82,_0x499d53,_0x553617[_0x330b04(0x11b)][_0x330b04(0x120)]),_0x57521b[_0x330b04(0x148)]({'id':_0x26d2e8,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x2a20fe){const _0x595aec=asVerificationError(_0x2a20fe,_0x330b04(0x116)+_0x26d2e8+_0x330b04(0x121));_0x14f710['push']({'id':_0x26d2e8,'stage':_0x330b04(0x128),'code':_0x595aec['code'],'message':_0x595aec['message'],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x14f710['length']>0x0){const _0x2c4eaf=_0x14f710[_0x330b04(0x129)](_0x4e8a7b=>Number(_0x4e8a7b['id'])),_0x1a48e3=_0x57521b['filter'](_0x4430ec=>_0x4430ec['recovered']===!![])['length'],_0x29a675=menuError(_0x330b04(0x10b),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x2c4eaf['join'](',\x20')+'.',_0x330b04(0xec));throw menuFailure(_0x29a675,_0x553617[_0x330b04(0x11b)],{'stage':_0x330b04(0xf6),'succeeded':_0x57521b,'failedRecords':[..._0x2e8285,..._0x14f710],'warnings':[_0x330b04(0x13c)],'verification':{'status':_0x330b04(0x14a),..._0x2c4eaf['length']===0x1?{'targetId':_0x2c4eaf[0x0]}:{'targetIds':_0x2c4eaf},'recoveredCount':_0x1a48e3,'lookupCommand':_0x330b04(0x14f)}});}const _0x22a544=_0x57521b['filter'](_0x4f082f=>_0x4f082f[_0x330b04(0xe8)]===!![])['length'],_0x347a82=_0x57521b[_0x330b04(0x124)]-_0x22a544,_0x43473d={..._0x553617[_0x330b04(0x11b)],'succeeded':_0x57521b,'failed':_0x2e8285,'warnings':_0x2e8285[_0x330b04(0x124)]>0x0?[..._0x553617[_0x330b04(0x11b)][_0x330b04(0x13f)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x553617[_0x330b04(0x11b)]['warnings'],'verification':{'checkedBy':_0x330b04(0xe2),'snapshotHash':_0x387cab[_0x330b04(0x150)],'matchesRequestedState':_0x2e8285[_0x330b04(0x124)]===0x0,'recoveredCount':_0x212a7c[_0x330b04(0x124)]}};return{'ok':_0x2e8285[_0x330b04(0x124)]===0x0,'data':_0x43473d,'message':_0x2e8285['length']===0x0?_0x330b04(0x147)+_0x22a544+_0x330b04(0x13b)+_0x347a82+_0x330b04(0xff):_0x330b04(0xde)+_0x22a544+_0x330b04(0xf3)+_0x347a82+_0x330b04(0x126)+_0x2e8285[_0x330b04(0x124)]+_0x330b04(0x138)};}};function parseInput(_0x3e3381){const _0x12fc08=a136_0x5d0509,_0x323a07=parseMenuIds(_0x3e3381['str']('menu-ids')),_0x258c92=parseCsv(_0x3e3381[_0x12fc08(0x109)](_0x12fc08(0xe3)));if(_0x323a07[_0x12fc08(0x124)]===0x0&&_0x258c92[_0x12fc08(0x124)]===0x0)throw CliErrors[_0x12fc08(0x10d)](_0x12fc08(0x133));const _0xf64603=parseBooleanFlag(_0x3e3381,_0x12fc08(0xf4),!![]),_0x5add89=parseBooleanFlag(_0x3e3381,_0x12fc08(0xed),![]);let _0x43e5d0;if(hasFlag(_0x3e3381,_0x12fc08(0x145))){_0x43e5d0=_0x3e3381[_0x12fc08(0xfb)](_0x12fc08(0x145));if(!Number[_0x12fc08(0x123)](_0x43e5d0)||_0x43e5d0<0x0)throw CliErrors[_0x12fc08(0x10d)](_0x12fc08(0xdd));}return{'menuIds':_0x323a07,'paths':_0x258c92,'visible':_0xf64603,'expectVisible':_0x5add89,'expectedCount':_0x43e5d0};}async function buildPlan(_0x449d1b,_0x478843){const _0x4be283=a136_0x5d0509,_0x45f144=parseInput(_0x449d1b),_0x544db6=await fetchMutationSnapshot(_0x449d1b,'update\x20menu\x20visibility'),_0x5a95fc=selectTargets(_0x544db6[_0x4be283(0xe5)],_0x45f144[_0x4be283(0x100)],_0x45f144[_0x4be283(0xe3)]);if(_0x45f144[_0x4be283(0x135)]!==undefined&&_0x5a95fc[_0x4be283(0x124)]!==_0x45f144[_0x4be283(0x135)])throw menuError(_0x4be283(0x152),_0x4be283(0x117)+_0x5a95fc['length']+_0x4be283(0xf1)+_0x45f144[_0x4be283(0x135)]+'.',_0x4be283(0x103));if(_0x45f144[_0x4be283(0xfd)]!==undefined){const _0x4ef94f=_0x5a95fc[_0x4be283(0x144)](_0x4580ce=>_0x4580ce[_0x4be283(0xf4)]!==_0x45f144[_0x4be283(0xfd)]);if(_0x4ef94f['length']>0x0)throw menuError(_0x4be283(0xea),_0x4be283(0xf0)+_0x4ef94f[_0x4be283(0x129)](_0xb8452f=>_0xb8452f['id'])[_0x4be283(0x149)](',\x20')+'.',_0x4be283(0x157));}const _0x23cfa8=_0x5a95fc[_0x4be283(0x129)](_0x22ba0e=>({'id':_0x22ba0e['id'],'label':_0x22ba0e[_0x4be283(0x12b)],'path':_0x22ba0e[_0x4be283(0x130)],'before':{'visible':_0x22ba0e[_0x4be283(0xf4)]},'after':{'visible':_0x45f144[_0x4be283(0xf4)]}})),_0x53b58f=_0x23cfa8[_0x4be283(0x144)](_0x4cca99=>_0x4cca99[_0x4be283(0xf7)][_0x4be283(0xf4)]!==_0x45f144[_0x4be283(0xf4)])[_0x4be283(0x129)](_0x4d72a0=>({'stage':'update-menu-visibility','method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x449d1b[_0x4be283(0x107)],'id':_0x4d72a0['id'],'visible':_0x45f144[_0x4be283(0xf4)]}})),_0x4485eb=mutationResult({'operation':_0x4be283(0x10c),'selector':{'menuIds':_0x45f144['menuIds'],'paths':_0x45f144[_0x4be283(0xe3)]},'before':{'menus':_0x5a95fc[_0x4be283(0x129)](_0x317cff=>({'id':_0x317cff['id'],'path':_0x317cff[_0x4be283(0x130)],'visible':_0x317cff[_0x4be283(0xf4)]}))},'after':{'menus':_0x5a95fc[_0x4be283(0x129)](_0x179374=>({'id':_0x179374['id'],'path':_0x179374[_0x4be283(0x130)],'visible':_0x45f144['visible']}))},'dryRun':_0x478843,'backend':[...BACKEND],'plannedActions':_0x53b58f,'snapshotHash':_0x544db6[_0x4be283(0x150)],'warnings':_0x53b58f[_0x4be283(0x124)]===0x0?[_0x4be283(0x111)]:[]});return{'plan':{..._0x4485eb,'requestedVisible':_0x45f144[_0x4be283(0xf4)],'targets':_0x23cfa8},'beforeById':new Map(_0x5a95fc[_0x4be283(0x129)](_0x2619b6=>[_0x2619b6['id'],_0x2619b6]))};}function selectTargets(_0x3ac615,_0xeadb8a,_0x55cce0){const _0x4f2a14=a136_0x5d0509,_0x25226c=new Map(_0x3ac615['map'](_0x156f4e=>[_0x156f4e['id'],_0x156f4e])),_0x592c31=new Map(),_0x59ff90=_0xeadb8a[_0x4f2a14(0x144)](_0x595807=>!_0x25226c[_0x4f2a14(0x154)](_0x595807));if(_0x59ff90[_0x4f2a14(0x124)]>0x0)throw menuError(_0x4f2a14(0x125),_0x4f2a14(0xe9)+_0x59ff90['join'](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x211b82 of _0xeadb8a){_0x592c31['set'](_0x211b82,_0x25226c['get'](_0x211b82));}for(const _0x442fb1 of _0x55cce0){const _0x117b5f=_0x3ac615[_0x4f2a14(0x144)](_0x49a065=>_0x49a065[_0x4f2a14(0x130)]===_0x442fb1);if(_0x117b5f[_0x4f2a14(0x124)]===0x0)throw menuError(_0x4f2a14(0x125),_0x4f2a14(0x153)+JSON[_0x4f2a14(0xef)](_0x442fb1)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x117b5f[_0x4f2a14(0x124)]>0x1)throw menuError(_0x4f2a14(0x11e),_0x4f2a14(0xfc)+JSON['stringify'](_0x442fb1)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x117b5f['map'](_0x427510=>_0x427510['id'])[_0x4f2a14(0x149)](',\x20')+'.');const _0x19644c=_0x117b5f[0x0];_0x592c31[_0x4f2a14(0x105)](_0x19644c['id'],_0x19644c);}return[..._0x592c31[_0x4f2a14(0x131)]()];}function a136_0x9554(){const _0x595d42=['2128670fdANKb','menu_selector_ambiguous','flagMissing','requestedVisible','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','body','isSafeInteger','length','menu_selector_not_found','\x20skipped,\x20','plannedActions','update-recovery','map','573867YcKLgP','label','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','228339SCHuVg','menu_permission_denied','number','path','values','childrenIds','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','expectedCount','40ABuqUE','pageType','\x20failed.','false','split','\x20menu(s);\x20skipped\x20','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','beforeById','warnings','Would\x20update\x20visibility\x20for\x20','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','168013guZNXH','some','filter','expected-count','datasetId','Updated\x20visibility\x20for\x20','push','join','failed','sort','string','Requested\x20menu\x20visibility','resourcesValid','rabetbase\x20menu\x20list\x20--format\x20compress','hash','get','menu_expected_count_mismatch','Menu\x20path\x20selector\x20not\x20found:\x20','has','modelType','message','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','update\x20visibility\x20for','byId','url','trim','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','Menu\x20visibility\x20update\x20completed:\x20','depth','\x20must\x20be\x20true\x20or\x20false.','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','menu\x20list','paths','menu-ids','menus','16779752qVQhLg','POST','updated','Menu\x20id\x20selector(s)\x20not\x20found:\x20','menu_state_drift','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','expect-visible','code','stringify','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','\x20menu(s),\x20expected\x20','pageId','\x20updated,\x20','visible','resources','verification','before','Response\x20was\x20lost\x20for\x20menu\x20','cookie','isArray','num','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','expectVisible','update\x20menu\x20visibility','\x20unchanged\x20menu(s).','menuIds','high-risk-write','6DAILzI','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','44BrICmm','set','/smartapi/menu/update','appCode','childrenCount','str','Final\x20menu\x20visibility\x20readback\x20failed.','menu_verification_failed','visibility-update','validation','menu','Menu\x20','6660024cOUzMH','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','2738309zOeMgk','type','datasetCode','\x20visibility\x20update\x20could\x20not\x20be\x20verified','Response\x20was\x20lost\x20and\x20menu\x20','Selected\x20','parentId','boolean','6PfmTLE','plan','targets'];a136_0x9554=function(){return _0x595d42;};return a136_0x9554();}function a136_0x362f(_0x2a53f7,_0x4bedeb){_0x2a53f7=_0x2a53f7-0xdb;const _0x9554ad=a136_0x9554();let _0x362f45=_0x9554ad[_0x2a53f7];return _0x362f45;}function parseMenuIds(_0x2312a9){const _0x30a092=a136_0x5d0509,_0x4b160f=parseCsv(_0x2312a9),_0x37c9d2=_0x4b160f[_0x30a092(0x129)](Number);if(_0x37c9d2[_0x30a092(0x143)](_0xda5038=>!Number[_0x30a092(0x123)](_0xda5038)||_0xda5038<=0x0))throw CliErrors[_0x30a092(0x10d)](_0x30a092(0xe1));return[...new Set(_0x37c9d2)];}function parseCsv(_0x50cb0e){const _0x496efd=a136_0x5d0509;return[...new Set(_0x50cb0e[_0x496efd(0x13a)](',')['map'](_0x1f5f0b=>_0x1f5f0b[_0x496efd(0xdc)]())['filter'](Boolean))];}function parseBooleanFlag(_0x480836,_0xcf6fe4,_0x8f34b0){const _0x5722d0=a136_0x5d0509;if(!hasFlag(_0x480836,_0xcf6fe4)){if(_0x8f34b0)throw CliErrors[_0x5722d0(0x11f)](_0xcf6fe4);return undefined;}const _0x922294=_0x480836['rawFlags'][_0xcf6fe4];if(_0x922294===!![]||_0x922294===![])return _0x922294;if(_0x922294==='true')return!![];if(_0x922294===_0x5722d0(0x139))return![];throw CliErrors['validation']('--'+_0xcf6fe4+_0x5722d0(0xe0));}function verifyVisibilityUpdate(_0x2292f4,_0x413740,_0x386d01){const _0x23b179=a136_0x5d0509;assertVerified(!!_0x413740,_0x23b179(0x10f)+_0x2292f4['id']+'\x20was\x20not\x20found\x20during\x20visibility\x20verification.'),assertVerified(_0x413740[_0x23b179(0xf4)]===_0x386d01,_0x23b179(0x10f)+_0x2292f4['id']+'\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.');const _0x2f2516=[['id',_0x413740['id'],_0x2292f4['id']],[_0x23b179(0x118),_0x413740[_0x23b179(0x118)],_0x2292f4[_0x23b179(0x118)]],[_0x23b179(0xdf),_0x413740[_0x23b179(0xdf)],_0x2292f4[_0x23b179(0xdf)]],['label',_0x413740[_0x23b179(0x12b)],_0x2292f4['label']],['path',_0x413740[_0x23b179(0x130)],_0x2292f4['path']],[_0x23b179(0xdb),_0x413740['url'],_0x2292f4[_0x23b179(0xdb)]],[_0x23b179(0x113),_0x413740[_0x23b179(0x113)],_0x2292f4[_0x23b179(0x113)]],[_0x23b179(0x14b),_0x413740['sort'],_0x2292f4['sort']],[_0x23b179(0xf5),_0x413740[_0x23b179(0xf5)],_0x2292f4[_0x23b179(0xf5)]],[_0x23b179(0x14e),_0x413740[_0x23b179(0x14e)],_0x2292f4[_0x23b179(0x14e)]],[_0x23b179(0x132),_0x413740[_0x23b179(0x132)],_0x2292f4[_0x23b179(0x132)]],[_0x23b179(0x108),_0x413740[_0x23b179(0x108)],_0x2292f4[_0x23b179(0x108)]],[_0x23b179(0xf2),_0x413740[_0x23b179(0xf2)],_0x2292f4[_0x23b179(0xf2)]],[_0x23b179(0x137),_0x413740[_0x23b179(0x137)],_0x2292f4['pageType']],[_0x23b179(0x155),_0x413740[_0x23b179(0x155)],_0x2292f4[_0x23b179(0x155)]],['datasetId',_0x413740[_0x23b179(0x146)],_0x2292f4[_0x23b179(0x146)]],[_0x23b179(0x114),_0x413740['datasetCode'],_0x2292f4['datasetCode']]];for(const [_0x4bbf49,_0x2ea6c5,_0x2e93b3]of _0x2f2516){assertVerified(sameValue(_0x2ea6c5,_0x2e93b3),_0x23b179(0x10f)+_0x2292f4['id']+'\x20'+_0x4bbf49+'\x20changed\x20unexpectedly.');}}function sameValue(_0x286b6b,_0x3d2534){const _0xcfd9a8=a136_0x5d0509;if(Array['isArray'](_0x286b6b)||Array[_0xcfd9a8(0xfa)](_0x3d2534))return JSON['stringify'](_0x286b6b)===JSON['stringify'](_0x3d2534);return _0x286b6b===_0x3d2534;}
@@ -1 +1 @@
1
- const a136_0x1928ce=a136_0x409a;function a136_0x409a(_0x5bc564,_0x5c5500){_0x5bc564=_0x5bc564-0xae;const _0x49c12e=a136_0x49c1();let _0x409a20=_0x49c12e[_0x5bc564];return _0x409a20;}(function(_0x1c07ad,_0x17293d){const _0x4677b2=a136_0x409a,_0x5f0507=_0x1c07ad();while(!![]){try{const _0x5cb1d0=parseInt(_0x4677b2(0xbc))/0x1+parseInt(_0x4677b2(0xcb))/0x2+parseInt(_0x4677b2(0xc7))/0x3*(-parseInt(_0x4677b2(0xbf))/0x4)+-parseInt(_0x4677b2(0xb9))/0x5*(-parseInt(_0x4677b2(0xcc))/0x6)+parseInt(_0x4677b2(0xc8))/0x7+parseInt(_0x4677b2(0xbd))/0x8*(-parseInt(_0x4677b2(0xb2))/0x9)+parseInt(_0x4677b2(0xb7))/0xa*(-parseInt(_0x4677b2(0xb3))/0xb);if(_0x5cb1d0===_0x17293d)break;else _0x5f0507['push'](_0x5f0507['shift']());}catch(_0x7f592){_0x5f0507['push'](_0x5f0507['shift']());}}}(a136_0x49c1,0x56e6f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a136_0x1928ce(0xc5);function a136_0x49c1(){const _0x3c3e35=[';\x20do\x20not\x20resubmit.','786906aMsxJa','11VfVmhD','config-create','write','planned','2521520CXNYqv','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','777845FVVCBs','channelType',';\x20do\x20not\x20resubmit\x20automatically.','289659eFGnDZ','16UeogBQ','appCode','12KKtniM','isSafeInteger','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','connectTimeout','document','Inspect\x20with\x20','/notification/channel-config/create','create','306585MLrsZs','753634oqwfvQ','readTimeout','configName','1073332PfFOtd','6soKsWA','notification_config_create_outcome_unknown','endpointUrl','channelConfig','POST','verification'];a136_0x49c1=function(){return _0x3c3e35;};return a136_0x49c1();}async function prepareCreate(_0x5cb3ac){const _0x51a269=a136_0x1928ce,_0x388cfe=await readNotificationDocument(_0x5cb3ac,_0x51a269(0xc6)),_0x2a1ca9=createMutationInput(_0x5cb3ac[_0x51a269(0xbe)],_0x388cfe);return{'document':_0x388cfe,'input':_0x2a1ca9,'planned':projectNotificationConfig({'appCode':_0x5cb3ac[_0x51a269(0xbe)],'configName':_0x388cfe[_0x51a269(0xca)],'channelType':_0x388cfe[_0x51a269(0xba)],'endpointUrl':_0x388cfe[_0x51a269(0xce)],'channelConfig':_0x388cfe[_0x51a269(0xae)],'description':_0x388cfe['description'],'connectTimeout':_0x388cfe[_0x51a269(0xc2)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x388cfe[_0x51a269(0xc9)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a136_0x1928ce(0xb4),'description':a136_0x1928ce(0xc1),'risk':a136_0x1928ce(0xb5),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1b8606){assertSingleNotificationSource(_0x1b8606);},async 'dryRun'(_0x31576d){const _0x3970d4=a136_0x1928ce,_0x246d23=await prepareCreate(_0x31576d),_0x11e712=notificationLookupCommand(_0x31576d['appCode'],_0x246d23[_0x3970d4(0xc3)][_0x3970d4(0xba)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x31576d['appCode'],'configName':_0x246d23[_0x3970d4(0xc3)][_0x3970d4(0xca)],'channelType':_0x246d23[_0x3970d4(0xc3)][_0x3970d4(0xba)]},'before':null,'after':_0x246d23[_0x3970d4(0xb6)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3970d4(0xb6),'lookupCommand':_0x11e712}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x17983c){const _0x531efb=a136_0x1928ce,_0x4ab32b=await prepareCreate(_0x17983c),_0x3e9c47=notificationLookupCommand(_0x17983c['appCode'],_0x4ab32b[_0x531efb(0xc3)][_0x531efb(0xba)]);let _0x5b37c4;try{_0x5b37c4=await createNotificationChannelConfig(_0x4ab32b['input']);}catch(_0x8ac0e4){if(isPlatformTransportFailure(_0x8ac0e4))throw notificationError('notification_config_create_outcome_unknown','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',_0x531efb(0xc4)+_0x3e9c47+_0x531efb(0xb1));throw safeApiFailure('create','mutation',_0x531efb(0xc4)+_0x3e9c47+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x531efb(0xc0)](_0x5b37c4)||_0x5b37c4<=0x0)throw notificationError(_0x531efb(0xcd),_0x531efb(0xb8),_0x531efb(0xc4)+_0x3e9c47+';\x20do\x20not\x20resubmit.');let _0x5b4e5f;try{const _0x3e00fe=await getNotificationChannelConfig(_0x5b37c4,_0x17983c['appCode']);_0x5b4e5f=normalizeExactNotificationConfig(_0x3e00fe,_0x5b37c4,_0x17983c[_0x531efb(0xbe)]);}catch{throw safeApiFailure(_0x531efb(0xc6),_0x531efb(0xb0),_0x531efb(0xc4)+_0x3e9c47+_0x531efb(0xbb));}return{'ok':!![],'data':{'operation':_0x531efb(0xc6),'selector':{'appCode':_0x5b4e5f[_0x531efb(0xbe)],'id':_0x5b4e5f['id'],'configCode':_0x5b4e5f['configCode'],'configName':_0x5b4e5f[_0x531efb(0xca)],'channelType':_0x5b4e5f[_0x531efb(0xba)]},'before':null,'after':projectNotificationConfig(_0x5b4e5f),'dryRun':![],'backend':{'method':_0x531efb(0xaf),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x3e9c47}},'message':'Created\x20notification\x20config\x20'+_0x5b4e5f['id']};}};
1
+ const a137_0x254db1=a137_0x4c33;(function(_0x4f7edc,_0x40d69f){const _0x112a29=a137_0x4c33,_0x6c7317=_0x4f7edc();while(!![]){try{const _0x4639aa=parseInt(_0x112a29(0x1ef))/0x1*(parseInt(_0x112a29(0x1d8))/0x2)+parseInt(_0x112a29(0x1d6))/0x3*(parseInt(_0x112a29(0x1ed))/0x4)+-parseInt(_0x112a29(0x1eb))/0x5*(parseInt(_0x112a29(0x1ee))/0x6)+parseInt(_0x112a29(0x1e9))/0x7+-parseInt(_0x112a29(0x1dd))/0x8*(parseInt(_0x112a29(0x1cf))/0x9)+-parseInt(_0x112a29(0x1e5))/0xa*(-parseInt(_0x112a29(0x1da))/0xb)+parseInt(_0x112a29(0x1e4))/0xc*(parseInt(_0x112a29(0x1f0))/0xd);if(_0x4639aa===_0x40d69f)break;else _0x6c7317['push'](_0x6c7317['shift']());}catch(_0x3d74e4){_0x6c7317['push'](_0x6c7317['shift']());}}}(a137_0x86bb,0x997fc));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a137_0x86bb(){const _0x78a4be=[';\x20do\x20not\x20resubmit.','2eEkRDd','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','76087AmRGEo',';\x20do\x20not\x20resubmit\x20automatically.','verification','3635168JeiyTk','appCode','notification_config_create_outcome_unknown','configCode','POST','planned','document','5334660KOYjKz','630puXvjj','input','configName','Created\x20notification\x20config\x20','3134649KJXDFw','endpointUrl','2165phVMsP','description','8hCfbDO','7476woHlEx','85919nvoikL','13rZfgRQ',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','readTimeout','connectTimeout','Inspect\x20with\x20','channelType','create','9tLRPgC','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','config-create','write','channelConfig','mutation','/notification/channel-config/create','312891JBELJG'];a137_0x86bb=function(){return _0x78a4be;};return a137_0x86bb();}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=a137_0x254db1(0x1d5);function a137_0x4c33(_0x41b661,_0x4afaa4){_0x41b661=_0x41b661-0x1cd;const _0x86bb1b=a137_0x86bb();let _0x4c3322=_0x86bb1b[_0x41b661];return _0x4c3322;}async function prepareCreate(_0x526eff){const _0x343306=a137_0x254db1,_0x56ecbe=await readNotificationDocument(_0x526eff,_0x343306(0x1ce)),_0x14a417=createMutationInput(_0x526eff[_0x343306(0x1de)],_0x56ecbe);return{'document':_0x56ecbe,'input':_0x14a417,'planned':projectNotificationConfig({'appCode':_0x526eff[_0x343306(0x1de)],'configName':_0x56ecbe[_0x343306(0x1e7)],'channelType':_0x56ecbe[_0x343306(0x1cd)],'endpointUrl':_0x56ecbe[_0x343306(0x1ea)],'channelConfig':_0x56ecbe[_0x343306(0x1d3)],'description':_0x56ecbe[_0x343306(0x1ec)],'connectTimeout':_0x56ecbe[_0x343306(0x1f4)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x56ecbe[_0x343306(0x1f3)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a137_0x254db1(0x1d1),'description':a137_0x254db1(0x1f2),'risk':a137_0x254db1(0x1d2),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x595793){assertSingleNotificationSource(_0x595793);},async 'dryRun'(_0x12c84b){const _0x528aa5=a137_0x254db1,_0x1af4ec=await prepareCreate(_0x12c84b),_0x2db08f=notificationLookupCommand(_0x12c84b[_0x528aa5(0x1de)],_0x1af4ec['document']['channelType']);return asDryRunResult({'operation':'create','selector':{'appCode':_0x12c84b[_0x528aa5(0x1de)],'configName':_0x1af4ec[_0x528aa5(0x1e3)][_0x528aa5(0x1e7)],'channelType':_0x1af4ec[_0x528aa5(0x1e3)][_0x528aa5(0x1cd)]},'before':null,'after':_0x1af4ec[_0x528aa5(0x1e2)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x528aa5(0x1e2),'lookupCommand':_0x2db08f}},{'method':_0x528aa5(0x1e1),'url':CREATE_PATH});},async 'execute'(_0x30e17e){const _0x404ae4=a137_0x254db1,_0x27f742=await prepareCreate(_0x30e17e),_0x36e4fc=notificationLookupCommand(_0x30e17e[_0x404ae4(0x1de)],_0x27f742[_0x404ae4(0x1e3)]['channelType']);let _0x16ccbe;try{_0x16ccbe=await createNotificationChannelConfig(_0x27f742[_0x404ae4(0x1e6)]);}catch(_0x35be68){if(isPlatformTransportFailure(_0x35be68))throw notificationError(_0x404ae4(0x1df),_0x404ae4(0x1d0),'Inspect\x20with\x20'+_0x36e4fc+_0x404ae4(0x1d7));throw safeApiFailure(_0x404ae4(0x1ce),_0x404ae4(0x1d4),_0x404ae4(0x1f5)+_0x36e4fc+_0x404ae4(0x1f1));}if(!Number['isSafeInteger'](_0x16ccbe)||_0x16ccbe<=0x0)throw notificationError(_0x404ae4(0x1df),_0x404ae4(0x1d9),_0x404ae4(0x1f5)+_0x36e4fc+';\x20do\x20not\x20resubmit.');let _0x2e5a03;try{const _0x1d26c7=await getNotificationChannelConfig(_0x16ccbe,_0x30e17e['appCode']);_0x2e5a03=normalizeExactNotificationConfig(_0x1d26c7,_0x16ccbe,_0x30e17e[_0x404ae4(0x1de)]);}catch{throw safeApiFailure(_0x404ae4(0x1ce),_0x404ae4(0x1dc),'Inspect\x20with\x20'+_0x36e4fc+_0x404ae4(0x1db));}return{'ok':!![],'data':{'operation':_0x404ae4(0x1ce),'selector':{'appCode':_0x2e5a03[_0x404ae4(0x1de)],'id':_0x2e5a03['id'],'configCode':_0x2e5a03[_0x404ae4(0x1e0)],'configName':_0x2e5a03[_0x404ae4(0x1e7)],'channelType':_0x2e5a03[_0x404ae4(0x1cd)]},'before':null,'after':projectNotificationConfig(_0x2e5a03),'dryRun':![],'backend':{'method':_0x404ae4(0x1e1),'path':CREATE_PATH},'warnings':[],'verification':{'status':'verified','lookupCommand':_0x36e4fc}},'message':_0x404ae4(0x1e8)+_0x2e5a03['id']};}};
@@ -1 +1 @@
1
- const a137_0x53b2fe=a137_0x129b;(function(_0x5db192,_0x147cd9){const _0x3b3c16=a137_0x129b,_0x176021=_0x5db192();while(!![]){try{const _0xcb00f=parseInt(_0x3b3c16(0x8b))/0x1+parseInt(_0x3b3c16(0x80))/0x2+-parseInt(_0x3b3c16(0x86))/0x3+parseInt(_0x3b3c16(0x8e))/0x4+parseInt(_0x3b3c16(0x92))/0x5*(-parseInt(_0x3b3c16(0x76))/0x6)+-parseInt(_0x3b3c16(0x8d))/0x7*(parseInt(_0x3b3c16(0x77))/0x8)+parseInt(_0x3b3c16(0x8c))/0x9;if(_0xcb00f===_0x147cd9)break;else _0x176021['push'](_0x176021['shift']());}catch(_0x485cb5){_0x176021['push'](_0x176021['shift']());}}}(a137_0x484e,0xbcf8b));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a137_0x484e(){const _0x1acc42=['Inspect\x20with\x20','POST','channelType','planned','230816oFtEoH','8888760zcsUku','794409CZgZHy','588368JnAzYx',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification','Deleted\x20notification\x20config\x20','55iWecFf','notification_config_delete_outcome_unknown','verified','53388wCXpfQ','40ZkSvxM',';\x20do\x20not\x20resubmit\x20automatically.','Notification\x20config\x20','before','/notification/channel-config/delete','appCode','mutation','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','delete','410978jUNlqC','notification_config_delete_verification_unavailable','config-delete','unshift','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','some','395091tjkfeO'];a137_0x484e=function(){return _0x1acc42;};return a137_0x484e();}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_0x53b2fe(0x7b),REFERENCE_WARNING=a137_0x53b2fe(0x7e);async function prepareDelete(_0x428564){const _0x645182=a137_0x53b2fe,_0x8a2f6f=readNotificationId(_0x428564),_0x3c71f6=await requireExactNotificationConfig(_0x428564[_0x645182(0x7c)],_0x8a2f6f,_0x645182(0x7f));return{'id':_0x8a2f6f,'before':_0x3c71f6};}function a137_0x129b(_0x1c913a,_0x3d80ce){_0x1c913a=_0x1c913a-0x74;const _0x484eed=a137_0x484e();let _0x129b3a=_0x484eed[_0x1c913a];return _0x129b3a;}export const notificationConfigDelete={'service':a137_0x53b2fe(0x90),'command':a137_0x53b2fe(0x82),'description':a137_0x53b2fe(0x84),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5b8815){readNotificationId(_0x5b8815),requireNotificationExplicitYes(_0x5b8815);},async 'dryRun'(_0x240cbe){const _0x40a66a=a137_0x53b2fe,_0x184783=await prepareDelete(_0x240cbe),_0x57cefc=notificationLookupCommand(_0x240cbe['appCode'],_0x184783['before'][_0x40a66a(0x89)]);return asDryRunResult({'operation':_0x40a66a(0x7f),'selector':notificationSelector(_0x184783['before']),'before':projectNotificationConfig(_0x184783[_0x40a66a(0x7a)]),'after':null,'dryRun':!![],'backend':{'method':_0x40a66a(0x88),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x40a66a(0x8a),'lookupCommand':_0x57cefc}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x2c071c){const _0xbb17b0=a137_0x53b2fe;requireNotificationExplicitYes(_0x2c071c);const _0xe37568=await prepareDelete(_0x2c071c),_0x25fea4=notificationLookupCommand(_0x2c071c[_0xbb17b0(0x7c)],_0xe37568[_0xbb17b0(0x7a)][_0xbb17b0(0x89)]);let _0x2aa809=![];try{await deleteNotificationChannelConfig(_0xe37568['id'],_0x2c071c['appCode']);}catch(_0x8b8e9d){if(!isPlatformTransportFailure(_0x8b8e9d))throw safeApiFailure(_0xbb17b0(0x7f),_0xbb17b0(0x7d),_0xbb17b0(0x87)+_0x25fea4+_0xbb17b0(0x8f));_0x2aa809=!![];}let _0x1af5d8;try{_0x1af5d8=await listNotificationChannelConfigs(_0x2c071c['appCode'],_0xe37568['before'][_0xbb17b0(0x89)]),validateNotificationDeleteReadback(_0x1af5d8,_0x2c071c[_0xbb17b0(0x7c)],_0xe37568[_0xbb17b0(0x7a)][_0xbb17b0(0x89)]);}catch{throw notificationError(_0x2aa809?_0xbb17b0(0x74):_0xbb17b0(0x81),_0xbb17b0(0x79)+_0xe37568['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0xbb17b0(0x87)+_0x25fea4+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x1af5d8[_0xbb17b0(0x85)](_0x5addd0=>_0x5addd0['id']===_0xe37568['id']))throw notificationError(_0x2aa809?_0xbb17b0(0x74):'notification_config_delete_verification_failed','Notification\x20config\x20'+_0xe37568['id']+'\x20remains\x20present\x20after\x20delete.',_0xbb17b0(0x87)+_0x25fea4+_0xbb17b0(0x78));const _0x54b98b=[REFERENCE_WARNING];return _0x2aa809&&_0x54b98b[_0xbb17b0(0x83)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0xbb17b0(0x7f),'selector':notificationSelector(_0xe37568[_0xbb17b0(0x7a)]),'before':projectNotificationConfig(_0xe37568[_0xbb17b0(0x7a)]),'after':null,'dryRun':![],'backend':{'method':_0xbb17b0(0x88),'path':DELETE_PATH},'warnings':_0x54b98b,'verification':{'status':_0xbb17b0(0x75),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x2aa809,'lookupCommand':_0x25fea4}},'message':_0xbb17b0(0x91)+_0xe37568['id']};}};
1
+ const a138_0x5f3ec2=a138_0x2f81;(function(_0x230a39,_0x75a1d3){const _0xd4a1b8=a138_0x2f81,_0x386a49=_0x230a39();while(!![]){try{const _0x460116=-parseInt(_0xd4a1b8(0x197))/0x1+-parseInt(_0xd4a1b8(0x196))/0x2+parseInt(_0xd4a1b8(0x18f))/0x3+parseInt(_0xd4a1b8(0x18c))/0x4*(parseInt(_0xd4a1b8(0x19f))/0x5)+-parseInt(_0xd4a1b8(0x190))/0x6*(parseInt(_0xd4a1b8(0x1a2))/0x7)+parseInt(_0xd4a1b8(0x1aa))/0x8+parseInt(_0xd4a1b8(0x1a9))/0x9*(parseInt(_0xd4a1b8(0x19d))/0xa);if(_0x460116===_0x75a1d3)break;else _0x386a49['push'](_0x386a49['shift']());}catch(_0x21f3e5){_0x386a49['push'](_0x386a49['shift']());}}}(a138_0x1b7c,0x8eba8));import{asDryRunResult}from'../../commands/common/dry-run.js';function a138_0x1b7c(){const _0x34ef0d=['mutation','notification_config_delete_verification_failed','670wjsVVM','before','5TJRWgP','Notification\x20config\x20','Deleted\x20notification\x20config\x20','869974LJZPdk','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','notification_config_delete_verification_unavailable','notification','POST','\x20remains\x20present\x20after\x20delete.','delete','88731xfqZfT','5254808lGoARx','channelType','verified','2375800pTyCRq','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','config-delete','1846371aqTCcz','42wvvPrK','appCode',';\x20do\x20not\x20resubmit\x20automatically.','\x20delete\x20could\x20not\x20be\x20verified.','Inspect\x20with\x20','planned','1314252LkSUSs','415095lQnNxw','some','notification_config_delete_outcome_unknown','unshift'];a138_0x1b7c=function(){return _0x34ef0d;};return a138_0x1b7c();}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';function a138_0x2f81(_0x1b9ab9,_0xbae722){_0x1b9ab9=_0x1b9ab9-0x18a;const _0x1b7cae=a138_0x1b7c();let _0x2f8123=_0x1b7cae[_0x1b9ab9];return _0x2f8123;}import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x9582bc){const _0x389b3d=a138_0x2f81,_0x3ee30c=readNotificationId(_0x9582bc),_0x84ac77=await requireExactNotificationConfig(_0x9582bc[_0x389b3d(0x191)],_0x3ee30c,_0x389b3d(0x1a8));return{'id':_0x3ee30c,'before':_0x84ac77};}export const notificationConfigDelete={'service':a138_0x5f3ec2(0x1a5),'command':a138_0x5f3ec2(0x18e),'description':a138_0x5f3ec2(0x18d),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x3f9b1f){readNotificationId(_0x3f9b1f),requireNotificationExplicitYes(_0x3f9b1f);},async 'dryRun'(_0x578990){const _0x5ab8de=a138_0x5f3ec2,_0x259553=await prepareDelete(_0x578990),_0x24b63d=notificationLookupCommand(_0x578990[_0x5ab8de(0x191)],_0x259553[_0x5ab8de(0x19e)][_0x5ab8de(0x18a)]);return asDryRunResult({'operation':_0x5ab8de(0x1a8),'selector':notificationSelector(_0x259553[_0x5ab8de(0x19e)]),'before':projectNotificationConfig(_0x259553['before']),'after':null,'dryRun':!![],'backend':{'method':_0x5ab8de(0x1a6),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x5ab8de(0x195),'lookupCommand':_0x24b63d}},{'method':_0x5ab8de(0x1a6),'url':DELETE_PATH});},async 'execute'(_0x524776){const _0x8d6b19=a138_0x5f3ec2;requireNotificationExplicitYes(_0x524776);const _0x3c85cb=await prepareDelete(_0x524776),_0x5d76fe=notificationLookupCommand(_0x524776[_0x8d6b19(0x191)],_0x3c85cb[_0x8d6b19(0x19e)][_0x8d6b19(0x18a)]);let _0x4568a4=![];try{await deleteNotificationChannelConfig(_0x3c85cb['id'],_0x524776['appCode']);}catch(_0x312512){if(!isPlatformTransportFailure(_0x312512))throw safeApiFailure(_0x8d6b19(0x1a8),_0x8d6b19(0x19b),_0x8d6b19(0x194)+_0x5d76fe+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x4568a4=!![];}let _0x9aa623;try{_0x9aa623=await listNotificationChannelConfigs(_0x524776[_0x8d6b19(0x191)],_0x3c85cb[_0x8d6b19(0x19e)][_0x8d6b19(0x18a)]),validateNotificationDeleteReadback(_0x9aa623,_0x524776[_0x8d6b19(0x191)],_0x3c85cb['before'][_0x8d6b19(0x18a)]);}catch{throw notificationError(_0x4568a4?_0x8d6b19(0x199):_0x8d6b19(0x1a4),_0x8d6b19(0x1a0)+_0x3c85cb['id']+_0x8d6b19(0x193),'Inspect\x20with\x20'+_0x5d76fe+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x9aa623[_0x8d6b19(0x198)](_0x139711=>_0x139711['id']===_0x3c85cb['id']))throw notificationError(_0x4568a4?_0x8d6b19(0x199):_0x8d6b19(0x19c),'Notification\x20config\x20'+_0x3c85cb['id']+_0x8d6b19(0x1a7),_0x8d6b19(0x194)+_0x5d76fe+_0x8d6b19(0x192));const _0x2c5548=[REFERENCE_WARNING];return _0x4568a4&&_0x2c5548[_0x8d6b19(0x19a)](_0x8d6b19(0x1a3)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x3c85cb[_0x8d6b19(0x19e)]),'before':projectNotificationConfig(_0x3c85cb['before']),'after':null,'dryRun':![],'backend':{'method':_0x8d6b19(0x1a6),'path':DELETE_PATH},'warnings':_0x2c5548,'verification':{'status':_0x8d6b19(0x18b),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x4568a4,'lookupCommand':_0x5d76fe}},'message':_0x8d6b19(0x1a1)+_0x3c85cb['id']};}};
@@ -1 +1 @@
1
- const a138_0x2d7c53=a138_0x3359;function a138_0x3ae3(){const _0x3d43f7=['map','23727720NfyOYR','6297214nfwKTZ','1148819VMytaY','config-list','Found\x20','417kYXdHx','215872mdGlIp','string','Notification\x20channel\x20type','\x20notification\x20config(s)','read','notification','2330230SCwBgL','length','type','6588324MkAYNZ','appCode','7002AJAIFD'];a138_0x3ae3=function(){return _0x3d43f7;};return a138_0x3ae3();}(function(_0x4fc3a4,_0x38f3f7){const _0x7a9fe6=a138_0x3359,_0x29fa6b=_0x4fc3a4();while(!![]){try{const _0x5cdc68=-parseInt(_0x7a9fe6(0xfc))/0x1+parseInt(_0x7a9fe6(0x10b))/0x2*(parseInt(_0x7a9fe6(0xff))/0x3)+-parseInt(_0x7a9fe6(0x100))/0x4+parseInt(_0x7a9fe6(0x106))/0x5+-parseInt(_0x7a9fe6(0x109))/0x6+-parseInt(_0x7a9fe6(0xfb))/0x7+parseInt(_0x7a9fe6(0xfa))/0x8;if(_0x5cdc68===_0x38f3f7)break;else _0x29fa6b['push'](_0x29fa6b['shift']());}catch(_0x1c5a1c){_0x29fa6b['push'](_0x29fa6b['shift']());}}}(a138_0x3ae3,0xaf57f));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_0x3359(_0x4fde79,_0x77ebd1){_0x4fde79=_0x4fde79-0xf9;const _0x3ae300=a138_0x3ae3();let _0x335912=_0x3ae300[_0x4fde79];return _0x335912;}export const notificationConfigList={'service':a138_0x2d7c53(0x105),'command':a138_0x2d7c53(0xfd),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a138_0x2d7c53(0x104),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a138_0x2d7c53(0x108),'type':a138_0x2d7c53(0x101),'description':a138_0x2d7c53(0x102),'enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x5f4e1f){readNotificationChannelType(_0x5f4e1f);},async 'execute'(_0x306bca){const _0x247750=a138_0x2d7c53,_0x26e7af=readNotificationChannelType(_0x306bca),_0x41a235=await listNotificationChannelConfigs(_0x306bca[_0x247750(0x10a)],_0x26e7af),_0x2ca5f2=_0x41a235[_0x247750(0xf9)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x306bca[_0x247750(0x10a)],'channelType':_0x26e7af,'count':_0x2ca5f2[_0x247750(0x107)],'configs':_0x2ca5f2},'message':_0x247750(0xfe)+_0x2ca5f2['length']+'\x20'+_0x26e7af+_0x247750(0x103)};}};
1
+ function a139_0x362e(_0x4a1539,_0xca699f){_0x4a1539=_0x4a1539-0x183;const _0x3eb7e1=a139_0x3eb7();let _0x362ea8=_0x3eb7e1[_0x4a1539];return _0x362ea8;}function a139_0x3eb7(){const _0x863ee4=['3679660VPgDFp','974267gjYwjv','notification','2030940tJsDxZ','appCode','9PpqZOq','Notification\x20channel\x20type','44NkiAQW','EMAIL','\x20notification\x20config(s)','config-list','1973368nLLyHZ','string','24VDuRbq','1pqfvDS','type','5088jKArvt','read','696pGWNst','459208jKidjE','length','207540NfBKhI'];a139_0x3eb7=function(){return _0x863ee4;};return a139_0x3eb7();}const a139_0x3ab80c=a139_0x362e;(function(_0x330a4f,_0x4b19a1){const _0x24b3d8=a139_0x362e,_0x5e7db0=_0x330a4f();while(!![]){try{const _0xbccc00=-parseInt(_0x24b3d8(0x18c))/0x1*(parseInt(_0x24b3d8(0x191))/0x2)+parseInt(_0x24b3d8(0x18e))/0x3*(-parseInt(_0x24b3d8(0x190))/0x4)+parseInt(_0x24b3d8(0x193))/0x5*(parseInt(_0x24b3d8(0x18b))/0x6)+parseInt(_0x24b3d8(0x195))/0x7+parseInt(_0x24b3d8(0x189))/0x8+parseInt(_0x24b3d8(0x183))/0x9*(-parseInt(_0x24b3d8(0x194))/0xa)+-parseInt(_0x24b3d8(0x185))/0xb*(-parseInt(_0x24b3d8(0x197))/0xc);if(_0xbccc00===_0x4b19a1)break;else _0x5e7db0['push'](_0x5e7db0['shift']());}catch(_0xf67a31){_0x5e7db0['push'](_0x5e7db0['shift']());}}}(a139_0x3eb7,0x5213e));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a139_0x3ab80c(0x196),'command':a139_0x3ab80c(0x188),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a139_0x3ab80c(0x18f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a139_0x3ab80c(0x18d),'type':a139_0x3ab80c(0x18a),'description':a139_0x3ab80c(0x184),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a139_0x3ab80c(0x186)}],async 'validate'(_0x3a6cac){readNotificationChannelType(_0x3a6cac);},async 'execute'(_0x2e0aca){const _0x48f838=a139_0x3ab80c,_0x21efca=readNotificationChannelType(_0x2e0aca),_0x394db5=await listNotificationChannelConfigs(_0x2e0aca[_0x48f838(0x198)],_0x21efca),_0x14f88f=_0x394db5['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2e0aca[_0x48f838(0x198)],'channelType':_0x21efca,'count':_0x14f88f[_0x48f838(0x192)],'configs':_0x14f88f},'message':'Found\x20'+_0x14f88f[_0x48f838(0x192)]+'\x20'+_0x21efca+_0x48f838(0x187)};}};
@@ -1 +1 @@
1
- const a139_0x53562e=a139_0xed99;(function(_0x4e42c4,_0x24c23f){const _0x1abdf8=a139_0xed99,_0x399da5=_0x4e42c4();while(!![]){try{const _0x5493cf=parseInt(_0x1abdf8(0x104))/0x1*(-parseInt(_0x1abdf8(0xef))/0x2)+parseInt(_0x1abdf8(0xf1))/0x3+parseInt(_0x1abdf8(0xff))/0x4+parseInt(_0x1abdf8(0x107))/0x5*(-parseInt(_0x1abdf8(0xee))/0x6)+-parseInt(_0x1abdf8(0xe9))/0x7*(-parseInt(_0x1abdf8(0xf5))/0x8)+parseInt(_0x1abdf8(0xfc))/0x9*(-parseInt(_0x1abdf8(0x105))/0xa)+-parseInt(_0x1abdf8(0xea))/0xb*(parseInt(_0x1abdf8(0xfd))/0xc);if(_0x5493cf===_0x24c23f)break;else _0x399da5['push'](_0x399da5['shift']());}catch(_0x593c04){_0x399da5['push'](_0x399da5['shift']());}}}(a139_0xbc6a,0x5d22d));import{asDryRunResult}from'../../commands/common/dry-run.js';function a139_0xed99(_0x3c7f4e,_0xf8a316){_0x3c7f4e=_0x3c7f4e-0xe4;const _0xbc6a3f=a139_0xbc6a();let _0xed993e=_0xbc6a3f[_0x3c7f4e];return _0xed993e;}function a139_0xbc6a(){const _0x4cf1ed=['\x20via\x20','planned','Inspect\x20with\x20--id\x20','allMatch','7SJgQuU','1510hBiqof','channelType','108145EieHPh','POST','patch','Inspect\x20ID\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','\x20with\x20','7LGlKof','1353vKfota','notification_config_update_outcome_unknown',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Updated\x20notification\x20config\x20','78VnCjMs','181732cQScyp','notification','1849050OoxWpA','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','before',';\x20do\x20not\x20resubmit\x20automatically.','4697608UhSMMh','update','/notification/channel-config/update','provesChange','Notification\x20config\x20','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','notification_config_update_verification_unavailable','126wzhQOx','51252EZpJgs','appCode','2490480vmAZEn'];a139_0xbc6a=function(){return _0x4cf1ed;};return a139_0xbc6a();}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_0x53562e(0xf7);async function prepareUpdate(_0xeaeb04){const _0x364061=a139_0x53562e,_0x1b066e=readNotificationId(_0xeaeb04),_0x1b0131=await readNotificationDocument(_0xeaeb04,'update'),_0x2d3b08=await requireExactNotificationConfig(_0xeaeb04[_0x364061(0xfe)],_0x1b066e,_0x364061(0xf6));return{'id':_0x1b066e,'patch':_0x1b0131,'before':_0x2d3b08,'payload':mergeUpdateInput(_0x2d3b08,_0x1b0131),'planned':plannedUpdateProjection(_0x2d3b08,_0x1b0131)};}export const notificationConfigUpdate={'service':a139_0x53562e(0xf0),'command':'config-update','description':a139_0x53562e(0xf2),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x30979d){readNotificationId(_0x30979d),assertSingleNotificationSource(_0x30979d),requireNotificationExplicitYes(_0x30979d);},async 'dryRun'(_0x463acf){const _0x2ad0df=a139_0x53562e,_0x52c4ab=await prepareUpdate(_0x463acf),_0x14625b=notificationLookupCommand(_0x463acf[_0x2ad0df(0xfe)],_0x52c4ab[_0x2ad0df(0xf3)][_0x2ad0df(0x106)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0x52c4ab['before']),'before':projectNotificationConfig(_0x52c4ab[_0x2ad0df(0xf3)]),'after':_0x52c4ab['planned'],'dryRun':!![],'backend':{'method':_0x2ad0df(0x108),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x2ad0df(0x101),'lookupCommand':_0x14625b}},{'method':_0x2ad0df(0x108),'url':UPDATE_PATH});},async 'execute'(_0x5bad73){const _0x3ab0cb=a139_0x53562e;requireNotificationExplicitYes(_0x5bad73);const _0x3f7dae=await prepareUpdate(_0x5bad73),_0x3e5ec3=notificationLookupCommand(_0x5bad73[_0x3ab0cb(0xfe)],_0x3f7dae[_0x3ab0cb(0xf3)][_0x3ab0cb(0x106)]);let _0x296ebc=![];try{await updateNotificationChannelConfig(_0x3f7dae['payload']);}catch(_0x41c8a5){if(!isPlatformTransportFailure(_0x41c8a5))throw safeApiFailure(_0x3ab0cb(0xf6),'mutation',_0x3ab0cb(0xe5)+_0x3f7dae['id']+_0x3ab0cb(0xe8)+_0x3e5ec3+_0x3ab0cb(0xec));_0x296ebc=!![];}let _0x3dfa2f;try{const _0x37b288=await getNotificationChannelConfig(_0x3f7dae['id'],_0x5bad73[_0x3ab0cb(0xfe)]);_0x3dfa2f=normalizeExactNotificationConfig(_0x37b288,_0x3f7dae['id'],_0x5bad73['appCode']);}catch{throw notificationError(_0x296ebc?_0x3ab0cb(0xeb):_0x3ab0cb(0xfb),_0x3ab0cb(0xf9)+_0x3f7dae['id']+_0x3ab0cb(0xe7),_0x3ab0cb(0x102)+_0x3f7dae['id']+_0x3ab0cb(0x100)+_0x3e5ec3+_0x3ab0cb(0xf4));}const _0x5d908d=requestedSafeFieldsMatch(_0x3f7dae[_0x3ab0cb(0xf3)],_0x3dfa2f,_0x3f7dae[_0x3ab0cb(0xe4)]);if(!_0x5d908d[_0x3ab0cb(0x103)]||_0x296ebc&&!_0x5d908d[_0x3ab0cb(0xf8)])throw notificationError(_0x296ebc?_0x3ab0cb(0xeb):'notification_config_update_verification_failed',_0x3ab0cb(0xf9)+_0x3f7dae['id']+_0x3ab0cb(0xfa),_0x3ab0cb(0x102)+_0x3f7dae['id']+_0x3ab0cb(0x100)+_0x3e5ec3+_0x3ab0cb(0xf4));const _0xc2a2e2=_0x296ebc?[_0x3ab0cb(0xe6)]:[];return{'ok':!![],'data':{'operation':_0x3ab0cb(0xf6),'selector':notificationSelector(_0x3dfa2f),'before':projectNotificationConfig(_0x3f7dae['before']),'after':projectNotificationConfig(_0x3dfa2f),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0xc2a2e2,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x296ebc,'verifiedFields':_0x5d908d['verifiedFields'],'lookupCommand':_0x3e5ec3}},'message':_0x3ab0cb(0xed)+_0x3dfa2f['id']};}};
1
+ function a140_0xe67d(_0x4c574f,_0x28a8f7){_0x4c574f=_0x4c574f-0xde;const _0x3c277a=a140_0x3c27();let _0xe67dce=_0x3c277a[_0x4c574f];return _0xe67dce;}const a140_0x1847af=a140_0xe67d;(function(_0x18f0df,_0x21f223){const _0x433f5d=a140_0xe67d,_0x2d4092=_0x18f0df();while(!![]){try{const _0x122ee3=parseInt(_0x433f5d(0xeb))/0x1+-parseInt(_0x433f5d(0xf0))/0x2*(-parseInt(_0x433f5d(0xfd))/0x3)+parseInt(_0x433f5d(0x104))/0x4*(parseInt(_0x433f5d(0xed))/0x5)+parseInt(_0x433f5d(0xef))/0x6+-parseInt(_0x433f5d(0x103))/0x7+parseInt(_0x433f5d(0xee))/0x8+-parseInt(_0x433f5d(0xe2))/0x9;if(_0x122ee3===_0x21f223)break;else _0x2d4092['push'](_0x2d4092['shift']());}catch(_0x3f0d87){_0x2d4092['push'](_0x2d4092['shift']());}}}(a140_0x3c27,0x22c92));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=a140_0x1847af(0xf3);async function prepareUpdate(_0x1d5e67){const _0x23c37d=a140_0x1847af,_0x19bb1c=readNotificationId(_0x1d5e67),_0x3b9ba6=await readNotificationDocument(_0x1d5e67,_0x23c37d(0xf7)),_0x187b19=await requireExactNotificationConfig(_0x1d5e67['appCode'],_0x19bb1c,_0x23c37d(0xf7));return{'id':_0x19bb1c,'patch':_0x3b9ba6,'before':_0x187b19,'payload':mergeUpdateInput(_0x187b19,_0x3b9ba6),'planned':plannedUpdateProjection(_0x187b19,_0x3b9ba6)};}function a140_0x3c27(){const _0x2df6e8=[';\x20do\x20not\x20resubmit\x20automatically.',';\x20no\x20automatic\x20retry\x20was\x20attempted.','appCode','allMatch','59668PvRcRw','20JOlMWZ','verified','Updated\x20notification\x20config\x20','Inspect\x20ID\x20','provesChange','4050675khxLOs','verifiedFields','before','payload','POST','\x20via\x20','notification_config_update_verification_failed','\x20with\x20','mutation','36566PDKdum','notification','46905xLgavT','1550488dWyPCR','529860NPHoyY','470978VLTOer','config-update','notification_config_update_verification_unavailable','/notification/channel-config/update','Inspect\x20with\x20--id\x20','Notification\x20config\x20','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','update','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','planned','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','channelType','notification_config_update_outcome_unknown','3KtRYBb','high-risk-write'];a140_0x3c27=function(){return _0x2df6e8;};return a140_0x3c27();}export const notificationConfigUpdate={'service':a140_0x1847af(0xec),'command':a140_0x1847af(0xf1),'description':a140_0x1847af(0xf8),'risk':a140_0x1847af(0xfe),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x45b466){readNotificationId(_0x45b466),assertSingleNotificationSource(_0x45b466),requireNotificationExplicitYes(_0x45b466);},async 'dryRun'(_0x520d0e){const _0x279cc9=a140_0x1847af,_0x32f936=await prepareUpdate(_0x520d0e),_0x42806a=notificationLookupCommand(_0x520d0e['appCode'],_0x32f936['before']['channelType']);return asDryRunResult({'operation':_0x279cc9(0xf7),'selector':notificationSelector(_0x32f936[_0x279cc9(0xe4)]),'before':projectNotificationConfig(_0x32f936[_0x279cc9(0xe4)]),'after':_0x32f936[_0x279cc9(0xf9)],'dryRun':!![],'backend':{'method':_0x279cc9(0xe6),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x279cc9(0xf9),'lookupCommand':_0x42806a}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x1ee391){const _0x28d284=a140_0x1847af;requireNotificationExplicitYes(_0x1ee391);const _0x29155f=await prepareUpdate(_0x1ee391),_0x26d41e=notificationLookupCommand(_0x1ee391['appCode'],_0x29155f[_0x28d284(0xe4)][_0x28d284(0xfb)]);let _0x57de0a=![];try{await updateNotificationChannelConfig(_0x29155f[_0x28d284(0xe5)]);}catch(_0x190bfb){if(!isPlatformTransportFailure(_0x190bfb))throw safeApiFailure('update',_0x28d284(0xea),_0x28d284(0xe0)+_0x29155f['id']+_0x28d284(0xe9)+_0x26d41e+_0x28d284(0x100));_0x57de0a=!![];}let _0x4b523b;try{const _0x1f6add=await getNotificationChannelConfig(_0x29155f['id'],_0x1ee391[_0x28d284(0x101)]);_0x4b523b=normalizeExactNotificationConfig(_0x1f6add,_0x29155f['id'],_0x1ee391[_0x28d284(0x101)]);}catch{throw notificationError(_0x57de0a?_0x28d284(0xfc):_0x28d284(0xf2),_0x28d284(0xf5)+_0x29155f['id']+_0x28d284(0xf6),_0x28d284(0xf4)+_0x29155f['id']+_0x28d284(0xe7)+_0x26d41e+_0x28d284(0xff));}const _0x2a39df=requestedSafeFieldsMatch(_0x29155f[_0x28d284(0xe4)],_0x4b523b,_0x29155f['patch']);if(!_0x2a39df[_0x28d284(0x102)]||_0x57de0a&&!_0x2a39df[_0x28d284(0xe1)])throw notificationError(_0x57de0a?_0x28d284(0xfc):_0x28d284(0xe8),_0x28d284(0xf5)+_0x29155f['id']+_0x28d284(0xfa),_0x28d284(0xf4)+_0x29155f['id']+_0x28d284(0xe7)+_0x26d41e+';\x20do\x20not\x20resubmit\x20automatically.');const _0x19e9b6=_0x57de0a?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x28d284(0xf7),'selector':notificationSelector(_0x4b523b),'before':projectNotificationConfig(_0x29155f['before']),'after':projectNotificationConfig(_0x4b523b),'dryRun':![],'backend':{'method':_0x28d284(0xe6),'path':UPDATE_PATH},'warnings':_0x19e9b6,'verification':{'status':_0x28d284(0xde),'recoveredAfterUnknownResponse':_0x57de0a,'verifiedFields':_0x2a39df[_0x28d284(0xe3)],'lookupCommand':_0x26d41e}},'message':_0x28d284(0xdf)+_0x4b523b['id']};}};
@@ -1 +1 @@
1
- (function(_0x2959a1,_0x1f2e83){const _0x3dcc56=a140_0x1d53,_0x4fb0d3=_0x2959a1();while(!![]){try{const _0x2e35f4=-parseInt(_0x3dcc56(0xae))/0x1+parseInt(_0x3dcc56(0xb0))/0x2+parseInt(_0x3dcc56(0xb4))/0x3+-parseInt(_0x3dcc56(0xaf))/0x4+parseInt(_0x3dcc56(0xb1))/0x5+-parseInt(_0x3dcc56(0xb5))/0x6+-parseInt(_0x3dcc56(0xb2))/0x7*(-parseInt(_0x3dcc56(0xb3))/0x8);if(_0x2e35f4===_0x1f2e83)break;else _0x4fb0d3['push'](_0x4fb0d3['shift']());}catch(_0x1d88ee){_0x4fb0d3['push'](_0x4fb0d3['shift']());}}}(a140_0x1d7d,0xdd8f1));import{notificationConfigList}from'../../commands/notification/config-list.js';function a140_0x1d53(_0x1358c4,_0x31a25b){_0x1358c4=_0x1358c4-0xae;const _0x1d7db8=a140_0x1d7d();let _0x1d53ab=_0x1d7db8[_0x1358c4];return _0x1d53ab;}function a140_0x1d7d(){const _0x76b112=['9684768SCnXhx','1539335PGOOKl','127708FERUYE','551466AroeMm','3532405vubUWg','16069816erWazv','8LClJer','2444979RkuXuo'];a140_0x1d7d=function(){return _0x76b112;};return a140_0x1d7d();}import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ function a141_0x3498(_0x45db2b,_0x417ecb){_0x45db2b=_0x45db2b-0x17d;const _0x145323=a141_0x1453();let _0x3498e5=_0x145323[_0x45db2b];return _0x3498e5;}(function(_0xae3dee,_0x2839b7){const _0x48cc2a=a141_0x3498,_0x1db622=_0xae3dee();while(!![]){try{const _0xc45fed=parseInt(_0x48cc2a(0x180))/0x1+-parseInt(_0x48cc2a(0x186))/0x2+-parseInt(_0x48cc2a(0x185))/0x3*(-parseInt(_0x48cc2a(0x17e))/0x4)+parseInt(_0x48cc2a(0x182))/0x5*(parseInt(_0x48cc2a(0x181))/0x6)+parseInt(_0x48cc2a(0x187))/0x7*(parseInt(_0x48cc2a(0x17f))/0x8)+-parseInt(_0x48cc2a(0x183))/0x9+parseInt(_0x48cc2a(0x184))/0xa*(-parseInt(_0x48cc2a(0x17d))/0xb);if(_0xc45fed===_0x2839b7)break;else _0x1db622['push'](_0x1db622['shift']());}catch(_0x20f2d4){_0x1db622['push'](_0x1db622['shift']());}}}(a141_0x1453,0x841a5));import{notificationConfigList}from'../../commands/notification/config-list.js';function a141_0x1453(){const _0x4f058e=['6YszQJf','4776475EKeQpm','2072709tqWcqH','5750670PzZMlo','66JmEGYl','167624OLiqrz','119HAGWTj','33nlwVJg','143332iZaQiw','342032WSCrsr','109968fWLCaA'];a141_0x1453=function(){return _0x4f058e;};return a141_0x1453();}import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];