@lovrabet/rabetbase-cli 2.5.12 → 2.5.13-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase/guides/custom-page-workflow.md +32 -2
  375. package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
  376. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  377. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  378. package/skills/rabetbase.manifest.json +3 -3
  379. package/templates/custom-pages/blank.json +1 -1
  380. package/templates/custom-pages/dashboard.json +1 -1
@@ -1 +1 @@
1
- const a190_0x5ec4e6=a190_0x49ba;function a190_0x4f94(){const _0xce605f=['920tiqBEx','Created\x20','Would\x20create\x20','filter','menu','appCode','3438813ihjbkb','\x20\x20Create\x20','skipped','yes','\x20menu(s)\x20created','96102ldlZpw','\x20local\x20microfrontend\x20menu(s).','64552Vbyovk','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','POST','29JfDJLL','Online\x20menu\x20list\x20fetched','paths','\x20failed.','Menu\x20creation\x20failed','message','6279130zPlhsd','Menu\x20sync\x20completed:\x20','21546LBxQIm','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','60qoIrPe','onlineMenuList','params','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','onlinePaths','length','trim','size','rawFlags','gray','jsUrl','created','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20created.','\x20menu(s)...','\x20\x20Cancelled.','21475npESyp','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20and\x20CSS:\x20','appName','210DhwZWp','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','\x20menu(s)\x20bound\x20to\x20','\x20menu(s)','\x20\x20Continue\x20with\x20creation?','\x20created,\x20','\x20page(s)','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','boolean','Fetching\x20online\x20menu\x20list...','string','\x20menu(s)\x20with\x20JS:\x20','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','Menu\x20sync\x20skipped','cookie','split','yellow','validation','appcode','8291580wZPbXn','Creating\x20','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','failed','str','map','flag','selectedAppName','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Register\x20local\x20pages\x20as\x20platform\x20menus','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','cssUrl'];a190_0x4f94=function(){return _0xce605f;};return a190_0x4f94();}(function(_0x2e47cd,_0xf74a1d){const _0x134383=a190_0x49ba,_0x59c288=_0x2e47cd();while(!![]){try{const _0x8318d9=parseInt(_0x134383(0xde))/0x1*(-parseInt(_0x134383(0xd8))/0x2)+-parseInt(_0x134383(0xe8))/0x3*(-parseInt(_0x134383(0xda))/0x4)+-parseInt(_0x134383(0xaa))/0x5*(parseInt(_0x134383(0xae))/0x6)+parseInt(_0x134383(0xd3))/0x7+-parseInt(_0x134383(0xcd))/0x8*(-parseInt(_0x134383(0xe6))/0x9)+parseInt(_0x134383(0xe4))/0xa+parseInt(_0x134383(0xc1))/0xb;if(_0x8318d9===_0xf74a1d)break;else _0x59c288['push'](_0x59c288['shift']());}catch(_0x51c4db){_0x59c288['push'](_0x59c288['shift']());}}}(a190_0x4f94,0xe25f2));import a190_0x3a4dc8 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a190_0x49ba(_0x305dc7,_0x1f8606){_0x305dc7=_0x305dc7-0x9f;const _0x4f94df=a190_0x4f94();let _0x49baed=_0x4f94df[_0x305dc7];return _0x49baed;}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0x5ec4e6(0xd1),'command':'sync','description':a190_0x5ec4e6(0xca),'risk':'write','flags':[{'name':a190_0x5ec4e6(0xea),'type':a190_0x5ec4e6(0xb8),'description':'Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20'+a190_0x5ec4e6(0xdb)},{'name':a190_0x5ec4e6(0xe0),'type':a190_0x5ec4e6(0xb8),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a190_0x5ec4e6(0xd6),'type':a190_0x5ec4e6(0xb6),'description':a190_0x5ec4e6(0xe7)}],async 'dryRun'(_0x29f850){const _0x58238b=a190_0x5ec4e6;ensureRunnableContext(_0x29f850[_0x58238b(0xa2)],_0x29f850[_0x58238b(0xc8)]);const _0x512d3d=await runMenuSyncCore(_0x29f850[_0x58238b(0xd2)],_0x29f850['cookie'],parsePaths(_0x29f850[_0x58238b(0xc5)](_0x58238b(0xe0))),_0x29f850[_0x58238b(0xc5)]('params'),{'dryRun':!![]});return{'method':_0x58238b(0xdd),'url':'/smartapi/menu/create','body':_0x512d3d,'description':_0x512d3d[_0x58238b(0xd5)]?_0x58238b(0xba):_0x58238b(0xcf)+_0x512d3d['targetPages'][_0x58238b(0x9f)]+_0x58238b(0xd9)};},async 'execute'(_0x22cfb2){const _0x33299f=a190_0x5ec4e6;ensureRunnableContext(_0x22cfb2[_0x33299f(0xa2)],_0x22cfb2[_0x33299f(0xc8)]);const _0x2671a2=_0x22cfb2[_0x33299f(0xc7)](_0x33299f(0xd6)),_0x48aefe=_0x22cfb2['str'](_0x33299f(0xea)),_0x20e417=parsePaths(_0x22cfb2[_0x33299f(0xc5)](_0x33299f(0xe0))),_0x24a7a1=parseMenuSyncParams(_0x48aefe);if(_0x2671a2){const _0x636e8=await runMenuSyncCore(_0x22cfb2['appCode'],_0x22cfb2[_0x33299f(0xbc)],_0x20e417,_0x48aefe);if(_0x636e8[_0x33299f(0xd5)]){const _0x4c1d7b=getLocalPages();_0x4c1d7b[_0x33299f(0x9f)]===0x0?writeCliSideChannelLine(_0x33299f(0xdc)):writeCliSideChannelLine(_0x33299f(0xa6));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x636e8[_0x33299f(0xa5)]+_0x33299f(0xd7));return{'ok':!![],'data':_0x636e8,'message':_0x636e8[_0x33299f(0xd5)]?_0x33299f(0xbb):_0x33299f(0xe5)+_0x636e8[_0x33299f(0xa5)]+_0x33299f(0xa7)};}if(_0x20e417[_0x33299f(0x9f)]>0x0)throw CliErrors['validation']('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x48aefe)throw CliErrors[_0x33299f(0xbf)](_0x33299f(0xc9),_0x33299f(0xeb));requireInteractive(),writeCliSideChannelLine(_0x33299f(0xc3));const _0x32de05=startSpinner(_0x33299f(0xb7));let _0x2e765f,_0x2d991a,_0x745185;try{const _0x1a7323=await fetchMenuData(_0x22cfb2[_0x33299f(0xd2)],_0x22cfb2['cookie']);_0x2e765f=_0x1a7323['localPages'],_0x2d991a=_0x1a7323[_0x33299f(0xec)],_0x745185=_0x1a7323[_0x33299f(0xe9)],stopSpinner(_0x32de05,_0x33299f(0xdf),!![]);}catch(_0x8dd9f9){stopSpinner(_0x32de05,_0x33299f(0xab),![]);throw CliErrors[_0x33299f(0xbf)](_0x8dd9f9 instanceof Error?_0x8dd9f9[_0x33299f(0xe3)]:_0x33299f(0xab));}if(_0x2e765f[_0x33299f(0x9f)]===0x0)return writeCliSideChannelLine(a190_0x3a4dc8[_0x33299f(0xbe)](_0x33299f(0xb5))),{'ok':!![]};const _0xe346ff=buildCompareRows(_0x2e765f,_0x2d991a);writeCliSideChannelLine(renderCompareTable(_0xe346ff)),writeCliSideChannelLine('');const _0x1cc0aa=await selectPages(_0x2e765f,_0x2d991a);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x3a4dc8['cyan']('\x20\x20✓\x20Selected:\x20'+_0x1cc0aa[_0x33299f(0x9f)]+_0x33299f(0xb4)));const _0x132274=_0x24a7a1[_0x33299f(0xa4)]&&_0x24a7a1['cssUrl'];if(!_0x132274){writeCliSideChannelLine(renderSyncSummary(_0x1cc0aa,_0x2d991a[_0x33299f(0xa1)]>0x0));const _0x479423=await askConfirm(_0x33299f(0xb2));if(!_0x479423)return writeCliSideChannelLine(a190_0x3a4dc8[_0x33299f(0xa3)](_0x33299f(0xa9))),{'ok':!![]};}let _0x112d44=_0x24a7a1[_0x33299f(0xa4)],_0x4a3638=_0x24a7a1[_0x33299f(0xcc)];!_0x112d44&&!_0x24a7a1[_0x33299f(0xad)]&&(_0x112d44=await askJsUrl());!_0x4a3638&&!_0x24a7a1[_0x33299f(0xad)]&&(_0x4a3638=await askCssUrl());const _0x1c30d6=await askConfirm(_0x24a7a1[_0x33299f(0xad)]?_0x33299f(0xd4)+_0x1cc0aa[_0x33299f(0x9f)]+_0x33299f(0xb0)+_0x24a7a1['appName']+'?':_0x33299f(0xd4)+_0x1cc0aa[_0x33299f(0x9f)]+_0x33299f(0xb9)+_0x112d44+_0x33299f(0xac)+_0x4a3638+'?');if(!_0x1c30d6)return writeCliSideChannelLine(a190_0x3a4dc8[_0x33299f(0xa3)](_0x33299f(0xa9))),{'ok':!![]};const _0x398ef6=[_0x112d44,_0x4a3638][_0x33299f(0xd0)](_0x5cdcb4=>Boolean(_0x5cdcb4));_0x24a7a1[_0x33299f(0xad)]&&_0x398ef6[_0x33299f(0x9f)]===0x0&&await assertSharedResourcesConfigured(_0x22cfb2[_0x33299f(0xd2)],_0x22cfb2[_0x33299f(0xbc)],_0x24a7a1[_0x33299f(0xad)]);const _0x5dc789=startSpinner(_0x33299f(0xc2)+_0x1cc0aa['length']+_0x33299f(0xa8));try{const _0x1291ae=_0x1cc0aa['map'](_0x39006f=>resolvePage(_0x39006f,_0x24a7a1,_0x745185)),_0x5bfcc1=await doCreateMenus(_0x22cfb2[_0x33299f(0xd2)],_0x22cfb2['cookie'],_0x1291ae,_0x398ef6,_0x24a7a1['appName']?{'appName':_0x24a7a1[_0x33299f(0xad)]}:undefined);return stopSpinner(_0x5dc789,_0x33299f(0xce)+_0x5bfcc1[_0x33299f(0xa5)]+_0x33299f(0xb1),!![]),{'ok':!![],'data':_0x5bfcc1,'message':_0x33299f(0xe5)+_0x5bfcc1['created']+_0x33299f(0xb3)+_0x5bfcc1[_0x33299f(0xc4)]+_0x33299f(0xe1)};}catch(_0x36792b){stopSpinner(_0x5dc789,_0x33299f(0xe2),![]);throw CliErrors[_0x33299f(0xbf)](_0x36792b instanceof Error?_0x36792b[_0x33299f(0xe3)]:_0x33299f(0xe2));}}};function ensureRunnableContext(_0x5eead1,_0x395587){const _0x485667=a190_0x5ec4e6,_0x24524e=_0x5eead1[_0x485667(0xc0)]?String(_0x5eead1[_0x485667(0xc0)])['trim']():'';if(!isInProject()&&!_0x395587&&!_0x24524e)throw CliErrors['validation'](_0x485667(0xaf)+_0x485667(0xcb));}function parsePaths(_0x3aac1c){const _0x4b1099=a190_0x5ec4e6;return[...new Set(_0x3aac1c[_0x4b1099(0xbd)](',')[_0x4b1099(0xc6)](_0x374176=>_0x374176[_0x4b1099(0xa0)]())[_0x4b1099(0xd0)](Boolean))];}
1
+ const a190_0x359a6e=a190_0x3fc7;(function(_0x18a005,_0x42a257){const _0x4fc1f9=a190_0x3fc7,_0x540951=_0x18a005();while(!![]){try{const _0x4bf949=-parseInt(_0x4fc1f9(0x103))/0x1*(-parseInt(_0x4fc1f9(0x109))/0x2)+-parseInt(_0x4fc1f9(0xe1))/0x3*(-parseInt(_0x4fc1f9(0xf3))/0x4)+-parseInt(_0x4fc1f9(0xe3))/0x5*(-parseInt(_0x4fc1f9(0xde))/0x6)+-parseInt(_0x4fc1f9(0xeb))/0x7+-parseInt(_0x4fc1f9(0xd3))/0x8+-parseInt(_0x4fc1f9(0x107))/0x9+parseInt(_0x4fc1f9(0xea))/0xa;if(_0x4bf949===_0x42a257)break;else _0x540951['push'](_0x540951['shift']());}catch(_0x33a021){_0x540951['push'](_0x540951['shift']());}}}(a190_0xcec5,0x6b7c1));import a190_0x345067 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a190_0x3fc7(_0x4f5720,_0x3fca21){_0x4f5720=_0x4f5720-0xcd;const _0xcec5d4=a190_0xcec5();let _0x3fc7b7=_0xcec5d4[_0x4f5720];return _0x3fc7b7;}import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a190_0xcec5(){const _0x2f95d8=['\x20menu(s)\x20created','\x20\x20✓\x20Selected:\x20','cookie','cssUrl','Created\x20','POST','/smartapi/menu/create','\x20local\x20microfrontend\x20menu(s).','\x20failed.','map','1338mpvFvZ','paths','\x20created,\x20','11955FIZgik','flag','10655xmqsFz','jsUrl','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','sync','created','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','45850wxcDuJ','5125211bssEVd','gray','write','Failed\x20to\x20fetch\x20online\x20menu\x20list','Online\x20menu\x20list\x20fetched','length','\x20menu(s)\x20bound\x20to\x20','skipped','732uKkczB','filter','\x20menu(s)\x20with\x20JS:\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','\x20\x20Create\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','selectedAppName','params','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','appcode','boolean','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','appName','\x20\x20Continue\x20with\x20creation?','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','targetPages','271177EogglA','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','str','message','1433331kweMYQ','Menu\x20sync\x20completed:\x20','2ZLMlRG','Fetching\x20online\x20menu\x20list...','yes','trim','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20page(s)','Menu\x20sync\x20skipped','\x20and\x20CSS:\x20','\x20menu(s)...','size','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','\x20menu(s)','localPages','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','failed','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','Menu\x20creation\x20failed','yellow','validation','\x20\x20Cancelled.','appCode','rawFlags','menu','1188328pWJsIZ'];a190_0xcec5=function(){return _0x2f95d8;};return a190_0xcec5();}import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0x359a6e(0xd2),'command':a190_0x359a6e(0xe7),'description':'Register\x20local\x20pages\x20as\x20platform\x20menus','risk':a190_0x359a6e(0xed),'flags':[{'name':'params','type':'string','description':a190_0x359a6e(0x113)+a190_0x359a6e(0xe9)},{'name':a190_0x359a6e(0xdf),'type':'string','description':a190_0x359a6e(0xf6)},{'name':a190_0x359a6e(0x10b),'type':a190_0x359a6e(0xfd),'description':a190_0x359a6e(0xfe)}],async 'dryRun'(_0x264c2f){const _0x3f1106=a190_0x359a6e;ensureRunnableContext(_0x264c2f['rawFlags'],_0x264c2f[_0x3f1106(0xf9)]);const _0x1bcc00=await runMenuSyncCore(_0x264c2f[_0x3f1106(0xd0)],_0x264c2f[_0x3f1106(0xd6)],parsePaths(_0x264c2f[_0x3f1106(0x105)](_0x3f1106(0xdf))),_0x264c2f[_0x3f1106(0x105)]('params'),{'dryRun':!![]});return{'method':_0x3f1106(0xd9),'url':_0x3f1106(0xda),'body':_0x1bcc00,'description':_0x1bcc00[_0x3f1106(0xf2)]?_0x3f1106(0xe6):'Would\x20create\x20'+_0x1bcc00[_0x3f1106(0x102)][_0x3f1106(0xf0)]+_0x3f1106(0xdb)};},async 'execute'(_0x2ab1f1){const _0x496743=a190_0x359a6e;ensureRunnableContext(_0x2ab1f1[_0x496743(0xd1)],_0x2ab1f1['selectedAppName']);const _0x510d47=_0x2ab1f1[_0x496743(0xe2)](_0x496743(0x10b)),_0x1bff76=_0x2ab1f1[_0x496743(0x105)](_0x496743(0xfa)),_0x861adc=parsePaths(_0x2ab1f1[_0x496743(0x105)](_0x496743(0xdf))),_0x3e3f4=parseMenuSyncParams(_0x1bff76);if(_0x510d47){const _0x413598=await runMenuSyncCore(_0x2ab1f1[_0x496743(0xd0)],_0x2ab1f1[_0x496743(0xd6)],_0x861adc,_0x1bff76);if(_0x413598['skipped']){const _0x1a2eed=getLocalPages();_0x1a2eed[_0x496743(0xf0)]===0x0?writeCliSideChannelLine(_0x496743(0x114)):writeCliSideChannelLine(_0x496743(0x104));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x413598[_0x496743(0xe8)]+_0x496743(0xd4));return{'ok':!![],'data':_0x413598,'message':_0x413598[_0x496743(0xf2)]?_0x496743(0x10f):_0x496743(0x108)+_0x413598[_0x496743(0xe8)]+'\x20created.'};}if(_0x861adc[_0x496743(0xf0)]>0x0)throw CliErrors['validation'](_0x496743(0x119),_0x496743(0xf8));if(!isInteractive()&&_0x1bff76)throw CliErrors[_0x496743(0xce)](_0x496743(0x117),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive(),writeCliSideChannelLine(_0x496743(0x101));const _0x13d2ca=startSpinner(_0x496743(0x10a));let _0x32f1bf,_0xb6e4c5,_0x2ac9be;try{const _0x4971ad=await fetchMenuData(_0x2ab1f1['appCode'],_0x2ab1f1[_0x496743(0xd6)]);_0x32f1bf=_0x4971ad[_0x496743(0x116)],_0xb6e4c5=_0x4971ad['onlinePaths'],_0x2ac9be=_0x4971ad['onlineMenuList'],stopSpinner(_0x13d2ca,_0x496743(0xef),!![]);}catch(_0x56cca5){stopSpinner(_0x13d2ca,_0x496743(0xee),![]);throw CliErrors[_0x496743(0xce)](_0x56cca5 instanceof Error?_0x56cca5[_0x496743(0x106)]:_0x496743(0xee));}if(_0x32f1bf[_0x496743(0xf0)]===0x0)return writeCliSideChannelLine(a190_0x345067[_0x496743(0xcd)](_0x496743(0xe5))),{'ok':!![]};const _0x307de0=buildCompareRows(_0x32f1bf,_0xb6e4c5);writeCliSideChannelLine(renderCompareTable(_0x307de0)),writeCliSideChannelLine('');const _0x2c6283=await selectPages(_0x32f1bf,_0xb6e4c5);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x345067['cyan'](_0x496743(0xd5)+_0x2c6283['length']+_0x496743(0x10e)));const _0x4d7ad3=_0x3e3f4[_0x496743(0xe4)]&&_0x3e3f4[_0x496743(0xd7)];if(!_0x4d7ad3){writeCliSideChannelLine(renderSyncSummary(_0x2c6283,_0xb6e4c5[_0x496743(0x112)]>0x0));const _0x508a32=await askConfirm(_0x496743(0x100));if(!_0x508a32)return writeCliSideChannelLine(a190_0x345067[_0x496743(0xec)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x559ad1=_0x3e3f4[_0x496743(0xe4)],_0x376ab2=_0x3e3f4[_0x496743(0xd7)];!_0x559ad1&&!_0x3e3f4[_0x496743(0xff)]&&(_0x559ad1=await askJsUrl());!_0x376ab2&&!_0x3e3f4[_0x496743(0xff)]&&(_0x376ab2=await askCssUrl());const _0x125766=await askConfirm(_0x3e3f4[_0x496743(0xff)]?'\x20\x20Create\x20'+_0x2c6283[_0x496743(0xf0)]+_0x496743(0xf1)+_0x3e3f4[_0x496743(0xff)]+'?':_0x496743(0xf7)+_0x2c6283['length']+_0x496743(0xf5)+_0x559ad1+_0x496743(0x110)+_0x376ab2+'?');if(!_0x125766)return writeCliSideChannelLine(a190_0x345067['gray'](_0x496743(0xcf))),{'ok':!![]};const _0x38f863=[_0x559ad1,_0x376ab2][_0x496743(0xf4)](_0x219150=>Boolean(_0x219150));_0x3e3f4[_0x496743(0xff)]&&_0x38f863['length']===0x0&&await assertSharedResourcesConfigured(_0x2ab1f1[_0x496743(0xd0)],_0x2ab1f1[_0x496743(0xd6)],_0x3e3f4[_0x496743(0xff)]);const _0x2e24c6=startSpinner('Creating\x20'+_0x2c6283['length']+_0x496743(0x111));try{const _0x16396d=_0x2c6283[_0x496743(0xdd)](_0x2726a4=>resolvePage(_0x2726a4,_0x3e3f4,_0x2ac9be)),_0x3176b1=await doCreateMenus(_0x2ab1f1['appCode'],_0x2ab1f1[_0x496743(0xd6)],_0x16396d,_0x38f863,_0x3e3f4[_0x496743(0xff)]?{'appName':_0x3e3f4[_0x496743(0xff)]}:undefined);return stopSpinner(_0x2e24c6,_0x496743(0xd8)+_0x3176b1[_0x496743(0xe8)]+_0x496743(0x115),!![]),{'ok':!![],'data':_0x3176b1,'message':_0x496743(0x108)+_0x3176b1[_0x496743(0xe8)]+_0x496743(0xe0)+_0x3176b1[_0x496743(0x118)]+_0x496743(0xdc)};}catch(_0x4c516b){stopSpinner(_0x2e24c6,_0x496743(0x11a),![]);throw CliErrors[_0x496743(0xce)](_0x4c516b instanceof Error?_0x4c516b[_0x496743(0x106)]:_0x496743(0x11a));}}};function ensureRunnableContext(_0x3044ec,_0x2cec06){const _0x2e676e=a190_0x359a6e,_0x5148bc=_0x3044ec[_0x2e676e(0xfc)]?String(_0x3044ec[_0x2e676e(0xfc)])['trim']():'';if(!isInProject()&&!_0x2cec06&&!_0x5148bc)throw CliErrors['validation'](_0x2e676e(0xfb)+_0x2e676e(0x10d));}function parsePaths(_0xbac054){const _0x4d9e26=a190_0x359a6e;return[...new Set(_0xbac054['split'](',')[_0x4d9e26(0xdd)](_0x4bc145=>_0x4bc145[_0x4d9e26(0x10c)]())[_0x4d9e26(0xf4)](Boolean))];}
@@ -1 +1 @@
1
- function a191_0xee17(_0x20601a,_0x5ab163){_0x20601a=_0x20601a-0x7a;const _0x43c9ad=a191_0x43c9();let _0xee1781=_0x43c9ad[_0x20601a];return _0xee1781;}const a191_0x5f509b=a191_0xee17;(function(_0x26f4c9,_0x59106e){const _0x1a02d3=a191_0xee17,_0x131adb=_0x26f4c9();while(!![]){try{const _0x368e2c=parseInt(_0x1a02d3(0xc6))/0x1*(-parseInt(_0x1a02d3(0x81))/0x2)+-parseInt(_0x1a02d3(0x83))/0x3+parseInt(_0x1a02d3(0x90))/0x4+-parseInt(_0x1a02d3(0x85))/0x5*(-parseInt(_0x1a02d3(0xd6))/0x6)+parseInt(_0x1a02d3(0xe3))/0x7+-parseInt(_0x1a02d3(0xab))/0x8+-parseInt(_0x1a02d3(0x93))/0x9;if(_0x368e2c===_0x59106e)break;else _0x131adb['push'](_0x131adb['shift']());}catch(_0x59f548){_0x131adb['push'](_0x131adb['shift']());}}}(a191_0x43c9,0x99227));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}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';function a191_0x43c9(){const _0x559b32=['expect-visible','2806446ujwEkH','get','857055kTquqb','verify\x20menu\x20visibility\x20update','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','updated','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','url','verification','expectVisible','label','Response\x20was\x20lost\x20and\x20menu\x20','4351996uHPZft','message','menu_verification_failed','5122341HLiGaz','Selected\x20','join','\x20changed\x20unexpectedly.','POST','menu_expected_count_mismatch','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','boolean','menu_selector_not_found','\x20skipped,\x20','visible','appCode','rawFlags','validation','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','childrenIds','type','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','expectedCount','byId','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','beforeById','pageId','6792KGEtea','before','plan','parentId','requestedVisible','warnings','resourcesValid','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','paths','update-menu-visibility','some','write','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','datasetId','has','\x20unchanged\x20menu(s).','Menu\x20','update-recovery','isArray','string','datasetCode','modelType','filter','childrenCount','visibility-update','plannedActions','menu-ids','707lTCYqa','Menu\x20visibility\x20update\x20completed:\x20','menu_state_drift','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','pageType','path','rabetbase\x20menu\x20list\x20--format\x20compress','code','str','false','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','depth','Updated\x20visibility\x20for\x20','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','push','map','12CIVbOZ','\x20menu(s),\x20expected\x20','update\x20visibility\x20for','length','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','menu_selector_ambiguous','\x20menu(s);\x20skipped\x20','update','failed','menu\x20list','values','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','cookie','7595644UMesiD','resources','trim','number','true','stringify','menuIds','menus','expected-count','num','flagMissing','Menu\x20path\x20selector\x20not\x20found:\x20','isSafeInteger','hash','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Response\x20was\x20lost\x20for\x20menu\x20','set','recovered','sort','targets','1084gEeukU'];a191_0x43c9=function(){return _0x559b32;};return a191_0x43c9();}const BACKEND=[{'method':a191_0x5f509b(0x97),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':'menu','command':a191_0x5f509b(0xc3),'description':a191_0x5f509b(0xa5),'risk':a191_0x5f509b(0xb6),'structuredErrors':!![],'flags':[{'name':a191_0x5f509b(0xc5),'type':'string','description':a191_0x5f509b(0x99)},{'name':'paths','type':a191_0x5f509b(0xbe),'description':a191_0x5f509b(0xd0)},{'name':a191_0x5f509b(0x9e),'type':a191_0x5f509b(0x9b),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a191_0x5f509b(0x82),'type':'boolean','description':a191_0x5f509b(0x87)},{'name':a191_0x5f509b(0xeb),'type':a191_0x5f509b(0xe6),'description':a191_0x5f509b(0xda)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x466220){parseInput(_0x466220);},async 'dryRun'(_0x1748c7){const _0x2b93c5=a191_0x5f509b,_0x3b03d9=await buildPlan(_0x1748c7,!![]),_0x3eaec0=_0x3b03d9[_0x2b93c5(0xad)]['plannedActions']?.[_0x2b93c5(0xd9)]??0x0,_0x4233e0=_0x3b03d9[_0x2b93c5(0xad)][_0x2b93c5(0x80)]['length']-_0x3eaec0;return menuDryRunResult(_0x3b03d9[_0x2b93c5(0xad)],{'method':_0x2b93c5(0x97),'url':'/smartapi/menu/update','body':{'updates':_0x3b03d9[_0x2b93c5(0xad)][_0x2b93c5(0xc4)]?.[_0x2b93c5(0xd5)](_0x2058fa=>_0x2058fa['body'])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x3eaec0+'\x20menu(s);\x20skip\x20'+_0x4233e0+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x2b35cd){const _0x3c2adb=a191_0x5f509b,_0x36189e=await buildPlan(_0x2b35cd,![]);await recheckMutationSnapshot(_0x2b35cd,_0x36189e[_0x3c2adb(0xad)],'update\x20menu\x20visibility');const _0x423327=[],_0x2056ee=[],_0x4ba74d=[];for(const _0x51bebf of _0x36189e['plan']['targets']){if(_0x51bebf[_0x3c2adb(0xac)]['visible']===_0x36189e[_0x3c2adb(0xad)]['requestedVisible']){_0x423327['push']({'id':_0x51bebf['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2b35cd[_0x3c2adb(0x9f)],_0x2b35cd[_0x3c2adb(0xe2)],{'id':_0x51bebf['id'],'visible':_0x36189e[_0x3c2adb(0xad)][_0x3c2adb(0xaf)]}),_0x423327[_0x3c2adb(0xd4)]({'id':_0x51bebf['id'],'updated':!![],'skipped':![]});}catch(_0x58a3c0){const _0x6c1aff=mapMenuApiError(_0x58a3c0,_0x3c2adb(0xd8),_0x51bebf['id']);if(isMenuResponseLoss(_0x58a3c0)&&_0x6c1aff[_0x3c2adb(0xcd)]!=='menu_permission_denied'){_0x4ba74d[_0x3c2adb(0xd4)](_0x51bebf['id']);continue;}_0x2056ee[_0x3c2adb(0xd4)]({'id':_0x51bebf['id'],'stage':_0x3c2adb(0xdd),'code':_0x6c1aff['code'],'message':_0x6c1aff['message']});}}let _0x52b6a7;try{_0x52b6a7=await fetchMenuSnapshot(_0x2b35cd[_0x3c2adb(0x9f)],_0x2b35cd[_0x3c2adb(0xe2)]);}catch(_0x437c38){const _0x768e01=describeMenuErrorCause(_0x437c38,_0x3c2adb(0x86)),_0x25c614=_0x4ba74d[_0x3c2adb(0xd5)](_0x1f24a1=>({'id':_0x1f24a1,'stage':_0x3c2adb(0xbc),'code':_0x3c2adb(0x92),'message':_0x3c2adb(0x7c)+_0x1f24a1+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x54b989={'stage':_0x3c2adb(0x8c),'code':_0x3c2adb(0x92),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x36189e['plan'][_0x3c2adb(0x80)][_0x3c2adb(0xd5)](_0x264af5=>_0x264af5['id']),'requestedStateConfirmed':![],..._0x768e01};throw menuFailure(asVerificationError(_0x437c38,_0x3c2adb(0x89)),_0x36189e[_0x3c2adb(0xad)],{'stage':_0x3c2adb(0x8c),'succeeded':_0x423327,'failedRecords':[..._0x2056ee,..._0x25c614,_0x54b989],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x3c2adb(0xde),'recoveredCount':0x0,'lookupCommand':_0x3c2adb(0xcc)}});}const _0x2a7fc8=[];for(const _0x5d0a01 of _0x423327){const _0x5a5e2e=Number(_0x5d0a01['id']),_0x4d07bc=_0x36189e[_0x3c2adb(0xa9)][_0x3c2adb(0x84)](_0x5a5e2e),_0x599bce=_0x52b6a7[_0x3c2adb(0xa7)][_0x3c2adb(0x84)](_0x5a5e2e);try{verifyVisibilityUpdate(_0x4d07bc,_0x599bce,_0x36189e[_0x3c2adb(0xad)][_0x3c2adb(0xaf)]);}catch(_0x398afd){const _0x1b1b17=asVerificationError(_0x398afd,'Menu\x20'+_0x5a5e2e+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x2a7fc8[_0x3c2adb(0xd4)]({'id':_0x5a5e2e,'stage':_0x3c2adb(0x8c),'code':_0x1b1b17[_0x3c2adb(0xcd)],'message':_0x1b1b17[_0x3c2adb(0x91)],'requestedStateConfirmed':![]});}}for(const _0xdb167c of _0x4ba74d){const _0xb58f79=_0x36189e[_0x3c2adb(0xa9)][_0x3c2adb(0x84)](_0xdb167c),_0x229267=_0x52b6a7['byId'][_0x3c2adb(0x84)](_0xdb167c);try{verifyVisibilityUpdate(_0xb58f79,_0x229267,_0x36189e[_0x3c2adb(0xad)]['requestedVisible']),_0x423327['push']({'id':_0xdb167c,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x24fb9e){const _0x2779d5=asVerificationError(_0x24fb9e,_0x3c2adb(0x8f)+_0xdb167c+'\x20visibility\x20could\x20not\x20be\x20verified\x20safely');_0x2a7fc8['push']({'id':_0xdb167c,'stage':_0x3c2adb(0xbc),'code':_0x2779d5[_0x3c2adb(0xcd)],'message':_0x2779d5[_0x3c2adb(0x91)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x2a7fc8[_0x3c2adb(0xd9)]>0x0){const _0x2da485=_0x2a7fc8['map'](_0x26a158=>Number(_0x26a158['id'])),_0x4178f6=_0x423327[_0x3c2adb(0xc1)](_0x13baef=>_0x13baef[_0x3c2adb(0x7e)]===!![])[_0x3c2adb(0xd9)],_0x21a2c4=menuError(_0x3c2adb(0x92),'Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20'+_0x2da485[_0x3c2adb(0x95)](',\x20')+'.','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.');throw menuFailure(_0x21a2c4,_0x36189e[_0x3c2adb(0xad)],{'stage':_0x3c2adb(0x8c),'succeeded':_0x423327,'failedRecords':[..._0x2056ee,..._0x2a7fc8],'warnings':[_0x3c2adb(0xd3)],'verification':{'status':_0x3c2adb(0xde),..._0x2da485['length']===0x1?{'targetId':_0x2da485[0x0]}:{'targetIds':_0x2da485},'recoveredCount':_0x4178f6,'lookupCommand':_0x3c2adb(0xcc)}});}const _0x652ed1=_0x423327[_0x3c2adb(0xc1)](_0x5aeb42=>_0x5aeb42[_0x3c2adb(0x88)]===!![])['length'],_0x57cfae=_0x423327['length']-_0x652ed1,_0x202c99={..._0x36189e[_0x3c2adb(0xad)],'succeeded':_0x423327,'failed':_0x2056ee,'warnings':_0x2056ee[_0x3c2adb(0xd9)]>0x0?[..._0x36189e[_0x3c2adb(0xad)][_0x3c2adb(0xb0)],_0x3c2adb(0x9a)]:_0x36189e['plan'][_0x3c2adb(0xb0)],'verification':{'checkedBy':_0x3c2adb(0xdf),'snapshotHash':_0x52b6a7[_0x3c2adb(0x7a)],'matchesRequestedState':_0x2056ee[_0x3c2adb(0xd9)]===0x0,'recoveredCount':_0x4ba74d['length']}};return{'ok':_0x2056ee[_0x3c2adb(0xd9)]===0x0,'data':_0x202c99,'message':_0x2056ee['length']===0x0?_0x3c2adb(0xd2)+_0x652ed1+_0x3c2adb(0xdc)+_0x57cfae+_0x3c2adb(0xba):_0x3c2adb(0xc7)+_0x652ed1+'\x20updated,\x20'+_0x57cfae+_0x3c2adb(0x9d)+_0x2056ee[_0x3c2adb(0xd9)]+'\x20failed.'};}};function parseInput(_0x407b5c){const _0x2a9e51=a191_0x5f509b,_0x2a2471=parseMenuIds(_0x407b5c[_0x2a9e51(0xce)](_0x2a9e51(0xc5))),_0x7d435a=parseCsv(_0x407b5c[_0x2a9e51(0xce)](_0x2a9e51(0xb3)));if(_0x2a2471[_0x2a9e51(0xd9)]===0x0&&_0x7d435a[_0x2a9e51(0xd9)]===0x0)throw CliErrors[_0x2a9e51(0xa1)]('menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.');const _0x6fef4f=parseBooleanFlag(_0x407b5c,'visible',!![]),_0x3f38ed=parseBooleanFlag(_0x407b5c,_0x2a9e51(0x82),![]);let _0x58f6f8;if(hasFlag(_0x407b5c,_0x2a9e51(0xeb))){_0x58f6f8=_0x407b5c[_0x2a9e51(0xec)](_0x2a9e51(0xeb));if(!Number[_0x2a9e51(0xef)](_0x58f6f8)||_0x58f6f8<0x0)throw CliErrors['validation']('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x2a2471,'paths':_0x7d435a,'visible':_0x6fef4f,'expectVisible':_0x3f38ed,'expectedCount':_0x58f6f8};}async function buildPlan(_0x40f777,_0x2c239f){const _0x4867bf=a191_0x5f509b,_0x338a42=parseInput(_0x40f777),_0x46f474=await fetchMutationSnapshot(_0x40f777,'update\x20menu\x20visibility'),_0x4be1ec=selectTargets(_0x46f474[_0x4867bf(0xea)],_0x338a42[_0x4867bf(0xe9)],_0x338a42[_0x4867bf(0xb3)]);if(_0x338a42['expectedCount']!==undefined&&_0x4be1ec['length']!==_0x338a42['expectedCount'])throw menuError(_0x4867bf(0x98),_0x4867bf(0x94)+_0x4be1ec[_0x4867bf(0xd9)]+_0x4867bf(0xd7)+_0x338a42[_0x4867bf(0xa6)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x338a42[_0x4867bf(0x8d)]!==undefined){const _0x24e84e=_0x4be1ec[_0x4867bf(0xc1)](_0x315587=>_0x315587[_0x4867bf(0x9e)]!==_0x338a42[_0x4867bf(0x8d)]);if(_0x24e84e[_0x4867bf(0xd9)]>0x0)throw menuError(_0x4867bf(0xc8),_0x4867bf(0x7b)+_0x24e84e[_0x4867bf(0xd5)](_0x56501b=>_0x56501b['id'])[_0x4867bf(0x95)](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x3a4bc4=_0x4be1ec['map'](_0x261c23=>({'id':_0x261c23['id'],'label':_0x261c23['label'],'path':_0x261c23[_0x4867bf(0xcb)],'before':{'visible':_0x261c23[_0x4867bf(0x9e)]},'after':{'visible':_0x338a42[_0x4867bf(0x9e)]}})),_0x575729=_0x3a4bc4[_0x4867bf(0xc1)](_0x297119=>_0x297119[_0x4867bf(0xac)][_0x4867bf(0x9e)]!==_0x338a42[_0x4867bf(0x9e)])['map'](_0x3799f2=>({'stage':_0x4867bf(0xb4),'method':_0x4867bf(0x97),'path':'/smartapi/menu/update','body':{'appCode':_0x40f777[_0x4867bf(0x9f)],'id':_0x3799f2['id'],'visible':_0x338a42[_0x4867bf(0x9e)]}})),_0x34ed7f=mutationResult({'operation':_0x4867bf(0xc3),'selector':{'menuIds':_0x338a42[_0x4867bf(0xe9)],'paths':_0x338a42['paths']},'before':{'menus':_0x4be1ec['map'](_0x2db888=>({'id':_0x2db888['id'],'path':_0x2db888[_0x4867bf(0xcb)],'visible':_0x2db888[_0x4867bf(0x9e)]}))},'after':{'menus':_0x4be1ec[_0x4867bf(0xd5)](_0x4d236b=>({'id':_0x4d236b['id'],'path':_0x4d236b[_0x4867bf(0xcb)],'visible':_0x338a42[_0x4867bf(0x9e)]}))},'dryRun':_0x2c239f,'backend':[...BACKEND],'plannedActions':_0x575729,'snapshotHash':_0x46f474['hash'],'warnings':_0x575729['length']===0x0?[_0x4867bf(0xc9)]:[]});return{'plan':{..._0x34ed7f,'requestedVisible':_0x338a42[_0x4867bf(0x9e)],'targets':_0x3a4bc4},'beforeById':new Map(_0x4be1ec[_0x4867bf(0xd5)](_0x57241a=>[_0x57241a['id'],_0x57241a]))};}function selectTargets(_0x265a88,_0x3ade88,_0xc1a682){const _0x1682a8=a191_0x5f509b,_0x3fd675=new Map(_0x265a88['map'](_0x3fee7a=>[_0x3fee7a['id'],_0x3fee7a])),_0x28155d=new Map(),_0x1a8e1b=_0x3ade88[_0x1682a8(0xc1)](_0x3511dc=>!_0x3fd675[_0x1682a8(0xb9)](_0x3511dc));if(_0x1a8e1b[_0x1682a8(0xd9)]>0x0)throw menuError(_0x1682a8(0x9c),'Menu\x20id\x20selector(s)\x20not\x20found:\x20'+_0x1a8e1b[_0x1682a8(0x95)](',\x20')+'.',_0x1682a8(0xb2));for(const _0x59b5ee of _0x3ade88){_0x28155d[_0x1682a8(0x7d)](_0x59b5ee,_0x3fd675[_0x1682a8(0x84)](_0x59b5ee));}for(const _0x838b4c of _0xc1a682){const _0x4691f9=_0x265a88['filter'](_0x5b2cb7=>_0x5b2cb7[_0x1682a8(0xcb)]===_0x838b4c);if(_0x4691f9['length']===0x0)throw menuError(_0x1682a8(0x9c),_0x1682a8(0xee)+JSON[_0x1682a8(0xe8)](_0x838b4c)+'.',_0x1682a8(0xa2));if(_0x4691f9[_0x1682a8(0xd9)]>0x1)throw menuError(_0x1682a8(0xdb),'Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20'+JSON['stringify'](_0x838b4c)+'.',_0x1682a8(0xb7)+_0x4691f9[_0x1682a8(0xd5)](_0x26f7dc=>_0x26f7dc['id'])[_0x1682a8(0x95)](',\x20')+'.');const _0x324dce=_0x4691f9[0x0];_0x28155d[_0x1682a8(0x7d)](_0x324dce['id'],_0x324dce);}return[..._0x28155d[_0x1682a8(0xe0)]()];}function parseMenuIds(_0x4473d1){const _0x47a042=a191_0x5f509b,_0x104e58=parseCsv(_0x4473d1),_0x552c81=_0x104e58['map'](Number);if(_0x552c81[_0x47a042(0xb5)](_0x3c0bd6=>!Number[_0x47a042(0xef)](_0x3c0bd6)||_0x3c0bd6<=0x0))throw CliErrors[_0x47a042(0xa1)](_0x47a042(0xa8));return[...new Set(_0x552c81)];}function parseCsv(_0x2daae8){const _0x3165fb=a191_0x5f509b;return[...new Set(_0x2daae8['split'](',')[_0x3165fb(0xd5)](_0x15e22e=>_0x15e22e[_0x3165fb(0xe5)]())[_0x3165fb(0xc1)](Boolean))];}function parseBooleanFlag(_0xcb52,_0x4ae673,_0x2c1d3d){const _0x3cd79c=a191_0x5f509b;if(!hasFlag(_0xcb52,_0x4ae673)){if(_0x2c1d3d)throw CliErrors[_0x3cd79c(0xed)](_0x4ae673);return undefined;}const _0x18ee47=_0xcb52[_0x3cd79c(0xa0)][_0x4ae673];if(_0x18ee47===!![]||_0x18ee47===![])return _0x18ee47;if(_0x18ee47===_0x3cd79c(0xe7))return!![];if(_0x18ee47===_0x3cd79c(0xcf))return![];throw CliErrors[_0x3cd79c(0xa1)]('--'+_0x4ae673+'\x20must\x20be\x20true\x20or\x20false.');}function verifyVisibilityUpdate(_0x29c4a6,_0x2f1d31,_0x393f40){const _0x564306=a191_0x5f509b;assertVerified(!!_0x2f1d31,_0x564306(0xbb)+_0x29c4a6['id']+_0x564306(0x8a)),assertVerified(_0x2f1d31['visible']===_0x393f40,'Menu\x20'+_0x29c4a6['id']+_0x564306(0xe1));const _0x529b8f=[['id',_0x2f1d31['id'],_0x29c4a6['id']],[_0x564306(0xae),_0x2f1d31[_0x564306(0xae)],_0x29c4a6['parentId']],[_0x564306(0xd1),_0x2f1d31['depth'],_0x29c4a6['depth']],['label',_0x2f1d31[_0x564306(0x8e)],_0x29c4a6['label']],[_0x564306(0xcb),_0x2f1d31[_0x564306(0xcb)],_0x29c4a6['path']],[_0x564306(0x8b),_0x2f1d31[_0x564306(0x8b)],_0x29c4a6['url']],[_0x564306(0xa4),_0x2f1d31[_0x564306(0xa4)],_0x29c4a6[_0x564306(0xa4)]],[_0x564306(0x7f),_0x2f1d31[_0x564306(0x7f)],_0x29c4a6[_0x564306(0x7f)]],[_0x564306(0xe4),_0x2f1d31[_0x564306(0xe4)],_0x29c4a6[_0x564306(0xe4)]],[_0x564306(0xb1),_0x2f1d31[_0x564306(0xb1)],_0x29c4a6['resourcesValid']],[_0x564306(0xa3),_0x2f1d31['childrenIds'],_0x29c4a6['childrenIds']],[_0x564306(0xc2),_0x2f1d31[_0x564306(0xc2)],_0x29c4a6[_0x564306(0xc2)]],[_0x564306(0xaa),_0x2f1d31[_0x564306(0xaa)],_0x29c4a6['pageId']],[_0x564306(0xca),_0x2f1d31[_0x564306(0xca)],_0x29c4a6[_0x564306(0xca)]],[_0x564306(0xc0),_0x2f1d31[_0x564306(0xc0)],_0x29c4a6[_0x564306(0xc0)]],[_0x564306(0xb8),_0x2f1d31['datasetId'],_0x29c4a6[_0x564306(0xb8)]],[_0x564306(0xbf),_0x2f1d31[_0x564306(0xbf)],_0x29c4a6[_0x564306(0xbf)]]];for(const [_0x5a4713,_0x503088,_0x56139d]of _0x529b8f){assertVerified(sameValue(_0x503088,_0x56139d),_0x564306(0xbb)+_0x29c4a6['id']+'\x20'+_0x5a4713+_0x564306(0x96));}}function sameValue(_0x42d28f,_0x349d3c){const _0x48c7bf=a191_0x5f509b;if(Array[_0x48c7bf(0xbd)](_0x42d28f)||Array[_0x48c7bf(0xbd)](_0x349d3c))return JSON['stringify'](_0x42d28f)===JSON['stringify'](_0x349d3c);return _0x42d28f===_0x349d3c;}
1
+ const a191_0x426c28=a191_0xc495;function a191_0xc495(_0xb29df2,_0x31165e){_0xb29df2=_0xb29df2-0x12f;const _0x13399b=a191_0x1339();let _0xc495e3=_0x13399b[_0xb29df2];return _0xc495e3;}(function(_0x22ae45,_0x319817){const _0x30dbb8=a191_0xc495,_0x59c013=_0x22ae45();while(!![]){try{const _0xb0b57d=parseInt(_0x30dbb8(0x152))/0x1*(-parseInt(_0x30dbb8(0x182))/0x2)+parseInt(_0x30dbb8(0x171))/0x3*(parseInt(_0x30dbb8(0x14c))/0x4)+-parseInt(_0x30dbb8(0x151))/0x5+parseInt(_0x30dbb8(0x141))/0x6+-parseInt(_0x30dbb8(0x19f))/0x7*(parseInt(_0x30dbb8(0x15f))/0x8)+-parseInt(_0x30dbb8(0x1a7))/0x9+parseInt(_0x30dbb8(0x155))/0xa*(parseInt(_0x30dbb8(0x1ab))/0xb);if(_0xb0b57d===_0x319817)break;else _0x59c013['push'](_0x59c013['shift']());}catch(_0x42344a){_0x59c013['push'](_0x59c013['shift']());}}}(a191_0x1339,0x773db));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a191_0x1339(){const _0x3c754b=['verify\x20menu\x20visibility\x20update','modelType','\x20menu(s),\x20expected\x20','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','targets','152YCkkCo','menu_selector_not_found','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','expectVisible','before','depth','push','Menu\x20','\x20updated,\x20','childrenCount','true','Menu\x20visibility\x20update\x20completed:\x20','\x20menu(s);\x20skip\x20','stringify','appCode','update-recovery','update\x20visibility\x20for','parentId','981xPMEeo','plan','visible','\x20unchanged\x20menu(s).','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','menu','Updated\x20visibility\x20for\x20','menu-ids','expect-visible','isArray','trim','expected-count','resourcesValid','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','num','menu_permission_denied','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','34mZXaGP','sort','boolean','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','plannedActions','validation','Response\x20was\x20lost\x20for\x20menu\x20','visibility-update','verification','expectedCount','recovered','Selected\x20','update-menu-visibility','\x20must\x20be\x20true\x20or\x20false.','/smartapi/menu/update','get','datasetId','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','has','resources','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','path','pageType','childrenIds','label','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','update\x20menu\x20visibility','\x20failed.','One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','137543hEOZhp','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','requestedVisible','Menu\x20id\x20selector(s)\x20not\x20found:\x20','updated','rabetbase\x20menu\x20list\x20--format\x20compress','datasetCode','7802433gMwjff','join','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','hash','626021sSxrNg','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','\x20changed\x20unexpectedly.','type','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','map','beforeById','menuIds','string','rawFlags','pageId','write','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','flagMissing','message','false','\x20skipped,\x20','filter','cookie','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','menu_verification_failed','failed','3434250CJRQFb','POST','number','paths','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','body','some','set','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','length','url','4288RnThcQ','Response\x20was\x20lost\x20and\x20menu\x20','Menu\x20path\x20selector\x20not\x20found:\x20','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','isSafeInteger','3298790ujCnAo','51049Swopqb','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','menus','410NsEpxF','code','menu\x20list','warnings','Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources'];a191_0x1339=function(){return _0x3c754b;};return a191_0x1339();}import{fetchMenuSnapshot}from'../../commands/menu/shared/facts.js';import{asVerificationError,assertVerified,describeMenuErrorCause,fetchMutationSnapshot,hasFlag,isMenuResponseLoss,mapMenuApiError,menuDryRunResult,menuError,menuFailure,mutationResult,recheckMutationSnapshot}from'../../commands/menu/shared/mutations.js';import{updateMenuEntity}from'../../commands/menu/shared/service.js';import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x426c28(0x142),'path':a191_0x426c28(0x190)}];export const menuVisibilityUpdate={'service':a191_0x426c28(0x176),'command':'visibility-update','description':a191_0x426c28(0x159),'risk':a191_0x426c28(0x136),'structuredErrors':!![],'flags':[{'name':a191_0x426c28(0x178),'type':a191_0x426c28(0x133),'description':a191_0x426c28(0x193)},{'name':'paths','type':a191_0x426c28(0x133),'description':a191_0x426c28(0x181)},{'name':'visible','type':'boolean','required':!![],'description':'Requested\x20menu\x20visibility'},{'name':a191_0x426c28(0x179),'type':a191_0x426c28(0x184),'description':a191_0x426c28(0x19b)},{'name':'expected-count','type':a191_0x426c28(0x143),'description':a191_0x426c28(0x137)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1d33d1){parseInput(_0x1d33d1);},async 'dryRun'(_0x1d394b){const _0x118159=a191_0x426c28,_0x3f0300=await buildPlan(_0x1d394b,!![]),_0x2ba29e=_0x3f0300[_0x118159(0x172)][_0x118159(0x186)]?.[_0x118159(0x14a)]??0x0,_0x3ff4d9=_0x3f0300[_0x118159(0x172)][_0x118159(0x15e)]['length']-_0x2ba29e;return menuDryRunResult(_0x3f0300[_0x118159(0x172)],{'method':_0x118159(0x142),'url':_0x118159(0x190),'body':{'updates':_0x3f0300['plan']['plannedActions']?.[_0x118159(0x130)](_0x3d4063=>_0x3d4063[_0x118159(0x146)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0x2ba29e+_0x118159(0x16b)+_0x3ff4d9+_0x118159(0x174)});},async 'execute'(_0x295e82){const _0x284009=a191_0x426c28,_0x39a460=await buildPlan(_0x295e82,![]);await recheckMutationSnapshot(_0x295e82,_0x39a460[_0x284009(0x172)],_0x284009(0x19c));const _0x12e1f9=[],_0x4765b8=[],_0xb18290=[];for(const _0x1ec941 of _0x39a460[_0x284009(0x172)]['targets']){if(_0x1ec941[_0x284009(0x163)][_0x284009(0x173)]===_0x39a460[_0x284009(0x172)][_0x284009(0x1a2)]){_0x12e1f9[_0x284009(0x165)]({'id':_0x1ec941['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x295e82[_0x284009(0x16d)],_0x295e82[_0x284009(0x13d)],{'id':_0x1ec941['id'],'visible':_0x39a460['plan'][_0x284009(0x1a2)]}),_0x12e1f9[_0x284009(0x165)]({'id':_0x1ec941['id'],'updated':!![],'skipped':![]});}catch(_0x21a739){const _0x5d8353=mapMenuApiError(_0x21a739,_0x284009(0x16f),_0x1ec941['id']);if(isMenuResponseLoss(_0x21a739)&&_0x5d8353[_0x284009(0x156)]!==_0x284009(0x180)){_0xb18290['push'](_0x1ec941['id']);continue;}_0x4765b8['push']({'id':_0x1ec941['id'],'stage':'update','code':_0x5d8353['code'],'message':_0x5d8353[_0x284009(0x139)]});}}let _0x385654;try{_0x385654=await fetchMenuSnapshot(_0x295e82[_0x284009(0x16d)],_0x295e82['cookie']);}catch(_0x15dd2d){const _0x578c62=describeMenuErrorCause(_0x15dd2d,_0x284009(0x15a)),_0x50460c=_0xb18290[_0x284009(0x130)](_0x423473=>({'id':_0x423473,'stage':'update-recovery','code':_0x284009(0x13f),'message':_0x284009(0x188)+_0x423473+_0x284009(0x13e),'requestedStateConfirmed':![],'recovered':![]})),_0x3893d0={'stage':_0x284009(0x18a),'code':_0x284009(0x13f),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x39a460['plan'][_0x284009(0x15e)][_0x284009(0x130)](_0x2a008e=>_0x2a008e['id']),'requestedStateConfirmed':![],..._0x578c62};throw menuFailure(asVerificationError(_0x15dd2d,_0x284009(0x196)),_0x39a460[_0x284009(0x172)],{'stage':_0x284009(0x18a),'succeeded':_0x12e1f9,'failedRecords':[..._0x4765b8,..._0x50460c,_0x3893d0],'warnings':['The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0x284009(0x140),'recoveredCount':0x0,'lookupCommand':_0x284009(0x1a5)}});}const _0x3e760a=[];for(const _0x35429e of _0x12e1f9){const _0x2f9c68=Number(_0x35429e['id']),_0xbe6609=_0x39a460[_0x284009(0x131)]['get'](_0x2f9c68),_0x36af68=_0x385654['byId'][_0x284009(0x191)](_0x2f9c68);try{verifyVisibilityUpdate(_0xbe6609,_0x36af68,_0x39a460[_0x284009(0x172)][_0x284009(0x1a2)]);}catch(_0xbf4813){const _0x554dc5=asVerificationError(_0xbf4813,_0x284009(0x166)+_0x2f9c68+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x3e760a[_0x284009(0x165)]({'id':_0x2f9c68,'stage':'verification','code':_0x554dc5[_0x284009(0x156)],'message':_0x554dc5[_0x284009(0x139)],'requestedStateConfirmed':![]});}}for(const _0x33c503 of _0xb18290){const _0x4de119=_0x39a460[_0x284009(0x131)][_0x284009(0x191)](_0x33c503),_0x2db7e1=_0x385654['byId'][_0x284009(0x191)](_0x33c503);try{verifyVisibilityUpdate(_0x4de119,_0x2db7e1,_0x39a460['plan'][_0x284009(0x1a2)]),_0x12e1f9[_0x284009(0x165)]({'id':_0x33c503,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x56af3c){const _0x440c29=asVerificationError(_0x56af3c,_0x284009(0x14d)+_0x33c503+_0x284009(0x15d));_0x3e760a['push']({'id':_0x33c503,'stage':_0x284009(0x16e),'code':_0x440c29[_0x284009(0x156)],'message':_0x440c29[_0x284009(0x139)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x3e760a[_0x284009(0x14a)]>0x0){const _0x20f014=_0x3e760a[_0x284009(0x130)](_0x46d9b6=>Number(_0x46d9b6['id'])),_0x3598a0=_0x12e1f9[_0x284009(0x13c)](_0x61a9ef=>_0x61a9ef[_0x284009(0x18c)]===!![])['length'],_0x5d892f=menuError('menu_verification_failed',_0x284009(0x149)+_0x20f014['join'](',\x20')+'.',_0x284009(0x14f));throw menuFailure(_0x5d892f,_0x39a460['plan'],{'stage':_0x284009(0x18a),'succeeded':_0x12e1f9,'failedRecords':[..._0x4765b8,..._0x3e760a],'warnings':[_0x284009(0x19e)],'verification':{'status':'failed',..._0x20f014['length']===0x1?{'targetId':_0x20f014[0x0]}:{'targetIds':_0x20f014},'recoveredCount':_0x3598a0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x4ef3b5=_0x12e1f9[_0x284009(0x13c)](_0x4ca3e9=>_0x4ca3e9[_0x284009(0x1a4)]===!![])[_0x284009(0x14a)],_0x5c4120=_0x12e1f9[_0x284009(0x14a)]-_0x4ef3b5,_0x24a39d={..._0x39a460[_0x284009(0x172)],'succeeded':_0x12e1f9,'failed':_0x4765b8,'warnings':_0x4765b8[_0x284009(0x14a)]>0x0?[..._0x39a460[_0x284009(0x172)][_0x284009(0x158)],'Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.']:_0x39a460[_0x284009(0x172)][_0x284009(0x158)],'verification':{'checkedBy':_0x284009(0x157),'snapshotHash':_0x385654[_0x284009(0x1aa)],'matchesRequestedState':_0x4765b8[_0x284009(0x14a)]===0x0,'recoveredCount':_0xb18290['length']}};return{'ok':_0x4765b8[_0x284009(0x14a)]===0x0,'data':_0x24a39d,'message':_0x4765b8[_0x284009(0x14a)]===0x0?_0x284009(0x177)+_0x4ef3b5+'\x20menu(s);\x20skipped\x20'+_0x5c4120+_0x284009(0x174):_0x284009(0x16a)+_0x4ef3b5+_0x284009(0x167)+_0x5c4120+_0x284009(0x13b)+_0x4765b8[_0x284009(0x14a)]+_0x284009(0x19d)};}};function parseInput(_0x196306){const _0x3f4571=a191_0x426c28,_0x568ee6=parseMenuIds(_0x196306['str'](_0x3f4571(0x178))),_0x220d3d=parseCsv(_0x196306['str'](_0x3f4571(0x144)));if(_0x568ee6['length']===0x0&&_0x220d3d[_0x3f4571(0x14a)]===0x0)throw CliErrors['validation'](_0x3f4571(0x1a0));const _0x3f34fe=parseBooleanFlag(_0x196306,_0x3f4571(0x173),!![]),_0x128636=parseBooleanFlag(_0x196306,'expect-visible',![]);let _0x340b6d;if(hasFlag(_0x196306,'expected-count')){_0x340b6d=_0x196306[_0x3f4571(0x17f)](_0x3f4571(0x17c));if(!Number[_0x3f4571(0x150)](_0x340b6d)||_0x340b6d<0x0)throw CliErrors[_0x3f4571(0x187)](_0x3f4571(0x185));}return{'menuIds':_0x568ee6,'paths':_0x220d3d,'visible':_0x3f34fe,'expectVisible':_0x128636,'expectedCount':_0x340b6d};}async function buildPlan(_0x530f5c,_0x3c4f88){const _0x1d03ba=a191_0x426c28,_0x34bd4f=parseInput(_0x530f5c),_0x4b4741=await fetchMutationSnapshot(_0x530f5c,_0x1d03ba(0x19c)),_0x36af98=selectTargets(_0x4b4741[_0x1d03ba(0x154)],_0x34bd4f[_0x1d03ba(0x132)],_0x34bd4f['paths']);if(_0x34bd4f['expectedCount']!==undefined&&_0x36af98['length']!==_0x34bd4f[_0x1d03ba(0x18b)])throw menuError('menu_expected_count_mismatch',_0x1d03ba(0x18d)+_0x36af98['length']+_0x1d03ba(0x15c)+_0x34bd4f[_0x1d03ba(0x18b)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x34bd4f[_0x1d03ba(0x162)]!==undefined){const _0x449084=_0x36af98[_0x1d03ba(0x13c)](_0x8ff8e4=>_0x8ff8e4['visible']!==_0x34bd4f[_0x1d03ba(0x162)]);if(_0x449084[_0x1d03ba(0x14a)]>0x0)throw menuError('menu_state_drift',_0x1d03ba(0x17e)+_0x449084[_0x1d03ba(0x130)](_0x5cf09f=>_0x5cf09f['id'])['join'](',\x20')+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.');}const _0x4e4b4e=_0x36af98['map'](_0x29427a=>({'id':_0x29427a['id'],'label':_0x29427a[_0x1d03ba(0x19a)],'path':_0x29427a['path'],'before':{'visible':_0x29427a[_0x1d03ba(0x173)]},'after':{'visible':_0x34bd4f['visible']}})),_0x4ea964=_0x4e4b4e[_0x1d03ba(0x13c)](_0x5bf17f=>_0x5bf17f['before'][_0x1d03ba(0x173)]!==_0x34bd4f[_0x1d03ba(0x173)])[_0x1d03ba(0x130)](_0x1f2e8=>({'stage':_0x1d03ba(0x18e),'method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x530f5c[_0x1d03ba(0x16d)],'id':_0x1f2e8['id'],'visible':_0x34bd4f['visible']}})),_0x34606f=mutationResult({'operation':_0x1d03ba(0x189),'selector':{'menuIds':_0x34bd4f[_0x1d03ba(0x132)],'paths':_0x34bd4f[_0x1d03ba(0x144)]},'before':{'menus':_0x36af98[_0x1d03ba(0x130)](_0x9117e1=>({'id':_0x9117e1['id'],'path':_0x9117e1[_0x1d03ba(0x197)],'visible':_0x9117e1['visible']}))},'after':{'menus':_0x36af98['map'](_0x20dc01=>({'id':_0x20dc01['id'],'path':_0x20dc01[_0x1d03ba(0x197)],'visible':_0x34bd4f[_0x1d03ba(0x173)]}))},'dryRun':_0x3c4f88,'backend':[...BACKEND],'plannedActions':_0x4ea964,'snapshotHash':_0x4b4741[_0x1d03ba(0x1aa)],'warnings':_0x4ea964[_0x1d03ba(0x14a)]===0x0?[_0x1d03ba(0x1a1)]:[]});return{'plan':{..._0x34606f,'requestedVisible':_0x34bd4f[_0x1d03ba(0x173)],'targets':_0x4e4b4e},'beforeById':new Map(_0x36af98['map'](_0x5789df=>[_0x5789df['id'],_0x5789df]))};}function selectTargets(_0x94177e,_0x4ac0ed,_0x1dc750){const _0x5ac4f0=a191_0x426c28,_0x3f33c3=new Map(_0x94177e[_0x5ac4f0(0x130)](_0x2881c2=>[_0x2881c2['id'],_0x2881c2])),_0x21ff85=new Map(),_0x178802=_0x4ac0ed['filter'](_0x2f3a13=>!_0x3f33c3[_0x5ac4f0(0x194)](_0x2f3a13));if(_0x178802[_0x5ac4f0(0x14a)]>0x0)throw menuError(_0x5ac4f0(0x160),_0x5ac4f0(0x1a3)+_0x178802['join'](',\x20')+'.',_0x5ac4f0(0x153));for(const _0x10c10e of _0x4ac0ed){_0x21ff85['set'](_0x10c10e,_0x3f33c3[_0x5ac4f0(0x191)](_0x10c10e));}for(const _0x4007ec of _0x1dc750){const _0x1c8d27=_0x94177e['filter'](_0x31bcda=>_0x31bcda[_0x5ac4f0(0x197)]===_0x4007ec);if(_0x1c8d27[_0x5ac4f0(0x14a)]===0x0)throw menuError(_0x5ac4f0(0x160),_0x5ac4f0(0x14e)+JSON[_0x5ac4f0(0x16c)](_0x4007ec)+'.',_0x5ac4f0(0x1a9));if(_0x1c8d27['length']>0x1)throw menuError('menu_selector_ambiguous',_0x5ac4f0(0x161)+JSON['stringify'](_0x4007ec)+'.',_0x5ac4f0(0x12f)+_0x1c8d27[_0x5ac4f0(0x130)](_0x293ad7=>_0x293ad7['id'])[_0x5ac4f0(0x1a8)](',\x20')+'.');const _0xaa8cbe=_0x1c8d27[0x0];_0x21ff85[_0x5ac4f0(0x148)](_0xaa8cbe['id'],_0xaa8cbe);}return[..._0x21ff85['values']()];}function parseMenuIds(_0xe663ea){const _0x1d0c65=a191_0x426c28,_0x41e4d2=parseCsv(_0xe663ea),_0x33df56=_0x41e4d2[_0x1d0c65(0x130)](Number);if(_0x33df56[_0x1d0c65(0x147)](_0x20a0f7=>!Number[_0x1d0c65(0x150)](_0x20a0f7)||_0x20a0f7<=0x0))throw CliErrors[_0x1d0c65(0x187)](_0x1d0c65(0x1ac));return[...new Set(_0x33df56)];}function parseCsv(_0x1d326e){const _0x481c14=a191_0x426c28;return[...new Set(_0x1d326e['split'](',')[_0x481c14(0x130)](_0x263f86=>_0x263f86[_0x481c14(0x17b)]())[_0x481c14(0x13c)](Boolean))];}function parseBooleanFlag(_0x58a3e8,_0x4c7a22,_0x536372){const _0xb18b83=a191_0x426c28;if(!hasFlag(_0x58a3e8,_0x4c7a22)){if(_0x536372)throw CliErrors[_0xb18b83(0x138)](_0x4c7a22);return undefined;}const _0x3af518=_0x58a3e8[_0xb18b83(0x134)][_0x4c7a22];if(_0x3af518===!![]||_0x3af518===![])return _0x3af518;if(_0x3af518===_0xb18b83(0x169))return!![];if(_0x3af518===_0xb18b83(0x13a))return![];throw CliErrors[_0xb18b83(0x187)]('--'+_0x4c7a22+_0xb18b83(0x18f));}function verifyVisibilityUpdate(_0x3a0858,_0xaa1c87,_0x13ac52){const _0x183ff5=a191_0x426c28;assertVerified(!!_0xaa1c87,_0x183ff5(0x166)+_0x3a0858['id']+_0x183ff5(0x175)),assertVerified(_0xaa1c87['visible']===_0x13ac52,_0x183ff5(0x166)+_0x3a0858['id']+_0x183ff5(0x145));const _0x1dbeb1=[['id',_0xaa1c87['id'],_0x3a0858['id']],[_0x183ff5(0x170),_0xaa1c87['parentId'],_0x3a0858[_0x183ff5(0x170)]],[_0x183ff5(0x164),_0xaa1c87[_0x183ff5(0x164)],_0x3a0858['depth']],[_0x183ff5(0x19a),_0xaa1c87['label'],_0x3a0858[_0x183ff5(0x19a)]],['path',_0xaa1c87[_0x183ff5(0x197)],_0x3a0858[_0x183ff5(0x197)]],[_0x183ff5(0x14b),_0xaa1c87[_0x183ff5(0x14b)],_0x3a0858['url']],[_0x183ff5(0x1ae),_0xaa1c87[_0x183ff5(0x1ae)],_0x3a0858[_0x183ff5(0x1ae)]],[_0x183ff5(0x183),_0xaa1c87[_0x183ff5(0x183)],_0x3a0858[_0x183ff5(0x183)]],[_0x183ff5(0x195),_0xaa1c87[_0x183ff5(0x195)],_0x3a0858[_0x183ff5(0x195)]],[_0x183ff5(0x17d),_0xaa1c87[_0x183ff5(0x17d)],_0x3a0858[_0x183ff5(0x17d)]],[_0x183ff5(0x199),_0xaa1c87[_0x183ff5(0x199)],_0x3a0858['childrenIds']],[_0x183ff5(0x168),_0xaa1c87[_0x183ff5(0x168)],_0x3a0858['childrenCount']],[_0x183ff5(0x135),_0xaa1c87[_0x183ff5(0x135)],_0x3a0858[_0x183ff5(0x135)]],[_0x183ff5(0x198),_0xaa1c87['pageType'],_0x3a0858['pageType']],[_0x183ff5(0x15b),_0xaa1c87[_0x183ff5(0x15b)],_0x3a0858[_0x183ff5(0x15b)]],[_0x183ff5(0x192),_0xaa1c87['datasetId'],_0x3a0858['datasetId']],[_0x183ff5(0x1a6),_0xaa1c87[_0x183ff5(0x1a6)],_0x3a0858[_0x183ff5(0x1a6)]]];for(const [_0x4ec0b3,_0x4bf06a,_0x1f40d6]of _0x1dbeb1){assertVerified(sameValue(_0x4bf06a,_0x1f40d6),'Menu\x20'+_0x3a0858['id']+'\x20'+_0x4ec0b3+_0x183ff5(0x1ad));}}function sameValue(_0x9bff1c,_0x315337){const _0x6b21e5=a191_0x426c28;if(Array[_0x6b21e5(0x17a)](_0x9bff1c)||Array['isArray'](_0x315337))return JSON[_0x6b21e5(0x16c)](_0x9bff1c)===JSON[_0x6b21e5(0x16c)](_0x315337);return _0x9bff1c===_0x315337;}
@@ -1 +1 @@
1
- const a192_0x41b03a=a192_0x5ca5;function a192_0x5ca5(_0x12593d,_0x213e0a){_0x12593d=_0x12593d-0x8e;const _0x224bb2=a192_0x224b();let _0x5ca57c=_0x224bb2[_0x12593d];return _0x5ca57c;}(function(_0x43b90e,_0x548c4d){const _0x502d9a=a192_0x5ca5,_0x571630=_0x43b90e();while(!![]){try{const _0x447e36=parseInt(_0x502d9a(0xa3))/0x1+parseInt(_0x502d9a(0xac))/0x2*(parseInt(_0x502d9a(0xaf))/0x3)+parseInt(_0x502d9a(0x94))/0x4*(parseInt(_0x502d9a(0xa5))/0x5)+parseInt(_0x502d9a(0xaa))/0x6+parseInt(_0x502d9a(0x9e))/0x7*(-parseInt(_0x502d9a(0x99))/0x8)+-parseInt(_0x502d9a(0xa6))/0x9+-parseInt(_0x502d9a(0x9f))/0xa;if(_0x447e36===_0x548c4d)break;else _0x571630['push'](_0x571630['shift']());}catch(_0x3f5a99){_0x571630['push'](_0x571630['shift']());}}}(a192_0x224b,0x6ade0));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=a192_0x41b03a(0x98);async function prepareCreate(_0x61a51e){const _0x4b997c=a192_0x41b03a,_0x5ed966=await readNotificationDocument(_0x61a51e,_0x4b997c(0x9d)),_0x25d567=createMutationInput(_0x61a51e[_0x4b997c(0xa2)],_0x5ed966);return{'document':_0x5ed966,'input':_0x25d567,'planned':projectNotificationConfig({'appCode':_0x61a51e[_0x4b997c(0xa2)],'configName':_0x5ed966[_0x4b997c(0x9c)],'channelType':_0x5ed966['channelType'],'endpointUrl':_0x5ed966[_0x4b997c(0xae)],'channelConfig':_0x5ed966[_0x4b997c(0x9b)],'description':_0x5ed966[_0x4b997c(0x8f)],'connectTimeout':_0x5ed966[_0x4b997c(0xb2)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x5ed966[_0x4b997c(0xa7)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}function a192_0x224b(){const _0x547c40=['174435zKFdhp','write','795mjbQwl','3034053tsqbUb','readTimeout',';\x20do\x20not\x20resubmit\x20automatically.','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','3136728wkMDmD','notification_config_create_outcome_unknown','4ZdSwqm','POST','endpointUrl','823602ZDxPZB','document','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','connectTimeout','channelType','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','description','input','Inspect\x20with\x20','Created\x20notification\x20config\x20',';\x20do\x20not\x20resubmit.','17756cAGyHe','notification',';\x20no\x20automatic\x20retry\x20was\x20attempted.','verification','/notification/channel-config/create','1016PguoFj','verified','channelConfig','configName','create','16891nyublg','8707960NJRydu','planned','configCode','appCode'];a192_0x224b=function(){return _0x547c40;};return a192_0x224b();}export const notificationConfigCreate={'service':a192_0x41b03a(0x95),'command':'config-create','description':a192_0x41b03a(0x8e),'risk':a192_0x41b03a(0xa4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1bb7d9){assertSingleNotificationSource(_0x1bb7d9);},async 'dryRun'(_0x30ae7b){const _0x81bf01=a192_0x41b03a,_0x1545e2=await prepareCreate(_0x30ae7b),_0x411123=notificationLookupCommand(_0x30ae7b[_0x81bf01(0xa2)],_0x1545e2[_0x81bf01(0xb0)][_0x81bf01(0xb3)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x30ae7b[_0x81bf01(0xa2)],'configName':_0x1545e2[_0x81bf01(0xb0)][_0x81bf01(0x9c)],'channelType':_0x1545e2[_0x81bf01(0xb0)][_0x81bf01(0xb3)]},'before':null,'after':_0x1545e2[_0x81bf01(0xa0)],'dryRun':!![],'backend':{'method':_0x81bf01(0xad),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x81bf01(0xa0),'lookupCommand':_0x411123}},{'method':_0x81bf01(0xad),'url':CREATE_PATH});},async 'execute'(_0x3c63d2){const _0x46ca12=a192_0x41b03a,_0x2dc42f=await prepareCreate(_0x3c63d2),_0x1d6d55=notificationLookupCommand(_0x3c63d2['appCode'],_0x2dc42f['document'][_0x46ca12(0xb3)]);let _0x2143a8;try{_0x2143a8=await createNotificationChannelConfig(_0x2dc42f[_0x46ca12(0x90)]);}catch(_0xc20d99){if(isPlatformTransportFailure(_0xc20d99))throw notificationError(_0x46ca12(0xab),_0x46ca12(0xa9),_0x46ca12(0x91)+_0x1d6d55+_0x46ca12(0x93));throw safeApiFailure('create','mutation',_0x46ca12(0x91)+_0x1d6d55+_0x46ca12(0x96));}if(!Number['isSafeInteger'](_0x2143a8)||_0x2143a8<=0x0)throw notificationError(_0x46ca12(0xab),_0x46ca12(0xb1),_0x46ca12(0x91)+_0x1d6d55+';\x20do\x20not\x20resubmit.');let _0x5acb78;try{const _0x5eb07c=await getNotificationChannelConfig(_0x2143a8,_0x3c63d2[_0x46ca12(0xa2)]);_0x5acb78=normalizeExactNotificationConfig(_0x5eb07c,_0x2143a8,_0x3c63d2[_0x46ca12(0xa2)]);}catch{throw safeApiFailure(_0x46ca12(0x9d),_0x46ca12(0x97),_0x46ca12(0x91)+_0x1d6d55+_0x46ca12(0xa8));}return{'ok':!![],'data':{'operation':_0x46ca12(0x9d),'selector':{'appCode':_0x5acb78['appCode'],'id':_0x5acb78['id'],'configCode':_0x5acb78[_0x46ca12(0xa1)],'configName':_0x5acb78['configName'],'channelType':_0x5acb78[_0x46ca12(0xb3)]},'before':null,'after':projectNotificationConfig(_0x5acb78),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x46ca12(0x9a),'lookupCommand':_0x1d6d55}},'message':_0x46ca12(0x92)+_0x5acb78['id']};}};
1
+ const a192_0xcc02aa=a192_0xd515;(function(_0xa81574,_0x349ae0){const _0x1bf603=a192_0xd515,_0x47799a=_0xa81574();while(!![]){try{const _0x1b9366=parseInt(_0x1bf603(0x14b))/0x1+-parseInt(_0x1bf603(0x14e))/0x2*(parseInt(_0x1bf603(0x142))/0x3)+parseInt(_0x1bf603(0x145))/0x4*(parseInt(_0x1bf603(0x143))/0x5)+-parseInt(_0x1bf603(0x158))/0x6*(-parseInt(_0x1bf603(0x140))/0x7)+-parseInt(_0x1bf603(0x149))/0x8*(parseInt(_0x1bf603(0x147))/0x9)+parseInt(_0x1bf603(0x156))/0xa+-parseInt(_0x1bf603(0x144))/0xb;if(_0x1b9366===_0x349ae0)break;else _0x47799a['push'](_0x47799a['shift']());}catch(_0x685f1f){_0x47799a['push'](_0x47799a['shift']());}}}(a192_0xae7f,0x9489f));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH='/notification/channel-config/create';async function prepareCreate(_0xb6085e){const _0x1425ce=a192_0xd515,_0xb077a6=await readNotificationDocument(_0xb6085e,_0x1425ce(0x14a)),_0x25f3c6=createMutationInput(_0xb6085e[_0x1425ce(0x15b)],_0xb077a6);return{'document':_0xb077a6,'input':_0x25f3c6,'planned':projectNotificationConfig({'appCode':_0xb6085e['appCode'],'configName':_0xb077a6[_0x1425ce(0x13c)],'channelType':_0xb077a6[_0x1425ce(0x154)],'endpointUrl':_0xb077a6[_0x1425ce(0x14c)],'channelConfig':_0xb077a6[_0x1425ce(0x141)],'description':_0xb077a6[_0x1425ce(0x15c)],'connectTimeout':_0xb077a6[_0x1425ce(0x13f)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0xb077a6[_0x1425ce(0x13e)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a192_0xcc02aa(0x14d),'description':a192_0xcc02aa(0x13b),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x1d9196){assertSingleNotificationSource(_0x1d9196);},async 'dryRun'(_0x349ffe){const _0x2bcad7=a192_0xcc02aa,_0x816cae=await prepareCreate(_0x349ffe),_0x4b4b8d=notificationLookupCommand(_0x349ffe[_0x2bcad7(0x15b)],_0x816cae[_0x2bcad7(0x151)][_0x2bcad7(0x154)]);return asDryRunResult({'operation':_0x2bcad7(0x14a),'selector':{'appCode':_0x349ffe[_0x2bcad7(0x15b)],'configName':_0x816cae[_0x2bcad7(0x151)][_0x2bcad7(0x13c)],'channelType':_0x816cae[_0x2bcad7(0x151)][_0x2bcad7(0x154)]},'before':null,'after':_0x816cae[_0x2bcad7(0x157)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2bcad7(0x157),'lookupCommand':_0x4b4b8d}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x328eba){const _0x2f3fed=a192_0xcc02aa,_0x356a62=await prepareCreate(_0x328eba),_0x1817ae=notificationLookupCommand(_0x328eba[_0x2f3fed(0x15b)],_0x356a62[_0x2f3fed(0x151)]['channelType']);let _0x4eb716;try{_0x4eb716=await createNotificationChannelConfig(_0x356a62[_0x2f3fed(0x152)]);}catch(_0x1cebd2){if(isPlatformTransportFailure(_0x1cebd2))throw notificationError(_0x2f3fed(0x159),_0x2f3fed(0x148),_0x2f3fed(0x150)+_0x1817ae+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x2f3fed(0x14a),'mutation',_0x2f3fed(0x150)+_0x1817ae+_0x2f3fed(0x153));}if(!Number[_0x2f3fed(0x155)](_0x4eb716)||_0x4eb716<=0x0)throw notificationError(_0x2f3fed(0x159),_0x2f3fed(0x15d),_0x2f3fed(0x150)+_0x1817ae+_0x2f3fed(0x146));let _0x300073;try{const _0x17ca55=await getNotificationChannelConfig(_0x4eb716,_0x328eba[_0x2f3fed(0x15b)]);_0x300073=normalizeExactNotificationConfig(_0x17ca55,_0x4eb716,_0x328eba[_0x2f3fed(0x15b)]);}catch{throw safeApiFailure(_0x2f3fed(0x14a),_0x2f3fed(0x15a),_0x2f3fed(0x150)+_0x1817ae+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x2f3fed(0x14a),'selector':{'appCode':_0x300073['appCode'],'id':_0x300073['id'],'configCode':_0x300073['configCode'],'configName':_0x300073[_0x2f3fed(0x13c)],'channelType':_0x300073[_0x2f3fed(0x154)]},'before':null,'after':projectNotificationConfig(_0x300073),'dryRun':![],'backend':{'method':_0x2f3fed(0x13d),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2f3fed(0x14f),'lookupCommand':_0x1817ae}},'message':'Created\x20notification\x20config\x20'+_0x300073['id']};}};function a192_0xd515(_0x1eee9c,_0x19155b){_0x1eee9c=_0x1eee9c-0x13b;const _0xae7f2e=a192_0xae7f();let _0xd51550=_0xae7f2e[_0x1eee9c];return _0xd51550;}function a192_0xae7f(){const _0x23b656=['notification_config_create_outcome_unknown','verification','appCode','description','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','configName','POST','readTimeout','connectTimeout','1805454qeOKkD','channelConfig','2279535HSpTDP','3635VTduiD','2950299kJPcVS','796tVkbSY',';\x20do\x20not\x20resubmit.','639qdgoaZ','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','3440xagQnV','create','885973ocZHSc','endpointUrl','config-create','2DlgOMv','verified','Inspect\x20with\x20','document','input',';\x20no\x20automatic\x20retry\x20was\x20attempted.','channelType','isSafeInteger','3784310eUjiHb','planned','6TSujNE'];a192_0xae7f=function(){return _0x23b656;};return a192_0xae7f();}
@@ -1 +1 @@
1
- function a193_0x3f81(){const _0x2a2404=['notification_config_delete_verification_failed','Inspect\x20with\x20','4084762EheXDJ','appCode','60609oaJmKp','POST','24ePXhdX','some','planned','notification_config_delete_verification_unavailable','unshift','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','notification','delete','before','20GdyqEg','14428OLrLYy','high-risk-write','209286xBhSHR','Notification\x20config\x20','2CDPriE','305bYiqyi','config-delete','channelType',';\x20do\x20not\x20resubmit\x20automatically.','notification_config_delete_outcome_unknown','1887120wszwTC','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','2727210MBnmPC','\x20remains\x20present\x20after\x20delete.','124523RMYgas'];a193_0x3f81=function(){return _0x2a2404;};return a193_0x3f81();}const a193_0xf663d1=a193_0x47b0;(function(_0x634bcf,_0x2b5517){const _0x20e760=a193_0x47b0,_0x1e2c24=_0x634bcf();while(!![]){try{const _0x33247f=-parseInt(_0x20e760(0x1c3))/0x1*(parseInt(_0x20e760(0x1b9))/0x2)+parseInt(_0x20e760(0x1c8))/0x3+parseInt(_0x20e760(0x1b5))/0x4*(-parseInt(_0x20e760(0x1ba))/0x5)+-parseInt(_0x20e760(0x1c1))/0x6+parseInt(_0x20e760(0x1b7))/0x7*(parseInt(_0x20e760(0x1ca))/0x8)+parseInt(_0x20e760(0x1bf))/0x9+parseInt(_0x20e760(0x1b4))/0xa*(parseInt(_0x20e760(0x1c6))/0xb);if(_0x33247f===_0x2b5517)break;else _0x1e2c24['push'](_0x1e2c24['shift']());}catch(_0x1974c5){_0x1e2c24['push'](_0x1e2c24['shift']());}}}(a193_0x3f81,0x40408));import{asDryRunResult}from'../../commands/common/dry-run.js';function a193_0x47b0(_0x5202df,_0x2af888){_0x5202df=_0x5202df-0x1b1;const _0x3f812c=a193_0x3f81();let _0x47b0fa=_0x3f812c[_0x5202df];return _0x47b0fa;}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH='/notification/channel-config/delete',REFERENCE_WARNING=a193_0xf663d1(0x1c0);async function prepareDelete(_0x45a1a6){const _0x33b953=a193_0xf663d1,_0x3e31af=readNotificationId(_0x45a1a6),_0x64d3dc=await requireExactNotificationConfig(_0x45a1a6['appCode'],_0x3e31af,_0x33b953(0x1b2));return{'id':_0x3e31af,'before':_0x64d3dc};}export const notificationConfigDelete={'service':a193_0xf663d1(0x1b1),'command':a193_0xf663d1(0x1bb),'description':a193_0xf663d1(0x1d0),'risk':a193_0xf663d1(0x1b6),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x5703a3){readNotificationId(_0x5703a3),requireNotificationExplicitYes(_0x5703a3);},async 'dryRun'(_0x54e86c){const _0x38b975=a193_0xf663d1,_0x37ff0b=await prepareDelete(_0x54e86c),_0x14ff35=notificationLookupCommand(_0x54e86c[_0x38b975(0x1c7)],_0x37ff0b[_0x38b975(0x1b3)][_0x38b975(0x1bc)]);return asDryRunResult({'operation':_0x38b975(0x1b2),'selector':notificationSelector(_0x37ff0b[_0x38b975(0x1b3)]),'before':projectNotificationConfig(_0x37ff0b[_0x38b975(0x1b3)]),'after':null,'dryRun':!![],'backend':{'method':_0x38b975(0x1c9),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x38b975(0x1cc),'lookupCommand':_0x14ff35}},{'method':_0x38b975(0x1c9),'url':DELETE_PATH});},async 'execute'(_0x517047){const _0x2a6438=a193_0xf663d1;requireNotificationExplicitYes(_0x517047);const _0x529293=await prepareDelete(_0x517047),_0x100d5c=notificationLookupCommand(_0x517047['appCode'],_0x529293[_0x2a6438(0x1b3)][_0x2a6438(0x1bc)]);let _0x52c130=![];try{await deleteNotificationChannelConfig(_0x529293['id'],_0x517047['appCode']);}catch(_0x2fc150){if(!isPlatformTransportFailure(_0x2fc150))throw safeApiFailure(_0x2a6438(0x1b2),'mutation',_0x2a6438(0x1c5)+_0x100d5c+';\x20no\x20automatic\x20retry\x20was\x20attempted.');_0x52c130=!![];}let _0x5e4bc1;try{_0x5e4bc1=await listNotificationChannelConfigs(_0x517047[_0x2a6438(0x1c7)],_0x529293[_0x2a6438(0x1b3)][_0x2a6438(0x1bc)]),validateNotificationDeleteReadback(_0x5e4bc1,_0x517047['appCode'],_0x529293['before'][_0x2a6438(0x1bc)]);}catch{throw notificationError(_0x52c130?_0x2a6438(0x1be):_0x2a6438(0x1cd),_0x2a6438(0x1b8)+_0x529293['id']+'\x20delete\x20could\x20not\x20be\x20verified.',_0x2a6438(0x1c5)+_0x100d5c+_0x2a6438(0x1bd));}if(_0x5e4bc1[_0x2a6438(0x1cb)](_0xa59bfd=>_0xa59bfd['id']===_0x529293['id']))throw notificationError(_0x52c130?'notification_config_delete_outcome_unknown':_0x2a6438(0x1c4),_0x2a6438(0x1b8)+_0x529293['id']+_0x2a6438(0x1c2),_0x2a6438(0x1c5)+_0x100d5c+_0x2a6438(0x1bd));const _0x282b6c=[REFERENCE_WARNING];return _0x52c130&&_0x282b6c[_0x2a6438(0x1ce)](_0x2a6438(0x1cf)),{'ok':!![],'data':{'operation':'delete','selector':notificationSelector(_0x529293['before']),'before':projectNotificationConfig(_0x529293[_0x2a6438(0x1b3)]),'after':null,'dryRun':![],'backend':{'method':_0x2a6438(0x1c9),'path':DELETE_PATH},'warnings':_0x282b6c,'verification':{'status':'verified','absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x52c130,'lookupCommand':_0x100d5c}},'message':'Deleted\x20notification\x20config\x20'+_0x529293['id']};}};
1
+ function a193_0x16cf(){const _0x16b2cf=['Notification\x20config\x20','notification','3KLwawQ','POST','1082324EhTMRp','Inspect\x20with\x20','notification_config_delete_outcome_unknown','notification_config_delete_verification_unavailable','unshift','high-risk-write','appCode',';\x20do\x20not\x20resubmit\x20automatically.','6BWHqPp','2602255RnOuSW','93424gAhqhV','6768251ibmayl','/notification/channel-config/delete','6469570lCKtlT','\x20delete\x20could\x20not\x20be\x20verified.','5202532jPoXgx','verified','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','delete','9EFCjrl','before','1948173ZWRSGT',';\x20no\x20automatic\x20retry\x20was\x20attempted.','channelType'];a193_0x16cf=function(){return _0x16b2cf;};return a193_0x16cf();}const a193_0x229609=a193_0x25d6;function a193_0x25d6(_0x4da0a7,_0x286c12){_0x4da0a7=_0x4da0a7-0x175;const _0x16cfee=a193_0x16cf();let _0x25d636=_0x16cfee[_0x4da0a7];return _0x25d636;}(function(_0x5ddcaa,_0x5e0d36){const _0x517b67=a193_0x25d6,_0x57332c=_0x5ddcaa();while(!![]){try{const _0x4d6861=parseInt(_0x517b67(0x188))/0x1+parseInt(_0x517b67(0x18f))/0x2+-parseInt(_0x517b67(0x18d))/0x3*(parseInt(_0x517b67(0x182))/0x4)+-parseInt(_0x517b67(0x17c))/0x5+-parseInt(_0x517b67(0x17b))/0x6*(-parseInt(_0x517b67(0x17e))/0x7)+-parseInt(_0x517b67(0x17d))/0x8+-parseInt(_0x517b67(0x186))/0x9*(parseInt(_0x517b67(0x180))/0xa);if(_0x4d6861===_0x5e0d36)break;else _0x57332c['push'](_0x57332c['shift']());}catch(_0x1a93d5){_0x57332c['push'](_0x57332c['shift']());}}}(a193_0x16cf,0xee67d));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';const DELETE_PATH=a193_0x229609(0x17f),REFERENCE_WARNING=a193_0x229609(0x184);async function prepareDelete(_0x5e8790){const _0x1185f7=a193_0x229609,_0x245da0=readNotificationId(_0x5e8790),_0x4a9436=await requireExactNotificationConfig(_0x5e8790[_0x1185f7(0x179)],_0x245da0,_0x1185f7(0x185));return{'id':_0x245da0,'before':_0x4a9436};}export const notificationConfigDelete={'service':a193_0x229609(0x18c),'command':'config-delete','description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a193_0x229609(0x178),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x38bb7d){readNotificationId(_0x38bb7d),requireNotificationExplicitYes(_0x38bb7d);},async 'dryRun'(_0x12ae63){const _0xaf9a21=a193_0x229609,_0x29192f=await prepareDelete(_0x12ae63),_0x257cfa=notificationLookupCommand(_0x12ae63['appCode'],_0x29192f[_0xaf9a21(0x187)][_0xaf9a21(0x18a)]);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x29192f['before']),'before':projectNotificationConfig(_0x29192f['before']),'after':null,'dryRun':!![],'backend':{'method':_0xaf9a21(0x18e),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':'planned','lookupCommand':_0x257cfa}},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x57b843){const _0x537fc0=a193_0x229609;requireNotificationExplicitYes(_0x57b843);const _0x5dd997=await prepareDelete(_0x57b843),_0x5c21ba=notificationLookupCommand(_0x57b843[_0x537fc0(0x179)],_0x5dd997[_0x537fc0(0x187)][_0x537fc0(0x18a)]);let _0x250f71=![];try{await deleteNotificationChannelConfig(_0x5dd997['id'],_0x57b843[_0x537fc0(0x179)]);}catch(_0x172b75){if(!isPlatformTransportFailure(_0x172b75))throw safeApiFailure('delete','mutation',_0x537fc0(0x190)+_0x5c21ba+_0x537fc0(0x189));_0x250f71=!![];}let _0xbfa4cc;try{_0xbfa4cc=await listNotificationChannelConfigs(_0x57b843[_0x537fc0(0x179)],_0x5dd997[_0x537fc0(0x187)][_0x537fc0(0x18a)]),validateNotificationDeleteReadback(_0xbfa4cc,_0x57b843[_0x537fc0(0x179)],_0x5dd997[_0x537fc0(0x187)][_0x537fc0(0x18a)]);}catch{throw notificationError(_0x250f71?_0x537fc0(0x175):_0x537fc0(0x176),'Notification\x20config\x20'+_0x5dd997['id']+_0x537fc0(0x181),_0x537fc0(0x190)+_0x5c21ba+_0x537fc0(0x17a));}if(_0xbfa4cc['some'](_0x23be3d=>_0x23be3d['id']===_0x5dd997['id']))throw notificationError(_0x250f71?_0x537fc0(0x175):'notification_config_delete_verification_failed',_0x537fc0(0x18b)+_0x5dd997['id']+'\x20remains\x20present\x20after\x20delete.',_0x537fc0(0x190)+_0x5c21ba+_0x537fc0(0x17a));const _0x4a5784=[REFERENCE_WARNING];return _0x250f71&&_0x4a5784[_0x537fc0(0x177)]('Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x537fc0(0x185),'selector':notificationSelector(_0x5dd997[_0x537fc0(0x187)]),'before':projectNotificationConfig(_0x5dd997[_0x537fc0(0x187)]),'after':null,'dryRun':![],'backend':{'method':_0x537fc0(0x18e),'path':DELETE_PATH},'warnings':_0x4a5784,'verification':{'status':_0x537fc0(0x183),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x250f71,'lookupCommand':_0x5c21ba}},'message':'Deleted\x20notification\x20config\x20'+_0x5dd997['id']};}};
@@ -1 +1 @@
1
- const a194_0x45a942=a194_0x4136;(function(_0x4f3399,_0x32b444){const _0x27febf=a194_0x4136,_0x5a09a5=_0x4f3399();while(!![]){try{const _0x1e159c=-parseInt(_0x27febf(0x1b6))/0x1*(-parseInt(_0x27febf(0x1be))/0x2)+parseInt(_0x27febf(0x1b8))/0x3+-parseInt(_0x27febf(0x1c1))/0x4+-parseInt(_0x27febf(0x1b7))/0x5*(parseInt(_0x27febf(0x1b1))/0x6)+-parseInt(_0x27febf(0x1ad))/0x7+parseInt(_0x27febf(0x1b5))/0x8+parseInt(_0x27febf(0x1bb))/0x9;if(_0x1e159c===_0x32b444)break;else _0x5a09a5['push'](_0x5a09a5['shift']());}catch(_0x6801da){_0x5a09a5['push'](_0x5a09a5['shift']());}}}(a194_0xe63e,0xbc5f9));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a194_0x4136(_0x3c7a44,_0xc2dac1){_0x3c7a44=_0x3c7a44-0x1ad;const _0xe63e10=a194_0xe63e();let _0x413646=_0xe63e10[_0x3c7a44];return _0x413646;}import{CliErrors}from'../../errors.js';function a194_0xe63e(){const _0x1141d9=['config-list','type','2650224kukstA','1GviNYD','963565jbTTkt','3211917uUYdDL','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','31689954DNOsPh','string','bool','806676vSLyPT','all','flat','5913576kkQXxL','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','read','\x20notification\x20config(s)','trim','boolean','map','10742802HDkTyj','validation','Found\x20','appCode','48bdSafr','length'];a194_0xe63e=function(){return _0x1141d9;};return a194_0xe63e();}import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':'notification','command':a194_0x45a942(0x1b3),'description':a194_0x45a942(0x1ba),'risk':a194_0x45a942(0x1c3),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a194_0x45a942(0x1bc),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x45a942(0x1c6),'default':![],'description':a194_0x45a942(0x1b9)}],async 'validate'(_0xba3b34){const _0x448e1f=a194_0x45a942;if(_0xba3b34[_0x448e1f(0x1bd)]('all')&&_0xba3b34['str'](_0x448e1f(0x1b4))[_0x448e1f(0x1c5)]())throw CliErrors[_0x448e1f(0x1ae)]('--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.');if(_0xba3b34['bool'](_0x448e1f(0x1bf)))return;readNotificationChannelType(_0xba3b34);},async 'execute'(_0x4d572a){const _0x19d613=a194_0x45a942;if(_0x4d572a[_0x19d613(0x1bd)](_0x19d613(0x1bf))){const _0x4de92a=await Promise[_0x19d613(0x1bf)](NOTIFICATION_CHANNEL_TYPES[_0x19d613(0x1c7)](_0x55146d=>listNotificationChannelConfigs(_0x4d572a[_0x19d613(0x1b0)],_0x55146d))),_0xba7ed5=_0x4de92a[_0x19d613(0x1c0)]()[_0x19d613(0x1c7)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x4d572a[_0x19d613(0x1b0)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0xba7ed5[_0x19d613(0x1b2)],'configs':_0xba7ed5},'message':_0x19d613(0x1af)+_0xba7ed5[_0x19d613(0x1b2)]+_0x19d613(0x1c2)};}const _0x247df5=readNotificationChannelType(_0x4d572a),_0xe7a1b4=await listNotificationChannelConfigs(_0x4d572a[_0x19d613(0x1b0)],_0x247df5),_0x364656=_0xe7a1b4[_0x19d613(0x1c7)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x4d572a[_0x19d613(0x1b0)],'channelType':_0x247df5,'count':_0x364656[_0x19d613(0x1b2)],'configs':_0x364656},'message':_0x19d613(0x1af)+_0x364656[_0x19d613(0x1b2)]+'\x20'+_0x247df5+_0x19d613(0x1c4)};}};
1
+ function a194_0x3bce(_0x30960b,_0x5cef2c){_0x30960b=_0x30960b-0x15c;const _0x5dfa67=a194_0x5dfa();let _0x3bcebc=_0x5dfa67[_0x30960b];return _0x3bcebc;}const a194_0x5ad703=a194_0x3bce;(function(_0x21e5d4,_0x3a39fc){const _0xc746d5=a194_0x3bce,_0x162671=_0x21e5d4();while(!![]){try{const _0x52f232=parseInt(_0xc746d5(0x177))/0x1*(-parseInt(_0xc746d5(0x162))/0x2)+parseInt(_0xc746d5(0x169))/0x3+parseInt(_0xc746d5(0x16e))/0x4+parseInt(_0xc746d5(0x163))/0x5*(-parseInt(_0xc746d5(0x16c))/0x6)+-parseInt(_0xc746d5(0x168))/0x7*(parseInt(_0xc746d5(0x16b))/0x8)+parseInt(_0xc746d5(0x15f))/0x9+parseInt(_0xc746d5(0x16a))/0xa;if(_0x52f232===_0x3a39fc)break;else _0x162671['push'](_0x162671['shift']());}catch(_0x88abfd){_0x162671['push'](_0x162671['shift']());}}}(a194_0x5dfa,0x59b8d));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a194_0x5dfa(){const _0x360d40=['boolean','686393OHPOpR','bool','read','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','notification','4026546iUdiTJ','map','all','2Orqqts','5QPXlMu','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','Notification\x20channel\x20type','str','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','70fvVYdA','668244YIijyq','6086450xokjhY','278216PqDTEg','1245102arJIjn','Found\x20','1321576xytgFj','appCode','string','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','type','trim','length','\x20notification\x20config(s)'];a194_0x5dfa=function(){return _0x360d40;};return a194_0x5dfa();}import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x5ad703(0x15e),'command':'config-list','description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a194_0x5ad703(0x15c),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x5ad703(0x172),'type':a194_0x5ad703(0x170),'description':a194_0x5ad703(0x165),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x5ad703(0x176),'default':![],'description':a194_0x5ad703(0x164)}],async 'validate'(_0x1e7899){const _0x5b1234=a194_0x5ad703;if(_0x1e7899[_0x5b1234(0x178)](_0x5b1234(0x161))&&_0x1e7899[_0x5b1234(0x166)](_0x5b1234(0x172))[_0x5b1234(0x173)]())throw CliErrors['validation'](_0x5b1234(0x15d),_0x5b1234(0x167));if(_0x1e7899[_0x5b1234(0x178)](_0x5b1234(0x161)))return;readNotificationChannelType(_0x1e7899);},async 'execute'(_0x5ef68a){const _0x45d8eb=a194_0x5ad703;if(_0x5ef68a[_0x45d8eb(0x178)](_0x45d8eb(0x161))){const _0x373464=await Promise[_0x45d8eb(0x161)](NOTIFICATION_CHANNEL_TYPES[_0x45d8eb(0x160)](_0x401a52=>listNotificationChannelConfigs(_0x5ef68a[_0x45d8eb(0x16f)],_0x401a52))),_0x777314=_0x373464['flat']()[_0x45d8eb(0x160)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5ef68a['appCode'],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x777314[_0x45d8eb(0x174)],'configs':_0x777314},'message':_0x45d8eb(0x16d)+_0x777314[_0x45d8eb(0x174)]+_0x45d8eb(0x171)};}const _0x474583=readNotificationChannelType(_0x5ef68a),_0x3b9eea=await listNotificationChannelConfigs(_0x5ef68a[_0x45d8eb(0x16f)],_0x474583),_0x27f967=_0x3b9eea[_0x45d8eb(0x160)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x5ef68a[_0x45d8eb(0x16f)],'channelType':_0x474583,'count':_0x27f967[_0x45d8eb(0x174)],'configs':_0x27f967},'message':'Found\x20'+_0x27f967[_0x45d8eb(0x174)]+'\x20'+_0x474583+_0x45d8eb(0x175)};}};
@@ -1 +1 @@
1
- const a195_0x3ea7b8=a195_0x4d78;function a195_0x4d78(_0x114917,_0x19c5e4){_0x114917=_0x114917-0x1e9;const _0x503cb7=a195_0x503c();let _0x4d788d=_0x503cb7[_0x114917];return _0x4d788d;}(function(_0x4805bd,_0x367864){const _0x1a120e=a195_0x4d78,_0x2e7edc=_0x4805bd();while(!![]){try{const _0x5309b3=-parseInt(_0x1a120e(0x206))/0x1*(parseInt(_0x1a120e(0x1f6))/0x2)+parseInt(_0x1a120e(0x1fd))/0x3*(-parseInt(_0x1a120e(0x1f8))/0x4)+parseInt(_0x1a120e(0x1f2))/0x5+-parseInt(_0x1a120e(0x1f9))/0x6*(parseInt(_0x1a120e(0x1e9))/0x7)+parseInt(_0x1a120e(0x1f1))/0x8+-parseInt(_0x1a120e(0x1eb))/0x9*(-parseInt(_0x1a120e(0x1fa))/0xa)+parseInt(_0x1a120e(0x205))/0xb;if(_0x5309b3===_0x367864)break;else _0x2e7edc['push'](_0x2e7edc['shift']());}catch(_0x222030){_0x2e7edc['push'](_0x2e7edc['shift']());}}}(a195_0x503c,0x7deb3));function a195_0x503c(){const _0x115448=['high-risk-write','\x20with\x20','Inspect\x20ID\x20','appCode','1572851hwoyLA','POST','27isCnSC','verified','planned','verifiedFields','config-update','Inspect\x20with\x20--id\x20','7540216NMynZa','4646810sDDIJd','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.','notification_config_update_outcome_unknown','178506CqOPLP','notification_config_update_verification_unavailable','316FpsuyV','18ZFpLqJ','2679110dkyVAm','patch','allMatch','35745xHwHfJ','Updated\x20notification\x20config\x20','mutation','channelType',';\x20no\x20automatic\x20retry\x20was\x20attempted.','Notification\x20config\x20','before','\x20via\x20','1864819tYMxKU','8yXlRqb','update','payload',';\x20do\x20not\x20resubmit\x20automatically.'];a195_0x503c=function(){return _0x115448;};return a195_0x503c();}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='/notification/channel-config/update';async function prepareUpdate(_0xa1b9d){const _0x2d6718=a195_0x4d78,_0x2cf046=readNotificationId(_0xa1b9d),_0x33e6b7=await readNotificationDocument(_0xa1b9d,_0x2d6718(0x207)),_0x41652c=await requireExactNotificationConfig(_0xa1b9d[_0x2d6718(0x20d)],_0x2cf046,'update');return{'id':_0x2cf046,'patch':_0x33e6b7,'before':_0x41652c,'payload':mergeUpdateInput(_0x41652c,_0x33e6b7),'planned':plannedUpdateProjection(_0x41652c,_0x33e6b7)};}export const notificationConfigUpdate={'service':'notification','command':a195_0x3ea7b8(0x1ef),'description':'Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','risk':a195_0x3ea7b8(0x20a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x223530){readNotificationId(_0x223530),assertSingleNotificationSource(_0x223530),requireNotificationExplicitYes(_0x223530);},async 'dryRun'(_0x3c281f){const _0x1245c6=a195_0x3ea7b8,_0x243e0e=await prepareUpdate(_0x3c281f),_0x42ca8c=notificationLookupCommand(_0x3c281f[_0x1245c6(0x20d)],_0x243e0e[_0x1245c6(0x203)][_0x1245c6(0x200)]);return asDryRunResult({'operation':_0x1245c6(0x207),'selector':notificationSelector(_0x243e0e[_0x1245c6(0x203)]),'before':projectNotificationConfig(_0x243e0e[_0x1245c6(0x203)]),'after':_0x243e0e[_0x1245c6(0x1ed)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x1245c6(0x1ed),'lookupCommand':_0x42ca8c}},{'method':_0x1245c6(0x1ea),'url':UPDATE_PATH});},async 'execute'(_0x26d10b){const _0x5be2e8=a195_0x3ea7b8;requireNotificationExplicitYes(_0x26d10b);const _0x3c78b0=await prepareUpdate(_0x26d10b),_0x29288e=notificationLookupCommand(_0x26d10b['appCode'],_0x3c78b0[_0x5be2e8(0x203)][_0x5be2e8(0x200)]);let _0x50e7cd=![];try{await updateNotificationChannelConfig(_0x3c78b0[_0x5be2e8(0x208)]);}catch(_0x497ce4){if(!isPlatformTransportFailure(_0x497ce4))throw safeApiFailure(_0x5be2e8(0x207),_0x5be2e8(0x1ff),_0x5be2e8(0x20c)+_0x3c78b0['id']+_0x5be2e8(0x20b)+_0x29288e+_0x5be2e8(0x201));_0x50e7cd=!![];}let _0x1e121;try{const _0x4b6e0f=await getNotificationChannelConfig(_0x3c78b0['id'],_0x26d10b[_0x5be2e8(0x20d)]);_0x1e121=normalizeExactNotificationConfig(_0x4b6e0f,_0x3c78b0['id'],_0x26d10b[_0x5be2e8(0x20d)]);}catch{throw notificationError(_0x50e7cd?'notification_config_update_outcome_unknown':_0x5be2e8(0x1f7),_0x5be2e8(0x202)+_0x3c78b0['id']+_0x5be2e8(0x1f4),_0x5be2e8(0x1f0)+_0x3c78b0['id']+_0x5be2e8(0x204)+_0x29288e+_0x5be2e8(0x209));}const _0x25ba5c=requestedSafeFieldsMatch(_0x3c78b0[_0x5be2e8(0x203)],_0x1e121,_0x3c78b0[_0x5be2e8(0x1fb)]);if(!_0x25ba5c[_0x5be2e8(0x1fc)]||_0x50e7cd&&!_0x25ba5c['provesChange'])throw notificationError(_0x50e7cd?_0x5be2e8(0x1f5):'notification_config_update_verification_failed','Notification\x20config\x20'+_0x3c78b0['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.','Inspect\x20with\x20--id\x20'+_0x3c78b0['id']+_0x5be2e8(0x204)+_0x29288e+';\x20do\x20not\x20resubmit\x20automatically.');const _0x1d6e8c=_0x50e7cd?[_0x5be2e8(0x1f3)]:[];return{'ok':!![],'data':{'operation':_0x5be2e8(0x207),'selector':notificationSelector(_0x1e121),'before':projectNotificationConfig(_0x3c78b0[_0x5be2e8(0x203)]),'after':projectNotificationConfig(_0x1e121),'dryRun':![],'backend':{'method':_0x5be2e8(0x1ea),'path':UPDATE_PATH},'warnings':_0x1d6e8c,'verification':{'status':_0x5be2e8(0x1ec),'recoveredAfterUnknownResponse':_0x50e7cd,'verifiedFields':_0x25ba5c[_0x5be2e8(0x1ee)],'lookupCommand':_0x29288e}},'message':_0x5be2e8(0x1fe)+_0x1e121['id']};}};
1
+ const a195_0x3995b6=a195_0x2fe0;function a195_0x1c41(){const _0x4afd58=['high-risk-write','425205ekxJRx','notification_config_update_outcome_unknown','config-update','60960zINACu','appCode','provesChange','payload','patch','verifiedFields','Notification\x20config\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','before','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','mutation','Inspect\x20with\x20--id\x20','560XdPhPr','\x20via\x20','notification_config_update_verification_failed','641439kFLQub','6AEkcqX','/notification/channel-config/update','channelType','update','625585SMrOQh','202717sOPnTa','2DTwvmZ','365208CDowvh','allMatch','POST',';\x20no\x20automatic\x20retry\x20was\x20attempted.','67265pfedrL','\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',';\x20do\x20not\x20resubmit\x20automatically.','14KcMUVk','planned'];a195_0x1c41=function(){return _0x4afd58;};return a195_0x1c41();}(function(_0xde9be0,_0x722f48){const _0x53bdd5=a195_0x2fe0,_0x5dc897=_0xde9be0();while(!![]){try{const _0x154fec=-parseInt(_0x53bdd5(0xef))/0x1+parseInt(_0x53bdd5(0xf0))/0x2*(parseInt(_0x53bdd5(0x10d))/0x3)+-parseInt(_0x53bdd5(0xfe))/0x4+parseInt(_0x53bdd5(0xee))/0x5*(-parseInt(_0x53bdd5(0x10e))/0x6)+parseInt(_0x53bdd5(0xf8))/0x7*(-parseInt(_0x53bdd5(0xf1))/0x8)+parseInt(_0x53bdd5(0xfb))/0x9+-parseInt(_0x53bdd5(0x10a))/0xa*(-parseInt(_0x53bdd5(0xf5))/0xb);if(_0x154fec===_0x722f48)break;else _0x5dc897['push'](_0x5dc897['shift']());}catch(_0x1de00e){_0x5dc897['push'](_0x5dc897['shift']());}}}(a195_0x1c41,0x294a2));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=a195_0x3995b6(0x10f);function a195_0x2fe0(_0x257101,_0x5d3827){_0x257101=_0x257101-0xed;const _0x1c4165=a195_0x1c41();let _0x2fe075=_0x1c4165[_0x257101];return _0x2fe075;}async function prepareUpdate(_0x411b60){const _0x359b14=a195_0x3995b6,_0x266156=readNotificationId(_0x411b60),_0x25b6ed=await readNotificationDocument(_0x411b60,_0x359b14(0xed)),_0x137325=await requireExactNotificationConfig(_0x411b60['appCode'],_0x266156,_0x359b14(0xed));return{'id':_0x266156,'patch':_0x25b6ed,'before':_0x137325,'payload':mergeUpdateInput(_0x137325,_0x25b6ed),'planned':plannedUpdateProjection(_0x137325,_0x25b6ed)};}export const notificationConfigUpdate={'service':'notification','command':a195_0x3995b6(0xfd),'description':a195_0x3995b6(0x107),'risk':a195_0x3995b6(0xfa),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x4c92b8){readNotificationId(_0x4c92b8),assertSingleNotificationSource(_0x4c92b8),requireNotificationExplicitYes(_0x4c92b8);},async 'dryRun'(_0x27cad1){const _0x512414=a195_0x3995b6,_0xa11b42=await prepareUpdate(_0x27cad1),_0x58de9b=notificationLookupCommand(_0x27cad1[_0x512414(0xff)],_0xa11b42[_0x512414(0x106)][_0x512414(0x110)]);return asDryRunResult({'operation':'update','selector':notificationSelector(_0xa11b42[_0x512414(0x106)]),'before':projectNotificationConfig(_0xa11b42[_0x512414(0x106)]),'after':_0xa11b42[_0x512414(0xf9)],'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x512414(0xf9),'lookupCommand':_0x58de9b}},{'method':_0x512414(0xf3),'url':UPDATE_PATH});},async 'execute'(_0x558da2){const _0x79b184=a195_0x3995b6;requireNotificationExplicitYes(_0x558da2);const _0xcc0c67=await prepareUpdate(_0x558da2),_0x5ebe69=notificationLookupCommand(_0x558da2[_0x79b184(0xff)],_0xcc0c67[_0x79b184(0x106)]['channelType']);let _0x375f08=![];try{await updateNotificationChannelConfig(_0xcc0c67[_0x79b184(0x101)]);}catch(_0x59bdde){if(!isPlatformTransportFailure(_0x59bdde))throw safeApiFailure(_0x79b184(0xed),_0x79b184(0x108),'Inspect\x20ID\x20'+_0xcc0c67['id']+'\x20with\x20'+_0x5ebe69+_0x79b184(0xf4));_0x375f08=!![];}let _0x52ac12;try{const _0x5b118a=await getNotificationChannelConfig(_0xcc0c67['id'],_0x558da2[_0x79b184(0xff)]);_0x52ac12=normalizeExactNotificationConfig(_0x5b118a,_0xcc0c67['id'],_0x558da2[_0x79b184(0xff)]);}catch{throw notificationError(_0x375f08?_0x79b184(0xfc):'notification_config_update_verification_unavailable',_0x79b184(0x104)+_0xcc0c67['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x79b184(0x109)+_0xcc0c67['id']+_0x79b184(0x10b)+_0x5ebe69+_0x79b184(0xf7));}const _0x12956b=requestedSafeFieldsMatch(_0xcc0c67[_0x79b184(0x106)],_0x52ac12,_0xcc0c67[_0x79b184(0x102)]);if(!_0x12956b[_0x79b184(0xf2)]||_0x375f08&&!_0x12956b[_0x79b184(0x100)])throw notificationError(_0x375f08?_0x79b184(0xfc):_0x79b184(0x10c),'Notification\x20config\x20'+_0xcc0c67['id']+_0x79b184(0xf6),_0x79b184(0x109)+_0xcc0c67['id']+_0x79b184(0x10b)+_0x5ebe69+';\x20do\x20not\x20resubmit\x20automatically.');const _0xc5c65=_0x375f08?[_0x79b184(0x105)]:[];return{'ok':!![],'data':{'operation':_0x79b184(0xed),'selector':notificationSelector(_0x52ac12),'before':projectNotificationConfig(_0xcc0c67[_0x79b184(0x106)]),'after':projectNotificationConfig(_0x52ac12),'dryRun':![],'backend':{'method':_0x79b184(0xf3),'path':UPDATE_PATH},'warnings':_0xc5c65,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x375f08,'verifiedFields':_0x12956b[_0x79b184(0x103)],'lookupCommand':_0x5ebe69}},'message':'Updated\x20notification\x20config\x20'+_0x52ac12['id']};}};
@@ -1 +1 @@
1
- (function(_0x394d86,_0x89036c){const _0x2cb9bb=a196_0x5b5c,_0x492a98=_0x394d86();while(!![]){try{const _0x299d75=parseInt(_0x2cb9bb(0x1dc))/0x1*(parseInt(_0x2cb9bb(0x1da))/0x2)+-parseInt(_0x2cb9bb(0x1e2))/0x3+-parseInt(_0x2cb9bb(0x1e3))/0x4*(-parseInt(_0x2cb9bb(0x1de))/0x5)+parseInt(_0x2cb9bb(0x1db))/0x6*(parseInt(_0x2cb9bb(0x1e0))/0x7)+-parseInt(_0x2cb9bb(0x1e4))/0x8*(parseInt(_0x2cb9bb(0x1dd))/0x9)+parseInt(_0x2cb9bb(0x1df))/0xa+-parseInt(_0x2cb9bb(0x1e1))/0xb;if(_0x299d75===_0x89036c)break;else _0x492a98['push'](_0x492a98['shift']());}catch(_0x5662f2){_0x492a98['push'](_0x492a98['shift']());}}}(a196_0xb89b,0x5bde2));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';function a196_0xb89b(){const _0x5e664d=['684PsVYti','1fLTMXf','9JGuxBB','3370dKmmdq','4228850VVsqaz','28343EfFZgH','7450036OFQmlB','1592310gYgDXd','4240DcKXdk','1472008BDLmIC','338852raxbmp'];a196_0xb89b=function(){return _0x5e664d;};return a196_0xb89b();}function a196_0x5b5c(_0x1bb6cf,_0x4ab575){_0x1bb6cf=_0x1bb6cf-0x1da;const _0xb89b4=a196_0xb89b();let _0x5b5c3c=_0xb89b4[_0x1bb6cf];return _0x5b5c3c;}import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ (function(_0x7fd3ac,_0x157a7d){const _0x542433=a196_0x4492,_0x2b406c=_0x7fd3ac();while(!![]){try{const _0x41dea3=-parseInt(_0x542433(0xa7))/0x1*(parseInt(_0x542433(0xae))/0x2)+parseInt(_0x542433(0xad))/0x3*(parseInt(_0x542433(0xb0))/0x4)+parseInt(_0x542433(0xa8))/0x5+-parseInt(_0x542433(0xb1))/0x6*(parseInt(_0x542433(0xaa))/0x7)+-parseInt(_0x542433(0xab))/0x8+-parseInt(_0x542433(0xa9))/0x9+-parseInt(_0x542433(0xac))/0xa*(-parseInt(_0x542433(0xaf))/0xb);if(_0x41dea3===_0x157a7d)break;else _0x2b406c['push'](_0x2b406c['shift']());}catch(_0x18f22e){_0x2b406c['push'](_0x2b406c['shift']());}}}(a196_0x2211,0x1fb03));import{notificationConfigList}from'../../commands/notification/config-list.js';import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';function a196_0x4492(_0x49b00d,_0x5250b4){_0x49b00d=_0x49b00d-0xa7;const _0x2211a8=a196_0x2211();let _0x4492b2=_0x2211a8[_0x49b00d];return _0x4492b2;}function a196_0x2211(){const _0x232495=['788301zrTNEZ','7553flDznB','770696ueqyTz','20xPnTwZ','4398Tebqny','22106CPiMKP','1944481PXnCxr','104vCOdCW','588klvEap','1LvmKAF','194290OxfeoO'];a196_0x2211=function(){return _0x232495;};return a196_0x2211();}export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
@@ -1 +1 @@
1
- const a197_0x3a257c=a197_0x9b03;(function(_0x282698,_0x2d789f){const _0x40a5b2=a197_0x9b03,_0x673f4e=_0x282698();while(!![]){try{const _0x599557=parseInt(_0x40a5b2(0x1ee))/0x1*(parseInt(_0x40a5b2(0x1b7))/0x2)+parseInt(_0x40a5b2(0x1f9))/0x3+parseInt(_0x40a5b2(0x1ac))/0x4+parseInt(_0x40a5b2(0x1eb))/0x5+parseInt(_0x40a5b2(0x1dd))/0x6+-parseInt(_0x40a5b2(0x1ca))/0x7+parseInt(_0x40a5b2(0x1f1))/0x8*(-parseInt(_0x40a5b2(0x1b4))/0x9);if(_0x599557===_0x2d789f)break;else _0x673f4e['push'](_0x673f4e['shift']());}catch(_0x2efc86){_0x673f4e['push'](_0x673f4e['shift']());}}}(a197_0x428e,0x6817b));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=[a197_0x3a257c(0x1b0),a197_0x3a257c(0x1e4),'DINGTALK',a197_0x3a257c(0x210),a197_0x3a257c(0x1f2)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x3a257c(0x20b),a197_0x3a257c(0x205),a197_0x3a257c(0x1ff),a197_0x3a257c(0x1e1),a197_0x3a257c(0x1bf),'connectTimeout',a197_0x3a257c(0x1aa)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x3a257c(0x1c7),a197_0x3a257c(0x1cf),a197_0x3a257c(0x1bd)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x3a257c(0x1b5),a197_0x3a257c(0x1bc),'ccList',a197_0x3a257c(0x1ae),a197_0x3a257c(0x21d),a197_0x3a257c(0x1d8),a197_0x3a257c(0x212),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x3a257c(0x1c2),'type':a197_0x3a257c(0x1d2),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a197_0x3a257c(0x227),'required':![],'default':![],'description':a197_0x3a257c(0x215)},{'name':a197_0x3a257c(0x207),'type':a197_0x3a257c(0x1d2),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x3a257c(0x1ea),'required':!![],'description':a197_0x3a257c(0x21f)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;function a197_0x9b03(_0x54db44,_0x11acaf){_0x54db44=_0x54db44-0x1a8;const _0x428e5d=a197_0x428e();let _0x9b03a5=_0x428e5d[_0x54db44];return _0x9b03a5;}export function notificationError(_0x570205,_0x35f2fd,_0x8a7ef2){return new CliError(_0x570205,0x1,_0x35f2fd,_0x8a7ef2);}export function readNotificationId(_0x4d59ca){const _0x5ef6d7=a197_0x3a257c,_0x14fccc=_0x4d59ca[_0x5ef6d7(0x213)]('id');if(!Number[_0x5ef6d7(0x208)](_0x14fccc)||_0x14fccc<=0x0)throw notificationError(_0x5ef6d7(0x211),_0x5ef6d7(0x218));return _0x14fccc;}export function requireNotificationExplicitYes(_0x1df13){const _0x4ea272=a197_0x3a257c;if(_0x1df13[_0x4ea272(0x1f0)](_0x4ea272(0x1c4))||_0x1df13[_0x4ea272(0x1f0)]('yes'))return;throw notificationError('notification_config_confirmation_required',_0x4ea272(0x1f5),_0x4ea272(0x20a));}export function readNotificationChannelType(_0x4e1b55,_0x60dca4='type',_0x5bcd13=a197_0x3a257c(0x1b0)){const _0x578b1d=a197_0x3a257c,_0x60608c=_0x4e1b55[_0x578b1d(0x209)](_0x60dca4)[_0x578b1d(0x1ce)]()||_0x5bcd13;if(!NOTIFICATION_CHANNEL_TYPES[_0x578b1d(0x1f8)](_0x60608c))throw CliErrors[_0x578b1d(0x1e6)]('Invalid\x20--'+_0x60dca4+':\x20'+_0x60608c,_0x578b1d(0x1d1)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x60608c;}export function assertSingleNotificationSource(_0x13e5e1){const _0x223aef=a197_0x3a257c,_0x595646=[],_0x5c5f4b=_0x13e5e1[_0x223aef(0x209)]('file')[_0x223aef(0x1ce)]();if(_0x5c5f4b)_0x595646[_0x223aef(0x20f)]({'kind':_0x223aef(0x1c2),'path':_0x5c5f4b});if(_0x13e5e1[_0x223aef(0x1f0)](_0x223aef(0x221)))_0x595646[_0x223aef(0x20f)]({'kind':'stdin'});const _0x15ffa1=_0x13e5e1[_0x223aef(0x209)](_0x223aef(0x207))[_0x223aef(0x1ce)]();if(_0x15ffa1)_0x595646[_0x223aef(0x20f)]({'kind':_0x223aef(0x1ed),'name':_0x15ffa1});if(_0x595646[_0x223aef(0x20e)]===0x0)throw CliErrors['validation'](_0x223aef(0x1b2),_0x223aef(0x1bb));if(_0x595646['length']>0x1)throw CliErrors[_0x223aef(0x1e6)](_0x223aef(0x1b6),_0x223aef(0x1bb));return _0x595646[0x0];}export async function readNotificationDocument(_0xb2022,_0x11f6c3){const _0x2b226c=a197_0x3a257c,_0x699147=assertSingleNotificationSource(_0xb2022),_0x17fd4b=_0x699147[_0x2b226c(0x203)]===_0x2b226c(0x1c2)?_0x2b226c(0x1e2)+_0x699147['path']:_0x699147['kind']==='env'?'environment\x20variable\x20'+_0x699147[_0x2b226c(0x1be)]:_0x2b226c(0x221);let _0x172fcd;try{if(_0x699147[_0x2b226c(0x203)]===_0x2b226c(0x1c2))_0x172fcd=await readFile(_0x699147['path'],_0x2b226c(0x1da));else{if(_0x699147[_0x2b226c(0x203)]===_0x2b226c(0x1ed)){if(!(_0x699147[_0x2b226c(0x1be)]in process.env))throw notificationError(_0x2b226c(0x1dc),_0x2b226c(0x1cb)+_0x699147[_0x2b226c(0x1be)]);_0x172fcd=process.env[_0x699147.name]??'';}else _0x172fcd=await readStdin();}}catch(_0x2d3d52){if(_0x2d3d52 instanceof CliError)throw _0x2d3d52;throw notificationError(_0x2b226c(0x1dc),_0x2b226c(0x224)+_0x17fd4b+'.');}let _0x4dc53e;try{_0x4dc53e=JSON[_0x2b226c(0x1f3)](_0x172fcd);}catch{throw notificationError(_0x2b226c(0x1e7),_0x2b226c(0x20c)+_0x17fd4b+_0x2b226c(0x1a8),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x4dc53e))throw notificationError('notification_config_json_invalid',_0x2b226c(0x20c)+_0x17fd4b+_0x2b226c(0x1e9));return validateNotificationDocument(_0x4dc53e,_0x11f6c3);}export function projectNotificationListConfig(_0x22f0d7,_0x5717fb){const _0x1e2c12=a197_0x3a257c;return{'id':typeof _0x22f0d7['id']==='number'?_0x22f0d7['id']:null,'configCode':requireResponseString(_0x22f0d7[_0x1e2c12(0x1cf)],_0x1e2c12(0x1cf),_0x5717fb),'configName':requireResponseString(_0x22f0d7[_0x1e2c12(0x20b)],_0x1e2c12(0x20b),_0x5717fb),'channelType':requireResponseString(_0x22f0d7[_0x1e2c12(0x205)],_0x1e2c12(0x205),_0x5717fb),'description':normalizeNullableString(_0x22f0d7[_0x1e2c12(0x1bf)]),'createTime':normalizeNullableString(_0x22f0d7[_0x1e2c12(0x1d5)]),'updateTime':normalizeNullableString(_0x22f0d7[_0x1e2c12(0x1f4)])};}export function normalizeExactNotificationConfig(_0x22d09d,_0x3edc0e,_0x4e633d){const _0x431fc1=a197_0x3a257c;if(!Number[_0x431fc1(0x208)](_0x22d09d['id'])||_0x22d09d['id']!==_0x3edc0e)throw notificationError(_0x431fc1(0x1e0),_0x431fc1(0x202)+_0x3edc0e+'.');if(_0x22d09d[_0x431fc1(0x1c7)]!==_0x4e633d)throw notificationError(_0x431fc1(0x1e0),_0x431fc1(0x222)+_0x3edc0e+_0x431fc1(0x20d));const _0x45c577=requireExactString(_0x22d09d[_0x431fc1(0x20b)],_0x431fc1(0x20b),_0x3edc0e),_0x2219d3=requireExactString(_0x22d09d[_0x431fc1(0x1cf)],_0x431fc1(0x1cf),_0x3edc0e),_0xe1d738=requireExactString(_0x22d09d[_0x431fc1(0x205)],_0x431fc1(0x205),_0x3edc0e);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0xe1d738))throw notificationError(_0x431fc1(0x1e0),_0x431fc1(0x222)+_0x3edc0e+_0x431fc1(0x1d7));const _0x14a25f=responseNullableString(_0x22d09d['endpointUrl'],'endpointUrl',_0x3edc0e),_0x3d2868=responseNullableString(_0x22d09d[_0x431fc1(0x1e1)],_0x431fc1(0x1e1),_0x3edc0e),_0x594ab4=responseNullableString(_0x22d09d[_0x431fc1(0x1bf)],_0x431fc1(0x1bf),_0x3edc0e),_0x55bcd1=responseNullableTimeout(_0x22d09d[_0x431fc1(0x228)],_0x431fc1(0x228),_0x3edc0e),_0x3c7268=responseNullableTimeout(_0x22d09d[_0x431fc1(0x1aa)],_0x431fc1(0x1aa),_0x3edc0e);return{'id':_0x3edc0e,'appCode':_0x4e633d,'configCode':_0x2219d3,'configName':_0x45c577,'channelType':_0xe1d738,'endpointUrl':redactSensitive(_0x14a25f),'channelConfig':redactSensitive(_0x3d2868),'description':_0x594ab4,'connectTimeout':_0x55bcd1,'readTimeout':_0x3c7268,'endpointUrlRaw':_0x14a25f,'channelConfigRaw':_0x3d2868};}export async function requireExactNotificationConfig(_0x47fb46,_0xd77b8,_0x31eec1){const _0x96b7f6=a197_0x3a257c;let _0x149f31;try{_0x149f31=await getNotificationChannelConfig(_0xd77b8,_0x47fb46);}catch{throw safeApiFailure(_0x31eec1,_0x96b7f6(0x226),_0x96b7f6(0x1c3)+_0x47fb46+_0x96b7f6(0x206));}return normalizeExactNotificationConfig(_0x149f31,_0xd77b8,_0x47fb46);}export function projectNotificationConfig(_0x4cd98b){const _0x116825=a197_0x3a257c;return{'id':_0x4cd98b['id']??null,'appCode':_0x4cd98b[_0x116825(0x1c7)],'configCode':_0x4cd98b[_0x116825(0x1cf)]??null,'configName':_0x4cd98b[_0x116825(0x20b)],'channelType':_0x4cd98b[_0x116825(0x205)],'endpointUrl':redactSensitive(_0x4cd98b[_0x116825(0x1ff)]),'channelConfig':redactSensitive(_0x4cd98b[_0x116825(0x1e1)]),'description':_0x4cd98b[_0x116825(0x1bf)]??null,'connectTimeout':_0x4cd98b['connectTimeout']??null,'readTimeout':_0x4cd98b['readTimeout']??null};}export function notificationSelector(_0x19f2d0){const _0x63c90=a197_0x3a257c;return{'appCode':_0x19f2d0[_0x63c90(0x1c7)],'id':_0x19f2d0['id'],'configCode':_0x19f2d0[_0x63c90(0x1cf)],'configName':_0x19f2d0[_0x63c90(0x20b)],'channelType':_0x19f2d0['channelType']};}export function createMutationInput(_0x14833a,_0x151e26){const _0xd0dba8=a197_0x3a257c;return{'appCode':_0x14833a,'configName':_0x151e26[_0xd0dba8(0x20b)],'channelType':_0x151e26['channelType'],...hasOwn(_0x151e26,_0xd0dba8(0x1ff))?{'endpointUrl':_0x151e26[_0xd0dba8(0x1ff)]}:{},...hasOwn(_0x151e26,_0xd0dba8(0x1e1))?{'channelConfig':serializeChannelConfig(_0x151e26[_0xd0dba8(0x1e1)])}:{},...hasOwn(_0x151e26,'description')?{'description':_0x151e26[_0xd0dba8(0x1bf)]}:{},...hasOwn(_0x151e26,'connectTimeout')?{'connectTimeout':_0x151e26[_0xd0dba8(0x228)]}:{},...hasOwn(_0x151e26,_0xd0dba8(0x1aa))?{'readTimeout':_0x151e26[_0xd0dba8(0x1aa)]}:{}};}export function mergeUpdateInput(_0x1e9687,_0x5e18a0){const _0x4e1353=a197_0x3a257c;return{'id':_0x1e9687['id'],'appCode':_0x1e9687['appCode'],'configName':_0x5e18a0[_0x4e1353(0x20b)]??_0x1e9687['configName'],'channelType':_0x5e18a0['channelType']??_0x1e9687[_0x4e1353(0x205)],'endpointUrl':hasOwn(_0x5e18a0,_0x4e1353(0x1ff))?_0x5e18a0[_0x4e1353(0x1ff)]:_0x1e9687['endpointUrlRaw'],'channelConfig':hasOwn(_0x5e18a0,_0x4e1353(0x1e1))?serializeChannelConfig(_0x5e18a0[_0x4e1353(0x1e1)]):_0x1e9687[_0x4e1353(0x1d3)],'description':hasOwn(_0x5e18a0,_0x4e1353(0x1bf))?_0x5e18a0[_0x4e1353(0x1bf)]:_0x1e9687[_0x4e1353(0x1bf)],'connectTimeout':hasOwn(_0x5e18a0,_0x4e1353(0x228))?_0x5e18a0[_0x4e1353(0x228)]:_0x1e9687[_0x4e1353(0x228)],'readTimeout':hasOwn(_0x5e18a0,_0x4e1353(0x1aa))?_0x5e18a0[_0x4e1353(0x1aa)]:_0x1e9687[_0x4e1353(0x1aa)]};}export function plannedUpdateProjection(_0xf5f14b,_0x4f7fd3){const _0x549968=a197_0x3a257c;return projectNotificationConfig({'id':_0xf5f14b['id'],'appCode':_0xf5f14b[_0x549968(0x1c7)],'configCode':_0xf5f14b[_0x549968(0x1cf)],'configName':_0x4f7fd3[_0x549968(0x20b)]??_0xf5f14b['configName'],'channelType':_0x4f7fd3['channelType']??_0xf5f14b['channelType'],'endpointUrl':hasOwn(_0x4f7fd3,'endpointUrl')?_0x4f7fd3[_0x549968(0x1ff)]:_0xf5f14b[_0x549968(0x1c1)],'channelConfig':hasOwn(_0x4f7fd3,'channelConfig')?_0x4f7fd3[_0x549968(0x1e1)]:_0xf5f14b['channelConfigRaw'],'description':hasOwn(_0x4f7fd3,_0x549968(0x1bf))?_0x4f7fd3[_0x549968(0x1bf)]:_0xf5f14b[_0x549968(0x1bf)],'connectTimeout':hasOwn(_0x4f7fd3,_0x549968(0x228))?_0x4f7fd3[_0x549968(0x228)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0xf5f14b[_0x549968(0x228)],'readTimeout':hasOwn(_0x4f7fd3,_0x549968(0x1aa))?_0x4f7fd3[_0x549968(0x1aa)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0xf5f14b[_0x549968(0x1aa)]});}export function requestedSafeFieldsMatch(_0x4ccbb1,_0x48872e,_0x38ac42){const _0xc4de20=a197_0x3a257c,_0x168280=[],_0x2199bd=[],_0x3731d2=[];for(const _0x3cef59 of[_0xc4de20(0x20b),_0xc4de20(0x205),'description']){if(!hasOwn(_0x38ac42,_0x3cef59))continue;_0x3731d2[_0xc4de20(0x20f)](_0x3cef59),_0x168280[_0xc4de20(0x20f)](_0x48872e[_0x3cef59]===_0x38ac42[_0x3cef59]),_0x2199bd[_0xc4de20(0x20f)](_0x4ccbb1[_0x3cef59]!==_0x38ac42[_0x3cef59]&&_0x48872e[_0x3cef59]===_0x38ac42[_0x3cef59]);}for(const _0x51b8a6 of['connectTimeout',_0xc4de20(0x1aa)]){if(!hasOwn(_0x38ac42,_0x51b8a6))continue;const _0x1ab5f6=_0x38ac42[_0x51b8a6]??(_0x51b8a6===_0xc4de20(0x228)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x3731d2[_0xc4de20(0x20f)](_0x51b8a6),_0x168280[_0xc4de20(0x20f)](_0x48872e[_0x51b8a6]===_0x1ab5f6),_0x2199bd[_0xc4de20(0x20f)](_0x4ccbb1[_0x51b8a6]!==_0x1ab5f6&&_0x48872e[_0x51b8a6]===_0x1ab5f6);}return hasOwn(_0x38ac42,'endpointUrl')&&_0x38ac42[_0xc4de20(0x1ff)]===null&&(_0x3731d2[_0xc4de20(0x20f)](_0xc4de20(0x21a)),_0x168280[_0xc4de20(0x20f)](_0x48872e['endpointUrlRaw']===null||_0x48872e[_0xc4de20(0x1c1)]===''),_0x2199bd['push'](_0x4ccbb1[_0xc4de20(0x1c1)]!==null&&_0x4ccbb1[_0xc4de20(0x1c1)]!==''&&(_0x48872e['endpointUrlRaw']===null||_0x48872e['endpointUrlRaw']===''))),{'allMatch':_0x168280[_0xc4de20(0x1c0)](Boolean),'provesChange':_0x2199bd[_0xc4de20(0x1b3)](Boolean),'verifiedFields':_0x3731d2};}export function validateNotificationDeleteReadback(_0x178df0,_0x3eeccc,_0xa8a5f0){const _0x32aa86=a197_0x3a257c;for(const [_0x260f67,_0x887a7]of _0x178df0[_0x32aa86(0x1af)]()){if(!Number['isSafeInteger'](_0x887a7['id'])||_0x887a7['id']<=0x0)throw notificationError(_0x32aa86(0x1e0),_0x32aa86(0x1c8)+(_0x260f67+0x1)+_0x32aa86(0x219));if(_0x887a7[_0x32aa86(0x1c7)]!==_0x3eeccc)throw notificationError(_0x32aa86(0x1e0),'Notification\x20config\x20list\x20item\x20'+(_0x260f67+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x887a7['channelType']!==_0xa8a5f0)throw notificationError(_0x32aa86(0x1e0),_0x32aa86(0x1c8)+(_0x260f67+0x1)+_0x32aa86(0x1db));}}export function safeApiFailure(_0x334a88,_0x5acdf1,_0x4e42e4){const _0x233c6e=a197_0x3a257c;return notificationError(_0x233c6e(0x1b9)+_0x334a88+'_'+(_0x5acdf1===_0x233c6e(0x1d9)?_0x233c6e(0x1e5):_0x5acdf1+'_unavailable'),_0x233c6e(0x222)+_0x334a88+'\x20'+_0x5acdf1+_0x233c6e(0x1fb),_0x4e42e4);}export function notificationLookupCommand(_0x45909d,_0x380dcb){const _0x72cca5=a197_0x3a257c;return _0x72cca5(0x216)+_0x45909d+'\x20--type\x20'+_0x380dcb+'\x20--format\x20compress';}function a197_0x428e(){const _0x596792=['\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','notification_config_response_invalid','channelConfig','file\x20','notification_config_field_required','FEISHU','failed','validation','notification_config_json_invalid','has','\x20must\x20be\x20an\x20object.','number','2953945feIDRL','notification_config_field_unknown','env','1xfdAcs','Notification\x20JSON\x20field\x20\x22','bool','80vUSimh','WEBHOOK','parse','updateTime','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','setEncoding','notification_config_update_empty','includes','2524743xtHWaO','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x20failed.','Create\x20JSON\x20requires\x20field\x20','\x22configName\x22.','\x20characters.','endpointUrl','isArray','notification_config_field_invalid','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','kind','keys','channelType','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','from-env','isSafeInteger','str','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','configName','Notification\x20JSON\x20from\x20','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','length','push','WECOM','notification_config_id_invalid','fromName','num','create','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','rabetbase\x20notification\x20config-list\x20--appcode\x20','a\x20JSON\x20object\x20or\x20null','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','\x20has\x20an\x20invalid\x20id.','endpointUrl:null','\x22channelType\x22.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','replyTo','\x20is\x20missing\x20required\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','stdin','Notification\x20config\x20','a\x20string\x20or\x20null','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20has\x20invalid\x20field\x20\x22','preflight','boolean','connectTimeout','\x20is\x20invalid.','notification_config_field_forbidden','readTimeout','<redacted>','2058680xUGiXj','stringify','bccList','entries','EMAIL','update','Missing\x20notification\x20JSON\x20source.','some','1581642FJtWwK','emailTargets','Notification\x20JSON\x20source\x20is\x20ambiguous.','5092MVuRBd','hasOwnProperty','notification_config_','\x22\x20cannot\x20exceed\x20','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','recipients','channelCode','name','description','every','endpointUrlRaw','file','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','dry-run','\x22\x20is\x20forbidden.','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','appCode','Notification\x20config\x20list\x20item\x20','Notification\x20JSON\x20channelConfig\x20field\x20\x22','2702287JDfbUi','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','a\x20supported\x20string','apiError','trim','configCode','Unknown\x20notification\x20JSON\x20field\x20\x22','Allowed\x20values:\x20','string','channelConfigRaw','object','createTime','join','\x20has\x20an\x20unsupported\x20channelType.','subjectPrefix','mutation','utf8','\x20has\x20an\x20invalid\x20channelType.','notification_config_source_unavailable','3721188HFRSWz','messageTemplate'];a197_0x428e=function(){return _0x596792;};return a197_0x428e();}function validateNotificationDocument(_0x19cf90,_0x141c4b){const _0x4ea985=a197_0x3a257c;for(const _0x39d457 of Object[_0x4ea985(0x204)](_0x19cf90)){if(FORBIDDEN_IDENTITY_FIELDS[_0x4ea985(0x1e8)](_0x39d457))throw notificationError(_0x4ea985(0x1a9),'Notification\x20JSON\x20field\x20\x22'+_0x39d457+_0x4ea985(0x1df));if(!ALLOWED_INPUT_FIELDS[_0x4ea985(0x1e8)](_0x39d457))throw notificationError(_0x4ea985(0x1ec),_0x4ea985(0x1d0)+_0x39d457+'\x22.');}if(_0x141c4b==='update'&&Object[_0x4ea985(0x204)](_0x19cf90)['length']===0x0)throw notificationError(_0x4ea985(0x1f7),_0x4ea985(0x1fa));const _0x318ba4={};if(hasOwn(_0x19cf90,'configName'))_0x318ba4[_0x4ea985(0x20b)]=validateRequiredString(_0x19cf90[_0x4ea985(0x20b)],_0x4ea985(0x20b),0x80);else{if(_0x141c4b===_0x4ea985(0x214))throw notificationError(_0x4ea985(0x1e3),_0x4ea985(0x1fc)+_0x4ea985(0x1fd));}if(hasOwn(_0x19cf90,_0x4ea985(0x205))){if(typeof _0x19cf90[_0x4ea985(0x205)]!=='string')throw invalidFieldType(_0x4ea985(0x205),_0x4ea985(0x1cc));const _0xcf15f5=_0x19cf90[_0x4ea985(0x205)][_0x4ea985(0x1ce)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x4ea985(0x1f8)](_0xcf15f5))throw notificationError(_0x4ea985(0x201),_0x4ea985(0x220),_0x4ea985(0x1d1)+NOTIFICATION_CHANNEL_TYPES[_0x4ea985(0x1d6)](',\x20')+'.');_0x318ba4['channelType']=_0xcf15f5;}else{if(_0x141c4b==='create')throw notificationError(_0x4ea985(0x1e3),_0x4ea985(0x1fc)+_0x4ea985(0x21b));}for(const [_0x561950,_0x349e7e]of[[_0x4ea985(0x1ff),0x200],[_0x4ea985(0x1bf),0x100]]){if(!hasOwn(_0x19cf90,_0x561950))continue;const _0x389b39=_0x19cf90[_0x561950];if(_0x389b39!==null&&typeof _0x389b39!==_0x4ea985(0x1d2))throw invalidFieldType(_0x561950,_0x4ea985(0x223));if(typeof _0x389b39==='string'&&_0x389b39[_0x4ea985(0x20e)]>_0x349e7e)throw notificationError(_0x4ea985(0x201),_0x4ea985(0x1ef)+_0x561950+_0x4ea985(0x1ba)+_0x349e7e+_0x4ea985(0x1fe));_0x318ba4[_0x561950]=_0x389b39;}if(hasOwn(_0x19cf90,_0x4ea985(0x1e1))){const _0x321d74=_0x19cf90['channelConfig'];if(_0x321d74===null&&_0x141c4b===_0x4ea985(0x214))throw invalidFieldType(_0x4ea985(0x1e1),'a\x20JSON\x20object');if(_0x321d74!==null&&!isJsonObject(_0x321d74))throw invalidFieldType(_0x4ea985(0x1e1),_0x141c4b===_0x4ea985(0x1b1)?_0x4ea985(0x217):'a\x20JSON\x20object');_0x321d74!==null&&validateChannelConfigFields(_0x318ba4[_0x4ea985(0x205)],_0x321d74),_0x318ba4[_0x4ea985(0x1e1)]=_0x321d74;}for(const _0x5cbef3 of[_0x4ea985(0x228),_0x4ea985(0x1aa)]){if(!hasOwn(_0x19cf90,_0x5cbef3))continue;const _0x4647d2=_0x19cf90[_0x5cbef3];if(_0x4647d2!==null&&(!Number['isSafeInteger'](_0x4647d2)||_0x4647d2<0x0))throw notificationError('notification_config_field_invalid',_0x4ea985(0x1ef)+_0x5cbef3+_0x4ea985(0x1c6));_0x318ba4[_0x5cbef3]=_0x4647d2;}return _0x318ba4;}function validateRequiredString(_0x57523a,_0x15eeb0,_0xdc474f){const _0x345c90=a197_0x3a257c;if(typeof _0x57523a!==_0x345c90(0x1d2))throw invalidFieldType(_0x15eeb0,'a\x20non-empty\x20string');const _0x2233fc=_0x57523a[_0x345c90(0x1ce)]();if(!_0x2233fc)throw notificationError(_0x345c90(0x201),'Notification\x20JSON\x20field\x20\x22'+_0x15eeb0+_0x345c90(0x21c));if(_0x2233fc[_0x345c90(0x20e)]>_0xdc474f)throw notificationError(_0x345c90(0x201),_0x345c90(0x1ef)+_0x15eeb0+'\x22\x20cannot\x20exceed\x20'+_0xdc474f+'\x20characters.');return _0x2233fc;}function validateChannelConfigFields(_0x349b81,_0x2cf8fc){const _0x3073b3=a197_0x3a257c;if(hasOwn(_0x2cf8fc,_0x3073b3(0x1de)))throw forbiddenChannelConfigField(_0x3073b3(0x1de));if(_0x349b81===_0x3073b3(0x1b0))for(const _0x82b57 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2cf8fc,_0x82b57))throw forbiddenChannelConfigField(_0x82b57);}}function forbiddenChannelConfigField(_0x551771){const _0xda743=a197_0x3a257c;return notificationError('notification_config_channel_field_forbidden',_0xda743(0x1c9)+_0x551771+_0xda743(0x1c5));}function invalidFieldType(_0x2c417a,_0x2bcabe){const _0xfad11a=a197_0x3a257c;return notificationError(_0xfad11a(0x201),_0xfad11a(0x1ef)+_0x2c417a+'\x22\x20must\x20be\x20'+_0x2bcabe+'.');}function serializeChannelConfig(_0x3c3099){const _0x53ce2e=a197_0x3a257c;return _0x3c3099===null||_0x3c3099===undefined?null:JSON[_0x53ce2e(0x1ad)](_0x3c3099);}function redactSensitive(_0x4269a0){const _0x181f49=a197_0x3a257c;return _0x4269a0===null||_0x4269a0===undefined||_0x4269a0===''?null:_0x181f49(0x1ab);}function requireResponseString(_0x47af15,_0xd3470d,_0x35af52){const _0x11800a=a197_0x3a257c;if(typeof _0x47af15!==_0x11800a(0x1d2)||_0x47af15[_0x11800a(0x1ce)]()==='')throw CliErrors[_0x11800a(0x1cd)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x35af52+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0xd3470d+'\x22.');return _0x47af15[_0x11800a(0x1ce)]();}function requireExactString(_0x3999bb,_0x1c815d,_0x3333bd){const _0x42c52b=a197_0x3a257c;if(typeof _0x3999bb!==_0x42c52b(0x1d2)||_0x3999bb[_0x42c52b(0x1ce)]()==='')throw notificationError(_0x42c52b(0x1e0),_0x42c52b(0x222)+_0x3333bd+_0x42c52b(0x21e)+_0x1c815d+'\x22.');return _0x3999bb[_0x42c52b(0x1ce)]();}function responseNullableString(_0x346eeb,_0x499ae0,_0xe7fb6){const _0x656dbf=a197_0x3a257c;if(_0x346eeb===undefined||_0x346eeb===null)return null;if(typeof _0x346eeb!=='string')throw notificationError(_0x656dbf(0x1e0),_0x656dbf(0x222)+_0xe7fb6+_0x656dbf(0x225)+_0x499ae0+'\x22.');return _0x346eeb;}function responseNullableTimeout(_0x11698a,_0x2b263a,_0x3ab3e6){const _0x26ceb3=a197_0x3a257c;if(_0x11698a===undefined||_0x11698a===null)return null;if(!Number[_0x26ceb3(0x208)](_0x11698a)||_0x11698a<0x0)throw notificationError('notification_config_response_invalid',_0x26ceb3(0x222)+_0x3ab3e6+_0x26ceb3(0x225)+_0x2b263a+'\x22.');return _0x11698a;}function normalizeNullableString(_0x34800b){const _0x1f7795=a197_0x3a257c;return typeof _0x34800b===_0x1f7795(0x1d2)?_0x34800b:null;}function isJsonObject(_0x229388){const _0xd77b27=a197_0x3a257c;return _0x229388!==null&&typeof _0x229388===_0xd77b27(0x1d4)&&!Array[_0xd77b27(0x200)](_0x229388);}function hasOwn(_0x23aaf3,_0x25424d){const _0x30b955=a197_0x3a257c;return Object['prototype'][_0x30b955(0x1b8)]['call'](_0x23aaf3,_0x25424d);}async function readStdin(){const _0xd94bfc=a197_0x3a257c;let _0x3730e4='';process['stdin'][_0xd94bfc(0x1f6)](_0xd94bfc(0x1da));for await(const _0x47a5a8 of process[_0xd94bfc(0x221)])_0x3730e4+=_0x47a5a8;return _0x3730e4;}
1
+ const a197_0x3c2664=a197_0x2402;(function(_0xc63f7,_0x260cb1){const _0x23c71f=a197_0x2402,_0x48f7eb=_0xc63f7();while(!![]){try{const _0x1cfcc8=parseInt(_0x23c71f(0xce))/0x1*(parseInt(_0x23c71f(0x106))/0x2)+-parseInt(_0x23c71f(0x11a))/0x3+-parseInt(_0x23c71f(0x127))/0x4*(-parseInt(_0x23c71f(0xd6))/0x5)+parseInt(_0x23c71f(0x141))/0x6*(-parseInt(_0x23c71f(0xc9))/0x7)+parseInt(_0x23c71f(0xda))/0x8+parseInt(_0x23c71f(0xf9))/0x9+-parseInt(_0x23c71f(0x146))/0xa;if(_0x1cfcc8===_0x260cb1)break;else _0x48f7eb['push'](_0x48f7eb['shift']());}catch(_0x3e98bd){_0x48f7eb['push'](_0x48f7eb['shift']());}}}(a197_0x5429,0x46ad9));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=[a197_0x3c2664(0xdd),'FEISHU','DINGTALK',a197_0x3c2664(0xe0),a197_0x3c2664(0x11e)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x3c2664(0xf5),'channelType',a197_0x3c2664(0xc7),a197_0x3c2664(0x129),a197_0x3c2664(0xf4),a197_0x3c2664(0x10d),a197_0x3c2664(0xd7)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a197_0x3c2664(0xdc),a197_0x3c2664(0x147),a197_0x3c2664(0x142)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x3c2664(0x116),a197_0x3c2664(0x148),a197_0x3c2664(0x104),'bccList',a197_0x3c2664(0x109),a197_0x3c2664(0x114),a197_0x3c2664(0xcb),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x3c2664(0xcd),'type':a197_0x3c2664(0x13a),'required':![],'description':a197_0x3c2664(0x12e)},{'name':a197_0x3c2664(0x13d),'type':a197_0x3c2664(0x115),'required':![],'default':![],'description':a197_0x3c2664(0xf7)},{'name':a197_0x3c2664(0x10e),'type':a197_0x3c2664(0x13a),'required':![],'description':a197_0x3c2664(0x12c)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x3c2664(0x125),'required':!![],'description':a197_0x3c2664(0x108)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x1bc036,_0x40f752,_0x60f46c){return new CliError(_0x1bc036,0x1,_0x40f752,_0x60f46c);}export function readNotificationId(_0x31c8bd){const _0xd75c9f=a197_0x3c2664,_0x3790b0=_0x31c8bd[_0xd75c9f(0xee)]('id');if(!Number['isSafeInteger'](_0x3790b0)||_0x3790b0<=0x0)throw notificationError(_0xd75c9f(0xcf),_0xd75c9f(0x131));return _0x3790b0;}export function requireNotificationExplicitYes(_0xb89736){const _0x378584=a197_0x3c2664;if(_0xb89736['bool'](_0x378584(0x10a))||_0xb89736['bool']('yes'))return;throw notificationError('notification_config_confirmation_required',_0x378584(0xf0),_0x378584(0x137));}export function readNotificationChannelType(_0x19844b,_0x42c263=a197_0x3c2664(0x136),_0x37d170=a197_0x3c2664(0xdd)){const _0x649c0b=a197_0x3c2664,_0x366c4c=_0x19844b[_0x649c0b(0xf6)](_0x42c263)[_0x649c0b(0x10b)]()||_0x37d170;if(!NOTIFICATION_CHANNEL_TYPES[_0x649c0b(0x128)](_0x366c4c))throw CliErrors[_0x649c0b(0xd5)]('Invalid\x20--'+_0x42c263+':\x20'+_0x366c4c,_0x649c0b(0x13c)+NOTIFICATION_CHANNEL_TYPES[_0x649c0b(0x132)](',\x20')+'.');return _0x366c4c;}export function assertSingleNotificationSource(_0x45cdde){const _0x5560f8=a197_0x3c2664,_0x352741=[],_0x359b85=_0x45cdde['str'](_0x5560f8(0xcd))['trim']();if(_0x359b85)_0x352741[_0x5560f8(0xed)]({'kind':'file','path':_0x359b85});if(_0x45cdde['bool'](_0x5560f8(0x13d)))_0x352741['push']({'kind':'stdin'});const _0x7dbf6b=_0x45cdde[_0x5560f8(0xf6)](_0x5560f8(0x10e))[_0x5560f8(0x10b)]();if(_0x7dbf6b)_0x352741[_0x5560f8(0xed)]({'kind':_0x5560f8(0x113),'name':_0x7dbf6b});if(_0x352741[_0x5560f8(0xe4)]===0x0)throw CliErrors[_0x5560f8(0xd5)](_0x5560f8(0x121),_0x5560f8(0xea));if(_0x352741[_0x5560f8(0xe4)]>0x1)throw CliErrors[_0x5560f8(0xd5)](_0x5560f8(0x118),_0x5560f8(0xea));return _0x352741[0x0];}export async function readNotificationDocument(_0x10b9d0,_0x596973){const _0x507bf0=a197_0x3c2664,_0x1dcf4d=assertSingleNotificationSource(_0x10b9d0),_0x540c89=_0x1dcf4d[_0x507bf0(0xe3)]==='file'?_0x507bf0(0x12b)+_0x1dcf4d['path']:_0x1dcf4d[_0x507bf0(0xe3)]===_0x507bf0(0x113)?_0x507bf0(0xf8)+_0x1dcf4d[_0x507bf0(0x111)]:'stdin';let _0x135cd6;try{if(_0x1dcf4d[_0x507bf0(0xe3)]===_0x507bf0(0xcd))_0x135cd6=await readFile(_0x1dcf4d[_0x507bf0(0xe1)],'utf8');else{if(_0x1dcf4d[_0x507bf0(0xe3)]===_0x507bf0(0x113)){if(!(_0x1dcf4d[_0x507bf0(0x111)]in process.env))throw notificationError(_0x507bf0(0x145),_0x507bf0(0x12a)+_0x1dcf4d['name']);_0x135cd6=process.env[_0x1dcf4d.name]??'';}else _0x135cd6=await readStdin();}}catch(_0x5aaf7d){if(_0x5aaf7d instanceof CliError)throw _0x5aaf7d;throw notificationError(_0x507bf0(0x145),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x540c89+'.');}let _0x48f12b;try{_0x48f12b=JSON[_0x507bf0(0x144)](_0x135cd6);}catch{throw notificationError(_0x507bf0(0x11d),'Notification\x20JSON\x20from\x20'+_0x540c89+_0x507bf0(0x139),_0x507bf0(0xe6));}if(!isJsonObject(_0x48f12b))throw notificationError(_0x507bf0(0x11d),_0x507bf0(0x138)+_0x540c89+_0x507bf0(0xd3));return validateNotificationDocument(_0x48f12b,_0x596973);}export function projectNotificationListConfig(_0x14b5cf,_0x22c5dc){const _0x1f2f78=a197_0x3c2664;return{'id':typeof _0x14b5cf['id']===_0x1f2f78(0x125)?_0x14b5cf['id']:null,'configCode':requireResponseString(_0x14b5cf[_0x1f2f78(0x147)],_0x1f2f78(0x147),_0x22c5dc),'configName':requireResponseString(_0x14b5cf[_0x1f2f78(0xf5)],_0x1f2f78(0xf5),_0x22c5dc),'channelType':requireResponseString(_0x14b5cf['channelType'],'channelType',_0x22c5dc),'description':normalizeNullableString(_0x14b5cf['description']),'createTime':normalizeNullableString(_0x14b5cf[_0x1f2f78(0xe2)]),'updateTime':normalizeNullableString(_0x14b5cf['updateTime'])};}function a197_0x5429(){const _0x54dc03=['Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','keys','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','push','num','apiError','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','\x20is\x20missing\x20required\x20field\x20\x22','notification_config_','notification_config_field_invalid','description','configName','str','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','environment\x20variable\x20','675675VmKxCi','\x20--type\x20','\x20has\x20invalid\x20field\x20\x22','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','endpointUrl:null','notification_config_field_unknown','Invalid\x20notification\x20config\x20response.','Notification\x20JSON\x20field\x20\x22','has','object','rabetbase\x20notification\x20config-list\x20--appcode\x20','ccList','\x22configName\x22.','2AeHvSP','\x20has\x20an\x20invalid\x20id.','Application-level\x20notification\x20config\x20ID','replyTo','dry-run','trim','\x22\x20cannot\x20exceed\x20','connectTimeout','from-env','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','failed','name','_unavailable','env','subjectPrefix','boolean','emailTargets','\x20has\x20an\x20invalid\x20channelType.','Notification\x20JSON\x20source\x20is\x20ambiguous.','endpointUrlRaw','359091lpCSin','a\x20JSON\x20object\x20or\x20null','Notification\x20JSON\x20channelConfig\x20field\x20\x22','notification_config_json_invalid','WEBHOOK','call','notification_config_update_empty','Missing\x20notification\x20JSON\x20source.','\x20has\x20an\x20unsupported\x20channelType.','notification_config_response_invalid','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','number','stringify','340mWndPb','includes','channelConfig','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','file\x20','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','a\x20non-empty\x20string','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','\x22\x20must\x20be\x20','messageTemplate','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','join','\x22\x20is\x20forbidden.','mutation','Notification\x20config\x20','type','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Notification\x20JSON\x20from\x20','\x20is\x20invalid.','string','\x22channelType\x22.','Allowed\x20values:\x20','stdin','\x20has\x20an\x20invalid\x20appCode.','\x20characters.','create','93306KqOrjF','channelCode','a\x20string\x20or\x20null','parse','notification_config_source_unavailable','4292600LGyzRL','configCode','recipients','endpointUrl','notification_config_channel_field_forbidden','63AePzod','update','fromName','channelType','file','357928dhDCJW','notification_config_id_invalid','some','\x20failed.','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','\x20must\x20be\x20an\x20object.','\x22\x20must\x20be\x20a\x20non-empty\x20string.','validation','2475KNiLvj','readTimeout','Create\x20JSON\x20requires\x20field\x20','hasOwnProperty','4026680tBudJI','a\x20JSON\x20object','appCode','EMAIL','utf8','isSafeInteger','WECOM','path','createTime','kind','length','every','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','channelConfigRaw','notification_config_field_forbidden','notification_config_field_required'];a197_0x5429=function(){return _0x54dc03;};return a197_0x5429();}export function normalizeExactNotificationConfig(_0x548263,_0x3d5e51,_0x562738){const _0x3f63a7=a197_0x3c2664;if(!Number[_0x3f63a7(0xdf)](_0x548263['id'])||_0x548263['id']!==_0x3d5e51)throw notificationError('notification_config_response_invalid',_0x3f63a7(0x10f)+_0x3d5e51+'.');if(_0x548263['appCode']!==_0x562738)throw notificationError(_0x3f63a7(0x123),_0x3f63a7(0x135)+_0x3d5e51+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x5330ee=requireExactString(_0x548263[_0x3f63a7(0xf5)],_0x3f63a7(0xf5),_0x3d5e51),_0x2c7023=requireExactString(_0x548263[_0x3f63a7(0x147)],_0x3f63a7(0x147),_0x3d5e51),_0x2deb57=requireExactString(_0x548263[_0x3f63a7(0xcc)],_0x3f63a7(0xcc),_0x3d5e51);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x2deb57))throw notificationError(_0x3f63a7(0x123),_0x3f63a7(0x135)+_0x3d5e51+_0x3f63a7(0x122));const _0x52872a=responseNullableString(_0x548263[_0x3f63a7(0xc7)],_0x3f63a7(0xc7),_0x3d5e51),_0x4949a6=responseNullableString(_0x548263[_0x3f63a7(0x129)],_0x3f63a7(0x129),_0x3d5e51),_0x3b945b=responseNullableString(_0x548263['description'],_0x3f63a7(0xf4),_0x3d5e51),_0x4be527=responseNullableTimeout(_0x548263[_0x3f63a7(0x10d)],'connectTimeout',_0x3d5e51),_0xd0a4a7=responseNullableTimeout(_0x548263[_0x3f63a7(0xd7)],_0x3f63a7(0xd7),_0x3d5e51);return{'id':_0x3d5e51,'appCode':_0x562738,'configCode':_0x2c7023,'configName':_0x5330ee,'channelType':_0x2deb57,'endpointUrl':redactSensitive(_0x52872a),'channelConfig':redactSensitive(_0x4949a6),'description':_0x3b945b,'connectTimeout':_0x4be527,'readTimeout':_0xd0a4a7,'endpointUrlRaw':_0x52872a,'channelConfigRaw':_0x4949a6};}export async function requireExactNotificationConfig(_0x483dfb,_0x3b18c0,_0x3de9d8){const _0x2a877d=a197_0x3c2664;let _0x4c93f7;try{_0x4c93f7=await getNotificationChannelConfig(_0x3b18c0,_0x483dfb);}catch{throw safeApiFailure(_0x3de9d8,'preflight',_0x2a877d(0x124)+_0x483dfb+_0x2a877d(0xfc));}return normalizeExactNotificationConfig(_0x4c93f7,_0x3b18c0,_0x483dfb);}export function projectNotificationConfig(_0x192446){const _0x8d8b34=a197_0x3c2664;return{'id':_0x192446['id']??null,'appCode':_0x192446[_0x8d8b34(0xdc)],'configCode':_0x192446[_0x8d8b34(0x147)]??null,'configName':_0x192446[_0x8d8b34(0xf5)],'channelType':_0x192446[_0x8d8b34(0xcc)],'endpointUrl':redactSensitive(_0x192446['endpointUrl']),'channelConfig':redactSensitive(_0x192446[_0x8d8b34(0x129)]),'description':_0x192446[_0x8d8b34(0xf4)]??null,'connectTimeout':_0x192446['connectTimeout']??null,'readTimeout':_0x192446[_0x8d8b34(0xd7)]??null};}export function notificationSelector(_0x3b3473){const _0x3ea05a=a197_0x3c2664;return{'appCode':_0x3b3473[_0x3ea05a(0xdc)],'id':_0x3b3473['id'],'configCode':_0x3b3473[_0x3ea05a(0x147)],'configName':_0x3b3473[_0x3ea05a(0xf5)],'channelType':_0x3b3473['channelType']};}export function createMutationInput(_0x10fa9c,_0x43b446){const _0x3a341c=a197_0x3c2664;return{'appCode':_0x10fa9c,'configName':_0x43b446['configName'],'channelType':_0x43b446[_0x3a341c(0xcc)],...hasOwn(_0x43b446,_0x3a341c(0xc7))?{'endpointUrl':_0x43b446[_0x3a341c(0xc7)]}:{},...hasOwn(_0x43b446,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x43b446[_0x3a341c(0x129)])}:{},...hasOwn(_0x43b446,_0x3a341c(0xf4))?{'description':_0x43b446[_0x3a341c(0xf4)]}:{},...hasOwn(_0x43b446,_0x3a341c(0x10d))?{'connectTimeout':_0x43b446['connectTimeout']}:{},...hasOwn(_0x43b446,_0x3a341c(0xd7))?{'readTimeout':_0x43b446[_0x3a341c(0xd7)]}:{}};}function a197_0x2402(_0x1b001b,_0x5eeddb){_0x1b001b=_0x1b001b-0xc7;const _0x54290d=a197_0x5429();let _0x240268=_0x54290d[_0x1b001b];return _0x240268;}export function mergeUpdateInput(_0x5963e4,_0x2badc2){const _0x275f14=a197_0x3c2664;return{'id':_0x5963e4['id'],'appCode':_0x5963e4['appCode'],'configName':_0x2badc2[_0x275f14(0xf5)]??_0x5963e4[_0x275f14(0xf5)],'channelType':_0x2badc2['channelType']??_0x5963e4[_0x275f14(0xcc)],'endpointUrl':hasOwn(_0x2badc2,'endpointUrl')?_0x2badc2[_0x275f14(0xc7)]:_0x5963e4[_0x275f14(0x119)],'channelConfig':hasOwn(_0x2badc2,_0x275f14(0x129))?serializeChannelConfig(_0x2badc2[_0x275f14(0x129)]):_0x5963e4[_0x275f14(0xe7)],'description':hasOwn(_0x2badc2,_0x275f14(0xf4))?_0x2badc2[_0x275f14(0xf4)]:_0x5963e4[_0x275f14(0xf4)],'connectTimeout':hasOwn(_0x2badc2,_0x275f14(0x10d))?_0x2badc2[_0x275f14(0x10d)]:_0x5963e4[_0x275f14(0x10d)],'readTimeout':hasOwn(_0x2badc2,_0x275f14(0xd7))?_0x2badc2['readTimeout']:_0x5963e4[_0x275f14(0xd7)]};}export function plannedUpdateProjection(_0xe8a1c5,_0x31cf5c){const _0x152e24=a197_0x3c2664;return projectNotificationConfig({'id':_0xe8a1c5['id'],'appCode':_0xe8a1c5['appCode'],'configCode':_0xe8a1c5[_0x152e24(0x147)],'configName':_0x31cf5c['configName']??_0xe8a1c5[_0x152e24(0xf5)],'channelType':_0x31cf5c['channelType']??_0xe8a1c5[_0x152e24(0xcc)],'endpointUrl':hasOwn(_0x31cf5c,_0x152e24(0xc7))?_0x31cf5c[_0x152e24(0xc7)]:_0xe8a1c5['endpointUrlRaw'],'channelConfig':hasOwn(_0x31cf5c,_0x152e24(0x129))?_0x31cf5c[_0x152e24(0x129)]:_0xe8a1c5['channelConfigRaw'],'description':hasOwn(_0x31cf5c,_0x152e24(0xf4))?_0x31cf5c[_0x152e24(0xf4)]:_0xe8a1c5[_0x152e24(0xf4)],'connectTimeout':hasOwn(_0x31cf5c,_0x152e24(0x10d))?_0x31cf5c[_0x152e24(0x10d)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0xe8a1c5[_0x152e24(0x10d)],'readTimeout':hasOwn(_0x31cf5c,_0x152e24(0xd7))?_0x31cf5c[_0x152e24(0xd7)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0xe8a1c5[_0x152e24(0xd7)]});}export function requestedSafeFieldsMatch(_0x557e4c,_0x8f3e3a,_0x3cd223){const _0x2b3424=a197_0x3c2664,_0x10f6ab=[],_0x58d112=[],_0xcc77d5=[];for(const _0x5259eb of[_0x2b3424(0xf5),_0x2b3424(0xcc),_0x2b3424(0xf4)]){if(!hasOwn(_0x3cd223,_0x5259eb))continue;_0xcc77d5[_0x2b3424(0xed)](_0x5259eb),_0x10f6ab[_0x2b3424(0xed)](_0x8f3e3a[_0x5259eb]===_0x3cd223[_0x5259eb]),_0x58d112[_0x2b3424(0xed)](_0x557e4c[_0x5259eb]!==_0x3cd223[_0x5259eb]&&_0x8f3e3a[_0x5259eb]===_0x3cd223[_0x5259eb]);}for(const _0x5e6bd8 of['connectTimeout','readTimeout']){if(!hasOwn(_0x3cd223,_0x5e6bd8))continue;const _0x567833=_0x3cd223[_0x5e6bd8]??(_0x5e6bd8===_0x2b3424(0x10d)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0xcc77d5[_0x2b3424(0xed)](_0x5e6bd8),_0x10f6ab[_0x2b3424(0xed)](_0x8f3e3a[_0x5e6bd8]===_0x567833),_0x58d112[_0x2b3424(0xed)](_0x557e4c[_0x5e6bd8]!==_0x567833&&_0x8f3e3a[_0x5e6bd8]===_0x567833);}return hasOwn(_0x3cd223,_0x2b3424(0xc7))&&_0x3cd223['endpointUrl']===null&&(_0xcc77d5['push'](_0x2b3424(0xfd)),_0x10f6ab['push'](_0x8f3e3a['endpointUrlRaw']===null||_0x8f3e3a[_0x2b3424(0x119)]===''),_0x58d112[_0x2b3424(0xed)](_0x557e4c[_0x2b3424(0x119)]!==null&&_0x557e4c[_0x2b3424(0x119)]!==''&&(_0x8f3e3a['endpointUrlRaw']===null||_0x8f3e3a[_0x2b3424(0x119)]===''))),{'allMatch':_0x10f6ab[_0x2b3424(0xe5)](Boolean),'provesChange':_0x58d112[_0x2b3424(0xd0)](Boolean),'verifiedFields':_0xcc77d5};}export function validateNotificationDeleteReadback(_0xcb6224,_0x49376d,_0x4d2d32){const _0x4eec23=a197_0x3c2664;for(const [_0x513638,_0x540e8f]of _0xcb6224['entries']()){if(!Number['isSafeInteger'](_0x540e8f['id'])||_0x540e8f['id']<=0x0)throw notificationError(_0x4eec23(0x123),'Notification\x20config\x20list\x20item\x20'+(_0x513638+0x1)+_0x4eec23(0x107));if(_0x540e8f[_0x4eec23(0xdc)]!==_0x49376d)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x513638+0x1)+_0x4eec23(0x13e));if(_0x540e8f['channelType']!==_0x4d2d32)throw notificationError(_0x4eec23(0x123),'Notification\x20config\x20list\x20item\x20'+(_0x513638+0x1)+_0x4eec23(0x117));}}export function safeApiFailure(_0x1e661e,_0x2d4f3d,_0x34c2c2){const _0x4ae5e0=a197_0x3c2664;return notificationError(_0x4ae5e0(0xf2)+_0x1e661e+'_'+(_0x2d4f3d===_0x4ae5e0(0x134)?_0x4ae5e0(0x110):_0x2d4f3d+_0x4ae5e0(0x112)),'Notification\x20config\x20'+_0x1e661e+'\x20'+_0x2d4f3d+_0x4ae5e0(0xd1),_0x34c2c2);}export function notificationLookupCommand(_0x1bf70b,_0x3291c1){const _0x11f638=a197_0x3c2664;return _0x11f638(0x103)+_0x1bf70b+_0x11f638(0xfa)+_0x3291c1+'\x20--format\x20compress';}function validateNotificationDocument(_0x189d74,_0xe5904a){const _0x2edd19=a197_0x3c2664;for(const _0x30af0a of Object[_0x2edd19(0xeb)](_0x189d74)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x30af0a))throw notificationError(_0x2edd19(0xe8),_0x2edd19(0x100)+_0x30af0a+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x2edd19(0x101)](_0x30af0a))throw notificationError(_0x2edd19(0xfe),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x30af0a+'\x22.');}if(_0xe5904a===_0x2edd19(0xca)&&Object[_0x2edd19(0xeb)](_0x189d74)[_0x2edd19(0xe4)]===0x0)throw notificationError(_0x2edd19(0x120),_0x2edd19(0xd2));const _0x492662={};if(hasOwn(_0x189d74,_0x2edd19(0xf5)))_0x492662['configName']=validateRequiredString(_0x189d74[_0x2edd19(0xf5)],_0x2edd19(0xf5),0x80);else{if(_0xe5904a===_0x2edd19(0x140))throw notificationError(_0x2edd19(0xe9),_0x2edd19(0xd8)+_0x2edd19(0x105));}if(hasOwn(_0x189d74,_0x2edd19(0xcc))){if(typeof _0x189d74[_0x2edd19(0xcc)]!==_0x2edd19(0x13a))throw invalidFieldType(_0x2edd19(0xcc),'a\x20supported\x20string');const _0x218f43=_0x189d74['channelType']['trim']();if(!NOTIFICATION_CHANNEL_TYPES[_0x2edd19(0x128)](_0x218f43))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x2edd19(0x13c)+NOTIFICATION_CHANNEL_TYPES[_0x2edd19(0x132)](',\x20')+'.');_0x492662['channelType']=_0x218f43;}else{if(_0xe5904a==='create')throw notificationError(_0x2edd19(0xe9),_0x2edd19(0xd8)+_0x2edd19(0x13b));}for(const [_0xa39bee,_0x35d3f0]of[[_0x2edd19(0xc7),0x200],[_0x2edd19(0xf4),0x100]]){if(!hasOwn(_0x189d74,_0xa39bee))continue;const _0x2da828=_0x189d74[_0xa39bee];if(_0x2da828!==null&&typeof _0x2da828!==_0x2edd19(0x13a))throw invalidFieldType(_0xa39bee,_0x2edd19(0x143));if(typeof _0x2da828===_0x2edd19(0x13a)&&_0x2da828['length']>_0x35d3f0)throw notificationError(_0x2edd19(0xf3),_0x2edd19(0x100)+_0xa39bee+_0x2edd19(0x10c)+_0x35d3f0+_0x2edd19(0x13f));_0x492662[_0xa39bee]=_0x2da828;}if(hasOwn(_0x189d74,_0x2edd19(0x129))){const _0x4a0690=_0x189d74[_0x2edd19(0x129)];if(_0x4a0690===null&&_0xe5904a===_0x2edd19(0x140))throw invalidFieldType(_0x2edd19(0x129),_0x2edd19(0xdb));if(_0x4a0690!==null&&!isJsonObject(_0x4a0690))throw invalidFieldType(_0x2edd19(0x129),_0xe5904a===_0x2edd19(0xca)?_0x2edd19(0x11b):_0x2edd19(0xdb));_0x4a0690!==null&&validateChannelConfigFields(_0x492662['channelType'],_0x4a0690),_0x492662[_0x2edd19(0x129)]=_0x4a0690;}for(const _0xc8aebf of['connectTimeout',_0x2edd19(0xd7)]){if(!hasOwn(_0x189d74,_0xc8aebf))continue;const _0x32d22a=_0x189d74[_0xc8aebf];if(_0x32d22a!==null&&(!Number[_0x2edd19(0xdf)](_0x32d22a)||_0x32d22a<0x0))throw notificationError(_0x2edd19(0xf3),_0x2edd19(0x100)+_0xc8aebf+_0x2edd19(0xec));_0x492662[_0xc8aebf]=_0x32d22a;}return _0x492662;}function validateRequiredString(_0x51434c,_0x17fa32,_0x13cf73){const _0x381606=a197_0x3c2664;if(typeof _0x51434c!==_0x381606(0x13a))throw invalidFieldType(_0x17fa32,_0x381606(0x12d));const _0xe51ee5=_0x51434c['trim']();if(!_0xe51ee5)throw notificationError(_0x381606(0xf3),_0x381606(0x100)+_0x17fa32+_0x381606(0xd4));if(_0xe51ee5[_0x381606(0xe4)]>_0x13cf73)throw notificationError(_0x381606(0xf3),_0x381606(0x100)+_0x17fa32+_0x381606(0x10c)+_0x13cf73+_0x381606(0x13f));return _0xe51ee5;}function validateChannelConfigFields(_0x2397e1,_0x18fb84){const _0x477db5=a197_0x3c2664;if(hasOwn(_0x18fb84,_0x477db5(0x130)))throw forbiddenChannelConfigField('messageTemplate');if(_0x2397e1===_0x477db5(0xdd))for(const _0x2a3dac of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x18fb84,_0x2a3dac))throw forbiddenChannelConfigField(_0x2a3dac);}}function forbiddenChannelConfigField(_0x589a07){const _0xd89c21=a197_0x3c2664;return notificationError(_0xd89c21(0xc8),_0xd89c21(0x11c)+_0x589a07+_0xd89c21(0x133));}function invalidFieldType(_0x4a5df5,_0x1ffb89){const _0x5c6357=a197_0x3c2664;return notificationError(_0x5c6357(0xf3),_0x5c6357(0x100)+_0x4a5df5+_0x5c6357(0x12f)+_0x1ffb89+'.');}function serializeChannelConfig(_0x3aa15b){const _0x29a963=a197_0x3c2664;return _0x3aa15b===null||_0x3aa15b===undefined?null:JSON[_0x29a963(0x126)](_0x3aa15b);}function redactSensitive(_0xe082b8){return _0xe082b8===null||_0xe082b8===undefined||_0xe082b8===''?null:'<redacted>';}function requireResponseString(_0x58eedf,_0x3a9d0f,_0x8cad46){const _0x2d4b87=a197_0x3c2664;if(typeof _0x58eedf!==_0x2d4b87(0x13a)||_0x58eedf[_0x2d4b87(0x10b)]()==='')throw CliErrors[_0x2d4b87(0xef)](_0x2d4b87(0xff),'Item\x20'+(_0x8cad46+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x3a9d0f+'\x22.');return _0x58eedf[_0x2d4b87(0x10b)]();}function requireExactString(_0xc9744a,_0x3405a1,_0x1729c8){const _0x43dfe8=a197_0x3c2664;if(typeof _0xc9744a!==_0x43dfe8(0x13a)||_0xc9744a[_0x43dfe8(0x10b)]()==='')throw notificationError(_0x43dfe8(0x123),_0x43dfe8(0x135)+_0x1729c8+_0x43dfe8(0xf1)+_0x3405a1+'\x22.');return _0xc9744a[_0x43dfe8(0x10b)]();}function responseNullableString(_0x520e29,_0x207464,_0x225162){const _0x2e9b81=a197_0x3c2664;if(_0x520e29===undefined||_0x520e29===null)return null;if(typeof _0x520e29!==_0x2e9b81(0x13a))throw notificationError(_0x2e9b81(0x123),_0x2e9b81(0x135)+_0x225162+_0x2e9b81(0xfb)+_0x207464+'\x22.');return _0x520e29;}function responseNullableTimeout(_0x2d191f,_0x52784a,_0x8f2d9){const _0x7baf26=a197_0x3c2664;if(_0x2d191f===undefined||_0x2d191f===null)return null;if(!Number[_0x7baf26(0xdf)](_0x2d191f)||_0x2d191f<0x0)throw notificationError(_0x7baf26(0x123),_0x7baf26(0x135)+_0x8f2d9+_0x7baf26(0xfb)+_0x52784a+'\x22.');return _0x2d191f;}function normalizeNullableString(_0x4aec96){const _0x45e4f8=a197_0x3c2664;return typeof _0x4aec96===_0x45e4f8(0x13a)?_0x4aec96:null;}function isJsonObject(_0x3a11e5){const _0x4ce05c=a197_0x3c2664;return _0x3a11e5!==null&&typeof _0x3a11e5===_0x4ce05c(0x102)&&!Array['isArray'](_0x3a11e5);}function hasOwn(_0x18fd1b,_0x5993a2){const _0x11e1c9=a197_0x3c2664;return Object['prototype'][_0x11e1c9(0xd9)][_0x11e1c9(0x11f)](_0x18fd1b,_0x5993a2);}async function readStdin(){const _0x4beda0=a197_0x3c2664;let _0x50d759='';process[_0x4beda0(0x13d)]['setEncoding'](_0x4beda0(0xde));for await(const _0x28b3df of process[_0x4beda0(0x13d)])_0x50d759+=_0x28b3df;return _0x50d759;}
@@ -1 +1 @@
1
- const a198_0x23687c=a198_0x26ee;(function(_0x57e3c6,_0x24a426){const _0x9d2f65=a198_0x26ee,_0x42175b=_0x57e3c6();while(!![]){try{const _0xbd952=parseInt(_0x9d2f65(0xa9))/0x1*(parseInt(_0x9d2f65(0x91))/0x2)+parseInt(_0x9d2f65(0x8a))/0x3*(-parseInt(_0x9d2f65(0x94))/0x4)+parseInt(_0x9d2f65(0x74))/0x5*(-parseInt(_0x9d2f65(0x86))/0x6)+-parseInt(_0x9d2f65(0xac))/0x7*(parseInt(_0x9d2f65(0x9c))/0x8)+-parseInt(_0x9d2f65(0x99))/0x9+parseInt(_0x9d2f65(0x73))/0xa+parseInt(_0x9d2f65(0x8b))/0xb*(parseInt(_0x9d2f65(0x88))/0xc);if(_0xbd952===_0x24a426)break;else _0x42175b['push'](_0x42175b['shift']());}catch(_0x5af864){_0x42175b['push'](_0x42175b['shift']());}}}(a198_0xb425,0xa650e));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a198_0x26ee(_0x1872eb,_0x4cce46){_0x1872eb=_0x1872eb-0x71;const _0xb42580=a198_0xb425();let _0x26ee41=_0xb42580[_0x1872eb];return _0x26ee41;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a198_0x23687c(0x92),'general','form',a198_0x23687c(0x83)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x23687c(0x7c),'general':a198_0x23687c(0x78),'form':a198_0x23687c(0x8c),'idCard':'IdCard'},SCENE_FLAG={'name':a198_0x23687c(0x77),'type':a198_0x23687c(0x97),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x23687c(0xaa)},IMAGE_FILE_FLAG={'name':a198_0x23687c(0x76),'type':a198_0x23687c(0x97),'description':a198_0x23687c(0xa0)},IMAGE_URL_FLAG={'name':a198_0x23687c(0x8e),'type':a198_0x23687c(0x97),'description':a198_0x23687c(0x93)};function a198_0xb425(){const _0x4a7111=['383654fLkQoC','invoice','Publicly\x20accessible\x20image\x20or\x20file\x20URL','3516bWFKzy','str','toLowerCase','string','recognize','7854795PxghNj','form','/smartapi/common/queryFileUrl','3288752rAxsNA','path','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','\x20OCR','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','fileUrl','imageUrl','/smartapi/ocr/recognize-text?','Unsupported\x20OCR\x20scene:\x20','Preview:\x20recognize\x20','length','File\x20URL\x20response\x20missing\x20fileUrl.','.\x20Supported\x20scenes:\x20','1XYpOAZ','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','7QARgph','trim','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','8055540vjhPQW','1545ghnDrW','POST','image-file','scene','General','GET','toString','\x20OCR\x20from\x20URL','Invoice','validation','filePath','ocr','/smartapi/common/uploadFile','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','imageFile','idCard','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','apiError','4920HFRICc','appCode','21414204LgrtwD','idcard','1923FfzrJH','11IjMOvq','Table','join','image-url','File\x20upload\x20response\x20missing\x20filePath.','read'];a198_0xb425=function(){return _0x4a7111;};return a198_0xb425();}function normalizeScene(_0x250632){const _0x58d562=a198_0x23687c,_0x4b6738=_0x250632[_0x58d562(0x71)]()[_0x58d562(0x96)]();if(_0x4b6738===_0x58d562(0x89))return'idCard';if(_0x4b6738===_0x58d562(0x92)||_0x4b6738==='general'||_0x4b6738===_0x58d562(0x9a))return _0x4b6738;throw CliErrors[_0x58d562(0x7d)](_0x58d562(0xa4)+_0x250632+_0x58d562(0xa8)+SUPPORTED_SCENES[_0x58d562(0x8d)](',\x20'));}function selectedInputs(_0x25f991){const _0xd813ee=a198_0x23687c,_0x273b7f=_0x25f991[_0xd813ee(0x95)](_0xd813ee(0x76))[_0xd813ee(0x71)](),_0x2c260d=_0x25f991['str']('image-url')[_0xd813ee(0x71)]();return{'imageFile':_0x273b7f,'imageUrl':_0x2c260d,'count':[_0x273b7f,_0x2c260d]['filter'](Boolean)[_0xd813ee(0xa6)]};}function validateInputSelection(_0x52168e){const _0x150eb9=a198_0x23687c,_0x4e03f5=selectedInputs(_0x52168e);if(_0x4e03f5['count']!==0x1)throw CliErrors[_0x150eb9(0x7d)](_0x150eb9(0x9e));return _0x4e03f5;}function withScene(_0x2b7e63,_0x209528,_0x15c503){const _0x1ffa35=a198_0x23687c;return{..._0x2b7e63,'scene':_0x209528,..._0x15c503?{'sourceFile':{'fileName':_0x15c503['fileName'],'filePath':_0x15c503[_0x1ffa35(0x7e)]}}:{}};}const ocrRecognize={'service':a198_0x23687c(0x7f),'command':a198_0x23687c(0x98),'description':a198_0x23687c(0x72),'risk':a198_0x23687c(0x90),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x51dafd){const _0x304769=a198_0x23687c,_0x27fa3f=normalizeScene(_0x51dafd['str'](_0x304769(0x77))),_0x3c0a4f=SCENE_TO_LEGACY_TYPE[_0x27fa3f],_0x5af008=validateInputSelection(_0x51dafd);if(_0x5af008[_0x304769(0xa2)]){const _0x22a472=new URLSearchParams({'url':_0x5af008['imageUrl'],'type':_0x3c0a4f,'appCode':_0x51dafd[_0x304769(0x87)]});return{'method':'GET','url':_0x304769(0xa3)+_0x22a472[_0x304769(0x7a)](),'description':_0x304769(0xa5)+_0x27fa3f+_0x304769(0x7b)};}const _0x321204=requireDevelopmentUploadFile(_0x5af008[_0x304769(0x82)],_0x304769(0x76));return{'method':_0x304769(0x75),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x304769(0x75),'url':_0x304769(0x80),'body':{'appCode':_0x51dafd[_0x304769(0x87)],'multipart':{'file':_0x321204}}},{'method':_0x304769(0x75),'url':_0x304769(0x9b),'body':{'filePath':_0x304769(0x81),'downloadFlag':![]}},{'method':_0x304769(0x79),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x51dafd[_0x304769(0x87)],'url':_0x304769(0x84),'type':_0x3c0a4f}}]},'description':_0x304769(0xab)+_0x27fa3f+_0x304769(0x9f)};},async 'execute'(_0x5d9335){const _0x5de28b=a198_0x23687c,_0x137041=normalizeScene(_0x5d9335[_0x5de28b(0x95)](_0x5de28b(0x77))),_0x2db524=SCENE_TO_LEGACY_TYPE[_0x137041],_0x3c1d63=validateInputSelection(_0x5d9335);if(_0x3c1d63[_0x5de28b(0xa2)]){const _0x3e7a38=await recognizeDevelopmentOcr(_0x5d9335['appCode'],{'url':_0x3c1d63[_0x5de28b(0xa2)],'type':_0x2db524});return{'ok':!![],'data':withScene(_0x3e7a38,_0x137041)};}const _0x3b234b=requireDevelopmentUploadFile(_0x3c1d63[_0x5de28b(0x82)],_0x5de28b(0x76)),_0x39b02c=await uploadDevelopmentFile(_0x5d9335[_0x5de28b(0x87)],_0x3b234b[_0x5de28b(0x9d)]);if(!_0x39b02c[_0x5de28b(0x7e)])throw CliErrors[_0x5de28b(0x85)](_0x5de28b(0x8f));const _0x4e0fca=await queryDevelopmentFileUrl(_0x39b02c[_0x5de28b(0x7e)],{'download':![]});if(!_0x4e0fca[_0x5de28b(0xa1)])throw CliErrors[_0x5de28b(0x85)](_0x5de28b(0xa7));const _0x413179=await recognizeDevelopmentOcr(_0x5d9335['appCode'],{'url':_0x4e0fca[_0x5de28b(0xa1)],'type':_0x2db524});return{'ok':!![],'data':withScene(_0x413179,_0x137041,_0x39b02c)};}};export const ocrDefinitions=[ocrRecognize];
1
+ function a198_0x4b1d(_0x5470d2,_0x3d91fe){_0x5470d2=_0x5470d2-0x132;const _0x136a44=a198_0x136a();let _0x4b1d0e=_0x136a44[_0x5470d2];return _0x4b1d0e;}const a198_0x4522e0=a198_0x4b1d;function a198_0x136a(){const _0x25156c=['Preview:\x20recognize\x20','36utzBqu','2588728qVqsYK','scene','4947360yRPmUO','imageUrl','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','/smartapi/common/uploadFile','str','890YYIHUm','trim','10004wdwXqY','form','toString','4SMHvgz','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','idcard','ocr','1413rvkDUz','read','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','validation','/smartapi/ocr/recognize-text?','POST','imageFile','image-url','filePath','6085758wJqkWN','path','invoice','489674RJFoSn','image-file','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','2136565Wiizgp','fileUrl','GET','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','General','apiError','count','File\x20URL\x20response\x20missing\x20fileUrl.','Invoice','149666kEGOAY','toLowerCase','fileName','appCode','string','Publicly\x20accessible\x20image\x20or\x20file\x20URL','.\x20Supported\x20scenes:\x20','general','idCard'];a198_0x136a=function(){return _0x25156c;};return a198_0x136a();}(function(_0x7bf469,_0x1fc854){const _0x1ae217=a198_0x4b1d,_0x1461ce=_0x7bf469();while(!![]){try{const _0x1263c5=-parseInt(_0x1ae217(0x143))/0x1*(parseInt(_0x1ae217(0x133))/0x2)+parseInt(_0x1ae217(0x137))/0x3*(-parseInt(_0x1ae217(0x164))/0x4)+parseInt(_0x1ae217(0x146))/0x5+-parseInt(_0x1ae217(0x15c))/0x6+parseInt(_0x1ae217(0x140))/0x7+-parseInt(_0x1ae217(0x15a))/0x8*(-parseInt(_0x1ae217(0x159))/0x9)+parseInt(_0x1ae217(0x162))/0xa*(parseInt(_0x1ae217(0x14f))/0xb);if(_0x1263c5===_0x1fc854)break;else _0x1461ce['push'](_0x1461ce['shift']());}catch(_0x1a27d7){_0x1461ce['push'](_0x1461ce['shift']());}}}(a198_0x136a,0xc839e));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',a198_0x4522e0(0x156),a198_0x4522e0(0x165),a198_0x4522e0(0x157)],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x4522e0(0x14e),'general':a198_0x4522e0(0x14a),'form':'Table','idCard':'IdCard'},SCENE_FLAG={'name':a198_0x4522e0(0x15b),'type':a198_0x4522e0(0x153),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x4522e0(0x149)},IMAGE_FILE_FLAG={'name':a198_0x4522e0(0x144),'type':a198_0x4522e0(0x153),'description':a198_0x4522e0(0x139)},IMAGE_URL_FLAG={'name':a198_0x4522e0(0x13e),'type':a198_0x4522e0(0x153),'description':a198_0x4522e0(0x154)};function normalizeScene(_0x9bb3fd){const _0x2d3729=a198_0x4522e0,_0x3ad6d7=_0x9bb3fd[_0x2d3729(0x163)]()[_0x2d3729(0x150)]();if(_0x3ad6d7===_0x2d3729(0x135))return _0x2d3729(0x157);if(_0x3ad6d7===_0x2d3729(0x142)||_0x3ad6d7==='general'||_0x3ad6d7===_0x2d3729(0x165))return _0x3ad6d7;throw CliErrors[_0x2d3729(0x13a)]('Unsupported\x20OCR\x20scene:\x20'+_0x9bb3fd+_0x2d3729(0x155)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x491cd1){const _0xd6d09b=a198_0x4522e0,_0x2b4ce3=_0x491cd1[_0xd6d09b(0x161)](_0xd6d09b(0x144))[_0xd6d09b(0x163)](),_0x54f152=_0x491cd1[_0xd6d09b(0x161)](_0xd6d09b(0x13e))[_0xd6d09b(0x163)]();return{'imageFile':_0x2b4ce3,'imageUrl':_0x54f152,'count':[_0x2b4ce3,_0x54f152]['filter'](Boolean)['length']};}function validateInputSelection(_0x4d7fc3){const _0x4bda31=a198_0x4522e0,_0x11e425=selectedInputs(_0x4d7fc3);if(_0x11e425[_0x4bda31(0x14c)]!==0x1)throw CliErrors[_0x4bda31(0x13a)](_0x4bda31(0x134));return _0x11e425;}function withScene(_0x369088,_0x50da01,_0xc5e47b){const _0x470736=a198_0x4522e0;return{..._0x369088,'scene':_0x50da01,..._0xc5e47b?{'sourceFile':{'fileName':_0xc5e47b[_0x470736(0x151)],'filePath':_0xc5e47b['filePath']}}:{}};}const ocrRecognize={'service':a198_0x4522e0(0x136),'command':'recognize','description':'Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','risk':a198_0x4522e0(0x138),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x4cca02){const _0x480fbc=a198_0x4522e0,_0x369e49=normalizeScene(_0x4cca02[_0x480fbc(0x161)](_0x480fbc(0x15b))),_0x16eab1=SCENE_TO_LEGACY_TYPE[_0x369e49],_0x5129b2=validateInputSelection(_0x4cca02);if(_0x5129b2[_0x480fbc(0x15d)]){const _0x557844=new URLSearchParams({'url':_0x5129b2[_0x480fbc(0x15d)],'type':_0x16eab1,'appCode':_0x4cca02[_0x480fbc(0x152)]});return{'method':_0x480fbc(0x148),'url':_0x480fbc(0x13b)+_0x557844[_0x480fbc(0x132)](),'description':_0x480fbc(0x158)+_0x369e49+'\x20OCR\x20from\x20URL'};}const _0x19e781=requireDevelopmentUploadFile(_0x5129b2[_0x480fbc(0x13d)],'image-file');return{'method':_0x480fbc(0x13c),'url':_0x480fbc(0x160),'body':{'steps':[{'method':_0x480fbc(0x13c),'url':_0x480fbc(0x160),'body':{'appCode':_0x4cca02[_0x480fbc(0x152)],'multipart':{'file':_0x19e781}}},{'method':_0x480fbc(0x13c),'url':'/smartapi/common/queryFileUrl','body':{'filePath':_0x480fbc(0x15e),'downloadFlag':![]}},{'method':_0x480fbc(0x148),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x4cca02[_0x480fbc(0x152)],'url':_0x480fbc(0x145),'type':_0x16eab1}}]},'description':_0x480fbc(0x15f)+_0x369e49+'\x20OCR'};},async 'execute'(_0x418790){const _0x44c391=a198_0x4522e0,_0x4e6bdd=normalizeScene(_0x418790[_0x44c391(0x161)](_0x44c391(0x15b))),_0x3dcf5e=SCENE_TO_LEGACY_TYPE[_0x4e6bdd],_0xb504b=validateInputSelection(_0x418790);if(_0xb504b[_0x44c391(0x15d)]){const _0x130964=await recognizeDevelopmentOcr(_0x418790[_0x44c391(0x152)],{'url':_0xb504b[_0x44c391(0x15d)],'type':_0x3dcf5e});return{'ok':!![],'data':withScene(_0x130964,_0x4e6bdd)};}const _0x4f89c8=requireDevelopmentUploadFile(_0xb504b[_0x44c391(0x13d)],_0x44c391(0x144)),_0x4313f8=await uploadDevelopmentFile(_0x418790[_0x44c391(0x152)],_0x4f89c8[_0x44c391(0x141)]);if(!_0x4313f8[_0x44c391(0x13f)])throw CliErrors[_0x44c391(0x14b)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x48736d=await queryDevelopmentFileUrl(_0x4313f8[_0x44c391(0x13f)],{'download':![]});if(!_0x48736d[_0x44c391(0x147)])throw CliErrors[_0x44c391(0x14b)](_0x44c391(0x14d));const _0x9f3f87=await recognizeDevelopmentOcr(_0x418790[_0x44c391(0x152)],{'url':_0x48736d[_0x44c391(0x147)],'type':_0x3dcf5e});return{'ok':!![],'data':withScene(_0x9f3f87,_0x4e6bdd,_0x4313f8)};}};export const ocrDefinitions=[ocrRecognize];