@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-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 (348) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.d.ts +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.d.ts +2 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/auth/auth-server-ui.js +1 -1
  8. package/lib/auth/auth-server.js +1 -1
  9. package/lib/auth/constant.js +1 -1
  10. package/lib/auth/get-cookie.js +1 -1
  11. package/lib/auth/get-session-user.js +1 -1
  12. package/lib/auth/is-session-valid.js +1 -1
  13. package/lib/auth/login-success-html.js +1 -1
  14. package/lib/auth/logout.js +1 -1
  15. package/lib/cli-flags.js +1 -1
  16. package/lib/cli.js +1 -1
  17. package/lib/commands/api/generate.js +1 -1
  18. package/lib/commands/api/index.js +1 -1
  19. package/lib/commands/api/list.js +1 -1
  20. package/lib/commands/api/pull.js +1 -1
  21. package/lib/commands/api/shared.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/members-list.js +1 -1
  25. package/lib/commands/app/remote-directory.js +1 -1
  26. package/lib/commands/app/shared.js +1 -1
  27. package/lib/commands/app-config/delete.js +1 -1
  28. package/lib/commands/app-config/get.js +1 -1
  29. package/lib/commands/app-config/index.js +1 -1
  30. package/lib/commands/app-config/list.js +1 -1
  31. package/lib/commands/app-config/set.js +1 -1
  32. package/lib/commands/app-config/shared.js +1 -1
  33. package/lib/commands/auth/index.js +1 -1
  34. package/lib/commands/bff/create.js +1 -1
  35. package/lib/commands/bff/delete.js +1 -1
  36. package/lib/commands/bff/detail.js +1 -1
  37. package/lib/commands/bff/index.js +1 -1
  38. package/lib/commands/bff/list.js +1 -1
  39. package/lib/commands/bff/pull.js +1 -1
  40. package/lib/commands/bff/push.js +1 -1
  41. package/lib/commands/bff/status.js +1 -1
  42. package/lib/commands/cli-skill/index.js +1 -1
  43. package/lib/commands/cli-update.js +1 -1
  44. package/lib/commands/codegen/index.js +1 -1
  45. package/lib/commands/codegen/sdk.js +1 -1
  46. package/lib/commands/codegen/sql.js +1 -1
  47. package/lib/commands/common/app-registry.js +1 -1
  48. package/lib/commands/common/app-selector.js +1 -1
  49. package/lib/commands/common/async-task.js +1 -1
  50. package/lib/commands/common/dry-run.js +1 -1
  51. package/lib/commands/common/flags.js +1 -1
  52. package/lib/commands/common/local-file.js +1 -1
  53. package/lib/commands/common/validate.js +1 -1
  54. package/lib/commands/config/delete.js +1 -1
  55. package/lib/commands/config/get.js +1 -1
  56. package/lib/commands/config/index.js +1 -1
  57. package/lib/commands/config/init.js +1 -1
  58. package/lib/commands/config/list.js +1 -1
  59. package/lib/commands/config/set.js +1 -1
  60. package/lib/commands/config/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/business-groups.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-restore.js +1 -1
  68. package/lib/commands/dataset/field-update.js +1 -1
  69. package/lib/commands/dataset/generate.js +1 -1
  70. package/lib/commands/dataset/index.js +1 -1
  71. package/lib/commands/dataset/list.js +1 -1
  72. package/lib/commands/dataset/operations.js +1 -1
  73. package/lib/commands/dataset/relation-audit.js +1 -1
  74. package/lib/commands/dataset/relation-create.js +1 -1
  75. package/lib/commands/dataset/relation-delete.js +1 -1
  76. package/lib/commands/dataset/relation-shared.js +1 -1
  77. package/lib/commands/dataset/relation-update.js +1 -1
  78. package/lib/commands/dataset/relations.js +1 -1
  79. package/lib/commands/dataset/rename.js +1 -1
  80. package/lib/commands/dataset/restore.js +1 -1
  81. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  82. package/lib/commands/db/analysis-batching.js +1 -1
  83. package/lib/commands/db/analyze-batch-plan.js +1 -1
  84. package/lib/commands/db/analyze-cancel.js +1 -1
  85. package/lib/commands/db/analyze-start.js +1 -1
  86. package/lib/commands/db/analyze-status.js +1 -1
  87. package/lib/commands/db/create.js +1 -1
  88. package/lib/commands/db/delete.js +1 -1
  89. package/lib/commands/db/detail.js +1 -1
  90. package/lib/commands/db/diff-refresh-start.js +1 -1
  91. package/lib/commands/db/diff-refresh-status.js +1 -1
  92. package/lib/commands/db/diff.js +1 -1
  93. package/lib/commands/db/index.js +1 -1
  94. package/lib/commands/db/list.js +1 -1
  95. package/lib/commands/db/shared.js +1 -1
  96. package/lib/commands/db/table-diff-shared.js +1 -1
  97. package/lib/commands/db/tables.js +1 -1
  98. package/lib/commands/db/test.js +1 -1
  99. package/lib/commands/db/update.js +1 -1
  100. package/lib/commands/deployment/index.js +1 -1
  101. package/lib/commands/deployment/sync-all.js +1 -1
  102. package/lib/commands/deployment/sync-jobs.js +1 -1
  103. package/lib/commands/deployment/sync-status.js +1 -1
  104. package/lib/commands/doctor.js +1 -1
  105. package/lib/commands/file/index.js +1 -1
  106. package/lib/commands/instant-api-policy/current.js +1 -1
  107. package/lib/commands/instant-api-policy/index.js +1 -1
  108. package/lib/commands/instant-api-policy/init.js +1 -1
  109. package/lib/commands/instant-api-policy/publish.js +1 -1
  110. package/lib/commands/instant-api-policy/pull.js +1 -1
  111. package/lib/commands/instant-api-policy/revision.js +1 -1
  112. package/lib/commands/instant-api-policy/revisions.js +1 -1
  113. package/lib/commands/instant-api-policy/rollback.js +1 -1
  114. package/lib/commands/instant-api-policy/shared.js +1 -1
  115. package/lib/commands/instant-api-policy/validate.js +1 -1
  116. package/lib/commands/issue/index.js +1 -1
  117. package/lib/commands/issue/nudge.js +1 -1
  118. package/lib/commands/issue/report.js +1 -1
  119. package/lib/commands/issue/shared.js +1 -1
  120. package/lib/commands/kb/create.js +1 -1
  121. package/lib/commands/kb/delete.js +1 -1
  122. package/lib/commands/kb/detail.js +1 -1
  123. package/lib/commands/kb/index.js +1 -1
  124. package/lib/commands/kb/list.js +1 -1
  125. package/lib/commands/kb/search.js +1 -1
  126. package/lib/commands/kb/shared.js +1 -1
  127. package/lib/commands/kb/update.js +1 -1
  128. package/lib/commands/logs/index.js +1 -1
  129. package/lib/commands/menu/asset-update.js +1 -1
  130. package/lib/commands/menu/delete.js +1 -1
  131. package/lib/commands/menu/external-link-create.js +1 -1
  132. package/lib/commands/menu/external-link-update.js +1 -1
  133. package/lib/commands/menu/group-create.js +1 -1
  134. package/lib/commands/menu/group-update.js +1 -1
  135. package/lib/commands/menu/index.js +1 -1
  136. package/lib/commands/menu/list.js +1 -1
  137. package/lib/commands/menu/move.js +1 -1
  138. package/lib/commands/menu/regroup-start.js +1 -1
  139. package/lib/commands/menu/rename.js +1 -1
  140. package/lib/commands/menu/shared/compare-table.js +1 -1
  141. package/lib/commands/menu/shared/delete-plan.js +1 -1
  142. package/lib/commands/menu/shared/facts.js +1 -1
  143. package/lib/commands/menu/shared/index.js +1 -1
  144. package/lib/commands/menu/shared/inquirer.js +1 -1
  145. package/lib/commands/menu/shared/local-pages.js +1 -1
  146. package/lib/commands/menu/shared/logic.js +1 -1
  147. package/lib/commands/menu/shared/mutations.js +1 -1
  148. package/lib/commands/menu/shared/service.js +1 -1
  149. package/lib/commands/menu/shared/sync-core.js +1 -1
  150. package/lib/commands/menu/shared/update-core.js +1 -1
  151. package/lib/commands/menu/shared/valid-url.js +1 -1
  152. package/lib/commands/menu/sync.js +1 -1
  153. package/lib/commands/menu/visibility-update.js +1 -1
  154. package/lib/commands/notification/config-create.js +1 -1
  155. package/lib/commands/notification/config-delete.js +1 -1
  156. package/lib/commands/notification/config-list.js +1 -1
  157. package/lib/commands/notification/config-update.js +1 -1
  158. package/lib/commands/notification/index.js +1 -1
  159. package/lib/commands/notification/shared.js +1 -1
  160. package/lib/commands/ocr/index.js +1 -1
  161. package/lib/commands/page/create.js +1 -1
  162. package/lib/commands/page/custom/detail.js +1 -1
  163. package/lib/commands/page/custom/list.js +1 -1
  164. package/lib/commands/page/custom/publish.js +1 -1
  165. package/lib/commands/page/custom/shared.js +1 -1
  166. package/lib/commands/page/custom/syntax.js +1 -1
  167. package/lib/commands/page/custom/update.js +1 -1
  168. package/lib/commands/page/data-list-status.js +1 -1
  169. package/lib/commands/page/generate-start.js +1 -1
  170. package/lib/commands/page/generate-status.js +1 -1
  171. package/lib/commands/page/index.js +1 -1
  172. package/lib/commands/page/pull.js +1 -1
  173. package/lib/commands/page/push.js +1 -1
  174. package/lib/commands/page/relation-audit.js +1 -1
  175. package/lib/commands/page/restore.js +1 -1
  176. package/lib/commands/page/shared.js +1 -1
  177. package/lib/commands/page/sync.js +1 -1
  178. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  179. package/lib/commands/project/create/format-elapsed.js +1 -1
  180. package/lib/commands/project/create/main.js +1 -1
  181. package/lib/commands/project/create/materialize-project-template.js +1 -1
  182. package/lib/commands/project/create/project-name.js +1 -1
  183. package/lib/commands/project/create/project-template-archive.js +1 -1
  184. package/lib/commands/project/create/project-template-path.js +1 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/domain-routing-sync.js +1 -1
  189. package/lib/commands/project/index.js +1 -1
  190. package/lib/commands/project/upgrade.js +1 -1
  191. package/lib/commands/registry.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/rule/get.js +1 -1
  202. package/lib/commands/rule/index.js +1 -1
  203. package/lib/commands/rule/list.js +1 -1
  204. package/lib/commands/rule/set.js +1 -1
  205. package/lib/commands/rule/shared.js +1 -1
  206. package/lib/commands/run/index.js +1 -1
  207. package/lib/commands/schema.js +1 -1
  208. package/lib/commands/sql/create.js +1 -1
  209. package/lib/commands/sql/delete.js +1 -1
  210. package/lib/commands/sql/detail.js +1 -1
  211. package/lib/commands/sql/exec.js +1 -1
  212. package/lib/commands/sql/index.js +1 -1
  213. package/lib/commands/sql/list.js +1 -1
  214. package/lib/commands/sql/pull.js +1 -1
  215. package/lib/commands/sql/push.js +1 -1
  216. package/lib/commands/sql/shared.js +1 -1
  217. package/lib/commands/sql/status.js +1 -1
  218. package/lib/commands/sql/validate.js +1 -1
  219. package/lib/commands/task/index.js +1 -1
  220. package/lib/commands/task/status.js +1 -1
  221. package/lib/commands/tenant/index.js +1 -1
  222. package/lib/commands/tenant/members-list.js +1 -1
  223. package/lib/commands/tenant/shared.js +1 -1
  224. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  225. package/lib/commands/user-account/index.js +1 -1
  226. package/lib/commands/workspace/add.js +1 -1
  227. package/lib/commands/workspace/index.js +1 -1
  228. package/lib/commands/workspace/remove.js +1 -1
  229. package/lib/config/domain-config.js +1 -1
  230. package/lib/config/project-domain-routing.js +1 -1
  231. package/lib/config/region-config.d.ts +23 -0
  232. package/lib/config/region-config.js +1 -0
  233. package/lib/config/schema.d.ts +15 -0
  234. package/lib/config/schema.js +1 -1
  235. package/lib/constant/cdn.js +1 -1
  236. package/lib/constant/cli.js +1 -1
  237. package/lib/constant/defaults.js +1 -1
  238. package/lib/constant/domain.js +1 -1
  239. package/lib/constant/env.js +1 -1
  240. package/lib/constant/output.js +1 -1
  241. package/lib/constant/paths.js +1 -1
  242. package/lib/constant/region.js +1 -1
  243. package/lib/constant/risk.js +1 -1
  244. package/lib/constant/routing-profile.js +1 -1
  245. package/lib/context/app-resolver.d.ts +6 -0
  246. package/lib/context/app-resolver.js +1 -1
  247. package/lib/context/auth-resolver.js +1 -1
  248. package/lib/context/config-loader.js +1 -1
  249. package/lib/context.d.ts +13 -0
  250. package/lib/context.js +1 -1
  251. package/lib/core/alias-resolver.js +1 -1
  252. package/lib/core/api-client.d.ts +2 -0
  253. package/lib/core/api-client.js +1 -1
  254. package/lib/core/bff/config.js +1 -1
  255. package/lib/core/bff/file-system.js +1 -1
  256. package/lib/core/bff/hash.js +1 -1
  257. package/lib/core/bff/lock.js +1 -1
  258. package/lib/core/bff/utils.js +1 -1
  259. package/lib/core/db-resolver.js +1 -1
  260. package/lib/core/instant-api-policy/config.js +1 -1
  261. package/lib/core/kb-search-client.js +1 -1
  262. package/lib/core/page/file-system.js +1 -1
  263. package/lib/core/page/hash.js +1 -1
  264. package/lib/core/page/lock.js +1 -1
  265. package/lib/core/page/lr-smart-jsx.d.ts +6 -0
  266. package/lib/core/page/lr-smart-jsx.js +1 -0
  267. package/lib/core/sql-index-auditor.js +1 -1
  268. package/lib/core/sql-sync/config.js +1 -1
  269. package/lib/core/sql-sync/file-system.js +1 -1
  270. package/lib/core/sql-sync/hash.js +1 -1
  271. package/lib/core/sql-sync/lock.js +1 -1
  272. package/lib/core/sql-sync/utils.js +1 -1
  273. package/lib/core/sql-validator.js +1 -1
  274. package/lib/errors.js +1 -1
  275. package/lib/framework/build-all-flags.js +1 -1
  276. package/lib/framework/error-output.js +1 -1
  277. package/lib/framework/explicit-yes.js +1 -1
  278. package/lib/framework/flags.js +1 -1
  279. package/lib/framework/help.js +1 -1
  280. package/lib/framework/index.js +1 -1
  281. package/lib/framework/output.js +1 -1
  282. package/lib/framework/response.js +1 -1
  283. package/lib/framework/runner-alias.js +1 -1
  284. package/lib/framework/runner.js +1 -1
  285. package/lib/framework/schema-export.js +1 -1
  286. package/lib/framework/supported-flags.js +1 -1
  287. package/lib/framework/types.js +1 -1
  288. package/lib/generated/build-info.d.ts +4 -4
  289. package/lib/generated/build-info.js +1 -1
  290. package/lib/generated/official-routing.js +1 -1
  291. package/lib/generated/routing-contract.js +1 -1
  292. package/lib/help.js +1 -1
  293. package/lib/postinstall.js +1 -1
  294. package/lib/runtime/confirmation.js +1 -1
  295. package/lib/runtime/event.js +1 -1
  296. package/lib/runtime/index.js +1 -1
  297. package/lib/runtime/queue.js +1 -1
  298. package/lib/runtime/resolve.js +1 -1
  299. package/lib/skills/builtin-skill.js +1 -1
  300. package/lib/skills/main.js +1 -1
  301. package/lib/skills/npx-skills-add.js +1 -1
  302. package/lib/skills/skill-presence.js +1 -1
  303. package/lib/telemetry/cli-command-trace.js +1 -1
  304. package/lib/telemetry/cli-help-trace.js +1 -1
  305. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  306. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  307. package/lib/telemetry/send-cli-trace-log.js +1 -1
  308. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  309. package/lib/types/index.d.ts +1 -1
  310. package/lib/utils/ai_config.js +1 -1
  311. package/lib/utils/apply-jq-filter.js +1 -1
  312. package/lib/utils/cdn-config.js +1 -1
  313. package/lib/utils/check-sdk-version.js +1 -1
  314. package/lib/utils/cli-version-check.js +1 -1
  315. package/lib/utils/cli-version-policy.js +1 -1
  316. package/lib/utils/config.d.ts +2 -8
  317. package/lib/utils/config.js +1 -1
  318. package/lib/utils/entity-with-id.js +1 -1
  319. package/lib/utils/file-utils.js +1 -1
  320. package/lib/utils/guides-cdn.js +1 -1
  321. package/lib/utils/http-client.js +1 -1
  322. package/lib/utils/is-non-interactive.js +1 -1
  323. package/lib/utils/logger.js +1 -1
  324. package/lib/utils/params.js +1 -1
  325. package/lib/utils/platform.js +1 -1
  326. package/lib/utils/sleep.js +1 -1
  327. package/lib/utils/template-replacer.d.ts +2 -1
  328. package/lib/utils/template-replacer.js +1 -1
  329. package/lib/utils/update-notice.js +1 -1
  330. package/lib/utils/version.js +1 -1
  331. package/lib/utils/with-active-cookie.js +1 -1
  332. package/lib/utils/write-cli-side-channel.js +1 -1
  333. package/package.json +1 -1
  334. package/skills/rabetbase/SKILL.md +6 -5
  335. package/skills/rabetbase/guides/page-development-workflow.md +3 -0
  336. package/skills/rabetbase/guides/sdk-client-generation.md +5 -5
  337. package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
  338. package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
  339. package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
  340. package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-bff-pull.md +2 -0
  342. package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
  343. package/skills/rabetbase/references/rabetbase-config.md +10 -9
  344. package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
  345. package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
  346. package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
  347. package/skills/rabetbase.manifest.json +3 -3
  348. package/templates/generate-api/client.ts.tpl +1 -1
@@ -1 +1 @@
1
- const a157_0x43d0bd=a157_0x3e62;(function(_0x4eaa10,_0x59f345){const _0x5a0650=a157_0x3e62,_0x2065e6=_0x4eaa10();while(!![]){try{const _0x290249=-parseInt(_0x5a0650(0x117))/0x1+parseInt(_0x5a0650(0x160))/0x2*(parseInt(_0x5a0650(0xf6))/0x3)+parseInt(_0x5a0650(0xfc))/0x4*(-parseInt(_0x5a0650(0x128))/0x5)+parseInt(_0x5a0650(0xfe))/0x6+parseInt(_0x5a0650(0x15b))/0x7*(parseInt(_0x5a0650(0x14c))/0x8)+parseInt(_0x5a0650(0x166))/0x9+-parseInt(_0x5a0650(0x131))/0xa;if(_0x290249===_0x59f345)break;else _0x2065e6['push'](_0x2065e6['shift']());}catch(_0x4518f6){_0x2065e6['push'](_0x2065e6['shift']());}}}(a157_0x2cbc,0xd1d03));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL','FEISHU',a157_0x43d0bd(0xf3),a157_0x43d0bd(0xf8),a157_0x43d0bd(0x14f)];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set([a157_0x43d0bd(0x134),'channelType',a157_0x43d0bd(0xfb),'channelConfig','description',a157_0x43d0bd(0xf0),a157_0x43d0bd(0x13b)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id',a157_0x43d0bd(0x168),a157_0x43d0bd(0x15d),'channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x43d0bd(0x109),a157_0x43d0bd(0x151),a157_0x43d0bd(0x142),a157_0x43d0bd(0x14a),a157_0x43d0bd(0x16b),a157_0x43d0bd(0xee),a157_0x43d0bd(0x169),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x43d0bd(0x108),'type':a157_0x43d0bd(0x10b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file'},{'name':'stdin','type':a157_0x43d0bd(0x156),'required':![],'default':![],'description':a157_0x43d0bd(0x140)},{'name':a157_0x43d0bd(0x10a),'type':a157_0x43d0bd(0x10b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x43d0bd(0x100),'required':!![],'description':a157_0x43d0bd(0x126)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x3ee723,_0x43bea4,_0x4d7ccc){return new CliError(_0x3ee723,0x1,_0x43bea4,_0x4d7ccc);}export function readNotificationId(_0x5f01cc){const _0xd9eb6c=a157_0x43d0bd,_0x58643d=_0x5f01cc['num']('id');if(!Number[_0xd9eb6c(0x139)](_0x58643d)||_0x58643d<=0x0)throw notificationError('notification_config_id_invalid',_0xd9eb6c(0x106));return _0x58643d;}export function requireNotificationExplicitYes(_0x2974e7){const _0x4d6b6d=a157_0x43d0bd;if(_0x2974e7[_0x4d6b6d(0x144)](_0x4d6b6d(0x104))||_0x2974e7[_0x4d6b6d(0x144)](_0x4d6b6d(0x10f)))return;throw notificationError('notification_config_confirmation_required',_0x4d6b6d(0x136),_0x4d6b6d(0x145));}export function readNotificationChannelType(_0x45d0dc,_0x15ea5c='type',_0x2a6520=a157_0x43d0bd(0x12f)){const _0x3f437f=a157_0x43d0bd,_0x1016db=_0x45d0dc[_0x3f437f(0x152)](_0x15ea5c)['trim']()||_0x2a6520;if(!NOTIFICATION_CHANNEL_TYPES[_0x3f437f(0x10e)](_0x1016db))throw CliErrors[_0x3f437f(0x15c)](_0x3f437f(0x13f)+_0x15ea5c+':\x20'+_0x1016db,_0x3f437f(0x127)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');return _0x1016db;}export function assertSingleNotificationSource(_0xc3f528){const _0x174505=a157_0x43d0bd,_0x30dac4=[],_0x4aded8=_0xc3f528[_0x174505(0x152)](_0x174505(0x108))[_0x174505(0x147)]();if(_0x4aded8)_0x30dac4[_0x174505(0x111)]({'kind':'file','path':_0x4aded8});if(_0xc3f528[_0x174505(0x144)](_0x174505(0x14d)))_0x30dac4[_0x174505(0x111)]({'kind':_0x174505(0x14d)});const _0x591f1f=_0xc3f528[_0x174505(0x152)](_0x174505(0x10a))[_0x174505(0x147)]();if(_0x591f1f)_0x30dac4[_0x174505(0x111)]({'kind':'env','name':_0x591f1f});if(_0x30dac4[_0x174505(0x13e)]===0x0)throw CliErrors[_0x174505(0x15c)](_0x174505(0x10c),'Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.');if(_0x30dac4[_0x174505(0x13e)]>0x1)throw CliErrors[_0x174505(0x15c)](_0x174505(0x155),_0x174505(0xf9));return _0x30dac4[0x0];}export async function readNotificationDocument(_0x27ede7,_0x4ef74f){const _0xb5c43f=a157_0x43d0bd,_0x247a0c=assertSingleNotificationSource(_0x27ede7),_0x46cb22=_0x247a0c['kind']===_0xb5c43f(0x108)?_0xb5c43f(0x146)+_0x247a0c['path']:_0x247a0c['kind']===_0xb5c43f(0x12a)?_0xb5c43f(0xf1)+_0x247a0c[_0xb5c43f(0x157)]:_0xb5c43f(0x14d);let _0x498e05;try{if(_0x247a0c[_0xb5c43f(0x12e)]==='file')_0x498e05=await readFile(_0x247a0c['path'],'utf8');else{if(_0x247a0c[_0xb5c43f(0x12e)]===_0xb5c43f(0x12a)){if(!(_0x247a0c[_0xb5c43f(0x157)]in process.env))throw notificationError(_0xb5c43f(0x153),_0xb5c43f(0x122)+_0x247a0c['name']);_0x498e05=process.env[_0x247a0c.name]??'';}else _0x498e05=await readStdin();}}catch(_0x2d0005){if(_0x2d0005 instanceof CliError)throw _0x2d0005;throw notificationError(_0xb5c43f(0x153),_0xb5c43f(0x15e)+_0x46cb22+'.');}let _0x17521a;try{_0x17521a=JSON[_0xb5c43f(0xfa)](_0x498e05);}catch{throw notificationError('notification_config_json_invalid',_0xb5c43f(0x114)+_0x46cb22+_0xb5c43f(0x11b),_0xb5c43f(0x14e));}if(!isJsonObject(_0x17521a))throw notificationError('notification_config_json_invalid',_0xb5c43f(0x114)+_0x46cb22+_0xb5c43f(0x112));return validateNotificationDocument(_0x17521a,_0x4ef74f);}export function projectNotificationListConfig(_0x1937cd,_0xfc7b9c){const _0x3e53fe=a157_0x43d0bd;return{'id':typeof _0x1937cd['id']===_0x3e53fe(0x100)?_0x1937cd['id']:null,'configCode':requireResponseString(_0x1937cd[_0x3e53fe(0x15d)],'configCode',_0xfc7b9c),'configName':requireResponseString(_0x1937cd['configName'],_0x3e53fe(0x134),_0xfc7b9c),'channelType':requireResponseString(_0x1937cd[_0x3e53fe(0x148)],_0x3e53fe(0x148),_0xfc7b9c),'description':normalizeNullableString(_0x1937cd[_0x3e53fe(0x12c)]),'createTime':normalizeNullableString(_0x1937cd['createTime']),'updateTime':normalizeNullableString(_0x1937cd[_0x3e53fe(0x11a)])};}export function normalizeExactNotificationConfig(_0xd22d4a,_0x8d8b24,_0x22ca36){const _0x5d0790=a157_0x43d0bd;if(!Number['isSafeInteger'](_0xd22d4a['id'])||_0xd22d4a['id']!==_0x8d8b24)throw notificationError(_0x5d0790(0x165),'Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20'+_0x8d8b24+'.');if(_0xd22d4a[_0x5d0790(0x168)]!==_0x22ca36)throw notificationError('notification_config_response_invalid',_0x5d0790(0x163)+_0x8d8b24+'\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.');const _0x4f22e3=requireExactString(_0xd22d4a[_0x5d0790(0x134)],_0x5d0790(0x134),_0x8d8b24),_0x2670e3=requireExactString(_0xd22d4a['configCode'],_0x5d0790(0x15d),_0x8d8b24),_0x222404=requireExactString(_0xd22d4a[_0x5d0790(0x148)],_0x5d0790(0x148),_0x8d8b24);if(!NOTIFICATION_CHANNEL_TYPES[_0x5d0790(0x10e)](_0x222404))throw notificationError(_0x5d0790(0x165),'Notification\x20config\x20'+_0x8d8b24+_0x5d0790(0x150));const _0x157ffa=responseNullableString(_0xd22d4a[_0x5d0790(0xfb)],_0x5d0790(0xfb),_0x8d8b24),_0x18a0bc=responseNullableString(_0xd22d4a[_0x5d0790(0x121)],_0x5d0790(0x121),_0x8d8b24),_0x335def=responseNullableString(_0xd22d4a[_0x5d0790(0x12c)],_0x5d0790(0x12c),_0x8d8b24),_0x3a45ea=responseNullableTimeout(_0xd22d4a['connectTimeout'],_0x5d0790(0xf0),_0x8d8b24),_0x4d417e=responseNullableTimeout(_0xd22d4a[_0x5d0790(0x13b)],'readTimeout',_0x8d8b24);return{'id':_0x8d8b24,'appCode':_0x22ca36,'configCode':_0x2670e3,'configName':_0x4f22e3,'channelType':_0x222404,'endpointUrl':redactSensitive(_0x157ffa),'channelConfig':redactSensitive(_0x18a0bc),'description':_0x335def,'connectTimeout':_0x3a45ea,'readTimeout':_0x4d417e,'endpointUrlRaw':_0x157ffa,'channelConfigRaw':_0x18a0bc};}export async function requireExactNotificationConfig(_0x522249,_0x564295,_0x2979e0){const _0x3a1636=a157_0x43d0bd;let _0x282623;try{_0x282623=await getNotificationChannelConfig(_0x564295,_0x522249);}catch{throw safeApiFailure(_0x2979e0,'preflight',_0x3a1636(0x161)+_0x522249+_0x3a1636(0x12b));}return normalizeExactNotificationConfig(_0x282623,_0x564295,_0x522249);}export function projectNotificationConfig(_0x47b694){const _0x1c8348=a157_0x43d0bd;return{'id':_0x47b694['id']??null,'appCode':_0x47b694[_0x1c8348(0x168)],'configCode':_0x47b694['configCode']??null,'configName':_0x47b694[_0x1c8348(0x134)],'channelType':_0x47b694[_0x1c8348(0x148)],'endpointUrl':redactSensitive(_0x47b694[_0x1c8348(0xfb)]),'channelConfig':redactSensitive(_0x47b694[_0x1c8348(0x121)]),'description':_0x47b694[_0x1c8348(0x12c)]??null,'connectTimeout':_0x47b694[_0x1c8348(0xf0)]??null,'readTimeout':_0x47b694[_0x1c8348(0x13b)]??null};}export function notificationSelector(_0x1088cd){const _0x4e7d5f=a157_0x43d0bd;return{'appCode':_0x1088cd[_0x4e7d5f(0x168)],'id':_0x1088cd['id'],'configCode':_0x1088cd[_0x4e7d5f(0x15d)],'configName':_0x1088cd[_0x4e7d5f(0x134)],'channelType':_0x1088cd[_0x4e7d5f(0x148)]};}export function createMutationInput(_0x4d2f74,_0x50aa51){const _0x288057=a157_0x43d0bd;return{'appCode':_0x4d2f74,'configName':_0x50aa51[_0x288057(0x134)],'channelType':_0x50aa51['channelType'],...hasOwn(_0x50aa51,_0x288057(0xfb))?{'endpointUrl':_0x50aa51[_0x288057(0xfb)]}:{},...hasOwn(_0x50aa51,_0x288057(0x121))?{'channelConfig':serializeChannelConfig(_0x50aa51[_0x288057(0x121)])}:{},...hasOwn(_0x50aa51,_0x288057(0x12c))?{'description':_0x50aa51[_0x288057(0x12c)]}:{},...hasOwn(_0x50aa51,_0x288057(0xf0))?{'connectTimeout':_0x50aa51['connectTimeout']}:{},...hasOwn(_0x50aa51,_0x288057(0x13b))?{'readTimeout':_0x50aa51[_0x288057(0x13b)]}:{}};}export function mergeUpdateInput(_0x3f5c16,_0x1ee7b6){const _0x256e06=a157_0x43d0bd;return{'id':_0x3f5c16['id'],'appCode':_0x3f5c16[_0x256e06(0x168)],'configName':_0x1ee7b6[_0x256e06(0x134)]??_0x3f5c16[_0x256e06(0x134)],'channelType':_0x1ee7b6['channelType']??_0x3f5c16[_0x256e06(0x148)],'endpointUrl':hasOwn(_0x1ee7b6,_0x256e06(0xfb))?_0x1ee7b6[_0x256e06(0xfb)]:_0x3f5c16[_0x256e06(0xed)],'channelConfig':hasOwn(_0x1ee7b6,_0x256e06(0x121))?serializeChannelConfig(_0x1ee7b6['channelConfig']):_0x3f5c16[_0x256e06(0x13c)],'description':hasOwn(_0x1ee7b6,_0x256e06(0x12c))?_0x1ee7b6[_0x256e06(0x12c)]:_0x3f5c16[_0x256e06(0x12c)],'connectTimeout':hasOwn(_0x1ee7b6,'connectTimeout')?_0x1ee7b6[_0x256e06(0xf0)]:_0x3f5c16[_0x256e06(0xf0)],'readTimeout':hasOwn(_0x1ee7b6,_0x256e06(0x13b))?_0x1ee7b6[_0x256e06(0x13b)]:_0x3f5c16[_0x256e06(0x13b)]};}export function plannedUpdateProjection(_0x15d7e5,_0x81fc32){const _0x3ab044=a157_0x43d0bd;return projectNotificationConfig({'id':_0x15d7e5['id'],'appCode':_0x15d7e5[_0x3ab044(0x168)],'configCode':_0x15d7e5[_0x3ab044(0x15d)],'configName':_0x81fc32[_0x3ab044(0x134)]??_0x15d7e5['configName'],'channelType':_0x81fc32['channelType']??_0x15d7e5[_0x3ab044(0x148)],'endpointUrl':hasOwn(_0x81fc32,_0x3ab044(0xfb))?_0x81fc32[_0x3ab044(0xfb)]:_0x15d7e5['endpointUrlRaw'],'channelConfig':hasOwn(_0x81fc32,_0x3ab044(0x121))?_0x81fc32[_0x3ab044(0x121)]:_0x15d7e5[_0x3ab044(0x13c)],'description':hasOwn(_0x81fc32,_0x3ab044(0x12c))?_0x81fc32['description']:_0x15d7e5[_0x3ab044(0x12c)],'connectTimeout':hasOwn(_0x81fc32,_0x3ab044(0xf0))?_0x81fc32[_0x3ab044(0xf0)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x15d7e5[_0x3ab044(0xf0)],'readTimeout':hasOwn(_0x81fc32,_0x3ab044(0x13b))?_0x81fc32['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x15d7e5[_0x3ab044(0x13b)]});}export function requestedSafeFieldsMatch(_0x5e29cc,_0x2d642d,_0x30fe5e){const _0x4529e0=a157_0x43d0bd,_0x3a3dc2=[],_0x51478d=[],_0x184e1d=[];for(const _0xf58648 of[_0x4529e0(0x134),_0x4529e0(0x148),_0x4529e0(0x12c)]){if(!hasOwn(_0x30fe5e,_0xf58648))continue;_0x184e1d[_0x4529e0(0x111)](_0xf58648),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0xf58648]===_0x30fe5e[_0xf58648]),_0x51478d[_0x4529e0(0x111)](_0x5e29cc[_0xf58648]!==_0x30fe5e[_0xf58648]&&_0x2d642d[_0xf58648]===_0x30fe5e[_0xf58648]);}for(const _0x1e100f of[_0x4529e0(0xf0),_0x4529e0(0x13b)]){if(!hasOwn(_0x30fe5e,_0x1e100f))continue;const _0x2adba2=_0x30fe5e[_0x1e100f]??(_0x1e100f===_0x4529e0(0xf0)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x184e1d['push'](_0x1e100f),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0x1e100f]===_0x2adba2),_0x51478d['push'](_0x5e29cc[_0x1e100f]!==_0x2adba2&&_0x2d642d[_0x1e100f]===_0x2adba2);}return hasOwn(_0x30fe5e,_0x4529e0(0xfb))&&_0x30fe5e[_0x4529e0(0xfb)]===null&&(_0x184e1d[_0x4529e0(0x111)](_0x4529e0(0x133)),_0x3a3dc2[_0x4529e0(0x111)](_0x2d642d[_0x4529e0(0xed)]===null||_0x2d642d['endpointUrlRaw']===''),_0x51478d['push'](_0x5e29cc[_0x4529e0(0xed)]!==null&&_0x5e29cc['endpointUrlRaw']!==''&&(_0x2d642d['endpointUrlRaw']===null||_0x2d642d[_0x4529e0(0xed)]===''))),{'allMatch':_0x3a3dc2[_0x4529e0(0xf7)](Boolean),'provesChange':_0x51478d[_0x4529e0(0x159)](Boolean),'verifiedFields':_0x184e1d};}export function validateNotificationDeleteReadback(_0x3e645a,_0x5671e0,_0x5a82c2){const _0x18d168=a157_0x43d0bd;for(const [_0x1904e8,_0x18fa1d]of _0x3e645a[_0x18d168(0x158)]()){if(!Number['isSafeInteger'](_0x18fa1d['id'])||_0x18fa1d['id']<=0x0)throw notificationError('notification_config_response_invalid',_0x18d168(0x119)+(_0x1904e8+0x1)+_0x18d168(0x154));if(_0x18fa1d[_0x18d168(0x168)]!==_0x5671e0)throw notificationError('notification_config_response_invalid',_0x18d168(0x119)+(_0x1904e8+0x1)+_0x18d168(0x138));if(_0x18fa1d[_0x18d168(0x148)]!==_0x5a82c2)throw notificationError(_0x18d168(0x165),'Notification\x20config\x20list\x20item\x20'+(_0x1904e8+0x1)+_0x18d168(0x132));}}export function safeApiFailure(_0xb8039a,_0x482455,_0x28f833){const _0x15cffb=a157_0x43d0bd;return notificationError(_0x15cffb(0x11d)+_0xb8039a+'_'+(_0x482455===_0x15cffb(0xf2)?'failed':_0x482455+'_unavailable'),_0x15cffb(0x163)+_0xb8039a+'\x20'+_0x482455+_0x15cffb(0x15f),_0x28f833);}function a157_0x3e62(_0x1114b5,_0x58f5c8){_0x1114b5=_0x1114b5-0xed;const _0x2cbc2a=a157_0x2cbc();let _0x3e62af=_0x2cbc2a[_0x1114b5];return _0x3e62af;}export function notificationLookupCommand(_0x1726c3,_0x21076b){const _0x5aa1f9=a157_0x43d0bd;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x1726c3+_0x5aa1f9(0x167)+_0x21076b+_0x5aa1f9(0x110);}function validateNotificationDocument(_0x216dc3,_0x2278a7){const _0x20a472=a157_0x43d0bd;for(const _0x4886aa of Object[_0x20a472(0x141)](_0x216dc3)){if(FORBIDDEN_IDENTITY_FIELDS[_0x20a472(0x12d)](_0x4886aa))throw notificationError(_0x20a472(0x135),_0x20a472(0x137)+_0x4886aa+_0x20a472(0x125));if(!ALLOWED_INPUT_FIELDS[_0x20a472(0x12d)](_0x4886aa))throw notificationError(_0x20a472(0x16a),'Unknown\x20notification\x20JSON\x20field\x20\x22'+_0x4886aa+'\x22.');}if(_0x2278a7==='update'&&Object[_0x20a472(0x141)](_0x216dc3)['length']===0x0)throw notificationError(_0x20a472(0x149),_0x20a472(0x130));const _0xb7e9f={};if(hasOwn(_0x216dc3,_0x20a472(0x134)))_0xb7e9f['configName']=validateRequiredString(_0x216dc3[_0x20a472(0x134)],'configName',0x80);else{if(_0x2278a7===_0x20a472(0xf5))throw notificationError(_0x20a472(0x162),_0x20a472(0x164)+_0x20a472(0x120));}if(hasOwn(_0x216dc3,'channelType')){if(typeof _0x216dc3[_0x20a472(0x148)]!==_0x20a472(0x10b))throw invalidFieldType(_0x20a472(0x148),_0x20a472(0x143));const _0x5a536a=_0x216dc3[_0x20a472(0x148)][_0x20a472(0x147)]();if(!NOTIFICATION_CHANNEL_TYPES[_0x20a472(0x10e)](_0x5a536a))throw notificationError(_0x20a472(0xfd),_0x20a472(0x107),_0x20a472(0x127)+NOTIFICATION_CHANNEL_TYPES[_0x20a472(0xf4)](',\x20')+'.');_0xb7e9f[_0x20a472(0x148)]=_0x5a536a;}else{if(_0x2278a7==='create')throw notificationError(_0x20a472(0x162),_0x20a472(0x164)+_0x20a472(0x118));}for(const [_0xe72660,_0x719837]of[[_0x20a472(0xfb),0x200],[_0x20a472(0x12c),0x100]]){if(!hasOwn(_0x216dc3,_0xe72660))continue;const _0x57644c=_0x216dc3[_0xe72660];if(_0x57644c!==null&&typeof _0x57644c!=='string')throw invalidFieldType(_0xe72660,'a\x20string\x20or\x20null');if(typeof _0x57644c===_0x20a472(0x10b)&&_0x57644c['length']>_0x719837)throw notificationError(_0x20a472(0xfd),_0x20a472(0x137)+_0xe72660+_0x20a472(0x103)+_0x719837+_0x20a472(0x115));_0xb7e9f[_0xe72660]=_0x57644c;}if(hasOwn(_0x216dc3,_0x20a472(0x121))){const _0x56b50e=_0x216dc3[_0x20a472(0x121)];if(_0x56b50e===null&&_0x2278a7==='create')throw invalidFieldType(_0x20a472(0x121),_0x20a472(0x13a));if(_0x56b50e!==null&&!isJsonObject(_0x56b50e))throw invalidFieldType(_0x20a472(0x121),_0x2278a7===_0x20a472(0x113)?_0x20a472(0x11e):_0x20a472(0x13a));_0x56b50e!==null&&validateChannelConfigFields(_0xb7e9f[_0x20a472(0x148)],_0x56b50e),_0xb7e9f[_0x20a472(0x121)]=_0x56b50e;}for(const _0x6013b0 of[_0x20a472(0xf0),_0x20a472(0x13b)]){if(!hasOwn(_0x216dc3,_0x6013b0))continue;const _0x205841=_0x216dc3[_0x6013b0];if(_0x205841!==null&&(!Number[_0x20a472(0x139)](_0x205841)||_0x205841<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x6013b0+_0x20a472(0x124));_0xb7e9f[_0x6013b0]=_0x205841;}return _0xb7e9f;}function validateRequiredString(_0x110357,_0x26ed33,_0xc2aea4){const _0x13e08e=a157_0x43d0bd;if(typeof _0x110357!==_0x13e08e(0x10b))throw invalidFieldType(_0x26ed33,'a\x20non-empty\x20string');const _0x38c798=_0x110357[_0x13e08e(0x147)]();if(!_0x38c798)throw notificationError('notification_config_field_invalid',_0x13e08e(0x137)+_0x26ed33+_0x13e08e(0x14b));if(_0x38c798[_0x13e08e(0x13e)]>_0xc2aea4)throw notificationError(_0x13e08e(0xfd),'Notification\x20JSON\x20field\x20\x22'+_0x26ed33+'\x22\x20cannot\x20exceed\x20'+_0xc2aea4+'\x20characters.');return _0x38c798;}function validateChannelConfigFields(_0x29de41,_0x46c2dc){const _0x3383e3=a157_0x43d0bd;if(hasOwn(_0x46c2dc,_0x3383e3(0x102)))throw forbiddenChannelConfigField(_0x3383e3(0x102));if(_0x29de41===_0x3383e3(0x12f))for(const _0x116b67 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x46c2dc,_0x116b67))throw forbiddenChannelConfigField(_0x116b67);}}function forbiddenChannelConfigField(_0x3701d7){const _0x73115c=a157_0x43d0bd;return notificationError('notification_config_channel_field_forbidden',_0x73115c(0x13d)+_0x3701d7+'\x22\x20is\x20forbidden.');}function invalidFieldType(_0x4dbfae,_0x4fb9cc){const _0x18f030=a157_0x43d0bd;return notificationError(_0x18f030(0xfd),_0x18f030(0x137)+_0x4dbfae+'\x22\x20must\x20be\x20'+_0x4fb9cc+'.');}function serializeChannelConfig(_0xa4f499){const _0x12cb0a=a157_0x43d0bd;return _0xa4f499===null||_0xa4f499===undefined?null:JSON[_0x12cb0a(0xef)](_0xa4f499);}function redactSensitive(_0x389060){const _0x4e522f=a157_0x43d0bd;return _0x389060===null||_0x389060===undefined||_0x389060===''?null:_0x4e522f(0xff);}function requireResponseString(_0x4419e5,_0x1a43d5,_0x11b606){const _0x1674f6=a157_0x43d0bd;if(typeof _0x4419e5!=='string'||_0x4419e5['trim']()==='')throw CliErrors[_0x1674f6(0x11f)](_0x1674f6(0x15a),_0x1674f6(0x10d)+(_0x11b606+0x1)+_0x1674f6(0x129)+_0x1a43d5+'\x22.');return _0x4419e5[_0x1674f6(0x147)]();}function requireExactString(_0x659b58,_0x5261d6,_0x5236c1){const _0x436b33=a157_0x43d0bd;if(typeof _0x659b58!==_0x436b33(0x10b)||_0x659b58[_0x436b33(0x147)]()==='')throw notificationError(_0x436b33(0x165),_0x436b33(0x163)+_0x5236c1+_0x436b33(0x129)+_0x5261d6+'\x22.');return _0x659b58[_0x436b33(0x147)]();}function responseNullableString(_0x4624af,_0x16c98b,_0x81df74){const _0x394417=a157_0x43d0bd;if(_0x4624af===undefined||_0x4624af===null)return null;if(typeof _0x4624af!==_0x394417(0x10b))throw notificationError(_0x394417(0x165),_0x394417(0x163)+_0x81df74+_0x394417(0x11c)+_0x16c98b+'\x22.');return _0x4624af;}function responseNullableTimeout(_0x2d5b9b,_0xccf686,_0x224416){const _0x216422=a157_0x43d0bd;if(_0x2d5b9b===undefined||_0x2d5b9b===null)return null;if(!Number['isSafeInteger'](_0x2d5b9b)||_0x2d5b9b<0x0)throw notificationError('notification_config_response_invalid',_0x216422(0x163)+_0x224416+_0x216422(0x11c)+_0xccf686+'\x22.');return _0x2d5b9b;}function normalizeNullableString(_0x250ffd){const _0x5ce6be=a157_0x43d0bd;return typeof _0x250ffd===_0x5ce6be(0x10b)?_0x250ffd:null;}function a157_0x2cbc(){const _0x35762d=['replyTo','endpointUrlRaw','subjectPrefix','stringify','connectTimeout','environment\x20variable\x20','mutation','DINGTALK','join','create','846093ktmqWm','every','WECOM','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','parse','endpointUrl','22620BeiTOy','notification_config_field_invalid','1109406kqNZGv','<redacted>','number','call','messageTemplate','\x22\x20cannot\x20exceed\x20','dry-run','isArray','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.','file','emailTargets','from-env','string','Missing\x20notification\x20JSON\x20source.','Item\x20','includes','yes','\x20--format\x20compress','push','\x20must\x20be\x20an\x20object.','update','Notification\x20JSON\x20from\x20','\x20characters.','object','1243335KoGlzG','\x22channelType\x22.','Notification\x20config\x20list\x20item\x20','updateTime','\x20is\x20invalid.','\x20has\x20invalid\x20field\x20\x22','notification_config_','a\x20JSON\x20object\x20or\x20null','apiError','\x22configName\x22.','channelConfig','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','utf8','\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.','\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.','Application-level\x20notification\x20config\x20ID','Allowed\x20values:\x20','575nwXhSy','\x20is\x20missing\x20required\x20field\x20\x22','env','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','description','has','kind','EMAIL','Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.','20946830FPdAOx','\x20has\x20an\x20invalid\x20channelType.','endpointUrl:null','configName','notification_config_field_forbidden','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','Notification\x20JSON\x20field\x20\x22','\x20has\x20an\x20invalid\x20appCode.','isSafeInteger','a\x20JSON\x20object','readTimeout','channelConfigRaw','Notification\x20JSON\x20channelConfig\x20field\x20\x22','length','Invalid\x20--','Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin','keys','ccList','a\x20supported\x20string','bool','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','file\x20','trim','channelType','notification_config_update_empty','bccList','\x22\x20must\x20be\x20a\x20non-empty\x20string.','6392024aaWhCJ','stdin','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','WEBHOOK','\x20has\x20an\x20unsupported\x20channelType.','recipients','str','notification_config_source_unavailable','\x20has\x20an\x20invalid\x20id.','Notification\x20JSON\x20source\x20is\x20ambiguous.','boolean','name','entries','some','Invalid\x20notification\x20config\x20response.','14koSZQM','validation','configCode','Unable\x20to\x20read\x20notification\x20JSON\x20from\x20','\x20failed.','10NJbuIj','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','notification_config_field_required','Notification\x20config\x20','Create\x20JSON\x20requires\x20field\x20','notification_config_response_invalid','14892084SAdoRD','\x20--type\x20','appCode','fromName','notification_config_field_unknown'];a157_0x2cbc=function(){return _0x35762d;};return a157_0x2cbc();}function isJsonObject(_0x16ecbb){const _0x165f02=a157_0x43d0bd;return _0x16ecbb!==null&&typeof _0x16ecbb===_0x165f02(0x116)&&!Array[_0x165f02(0x105)](_0x16ecbb);}function hasOwn(_0x43b563,_0x58d2fc){const _0x340663=a157_0x43d0bd;return Object['prototype']['hasOwnProperty'][_0x340663(0x101)](_0x43b563,_0x58d2fc);}async function readStdin(){const _0x332b4b=a157_0x43d0bd;let _0x44f03d='';process[_0x332b4b(0x14d)]['setEncoding'](_0x332b4b(0x123));for await(const _0x7d7242 of process[_0x332b4b(0x14d)])_0x44f03d+=_0x7d7242;return _0x44f03d;}
1
+ const a157_0x959504=a157_0x19c8;(function(_0x15a06a,_0x56c516){const _0x2fbef2=a157_0x19c8,_0x187767=_0x15a06a();while(!![]){try{const _0x5a82ef=-parseInt(_0x2fbef2(0x228))/0x1*(-parseInt(_0x2fbef2(0x225))/0x2)+-parseInt(_0x2fbef2(0x21b))/0x3+parseInt(_0x2fbef2(0x1f2))/0x4+-parseInt(_0x2fbef2(0x1d6))/0x5+-parseInt(_0x2fbef2(0x1e9))/0x6+-parseInt(_0x2fbef2(0x23d))/0x7*(parseInt(_0x2fbef2(0x1f0))/0x8)+parseInt(_0x2fbef2(0x220))/0x9*(parseInt(_0x2fbef2(0x1dc))/0xa);if(_0x5a82ef===_0x56c516)break;else _0x187767['push'](_0x187767['shift']());}catch(_0x15e209){_0x187767['push'](_0x187767['shift']());}}}(a157_0x1fc0,0x542e1));import{readFile}from'node:fs/promises';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getNotificationChannelConfig}from'../../core/api-client.js';import{CliError,CliErrors}from'../../errors.js';export const NOTIFICATION_CHANNEL_TYPES=['EMAIL','FEISHU',a157_0x959504(0x21a),a157_0x959504(0x1d8),'WEBHOOK'];export const DEFAULT_NOTIFICATION_CONNECT_TIMEOUT=0x1388;export const DEFAULT_NOTIFICATION_READ_TIMEOUT=0x2710;const ALLOWED_INPUT_FIELDS=new Set(['configName','channelType',a157_0x959504(0x224),a157_0x959504(0x205),a157_0x959504(0x21f),a157_0x959504(0x22e),a157_0x959504(0x22a)]),FORBIDDEN_IDENTITY_FIELDS=new Set(['id','appCode','configCode','channelCode']),EMAIL_RECIPIENT_FIELDS=new Set([a157_0x959504(0x234),'recipients',a157_0x959504(0x1db),'bccList','replyTo',a157_0x959504(0x22f),a157_0x959504(0x209),'to','cc']);export const NOTIFICATION_INPUT_FLAGS=[{'name':a157_0x959504(0x204),'type':'string','required':![],'description':a157_0x959504(0x1f1)},{'name':a157_0x959504(0x20f),'type':a157_0x959504(0x1d1),'required':![],'default':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20stdin'},{'name':a157_0x959504(0x1d0),'type':a157_0x959504(0x20b),'required':![],'description':'Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20named\x20environment\x20variable'}];export const NOTIFICATION_ID_FLAG={'name':'id','type':a157_0x959504(0x23b),'required':!![],'description':a157_0x959504(0x1e6)};export const NOTIFICATION_APP_FLAG=APPCODE_FLAG_OPTIONAL;export function notificationError(_0x2588f8,_0x2057d0,_0xa0b41a){return new CliError(_0x2588f8,0x1,_0x2057d0,_0xa0b41a);}export function readNotificationId(_0x2be0b4){const _0x4c3b2f=a157_0x959504,_0x398358=_0x2be0b4[_0x4c3b2f(0x1da)]('id');if(!Number[_0x4c3b2f(0x23e)](_0x398358)||_0x398358<=0x0)throw notificationError(_0x4c3b2f(0x229),_0x4c3b2f(0x1ed));return _0x398358;}export function requireNotificationExplicitYes(_0x20f0ef){const _0x28100a=a157_0x959504;if(_0x20f0ef[_0x28100a(0x230)](_0x28100a(0x1ce))||_0x20f0ef[_0x28100a(0x230)](_0x28100a(0x227)))return;throw notificationError(_0x28100a(0x223),_0x28100a(0x1d2),_0x28100a(0x22b));}export function readNotificationChannelType(_0x55068b,_0x144f09=a157_0x959504(0x1cc),_0x5a2abd='EMAIL'){const _0x95a55b=a157_0x959504,_0x4c0fc=_0x55068b[_0x95a55b(0x1cd)](_0x144f09)['trim']()||_0x5a2abd;if(!NOTIFICATION_CHANNEL_TYPES[_0x95a55b(0x1ee)](_0x4c0fc))throw CliErrors['validation'](_0x95a55b(0x1c9)+_0x144f09+':\x20'+_0x4c0fc,_0x95a55b(0x21d)+NOTIFICATION_CHANNEL_TYPES[_0x95a55b(0x221)](',\x20')+'.');return _0x4c0fc;}export function assertSingleNotificationSource(_0x371a24){const _0x1437ff=a157_0x959504,_0x1267e3=[],_0x33da40=_0x371a24[_0x1437ff(0x1cd)](_0x1437ff(0x204))[_0x1437ff(0x241)]();if(_0x33da40)_0x1267e3[_0x1437ff(0x242)]({'kind':_0x1437ff(0x204),'path':_0x33da40});if(_0x371a24['bool'](_0x1437ff(0x20f)))_0x1267e3['push']({'kind':_0x1437ff(0x20f)});const _0x5f27a4=_0x371a24[_0x1437ff(0x1cd)]('from-env')[_0x1437ff(0x241)]();if(_0x5f27a4)_0x1267e3[_0x1437ff(0x242)]({'kind':_0x1437ff(0x232),'name':_0x5f27a4});if(_0x1267e3[_0x1437ff(0x240)]===0x0)throw CliErrors['validation'](_0x1437ff(0x1ea),_0x1437ff(0x1e8));if(_0x1267e3[_0x1437ff(0x240)]>0x1)throw CliErrors[_0x1437ff(0x23f)](_0x1437ff(0x1f4),_0x1437ff(0x1e8));return _0x1267e3[0x0];}export async function readNotificationDocument(_0x3d7d31,_0x33b83d){const _0x468b01=a157_0x959504,_0x5605f4=assertSingleNotificationSource(_0x3d7d31),_0x3ccb36=_0x5605f4[_0x468b01(0x1fc)]===_0x468b01(0x204)?_0x468b01(0x239)+_0x5605f4[_0x468b01(0x20a)]:_0x5605f4['kind']===_0x468b01(0x232)?_0x468b01(0x237)+_0x5605f4[_0x468b01(0x211)]:_0x468b01(0x20f);let _0x4bf735;try{if(_0x5605f4[_0x468b01(0x1fc)]===_0x468b01(0x204))_0x4bf735=await readFile(_0x5605f4[_0x468b01(0x20a)],_0x468b01(0x1e2));else{if(_0x5605f4['kind']===_0x468b01(0x232)){if(!(_0x5605f4[_0x468b01(0x211)]in process.env))throw notificationError(_0x468b01(0x21e),_0x468b01(0x1f6)+_0x5605f4['name']);_0x4bf735=process.env[_0x5605f4.name]??'';}else _0x4bf735=await readStdin();}}catch(_0x438a8d){if(_0x438a8d instanceof CliError)throw _0x438a8d;throw notificationError(_0x468b01(0x21e),'Unable\x20to\x20read\x20notification\x20JSON\x20from\x20'+_0x3ccb36+'.');}let _0x2ab1f5;try{_0x2ab1f5=JSON[_0x468b01(0x236)](_0x4bf735);}catch{throw notificationError(_0x468b01(0x217),_0x468b01(0x22d)+_0x3ccb36+_0x468b01(0x1de),_0x468b01(0x1e4));}if(!isJsonObject(_0x2ab1f5))throw notificationError(_0x468b01(0x217),_0x468b01(0x22d)+_0x3ccb36+_0x468b01(0x238));return validateNotificationDocument(_0x2ab1f5,_0x33b83d);}export function projectNotificationListConfig(_0x2a0782,_0xbd4dea){const _0x219997=a157_0x959504;return{'id':typeof _0x2a0782['id']==='number'?_0x2a0782['id']:null,'configCode':requireResponseString(_0x2a0782['configCode'],_0x219997(0x1c7),_0xbd4dea),'configName':requireResponseString(_0x2a0782[_0x219997(0x200)],_0x219997(0x200),_0xbd4dea),'channelType':requireResponseString(_0x2a0782[_0x219997(0x1d9)],_0x219997(0x1d9),_0xbd4dea),'description':normalizeNullableString(_0x2a0782[_0x219997(0x21f)]),'createTime':normalizeNullableString(_0x2a0782[_0x219997(0x214)]),'updateTime':normalizeNullableString(_0x2a0782[_0x219997(0x213)])};}export function normalizeExactNotificationConfig(_0x1853ff,_0x484a1c,_0x423c12){const _0x15a774=a157_0x959504;if(!Number[_0x15a774(0x23e)](_0x1853ff['id'])||_0x1853ff['id']!==_0x484a1c)throw notificationError('notification_config_response_invalid',_0x15a774(0x1e3)+_0x484a1c+'.');if(_0x1853ff[_0x15a774(0x1f8)]!==_0x423c12)throw notificationError('notification_config_response_invalid',_0x15a774(0x1fd)+_0x484a1c+_0x15a774(0x1ca));const _0x39db79=requireExactString(_0x1853ff['configName'],_0x15a774(0x200),_0x484a1c),_0x32b83d=requireExactString(_0x1853ff[_0x15a774(0x1c7)],_0x15a774(0x1c7),_0x484a1c),_0x13ba85=requireExactString(_0x1853ff[_0x15a774(0x1d9)],'channelType',_0x484a1c);if(!NOTIFICATION_CHANNEL_TYPES[_0x15a774(0x1ee)](_0x13ba85))throw notificationError(_0x15a774(0x1d5),_0x15a774(0x1fd)+_0x484a1c+_0x15a774(0x1c8));const _0x20fb20=responseNullableString(_0x1853ff[_0x15a774(0x224)],_0x15a774(0x224),_0x484a1c),_0xbbe7cb=responseNullableString(_0x1853ff[_0x15a774(0x205)],_0x15a774(0x205),_0x484a1c),_0x5858de=responseNullableString(_0x1853ff['description'],'description',_0x484a1c),_0x2aeea1=responseNullableTimeout(_0x1853ff[_0x15a774(0x22e)],_0x15a774(0x22e),_0x484a1c),_0x749ace=responseNullableTimeout(_0x1853ff[_0x15a774(0x22a)],_0x15a774(0x22a),_0x484a1c);return{'id':_0x484a1c,'appCode':_0x423c12,'configCode':_0x32b83d,'configName':_0x39db79,'channelType':_0x13ba85,'endpointUrl':redactSensitive(_0x20fb20),'channelConfig':redactSensitive(_0xbbe7cb),'description':_0x5858de,'connectTimeout':_0x2aeea1,'readTimeout':_0x749ace,'endpointUrlRaw':_0x20fb20,'channelConfigRaw':_0xbbe7cb};}export async function requireExactNotificationConfig(_0x2ba4aa,_0x17fa21,_0x19fc2f){const _0x19da52=a157_0x959504;let _0x1588ef;try{_0x1588ef=await getNotificationChannelConfig(_0x17fa21,_0x2ba4aa);}catch{throw safeApiFailure(_0x19fc2f,'preflight',_0x19da52(0x208)+_0x2ba4aa+_0x19da52(0x1dd));}return normalizeExactNotificationConfig(_0x1588ef,_0x17fa21,_0x2ba4aa);}export function projectNotificationConfig(_0x84259c){const _0x379a4b=a157_0x959504;return{'id':_0x84259c['id']??null,'appCode':_0x84259c[_0x379a4b(0x1f8)],'configCode':_0x84259c[_0x379a4b(0x1c7)]??null,'configName':_0x84259c[_0x379a4b(0x200)],'channelType':_0x84259c['channelType'],'endpointUrl':redactSensitive(_0x84259c['endpointUrl']),'channelConfig':redactSensitive(_0x84259c[_0x379a4b(0x205)]),'description':_0x84259c[_0x379a4b(0x21f)]??null,'connectTimeout':_0x84259c[_0x379a4b(0x22e)]??null,'readTimeout':_0x84259c[_0x379a4b(0x22a)]??null};}export function notificationSelector(_0x3660c7){const _0x18b479=a157_0x959504;return{'appCode':_0x3660c7[_0x18b479(0x1f8)],'id':_0x3660c7['id'],'configCode':_0x3660c7[_0x18b479(0x1c7)],'configName':_0x3660c7[_0x18b479(0x200)],'channelType':_0x3660c7[_0x18b479(0x1d9)]};}export function createMutationInput(_0x54c000,_0x53a29e){const _0x307032=a157_0x959504;return{'appCode':_0x54c000,'configName':_0x53a29e[_0x307032(0x200)],'channelType':_0x53a29e[_0x307032(0x1d9)],...hasOwn(_0x53a29e,'endpointUrl')?{'endpointUrl':_0x53a29e[_0x307032(0x224)]}:{},...hasOwn(_0x53a29e,_0x307032(0x205))?{'channelConfig':serializeChannelConfig(_0x53a29e[_0x307032(0x205)])}:{},...hasOwn(_0x53a29e,_0x307032(0x21f))?{'description':_0x53a29e['description']}:{},...hasOwn(_0x53a29e,_0x307032(0x22e))?{'connectTimeout':_0x53a29e['connectTimeout']}:{},...hasOwn(_0x53a29e,_0x307032(0x22a))?{'readTimeout':_0x53a29e[_0x307032(0x22a)]}:{}};}export function mergeUpdateInput(_0x2ba735,_0x304083){const _0x10037d=a157_0x959504;return{'id':_0x2ba735['id'],'appCode':_0x2ba735['appCode'],'configName':_0x304083[_0x10037d(0x200)]??_0x2ba735[_0x10037d(0x200)],'channelType':_0x304083['channelType']??_0x2ba735[_0x10037d(0x1d9)],'endpointUrl':hasOwn(_0x304083,'endpointUrl')?_0x304083[_0x10037d(0x224)]:_0x2ba735[_0x10037d(0x1d3)],'channelConfig':hasOwn(_0x304083,_0x10037d(0x205))?serializeChannelConfig(_0x304083['channelConfig']):_0x2ba735[_0x10037d(0x219)],'description':hasOwn(_0x304083,'description')?_0x304083[_0x10037d(0x21f)]:_0x2ba735[_0x10037d(0x21f)],'connectTimeout':hasOwn(_0x304083,_0x10037d(0x22e))?_0x304083[_0x10037d(0x22e)]:_0x2ba735[_0x10037d(0x22e)],'readTimeout':hasOwn(_0x304083,_0x10037d(0x22a))?_0x304083[_0x10037d(0x22a)]:_0x2ba735[_0x10037d(0x22a)]};}export function plannedUpdateProjection(_0x458152,_0xbd697e){const _0x4de80d=a157_0x959504;return projectNotificationConfig({'id':_0x458152['id'],'appCode':_0x458152[_0x4de80d(0x1f8)],'configCode':_0x458152[_0x4de80d(0x1c7)],'configName':_0xbd697e['configName']??_0x458152[_0x4de80d(0x200)],'channelType':_0xbd697e[_0x4de80d(0x1d9)]??_0x458152[_0x4de80d(0x1d9)],'endpointUrl':hasOwn(_0xbd697e,_0x4de80d(0x224))?_0xbd697e[_0x4de80d(0x224)]:_0x458152[_0x4de80d(0x1d3)],'channelConfig':hasOwn(_0xbd697e,_0x4de80d(0x205))?_0xbd697e[_0x4de80d(0x205)]:_0x458152[_0x4de80d(0x219)],'description':hasOwn(_0xbd697e,_0x4de80d(0x21f))?_0xbd697e[_0x4de80d(0x21f)]:_0x458152[_0x4de80d(0x21f)],'connectTimeout':hasOwn(_0xbd697e,_0x4de80d(0x22e))?_0xbd697e[_0x4de80d(0x22e)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:_0x458152[_0x4de80d(0x22e)],'readTimeout':hasOwn(_0xbd697e,_0x4de80d(0x22a))?_0xbd697e['readTimeout']??DEFAULT_NOTIFICATION_READ_TIMEOUT:_0x458152['readTimeout']});}export function requestedSafeFieldsMatch(_0xf3030d,_0x8cb5c,_0x3791da){const _0x28c998=a157_0x959504,_0x3bf6a2=[],_0x466a11=[],_0x38bae6=[];for(const _0x187c51 of[_0x28c998(0x200),'channelType',_0x28c998(0x21f)]){if(!hasOwn(_0x3791da,_0x187c51))continue;_0x38bae6[_0x28c998(0x242)](_0x187c51),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x187c51]===_0x3791da[_0x187c51]),_0x466a11['push'](_0xf3030d[_0x187c51]!==_0x3791da[_0x187c51]&&_0x8cb5c[_0x187c51]===_0x3791da[_0x187c51]);}for(const _0x4dd592 of['connectTimeout','readTimeout']){if(!hasOwn(_0x3791da,_0x4dd592))continue;const _0x30c49e=_0x3791da[_0x4dd592]??(_0x4dd592===_0x28c998(0x22e)?DEFAULT_NOTIFICATION_CONNECT_TIMEOUT:DEFAULT_NOTIFICATION_READ_TIMEOUT);_0x38bae6[_0x28c998(0x242)](_0x4dd592),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x4dd592]===_0x30c49e),_0x466a11[_0x28c998(0x242)](_0xf3030d[_0x4dd592]!==_0x30c49e&&_0x8cb5c[_0x4dd592]===_0x30c49e);}return hasOwn(_0x3791da,_0x28c998(0x224))&&_0x3791da[_0x28c998(0x224)]===null&&(_0x38bae6['push'](_0x28c998(0x22c)),_0x3bf6a2[_0x28c998(0x242)](_0x8cb5c[_0x28c998(0x1d3)]===null||_0x8cb5c['endpointUrlRaw']===''),_0x466a11[_0x28c998(0x242)](_0xf3030d['endpointUrlRaw']!==null&&_0xf3030d[_0x28c998(0x1d3)]!==''&&(_0x8cb5c[_0x28c998(0x1d3)]===null||_0x8cb5c['endpointUrlRaw']===''))),{'allMatch':_0x3bf6a2[_0x28c998(0x207)](Boolean),'provesChange':_0x466a11[_0x28c998(0x20d)](Boolean),'verifiedFields':_0x38bae6};}export function validateNotificationDeleteReadback(_0xeb700b,_0x3c7bf5,_0x405326){const _0x4cf8c4=a157_0x959504;for(const [_0x219331,_0x4034ad]of _0xeb700b[_0x4cf8c4(0x1cf)]()){if(!Number[_0x4cf8c4(0x23e)](_0x4034ad['id'])||_0x4034ad['id']<=0x0)throw notificationError('notification_config_response_invalid','Notification\x20config\x20list\x20item\x20'+(_0x219331+0x1)+_0x4cf8c4(0x202));if(_0x4034ad[_0x4cf8c4(0x1f8)]!==_0x3c7bf5)throw notificationError('notification_config_response_invalid',_0x4cf8c4(0x1e0)+(_0x219331+0x1)+_0x4cf8c4(0x23c));if(_0x4034ad[_0x4cf8c4(0x1d9)]!==_0x405326)throw notificationError('notification_config_response_invalid',_0x4cf8c4(0x1e0)+(_0x219331+0x1)+'\x20has\x20an\x20invalid\x20channelType.');}}export function safeApiFailure(_0x5bae07,_0x45206b,_0x42082f){const _0x5b0168=a157_0x959504;return notificationError(_0x5b0168(0x1ec)+_0x5bae07+'_'+(_0x45206b===_0x5b0168(0x1e1)?'failed':_0x45206b+'_unavailable'),_0x5b0168(0x1fd)+_0x5bae07+'\x20'+_0x45206b+_0x5b0168(0x20c),_0x42082f);}export function notificationLookupCommand(_0x4a33b5,_0x536b95){const _0x3b6d40=a157_0x959504;return'rabetbase\x20notification\x20config-list\x20--appcode\x20'+_0x4a33b5+_0x3b6d40(0x1f7)+_0x536b95+_0x3b6d40(0x203);}function validateNotificationDocument(_0x1f2ab7,_0x2e1b86){const _0x51c2aa=a157_0x959504;for(const _0x4aac41 of Object['keys'](_0x1f2ab7)){if(FORBIDDEN_IDENTITY_FIELDS[_0x51c2aa(0x244)](_0x4aac41))throw notificationError(_0x51c2aa(0x1d7),'Notification\x20JSON\x20field\x20\x22'+_0x4aac41+'\x22\x20is\x20controlled\x20by\x20the\x20CLI\x20or\x20server\x20and\x20is\x20forbidden.');if(!ALLOWED_INPUT_FIELDS[_0x51c2aa(0x244)](_0x4aac41))throw notificationError(_0x51c2aa(0x1df),_0x51c2aa(0x20e)+_0x4aac41+'\x22.');}if(_0x2e1b86===_0x51c2aa(0x245)&&Object['keys'](_0x1f2ab7)[_0x51c2aa(0x240)]===0x0)throw notificationError(_0x51c2aa(0x233),'Update\x20JSON\x20must\x20contain\x20at\x20least\x20one\x20allowed\x20field.');const _0x19cdf6={};if(hasOwn(_0x1f2ab7,'configName'))_0x19cdf6[_0x51c2aa(0x200)]=validateRequiredString(_0x1f2ab7['configName'],'configName',0x80);else{if(_0x2e1b86===_0x51c2aa(0x1fa))throw notificationError(_0x51c2aa(0x1f5),_0x51c2aa(0x235)+_0x51c2aa(0x222));}if(hasOwn(_0x1f2ab7,_0x51c2aa(0x1d9))){if(typeof _0x1f2ab7[_0x51c2aa(0x1d9)]!==_0x51c2aa(0x20b))throw invalidFieldType(_0x51c2aa(0x1d9),_0x51c2aa(0x210));const _0x348665=_0x1f2ab7[_0x51c2aa(0x1d9)][_0x51c2aa(0x241)]();if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x348665))throw notificationError(_0x51c2aa(0x215),'Notification\x20JSON\x20field\x20\x22channelType\x22\x20is\x20unsupported.',_0x51c2aa(0x21d)+NOTIFICATION_CHANNEL_TYPES['join'](',\x20')+'.');_0x19cdf6['channelType']=_0x348665;}else{if(_0x2e1b86==='create')throw notificationError(_0x51c2aa(0x1f5),'Create\x20JSON\x20requires\x20field\x20'+'\x22channelType\x22.');}for(const [_0x1b99b1,_0x307447]of[[_0x51c2aa(0x224),0x200],[_0x51c2aa(0x21f),0x100]]){if(!hasOwn(_0x1f2ab7,_0x1b99b1))continue;const _0x36b285=_0x1f2ab7[_0x1b99b1];if(_0x36b285!==null&&typeof _0x36b285!==_0x51c2aa(0x20b))throw invalidFieldType(_0x1b99b1,_0x51c2aa(0x243));if(typeof _0x36b285===_0x51c2aa(0x20b)&&_0x36b285[_0x51c2aa(0x240)]>_0x307447)throw notificationError(_0x51c2aa(0x215),_0x51c2aa(0x226)+_0x1b99b1+'\x22\x20cannot\x20exceed\x20'+_0x307447+'\x20characters.');_0x19cdf6[_0x1b99b1]=_0x36b285;}if(hasOwn(_0x1f2ab7,_0x51c2aa(0x205))){const _0x398b95=_0x1f2ab7[_0x51c2aa(0x205)];if(_0x398b95===null&&_0x2e1b86===_0x51c2aa(0x1fa))throw invalidFieldType(_0x51c2aa(0x205),_0x51c2aa(0x1d4));if(_0x398b95!==null&&!isJsonObject(_0x398b95))throw invalidFieldType(_0x51c2aa(0x205),_0x2e1b86==='update'?'a\x20JSON\x20object\x20or\x20null':_0x51c2aa(0x1d4));_0x398b95!==null&&validateChannelConfigFields(_0x19cdf6[_0x51c2aa(0x1d9)],_0x398b95),_0x19cdf6['channelConfig']=_0x398b95;}for(const _0x3dc52f of[_0x51c2aa(0x22e),_0x51c2aa(0x22a)]){if(!hasOwn(_0x1f2ab7,_0x3dc52f))continue;const _0xadc9ed=_0x1f2ab7[_0x3dc52f];if(_0xadc9ed!==null&&(!Number[_0x51c2aa(0x23e)](_0xadc9ed)||_0xadc9ed<0x0))throw notificationError('notification_config_field_invalid','Notification\x20JSON\x20field\x20\x22'+_0x3dc52f+'\x22\x20must\x20be\x20a\x20non-negative\x20safe\x20integer\x20or\x20null.');_0x19cdf6[_0x3dc52f]=_0xadc9ed;}return _0x19cdf6;}function validateRequiredString(_0x4ff3a4,_0x51e389,_0x5a564c){const _0xa527e1=a157_0x959504;if(typeof _0x4ff3a4!==_0xa527e1(0x20b))throw invalidFieldType(_0x51e389,_0xa527e1(0x1fe));const _0x445dc3=_0x4ff3a4[_0xa527e1(0x241)]();if(!_0x445dc3)throw notificationError(_0xa527e1(0x215),'Notification\x20JSON\x20field\x20\x22'+_0x51e389+'\x22\x20must\x20be\x20a\x20non-empty\x20string.');if(_0x445dc3[_0xa527e1(0x240)]>_0x5a564c)throw notificationError('notification_config_field_invalid',_0xa527e1(0x226)+_0x51e389+_0xa527e1(0x216)+_0x5a564c+_0xa527e1(0x1ef));return _0x445dc3;}function validateChannelConfigFields(_0xe7c1ab,_0x2bd387){const _0xce902b=a157_0x959504;if(hasOwn(_0x2bd387,_0xce902b(0x23a)))throw forbiddenChannelConfigField('messageTemplate');if(_0xe7c1ab==='EMAIL')for(const _0x2cbbc1 of EMAIL_RECIPIENT_FIELDS){if(hasOwn(_0x2bd387,_0x2cbbc1))throw forbiddenChannelConfigField(_0x2cbbc1);}}function forbiddenChannelConfigField(_0x5a92aa){const _0x19cb94=a157_0x959504;return notificationError('notification_config_channel_field_forbidden',_0x19cb94(0x1fb)+_0x5a92aa+_0x19cb94(0x1f9));}function invalidFieldType(_0x80fde4,_0x26a079){const _0x30ede2=a157_0x959504;return notificationError(_0x30ede2(0x215),_0x30ede2(0x226)+_0x80fde4+_0x30ede2(0x206)+_0x26a079+'.');}function serializeChannelConfig(_0x177c9a){const _0x1bdc6b=a157_0x959504;return _0x177c9a===null||_0x177c9a===undefined?null:JSON[_0x1bdc6b(0x201)](_0x177c9a);}function redactSensitive(_0x1d64ac){return _0x1d64ac===null||_0x1d64ac===undefined||_0x1d64ac===''?null:'<redacted>';}function requireResponseString(_0x517159,_0x24ccd1,_0x4a1cd0){const _0x24227d=a157_0x959504;if(typeof _0x517159!=='string'||_0x517159[_0x24227d(0x241)]()==='')throw CliErrors[_0x24227d(0x231)](_0x24227d(0x1eb),'Item\x20'+(_0x4a1cd0+0x1)+_0x24227d(0x1e7)+_0x24ccd1+'\x22.');return _0x517159[_0x24227d(0x241)]();}function requireExactString(_0x4f07b7,_0x22b6cc,_0x3d79f8){const _0x3962eb=a157_0x959504;if(typeof _0x4f07b7!==_0x3962eb(0x20b)||_0x4f07b7[_0x3962eb(0x241)]()==='')throw notificationError(_0x3962eb(0x1d5),'Notification\x20config\x20'+_0x3d79f8+_0x3962eb(0x1e7)+_0x22b6cc+'\x22.');return _0x4f07b7[_0x3962eb(0x241)]();}function responseNullableString(_0x469a60,_0x6e9d34,_0x2a20fc){const _0x3265cb=a157_0x959504;if(_0x469a60===undefined||_0x469a60===null)return null;if(typeof _0x469a60!==_0x3265cb(0x20b))throw notificationError(_0x3265cb(0x1d5),'Notification\x20config\x20'+_0x2a20fc+_0x3265cb(0x1e5)+_0x6e9d34+'\x22.');return _0x469a60;}function responseNullableTimeout(_0x2e28cf,_0x446c3b,_0x4d8af4){const _0x1d7ce7=a157_0x959504;if(_0x2e28cf===undefined||_0x2e28cf===null)return null;if(!Number[_0x1d7ce7(0x23e)](_0x2e28cf)||_0x2e28cf<0x0)throw notificationError(_0x1d7ce7(0x1d5),_0x1d7ce7(0x1fd)+_0x4d8af4+_0x1d7ce7(0x1e5)+_0x446c3b+'\x22.');return _0x2e28cf;}function a157_0x19c8(_0x4de368,_0x3b8639){_0x4de368=_0x4de368-0x1c7;const _0x1fc0f0=a157_0x1fc0();let _0x19c87b=_0x1fc0f0[_0x4de368];return _0x19c87b;}function normalizeNullableString(_0x385ec6){const _0xf7e520=a157_0x959504;return typeof _0x385ec6===_0xf7e520(0x20b)?_0x385ec6:null;}function isJsonObject(_0xbaa64d){const _0x133c34=a157_0x959504;return _0xbaa64d!==null&&typeof _0xbaa64d===_0x133c34(0x1f3)&&!Array[_0x133c34(0x1cb)](_0xbaa64d);}function hasOwn(_0x3fe4a7,_0x2e318f){const _0x31f9bc=a157_0x959504;return Object[_0x31f9bc(0x212)][_0x31f9bc(0x21c)][_0x31f9bc(0x218)](_0x3fe4a7,_0x2e318f);}async function readStdin(){const _0x31ef1d=a157_0x959504;let _0x3227a9='';process[_0x31ef1d(0x20f)][_0x31ef1d(0x1ff)](_0x31ef1d(0x1e2));for await(const _0x2377e4 of process[_0x31ef1d(0x20f)])_0x3227a9+=_0x2377e4;return _0x3227a9;}function a157_0x1fc0(){const _0x275463=['Notification\x20JSON\x20field\x20\x22','yes','347731SDmIFV','notification_config_id_invalid','readTimeout','Run\x20the\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','endpointUrl:null','Notification\x20JSON\x20from\x20','connectTimeout','subjectPrefix','bool','apiError','env','notification_config_update_empty','emailTargets','Create\x20JSON\x20requires\x20field\x20','parse','environment\x20variable\x20','\x20must\x20be\x20an\x20object.','file\x20','messageTemplate','number','\x20has\x20an\x20invalid\x20appCode.','1129751PlZGPf','isSafeInteger','validation','length','trim','push','a\x20string\x20or\x20null','has','update','configCode','\x20has\x20an\x20unsupported\x20channelType.','Invalid\x20--','\x20does\x20not\x20belong\x20to\x20the\x20resolved\x20app.','isArray','type','str','dry-run','entries','from-env','boolean','This\x20notification\x20config\x20mutation\x20requires\x20explicit\x20--yes.','endpointUrlRaw','a\x20JSON\x20object','notification_config_response_invalid','1454370DtkAwL','notification_config_field_forbidden','WECOM','channelType','num','ccList','162110iomuLt','\x20--type\x20<CHANNEL_TYPE>\x20--format\x20compress;\x20no\x20mutation\x20was\x20submitted.','\x20is\x20invalid.','notification_config_field_unknown','Notification\x20config\x20list\x20item\x20','mutation','utf8','Notification\x20config\x20detail\x20did\x20not\x20contain\x20the\x20requested\x20ID\x20','Provide\x20one\x20valid\x20JSON\x20object;\x20source\x20contents\x20are\x20not\x20included\x20in\x20errors.','\x20has\x20invalid\x20field\x20\x22','Application-level\x20notification\x20config\x20ID','\x20is\x20missing\x20required\x20field\x20\x22','Use\x20exactly\x20one\x20of\x20--file\x20<path>,\x20--stdin,\x20or\x20--from-env\x20<NAME>.','1263582HldKGP','Missing\x20notification\x20JSON\x20source.','Invalid\x20notification\x20config\x20response.','notification_config_','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','includes','\x20characters.','8TvETYX','Read\x20the\x20notification\x20JSON\x20document\x20from\x20a\x20UTF-8\x20file','718784JoZQWC','object','Notification\x20JSON\x20source\x20is\x20ambiguous.','notification_config_field_required','Notification\x20JSON\x20environment\x20variable\x20is\x20not\x20set:\x20','\x20--type\x20','appCode','\x22\x20is\x20forbidden.','create','Notification\x20JSON\x20channelConfig\x20field\x20\x22','kind','Notification\x20config\x20','a\x20non-empty\x20string','setEncoding','configName','stringify','\x20has\x20an\x20invalid\x20id.','\x20--format\x20compress','file','channelConfig','\x22\x20must\x20be\x20','every','Inspect\x20with\x20rabetbase\x20notification\x20config-list\x20--appcode\x20','fromName','path','string','\x20failed.','some','Unknown\x20notification\x20JSON\x20field\x20\x22','stdin','a\x20supported\x20string','name','prototype','updateTime','createTime','notification_config_field_invalid','\x22\x20cannot\x20exceed\x20','notification_config_json_invalid','call','channelConfigRaw','DINGTALK','1623165uhrrsu','hasOwnProperty','Allowed\x20values:\x20','notification_config_source_unavailable','description','567hWXFpR','join','\x22configName\x22.','notification_config_confirmation_required','endpointUrl','2ZCDPpS'];a157_0x1fc0=function(){return _0x275463;};return a157_0x1fc0();}
@@ -1 +1 @@
1
- const a158_0x3df950=a158_0xbc1a;(function(_0x5d1d96,_0x163b8a){const _0x51088f=a158_0xbc1a,_0x3a7e30=_0x5d1d96();while(!![]){try{const _0x49fa63=parseInt(_0x51088f(0xfe))/0x1*(parseInt(_0x51088f(0x109))/0x2)+parseInt(_0x51088f(0xf1))/0x3*(-parseInt(_0x51088f(0xf9))/0x4)+parseInt(_0x51088f(0x11a))/0x5*(-parseInt(_0x51088f(0xfd))/0x6)+parseInt(_0x51088f(0x10a))/0x7*(-parseInt(_0x51088f(0x11c))/0x8)+-parseInt(_0x51088f(0xee))/0x9+-parseInt(_0x51088f(0x10c))/0xa*(parseInt(_0x51088f(0xf3))/0xb)+parseInt(_0x51088f(0xfb))/0xc;if(_0x49fa63===_0x163b8a)break;else _0x3a7e30['push'](_0x3a7e30['shift']());}catch(_0x119f66){_0x3a7e30['push'](_0x3a7e30['shift']());}}}(a158_0x4cc7,0x46cd4));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';function a158_0x4cc7(){const _0x162e02=['filePath','GET','count','/smartapi/common/uploadFile','1660vYUFFe','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','1836824ucpXBB','apiError','length','IdCard','imageFile','trim','path','fileUrl','3921327EIJswG','Table','idCard','12vBtCTn','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','33CTgYyn','form','recognize','File\x20URL\x20response\x20missing\x20fileUrl.','string','<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','560684WoJRWW','toLowerCase','19947492oMVMdz','toString','3858dzXeRv','12nOEKns','/smartapi/ocr/recognize-text?','POST','appCode','invoice','ocr','File\x20upload\x20response\x20missing\x20filePath.','scene','idcard','fileName','image-url','26298rcJpAG','7iieULG','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','302030SYSwOj','/smartapi/ocr/recognize-text','image-file','general','imageUrl','Invoice','str','/smartapi/common/queryFileUrl','Preview:\x20recognize\x20','validation'];a158_0x4cc7=function(){return _0x162e02;};return a158_0x4cc7();}import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a158_0x3df950(0x102),a158_0x3df950(0x10f),a158_0x3df950(0xf4),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a158_0x3df950(0x111),'general':'General','form':a158_0x3df950(0xef),'idCard':a158_0x3df950(0x11f)},SCENE_FLAG={'name':a158_0x3df950(0x105),'type':a158_0x3df950(0xf7),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a158_0x3df950(0x11b)},IMAGE_FILE_FLAG={'name':a158_0x3df950(0x10e),'type':a158_0x3df950(0xf7),'description':a158_0x3df950(0x10b)},IMAGE_URL_FLAG={'name':a158_0x3df950(0x108),'type':a158_0x3df950(0xf7),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x4ee540){const _0x3aad2f=a158_0x3df950,_0x228cb0=_0x4ee540['trim']()[_0x3aad2f(0xfa)]();if(_0x228cb0===_0x3aad2f(0x106))return _0x3aad2f(0xf0);if(_0x228cb0===_0x3aad2f(0x102)||_0x228cb0===_0x3aad2f(0x10f)||_0x228cb0===_0x3aad2f(0xf4))return _0x228cb0;throw CliErrors[_0x3aad2f(0x115)]('Unsupported\x20OCR\x20scene:\x20'+_0x4ee540+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x5b3394){const _0x4eeece=a158_0x3df950,_0x3331d6=_0x5b3394[_0x4eeece(0x112)](_0x4eeece(0x10e))['trim'](),_0x6347c2=_0x5b3394['str'](_0x4eeece(0x108))[_0x4eeece(0xeb)]();return{'imageFile':_0x3331d6,'imageUrl':_0x6347c2,'count':[_0x3331d6,_0x6347c2]['filter'](Boolean)[_0x4eeece(0x11e)]};}function a158_0xbc1a(_0x174df2,_0x1b7f6d){_0x174df2=_0x174df2-0xea;const _0x4cc78f=a158_0x4cc7();let _0xbc1a74=_0x4cc78f[_0x174df2];return _0xbc1a74;}function validateInputSelection(_0x441629){const _0x35e3ff=a158_0x3df950,_0x3d0108=selectedInputs(_0x441629);if(_0x3d0108[_0x35e3ff(0x118)]!==0x1)throw CliErrors[_0x35e3ff(0x115)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x3d0108;}function withScene(_0x4dcbcd,_0x475cd2,_0xd80205){const _0x213621=a158_0x3df950;return{..._0x4dcbcd,'scene':_0x475cd2,..._0xd80205?{'sourceFile':{'fileName':_0xd80205[_0x213621(0x107)],'filePath':_0xd80205[_0x213621(0x116)]}}:{}};}const ocrRecognize={'service':a158_0x3df950(0x103),'command':a158_0x3df950(0xf5),'description':a158_0x3df950(0xf2),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3bd7a4){const _0x477728=a158_0x3df950,_0x4eedb1=normalizeScene(_0x3bd7a4[_0x477728(0x112)](_0x477728(0x105))),_0xdc064a=SCENE_TO_LEGACY_TYPE[_0x4eedb1],_0x4107e3=validateInputSelection(_0x3bd7a4);if(_0x4107e3[_0x477728(0x110)]){const _0x4040fd=new URLSearchParams({'url':_0x4107e3[_0x477728(0x110)],'type':_0xdc064a,'appCode':_0x3bd7a4[_0x477728(0x101)]});return{'method':_0x477728(0x117),'url':_0x477728(0xff)+_0x4040fd[_0x477728(0xfc)](),'description':_0x477728(0x114)+_0x4eedb1+'\x20OCR\x20from\x20URL'};}const _0x33d60d=requireDevelopmentUploadFile(_0x4107e3[_0x477728(0xea)],_0x477728(0x10e));return{'method':_0x477728(0x100),'url':_0x477728(0x119),'body':{'steps':[{'method':'POST','url':_0x477728(0x119),'body':{'appCode':_0x3bd7a4[_0x477728(0x101)],'multipart':{'file':_0x33d60d}}},{'method':'POST','url':_0x477728(0x113),'body':{'filePath':'<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','downloadFlag':![]}},{'method':_0x477728(0x117),'url':_0x477728(0x10d),'query':{'appCode':_0x3bd7a4[_0x477728(0x101)],'url':_0x477728(0xf8),'type':_0xdc064a}}]},'description':'Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x4eedb1+'\x20OCR'};},async 'execute'(_0x59e373){const _0x505a27=a158_0x3df950,_0x32d0f4=normalizeScene(_0x59e373[_0x505a27(0x112)](_0x505a27(0x105))),_0x5d8fd5=SCENE_TO_LEGACY_TYPE[_0x32d0f4],_0xf4f8bf=validateInputSelection(_0x59e373);if(_0xf4f8bf['imageUrl']){const _0x5209ae=await recognizeDevelopmentOcr(_0x59e373['appCode'],{'url':_0xf4f8bf['imageUrl'],'type':_0x5d8fd5});return{'ok':!![],'data':withScene(_0x5209ae,_0x32d0f4)};}const _0x47ea69=requireDevelopmentUploadFile(_0xf4f8bf[_0x505a27(0xea)],_0x505a27(0x10e)),_0x860fa5=await uploadDevelopmentFile(_0x59e373[_0x505a27(0x101)],_0x47ea69[_0x505a27(0xec)]);if(!_0x860fa5['filePath'])throw CliErrors[_0x505a27(0x11d)](_0x505a27(0x104));const _0x4da50a=await queryDevelopmentFileUrl(_0x860fa5[_0x505a27(0x116)],{'download':![]});if(!_0x4da50a[_0x505a27(0xed)])throw CliErrors[_0x505a27(0x11d)](_0x505a27(0xf6));const _0x53abf7=await recognizeDevelopmentOcr(_0x59e373[_0x505a27(0x101)],{'url':_0x4da50a[_0x505a27(0xed)],'type':_0x5d8fd5});return{'ok':!![],'data':withScene(_0x53abf7,_0x32d0f4,_0x860fa5)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a158_0x49ddc7=a158_0x592f;(function(_0x3397b4,_0x34d9ee){const _0x2c6cc=a158_0x592f,_0xf7db4c=_0x3397b4();while(!![]){try{const _0x5515f4=-parseInt(_0x2c6cc(0x1d1))/0x1*(-parseInt(_0x2c6cc(0x1d0))/0x2)+parseInt(_0x2c6cc(0x1f0))/0x3+-parseInt(_0x2c6cc(0x1d3))/0x4*(parseInt(_0x2c6cc(0x1d4))/0x5)+parseInt(_0x2c6cc(0x1c1))/0x6+parseInt(_0x2c6cc(0x1c7))/0x7*(-parseInt(_0x2c6cc(0x1f1))/0x8)+-parseInt(_0x2c6cc(0x1da))/0x9+parseInt(_0x2c6cc(0x1df))/0xa;if(_0x5515f4===_0x34d9ee)break;else _0xf7db4c['push'](_0xf7db4c['shift']());}catch(_0x57737e){_0xf7db4c['push'](_0xf7db4c['shift']());}}}(a158_0x1be4,0x88a5e));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,recognizeDevelopmentOcr,uploadDevelopmentFile}from'../../core/api-client.js';function a158_0x592f(_0x3b8853,_0x4f3e64){_0x3b8853=_0x3b8853-0x1bd;const _0x1be421=a158_0x1be4();let _0x592f6a=_0x1be421[_0x3b8853];return _0x592f6a;}import{CliErrors}from'../../errors.js';const SUPPORTED_SCENES=[a158_0x49ddc7(0x1be),a158_0x49ddc7(0x1c0),a158_0x49ddc7(0x1cd),a158_0x49ddc7(0x1c4)],SCENE_TO_LEGACY_TYPE={'invoice':a158_0x49ddc7(0x1cb),'general':a158_0x49ddc7(0x1c9),'form':'Table','idCard':a158_0x49ddc7(0x1e6)},SCENE_FLAG={'name':a158_0x49ddc7(0x1e5),'type':a158_0x49ddc7(0x1ec),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a158_0x49ddc7(0x1d7)},IMAGE_FILE_FLAG={'name':a158_0x49ddc7(0x1db),'type':a158_0x49ddc7(0x1ec),'description':a158_0x49ddc7(0x1e4)},IMAGE_URL_FLAG={'name':a158_0x49ddc7(0x1dd),'type':a158_0x49ddc7(0x1ec),'description':a158_0x49ddc7(0x1e3)};function normalizeScene(_0x508df4){const _0x5403de=a158_0x49ddc7,_0x417b99=_0x508df4[_0x5403de(0x1c6)]()[_0x5403de(0x1ef)]();if(_0x417b99===_0x5403de(0x1e1))return'idCard';if(_0x417b99===_0x5403de(0x1be)||_0x417b99===_0x5403de(0x1c0)||_0x417b99==='form')return _0x417b99;throw CliErrors[_0x5403de(0x1cc)](_0x5403de(0x1bd)+_0x508df4+_0x5403de(0x1dc)+SUPPORTED_SCENES[_0x5403de(0x1ee)](',\x20'));}function a158_0x1be4(){const _0x410d2=['idcard','apiError','Publicly\x20accessible\x20image\x20or\x20file\x20URL','Local\x20image\x20or\x20PDF\x20file;\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','scene','IdCard','\x20OCR','/smartapi/common/uploadFile','Extract\x20text\x20and\x20structured\x20fields\x20from\x20voucher-style\x20business\x20documents;\x20not\x20for\x20general\x20image\x20understanding','toString','recognize','string','File\x20URL\x20response\x20missing\x20fileUrl.','join','toLowerCase','796929HWvaLf','8lkWiYC','/smartapi/ocr/recognize-text?','Unsupported\x20OCR\x20scene:\x20','invoice','appCode','general','5131656jZysGa','Preview:\x20recognize\x20','GET','idCard','fileName','trim','2000838HaKTuB','/smartapi/common/queryFileUrl','General','fileUrl','Invoice','validation','form','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','POST','8GbZzsh','76753XutMlp','path','4FiWeYH','3036065oeEcTO','<filePath\x20returned\x20by\x20/smartapi/common/uploadFile>','filePath','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','str','imageUrl','122229vTYDTB','image-file','.\x20Supported\x20scenes:\x20','image-url','\x20OCR\x20from\x20URL','384070DQCAnh','imageFile'];a158_0x1be4=function(){return _0x410d2;};return a158_0x1be4();}function selectedInputs(_0x4e767a){const _0x214605=a158_0x49ddc7,_0x44dfb6=_0x4e767a['str'](_0x214605(0x1db))['trim'](),_0x12d921=_0x4e767a[_0x214605(0x1d8)]('image-url')['trim']();return{'imageFile':_0x44dfb6,'imageUrl':_0x12d921,'count':[_0x44dfb6,_0x12d921]['filter'](Boolean)['length']};}function validateInputSelection(_0x4ceb1a){const _0x546436=a158_0x49ddc7,_0x5d3b1d=selectedInputs(_0x4ceb1a);if(_0x5d3b1d['count']!==0x1)throw CliErrors[_0x546436(0x1cc)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x5d3b1d;}function withScene(_0x259f0a,_0x1fa70a,_0x339080){const _0x3ee604=a158_0x49ddc7;return{..._0x259f0a,'scene':_0x1fa70a,..._0x339080?{'sourceFile':{'fileName':_0x339080[_0x3ee604(0x1c5)],'filePath':_0x339080['filePath']}}:{}};}const ocrRecognize={'service':'ocr','command':a158_0x49ddc7(0x1eb),'description':a158_0x49ddc7(0x1e9),'risk':'read','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3b0ab3){const _0x761f90=a158_0x49ddc7,_0x200566=normalizeScene(_0x3b0ab3['str']('scene')),_0x2d4b89=SCENE_TO_LEGACY_TYPE[_0x200566],_0x335d56=validateInputSelection(_0x3b0ab3);if(_0x335d56['imageUrl']){const _0x88f95c=new URLSearchParams({'url':_0x335d56['imageUrl'],'type':_0x2d4b89,'appCode':_0x3b0ab3[_0x761f90(0x1bf)]});return{'method':'GET','url':_0x761f90(0x1f2)+_0x88f95c[_0x761f90(0x1ea)](),'description':_0x761f90(0x1c2)+_0x200566+_0x761f90(0x1de)};}const _0x939bc8=requireDevelopmentUploadFile(_0x335d56[_0x761f90(0x1e0)],_0x761f90(0x1db));return{'method':'POST','url':'/smartapi/common/uploadFile','body':{'steps':[{'method':_0x761f90(0x1cf),'url':_0x761f90(0x1e8),'body':{'appCode':_0x3b0ab3[_0x761f90(0x1bf)],'multipart':{'file':_0x939bc8}}},{'method':_0x761f90(0x1cf),'url':_0x761f90(0x1c8),'body':{'filePath':_0x761f90(0x1d5),'downloadFlag':![]}},{'method':_0x761f90(0x1c3),'url':'/smartapi/ocr/recognize-text','query':{'appCode':_0x3b0ab3[_0x761f90(0x1bf)],'url':'<fileUrl\x20returned\x20by\x20/smartapi/common/queryFileUrl>','type':_0x2d4b89}}]},'description':_0x761f90(0x1ce)+_0x200566+_0x761f90(0x1e7)};},async 'execute'(_0x4becb8){const _0x555c2d=a158_0x49ddc7,_0xf9049c=normalizeScene(_0x4becb8[_0x555c2d(0x1d8)]('scene')),_0x5e0fb5=SCENE_TO_LEGACY_TYPE[_0xf9049c],_0x20003c=validateInputSelection(_0x4becb8);if(_0x20003c[_0x555c2d(0x1d9)]){const _0x3dbac2=await recognizeDevelopmentOcr(_0x4becb8[_0x555c2d(0x1bf)],{'url':_0x20003c[_0x555c2d(0x1d9)],'type':_0x5e0fb5});return{'ok':!![],'data':withScene(_0x3dbac2,_0xf9049c)};}const _0x5f42ab=requireDevelopmentUploadFile(_0x20003c[_0x555c2d(0x1e0)],_0x555c2d(0x1db)),_0x467df1=await uploadDevelopmentFile(_0x4becb8[_0x555c2d(0x1bf)],_0x5f42ab[_0x555c2d(0x1d2)]);if(!_0x467df1[_0x555c2d(0x1d6)])throw CliErrors[_0x555c2d(0x1e2)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x4c27d2=await queryDevelopmentFileUrl(_0x467df1[_0x555c2d(0x1d6)],{'download':![]});if(!_0x4c27d2[_0x555c2d(0x1ca)])throw CliErrors[_0x555c2d(0x1e2)](_0x555c2d(0x1ed));const _0x4a25cf=await recognizeDevelopmentOcr(_0x4becb8[_0x555c2d(0x1bf)],{'url':_0x4c27d2[_0x555c2d(0x1ca)],'type':_0x5e0fb5});return{'ok':!![],'data':withScene(_0x4a25cf,_0xf9049c,_0x467df1)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a159_0x3fe597=a159_0x9571;function a159_0x9571(_0x33442f,_0x2d0839){_0x33442f=_0x33442f-0x1d6;const _0x17d522=a159_0x17d5();let _0x957136=_0x17d522[_0x33442f];return _0x957136;}(function(_0x2508b3,_0x325705){const _0x4720d2=a159_0x9571,_0x44f2d1=_0x2508b3();while(!![]){try{const _0x30abcf=parseInt(_0x4720d2(0x209))/0x1*(parseInt(_0x4720d2(0x1ea))/0x2)+-parseInt(_0x4720d2(0x210))/0x3*(parseInt(_0x4720d2(0x20f))/0x4)+-parseInt(_0x4720d2(0x1d9))/0x5+-parseInt(_0x4720d2(0x202))/0x6*(parseInt(_0x4720d2(0x1dd))/0x7)+-parseInt(_0x4720d2(0x215))/0x8*(parseInt(_0x4720d2(0x1ef))/0x9)+parseInt(_0x4720d2(0x1dc))/0xa*(-parseInt(_0x4720d2(0x212))/0xb)+-parseInt(_0x4720d2(0x1db))/0xc*(-parseInt(_0x4720d2(0x200))/0xd);if(_0x30abcf===_0x325705)break;else _0x44f2d1['push'](_0x44f2d1['shift']());}catch(_0x589ddd){_0x44f2d1['push'](_0x44f2d1['shift']());}}}(a159_0x17d5,0x1c379));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';function a159_0x17d5(){const _0x41dce7=['/smartapi/webcode/page/create','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','286twvNZa','parse','30LKGYlN','page\x20create\x20does\x20not\x20accept\x20--page-type.','stringify','page-pattern','pageName','keys','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','20zSvTAU','includes','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','pageId','\x20and\x20its\x20menu\x20entry.','Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)','105816ivVqep','12mJAyTU','Custom_page_','2067439yyIdtu','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','object','1581176UtRoIy','menuPath','appCode','.json','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','validation','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','isNaN','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','361845qIYlId','page-type','258828kEZkwj','10ReXHfy','11284ZUohfJ','some','length','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','string','Would\x20create\x20Custom\x20Page\x20','page-dir','Invalid\x20Custom\x20Page\x20pattern:\x20','apiError','now','DASHBOARD','files','str','21290KecQKD','Created\x20Custom\x20Page\x20','isArray','version','--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.','9WKKBuk','parentMenuId','../../../templates/custom-pages','trim','page.create','page-content','isInteger','Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','utf8','page','BLANK','parent-menu-id','Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)','values','create'];a159_0x17d5=function(){return _0x41dce7;};return a159_0x17d5();}import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a159_0x3fe597(0x1f9),'ONEPAGE',a159_0x3fe597(0x1e7)],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a159_0x3fe597(0x1f1));export const pageCreate={'service':a159_0x3fe597(0x1f8),'command':a159_0x3fe597(0x1fd),'description':a159_0x3fe597(0x1f6),'risk':'write','defaultOutputFormat':'compress','structuredErrors':!![],'rejectedFlags':[{'name':a159_0x3fe597(0x1da),'message':a159_0x3fe597(0x203),'hint':a159_0x3fe597(0x1d6)},{'name':a159_0x3fe597(0x1f4),'message':a159_0x3fe597(0x1d8),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'name','type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x1fb)},{'name':a159_0x3fe597(0x1fa),'type':'number','description':a159_0x3fe597(0x1e0)},{'name':'page-pattern','type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x1ff),'enum':CUSTOM_PAGE_PATTERNS},{'name':a159_0x3fe597(0x1e3),'type':a159_0x3fe597(0x1e1),'description':a159_0x3fe597(0x20e)},APPCODE_FLAG],async 'validate'(_0x3f7b92){await readValidatedPageSource(_0x3f7b92);},async 'dryRun'(_0x551df5){const _0x5ce1e2=a159_0x3fe597,_0x5d86d7=readInput(_0x551df5,await readValidatedPageSource(_0x551df5));return{'method':'POST','url':_0x5ce1e2(0x1fe),'body':{'appCode':_0x5d86d7['appCode'],'pageName':_0x5d86d7[_0x5ce1e2(0x206)],..._0x5d86d7['parentMenuId']!=null?{'parentMenuId':_0x5d86d7[_0x5ce1e2(0x1f0)]}:{},'createMenu':_0x5d86d7['createMenu'],'codeContent':_0x5d86d7[_0x5ce1e2(0x1e8)]},'description':_0x5ce1e2(0x1e2)+JSON[_0x5ce1e2(0x204)](_0x5d86d7['pageName'])+_0x5ce1e2(0x20d)};},async 'execute'(_0x1fa884){const _0x1a4a71=a159_0x3fe597,_0x49747e=readInput(_0x1fa884,await readValidatedPageSource(_0x1fa884)),_0x8dd575=await createCustomPage(_0x49747e);if(!Number[_0x1a4a71(0x1f5)](_0x8dd575[_0x1a4a71(0x20c)])||_0x8dd575[_0x1a4a71(0x20c)]<=0x0)throw CliErrors[_0x1a4a71(0x1e5)](_0x1a4a71(0x20b));const _0x5c009e=buildCustomPageDevelopmentUrl(_0x49747e[_0x1a4a71(0x217)],_0x8dd575[_0x1a4a71(0x216)]),_0x5b83ba=buildCustomPageEditUrl(_0x49747e[_0x1a4a71(0x217)],_0x8dd575['pageId']);return{'ok':!![],'data':{'operation':_0x1a4a71(0x1f3),'pageType':'CUSTOM','pagePattern':readPagePattern(_0x1fa884),'selector':{'appCode':_0x49747e[_0x1a4a71(0x217)],'pageName':_0x49747e[_0x1a4a71(0x206)]},'before':null,'after':{'pageId':_0x8dd575['pageId'],'pageName':_0x8dd575[_0x1a4a71(0x206)],'appCode':_0x8dd575[_0x1a4a71(0x217)],'version':_0x8dd575[_0x1a4a71(0x1ed)],'menuId':_0x8dd575['menuId'],'menuPath':_0x8dd575[_0x1a4a71(0x216)],'files':_0x8dd575[_0x1a4a71(0x1e8)]??Object[_0x1a4a71(0x207)](_0x49747e[_0x1a4a71(0x1e8)])},'dryRun':![],'request':_0x49747e,..._0x5c009e?{'pageUrl':_0x5c009e}:{},..._0x5b83ba?{'editPageUrl':_0x5b83ba}:{},'warnings':_0x5c009e?[]:[_0x1a4a71(0x213)]},'message':_0x1a4a71(0x1eb)+_0x8dd575['pageId']+'.'};}};function readPagePattern(_0x2c38f8){const _0x514b3c=a159_0x3fe597,_0x8300a5=_0x2c38f8[_0x514b3c(0x1e9)](_0x514b3c(0x205))[_0x514b3c(0x1f2)](),_0x3440ad=_0x2c38f8[_0x514b3c(0x1e9)]('page-dir')['trim']();if(_0x8300a5&&_0x3440ad)throw CliErrors[_0x514b3c(0x21a)](_0x514b3c(0x1ee));if(_0x3440ad)return null;if(!_0x8300a5)throw CliErrors[_0x514b3c(0x21a)]('Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.');if(!CUSTOM_PAGE_PATTERNS[_0x514b3c(0x20a)](_0x8300a5))throw CliErrors[_0x514b3c(0x21a)](_0x514b3c(0x219));return _0x8300a5;}async function readPageSource(_0x51f76d){const _0x4019cc=a159_0x3fe597,_0xac43d4=_0x51f76d[_0x4019cc(0x1e9)]('page-dir')['trim'](),_0x2a99f5=readPagePattern(_0x51f76d);if(_0x2a99f5===null){const _0x583c9d=await readCustomPageDirectory(_0xac43d4);if(Object['keys'](_0x583c9d)[_0x4019cc(0x1df)]===0x0)throw CliErrors[_0x4019cc(0x21a)](_0x4019cc(0x208));return _0x583c9d;}let _0x4cae47;try{_0x4cae47=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x2a99f5['toLowerCase']()+_0x4019cc(0x218)),_0x4019cc(0x1f7));}catch{throw CliErrors[_0x4019cc(0x21a)]('Custom\x20Page\x20pattern\x20not\x20found:\x20'+_0x2a99f5+'.');}let _0x1b5592;try{_0x1b5592=JSON[_0x4019cc(0x201)](_0x4cae47);}catch{throw CliErrors['validation']('Invalid\x20Custom\x20Page\x20pattern:\x20'+_0x2a99f5+'.');}if(!_0x1b5592||typeof _0x1b5592!==_0x4019cc(0x214)||Array[_0x4019cc(0x1ec)](_0x1b5592)||Object[_0x4019cc(0x1fc)](_0x1b5592)[_0x4019cc(0x1de)](_0x46a6f7=>typeof _0x46a6f7!==_0x4019cc(0x1e1)))throw CliErrors[_0x4019cc(0x21a)](_0x4019cc(0x1e4)+_0x2a99f5+'.');return _0x1b5592;}async function readValidatedPageSource(_0x2230a0){const _0x2ee6e6=await readPageSource(_0x2230a0);return await validateCustomPageContent(_0x2ee6e6),_0x2ee6e6;}function readInput(_0x5bb56f,_0x932e52){const _0x5e6ff0=a159_0x3fe597,_0x52b95e=_0x5bb56f[_0x5e6ff0(0x1e9)]('name')[_0x5e6ff0(0x1f2)]()||_0x5e6ff0(0x211)+Date[_0x5e6ff0(0x1e6)]();if(_0x52b95e[_0x5e6ff0(0x1df)]>0x64)throw CliErrors[_0x5e6ff0(0x21a)]('pageName\x20cannot\x20exceed\x20100\x20characters.');const _0x300358=_0x5bb56f['num']('parent-menu-id',NaN),_0x2c4105=!Number[_0x5e6ff0(0x1d7)](_0x300358);if(_0x2c4105&&(!Number[_0x5e6ff0(0x1f5)](_0x300358)||_0x300358<=0x0))throw CliErrors[_0x5e6ff0(0x21a)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x5bb56f[_0x5e6ff0(0x217)],'pageName':_0x52b95e,..._0x2c4105?{'parentMenuId':_0x300358}:{},'createMenu':!![],'files':_0x932e52};}
1
+ function a159_0x6f91(_0x23ecb9,_0x4371ae){_0x23ecb9=_0x23ecb9-0xe6;const _0x1a75f5=a159_0x1a75();let _0x6f91ee=_0x1a75f5[_0x23ecb9];return _0x6f91ee;}const a159_0x1f8526=a159_0x6f91;(function(_0x535cc6,_0x19ba75){const _0x261654=a159_0x6f91,_0x351881=_0x535cc6();while(!![]){try{const _0x55bc59=parseInt(_0x261654(0x101))/0x1*(-parseInt(_0x261654(0x124))/0x2)+parseInt(_0x261654(0x116))/0x3+parseInt(_0x261654(0x100))/0x4+-parseInt(_0x261654(0xf9))/0x5*(-parseInt(_0x261654(0xfe))/0x6)+parseInt(_0x261654(0xf7))/0x7+parseInt(_0x261654(0xfd))/0x8+-parseInt(_0x261654(0x10e))/0x9;if(_0x55bc59===_0x19ba75)break;else _0x351881['push'](_0x351881['shift']());}catch(_0x1e747a){_0x351881['push'](_0x351881['shift']());}}}(a159_0x1a75,0xa3da6));import{readFile}from'node:fs/promises';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{APPCODE_FLAG}from'../../commands/common/flags.js';import{readCustomPageDirectory}from'../../core/page/file-system.js';import{createCustomPage}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl,validateCustomPageContent}from'./custom/shared.js';const CUSTOM_PAGE_PATTERNS=[a159_0x1f8526(0xfa),a159_0x1f8526(0x102),'DASHBOARD'],CUSTOM_PAGE_TEMPLATE_DIR=resolve(dirname(fileURLToPath(import.meta.url)),a159_0x1f8526(0xee));export const pageCreate={'service':'page','command':'create','description':'Create\x20a\x20JSX\x20Custom\x20Page\x20from\x20a\x20released\x20pattern\x20or\x20local\x20directory','risk':a159_0x1f8526(0x105),'defaultOutputFormat':a159_0x1f8526(0x122),'structuredErrors':!![],'rejectedFlags':[{'name':a159_0x1f8526(0xfb),'message':a159_0x1f8526(0x11c),'hint':a159_0x1f8526(0xf6)},{'name':a159_0x1f8526(0xff),'message':a159_0x1f8526(0x121),'hint':a159_0x1f8526(0xe8)}],'flags':[{'name':a159_0x1f8526(0x115),'type':a159_0x1f8526(0xeb),'description':'Optional\x20Custom\x20Page\x20name\x20(1-100\x20characters)'},{'name':a159_0x1f8526(0x11e),'type':a159_0x1f8526(0x110),'description':a159_0x1f8526(0xea)},{'name':a159_0x1f8526(0xf8),'type':a159_0x1f8526(0xeb),'description':a159_0x1f8526(0xf4),'enum':CUSTOM_PAGE_PATTERNS},{'name':a159_0x1f8526(0x11b),'type':a159_0x1f8526(0xeb),'description':'Directory\x20containing\x20all\x20page\x20files\x20(cannot\x20be\x20used\x20with\x20--page-pattern)'},APPCODE_FLAG],async 'validate'(_0x545b48){await readValidatedPageSource(_0x545b48);},async 'dryRun'(_0x56a037){const _0xcb7b2e=a159_0x1f8526,_0x43f06d=readInput(_0x56a037,await readValidatedPageSource(_0x56a037));return{'method':_0xcb7b2e(0x10a),'url':_0xcb7b2e(0x109),'body':{'appCode':_0x43f06d[_0xcb7b2e(0x104)],'pageName':_0x43f06d[_0xcb7b2e(0xec)],..._0x43f06d[_0xcb7b2e(0x126)]!=null?{'parentMenuId':_0x43f06d['parentMenuId']}:{},'createMenu':_0x43f06d[_0xcb7b2e(0xf1)],'codeContent':_0x43f06d[_0xcb7b2e(0x111)]},'description':_0xcb7b2e(0x125)+JSON['stringify'](_0x43f06d[_0xcb7b2e(0xec)])+'\x20and\x20its\x20menu\x20entry.'};},async 'execute'(_0x44ecc8){const _0x358597=a159_0x1f8526,_0x18df6a=readInput(_0x44ecc8,await readValidatedPageSource(_0x44ecc8)),_0x1c453f=await createCustomPage(_0x18df6a);if(!Number[_0x358597(0xf0)](_0x1c453f['pageId'])||_0x1c453f[_0x358597(0x11f)]<=0x0)throw CliErrors['apiError'](_0x358597(0xe7));const _0x11e572=buildCustomPageDevelopmentUrl(_0x18df6a[_0x358597(0x104)],_0x1c453f[_0x358597(0x10f)]),_0x51c880=buildCustomPageEditUrl(_0x18df6a[_0x358597(0x104)],_0x1c453f[_0x358597(0x11f)]);return{'ok':!![],'data':{'operation':'page.create','pageType':'CUSTOM','pagePattern':readPagePattern(_0x44ecc8),'selector':{'appCode':_0x18df6a[_0x358597(0x104)],'pageName':_0x18df6a[_0x358597(0xec)]},'before':null,'after':{'pageId':_0x1c453f[_0x358597(0x11f)],'pageName':_0x1c453f[_0x358597(0xec)],'appCode':_0x1c453f[_0x358597(0x104)],'version':_0x1c453f[_0x358597(0xfc)],'menuId':_0x1c453f['menuId'],'menuPath':_0x1c453f[_0x358597(0x10f)],'files':_0x1c453f[_0x358597(0x111)]??Object['keys'](_0x18df6a['files'])},'dryRun':![],'request':_0x18df6a,..._0x11e572?{'pageUrl':_0x11e572}:{},..._0x51c880?{'editPageUrl':_0x51c880}:{},'warnings':_0x11e572?[]:[_0x358597(0x118)]},'message':_0x358597(0x108)+_0x1c453f[_0x358597(0x11f)]+'.'};}};function readPagePattern(_0x82c989){const _0x595f21=a159_0x1f8526,_0x2ace44=_0x82c989[_0x595f21(0x103)](_0x595f21(0xf8))['trim'](),_0x105e84=_0x82c989[_0x595f21(0x103)](_0x595f21(0x11b))[_0x595f21(0xf3)]();if(_0x2ace44&&_0x105e84)throw CliErrors[_0x595f21(0x114)]('--page-pattern\x20and\x20--page-dir\x20cannot\x20be\x20used\x20together.');if(_0x105e84)return null;if(!_0x2ace44)throw CliErrors['validation'](_0x595f21(0x123));if(!CUSTOM_PAGE_PATTERNS[_0x595f21(0xf5)](_0x2ace44))throw CliErrors[_0x595f21(0x114)](_0x595f21(0xf2));return _0x2ace44;}async function readPageSource(_0x269cb1){const _0x51092f=a159_0x1f8526,_0xe2b3c0=_0x269cb1[_0x51092f(0x103)]('page-dir')['trim'](),_0x320cc3=readPagePattern(_0x269cb1);if(_0x320cc3===null){const _0xf0584f=await readCustomPageDirectory(_0xe2b3c0);if(Object['keys'](_0xf0584f)[_0x51092f(0xed)]===0x0)throw CliErrors[_0x51092f(0x114)](_0x51092f(0x117));return _0xf0584f;}let _0x242f12;try{_0x242f12=await readFile(join(CUSTOM_PAGE_TEMPLATE_DIR,_0x320cc3[_0x51092f(0xe6)]()+_0x51092f(0xef)),_0x51092f(0x11a));}catch{throw CliErrors['validation'](_0x51092f(0x10d)+_0x320cc3+'.');}let _0x10683d;try{_0x10683d=JSON['parse'](_0x242f12);}catch{throw CliErrors['validation'](_0x51092f(0xe9)+_0x320cc3+'.');}if(!_0x10683d||typeof _0x10683d!==_0x51092f(0x10c)||Array[_0x51092f(0x10b)](_0x10683d)||Object[_0x51092f(0x120)](_0x10683d)[_0x51092f(0x106)](_0x494e92=>typeof _0x494e92!==_0x51092f(0xeb)))throw CliErrors[_0x51092f(0x114)](_0x51092f(0xe9)+_0x320cc3+'.');return _0x10683d;}async function readValidatedPageSource(_0x3d2051){const _0x2b3471=await readPageSource(_0x3d2051);return await validateCustomPageContent(_0x2b3471),_0x2b3471;}function a159_0x1a75(){const _0xe75df0=['4751240RlWpZa','70362HkjzJp','page-content','5281844OpVmad','128TrDefb','ONEPAGE','str','appCode','write','some','Custom_page_','Created\x20Custom\x20Page\x20','/smartapi/webcode/page/create','POST','isArray','object','Custom\x20Page\x20pattern\x20not\x20found:\x20','25561458bjPFqv','menuPath','number','files','isNaN','num','validation','name','3905013GXyQrI','--page-dir\x20must\x20contain\x20at\x20least\x20one\x20page\x20file.','Custom\x20Page\x20was\x20created,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','pageName\x20cannot\x20exceed\x20100\x20characters.','utf8','page-dir','page\x20create\x20does\x20not\x20accept\x20--page-type.','now','parent-menu-id','pageId','values','page\x20create\x20no\x20longer\x20accepts\x20--page-content.','compress','Provide\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir\x20<dir>.','2328ECynZJ','Would\x20create\x20Custom\x20Page\x20','parentMenuId','toLowerCase','Custom\x20Page\x20creation\x20did\x20not\x20return\x20a\x20valid\x20pageId.','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','Invalid\x20Custom\x20Page\x20pattern:\x20','Optional\x20parent\x20menu\x20id\x20when\x20creating\x20a\x20menu\x20entry','string','pageName','length','../../../templates/custom-pages','.json','isInteger','createMenu','--page-pattern\x20must\x20be\x20BLANK,\x20ONEPAGE,\x20or\x20DASHBOARD.','trim','Built-in\x20Custom\x20Page\x20pattern\x20(cannot\x20be\x20used\x20with\x20--page-dir)','includes','This\x20command\x20always\x20creates\x20a\x20CUSTOM\x20JSX\x20page;\x20use\x20--page-pattern\x20BLANK,\x20ONEPAGE,\x20DASHBOARD,\x20or\x20--page-dir.','1878478tSRMmb','page-pattern','75EBVJzP','BLANK','page-type','version'];a159_0x1a75=function(){return _0xe75df0;};return a159_0x1a75();}function readInput(_0x3dd68f,_0x441b1e){const _0x53a915=a159_0x1f8526,_0x552028=_0x3dd68f[_0x53a915(0x103)](_0x53a915(0x115))[_0x53a915(0xf3)]()||_0x53a915(0x107)+Date[_0x53a915(0x11d)]();if(_0x552028[_0x53a915(0xed)]>0x64)throw CliErrors[_0x53a915(0x114)](_0x53a915(0x119));const _0x3ab24f=_0x3dd68f[_0x53a915(0x113)](_0x53a915(0x11e),NaN),_0xefa2ff=!Number[_0x53a915(0x112)](_0x3ab24f);if(_0xefa2ff&&(!Number['isInteger'](_0x3ab24f)||_0x3ab24f<=0x0))throw CliErrors[_0x53a915(0x114)]('--parent-menu-id\x20must\x20be\x20a\x20positive\x20integer.');return{'appCode':_0x3dd68f[_0x53a915(0x104)],'pageName':_0x552028,..._0xefa2ff?{'parentMenuId':_0x3ab24f}:{},'createMenu':!![],'files':_0x441b1e};}
@@ -1 +1 @@
1
- const a160_0x37fa01=a160_0x151e;(function(_0x1630b3,_0x3387ce){const _0x28b8c6=a160_0x151e,_0x4df038=_0x1630b3();while(!![]){try{const _0x2b718c=-parseInt(_0x28b8c6(0xb9))/0x1+-parseInt(_0x28b8c6(0xa8))/0x2*(-parseInt(_0x28b8c6(0xab))/0x3)+-parseInt(_0x28b8c6(0xae))/0x4+parseInt(_0x28b8c6(0xaa))/0x5*(-parseInt(_0x28b8c6(0xb4))/0x6)+-parseInt(_0x28b8c6(0xad))/0x7*(parseInt(_0x28b8c6(0xb5))/0x8)+-parseInt(_0x28b8c6(0xb6))/0x9+parseInt(_0x28b8c6(0xb0))/0xa;if(_0x2b718c===_0x3387ce)break;else _0x4df038['push'](_0x4df038['shift']());}catch(_0x2d24b7){_0x4df038['push'](_0x4df038['shift']());}}}(a160_0x6773,0xe2221));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomDetail={'service':a160_0x37fa01(0xbe),'command':a160_0x37fa01(0xbc),'description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':'read','defaultOutputFormat':a160_0x37fa01(0xbb),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a160_0x37fa01(0xa6),'required':!![],'description':'Custom\x20Page\x20ID'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x13fc05){readCustomPageId(_0x13fc05);},async 'execute'(_0x14fcc4){const _0x10e205=a160_0x37fa01,_0x53bd25=readCustomPageId(_0x14fcc4),_0x1e4f00=await getCustomPageSource(_0x53bd25),{bundle:_0x392725,createTime:_0x45de4f,updateTime:_0x506361,..._0x3ecdc2}=_0x1e4f00,_0x380991=_0x1e4f00['id']??_0x53bd25,_0x16b045=_0x1e4f00['appCode']?.[_0x10e205(0xa7)]()||_0x14fcc4[_0x10e205(0xa5)](_0x10e205(0xb1))['trim'](),_0x3ebc46=buildCustomPageRuntimeUrl(_0x16b045,_0x1e4f00[_0x10e205(0xb8)]),_0x110efe=buildCustomPageEditUrl(_0x16b045,_0x380991),_0x469db2=await resolveCustomPageDevelopmentUrl(_0x16b045,_0x380991,_0x14fcc4['cookie']);return{'ok':!![],'data':{..._0x3ecdc2,..._0x3ebc46?{'runtimePageUrl':_0x3ebc46}:{},..._0x469db2?{'pageUrl':_0x469db2}:{},..._0x110efe?{'editPageUrl':_0x110efe}:{},..._0x45de4f==null?{}:{'createTime':formatTime(_0x45de4f)},..._0x506361==null?{}:{'updateTime':formatTime(_0x506361)}},'message':'Retrieved\x20Custom\x20Page\x20'+_0x53bd25+'.'};}};function a160_0x151e(_0x496ce2,_0x5b6edc){_0x496ce2=_0x496ce2-0xa4;const _0x67735e=a160_0x6773();let _0x151e8d=_0x67735e[_0x496ce2];return _0x151e8d;}function formatTime(_0xa7d899){const _0x46b2bc=a160_0x37fa01,_0x565103=new Date(_0xa7d899);if(Number[_0x46b2bc(0xa4)](_0x565103[_0x46b2bc(0xac)]()))return String(_0xa7d899);const _0x18c8eb=[_0x565103['getFullYear'](),String(_0x565103[_0x46b2bc(0xaf)]()+0x1)[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xbd)]())['padStart'](0x2,'0')][_0x46b2bc(0xba)]('-'),_0x5b37cd=[String(_0x565103[_0x46b2bc(0xb7)]())[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xb2)]())[_0x46b2bc(0xa9)](0x2,'0'),String(_0x565103[_0x46b2bc(0xb3)]())['padStart'](0x2,'0')]['join'](':');return _0x18c8eb+'\x20'+_0x5b37cd;}function a160_0x6773(){const _0x362320=['1718KaJqPv','padStart','14765KaZYXx','6189ULxxZq','getTime','7VdeObD','7091476JATmXg','getMonth','50745600NDzGkG','appcode','getMinutes','getSeconds','2958ozCmtV','11049544chnwOH','5669442IfRgtg','getHours','pageCode','680607WeKHei','join','compress','custom-detail','getDate','page','isNaN','str','number','trim'];a160_0x6773=function(){return _0x362320;};return a160_0x6773();}
1
+ const a160_0x7c24b6=a160_0x1df4;function a160_0x1df4(_0x22bbdb,_0x555480){_0x22bbdb=_0x22bbdb-0xf9;const _0x55c769=a160_0x55c7();let _0x1df41f=_0x55c769[_0x22bbdb];return _0x1df41f;}(function(_0x5af976,_0x22c217){const _0x34473c=a160_0x1df4,_0x375f36=_0x5af976();while(!![]){try{const _0x98b72f=-parseInt(_0x34473c(0x107))/0x1*(-parseInt(_0x34473c(0x10d))/0x2)+parseInt(_0x34473c(0x104))/0x3+parseInt(_0x34473c(0x10a))/0x4*(-parseInt(_0x34473c(0xfe))/0x5)+-parseInt(_0x34473c(0x10e))/0x6+parseInt(_0x34473c(0x103))/0x7+-parseInt(_0x34473c(0x109))/0x8+-parseInt(_0x34473c(0x108))/0x9;if(_0x98b72f===_0x22c217)break;else _0x375f36['push'](_0x375f36['shift']());}catch(_0x37d042){_0x375f36['push'](_0x375f36['shift']());}}}(a160_0x55c7,0xd6218));import{getCustomPageSource}from'../../../core/api-client.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,resolveCustomPageDevelopmentUrl}from'./shared.js';function a160_0x55c7(){const _0x1c1aa2=['6RmMgdi','2467578JlJrAg','isNaN','page','getFullYear','getTime','read','number','trim','5sNmvxb','Custom\x20Page\x20ID','Retrieved\x20Custom\x20Page\x20','getHours','appCode','9913085XhBhpP','5150685wCtrYG','join','getSeconds','295186dwJxfD','6040629LvueCR','8847480rIXkyv','3812596fODLmk','str','padStart'];a160_0x55c7=function(){return _0x1c1aa2;};return a160_0x55c7();}export const pageCustomDetail={'service':a160_0x7c24b6(0x110),'command':'custom-detail','description':'Show\x20a\x20Custom\x20Page\x20and\x20all\x20of\x20its\x20files','risk':a160_0x7c24b6(0xfb),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a160_0x7c24b6(0xfc),'required':!![],'description':a160_0x7c24b6(0xff)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x49c235){readCustomPageId(_0x49c235);},async 'execute'(_0x2fb9ce){const _0xce765=a160_0x7c24b6,_0x3286a3=readCustomPageId(_0x2fb9ce),_0x93a076=await getCustomPageSource(_0x3286a3),{bundle:_0x2e1cb5,createTime:_0x8db1fe,updateTime:_0x171d0d,..._0x50a099}=_0x93a076,_0x3a6615=_0x93a076['id']??_0x3286a3,_0x5c691c=_0x93a076[_0xce765(0x102)]?.[_0xce765(0xfd)]()||_0x2fb9ce[_0xce765(0x10b)]('appcode')[_0xce765(0xfd)](),_0x13982=buildCustomPageRuntimeUrl(_0x5c691c,_0x93a076['pageCode']),_0x13df70=buildCustomPageEditUrl(_0x5c691c,_0x3a6615),_0x545857=await resolveCustomPageDevelopmentUrl(_0x5c691c,_0x3a6615,_0x2fb9ce['cookie']);return{'ok':!![],'data':{..._0x50a099,..._0x13982?{'runtimePageUrl':_0x13982}:{},..._0x545857?{'pageUrl':_0x545857}:{},..._0x13df70?{'editPageUrl':_0x13df70}:{},..._0x8db1fe==null?{}:{'createTime':formatTime(_0x8db1fe)},..._0x171d0d==null?{}:{'updateTime':formatTime(_0x171d0d)}},'message':_0xce765(0x100)+_0x3286a3+'.'};}};function formatTime(_0xc032e5){const _0x52443c=a160_0x7c24b6,_0x5d4fa0=new Date(_0xc032e5);if(Number[_0x52443c(0x10f)](_0x5d4fa0[_0x52443c(0xfa)]()))return String(_0xc032e5);const _0x4b6d5e=[_0x5d4fa0[_0x52443c(0xf9)](),String(_0x5d4fa0['getMonth']()+0x1)[_0x52443c(0x10c)](0x2,'0'),String(_0x5d4fa0['getDate']())[_0x52443c(0x10c)](0x2,'0')][_0x52443c(0x105)]('-'),_0x1d7b3b=[String(_0x5d4fa0[_0x52443c(0x101)]())['padStart'](0x2,'0'),String(_0x5d4fa0['getMinutes']())[_0x52443c(0x10c)](0x2,'0'),String(_0x5d4fa0[_0x52443c(0x106)]())[_0x52443c(0x10c)](0x2,'0')]['join'](':');return _0x4b6d5e+'\x20'+_0x1d7b3b;}
@@ -1 +1 @@
1
- const a161_0x51c3d4=a161_0x3a39;function a161_0x264a(){const _0x3f4e20=['type','314807cCpoMU','Found\x20','502747NApZZE','label','121726dKZVhL','menus','read','compress','pageId','appCode','custom-list','\x20Custom\x20Page(s).','2zkrtXK','70ypylXx','19140TGlbkS','flatMap','No\x20Custom\x20Pages\x20found.','555Ggsxwn','376dshENZ','path','105330nMJvQY','length','page','89937UaoKqh','1706145QfpuxG'];a161_0x264a=function(){return _0x3f4e20;};return a161_0x264a();}(function(_0x3dc4a0,_0x2c29eb){const _0x19227b=a161_0x3a39,_0x1e8e4c=_0x3dc4a0();while(!![]){try{const _0x57aef0=parseInt(_0x19227b(0x186))/0x1*(-parseInt(_0x19227b(0x192))/0x2)+parseInt(_0x19227b(0x184))/0x3+parseInt(_0x19227b(0x17a))/0x4*(parseInt(_0x19227b(0x17d))/0x5)+parseInt(_0x19227b(0x180))/0x6+parseInt(_0x19227b(0x188))/0x7+-parseInt(_0x19227b(0x17e))/0x8*(parseInt(_0x19227b(0x183))/0x9)+parseInt(_0x19227b(0x193))/0xa*(-parseInt(_0x19227b(0x18a))/0xb);if(_0x57aef0===_0x2c29eb)break;else _0x1e8e4c['push'](_0x1e8e4c['shift']());}catch(_0x408bd5){_0x1e8e4c['push'](_0x1e8e4c['shift']());}}}(a161_0x264a,0x4fe76));function a161_0x3a39(_0xefc548,_0x6ba524){_0xefc548=_0xefc548-0x17a;const _0x264a83=a161_0x264a();let _0x3a3988=_0x264a83[_0xefc548];return _0x3a3988;}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a161_0x51c3d4(0x182),'command':a161_0x51c3d4(0x190),'description':'List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','risk':a161_0x51c3d4(0x18c),'defaultOutputFormat':a161_0x51c3d4(0x18d),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1a70c5){const _0x185465=a161_0x51c3d4,_0x115b3d=(await fetchMenuSnapshot(_0x1a70c5['appCode'],_0x1a70c5['cookie']))[_0x185465(0x18b)][_0x185465(0x17b)](_0x16f81a=>{const _0x57757c=_0x185465;if(_0x16f81a[_0x57757c(0x185)]!=='react'||_0x16f81a[_0x57757c(0x18e)]==null)return[];const _0x57a80a=buildCustomPageDevelopmentUrl(_0x1a70c5[_0x57757c(0x18f)],_0x16f81a[_0x57757c(0x17f)]),_0x2b6b6a=buildCustomPageEditUrl(_0x1a70c5[_0x57757c(0x18f)],_0x16f81a['pageId']);return[{'pageId':_0x16f81a['pageId'],'label':_0x16f81a[_0x57757c(0x189)],..._0x57a80a?{'pageUrl':_0x57a80a}:{},..._0x2b6b6a?{'editPageUrl':_0x2b6b6a}:{}}];});return{'ok':!![],'data':{'pages':_0x115b3d},'message':_0x115b3d['length']===0x0?_0x185465(0x17c):_0x185465(0x187)+_0x115b3d[_0x185465(0x181)]+_0x185465(0x191)};}};
1
+ const a161_0x25632e=a161_0x212f;(function(_0x5f1187,_0xbad617){const _0x39496a=a161_0x212f,_0x57ccea=_0x5f1187();while(!![]){try{const _0xd5ea79=parseInt(_0x39496a(0x70))/0x1+parseInt(_0x39496a(0x7e))/0x2+-parseInt(_0x39496a(0x67))/0x3*(-parseInt(_0x39496a(0x7f))/0x4)+parseInt(_0x39496a(0x7c))/0x5+parseInt(_0x39496a(0x75))/0x6*(parseInt(_0x39496a(0x77))/0x7)+parseInt(_0x39496a(0x66))/0x8+-parseInt(_0x39496a(0x73))/0x9;if(_0xd5ea79===_0xbad617)break;else _0x57ccea['push'](_0x57ccea['shift']());}catch(_0x36677a){_0x57ccea['push'](_0x57ccea['shift']());}}}(a161_0x462c,0x9eeb6));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a161_0x212f(_0x2fecf5,_0x31a673){_0x2fecf5=_0x2fecf5-0x66;const _0x462c92=a161_0x462c();let _0x212f86=_0x462c92[_0x2fecf5];return _0x212f86;}import{buildCustomPageDevelopmentUrl,buildCustomPageEditUrl}from'./shared.js';export const pageCustomList={'service':a161_0x25632e(0x6c),'command':a161_0x25632e(0x78),'description':a161_0x25632e(0x7a),'risk':a161_0x25632e(0x6e),'defaultOutputFormat':a161_0x25632e(0x6a),'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2366cf){const _0x253dd3=a161_0x25632e,_0x2569b2=(await fetchMenuSnapshot(_0x2366cf[_0x253dd3(0x6b)],_0x2366cf['cookie']))[_0x253dd3(0x79)][_0x253dd3(0x68)](_0x182f8d=>{const _0x1cd07d=_0x253dd3;if(_0x182f8d[_0x1cd07d(0x69)]!==_0x1cd07d(0x6f)||_0x182f8d[_0x1cd07d(0x7b)]==null)return[];const _0x3b8b3c=buildCustomPageDevelopmentUrl(_0x2366cf['appCode'],_0x182f8d[_0x1cd07d(0x72)]),_0x42a29a=buildCustomPageEditUrl(_0x2366cf['appCode'],_0x182f8d[_0x1cd07d(0x7b)]);return[{'pageId':_0x182f8d[_0x1cd07d(0x7b)],'label':_0x182f8d[_0x1cd07d(0x71)],..._0x3b8b3c?{'pageUrl':_0x3b8b3c}:{},..._0x42a29a?{'editPageUrl':_0x42a29a}:{}}];});return{'ok':!![],'data':{'pages':_0x2569b2},'message':_0x2569b2[_0x253dd3(0x74)]===0x0?_0x253dd3(0x76):_0x253dd3(0x7d)+_0x2569b2[_0x253dd3(0x74)]+_0x253dd3(0x6d)};}};function a161_0x462c(){const _0xbb9458=['path','31293873adqNNZ','length','4314HvIsSI','No\x20Custom\x20Pages\x20found.','2142dBiasC','custom-list','menus','List\x20Custom\x20Pages\x20in\x20the\x20current\x20app','pageId','5704095AeATUy','Found\x20','48764LRnlLS','16556WRKDvt','7065232rodklc','519doYzDv','flatMap','type','compress','appCode','page','\x20Custom\x20Page(s).','read','react','1143615vZMKRB','label'];a161_0x462c=function(){return _0xbb9458;};return a161_0x462c();}
@@ -1 +1 @@
1
- function a162_0x2a92(_0x740c85,_0x52b8df){_0x740c85=_0x740c85-0x189;const _0x5973e5=a162_0x5973();let _0x2a9235=_0x5973e5[_0x740c85];return _0x2a9235;}const a162_0x108a1a=a162_0x2a92;(function(_0x4ebab9,_0x221de4){const _0x2e82df=a162_0x2a92,_0x250c45=_0x4ebab9();while(!![]){try{const _0x38e8a4=parseInt(_0x2e82df(0x198))/0x1+parseInt(_0x2e82df(0x197))/0x2*(-parseInt(_0x2e82df(0x19d))/0x3)+parseInt(_0x2e82df(0x19f))/0x4+-parseInt(_0x2e82df(0x1a5))/0x5*(parseInt(_0x2e82df(0x1ae))/0x6)+-parseInt(_0x2e82df(0x1b0))/0x7*(-parseInt(_0x2e82df(0x1a8))/0x8)+-parseInt(_0x2e82df(0x1a1))/0x9+-parseInt(_0x2e82df(0x19b))/0xa*(-parseInt(_0x2e82df(0x1ab))/0xb);if(_0x38e8a4===_0x221de4)break;else _0x250c45['push'](_0x250c45['shift']());}catch(_0x50d744){_0x250c45['push'](_0x250c45['shift']());}}}(a162_0x5973,0x59a25));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';function a162_0x5973(){const _0x16122f=['1130974TnxRBe','215290QpTvnx','Published\x20Custom\x20Page\x20','custom-publish','11350tQPgti','cookie','3lYcWfq','isInteger','1577960SIULPF','pageCode','1850706noQeMX','warnings','FORMAL','apiError','1360tbQRRa','appCode','Would\x20publish\x20Custom\x20Page\x20','8wyTGgG','Custom\x20Page\x20ID','compress','6127vxLqfi','number','page','3858rBJGqN','POST','498281mLcNDV','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','page.custom-publish','remark','string','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','unknown','pageId','status','Optional\x20publish\x20remark','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','push','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','runtimePageUrl','trim'];a162_0x5973=function(){return _0x16122f;};return a162_0x5973();}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';export const pageCustomPublish={'service':a162_0x108a1a(0x1ad),'command':a162_0x108a1a(0x19a),'description':a162_0x108a1a(0x194),'risk':'write','defaultOutputFormat':a162_0x108a1a(0x1aa),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a162_0x108a1a(0x1ac),'required':!![],'description':a162_0x108a1a(0x1a9)},{'name':a162_0x108a1a(0x18b),'type':a162_0x108a1a(0x18c),'description':a162_0x108a1a(0x191)}],async 'validate'(_0x1e6a6a){readCustomPageId(_0x1e6a6a);},async 'dryRun'(_0x202563){const _0x3c4b47=a162_0x108a1a,_0x466a31=readInput(_0x202563);return{'method':_0x3c4b47(0x1af),'url':'/smartapi/webcode/file/publish','body':{'id':_0x466a31[_0x3c4b47(0x18f)],..._0x466a31['remark']?{'remark':_0x466a31[_0x3c4b47(0x18b)]}:{}},'description':_0x3c4b47(0x1a7)+_0x466a31[_0x3c4b47(0x18f)]+'.'};},async 'execute'(_0x2b6b1c){const _0x1e5f00=a162_0x108a1a,_0x5af304=readInput(_0x2b6b1c);await getCustomPageSource(_0x5af304['pageId']);const _0xc745bd=await publishCustomPage(_0x5af304);if(!Number[_0x1e5f00(0x19e)](_0xc745bd)||_0xc745bd!==_0x5af304['pageId'])throw CliErrors[_0x1e5f00(0x1a4)](_0x1e5f00(0x189));const _0x32de56=await getCustomPageSource(_0x5af304[_0x1e5f00(0x18f)]);if(_0x32de56[_0x1e5f00(0x190)]!=='FORMAL')throw CliErrors[_0x1e5f00(0x1a4)](_0x1e5f00(0x192)+(_0x32de56[_0x1e5f00(0x190)]??_0x1e5f00(0x18e))+'.');const _0x2c4a16=_0x32de56['appCode']?.[_0x1e5f00(0x196)](),_0x10c988=buildCustomPageEditUrl(_0x2c4a16,_0x5af304['pageId']),_0x4a9ef1=await resolveCustomPageDevelopmentUrl(_0x2c4a16,_0x5af304[_0x1e5f00(0x18f)],_0x2b6b1c[_0x1e5f00(0x19c)]),_0x233cd5=buildMutationData(_0x5af304,!![],_0x4a9ef1,_0x10c988);_0x2c4a16&&!_0x4a9ef1&&_0x233cd5[_0x1e5f00(0x1a2)][_0x1e5f00(0x193)](_0x1e5f00(0x18d));const _0x669aa9=buildCustomPageRuntimeUrl(_0x32de56[_0x1e5f00(0x1a6)],_0x32de56[_0x1e5f00(0x1a0)]);return _0x669aa9?_0x233cd5[_0x1e5f00(0x195)]=_0x669aa9:_0x233cd5['warnings']['push']('Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.'),{'ok':!![],'data':_0x233cd5,'message':_0x1e5f00(0x199)+_0x5af304['pageId']+'.'};}};function readInput(_0x136510){const _0x5ad328=a162_0x108a1a,_0x38bc2a=readCustomPageId(_0x136510),_0x5e631c=_0x136510['str'](_0x5ad328(0x18b))[_0x5ad328(0x196)]();return{'pageId':_0x38bc2a,..._0x5e631c?{'remark':_0x5e631c}:{}};}function buildMutationData(_0x1aede5,_0xb09930=![],_0x374ded,_0x44468f){const _0x78c174=a162_0x108a1a;return{'operation':_0x78c174(0x18a),'selector':{'pageId':_0x1aede5[_0x78c174(0x18f)]},'before':null,'after':{'pageId':_0x1aede5[_0x78c174(0x18f)],'status':_0x78c174(0x1a3)},'dryRun':!_0xb09930,'request':_0x1aede5,..._0x374ded?{'pageUrl':_0x374ded}:{},..._0x44468f?{'editPageUrl':_0x44468f}:{},'warnings':[]};}
1
+ function a162_0x174c(_0x7fc60e,_0x5ed609){_0x7fc60e=_0x7fc60e-0xe9;const _0x19fb13=a162_0x19fb();let _0x174c9f=_0x19fb13[_0x7fc60e];return _0x174c9f;}const a162_0xedc2e0=a162_0x174c;(function(_0x335563,_0x3f770e){const _0x5b4fa4=a162_0x174c,_0x4ab6c0=_0x335563();while(!![]){try{const _0x368738=-parseInt(_0x5b4fa4(0xf3))/0x1*(parseInt(_0x5b4fa4(0x108))/0x2)+-parseInt(_0x5b4fa4(0xf0))/0x3*(-parseInt(_0x5b4fa4(0x10b))/0x4)+parseInt(_0x5b4fa4(0x109))/0x5*(parseInt(_0x5b4fa4(0xef))/0x6)+-parseInt(_0x5b4fa4(0x105))/0x7+-parseInt(_0x5b4fa4(0xf9))/0x8*(-parseInt(_0x5b4fa4(0xeb))/0x9)+-parseInt(_0x5b4fa4(0x10e))/0xa*(parseInt(_0x5b4fa4(0xf4))/0xb)+parseInt(_0x5b4fa4(0x102))/0xc*(parseInt(_0x5b4fa4(0xf6))/0xd);if(_0x368738===_0x3f770e)break;else _0x4ab6c0['push'](_0x4ab6c0['shift']());}catch(_0x31ea0e){_0x4ab6c0['push'](_0x4ab6c0['shift']());}}}(a162_0x19fb,0x4ec1d));import{getCustomPageSource,publishCustomPage}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,buildCustomPageRuntimeUrl,readCustomPageId,resolveCustomPageDevelopmentUrl}from'./shared.js';function a162_0x19fb(){const _0x5c4dcb=['status','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20published\x20page\x20could\x20not\x20be\x20generated.','cookie','appCode','remark','62628YhjMOe','compress','pageId','3318567LPyeyh','str','pageCode','19258bUsSZs','5zfpZgk','apiError','4jrPipe','Published\x20Custom\x20Page\x20','Custom\x20Page\x20publish\x20did\x20not\x20reach\x20published\x20status:\x20','80QRfsrz','page.custom-publish','warnings','Would\x20publish\x20Custom\x20Page\x20','number','FORMAL','291717UbVWTm','Optional\x20publish\x20remark','isInteger','/smartapi/webcode/file/publish','1115706LnlKQL','486663HeneEt','Custom\x20Page\x20publish\x20did\x20not\x20return\x20the\x20expected\x20page\x20ID.','string','67DGPOJc','389609hCbnLe','Publish\x20the\x20latest\x20saved\x20content\x20of\x20a\x20Custom\x20Page','3107YXKazf','Custom\x20Page\x20ID','POST','32UWyMgh','Published\x20successfully,\x20but\x20a\x20link\x20to\x20the\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','page','trim'];a162_0x19fb=function(){return _0x5c4dcb;};return a162_0x19fb();}export const pageCustomPublish={'service':a162_0xedc2e0(0xfb),'command':'custom-publish','description':a162_0xedc2e0(0xf5),'risk':'write','defaultOutputFormat':a162_0xedc2e0(0x103),'structuredErrors':!![],'requiresAppCode':![],'flags':[{'name':'id','type':a162_0xedc2e0(0xe9),'required':!![],'description':a162_0xedc2e0(0xf7)},{'name':a162_0xedc2e0(0x101),'type':a162_0xedc2e0(0xf2),'description':a162_0xedc2e0(0xec)}],async 'validate'(_0x2136f5){readCustomPageId(_0x2136f5);},async 'dryRun'(_0x40606b){const _0x19ea78=a162_0xedc2e0,_0xa762b6=readInput(_0x40606b);return{'method':_0x19ea78(0xf8),'url':_0x19ea78(0xee),'body':{'id':_0xa762b6[_0x19ea78(0x104)],..._0xa762b6['remark']?{'remark':_0xa762b6[_0x19ea78(0x101)]}:{}},'description':_0x19ea78(0x111)+_0xa762b6[_0x19ea78(0x104)]+'.'};},async 'execute'(_0x5af8d9){const _0x3970a0=a162_0xedc2e0,_0x5d2588=readInput(_0x5af8d9);await getCustomPageSource(_0x5d2588[_0x3970a0(0x104)]);const _0x10fafd=await publishCustomPage(_0x5d2588);if(!Number[_0x3970a0(0xed)](_0x10fafd)||_0x10fafd!==_0x5d2588[_0x3970a0(0x104)])throw CliErrors[_0x3970a0(0x10a)](_0x3970a0(0xf1));const _0x366636=await getCustomPageSource(_0x5d2588[_0x3970a0(0x104)]);if(_0x366636[_0x3970a0(0xfd)]!==_0x3970a0(0xea))throw CliErrors[_0x3970a0(0x10a)](_0x3970a0(0x10d)+(_0x366636[_0x3970a0(0xfd)]??'unknown')+'.');const _0x5a1fa0=_0x366636[_0x3970a0(0x100)]?.[_0x3970a0(0xfc)](),_0x4e0e08=buildCustomPageEditUrl(_0x5a1fa0,_0x5d2588['pageId']),_0x44dcd0=await resolveCustomPageDevelopmentUrl(_0x5a1fa0,_0x5d2588[_0x3970a0(0x104)],_0x5af8d9[_0x3970a0(0xff)]),_0x5b2671=buildMutationData(_0x5d2588,!![],_0x44dcd0,_0x4e0e08);_0x5a1fa0&&!_0x44dcd0&&_0x5b2671[_0x3970a0(0x110)]['push'](_0x3970a0(0xfa));const _0x5c2c23=buildCustomPageRuntimeUrl(_0x366636[_0x3970a0(0x100)],_0x366636[_0x3970a0(0x107)]);return _0x5c2c23?_0x5b2671['runtimePageUrl']=_0x5c2c23:_0x5b2671[_0x3970a0(0x110)]['push'](_0x3970a0(0xfe)),{'ok':!![],'data':_0x5b2671,'message':_0x3970a0(0x10c)+_0x5d2588['pageId']+'.'};}};function readInput(_0x1b36a1){const _0x3ee0c5=a162_0xedc2e0,_0x74bffc=readCustomPageId(_0x1b36a1),_0x34e3b5=_0x1b36a1[_0x3ee0c5(0x106)]('remark')[_0x3ee0c5(0xfc)]();return{'pageId':_0x74bffc,..._0x34e3b5?{'remark':_0x34e3b5}:{}};}function buildMutationData(_0x4f70db,_0x45b0be=![],_0x4e287a,_0x30c953){const _0xa5b14e=a162_0xedc2e0;return{'operation':_0xa5b14e(0x10f),'selector':{'pageId':_0x4f70db[_0xa5b14e(0x104)]},'before':null,'after':{'pageId':_0x4f70db[_0xa5b14e(0x104)],'status':'FORMAL'},'dryRun':!_0x45b0be,'request':_0x4f70db,..._0x4e287a?{'pageUrl':_0x4e287a}:{},..._0x30c953?{'editPageUrl':_0x30c953}:{},'warnings':[]};}
@@ -1 +1 @@
1
- const a163_0x49c4b2=a163_0x5acf;(function(_0x4b1cc3,_0x1378ab){const _0x469ee1=a163_0x5acf,_0x558a7e=_0x4b1cc3();while(!![]){try{const _0xa6e692=-parseInt(_0x469ee1(0x1ba))/0x1*(-parseInt(_0x469ee1(0x1bc))/0x2)+-parseInt(_0x469ee1(0x1b1))/0x3+-parseInt(_0x469ee1(0x1af))/0x4*(-parseInt(_0x469ee1(0x1bd))/0x5)+-parseInt(_0x469ee1(0x1c1))/0x6*(parseInt(_0x469ee1(0x1ab))/0x7)+-parseInt(_0x469ee1(0x1b2))/0x8+parseInt(_0x469ee1(0x1bf))/0x9*(-parseInt(_0x469ee1(0x1b0))/0xa)+-parseInt(_0x469ee1(0x1b8))/0xb*(-parseInt(_0x469ee1(0x1c0))/0xc);if(_0xa6e692===_0x1378ab)break;else _0x558a7e['push'](_0x558a7e['shift']());}catch(_0x3e54a6){_0x558a7e['push'](_0x558a7e['shift']());}}}(a163_0x3e80,0xec0a5));import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';function a163_0x5acf(_0x1942fa,_0xfa4bba){_0x1942fa=_0x1942fa-0x1a7;const _0x3e8072=a163_0x3e80();let _0x5acf63=_0x3e8072[_0x1942fa];return _0x5acf63;}import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';function a163_0x3e80(){const _0x1f8433=['isInteger','type','Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','21118746gmmBVn','validation','2057NBjzba','menus','698wAjqzn','1340RrkVsq','num','2289339uAxQAo','12rvpYZP','2488902SDcQSU','/ide/','path','pageId','message','/pages/','14NdXihy','file','map','find','21404JUvVOy','20jbdehK','2577873lrKdqH','7258872nfxdLe','trim','length'];a163_0x3e80=function(){return _0x1f8433;};return a163_0x3e80();}export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a163_0x49c4b2(0x1b7)};function trimOptional(_0x51fdff){const _0x483aa2=a163_0x49c4b2;return _0x51fdff?.[_0x483aa2(0x1b3)]()||undefined;}export function buildCustomPageRuntimeUrl(_0x1a4382,_0x1688d3){const _0x1c715f=trimOptional(_0x1a4382),_0x3f7abb=trimOptional(_0x1688d3);if(!_0x1c715f||!_0x3f7abb)return undefined;return getPublishedAppDomain(_0x1c715f)+'/'+encodeURIComponent(_0x3f7abb);}export function buildCustomPageDevelopmentUrl(_0x1fd820,_0x40726e){const _0x1ec33e=a163_0x49c4b2,_0x4c0556=trimOptional(_0x1fd820),_0x2e6b70=trimOptional(_0x40726e);if(!_0x4c0556||!_0x2e6b70)return undefined;return getAppBaseUrl(_0x4c0556)+_0x1ec33e(0x1aa)+encodeURIComponent(_0x2e6b70);}export async function resolveCustomPageDevelopmentUrl(_0xf8a319,_0xdfb2fe,_0x4c5b36){const _0x1d59ae=a163_0x49c4b2,_0x28ba8b=trimOptional(_0xf8a319);if(!_0x28ba8b)return undefined;try{const _0x1bb755=(await fetchMenuSnapshot(_0x28ba8b,_0x4c5b36))[_0x1d59ae(0x1bb)][_0x1d59ae(0x1ae)](_0x3d6d05=>_0x3d6d05[_0x1d59ae(0x1b6)]==='react'&&_0x3d6d05[_0x1d59ae(0x1a8)]===_0xdfb2fe);return buildCustomPageDevelopmentUrl(_0x28ba8b,_0x1bb755?.[_0x1d59ae(0x1a7)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x49fd25,_0x4d3cfc){const _0xa2138=a163_0x49c4b2,_0x19c960=trimOptional(_0x49fd25);if(!_0x19c960)return;const _0x3764bb=trimOptional(String(_0x4d3cfc??''));if(!_0x3764bb)return;return getAppBaseUrl(_0x19c960)+_0xa2138(0x1c2)+encodeURIComponent(_0x3764bb);}export async function validateCustomPageContent(_0x65e384){const _0x8ba1f=a163_0x49c4b2,_0x4b6794=await validateCustomPageSourceFiles(_0x65e384);if(_0x4b6794[_0x8ba1f(0x1b4)]>0x0)throw CliErrors[_0x8ba1f(0x1b9)]('Invalid\x20Custom\x20Page\x20content:\x20'+_0x4b6794[_0x8ba1f(0x1ad)](_0x4ee79f=>_0x4ee79f[_0x8ba1f(0x1ac)]+':\x20'+_0x4ee79f[_0x8ba1f(0x1a9)])['join'](';\x20'));}export function readCustomPageId(_0x38746e){const _0x52327f=a163_0x49c4b2,_0x214cb3=_0x38746e[_0x52327f(0x1be)]('id');if(!Number[_0x52327f(0x1b5)](_0x214cb3)||_0x214cb3<=0x0)throw CliErrors['validation']('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x214cb3;}
1
+ const a163_0x33acb0=a163_0x5185;(function(_0xa05a7,_0xaf19ce){const _0x1f10c4=a163_0x5185,_0x525cd1=_0xa05a7();while(!![]){try{const _0x1f8f03=-parseInt(_0x1f10c4(0x1a6))/0x1+parseInt(_0x1f10c4(0x1ad))/0x2+parseInt(_0x1f10c4(0x1ae))/0x3*(-parseInt(_0x1f10c4(0x19e))/0x4)+-parseInt(_0x1f10c4(0x1ab))/0x5*(parseInt(_0x1f10c4(0x1a8))/0x6)+-parseInt(_0x1f10c4(0x1aa))/0x7*(-parseInt(_0x1f10c4(0x199))/0x8)+parseInt(_0x1f10c4(0x1a3))/0x9*(parseInt(_0x1f10c4(0x19c))/0xa)+parseInt(_0x1f10c4(0x1a9))/0xb;if(_0x1f8f03===_0xaf19ce)break;else _0x525cd1['push'](_0x525cd1['shift']());}catch(_0x40687a){_0x525cd1['push'](_0x525cd1['shift']());}}}(a163_0x555d,0x549d7));function a163_0x5185(_0x325b62,_0x9ef4d5){_0x325b62=_0x325b62-0x199;const _0x555db6=a163_0x555d();let _0x51856b=_0x555db6[_0x325b62];return _0x51856b;}import{APPCODE_FLAG_OPTIONAL}from'../../../commands/common/flags.js';import{fetchMenuSnapshot}from'../../../commands/menu/shared/facts.js';import{getAppBaseUrl,getPublishedAppDomain}from'../../../constant/domain.js';import{CliErrors}from'../../../errors.js';import{validateCustomPageSourceFiles}from'./syntax.js';export const CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL={...APPCODE_FLAG_OPTIONAL,'description':a163_0x33acb0(0x19b)};function trimOptional(_0x3a462f){const _0x4fa61f=a163_0x33acb0;return _0x3a462f?.[_0x4fa61f(0x1b0)]()||undefined;}function a163_0x555d(){const _0x2eb973=['Optional\x20app\x20code\x20resolved\x20from\x20page\x20ID\x20when\x20omitted','20YFSSTv','map','16Srvdpm','type','Invalid\x20Custom\x20Page\x20content:\x20','/pages/','/ide/','2849076wBfMCR','num','validation','682467qPIZfR','react','740058EgftQU','7095550BOWcQc','89894EaQYBI','15onygec','pageId','318918cgDxFW','96339jNTVfy','path','trim','56jpXUrP','find'];a163_0x555d=function(){return _0x2eb973;};return a163_0x555d();}export function buildCustomPageRuntimeUrl(_0x1662af,_0x32fd92){const _0x3c50a7=trimOptional(_0x1662af),_0x4c2b3b=trimOptional(_0x32fd92);if(!_0x3c50a7||!_0x4c2b3b)return undefined;return getPublishedAppDomain(_0x3c50a7)+'/'+encodeURIComponent(_0x4c2b3b);}export function buildCustomPageDevelopmentUrl(_0x1b8627,_0x1fb6dd){const _0x559d73=a163_0x33acb0,_0x57f02e=trimOptional(_0x1b8627),_0x5b6c9d=trimOptional(_0x1fb6dd);if(!_0x57f02e||!_0x5b6c9d)return undefined;return getAppBaseUrl(_0x57f02e)+_0x559d73(0x1a1)+encodeURIComponent(_0x5b6c9d);}export async function resolveCustomPageDevelopmentUrl(_0x42a887,_0x394e3b,_0x25343b){const _0x4d4fd0=a163_0x33acb0,_0x46e3a1=trimOptional(_0x42a887);if(!_0x46e3a1)return undefined;try{const _0x38508a=(await fetchMenuSnapshot(_0x46e3a1,_0x25343b))['menus'][_0x4d4fd0(0x19a)](_0x4f5f1d=>_0x4f5f1d[_0x4d4fd0(0x19f)]===_0x4d4fd0(0x1a7)&&_0x4f5f1d[_0x4d4fd0(0x1ac)]===_0x394e3b);return buildCustomPageDevelopmentUrl(_0x46e3a1,_0x38508a?.[_0x4d4fd0(0x1af)]);}catch{return undefined;}}export function buildCustomPageEditUrl(_0x49ab33,_0x271b17){const _0x3a6e0d=a163_0x33acb0,_0xe1b8ef=trimOptional(_0x49ab33);if(!_0xe1b8ef)return;const _0x887a1b=trimOptional(String(_0x271b17??''));if(!_0x887a1b)return;return getAppBaseUrl(_0xe1b8ef)+_0x3a6e0d(0x1a2)+encodeURIComponent(_0x887a1b);}export async function validateCustomPageContent(_0x2d6b1a){const _0x46c515=a163_0x33acb0,_0x59a565=await validateCustomPageSourceFiles(_0x2d6b1a);if(_0x59a565['length']>0x0)throw CliErrors[_0x46c515(0x1a5)](_0x46c515(0x1a0)+_0x59a565[_0x46c515(0x19d)](_0x75a7e2=>_0x75a7e2['file']+':\x20'+_0x75a7e2['message'])['join'](';\x20'));}export function readCustomPageId(_0x4782a4){const _0xb1bb7d=a163_0x33acb0,_0x2b4923=_0x4782a4[_0xb1bb7d(0x1a4)]('id');if(!Number['isInteger'](_0x2b4923)||_0x2b4923<=0x0)throw CliErrors[_0xb1bb7d(0x1a5)]('--id\x20must\x20be\x20a\x20positive\x20integer.');return _0x2b4923;}
@@ -1 +1 @@
1
- const a164_0x3ada7e=a164_0xe87f;(function(_0x583c22,_0xd70e81){const _0x361c90=a164_0xe87f,_0x369b60=_0x583c22();while(!![]){try{const _0x5a735b=-parseInt(_0x361c90(0x106))/0x1+parseInt(_0x361c90(0x109))/0x2*(-parseInt(_0x361c90(0x119))/0x3)+-parseInt(_0x361c90(0x104))/0x4*(parseInt(_0x361c90(0x114))/0x5)+parseInt(_0x361c90(0x10c))/0x6*(-parseInt(_0x361c90(0x116))/0x7)+-parseInt(_0x361c90(0x118))/0x8*(parseInt(_0x361c90(0x10e))/0x9)+-parseInt(_0x361c90(0x10f))/0xa*(-parseInt(_0x361c90(0x10a))/0xb)+parseInt(_0x361c90(0x111))/0xc;if(_0x5a735b===_0xd70e81)break;else _0x369b60['push'](_0x369b60['shift']());}catch(_0x23bca5){_0x369b60['push'](_0x369b60['shift']());}}}(a164_0x35a9,0x5f447));function a164_0x35a9(){const _0x34642d=['endsWith','.tsx','4pNbHfp','11FmBKYe','some','48jsZOaj','filter','54cxfxGa','1362440RCVXDr','message','21872520ZqRcSD','map','Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','1415NZILbb','page\x20files','190071DSNAkQ','entries','765792izkGkr','834294lZoksA','typescript','trim','1556WHuAEx','toLowerCase','110888mReQXQ'];a164_0x35a9=function(){return _0x34642d;};return a164_0x35a9();}import{format}from'prettier';const SOURCE_PARSERS={'.js':'babel','.jsx':'babel','.ts':a164_0x3ada7e(0x102),'.tsx':'typescript'},CUSTOM_PAGE_EXTENSIONS=['.jsx',a164_0x3ada7e(0x108)];function a164_0xe87f(_0x472e7b,_0x9a6191){_0x472e7b=_0x472e7b-0x102;const _0x35a9bf=a164_0x35a9();let _0xe87f0f=_0x35a9bf[_0x472e7b];return _0xe87f0f;}export async function validateCustomPageSourceFiles(_0x2512aa){const _0x4d76f4=a164_0x3ada7e,_0x4fade8=Object[_0x4d76f4(0x117)](_0x2512aa)[_0x4d76f4(0x10d)](([_0x2c7b8b])=>getParser(_0x2c7b8b));if(!_0x4fade8['some'](([_0x483784])=>isReactSourceFile(_0x483784)))return[{'file':_0x4d76f4(0x115),'message':_0x4d76f4(0x113)}];const _0x37e2a8=await Promise['all'](_0x4fade8[_0x4d76f4(0x112)](async([_0x2c91ed,_0x1188b1])=>{const _0x51a668=_0x4d76f4;try{return await format(_0x1188b1,{'parser':getParser(_0x2c91ed)}),undefined;}catch(_0x24da22){return{'file':_0x2c91ed,'message':_0x24da22 instanceof Error?_0x24da22[_0x51a668(0x110)]:String(_0x24da22)};}}));return _0x37e2a8[_0x4d76f4(0x10d)](_0x52e37f=>_0x52e37f!==undefined);}function getParser(_0x21f944){const _0x624eb3=a164_0x3ada7e,_0x396726=_0x21f944['trim']()['toLowerCase']();return Object[_0x624eb3(0x117)](SOURCE_PARSERS)['find'](([_0xc3c486])=>_0x396726[_0x624eb3(0x107)](_0xc3c486))?.[0x1];}function isReactSourceFile(_0x1cf793){const _0x282149=a164_0x3ada7e,_0x390917=_0x1cf793[_0x282149(0x103)]()[_0x282149(0x105)]();return CUSTOM_PAGE_EXTENSIONS[_0x282149(0x10b)](_0x1298ea=>_0x390917[_0x282149(0x107)](_0x1298ea));}
1
+ const a164_0xd11d3d=a164_0x15d7;(function(_0x480f15,_0x5eaf12){const _0x22a002=a164_0x15d7,_0xcac056=_0x480f15();while(!![]){try{const _0x4f041a=parseInt(_0x22a002(0x1bd))/0x1*(parseInt(_0x22a002(0x1cd))/0x2)+-parseInt(_0x22a002(0x1d1))/0x3*(-parseInt(_0x22a002(0x1d3))/0x4)+parseInt(_0x22a002(0x1ca))/0x5*(parseInt(_0x22a002(0x1ba))/0x6)+parseInt(_0x22a002(0x1c3))/0x7+parseInt(_0x22a002(0x1d0))/0x8+parseInt(_0x22a002(0x1c0))/0x9*(parseInt(_0x22a002(0x1c1))/0xa)+-parseInt(_0x22a002(0x1ce))/0xb;if(_0x4f041a===_0x5eaf12)break;else _0xcac056['push'](_0xcac056['shift']());}catch(_0x8b1aeb){_0xcac056['push'](_0xcac056['shift']());}}}(a164_0x5981,0x56d08));function a164_0x5981(){const _0x3d0844=['Missing\x20React\x20source\x20file\x20with\x20extension\x20.jsx\x20or\x20.tsx','1389560DsfCET','filter','message','12MDykoJ','15161883FZgGGo','toLowerCase','3952792tsndCa','2283vdcHGA','page\x20files','404bVisVX','endsWith','6xJgPvH','some','map','21917twGlyX','find','.tsx','7893wawddY','5070CSZuHB','all','2162524IeCqkq','.jsx','entries','babel','trim','typescript'];a164_0x5981=function(){return _0x3d0844;};return a164_0x5981();}import{format}from'prettier';const SOURCE_PARSERS={'.js':a164_0xd11d3d(0x1c6),'.jsx':'babel','.ts':'typescript','.tsx':a164_0xd11d3d(0x1c8)},CUSTOM_PAGE_EXTENSIONS=[a164_0xd11d3d(0x1c4),a164_0xd11d3d(0x1bf)];export async function validateCustomPageSourceFiles(_0x2ec7e6){const _0x17fc65=a164_0xd11d3d,_0x67015c=Object[_0x17fc65(0x1c5)](_0x2ec7e6)[_0x17fc65(0x1cb)](([_0x2e3227])=>getParser(_0x2e3227));if(!_0x67015c['some'](([_0x936b5f])=>isReactSourceFile(_0x936b5f)))return[{'file':_0x17fc65(0x1d2),'message':_0x17fc65(0x1c9)}];const _0x2175dc=await Promise[_0x17fc65(0x1c2)](_0x67015c[_0x17fc65(0x1bc)](async([_0x5d295e,_0xe6bd82])=>{const _0x17b172=_0x17fc65;try{return await format(_0xe6bd82,{'parser':getParser(_0x5d295e)}),undefined;}catch(_0x2026e8){return{'file':_0x5d295e,'message':_0x2026e8 instanceof Error?_0x2026e8[_0x17b172(0x1cc)]:String(_0x2026e8)};}}));return _0x2175dc[_0x17fc65(0x1cb)](_0x3ee536=>_0x3ee536!==undefined);}function getParser(_0x44a493){const _0x32b730=a164_0xd11d3d,_0x42d65a=_0x44a493[_0x32b730(0x1c7)]()[_0x32b730(0x1cf)]();return Object[_0x32b730(0x1c5)](SOURCE_PARSERS)[_0x32b730(0x1be)](([_0x64ebf8])=>_0x42d65a['endsWith'](_0x64ebf8))?.[0x1];}function a164_0x15d7(_0x96a77,_0x48e735){_0x96a77=_0x96a77-0x1ba;const _0x5981c6=a164_0x5981();let _0x15d769=_0x5981c6[_0x96a77];return _0x15d769;}function isReactSourceFile(_0x4fcab4){const _0x4f0f8a=a164_0xd11d3d,_0x39b0a0=_0x4fcab4['trim']()['toLowerCase']();return CUSTOM_PAGE_EXTENSIONS[_0x4f0f8a(0x1bb)](_0x91e3b8=>_0x39b0a0[_0x4f0f8a(0x1d4)](_0x91e3b8));}
@@ -1 +1 @@
1
- const a165_0x5c6bd1=a165_0x59c1;(function(_0x3645f7,_0xf4b7a2){const _0x18d967=a165_0x59c1,_0x3f1745=_0x3645f7();while(!![]){try{const _0x411d45=parseInt(_0x18d967(0xa2))/0x1+parseInt(_0x18d967(0xa5))/0x2+parseInt(_0x18d967(0xaa))/0x3*(-parseInt(_0x18d967(0x9d))/0x4)+-parseInt(_0x18d967(0x9e))/0x5+-parseInt(_0x18d967(0xa7))/0x6+-parseInt(_0x18d967(0xa8))/0x7*(-parseInt(_0x18d967(0x9b))/0x8)+-parseInt(_0x18d967(0xb5))/0x9*(parseInt(_0x18d967(0xaf))/0xa);if(_0x411d45===_0xf4b7a2)break;else _0x3f1745['push'](_0x3f1745['shift']());}catch(_0x254cf7){_0x3f1745['push'](_0x3f1745['shift']());}}}(a165_0x9c77,0x81d61));import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':a165_0x5c6bd1(0xac),'command':a165_0x5c6bd1(0x9a),'description':a165_0x5c6bd1(0xa9),'risk':a165_0x5c6bd1(0xb3),'defaultOutputFormat':'compress','structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a165_0x5c6bd1(0xa1),'message':a165_0x5c6bd1(0x9f),'hint':'Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.'}],'flags':[{'name':'id','type':a165_0x5c6bd1(0x99),'required':!![],'description':a165_0x5c6bd1(0xb0)},{'name':'page-dir','type':'string','required':!![],'description':a165_0x5c6bd1(0xb4)},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x59300a){readCustomPageId(_0x59300a),await readValidatedPageContent(_0x59300a);},async 'dryRun'(_0x162d6d){const _0x1c32aa=a165_0x5c6bd1,_0x59b28b=await readInput(_0x162d6d);return{'method':_0x1c32aa(0xa3),'url':'/smartapi/webcode/page/update/content','body':{'id':_0x59b28b[_0x1c32aa(0xa0)],'codeContent':_0x59b28b[_0x1c32aa(0xab)]},'description':'Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20'+_0x59b28b[_0x1c32aa(0xa0)]+'.'};},async 'execute'(_0x436312){const _0xfccc8e=a165_0x5c6bd1,_0x38d852=await readInput(_0x436312),_0x1009e1=await updateCustomPageContent({'pageId':_0x38d852[_0xfccc8e(0xa0)],'pageContent':_0x38d852[_0xfccc8e(0xab)]});if(!Number[_0xfccc8e(0xb1)](_0x1009e1[_0xfccc8e(0xae)])||_0x1009e1[_0xfccc8e(0xae)]<=0x0)throw CliErrors['apiError'](_0xfccc8e(0x9c));const _0x138ce1=buildCustomPageEditUrl(_0x38d852[_0xfccc8e(0xb6)],_0x38d852['pageId']),_0x312bc0=await resolveCustomPageDevelopmentUrl(_0x38d852[_0xfccc8e(0xb6)],_0x38d852[_0xfccc8e(0xa0)],_0x436312['cookie']);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x38d852[_0xfccc8e(0xb6)],'pageId':_0x38d852[_0xfccc8e(0xa0)]},'before':null,'after':{'pageId':_0x1009e1['pageId'],'version':_0x1009e1[_0xfccc8e(0xae)],'pageContent':_0x38d852['pageContent']},'dryRun':![],'request':_0x38d852,..._0x312bc0?{'pageUrl':_0x312bc0}:{},..._0x138ce1?{'editPageUrl':_0x138ce1}:{},'warnings':_0x312bc0?[]:[_0xfccc8e(0xad)]},'message':'Updated\x20Custom\x20Page\x20'+_0x38d852[_0xfccc8e(0xa0)]+'.'};}};async function readInput(_0x27d95f){const _0x14f830=a165_0x5c6bd1,_0x2e6d7d=readCustomPageId(_0x27d95f),_0x47a23c=_0x27d95f[_0x14f830(0xb2)](_0x14f830(0x98))['trim']()||(await getCustomPageSource(_0x2e6d7d))['appCode']?.[_0x14f830(0xa6)]();if(!_0x47a23c)throw CliErrors[_0x14f830(0xa4)](_0x14f830(0xb7)+_0x2e6d7d+'.');return{'appCode':_0x47a23c,'pageId':_0x2e6d7d,'pageContent':await readValidatedPageContent(_0x27d95f)};}function a165_0x59c1(_0x255483,_0x2ff091){_0x255483=_0x255483-0x98;const _0x9c77a4=a165_0x9c77();let _0x59c1e8=_0x9c77a4[_0x255483];return _0x59c1e8;}function a165_0x9c77(){const _0x47a6ce=['str','write','Directory\x20containing\x20all\x20complete\x20page\x20files','27unIyeB','appCode','Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20','appcode','number','custom-update','144616HOBZxm','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','1116tpsHZx','1462745NqAFRr','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','pageId','page-content','939617QxewnY','POST','validation','1325032dcFDFG','trim','1262412kiVncL','196fBWifQ','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','2295rquIEc','pageContent','page','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','newVersion','2866980ZxDwQu','Custom\x20Page\x20ID','isInteger'];a165_0x9c77=function(){return _0x47a6ce;};return a165_0x9c77();}async function readValidatedPageContent(_0x5df85e){const _0x4adea5=a165_0x5c6bd1,_0x3451a7=await readCustomPageDirectory(_0x5df85e[_0x4adea5(0xb2)]('page-dir'));return await validateCustomPageContent(_0x3451a7),_0x3451a7;}
1
+ const a165_0x44a6c7=a165_0x376c;(function(_0x2f208d,_0x491b7b){const _0x5a9d5f=a165_0x376c,_0x165dd0=_0x2f208d();while(!![]){try{const _0x51fe2a=-parseInt(_0x5a9d5f(0x113))/0x1*(parseInt(_0x5a9d5f(0x10b))/0x2)+-parseInt(_0x5a9d5f(0x10e))/0x3+parseInt(_0x5a9d5f(0x11e))/0x4*(-parseInt(_0x5a9d5f(0x119))/0x5)+-parseInt(_0x5a9d5f(0x118))/0x6*(parseInt(_0x5a9d5f(0x11d))/0x7)+-parseInt(_0x5a9d5f(0x11a))/0x8*(-parseInt(_0x5a9d5f(0x125))/0x9)+parseInt(_0x5a9d5f(0x127))/0xa+parseInt(_0x5a9d5f(0x11c))/0xb;if(_0x51fe2a===_0x491b7b)break;else _0x165dd0['push'](_0x165dd0['shift']());}catch(_0x253cda){_0x165dd0['push'](_0x165dd0['shift']());}}}(a165_0x20e3,0x92998));function a165_0x20e3(){const _0x5687d3=['number','Custom\x20Page\x20ID','page\x20custom-update\x20no\x20longer\x20accepts\x20--page-content.','pageContent','Save\x20all\x20files\x20of\x20a\x20Custom\x20Page','str','newVersion','/smartapi/webcode/page/update/content','Would\x20save\x20all\x20files\x20of\x20Custom\x20Page\x20','82YqDqtd','trim','validation','3428733lYedEM','Write\x20the\x20complete\x20page\x20files\x20to\x20a\x20local\x20directory\x20and\x20use\x20--page-dir\x20<dir>.','Custom\x20Page\x20update\x20did\x20not\x20create\x20a\x20new\x20version.','page-content','Updated\x20Custom\x20Page\x20','22987omCwpn','apiError','Custom\x20Page\x20was\x20updated,\x20but\x20a\x20link\x20to\x20its\x20latest\x20saved\x20content\x20could\x20not\x20be\x20generated.','string','compress','36LigHwH','515aSkeFU','8vTVbLD','appCode','42878121lTcXcl','826777MmbArQ','25276ARpwPw','write','POST','pageId','page-dir','cookie','appcode','1070037bbmgIq','custom-update','284690DNLhMg'];a165_0x20e3=function(){return _0x5687d3;};return a165_0x20e3();}import{getCustomPageSource,updateCustomPageContent}from'../../../core/api-client.js';import{readCustomPageDirectory}from'../../../core/page/file-system.js';function a165_0x376c(_0x2e80ef,_0x3f1d30){_0x2e80ef=_0x2e80ef-0x10b;const _0x20e30b=a165_0x20e3();let _0x376c48=_0x20e30b[_0x2e80ef];return _0x376c48;}import{CliErrors}from'../../../errors.js';import{buildCustomPageEditUrl,resolveCustomPageDevelopmentUrl,readCustomPageId,CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL,validateCustomPageContent}from'./shared.js';export const pageCustomUpdate={'service':'page','command':a165_0x44a6c7(0x126),'description':a165_0x44a6c7(0x12c),'risk':a165_0x44a6c7(0x11f),'defaultOutputFormat':a165_0x44a6c7(0x117),'structuredErrors':!![],'requiresAppCode':![],'rejectedFlags':[{'name':a165_0x44a6c7(0x111),'message':a165_0x44a6c7(0x12a),'hint':a165_0x44a6c7(0x10f)}],'flags':[{'name':'id','type':a165_0x44a6c7(0x128),'required':!![],'description':a165_0x44a6c7(0x129)},{'name':a165_0x44a6c7(0x122),'type':a165_0x44a6c7(0x116),'required':!![],'description':'Directory\x20containing\x20all\x20complete\x20page\x20files'},CUSTOM_PAGE_APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4e42b4){readCustomPageId(_0x4e42b4),await readValidatedPageContent(_0x4e42b4);},async 'dryRun'(_0x43c1e3){const _0x2eef07=a165_0x44a6c7,_0x38c65a=await readInput(_0x43c1e3);return{'method':_0x2eef07(0x120),'url':_0x2eef07(0x12f),'body':{'id':_0x38c65a[_0x2eef07(0x121)],'codeContent':_0x38c65a[_0x2eef07(0x12b)]},'description':_0x2eef07(0x130)+_0x38c65a['pageId']+'.'};},async 'execute'(_0x51b29b){const _0x44db51=a165_0x44a6c7,_0x23f966=await readInput(_0x51b29b),_0x27ef6c=await updateCustomPageContent({'pageId':_0x23f966[_0x44db51(0x121)],'pageContent':_0x23f966[_0x44db51(0x12b)]});if(!Number['isInteger'](_0x27ef6c[_0x44db51(0x12e)])||_0x27ef6c['newVersion']<=0x0)throw CliErrors[_0x44db51(0x114)](_0x44db51(0x110));const _0x126167=buildCustomPageEditUrl(_0x23f966[_0x44db51(0x11b)],_0x23f966[_0x44db51(0x121)]),_0x7ce8cb=await resolveCustomPageDevelopmentUrl(_0x23f966['appCode'],_0x23f966['pageId'],_0x51b29b[_0x44db51(0x123)]);return{'ok':!![],'data':{'operation':'page.custom-update','selector':{'appCode':_0x23f966[_0x44db51(0x11b)],'pageId':_0x23f966[_0x44db51(0x121)]},'before':null,'after':{'pageId':_0x27ef6c['pageId'],'version':_0x27ef6c[_0x44db51(0x12e)],'pageContent':_0x23f966[_0x44db51(0x12b)]},'dryRun':![],'request':_0x23f966,..._0x7ce8cb?{'pageUrl':_0x7ce8cb}:{},..._0x126167?{'editPageUrl':_0x126167}:{},'warnings':_0x7ce8cb?[]:[_0x44db51(0x115)]},'message':_0x44db51(0x112)+_0x23f966[_0x44db51(0x121)]+'.'};}};async function readInput(_0x43ce06){const _0xd4f865=a165_0x44a6c7,_0x416574=readCustomPageId(_0x43ce06),_0x292a47=_0x43ce06['str'](_0xd4f865(0x124))[_0xd4f865(0x10c)]()||(await getCustomPageSource(_0x416574))['appCode']?.[_0xd4f865(0x10c)]();if(!_0x292a47)throw CliErrors[_0xd4f865(0x10d)]('Cannot\x20determine\x20the\x20appCode\x20for\x20Custom\x20Page\x20'+_0x416574+'.');return{'appCode':_0x292a47,'pageId':_0x416574,'pageContent':await readValidatedPageContent(_0x43ce06)};}async function readValidatedPageContent(_0x324bf1){const _0x399539=a165_0x44a6c7,_0x17279d=await readCustomPageDirectory(_0x324bf1[_0x399539(0x12d)]('page-dir'));return await validateCustomPageContent(_0x17279d),_0x17279d;}
@@ -1 +1 @@
1
- const a166_0x5d409e=a166_0x40db;(function(_0x133c95,_0x591134){const _0x320713=a166_0x40db,_0x530a10=_0x133c95();while(!![]){try{const _0x130aeb=parseInt(_0x320713(0x119))/0x1+parseInt(_0x320713(0x115))/0x2*(parseInt(_0x320713(0x12e))/0x3)+parseInt(_0x320713(0x113))/0x4*(parseInt(_0x320713(0x127))/0x5)+-parseInt(_0x320713(0x122))/0x6*(parseInt(_0x320713(0x118))/0x7)+parseInt(_0x320713(0x11a))/0x8+parseInt(_0x320713(0x117))/0x9+-parseInt(_0x320713(0x11e))/0xa;if(_0x130aeb===_0x591134)break;else _0x530a10['push'](_0x530a10['shift']());}catch(_0x465052){_0x530a10['push'](_0x530a10['shift']());}}}(a166_0x5e05,0xf1861));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a166_0x40db(_0x20645b,_0x571665){_0x20645b=_0x20645b-0x112;const _0x5e0516=a166_0x5e05();let _0x40db69=_0x5e0516[_0x20645b];return _0x40db69;}import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';export const pageDataListStatus={'service':a166_0x5d409e(0x11c),'command':a166_0x5d409e(0x125),'description':a166_0x5d409e(0x12c),'risk':a166_0x5d409e(0x12b),'defaultOutputFormat':a166_0x5d409e(0x123),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a166_0x5d409e(0x121),'type':a166_0x5d409e(0x112),'description':a166_0x5d409e(0x124)}],async 'validate'(_0x327bc0){validateDatasetSelector(_0x327bc0);},async 'dryRun'(_0x202163){const _0x3cc0f9=a166_0x5d409e,_0x50615e=await loadDatasetDetailForPage(_0x202163);return{'method':_0x3cc0f9(0x120),'url':'/smartapi/lovrabet/dataset/'+_0x50615e[_0x3cc0f9(0x128)]+'/standard-page-status?appCode='+encodeURIComponent(_0x202163[_0x3cc0f9(0x11b)]),'description':serializeDryRunDescription({'dataset':{'id':_0x50615e['id'],'code':_0x50615e[_0x3cc0f9(0x128)],'name':_0x50615e['name']},'action':_0x3cc0f9(0x116)})};},async 'execute'(_0x532de7){const _0x2c0318=a166_0x5d409e,_0xed4b14=await loadDatasetDetailForPage(_0x532de7),_0x3bb7a3=await loadDataListPageStatusForGenerate(_0x532de7,_0xed4b14[_0x2c0318(0x128)]),_0x35ca89=getUndeletedRelatedPages(_0xed4b14),_0x38f081=assessDataListPageState(_0xed4b14[_0x2c0318(0x128)],_0x3bb7a3,{'fallbackUndeletedPages':_0x35ca89});return{'ok':!![],'data':{'datasetCode':_0xed4b14[_0x2c0318(0x128)],'precheckSource':_0x3bb7a3?.[_0x2c0318(0x126)]??_0x2c0318(0x11f),'status':_0x38f081[_0x2c0318(0x129)],'manualResolutionRequired':_0x38f081[_0x2c0318(0x12d)],'nextAction':_0x38f081[_0x2c0318(0x114)],'dataListPageStatus':_0x3bb7a3,'relatedPages':{'total':_0xed4b14[_0x2c0318(0x11d)][_0x2c0318(0x12a)],'undeletedCount':_0x35ca89['length']}}};}};function a166_0x5e05(){const _0xff1271=['76872ZRIwgJ','nextAction','98tNwmBw','query-data-list-status','12645603UTgDQf','11879329UfuzeJ','257537GIdHbR','12372992eupaHK','appCode','page','relatedPages','31632050xRuwPF','related-pages-fallback','GET','alias','6TUlmhh','compress','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','data-list-status','source','215qIMAin','code','status','length','read','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','manualResolutionRequired','111057KYyQmX','string'];a166_0x5e05=function(){return _0xff1271;};return a166_0x5e05();}
1
+ const a166_0xd1e59d=a166_0x3fc8;(function(_0x9e7538,_0x4d9166){const _0x1fbf46=a166_0x3fc8,_0x17c818=_0x9e7538();while(!![]){try{const _0x4625bb=-parseInt(_0x1fbf46(0xf8))/0x1+parseInt(_0x1fbf46(0xfa))/0x2*(parseInt(_0x1fbf46(0xff))/0x3)+-parseInt(_0x1fbf46(0x107))/0x4+-parseInt(_0x1fbf46(0xfe))/0x5+parseInt(_0x1fbf46(0xf7))/0x6+-parseInt(_0x1fbf46(0x106))/0x7*(-parseInt(_0x1fbf46(0xf6))/0x8)+parseInt(_0x1fbf46(0xf3))/0x9*(parseInt(_0x1fbf46(0xfc))/0xa);if(_0x4625bb===_0x4d9166)break;else _0x17c818['push'](_0x17c818['shift']());}catch(_0x19ba72){_0x17c818['push'](_0x17c818['shift']());}}}(a166_0x567a,0xb260a));function a166_0x567a(){const _0x1e84f6=['page','3247745RSzRJy','3ALabsL','appCode','nextAction','length','manualResolutionRequired','string','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','1050bxYuRS','3221808rrAzFg','Query\x20Data\x20List\x20Page\x20facts\x20for\x20a\x20dataset','/standard-page-status?appCode=','GET','22665789xHczAU','/smartapi/lovrabet/dataset/','status','6648VttkCi','2398854yfESHr','1344080FQtRos','code','973670gcZPbV','alias','10PZZVKH'];a166_0x567a=function(){return _0x1e84f6;};return a166_0x567a();}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessDataListPageState,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a166_0x3fc8(_0x4af5c2,_0xe6dbc7){_0x4af5c2=_0x4af5c2-0xf2;const _0x567a41=a166_0x567a();let _0x3fc882=_0x567a41[_0x4af5c2];return _0x3fc882;}export const pageDataListStatus={'service':a166_0xd1e59d(0xfd),'command':'data-list-status','description':a166_0xd1e59d(0x108),'risk':'read','defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a166_0xd1e59d(0xfb),'type':a166_0xd1e59d(0x104),'description':a166_0xd1e59d(0x105)}],async 'validate'(_0x56e36d){validateDatasetSelector(_0x56e36d);},async 'dryRun'(_0x2ae23b){const _0x54ffa7=a166_0xd1e59d,_0x27588a=await loadDatasetDetailForPage(_0x2ae23b);return{'method':_0x54ffa7(0xf2),'url':_0x54ffa7(0xf4)+_0x27588a[_0x54ffa7(0xf9)]+_0x54ffa7(0x109)+encodeURIComponent(_0x2ae23b[_0x54ffa7(0x100)]),'description':serializeDryRunDescription({'dataset':{'id':_0x27588a['id'],'code':_0x27588a[_0x54ffa7(0xf9)],'name':_0x27588a['name']},'action':'query-data-list-status'})};},async 'execute'(_0x2c1060){const _0x94cd6e=a166_0xd1e59d,_0x552b58=await loadDatasetDetailForPage(_0x2c1060),_0x3736b6=await loadDataListPageStatusForGenerate(_0x2c1060,_0x552b58[_0x94cd6e(0xf9)]),_0x4de97b=getUndeletedRelatedPages(_0x552b58),_0x2d99c5=assessDataListPageState(_0x552b58['code'],_0x3736b6,{'fallbackUndeletedPages':_0x4de97b});return{'ok':!![],'data':{'datasetCode':_0x552b58[_0x94cd6e(0xf9)],'precheckSource':_0x3736b6?.['source']??'related-pages-fallback','status':_0x2d99c5[_0x94cd6e(0xf5)],'manualResolutionRequired':_0x2d99c5[_0x94cd6e(0x103)],'nextAction':_0x2d99c5[_0x94cd6e(0x101)],'dataListPageStatus':_0x3736b6,'relatedPages':{'total':_0x552b58['relatedPages']['length'],'undeletedCount':_0x4de97b[_0x94cd6e(0x102)]}}};}};
@@ -1 +1 @@
1
- function a167_0x173a(){const _0x3cb341=['appCode','137919qKkYGB','412dPvLur','progressRate','10657197dhVJDL','precheck','PARTIAL_SUCCESS','4HkpYYz','code','status','8KLklsD','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','page-pattern','1049880NMQzNb','page','reused','21631214gSoKgi','55485cqMSCH','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','Submitted\x20a\x20generate\x20task','clientOperationId','source','dataListPageStatus','dataset','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','generate-start','bool','dryRun','related-pages-fallback','allowGenerate','manualResolutionRequired','/smartapi/lovrabet/dataset/','name','13174dlcPlf','operationId','apply','CRUD_PAGE_SET','currentStep','3246LfzZms','POST','message','fieldCount','alias','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','Reusing\x20an\x20existing\x20generate\x20task','191823MatknT','number','taskId','nextAction','compress','DATA_LIST','DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.','boolean'];a167_0x173a=function(){return _0x3cb341;};return a167_0x173a();}const a167_0x1ac45d=a167_0x55d6;(function(_0x480a51,_0x1f4594){const _0x5e87f4=a167_0x55d6,_0x7b1dc3=_0x480a51();while(!![]){try{const _0x30af03=-parseInt(_0x5e87f4(0x1d6))/0x1+-parseInt(_0x5e87f4(0x1dc))/0x2*(parseInt(_0x5e87f4(0x1cd))/0x3)+-parseInt(_0x5e87f4(0x1d7))/0x4*(parseInt(_0x5e87f4(0x1e6))/0x5)+parseInt(_0x5e87f4(0x1fb))/0x6*(-parseInt(_0x5e87f4(0x1f6))/0x7)+parseInt(_0x5e87f4(0x1df))/0x8*(parseInt(_0x5e87f4(0x1d9))/0x9)+parseInt(_0x5e87f4(0x1e2))/0xa+parseInt(_0x5e87f4(0x1e5))/0xb;if(_0x30af03===_0x1f4594)break;else _0x7b1dc3['push'](_0x7b1dc3['shift']());}catch(_0x34fedb){_0x7b1dc3['push'](_0x7b1dc3['shift']());}}}(a167_0x173a,0xca4e1));function a167_0x55d6(_0x530787,_0xb06071){_0x530787=_0x530787-0x1c7;const _0x173a72=a167_0x173a();let _0x55d6f0=_0x173a72[_0x530787];return _0x55d6f0;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a167_0x1ac45d(0x1e3),'command':a167_0x1ac45d(0x1ee),'description':a167_0x1ac45d(0x1cb),'risk':'write','defaultOutputFormat':a167_0x1ac45d(0x1d1),'rejectedFlags':[{'name':'page-type','message':'page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','hint':'This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.'},{'name':a167_0x1ac45d(0x1e1),'message':a167_0x1ac45d(0x1e7),'hint':a167_0x1ac45d(0x1d3)}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a167_0x1ac45d(0x1ca),'type':'string','description':a167_0x1ac45d(0x1ed)},{'name':a167_0x1ac45d(0x1f8),'type':a167_0x1ac45d(0x1d4),'description':a167_0x1ac45d(0x1e0)}],async 'validate'(_0x3bc54a){validateDatasetSelector(_0x3bc54a);},async 'dryRun'(_0x264ff5){const _0x228ecd=a167_0x1ac45d,_0x37247c=await prepare(_0x264ff5);return{'method':_0x228ecd(0x1c7),'url':_0x228ecd(0x1f4)+_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1dd)]+'/generate-standard-pages/start','body':{'appCode':_0x264ff5[_0x228ecd(0x1d5)],'clientOperationId':_0x37247c[_0x228ecd(0x1e9)]},'description':serializeDryRunDescription({'dataset':{'id':_0x37247c['dataset']['id'],'code':_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1dd)],'name':_0x37247c[_0x228ecd(0x1ec)][_0x228ecd(0x1f5)],'fieldCount':_0x37247c['dataset'][_0x228ecd(0x1c9)]},'precheckSource':_0x37247c['dataListPageStatus']?.[_0x228ecd(0x1ea)]??_0x228ecd(0x1f1),'action':_0x228ecd(0x1ee),'clientOperationId':_0x37247c[_0x228ecd(0x1e9)],'plannedStatus':_0x37247c[_0x228ecd(0x1da)][_0x228ecd(0x1de)],'reason':_0x37247c[_0x228ecd(0x1da)][_0x228ecd(0x1c8)]})};},async 'execute'(_0x54348a){const _0x832e23=a167_0x1ac45d;if(!_0x54348a[_0x832e23(0x1ef)](_0x832e23(0x1f8))){const _0x293fc8=await pageGenerateStart[_0x832e23(0x1f0)](_0x54348a);return{'ok':!![],'message':'Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','data':_0x293fc8};}const _0x23c082=await prepare(_0x54348a);if(!_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1f2)])return{'ok':![],'message':_0x23c082[_0x832e23(0x1da)]['message'],'data':{'datasetCode':_0x23c082['dataset'][_0x832e23(0x1dd)],'pageType':_0x832e23(0x1d2),'pagePattern':_0x832e23(0x1f9),'clientOperationId':_0x23c082[_0x832e23(0x1e9)],'precheckSource':_0x23c082[_0x832e23(0x1eb)]?.[_0x832e23(0x1ea)]??_0x832e23(0x1f1),'status':_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1de)],'manualResolutionRequired':_0x23c082[_0x832e23(0x1da)][_0x832e23(0x1f3)],'nextAction':_0x23c082['precheck'][_0x832e23(0x1d0)],'query':{'command':buildDataListPageStatusQueryCommand(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],_0x54348a[_0x832e23(0x1d5)])},'dataListPageStatus':_0x23c082[_0x832e23(0x1eb)]}};const _0x5e9180=await startGenerateDataListPages(_0x54348a[_0x832e23(0x1d5)],_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],{'clientOperationId':_0x23c082['clientOperationId']}),_0x4c6637=_0x5e9180['status']==='SUCCESS'||_0x5e9180['status']===_0x832e23(0x1db)?await loadDataListPageStatusForGenerate(_0x54348a,_0x23c082[_0x832e23(0x1ec)]['code']):null,_0x318539=assessGenerateOperationState(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],_0x5e9180['status'],_0x4c6637);return{'ok':!![],'message':_0x5e9180[_0x832e23(0x1e4)]?_0x832e23(0x1cc):_0x832e23(0x1e8),'data':{'datasetCode':_0x23c082[_0x832e23(0x1ec)]['code'],'appCode':_0x54348a[_0x832e23(0x1d5)],'pageType':_0x832e23(0x1d2),'pagePattern':_0x832e23(0x1f9),'taskId':_0x5e9180[_0x832e23(0x1cf)]??null,'operationId':_0x5e9180['operationId']??null,'clientOperationId':_0x23c082[_0x832e23(0x1e9)],'jobStatus':_0x5e9180[_0x832e23(0x1de)]??null,'progressRate':typeof _0x5e9180[_0x832e23(0x1d8)]===_0x832e23(0x1ce)?_0x5e9180[_0x832e23(0x1d8)]:null,'currentStep':_0x5e9180[_0x832e23(0x1fa)]??null,'reused':_0x5e9180[_0x832e23(0x1e4)]===!![],'status':_0x318539[_0x832e23(0x1de)],'manualResolutionRequired':_0x318539[_0x832e23(0x1f3)],'nextAction':_0x318539[_0x832e23(0x1d0)],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x23c082[_0x832e23(0x1ec)][_0x832e23(0x1dd)],{'appCode':_0x54348a['appCode'],'taskId':_0x5e9180[_0x832e23(0x1cf)],'operationId':_0x5e9180[_0x832e23(0x1f7)],'clientOperationId':_0x23c082[_0x832e23(0x1e9)]})},'dataListPageStatus':_0x4c6637}};}};async function prepare(_0x2cd4db){const _0x2e3b65=a167_0x1ac45d,_0x14ab2d=await loadDatasetDetailForPage(_0x2cd4db),_0x2a07e3=await loadDataListPageStatusForGenerate(_0x2cd4db,_0x14ab2d[_0x2e3b65(0x1dd)]),_0x190e0=getUndeletedRelatedPages(_0x14ab2d);return{'dataset':_0x14ab2d,'dataListPageStatus':_0x2a07e3,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x14ab2d['code'],_0x2a07e3,{'fallbackUndeletedPages':_0x190e0})};}
1
+ const a167_0xc17910=a167_0x1677;(function(_0x1a3b21,_0xee114b){const _0x1a2034=a167_0x1677,_0x4c0fe4=_0x1a3b21();while(!![]){try{const _0x473315=-parseInt(_0x1a2034(0xae))/0x1+parseInt(_0x1a2034(0x7e))/0x2*(-parseInt(_0x1a2034(0x9e))/0x3)+parseInt(_0x1a2034(0x85))/0x4*(parseInt(_0x1a2034(0xac))/0x5)+-parseInt(_0x1a2034(0x80))/0x6+-parseInt(_0x1a2034(0x9d))/0x7+parseInt(_0x1a2034(0x87))/0x8*(parseInt(_0x1a2034(0xa8))/0x9)+parseInt(_0x1a2034(0x86))/0xa;if(_0x473315===_0xee114b)break;else _0x4c0fe4['push'](_0x4c0fe4['shift']());}catch(_0x4da3e6){_0x4c0fe4['push'](_0x4c0fe4['shift']());}}}(a167_0x16bd,0x61efd));function a167_0x1677(_0x55c9c5,_0x4fb488){_0x55c9c5=_0x55c9c5-0x7c;const _0x16bd2c=a167_0x16bd();let _0x1677a6=_0x16bd2c[_0x55c9c5];return _0x1677a6;}import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assessGenerateOperationState,assessDataListPageState,buildPageGenerateOperationStatusQueryCommand,buildDataListPageStatusQueryCommand,createPageGenerateClientOperationId,getUndeletedRelatedPages,loadDatasetDetailForPage,loadDataListPageStatusForGenerate,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a167_0x16bd(){const _0xc6478f=['status','progressRate','page-type','Dry-run\x20preview\x20(pass\x20--apply\x20to\x20execute\x20the\x20generation)','Submitted\x20a\x20generate\x20task','number','DATA_LIST','write','reused','page\x20generate-start\x20does\x20not\x20accept\x20--page-type.','name','clientOperationId','dataListPageStatus','precheck','message','SUCCESS','bool','dataset','appCode','2091845BJMCxu','83661rzSBLY','boolean','This\x20command\x20always\x20generates\x20a\x20DATA_LIST\x20page\x20from\x20a\x20dataset.','dryRun','apply','page-pattern','page','CRUD_PAGE_SET','alias','Start\x20async\x20Data\x20List\x20Page\x20generation\x20from\x20a\x20dataset','27mLZyqq','currentStep','Actually\x20execute\x20the\x20generation.\x20Without\x20this\x20flag,\x20only\x20a\x20dry-run\x20preview\x20is\x20shown.','string','230fhMsmJ','generate-start','631985cJpsDM','page\x20generate-start\x20does\x20not\x20accept\x20--page-pattern.','taskId','38mKzwke','allowGenerate','2841810rXKnJK','source','operationId','fieldCount','code','19968UheZli','15920060YfAQPr','1370184DsvZni','manualResolutionRequired','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'];a167_0x16bd=function(){return _0xc6478f;};return a167_0x16bd();}import{startGenerateDataListPages}from'../../core/api-client.js';export const pageGenerateStart={'service':a167_0xc17910(0xa4),'command':'generate-start','description':a167_0xc17910(0xa7),'risk':a167_0xc17910(0x91),'defaultOutputFormat':'compress','rejectedFlags':[{'name':a167_0xc17910(0x8c),'message':a167_0xc17910(0x93),'hint':a167_0xc17910(0xa0)},{'name':a167_0xc17910(0xa3),'message':a167_0xc17910(0x7c),'hint':'DATA_LIST\x20currently\x20has\x20one\x20fixed\x20pattern:\x20CRUD_PAGE_SET.'}],'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a167_0xc17910(0xa6),'type':a167_0xc17910(0xab),'description':a167_0xc17910(0x89)},{'name':'apply','type':a167_0xc17910(0x9f),'description':a167_0xc17910(0xaa)}],async 'validate'(_0x4e5c11){validateDatasetSelector(_0x4e5c11);},async 'dryRun'(_0x3f4e65){const _0x2dca61=a167_0xc17910,_0x94a6f0=await prepare(_0x3f4e65);return{'method':'POST','url':'/smartapi/lovrabet/dataset/'+_0x94a6f0[_0x2dca61(0x9b)][_0x2dca61(0x84)]+'/generate-standard-pages/start','body':{'appCode':_0x3f4e65['appCode'],'clientOperationId':_0x94a6f0[_0x2dca61(0x95)]},'description':serializeDryRunDescription({'dataset':{'id':_0x94a6f0[_0x2dca61(0x9b)]['id'],'code':_0x94a6f0[_0x2dca61(0x9b)]['code'],'name':_0x94a6f0[_0x2dca61(0x9b)][_0x2dca61(0x94)],'fieldCount':_0x94a6f0[_0x2dca61(0x9b)][_0x2dca61(0x83)]},'precheckSource':_0x94a6f0[_0x2dca61(0x96)]?.[_0x2dca61(0x81)]??'related-pages-fallback','action':_0x2dca61(0xad),'clientOperationId':_0x94a6f0['clientOperationId'],'plannedStatus':_0x94a6f0['precheck'][_0x2dca61(0x8a)],'reason':_0x94a6f0[_0x2dca61(0x97)][_0x2dca61(0x98)]})};},async 'execute'(_0x507d00){const _0x5bad5f=a167_0xc17910;if(!_0x507d00[_0x5bad5f(0x9a)](_0x5bad5f(0xa2))){const _0x103465=await pageGenerateStart[_0x5bad5f(0xa1)](_0x507d00);return{'ok':!![],'message':_0x5bad5f(0x8d),'data':_0x103465};}const _0x139c66=await prepare(_0x507d00);if(!_0x139c66[_0x5bad5f(0x97)][_0x5bad5f(0x7f)])return{'ok':![],'message':_0x139c66['precheck'][_0x5bad5f(0x98)],'data':{'datasetCode':_0x139c66[_0x5bad5f(0x9b)][_0x5bad5f(0x84)],'pageType':'DATA_LIST','pagePattern':'CRUD_PAGE_SET','clientOperationId':_0x139c66[_0x5bad5f(0x95)],'precheckSource':_0x139c66[_0x5bad5f(0x96)]?.[_0x5bad5f(0x81)]??'related-pages-fallback','status':_0x139c66['precheck'][_0x5bad5f(0x8a)],'manualResolutionRequired':_0x139c66[_0x5bad5f(0x97)][_0x5bad5f(0x88)],'nextAction':_0x139c66[_0x5bad5f(0x97)]['nextAction'],'query':{'command':buildDataListPageStatusQueryCommand(_0x139c66[_0x5bad5f(0x9b)][_0x5bad5f(0x84)],_0x507d00[_0x5bad5f(0x9c)])},'dataListPageStatus':_0x139c66[_0x5bad5f(0x96)]}};const _0x1a228e=await startGenerateDataListPages(_0x507d00[_0x5bad5f(0x9c)],_0x139c66[_0x5bad5f(0x9b)][_0x5bad5f(0x84)],{'clientOperationId':_0x139c66['clientOperationId']}),_0x5efa6b=_0x1a228e['status']===_0x5bad5f(0x99)||_0x1a228e[_0x5bad5f(0x8a)]==='PARTIAL_SUCCESS'?await loadDataListPageStatusForGenerate(_0x507d00,_0x139c66[_0x5bad5f(0x9b)][_0x5bad5f(0x84)]):null,_0x51c895=assessGenerateOperationState(_0x139c66[_0x5bad5f(0x9b)][_0x5bad5f(0x84)],_0x1a228e[_0x5bad5f(0x8a)],_0x5efa6b);return{'ok':!![],'message':_0x1a228e[_0x5bad5f(0x92)]?'Reusing\x20an\x20existing\x20generate\x20task':_0x5bad5f(0x8e),'data':{'datasetCode':_0x139c66[_0x5bad5f(0x9b)][_0x5bad5f(0x84)],'appCode':_0x507d00[_0x5bad5f(0x9c)],'pageType':_0x5bad5f(0x90),'pagePattern':_0x5bad5f(0xa5),'taskId':_0x1a228e[_0x5bad5f(0x7d)]??null,'operationId':_0x1a228e[_0x5bad5f(0x82)]??null,'clientOperationId':_0x139c66[_0x5bad5f(0x95)],'jobStatus':_0x1a228e[_0x5bad5f(0x8a)]??null,'progressRate':typeof _0x1a228e[_0x5bad5f(0x8b)]===_0x5bad5f(0x8f)?_0x1a228e[_0x5bad5f(0x8b)]:null,'currentStep':_0x1a228e[_0x5bad5f(0xa9)]??null,'reused':_0x1a228e[_0x5bad5f(0x92)]===!![],'status':_0x51c895[_0x5bad5f(0x8a)],'manualResolutionRequired':_0x51c895[_0x5bad5f(0x88)],'nextAction':_0x51c895['nextAction'],'query':{'command':buildPageGenerateOperationStatusQueryCommand(_0x139c66[_0x5bad5f(0x9b)][_0x5bad5f(0x84)],{'appCode':_0x507d00['appCode'],'taskId':_0x1a228e[_0x5bad5f(0x7d)],'operationId':_0x1a228e['operationId'],'clientOperationId':_0x139c66[_0x5bad5f(0x95)]})},'dataListPageStatus':_0x5efa6b}};}};async function prepare(_0x4fc214){const _0x56c0d7=a167_0xc17910,_0x3e3721=await loadDatasetDetailForPage(_0x4fc214),_0x353b66=await loadDataListPageStatusForGenerate(_0x4fc214,_0x3e3721[_0x56c0d7(0x84)]),_0x53e692=getUndeletedRelatedPages(_0x3e3721);return{'dataset':_0x3e3721,'dataListPageStatus':_0x353b66,'clientOperationId':createPageGenerateClientOperationId(),'precheck':assessDataListPageState(_0x3e3721[_0x56c0d7(0x84)],_0x353b66,{'fallbackUndeletedPages':_0x53e692})};}