@lovrabet/rabetbase-cli 2.5.9 → 2.5.10-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 (377) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +1 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +1 -1
  32. package/lib/commands/app-config/delete.js +1 -1
  33. package/lib/commands/app-config/get.js +1 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +1 -1
  36. package/lib/commands/app-config/set.js +1 -1
  37. package/lib/commands/app-config/shared.js +1 -1
  38. package/lib/commands/auth/index.js +1 -1
  39. package/lib/commands/bff/create.js +1 -1
  40. package/lib/commands/bff/delete.js +1 -1
  41. package/lib/commands/bff/detail.js +1 -1
  42. package/lib/commands/bff/index.js +1 -1
  43. package/lib/commands/bff/list.js +1 -1
  44. package/lib/commands/bff/logs.js +1 -1
  45. package/lib/commands/bff/pull.js +1 -1
  46. package/lib/commands/bff/push.js +1 -1
  47. package/lib/commands/bff/status.js +1 -1
  48. package/lib/commands/cli-skill/index.js +1 -1
  49. package/lib/commands/cli-update.js +1 -1
  50. package/lib/commands/codegen/index.js +1 -1
  51. package/lib/commands/codegen/sdk.js +1 -1
  52. package/lib/commands/codegen/sql.js +1 -1
  53. package/lib/commands/common/app-registry.js +1 -1
  54. package/lib/commands/common/app-selector.js +1 -1
  55. package/lib/commands/common/async-task.js +1 -1
  56. package/lib/commands/common/dry-run.js +1 -1
  57. package/lib/commands/common/flags.js +1 -1
  58. package/lib/commands/common/local-file.js +1 -1
  59. package/lib/commands/common/validate.js +1 -1
  60. package/lib/commands/config/delete.js +1 -1
  61. package/lib/commands/config/get.js +1 -1
  62. package/lib/commands/config/index.js +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/design-context.js +1 -1
  78. package/lib/commands/dataset/design-start.js +1 -1
  79. package/lib/commands/dataset/design-status.js +1 -1
  80. package/lib/commands/dataset/design-sync-retry.js +1 -1
  81. package/lib/commands/dataset/design-sync-status.js +1 -1
  82. package/lib/commands/dataset/design-validate.js +1 -1
  83. package/lib/commands/dataset/detail.js +1 -1
  84. package/lib/commands/dataset/extend-update.js +1 -1
  85. package/lib/commands/dataset/field-restore.js +1 -1
  86. package/lib/commands/dataset/field-update.js +1 -1
  87. package/lib/commands/dataset/generate.js +1 -1
  88. package/lib/commands/dataset/index.js +1 -1
  89. package/lib/commands/dataset/list.js +1 -1
  90. package/lib/commands/dataset/operations.js +1 -1
  91. package/lib/commands/dataset/relation-audit.js +1 -1
  92. package/lib/commands/dataset/relation-create.js +1 -1
  93. package/lib/commands/dataset/relation-delete.js +1 -1
  94. package/lib/commands/dataset/relation-shared.js +1 -1
  95. package/lib/commands/dataset/relation-update.js +1 -1
  96. package/lib/commands/dataset/relations.js +1 -1
  97. package/lib/commands/dataset/rename.js +1 -1
  98. package/lib/commands/dataset/restore.js +1 -1
  99. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  100. package/lib/commands/db/analysis-batching.js +1 -1
  101. package/lib/commands/db/analyze-batch-plan.js +1 -1
  102. package/lib/commands/db/analyze-cancel.js +1 -1
  103. package/lib/commands/db/analyze-start.js +1 -1
  104. package/lib/commands/db/analyze-status.js +1 -1
  105. package/lib/commands/db/create.js +1 -1
  106. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  110. package/lib/commands/db/delete.js +1 -1
  111. package/lib/commands/db/detail.js +1 -1
  112. package/lib/commands/db/diff-refresh-start.js +1 -1
  113. package/lib/commands/db/diff-refresh-status.js +1 -1
  114. package/lib/commands/db/diff.js +1 -1
  115. package/lib/commands/db/index.js +1 -1
  116. package/lib/commands/db/list.js +1 -1
  117. package/lib/commands/db/shared.js +1 -1
  118. package/lib/commands/db/table-diff-shared.js +1 -1
  119. package/lib/commands/db/tables.js +1 -1
  120. package/lib/commands/db/test.js +1 -1
  121. package/lib/commands/db/update.js +1 -1
  122. package/lib/commands/deployment/index.js +1 -1
  123. package/lib/commands/deployment/sync-all.js +1 -1
  124. package/lib/commands/deployment/sync-jobs.js +1 -1
  125. package/lib/commands/deployment/sync-status.js +1 -1
  126. package/lib/commands/doctor.js +1 -1
  127. package/lib/commands/file/index.js +1 -1
  128. package/lib/commands/flow/create.js +1 -1
  129. package/lib/commands/flow/detail.js +1 -1
  130. package/lib/commands/flow/index.js +1 -1
  131. package/lib/commands/flow/list.js +1 -1
  132. package/lib/commands/flow/page-list.js +1 -1
  133. package/lib/commands/flow/publish.js +1 -1
  134. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  135. package/lib/commands/flow/runtime-role-list.js +1 -1
  136. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  137. package/lib/commands/flow/runtime-user-search.js +1 -1
  138. package/lib/commands/flow/shared.js +1 -1
  139. package/lib/commands/flow/update.js +1 -1
  140. package/lib/commands/flow/validate.js +1 -1
  141. package/lib/commands/instant-api-policy/current.js +1 -1
  142. package/lib/commands/instant-api-policy/index.js +1 -1
  143. package/lib/commands/instant-api-policy/init.js +1 -1
  144. package/lib/commands/instant-api-policy/publish.js +1 -1
  145. package/lib/commands/instant-api-policy/pull.js +1 -1
  146. package/lib/commands/instant-api-policy/revision.js +1 -1
  147. package/lib/commands/instant-api-policy/revisions.js +1 -1
  148. package/lib/commands/instant-api-policy/rollback.js +1 -1
  149. package/lib/commands/instant-api-policy/shared.js +1 -1
  150. package/lib/commands/instant-api-policy/validate.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/issue/shared.js +1 -1
  155. package/lib/commands/kb/create.js +1 -1
  156. package/lib/commands/kb/delete.js +1 -1
  157. package/lib/commands/kb/detail.js +1 -1
  158. package/lib/commands/kb/index.js +1 -1
  159. package/lib/commands/kb/list.js +1 -1
  160. package/lib/commands/kb/search.js +1 -1
  161. package/lib/commands/kb/shared.js +1 -1
  162. package/lib/commands/kb/update.js +1 -1
  163. package/lib/commands/logs/index.js +1 -1
  164. package/lib/commands/menu/asset-update.js +1 -1
  165. package/lib/commands/menu/delete.js +1 -1
  166. package/lib/commands/menu/external-link-create.js +1 -1
  167. package/lib/commands/menu/external-link-update.js +1 -1
  168. package/lib/commands/menu/group-create.js +1 -1
  169. package/lib/commands/menu/group-update.js +1 -1
  170. package/lib/commands/menu/index.js +1 -1
  171. package/lib/commands/menu/list.js +1 -1
  172. package/lib/commands/menu/move.js +1 -1
  173. package/lib/commands/menu/regroup-start.js +1 -1
  174. package/lib/commands/menu/rename.js +1 -1
  175. package/lib/commands/menu/shared/compare-table.js +1 -1
  176. package/lib/commands/menu/shared/delete-plan.js +1 -1
  177. package/lib/commands/menu/shared/facts.js +1 -1
  178. package/lib/commands/menu/shared/index.js +1 -1
  179. package/lib/commands/menu/shared/inquirer.js +1 -1
  180. package/lib/commands/menu/shared/local-pages.js +1 -1
  181. package/lib/commands/menu/shared/logic.js +1 -1
  182. package/lib/commands/menu/shared/mutations.js +1 -1
  183. package/lib/commands/menu/shared/path.js +1 -1
  184. package/lib/commands/menu/shared/service.js +1 -1
  185. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  186. package/lib/commands/menu/shared/sync-core.js +1 -1
  187. package/lib/commands/menu/shared/update-core.js +1 -1
  188. package/lib/commands/menu/shared/valid-url.js +1 -1
  189. package/lib/commands/menu/subapp-assets-status.js +1 -1
  190. package/lib/commands/menu/subapp-assets-update.js +1 -1
  191. package/lib/commands/menu/sync.js +1 -1
  192. package/lib/commands/menu/visibility-update.js +1 -1
  193. package/lib/commands/notification/config-create.js +1 -1
  194. package/lib/commands/notification/config-delete.js +1 -1
  195. package/lib/commands/notification/config-list.js +1 -1
  196. package/lib/commands/notification/config-update.js +1 -1
  197. package/lib/commands/notification/index.js +1 -1
  198. package/lib/commands/notification/shared.js +1 -1
  199. package/lib/commands/ocr/index.js +1 -1
  200. package/lib/commands/page/create.js +1 -1
  201. package/lib/commands/page/custom/detail.js +1 -1
  202. package/lib/commands/page/custom/list.js +1 -1
  203. package/lib/commands/page/custom/publish.js +1 -1
  204. package/lib/commands/page/custom/shared.js +1 -1
  205. package/lib/commands/page/custom/syntax.js +1 -1
  206. package/lib/commands/page/custom/update.js +1 -1
  207. package/lib/commands/page/data-list-status.js +1 -1
  208. package/lib/commands/page/generate-start.js +1 -1
  209. package/lib/commands/page/generate-status.js +1 -1
  210. package/lib/commands/page/index.js +1 -1
  211. package/lib/commands/page/pull.js +1 -1
  212. package/lib/commands/page/push.js +1 -1
  213. package/lib/commands/page/relation-audit.js +1 -1
  214. package/lib/commands/page/restore.js +1 -1
  215. package/lib/commands/page/shared.js +1 -1
  216. package/lib/commands/page/sync.js +1 -1
  217. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  218. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  219. package/lib/commands/project/create/format-elapsed.js +1 -1
  220. package/lib/commands/project/create/main.js +1 -1
  221. package/lib/commands/project/create/materialize-project-template.js +1 -1
  222. package/lib/commands/project/create/project-name.js +1 -1
  223. package/lib/commands/project/create/project-template-archive.js +1 -1
  224. package/lib/commands/project/create/project-template-path.js +1 -1
  225. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  226. package/lib/commands/project/create/use-format-code.js +1 -1
  227. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  228. package/lib/commands/project/domain-routing-sync.js +1 -1
  229. package/lib/commands/project/index.js +1 -1
  230. package/lib/commands/project/upgrade.js +1 -1
  231. package/lib/commands/registry.js +1 -1
  232. package/lib/commands/role/delete.js +1 -1
  233. package/lib/commands/role/detail.js +1 -1
  234. package/lib/commands/role/index.js +1 -1
  235. package/lib/commands/role/list.js +1 -1
  236. package/lib/commands/role/shared.js +1 -1
  237. package/lib/commands/role/update.js +1 -1
  238. package/lib/commands/role/user-add.js +1 -1
  239. package/lib/commands/role/user-remove.js +1 -1
  240. package/lib/commands/role/user-resolve.js +1 -1
  241. package/lib/commands/rule/get.js +1 -1
  242. package/lib/commands/rule/index.js +1 -1
  243. package/lib/commands/rule/list.js +1 -1
  244. package/lib/commands/rule/set.js +1 -1
  245. package/lib/commands/rule/shared.js +1 -1
  246. package/lib/commands/run/index.js +1 -1
  247. package/lib/commands/schema.js +1 -1
  248. package/lib/commands/sql/create.js +1 -1
  249. package/lib/commands/sql/delete.js +1 -1
  250. package/lib/commands/sql/detail.js +1 -1
  251. package/lib/commands/sql/exec.js +1 -1
  252. package/lib/commands/sql/index.js +1 -1
  253. package/lib/commands/sql/list.js +1 -1
  254. package/lib/commands/sql/pull.js +1 -1
  255. package/lib/commands/sql/push.js +1 -1
  256. package/lib/commands/sql/shared.js +1 -1
  257. package/lib/commands/sql/status.js +1 -1
  258. package/lib/commands/sql/validate.js +1 -1
  259. package/lib/commands/task/index.js +1 -1
  260. package/lib/commands/task/status.js +1 -1
  261. package/lib/commands/tenant/index.js +1 -1
  262. package/lib/commands/tenant/members-list.js +1 -1
  263. package/lib/commands/tenant/shared.js +1 -1
  264. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  265. package/lib/commands/user-account/feishu-bind.js +1 -1
  266. package/lib/commands/user-account/index.js +1 -1
  267. package/lib/commands/workspace/add.js +1 -1
  268. package/lib/commands/workspace/index.js +1 -1
  269. package/lib/commands/workspace/remove.js +1 -1
  270. package/lib/config/domain-config.js +1 -1
  271. package/lib/config/project-domain-routing.js +1 -1
  272. package/lib/config/region-config.js +1 -1
  273. package/lib/config/schema.js +1 -1
  274. package/lib/constant/cdn.js +1 -1
  275. package/lib/constant/cli.js +1 -1
  276. package/lib/constant/defaults.js +1 -1
  277. package/lib/constant/domain.js +1 -1
  278. package/lib/constant/env.js +1 -1
  279. package/lib/constant/output.js +1 -1
  280. package/lib/constant/paths.js +1 -1
  281. package/lib/constant/region.js +1 -1
  282. package/lib/constant/risk.js +1 -1
  283. package/lib/constant/routing-profile.js +1 -1
  284. package/lib/context/app-resolver.js +1 -1
  285. package/lib/context/auth-resolver.js +1 -1
  286. package/lib/context/config-loader.js +1 -1
  287. package/lib/context.js +1 -1
  288. package/lib/core/alias-resolver.js +1 -1
  289. package/lib/core/api-client.js +1 -1
  290. package/lib/core/bff/config.js +1 -1
  291. package/lib/core/bff/file-system.js +1 -1
  292. package/lib/core/bff/hash.js +1 -1
  293. package/lib/core/bff/hook-directory.js +1 -1
  294. package/lib/core/bff/lock.js +1 -1
  295. package/lib/core/bff/utils.js +1 -1
  296. package/lib/core/cross-db-analysis.js +1 -1
  297. package/lib/core/cross-db-relation.js +1 -1
  298. package/lib/core/db-resolver.js +1 -1
  299. package/lib/core/flow-config.js +1 -1
  300. package/lib/core/instant-api-policy/config.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/telemetry/send-platform-issue-collect-log.js +1 -1
  352. package/lib/utils/ai_config.js +1 -1
  353. package/lib/utils/apply-jq-filter.js +1 -1
  354. package/lib/utils/cdn-config.js +1 -1
  355. package/lib/utils/check-sdk-version.js +1 -1
  356. package/lib/utils/cli-version-check.js +1 -1
  357. package/lib/utils/cli-version-policy.js +1 -1
  358. package/lib/utils/config.js +1 -1
  359. package/lib/utils/entity-with-id.js +1 -1
  360. package/lib/utils/file-utils.js +1 -1
  361. package/lib/utils/guides-cdn.js +1 -1
  362. package/lib/utils/http-client.js +1 -1
  363. package/lib/utils/is-non-interactive.js +1 -1
  364. package/lib/utils/logger.js +1 -1
  365. package/lib/utils/params.js +1 -1
  366. package/lib/utils/platform.js +1 -1
  367. package/lib/utils/sleep.js +1 -1
  368. package/lib/utils/template-replacer.js +1 -1
  369. package/lib/utils/update-notice.js +1 -1
  370. package/lib/utils/version.js +1 -1
  371. package/lib/utils/with-active-cookie.js +1 -1
  372. package/lib/utils/write-cli-side-channel.js +1 -1
  373. package/package.json +2 -2
  374. package/skills/rabetbase/SKILL.md +2 -2
  375. package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
  376. package/skills/rabetbase-page-generation/SKILL.md +2 -2
  377. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a190_0x14f42e=a190_0x3ae0;(function(_0x40fd80,_0x23e3d1){const _0x530ad4=a190_0x3ae0,_0x79333e=_0x40fd80();while(!![]){try{const _0x10f007=-parseInt(_0x530ad4(0xf0))/0x1*(-parseInt(_0x530ad4(0xed))/0x2)+parseInt(_0x530ad4(0x120))/0x3*(parseInt(_0x530ad4(0xf4))/0x4)+-parseInt(_0x530ad4(0x106))/0x5+-parseInt(_0x530ad4(0x117))/0x6+-parseInt(_0x530ad4(0x116))/0x7+-parseInt(_0x530ad4(0x102))/0x8*(-parseInt(_0x530ad4(0xe5))/0x9)+parseInt(_0x530ad4(0x107))/0xa*(parseInt(_0x530ad4(0x122))/0xb);if(_0x10f007===_0x23e3d1)break;else _0x79333e['push'](_0x79333e['shift']());}catch(_0x1491d5){_0x79333e['push'](_0x79333e['shift']());}}}(a190_0x542b,0xae947));import a190_0x93d940 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_0x3ae0(_0x1e08d7,_0x356d1a){_0x1e08d7=_0x1e08d7-0xe3;const _0x542be4=a190_0x542b();let _0x3ae0e8=_0x542be4[_0x1e08d7];return _0x3ae0e8;}import{parseMenuSyncParams,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';function a190_0x542b(){const _0x33f8b4=['\x20and\x20CSS:\x20','yes','cookie','12HAuFmr','Fetching\x20online\x20menu\x20list...','\x20menu(s)\x20bound\x20to\x20','207272ROyQrN','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','2888308eQrxvr','paths','filter','cyan','split','skipped','menu','rawFlags','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','Online\x20menu\x20list\x20fetched','Creating\x20','created','size','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','8rVIpmt','sync','\x20menu(s)\x20created','map','1815FsoVoo','10GZKgGo','Menu\x20sync\x20skipped','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','validation','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','gray','\x20\x20Continue\x20with\x20creation?','\x20page(s)','str','POST','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','appCode','\x20failed.','appcode','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','9440655RySFxG','1392696kgrbqz','Failed\x20to\x20fetch\x20online\x20menu\x20list','flag','length','\x20created,\x20','selectedAppName','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','\x20menu(s)','trim','3qYvQQL','Menu\x20sync\x20completed:\x20','3334133HVxmjw','\x20created.','/smartapi/menu/create','Created\x20','\x20\x20Create\x20','jsUrl','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','cssUrl','yellow','onlineMenuList','onlinePaths','Menu\x20creation\x20failed','message','\x20\x20Cancelled.','appName','\x20local\x20microfrontend\x20menu(s).','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','failed','✓\x20Menu\x20sync\x20completed:\x20','246699hSbzSc','params','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','targetPages','\x20menu(s)...'];a190_0x542b=function(){return _0x33f8b4;};return a190_0x542b();}import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a190_0x14f42e(0xfa),'command':a190_0x14f42e(0x103),'description':'Register\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a190_0x14f42e(0xe6),'type':'string','description':a190_0x14f42e(0xf1)+'JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.'},{'name':a190_0x14f42e(0xf5),'type':'string','description':a190_0x14f42e(0x10b)},{'name':'yes','type':'boolean','description':a190_0x14f42e(0x111)}],async 'dryRun'(_0xbd1b90){const _0xca6d4b=a190_0x14f42e;ensureRunnableContext(_0xbd1b90[_0xca6d4b(0xfb)],_0xbd1b90[_0xca6d4b(0x11c)]);const _0x2bdab4=await runMenuSyncCore(_0xbd1b90[_0xca6d4b(0x112)],_0xbd1b90['cookie'],parsePaths(_0xbd1b90[_0xca6d4b(0x10f)](_0xca6d4b(0xf5))),_0xbd1b90['str'](_0xca6d4b(0xe6)),{'dryRun':!![]});return{'method':_0xca6d4b(0x110),'url':_0xca6d4b(0x124),'body':_0x2bdab4,'description':_0x2bdab4[_0xca6d4b(0xf9)]?_0xca6d4b(0x132):'Would\x20create\x20'+_0x2bdab4[_0xca6d4b(0xe8)][_0xca6d4b(0x11a)]+_0xca6d4b(0x131)};},async 'execute'(_0x13665b){const _0x12204c=a190_0x14f42e;ensureRunnableContext(_0x13665b[_0x12204c(0xfb)],_0x13665b[_0x12204c(0x11c)]);const _0x42efe1=_0x13665b[_0x12204c(0x119)](_0x12204c(0xeb)),_0x235af4=_0x13665b[_0x12204c(0x10f)]('params'),_0x5859fd=parsePaths(_0x13665b[_0x12204c(0x10f)](_0x12204c(0xf5))),_0x30b210=parseMenuSyncParams(_0x235af4);if(_0x42efe1){const _0x2553b1=await runMenuSyncCore(_0x13665b[_0x12204c(0x112)],_0x13665b[_0x12204c(0xec)],_0x5859fd,_0x235af4);if(_0x2553b1[_0x12204c(0xf9)]){const _0x4fe871=getLocalPages();_0x4fe871[_0x12204c(0x11a)]===0x0?writeCliSideChannelLine(_0x12204c(0x109)):writeCliSideChannelLine(_0x12204c(0xf3));}else writeCliSideChannelLine(_0x12204c(0xe4)+_0x2553b1['created']+_0x12204c(0x104));return{'ok':!![],'data':_0x2553b1,'message':_0x2553b1['skipped']?_0x12204c(0x108):_0x12204c(0x121)+_0x2553b1[_0x12204c(0xff)]+_0x12204c(0x123)};}if(_0x5859fd['length']>0x0)throw CliErrors['validation'](_0x12204c(0xe7),_0x12204c(0xf2));if(!isInteractive()&&_0x235af4)throw CliErrors['validation'](_0x12204c(0xfc),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive(),writeCliSideChannelLine(_0x12204c(0x11d));const _0x390f6b=startSpinner(_0x12204c(0xee));let _0x5374a0,_0x423601,_0x1c97f1;try{const _0xd4fc84=await fetchMenuData(_0x13665b[_0x12204c(0x112)],_0x13665b[_0x12204c(0xec)]);_0x5374a0=_0xd4fc84['localPages'],_0x423601=_0xd4fc84[_0x12204c(0x12c)],_0x1c97f1=_0xd4fc84[_0x12204c(0x12b)],stopSpinner(_0x390f6b,_0x12204c(0xfd),!![]);}catch(_0x4ac200){stopSpinner(_0x390f6b,_0x12204c(0x118),![]);throw CliErrors[_0x12204c(0x10a)](_0x4ac200 instanceof Error?_0x4ac200[_0x12204c(0x12e)]:_0x12204c(0x118));}if(_0x5374a0[_0x12204c(0x11a)]===0x0)return writeCliSideChannelLine(a190_0x93d940[_0x12204c(0x12a)](_0x12204c(0x101))),{'ok':!![]};const _0x2d7d10=buildCompareRows(_0x5374a0,_0x423601);writeCliSideChannelLine(renderCompareTable(_0x2d7d10)),writeCliSideChannelLine('');const _0x25fa96=await selectPages(_0x5374a0,_0x423601);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0x93d940[_0x12204c(0xf7)]('\x20\x20✓\x20Selected:\x20'+_0x25fa96[_0x12204c(0x11a)]+_0x12204c(0x10e)));const _0x38195d=_0x30b210['jsUrl']&&_0x30b210[_0x12204c(0x129)];if(!_0x38195d){writeCliSideChannelLine(renderSyncSummary(_0x25fa96,_0x423601[_0x12204c(0x100)]>0x0));const _0x305522=await askConfirm(_0x12204c(0x10d));if(!_0x305522)return writeCliSideChannelLine(a190_0x93d940[_0x12204c(0x10c)](_0x12204c(0x12f))),{'ok':!![]};}let _0x4450fd=_0x30b210[_0x12204c(0x127)],_0x588cce=_0x30b210[_0x12204c(0x129)];!_0x4450fd&&!_0x30b210['appName']&&(_0x4450fd=await askJsUrl());!_0x588cce&&!_0x30b210[_0x12204c(0x130)]&&(_0x588cce=await askCssUrl());const _0x58b33c=await askConfirm(_0x30b210[_0x12204c(0x130)]?'\x20\x20Create\x20'+_0x25fa96[_0x12204c(0x11a)]+_0x12204c(0xef)+_0x30b210[_0x12204c(0x130)]+'?':_0x12204c(0x126)+_0x25fa96[_0x12204c(0x11a)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x4450fd+_0x12204c(0xea)+_0x588cce+'?');if(!_0x58b33c)return writeCliSideChannelLine(a190_0x93d940[_0x12204c(0x10c)](_0x12204c(0x12f))),{'ok':!![]};const _0x16e5c0=[_0x4450fd,_0x588cce]['filter'](_0x1a9ce5=>Boolean(_0x1a9ce5));_0x30b210[_0x12204c(0x130)]&&_0x16e5c0['length']===0x0&&await assertSharedResourcesConfigured(_0x13665b[_0x12204c(0x112)],_0x13665b['cookie'],_0x30b210['appName']);const _0x502842=startSpinner(_0x12204c(0xfe)+_0x25fa96[_0x12204c(0x11a)]+_0x12204c(0xe9));try{const _0x27aa96=_0x25fa96[_0x12204c(0x105)](_0x35311d=>resolvePage(_0x35311d,_0x30b210,_0x1c97f1)),_0x3e8d49=await doCreateMenus(_0x13665b['appCode'],_0x13665b[_0x12204c(0xec)],_0x27aa96,_0x16e5c0,_0x30b210[_0x12204c(0x130)]?{'appName':_0x30b210[_0x12204c(0x130)]}:undefined);return stopSpinner(_0x502842,_0x12204c(0x125)+_0x3e8d49[_0x12204c(0xff)]+_0x12204c(0x11e),!![]),{'ok':!![],'data':_0x3e8d49,'message':'Menu\x20sync\x20completed:\x20'+_0x3e8d49['created']+_0x12204c(0x11b)+_0x3e8d49[_0x12204c(0xe3)]+_0x12204c(0x113)};}catch(_0x3df9e6){stopSpinner(_0x502842,_0x12204c(0x12d),![]);throw CliErrors[_0x12204c(0x10a)](_0x3df9e6 instanceof Error?_0x3df9e6[_0x12204c(0x12e)]:_0x12204c(0x12d));}}};function ensureRunnableContext(_0x56b9ce,_0x4bdad5){const _0x14ec82=a190_0x14f42e,_0x2d8745=_0x56b9ce[_0x14ec82(0x114)]?String(_0x56b9ce[_0x14ec82(0x114)])[_0x14ec82(0x11f)]():'';if(!isInProject()&&!_0x4bdad5&&!_0x2d8745)throw CliErrors['validation'](_0x14ec82(0x128)+_0x14ec82(0x115));}function parsePaths(_0xfc6023){const _0x38e40f=a190_0x14f42e;return[...new Set(_0xfc6023[_0x38e40f(0xf8)](',')[_0x38e40f(0x105)](_0x17abb6=>_0x17abb6[_0x38e40f(0x11f)]())[_0x38e40f(0xf6)](Boolean))];}
1
+ const a190_0x5bd46a=a190_0xf5b3;function a190_0x5b67(){const _0x1c47f8=['\x20failed.','yes','\x20local\x20microfrontend\x20menu(s).','\x20created.','params','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Failed\x20to\x20fetch\x20online\x20menu\x20list','17626444haKjuo','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','targetPages','9042hadpxm','selectedAppName','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20\x20Continue\x20with\x20creation?','cookie','trim','sync','flag','appCode','POST','\x20menu(s)','filter','12257EkVXNK','appcode','1086aEbpDP','\x20\x20Cancelled.','skipped','Creating\x20','cssUrl','localPages','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','Menu\x20sync\x20skipped','length','appName','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','message','1283214waSwMa','map','paths','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','failed','\x20created,\x20','/smartapi/menu/create','Register\x20local\x20pages\x20as\x20platform\x20menus','created','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','split','898812KeWaWA','boolean','10rzZTwd','Menu\x20sync\x20completed:\x20','validation','str','17607393bDiGyM','Would\x20create\x20','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','gray','Menu\x20creation\x20failed','onlinePaths','\x20page(s)','\x20\x20✓\x20Selected:\x20','yellow','3850065SZuPHm','Created\x20','string','cyan','6PJJXHA','✓\x20Menu\x20sync\x20completed:\x20','\x20\x20Create\x20','rawFlags','onlineMenuList','4904OAKkru','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','size','jsUrl'];a190_0x5b67=function(){return _0x1c47f8;};return a190_0x5b67();}(function(_0xc6a439,_0x3459d3){const _0x465ad3=a190_0xf5b3,_0x14061b=_0xc6a439();while(!![]){try{const _0xe0657a=parseInt(_0x465ad3(0x1a3))/0x1+parseInt(_0x465ad3(0x189))/0x2*(parseInt(_0x465ad3(0x197))/0x3)+-parseInt(_0x465ad3(0x161))/0x4+-parseInt(_0x465ad3(0x170))/0x5*(-parseInt(_0x465ad3(0x174))/0x6)+parseInt(_0x465ad3(0x195))/0x7*(parseInt(_0x465ad3(0x179))/0x8)+parseInt(_0x465ad3(0x167))/0x9*(-parseInt(_0x465ad3(0x163))/0xa)+-parseInt(_0x465ad3(0x186))/0xb;if(_0xe0657a===_0x3459d3)break;else _0x14061b['push'](_0x14061b['shift']());}catch(_0x45ca5e){_0x14061b['push'](_0x14061b['shift']());}}}(a190_0x5b67,0xef2fc));function a190_0xf5b3(_0x4543cf,_0x30ca8e){_0x4543cf=_0x4543cf-0x15c;const _0x5b67ca=a190_0x5b67();let _0xf5b347=_0x5b67ca[_0x4543cf];return _0xf5b347;}import a190_0xf1f731 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';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':'menu','command':a190_0x5bd46a(0x18f),'description':a190_0x5bd46a(0x15d),'risk':'write','flags':[{'name':a190_0x5bd46a(0x183),'type':a190_0x5bd46a(0x172),'description':a190_0x5bd46a(0x1a1)+a190_0x5bd46a(0x1a6)},{'name':'paths','type':a190_0x5bd46a(0x172),'description':a190_0x5bd46a(0x184)},{'name':a190_0x5bd46a(0x180),'type':a190_0x5bd46a(0x162),'description':a190_0x5bd46a(0x19d)}],async 'dryRun'(_0x6251ce){const _0x2a1585=a190_0x5bd46a;ensureRunnableContext(_0x6251ce[_0x2a1585(0x177)],_0x6251ce['selectedAppName']);const _0x38c6b4=await runMenuSyncCore(_0x6251ce[_0x2a1585(0x191)],_0x6251ce[_0x2a1585(0x18d)],parsePaths(_0x6251ce[_0x2a1585(0x166)](_0x2a1585(0x1a5))),_0x6251ce[_0x2a1585(0x166)](_0x2a1585(0x183)),{'dryRun':!![]});return{'method':_0x2a1585(0x192),'url':_0x2a1585(0x15c),'body':_0x38c6b4,'description':_0x38c6b4[_0x2a1585(0x199)]?_0x2a1585(0x17a):_0x2a1585(0x168)+_0x38c6b4[_0x2a1585(0x188)][_0x2a1585(0x19f)]+_0x2a1585(0x181)};},async 'execute'(_0x40fbe7){const _0x2f96b1=a190_0x5bd46a;ensureRunnableContext(_0x40fbe7['rawFlags'],_0x40fbe7[_0x2f96b1(0x18a)]);const _0x1dd919=_0x40fbe7[_0x2f96b1(0x190)](_0x2f96b1(0x180)),_0x52f061=_0x40fbe7[_0x2f96b1(0x166)](_0x2f96b1(0x183)),_0x330932=parsePaths(_0x40fbe7[_0x2f96b1(0x166)](_0x2f96b1(0x1a5))),_0x3f4493=parseMenuSyncParams(_0x52f061);if(_0x1dd919){const _0x306752=await runMenuSyncCore(_0x40fbe7['appCode'],_0x40fbe7['cookie'],_0x330932,_0x52f061);if(_0x306752[_0x2f96b1(0x199)]){const _0x4bedd6=getLocalPages();_0x4bedd6[_0x2f96b1(0x19f)]===0x0?writeCliSideChannelLine(_0x2f96b1(0x17b)):writeCliSideChannelLine(_0x2f96b1(0x18b));}else writeCliSideChannelLine(_0x2f96b1(0x175)+_0x306752['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x306752,'message':_0x306752[_0x2f96b1(0x199)]?_0x2f96b1(0x19e):_0x2f96b1(0x164)+_0x306752[_0x2f96b1(0x15e)]+_0x2f96b1(0x182)};}if(_0x330932[_0x2f96b1(0x19f)]>0x0)throw CliErrors[_0x2f96b1(0x165)](_0x2f96b1(0x17c),_0x2f96b1(0x1a7));if(!isInteractive()&&_0x52f061)throw CliErrors['validation'](_0x2f96b1(0x187),_0x2f96b1(0x1a7));requireInteractive(),writeCliSideChannelLine(_0x2f96b1(0x15f));const _0x2910e4=startSpinner('Fetching\x20online\x20menu\x20list...');let _0xef4241,_0x3739a7,_0x259e52;try{const _0x5292ed=await fetchMenuData(_0x40fbe7['appCode'],_0x40fbe7[_0x2f96b1(0x18d)]);_0xef4241=_0x5292ed[_0x2f96b1(0x19c)],_0x3739a7=_0x5292ed[_0x2f96b1(0x16c)],_0x259e52=_0x5292ed[_0x2f96b1(0x178)],stopSpinner(_0x2910e4,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x4e485f){stopSpinner(_0x2910e4,_0x2f96b1(0x185),![]);throw CliErrors[_0x2f96b1(0x165)](_0x4e485f instanceof Error?_0x4e485f[_0x2f96b1(0x1a2)]:_0x2f96b1(0x185));}if(_0xef4241[_0x2f96b1(0x19f)]===0x0)return writeCliSideChannelLine(a190_0xf1f731[_0x2f96b1(0x16f)](_0x2f96b1(0x169))),{'ok':!![]};const _0xa935da=buildCompareRows(_0xef4241,_0x3739a7);writeCliSideChannelLine(renderCompareTable(_0xa935da)),writeCliSideChannelLine('');const _0x2ffd97=await selectPages(_0xef4241,_0x3739a7);writeCliSideChannelLine(''),writeCliSideChannelLine(a190_0xf1f731[_0x2f96b1(0x173)](_0x2f96b1(0x16e)+_0x2ffd97[_0x2f96b1(0x19f)]+_0x2f96b1(0x16d)));const _0x3db617=_0x3f4493[_0x2f96b1(0x17e)]&&_0x3f4493['cssUrl'];if(!_0x3db617){writeCliSideChannelLine(renderSyncSummary(_0x2ffd97,_0x3739a7[_0x2f96b1(0x17d)]>0x0));const _0x3e8151=await askConfirm(_0x2f96b1(0x18c));if(!_0x3e8151)return writeCliSideChannelLine(a190_0xf1f731[_0x2f96b1(0x16a)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x3eefed=_0x3f4493[_0x2f96b1(0x17e)],_0x1e61d4=_0x3f4493[_0x2f96b1(0x19b)];!_0x3eefed&&!_0x3f4493[_0x2f96b1(0x1a0)]&&(_0x3eefed=await askJsUrl());!_0x1e61d4&&!_0x3f4493['appName']&&(_0x1e61d4=await askCssUrl());const _0x358acd=await askConfirm(_0x3f4493[_0x2f96b1(0x1a0)]?'\x20\x20Create\x20'+_0x2ffd97[_0x2f96b1(0x19f)]+'\x20menu(s)\x20bound\x20to\x20'+_0x3f4493['appName']+'?':_0x2f96b1(0x176)+_0x2ffd97[_0x2f96b1(0x19f)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x3eefed+'\x20and\x20CSS:\x20'+_0x1e61d4+'?');if(!_0x358acd)return writeCliSideChannelLine(a190_0xf1f731[_0x2f96b1(0x16a)](_0x2f96b1(0x198))),{'ok':!![]};const _0x577fdc=[_0x3eefed,_0x1e61d4][_0x2f96b1(0x194)](_0xb185c4=>Boolean(_0xb185c4));_0x3f4493[_0x2f96b1(0x1a0)]&&_0x577fdc['length']===0x0&&await assertSharedResourcesConfigured(_0x40fbe7['appCode'],_0x40fbe7[_0x2f96b1(0x18d)],_0x3f4493['appName']);const _0x3c8f86=startSpinner(_0x2f96b1(0x19a)+_0x2ffd97[_0x2f96b1(0x19f)]+'\x20menu(s)...');try{const _0x566ba9=_0x2ffd97[_0x2f96b1(0x1a4)](_0x33f508=>resolvePage(_0x33f508,_0x3f4493,_0x259e52)),_0x20b217=await doCreateMenus(_0x40fbe7['appCode'],_0x40fbe7[_0x2f96b1(0x18d)],_0x566ba9,_0x577fdc,_0x3f4493[_0x2f96b1(0x1a0)]?{'appName':_0x3f4493[_0x2f96b1(0x1a0)]}:undefined);return stopSpinner(_0x3c8f86,_0x2f96b1(0x171)+_0x20b217[_0x2f96b1(0x15e)]+_0x2f96b1(0x193),!![]),{'ok':!![],'data':_0x20b217,'message':_0x2f96b1(0x164)+_0x20b217['created']+_0x2f96b1(0x1a9)+_0x20b217[_0x2f96b1(0x1a8)]+_0x2f96b1(0x17f)};}catch(_0x1a5c10){stopSpinner(_0x3c8f86,_0x2f96b1(0x16b),![]);throw CliErrors['validation'](_0x1a5c10 instanceof Error?_0x1a5c10[_0x2f96b1(0x1a2)]:_0x2f96b1(0x16b));}}};function ensureRunnableContext(_0x2a9084,_0x55c91b){const _0x110188=a190_0x5bd46a,_0x1bb055=_0x2a9084[_0x110188(0x196)]?String(_0x2a9084['appcode'])[_0x110188(0x18e)]():'';if(!isInProject()&&!_0x55c91b&&!_0x1bb055)throw CliErrors[_0x110188(0x165)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x46d50d){const _0x5cdc11=a190_0x5bd46a;return[...new Set(_0x46d50d[_0x5cdc11(0x160)](',')[_0x5cdc11(0x1a4)](_0x161f30=>_0x161f30[_0x5cdc11(0x18e)]())['filter'](Boolean))];}
@@ -1 +1 @@
1
- const a191_0x785c83=a191_0x3324;(function(_0x5035e7,_0x365cc4){const _0x41c38f=a191_0x3324,_0x2ffc81=_0x5035e7();while(!![]){try{const _0x5c10b3=-parseInt(_0x41c38f(0x1b0))/0x1*(parseInt(_0x41c38f(0x16a))/0x2)+parseInt(_0x41c38f(0x15e))/0x3+-parseInt(_0x41c38f(0x15c))/0x4+parseInt(_0x41c38f(0x168))/0x5*(parseInt(_0x41c38f(0x17d))/0x6)+-parseInt(_0x41c38f(0x192))/0x7*(parseInt(_0x41c38f(0x170))/0x8)+parseInt(_0x41c38f(0x191))/0x9*(-parseInt(_0x41c38f(0x171))/0xa)+-parseInt(_0x41c38f(0x160))/0xb*(-parseInt(_0x41c38f(0x194))/0xc);if(_0x5c10b3===_0x365cc4)break;else _0x2ffc81['push'](_0x2ffc81['shift']());}catch(_0x26bcc2){_0x2ffc81['push'](_0x2ffc81['shift']());}}}(a191_0xac21,0xee26e));function a191_0xac21(){const _0x3886f8=['493218MkBxuI','map','23257289YjgCYx','boolean','write','expectVisible','targets','Menu\x20id\x20selector(s)\x20not\x20found:\x20','menu_permission_denied','menuIds','5SeJSAt','Response\x20was\x20lost\x20and\x20menu\x20','2dkiZcO','Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state','trim','byId','pageId','Menu\x20path\x20selector\x20not\x20found:\x20','147552FAbMUL','211160bCORAb','update\x20menu\x20visibility','datasetId','resourcesValid','beforeById','expected-count','expectedCount','childrenIds','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility','appCode','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','2192952FZdcPn','sort','menus','code','path','verify\x20menu\x20visibility\x20update','\x20skipped,\x20','pageType','menu','\x20changed\x20unexpectedly.','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','str','Requested\x20menu\x20visibility','stringify','Updated\x20visibility\x20for\x20','flagMissing','Response\x20was\x20lost\x20for\x20menu\x20','Menu\x20','validation','update-menu-visibility','414BzXwNs','168RgQEgu','parentId','24HHAnqM','verification','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','label','body','num','menu_verification_failed','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','isArray','visible','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','menu_selector_not_found','false','expect-visible','updated','isSafeInteger','length','depth','\x20unchanged\x20menu(s).','update-recovery','some','rawFlags','failed','\x20must\x20be\x20true\x20or\x20false.','resources','\x20menu(s);\x20skipped\x20','Selected\x20','457609aIQGKi','join','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','menu_expected_count_mismatch','plan','number','true','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','filter','push','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','has','menu_selector_ambiguous','get','modelType','\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','message','POST','hash','type','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','string','cookie','before','url','Would\x20update\x20visibility\x20for\x20','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','requestedVisible','Menu\x20visibility\x20update\x20completed:\x20','values','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','warnings','visibility-update','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','Final\x20menu\x20visibility\x20readback\x20failed.','datasetCode','\x20menu(s);\x20skip\x20','paths','set','/smartapi/menu/update','plannedActions','7645700xCEegR','update'];a191_0xac21=function(){return _0x3886f8;};return a191_0xac21();}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';const BACKEND=[{'method':a191_0x785c83(0x144),'path':a191_0x785c83(0x15a)}];export const menuVisibilityUpdate={'service':a191_0x785c83(0x185),'command':a191_0x785c83(0x153),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':a191_0x785c83(0x162),'structuredErrors':!![],'flags':[{'name':'menu-ids','type':a191_0x785c83(0x148),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a191_0x785c83(0x158),'type':'string','description':a191_0x785c83(0x196)},{'name':a191_0x785c83(0x19e),'type':'boolean','required':!![],'description':a191_0x785c83(0x189)},{'name':a191_0x785c83(0x1a2),'type':a191_0x785c83(0x161),'description':a191_0x785c83(0x17a)},{'name':'expected-count','type':a191_0x785c83(0x1b5),'description':a191_0x785c83(0x1bb)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5b254e){parseInput(_0x5b254e);},async 'dryRun'(_0x54d03d){const _0x21cd2c=a191_0x785c83,_0x34799e=await buildPlan(_0x54d03d,!![]),_0x57fc7d=_0x34799e[_0x21cd2c(0x1b4)]['plannedActions']?.['length']??0x0,_0x1afc7b=_0x34799e[_0x21cd2c(0x1b4)][_0x21cd2c(0x164)][_0x21cd2c(0x1a5)]-_0x57fc7d;return menuDryRunResult(_0x34799e['plan'],{'method':_0x21cd2c(0x144),'url':'/smartapi/menu/update','body':{'updates':_0x34799e[_0x21cd2c(0x1b4)][_0x21cd2c(0x15b)]?.['map'](_0x3302bd=>_0x3302bd[_0x21cd2c(0x199)])??[]},'description':_0x21cd2c(0x14c)+_0x57fc7d+_0x21cd2c(0x157)+_0x1afc7b+_0x21cd2c(0x1a7)});},async 'execute'(_0x148cc5){const _0xf5345f=a191_0x785c83,_0x4e2de3=await buildPlan(_0x148cc5,![]);await recheckMutationSnapshot(_0x148cc5,_0x4e2de3[_0xf5345f(0x1b4)],_0xf5345f(0x172));const _0x505e98=[],_0x3bf78d=[],_0x1a7b29=[];for(const _0x32b076 of _0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x164)]){if(_0x32b076[_0xf5345f(0x14a)]['visible']===_0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x14e)]){_0x505e98[_0xf5345f(0x1b9)]({'id':_0x32b076['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x148cc5[_0xf5345f(0x17b)],_0x148cc5[_0xf5345f(0x149)],{'id':_0x32b076['id'],'visible':_0x4e2de3['plan'][_0xf5345f(0x14e)]}),_0x505e98[_0xf5345f(0x1b9)]({'id':_0x32b076['id'],'updated':!![],'skipped':![]});}catch(_0x7a978e){const _0x17e560=mapMenuApiError(_0x7a978e,'update\x20visibility\x20for',_0x32b076['id']);if(isMenuResponseLoss(_0x7a978e)&&_0x17e560[_0xf5345f(0x180)]!==_0xf5345f(0x166)){_0x1a7b29[_0xf5345f(0x1b9)](_0x32b076['id']);continue;}_0x3bf78d[_0xf5345f(0x1b9)]({'id':_0x32b076['id'],'stage':_0xf5345f(0x15d),'code':_0x17e560[_0xf5345f(0x180)],'message':_0x17e560[_0xf5345f(0x143)]});}}let _0xa52ab7;try{_0xa52ab7=await fetchMenuSnapshot(_0x148cc5[_0xf5345f(0x17b)],_0x148cc5['cookie']);}catch(_0x49ae4e){const _0x3d4e0b=describeMenuErrorCause(_0x49ae4e,_0xf5345f(0x182)),_0x308759=_0x1a7b29[_0xf5345f(0x15f)](_0x59f889=>({'id':_0x59f889,'stage':_0xf5345f(0x1a8),'code':_0xf5345f(0x19b),'message':_0xf5345f(0x18d)+_0x59f889+_0xf5345f(0x142),'requestedStateConfirmed':![],'recovered':![]})),_0x106404={'stage':_0xf5345f(0x195),'code':_0xf5345f(0x19b),'message':_0xf5345f(0x155),'targetIds':_0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x164)][_0xf5345f(0x15f)](_0x5a4b97=>_0x5a4b97['id']),'requestedStateConfirmed':![],..._0x3d4e0b};throw menuFailure(asVerificationError(_0x49ae4e,_0xf5345f(0x16b)),_0x4e2de3[_0xf5345f(0x1b4)],{'stage':_0xf5345f(0x195),'succeeded':_0x505e98,'failedRecords':[..._0x3bf78d,..._0x308759,_0x106404],'warnings':[_0xf5345f(0x17c)],'verification':{'status':_0xf5345f(0x1ab),'recoveredCount':0x0,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x4fac0a=[];for(const _0x39256d of _0x505e98){const _0x22c35b=Number(_0x39256d['id']),_0x31508d=_0x4e2de3[_0xf5345f(0x175)][_0xf5345f(0x140)](_0x22c35b),_0x386242=_0xa52ab7[_0xf5345f(0x16d)][_0xf5345f(0x140)](_0x22c35b);try{verifyVisibilityUpdate(_0x31508d,_0x386242,_0x4e2de3[_0xf5345f(0x1b4)]['requestedVisible']);}catch(_0x4a7230){const _0x151444=asVerificationError(_0x4a7230,'Menu\x20'+_0x22c35b+'\x20visibility\x20update\x20could\x20not\x20be\x20verified');_0x4fac0a[_0xf5345f(0x1b9)]({'id':_0x22c35b,'stage':_0xf5345f(0x195),'code':_0x151444[_0xf5345f(0x180)],'message':_0x151444[_0xf5345f(0x143)],'requestedStateConfirmed':![]});}}for(const _0x2cde9e of _0x1a7b29){const _0xd59d33=_0x4e2de3[_0xf5345f(0x175)]['get'](_0x2cde9e),_0x24b4d0=_0xa52ab7['byId'][_0xf5345f(0x140)](_0x2cde9e);try{verifyVisibilityUpdate(_0xd59d33,_0x24b4d0,_0x4e2de3[_0xf5345f(0x1b4)]['requestedVisible']),_0x505e98[_0xf5345f(0x1b9)]({'id':_0x2cde9e,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x45eb8c){const _0x2e99f3=asVerificationError(_0x45eb8c,_0xf5345f(0x169)+_0x2cde9e+_0xf5345f(0x179));_0x4fac0a[_0xf5345f(0x1b9)]({'id':_0x2cde9e,'stage':_0xf5345f(0x1a8),'code':_0x2e99f3['code'],'message':_0x2e99f3[_0xf5345f(0x143)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x4fac0a[_0xf5345f(0x1a5)]>0x0){const _0x4d7aaf=_0x4fac0a[_0xf5345f(0x15f)](_0x541f10=>Number(_0x541f10['id'])),_0x2bfdff=_0x505e98[_0xf5345f(0x1b8)](_0x1d4ba6=>_0x1d4ba6['recovered']===!![])[_0xf5345f(0x1a5)],_0x5312d9=menuError(_0xf5345f(0x19b),_0xf5345f(0x1b2)+_0x4d7aaf['join'](',\x20')+'.',_0xf5345f(0x147));throw menuFailure(_0x5312d9,_0x4e2de3[_0xf5345f(0x1b4)],{'stage':_0xf5345f(0x195),'succeeded':_0x505e98,'failedRecords':[..._0x3bf78d,..._0x4fac0a],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':_0xf5345f(0x1ab),..._0x4d7aaf[_0xf5345f(0x1a5)]===0x1?{'targetId':_0x4d7aaf[0x0]}:{'targetIds':_0x4d7aaf},'recoveredCount':_0x2bfdff,'lookupCommand':'rabetbase\x20menu\x20list\x20--format\x20compress'}});}const _0x237c26=_0x505e98[_0xf5345f(0x1b8)](_0x318ef5=>_0x318ef5[_0xf5345f(0x1a3)]===!![])[_0xf5345f(0x1a5)],_0x410f3c=_0x505e98[_0xf5345f(0x1a5)]-_0x237c26,_0x22b7b3={..._0x4e2de3[_0xf5345f(0x1b4)],'succeeded':_0x505e98,'failed':_0x3bf78d,'warnings':_0x3bf78d[_0xf5345f(0x1a5)]>0x0?[..._0x4e2de3['plan'][_0xf5345f(0x152)],_0xf5345f(0x187)]:_0x4e2de3[_0xf5345f(0x1b4)][_0xf5345f(0x152)],'verification':{'checkedBy':'menu\x20list','snapshotHash':_0xa52ab7[_0xf5345f(0x145)],'matchesRequestedState':_0x3bf78d[_0xf5345f(0x1a5)]===0x0,'recoveredCount':_0x1a7b29['length']}};return{'ok':_0x3bf78d[_0xf5345f(0x1a5)]===0x0,'data':_0x22b7b3,'message':_0x3bf78d[_0xf5345f(0x1a5)]===0x0?_0xf5345f(0x18b)+_0x237c26+_0xf5345f(0x1ae)+_0x410f3c+_0xf5345f(0x1a7):_0xf5345f(0x14f)+_0x237c26+'\x20updated,\x20'+_0x410f3c+_0xf5345f(0x183)+_0x3bf78d['length']+'\x20failed.'};}};function parseInput(_0x2b8dc5){const _0x29f55b=a191_0x785c83,_0x2bc630=parseMenuIds(_0x2b8dc5['str']('menu-ids')),_0x22ac09=parseCsv(_0x2b8dc5[_0x29f55b(0x188)](_0x29f55b(0x158)));if(_0x2bc630['length']===0x0&&_0x22ac09[_0x29f55b(0x1a5)]===0x0)throw CliErrors['validation'](_0x29f55b(0x19f));const _0x452967=parseBooleanFlag(_0x2b8dc5,_0x29f55b(0x19e),!![]),_0x5ab2f3=parseBooleanFlag(_0x2b8dc5,'expect-visible',![]);let _0x4bb3ec;if(hasFlag(_0x2b8dc5,'expected-count')){_0x4bb3ec=_0x2b8dc5[_0x29f55b(0x19a)](_0x29f55b(0x176));if(!Number[_0x29f55b(0x1a4)](_0x4bb3ec)||_0x4bb3ec<0x0)throw CliErrors[_0x29f55b(0x18f)]('--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.');}return{'menuIds':_0x2bc630,'paths':_0x22ac09,'visible':_0x452967,'expectVisible':_0x5ab2f3,'expectedCount':_0x4bb3ec};}async function buildPlan(_0xe7d732,_0x45f47e){const _0x169998=a191_0x785c83,_0x9073df=parseInput(_0xe7d732),_0x1199c6=await fetchMutationSnapshot(_0xe7d732,'update\x20menu\x20visibility'),_0x58dca1=selectTargets(_0x1199c6[_0x169998(0x17f)],_0x9073df[_0x169998(0x167)],_0x9073df[_0x169998(0x158)]);if(_0x9073df[_0x169998(0x177)]!==undefined&&_0x58dca1[_0x169998(0x1a5)]!==_0x9073df[_0x169998(0x177)])throw menuError(_0x169998(0x1b3),_0x169998(0x1af)+_0x58dca1['length']+'\x20menu(s),\x20expected\x20'+_0x9073df['expectedCount']+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.');if(_0x9073df[_0x169998(0x163)]!==undefined){const _0x2ee501=_0x58dca1[_0x169998(0x1b8)](_0xcc25c7=>_0xcc25c7['visible']!==_0x9073df[_0x169998(0x163)]);if(_0x2ee501[_0x169998(0x1a5)]>0x0)throw menuError('menu_state_drift',_0x169998(0x154)+_0x2ee501['map'](_0x43b147=>_0x43b147['id'])[_0x169998(0x1b1)](',\x20')+'.',_0x169998(0x151));}const _0x3bb2c3=_0x58dca1[_0x169998(0x15f)](_0x32dec1=>({'id':_0x32dec1['id'],'label':_0x32dec1[_0x169998(0x198)],'path':_0x32dec1['path'],'before':{'visible':_0x32dec1[_0x169998(0x19e)]},'after':{'visible':_0x9073df[_0x169998(0x19e)]}})),_0x1144f2=_0x3bb2c3[_0x169998(0x1b8)](_0x59b08f=>_0x59b08f[_0x169998(0x14a)][_0x169998(0x19e)]!==_0x9073df[_0x169998(0x19e)])['map'](_0x3965cf=>({'stage':_0x169998(0x190),'method':_0x169998(0x144),'path':'/smartapi/menu/update','body':{'appCode':_0xe7d732[_0x169998(0x17b)],'id':_0x3965cf['id'],'visible':_0x9073df[_0x169998(0x19e)]}})),_0x3c703f=mutationResult({'operation':_0x169998(0x153),'selector':{'menuIds':_0x9073df[_0x169998(0x167)],'paths':_0x9073df['paths']},'before':{'menus':_0x58dca1[_0x169998(0x15f)](_0x4c9c14=>({'id':_0x4c9c14['id'],'path':_0x4c9c14[_0x169998(0x181)],'visible':_0x4c9c14[_0x169998(0x19e)]}))},'after':{'menus':_0x58dca1[_0x169998(0x15f)](_0x564155=>({'id':_0x564155['id'],'path':_0x564155[_0x169998(0x181)],'visible':_0x9073df[_0x169998(0x19e)]}))},'dryRun':_0x45f47e,'backend':[...BACKEND],'plannedActions':_0x1144f2,'snapshotHash':_0x1199c6[_0x169998(0x145)],'warnings':_0x1144f2['length']===0x0?[_0x169998(0x1b7)]:[]});return{'plan':{..._0x3c703f,'requestedVisible':_0x9073df[_0x169998(0x19e)],'targets':_0x3bb2c3},'beforeById':new Map(_0x58dca1[_0x169998(0x15f)](_0x13732f=>[_0x13732f['id'],_0x13732f]))};}function selectTargets(_0x33f356,_0x1e2278,_0x4ff601){const _0x552d97=a191_0x785c83,_0x35c4fc=new Map(_0x33f356[_0x552d97(0x15f)](_0xbe594c=>[_0xbe594c['id'],_0xbe594c])),_0x154262=new Map(),_0x34db45=_0x1e2278[_0x552d97(0x1b8)](_0x1efd22=>!_0x35c4fc[_0x552d97(0x1bc)](_0x1efd22));if(_0x34db45[_0x552d97(0x1a5)]>0x0)throw menuError(_0x552d97(0x1a0),_0x552d97(0x165)+_0x34db45[_0x552d97(0x1b1)](',\x20')+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.');for(const _0x4ffc30 of _0x1e2278){_0x154262[_0x552d97(0x159)](_0x4ffc30,_0x35c4fc[_0x552d97(0x140)](_0x4ffc30));}for(const _0x876e6f of _0x4ff601){const _0x48a750=_0x33f356['filter'](_0xe40fe6=>_0xe40fe6[_0x552d97(0x181)]===_0x876e6f);if(_0x48a750['length']===0x0)throw menuError(_0x552d97(0x1a0),_0x552d97(0x16f)+JSON[_0x552d97(0x18a)](_0x876e6f)+'.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.');if(_0x48a750[_0x552d97(0x1a5)]>0x1)throw menuError(_0x552d97(0x13f),_0x552d97(0x19c)+JSON[_0x552d97(0x18a)](_0x876e6f)+'.','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20'+_0x48a750['map'](_0x1df89f=>_0x1df89f['id'])[_0x552d97(0x1b1)](',\x20')+'.');const _0x43405d=_0x48a750[0x0];_0x154262['set'](_0x43405d['id'],_0x43405d);}return[..._0x154262[_0x552d97(0x150)]()];}function a191_0x3324(_0x185aaa,_0x479363){_0x185aaa=_0x185aaa-0x13f;const _0xac21e7=a191_0xac21();let _0x3324d4=_0xac21e7[_0x185aaa];return _0x3324d4;}function parseMenuIds(_0x1c1cfb){const _0x98db10=a191_0x785c83,_0x4b9828=parseCsv(_0x1c1cfb),_0x3549b5=_0x4b9828[_0x98db10(0x15f)](Number);if(_0x3549b5[_0x98db10(0x1a9)](_0x52c807=>!Number[_0x98db10(0x1a4)](_0x52c807)||_0x52c807<=0x0))throw CliErrors['validation'](_0x98db10(0x14d));return[...new Set(_0x3549b5)];}function parseCsv(_0x31b253){const _0x360827=a191_0x785c83;return[...new Set(_0x31b253['split'](',')[_0x360827(0x15f)](_0x22303b=>_0x22303b[_0x360827(0x16c)]())[_0x360827(0x1b8)](Boolean))];}function parseBooleanFlag(_0x48c673,_0x3e8030,_0x373c0b){const _0x1db65b=a191_0x785c83;if(!hasFlag(_0x48c673,_0x3e8030)){if(_0x373c0b)throw CliErrors[_0x1db65b(0x18c)](_0x3e8030);return undefined;}const _0xb8d1b1=_0x48c673[_0x1db65b(0x1aa)][_0x3e8030];if(_0xb8d1b1===!![]||_0xb8d1b1===![])return _0xb8d1b1;if(_0xb8d1b1===_0x1db65b(0x1b6))return!![];if(_0xb8d1b1===_0x1db65b(0x1a1))return![];throw CliErrors[_0x1db65b(0x18f)]('--'+_0x3e8030+_0x1db65b(0x1ac));}function verifyVisibilityUpdate(_0x320020,_0x2adf78,_0x505317){const _0x2609ce=a191_0x785c83;assertVerified(!!_0x2adf78,'Menu\x20'+_0x320020['id']+_0x2609ce(0x1ba)),assertVerified(_0x2adf78['visible']===_0x505317,_0x2609ce(0x18e)+_0x320020['id']+_0x2609ce(0x197));const _0x2f7d58=[['id',_0x2adf78['id'],_0x320020['id']],[_0x2609ce(0x193),_0x2adf78[_0x2609ce(0x193)],_0x320020[_0x2609ce(0x193)]],[_0x2609ce(0x1a6),_0x2adf78[_0x2609ce(0x1a6)],_0x320020[_0x2609ce(0x1a6)]],[_0x2609ce(0x198),_0x2adf78[_0x2609ce(0x198)],_0x320020[_0x2609ce(0x198)]],[_0x2609ce(0x181),_0x2adf78['path'],_0x320020[_0x2609ce(0x181)]],[_0x2609ce(0x14b),_0x2adf78['url'],_0x320020['url']],[_0x2609ce(0x146),_0x2adf78[_0x2609ce(0x146)],_0x320020[_0x2609ce(0x146)]],[_0x2609ce(0x17e),_0x2adf78[_0x2609ce(0x17e)],_0x320020[_0x2609ce(0x17e)]],[_0x2609ce(0x1ad),_0x2adf78[_0x2609ce(0x1ad)],_0x320020[_0x2609ce(0x1ad)]],['resourcesValid',_0x2adf78[_0x2609ce(0x174)],_0x320020['resourcesValid']],['childrenIds',_0x2adf78[_0x2609ce(0x178)],_0x320020['childrenIds']],['childrenCount',_0x2adf78['childrenCount'],_0x320020['childrenCount']],[_0x2609ce(0x16e),_0x2adf78[_0x2609ce(0x16e)],_0x320020[_0x2609ce(0x16e)]],[_0x2609ce(0x184),_0x2adf78['pageType'],_0x320020[_0x2609ce(0x184)]],[_0x2609ce(0x141),_0x2adf78['modelType'],_0x320020['modelType']],['datasetId',_0x2adf78['datasetId'],_0x320020[_0x2609ce(0x173)]],[_0x2609ce(0x156),_0x2adf78['datasetCode'],_0x320020['datasetCode']]];for(const [_0x13f6be,_0x54334a,_0x238784]of _0x2f7d58){assertVerified(sameValue(_0x54334a,_0x238784),_0x2609ce(0x18e)+_0x320020['id']+'\x20'+_0x13f6be+_0x2609ce(0x186));}}function sameValue(_0x26adb5,_0x1a9efd){const _0x401e5f=a191_0x785c83;if(Array[_0x401e5f(0x19d)](_0x26adb5)||Array[_0x401e5f(0x19d)](_0x1a9efd))return JSON[_0x401e5f(0x18a)](_0x26adb5)===JSON[_0x401e5f(0x18a)](_0x1a9efd);return _0x26adb5===_0x1a9efd;}
1
+ function a191_0x288a(){const _0x457847=['1047000AnWitr','parentId','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expected-count.','\x20was\x20not\x20found\x20during\x20visibility\x20verification.','some','length','Every\x20selected\x20menu\x20already\x20has\x20the\x20requested\x20visibility;\x20no\x20write\x20is\x20needed.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20exact\x20current\x20ids.','datasetCode','Inspect\x20current\x20menu\x20facts\x20before\x20retrying\x20any\x20target.','Menu\x20path\x20selector\x20matched\x20multiple\x20menus:\x20','paths','pageType','str','modelType','expected-count','\x20menu(s);\x20skipped\x20','verification','label','\x20updated,\x20','failed','beforeById','POST','update-recovery','Selected\x20','push','num','18PPsTIr','warnings','isArray','childrenCount','depth','Response\x20was\x20lost\x20and\x20menu\x20','number','get','filter','body','\x20menu(s),\x20expected\x20','cookie','\x20must\x20be\x20true\x20or\x20false.','\x20visibility\x20could\x20not\x20be\x20verified\x20safely','resources','Menu\x20','targets','true','\x20menu(s);\x20skip\x20','plan','menu\x20list','join','trim','url','set','expect-visible','menu_selector_not_found','menu_verification_failed','The\x20update\x20may\x20have\x20taken\x20effect;\x20inspect\x20the\x20latest\x20menu\x20facts\x20before\x20retrying.','boolean','Menu\x20path\x20selector\x20not\x20found:\x20','Selected\x20menu\x20visibility\x20changed\x20for\x20id(s):\x20','map','15850EWFgGU','visibility-update','48ERJFYK','validation','\x20failed.','visible','expectedCount','1012070oOOouz','childrenIds','appCode','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20update\x20--expect-visible.','code','menu\x20visibility-update\x20requires\x20--menu-ids\x20or\x20--paths.','\x20visible\x20did\x20not\x20match\x20the\x20requested\x20state.','resourcesValid','updated','645532mqimCF','string','update\x20visibility\x20for','\x20changed\x20unexpectedly.','hash','587484sTIlYJ','type','path','--expected-count\x20must\x20be\x20a\x20non-negative\x20integer.','rawFlags','sort','false','requestedVisible','menu_permission_denied','datasetId','Failed\x20update\x20requests\x20were\x20not\x20retried;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.','Run\x20`rabetbase\x20menu\x20list\x20--format\x20compress`\x20and\x20use\x20an\x20exact\x20current\x20path.','\x20visibility\x20update\x20could\x20not\x20be\x20verified','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','Menu\x20visibility\x20update\x20could\x20not\x20be\x20verified\x20for\x20id(s):\x20','59311iGjBmO','message','stringify','update-menu-visibility','Menu\x20id\x20selector(s)\x20not\x20found:\x20','update\x20menu\x20visibility','Response\x20was\x20lost\x20for\x20menu\x20','verify\x20menu\x20visibility\x20update','menu_selector_ambiguous','pageId','menuIds','byId','Menu\x20visibility\x20update\x20completed:\x20','before','Use\x20--menu-ids\x20with\x20one\x20or\x20more\x20of:\x20','158270TPZYzc','\x20skipped,\x20','\x20unchanged\x20menu(s).','isSafeInteger','Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update','Abort\x20unless\x20the\x20exact\x20number\x20of\x20selected\x20menus\x20matches','expectVisible','rabetbase\x20menu\x20list\x20--format\x20compress','menu-ids','plannedActions'];a191_0x288a=function(){return _0x457847;};return a191_0x288a();}const a191_0x14ee11=a191_0x2fff;(function(_0x4062e5,_0x26db31){const _0x272498=a191_0x2fff,_0x292f7f=_0x4062e5();while(!![]){try{const _0x226b09=parseInt(_0x272498(0x190))/0x1+parseInt(_0x272498(0x15d))/0x2*(-parseInt(_0x272498(0x15f))/0x3)+parseInt(_0x272498(0x16d))/0x4+-parseInt(_0x272498(0x164))/0x5+parseInt(_0x272498(0x13c))/0x6*(-parseInt(_0x272498(0x181))/0x7)+parseInt(_0x272498(0x19a))/0x8+parseInt(_0x272498(0x172))/0x9;if(_0x226b09===_0x26db31)break;else _0x292f7f['push'](_0x292f7f['shift']());}catch(_0x45d3d5){_0x292f7f['push'](_0x292f7f['shift']());}}}(a191_0x288a,0x27593));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';function a191_0x2fff(_0x44ee25,_0x3c48c8){_0x44ee25=_0x44ee25-0x12e;const _0x288a45=a191_0x288a();let _0x2ffff0=_0x288a45[_0x44ee25];return _0x2ffff0;}import{CliErrors}from'../../errors.js';const BACKEND=[{'method':a191_0x14ee11(0x137),'path':'/smartapi/menu/update'}];export const menuVisibilityUpdate={'service':'menu','command':a191_0x14ee11(0x15e),'description':'Set\x20exact\x20menus\x20visible\x20or\x20hidden\x20without\x20changing\x20their\x20routes\x20or\x20resources','risk':'write','structuredErrors':!![],'flags':[{'name':'menu-ids','type':a191_0x14ee11(0x16e),'description':a191_0x14ee11(0x194)},{'name':a191_0x14ee11(0x1a5),'type':a191_0x14ee11(0x16e),'description':'Exact\x20comma-separated\x20menu\x20paths\x20to\x20update'},{'name':a191_0x14ee11(0x162),'type':a191_0x14ee11(0x159),'required':!![],'description':'Requested\x20menu\x20visibility'},{'name':'expect-visible','type':a191_0x14ee11(0x159),'description':'Abort\x20unless\x20every\x20selected\x20menu\x20has\x20this\x20visibility'},{'name':a191_0x14ee11(0x130),'type':a191_0x14ee11(0x142),'description':a191_0x14ee11(0x195)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x17cbb3){parseInput(_0x17cbb3);},async 'dryRun'(_0x4b42b7){const _0x5e14e6=a191_0x14ee11,_0x5743b9=await buildPlan(_0x4b42b7,!![]),_0xc6e693=_0x5743b9[_0x5e14e6(0x14f)][_0x5e14e6(0x199)]?.[_0x5e14e6(0x19f)]??0x0,_0x132ae4=_0x5743b9['plan'][_0x5e14e6(0x14c)][_0x5e14e6(0x19f)]-_0xc6e693;return menuDryRunResult(_0x5743b9[_0x5e14e6(0x14f)],{'method':_0x5e14e6(0x137),'url':'/smartapi/menu/update','body':{'updates':_0x5743b9[_0x5e14e6(0x14f)][_0x5e14e6(0x199)]?.[_0x5e14e6(0x15c)](_0xecfd57=>_0xecfd57[_0x5e14e6(0x145)])??[]},'description':'Would\x20update\x20visibility\x20for\x20'+_0xc6e693+_0x5e14e6(0x14e)+_0x132ae4+'\x20unchanged\x20menu(s).'});},async 'execute'(_0x2535e9){const _0x12080c=a191_0x14ee11,_0x29adc5=await buildPlan(_0x2535e9,![]);await recheckMutationSnapshot(_0x2535e9,_0x29adc5[_0x12080c(0x14f)],_0x12080c(0x186));const _0x16415c=[],_0x20e279=[],_0x49a0d8=[];for(const _0x4c1d03 of _0x29adc5[_0x12080c(0x14f)][_0x12080c(0x14c)]){if(_0x4c1d03[_0x12080c(0x18e)][_0x12080c(0x162)]===_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]){_0x16415c[_0x12080c(0x13a)]({'id':_0x4c1d03['id'],'updated':![],'skipped':!![]});continue;}try{await updateMenuEntity(_0x2535e9[_0x12080c(0x166)],_0x2535e9['cookie'],{'id':_0x4c1d03['id'],'visible':_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]}),_0x16415c[_0x12080c(0x13a)]({'id':_0x4c1d03['id'],'updated':!![],'skipped':![]});}catch(_0xeefda1){const _0x4758d2=mapMenuApiError(_0xeefda1,_0x12080c(0x16f),_0x4c1d03['id']);if(isMenuResponseLoss(_0xeefda1)&&_0x4758d2[_0x12080c(0x168)]!==_0x12080c(0x17a)){_0x49a0d8[_0x12080c(0x13a)](_0x4c1d03['id']);continue;}_0x20e279[_0x12080c(0x13a)]({'id':_0x4c1d03['id'],'stage':'update','code':_0x4758d2[_0x12080c(0x168)],'message':_0x4758d2['message']});}}let _0x3c8d12;try{_0x3c8d12=await fetchMenuSnapshot(_0x2535e9[_0x12080c(0x166)],_0x2535e9[_0x12080c(0x147)]);}catch(_0xf9c251){const _0x389001=describeMenuErrorCause(_0xf9c251,_0x12080c(0x188)),_0x2ccb02=_0x49a0d8['map'](_0x512dc4=>({'id':_0x512dc4,'stage':_0x12080c(0x138),'code':_0x12080c(0x157),'message':_0x12080c(0x187)+_0x512dc4+'\x20and\x20final\x20state\x20could\x20not\x20be\x20read.','requestedStateConfirmed':![],'recovered':![]})),_0x1fc8df={'stage':_0x12080c(0x132),'code':_0x12080c(0x157),'message':'Final\x20menu\x20visibility\x20readback\x20failed.','targetIds':_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x14c)]['map'](_0x398680=>_0x398680['id']),'requestedStateConfirmed':![],..._0x389001};throw menuFailure(asVerificationError(_0xf9c251,'Visibility\x20update\x20requests\x20completed\x20but\x20readback\x20could\x20not\x20confirm\x20the\x20requested\x20state'),_0x29adc5[_0x12080c(0x14f)],{'stage':_0x12080c(0x132),'succeeded':_0x16415c,'failedRecords':[..._0x20e279,..._0x2ccb02,_0x1fc8df],'warnings':[_0x12080c(0x158)],'verification':{'status':_0x12080c(0x135),'recoveredCount':0x0,'lookupCommand':_0x12080c(0x197)}});}const _0x46609c=[];for(const _0x5daef3 of _0x16415c){const _0x43a7b6=Number(_0x5daef3['id']),_0x536906=_0x29adc5['beforeById'][_0x12080c(0x143)](_0x43a7b6),_0x435024=_0x3c8d12[_0x12080c(0x18c)][_0x12080c(0x143)](_0x43a7b6);try{verifyVisibilityUpdate(_0x536906,_0x435024,_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]);}catch(_0x1919c0){const _0x4d771a=asVerificationError(_0x1919c0,_0x12080c(0x14b)+_0x43a7b6+_0x12080c(0x17e));_0x46609c['push']({'id':_0x43a7b6,'stage':_0x12080c(0x132),'code':_0x4d771a[_0x12080c(0x168)],'message':_0x4d771a[_0x12080c(0x182)],'requestedStateConfirmed':![]});}}for(const _0x3481b6 of _0x49a0d8){const _0x48e9da=_0x29adc5[_0x12080c(0x136)][_0x12080c(0x143)](_0x3481b6),_0x56271d=_0x3c8d12['byId']['get'](_0x3481b6);try{verifyVisibilityUpdate(_0x48e9da,_0x56271d,_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x179)]),_0x16415c[_0x12080c(0x13a)]({'id':_0x3481b6,'updated':!![],'skipped':![],'recovered':!![]});}catch(_0x15d4cd){const _0x3ff25c=asVerificationError(_0x15d4cd,_0x12080c(0x141)+_0x3481b6+_0x12080c(0x149));_0x46609c[_0x12080c(0x13a)]({'id':_0x3481b6,'stage':_0x12080c(0x138),'code':_0x3ff25c[_0x12080c(0x168)],'message':_0x3ff25c[_0x12080c(0x182)],'requestedStateConfirmed':![],'recovered':![]});}}if(_0x46609c[_0x12080c(0x19f)]>0x0){const _0x231140=_0x46609c[_0x12080c(0x15c)](_0x3d844c=>Number(_0x3d844c['id'])),_0x5f3a76=_0x16415c[_0x12080c(0x144)](_0x20472c=>_0x20472c['recovered']===!![])['length'],_0x1348a2=menuError(_0x12080c(0x157),_0x12080c(0x180)+_0x231140[_0x12080c(0x151)](',\x20')+'.',_0x12080c(0x1a3));throw menuFailure(_0x1348a2,_0x29adc5['plan'],{'stage':'verification','succeeded':_0x16415c,'failedRecords':[..._0x20e279,..._0x46609c],'warnings':['One\x20or\x20more\x20updates\x20may\x20have\x20changed\x20fields\x20outside\x20visibility;\x20inspect\x20current\x20menu\x20facts\x20before\x20retrying.'],'verification':{'status':'failed',..._0x231140['length']===0x1?{'targetId':_0x231140[0x0]}:{'targetIds':_0x231140},'recoveredCount':_0x5f3a76,'lookupCommand':_0x12080c(0x197)}});}const _0x3c8ecb=_0x16415c[_0x12080c(0x144)](_0x39f8f7=>_0x39f8f7[_0x12080c(0x16c)]===!![])['length'],_0x138c84=_0x16415c[_0x12080c(0x19f)]-_0x3c8ecb,_0x4a1d0b={..._0x29adc5['plan'],'succeeded':_0x16415c,'failed':_0x20e279,'warnings':_0x20e279[_0x12080c(0x19f)]>0x0?[..._0x29adc5['plan'][_0x12080c(0x13d)],_0x12080c(0x17c)]:_0x29adc5[_0x12080c(0x14f)][_0x12080c(0x13d)],'verification':{'checkedBy':_0x12080c(0x150),'snapshotHash':_0x3c8d12[_0x12080c(0x171)],'matchesRequestedState':_0x20e279['length']===0x0,'recoveredCount':_0x49a0d8['length']}};return{'ok':_0x20e279['length']===0x0,'data':_0x4a1d0b,'message':_0x20e279[_0x12080c(0x19f)]===0x0?'Updated\x20visibility\x20for\x20'+_0x3c8ecb+_0x12080c(0x131)+_0x138c84+_0x12080c(0x192):_0x12080c(0x18d)+_0x3c8ecb+_0x12080c(0x134)+_0x138c84+_0x12080c(0x191)+_0x20e279['length']+_0x12080c(0x161)};}};function parseInput(_0x146878){const _0x2af24d=a191_0x14ee11,_0x10c7d8=parseMenuIds(_0x146878[_0x2af24d(0x12e)](_0x2af24d(0x198))),_0x569d3b=parseCsv(_0x146878[_0x2af24d(0x12e)]('paths'));if(_0x10c7d8[_0x2af24d(0x19f)]===0x0&&_0x569d3b[_0x2af24d(0x19f)]===0x0)throw CliErrors[_0x2af24d(0x160)](_0x2af24d(0x169));const _0x5f4720=parseBooleanFlag(_0x146878,_0x2af24d(0x162),!![]),_0x5b25f8=parseBooleanFlag(_0x146878,_0x2af24d(0x155),![]);let _0x10cb46;if(hasFlag(_0x146878,_0x2af24d(0x130))){_0x10cb46=_0x146878[_0x2af24d(0x13b)](_0x2af24d(0x130));if(!Number[_0x2af24d(0x193)](_0x10cb46)||_0x10cb46<0x0)throw CliErrors[_0x2af24d(0x160)](_0x2af24d(0x175));}return{'menuIds':_0x10c7d8,'paths':_0x569d3b,'visible':_0x5f4720,'expectVisible':_0x5b25f8,'expectedCount':_0x10cb46};}async function buildPlan(_0x4a2f2d,_0x453861){const _0x5ab096=a191_0x14ee11,_0x376379=parseInput(_0x4a2f2d),_0x32f88f=await fetchMutationSnapshot(_0x4a2f2d,'update\x20menu\x20visibility'),_0x1a7708=selectTargets(_0x32f88f['menus'],_0x376379[_0x5ab096(0x18b)],_0x376379[_0x5ab096(0x1a5)]);if(_0x376379[_0x5ab096(0x163)]!==undefined&&_0x1a7708[_0x5ab096(0x19f)]!==_0x376379[_0x5ab096(0x163)])throw menuError('menu_expected_count_mismatch',_0x5ab096(0x139)+_0x1a7708[_0x5ab096(0x19f)]+_0x5ab096(0x146)+_0x376379[_0x5ab096(0x163)]+'.',_0x5ab096(0x19c));if(_0x376379[_0x5ab096(0x196)]!==undefined){const _0x58e9c0=_0x1a7708[_0x5ab096(0x144)](_0x558aee=>_0x558aee[_0x5ab096(0x162)]!==_0x376379[_0x5ab096(0x196)]);if(_0x58e9c0[_0x5ab096(0x19f)]>0x0)throw menuError('menu_state_drift',_0x5ab096(0x15b)+_0x58e9c0[_0x5ab096(0x15c)](_0x8c8ab6=>_0x8c8ab6['id'])[_0x5ab096(0x151)](',\x20')+'.',_0x5ab096(0x167));}const _0x1784ca=_0x1a7708['map'](_0x2da43d=>({'id':_0x2da43d['id'],'label':_0x2da43d[_0x5ab096(0x133)],'path':_0x2da43d[_0x5ab096(0x174)],'before':{'visible':_0x2da43d[_0x5ab096(0x162)]},'after':{'visible':_0x376379[_0x5ab096(0x162)]}})),_0x12f5e6=_0x1784ca['filter'](_0x4de86a=>_0x4de86a[_0x5ab096(0x18e)][_0x5ab096(0x162)]!==_0x376379['visible'])[_0x5ab096(0x15c)](_0xb0f42f=>({'stage':_0x5ab096(0x184),'method':'POST','path':'/smartapi/menu/update','body':{'appCode':_0x4a2f2d[_0x5ab096(0x166)],'id':_0xb0f42f['id'],'visible':_0x376379[_0x5ab096(0x162)]}})),_0x5b6a93=mutationResult({'operation':'visibility-update','selector':{'menuIds':_0x376379[_0x5ab096(0x18b)],'paths':_0x376379[_0x5ab096(0x1a5)]},'before':{'menus':_0x1a7708[_0x5ab096(0x15c)](_0x3e3f6a=>({'id':_0x3e3f6a['id'],'path':_0x3e3f6a['path'],'visible':_0x3e3f6a['visible']}))},'after':{'menus':_0x1a7708[_0x5ab096(0x15c)](_0x5eb5df=>({'id':_0x5eb5df['id'],'path':_0x5eb5df[_0x5ab096(0x174)],'visible':_0x376379[_0x5ab096(0x162)]}))},'dryRun':_0x453861,'backend':[...BACKEND],'plannedActions':_0x12f5e6,'snapshotHash':_0x32f88f[_0x5ab096(0x171)],'warnings':_0x12f5e6[_0x5ab096(0x19f)]===0x0?[_0x5ab096(0x1a0)]:[]});return{'plan':{..._0x5b6a93,'requestedVisible':_0x376379['visible'],'targets':_0x1784ca},'beforeById':new Map(_0x1a7708[_0x5ab096(0x15c)](_0x2a14b8=>[_0x2a14b8['id'],_0x2a14b8]))};}function selectTargets(_0x3f33fa,_0x16c507,_0x401629){const _0x254fe8=a191_0x14ee11,_0x2a3ad6=new Map(_0x3f33fa[_0x254fe8(0x15c)](_0x43a3d0=>[_0x43a3d0['id'],_0x43a3d0])),_0x114a79=new Map(),_0x2ce1bb=_0x16c507[_0x254fe8(0x144)](_0x355e23=>!_0x2a3ad6['has'](_0x355e23));if(_0x2ce1bb[_0x254fe8(0x19f)]>0x0)throw menuError(_0x254fe8(0x156),_0x254fe8(0x185)+_0x2ce1bb[_0x254fe8(0x151)](',\x20')+'.',_0x254fe8(0x1a1));for(const _0x100852 of _0x16c507){_0x114a79[_0x254fe8(0x154)](_0x100852,_0x2a3ad6[_0x254fe8(0x143)](_0x100852));}for(const _0x53c52e of _0x401629){const _0x10b1bb=_0x3f33fa[_0x254fe8(0x144)](_0x17c157=>_0x17c157[_0x254fe8(0x174)]===_0x53c52e);if(_0x10b1bb[_0x254fe8(0x19f)]===0x0)throw menuError(_0x254fe8(0x156),_0x254fe8(0x15a)+JSON[_0x254fe8(0x183)](_0x53c52e)+'.',_0x254fe8(0x17d));if(_0x10b1bb['length']>0x1)throw menuError(_0x254fe8(0x189),_0x254fe8(0x1a4)+JSON[_0x254fe8(0x183)](_0x53c52e)+'.',_0x254fe8(0x18f)+_0x10b1bb[_0x254fe8(0x15c)](_0x31dde7=>_0x31dde7['id'])[_0x254fe8(0x151)](',\x20')+'.');const _0x189f5d=_0x10b1bb[0x0];_0x114a79[_0x254fe8(0x154)](_0x189f5d['id'],_0x189f5d);}return[..._0x114a79['values']()];}function parseMenuIds(_0x2cbdb7){const _0x2c90ec=a191_0x14ee11,_0x10bba9=parseCsv(_0x2cbdb7),_0x36d783=_0x10bba9['map'](Number);if(_0x36d783[_0x2c90ec(0x19e)](_0x2e6356=>!Number[_0x2c90ec(0x193)](_0x2e6356)||_0x2e6356<=0x0))throw CliErrors[_0x2c90ec(0x160)](_0x2c90ec(0x17f));return[...new Set(_0x36d783)];}function parseCsv(_0x2b20f7){const _0x14d05c=a191_0x14ee11;return[...new Set(_0x2b20f7['split'](',')[_0x14d05c(0x15c)](_0x560918=>_0x560918[_0x14d05c(0x152)]())['filter'](Boolean))];}function parseBooleanFlag(_0xe5f15b,_0xfe5ba,_0x3eeb84){const _0x25e32e=a191_0x14ee11;if(!hasFlag(_0xe5f15b,_0xfe5ba)){if(_0x3eeb84)throw CliErrors['flagMissing'](_0xfe5ba);return undefined;}const _0x4acabd=_0xe5f15b[_0x25e32e(0x176)][_0xfe5ba];if(_0x4acabd===!![]||_0x4acabd===![])return _0x4acabd;if(_0x4acabd===_0x25e32e(0x14d))return!![];if(_0x4acabd===_0x25e32e(0x178))return![];throw CliErrors[_0x25e32e(0x160)]('--'+_0xfe5ba+_0x25e32e(0x148));}function verifyVisibilityUpdate(_0x1dd8f5,_0x186cda,_0x4870c2){const _0x16cead=a191_0x14ee11;assertVerified(!!_0x186cda,'Menu\x20'+_0x1dd8f5['id']+_0x16cead(0x19d)),assertVerified(_0x186cda[_0x16cead(0x162)]===_0x4870c2,_0x16cead(0x14b)+_0x1dd8f5['id']+_0x16cead(0x16a));const _0x50fee0=[['id',_0x186cda['id'],_0x1dd8f5['id']],[_0x16cead(0x19b),_0x186cda[_0x16cead(0x19b)],_0x1dd8f5[_0x16cead(0x19b)]],['depth',_0x186cda[_0x16cead(0x140)],_0x1dd8f5[_0x16cead(0x140)]],['label',_0x186cda[_0x16cead(0x133)],_0x1dd8f5[_0x16cead(0x133)]],['path',_0x186cda[_0x16cead(0x174)],_0x1dd8f5[_0x16cead(0x174)]],[_0x16cead(0x153),_0x186cda[_0x16cead(0x153)],_0x1dd8f5[_0x16cead(0x153)]],[_0x16cead(0x173),_0x186cda[_0x16cead(0x173)],_0x1dd8f5['type']],[_0x16cead(0x177),_0x186cda[_0x16cead(0x177)],_0x1dd8f5[_0x16cead(0x177)]],[_0x16cead(0x14a),_0x186cda[_0x16cead(0x14a)],_0x1dd8f5[_0x16cead(0x14a)]],[_0x16cead(0x16b),_0x186cda[_0x16cead(0x16b)],_0x1dd8f5[_0x16cead(0x16b)]],[_0x16cead(0x165),_0x186cda[_0x16cead(0x165)],_0x1dd8f5[_0x16cead(0x165)]],['childrenCount',_0x186cda[_0x16cead(0x13f)],_0x1dd8f5[_0x16cead(0x13f)]],[_0x16cead(0x18a),_0x186cda[_0x16cead(0x18a)],_0x1dd8f5['pageId']],[_0x16cead(0x1a6),_0x186cda[_0x16cead(0x1a6)],_0x1dd8f5[_0x16cead(0x1a6)]],[_0x16cead(0x12f),_0x186cda[_0x16cead(0x12f)],_0x1dd8f5['modelType']],[_0x16cead(0x17b),_0x186cda['datasetId'],_0x1dd8f5[_0x16cead(0x17b)]],['datasetCode',_0x186cda[_0x16cead(0x1a2)],_0x1dd8f5[_0x16cead(0x1a2)]]];for(const [_0x181ef1,_0x266e51,_0x1d32e5]of _0x50fee0){assertVerified(sameValue(_0x266e51,_0x1d32e5),_0x16cead(0x14b)+_0x1dd8f5['id']+'\x20'+_0x181ef1+_0x16cead(0x170));}}function sameValue(_0x4a525c,_0x5f110f){const _0x472fde=a191_0x14ee11;if(Array[_0x472fde(0x13e)](_0x4a525c)||Array[_0x472fde(0x13e)](_0x5f110f))return JSON[_0x472fde(0x183)](_0x4a525c)===JSON[_0x472fde(0x183)](_0x5f110f);return _0x4a525c===_0x5f110f;}
@@ -1 +1 @@
1
- function a192_0x2305(){const _0x12cfb1=['POST','6176569dfaCnS','channelConfig','endpointUrl','description','3020679yfSHFg','write','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','876KOilpe','62964dIvesv','input','connectTimeout','notification_config_create_outcome_unknown',';\x20no\x20automatic\x20retry\x20was\x20attempted.','mutation','verified','document',';\x20do\x20not\x20resubmit.','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','10pvYlOB','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','8UoZODx','24840KBXmcg','1775580uOKzUd','config-create','verification','12418893vRUVGr','planned','Inspect\x20with\x20','configName','Created\x20notification\x20config\x20','appCode','readTimeout','channelType','create','configCode','207836KgIigp'];a192_0x2305=function(){return _0x12cfb1;};return a192_0x2305();}const a192_0x1668a7=a192_0xb400;(function(_0x395b0d,_0x118f77){const _0x5a158b=a192_0xb400,_0x3edd12=_0x395b0d();while(!![]){try{const _0x518cfc=parseInt(_0x5a158b(0xc4))/0x1+parseInt(_0x5a158b(0xa9))/0x2+parseInt(_0x5a158b(0xa5))/0x3+-parseInt(_0x5a158b(0xb7))/0x4+parseInt(_0x5a158b(0xb6))/0x5*(-parseInt(_0x5a158b(0xa8))/0x6)+parseInt(_0x5a158b(0xc6))/0x7*(-parseInt(_0x5a158b(0xb5))/0x8)+-parseInt(_0x5a158b(0xba))/0x9*(-parseInt(_0x5a158b(0xb3))/0xa);if(_0x518cfc===_0x118f77)break;else _0x3edd12['push'](_0x3edd12['shift']());}catch(_0xd11270){_0x3edd12['push'](_0x3edd12['shift']());}}}(a192_0x2305,0x8c422));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a192_0xb400(_0x30f19a,_0x49c2e8){_0x30f19a=_0x30f19a-0xa4;const _0x230531=a192_0x2305();let _0xb40050=_0x230531[_0x30f19a];return _0xb40050;}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(_0x1d1867){const _0x36267e=a192_0xb400,_0x1a5cab=await readNotificationDocument(_0x1d1867,_0x36267e(0xc2)),_0x4d4103=createMutationInput(_0x1d1867[_0x36267e(0xbf)],_0x1a5cab);return{'document':_0x1a5cab,'input':_0x4d4103,'planned':projectNotificationConfig({'appCode':_0x1d1867[_0x36267e(0xbf)],'configName':_0x1a5cab[_0x36267e(0xbd)],'channelType':_0x1a5cab[_0x36267e(0xc1)],'endpointUrl':_0x1a5cab[_0x36267e(0xc8)],'channelConfig':_0x1a5cab[_0x36267e(0xc7)],'description':_0x1a5cab[_0x36267e(0xa4)],'connectTimeout':_0x1a5cab[_0x36267e(0xab)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x1a5cab[_0x36267e(0xc0)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':'notification','command':a192_0x1668a7(0xb8),'description':a192_0x1668a7(0xb2),'risk':a192_0x1668a7(0xa6),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x59d6ec){assertSingleNotificationSource(_0x59d6ec);},async 'dryRun'(_0x207828){const _0x4d9d03=a192_0x1668a7,_0x41b770=await prepareCreate(_0x207828),_0xf9aeae=notificationLookupCommand(_0x207828['appCode'],_0x41b770[_0x4d9d03(0xb0)][_0x4d9d03(0xc1)]);return asDryRunResult({'operation':_0x4d9d03(0xc2),'selector':{'appCode':_0x207828['appCode'],'configName':_0x41b770[_0x4d9d03(0xb0)][_0x4d9d03(0xbd)],'channelType':_0x41b770[_0x4d9d03(0xb0)][_0x4d9d03(0xc1)]},'before':null,'after':_0x41b770[_0x4d9d03(0xbb)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4d9d03(0xbb),'lookupCommand':_0xf9aeae}},{'method':_0x4d9d03(0xc5),'url':CREATE_PATH});},async 'execute'(_0x281d33){const _0x2b50b0=a192_0x1668a7,_0x125a8d=await prepareCreate(_0x281d33),_0x1ea502=notificationLookupCommand(_0x281d33[_0x2b50b0(0xbf)],_0x125a8d[_0x2b50b0(0xb0)][_0x2b50b0(0xc1)]);let _0x44b35d;try{_0x44b35d=await createNotificationChannelConfig(_0x125a8d[_0x2b50b0(0xaa)]);}catch(_0x3c2c03){if(isPlatformTransportFailure(_0x3c2c03))throw notificationError(_0x2b50b0(0xac),_0x2b50b0(0xa7),_0x2b50b0(0xbc)+_0x1ea502+_0x2b50b0(0xb1));throw safeApiFailure(_0x2b50b0(0xc2),_0x2b50b0(0xae),'Inspect\x20with\x20'+_0x1ea502+_0x2b50b0(0xad));}if(!Number['isSafeInteger'](_0x44b35d)||_0x44b35d<=0x0)throw notificationError(_0x2b50b0(0xac),_0x2b50b0(0xb4),_0x2b50b0(0xbc)+_0x1ea502+_0x2b50b0(0xb1));let _0xf71d6f;try{const _0x58fc0b=await getNotificationChannelConfig(_0x44b35d,_0x281d33[_0x2b50b0(0xbf)]);_0xf71d6f=normalizeExactNotificationConfig(_0x58fc0b,_0x44b35d,_0x281d33[_0x2b50b0(0xbf)]);}catch{throw safeApiFailure(_0x2b50b0(0xc2),_0x2b50b0(0xb9),_0x2b50b0(0xbc)+_0x1ea502+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':_0x2b50b0(0xc2),'selector':{'appCode':_0xf71d6f[_0x2b50b0(0xbf)],'id':_0xf71d6f['id'],'configCode':_0xf71d6f[_0x2b50b0(0xc3)],'configName':_0xf71d6f[_0x2b50b0(0xbd)],'channelType':_0xf71d6f['channelType']},'before':null,'after':projectNotificationConfig(_0xf71d6f),'dryRun':![],'backend':{'method':_0x2b50b0(0xc5),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2b50b0(0xaf),'lookupCommand':_0x1ea502}},'message':_0x2b50b0(0xbe)+_0xf71d6f['id']};}};
1
+ function a192_0x338b(_0x53e200,_0x51ed1a){_0x53e200=_0x53e200-0x1df;const _0x51dbeb=a192_0x51db();let _0x338b44=_0x51dbeb[_0x53e200];return _0x338b44;}function a192_0x51db(){const _0xd9af82=['Created\x20notification\x20config\x20','configName','isSafeInteger','config-create','document','146264FXHTkQ','readTimeout','82838JtxAco',';\x20no\x20automatic\x20retry\x20was\x20attempted.','14696970fngVvg','62uhDKWB','6aTXYsv','notification','Inspect\x20with\x20','configCode','7088725Txorci','mutation','write','POST','channelType','connectTimeout','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','notification_config_create_outcome_unknown',';\x20do\x20not\x20resubmit.','endpointUrl','create','15413qyPPsL','32hSmswz','channelConfig','verification','appCode','verified','/notification/channel-config/create','Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.','1108572rpxBwB','108IODZFv','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','planned','3668427mQqrbx','605cACwxs'];a192_0x51db=function(){return _0xd9af82;};return a192_0x51db();}const a192_0x44c356=a192_0x338b;(function(_0x578ea6,_0x215a14){const _0x19b945=a192_0x338b,_0xc6ec1d=_0x578ea6();while(!![]){try{const _0x5f09ca=-parseInt(_0x19b945(0x1f7))/0x1*(parseInt(_0x19b945(0x1e7))/0x2)+parseInt(_0x19b945(0x200))/0x3*(-parseInt(_0x19b945(0x1e2))/0x4)+-parseInt(_0x19b945(0x1ec))/0x5*(parseInt(_0x19b945(0x1e8))/0x6)+parseInt(_0x19b945(0x1e4))/0x7*(parseInt(_0x19b945(0x1f8))/0x8)+parseInt(_0x19b945(0x203))/0x9+-parseInt(_0x19b945(0x1e6))/0xa+parseInt(_0x19b945(0x204))/0xb*(parseInt(_0x19b945(0x1ff))/0xc);if(_0x5f09ca===_0x215a14)break;else _0xc6ec1d['push'](_0xc6ec1d['shift']());}catch(_0x5b6eac){_0xc6ec1d['push'](_0xc6ec1d['shift']());}}}(a192_0x51db,0xd0901));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_0x44c356(0x1fd);async function prepareCreate(_0x4d2850){const _0x5d6fdf=a192_0x44c356,_0x44928d=await readNotificationDocument(_0x4d2850,'create'),_0x15df90=createMutationInput(_0x4d2850['appCode'],_0x44928d);return{'document':_0x44928d,'input':_0x15df90,'planned':projectNotificationConfig({'appCode':_0x4d2850[_0x5d6fdf(0x1fb)],'configName':_0x44928d['configName'],'channelType':_0x44928d[_0x5d6fdf(0x1f0)],'endpointUrl':_0x44928d[_0x5d6fdf(0x1f5)],'channelConfig':_0x44928d[_0x5d6fdf(0x1f9)],'description':_0x44928d['description'],'connectTimeout':_0x44928d[_0x5d6fdf(0x1f1)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x44928d[_0x5d6fdf(0x1e3)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a192_0x44c356(0x1e9),'command':a192_0x44c356(0x1e0),'description':a192_0x44c356(0x1f2),'risk':a192_0x44c356(0x1ee),'requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0xee86e9){assertSingleNotificationSource(_0xee86e9);},async 'dryRun'(_0x41d8c9){const _0x2981ba=a192_0x44c356,_0x22b7d6=await prepareCreate(_0x41d8c9),_0x8fbcb=notificationLookupCommand(_0x41d8c9[_0x2981ba(0x1fb)],_0x22b7d6[_0x2981ba(0x1e1)][_0x2981ba(0x1f0)]);return asDryRunResult({'operation':'create','selector':{'appCode':_0x41d8c9[_0x2981ba(0x1fb)],'configName':_0x22b7d6[_0x2981ba(0x1e1)]['configName'],'channelType':_0x22b7d6['document']['channelType']},'before':null,'after':_0x22b7d6[_0x2981ba(0x202)],'dryRun':!![],'backend':{'method':_0x2981ba(0x1ef),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x2981ba(0x202),'lookupCommand':_0x8fbcb}},{'method':_0x2981ba(0x1ef),'url':CREATE_PATH});},async 'execute'(_0x4147a4){const _0x4ca101=a192_0x44c356,_0x500720=await prepareCreate(_0x4147a4),_0x50467d=notificationLookupCommand(_0x4147a4['appCode'],_0x500720[_0x4ca101(0x1e1)][_0x4ca101(0x1f0)]);let _0x56697a;try{_0x56697a=await createNotificationChannelConfig(_0x500720['input']);}catch(_0x1caa36){if(isPlatformTransportFailure(_0x1caa36))throw notificationError(_0x4ca101(0x1f3),_0x4ca101(0x1fe),_0x4ca101(0x1ea)+_0x50467d+';\x20do\x20not\x20resubmit.');throw safeApiFailure(_0x4ca101(0x1f6),_0x4ca101(0x1ed),_0x4ca101(0x1ea)+_0x50467d+_0x4ca101(0x1e5));}if(!Number[_0x4ca101(0x1df)](_0x56697a)||_0x56697a<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x4ca101(0x201),'Inspect\x20with\x20'+_0x50467d+_0x4ca101(0x1f4));let _0x3f8fee;try{const _0x943ca4=await getNotificationChannelConfig(_0x56697a,_0x4147a4['appCode']);_0x3f8fee=normalizeExactNotificationConfig(_0x943ca4,_0x56697a,_0x4147a4['appCode']);}catch{throw safeApiFailure(_0x4ca101(0x1f6),_0x4ca101(0x1fa),_0x4ca101(0x1ea)+_0x50467d+';\x20do\x20not\x20resubmit\x20automatically.');}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x3f8fee['appCode'],'id':_0x3f8fee['id'],'configCode':_0x3f8fee[_0x4ca101(0x1eb)],'configName':_0x3f8fee[_0x4ca101(0x206)],'channelType':_0x3f8fee[_0x4ca101(0x1f0)]},'before':null,'after':projectNotificationConfig(_0x3f8fee),'dryRun':![],'backend':{'method':_0x4ca101(0x1ef),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x4ca101(0x1fc),'lookupCommand':_0x50467d}},'message':_0x4ca101(0x205)+_0x3f8fee['id']};}};
@@ -1 +1 @@
1
- const a193_0x3df647=a193_0x54d0;(function(_0x1275f1,_0x59dc75){const _0x4caf36=a193_0x54d0,_0x58feeb=_0x1275f1();while(!![]){try{const _0x3c7684=parseInt(_0x4caf36(0x1e8))/0x1+parseInt(_0x4caf36(0x1da))/0x2*(parseInt(_0x4caf36(0x1d5))/0x3)+-parseInt(_0x4caf36(0x1e2))/0x4+-parseInt(_0x4caf36(0x1d4))/0x5*(-parseInt(_0x4caf36(0x1ef))/0x6)+-parseInt(_0x4caf36(0x1ee))/0x7*(parseInt(_0x4caf36(0x1dd))/0x8)+parseInt(_0x4caf36(0x1d9))/0x9*(parseInt(_0x4caf36(0x1f0))/0xa)+-parseInt(_0x4caf36(0x1e0))/0xb;if(_0x3c7684===_0x59dc75)break;else _0x58feeb['push'](_0x58feeb['shift']());}catch(_0x3d6d97){_0x58feeb['push'](_0x58feeb['shift']());}}}(a193_0x3ebc,0xf15d2));import{asDryRunResult}from'../../commands/common/dry-run.js';function a193_0x3ebc(){const _0x514bf6=[';\x20no\x20automatic\x20retry\x20was\x20attempted.','4304671piexJY','1818ZCkWwE','17636110IaCsvS','verified','POST','/notification/channel-config/delete','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','notification_config_delete_outcome_unknown','2720McayQK','136443aaiTpi','Deleted\x20notification\x20config\x20','notification','config-delete','9hdTjsC','2PVykJK','Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight',';\x20do\x20not\x20resubmit\x20automatically.','16wihQfx','Inspect\x20with\x20','notification_config_delete_verification_unavailable','4202770ijEyOo','before','1368668cTIsKN','notification_config_delete_verification_failed','high-risk-write','some','planned','\x20delete\x20could\x20not\x20be\x20verified.','968845gZAOko','\x20remains\x20present\x20after\x20delete.','channelType','delete','appCode'];a193_0x3ebc=function(){return _0x514bf6;};return a193_0x3ebc();}import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a193_0x54d0(_0x1db138,_0x3aa4e7){_0x1db138=_0x1db138-0x1cf;const _0x3ebccd=a193_0x3ebc();let _0x54d0cd=_0x3ebccd[_0x1db138];return _0x54d0cd;}const DELETE_PATH=a193_0x3df647(0x1d1),REFERENCE_WARNING='Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.';async function prepareDelete(_0x48234e){const _0x553518=a193_0x3df647,_0x2720c3=readNotificationId(_0x48234e),_0x42a77b=await requireExactNotificationConfig(_0x48234e[_0x553518(0x1ec)],_0x2720c3,'delete');return{'id':_0x2720c3,'before':_0x42a77b};}export const notificationConfigDelete={'service':a193_0x3df647(0x1d7),'command':a193_0x3df647(0x1d8),'description':a193_0x3df647(0x1db),'risk':a193_0x3df647(0x1e4),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x2c9092){readNotificationId(_0x2c9092),requireNotificationExplicitYes(_0x2c9092);},async 'dryRun'(_0x1d07ed){const _0x4e6994=a193_0x3df647,_0x3fe3f3=await prepareDelete(_0x1d07ed),_0x2dd4df=notificationLookupCommand(_0x1d07ed[_0x4e6994(0x1ec)],_0x3fe3f3[_0x4e6994(0x1e1)]['channelType']);return asDryRunResult({'operation':'delete','selector':notificationSelector(_0x3fe3f3[_0x4e6994(0x1e1)]),'before':projectNotificationConfig(_0x3fe3f3['before']),'after':null,'dryRun':!![],'backend':{'method':_0x4e6994(0x1d0),'path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x4e6994(0x1e6),'lookupCommand':_0x2dd4df}},{'method':_0x4e6994(0x1d0),'url':DELETE_PATH});},async 'execute'(_0xc435f){const _0x8859dd=a193_0x3df647;requireNotificationExplicitYes(_0xc435f);const _0x2b5415=await prepareDelete(_0xc435f),_0x3e6ec1=notificationLookupCommand(_0xc435f[_0x8859dd(0x1ec)],_0x2b5415[_0x8859dd(0x1e1)]['channelType']);let _0x22ac07=![];try{await deleteNotificationChannelConfig(_0x2b5415['id'],_0xc435f[_0x8859dd(0x1ec)]);}catch(_0x1d4859){if(!isPlatformTransportFailure(_0x1d4859))throw safeApiFailure(_0x8859dd(0x1eb),'mutation',_0x8859dd(0x1de)+_0x3e6ec1+_0x8859dd(0x1ed));_0x22ac07=!![];}let _0x79981c;try{_0x79981c=await listNotificationChannelConfigs(_0xc435f['appCode'],_0x2b5415[_0x8859dd(0x1e1)][_0x8859dd(0x1ea)]),validateNotificationDeleteReadback(_0x79981c,_0xc435f[_0x8859dd(0x1ec)],_0x2b5415[_0x8859dd(0x1e1)][_0x8859dd(0x1ea)]);}catch{throw notificationError(_0x22ac07?'notification_config_delete_outcome_unknown':_0x8859dd(0x1df),'Notification\x20config\x20'+_0x2b5415['id']+_0x8859dd(0x1e7),_0x8859dd(0x1de)+_0x3e6ec1+_0x8859dd(0x1dc));}if(_0x79981c[_0x8859dd(0x1e5)](_0xbb9f40=>_0xbb9f40['id']===_0x2b5415['id']))throw notificationError(_0x22ac07?_0x8859dd(0x1d3):_0x8859dd(0x1e3),'Notification\x20config\x20'+_0x2b5415['id']+_0x8859dd(0x1e9),'Inspect\x20with\x20'+_0x3e6ec1+';\x20do\x20not\x20resubmit\x20automatically.');const _0x401956=[REFERENCE_WARNING];return _0x22ac07&&_0x401956['unshift'](_0x8859dd(0x1d2)),{'ok':!![],'data':{'operation':_0x8859dd(0x1eb),'selector':notificationSelector(_0x2b5415[_0x8859dd(0x1e1)]),'before':projectNotificationConfig(_0x2b5415[_0x8859dd(0x1e1)]),'after':null,'dryRun':![],'backend':{'method':_0x8859dd(0x1d0),'path':DELETE_PATH},'warnings':_0x401956,'verification':{'status':_0x8859dd(0x1cf),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x22ac07,'lookupCommand':_0x3e6ec1}},'message':_0x8859dd(0x1d6)+_0x2b5415['id']};}};
1
+ function a193_0x3727(){const _0x1cf134=[';\x20no\x20automatic\x20retry\x20was\x20attempted.',';\x20do\x20not\x20resubmit\x20automatically.','10lFetgT','\x20delete\x20could\x20not\x20be\x20verified.','Deleting\x20this\x20app-level\x20config\x20may\x20make\x20dataset-level\x20channels\x20that\x20reference\x20it\x20unavailable;\x20dataset\x20references\x20were\x20not\x20verified\x20by\x20the\x20CLI.','notification_config_delete_verification_unavailable','2335710HpdKld','Notification\x20config\x20','1712721CKUisI','high-risk-write','appCode','some','/notification/channel-config/delete','Inspect\x20with\x20','69592ZUGZWT','notification_config_delete_verification_failed','notification','8SAtssD','5962ZrBKJo','4929743OWJdBi','planned','Delete\x20response\x20was\x20unavailable;\x20list\x20readback\x20proved\x20ID\x20absence\x20without\x20resubmitting.','2EDEoXh','Deleted\x20notification\x20config\x20','notification_config_delete_outcome_unknown','delete','1641096oqWIVo','verified','mutation','25460gfKJWt','1176244yuUkbg','before','POST','unshift','channelType'];a193_0x3727=function(){return _0x1cf134;};return a193_0x3727();}const a193_0x28efd3=a193_0x4287;(function(_0x57ec71,_0x5a9edd){const _0x1b8fed=a193_0x4287,_0x3e8225=_0x57ec71();while(!![]){try{const _0x4bb71a=parseInt(_0x1b8fed(0xa3))/0x1*(-parseInt(_0x1b8fed(0x9b))/0x2)+-parseInt(_0x1b8fed(0xb8))/0x3+parseInt(_0x1b8fed(0xab))/0x4*(parseInt(_0x1b8fed(0xb2))/0x5)+parseInt(_0x1b8fed(0xb6))/0x6+-parseInt(_0x1b8fed(0xa0))/0x7+parseInt(_0x1b8fed(0x9e))/0x8*(-parseInt(_0x1b8fed(0xa7))/0x9)+-parseInt(_0x1b8fed(0xaa))/0xa*(-parseInt(_0x1b8fed(0x9f))/0xb);if(_0x4bb71a===_0x5a9edd)break;else _0x3e8225['push'](_0x3e8225['shift']());}catch(_0x3e76d2){_0x3e8225['push'](_0x3e8225['shift']());}}}(a193_0x3727,0xcab27));import{asDryRunResult}from'../../commands/common/dry-run.js';import{deleteNotificationChannelConfig,isPlatformTransportFailure,listNotificationChannelConfigs}from'../../core/api-client.js';import{notificationError,notificationLookupCommand,notificationSelector,NOTIFICATION_APP_FLAG,NOTIFICATION_ID_FLAG,projectNotificationConfig,readNotificationId,requireNotificationExplicitYes,requireExactNotificationConfig,safeApiFailure,validateNotificationDeleteReadback}from'../../commands/notification/shared.js';function a193_0x4287(_0x5f0063,_0x150a4f){_0x5f0063=_0x5f0063-0x9b;const _0x372757=a193_0x3727();let _0x428705=_0x372757[_0x5f0063];return _0x428705;}const DELETE_PATH=a193_0x28efd3(0xbc),REFERENCE_WARNING=a193_0x28efd3(0xb4);async function prepareDelete(_0x4e4e9f){const _0x2bba33=a193_0x28efd3,_0x2c6502=readNotificationId(_0x4e4e9f),_0x53dfac=await requireExactNotificationConfig(_0x4e4e9f['appCode'],_0x2c6502,_0x2bba33(0xa6));return{'id':_0x2c6502,'before':_0x53dfac};}export const notificationConfigDelete={'service':a193_0x28efd3(0x9d),'command':'config-delete','description':'Delete\x20an\x20app-level\x20notification\x20config\x20after\x20exact\x20preflight','risk':a193_0x28efd3(0xb9),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,NOTIFICATION_APP_FLAG],async 'validate'(_0x1d6393){readNotificationId(_0x1d6393),requireNotificationExplicitYes(_0x1d6393);},async 'dryRun'(_0xd88259){const _0x3b3370=a193_0x28efd3,_0x13d61f=await prepareDelete(_0xd88259),_0x4d67f1=notificationLookupCommand(_0xd88259['appCode'],_0x13d61f[_0x3b3370(0xac)]['channelType']);return asDryRunResult({'operation':_0x3b3370(0xa6),'selector':notificationSelector(_0x13d61f[_0x3b3370(0xac)]),'before':projectNotificationConfig(_0x13d61f[_0x3b3370(0xac)]),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[REFERENCE_WARNING],'verification':{'status':_0x3b3370(0xa1),'lookupCommand':_0x4d67f1}},{'method':_0x3b3370(0xad),'url':DELETE_PATH});},async 'execute'(_0x107b2b){const _0x420405=a193_0x28efd3;requireNotificationExplicitYes(_0x107b2b);const _0x27c6eb=await prepareDelete(_0x107b2b),_0x19824a=notificationLookupCommand(_0x107b2b[_0x420405(0xba)],_0x27c6eb[_0x420405(0xac)]['channelType']);let _0x1a484b=![];try{await deleteNotificationChannelConfig(_0x27c6eb['id'],_0x107b2b[_0x420405(0xba)]);}catch(_0xd6a6cc){if(!isPlatformTransportFailure(_0xd6a6cc))throw safeApiFailure('delete',_0x420405(0xa9),_0x420405(0xbd)+_0x19824a+_0x420405(0xb0));_0x1a484b=!![];}let _0x514d3b;try{_0x514d3b=await listNotificationChannelConfigs(_0x107b2b[_0x420405(0xba)],_0x27c6eb[_0x420405(0xac)]['channelType']),validateNotificationDeleteReadback(_0x514d3b,_0x107b2b[_0x420405(0xba)],_0x27c6eb[_0x420405(0xac)][_0x420405(0xaf)]);}catch{throw notificationError(_0x1a484b?_0x420405(0xa5):_0x420405(0xb5),_0x420405(0xb7)+_0x27c6eb['id']+_0x420405(0xb3),_0x420405(0xbd)+_0x19824a+_0x420405(0xb1));}if(_0x514d3b[_0x420405(0xbb)](_0x38ecac=>_0x38ecac['id']===_0x27c6eb['id']))throw notificationError(_0x1a484b?_0x420405(0xa5):_0x420405(0x9c),_0x420405(0xb7)+_0x27c6eb['id']+'\x20remains\x20present\x20after\x20delete.','Inspect\x20with\x20'+_0x19824a+';\x20do\x20not\x20resubmit\x20automatically.');const _0x1925a7=[REFERENCE_WARNING];return _0x1a484b&&_0x1925a7[_0x420405(0xae)](_0x420405(0xa2)),{'ok':!![],'data':{'operation':_0x420405(0xa6),'selector':notificationSelector(_0x27c6eb[_0x420405(0xac)]),'before':projectNotificationConfig(_0x27c6eb[_0x420405(0xac)]),'after':null,'dryRun':![],'backend':{'method':_0x420405(0xad),'path':DELETE_PATH},'warnings':_0x1925a7,'verification':{'status':_0x420405(0xa8),'absenceConfirmed':!![],'recoveredAfterUnknownResponse':_0x1a484b,'lookupCommand':_0x19824a}},'message':_0x420405(0xa4)+_0x27c6eb['id']};}};
@@ -1 +1 @@
1
- function a194_0x372e(_0x644eae,_0x125c7a){_0x644eae=_0x644eae-0x173;const _0x46003c=a194_0x4600();let _0x372e5e=_0x46003c[_0x644eae];return _0x372e5e;}const a194_0x4c469e=a194_0x372e;function a194_0x4600(){const _0x2cda5d=['Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','boolean','string','84707WFZfTI','config-list','notification','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','type','bool','8344vdgMga','1641576omsCrR','\x20notification\x20config(s)','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','length','3498030zBJRMf','map','472IWvKEg','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','read','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','11038878ZCpgXo','trim','453FeTjgL','4446492stQina','Found\x20','appCode','all','429114VfZFVg','str'];a194_0x4600=function(){return _0x2cda5d;};return a194_0x4600();}(function(_0xdb14b0,_0x2b39ec){const _0x1d9bb3=a194_0x372e,_0x5967f2=_0xdb14b0();while(!![]){try{const _0x4471bf=-parseInt(_0x1d9bb3(0x17b))/0x1+-parseInt(_0x1d9bb3(0x187))/0x2+parseInt(_0x1d9bb3(0x176))/0x3*(-parseInt(_0x1d9bb3(0x186))/0x4)+-parseInt(_0x1d9bb3(0x18b))/0x5+parseInt(_0x1d9bb3(0x177))/0x6+parseInt(_0x1d9bb3(0x180))/0x7*(parseInt(_0x1d9bb3(0x18d))/0x8)+parseInt(_0x1d9bb3(0x174))/0x9;if(_0x4471bf===_0x2b39ec)break;else _0x5967f2['push'](_0x5967f2['shift']());}catch(_0x285b66){_0x5967f2['push'](_0x5967f2['shift']());}}}(a194_0x4600,0x65d41));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';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_0x4c469e(0x182),'command':a194_0x4c469e(0x181),'description':a194_0x4c469e(0x183),'risk':a194_0x4c469e(0x18f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x4c469e(0x184),'type':a194_0x4c469e(0x17f),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES},{'name':'all','type':a194_0x4c469e(0x17e),'default':![],'description':a194_0x4c469e(0x189)}],async 'validate'(_0x32047f){const _0x527c33=a194_0x4c469e;if(_0x32047f[_0x527c33(0x185)](_0x527c33(0x17a))&&_0x32047f[_0x527c33(0x17c)]('type')[_0x527c33(0x175)]())throw CliErrors['validation'](_0x527c33(0x173),_0x527c33(0x17d));if(_0x32047f[_0x527c33(0x185)](_0x527c33(0x17a)))return;readNotificationChannelType(_0x32047f);},async 'execute'(_0x2a4c0b){const _0x43068c=a194_0x4c469e;if(_0x2a4c0b['bool'](_0x43068c(0x17a))){const _0x1aac67=await Promise['all'](NOTIFICATION_CHANNEL_TYPES[_0x43068c(0x18c)](_0x4dee2e=>listNotificationChannelConfigs(_0x2a4c0b[_0x43068c(0x179)],_0x4dee2e))),_0x59527e=_0x1aac67['flat']()['map'](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2a4c0b[_0x43068c(0x179)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x59527e[_0x43068c(0x18a)],'configs':_0x59527e},'message':'Found\x20'+_0x59527e[_0x43068c(0x18a)]+_0x43068c(0x18e)};}const _0x5a682f=readNotificationChannelType(_0x2a4c0b),_0x1e13bf=await listNotificationChannelConfigs(_0x2a4c0b[_0x43068c(0x179)],_0x5a682f),_0x5c7632=_0x1e13bf[_0x43068c(0x18c)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2a4c0b[_0x43068c(0x179)],'channelType':_0x5a682f,'count':_0x5c7632[_0x43068c(0x18a)],'configs':_0x5c7632},'message':_0x43068c(0x178)+_0x5c7632[_0x43068c(0x18a)]+'\x20'+_0x5a682f+_0x43068c(0x188)};}};
1
+ const a194_0x2eb69e=a194_0x561e;(function(_0x4c57d3,_0x4bb30f){const _0xe821f3=a194_0x561e,_0x5c793a=_0x4c57d3();while(!![]){try{const _0x4c9fa7=-parseInt(_0xe821f3(0x128))/0x1+-parseInt(_0xe821f3(0x123))/0x2*(-parseInt(_0xe821f3(0x12d))/0x3)+-parseInt(_0xe821f3(0x131))/0x4*(-parseInt(_0xe821f3(0x137))/0x5)+-parseInt(_0xe821f3(0x130))/0x6+parseInt(_0xe821f3(0x120))/0x7+-parseInt(_0xe821f3(0x121))/0x8+parseInt(_0xe821f3(0x11c))/0x9;if(_0x4c9fa7===_0x4bb30f)break;else _0x5c793a['push'](_0x5c793a['shift']());}catch(_0x8e90f0){_0x5c793a['push'](_0x5c793a['shift']());}}}(a194_0x379d,0x8dd6b));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a194_0x561e(_0x289a91,_0x539482){_0x289a91=_0x289a91-0x11b;const _0x379d23=a194_0x379d();let _0x561e19=_0x379d23[_0x289a91];return _0x561e19;}function a194_0x379d(){const _0x186bca=['notification','type','5204612sAPaOp','5819800koqaEE','validation','2WWKuVf','appCode','read','length','map','321329nubuNz','Notification\x20channel\x20type','flat','str','Found\x20','749289MqooEq','\x20notification\x20config(s)','Use\x20--all,\x20or\x20query\x20one\x20explicit\x20--type.','174642LmUuCX','4oxzoYh','bool','List\x20configs\x20for\x20every\x20supported\x20notification\x20channel\x20type','trim','config-list','\x20notification\x20config(s)\x20across\x20all\x20channel\x20types','731405QXCoVa','--all\x20and\x20--type\x20are\x20mutually\x20exclusive.','all','4673898YZJOxJ','string'];a194_0x379d=function(){return _0x186bca;};return a194_0x379d();}import{CliErrors}from'../../errors.js';import{NOTIFICATION_CHANNEL_TYPES,projectNotificationListConfig,readNotificationChannelType}from'../../commands/notification/shared.js';export const notificationConfigList={'service':a194_0x2eb69e(0x11e),'command':a194_0x2eb69e(0x135),'description':'List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','risk':a194_0x2eb69e(0x125),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a194_0x2eb69e(0x11f),'type':a194_0x2eb69e(0x11d),'description':a194_0x2eb69e(0x129),'enum':NOTIFICATION_CHANNEL_TYPES},{'name':a194_0x2eb69e(0x11b),'type':'boolean','default':![],'description':a194_0x2eb69e(0x133)}],async 'validate'(_0x3359ae){const _0x3f2018=a194_0x2eb69e;if(_0x3359ae[_0x3f2018(0x132)](_0x3f2018(0x11b))&&_0x3359ae[_0x3f2018(0x12b)](_0x3f2018(0x11f))[_0x3f2018(0x134)]())throw CliErrors[_0x3f2018(0x122)](_0x3f2018(0x138),_0x3f2018(0x12f));if(_0x3359ae[_0x3f2018(0x132)](_0x3f2018(0x11b)))return;readNotificationChannelType(_0x3359ae);},async 'execute'(_0x2478d6){const _0x5d1906=a194_0x2eb69e;if(_0x2478d6[_0x5d1906(0x132)](_0x5d1906(0x11b))){const _0x2f5a78=await Promise[_0x5d1906(0x11b)](NOTIFICATION_CHANNEL_TYPES['map'](_0x5bba73=>listNotificationChannelConfigs(_0x2478d6[_0x5d1906(0x124)],_0x5bba73))),_0x4b3b45=_0x2f5a78[_0x5d1906(0x12a)]()[_0x5d1906(0x127)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2478d6[_0x5d1906(0x124)],'channelTypes':NOTIFICATION_CHANNEL_TYPES,'count':_0x4b3b45[_0x5d1906(0x126)],'configs':_0x4b3b45},'message':'Found\x20'+_0x4b3b45['length']+_0x5d1906(0x136)};}const _0x698e19=readNotificationChannelType(_0x2478d6),_0x4dce4d=await listNotificationChannelConfigs(_0x2478d6[_0x5d1906(0x124)],_0x698e19),_0xb5254a=_0x4dce4d[_0x5d1906(0x127)](projectNotificationListConfig);return{'ok':!![],'data':{'appCode':_0x2478d6['appCode'],'channelType':_0x698e19,'count':_0xb5254a['length'],'configs':_0xb5254a},'message':_0x5d1906(0x12c)+_0xb5254a['length']+'\x20'+_0x698e19+_0x5d1906(0x12e)};}};
@@ -1 +1 @@
1
- const a195_0x398059=a195_0x6ebc;function a195_0x3ee1(){const _0xc6b99f=['notification_config_update_outcome_unknown','appCode','high-risk-write','verifiedFields','payload','1113375sXpfyQ','allMatch','planned','399606zXskbz','1154692ihJbEB','7479567FQKnbO','49iIXjNf','Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','Updated\x20notification\x20config\x20','/notification/channel-config/update',';\x20no\x20automatic\x20retry\x20was\x20attempted.','notification_config_update_verification_unavailable','Inspect\x20with\x20--id\x20','1UZIljf','before','patch','update',';\x20do\x20not\x20resubmit\x20automatically.','config-update','Notification\x20config\x20','Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.','195186FwtvDf','verified','\x20via\x20','\x20with\x20','POST','notification','provesChange','notification_config_update_verification_failed','365074HFJLvT','2504032eJfQeb','channelType'];a195_0x3ee1=function(){return _0xc6b99f;};return a195_0x3ee1();}function a195_0x6ebc(_0x3aee0f,_0x738eae){_0x3aee0f=_0x3aee0f-0x126;const _0x3ee18e=a195_0x3ee1();let _0x6ebc42=_0x3ee18e[_0x3aee0f];return _0x6ebc42;}(function(_0x417a95,_0xcd9ddb){const _0x3fb7df=a195_0x6ebc,_0x26494f=_0x417a95();while(!![]){try{const _0x195de8=parseInt(_0x3fb7df(0x13a))/0x1*(-parseInt(_0x3fb7df(0x14a))/0x2)+parseInt(_0x3fb7df(0x130))/0x3+parseInt(_0x3fb7df(0x131))/0x4+-parseInt(_0x3fb7df(0x12d))/0x5+-parseInt(_0x3fb7df(0x142))/0x6*(parseInt(_0x3fb7df(0x133))/0x7)+-parseInt(_0x3fb7df(0x126))/0x8+parseInt(_0x3fb7df(0x132))/0x9;if(_0x195de8===_0xcd9ddb)break;else _0x26494f['push'](_0x26494f['shift']());}catch(_0x482f32){_0x26494f['push'](_0x26494f['shift']());}}}(a195_0x3ee1,0x4af3d));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_0x398059(0x136);async function prepareUpdate(_0x45c17b){const _0x1a0225=a195_0x398059,_0xe451a6=readNotificationId(_0x45c17b),_0x12a584=await readNotificationDocument(_0x45c17b,_0x1a0225(0x13d)),_0x37f0f8=await requireExactNotificationConfig(_0x45c17b[_0x1a0225(0x129)],_0xe451a6,_0x1a0225(0x13d));return{'id':_0xe451a6,'patch':_0x12a584,'before':_0x37f0f8,'payload':mergeUpdateInput(_0x37f0f8,_0x12a584),'planned':plannedUpdateProjection(_0x37f0f8,_0x12a584)};}export const notificationConfigUpdate={'service':a195_0x398059(0x147),'command':a195_0x398059(0x13f),'description':a195_0x398059(0x134),'risk':a195_0x398059(0x12a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x14ef75){readNotificationId(_0x14ef75),assertSingleNotificationSource(_0x14ef75),requireNotificationExplicitYes(_0x14ef75);},async 'dryRun'(_0x17a019){const _0x1af411=a195_0x398059,_0x4097b2=await prepareUpdate(_0x17a019),_0x56982b=notificationLookupCommand(_0x17a019['appCode'],_0x4097b2[_0x1af411(0x13b)][_0x1af411(0x127)]);return asDryRunResult({'operation':_0x1af411(0x13d),'selector':notificationSelector(_0x4097b2[_0x1af411(0x13b)]),'before':projectNotificationConfig(_0x4097b2[_0x1af411(0x13b)]),'after':_0x4097b2[_0x1af411(0x12f)],'dryRun':!![],'backend':{'method':_0x1af411(0x146),'path':UPDATE_PATH},'warnings':[],'verification':{'status':_0x1af411(0x12f),'lookupCommand':_0x56982b}},{'method':_0x1af411(0x146),'url':UPDATE_PATH});},async 'execute'(_0x220de1){const _0x311295=a195_0x398059;requireNotificationExplicitYes(_0x220de1);const _0x246eb7=await prepareUpdate(_0x220de1),_0x430430=notificationLookupCommand(_0x220de1[_0x311295(0x129)],_0x246eb7[_0x311295(0x13b)][_0x311295(0x127)]);let _0x1e800b=![];try{await updateNotificationChannelConfig(_0x246eb7[_0x311295(0x12c)]);}catch(_0xd7ad8e){if(!isPlatformTransportFailure(_0xd7ad8e))throw safeApiFailure(_0x311295(0x13d),'mutation','Inspect\x20ID\x20'+_0x246eb7['id']+_0x311295(0x145)+_0x430430+_0x311295(0x137));_0x1e800b=!![];}let _0x2f3ad7;try{const _0x44768d=await getNotificationChannelConfig(_0x246eb7['id'],_0x220de1[_0x311295(0x129)]);_0x2f3ad7=normalizeExactNotificationConfig(_0x44768d,_0x246eb7['id'],_0x220de1[_0x311295(0x129)]);}catch{throw notificationError(_0x1e800b?_0x311295(0x128):_0x311295(0x138),_0x311295(0x140)+_0x246eb7['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x311295(0x139)+_0x246eb7['id']+'\x20via\x20'+_0x430430+_0x311295(0x13e));}const _0x812f63=requestedSafeFieldsMatch(_0x246eb7[_0x311295(0x13b)],_0x2f3ad7,_0x246eb7[_0x311295(0x13c)]);if(!_0x812f63[_0x311295(0x12e)]||_0x1e800b&&!_0x812f63[_0x311295(0x148)])throw notificationError(_0x1e800b?'notification_config_update_outcome_unknown':_0x311295(0x149),_0x311295(0x140)+_0x246eb7['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x311295(0x139)+_0x246eb7['id']+_0x311295(0x144)+_0x430430+_0x311295(0x13e));const _0x547cb9=_0x1e800b?[_0x311295(0x141)]:[];return{'ok':!![],'data':{'operation':_0x311295(0x13d),'selector':notificationSelector(_0x2f3ad7),'before':projectNotificationConfig(_0x246eb7[_0x311295(0x13b)]),'after':projectNotificationConfig(_0x2f3ad7),'dryRun':![],'backend':{'method':_0x311295(0x146),'path':UPDATE_PATH},'warnings':_0x547cb9,'verification':{'status':_0x311295(0x143),'recoveredAfterUnknownResponse':_0x1e800b,'verifiedFields':_0x812f63[_0x311295(0x12b)],'lookupCommand':_0x430430}},'message':_0x311295(0x135)+_0x2f3ad7['id']};}};
1
+ const a195_0x3aa6ef=a195_0x5321;function a195_0x5321(_0x4a37d9,_0x280908){_0x4a37d9=_0x4a37d9-0x18a;const _0x5c66dc=a195_0x5c66();let _0x53214a=_0x5c66dc[_0x4a37d9];return _0x53214a;}(function(_0x4ffc5b,_0x171ff5){const _0x4ea66f=a195_0x5321,_0x384e20=_0x4ffc5b();while(!![]){try{const _0x94b5e0=parseInt(_0x4ea66f(0x195))/0x1*(-parseInt(_0x4ea66f(0x1a7))/0x2)+-parseInt(_0x4ea66f(0x196))/0x3+parseInt(_0x4ea66f(0x190))/0x4+-parseInt(_0x4ea66f(0x199))/0x5*(-parseInt(_0x4ea66f(0x197))/0x6)+-parseInt(_0x4ea66f(0x1a5))/0x7+-parseInt(_0x4ea66f(0x1a6))/0x8+-parseInt(_0x4ea66f(0x18c))/0x9*(-parseInt(_0x4ea66f(0x19e))/0xa);if(_0x94b5e0===_0x171ff5)break;else _0x384e20['push'](_0x384e20['shift']());}catch(_0x468cc0){_0x384e20['push'](_0x384e20['shift']());}}}(a195_0x5c66,0xb5784));import{asDryRunResult}from'../../commands/common/dry-run.js';import{getNotificationChannelConfig,isPlatformTransportFailure,updateNotificationChannelConfig}from'../../core/api-client.js';function a195_0x5c66(){const _0xebe298=['Update\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20patch','1868SNWZkS','2703888aCKbCc','4316532fvEZfW','mutation','10WRQruR','\x20via\x20','payload','\x20with\x20','notification_config_update_verification_unavailable','44190ywKhMl','appCode','high-risk-write','before','Updated\x20notification\x20config\x20','allMatch',';\x20no\x20automatic\x20retry\x20was\x20attempted.','1012914rYUfEl','3153568jksDUQ','938lLDDfn','provesChange','patch',';\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20with\x20--id\x20','update','2763RcWQBQ','POST','notification_config_update_outcome_unknown','Notification\x20config\x20','1056436UhkcCT','verifiedFields','channelType','Inspect\x20ID\x20'];a195_0x5c66=function(){return _0xebe298;};return a195_0x5c66();}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(_0x49cc25){const _0x5a8888=a195_0x5321,_0x29cc09=readNotificationId(_0x49cc25),_0x588458=await readNotificationDocument(_0x49cc25,_0x5a8888(0x18b)),_0x56c6c6=await requireExactNotificationConfig(_0x49cc25[_0x5a8888(0x19f)],_0x29cc09,_0x5a8888(0x18b));return{'id':_0x29cc09,'patch':_0x588458,'before':_0x56c6c6,'payload':mergeUpdateInput(_0x56c6c6,_0x588458),'planned':plannedUpdateProjection(_0x56c6c6,_0x588458)};}export const notificationConfigUpdate={'service':'notification','command':'config-update','description':a195_0x3aa6ef(0x194),'risk':a195_0x3aa6ef(0x1a0),'requiresAppCode':!![],'structuredErrors':!![],'flags':[NOTIFICATION_ID_FLAG,...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x15842c){readNotificationId(_0x15842c),assertSingleNotificationSource(_0x15842c),requireNotificationExplicitYes(_0x15842c);},async 'dryRun'(_0x5e3793){const _0x1fe224=a195_0x3aa6ef,_0x157331=await prepareUpdate(_0x5e3793),_0x33a993=notificationLookupCommand(_0x5e3793[_0x1fe224(0x19f)],_0x157331[_0x1fe224(0x1a1)][_0x1fe224(0x192)]);return asDryRunResult({'operation':_0x1fe224(0x18b),'selector':notificationSelector(_0x157331['before']),'before':projectNotificationConfig(_0x157331[_0x1fe224(0x1a1)]),'after':_0x157331['planned'],'dryRun':!![],'backend':{'method':_0x1fe224(0x18d),'path':UPDATE_PATH},'warnings':[],'verification':{'status':'planned','lookupCommand':_0x33a993}},{'method':_0x1fe224(0x18d),'url':UPDATE_PATH});},async 'execute'(_0x5579a0){const _0x489888=a195_0x3aa6ef;requireNotificationExplicitYes(_0x5579a0);const _0x17e3e1=await prepareUpdate(_0x5579a0),_0x3f4223=notificationLookupCommand(_0x5579a0[_0x489888(0x19f)],_0x17e3e1[_0x489888(0x1a1)][_0x489888(0x192)]);let _0x5075d0=![];try{await updateNotificationChannelConfig(_0x17e3e1[_0x489888(0x19b)]);}catch(_0x4beed0){if(!isPlatformTransportFailure(_0x4beed0))throw safeApiFailure(_0x489888(0x18b),_0x489888(0x198),_0x489888(0x193)+_0x17e3e1['id']+_0x489888(0x19c)+_0x3f4223+_0x489888(0x1a4));_0x5075d0=!![];}let _0x1ae0d4;try{const _0x2d6763=await getNotificationChannelConfig(_0x17e3e1['id'],_0x5579a0[_0x489888(0x19f)]);_0x1ae0d4=normalizeExactNotificationConfig(_0x2d6763,_0x17e3e1['id'],_0x5579a0[_0x489888(0x19f)]);}catch{throw notificationError(_0x5075d0?_0x489888(0x18e):_0x489888(0x19d),_0x489888(0x18f)+_0x17e3e1['id']+'\x20update\x20could\x20not\x20be\x20verified\x20by\x20exact\x20ID.',_0x489888(0x18a)+_0x17e3e1['id']+_0x489888(0x19a)+_0x3f4223+_0x489888(0x1aa));}const _0x5bd989=requestedSafeFieldsMatch(_0x17e3e1['before'],_0x1ae0d4,_0x17e3e1[_0x489888(0x1a9)]);if(!_0x5bd989[_0x489888(0x1a3)]||_0x5075d0&&!_0x5bd989[_0x489888(0x1a8)])throw notificationError(_0x5075d0?_0x489888(0x18e):'notification_config_update_verification_failed',_0x489888(0x18f)+_0x17e3e1['id']+'\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20update.',_0x489888(0x18a)+_0x17e3e1['id']+_0x489888(0x19a)+_0x3f4223+';\x20do\x20not\x20resubmit\x20automatically.');const _0x2c2356=_0x5075d0?['Update\x20response\x20was\x20unavailable;\x20exact-ID\x20readback\x20proved\x20changed\x20safe\x20fields\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x489888(0x18b),'selector':notificationSelector(_0x1ae0d4),'before':projectNotificationConfig(_0x17e3e1[_0x489888(0x1a1)]),'after':projectNotificationConfig(_0x1ae0d4),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':_0x2c2356,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x5075d0,'verifiedFields':_0x5bd989[_0x489888(0x191)],'lookupCommand':_0x3f4223}},'message':_0x489888(0x1a2)+_0x1ae0d4['id']};}};
@@ -1 +1 @@
1
- (function(_0xb6ffbb,_0x578cda){const _0x553c04=a196_0x2821,_0x25345b=_0xb6ffbb();while(!![]){try{const _0x591e98=-parseInt(_0x553c04(0x97))/0x1+-parseInt(_0x553c04(0x99))/0x2*(-parseInt(_0x553c04(0x9b))/0x3)+parseInt(_0x553c04(0x9c))/0x4*(parseInt(_0x553c04(0x9d))/0x5)+parseInt(_0x553c04(0x98))/0x6*(-parseInt(_0x553c04(0x94))/0x7)+parseInt(_0x553c04(0x9e))/0x8*(-parseInt(_0x553c04(0x9a))/0x9)+parseInt(_0x553c04(0x95))/0xa*(-parseInt(_0x553c04(0x92))/0xb)+-parseInt(_0x553c04(0x93))/0xc*(-parseInt(_0x553c04(0x96))/0xd);if(_0x591e98===_0x578cda)break;else _0x25345b['push'](_0x25345b['shift']());}catch(_0x2c1daa){_0x25345b['push'](_0x25345b['shift']());}}}(a196_0x37f1,0xc96d7));function a196_0x37f1(){const _0x2e525e=['2631672DZBgac','11hAYVaE','120AtVhYV','321069vDFJrL','9304030WxdPEG','1118221YpEMWc','1208854fDSoPl','48svVJQA','158iMXFPR','18nrJLXy','58521ENfqhj','4VRBywH','7939675Vzzxdh'];a196_0x37f1=function(){return _0x2e525e;};return a196_0x37f1();}import{notificationConfigList}from'../../commands/notification/config-list.js';function a196_0x2821(_0x5d5b78,_0x2ef7aa){_0x5d5b78=_0x5d5b78-0x92;const _0x37f1dc=a196_0x37f1();let _0x282112=_0x37f1dc[_0x5d5b78];return _0x282112;}import{notificationConfigCreate}from'../../commands/notification/config-create.js';import{notificationConfigUpdate}from'../../commands/notification/config-update.js';import{notificationConfigDelete}from'../../commands/notification/config-delete.js';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
1
+ function a196_0x53fd(_0x5e35e7,_0x132a80){_0x5e35e7=_0x5e35e7-0x6c;const _0x520e84=a196_0x520e();let _0x53fd09=_0x520e84[_0x5e35e7];return _0x53fd09;}(function(_0x525549,_0x5c5242){const _0x28c285=a196_0x53fd,_0x5bb787=_0x525549();while(!![]){try{const _0x5cb5f9=parseInt(_0x28c285(0x71))/0x1*(parseInt(_0x28c285(0x70))/0x2)+-parseInt(_0x28c285(0x72))/0x3*(-parseInt(_0x28c285(0x6e))/0x4)+parseInt(_0x28c285(0x6f))/0x5*(parseInt(_0x28c285(0x77))/0x6)+parseInt(_0x28c285(0x6d))/0x7+parseInt(_0x28c285(0x6c))/0x8*(parseInt(_0x28c285(0x76))/0x9)+parseInt(_0x28c285(0x74))/0xa+-parseInt(_0x28c285(0x75))/0xb*(parseInt(_0x28c285(0x73))/0xc);if(_0x5cb5f9===_0x5c5242)break;else _0x5bb787['push'](_0x5bb787['shift']());}catch(_0x3fd16a){_0x5bb787['push'](_0x5bb787['shift']());}}}(a196_0x520e,0xd957d));function a196_0x520e(){const _0x2cffd6=['138579HkiTYZ','36785580iVcNhd','9683320iWqoyM','11LnmNiv','999ujTBxw','12ixWzoR','1808zCflKI','5878803fGpGbK','40MPjlLQ','2246890aMcYhA','28746MYrZrv','53YCaLLG'];a196_0x520e=function(){return _0x2cffd6;};return a196_0x520e();}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';export const notificationDefinitions=[notificationConfigList,notificationConfigCreate,notificationConfigUpdate,notificationConfigDelete];
@@ -1 +1 @@
1
- const a197_0x9e5f21=a197_0x17a4;(function(_0x5b8ed1,_0x45ca63){const _0x328567=a197_0x17a4,_0x43730f=_0x5b8ed1();while(!![]){try{const _0x3101b2=parseInt(_0x328567(0x206))/0x1+-parseInt(_0x328567(0x217))/0x2*(parseInt(_0x328567(0x1c5))/0x3)+-parseInt(_0x328567(0x1d0))/0x4*(-parseInt(_0x328567(0x1e9))/0x5)+-parseInt(_0x328567(0x1e5))/0x6+parseInt(_0x328567(0x1cb))/0x7*(-parseInt(_0x328567(0x1e0))/0x8)+parseInt(_0x328567(0x1ae))/0x9*(parseInt(_0x328567(0x1fd))/0xa)+-parseInt(_0x328567(0x1be))/0xb*(parseInt(_0x328567(0x204))/0xc);if(_0x3101b2===_0x45ca63)break;else _0x43730f['push'](_0x43730f['shift']());}catch(_0x396060){_0x43730f['push'](_0x43730f['shift']());}}}(a197_0xd86e,0x1c4ef));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_0x9e5f21(0x1ba),a197_0x9e5f21(0x1f3),a197_0x9e5f21(0x214),a197_0x9e5f21(0x1d8),a197_0x9e5f21(0x1e8)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x9e5f21(0x1f5),a197_0x9e5f21(0x1e6),a197_0x9e5f21(0x1f0),a197_0x9e5f21(0x1d4),a197_0x9e5f21(0x1b5),'connectTimeout',a197_0x9e5f21(0x1ce)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a197_0x9e5f21(0x19d),a197_0x9e5f21(0x200)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x9e5f21(0x1ca),a197_0x9e5f21(0x1bf),a197_0x9e5f21(0x209),a197_0x9e5f21(0x1c1),a197_0x9e5f21(0x1cd),'subjectPrefix',a197_0x9e5f21(0x1de),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a197_0x9e5f21(0x1b0),'type':a197_0x9e5f21(0x1f4),'required':![],'description':a197_0x9e5f21(0x199)},{'name':a197_0x9e5f21(0x1bc),'type':a197_0x9e5f21(0x1a9),'required':![],'default':![],'description':a197_0x9e5f21(0x1a7)},{'name':a197_0x9e5f21(0x1b4),'type':a197_0x9e5f21(0x1f4),'required':![],'description':a197_0x9e5f21(0x1c6)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x9e5f21(0x20b),'required':!![],'description':a197_0x9e5f21(0x19a)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3a94be,_0x38d424,_0x265274){return new CliError(_0x3a94be,0x1,_0x38d424,_0x265274);}export function readNotificationId(_0x4c8074){const _0x5b6c14=a197_0x9e5f21,_0x3077d6=_0x4c8074['num']('id');if(!Number['isSafeInteger'](_0x3077d6)||_0x3077d6<=0x0)throw notificationError(_0x5b6c14(0x1af),_0x5b6c14(0x1b2));return _0x3077d6;}export function requireNotificationExplicitYes(_0x5009d7){const _0x4923c0=a197_0x9e5f21;if(_0x5009d7[_0x4923c0(0x1c7)](_0x4923c0(0x1fb))||_0x5009d7[_0x4923c0(0x1c7)](_0x4923c0(0x19c)))return;throw notificationError(_0x4923c0(0x215),_0x4923c0(0x1b6),_0x4923c0(0x1aa));}export function readNotificationChannelType(_0x467785,_0xb3299c=a197_0x9e5f21(0x1d5),_0x4f2170=a197_0x9e5f21(0x1ba)){const _0x513019=a197_0x9e5f21,_0x1fdbd1=_0x467785['str'](_0xb3299c)[_0x513019(0x207)]()||_0x4f2170;if(!NOTIFICATION_CHANNEL_TYPES[_0x513019(0x1d7)](_0x1fdbd1))throw CliErrors['validation']('Invalid\x20--'+_0xb3299c+':\x20'+_0x1fdbd1,'Allowed\x20values:\x20'+NOTIFICATION_CHANNEL_TYPES[_0x513019(0x1a2)](',\x20')+'.');return _0x1fdbd1;}export function assertSingleNotificationSource(_0x40f7a5){const _0x549824=a197_0x9e5f21,_0x54831c=[],_0x413d40=_0x40f7a5['str'](_0x549824(0x1b0))[_0x549824(0x207)]();if(_0x413d40)_0x54831c[_0x549824(0x216)]({'kind':_0x549824(0x1b0),'path':_0x413d40});if(_0x40f7a5[_0x549824(0x1c7)](_0x549824(0x1bc)))_0x54831c['push']({'kind':_0x549824(0x1bc)});const _0x1edfb2=_0x40f7a5[_0x549824(0x1b7)](_0x549824(0x1b4))[_0x549824(0x207)]();if(_0x1edfb2)_0x54831c[_0x549824(0x216)]({'kind':_0x549824(0x1fe),'name':_0x1edfb2});if(_0x54831c[_0x549824(0x1d6)]===0x0)throw CliErrors['validation'](_0x549824(0x1ed),_0x549824(0x1ac));if(_0x54831c['length']>0x1)throw CliErrors['validation'](_0x549824(0x1f7),_0x549824(0x1ac));return _0x54831c[0x0];}export async function readNotificationDocument(_0x5d3cba,_0x42f469){const _0x3165fd=a197_0x9e5f21,_0x4da6d5=assertSingleNotificationSource(_0x5d3cba),_0x44cf9b=_0x4da6d5[_0x3165fd(0x1dd)]===_0x3165fd(0x1b0)?'file\x20'+_0x4da6d5[_0x3165fd(0x203)]:_0x4da6d5['kind']===_0x3165fd(0x1fe)?_0x3165fd(0x19e)+_0x4da6d5[_0x3165fd(0x1ee)]:'stdin';let _0x854c98;try{if(_0x4da6d5[_0x3165fd(0x1dd)]===_0x3165fd(0x1b0))_0x854c98=await readFile(_0x4da6d5[_0x3165fd(0x203)],_0x3165fd(0x1ea));else{if(_0x4da6d5[_0x3165fd(0x1dd)]===_0x3165fd(0x1fe)){if(!(_0x4da6d5[_0x3165fd(0x1ee)]in process.env))throw notificationError(_0x3165fd(0x20e),'Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20'+_0x4da6d5[_0x3165fd(0x1ee)]);_0x854c98=process.env[_0x4da6d5.name]??'';}else _0x854c98=await readStdin();}}catch(_0x3af68d){if(_0x3af68d instanceof CliError)throw _0x3af68d;throw notificationError(_0x3165fd(0x20e),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x44cf9b+'.');}let _0x1a6239;try{_0x1a6239=JSON[_0x3165fd(0x1bb)](_0x854c98);}catch{throw notificationError(_0x3165fd(0x1ad),_0x3165fd(0x1f2)+_0x44cf9b+_0x3165fd(0x1e2),'Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.');}if(!isJsonObject(_0x1a6239))throw notificationError('notification_config_json_invalid',_0x3165fd(0x1f2)+_0x44cf9b+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x1a6239,_0x42f469);}export function projectNotificationListConfig(_0x29bd44,_0x97cf0c){const _0x4454ed=a197_0x9e5f21;return{'id':typeof _0x29bd44['id']===_0x4454ed(0x20b)?_0x29bd44['id']:null,'configCode':requireResponseString(_0x29bd44['configCode'],_0x4454ed(0x19d),_0x97cf0c),'configName':requireResponseString(_0x29bd44[_0x4454ed(0x1f5)],_0x4454ed(0x1f5),_0x97cf0c),'channelType':requireResponseString(_0x29bd44[_0x4454ed(0x1e6)],_0x4454ed(0x1e6),_0x97cf0c),'description':normalizeNullableString(_0x29bd44[_0x4454ed(0x1b5)]),'createTime':normalizeNullableString(_0x29bd44[_0x4454ed(0x201)]),'updateTime':normalizeNullableString(_0x29bd44['updateTime'])};}export function normalizeExactNotificationConfig(_0x2ce591,_0x5a4629,_0x5a4123){const _0x39c6a0=a197_0x9e5f21;if(!Number[_0x39c6a0(0x1c3)](_0x2ce591['id'])||_0x2ce591['id']!==_0x5a4629)throw notificationError(_0x39c6a0(0x213),_0x39c6a0(0x205)+_0x5a4629+'.');if(_0x2ce591[_0x39c6a0(0x1c9)]!==_0x5a4123)throw notificationError(_0x39c6a0(0x213),_0x39c6a0(0x20d)+_0x5a4629+_0x39c6a0(0x208));const _0xeda50b=requireExactString(_0x2ce591[_0x39c6a0(0x1f5)],_0x39c6a0(0x1f5),_0x5a4629),_0x2f5240=requireExactString(_0x2ce591[_0x39c6a0(0x19d)],_0x39c6a0(0x19d),_0x5a4629),_0x2c67a1=requireExactString(_0x2ce591[_0x39c6a0(0x1e6)],_0x39c6a0(0x1e6),_0x5a4629);if(!NOTIFICATION_CHANNEL_TYPES[_0x39c6a0(0x1d7)](_0x2c67a1))throw notificationError(_0x39c6a0(0x213),'Notification\x20config\x20'+_0x5a4629+'\x20has\x20an\x20unsupported\x20channelType.');const _0x38e999=responseNullableString(_0x2ce591[_0x39c6a0(0x1f0)],_0x39c6a0(0x1f0),_0x5a4629),_0x5312ed=responseNullableString(_0x2ce591[_0x39c6a0(0x1d4)],'channelConfig',_0x5a4629),_0x4181cb=responseNullableString(_0x2ce591[_0x39c6a0(0x1b5)],_0x39c6a0(0x1b5),_0x5a4629),_0x4876b6=responseNullableTimeout(_0x2ce591[_0x39c6a0(0x1fa)],_0x39c6a0(0x1fa),_0x5a4629),_0x529685=responseNullableTimeout(_0x2ce591[_0x39c6a0(0x1ce)],_0x39c6a0(0x1ce),_0x5a4629);return{'id':_0x5a4629,'appCode':_0x5a4123,'configCode':_0x2f5240,'configName':_0xeda50b,'channelType':_0x2c67a1,'endpointUrl':redactSensitive(_0x38e999),'channelConfig':redactSensitive(_0x5312ed),'description':_0x4181cb,'connectTimeout':_0x4876b6,'readTimeout':_0x529685,'endpointUrlRaw':_0x38e999,'channelConfigRaw':_0x5312ed};}function a197_0x17a4(_0x11061d,_0x475e0d){_0x11061d=_0x11061d-0x197;const _0xd86ea8=a197_0xd86e();let _0x17a432=_0xd86ea8[_0x11061d];return _0x17a432;}export async function requireExactNotificationConfig(_0x51ae55,_0x4d9e84,_0x4f9c64){const _0x147840=a197_0x9e5f21;let _0x54a7a7;try{_0x54a7a7=await getNotificationChannelConfig(_0x4d9e84,_0x51ae55);}catch{throw safeApiFailure(_0x4f9c64,_0x147840(0x1c4),_0x147840(0x1ec)+_0x51ae55+'\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.');}return normalizeExactNotificationConfig(_0x54a7a7,_0x4d9e84,_0x51ae55);}export function projectNotificationConfig(_0x182a3a){const _0x21ca67=a197_0x9e5f21;return{'id':_0x182a3a['id']??null,'appCode':_0x182a3a[_0x21ca67(0x1c9)],'configCode':_0x182a3a[_0x21ca67(0x19d)]??null,'configName':_0x182a3a[_0x21ca67(0x1f5)],'channelType':_0x182a3a[_0x21ca67(0x1e6)],'endpointUrl':redactSensitive(_0x182a3a[_0x21ca67(0x1f0)]),'channelConfig':redactSensitive(_0x182a3a[_0x21ca67(0x1d4)]),'description':_0x182a3a['description']??null,'connectTimeout':_0x182a3a[_0x21ca67(0x1fa)]??null,'readTimeout':_0x182a3a[_0x21ca67(0x1ce)]??null};}export function notificationSelector(_0x1b68e4){const _0x5381d2=a197_0x9e5f21;return{'appCode':_0x1b68e4[_0x5381d2(0x1c9)],'id':_0x1b68e4['id'],'configCode':_0x1b68e4[_0x5381d2(0x19d)],'configName':_0x1b68e4[_0x5381d2(0x1f5)],'channelType':_0x1b68e4[_0x5381d2(0x1e6)]};}export function createMutationInput(_0x3ffdbd,_0x1dbe7a){const _0x53acfa=a197_0x9e5f21;return{'appCode':_0x3ffdbd,'configName':_0x1dbe7a[_0x53acfa(0x1f5)],'channelType':_0x1dbe7a[_0x53acfa(0x1e6)],...hasOwn(_0x1dbe7a,'endpointUrl')?{'endpointUrl':_0x1dbe7a[_0x53acfa(0x1f0)]}:{},...hasOwn(_0x1dbe7a,'channelConfig')?{'channelConfig':serializeChannelConfig(_0x1dbe7a['channelConfig'])}:{},...hasOwn(_0x1dbe7a,_0x53acfa(0x1b5))?{'description':_0x1dbe7a[_0x53acfa(0x1b5)]}:{},...hasOwn(_0x1dbe7a,_0x53acfa(0x1fa))?{'connectTimeout':_0x1dbe7a[_0x53acfa(0x1fa)]}:{},...hasOwn(_0x1dbe7a,'readTimeout')?{'readTimeout':_0x1dbe7a[_0x53acfa(0x1ce)]}:{}};}export function mergeUpdateInput(_0x25f852,_0x257018){const _0x56f476=a197_0x9e5f21;return{'id':_0x25f852['id'],'appCode':_0x25f852['appCode'],'configName':_0x257018['configName']??_0x25f852[_0x56f476(0x1f5)],'channelType':_0x257018[_0x56f476(0x1e6)]??_0x25f852[_0x56f476(0x1e6)],'endpointUrl':hasOwn(_0x257018,'endpointUrl')?_0x257018[_0x56f476(0x1f0)]:_0x25f852['endpointUrlRaw'],'channelConfig':hasOwn(_0x257018,_0x56f476(0x1d4))?serializeChannelConfig(_0x257018['channelConfig']):_0x25f852[_0x56f476(0x1e4)],'description':hasOwn(_0x257018,'description')?_0x257018['description']:_0x25f852[_0x56f476(0x1b5)],'connectTimeout':hasOwn(_0x257018,'connectTimeout')?_0x257018['connectTimeout']:_0x25f852[_0x56f476(0x1fa)],'readTimeout':hasOwn(_0x257018,'readTimeout')?_0x257018[_0x56f476(0x1ce)]:_0x25f852[_0x56f476(0x1ce)]};}export function plannedUpdateProjection(_0x227731,_0x16fbfa){const _0x4668c6=a197_0x9e5f21;return projectNotificationConfig({'id':_0x227731['id'],'appCode':_0x227731[_0x4668c6(0x1c9)],'configCode':_0x227731[_0x4668c6(0x19d)],'configName':_0x16fbfa['configName']??_0x227731[_0x4668c6(0x1f5)],'channelType':_0x16fbfa[_0x4668c6(0x1e6)]??_0x227731[_0x4668c6(0x1e6)],'endpointUrl':hasOwn(_0x16fbfa,_0x4668c6(0x1f0))?_0x16fbfa[_0x4668c6(0x1f0)]:_0x227731['endpointUrlRaw'],'channelConfig':hasOwn(_0x16fbfa,_0x4668c6(0x1d4))?_0x16fbfa[_0x4668c6(0x1d4)]:_0x227731['channelConfigRaw'],'description':hasOwn(_0x16fbfa,_0x4668c6(0x1b5))?_0x16fbfa[_0x4668c6(0x1b5)]:_0x227731[_0x4668c6(0x1b5)],'connectTimeout':hasOwn(_0x16fbfa,_0x4668c6(0x1fa))?_0x16fbfa[_0x4668c6(0x1fa)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x227731[_0x4668c6(0x1fa)],'readTimeout':hasOwn(_0x16fbfa,_0x4668c6(0x1ce))?_0x16fbfa[_0x4668c6(0x1ce)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x227731[_0x4668c6(0x1ce)]});}export function requestedSafeFieldsMatch(_0x2d0f4b,_0x3502cd,_0xc4395f){const _0x5183c4=a197_0x9e5f21,_0x1562bd=[],_0x2fe65d=[],_0x43bef4=[];for(const _0x4b8987 of[_0x5183c4(0x1f5),_0x5183c4(0x1e6),'description']){if(!hasOwn(_0xc4395f,_0x4b8987))continue;_0x43bef4['push'](_0x4b8987),_0x1562bd[_0x5183c4(0x216)](_0x3502cd[_0x4b8987]===_0xc4395f[_0x4b8987]),_0x2fe65d[_0x5183c4(0x216)](_0x2d0f4b[_0x4b8987]!==_0xc4395f[_0x4b8987]&&_0x3502cd[_0x4b8987]===_0xc4395f[_0x4b8987]);}for(const _0x1d9406 of[_0x5183c4(0x1fa),'readTimeout']){if(!hasOwn(_0xc4395f,_0x1d9406))continue;const _0x57bb36=_0xc4395f[_0x1d9406]??(_0x1d9406===_0x5183c4(0x1fa)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x43bef4['push'](_0x1d9406),_0x1562bd[_0x5183c4(0x216)](_0x3502cd[_0x1d9406]===_0x57bb36),_0x2fe65d[_0x5183c4(0x216)](_0x2d0f4b[_0x1d9406]!==_0x57bb36&&_0x3502cd[_0x1d9406]===_0x57bb36);}return hasOwn(_0xc4395f,_0x5183c4(0x1f0))&&_0xc4395f[_0x5183c4(0x1f0)]===null&&(_0x43bef4[_0x5183c4(0x216)](_0x5183c4(0x1cf)),_0x1562bd[_0x5183c4(0x216)](_0x3502cd[_0x5183c4(0x210)]===null||_0x3502cd[_0x5183c4(0x210)]===''),_0x2fe65d[_0x5183c4(0x216)](_0x2d0f4b[_0x5183c4(0x210)]!==null&&_0x2d0f4b[_0x5183c4(0x210)]!==''&&(_0x3502cd[_0x5183c4(0x210)]===null||_0x3502cd[_0x5183c4(0x210)]===''))),{'allMatch':_0x1562bd[_0x5183c4(0x20c)](Boolean),'provesChange':_0x2fe65d[_0x5183c4(0x1c2)](Boolean),'verifiedFields':_0x43bef4};}export function validateNotificationDeleteReadback(_0x2fadd2,_0x53321b,_0x14d942){const _0x5a78d2=a197_0x9e5f21;for(const [_0x427e01,_0x532373]of _0x2fadd2['entries']()){if(!Number[_0x5a78d2(0x1c3)](_0x532373['id'])||_0x532373['id']<=0x0)throw notificationError(_0x5a78d2(0x213),_0x5a78d2(0x1ff)+(_0x427e01+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x532373[_0x5a78d2(0x1c9)]!==_0x53321b)throw notificationError(_0x5a78d2(0x213),_0x5a78d2(0x1ff)+(_0x427e01+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x532373[_0x5a78d2(0x1e6)]!==_0x14d942)throw notificationError(_0x5a78d2(0x213),_0x5a78d2(0x1ff)+(_0x427e01+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x1bbd0b,_0x47f1b9,_0x79c9b3){const _0x42721a=a197_0x9e5f21;return notificationError(_0x42721a(0x1e7)+_0x1bbd0b+'_'+(_0x47f1b9==='mutation'?'failed':_0x47f1b9+'_unavailable'),_0x42721a(0x20d)+_0x1bbd0b+'\x20'+_0x47f1b9+'\x20failed.',_0x79c9b3);}export function notificationLookupCommand(_0x2a6354,_0x151896){const _0xa99376=a197_0x9e5f21;return _0xa99376(0x1a1)+_0x2a6354+_0xa99376(0x211)+_0x151896+_0xa99376(0x1e1);}function validateNotificationDocument(_0xcf8858,_0x18a308){const _0x487462=a197_0x9e5f21;for(const _0x40d563 of Object[_0x487462(0x1b3)](_0xcf8858)){if(FORBIDDEN_IDENTITY_FIELDS[_0x487462(0x1eb)](_0x40d563))throw notificationError(_0x487462(0x197),'Notification\x20JSON\x20field\x20\x22'+_0x40d563+_0x487462(0x1ab));if(!ALLOWED_INPUT_FIELDS['has'](_0x40d563))throw notificationError('notification_config_field_unknown',_0x487462(0x1bd)+_0x40d563+'\x22.');}if(_0x18a308===_0x487462(0x20f)&&Object[_0x487462(0x1b3)](_0xcf8858)[_0x487462(0x1d6)]===0x0)throw notificationError('notification_config_update_empty',_0x487462(0x218));const _0x584749={};if(hasOwn(_0xcf8858,_0x487462(0x1f5)))_0x584749[_0x487462(0x1f5)]=validateRequiredString(_0xcf8858[_0x487462(0x1f5)],_0x487462(0x1f5),0x80);else{if(_0x18a308===_0x487462(0x19b))throw notificationError(_0x487462(0x1ef),_0x487462(0x1d1)+_0x487462(0x1f1));}if(hasOwn(_0xcf8858,_0x487462(0x1e6))){if(typeof _0xcf8858[_0x487462(0x1e6)]!==_0x487462(0x1f4))throw invalidFieldType(_0x487462(0x1e6),_0x487462(0x1b9));const _0x57adb7=_0xcf8858['channelType'][_0x487462(0x207)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x487462(0x1d7)](_0x57adb7))throw notificationError(_0x487462(0x1b8),_0x487462(0x1a3),_0x487462(0x1a5)+NOTIFICATION_CHANNEL_TYPES[_0x487462(0x1a2)](',\x20')+'.');_0x584749[_0x487462(0x1e6)]=_0x57adb7;}else{if(_0x18a308===_0x487462(0x19b))throw notificationError('notification_config_field_required',_0x487462(0x1d1)+_0x487462(0x198));}for(const [_0x3ae85d,_0x3bece3]of[['endpointUrl',0x200],[_0x487462(0x1b5),0x100]]){if(!hasOwn(_0xcf8858,_0x3ae85d))continue;const _0x119e6b=_0xcf8858[_0x3ae85d];if(_0x119e6b!==null&&typeof _0x119e6b!==_0x487462(0x1f4))throw invalidFieldType(_0x3ae85d,_0x487462(0x1a8));if(typeof _0x119e6b===_0x487462(0x1f4)&&_0x119e6b[_0x487462(0x1d6)]>_0x3bece3)throw notificationError(_0x487462(0x1b8),'Notification\x20JSON\x20field\x20\x22'+_0x3ae85d+_0x487462(0x1cc)+_0x3bece3+_0x487462(0x1c8));_0x584749[_0x3ae85d]=_0x119e6b;}if(hasOwn(_0xcf8858,_0x487462(0x1d4))){const _0x18e919=_0xcf8858[_0x487462(0x1d4)];if(_0x18e919===null&&_0x18a308===_0x487462(0x19b))throw invalidFieldType(_0x487462(0x1d4),_0x487462(0x1c0));if(_0x18e919!==null&&!isJsonObject(_0x18e919))throw invalidFieldType(_0x487462(0x1d4),_0x18a308===_0x487462(0x20f)?_0x487462(0x1d9):'a\x20JSON\x20object');_0x18e919!==null&&validateChannelConfigFields(_0x584749[_0x487462(0x1e6)],_0x18e919),_0x584749[_0x487462(0x1d4)]=_0x18e919;}for(const _0x18ce02 of[_0x487462(0x1fa),'readTimeout']){if(!hasOwn(_0xcf8858,_0x18ce02))continue;const _0x53d93a=_0xcf8858[_0x18ce02];if(_0x53d93a!==null&&(!Number[_0x487462(0x1c3)](_0x53d93a)||_0x53d93a<0x0))throw notificationError('notification_config_field_invalid',_0x487462(0x1a0)+_0x18ce02+_0x487462(0x1df));_0x584749[_0x18ce02]=_0x53d93a;}return _0x584749;}function validateRequiredString(_0x266b16,_0x59a418,_0x97c762){const _0x1c3370=a197_0x9e5f21;if(typeof _0x266b16!==_0x1c3370(0x1f4))throw invalidFieldType(_0x59a418,_0x1c3370(0x1da));const _0x2e2eda=_0x266b16['trim']();if(!_0x2e2eda)throw notificationError('notification_config_field_invalid',_0x1c3370(0x1a0)+_0x59a418+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x2e2eda[_0x1c3370(0x1d6)]>_0x97c762)throw notificationError(_0x1c3370(0x1b8),'Notification\x20JSON\x20field\x20\x22'+_0x59a418+'\x22\x20cannot\x20exceed\x20'+_0x97c762+_0x1c3370(0x1c8));return _0x2e2eda;}function validateChannelConfigFields(_0x55bcb2,_0x2e61f3){const _0x53e7c3=a197_0x9e5f21;if(hasOwn(_0x2e61f3,_0x53e7c3(0x1a6)))throw forbiddenChannelConfigField(_0x53e7c3(0x1a6));if(_0x55bcb2==='EMAIL')for(const _0x244c18 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2e61f3,_0x244c18))throw forbiddenChannelConfigField(_0x244c18);}}function forbiddenChannelConfigField(_0x85bfff){const _0x4aeecf=a197_0x9e5f21;return notificationError('notification_config_channel_field_forbidden',_0x4aeecf(0x1d3)+_0x85bfff+_0x4aeecf(0x1db));}function invalidFieldType(_0x1cdf54,_0x53b48c){const _0xa550b1=a197_0x9e5f21;return notificationError(_0xa550b1(0x1b8),'Notification\x20JSON\x20field\x20\x22'+_0x1cdf54+_0xa550b1(0x1fc)+_0x53b48c+'.');}function serializeChannelConfig(_0x37220c){const _0x4e1beb=a197_0x9e5f21;return _0x37220c===null||_0x37220c===undefined?null:JSON[_0x4e1beb(0x1e3)](_0x37220c);}function redactSensitive(_0x4f1678){const _0x4e2e43=a197_0x9e5f21;return _0x4f1678===null||_0x4f1678===undefined||_0x4f1678===''?null:_0x4e2e43(0x19f);}function requireResponseString(_0x5a1326,_0x540477,_0x5c766c){const _0x6733f4=a197_0x9e5f21;if(typeof _0x5a1326!==_0x6733f4(0x1f4)||_0x5a1326[_0x6733f4(0x207)]()==='')throw CliErrors[_0x6733f4(0x1f6)](_0x6733f4(0x20a),_0x6733f4(0x1f9)+(_0x5c766c+0x1)+'\x20is\x20missing\x20required\x20field\x20\x22'+_0x540477+'\x22.');return _0x5a1326[_0x6733f4(0x207)]();}function requireExactString(_0x777ad,_0x597868,_0xf96b5e){const _0x4a8b10=a197_0x9e5f21;if(typeof _0x777ad!=='string'||_0x777ad[_0x4a8b10(0x207)]()==='')throw notificationError('notification_config_response_invalid',_0x4a8b10(0x20d)+_0xf96b5e+_0x4a8b10(0x1a4)+_0x597868+'\x22.');return _0x777ad[_0x4a8b10(0x207)]();}function responseNullableString(_0xc40670,_0x2c8e32,_0x381ac4){const _0x237c41=a197_0x9e5f21;if(_0xc40670===undefined||_0xc40670===null)return null;if(typeof _0xc40670!=='string')throw notificationError(_0x237c41(0x213),_0x237c41(0x20d)+_0x381ac4+_0x237c41(0x1d2)+_0x2c8e32+'\x22.');return _0xc40670;}function responseNullableTimeout(_0x35fee,_0x21765f,_0x3d09b3){const _0x1cb6d7=a197_0x9e5f21;if(_0x35fee===undefined||_0x35fee===null)return null;if(!Number[_0x1cb6d7(0x1c3)](_0x35fee)||_0x35fee<0x0)throw notificationError(_0x1cb6d7(0x213),_0x1cb6d7(0x20d)+_0x3d09b3+_0x1cb6d7(0x1d2)+_0x21765f+'\x22.');return _0x35fee;}function normalizeNullableString(_0x3fa8f1){return typeof _0x3fa8f1==='string'?_0x3fa8f1:null;}function isJsonObject(_0x3e4410){const _0x464364=a197_0x9e5f21;return _0x3e4410!==null&&typeof _0x3e4410===_0x464364(0x1dc)&&!Array[_0x464364(0x212)](_0x3e4410);}function a197_0xd86e(){const _0xa8ff02=['5975KjqaXb','utf8','has','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','Missing\x20notification\x20JSON\x20source.','name','notification_config_field_required','endpointUrl','\x22configName\x22.','Notification\x20JSON\x20from\x20','FEISHU','string','configName','apiError','Notification\x20JSON\x20source\x20is\x20ambiguous.','prototype','Item\x20','connectTimeout','dry-run','\x22\x20must\x20be\x20','10XnfaDQ','env','Notification\x20config\x20list\x20item\x20','channelCode','createTime','hasOwnProperty','path','6636MmdUNm','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','222106nyjMFQ','trim','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','ccList','Invalid\x20notification\x20config\x20response.','number','every','Notification\x20config\x20','notification_config_source_unavailable','update','endpointUrlRaw','\x20--type\x20','isArray','notification_config_response_invalid','DINGTALK','notification_config_confirmation_required','push','2atMjql','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','notification_config_field_forbidden','\x22channelType\x22.','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Application-level\x20notification\x20config\x20ID','create','yes','configCode','environment\x20variable\x20','<redacted>','Notification\x20JSON\x20field\x20\x22','rabetbase\x20notification\x20config-list\x20--appcode\x20','join','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x20is\x20missing\x20required\x20field\x20\x22','Allowed\x20values:\x20','messageTemplate','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','a\x20string\x20or\x20null','boolean','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','notification_config_json_invalid','710901CVwKjq','notification_config_id_invalid','file','setEncoding','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','keys','from-env','description','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','str','notification_config_field_invalid','a\x20supported\x20string','EMAIL','parse','stdin','Unknown\x20notification\x20JSON\x20field\x20\x22','1111GqFtxJ','recipients','a\x20JSON\x20object','bccList','some','isSafeInteger','preflight','447999ClJLut','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','bool','\x20characters.','appCode','emailTargets','14224upGuRT','\x22\x20cannot\x20exceed\x20','replyTo','readTimeout','endpointUrl:null','352OHKAYy','Create\x20JSON\x20requires\x20field\x20','\x20has\x20invalid\x20field\x20\x22','Notification\x20JSON\x20channelConfig\x20field\x20\x22','channelConfig','type','length','includes','WECOM','a\x20JSON\x20object\x20or\x20null','a\x20non-empty\x20string','\x22\x20is\x20forbidden.','object','kind','fromName','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','288enoSVb','\x20--format\x20compress','\x20is\x20invalid.','stringify','channelConfigRaw','71796Qyxfac','channelType','notification_config_','WEBHOOK'];a197_0xd86e=function(){return _0xa8ff02;};return a197_0xd86e();}function hasOwn(_0x4808c2,_0x4a56fe){const _0x2241d4=a197_0x9e5f21;return Object[_0x2241d4(0x1f8)][_0x2241d4(0x202)]['call'](_0x4808c2,_0x4a56fe);}async function readStdin(){const _0x27dce0=a197_0x9e5f21;let _0x19646a='';process[_0x27dce0(0x1bc)][_0x27dce0(0x1b1)](_0x27dce0(0x1ea));for await(const _0x551fab of process[_0x27dce0(0x1bc)])_0x19646a+=_0x551fab;return _0x19646a;}
1
+ const a197_0x51c5e6=a197_0x1529;function a197_0x1529(_0x4e21fd,_0x58287b){_0x4e21fd=_0x4e21fd-0x13a;const _0x3f4868=a197_0x3f48();let _0x152908=_0x3f4868[_0x4e21fd];return _0x152908;}(function(_0x332541,_0x12073e){const _0x1c55bc=a197_0x1529,_0x1da24a=_0x332541();while(!![]){try{const _0x5e2968=-parseInt(_0x1c55bc(0x172))/0x1*(parseInt(_0x1c55bc(0x15c))/0x2)+-parseInt(_0x1c55bc(0x16c))/0x3+-parseInt(_0x1c55bc(0x1a9))/0x4*(parseInt(_0x1c55bc(0x13b))/0x5)+parseInt(_0x1c55bc(0x140))/0x6+parseInt(_0x1c55bc(0x173))/0x7+-parseInt(_0x1c55bc(0x16b))/0x8*(-parseInt(_0x1c55bc(0x17d))/0x9)+-parseInt(_0x1c55bc(0x163))/0xa*(-parseInt(_0x1c55bc(0x148))/0xb);if(_0x5e2968===_0x12073e)break;else _0x1da24a['push'](_0x1da24a['shift']());}catch(_0x274719){_0x1da24a['push'](_0x1da24a['shift']());}}}(a197_0x3f48,0x9d1e4));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_0x51c5e6(0x193),a197_0x51c5e6(0x164),a197_0x51c5e6(0x174),'WECOM',a197_0x51c5e6(0x185)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a197_0x51c5e6(0x1ac),a197_0x51c5e6(0x17f),a197_0x51c5e6(0x16a),a197_0x51c5e6(0x13d),'description',a197_0x51c5e6(0x189),a197_0x51c5e6(0x162)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode',a197_0x51c5e6(0x180),a197_0x51c5e6(0x18d)]),EMAIL_RECIPIENT_FIELDS=new Set([a197_0x51c5e6(0x199),'recipients',a197_0x51c5e6(0x144),a197_0x51c5e6(0x14f),a197_0x51c5e6(0x170),a197_0x51c5e6(0x15f),a197_0x51c5e6(0x1b2),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':'file','type':a197_0x51c5e6(0x1b0),'required':![],'description':a197_0x51c5e6(0x165)},{'name':a197_0x51c5e6(0x169),'type':'boolean','required':![],'default':![],'description':a197_0x51c5e6(0x188)},{'name':a197_0x51c5e6(0x150),'type':a197_0x51c5e6(0x1b0),'required':![],'description':a197_0x51c5e6(0x1b5)}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a197_0x51c5e6(0x146),'required':!![],'description':'Application-level\x20notification\x20config\x20ID'};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x58c5c7,_0x76af1e,_0x90d2c2){return new CliError(_0x58c5c7,0x1,_0x76af1e,_0x90d2c2);}export function readNotificationId(_0x8fe525){const _0xcdbe92=a197_0x51c5e6,_0x47e231=_0x8fe525['num']('id');if(!Number[_0xcdbe92(0x192)](_0x47e231)||_0x47e231<=0x0)throw notificationError(_0xcdbe92(0x1af),_0xcdbe92(0x161));return _0x47e231;}export function requireNotificationExplicitYes(_0xf52d77){const _0xfb038=a197_0x51c5e6;if(_0xf52d77[_0xfb038(0x175)](_0xfb038(0x141))||_0xf52d77['bool']('yes'))return;throw notificationError(_0xfb038(0x160),_0xfb038(0x1b1),'Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export function readNotificationChannelType(_0x62e34f,_0x44819c=a197_0x51c5e6(0x18c),_0x27fdd0='EMAIL'){const _0x436a30=a197_0x51c5e6,_0x30fd27=_0x62e34f[_0x436a30(0x13f)](_0x44819c)[_0x436a30(0x16d)]()||_0x27fdd0;if(!NOTIFICATION_CHANNEL_TYPES[_0x436a30(0x159)](_0x30fd27))throw CliErrors['validation']('Invalid\x20--'+_0x44819c+':\x20'+_0x30fd27,_0x436a30(0x179)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x30fd27;}export function assertSingleNotificationSource(_0x1c235b){const _0x61d596=a197_0x51c5e6,_0x2f889f=[],_0x2f3d92=_0x1c235b['str']('file')['trim']();if(_0x2f3d92)_0x2f889f[_0x61d596(0x149)]({'kind':_0x61d596(0x18f),'path':_0x2f3d92});if(_0x1c235b[_0x61d596(0x175)](_0x61d596(0x169)))_0x2f889f[_0x61d596(0x149)]({'kind':_0x61d596(0x169)});const _0x2239d4=_0x1c235b[_0x61d596(0x13f)](_0x61d596(0x150))[_0x61d596(0x16d)]();if(_0x2239d4)_0x2f889f[_0x61d596(0x149)]({'kind':_0x61d596(0x198),'name':_0x2239d4});if(_0x2f889f[_0x61d596(0x157)]===0x0)throw CliErrors['validation']('Missing\x20notification\x20JSON\x20source.',_0x61d596(0x1a7));if(_0x2f889f[_0x61d596(0x157)]>0x1)throw CliErrors['validation'](_0x61d596(0x166),_0x61d596(0x1a7));return _0x2f889f[0x0];}export async function readNotificationDocument(_0x10ad61,_0x247707){const _0x484687=a197_0x51c5e6,_0x2f22ed=assertSingleNotificationSource(_0x10ad61),_0x256d4c=_0x2f22ed[_0x484687(0x186)]==='file'?_0x484687(0x171)+_0x2f22ed[_0x484687(0x147)]:_0x2f22ed['kind']===_0x484687(0x198)?_0x484687(0x17c)+_0x2f22ed[_0x484687(0x152)]:_0x484687(0x169);let _0x315757;try{if(_0x2f22ed['kind']==='file')_0x315757=await readFile(_0x2f22ed[_0x484687(0x147)],_0x484687(0x1a1));else{if(_0x2f22ed[_0x484687(0x186)]===_0x484687(0x198)){if(!(_0x2f22ed[_0x484687(0x152)]in process.env))throw notificationError(_0x484687(0x187),_0x484687(0x1a2)+_0x2f22ed['name']);_0x315757=process.env[_0x2f22ed.name]??'';}else _0x315757=await readStdin();}}catch(_0x733bd){if(_0x733bd instanceof CliError)throw _0x733bd;throw notificationError('notification_config_source_unavailable',_0x484687(0x167)+_0x256d4c+'.');}let _0x52de9f;try{_0x52de9f=JSON[_0x484687(0x176)](_0x315757);}catch{throw notificationError('notification_config_json_invalid',_0x484687(0x15a)+_0x256d4c+_0x484687(0x19b),_0x484687(0x17e));}if(!isJsonObject(_0x52de9f))throw notificationError(_0x484687(0x1a3),'Notification\x20JSON\x20from\x20'+_0x256d4c+'\x20must\x20be\x20an\x20object.');return validateNotificationDocument(_0x52de9f,_0x247707);}export function projectNotificationListConfig(_0x221df8,_0x5e578b){const _0xd2948=a197_0x51c5e6;return{'id':typeof _0x221df8['id']===_0xd2948(0x146)?_0x221df8['id']:null,'configCode':requireResponseString(_0x221df8[_0xd2948(0x180)],_0xd2948(0x180),_0x5e578b),'configName':requireResponseString(_0x221df8[_0xd2948(0x1ac)],_0xd2948(0x1ac),_0x5e578b),'channelType':requireResponseString(_0x221df8[_0xd2948(0x17f)],_0xd2948(0x17f),_0x5e578b),'description':normalizeNullableString(_0x221df8[_0xd2948(0x19a)]),'createTime':normalizeNullableString(_0x221df8[_0xd2948(0x177)]),'updateTime':normalizeNullableString(_0x221df8[_0xd2948(0x142)])};}export function normalizeExactNotificationConfig(_0x26fee3,_0x597c15,_0x251c04){const _0x59c617=a197_0x51c5e6;if(!Number[_0x59c617(0x192)](_0x26fee3['id'])||_0x26fee3['id']!==_0x597c15)throw notificationError('notification_config_response_invalid',_0x59c617(0x13e)+_0x597c15+'.');if(_0x26fee3['appCode']!==_0x251c04)throw notificationError(_0x59c617(0x16f),_0x59c617(0x1ab)+_0x597c15+_0x59c617(0x1ad));const _0x1c8a3b=requireExactString(_0x26fee3[_0x59c617(0x1ac)],_0x59c617(0x1ac),_0x597c15),_0x4a6484=requireExactString(_0x26fee3[_0x59c617(0x180)],_0x59c617(0x180),_0x597c15),_0x14e422=requireExactString(_0x26fee3[_0x59c617(0x17f)],'channelType',_0x597c15);if(!NOTIFICATION_CHANNEL_TYPES[_0x59c617(0x159)](_0x14e422))throw notificationError(_0x59c617(0x16f),_0x59c617(0x1ab)+_0x597c15+'\x20has\x20an\x20unsupported\x20channelType.');const _0x56d655=responseNullableString(_0x26fee3[_0x59c617(0x16a)],_0x59c617(0x16a),_0x597c15),_0x59774e=responseNullableString(_0x26fee3[_0x59c617(0x13d)],'channelConfig',_0x597c15),_0x206c28=responseNullableString(_0x26fee3[_0x59c617(0x19a)],_0x59c617(0x19a),_0x597c15),_0x3c3296=responseNullableTimeout(_0x26fee3[_0x59c617(0x189)],_0x59c617(0x189),_0x597c15),_0x4c24d9=responseNullableTimeout(_0x26fee3[_0x59c617(0x162)],_0x59c617(0x162),_0x597c15);return{'id':_0x597c15,'appCode':_0x251c04,'configCode':_0x4a6484,'configName':_0x1c8a3b,'channelType':_0x14e422,'endpointUrl':redactSensitive(_0x56d655),'channelConfig':redactSensitive(_0x59774e),'description':_0x206c28,'connectTimeout':_0x3c3296,'readTimeout':_0x4c24d9,'endpointUrlRaw':_0x56d655,'channelConfigRaw':_0x59774e};}export async function requireExactNotificationConfig(_0x1f9206,_0x4478c4,_0x28caa2){const _0x3f6161=a197_0x51c5e6;let _0x540574;try{_0x540574=await getNotificationChannelConfig(_0x4478c4,_0x1f9206);}catch{throw safeApiFailure(_0x28caa2,_0x3f6161(0x183),_0x3f6161(0x191)+_0x1f9206+_0x3f6161(0x14e));}return normalizeExactNotificationConfig(_0x540574,_0x4478c4,_0x1f9206);}export function projectNotificationConfig(_0x54b332){const _0x2fbada=a197_0x51c5e6;return{'id':_0x54b332['id']??null,'appCode':_0x54b332[_0x2fbada(0x184)],'configCode':_0x54b332['configCode']??null,'configName':_0x54b332[_0x2fbada(0x1ac)],'channelType':_0x54b332[_0x2fbada(0x17f)],'endpointUrl':redactSensitive(_0x54b332['endpointUrl']),'channelConfig':redactSensitive(_0x54b332[_0x2fbada(0x13d)]),'description':_0x54b332[_0x2fbada(0x19a)]??null,'connectTimeout':_0x54b332['connectTimeout']??null,'readTimeout':_0x54b332['readTimeout']??null};}export function notificationSelector(_0x4b689a){const _0x126a9e=a197_0x51c5e6;return{'appCode':_0x4b689a[_0x126a9e(0x184)],'id':_0x4b689a['id'],'configCode':_0x4b689a[_0x126a9e(0x180)],'configName':_0x4b689a[_0x126a9e(0x1ac)],'channelType':_0x4b689a[_0x126a9e(0x17f)]};}export function createMutationInput(_0xe59177,_0x1be2d1){const _0x3eaf02=a197_0x51c5e6;return{'appCode':_0xe59177,'configName':_0x1be2d1[_0x3eaf02(0x1ac)],'channelType':_0x1be2d1['channelType'],...hasOwn(_0x1be2d1,_0x3eaf02(0x16a))?{'endpointUrl':_0x1be2d1[_0x3eaf02(0x16a)]}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x13d))?{'channelConfig':serializeChannelConfig(_0x1be2d1['channelConfig'])}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x19a))?{'description':_0x1be2d1[_0x3eaf02(0x19a)]}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x189))?{'connectTimeout':_0x1be2d1[_0x3eaf02(0x189)]}:{},...hasOwn(_0x1be2d1,_0x3eaf02(0x162))?{'readTimeout':_0x1be2d1[_0x3eaf02(0x162)]}:{}};}export function mergeUpdateInput(_0x385d00,_0x51deec){const _0x26595e=a197_0x51c5e6;return{'id':_0x385d00['id'],'appCode':_0x385d00['appCode'],'configName':_0x51deec[_0x26595e(0x1ac)]??_0x385d00[_0x26595e(0x1ac)],'channelType':_0x51deec[_0x26595e(0x17f)]??_0x385d00[_0x26595e(0x17f)],'endpointUrl':hasOwn(_0x51deec,_0x26595e(0x16a))?_0x51deec[_0x26595e(0x16a)]:_0x385d00[_0x26595e(0x13a)],'channelConfig':hasOwn(_0x51deec,_0x26595e(0x13d))?serializeChannelConfig(_0x51deec[_0x26595e(0x13d)]):_0x385d00['channelConfigRaw'],'description':hasOwn(_0x51deec,'description')?_0x51deec[_0x26595e(0x19a)]:_0x385d00[_0x26595e(0x19a)],'connectTimeout':hasOwn(_0x51deec,_0x26595e(0x189))?_0x51deec['connectTimeout']:_0x385d00[_0x26595e(0x189)],'readTimeout':hasOwn(_0x51deec,'readTimeout')?_0x51deec[_0x26595e(0x162)]:_0x385d00[_0x26595e(0x162)]};}export function plannedUpdateProjection(_0x249f5a,_0x297f56){const _0x4ae95b=a197_0x51c5e6;return projectNotificationConfig({'id':_0x249f5a['id'],'appCode':_0x249f5a[_0x4ae95b(0x184)],'configCode':_0x249f5a[_0x4ae95b(0x180)],'configName':_0x297f56['configName']??_0x249f5a[_0x4ae95b(0x1ac)],'channelType':_0x297f56[_0x4ae95b(0x17f)]??_0x249f5a[_0x4ae95b(0x17f)],'endpointUrl':hasOwn(_0x297f56,_0x4ae95b(0x16a))?_0x297f56[_0x4ae95b(0x16a)]:_0x249f5a[_0x4ae95b(0x13a)],'channelConfig':hasOwn(_0x297f56,_0x4ae95b(0x13d))?_0x297f56[_0x4ae95b(0x13d)]:_0x249f5a[_0x4ae95b(0x16e)],'description':hasOwn(_0x297f56,_0x4ae95b(0x19a))?_0x297f56['description']:_0x249f5a[_0x4ae95b(0x19a)],'connectTimeout':hasOwn(_0x297f56,_0x4ae95b(0x189))?_0x297f56[_0x4ae95b(0x189)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x249f5a[_0x4ae95b(0x189)],'readTimeout':hasOwn(_0x297f56,_0x4ae95b(0x162))?_0x297f56[_0x4ae95b(0x162)]??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x249f5a[_0x4ae95b(0x162)]});}export function requestedSafeFieldsMatch(_0x5de184,_0x4bb812,_0x41c5c0){const _0x51bcaf=a197_0x51c5e6,_0x5d9c9f=[],_0x3a4aaa=[],_0x1c0d45=[];for(const _0x1f573b of[_0x51bcaf(0x1ac),'channelType',_0x51bcaf(0x19a)]){if(!hasOwn(_0x41c5c0,_0x1f573b))continue;_0x1c0d45['push'](_0x1f573b),_0x5d9c9f[_0x51bcaf(0x149)](_0x4bb812[_0x1f573b]===_0x41c5c0[_0x1f573b]),_0x3a4aaa['push'](_0x5de184[_0x1f573b]!==_0x41c5c0[_0x1f573b]&&_0x4bb812[_0x1f573b]===_0x41c5c0[_0x1f573b]);}for(const _0x52dd23 of[_0x51bcaf(0x189),_0x51bcaf(0x162)]){if(!hasOwn(_0x41c5c0,_0x52dd23))continue;const _0x5d5df7=_0x41c5c0[_0x52dd23]??(_0x52dd23===_0x51bcaf(0x189)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x1c0d45[_0x51bcaf(0x149)](_0x52dd23),_0x5d9c9f['push'](_0x4bb812[_0x52dd23]===_0x5d5df7),_0x3a4aaa[_0x51bcaf(0x149)](_0x5de184[_0x52dd23]!==_0x5d5df7&&_0x4bb812[_0x52dd23]===_0x5d5df7);}return hasOwn(_0x41c5c0,_0x51bcaf(0x16a))&&_0x41c5c0[_0x51bcaf(0x16a)]===null&&(_0x1c0d45['push'](_0x51bcaf(0x190)),_0x5d9c9f['push'](_0x4bb812[_0x51bcaf(0x13a)]===null||_0x4bb812['endpointUrlRaw']===''),_0x3a4aaa[_0x51bcaf(0x149)](_0x5de184[_0x51bcaf(0x13a)]!==null&&_0x5de184['endpointUrlRaw']!==''&&(_0x4bb812['endpointUrlRaw']===null||_0x4bb812[_0x51bcaf(0x13a)]===''))),{'allMatch':_0x5d9c9f[_0x51bcaf(0x14a)](Boolean),'provesChange':_0x3a4aaa['some'](Boolean),'verifiedFields':_0x1c0d45};}export function validateNotificationDeleteReadback(_0x3ce576,_0x5945e9,_0x5275bf){const _0xef321d=a197_0x51c5e6;for(const [_0x444cae,_0x17ae58]of _0x3ce576[_0xef321d(0x19d)]()){if(!Number[_0xef321d(0x192)](_0x17ae58['id'])||_0x17ae58['id']<=0x0)throw notificationError(_0xef321d(0x16f),_0xef321d(0x15b)+(_0x444cae+0x1)+'\x20has\x20an\x20invalid\x20id.');if(_0x17ae58['appCode']!==_0x5945e9)throw notificationError(_0xef321d(0x16f),_0xef321d(0x15b)+(_0x444cae+0x1)+'\x20has\x20an\x20invalid\x20appCode.');if(_0x17ae58['channelType']!==_0x5275bf)throw notificationError(_0xef321d(0x16f),_0xef321d(0x15b)+(_0x444cae+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x57dc4a,_0x5855ca,_0xf5dc64){const _0x207cc5=a197_0x51c5e6;return notificationError(_0x207cc5(0x178)+_0x57dc4a+'_'+(_0x5855ca==='mutation'?_0x207cc5(0x1aa):_0x5855ca+_0x207cc5(0x19e)),_0x207cc5(0x1ab)+_0x57dc4a+'\x20'+_0x5855ca+'\x20failed.',_0xf5dc64);}export function notificationLookupCommand(_0x28dd42,_0x2858e9){const _0x160e3a=a197_0x51c5e6;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x28dd42+_0x160e3a(0x15e)+_0x2858e9+'\x20--format\x20compress';}function validateNotificationDocument(_0x3e73cb,_0x5e28a8){const _0x59b470=a197_0x51c5e6;for(const _0x587759 of Object[_0x59b470(0x18b)](_0x3e73cb)){if(FORBIDDEN_IDENTITY_FIELDS['has'](_0x587759))throw notificationError(_0x59b470(0x14b),_0x59b470(0x14c)+_0x587759+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x59b470(0x155)](_0x587759))throw notificationError('notification_config_field_unknown',_0x59b470(0x13c)+_0x587759+'\x22.');}if(_0x5e28a8===_0x59b470(0x156)&&Object[_0x59b470(0x18b)](_0x3e73cb)[_0x59b470(0x157)]===0x0)throw notificationError(_0x59b470(0x1a5),_0x59b470(0x153));const _0x3e72c9={};if(hasOwn(_0x3e73cb,_0x59b470(0x1ac)))_0x3e72c9[_0x59b470(0x1ac)]=validateRequiredString(_0x3e73cb['configName'],_0x59b470(0x1ac),0x80);else{if(_0x5e28a8===_0x59b470(0x1b4))throw notificationError(_0x59b470(0x1a6),_0x59b470(0x197)+'\x22configName\x22.');}if(hasOwn(_0x3e73cb,_0x59b470(0x17f))){if(typeof _0x3e73cb['channelType']!=='string')throw invalidFieldType(_0x59b470(0x17f),_0x59b470(0x196));const _0x6358bf=_0x3e73cb[_0x59b470(0x17f)][_0x59b470(0x16d)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x59b470(0x159)](_0x6358bf))throw notificationError('notification_config_field_invalid',_0x59b470(0x181),_0x59b470(0x179)+NOTIFICATION_CHANNEL_TYPES[_0x59b470(0x195)](',\x20')+'.');_0x3e72c9[_0x59b470(0x17f)]=_0x6358bf;}else{if(_0x5e28a8===_0x59b470(0x1b4))throw notificationError('notification_config_field_required',_0x59b470(0x197)+_0x59b470(0x182));}for(const [_0x35a93e,_0x2f7386]of[['endpointUrl',0x200],[_0x59b470(0x19a),0x100]]){if(!hasOwn(_0x3e73cb,_0x35a93e))continue;const _0x22cba7=_0x3e73cb[_0x35a93e];if(_0x22cba7!==null&&typeof _0x22cba7!==_0x59b470(0x1b0))throw invalidFieldType(_0x35a93e,'a\x20string\x20or\x20null');if(typeof _0x22cba7===_0x59b470(0x1b0)&&_0x22cba7['length']>_0x2f7386)throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x35a93e+_0x59b470(0x19f)+_0x2f7386+'\x20characters.');_0x3e72c9[_0x35a93e]=_0x22cba7;}if(hasOwn(_0x3e73cb,'channelConfig')){const _0x53a4b6=_0x3e73cb['channelConfig'];if(_0x53a4b6===null&&_0x5e28a8===_0x59b470(0x1b4))throw invalidFieldType(_0x59b470(0x13d),_0x59b470(0x17b));if(_0x53a4b6!==null&&!isJsonObject(_0x53a4b6))throw invalidFieldType(_0x59b470(0x13d),_0x5e28a8===_0x59b470(0x156)?_0x59b470(0x18e):_0x59b470(0x17b));_0x53a4b6!==null&&validateChannelConfigFields(_0x3e72c9[_0x59b470(0x17f)],_0x53a4b6),_0x3e72c9[_0x59b470(0x13d)]=_0x53a4b6;}for(const _0x3c8df4 of['connectTimeout',_0x59b470(0x162)]){if(!hasOwn(_0x3e73cb,_0x3c8df4))continue;const _0x575995=_0x3e73cb[_0x3c8df4];if(_0x575995!==null&&(!Number[_0x59b470(0x192)](_0x575995)||_0x575995<0x0))throw notificationError('notification_config_field_invalid',_0x59b470(0x14c)+_0x3c8df4+_0x59b470(0x194));_0x3e72c9[_0x3c8df4]=_0x575995;}return _0x3e72c9;}function validateRequiredString(_0x344ddf,_0xfe505d,_0x1c8bc2){const _0x516a78=a197_0x51c5e6;if(typeof _0x344ddf!==_0x516a78(0x1b0))throw invalidFieldType(_0xfe505d,'a\x20non-empty\x20string');const _0x35200b=_0x344ddf[_0x516a78(0x16d)]();if(!_0x35200b)throw notificationError(_0x516a78(0x145),_0x516a78(0x14c)+_0xfe505d+_0x516a78(0x17a));if(_0x35200b[_0x516a78(0x157)]>_0x1c8bc2)throw notificationError(_0x516a78(0x145),_0x516a78(0x14c)+_0xfe505d+_0x516a78(0x19f)+_0x1c8bc2+_0x516a78(0x19c));return _0x35200b;}function a197_0x3f48(){const _0x5bfa04=['utf8','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','notification_config_json_invalid','stringify','notification_config_update_empty','notification_config_field_required','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','messageTemplate','296yhcvUk','failed','Notification\x20config\x20','configName','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','apiError','notification_config_id_invalid','string','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','fromName','\x22\x20must\x20be\x20','create','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable','endpointUrlRaw','24425CkSnJW','Unknown\x20notification\x20JSON\x20field\x20\x22','channelConfig','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','str','5219562MqOGAu','dry-run','updateTime','\x20has\x20invalid\x20field\x20\x22','ccList','notification_config_field_invalid','number','path','11ssVwHs','push','every','notification_config_field_forbidden','Notification\x20JSON\x20field\x20\x22','setEncoding','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','bccList','from-env','call','name','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','<redacted>','has','update','length','prototype','includes','Notification\x20JSON\x20from\x20','Notification\x20config\x20list\x20item\x20','3878PvcTZo','object','\x20--type\x20','subjectPrefix','notification_config_confirmation_required','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','readTimeout','8230780wCGQul','FEISHU','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','Notification\x20JSON\x20source\x20is\x20ambiguous.','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20is\x20missing\x20required\x20field\x20\x22','stdin','endpointUrl','17104FYAsBh','2584497vEEhoX','trim','channelConfigRaw','notification_config_response_invalid','replyTo','file\x20','1IvtfYO','375291ymCfoy','DINGTALK','bool','parse','createTime','notification_config_','Allowed\x20values:\x20','\x22\x20must\x20be\x20a\x20non-empty\x20string.','a\x20JSON\x20object','environment\x20variable\x20','513vpgLeh','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','channelType','configCode','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','\x22channelType\x22.','preflight','appCode','WEBHOOK','kind','notification_config_source_unavailable','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','connectTimeout','\x22\x20is\x20forbidden.','keys','type','channelCode','a\x20JSON\x20object\x20or\x20null','file','endpointUrl:null','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','isSafeInteger','EMAIL','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','join','a\x20supported\x20string','Create\x20JSON\x20requires\x20field\x20','env','emailTargets','description','\x20is\x20invalid.','\x20characters.','entries','_unavailable','\x22\x20cannot\x20exceed\x20','notification_config_channel_field_forbidden'];a197_0x3f48=function(){return _0x5bfa04;};return a197_0x3f48();}function validateChannelConfigFields(_0x1c1bcf,_0x492a7c){const _0x236da0=a197_0x51c5e6;if(hasOwn(_0x492a7c,_0x236da0(0x1a8)))throw forbiddenChannelConfigField('messageTemplate');if(_0x1c1bcf===_0x236da0(0x193))for(const _0x3f155d of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x492a7c,_0x3f155d))throw forbiddenChannelConfigField(_0x3f155d);}}function forbiddenChannelConfigField(_0x510932){const _0x48aede=a197_0x51c5e6;return notificationError(_0x48aede(0x1a0),'Notification\x20JSON\x20channelConfig\x20field\x20\x22'+_0x510932+_0x48aede(0x18a));}function invalidFieldType(_0x58cc3d,_0x53d824){const _0x217029=a197_0x51c5e6;return notificationError('notification_config_field_invalid',_0x217029(0x14c)+_0x58cc3d+_0x217029(0x1b3)+_0x53d824+'.');}function serializeChannelConfig(_0x160061){const _0x3410de=a197_0x51c5e6;return _0x160061===null||_0x160061===undefined?null:JSON[_0x3410de(0x1a4)](_0x160061);}function redactSensitive(_0x112a9a){const _0x4d7d34=a197_0x51c5e6;return _0x112a9a===null||_0x112a9a===undefined||_0x112a9a===''?null:_0x4d7d34(0x154);}function requireResponseString(_0x2d3692,_0x72604d,_0x5809ee){const _0x44f2fb=a197_0x51c5e6;if(typeof _0x2d3692!==_0x44f2fb(0x1b0)||_0x2d3692[_0x44f2fb(0x16d)]()==='')throw CliErrors[_0x44f2fb(0x1ae)]('Invalid\x20notification\x20config\x20response.','Item\x20'+(_0x5809ee+0x1)+_0x44f2fb(0x168)+_0x72604d+'\x22.');return _0x2d3692[_0x44f2fb(0x16d)]();}function requireExactString(_0x37c336,_0x43c090,_0x3d21e3){const _0x31924c=a197_0x51c5e6;if(typeof _0x37c336!==_0x31924c(0x1b0)||_0x37c336[_0x31924c(0x16d)]()==='')throw notificationError(_0x31924c(0x16f),_0x31924c(0x1ab)+_0x3d21e3+_0x31924c(0x168)+_0x43c090+'\x22.');return _0x37c336['trim']();}function responseNullableString(_0x2f7ac1,_0x191b43,_0x587885){const _0x1255a5=a197_0x51c5e6;if(_0x2f7ac1===undefined||_0x2f7ac1===null)return null;if(typeof _0x2f7ac1!==_0x1255a5(0x1b0))throw notificationError('notification_config_response_invalid',_0x1255a5(0x1ab)+_0x587885+'\x20has\x20invalid\x20field\x20\x22'+_0x191b43+'\x22.');return _0x2f7ac1;}function responseNullableTimeout(_0xc820d1,_0x1a7c21,_0x586c72){const _0x179522=a197_0x51c5e6;if(_0xc820d1===undefined||_0xc820d1===null)return null;if(!Number[_0x179522(0x192)](_0xc820d1)||_0xc820d1<0x0)throw notificationError(_0x179522(0x16f),_0x179522(0x1ab)+_0x586c72+_0x179522(0x143)+_0x1a7c21+'\x22.');return _0xc820d1;}function normalizeNullableString(_0x5c3807){return typeof _0x5c3807==='string'?_0x5c3807:null;}function isJsonObject(_0xad4bc5){const _0x596d60=a197_0x51c5e6;return _0xad4bc5!==null&&typeof _0xad4bc5===_0x596d60(0x15d)&&!Array['isArray'](_0xad4bc5);}function hasOwn(_0x26518e,_0x3afee5){const _0x28e76e=a197_0x51c5e6;return Object[_0x28e76e(0x158)]['hasOwnProperty'][_0x28e76e(0x151)](_0x26518e,_0x3afee5);}async function readStdin(){const _0x2f0dd1=a197_0x51c5e6;let _0x3b7afb='';process['stdin'][_0x2f0dd1(0x14d)](_0x2f0dd1(0x1a1));for await(const _0x12875f of process[_0x2f0dd1(0x169)])_0x3b7afb+=_0x12875f;return _0x3b7afb;}
@@ -1 +1 @@
1
- const a198_0xd72ddb=a198_0x26ab;(function(_0x33ff5a,_0x42d983){const _0x24eab1=a198_0x26ab,_0x3eb6ec=_0x33ff5a();while(!![]){try{const _0x155e68=-parseInt(_0x24eab1(0x1e5))/0x1+-parseInt(_0x24eab1(0x1d1))/0x2+parseInt(_0x24eab1(0x1dc))/0x3+-parseInt(_0x24eab1(0x1cb))/0x4*(-parseInt(_0x24eab1(0x1de))/0x5)+-parseInt(_0x24eab1(0x1c4))/0x6+-parseInt(_0x24eab1(0x1c6))/0x7*(-parseInt(_0x24eab1(0x1e9))/0x8)+parseInt(_0x24eab1(0x1d7))/0x9;if(_0x155e68===_0x42d983)break;else _0x3eb6ec['push'](_0x3eb6ec['shift']());}catch(_0x1b47df){_0x3eb6ec['push'](_0x3eb6ec['shift']());}}}(a198_0x3fe4,0xd3606));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=[a198_0xd72ddb(0x1f4),a198_0xd72ddb(0x1da),'form',a198_0xd72ddb(0x1e6)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a198_0xd72ddb(0x1cc),'form':a198_0xd72ddb(0x1db),'idCard':a198_0xd72ddb(0x1f5)},SCENE_FLAG={'name':a198_0xd72ddb(0x1c2),'type':a198_0xd72ddb(0x1d0),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0xd72ddb(0x1f2)},IMAGE_FILE_FLAG={'name':a198_0xd72ddb(0x1c9),'type':a198_0xd72ddb(0x1d0),'description':a198_0xd72ddb(0x1cf)},IMAGE_URL_FLAG={'name':'image-url','type':'string','description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0xb3b609){const _0x6e445d=a198_0xd72ddb,_0x57480f=_0xb3b609[_0x6e445d(0x1d6)]()[_0x6e445d(0x1d3)]();if(_0x57480f==='idcard')return _0x6e445d(0x1e6);if(_0x57480f===_0x6e445d(0x1f4)||_0x57480f===_0x6e445d(0x1da)||_0x57480f===_0x6e445d(0x1ef))return _0x57480f;throw CliErrors[_0x6e445d(0x1e4)](_0x6e445d(0x1f1)+_0xb3b609+_0x6e445d(0x1ea)+SUPPORTED_SCENES[_0x6e445d(0x1eb)](',\x20'));}function a198_0x3fe4(){const _0x2bf3d7=['filePath','toLowerCase','/smartapi/common/uploadFile','recognize','trim','1582767XUYGMG','File\x20URL\x20response\x20missing\x20fileUrl.','filter','general','Table','3742347ITNNZo','fileUrl','1465kVFuly','ocr','File\x20upload\x20response\x20missing\x20filePath.','path','/smartapi/ocr/recognize-text','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','validation','761297jBuKmB','idCard','Preview:\x20recognize\x20','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','607864uURlTi','.\x20Supported\x20scenes:\x20','join','/smartapi/ocr/recognize-text?','apiError','imageFile','form','GET','Unsupported\x20OCR\x20scene:\x20','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','POST','invoice','IdCard','fileName','imageUrl','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','scene','toString','617046DUhVal','appCode','14bylhlf','length','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','image-file','str','22444ZedkXv','General','image-url','\x20OCR','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','string','2978730aNHDIo'];a198_0x3fe4=function(){return _0x2bf3d7;};return a198_0x3fe4();}function a198_0x26ab(_0x550c32,_0x1c9ca8){_0x550c32=_0x550c32-0x1c2;const _0x3fe48b=a198_0x3fe4();let _0x26abac=_0x3fe48b[_0x550c32];return _0x26abac;}function selectedInputs(_0x3aea16){const _0x49375e=a198_0xd72ddb,_0x1f6c30=_0x3aea16[_0x49375e(0x1ca)](_0x49375e(0x1c9))[_0x49375e(0x1d6)](),_0x135ee2=_0x3aea16[_0x49375e(0x1ca)](_0x49375e(0x1cd))['trim']();return{'imageFile':_0x1f6c30,'imageUrl':_0x135ee2,'count':[_0x1f6c30,_0x135ee2][_0x49375e(0x1d9)](Boolean)[_0x49375e(0x1c7)]};}function validateInputSelection(_0x139aea){const _0x45125f=a198_0xd72ddb,_0x3987ca=selectedInputs(_0x139aea);if(_0x3987ca['count']!==0x1)throw CliErrors['validation'](_0x45125f(0x1e3));return _0x3987ca;}function withScene(_0x53eb62,_0x352a9c,_0x70fc6d){const _0x3791da=a198_0xd72ddb;return{..._0x53eb62,'scene':_0x352a9c,..._0x70fc6d?{'sourceFile':{'fileName':_0x70fc6d[_0x3791da(0x1f6)],'filePath':_0x70fc6d[_0x3791da(0x1d2)]}}:{}};}const ocrRecognize={'service':a198_0xd72ddb(0x1df),'command':a198_0xd72ddb(0x1d5),'description':a198_0xd72ddb(0x1c8),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3650af){const _0xe74f14=a198_0xd72ddb,_0xedc24d=normalizeScene(_0x3650af[_0xe74f14(0x1ca)](_0xe74f14(0x1c2))),_0x2339de=SCENE_TO_LEGACY_TYPE[_0xedc24d],_0x4b52d4=validateInputSelection(_0x3650af);if(_0x4b52d4[_0xe74f14(0x1f7)]){const _0xdf6f6f=new URLSearchParams({'url':_0x4b52d4['imageUrl'],'type':_0x2339de,'appCode':_0x3650af[_0xe74f14(0x1c5)]});return{'method':'GET','url':_0xe74f14(0x1ec)+_0xdf6f6f[_0xe74f14(0x1c3)](),'description':_0xe74f14(0x1e7)+_0xedc24d+'\x20OCR\x20from\x20URL'};}const _0x1c3980=requireDevelopmentUploadFile(_0x4b52d4['imageFile'],_0xe74f14(0x1c9));return{'method':_0xe74f14(0x1f3),'url':_0xe74f14(0x1d4),'body':{'steps':[{'method':_0xe74f14(0x1f3),'url':_0xe74f14(0x1d4),'body':{'appCode':_0x3650af['appCode'],'multipart':{'file':_0x1c3980}}},{'method':_0xe74f14(0x1f3),'url':'/smartapi/common/queryFileUrl','body':{'filePath':_0xe74f14(0x1e8),'downloadFlag':![]}},{'method':_0xe74f14(0x1f0),'url':_0xe74f14(0x1e2),'query':{'appCode':_0x3650af[_0xe74f14(0x1c5)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2339de}}]},'description':_0xe74f14(0x1f8)+_0xedc24d+_0xe74f14(0x1ce)};},async 'execute'(_0xdf4ad3){const _0x3cfc91=a198_0xd72ddb,_0x560d94=normalizeScene(_0xdf4ad3[_0x3cfc91(0x1ca)](_0x3cfc91(0x1c2))),_0x5e3c77=SCENE_TO_LEGACY_TYPE[_0x560d94],_0x2ac2c5=validateInputSelection(_0xdf4ad3);if(_0x2ac2c5['imageUrl']){const _0x381413=await recognizeDevelopmentOcr(_0xdf4ad3[_0x3cfc91(0x1c5)],{'url':_0x2ac2c5[_0x3cfc91(0x1f7)],'type':_0x5e3c77});return{'ok':!![],'data':withScene(_0x381413,_0x560d94)};}const _0xecda31=requireDevelopmentUploadFile(_0x2ac2c5[_0x3cfc91(0x1ee)],'image-file'),_0x5dbfb1=await uploadDevelopmentFile(_0xdf4ad3['appCode'],_0xecda31[_0x3cfc91(0x1e1)]);if(!_0x5dbfb1[_0x3cfc91(0x1d2)])throw CliErrors[_0x3cfc91(0x1ed)](_0x3cfc91(0x1e0));const _0x484eaa=await queryDevelopmentFileUrl(_0x5dbfb1[_0x3cfc91(0x1d2)],{'download':![]});if(!_0x484eaa[_0x3cfc91(0x1dd)])throw CliErrors[_0x3cfc91(0x1ed)](_0x3cfc91(0x1d8));const _0x59fec8=await recognizeDevelopmentOcr(_0xdf4ad3[_0x3cfc91(0x1c5)],{'url':_0x484eaa[_0x3cfc91(0x1dd)],'type':_0x5e3c77});return{'ok':!![],'data':withScene(_0x59fec8,_0x560d94,_0x5dbfb1)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a198_0x354c86=a198_0x4c56;(function(_0x5e76d4,_0x5e77e7){const _0xa6506f=a198_0x4c56,_0x61195f=_0x5e76d4();while(!![]){try{const _0x50221f=parseInt(_0xa6506f(0x10b))/0x1+parseInt(_0xa6506f(0x112))/0x2+parseInt(_0xa6506f(0x108))/0x3*(-parseInt(_0xa6506f(0xec))/0x4)+-parseInt(_0xa6506f(0x11a))/0x5+parseInt(_0xa6506f(0xfa))/0x6+-parseInt(_0xa6506f(0xf4))/0x7*(-parseInt(_0xa6506f(0xee))/0x8)+parseInt(_0xa6506f(0x102))/0x9*(parseInt(_0xa6506f(0x11c))/0xa);if(_0x50221f===_0x5e77e7)break;else _0x61195f['push'](_0x61195f['shift']());}catch(_0x3a938c){_0x61195f['push'](_0x61195f['shift']());}}}(a198_0x39e0,0xc965c));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a198_0x39e0(){const _0x27b68c=['Invoice','image-url','filter','Publicly\x20accessible\x20image\x20or\x20file\x20URL','824682VRWuIy','Unsupported\x20OCR\x20scene:\x20','scene','appCode','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','File\x20upload\x20response\x20missing\x20filePath.','fileUrl','image-file','7982400ZcmXkx','filePath','999730MHGfjD','recognize','/smartapi/ocr/recognize-text','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','toLowerCase','1864glLKDf','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','24ZLgbTS','General','Table','IdCard','idcard','/smartapi/common/queryFileUrl','885717JOrBKP','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','str','apiError','ocr','File\x20URL\x20response\x20missing\x20fileUrl.','3622896CtAJez','/smartapi/ocr/recognize-text?','GET','general','string','join','imageUrl','toString','45eKgytr','form','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','read','trim','invoice','2559VJzLQR','POST','fileName','923287SEDYbE','validation','Preview:\x20recognize\x20'];a198_0x39e0=function(){return _0x27b68c;};return a198_0x39e0();}import{CliErrors}from'../../errors.js';function a198_0x4c56(_0x443cd1,_0x2eb73c){_0x443cd1=_0x443cd1-0xe9;const _0x39e05f=a198_0x39e0();let _0x4c567c=_0x39e05f[_0x443cd1];return _0x4c567c;}const SUPPORTED_SCENES=['invoice',a198_0x354c86(0xfd),'form','idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a198_0x354c86(0x10e),'general':a198_0x354c86(0xef),'form':a198_0x354c86(0xf0),'idCard':a198_0x354c86(0xf1)},SCENE_FLAG={'name':a198_0x354c86(0x114),'type':a198_0x354c86(0xfe),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a198_0x354c86(0xf5)},IMAGE_FILE_FLAG={'name':a198_0x354c86(0x119),'type':a198_0x354c86(0xfe),'description':a198_0x354c86(0x116)},IMAGE_URL_FLAG={'name':a198_0x354c86(0x10f),'type':a198_0x354c86(0xfe),'description':a198_0x354c86(0x111)};function normalizeScene(_0x450e3f){const _0x4f5c58=a198_0x354c86,_0x375d70=_0x450e3f['trim']()[_0x4f5c58(0xeb)]();if(_0x375d70===_0x4f5c58(0xf2))return'idCard';if(_0x375d70===_0x4f5c58(0x107)||_0x375d70===_0x4f5c58(0xfd)||_0x375d70===_0x4f5c58(0x103))return _0x375d70;throw CliErrors[_0x4f5c58(0x10c)](_0x4f5c58(0x113)+_0x450e3f+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x4f5c58(0xff)](',\x20'));}function selectedInputs(_0x35591b){const _0x823614=a198_0x354c86,_0x150fec=_0x35591b[_0x823614(0xf6)](_0x823614(0x119))[_0x823614(0x106)](),_0xdfaf9=_0x35591b[_0x823614(0xf6)](_0x823614(0x10f))['trim']();return{'imageFile':_0x150fec,'imageUrl':_0xdfaf9,'count':[_0x150fec,_0xdfaf9][_0x823614(0x110)](Boolean)['length']};}function validateInputSelection(_0x3a26a3){const _0x31dfa3=a198_0x354c86,_0x3f48f3=selectedInputs(_0x3a26a3);if(_0x3f48f3['count']!==0x1)throw CliErrors[_0x31dfa3(0x10c)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x3f48f3;}function withScene(_0xc672d2,_0x2e2ba0,_0xed6bda){const _0xdc1b99=a198_0x354c86;return{..._0xc672d2,'scene':_0x2e2ba0,..._0xed6bda?{'sourceFile':{'fileName':_0xed6bda[_0xdc1b99(0x10a)],'filePath':_0xed6bda[_0xdc1b99(0x11b)]}}:{}};}const ocrRecognize={'service':a198_0x354c86(0xf8),'command':a198_0x354c86(0x11d),'description':a198_0x354c86(0x104),'risk':a198_0x354c86(0x105),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x216a89){const _0x35e410=a198_0x354c86,_0x959b37=normalizeScene(_0x216a89[_0x35e410(0xf6)](_0x35e410(0x114))),_0x2df831=SCENE_TO_LEGACY_TYPE[_0x959b37],_0x864804=validateInputSelection(_0x216a89);if(_0x864804[_0x35e410(0x100)]){const _0xbe9e93=new URLSearchParams({'url':_0x864804[_0x35e410(0x100)],'type':_0x2df831,'appCode':_0x216a89[_0x35e410(0x115)]});return{'method':_0x35e410(0xfc),'url':_0x35e410(0xfb)+_0xbe9e93[_0x35e410(0x101)](),'description':_0x35e410(0x10d)+_0x959b37+'\x20OCR\x20from\x20URL'};}const _0x485584=requireDevelopmentUploadFile(_0x864804['imageFile'],'image-file');return{'method':_0x35e410(0x109),'url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x35e410(0x109),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x216a89[_0x35e410(0x115)],'multipart':{'file':_0x485584}}},{'method':_0x35e410(0x109),'url':_0x35e410(0xf3),'body':{'filePath':_0x35e410(0xed),'downloadFlag':![]}},{'method':_0x35e410(0xfc),'url':_0x35e410(0xe9),'query':{'appCode':_0x216a89[_0x35e410(0x115)],'url':_0x35e410(0xea),'type':_0x2df831}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x959b37+'\x20OCR'};},async 'execute'(_0x87eb7b){const _0x129135=a198_0x354c86,_0x59a63c=normalizeScene(_0x87eb7b['str']('scene')),_0x49ccc2=SCENE_TO_LEGACY_TYPE[_0x59a63c],_0x5a915c=validateInputSelection(_0x87eb7b);if(_0x5a915c[_0x129135(0x100)]){const _0x2a0af=await recognizeDevelopmentOcr(_0x87eb7b[_0x129135(0x115)],{'url':_0x5a915c['imageUrl'],'type':_0x49ccc2});return{'ok':!![],'data':withScene(_0x2a0af,_0x59a63c)};}const _0x6b6afe=requireDevelopmentUploadFile(_0x5a915c['imageFile'],_0x129135(0x119)),_0x23efbe=await uploadDevelopmentFile(_0x87eb7b[_0x129135(0x115)],_0x6b6afe['path']);if(!_0x23efbe[_0x129135(0x11b)])throw CliErrors['apiError'](_0x129135(0x117));const _0x4742b4=await queryDevelopmentFileUrl(_0x23efbe[_0x129135(0x11b)],{'download':![]});if(!_0x4742b4[_0x129135(0x118)])throw CliErrors[_0x129135(0xf7)](_0x129135(0xf9));const _0x4927eb=await recognizeDevelopmentOcr(_0x87eb7b[_0x129135(0x115)],{'url':_0x4742b4['fileUrl'],'type':_0x49ccc2});return{'ok':!![],'data':withScene(_0x4927eb,_0x59a63c,_0x23efbe)};}};export const ocrDefinitions=[ocrRecognize];