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

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 (293) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/shared.js +1 -1
  109. package/lib/commands/kb/update.js +1 -1
  110. package/lib/commands/logs/index.js +1 -1
  111. package/lib/commands/menu/asset-update.js +1 -1
  112. package/lib/commands/menu/delete.js +1 -1
  113. package/lib/commands/menu/external-link-create.js +1 -1
  114. package/lib/commands/menu/external-link-update.js +1 -1
  115. package/lib/commands/menu/group-create.js +1 -1
  116. package/lib/commands/menu/group-update.js +1 -1
  117. package/lib/commands/menu/index.js +1 -1
  118. package/lib/commands/menu/list.js +1 -1
  119. package/lib/commands/menu/move.js +1 -1
  120. package/lib/commands/menu/regroup-start.js +1 -1
  121. package/lib/commands/menu/rename.js +1 -1
  122. package/lib/commands/menu/shared/compare-table.js +1 -1
  123. package/lib/commands/menu/shared/delete-plan.js +1 -1
  124. package/lib/commands/menu/shared/facts.js +1 -1
  125. package/lib/commands/menu/shared/index.js +1 -1
  126. package/lib/commands/menu/shared/inquirer.js +1 -1
  127. package/lib/commands/menu/shared/local-pages.js +1 -1
  128. package/lib/commands/menu/shared/logic.js +1 -1
  129. package/lib/commands/menu/shared/mutations.js +1 -1
  130. package/lib/commands/menu/shared/service.js +1 -1
  131. package/lib/commands/menu/shared/sync-core.js +1 -1
  132. package/lib/commands/menu/shared/update-core.js +1 -1
  133. package/lib/commands/menu/shared/valid-url.js +1 -1
  134. package/lib/commands/menu/sync.js +1 -1
  135. package/lib/commands/menu/visibility-update.js +1 -1
  136. package/lib/commands/notification/config-create.js +1 -1
  137. package/lib/commands/notification/config-delete.js +1 -1
  138. package/lib/commands/notification/config-list.js +1 -1
  139. package/lib/commands/notification/config-update.js +1 -1
  140. package/lib/commands/notification/index.js +1 -1
  141. package/lib/commands/notification/shared.js +1 -1
  142. package/lib/commands/ocr/index.js +1 -1
  143. package/lib/commands/page/create.js +1 -1
  144. package/lib/commands/page/custom/detail.js +1 -1
  145. package/lib/commands/page/custom/list.js +1 -1
  146. package/lib/commands/page/custom/publish.js +1 -1
  147. package/lib/commands/page/custom/shared.js +1 -1
  148. package/lib/commands/page/custom/syntax.js +1 -1
  149. package/lib/commands/page/custom/template.js +1 -1
  150. package/lib/commands/page/custom/update.js +1 -1
  151. package/lib/commands/page/data-list-status.js +1 -1
  152. package/lib/commands/page/generate-start.js +1 -1
  153. package/lib/commands/page/generate-status.js +1 -1
  154. package/lib/commands/page/index.js +1 -1
  155. package/lib/commands/page/pull.js +1 -1
  156. package/lib/commands/page/push.js +1 -1
  157. package/lib/commands/page/relation-audit.js +1 -1
  158. package/lib/commands/page/restore.js +1 -1
  159. package/lib/commands/page/shared.js +1 -1
  160. package/lib/commands/page/sync.js +1 -1
  161. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  162. package/lib/commands/project/create/format-elapsed.js +1 -1
  163. package/lib/commands/project/create/main.js +1 -1
  164. package/lib/commands/project/create/materialize-project-template.js +1 -1
  165. package/lib/commands/project/create/project-name.js +1 -1
  166. package/lib/commands/project/create/project-template-archive.js +1 -1
  167. package/lib/commands/project/create/project-template-path.js +1 -1
  168. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  169. package/lib/commands/project/create/use-format-code.js +1 -1
  170. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  171. package/lib/commands/project/index.js +1 -1
  172. package/lib/commands/project/upgrade.js +1 -1
  173. package/lib/commands/registry.js +1 -1
  174. package/lib/commands/role/delete.js +1 -1
  175. package/lib/commands/role/detail.js +1 -1
  176. package/lib/commands/role/index.js +1 -1
  177. package/lib/commands/role/list.js +1 -1
  178. package/lib/commands/role/shared.js +1 -1
  179. package/lib/commands/role/update.js +1 -1
  180. package/lib/commands/role/user-add.js +1 -1
  181. package/lib/commands/role/user-remove.js +1 -1
  182. package/lib/commands/role/user-resolve.js +1 -1
  183. package/lib/commands/run/index.js +1 -1
  184. package/lib/commands/schema.js +1 -1
  185. package/lib/commands/sql/create.js +1 -1
  186. package/lib/commands/sql/delete.js +1 -1
  187. package/lib/commands/sql/detail.js +1 -1
  188. package/lib/commands/sql/exec.js +1 -1
  189. package/lib/commands/sql/index.js +1 -1
  190. package/lib/commands/sql/list.js +1 -1
  191. package/lib/commands/sql/pull.js +1 -1
  192. package/lib/commands/sql/push.js +1 -1
  193. package/lib/commands/sql/shared.js +1 -1
  194. package/lib/commands/sql/status.js +1 -1
  195. package/lib/commands/sql/validate.js +1 -1
  196. package/lib/commands/task/index.js +1 -1
  197. package/lib/commands/task/status.js +1 -1
  198. package/lib/commands/tenant/index.js +1 -1
  199. package/lib/commands/tenant/members-list.js +1 -1
  200. package/lib/commands/tenant/shared.js +1 -1
  201. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  202. package/lib/commands/user-account/index.js +1 -1
  203. package/lib/commands/workspace/add.js +1 -1
  204. package/lib/commands/workspace/index.js +1 -1
  205. package/lib/commands/workspace/remove.js +1 -1
  206. package/lib/config/schema.js +1 -1
  207. package/lib/constant/cdn.js +1 -1
  208. package/lib/constant/cli.js +1 -1
  209. package/lib/constant/defaults.js +1 -1
  210. package/lib/constant/domain.js +1 -1
  211. package/lib/constant/env.js +1 -1
  212. package/lib/constant/output.js +1 -1
  213. package/lib/constant/paths.js +1 -1
  214. package/lib/constant/risk.js +1 -1
  215. package/lib/context/app-resolver.js +1 -1
  216. package/lib/context/auth-resolver.js +1 -1
  217. package/lib/context/config-loader.js +1 -1
  218. package/lib/context.js +1 -1
  219. package/lib/core/alias-resolver.js +1 -1
  220. package/lib/core/api-client.js +1 -1
  221. package/lib/core/bff/config.js +1 -1
  222. package/lib/core/bff/file-system.js +1 -1
  223. package/lib/core/bff/hash.js +1 -1
  224. package/lib/core/bff/lock.js +1 -1
  225. package/lib/core/bff/utils.js +1 -1
  226. package/lib/core/db-resolver.js +1 -1
  227. package/lib/core/page/file-system.js +1 -1
  228. package/lib/core/page/hash.js +1 -1
  229. package/lib/core/page/lock.js +1 -1
  230. package/lib/core/sql-index-auditor.js +1 -1
  231. package/lib/core/sql-sync/config.js +1 -1
  232. package/lib/core/sql-sync/file-system.js +1 -1
  233. package/lib/core/sql-sync/hash.js +1 -1
  234. package/lib/core/sql-sync/lock.js +1 -1
  235. package/lib/core/sql-sync/utils.js +1 -1
  236. package/lib/core/sql-validator.js +1 -1
  237. package/lib/errors.js +1 -1
  238. package/lib/framework/build-all-flags.js +1 -1
  239. package/lib/framework/error-output.js +1 -1
  240. package/lib/framework/explicit-yes.js +1 -1
  241. package/lib/framework/flags.js +1 -1
  242. package/lib/framework/help.js +1 -1
  243. package/lib/framework/index.js +1 -1
  244. package/lib/framework/output.js +1 -1
  245. package/lib/framework/response.js +1 -1
  246. package/lib/framework/runner-alias.js +1 -1
  247. package/lib/framework/runner.js +1 -1
  248. package/lib/framework/schema-export.js +1 -1
  249. package/lib/framework/types.js +1 -1
  250. package/lib/generated/build-info.d.ts +4 -4
  251. package/lib/generated/build-info.js +1 -1
  252. package/lib/help.js +1 -1
  253. package/lib/postinstall.js +1 -1
  254. package/lib/runtime/confirmation.js +1 -1
  255. package/lib/runtime/event.js +1 -1
  256. package/lib/runtime/index.js +1 -1
  257. package/lib/runtime/queue.js +1 -1
  258. package/lib/runtime/resolve.js +1 -1
  259. package/lib/skills/builtin-skill.js +1 -1
  260. package/lib/skills/main.js +1 -1
  261. package/lib/skills/npx-skills-add.js +1 -1
  262. package/lib/skills/skill-presence.js +1 -1
  263. package/lib/telemetry/cli-command-trace.js +1 -1
  264. package/lib/telemetry/cli-help-trace.js +1 -1
  265. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  266. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  267. package/lib/telemetry/send-cli-trace-log.js +1 -1
  268. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  269. package/lib/utils/ai_config.js +1 -1
  270. package/lib/utils/apply-jq-filter.js +1 -1
  271. package/lib/utils/cdn-config.js +1 -1
  272. package/lib/utils/check-sdk-version.js +1 -1
  273. package/lib/utils/cli-version-check.js +1 -1
  274. package/lib/utils/cli-version-policy.js +1 -1
  275. package/lib/utils/config.js +1 -1
  276. package/lib/utils/entity-with-id.js +1 -1
  277. package/lib/utils/file-utils.js +1 -1
  278. package/lib/utils/guides-cdn.js +1 -1
  279. package/lib/utils/http-client.js +1 -1
  280. package/lib/utils/is-non-interactive.js +1 -1
  281. package/lib/utils/logger.js +1 -1
  282. package/lib/utils/params.js +1 -1
  283. package/lib/utils/platform.js +1 -1
  284. package/lib/utils/rules-cdn.js +1 -1
  285. package/lib/utils/sleep.js +1 -1
  286. package/lib/utils/template-replacer.js +1 -1
  287. package/lib/utils/update-notice.js +1 -1
  288. package/lib/utils/version.js +1 -1
  289. package/lib/utils/with-active-cookie.js +1 -1
  290. package/lib/utils/write-cli-side-channel.js +1 -1
  291. package/package.json +1 -1
  292. package/skills/rabetbase/SKILL.md +1 -1
  293. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a134_0x201f50=a134_0x48a9;(function(_0x4adf0a,_0x278e4e){const _0xb5b8fb=a134_0x48a9,_0x2df970=_0x4adf0a();while(!![]){try{const _0x4b83bf=-parseInt(_0xb5b8fb(0x1d3))/0x1*(parseInt(_0xb5b8fb(0x1d8))/0x2)+-parseInt(_0xb5b8fb(0x1e3))/0x3*(-parseInt(_0xb5b8fb(0x1af))/0x4)+-parseInt(_0xb5b8fb(0x1c4))/0x5*(parseInt(_0xb5b8fb(0x1c7))/0x6)+-parseInt(_0xb5b8fb(0x1b5))/0x7*(parseInt(_0xb5b8fb(0x1f3))/0x8)+parseInt(_0xb5b8fb(0x1d5))/0x9+-parseInt(_0xb5b8fb(0x1e4))/0xa*(parseInt(_0xb5b8fb(0x1ec))/0xb)+parseInt(_0xb5b8fb(0x1c1))/0xc;if(_0x4b83bf===_0x278e4e)break;else _0x2df970['push'](_0x2df970['shift']());}catch(_0x1fe6bd){_0x2df970['push'](_0x2df970['shift']());}}}(a134_0x2ebe,0x62783));function a134_0x2ebe(){const _0x55e2a8=['\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20created.','appcode','cyan','21645024ZWUbfs','map','\x20menu(s)','3426450PoAvVn','POST','sync','6bdZzpt','Menu\x20sync\x20completed:\x20','size','skipped','Menu\x20sync\x20skipped','created','\x20local\x20microfrontend\x20menu(s).','flag','boolean','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','paths','✓\x20Menu\x20sync\x20completed:\x20','311CWDMYP','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','1267983NaGEHI','\x20menu(s)\x20created','Sync\x20local\x20pages\x20as\x20platform\x20menus','592BMCwjr','write','filter','trim','Menu\x20creation\x20failed','Failed\x20to\x20fetch\x20online\x20menu\x20list','Created\x20','length','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','yellow','cssUrl','324741YzbfRY','196090AMihJN','Would\x20create\x20','message','gray','\x20\x20Continue\x20with\x20creation?','\x20and\x20CSS:\x20','validation','menu','99LOctjX','\x20\x20Cancelled.','Fetching\x20online\x20menu\x20list...','\x20created,\x20','cookie','string','params','6431800vOEdBc','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','8efRVfP','onlineMenuList','localPages','selectedAppName','Creating\x20','appCode','7jagLQU','Pre-fill\x20JS/CSS\x20URLs.\x20','\x20\x20Create\x20','/smartapi/menu/create','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','jsUrl','str','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.'];a134_0x2ebe=function(){return _0x55e2a8;};return a134_0x2ebe();}import a134_0x3fcd8d from'chalk';function a134_0x48a9(_0x4dff09,_0x5943ed){_0x4dff09=_0x4dff09-0x1af;const _0x2ebe11=a134_0x2ebe();let _0x48a9b7=_0x2ebe11[_0x4dff09];return _0x48a9b7;}import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a134_0x201f50(0x1eb),'command':a134_0x201f50(0x1c6),'description':a134_0x201f50(0x1d7),'risk':a134_0x201f50(0x1d9),'flags':[{'name':a134_0x201f50(0x1f2),'type':'string','description':a134_0x201f50(0x1b6)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':'paths','type':a134_0x201f50(0x1f1),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':'yes','type':a134_0x201f50(0x1cf),'description':a134_0x201f50(0x1d0)}],async 'dryRun'(_0x20a8da){const _0x460881=a134_0x201f50;ensureRunnableContext(_0x20a8da['rawFlags'],_0x20a8da[_0x460881(0x1b2)]);const _0x283760=await runMenuSyncCore(_0x20a8da['appCode'],_0x20a8da[_0x460881(0x1f0)],parsePaths(_0x20a8da[_0x460881(0x1bb)](_0x460881(0x1d1))),_0x20a8da[_0x460881(0x1bb)]('params'),{'dryRun':!![]});return{'method':_0x460881(0x1c5),'url':_0x460881(0x1b8),'body':_0x283760,'description':_0x283760[_0x460881(0x1ca)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x460881(0x1e5)+_0x283760['targetPages'][_0x460881(0x1df)]+_0x460881(0x1cd)};},async 'execute'(_0x4f566d){const _0x24862f=a134_0x201f50;ensureRunnableContext(_0x4f566d['rawFlags'],_0x4f566d[_0x24862f(0x1b2)]);const _0x501b23=_0x4f566d[_0x24862f(0x1ce)]('yes'),_0x17bc0e=_0x4f566d['str'](_0x24862f(0x1f2)),_0x51881f=parsePaths(_0x4f566d[_0x24862f(0x1bb)](_0x24862f(0x1d1))),_0x530f48=parseMenuSyncParams(_0x17bc0e);if(_0x501b23){const _0x1329e7=await runMenuSyncCore(_0x4f566d['appCode'],_0x4f566d['cookie'],_0x51881f,_0x17bc0e);if(_0x1329e7['skipped']){const _0x36d61d=getLocalPages();_0x36d61d[_0x24862f(0x1df)]===0x0?writeCliSideChannelLine(_0x24862f(0x1b9)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x24862f(0x1d2)+_0x1329e7[_0x24862f(0x1cc)]+_0x24862f(0x1d6));return{'ok':!![],'data':_0x1329e7,'message':_0x1329e7[_0x24862f(0x1ca)]?_0x24862f(0x1cb):_0x24862f(0x1c8)+_0x1329e7['created']+_0x24862f(0x1be)};}if(_0x51881f[_0x24862f(0x1df)]>0x0)throw CliErrors[_0x24862f(0x1ea)](_0x24862f(0x1bc),_0x24862f(0x1f4));if(!isInteractive()&&_0x17bc0e)throw CliErrors['validation'](_0x24862f(0x1d4),_0x24862f(0x1f4));requireInteractive();const _0x1f2094=startSpinner(_0x24862f(0x1ee));let _0x4cce82,_0x544c1f,_0x42f8c7;try{const _0x426e40=await fetchMenuData(_0x4f566d[_0x24862f(0x1b4)],_0x4f566d[_0x24862f(0x1f0)]);_0x4cce82=_0x426e40[_0x24862f(0x1b1)],_0x544c1f=_0x426e40['onlinePaths'],_0x42f8c7=_0x426e40[_0x24862f(0x1b0)],stopSpinner(_0x1f2094,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x5debc5){stopSpinner(_0x1f2094,_0x24862f(0x1dd),![]);throw CliErrors['validation'](_0x5debc5 instanceof Error?_0x5debc5[_0x24862f(0x1e6)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x4cce82[_0x24862f(0x1df)]===0x0)return writeCliSideChannelLine(a134_0x3fcd8d[_0x24862f(0x1e1)](_0x24862f(0x1bd))),{'ok':!![]};const _0x52f74e=buildCompareRows(_0x4cce82,_0x544c1f);writeCliSideChannelLine(renderCompareTable(_0x52f74e)),writeCliSideChannelLine('');const _0x11abf2=await selectPages(_0x4cce82,_0x544c1f);writeCliSideChannelLine(''),writeCliSideChannelLine(a134_0x3fcd8d[_0x24862f(0x1c0)]('\x20\x20✓\x20Selected:\x20'+_0x11abf2[_0x24862f(0x1df)]+'\x20page(s)'));const _0x48da1c=_0x530f48[_0x24862f(0x1ba)]&&_0x530f48[_0x24862f(0x1e2)];if(!_0x48da1c){writeCliSideChannelLine(renderSyncSummary(_0x11abf2,_0x544c1f[_0x24862f(0x1c9)]>0x0));const _0x576cdf=await askConfirm(_0x24862f(0x1e8));if(!_0x576cdf)return writeCliSideChannelLine(a134_0x3fcd8d[_0x24862f(0x1e7)](_0x24862f(0x1ed))),{'ok':!![]};}let _0x5a2d99=_0x530f48[_0x24862f(0x1ba)],_0x2b1ea3=_0x530f48[_0x24862f(0x1e2)];!_0x5a2d99&&(_0x5a2d99=await askJsUrl());!_0x2b1ea3&&(_0x2b1ea3=await askCssUrl());const _0x34f510=await askConfirm(_0x24862f(0x1b7)+_0x11abf2[_0x24862f(0x1df)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x5a2d99+_0x24862f(0x1e9)+_0x2b1ea3+'?');if(!_0x34f510)return writeCliSideChannelLine(a134_0x3fcd8d[_0x24862f(0x1e7)](_0x24862f(0x1ed))),{'ok':!![]};const _0x40346f=[_0x5a2d99,_0x2b1ea3],_0x46dfaf=startSpinner(_0x24862f(0x1b3)+_0x11abf2[_0x24862f(0x1df)]+'\x20menu(s)...');try{const _0x1533b7=await doCreateMenus(_0x4f566d['appCode'],_0x4f566d['cookie'],_0x11abf2,_0x40346f);return stopSpinner(_0x46dfaf,_0x24862f(0x1de)+_0x1533b7[_0x24862f(0x1cc)]+_0x24862f(0x1c3),!![]),{'ok':!![],'data':_0x1533b7,'message':_0x24862f(0x1c8)+_0x1533b7[_0x24862f(0x1cc)]+_0x24862f(0x1ef)+_0x1533b7['failed']+'\x20failed.'};}catch(_0x252af5){stopSpinner(_0x46dfaf,_0x24862f(0x1dc),![]);throw CliErrors['validation'](_0x252af5 instanceof Error?_0x252af5[_0x24862f(0x1e6)]:'Menu\x20creation\x20failed');}}};function ensureRunnableContext(_0x414564,_0x33d4c9){const _0x425900=a134_0x201f50,_0x2d389c=_0x414564[_0x425900(0x1bf)]?String(_0x414564['appcode'])[_0x425900(0x1db)]():'';if(!isInProject()&&!_0x33d4c9&&!_0x2d389c)throw CliErrors[_0x425900(0x1ea)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x425900(0x1e0));}function parsePaths(_0x251762){const _0x262359=a134_0x201f50;return[...new Set(_0x251762['split'](',')[_0x262359(0x1c2)](_0x96f428=>_0x96f428['trim']())[_0x262359(0x1da)](Boolean))];}
1
+ 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 +1 @@
1
- const a135_0x461eec=a135_0x247f;function a135_0x3776(){const _0x4fdd60=['Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','294GzDLxM','\x20unchanged\x20menu(s).','368487JeyoPe','\x20failed.','appCode','update\x20visibility\x20for','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','1595046odrQuE','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','true','276568YygvsY','Menu\x20','recovered','menu_state_drift','menu\x20list','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','update-menu-visibility','validation','message','paths','beforeById','expected-count','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','filter','childrenIds','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','childrenCount','updated','\x20skipped,\x20','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','\x20updated,\x20','resourcesValid','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','verify\x20menu\x20visibility\x20update','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','627012IONzvS','menu','type','requestedVisible','stringify','192Mcjcvr','num','sort','rabetbase\x20menu\x20list\x20--format\x20compress','menu-ids','visible','path','menu_selector_not_found','menus','warnings','expect-visible','datasetCode','Selected\x20','split','POST','set','resources','pageType','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','cookie','datasetId','\x20changed\x20unexpectedly.','expectedCount','plan','menu_expected_count_mismatch','length','update\x20menu\x20visibility','Response\x20was\x20lost\x20for\x20menu\x20','update-recovery','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','targets','\x20must\x20be\x20true\x20or\x20false.','Response\x20was\x20lost\x20and\x20menu\x20','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','5oPOuad','plannedActions','visibility-update','menu_selector_ambiguous','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','has','\x20menu(s);\x20skipped\x20','modelType','flagMissing','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','depth','code','isArray','byId','/smartapi/menu/update','before','boolean','get','menu_verification_failed','str','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','parentId','number','body','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','hash','32058qJGhKW','menuIds','26826RPOUtM','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','verification','3650610JyJbiR','Menu\x20id\x20selector(s)\x20not\x20found:\x20','push','expectVisible','Menu\x20path\x20selector\x20not\x20found:\x20','failed','string','map','pageId','join','label','some','isSafeInteger','values','high-risk-write','false','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.'];a135_0x3776=function(){return _0x4fdd60;};return a135_0x3776();}(function(_0x3eb2eb,_0xb3ca19){const _0x4e311a=a135_0x247f,_0x1776b4=_0x3eb2eb();while(!![]){try{const _0x5995c5=parseInt(_0x4e311a(0x72))/0x1+-parseInt(_0x4e311a(0x92))/0x2+-parseInt(_0x4e311a(0xae))/0x3+parseInt(_0x4e311a(0x95))/0x4*(-parseInt(_0x4e311a(0xd6))/0x5)+-parseInt(_0x4e311a(0x74))/0x6*(-parseInt(_0x4e311a(0x8a))/0x7)+-parseInt(_0x4e311a(0xb3))/0x8*(-parseInt(_0x4e311a(0x8c))/0x9)+parseInt(_0x4e311a(0x77))/0xa;if(_0x5995c5===_0xb3ca19)break;else _0x1776b4['push'](_0x1776b4['shift']());}catch(_0x3fbe74){_0x1776b4['push'](_0x1776b4['shift']());}}}(a135_0x3776,0x78158));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';function a135_0x247f(_0x44654b,_0x3d8775){_0x44654b=_0x44654b-0x6e;const _0x377618=a135_0x3776();let _0x247fb9=_0x377618[_0x44654b];return _0x247fb9;}import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot,requireExplicitYes}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a135_0x461eec(0xc1),'path':a135_0x461eec(0xe4)}];export const menuVisibilityUpdate={'service':a135_0x461eec(0xaf),'command':a135_0x461eec(0xd8),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a135_0x461eec(0x85),'structuredErrors':!![],'flags':[{'name':a135_0x461eec(0xb7),'type':'string','description':a135_0x461eec(0x87)},{'name':a135_0x461eec(0x9e),'type':a135_0x461eec(0x7d),'description':a135_0x461eec(0x89)},{'name':'visible','type':a135_0x461eec(0xe6),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a135_0x461eec(0xbd),'type':a135_0x461eec(0xe6),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':'expected-count','type':a135_0x461eec(0x6e),'description':a135_0x461eec(0xd0)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x21bec5){parseInput(_0x21bec5),requireExplicitYes(_0x21bec5);},async 'dryRun'(_0x19fac3){const _0x207901=a135_0x461eec,_0x792ee8=await buildPlan(_0x19fac3,!![]),_0x4a9b6d=_0x792ee8[_0x207901(0xca)][_0x207901(0xd7)]?.['length']??0x0,_0x124aff=_0x792ee8[_0x207901(0xca)]['targets'][_0x207901(0xcc)]-_0x4a9b6d;return menuDryRunResult(_0x792ee8[_0x207901(0xca)],{'method':_0x207901(0xc1),'url':_0x207901(0xe4),'body':{'updates':_0x792ee8[_0x207901(0xca)][_0x207901(0xd7)]?.['map'](_0x437ab8=>_0x437ab8[_0x207901(0x6f)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x4a9b6d+'\x20menu(s);\x20skip\x20'+_0x124aff+_0x207901(0x8b)});},async 'execute'(_0xb6f688){const _0x349c16=a135_0x461eec;requireExplicitYes(_0xb6f688);const _0x1b982e=await buildPlan(_0xb6f688,![]);await recheckMutationSnapshot(_0xb6f688,_0x1b982e[_0x349c16(0xca)],_0x349c16(0xcd));const _0x5c4237=[],_0x37182f=[],_0xd663e=[];for(const _0x56efcd of _0x1b982e[_0x349c16(0xca)][_0x349c16(0xd1)]){if(_0x56efcd[_0x349c16(0xe5)][_0x349c16(0xb8)]===_0x1b982e['plan'][_0x349c16(0xb1)]){_0x5c4237['push']({'id':_0x56efcd['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0xb6f688[_0x349c16(0x8e)],_0xb6f688['cookie'],{'id':_0x56efcd['id'],'visible':_0x1b982e[_0x349c16(0xca)][_0x349c16(0xb1)]}),_0x5c4237['push']({'id':_0x56efcd['id'],'updated':!![],'skipped':![]});}catch(_0xbfa55e){const _0x319936=mapMenuApiError(_0xbfa55e,_0x349c16(0x8f),_0x56efcd['id']);if(isMenuResponseLoss(_0xbfa55e)&&_0x319936[_0x349c16(0xe1)]!=='menu_permission_denied'){_0xd663e[_0x349c16(0x79)](_0x56efcd['id']);continue;}_0x37182f[_0x349c16(0x79)]({'id':_0x56efcd['id'],'stage':'update','code':_0x319936[_0x349c16(0xe1)],'message':_0x319936[_0x349c16(0x9d)]});}}let _0x432e6c;try{_0x432e6c=await fetchMenuSnapshot(_0xb6f688[_0x349c16(0x8e)],_0xb6f688[_0x349c16(0xc6)]);}catch(_0x46fbe6){const _0x45a3cb=describeMenuErrorCause(_0x46fbe6,_0x349c16(0xac)),_0x18135f=_0xd663e[_0x349c16(0x7e)](_0x4f9ac6=>({'id':_0x4f9ac6,'stage':'update-recovery','code':_0x349c16(0xe8),'message':_0x349c16(0xce)+_0x4f9ac6+_0x349c16(0xd5),'requestedStateConfirmed':![],'recovered':![]})),_0x489dee={'stage':_0x349c16(0x76),'code':_0x349c16(0xe8),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x1b982e['plan'][_0x349c16(0xd1)][_0x349c16(0x7e)](_0x404d7c=>_0x404d7c['id']),'requestedStateConfirmed':![],..._0x45a3cb};throw menuFailure(asVerificationError(_0x46fbe6,_0x349c16(0x70)),_0x1b982e[_0x349c16(0xca)],{'stage':_0x349c16(0x76),'succeeded':_0x5c4237,'failedRecords':[..._0x37182f,..._0x18135f,_0x489dee],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x349c16(0x7c),'recoveredCount':0x0,'lookupCommand':_0x349c16(0xb6)}});}const _0x31cf78=[];for(const _0x1d28e9 of _0x5c4237){const _0x33ce34=Number(_0x1d28e9['id']),_0x47eb80=_0x1b982e[_0x349c16(0x9f)][_0x349c16(0xe7)](_0x33ce34),_0x4efbae=_0x432e6c[_0x349c16(0xe3)][_0x349c16(0xe7)](_0x33ce34);try{verifyVisibilityUpdate(_0x47eb80,_0x4efbae,_0x1b982e[_0x349c16(0xca)]['requestedVisible']);}catch(_0x132ba0){const _0x290037=asVerificationError(_0x132ba0,_0x349c16(0x96)+_0x33ce34+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x31cf78[_0x349c16(0x79)]({'id':_0x33ce34,'stage':_0x349c16(0x76),'code':_0x290037[_0x349c16(0xe1)],'message':_0x290037[_0x349c16(0x9d)],'requestedStateConfirmed':![]});}}for(const _0x59f2af of _0xd663e){const _0x22b6cb=_0x1b982e[_0x349c16(0x9f)]['get'](_0x59f2af),_0x4072f0=_0x432e6c[_0x349c16(0xe3)]['get'](_0x59f2af);try{verifyVisibilityUpdate(_0x22b6cb,_0x4072f0,_0x1b982e['plan']['requestedVisible']),_0x5c4237[_0x349c16(0x79)]({'id':_0x59f2af,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x17a6cf){const _0x45408f=asVerificationError(_0x17a6cf,_0x349c16(0xd3)+_0x59f2af+_0x349c16(0xda));_0x31cf78[_0x349c16(0x79)]({'id':_0x59f2af,'stage':_0x349c16(0xcf),'code':_0x45408f[_0x349c16(0xe1)],'message':_0x45408f[_0x349c16(0x9d)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x31cf78[_0x349c16(0xcc)]>0x0){const _0x44573b=_0x31cf78[_0x349c16(0x7e)](_0x55a78c=>Number(_0x55a78c['id'])),_0x297a80=_0x5c4237[_0x349c16(0xa2)](_0x1ab595=>_0x1ab595[_0x349c16(0x97)]===!![])[_0x349c16(0xcc)],_0x5e4772=menuError(_0x349c16(0xe8),_0x349c16(0xea)+_0x44573b['join'](',\x20')+'.',_0x349c16(0xad));throw menuFailure(_0x5e4772,_0x1b982e[_0x349c16(0xca)],{'stage':_0x349c16(0x76),'succeeded':_0x5c4237,'failedRecords':[..._0x37182f,..._0x31cf78],'warnings':[_0x349c16(0xa4)],'verification':{'status':'failed',..._0x44573b['length']===0x1?{'targetId':_0x44573b[0x0]}:{'targetIds':_0x44573b},'recoveredCount':_0x297a80,'lookupCommand':_0x349c16(0xb6)}});}const _0x599066=_0x5c4237[_0x349c16(0xa2)](_0x116ce9=>_0x116ce9[_0x349c16(0xa6)]===!![])[_0x349c16(0xcc)],_0x396f4e=_0x5c4237[_0x349c16(0xcc)]-_0x599066,_0x81e03a={..._0x1b982e[_0x349c16(0xca)],'succeeded':_0x5c4237,'failed':_0x37182f,'warnings':_0x37182f[_0x349c16(0xcc)]>0x0?[..._0x1b982e['plan'][_0x349c16(0xbc)],_0x349c16(0xd4)]:_0x1b982e[_0x349c16(0xca)][_0x349c16(0xbc)],'verification':{'checkedBy':_0x349c16(0x99),'snapshotHash':_0x432e6c[_0x349c16(0x71)],'matchesRequestedState':_0x37182f[_0x349c16(0xcc)]===0x0,'recoveredCount':_0xd663e['length']}};return{'ok':_0x37182f[_0x349c16(0xcc)]===0x0,'data':_0x81e03a,'message':_0x37182f[_0x349c16(0xcc)]===0x0?'Updated\x20visibility\x20for\x20'+_0x599066+_0x349c16(0xdc)+_0x396f4e+_0x349c16(0x8b):'Menu\x20visibility\x20update\x20completed:\x20'+_0x599066+_0x349c16(0xa9)+_0x396f4e+_0x349c16(0xa7)+_0x37182f[_0x349c16(0xcc)]+_0x349c16(0x8d)};}};function parseInput(_0x51f9d1){const _0x1c273d=a135_0x461eec,_0x278771=parseMenuIds(_0x51f9d1[_0x1c273d(0xe9)]('menu-ids')),_0x4adcc6=parseCsv(_0x51f9d1[_0x1c273d(0xe9)]('paths'));if(_0x278771[_0x1c273d(0xcc)]===0x0&&_0x4adcc6[_0x1c273d(0xcc)]===0x0)throw CliErrors[_0x1c273d(0x9c)](_0x1c273d(0x90));const _0x3a4d5b=parseBooleanFlag(_0x51f9d1,'visible',!![]),_0x51c66e=parseBooleanFlag(_0x51f9d1,_0x1c273d(0xbd),![]);let _0x57ccea;if(hasFlag(_0x51f9d1,_0x1c273d(0xa0))){_0x57ccea=_0x51f9d1[_0x1c273d(0xb4)]('expected-count');if(!Number[_0x1c273d(0x83)](_0x57ccea)||_0x57ccea<0x0)throw CliErrors[_0x1c273d(0x9c)](_0x1c273d(0xdf));}return{'menuIds':_0x278771,'paths':_0x4adcc6,'visible':_0x3a4d5b,'expectVisible':_0x51c66e,'expectedCount':_0x57ccea};}async function buildPlan(_0x1971c5,_0x22ea98){const _0x36a876=a135_0x461eec,_0x28dec3=parseInput(_0x1971c5),_0x1adae3=await fetchMutationSnapshot(_0x1971c5,_0x36a876(0xcd)),_0x4c0a19=selectTargets(_0x1adae3[_0x36a876(0xbb)],_0x28dec3['menuIds'],_0x28dec3['paths']);if(_0x28dec3[_0x36a876(0xc9)]!==undefined&&_0x4c0a19[_0x36a876(0xcc)]!==_0x28dec3[_0x36a876(0xc9)])throw menuError(_0x36a876(0xcb),_0x36a876(0xbf)+_0x4c0a19[_0x36a876(0xcc)]+'\x20menu(s),\x20expected\x20'+_0x28dec3[_0x36a876(0xc9)]+'.',_0x36a876(0xa1));if(_0x28dec3[_0x36a876(0x7a)]!==undefined){const _0x84ddd6=_0x4c0a19[_0x36a876(0xa2)](_0x52b0c5=>_0x52b0c5[_0x36a876(0xb8)]!==_0x28dec3[_0x36a876(0x7a)]);if(_0x84ddd6[_0x36a876(0xcc)]>0x0)throw menuError(_0x36a876(0x98),'Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20'+_0x84ddd6[_0x36a876(0x7e)](_0x1e9cb7=>_0x1e9cb7['id'])['join'](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x1c41a6=_0x4c0a19[_0x36a876(0x7e)](_0xf873dc=>({'id':_0xf873dc['id'],'label':_0xf873dc[_0x36a876(0x81)],'path':_0xf873dc[_0x36a876(0xb9)],'before':{'visible':_0xf873dc[_0x36a876(0xb8)]},'after':{'visible':_0x28dec3['visible']}})),_0x7fd66c=_0x1c41a6[_0x36a876(0xa2)](_0x2e9b64=>_0x2e9b64['before'][_0x36a876(0xb8)]!==_0x28dec3['visible'])['map'](_0x190de1=>({'stage':_0x36a876(0x9b),'method':_0x36a876(0xc1),'path':_0x36a876(0xe4),'body':{'appCode':_0x1971c5[_0x36a876(0x8e)],'id':_0x190de1['id'],'visible':_0x28dec3[_0x36a876(0xb8)]}})),_0x958d25=mutationResult({'operation':_0x36a876(0xd8),'selector':{'menuIds':_0x28dec3[_0x36a876(0x73)],'paths':_0x28dec3['paths']},'before':{'menus':_0x4c0a19[_0x36a876(0x7e)](_0x489811=>({'id':_0x489811['id'],'path':_0x489811[_0x36a876(0xb9)],'visible':_0x489811['visible']}))},'after':{'menus':_0x4c0a19['map'](_0x5ac948=>({'id':_0x5ac948['id'],'path':_0x5ac948['path'],'visible':_0x28dec3[_0x36a876(0xb8)]}))},'dryRun':_0x22ea98,'backend':[...BACKEND],'plannedActions':_0x7fd66c,'snapshotHash':_0x1adae3['hash'],'warnings':_0x7fd66c[_0x36a876(0xcc)]===0x0?[_0x36a876(0x91)]:[]});return{'plan':{..._0x958d25,'requestedVisible':_0x28dec3[_0x36a876(0xb8)],'targets':_0x1c41a6},'beforeById':new Map(_0x4c0a19[_0x36a876(0x7e)](_0x357135=>[_0x357135['id'],_0x357135]))};}function selectTargets(_0x6d4a34,_0x2f10f3,_0x559155){const _0xe7e6fd=a135_0x461eec,_0x440371=new Map(_0x6d4a34[_0xe7e6fd(0x7e)](_0x398ffe=>[_0x398ffe['id'],_0x398ffe])),_0x515670=new Map(),_0x409366=_0x2f10f3[_0xe7e6fd(0xa2)](_0x5d0bfd=>!_0x440371[_0xe7e6fd(0xdb)](_0x5d0bfd));if(_0x409366[_0xe7e6fd(0xcc)]>0x0)throw menuError(_0xe7e6fd(0xba),_0xe7e6fd(0x78)+_0x409366['join'](',\x20')+'.',_0xe7e6fd(0x93));for(const _0x5259c7 of _0x2f10f3){_0x515670[_0xe7e6fd(0xc2)](_0x5259c7,_0x440371['get'](_0x5259c7));}for(const _0x3d756a of _0x559155){const _0x4b67a1=_0x6d4a34['filter'](_0x271d8b=>_0x271d8b[_0xe7e6fd(0xb9)]===_0x3d756a);if(_0x4b67a1[_0xe7e6fd(0xcc)]===0x0)throw menuError(_0xe7e6fd(0xba),_0xe7e6fd(0x7b)+JSON['stringify'](_0x3d756a)+'.',_0xe7e6fd(0x9a));if(_0x4b67a1['length']>0x1)throw menuError(_0xe7e6fd(0xd9),_0xe7e6fd(0xab)+JSON[_0xe7e6fd(0xb2)](_0x3d756a)+'.',_0xe7e6fd(0xa8)+_0x4b67a1[_0xe7e6fd(0x7e)](_0x3f5e8d=>_0x3f5e8d['id'])[_0xe7e6fd(0x80)](',\x20')+'.');const _0x23fa41=_0x4b67a1[0x0];_0x515670[_0xe7e6fd(0xc2)](_0x23fa41['id'],_0x23fa41);}return[..._0x515670[_0xe7e6fd(0x84)]()];}function parseMenuIds(_0x28253a){const _0x3ebe0c=a135_0x461eec,_0x1891f0=parseCsv(_0x28253a),_0x361faa=_0x1891f0[_0x3ebe0c(0x7e)](Number);if(_0x361faa[_0x3ebe0c(0x82)](_0x18a43b=>!Number[_0x3ebe0c(0x83)](_0x18a43b)||_0x18a43b<=0x0))throw CliErrors['validation'](_0x3ebe0c(0x75));return[...new Set(_0x361faa)];}function parseCsv(_0x2dd719){const _0x255045=a135_0x461eec;return[...new Set(_0x2dd719[_0x255045(0xc0)](',')[_0x255045(0x7e)](_0x4ad687=>_0x4ad687['trim']())['filter'](Boolean))];}function parseBooleanFlag(_0x2f58eb,_0x313263,_0x3a6ddc){const _0x59e4ca=a135_0x461eec;if(!hasFlag(_0x2f58eb,_0x313263)){if(_0x3a6ddc)throw CliErrors[_0x59e4ca(0xde)](_0x313263);return undefined;}const _0x123890=_0x2f58eb['rawFlags'][_0x313263];if(_0x123890===!![]||_0x123890===![])return _0x123890;if(_0x123890===_0x59e4ca(0x94))return!![];if(_0x123890===_0x59e4ca(0x86))return![];throw CliErrors[_0x59e4ca(0x9c)]('--'+_0x313263+_0x59e4ca(0xd2));}function verifyVisibilityUpdate(_0x2f9ce4,_0x1e735f,_0x261bcc){const _0x2eb79b=a135_0x461eec;assertVerified(!!_0x1e735f,'Menu\x20'+_0x2f9ce4['id']+_0x2eb79b(0xc5)),assertVerified(_0x1e735f[_0x2eb79b(0xb8)]===_0x261bcc,_0x2eb79b(0x96)+_0x2f9ce4['id']+_0x2eb79b(0x88));const _0x2c8871=[['id',_0x1e735f['id'],_0x2f9ce4['id']],[_0x2eb79b(0xeb),_0x1e735f['parentId'],_0x2f9ce4[_0x2eb79b(0xeb)]],[_0x2eb79b(0xe0),_0x1e735f[_0x2eb79b(0xe0)],_0x2f9ce4[_0x2eb79b(0xe0)]],[_0x2eb79b(0x81),_0x1e735f[_0x2eb79b(0x81)],_0x2f9ce4[_0x2eb79b(0x81)]],[_0x2eb79b(0xb9),_0x1e735f['path'],_0x2f9ce4[_0x2eb79b(0xb9)]],['url',_0x1e735f['url'],_0x2f9ce4['url']],[_0x2eb79b(0xb0),_0x1e735f[_0x2eb79b(0xb0)],_0x2f9ce4['type']],[_0x2eb79b(0xb5),_0x1e735f['sort'],_0x2f9ce4[_0x2eb79b(0xb5)]],[_0x2eb79b(0xc3),_0x1e735f['resources'],_0x2f9ce4['resources']],['resourcesValid',_0x1e735f[_0x2eb79b(0xaa)],_0x2f9ce4[_0x2eb79b(0xaa)]],[_0x2eb79b(0xa3),_0x1e735f[_0x2eb79b(0xa3)],_0x2f9ce4[_0x2eb79b(0xa3)]],['childrenCount',_0x1e735f[_0x2eb79b(0xa5)],_0x2f9ce4[_0x2eb79b(0xa5)]],['pageId',_0x1e735f[_0x2eb79b(0x7f)],_0x2f9ce4[_0x2eb79b(0x7f)]],['pageType',_0x1e735f[_0x2eb79b(0xc4)],_0x2f9ce4['pageType']],[_0x2eb79b(0xdd),_0x1e735f[_0x2eb79b(0xdd)],_0x2f9ce4[_0x2eb79b(0xdd)]],[_0x2eb79b(0xc7),_0x1e735f[_0x2eb79b(0xc7)],_0x2f9ce4['datasetId']],[_0x2eb79b(0xbe),_0x1e735f['datasetCode'],_0x2f9ce4[_0x2eb79b(0xbe)]]];for(const [_0x38616a,_0x233bd3,_0x2cdb58]of _0x2c8871){assertVerified(sameValue(_0x233bd3,_0x2cdb58),'Menu\x20'+_0x2f9ce4['id']+'\x20'+_0x38616a+_0x2eb79b(0xc8));}}function sameValue(_0x47fe14,_0x1ac27b){const _0x14363b=a135_0x461eec;if(Array[_0x14363b(0xe2)](_0x47fe14)||Array[_0x14363b(0xe2)](_0x1ac27b))return JSON[_0x14363b(0xb2)](_0x47fe14)===JSON[_0x14363b(0xb2)](_0x1ac27b);return _0x47fe14===_0x1ac27b;}
1
+ 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 +1 @@
1
- const a136_0x2d04c6=a136_0x301d;function a136_0x301d(_0x2af32e,_0x207557){_0x2af32e=_0x2af32e-0xd4;const _0x291ec6=a136_0x291e();let _0x301d35=_0x291ec6[_0x2af32e];return _0x301d35;}(function(_0x14788a,_0x25f278){const _0xf48a2=a136_0x301d,_0x100377=_0x14788a();while(!![]){try{const _0x26b43e=-parseInt(_0xf48a2(0xed))/0x1+-parseInt(_0xf48a2(0xd6))/0x2*(parseInt(_0xf48a2(0xea))/0x3)+parseInt(_0xf48a2(0xd7))/0x4*(-parseInt(_0xf48a2(0xeb))/0x5)+-parseInt(_0xf48a2(0xdf))/0x6*(parseInt(_0xf48a2(0xdb))/0x7)+-parseInt(_0xf48a2(0xe7))/0x8+-parseInt(_0xf48a2(0xda))/0x9*(-parseInt(_0xf48a2(0xe1))/0xa)+parseInt(_0xf48a2(0xe4))/0xb*(parseInt(_0xf48a2(0xe0))/0xc);if(_0x26b43e===_0x25f278)break;else _0x100377['push'](_0x100377['shift']());}catch(_0x31629a){_0x100377['push'](_0x100377['shift']());}}}(a136_0x291e,0x4151f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a136_0x291e(){const _0x1bb211=['12mqnxqb','3110MttycM',';\x20do\x20not\x20resubmit.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','10047917WKgHag','endpointUrl','verified','133688KFfPQp','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Inspect\x20with\x20','11031fhsFVs','300305uEonCY',';\x20no\x20automatic\x20retry\x20was\x20attempted.','217040nTxrRr','appCode','config-create','mutation','Created\x20notification\x20config\x20','document','configName','notification_config_create_outcome_unknown','channelType','notification','36JwyWvq','4AVSLKr',';\x20do\x20not\x20resubmit\x20automatically.','create','549OOwVXr','2134083UdtOdd','POST','input','planned','6KpvRfS'];a136_0x291e=function(){return _0x1bb211;};return a136_0x291e();}import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0x1d7f1f){const _0x1afcb1=a136_0x301d,_0x1164f3=await readNotificationDocument(_0x1d7f1f,_0x1afcb1(0xd9)),_0x267bc9=createMutationInput(_0x1d7f1f[_0x1afcb1(0xee)],_0x1164f3);return{'document':_0x1164f3,'input':_0x267bc9,'planned':projectNotificationConfig({'appCode':_0x1d7f1f[_0x1afcb1(0xee)],'configName':_0x1164f3[_0x1afcb1(0xf3)],'channelType':_0x1164f3[_0x1afcb1(0xd4)],'endpointUrl':_0x1164f3[_0x1afcb1(0xe5)],'channelConfig':_0x1164f3['channelConfig'],'description':_0x1164f3['description'],'connectTimeout':_0x1164f3['connectTimeout']??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1164f3['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a136_0x2d04c6(0xd5),'command':a136_0x2d04c6(0xef),'description':'Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x2edefc){assertSingleNotificationSource(_0x2edefc);},async 'dryRun'(_0x19fc98){const _0x2dfe03=a136_0x2d04c6,_0x2545d2=await prepareCreate(_0x19fc98),_0x30c141=notificationLookupCommand(_0x19fc98['appCode'],_0x2545d2[_0x2dfe03(0xf2)][_0x2dfe03(0xd4)]);return asDryRunResult({'operation':_0x2dfe03(0xd9),'selector':{'appCode':_0x19fc98[_0x2dfe03(0xee)],'configName':_0x2545d2[_0x2dfe03(0xf2)][_0x2dfe03(0xf3)],'channelType':_0x2545d2[_0x2dfe03(0xf2)][_0x2dfe03(0xd4)]},'before':null,'after':_0x2545d2[_0x2dfe03(0xde)],'dryRun':!![],'backend':{'method':_0x2dfe03(0xdc),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2dfe03(0xde),'lookupCommand':_0x30c141}},{'method':_0x2dfe03(0xdc),'url':CREATE_PATH});},async 'execute'(_0x2156ad){const _0x2d77fa=a136_0x2d04c6,_0x260019=await prepareCreate(_0x2156ad),_0x3a5bd0=notificationLookupCommand(_0x2156ad[_0x2d77fa(0xee)],_0x260019[_0x2d77fa(0xf2)][_0x2d77fa(0xd4)]);let _0x1e7730;try{_0x1e7730=await createNotificationChannelConfig(_0x260019[_0x2d77fa(0xdd)]);}catch(_0x2b0a55){if(isPlatformTransportFailure(_0x2b0a55))throw notificationError(_0x2d77fa(0xf4),_0x2d77fa(0xe3),_0x2d77fa(0xe9)+_0x3a5bd0+_0x2d77fa(0xe2));throw safeApiFailure('create',_0x2d77fa(0xf0),'Inspect\x20with\x20'+_0x3a5bd0+_0x2d77fa(0xec));}if(!Number['isSafeInteger'](_0x1e7730)||_0x1e7730<=0x0)throw notificationError(_0x2d77fa(0xf4),_0x2d77fa(0xe8),_0x2d77fa(0xe9)+_0x3a5bd0+';\x20do\x20not\x20resubmit.');let _0x1c507b;try{const _0x2e4876=await getNotificationChannelConfig(_0x1e7730,_0x2156ad['appCode']);_0x1c507b=normalizeExactNotificationConfig(_0x2e4876,_0x1e7730,_0x2156ad[_0x2d77fa(0xee)]);}catch{throw safeApiFailure(_0x2d77fa(0xd9),'verification',_0x2d77fa(0xe9)+_0x3a5bd0+_0x2d77fa(0xd8));}return{'ok':!![],'data':{'operation':_0x2d77fa(0xd9),'selector':{'appCode':_0x1c507b[_0x2d77fa(0xee)],'id':_0x1c507b['id'],'configCode':_0x1c507b['configCode'],'configName':_0x1c507b[_0x2d77fa(0xf3)],'channelType':_0x1c507b['channelType']},'before':null,'after':projectNotificationConfig(_0x1c507b),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2d77fa(0xe6),'lookupCommand':_0x3a5bd0}},'message':_0x2d77fa(0xf1)+_0x1c507b['id']};}};
1
+ 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 +1 @@
1
- const a137_0x5c08dd=a137_0xdd87;(function(_0x5f5108,_0x55d722){const _0xb492d7=a137_0xdd87,_0x4ef900=_0x5f5108();while(!![]){try{const _0x2a5e30=-parseInt(_0xb492d7(0x83))/0x1*(-parseInt(_0xb492d7(0x84))/0x2)+-parseInt(_0xb492d7(0x80))/0x3*(parseInt(_0xb492d7(0x8a))/0x4)+parseInt(_0xb492d7(0x9a))/0x5*(-parseInt(_0xb492d7(0x8d))/0x6)+-parseInt(_0xb492d7(0x7f))/0x7+-parseInt(_0xb492d7(0x87))/0x8*(parseInt(_0xb492d7(0x93))/0x9)+parseInt(_0xb492d7(0x99))/0xa+parseInt(_0xb492d7(0x97))/0xb;if(_0x2a5e30===_0x55d722)break;else _0x4ef900['push'](_0x4ef900['shift']());}catch(_0x442479){_0x4ef900['push'](_0x4ef900['shift']());}}}(a137_0x4578,0xad61c));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a137_0xdd87(_0x5b0eef,_0x5c9f11){_0x5b0eef=_0x5b0eef-0x7c;const _0x4578bc=a137_0x4578();let _0xdd8743=_0x4578bc[_0x5b0eef];return _0xdd8743;}const DELETE_PATH=a137_0x5c08dd(0x8f),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';function a137_0x4578(){const _0x5c15fd=['\x20remains\x20present\x20after\x20delete.','appCode','27yPpDMW','notification_config_delete_verification_failed',';\x20do\x20not\x20resubmit\x20automatically.','channelType','23014211RbBwrd','delete','1498510QXgynr','5pakahq','verified','Notification\x20config\x20','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','unshift','POST','3893848fKjZYP','190083dBMgQh','Inspect\x20with\x20','some','1109npuGgg','1358rItwNo','high-risk-write','Deleted\x20notification\x20config\x20','860648tyJOVS','mutation',';\x20no\x20automatic\x20retry\x20was\x20attempted.','68egmugk','before','notification_config_delete_outcome_unknown','1972482BnMwLR','notification_config_delete_verification_unavailable','/notification/channel-config/delete','notification'];a137_0x4578=function(){return _0x5c15fd;};return a137_0x4578();}async function prepareDelete(_0x2ce6bc){const _0x2c6e05=a137_0x5c08dd,_0x129dc4=readNotificationId(_0x2ce6bc),_0xa772c7=await requireExactNotificationConfig(_0x2ce6bc[_0x2c6e05(0x92)],_0x129dc4,_0x2c6e05(0x98));return{'id':_0x129dc4,'before':_0xa772c7};}export const notificationConfigDelete={'service':a137_0x5c08dd(0x90),'command':'config-delete','description':a137_0x5c08dd(0x7c),'risk':a137_0x5c08dd(0x85),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0xed0021){readNotificationId(_0xed0021),requireNotificationExplicitYes(_0xed0021);},async 'dryRun'(_0x2d6a8d){const _0x2b904f=a137_0x5c08dd,_0x3c8564=await prepareDelete(_0x2d6a8d),_0x232c4e=notificationLookupCommand(_0x2d6a8d[_0x2b904f(0x92)],_0x3c8564[_0x2b904f(0x8b)]['channelType']);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x3c8564['before']),'before':projectNotificationConfig(_0x3c8564[_0x2b904f(0x8b)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x232c4e}},{'method':_0x2b904f(0x7e),'url':DELETE_PATH});},async 'execute'(_0x4e2737){const _0x2e1cc4=a137_0x5c08dd;requireNotificationExplicitYes(_0x4e2737);const _0x4a1e5b=await prepareDelete(_0x4e2737),_0x104265=notificationLookupCommand(_0x4e2737[_0x2e1cc4(0x92)],_0x4a1e5b[_0x2e1cc4(0x8b)][_0x2e1cc4(0x96)]);let _0x3857ab=![];try{await deleteNotificationChannelConfig(_0x4a1e5b['id'],_0x4e2737['appCode']);}catch(_0x35d89a){if(!isPlatformTransportFailure(_0x35d89a))throw safeApiFailure(_0x2e1cc4(0x98),_0x2e1cc4(0x88),_0x2e1cc4(0x81)+_0x104265+_0x2e1cc4(0x89));_0x3857ab=!![];}let _0x44a7be;try{_0x44a7be=await listNotificationChannelConfigs(_0x4e2737[_0x2e1cc4(0x92)],_0x4a1e5b[_0x2e1cc4(0x8b)]['channelType']),validateNotificationDeleteReadback(_0x44a7be,_0x4e2737[_0x2e1cc4(0x92)],_0x4a1e5b[_0x2e1cc4(0x8b)][_0x2e1cc4(0x96)]);}catch{throw notificationError(_0x3857ab?_0x2e1cc4(0x8c):_0x2e1cc4(0x8e),_0x2e1cc4(0x9c)+_0x4a1e5b['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x2e1cc4(0x81)+_0x104265+';\x20do\x20not\x20resubmit\x20automatically.');}if(_0x44a7be[_0x2e1cc4(0x82)](_0x1f34bc=>_0x1f34bc['id']===_0x4a1e5b['id']))throw notificationError(_0x3857ab?_0x2e1cc4(0x8c):_0x2e1cc4(0x94),'Notification\x20config\x20'+_0x4a1e5b['id']+_0x2e1cc4(0x91),'Inspect\x20with\x20'+_0x104265+_0x2e1cc4(0x95));const _0x40f54a=[REFERENCE_WARNING];return _0x3857ab&&_0x40f54a[_0x2e1cc4(0x7d)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x4a1e5b[_0x2e1cc4(0x8b)]),'before':projectNotificationConfig(_0x4a1e5b[_0x2e1cc4(0x8b)]),'after':null,'dryRun':![],'backend':{'method':_0x2e1cc4(0x7e),'path':DELETE_PATH},'warnings':_0x40f54a,'verification':{'status':_0x2e1cc4(0x9b),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x3857ab,'lookupCommand':_0x104265}},'message':_0x2e1cc4(0x86)+_0x4a1e5b['id']};}};
1
+ 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 +1 @@
1
- const a138_0x54cefe=a138_0x2f52;(function(_0x2c184b,_0x506e88){const _0x46d39=a138_0x2f52,_0x149374=_0x2c184b();while(!![]){try{const _0x175d23=-parseInt(_0x46d39(0x1a2))/0x1*(parseInt(_0x46d39(0x1a3))/0x2)+parseInt(_0x46d39(0x199))/0x3+parseInt(_0x46d39(0x198))/0x4+-parseInt(_0x46d39(0x1a6))/0x5*(-parseInt(_0x46d39(0x1a5))/0x6)+-parseInt(_0x46d39(0x19a))/0x7+parseInt(_0x46d39(0x1aa))/0x8*(parseInt(_0x46d39(0x1a4))/0x9)+-parseInt(_0x46d39(0x1a8))/0xa;if(_0x175d23===_0x506e88)break;else _0x149374['push'](_0x149374['shift']());}catch(_0x3356da){_0x149374['push'](_0x149374['shift']());}}}(a138_0x2a11,0x2de11));function a138_0x2a11(){const _0x2b47b2=['370488rDngEr','1005018TgNVGb','Notification\x20channel\x20type','notification','map','string','length','EMAIL','appCode','1TfnWPJ','692006PnPalX','1461933yuTsUg','98442yFMphR','65MvYyiy','type','2409020pDIiXr','Found\x20','16EycmQs','1026956WnvXYw'];a138_0x2a11=function(){return _0x2b47b2;};return a138_0x2a11();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';function a138_0x2f52(_0x597073,_0x1eda1c){_0x597073=_0x597073-0x198;const _0x2a1181=a138_0x2a11();let _0x2f52c7=_0x2a1181[_0x597073];return _0x2f52c7;}export const notificationConfigList={'service':a138_0x54cefe(0x19c),'command':'config-list','description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a138_0x54cefe(0x1a7),'type':a138_0x54cefe(0x19e),'description':a138_0x54cefe(0x19b),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a138_0x54cefe(0x1a0)}],async 'validate'(_0x2ed386){readNotificationChannelType(_0x2ed386);},async 'execute'(_0x396417){const _0x4444d7=a138_0x54cefe,_0x8e1295=readNotificationChannelType(_0x396417),_0x4a7429=await listNotificationChannelConfigs(_0x396417[_0x4444d7(0x1a1)],_0x8e1295),_0xfb7edd=_0x4a7429[_0x4444d7(0x19d)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x396417[_0x4444d7(0x1a1)],'channelType':_0x8e1295,'count':_0xfb7edd[_0x4444d7(0x19f)],'configs':_0xfb7edd},'message':_0x4444d7(0x1a9)+_0xfb7edd[_0x4444d7(0x19f)]+'\x20'+_0x8e1295+'\x20notification\x20config(s)'};}};
1
+ 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 +1 @@
1
- const a139_0x2fc38f=a139_0xc508;(function(_0x3ad950,_0x2c0aa9){const _0x2ffbff=a139_0xc508,_0x48e786=_0x3ad950();while(!![]){try{const _0x2a6e12=parseInt(_0x2ffbff(0x148))/0x1*(parseInt(_0x2ffbff(0x136))/0x2)+-parseInt(_0x2ffbff(0x12b))/0x3+parseInt(_0x2ffbff(0x127))/0x4*(-parseInt(_0x2ffbff(0x143))/0x5)+-parseInt(_0x2ffbff(0x132))/0x6*(parseInt(_0x2ffbff(0x138))/0x7)+-parseInt(_0x2ffbff(0x135))/0x8*(-parseInt(_0x2ffbff(0x144))/0x9)+parseInt(_0x2ffbff(0x149))/0xa+parseInt(_0x2ffbff(0x13d))/0xb;if(_0x2a6e12===_0x2c0aa9)break;else _0x48e786['push'](_0x48e786['shift']());}catch(_0x35e640){_0x48e786['push'](_0x48e786['shift']());}}}(a139_0x189b,0xc407a));function a139_0xc508(_0x3aa374,_0x4493a3){_0x3aa374=_0x3aa374-0x127;const _0x189b3b=a139_0x189b();let _0xc5081f=_0x189b3b[_0x3aa374];return _0xc5081f;}function a139_0x189b(){const _0xe9a955=['14400930qLSPgv','188zPvYBE','\x20with\x20','config-update','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','2172801KNTUPC','verified','Inspect\x20ID\x20','patch','channelType','\x20via\x20','update','62154jBQocx','mutation','POST','20248cwlbxF','226xvATzF','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','973pIfzQN','provesChange','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',';\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20with\x20--id\x20','25284985ZHnheK','before','/notification/channel-config/update','allMatch','Notification\x20config\x20','payload','125530GCyAzR','990yYMwqD','notification_config_update_outcome_unknown',';\x20no\x20automatic\x20retry\x20was\x20attempted.','appCode','1150CeHRaz'];a139_0x189b=function(){return _0xe9a955;};return a139_0x189b();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';import{assertSingleNotificationSource,mergeUpdateInput,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,NOTIFICATION_INPUT_FLAGS,plannedUpdateProjection,projectNotificationConfig,readNotificationDocument,readNotificationId,requestedSafeFieldsMatch,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure}from'../../commands/notification/shared.js';const UPDATE_PATH=a139_0x2fc38f(0x13f);async function prepareUpdate(_0x9ba265){const _0x2bcac5=a139_0x2fc38f,_0x24f800=readNotificationId(_0x9ba265),_0x5b6950=await readNotificationDocument(_0x9ba265,_0x2bcac5(0x131)),_0x35a4be=await requireExactNotificationConfig(_0x9ba265['appCode'],_0x24f800,_0x2bcac5(0x131));return{'id':_0x24f800,'patch':_0x5b6950,'before':_0x35a4be,'payload':mergeUpdateInput(_0x35a4be,_0x5b6950),'planned':plannedUpdateProjection(_0x35a4be,_0x5b6950)};}export const notificationConfigUpdate={'service':'notification','command':a139_0x2fc38f(0x129),'description':a139_0x2fc38f(0x12a),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4017d5){readNotificationId(_0x4017d5),assertSingleNotificationSource(_0x4017d5),requireNotificationExplicitYes(_0x4017d5);},async 'dryRun'(_0x1d1bc0){const _0x2c0440=a139_0x2fc38f,_0x56d509=await prepareUpdate(_0x1d1bc0),_0x44e5f=notificationLookupCommand(_0x1d1bc0[_0x2c0440(0x147)],_0x56d509[_0x2c0440(0x13e)][_0x2c0440(0x12f)]);return asDryRunResult({'operation':_0x2c0440(0x131),'selector':notificationSelector(_0x56d509[_0x2c0440(0x13e)]),'before':projectNotificationConfig(_0x56d509[_0x2c0440(0x13e)]),'after':_0x56d509['planned'],'dryRun':!![],'backend':{'method':_0x2c0440(0x134),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x44e5f}},{'method':_0x2c0440(0x134),'url':UPDATE_PATH});},async 'execute'(_0x1849bd){const _0x365d7a=a139_0x2fc38f;requireNotificationExplicitYes(_0x1849bd);const _0x25d2d8=await prepareUpdate(_0x1849bd),_0x57f357=notificationLookupCommand(_0x1849bd[_0x365d7a(0x147)],_0x25d2d8['before'][_0x365d7a(0x12f)]);let _0x52947b=![];try{await updateNotificationChannelConfig(_0x25d2d8[_0x365d7a(0x142)]);}catch(_0x2e73b1){if(!isPlatformTransportFailure(_0x2e73b1))throw safeApiFailure('update',_0x365d7a(0x133),_0x365d7a(0x12d)+_0x25d2d8['id']+_0x365d7a(0x128)+_0x57f357+_0x365d7a(0x146));_0x52947b=!![];}let _0x4e2561;try{const _0x1d96c3=await getNotificationChannelConfig(_0x25d2d8['id'],_0x1849bd[_0x365d7a(0x147)]);_0x4e2561=normalizeExactNotificationConfig(_0x1d96c3,_0x25d2d8['id'],_0x1849bd['appCode']);}catch{throw notificationError(_0x52947b?_0x365d7a(0x145):'notification_config_update_verification_unavailable',_0x365d7a(0x141)+_0x25d2d8['id']+_0x365d7a(0x137),'Inspect\x20with\x20--id\x20'+_0x25d2d8['id']+_0x365d7a(0x130)+_0x57f357+_0x365d7a(0x13b));}const _0x538c73=requestedSafeFieldsMatch(_0x25d2d8[_0x365d7a(0x13e)],_0x4e2561,_0x25d2d8[_0x365d7a(0x12e)]);if(!_0x538c73[_0x365d7a(0x140)]||_0x52947b&&!_0x538c73[_0x365d7a(0x139)])throw notificationError(_0x52947b?'notification_config_update_outcome_unknown':'notification_config_update_verification_failed',_0x365d7a(0x141)+_0x25d2d8['id']+_0x365d7a(0x13a),_0x365d7a(0x13c)+_0x25d2d8['id']+_0x365d7a(0x130)+_0x57f357+_0x365d7a(0x13b));const _0x9962a7=_0x52947b?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':'update','selector':notificationSelector(_0x4e2561),'before':projectNotificationConfig(_0x25d2d8['before']),'after':projectNotificationConfig(_0x4e2561),'dryRun':![],'backend':{'method':_0x365d7a(0x134),'path':UPDATE_PATH},'warnings':_0x9962a7,'verification':{'status':_0x365d7a(0x12c),'recoveredAfterUnknownResponse':_0x52947b,'verifiedFields':_0x538c73['verifiedFields'],'lookupCommand':_0x57f357}},'message':'Updated\x20notification\x20config\x20'+_0x4e2561['id']};}};
1
+ 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 +1 @@
1
- (function(_0xb832ee,_0x4cd220){const _0x42179c=a140_0x33b3,_0x5db454=_0xb832ee();while(!![]){try{const _0x2c71d0=parseInt(_0x42179c(0x1da))/0x1*(parseInt(_0x42179c(0x1d9))/0x2)+parseInt(_0x42179c(0x1dc))/0x3+-parseInt(_0x42179c(0x1de))/0x4*(parseInt(_0x42179c(0x1df))/0x5)+-parseInt(_0x42179c(0x1db))/0x6*(parseInt(_0x42179c(0x1d6))/0x7)+parseInt(_0x42179c(0x1d8))/0x8*(parseInt(_0x42179c(0x1d7))/0x9)+-parseInt(_0x42179c(0x1d5))/0xa*(-parseInt(_0x42179c(0x1d4))/0xb)+-parseInt(_0x42179c(0x1dd))/0xc;if(_0x2c71d0===_0x4cd220)break;else _0x5db454['push'](_0x5db454['shift']());}catch(_0x520aad){_0x5db454['push'](_0x5db454['shift']());}}}(a140_0x589b,0x794c3));function a140_0x33b3(_0xb61b80,_0x21181d){_0xb61b80=_0xb61b80-0x1d4;const _0x589b7e=a140_0x589b();let _0x33b384=_0x589b7e[_0xb61b80];return _0x33b384;}import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';function a140_0x589b(){const _0x44ce68=['1233501WkETRG','5753880HFsptR','33844CHiqKE','555PdmMSJ','1989922hHcayX','30MTpQva','5145252XeUmeM','3926511TtGxrT','16elQkpD','2kJUoep','824101jWnyat','6mvhmbE'];a140_0x589b=function(){return _0x44ce68;};return a140_0x589b();}import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
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 +1 @@
1
- const a141_0x3f52d5=a141_0x4fa3;(function(_0x486db6,_0x56f907){const _0x3f733e=a141_0x4fa3,_0x5a0106=_0x486db6();while(!![]){try{const _0x210e77=-parseInt(_0x3f733e(0x229))/0x1+parseInt(_0x3f733e(0x24e))/0x2+parseInt(_0x3f733e(0x216))/0x3*(parseInt(_0x3f733e(0x22b))/0x4)+parseInt(_0x3f733e(0x25b))/0x5+-parseInt(_0x3f733e(0x254))/0x6+parseInt(_0x3f733e(0x24f))/0x7*(-parseInt(_0x3f733e(0x25e))/0x8)+parseInt(_0x3f733e(0x1f6))/0x9;if(_0x210e77===_0x56f907)break;else _0x5a0106['push'](_0x5a0106['shift']());}catch(_0x5ea669){_0x5a0106['push'](_0x5a0106['shift']());}}}(a141_0x145e,0x1d036));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a141_0x3f52d5(0x257),a141_0x3f52d5(0x20c),'WECOM',a141_0x3f52d5(0x202)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a141_0x3f52d5(0x1ee),a141_0x3f52d5(0x20d),a141_0x3f52d5(0x239),a141_0x3f52d5(0x25d),'description',a141_0x3f52d5(0x248),a141_0x3f52d5(0x219)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a141_0x3f52d5(0x251),a141_0x3f52d5(0x25c)]),EMAIL_RECIPIENT_FIELDS=new Set(['emailTargets','recipients',a141_0x3f52d5(0x203),a141_0x3f52d5(0x201),a141_0x3f52d5(0x237),a141_0x3f52d5(0x22c),a141_0x3f52d5(0x255),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a141_0x3f52d5(0x259),'type':a141_0x3f52d5(0x245),'required':![],'description':a141_0x3f52d5(0x21a)},{'name':'stdin','type':a141_0x3f52d5(0x218),'required':![],'default':![],'description':a141_0x3f52d5(0x1e4)},{'name':a141_0x3f52d5(0x22a),'type':a141_0x3f52d5(0x245),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a141_0x3f52d5(0x209),'required':!![],'description':a141_0x3f52d5(0x223)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a141_0x145e(){const _0x42b3a6=['dry-run','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','672897MhuMvA','\x20has\x20an\x20invalid\x20channelType.','boolean','readTimeout','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','every','Notification\x20config\x20','yes','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20has\x20invalid\x20field\x20\x22','\x20failed.','mutation','includes','Application-level\x20notification\x20config\x20ID','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','prototype','notification_config_channel_field_forbidden','hasOwnProperty','178982iWGvbk','from-env','4tQlYsE','subjectPrefix','bool','keys','\x22\x20cannot\x20exceed\x20','\x20must\x20be\x20an\x20object.','Notification\x20JSON\x20from\x20','a\x20JSON\x20object\x20or\x20null','utf8','isArray','\x22channelType\x22.','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','replyTo','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','endpointUrl','\x22\x20is\x20forbidden.','notification_config_confirmation_required','file\x20','appCode','Item\x20','endpointUrlRaw','isSafeInteger','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','endpointUrl:null','validation','preflight','string','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','notification_config_json_invalid','connectTimeout','messageTemplate','notification_config_id_invalid','notification_config_update_empty','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','_unavailable','356498hliAXT','14ktjguZ','channelConfigRaw','configCode','some','Notification\x20JSON\x20source\x20is\x20ambiguous.','1187988TuGMbA','fromName','a\x20JSON\x20object','FEISHU','num','file','\x20is\x20missing\x20required\x20field\x20\x22','822990kXmECI','channelCode','channelConfig','798032sfGhXr','Unknown\x20notification\x20JSON\x20field\x20\x22','\x20characters.','create','a\x20non-empty\x20string','Notification\x20config\x20list\x20item\x20','notification_config_field_forbidden','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','notification_config_field_invalid','\x22configName\x22.','str','entries','EMAIL','push','env','failed','description','configName','notification_config_response_invalid','a\x20supported\x20string','Notification\x20JSON\x20field\x20\x22','stdin','notification_config_','kind','path','1153620qEOpuL','Create\x20JSON\x20requires\x20field\x20','\x22\x20must\x20be\x20','a\x20string\x20or\x20null','\x20--type\x20','setEncoding','name','trim','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','updateTime','bccList','WEBHOOK','ccList','update','environment\x20variable\x20','\x20has\x20an\x20unsupported\x20channelType.','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','number','Allowed\x20values:\x20','notification_config_source_unavailable','DINGTALK','channelType','parse','\x22\x20must\x20be\x20a\x20non-empty\x20string.','createTime','length','has','join'];a141_0x145e=function(){return _0x42b3a6;};return a141_0x145e();}function a141_0x4fa3(_0x4a3794,_0x4c2a28){_0x4a3794=_0x4a3794-0x1e0;const _0x145eca=a141_0x145e();let _0x4fa35c=_0x145eca[_0x4a3794];return _0x4fa35c;}export function notificationError(_0x593951,_0x2bb944,_0x4871ac){return new CliError(_0x593951,0x1,_0x2bb944,_0x4871ac);}export function readNotificationId(_0x3d4f79){const _0x56b908=a141_0x3f52d5,_0x4a3149=_0x3d4f79[_0x56b908(0x258)]('id');if(!Number[_0x56b908(0x240)](_0x4a3149)||_0x4a3149<=0x0)throw notificationError(_0x56b908(0x24a),_0x56b908(0x241));return _0x4a3149;}export function requireNotificationExplicitYes(_0x2bdc7c){const _0x1a4866=a141_0x3f52d5;if(_0x2bdc7c[_0x1a4866(0x22d)](_0x1a4866(0x214))||_0x2bdc7c[_0x1a4866(0x22d)](_0x1a4866(0x21d)))return;throw notificationError(_0x1a4866(0x23b),_0x1a4866(0x24c),_0x1a4866(0x215));}export function readNotificationChannelType(_0x5a7a72,_0x4f2718='type',_0xd7467a=a141_0x3f52d5(0x1e9)){const _0x12e9d7=a141_0x3f52d5,_0x556172=_0x5a7a72['str'](_0x4f2718)[_0x12e9d7(0x1fd)]()||_0xd7467a;if(!NOTIFICATION_CHANNEL_TYPES[_0x12e9d7(0x222)](_0x556172))throw CliErrors[_0x12e9d7(0x243)]('Invalid\x20--'+_0x4f2718+':\x20'+_0x556172,_0x12e9d7(0x20a)+NOTIFICATION_CHANNEL_TYPES[_0x12e9d7(0x213)](',\x20')+'.');return _0x556172;}export function assertSingleNotificationSource(_0x3f372d){const _0x7536f=a141_0x3f52d5,_0x22251f=[],_0x43307b=_0x3f372d[_0x7536f(0x1e7)]('file')[_0x7536f(0x1fd)]();if(_0x43307b)_0x22251f[_0x7536f(0x1ea)]({'kind':'file','path':_0x43307b});if(_0x3f372d[_0x7536f(0x22d)](_0x7536f(0x1f2)))_0x22251f[_0x7536f(0x1ea)]({'kind':_0x7536f(0x1f2)});const _0xd3392f=_0x3f372d[_0x7536f(0x1e7)]('from-env')[_0x7536f(0x1fd)]();if(_0xd3392f)_0x22251f[_0x7536f(0x1ea)]({'kind':'env','name':_0xd3392f});if(_0x22251f['length']===0x0)throw CliErrors[_0x7536f(0x243)]('Missing\x20notification\x20JSON\x20source.',_0x7536f(0x1fe));if(_0x22251f[_0x7536f(0x211)]>0x1)throw CliErrors[_0x7536f(0x243)](_0x7536f(0x253),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');return _0x22251f[0x0];}export async function readNotificationDocument(_0x398a49,_0x513968){const _0x581e3e=a141_0x3f52d5,_0x3de9e1=assertSingleNotificationSource(_0x398a49),_0x5c69a4=_0x3de9e1['kind']===_0x581e3e(0x259)?_0x581e3e(0x23c)+_0x3de9e1[_0x581e3e(0x1f5)]:_0x3de9e1[_0x581e3e(0x1f4)]==='env'?_0x581e3e(0x205)+_0x3de9e1['name']:_0x581e3e(0x1f2);let _0x3abd94;try{if(_0x3de9e1[_0x581e3e(0x1f4)]===_0x581e3e(0x259))_0x3abd94=await readFile(_0x3de9e1[_0x581e3e(0x1f5)],_0x581e3e(0x233));else{if(_0x3de9e1[_0x581e3e(0x1f4)]===_0x581e3e(0x1eb)){if(!(_0x3de9e1[_0x581e3e(0x1fc)]in process.env))throw notificationError('notification_config_source_unavailable',_0x581e3e(0x238)+_0x3de9e1[_0x581e3e(0x1fc)]);_0x3abd94=process.env[_0x3de9e1.name]??'';}else _0x3abd94=await readStdin();}}catch(_0x56a276){if(_0x56a276 instanceof CliError)throw _0x56a276;throw notificationError(_0x581e3e(0x20b),_0x581e3e(0x21e)+_0x5c69a4+'.');}let _0xff9282;try{_0xff9282=JSON[_0x581e3e(0x20e)](_0x3abd94);}catch{throw notificationError(_0x581e3e(0x247),_0x581e3e(0x231)+_0x5c69a4+'\x20is\x20invalid.',_0x581e3e(0x246));}if(!isJsonObject(_0xff9282))throw notificationError(_0x581e3e(0x247),_0x581e3e(0x231)+_0x5c69a4+_0x581e3e(0x230));return validateNotificationDocument(_0xff9282,_0x513968);}export function projectNotificationListConfig(_0x598670,_0xf0903a){const _0x4f930c=a141_0x3f52d5;return{'id':typeof _0x598670['id']===_0x4f930c(0x209)?_0x598670['id']:null,'configCode':requireResponseString(_0x598670[_0x4f930c(0x251)],_0x4f930c(0x251),_0xf0903a),'configName':requireResponseString(_0x598670[_0x4f930c(0x1ee)],'configName',_0xf0903a),'channelType':requireResponseString(_0x598670[_0x4f930c(0x20d)],'channelType',_0xf0903a),'description':normalizeNullableString(_0x598670['description']),'createTime':normalizeNullableString(_0x598670[_0x4f930c(0x210)]),'updateTime':normalizeNullableString(_0x598670[_0x4f930c(0x200)])};}export function normalizeExactNotificationConfig(_0x25c707,_0x488434,_0x3acaaa){const _0x22e577=a141_0x3f52d5;if(!Number[_0x22e577(0x240)](_0x25c707['id'])||_0x25c707['id']!==_0x488434)throw notificationError(_0x22e577(0x1ef),_0x22e577(0x225)+_0x488434+'.');if(_0x25c707['appCode']!==_0x3acaaa)throw notificationError(_0x22e577(0x1ef),_0x22e577(0x21c)+_0x488434+_0x22e577(0x208));const _0x34558c=requireExactString(_0x25c707['configName'],_0x22e577(0x1ee),_0x488434),_0x5e89ae=requireExactString(_0x25c707[_0x22e577(0x251)],_0x22e577(0x251),_0x488434),_0xf20f1e=requireExactString(_0x25c707[_0x22e577(0x20d)],_0x22e577(0x20d),_0x488434);if(!NOTIFICATION_CHANNEL_TYPES[_0x22e577(0x222)](_0xf20f1e))throw notificationError(_0x22e577(0x1ef),_0x22e577(0x21c)+_0x488434+_0x22e577(0x206));const _0x49c75b=responseNullableString(_0x25c707['endpointUrl'],_0x22e577(0x239),_0x488434),_0x4928f1=responseNullableString(_0x25c707[_0x22e577(0x25d)],_0x22e577(0x25d),_0x488434),_0x296e18=responseNullableString(_0x25c707[_0x22e577(0x1ed)],'description',_0x488434),_0x25de23=responseNullableTimeout(_0x25c707['connectTimeout'],_0x22e577(0x248),_0x488434),_0x431d50=responseNullableTimeout(_0x25c707[_0x22e577(0x219)],'readTimeout',_0x488434);return{'id':_0x488434,'appCode':_0x3acaaa,'configCode':_0x5e89ae,'configName':_0x34558c,'channelType':_0xf20f1e,'endpointUrl':redactSensitive(_0x49c75b),'channelConfig':redactSensitive(_0x4928f1),'description':_0x296e18,'connectTimeout':_0x25de23,'readTimeout':_0x431d50,'endpointUrlRaw':_0x49c75b,'channelConfigRaw':_0x4928f1};}export async function requireExactNotificationConfig(_0x234e16,_0xf590ce,_0x39e2b8){const _0x51be16=a141_0x3f52d5;let _0x18cb24;try{_0x18cb24=await getNotificationChannelConfig(_0xf590ce,_0x234e16);}catch{throw safeApiFailure(_0x39e2b8,_0x51be16(0x244),_0x51be16(0x236)+_0x234e16+_0x51be16(0x207));}return normalizeExactNotificationConfig(_0x18cb24,_0xf590ce,_0x234e16);}export function projectNotificationConfig(_0xff3e2){const _0x353de4=a141_0x3f52d5;return{'id':_0xff3e2['id']??null,'appCode':_0xff3e2[_0x353de4(0x23d)],'configCode':_0xff3e2[_0x353de4(0x251)]??null,'configName':_0xff3e2[_0x353de4(0x1ee)],'channelType':_0xff3e2[_0x353de4(0x20d)],'endpointUrl':redactSensitive(_0xff3e2['endpointUrl']),'channelConfig':redactSensitive(_0xff3e2[_0x353de4(0x25d)]),'description':_0xff3e2['description']??null,'connectTimeout':_0xff3e2['connectTimeout']??null,'readTimeout':_0xff3e2[_0x353de4(0x219)]??null};}export function notificationSelector(_0x4b7c41){const _0x3cff3f=a141_0x3f52d5;return{'appCode':_0x4b7c41[_0x3cff3f(0x23d)],'id':_0x4b7c41['id'],'configCode':_0x4b7c41['configCode'],'configName':_0x4b7c41[_0x3cff3f(0x1ee)],'channelType':_0x4b7c41[_0x3cff3f(0x20d)]};}export function createMutationInput(_0x222b93,_0x29c69f){const _0xe35129=a141_0x3f52d5;return{'appCode':_0x222b93,'configName':_0x29c69f[_0xe35129(0x1ee)],'channelType':_0x29c69f[_0xe35129(0x20d)],...hasOwn(_0x29c69f,_0xe35129(0x239))?{'endpointUrl':_0x29c69f['endpointUrl']}:{},...hasOwn(_0x29c69f,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x29c69f[_0xe35129(0x25d)])}:{},...hasOwn(_0x29c69f,_0xe35129(0x1ed))?{'description':_0x29c69f[_0xe35129(0x1ed)]}:{},...hasOwn(_0x29c69f,_0xe35129(0x248))?{'connectTimeout':_0x29c69f[_0xe35129(0x248)]}:{},...hasOwn(_0x29c69f,_0xe35129(0x219))?{'readTimeout':_0x29c69f[_0xe35129(0x219)]}:{}};}export function mergeUpdateInput(_0x48fab2,_0x44a4be){const _0x1826bd=a141_0x3f52d5;return{'id':_0x48fab2['id'],'appCode':_0x48fab2[_0x1826bd(0x23d)],'configName':_0x44a4be[_0x1826bd(0x1ee)]??_0x48fab2['configName'],'channelType':_0x44a4be['channelType']??_0x48fab2[_0x1826bd(0x20d)],'endpointUrl':hasOwn(_0x44a4be,'endpointUrl')?_0x44a4be[_0x1826bd(0x239)]:_0x48fab2[_0x1826bd(0x23f)],'channelConfig':hasOwn(_0x44a4be,_0x1826bd(0x25d))?serializeChannelConfig(_0x44a4be[_0x1826bd(0x25d)]):_0x48fab2[_0x1826bd(0x250)],'description':hasOwn(_0x44a4be,_0x1826bd(0x1ed))?_0x44a4be[_0x1826bd(0x1ed)]:_0x48fab2['description'],'connectTimeout':hasOwn(_0x44a4be,'connectTimeout')?_0x44a4be[_0x1826bd(0x248)]:_0x48fab2[_0x1826bd(0x248)],'readTimeout':hasOwn(_0x44a4be,_0x1826bd(0x219))?_0x44a4be['readTimeout']:_0x48fab2['readTimeout']};}export function plannedUpdateProjection(_0x16793a,_0x2ed580){const _0x5f1e96=a141_0x3f52d5;return projectNotificationConfig({'id':_0x16793a['id'],'appCode':_0x16793a['appCode'],'configCode':_0x16793a[_0x5f1e96(0x251)],'configName':_0x2ed580[_0x5f1e96(0x1ee)]??_0x16793a[_0x5f1e96(0x1ee)],'channelType':_0x2ed580['channelType']??_0x16793a[_0x5f1e96(0x20d)],'endpointUrl':hasOwn(_0x2ed580,_0x5f1e96(0x239))?_0x2ed580[_0x5f1e96(0x239)]:_0x16793a[_0x5f1e96(0x23f)],'channelConfig':hasOwn(_0x2ed580,_0x5f1e96(0x25d))?_0x2ed580[_0x5f1e96(0x25d)]:_0x16793a[_0x5f1e96(0x250)],'description':hasOwn(_0x2ed580,_0x5f1e96(0x1ed))?_0x2ed580[_0x5f1e96(0x1ed)]:_0x16793a[_0x5f1e96(0x1ed)],'connectTimeout':hasOwn(_0x2ed580,_0x5f1e96(0x248))?_0x2ed580[_0x5f1e96(0x248)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x16793a[_0x5f1e96(0x248)],'readTimeout':hasOwn(_0x2ed580,_0x5f1e96(0x219))?_0x2ed580['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x16793a[_0x5f1e96(0x219)]});}export function requestedSafeFieldsMatch(_0x227c5d,_0x4e7296,_0x2973db){const _0x52f0ce=a141_0x3f52d5,_0x3d8593=[],_0x44787c=[],_0x322b88=[];for(const _0x4ad0ec of[_0x52f0ce(0x1ee),'channelType',_0x52f0ce(0x1ed)]){if(!hasOwn(_0x2973db,_0x4ad0ec))continue;_0x322b88['push'](_0x4ad0ec),_0x3d8593[_0x52f0ce(0x1ea)](_0x4e7296[_0x4ad0ec]===_0x2973db[_0x4ad0ec]),_0x44787c[_0x52f0ce(0x1ea)](_0x227c5d[_0x4ad0ec]!==_0x2973db[_0x4ad0ec]&&_0x4e7296[_0x4ad0ec]===_0x2973db[_0x4ad0ec]);}for(const _0x415807 of[_0x52f0ce(0x248),'readTimeout']){if(!hasOwn(_0x2973db,_0x415807))continue;const _0x28e346=_0x2973db[_0x415807]??(_0x415807==='connectTimeout'?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x322b88[_0x52f0ce(0x1ea)](_0x415807),_0x3d8593[_0x52f0ce(0x1ea)](_0x4e7296[_0x415807]===_0x28e346),_0x44787c[_0x52f0ce(0x1ea)](_0x227c5d[_0x415807]!==_0x28e346&&_0x4e7296[_0x415807]===_0x28e346);}return hasOwn(_0x2973db,_0x52f0ce(0x239))&&_0x2973db[_0x52f0ce(0x239)]===null&&(_0x322b88[_0x52f0ce(0x1ea)](_0x52f0ce(0x242)),_0x3d8593['push'](_0x4e7296[_0x52f0ce(0x23f)]===null||_0x4e7296[_0x52f0ce(0x23f)]===''),_0x44787c['push'](_0x227c5d[_0x52f0ce(0x23f)]!==null&&_0x227c5d[_0x52f0ce(0x23f)]!==''&&(_0x4e7296[_0x52f0ce(0x23f)]===null||_0x4e7296['endpointUrlRaw']===''))),{'allMatch':_0x3d8593[_0x52f0ce(0x21b)](Boolean),'provesChange':_0x44787c[_0x52f0ce(0x252)](Boolean),'verifiedFields':_0x322b88};}export function validateNotificationDeleteReadback(_0x36071d,_0x59ce20,_0x313533){const _0x257a0f=a141_0x3f52d5;for(const [_0x434969,_0x3b8465]of _0x36071d[_0x257a0f(0x1e8)]()){if(!Number['isSafeInteger'](_0x3b8465['id'])||_0x3b8465['id']<=0x0)throw notificationError(_0x257a0f(0x1ef),_0x257a0f(0x1e2)+(_0x434969+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x3b8465['appCode']!==_0x59ce20)throw notificationError(_0x257a0f(0x1ef),_0x257a0f(0x1e2)+(_0x434969+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x3b8465[_0x257a0f(0x20d)]!==_0x313533)throw notificationError('notification_config_response_invalid',_0x257a0f(0x1e2)+(_0x434969+0x1)+_0x257a0f(0x217));}}export function safeApiFailure(_0x1994f3,_0x3d0414,_0x2fdd62){const _0x1a59bb=a141_0x3f52d5;return notificationError(_0x1a59bb(0x1f3)+_0x1994f3+'_'+(_0x3d0414===_0x1a59bb(0x221)?_0x1a59bb(0x1ec):_0x3d0414+_0x1a59bb(0x24d)),_0x1a59bb(0x21c)+_0x1994f3+'\x20'+_0x3d0414+_0x1a59bb(0x220),_0x2fdd62);}export function notificationLookupCommand(_0x189fa6,_0x40458a){const _0x316318=a141_0x3f52d5;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x189fa6+_0x316318(0x1fa)+_0x40458a+'\x20--format\x20compress';}function validateNotificationDocument(_0x6fcc0f,_0x10d663){const _0x93e8ad=a141_0x3f52d5;for(const _0x323054 of Object[_0x93e8ad(0x22e)](_0x6fcc0f)){if(FORBIDDEN_IDENTITY_FIELDS[_0x93e8ad(0x212)](_0x323054))throw notificationError(_0x93e8ad(0x1e3),_0x93e8ad(0x1f1)+_0x323054+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x93e8ad(0x212)](_0x323054))throw notificationError('notification_config_field_unknown',_0x93e8ad(0x25f)+_0x323054+'\x22.');}if(_0x10d663===_0x93e8ad(0x204)&&Object[_0x93e8ad(0x22e)](_0x6fcc0f)[_0x93e8ad(0x211)]===0x0)throw notificationError(_0x93e8ad(0x24b),_0x93e8ad(0x224));const _0x3d2bb6={};if(hasOwn(_0x6fcc0f,_0x93e8ad(0x1ee)))_0x3d2bb6[_0x93e8ad(0x1ee)]=validateRequiredString(_0x6fcc0f[_0x93e8ad(0x1ee)],_0x93e8ad(0x1ee),0x80);else{if(_0x10d663===_0x93e8ad(0x1e0))throw notificationError('notification_config_field_required',_0x93e8ad(0x1f7)+_0x93e8ad(0x1e6));}if(hasOwn(_0x6fcc0f,'channelType')){if(typeof _0x6fcc0f[_0x93e8ad(0x20d)]!=='string')throw invalidFieldType(_0x93e8ad(0x20d),_0x93e8ad(0x1f0));const _0x2b4ce5=_0x6fcc0f[_0x93e8ad(0x20d)][_0x93e8ad(0x1fd)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2b4ce5))throw notificationError(_0x93e8ad(0x1e5),_0x93e8ad(0x1ff),'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x3d2bb6[_0x93e8ad(0x20d)]=_0x2b4ce5;}else{if(_0x10d663===_0x93e8ad(0x1e0))throw notificationError('notification_config_field_required',_0x93e8ad(0x1f7)+_0x93e8ad(0x235));}for(const [_0x1d0b6b,_0x396087]of[[_0x93e8ad(0x239),0x200],[_0x93e8ad(0x1ed),0x100]]){if(!hasOwn(_0x6fcc0f,_0x1d0b6b))continue;const _0x1d0f4d=_0x6fcc0f[_0x1d0b6b];if(_0x1d0f4d!==null&&typeof _0x1d0f4d!==_0x93e8ad(0x245))throw invalidFieldType(_0x1d0b6b,_0x93e8ad(0x1f9));if(typeof _0x1d0f4d===_0x93e8ad(0x245)&&_0x1d0f4d[_0x93e8ad(0x211)]>_0x396087)throw notificationError(_0x93e8ad(0x1e5),_0x93e8ad(0x1f1)+_0x1d0b6b+_0x93e8ad(0x22f)+_0x396087+'\x20characters.');_0x3d2bb6[_0x1d0b6b]=_0x1d0f4d;}if(hasOwn(_0x6fcc0f,'channelConfig')){const _0x4ded85=_0x6fcc0f[_0x93e8ad(0x25d)];if(_0x4ded85===null&&_0x10d663==='create')throw invalidFieldType('channelConfig','a\x20JSON\x20object');if(_0x4ded85!==null&&!isJsonObject(_0x4ded85))throw invalidFieldType(_0x93e8ad(0x25d),_0x10d663==='update'?_0x93e8ad(0x232):_0x93e8ad(0x256));_0x4ded85!==null&&validateChannelConfigFields(_0x3d2bb6[_0x93e8ad(0x20d)],_0x4ded85),_0x3d2bb6[_0x93e8ad(0x25d)]=_0x4ded85;}for(const _0x4edadc of[_0x93e8ad(0x248),_0x93e8ad(0x219)]){if(!hasOwn(_0x6fcc0f,_0x4edadc))continue;const _0x35f6ee=_0x6fcc0f[_0x4edadc];if(_0x35f6ee!==null&&(!Number[_0x93e8ad(0x240)](_0x35f6ee)||_0x35f6ee<0x0))throw notificationError(_0x93e8ad(0x1e5),_0x93e8ad(0x1f1)+_0x4edadc+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x3d2bb6[_0x4edadc]=_0x35f6ee;}return _0x3d2bb6;}function validateRequiredString(_0x173855,_0x55799b,_0x42c798){const _0x190c89=a141_0x3f52d5;if(typeof _0x173855!==_0x190c89(0x245))throw invalidFieldType(_0x55799b,_0x190c89(0x1e1));const _0xa96bd2=_0x173855[_0x190c89(0x1fd)]();if(!_0xa96bd2)throw notificationError(_0x190c89(0x1e5),_0x190c89(0x1f1)+_0x55799b+_0x190c89(0x20f));if(_0xa96bd2[_0x190c89(0x211)]>_0x42c798)throw notificationError(_0x190c89(0x1e5),'Notification\x20JSON\x20field\x20\x22'+_0x55799b+_0x190c89(0x22f)+_0x42c798+_0x190c89(0x260));return _0xa96bd2;}function validateChannelConfigFields(_0x489f04,_0x4ab034){const _0x900f97=a141_0x3f52d5;if(hasOwn(_0x4ab034,_0x900f97(0x249)))throw forbiddenChannelConfigField(_0x900f97(0x249));if(_0x489f04===_0x900f97(0x1e9))for(const _0x2f1879 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x4ab034,_0x2f1879))throw forbiddenChannelConfigField(_0x2f1879);}}function forbiddenChannelConfigField(_0x1a34ab){const _0x10a731=a141_0x3f52d5;return notificationError(_0x10a731(0x227),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x1a34ab+_0x10a731(0x23a));}function invalidFieldType(_0x4e6144,_0x1de7d6){const _0x249295=a141_0x3f52d5;return notificationError('notification_config_field_invalid',_0x249295(0x1f1)+_0x4e6144+_0x249295(0x1f8)+_0x1de7d6+'.');}function serializeChannelConfig(_0x12cb63){return _0x12cb63===null||_0x12cb63===undefined?null:JSON['stringify'](_0x12cb63);}function redactSensitive(_0x1408ff){return _0x1408ff===null||_0x1408ff===undefined||_0x1408ff===''?null:'<redacted>';}function requireResponseString(_0x182da4,_0x11a49f,_0x1a7381){const _0x4a62af=a141_0x3f52d5;if(typeof _0x182da4!==_0x4a62af(0x245)||_0x182da4[_0x4a62af(0x1fd)]()==='')throw CliErrors['apiError']('Invalid\x20notification\x20config\x20response.',_0x4a62af(0x23e)+(_0x1a7381+0x1)+_0x4a62af(0x25a)+_0x11a49f+'\x22.');return _0x182da4[_0x4a62af(0x1fd)]();}function requireExactString(_0x334535,_0x165b79,_0x5e2fca){const _0x4dff6a=a141_0x3f52d5;if(typeof _0x334535!==_0x4dff6a(0x245)||_0x334535['trim']()==='')throw notificationError(_0x4dff6a(0x1ef),'Notification\x20config\x20'+_0x5e2fca+_0x4dff6a(0x25a)+_0x165b79+'\x22.');return _0x334535[_0x4dff6a(0x1fd)]();}function responseNullableString(_0x498bf5,_0x1f2218,_0x382ec2){const _0x59ec6b=a141_0x3f52d5;if(_0x498bf5===undefined||_0x498bf5===null)return null;if(typeof _0x498bf5!==_0x59ec6b(0x245))throw notificationError(_0x59ec6b(0x1ef),_0x59ec6b(0x21c)+_0x382ec2+_0x59ec6b(0x21f)+_0x1f2218+'\x22.');return _0x498bf5;}function responseNullableTimeout(_0x1ae429,_0x16f0fa,_0x444b46){const _0xfb7ce4=a141_0x3f52d5;if(_0x1ae429===undefined||_0x1ae429===null)return null;if(!Number[_0xfb7ce4(0x240)](_0x1ae429)||_0x1ae429<0x0)throw notificationError(_0xfb7ce4(0x1ef),_0xfb7ce4(0x21c)+_0x444b46+_0xfb7ce4(0x21f)+_0x16f0fa+'\x22.');return _0x1ae429;}function normalizeNullableString(_0x43a44b){return typeof _0x43a44b==='string'?_0x43a44b:null;}function isJsonObject(_0x6beec5){const _0x2d2da8=a141_0x3f52d5;return _0x6beec5!==null&&typeof _0x6beec5==='object'&&!Array[_0x2d2da8(0x234)](_0x6beec5);}function hasOwn(_0x1a00b1,_0x2d8078){const _0x415c57=a141_0x3f52d5;return Object[_0x415c57(0x226)][_0x415c57(0x228)]['call'](_0x1a00b1,_0x2d8078);}async function readStdin(){const _0x2b52f6=a141_0x3f52d5;let _0x562dc4='';process[_0x2b52f6(0x1f2)][_0x2b52f6(0x1fb)]('utf8');for await(const _0x373d45 of process['stdin'])_0x562dc4+=_0x373d45;return _0x562dc4;}
1
+ const a141_0x2ba8fa=a141_0x1afe;function a141_0x3b4d(){const _0x1e7198=['channelConfig','channelType','from-env','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','FEISHU','length','stringify','30NkqaMR','appCode','validation','\x20--type\x20','notification_config_field_forbidden','Notification\x20config\x20','has','\x20must\x20be\x20an\x20object.','320892EovgpW','\x22\x20cannot\x20exceed\x20','connectTimeout','a\x20supported\x20string','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','Invalid\x20--','readTimeout','notification_config_field_unknown','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','description','\x20failed.','notification_config_channel_field_forbidden','Create\x20JSON\x20requires\x20field\x20','endpointUrl:null','name','notification_config_confirmation_required','Item\x20','channelConfigRaw','kind','Notification\x20config\x20list\x20item\x20','create','\x22\x20must\x20be\x20a\x20non-empty\x20string.','stdin','object','3LIBxVj','includes','21241179qMCuig','configCode','environment\x20variable\x20','num','notification_config_source_unavailable','\x20has\x20an\x20invalid\x20channelType.','DINGTALK','_unavailable','update','bccList','replyTo','notification_config_field_invalid','file','yes','\x20--format\x20compress','10suFDvT','Application-level\x20notification\x20config\x20ID','EMAIL','setEncoding','\x20has\x20invalid\x20field\x20\x22','configName','channelCode','3043932YQXUQH','134085qGwNvi','\x20characters.','prototype','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','boolean','a\x20string\x20or\x20null','\x20has\x20an\x20invalid\x20id.','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','emailTargets','a\x20non-empty\x20string','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','notification_config_field_required','isArray','notification_config_response_invalid','dry-run','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','a\x20JSON\x20object\x20or\x20null','Notification\x20JSON\x20from\x20','type','call','4218448kgxIfo','isSafeInteger','notification_config_update_empty','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','updateTime','string','\x20is\x20invalid.','Notification\x20JSON\x20field\x20\x22','str','\x22channelType\x22.','messageTemplate','endpointUrl','\x20has\x20an\x20unsupported\x20channelType.','854553XPbFEq','endpointUrlRaw','trim','push','keys','path','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','Missing\x20notification\x20JSON\x20source.','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','a\x20JSON\x20object','WECOM','\x20is\x20missing\x20required\x20field\x20\x22','env','number','subjectPrefix','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','notification_config_','Allowed\x20values:\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','bool','\x22\x20is\x20forbidden.','file\x20','Invalid\x20notification\x20config\x20response.','join','utf8','Notification\x20JSON\x20source\x20is\x20ambiguous.','1371574kGeVsD'];a141_0x3b4d=function(){return _0x1e7198;};return a141_0x3b4d();}(function(_0x54632c,_0x2a37a7){const _0x5300c8=a141_0x1afe,_0x29e8c0=_0x54632c();while(!![]){try{const _0x5c7c0f=-parseInt(_0x5300c8(0x1cd))/0x1+-parseInt(_0x5300c8(0x1bd))/0x2*(parseInt(_0x5300c8(0x1e6))/0x3)+-parseInt(_0x5300c8(0x181))/0x4+parseInt(_0x5300c8(0x182))/0x5+parseInt(_0x5300c8(0x1c5))/0x6*(-parseInt(_0x5300c8(0x1a3))/0x7)+parseInt(_0x5300c8(0x196))/0x8+-parseInt(_0x5300c8(0x16b))/0x9*(-parseInt(_0x5300c8(0x17a))/0xa);if(_0x5c7c0f===_0x2a37a7)break;else _0x29e8c0['push'](_0x29e8c0['shift']());}catch(_0x2c99fd){_0x29e8c0['push'](_0x29e8c0['shift']());}}}(a141_0x3b4d,0x82e85));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL',a141_0x2ba8fa(0x1c2),a141_0x2ba8fa(0x171),a141_0x2ba8fa(0x1ad),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName',a141_0x2ba8fa(0x1bf),a141_0x2ba8fa(0x1a1),a141_0x2ba8fa(0x1be),'description',a141_0x2ba8fa(0x1cf),'readTimeout']),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a141_0x2ba8fa(0x1c6),a141_0x2ba8fa(0x16c),a141_0x2ba8fa(0x180)]),EMAIL_RECIPIENT_FIELDS=new Set([a141_0x2ba8fa(0x18a),'recipients','ccList',a141_0x2ba8fa(0x174),a141_0x2ba8fa(0x175),a141_0x2ba8fa(0x1b1),'fromName','to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a141_0x2ba8fa(0x177),'type':a141_0x2ba8fa(0x19b),'required':![],'description':a141_0x2ba8fa(0x199)},{'name':'stdin','type':a141_0x2ba8fa(0x186),'required':![],'default':![],'description':a141_0x2ba8fa(0x1d1)},{'name':a141_0x2ba8fa(0x1c0),'type':'string','required':![],'description':a141_0x2ba8fa(0x1c1)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a141_0x2ba8fa(0x1b0),'required':!![],'description':a141_0x2ba8fa(0x17b)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x47352c,_0x1ef489,_0x31d73d){return new CliError(_0x47352c,0x1,_0x1ef489,_0x31d73d);}export function readNotificationId(_0x4f0b4b){const _0x3811f9=a141_0x2ba8fa,_0x343f35=_0x4f0b4b[_0x3811f9(0x16e)]('id');if(!Number[_0x3811f9(0x197)](_0x343f35)||_0x343f35<=0x0)throw notificationError('notification_config_id_invalid',_0x3811f9(0x1b2));return _0x343f35;}export function requireNotificationExplicitYes(_0x1dd20d){const _0x1c57b6=a141_0x2ba8fa;if(_0x1dd20d[_0x1c57b6(0x1b6)](_0x1c57b6(0x190))||_0x1dd20d[_0x1c57b6(0x1b6)](_0x1c57b6(0x178)))return;throw notificationError(_0x1c57b6(0x1dd),_0x1c57b6(0x1ab),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x47ad9c,_0x13915d=a141_0x2ba8fa(0x194),_0x57eb46=a141_0x2ba8fa(0x17c)){const _0x2907d9=a141_0x2ba8fa,_0x403f0e=_0x47ad9c['str'](_0x13915d)[_0x2907d9(0x1a5)]()||_0x57eb46;if(!NOTIFICATION_CHANNEL_TYPES[_0x2907d9(0x16a)](_0x403f0e))throw CliErrors['validation'](_0x2907d9(0x1d2)+_0x13915d+':\x20'+_0x403f0e,_0x2907d9(0x1b4)+NOTIFICATION_CHANNEL_TYPES[_0x2907d9(0x1ba)](',\x20')+'.');return _0x403f0e;}export function assertSingleNotificationSource(_0x25efb0){const _0x4f90ff=a141_0x2ba8fa,_0xc00181=[],_0x5214d1=_0x25efb0[_0x4f90ff(0x19e)](_0x4f90ff(0x177))[_0x4f90ff(0x1a5)]();if(_0x5214d1)_0xc00181[_0x4f90ff(0x1a6)]({'kind':'file','path':_0x5214d1});if(_0x25efb0[_0x4f90ff(0x1b6)]('stdin'))_0xc00181[_0x4f90ff(0x1a6)]({'kind':_0x4f90ff(0x1e4)});const _0x3dafe9=_0x25efb0[_0x4f90ff(0x19e)]('from-env')[_0x4f90ff(0x1a5)]();if(_0x3dafe9)_0xc00181['push']({'kind':'env','name':_0x3dafe9});if(_0xc00181['length']===0x0)throw CliErrors['validation'](_0x4f90ff(0x1aa),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0xc00181[_0x4f90ff(0x1c3)]>0x1)throw CliErrors[_0x4f90ff(0x1c7)](_0x4f90ff(0x1bc),_0x4f90ff(0x1b5));return _0xc00181[0x0];}export async function readNotificationDocument(_0x1c0933,_0x26767e){const _0x1ed630=a141_0x2ba8fa,_0x57a423=assertSingleNotificationSource(_0x1c0933),_0x397ef7=_0x57a423[_0x1ed630(0x1e0)]===_0x1ed630(0x177)?_0x1ed630(0x1b8)+_0x57a423[_0x1ed630(0x1a8)]:_0x57a423[_0x1ed630(0x1e0)]===_0x1ed630(0x1af)?_0x1ed630(0x16d)+_0x57a423[_0x1ed630(0x1dc)]:'stdin';let _0x5a5d06;try{if(_0x57a423[_0x1ed630(0x1e0)]===_0x1ed630(0x177))_0x5a5d06=await readFile(_0x57a423[_0x1ed630(0x1a8)],_0x1ed630(0x1bb));else{if(_0x57a423['kind']===_0x1ed630(0x1af)){if(!(_0x57a423['name']in process.env))throw notificationError(_0x1ed630(0x16f),_0x1ed630(0x1a9)+_0x57a423['name']);_0x5a5d06=process.env[_0x57a423.name]??'';}else _0x5a5d06=await readStdin();}}catch(_0x57943c){if(_0x57943c instanceof CliError)throw _0x57943c;throw notificationError(_0x1ed630(0x16f),_0x1ed630(0x1d6)+_0x397ef7+'.');}let _0x1241fa;try{_0x1241fa=JSON['parse'](_0x5a5d06);}catch{throw notificationError('notification_config_json_invalid',_0x1ed630(0x193)+_0x397ef7+_0x1ed630(0x19c),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x1241fa))throw notificationError('notification_config_json_invalid','Notification\x20JSON\x20from\x20'+_0x397ef7+_0x1ed630(0x1cc));return validateNotificationDocument(_0x1241fa,_0x26767e);}export function projectNotificationListConfig(_0x5d15db,_0x55e484){const _0x356dfd=a141_0x2ba8fa;return{'id':typeof _0x5d15db['id']===_0x356dfd(0x1b0)?_0x5d15db['id']:null,'configCode':requireResponseString(_0x5d15db[_0x356dfd(0x16c)],'configCode',_0x55e484),'configName':requireResponseString(_0x5d15db[_0x356dfd(0x17f)],_0x356dfd(0x17f),_0x55e484),'channelType':requireResponseString(_0x5d15db[_0x356dfd(0x1bf)],'channelType',_0x55e484),'description':normalizeNullableString(_0x5d15db[_0x356dfd(0x1d7)]),'createTime':normalizeNullableString(_0x5d15db['createTime']),'updateTime':normalizeNullableString(_0x5d15db[_0x356dfd(0x19a)])};}export function normalizeExactNotificationConfig(_0x310178,_0x2858c5,_0x346a2f){const _0x478554=a141_0x2ba8fa;if(!Number[_0x478554(0x197)](_0x310178['id'])||_0x310178['id']!==_0x2858c5)throw notificationError('notification_config_response_invalid','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x2858c5+'.');if(_0x310178[_0x478554(0x1c6)]!==_0x346a2f)throw notificationError(_0x478554(0x18f),_0x478554(0x1ca)+_0x2858c5+_0x478554(0x18c));const _0x175c9c=requireExactString(_0x310178[_0x478554(0x17f)],_0x478554(0x17f),_0x2858c5),_0x41c265=requireExactString(_0x310178[_0x478554(0x16c)],_0x478554(0x16c),_0x2858c5),_0x4b4439=requireExactString(_0x310178[_0x478554(0x1bf)],_0x478554(0x1bf),_0x2858c5);if(!NOTIFICATION_CHANNEL_TYPES[_0x478554(0x16a)](_0x4b4439))throw notificationError(_0x478554(0x18f),_0x478554(0x1ca)+_0x2858c5+_0x478554(0x1a2));const _0x58850b=responseNullableString(_0x310178[_0x478554(0x1a1)],_0x478554(0x1a1),_0x2858c5),_0x17ab3c=responseNullableString(_0x310178['channelConfig'],_0x478554(0x1be),_0x2858c5),_0x5654a=responseNullableString(_0x310178[_0x478554(0x1d7)],_0x478554(0x1d7),_0x2858c5),_0x1723ee=responseNullableTimeout(_0x310178[_0x478554(0x1cf)],_0x478554(0x1cf),_0x2858c5),_0x435ac3=responseNullableTimeout(_0x310178['readTimeout'],_0x478554(0x1d3),_0x2858c5);return{'id':_0x2858c5,'appCode':_0x346a2f,'configCode':_0x41c265,'configName':_0x175c9c,'channelType':_0x4b4439,'endpointUrl':redactSensitive(_0x58850b),'channelConfig':redactSensitive(_0x17ab3c),'description':_0x5654a,'connectTimeout':_0x1723ee,'readTimeout':_0x435ac3,'endpointUrlRaw':_0x58850b,'channelConfigRaw':_0x17ab3c};}export async function requireExactNotificationConfig(_0x1619af,_0x46e2bb,_0x29bf8a){const _0x8946eb=a141_0x2ba8fa;let _0x5b33f8;try{_0x5b33f8=await getNotificationChannelConfig(_0x46e2bb,_0x1619af);}catch{throw safeApiFailure(_0x29bf8a,'preflight',_0x8946eb(0x189)+_0x1619af+_0x8946eb(0x185));}return normalizeExactNotificationConfig(_0x5b33f8,_0x46e2bb,_0x1619af);}export function projectNotificationConfig(_0x24e77c){const _0xa01e7a=a141_0x2ba8fa;return{'id':_0x24e77c['id']??null,'appCode':_0x24e77c['appCode'],'configCode':_0x24e77c[_0xa01e7a(0x16c)]??null,'configName':_0x24e77c[_0xa01e7a(0x17f)],'channelType':_0x24e77c[_0xa01e7a(0x1bf)],'endpointUrl':redactSensitive(_0x24e77c[_0xa01e7a(0x1a1)]),'channelConfig':redactSensitive(_0x24e77c[_0xa01e7a(0x1be)]),'description':_0x24e77c[_0xa01e7a(0x1d7)]??null,'connectTimeout':_0x24e77c[_0xa01e7a(0x1cf)]??null,'readTimeout':_0x24e77c[_0xa01e7a(0x1d3)]??null};}export function notificationSelector(_0x3e07c8){const _0x57484f=a141_0x2ba8fa;return{'appCode':_0x3e07c8[_0x57484f(0x1c6)],'id':_0x3e07c8['id'],'configCode':_0x3e07c8[_0x57484f(0x16c)],'configName':_0x3e07c8[_0x57484f(0x17f)],'channelType':_0x3e07c8[_0x57484f(0x1bf)]};}export function createMutationInput(_0x3e3618,_0x247457){const _0x53e901=a141_0x2ba8fa;return{'appCode':_0x3e3618,'configName':_0x247457['configName'],'channelType':_0x247457['channelType'],...hasOwn(_0x247457,_0x53e901(0x1a1))?{'endpointUrl':_0x247457['endpointUrl']}:{},...hasOwn(_0x247457,_0x53e901(0x1be))?{'channelConfig':serializeChannelConfig(_0x247457['channelConfig'])}:{},...hasOwn(_0x247457,_0x53e901(0x1d7))?{'description':_0x247457[_0x53e901(0x1d7)]}:{},...hasOwn(_0x247457,_0x53e901(0x1cf))?{'connectTimeout':_0x247457[_0x53e901(0x1cf)]}:{},...hasOwn(_0x247457,'readTimeout')?{'readTimeout':_0x247457['readTimeout']}:{}};}export function mergeUpdateInput(_0x39cebf,_0x51f103){const _0x4eb777=a141_0x2ba8fa;return{'id':_0x39cebf['id'],'appCode':_0x39cebf[_0x4eb777(0x1c6)],'configName':_0x51f103[_0x4eb777(0x17f)]??_0x39cebf[_0x4eb777(0x17f)],'channelType':_0x51f103[_0x4eb777(0x1bf)]??_0x39cebf['channelType'],'endpointUrl':hasOwn(_0x51f103,_0x4eb777(0x1a1))?_0x51f103[_0x4eb777(0x1a1)]:_0x39cebf['endpointUrlRaw'],'channelConfig':hasOwn(_0x51f103,_0x4eb777(0x1be))?serializeChannelConfig(_0x51f103[_0x4eb777(0x1be)]):_0x39cebf[_0x4eb777(0x1df)],'description':hasOwn(_0x51f103,_0x4eb777(0x1d7))?_0x51f103[_0x4eb777(0x1d7)]:_0x39cebf['description'],'connectTimeout':hasOwn(_0x51f103,_0x4eb777(0x1cf))?_0x51f103[_0x4eb777(0x1cf)]:_0x39cebf[_0x4eb777(0x1cf)],'readTimeout':hasOwn(_0x51f103,_0x4eb777(0x1d3))?_0x51f103[_0x4eb777(0x1d3)]:_0x39cebf[_0x4eb777(0x1d3)]};}function a141_0x1afe(_0x406cdf,_0x101123){_0x406cdf=_0x406cdf-0x16a;const _0x3b4d9a=a141_0x3b4d();let _0x1afef2=_0x3b4d9a[_0x406cdf];return _0x1afef2;}export function plannedUpdateProjection(_0xf30271,_0xd4879a){const _0x3b60e8=a141_0x2ba8fa;return projectNotificationConfig({'id':_0xf30271['id'],'appCode':_0xf30271['appCode'],'configCode':_0xf30271['configCode'],'configName':_0xd4879a[_0x3b60e8(0x17f)]??_0xf30271[_0x3b60e8(0x17f)],'channelType':_0xd4879a[_0x3b60e8(0x1bf)]??_0xf30271['channelType'],'endpointUrl':hasOwn(_0xd4879a,_0x3b60e8(0x1a1))?_0xd4879a[_0x3b60e8(0x1a1)]:_0xf30271['endpointUrlRaw'],'channelConfig':hasOwn(_0xd4879a,_0x3b60e8(0x1be))?_0xd4879a['channelConfig']:_0xf30271['channelConfigRaw'],'description':hasOwn(_0xd4879a,_0x3b60e8(0x1d7))?_0xd4879a['description']:_0xf30271[_0x3b60e8(0x1d7)],'connectTimeout':hasOwn(_0xd4879a,_0x3b60e8(0x1cf))?_0xd4879a[_0x3b60e8(0x1cf)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0xf30271['connectTimeout'],'readTimeout':hasOwn(_0xd4879a,_0x3b60e8(0x1d3))?_0xd4879a[_0x3b60e8(0x1d3)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0xf30271[_0x3b60e8(0x1d3)]});}export function requestedSafeFieldsMatch(_0x52e3e9,_0xe96045,_0xf1d603){const _0x480b3e=a141_0x2ba8fa,_0x326301=[],_0x208d67=[],_0x1328a0=[];for(const _0x3d18c4 of[_0x480b3e(0x17f),_0x480b3e(0x1bf),_0x480b3e(0x1d7)]){if(!hasOwn(_0xf1d603,_0x3d18c4))continue;_0x1328a0[_0x480b3e(0x1a6)](_0x3d18c4),_0x326301[_0x480b3e(0x1a6)](_0xe96045[_0x3d18c4]===_0xf1d603[_0x3d18c4]),_0x208d67[_0x480b3e(0x1a6)](_0x52e3e9[_0x3d18c4]!==_0xf1d603[_0x3d18c4]&&_0xe96045[_0x3d18c4]===_0xf1d603[_0x3d18c4]);}for(const _0x181901 of[_0x480b3e(0x1cf),_0x480b3e(0x1d3)]){if(!hasOwn(_0xf1d603,_0x181901))continue;const _0x460330=_0xf1d603[_0x181901]??(_0x181901===_0x480b3e(0x1cf)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x1328a0[_0x480b3e(0x1a6)](_0x181901),_0x326301[_0x480b3e(0x1a6)](_0xe96045[_0x181901]===_0x460330),_0x208d67[_0x480b3e(0x1a6)](_0x52e3e9[_0x181901]!==_0x460330&&_0xe96045[_0x181901]===_0x460330);}return hasOwn(_0xf1d603,_0x480b3e(0x1a1))&&_0xf1d603[_0x480b3e(0x1a1)]===null&&(_0x1328a0[_0x480b3e(0x1a6)](_0x480b3e(0x1db)),_0x326301[_0x480b3e(0x1a6)](_0xe96045[_0x480b3e(0x1a4)]===null||_0xe96045['endpointUrlRaw']===''),_0x208d67[_0x480b3e(0x1a6)](_0x52e3e9[_0x480b3e(0x1a4)]!==null&&_0x52e3e9[_0x480b3e(0x1a4)]!==''&&(_0xe96045[_0x480b3e(0x1a4)]===null||_0xe96045['endpointUrlRaw']===''))),{'allMatch':_0x326301['every'](Boolean),'provesChange':_0x208d67['some'](Boolean),'verifiedFields':_0x1328a0};}export function validateNotificationDeleteReadback(_0x268d19,_0x1060f4,_0x7a1fac){const _0x2d7c02=a141_0x2ba8fa;for(const [_0x4560ec,_0x29732a]of _0x268d19['entries']()){if(!Number[_0x2d7c02(0x197)](_0x29732a['id'])||_0x29732a['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x4560ec+0x1)+_0x2d7c02(0x188));if(_0x29732a['appCode']!==_0x1060f4)throw notificationError(_0x2d7c02(0x18f),_0x2d7c02(0x1e1)+(_0x4560ec+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x29732a['channelType']!==_0x7a1fac)throw notificationError(_0x2d7c02(0x18f),_0x2d7c02(0x1e1)+(_0x4560ec+0x1)+_0x2d7c02(0x170));}}export function safeApiFailure(_0x132e41,_0x2f006f,_0x1ae5a5){const _0x952028=a141_0x2ba8fa;return notificationError(_0x952028(0x1b3)+_0x132e41+'_'+(_0x2f006f==='mutation'?'failed':_0x2f006f+_0x952028(0x172)),_0x952028(0x1ca)+_0x132e41+'\x20'+_0x2f006f+_0x952028(0x1d8),_0x1ae5a5);}export function notificationLookupCommand(_0x1c9bd5,_0x1b78f9){const _0x39e6aa=a141_0x2ba8fa;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x1c9bd5+_0x39e6aa(0x1c8)+_0x1b78f9+_0x39e6aa(0x179);}function validateNotificationDocument(_0xb490b7,_0x492df1){const _0x3260ab=a141_0x2ba8fa;for(const _0x57b697 of Object[_0x3260ab(0x1a7)](_0xb490b7)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x57b697))throw notificationError(_0x3260ab(0x1c9),_0x3260ab(0x19d)+_0x57b697+_0x3260ab(0x1d5));if(!ALLOWED_INPUT_FIELDS[_0x3260ab(0x1cb)](_0x57b697))throw notificationError(_0x3260ab(0x1d4),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x57b697+'\x22.');}if(_0x492df1===_0x3260ab(0x173)&&Object['keys'](_0xb490b7)[_0x3260ab(0x1c3)]===0x0)throw notificationError(_0x3260ab(0x198),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x279888={};if(hasOwn(_0xb490b7,'configName'))_0x279888['configName']=validateRequiredString(_0xb490b7[_0x3260ab(0x17f)],'configName',0x80);else{if(_0x492df1==='create')throw notificationError(_0x3260ab(0x18d),_0x3260ab(0x1da)+'\x22configName\x22.');}if(hasOwn(_0xb490b7,_0x3260ab(0x1bf))){if(typeof _0xb490b7['channelType']!==_0x3260ab(0x19b))throw invalidFieldType(_0x3260ab(0x1bf),_0x3260ab(0x1d0));const _0x7e8b08=_0xb490b7['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x3260ab(0x16a)](_0x7e8b08))throw notificationError(_0x3260ab(0x176),_0x3260ab(0x191),_0x3260ab(0x1b4)+NOTIFICATION_CHANNEL_TYPES[_0x3260ab(0x1ba)](',\x20')+'.');_0x279888[_0x3260ab(0x1bf)]=_0x7e8b08;}else{if(_0x492df1===_0x3260ab(0x1e2))throw notificationError('notification_config_field_required',_0x3260ab(0x1da)+_0x3260ab(0x19f));}for(const [_0x17e678,_0x31d774]of[[_0x3260ab(0x1a1),0x200],['description',0x100]]){if(!hasOwn(_0xb490b7,_0x17e678))continue;const _0x586160=_0xb490b7[_0x17e678];if(_0x586160!==null&&typeof _0x586160!==_0x3260ab(0x19b))throw invalidFieldType(_0x17e678,_0x3260ab(0x187));if(typeof _0x586160===_0x3260ab(0x19b)&&_0x586160['length']>_0x31d774)throw notificationError(_0x3260ab(0x176),_0x3260ab(0x19d)+_0x17e678+_0x3260ab(0x1ce)+_0x31d774+'\x20characters.');_0x279888[_0x17e678]=_0x586160;}if(hasOwn(_0xb490b7,_0x3260ab(0x1be))){const _0x116d86=_0xb490b7['channelConfig'];if(_0x116d86===null&&_0x492df1==='create')throw invalidFieldType(_0x3260ab(0x1be),'a\x20JSON\x20object');if(_0x116d86!==null&&!isJsonObject(_0x116d86))throw invalidFieldType(_0x3260ab(0x1be),_0x492df1==='update'?_0x3260ab(0x192):_0x3260ab(0x1ac));_0x116d86!==null&&validateChannelConfigFields(_0x279888[_0x3260ab(0x1bf)],_0x116d86),_0x279888[_0x3260ab(0x1be)]=_0x116d86;}for(const _0x199444 of[_0x3260ab(0x1cf),'readTimeout']){if(!hasOwn(_0xb490b7,_0x199444))continue;const _0x3598e9=_0xb490b7[_0x199444];if(_0x3598e9!==null&&(!Number['isSafeInteger'](_0x3598e9)||_0x3598e9<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x199444+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x279888[_0x199444]=_0x3598e9;}return _0x279888;}function validateRequiredString(_0x22356c,_0x5330e1,_0x2ce61e){const _0x49d4c4=a141_0x2ba8fa;if(typeof _0x22356c!==_0x49d4c4(0x19b))throw invalidFieldType(_0x5330e1,_0x49d4c4(0x18b));const _0x15e57d=_0x22356c[_0x49d4c4(0x1a5)]();if(!_0x15e57d)throw notificationError(_0x49d4c4(0x176),_0x49d4c4(0x19d)+_0x5330e1+_0x49d4c4(0x1e3));if(_0x15e57d['length']>_0x2ce61e)throw notificationError(_0x49d4c4(0x176),'Notification\x20JSON\x20field\x20\x22'+_0x5330e1+'\x22\x20cannot\x20exceed\x20'+_0x2ce61e+_0x49d4c4(0x183));return _0x15e57d;}function validateChannelConfigFields(_0x1cd30b,_0x53b8ad){const _0x1ba455=a141_0x2ba8fa;if(hasOwn(_0x53b8ad,'messageTemplate'))throw forbiddenChannelConfigField(_0x1ba455(0x1a0));if(_0x1cd30b==='EMAIL')for(const _0x573d03 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x53b8ad,_0x573d03))throw forbiddenChannelConfigField(_0x573d03);}}function forbiddenChannelConfigField(_0x3a0481){const _0x34b3e3=a141_0x2ba8fa;return notificationError(_0x34b3e3(0x1d9),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x3a0481+_0x34b3e3(0x1b7));}function invalidFieldType(_0x2d1ed5,_0x2411cb){const _0x5572ec=a141_0x2ba8fa;return notificationError(_0x5572ec(0x176),_0x5572ec(0x19d)+_0x2d1ed5+'\x22\x20must\x20be\x20'+_0x2411cb+'.');}function serializeChannelConfig(_0x53e99b){const _0x45258d=a141_0x2ba8fa;return _0x53e99b===null||_0x53e99b===undefined?null:JSON[_0x45258d(0x1c4)](_0x53e99b);}function redactSensitive(_0x1bbb9b){return _0x1bbb9b===null||_0x1bbb9b===undefined||_0x1bbb9b===''?null:'<redacted>';}function requireResponseString(_0xd7cd4f,_0x4ab71b,_0xed0e5f){const _0x273e07=a141_0x2ba8fa;if(typeof _0xd7cd4f!==_0x273e07(0x19b)||_0xd7cd4f[_0x273e07(0x1a5)]()==='')throw CliErrors['apiError'](_0x273e07(0x1b9),_0x273e07(0x1de)+(_0xed0e5f+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x4ab71b+'\x22.');return _0xd7cd4f[_0x273e07(0x1a5)]();}function requireExactString(_0x64cfbd,_0x2d8ecf,_0x10b341){const _0x23e193=a141_0x2ba8fa;if(typeof _0x64cfbd!==_0x23e193(0x19b)||_0x64cfbd[_0x23e193(0x1a5)]()==='')throw notificationError(_0x23e193(0x18f),_0x23e193(0x1ca)+_0x10b341+_0x23e193(0x1ae)+_0x2d8ecf+'\x22.');return _0x64cfbd[_0x23e193(0x1a5)]();}function responseNullableString(_0x2ebd90,_0x57e56e,_0x44b37a){const _0x97ebda=a141_0x2ba8fa;if(_0x2ebd90===undefined||_0x2ebd90===null)return null;if(typeof _0x2ebd90!==_0x97ebda(0x19b))throw notificationError('notification_config_response_invalid',_0x97ebda(0x1ca)+_0x44b37a+_0x97ebda(0x17e)+_0x57e56e+'\x22.');return _0x2ebd90;}function responseNullableTimeout(_0x48eefc,_0x2338ef,_0x2da2b6){const _0x33b001=a141_0x2ba8fa;if(_0x48eefc===undefined||_0x48eefc===null)return null;if(!Number[_0x33b001(0x197)](_0x48eefc)||_0x48eefc<0x0)throw notificationError(_0x33b001(0x18f),'Notification\x20config\x20'+_0x2da2b6+_0x33b001(0x17e)+_0x2338ef+'\x22.');return _0x48eefc;}function normalizeNullableString(_0x1b9266){return typeof _0x1b9266==='string'?_0x1b9266:null;}function isJsonObject(_0x11ecde){const _0x5d6d92=a141_0x2ba8fa;return _0x11ecde!==null&&typeof _0x11ecde===_0x5d6d92(0x1e5)&&!Array[_0x5d6d92(0x18e)](_0x11ecde);}function hasOwn(_0x2e4437,_0x3a2a9b){const _0x1aa305=a141_0x2ba8fa;return Object[_0x1aa305(0x184)]['hasOwnProperty'][_0x1aa305(0x195)](_0x2e4437,_0x3a2a9b);}async function readStdin(){const _0x2bcc26=a141_0x2ba8fa;let _0x18a4c1='';process[_0x2bcc26(0x1e4)][_0x2bcc26(0x17d)]('utf8');for await(const _0xec658c of process[_0x2bcc26(0x1e4)])_0x18a4c1+=_0xec658c;return _0x18a4c1;}
@@ -1 +1 @@
1
- const a142_0x1fb84c=a142_0x5b25;(function(_0x5ead76,_0x5dc2a9){const _0x1355d1=a142_0x5b25,_0x22401d=_0x5ead76();while(!![]){try{const _0x46da92=parseInt(_0x1355d1(0x1f9))/0x1+parseInt(_0x1355d1(0x205))/0x2+-parseInt(_0x1355d1(0x1ec))/0x3*(parseInt(_0x1355d1(0x1e7))/0x4)+parseInt(_0x1355d1(0x1e4))/0x5+-parseInt(_0x1355d1(0x1ea))/0x6+-parseInt(_0x1355d1(0x1f7))/0x7+-parseInt(_0x1355d1(0x1fa))/0x8;if(_0x46da92===_0x5dc2a9)break;else _0x22401d['push'](_0x22401d['shift']());}catch(_0x58736e){_0x22401d['push'](_0x22401d['shift']());}}}(a142_0x4375,0xb9496));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=['invoice','general','form',a142_0x1fb84c(0x1f5)],SCENE_TO_LEGACY_TYPE={'invoice':a142_0x1fb84c(0x1e9),'general':'General','form':a142_0x1fb84c(0x1e6),'idCard':'IdCard'},SCENE_FLAG={'name':a142_0x1fb84c(0x1e8),'type':a142_0x1fb84c(0x204),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a142_0x1fb84c(0x1fd)},IMAGE_FILE_FLAG={'name':a142_0x1fb84c(0x1db),'type':a142_0x1fb84c(0x204),'description':a142_0x1fb84c(0x1ed)},IMAGE_URL_FLAG={'name':a142_0x1fb84c(0x1ff),'type':a142_0x1fb84c(0x204),'description':a142_0x1fb84c(0x1f3)};function normalizeScene(_0x1e5c23){const _0x2cceb4=a142_0x1fb84c,_0x1cee33=_0x1e5c23['trim']()['toLowerCase']();if(_0x1cee33===_0x2cceb4(0x1e0))return _0x2cceb4(0x1f5);if(_0x1cee33===_0x2cceb4(0x1eb)||_0x1cee33==='general'||_0x1cee33===_0x2cceb4(0x1e3))return _0x1cee33;throw CliErrors['validation'](_0x2cceb4(0x1f0)+_0x1e5c23+_0x2cceb4(0x1f2)+SUPPORTED_SCENES[_0x2cceb4(0x1d7)](',\x20'));}function selectedInputs(_0x154f5e){const _0x3497e6=a142_0x1fb84c,_0x24147f=_0x154f5e[_0x3497e6(0x1dc)](_0x3497e6(0x1db))[_0x3497e6(0x1fb)](),_0x1e8be9=_0x154f5e[_0x3497e6(0x1dc)](_0x3497e6(0x1ff))[_0x3497e6(0x1fb)]();return{'imageFile':_0x24147f,'imageUrl':_0x1e8be9,'count':[_0x24147f,_0x1e8be9]['filter'](Boolean)['length']};}function a142_0x4375(){const _0x5eccef=['\x20OCR\x20from\x20URL','imageFile','Unsupported\x20OCR\x20scene:\x20','appCode','.\x20Supported\x20scenes:\x20','Publicly\x20accessible\x20image\x20or\x20file\x20URL','Preview:\x20recognize\x20','idCard','path','6377476DCadNU','File\x20URL\x20response\x20missing\x20fileUrl.','468850UWswgF','13312jIHRzR','trim','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','POST','image-url','\x20OCR','imageUrl','GET','fileUrl','string','2898372ZerkhC','join','filePath','recognize','/smartapi/common/uploadFile','image-file','str','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','read','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','idcard','toString','File\x20upload\x20response\x20missing\x20filePath.','form','7111205bONgTn','apiError','Table','4qMQQcd','scene','Invoice','2037228wJXrqM','invoice','3987219EZzpvY','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'];a142_0x4375=function(){return _0x5eccef;};return a142_0x4375();}function validateInputSelection(_0x33341f){const _0x37eeca=a142_0x1fb84c,_0x391994=selectedInputs(_0x33341f);if(_0x391994['count']!==0x1)throw CliErrors['validation'](_0x37eeca(0x1fc));return _0x391994;}function withScene(_0x5e7faf,_0x2709a0,_0x4b0fc9){return{..._0x5e7faf,'scene':_0x2709a0,..._0x4b0fc9?{'sourceFile':{'fileName':_0x4b0fc9['fileName'],'filePath':_0x4b0fc9['filePath']}}:{}};}const ocrRecognize={'service':'ocr','command':a142_0x1fb84c(0x1d9),'description':'提取票证类业务材料中的文字与结构化字段;不用于通用图片理解','risk':a142_0x1fb84c(0x1de),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x5d1488){const _0x49be07=a142_0x1fb84c,_0x571915=normalizeScene(_0x5d1488[_0x49be07(0x1dc)](_0x49be07(0x1e8))),_0x1e49b8=SCENE_TO_LEGACY_TYPE[_0x571915],_0x66983b=validateInputSelection(_0x5d1488);if(_0x66983b[_0x49be07(0x201)]){const _0xe811d9=new URLSearchParams({'url':_0x66983b[_0x49be07(0x201)],'type':_0x1e49b8,'appCode':_0x5d1488['appCode']});return{'method':_0x49be07(0x202),'url':'/smartapi/ocr/recognize-text?'+_0xe811d9[_0x49be07(0x1e1)](),'description':_0x49be07(0x1f4)+_0x571915+_0x49be07(0x1ee)};}const _0x26aeee=requireDevelopmentUploadFile(_0x66983b[_0x49be07(0x1ef)],_0x49be07(0x1db));return{'method':_0x49be07(0x1fe),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x49be07(0x1fe),'url':_0x49be07(0x1da),'body':{'appCode':_0x5d1488['appCode'],'multipart':{'file':_0x26aeee}}},{'method':_0x49be07(0x1fe),'url':'/smartapi/common/queryFileUrl','body':{'filePath':_0x49be07(0x1df),'downloadFlag':![]}},{'method':_0x49be07(0x202),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x5d1488[_0x49be07(0x1f1)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x1e49b8}}]},'description':_0x49be07(0x1dd)+_0x571915+_0x49be07(0x200)};},async 'execute'(_0x5d60ef){const _0x2ca85c=a142_0x1fb84c,_0x16af21=normalizeScene(_0x5d60ef['str']('scene')),_0x4f8943=SCENE_TO_LEGACY_TYPE[_0x16af21],_0x3e5f4d=validateInputSelection(_0x5d60ef);if(_0x3e5f4d[_0x2ca85c(0x201)]){const _0x332666=await recognizeDevelopmentOcr(_0x5d60ef['appCode'],{'url':_0x3e5f4d['imageUrl'],'type':_0x4f8943});return{'ok':!![],'data':withScene(_0x332666,_0x16af21)};}const _0x5a5ed8=requireDevelopmentUploadFile(_0x3e5f4d[_0x2ca85c(0x1ef)],'image-file'),_0x3c346a=await uploadDevelopmentFile(_0x5d60ef['appCode'],_0x5a5ed8[_0x2ca85c(0x1f6)]);if(!_0x3c346a[_0x2ca85c(0x1d8)])throw CliErrors['apiError'](_0x2ca85c(0x1e2));const _0x4f32c9=await queryDevelopmentFileUrl(_0x3c346a[_0x2ca85c(0x1d8)],{'download':![]});if(!_0x4f32c9[_0x2ca85c(0x203)])throw CliErrors[_0x2ca85c(0x1e5)](_0x2ca85c(0x1f8));const _0x3e32c1=await recognizeDevelopmentOcr(_0x5d60ef[_0x2ca85c(0x1f1)],{'url':_0x4f32c9['fileUrl'],'type':_0x4f8943});return{'ok':!![],'data':withScene(_0x3e32c1,_0x16af21,_0x3c346a)};}};function a142_0x5b25(_0x4e8532,_0x1f3866){_0x4e8532=_0x4e8532-0x1d7;const _0x437592=a142_0x4375();let _0x5b2567=_0x437592[_0x4e8532];return _0x5b2567;}export const ocrDefinitions=[ocrRecognize];
1
+ const a142_0x4d7f8d=a142_0x40b9;(function(_0x12f564,_0x411801){const _0x33394f=a142_0x40b9,_0x38411c=_0x12f564();while(!![]){try{const _0x496d93=-parseInt(_0x33394f(0x123))/0x1*(-parseInt(_0x33394f(0x12b))/0x2)+parseInt(_0x33394f(0x121))/0x3+parseInt(_0x33394f(0x13a))/0x4+-parseInt(_0x33394f(0x119))/0x5*(-parseInt(_0x33394f(0x135))/0x6)+-parseInt(_0x33394f(0x120))/0x7*(-parseInt(_0x33394f(0x13d))/0x8)+-parseInt(_0x33394f(0x125))/0x9+-parseInt(_0x33394f(0x140))/0xa;if(_0x496d93===_0x411801)break;else _0x38411c['push'](_0x38411c['shift']());}catch(_0x422923){_0x38411c['push'](_0x38411c['shift']());}}}(a142_0x564e,0xd3d32));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a142_0x40b9(_0x18a4b0,_0x50c779){_0x18a4b0=_0x18a4b0-0x117;const _0x564e3d=a142_0x564e();let _0x40b96e=_0x564e3d[_0x18a4b0];return _0x40b96e;}import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a142_0x4d7f8d(0x14d),'general',a142_0x4d7f8d(0x128),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a142_0x4d7f8d(0x144),'general':a142_0x4d7f8d(0x11b),'form':a142_0x4d7f8d(0x124),'idCard':a142_0x4d7f8d(0x147)},SCENE_FLAG={'name':a142_0x4d7f8d(0x11d),'type':a142_0x4d7f8d(0x127),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a142_0x4d7f8d(0x11c)},IMAGE_FILE_FLAG={'name':a142_0x4d7f8d(0x14c),'type':'string','description':a142_0x4d7f8d(0x13b)},IMAGE_URL_FLAG={'name':'image-url','type':a142_0x4d7f8d(0x127),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x40ecf5){const _0x27efda=a142_0x4d7f8d,_0x26451c=_0x40ecf5['trim']()[_0x27efda(0x12f)]();if(_0x26451c===_0x27efda(0x122))return'idCard';if(_0x26451c===_0x27efda(0x14d)||_0x26451c===_0x27efda(0x14b)||_0x26451c===_0x27efda(0x128))return _0x26451c;throw CliErrors[_0x27efda(0x126)](_0x27efda(0x148)+_0x40ecf5+_0x27efda(0x138)+SUPPORTED_SCENES[_0x27efda(0x137)](',\x20'));}function selectedInputs(_0x226062){const _0x118fbf=a142_0x4d7f8d,_0x136b09=_0x226062['str'](_0x118fbf(0x14c))[_0x118fbf(0x13f)](),_0x3879b8=_0x226062[_0x118fbf(0x132)](_0x118fbf(0x14f))['trim']();return{'imageFile':_0x136b09,'imageUrl':_0x3879b8,'count':[_0x136b09,_0x3879b8][_0x118fbf(0x117)](Boolean)[_0x118fbf(0x12a)]};}function validateInputSelection(_0x3dbb52){const _0x4e0984=a142_0x4d7f8d,_0x4b769a=selectedInputs(_0x3dbb52);if(_0x4b769a['count']!==0x1)throw CliErrors[_0x4e0984(0x126)](_0x4e0984(0x142));return _0x4b769a;}function withScene(_0x1abdb7,_0x118b29,_0x51b53){const _0x97242a=a142_0x4d7f8d;return{..._0x1abdb7,'scene':_0x118b29,..._0x51b53?{'sourceFile':{'fileName':_0x51b53[_0x97242a(0x133)],'filePath':_0x51b53[_0x97242a(0x11e)]}}:{}};}function a142_0x564e(){const _0x1d3f30=['/smartapi/common/queryFileUrl','general','image-file','invoice','Preview:\x20recognize\x20','image-url','filter','path','1326035IBQGWB','toString','General','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','scene','filePath','appCode','3878fSKTmZ','1163070QOIRSE','idcard','1IfwELT','Table','14194503EcodEf','validation','string','form','imageUrl','length','450974bsUDeq','fileUrl','ocr','/smartapi/ocr/recognize-text','toLowerCase','/smartapi/common/uploadFile','imageFile','str','fileName','File\x20upload\x20response\x20missing\x20filePath.','6PzcqSx','read','join','.\x20Supported\x20scenes:\x20','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','6887032OucKpP','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','apiError','12216JLJLqW','\x20OCR\x20from\x20URL','trim','10012990HcttHG','POST','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','recognize','Invoice','提取票证类业务材料中的文字与结构化字段;不用于通用图片理解','/smartapi/ocr/recognize-text?','IdCard','Unsupported\x20OCR\x20scene:\x20','GET'];a142_0x564e=function(){return _0x1d3f30;};return a142_0x564e();}const ocrRecognize={'service':a142_0x4d7f8d(0x12d),'command':a142_0x4d7f8d(0x143),'description':a142_0x4d7f8d(0x145),'risk':a142_0x4d7f8d(0x136),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x337937){const _0x13ab92=a142_0x4d7f8d,_0x59f809=normalizeScene(_0x337937['str'](_0x13ab92(0x11d))),_0x38493d=SCENE_TO_LEGACY_TYPE[_0x59f809],_0x5a357d=validateInputSelection(_0x337937);if(_0x5a357d[_0x13ab92(0x129)]){const _0x942c76=new URLSearchParams({'url':_0x5a357d['imageUrl'],'type':_0x38493d,'appCode':_0x337937[_0x13ab92(0x11f)]});return{'method':_0x13ab92(0x149),'url':_0x13ab92(0x146)+_0x942c76[_0x13ab92(0x11a)](),'description':_0x13ab92(0x14e)+_0x59f809+_0x13ab92(0x13e)};}const _0x13132c=requireDevelopmentUploadFile(_0x5a357d[_0x13ab92(0x131)],_0x13ab92(0x14c));return{'method':_0x13ab92(0x141),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x13ab92(0x141),'url':_0x13ab92(0x130),'body':{'appCode':_0x337937[_0x13ab92(0x11f)],'multipart':{'file':_0x13132c}}},{'method':_0x13ab92(0x141),'url':_0x13ab92(0x14a),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x13ab92(0x149),'url':_0x13ab92(0x12e),'query':{'appCode':_0x337937[_0x13ab92(0x11f)],'url':_0x13ab92(0x139),'type':_0x38493d}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x59f809+'\x20OCR'};},async 'execute'(_0xed078c){const _0x19b5c8=a142_0x4d7f8d,_0x3ff46b=normalizeScene(_0xed078c[_0x19b5c8(0x132)](_0x19b5c8(0x11d))),_0x555d0f=SCENE_TO_LEGACY_TYPE[_0x3ff46b],_0x231971=validateInputSelection(_0xed078c);if(_0x231971['imageUrl']){const _0xc4e496=await recognizeDevelopmentOcr(_0xed078c[_0x19b5c8(0x11f)],{'url':_0x231971[_0x19b5c8(0x129)],'type':_0x555d0f});return{'ok':!![],'data':withScene(_0xc4e496,_0x3ff46b)};}const _0x336f89=requireDevelopmentUploadFile(_0x231971['imageFile'],_0x19b5c8(0x14c)),_0x4cc81e=await uploadDevelopmentFile(_0xed078c[_0x19b5c8(0x11f)],_0x336f89[_0x19b5c8(0x118)]);if(!_0x4cc81e[_0x19b5c8(0x11e)])throw CliErrors[_0x19b5c8(0x13c)](_0x19b5c8(0x134));const _0x2f8022=await queryDevelopmentFileUrl(_0x4cc81e['filePath'],{'download':![]});if(!_0x2f8022[_0x19b5c8(0x12c)])throw CliErrors[_0x19b5c8(0x13c)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x3dd2aa=await recognizeDevelopmentOcr(_0xed078c['appCode'],{'url':_0x2f8022[_0x19b5c8(0x12c)],'type':_0x555d0f});return{'ok':!![],'data':withScene(_0x3dd2aa,_0x3ff46b,_0x4cc81e)};}};export const ocrDefinitions=[ocrRecognize];